From sysoevao at psychiatry.wustl.edu Thu Sep 1 08:09:04 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 01:09:04 -0500 Subject: [FieldTrip] ROC Message-ID: <76DC57362137854CB9592B496182D5FA060CE58423@wusmexmbx2.medpriv.wucon.wustl.edu> Dear field trippers, I'd like to use the Receiver Operator Characteristic (ROC) as a stat_function for fr_timelockanlaysis (monte carlo perputation test). I found the relevant function in the statfun folder, but it does not have the critical value, at which to base the subsequent analysis. Can you provide me with the hint how to implement it properly. What value of AUC can be used as a threshold? The other issue is that I also want to construct the ROC based on the 2 independent parameters obtained from the same subjects. I mean that I want to use the conbined criterium for the classification (parameter1>X and parameter 2>Y). Can you recommend to me the proper way to do it in matlab? Best Regards, Olga. Olga Sysoeva, Research Associate, PhD Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. From sysoevao at psychiatry.wustl.edu Thu Sep 1 08:20:15 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 01:20:15 -0500 Subject: [FieldTrip] ANOVA mixed design, main effect Message-ID: <76DC57362137854CB9592B496182D5FA060CE58424@wusmexmbx2.medpriv.wucon.wustl.edu> Dear fieldtriper, I still a bit confused about mixed between/within subjects ANOVA design. For example I have 1 within subject factor (condition1 and condition2) and 2 group of subjects. I'd like to examine the effect the effect of group and effect of condition, a well as interaction. The only effect I managed to examine with filedtrip right now is the interaction one. I subtracted cond1-cond2 and applied ft_timelockstatistic with independentT. I believe this approach is related to the concept of the between/within factors interaction. But how to examine main effects? I can certainly test them separately, but I appreciate any help. I believe I more or less understand the theory underlying this analysis, but what I need more now is how to implement in technically. Best, Olga. Olga Sysoeva, Research Associate, PhD Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. From Irina.Simanova at mpi.nl Thu Sep 1 16:19:42 2011 From: Irina.Simanova at mpi.nl (Irina Simanova) Date: Thu, 1 Sep 2011 16:19:42 +0200 Subject: [FieldTrip] cluster statistic error Message-ID: <0BD10838-698F-4069-B29B-2BE15CED26A5@mpi.nl> Dear Fieldtripers, I am getting "Too many input arguments" error when running permutation test on event-related data. This has to do with the 'issource' input to "statistics_montecarlo": I use same cfg parameters as in the tutorials for the permutation test. I got the error repeatedly few times on my own data, and then I checked that the error was still there for the tutorial datasets FIC, FC . % this is the tutorial data. The cfg options are same as in the tutorials [stat] = ft_timelockstatistics(cfg, timelockFIC, timelockFC); selected 149 channels selected 301 time bins selected 1 frequency bins Using the gradiometer configuration from the dataset. there are on average 4.7 neighbours per channel using "statistics_montecarlo" for the statistical testing ??? Error using ==> fieldtrip/private/statistics_montecarlo Too many input arguments. Error in ==> statistics_wrapper at 285 [stat, cfg] = statmethod(cfg, dat, cfg.design, 'issource',issource); Error in ==> ft_timelockstatistics at 119 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What is wrong here? I would appreciate any help. Kind regards, Irina From e.maris at donders.ru.nl Thu Sep 1 16:26:34 2011 From: e.maris at donders.ru.nl (Eric Maris) Date: Thu, 1 Sep 2011 16:26:34 +0200 Subject: [FieldTrip] ANOVA mixed design, main effect In-Reply-To: <76DC57362137854CB9592B496182D5FA060CE58424@wusmexmbx2.medpriv.wucon.wustl.edu> References: <76DC57362137854CB9592B496182D5FA060CE58424@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: <019b01cc68b3$29a42640$7cec72c0$@maris@donders.ru.nl> Hi Olga, > I still a bit confused about mixed between/within subjects ANOVA design. > For example I have 1 within subject factor (condition1 and condition2) and 2 > group of subjects. I'd like to examine the effect the effect of group and > effect of condition, a well as interaction. The only effect I managed to > examine with filedtrip right now is the interaction one. I subtracted cond1- > cond2 and applied ft_timelockstatistic with independentT. I believe this > approach is related to the concept of the between/within factors > interaction. But how to examine main effects? I can certainly test them > separately, but > > I appreciate any help. > I believe I more or less understand the theory underlying this analysis, but > what I need more now is how to implement in technically. Main effect of Group: Do a between-subjects analysis (using indepsamplesT) on the dependent variable cond1+cond2 Main effect of the within subjects factor: Do a within-subjects analysis of cond1 versus cond2 (using depsamplesT), ignoring the Group variable. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands Visiting address: Spinozagebouw Room B.03.44 T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 mailto:e.maris at donders.ru.nl http://www.nphyscog.com/ > > Best, > Olga. > > > Olga Sysoeva, > Research Associate, PhD > Washington University School of Medicine > Campus Box 8134 > 660 South Euclid Ave > Saint Louis, MO 63110-9909 > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you are > not the intended recipient, be advised that any unauthorized use, disclosure, > copying or the taking of any action in reliance on the contents of this > information is strictly prohibited. If you have received this email in error, > please immediately notify the sender via telephone or return mail. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From BelluscB at ninds.nih.gov Thu Sep 1 16:56:09 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Thu, 1 Sep 2011 10:56:09 -0400 Subject: [FieldTrip] a small correction to tutorial on MNE source reconstruction Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C058A50C2EE@NIHMLBX10.nih.gov> For the tutorial found at http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate, I discovered that in the section "1. Source model: Volumetric processing in Freesurfer" the pipeline needed to have recon-all use -talairach first, and -nuintensitycor second. The rest works beautifully as outlined. Thanks! Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 1 17:49:41 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 1 Sep 2011 17:49:41 +0200 Subject: [FieldTrip] a small correction to tutorial on MNE source reconstruction In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C058A50C2EE@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C058A50C2EE@NIHMLBX10.nih.gov> Message-ID: <795600CA-15C3-46D8-8682-F9FEFD30E113@donders.ru.nl> Dear Beth, Thanks for the notification. We'll look into it and fix it. Best wishes, Jan-Mathijs On Sep 1, 2011, at 4:56 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > For the tutorial found at http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate, I discovered that in the section “1. Source model: Volumetric processing in Freesurfer” the pipeline needed to have recon-all use –talairach first, and –nuintensitycor second. The rest works beautifully as outlined. > Thanks! > Beth. > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysoevao at psychiatry.wustl.edu Thu Sep 1 17:51:09 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 10:51:09 -0500 Subject: [FieldTrip] ANOVA and tails Message-ID: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> Dear Fieldtrippers, I've tried to use between subject ANOVA (independentF) and a bit confused with the tails. I've got the following message "For an independent samples F-statistic, it does not make sense to calculate a two-sided critical value." Could you explain me why? Why only right tail is possible? Best Regards, Olga. ____________________________________________________________________________ Olga Sysoeva, Research Associate, PhD Psychiatry Department, Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 ________________________________ The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysoevao at psychiatry.wustl.edu Thu Sep 1 18:36:58 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 11:36:58 -0500 Subject: [FieldTrip] ANOVA mixed design, main effect In-Reply-To: <019b01cc68b3$29a42640$7cec72c0$@maris@donders.ru.nl> References: <76DC57362137854CB9592B496182D5FA060CE58424@wusmexmbx2.medpriv.wucon.wustl.edu> <019b01cc68b3$29a42640$7cec72c0$@maris@donders.ru.nl> Message-ID: <76DC57362137854CB9592B496182D5FA060CECF5A1@wusmexmbx2.medpriv.wucon.wustl.edu> Certainly! Thank you. -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Eric Maris Sent: Thursday, September 01, 2011 9:27 AM To: 'Email discussion list for the FieldTrip project' Subject: Re: [FieldTrip] ANOVA mixed design, main effect Hi Olga, > I still a bit confused about mixed between/within subjects ANOVA design. > For example I have 1 within subject factor (condition1 and condition2) > and 2 > group of subjects. I'd like to examine the effect the effect of group > and effect of condition, a well as interaction. The only effect I > managed to examine with filedtrip right now is the interaction one. I > subtracted cond1- > cond2 and applied ft_timelockstatistic with independentT. I believe > this approach is related to the concept of the between/within factors > interaction. But how to examine main effects? I can certainly test > them separately, but > > I appreciate any help. > I believe I more or less understand the theory underlying this > analysis, but > what I need more now is how to implement in technically. Main effect of Group: Do a between-subjects analysis (using indepsamplesT) on the dependent variable cond1+cond2 Main effect of the within subjects factor: Do a within-subjects analysis of cond1 versus cond2 (using depsamplesT), ignoring the Group variable. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands Visiting address: Spinozagebouw Room B.03.44 T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 mailto:e.maris at donders.ru.nl http://www.nphyscog.com/ > > Best, > Olga. > > > Olga Sysoeva, > Research Associate, PhD > Washington University School of Medicine Campus Box 8134 > 660 South Euclid Ave > Saint Louis, MO 63110-9909 > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If > you are > not the intended recipient, be advised that any unauthorized use, disclosure, > copying or the taking of any action in reliance on the contents of > this information is strictly prohibited. If you have received this > email in error, > please immediately notify the sender via telephone or return mail. > > _______________________________________________ > 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 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. From venug001 at crimson.ua.edu Thu Sep 1 18:58:23 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Thu, 1 Sep 2011 08:58:23 -0800 Subject: [FieldTrip] ANOVA and tails In-Reply-To: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: Dear Olga, this does not mean only right tail is possible. You could have a positive or negative sign for your test statistic, which is acceptable. That can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and Condition 2. But to answer your question more substantively: A one-tail test is more consevervative than a two-tail test. A two-tail test is when you have no a priori expectation where you expect the condition 1 - condition 2 to be higher or lower. Using a non EEG example if you have two groups treatment and control, you will expect yoga to lower the depression rates in treatment group and not the control group. Similarly if you have two groups treatment and control, you will expect some protein shake to yield higher muscle mass in the treatment group and not the control group. In both cases the outcome (negative or lower in scenario one, higher or positive on scenario two) is an a priori expectation. So in a EEG sense we know that the Incongruent or deviant word will have a higher displacement than the congruent or expected word.. Going back to the conservative versus liberal nature of the statistic. If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of the tail or the reject region, however when you halve that you tabled value is half of it. So you obtained value in the first case would have to be greater than 4.85, while in the two-tail case it slide with anything over 2.43. Therefore the two-tail is not only for exploratory purposes, but is also less conservative. I hope I have helped. Warm regards gopa On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna < sysoevao at psychiatry.wustl.edu> wrote: > Dear Fieldtrippers,**** > > I’ve tried to use between subject ANOVA (independentF) and a bit confused > with the tails.**** > > I’ve got the following message**** > > “For an independent samples F-statistic, it does not make sense to > calculate a two-sided critical value.”**** > > Could you explain me why? Why only right tail is possible? **** > > Best Regards,**** > > Olga.**** > > > ____________________________________________________________________________ > **** > > Olga Sysoeva,**** > > Research Associate, PhD**** > > Psychiatry Department,**** > > Washington University School of Medicine**** > > Campus Box 8134**** > > 660 South Euclid Ave**** > > Saint Louis, MO 63110-9909**** > > ** ** > > ------------------------------ > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > > _______________________________________________ > 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 sysoevao at psychiatry.wustl.edu Thu Sep 1 19:08:52 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 12:08:52 -0500 Subject: [FieldTrip] ANOVA and tails In-Reply-To: References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: <76DC57362137854CB9592B496182D5FA060CECF5B9@wusmexmbx2.medpriv.wucon.wustl.edu> Thank you, I understand all of this. I just do not understand why I can have more liberal, less conservative criteria (2 tail) in my ANOVA design here in Filedtrip. I do not have any prior expectation about the result ( for example both increase in value for positive component , such as P300, and decrease in value for negative component (such as N1) can be considered as increase in the amplitude of this components). From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Gopakumar Venugopalan Sent: Thursday, September 01, 2011 11:58 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] ANOVA and tails Dear Olga, this does not mean only right tail is possible. You could have a positive or negative sign for your test statistic, which is acceptable. That can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and Condition 2. But to answer your question more substantively: A one-tail test is more consevervative than a two-tail test. A two-tail test is when you have no a priori expectation where you expect the condition 1 - condition 2 to be higher or lower. Using a non EEG example if you have two groups treatment and control, you will expect yoga to lower the depression rates in treatment group and not the control group. Similarly if you have two groups treatment and control, you will expect some protein shake to yield higher muscle mass in the treatment group and not the control group. In both cases the outcome (negative or lower in scenario one, higher or positive on scenario two) is an a priori expectation. So in a EEG sense we know that the Incongruent or deviant word will have a higher displacement than the congruent or expected word.. Going back to the conservative versus liberal nature of the statistic. If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of the tail or the reject region, however when you halve that you tabled value is half of it. So you obtained value in the first case would have to be greater than 4.85, while in the two-tail case it slide with anything over 2.43. Therefore the two-tail is not only for exploratory purposes, but is also less conservative. I hope I have helped. Warm regards gopa On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna > wrote: Dear Fieldtrippers, I've tried to use between subject ANOVA (independentF) and a bit confused with the tails. I've got the following message "For an independent samples F-statistic, it does not make sense to calculate a two-sided critical value." Could you explain me why? Why only right tail is possible? Best Regards, Olga. ____________________________________________________________________________ Olga Sysoeva, Research Associate, PhD Psychiatry Department, Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 ________________________________ The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________ The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From venug001 at crimson.ua.edu Thu Sep 1 19:57:25 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Thu, 1 Sep 2011 09:57:25 -0800 Subject: [FieldTrip] ANOVA and tails In-Reply-To: <76DC57362137854CB9592B496182D5FA060CECF5B9@wusmexmbx2.medpriv.wucon.wustl.edu> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> <76DC57362137854CB9592B496182D5FA060CECF5B9@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: Well you must have some expectation: Those dependent on alcohol will have a more diminshed P300 response, than someone who is not. In this case the postive or negative outcome is a net result of one group having a higher value (P300) than another group. when you have examining two components P300 and N1 then you have to perform separate tests and/or a multivariate test. In this case you will also receive some kind or R or correlation statistic where it show that the two components are inversely related to each other. That is when P300 increases, then N1 will decrease, and possibly vice versa. Again I am thinking of all this when the values have been exported to SAS or SPSS, and not in Fieldtrip. Warm regards gopa On Thu, Sep 1, 2011 at 9:08 AM, Sysoeva, Olga Vladimirovna < sysoevao at psychiatry.wustl.edu> wrote: > Thank you, I understand all of this. I just do not understand why I can > have more liberal, less conservative criteria (2 tail) in my ANOVA design > here in Filedtrip.**** > > I do not have any prior expectation about the result ( for example both > increase in value for positive component , such as P300, and decrease in > value for negative component (such as N1) can be considered as increase in > the amplitude of this components).**** > > ** ** > > *From:* fieldtrip-bounces at donders.ru.nl [mailto: > fieldtrip-bounces at donders.ru.nl] *On Behalf Of *Gopakumar Venugopalan > *Sent:* Thursday, September 01, 2011 11:58 AM > *To:* Email discussion list for the FieldTrip project > *Subject:* Re: [FieldTrip] ANOVA and tails**** > > ** ** > > Dear Olga, this does not mean only right tail is possible. You could have a > positive or negative sign for your test statistic, which is acceptable. That > can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and > Condition 2. But to answer your question more substantively:**** > > A one-tail test is more consevervative than a two-tail test. A two-tail > test is when you have no a priori expectation where you expect the condition > 1 - condition 2 to be higher or lower. Using a non EEG example if you have > two groups treatment and control, you will expect yoga to lower the > depression rates in treatment group and not the control group. **** > > Similarly if you have two groups treatment and control, you will expect > some protein shake to yield higher muscle mass in the treatment group and > not the control group. In both cases the outcome (negative or lower in > scenario one, higher or positive on scenario two) is an a priori > expectation. So in a EEG sense we know that the Incongruent or deviant word > will have a higher displacement than the congruent or expected word..**** > > Going back to the conservative versus liberal nature of the statistic.**** > > If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of > the tail or the reject region, however when you halve that you tabled value > is half of it. So you obtained value in the first case would have to be > greater than 4.85, while in the two-tail case it slide with anything over > 2.43. Therefore the two-tail is not only for exploratory purposes, but is > also less conservative.**** > > **** > > I hope I have helped.**** > > **** > > Warm regards**** > > gopa**** > > On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna < > sysoevao at psychiatry.wustl.edu> wrote:**** > > Dear Fieldtrippers,**** > > I’ve tried to use between subject ANOVA (independentF) and a bit confused > with the tails.**** > > I’ve got the following message**** > > “For an independent samples F-statistic, it does not make sense to > calculate a two-sided critical value.”**** > > Could you explain me why? Why only right tail is possible? **** > > Best Regards,**** > > Olga.**** > > > ____________________________________________________________________________ > **** > > Olga Sysoeva,**** > > Research Associate, PhD**** > > Psychiatry Department,**** > > Washington University School of Medicine**** > > Campus Box 8134**** > > 660 South Euclid Ave**** > > Saint Louis, MO 63110-9909**** > > **** > > ** ** > ------------------------------ > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > **** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > ** ** > > ------------------------------ > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > > _______________________________________________ > 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 Gregor.Volberg at psychologie.uni-regensburg.de Fri Sep 2 09:45:21 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Fri, 02 Sep 2011 09:45:21 +0200 Subject: [FieldTrip] Antw: Re: ANOVA and tails In-Reply-To: References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> Dear Olga and Gopa, I would like to comment on this discussion because I fear that there could be some misunderstandings. Unlike t, the F statistic is not sensitive to the direction of a difference. The t value gets positive if means of group A > group B, and negative if B > A. Therefore, the hypothesis that A >< B can be tested on both tails of the t distribution. On contrast, the F value gets positive if A > B as well as if B > A. Small values of F, on the left tail of the distribition, indicate that there is no difference between means of A and B. This is why a left tail or a two-tailed test does not make sense with an F-Test. So Olga, if you have a two-group design, and if you want to apply a left- or two-tailed test, then use the t statistic. Beware that the two-sided test is usually considered more (not less) conservative that the one-sided test. This is because the critical value of t increases for two-sided tests. It is the size if the rejection region for H0 that needs to be halved, not the one-sided critical value of your test statistic. For example, a result of t(20)= 1.9 is significant in a one-tail right-sided test where it exceeds the critical value of 1.72 (the 0.95 quantile of a t distribution with 20 df). But it is not significant in a two sided test where the critical values are 2.09 (0.975 quantile) and -2.09 (0.025 quantile). Best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Gopakumar Venugopalan 9/1/2011 6:58 PM >>> Dear Olga, this does not mean only right tail is possible. You could have a positive or negative sign for your test statistic, which is acceptable. That can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and Condition 2. But to answer your question more substantively: A one-tail test is more consevervative than a two-tail test. A two-tail test is when you have no a priori expectation where you expect the condition 1 - condition 2 to be higher or lower. Using a non EEG example if you have two groups treatment and control, you will expect yoga to lower the depression rates in treatment group and not the control group. Similarly if you have two groups treatment and control, you will expect some protein shake to yield higher muscle mass in the treatment group and not the control group. In both cases the outcome (negative or lower in scenario one, higher or positive on scenario two) is an a priori expectation. So in a EEG sense we know that the Incongruent or deviant word will have a higher displacement than the congruent or expected word.. Going back to the conservative versus liberal nature of the statistic. If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of the tail or the reject region, however when you halve that you tabled value is half of it. So you obtained value in the first case would have to be greater than 4.85, while in the two-tail case it slide with anything over 2.43. Therefore the two-tail is not only for exploratory purposes, but is also less conservative. I hope I have helped. Warm regards gopa On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna wrote: Dear Fieldtrippers, I’ve tried to use between subject ANOVA (independentF) and a bit confused with the tails. I’ve got the following message “For an independent samples F-statistic, it does not make sense to calculate a two-sided critical value.” Could you explain me why? Why only right tail is possible? Best Regards, Olga. ____________________________________________________________________________ Olga Sysoeva, Research Associate, PhD Psychiatry Department, Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. _______________________________________________ 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 Gregor.Volberg at psychologie.uni-regensburg.de Fri Sep 2 11:01:26 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Fri, 02 Sep 2011 11:01:26 +0200 Subject: [FieldTrip] Antw: Re: ANOVA and tails In-Reply-To: <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> Message-ID: <4E60B786020000570000A93A@gwsmtp1.uni-regensburg.de> Dear Olga, Just to add to my former mail: Another way to think of F and t tests is that the F-Test is _always_ two-sided, in the sense that it tests for both differences A>B and B>A. So I think you already did the test that you intended to do. But formally, the rejection region is on the right side of the F distribution, and so it should be indicated in the cfg structure. Cheers, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> "Gregor Volberg" 9/2/2011 9:45 AM >>> Dear Olga and Gopa, I would like to comment on this discussion because I fear that there could be some misunderstandings. Unlike t, the F statistic is not sensitive to the direction of a difference. The t value gets positive if means of group A > group B, and negative if B > A. Therefore, the hypothesis that A >< B can be tested on both tails of the t distribution. On contrast, the F value gets positive if A > B as well as if B > A. Small values of F, on the left tail of the distribition, indicate that there is no difference between means of A and B. This is why a left tail or a two-tailed test does not make sense with an F-Test. So Olga, if you have a two-group design, and if you want to apply a left- or two-tailed test, then use the t statistic. Beware that the two-sided test is usually considered more (not less) conservative that the one-sided test. This is because the critical value of t increases for two-sided tests. It is the size if the rejection region for H0 that needs to be halved, not the one-sided critical value of your test statistic. For example, a result of t(20)= 1.9 is significant in a one-tail right-sided test where it exceeds the critical value of 1.72 (the 0.95 quantile of a t distribution with 20 df). But it is not significant in a two sided test where the critical values are 2.09 (0.975 quantile) and -2.09 (0.025 quantile). Best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Gopakumar Venugopalan 9/1/2011 6:58 PM >>> Dear Olga, this does not mean only right tail is possible. You could have a positive or negative sign for your test statistic, which is acceptable. That can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and Condition 2. But to answer your question more substantively: A one-tail test is more consevervative than a two-tail test. A two-tail test is when you have no a priori expectation where you expect the condition 1 - condition 2 to be higher or lower. Using a non EEG example if you have two groups treatment and control, you will expect yoga to lower the depression rates in treatment group and not the control group. Similarly if you have two groups treatment and control, you will expect some protein shake to yield higher muscle mass in the treatment group and not the control group. In both cases the outcome (negative or lower in scenario one, higher or positive on scenario two) is an a priori expectation. So in a EEG sense we know that the Incongruent or deviant word will have a higher displacement than the congruent or expected word.. Going back to the conservative versus liberal nature of the statistic. If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of the tail or the reject region, however when you halve that you tabled value is half of it. So you obtained value in the first case would have to be greater than 4.85, while in the two-tail case it slide with anything over 2.43. Therefore the two-tail is not only for exploratory purposes, but is also less conservative. I hope I have helped. Warm regards gopa On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna wrote: Dear Fieldtrippers, I’ve tried to use between subject ANOVA (independentF) and a bit confused with the tails. I’ve got the following message “For an independent samples F-statistic, it does not make sense to calculate a two-sided critical value.” Could you explain me why? Why only right tail is possible? Best Regards, Olga. ____________________________________________________________________________ Olga Sysoeva, Research Associate, PhD Psychiatry Department, Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. _______________________________________________ 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 dualitystan at gmail.com Fri Sep 2 11:21:59 2011 From: dualitystan at gmail.com (Stanley Klein) Date: Fri, 2 Sep 2011 02:21:59 -0700 Subject: [FieldTrip] Antw: Re: ANOVA and tails In-Reply-To: <4E60B786020000570000A93A@gwsmtp1.uni-regensburg.de> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> <4E60B786020000570000A93A@gwsmtp1.uni-regensburg.de> Message-ID: Gregor is correct in what he says. I would like to take it one step further. I hope future statistics books and even Fieldtrip would remove the option of doing a two tailed t-test. If you want to do a two tail t then simply use F =t^2. That removes ever needing to say you are doing a two-tail t. However in doing the one-tailed t you would need to specify which tail. The default of the t could be an upper tail default so you would simply switch sign if wanting to to the lower tail. The benefit of this approach is that it can minimize the errors and complexity of dealing with cfg structures. Stan On Fri, Sep 2, 2011 at 2:01 AM, Gregor Volberg < Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > Dear Olga, > > Just to add to my former mail: > > Another way to think of F and t tests is that the F-Test is _always_ > two-sided, in the sense that it tests for both differences A>B and B>A. So I > think you already did the test that you intended to do. But formally, the > rejection region is on the right side of the F distribution, and so it > should be indicated in the cfg structure. > > Cheers, > > Gregor > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > >>> "Gregor Volberg" > 9/2/2011 9:45 AM >>> > > Dear Olga and Gopa, > > > I would like to comment on this discussion because I fear that there could > be some misunderstandings. > > Unlike t, the F statistic is not sensitive to the direction of a > difference. The t value gets positive if means of group A > group B, and > negative if B > A. Therefore, the hypothesis that A >< B can be tested on > both tails of the t distribution. On contrast, the F value gets positive if > A > B as well as if B > A. Small values of F, on the left tail of the > distribition, indicate that there is no difference between means of A and B. > This is why a left tail or a two-tailed test does not make sense with an > F-Test. > > So Olga, if you have a two-group design, and if you want to apply a left- > or two-tailed test, then use the t statistic. Beware that the two-sided test > is usually considered more (not less) conservative that the one-sided test. > This is because the critical value of t increases for two-sided tests. It is > the size if the rejection region for H0 that needs to be halved, not the > one-sided critical value of your test statistic. For example, a result of > t(20)= 1.9 is significant in a one-tail right-sided test where it exceeds > the critical value of 1.72 (the 0.95 quantile of a t distribution with 20 > df). But it is not significant in a two sided test where the critical values > are 2.09 (0.975 quantile) and -2.09 (0.025 quantile). > > > Best regards, > > Gregor > > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > >>> Gopakumar Venugopalan 9/1/2011 6:58 PM >>> > > Dear Olga, this does not mean only right tail is possible. You could have a > positive or negative sign for your test statistic, which is acceptable. That > can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and > Condition 2. But to answer your question more substantively: > > A one-tail test is more consevervative than a two-tail test. A two-tail > test is when you have no a priori expectation where you expect the condition > 1 - condition 2 to be higher or lower. Using a non EEG example if you have > two groups treatment and control, you will expect yoga to lower the > depression rates in treatment group and not the control group. > > Similarly if you have two groups treatment and control, you will expect > some protein shake to yield higher muscle mass in the treatment group and > not the control group. In both cases the outcome (negative or lower in > scenario one, higher or positive on scenario two) is an a priori > expectation. So in a EEG sense we know that the Incongruent or deviant word > will have a higher displacement than the congruent or expected word.. > > Going back to the conservative versus liberal nature of the statistic. > > If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of > the tail or the reject region, however when you halve that you tabled value > is half of it. So you obtained value in the first case would have to be > greater than 4.85, while in the two-tail case it slide with anything over > 2.43. Therefore the two-tail is not only for exploratory purposes, but is > also less conservative. > > > I hope I have helped. > > > Warm regards > > gopa > > On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna < > sysoevao at psychiatry.wustl.edu> wrote: > >> Dear Fieldtrippers, >> >> I’ve tried to use between subject ANOVA (independentF) and a bit confused >> with the tails. >> >> I’ve got the following message >> >> “For an independent samples F-statistic, it does not make >> sense to calculate a two-sided critical value.” >> >> Could you explain me why? Why only right tail is possible? >> >> Best Regards, >> >> Olga. >> >> ____________________________________________________________________________ >> >> >> Olga Sysoeva, >> >> Research Associate, PhD >> >> Psychiatry Department, >> >> Washington University School of Medicine >> >> Campus Box 8134 >> >> 660 South Euclid Ave >> >> Saint Louis, MO 63110-9909 >> >> >> >> ------------------------------ >> The materials in this message are private and may contain Protected >> Healthcare Information or other information of a sensitive nature. If you >> are not the intended recipient, be advised that any unauthorized use, >> disclosure, copying or the taking of any action in reliance on the contents >> of this information is strictly prohibited. If you have received this email >> in error, please immediately notify the sender via telephone or return mail. >> >> >> _______________________________________________ >> 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 venug001 at crimson.ua.edu Fri Sep 2 13:36:20 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Fri, 2 Sep 2011 03:36:20 -0800 Subject: [FieldTrip] Antw: Re: ANOVA and tails In-Reply-To: <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> Message-ID: Thank you Gregor, I said the converse of everything I wanted to say. I appreciate the clarification. I know one thing never type or speak the day you have been sleep deprived. In my case I end up saying the opposite of everything I intended to say (tests of significances included!). Warm regards gopa On Thu, Sep 1, 2011 at 11:45 PM, Gregor Volberg < Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > Dear Olga and Gopa, > > I would like to comment on this discussion because I fear that there could > be some misunderstandings. > > Unlike t, the F statistic is not sensitive to the direction of a > difference. The t value gets positive if means of group A > group B, and > negative if B > A. Therefore, the hypothesis that A >< B can be tested on > both tails of the t distribution. On contrast, the F value gets positive if > A > B as well as if B > A. Small values of F, on the left tail of the > distribition, indicate that there is no difference between means of A and B. > This is why a left tail or a two-tailed test does not make sense with an > F-Test. > > So Olga, if you have a two-group design, and if you want to apply a left- > or two-tailed test, then use the t statistic. Beware that the two-sided test > is usually considered more (not less) conservative that the one-sided test. > This is because the critical value of t increases for two-sided tests. It is > the size if the rejection region for H0 that needs to be halved, not the > one-sided critical value of your test statistic. For example, a result of > t(20)= 1.9 is significant in a one-tail right-sided test where it exceeds > the critical value of 1.72 (the 0.95 quantile of a t distribution with 20 > df). But it is not significant in a two sided test where the critical values > are 2.09 (0.975 quantile) and -2.09 (0.025 quantile). > > Best regards, > > Gregor > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > >>> Gopakumar Venugopalan 9/1/2011 6:58 PM >>> > > Dear Olga, this does not mean only right tail is possible. You could have a > positive or negative sign for your test statistic, which is acceptable. That > can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and > Condition 2. But to answer your question more substantively: > > A one-tail test is more consevervative than a two-tail test. A two-tail > test is when you have no a priori expectation where you expect the condition > 1 - condition 2 to be higher or lower. Using a non EEG example if you have > two groups treatment and control, you will expect yoga to lower the > depression rates in treatment group and not the control group. > > Similarly if you have two groups treatment and control, you will expect > some protein shake to yield higher muscle mass in the treatment group and > not the control group. In both cases the outcome (negative or lower in > scenario one, higher or positive on scenario two) is an a priori > expectation. So in a EEG sense we know that the Incongruent or deviant word > will have a higher displacement than the congruent or expected word.. > > Going back to the conservative versus liberal nature of the statistic. > > If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of > the tail or the reject region, however when you halve that you tabled value > is half of it. So you obtained value in the first case would have to be > greater than 4.85, while in the two-tail case it slide with anything over > 2.43. Therefore the two-tail is not only for exploratory purposes, but is > also less conservative. > > I hope I have helped. > > Warm regards > > gopa > > On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna < > sysoevao at psychiatry.wustl.edu> wrote: > >> Dear Fieldtrippers, >> >> I’ve tried to use between subject ANOVA (independentF) and a bit confused >> with the tails. >> >> I’ve got the following message >> >> “For an independent samples F-statistic, it does not make sense to >> calculate a two-sided critical value.” >> >> Could you explain me why? Why only right tail is possible? >> >> Best Regards, >> >> Olga. >> >> ____________________________________________________________________________ >> >> >> Olga Sysoeva, >> >> Research Associate, PhD >> >> Psychiatry Department, >> >> Washington University School of Medicine >> >> Campus Box 8134 >> >> 660 South Euclid Ave >> >> Saint Louis, MO 63110-9909 >> >> >> ------------------------------ >> The materials in this message are private and may contain Protected >> Healthcare Information or other information of a sensitive nature. If you >> are not the intended recipient, be advised that any unauthorized use, >> disclosure, copying or the taking of any action in reliance on the contents >> of this information is strictly prohibited. If you have received this email >> in error, please immediately notify the sender via telephone or return mail. >> >> >> _______________________________________________ >> 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 alotof_xd at yahoo.com Sat Sep 3 04:27:59 2011 From: alotof_xd at yahoo.com (alotof eve) Date: Fri, 2 Sep 2011 19:27:59 -0700 (PDT) Subject: [FieldTrip] 4D data reading problem Message-ID: <1315016879.43614.YahooMailNeo@web125508.mail.ne1.yahoo.com> Hello experts! I need help on 4D data reading with ft_read_header. When I type hdr = ft_read_header('e,rfhp1.0Hz,COH) It always shows such error: ??? Error using ==> _colonobj Function '_colonobj' is not defined for values of class 'uint32'. Error in ==> C:\MATLAB6p5\toolbox\fieldtrip-20110420\fileio\private\read_4d_hdr.m On line 105  ==>     for event = 1:header.epoch_data(epoch).total_var_events Error in ==> C:\MATLAB6p5\toolbox\fieldtrip-20110420\fileio\ft_read_header.m On line 153  ==>     orig            = read_4d_hdr(datafile); I checked into the program and I am sure the error is from "for event = 1:header.epoch_data(epoch).total_var_events" which is line 153 in read_4d_hdr.m I tracked and got information before this sentence that in this data, epoch = [1, 2, 3, 4, 5]; epoch_data(epoch).total_var_events = [65536, 1.6511e+009, 0, 0, 0]; Cannot understand why it said "Function '_colonobj' is not defined for values of class 'uint32'." Any suggestions to settle this? Thanks, Eve -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Sun Sep 4 08:24:15 2011 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Sun, 4 Sep 2011 08:24:15 +0200 Subject: [FieldTrip] 4D data reading problem In-Reply-To: <1315016879.43614.YahooMailNeo@web125508.mail.ne1.yahoo.com> References: <1315016879.43614.YahooMailNeo@web125508.mail.ne1.yahoo.com> Message-ID: <27E08D8C-E9B2-4548-B221-31C831FA8974@uni-konstanz.de> Hi Eve, > Hello experts! > > I need help on 4D data reading with ft_read_header. > When I type hdr = ft_read_header('e,rfhp1.0Hz,COH) > could it be that you are trying to read a file containing the coil measurement only? Just try the same without the extension ',COH' that should work. Good luck tzvetan ******************************************* Tzvetan Popov Clinical Psychology University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-883086 Fax: 0049-7531-884601 Email: tzvetan.popov at uni-konstanz.de ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at yahoo.com Sun Sep 4 22:52:02 2011 From: alotof_xd at yahoo.com (alotof eve) Date: Sun, 4 Sep 2011 13:52:02 -0700 (PDT) Subject: [FieldTrip] 4D data reading problem In-Reply-To: <27E08D8C-E9B2-4548-B221-31C831FA8974@uni-konstanz.de> References: <1315016879.43614.YahooMailNeo@web125508.mail.ne1.yahoo.com> <27E08D8C-E9B2-4548-B221-31C831FA8974@uni-konstanz.de> Message-ID: <1315169522.94243.YahooMailNeo@web125503.mail.ne1.yahoo.com> Hi, Tzvetan, Thank you firstly. I tried it as your suggestion but still failed. I also tried another type of data "c,rfDC", same problem happened. A possibility I guess is that I run matlab under windows. I just found similar problem reported before and Jan-Mathijsmentioned that it might due to using windows. Just want to make sure if mine is the same problem and the possible way to settle it. Thanks, Eve ________________________________ From: Tzvetan Popov To: alotof eve ; Email discussion list for the FieldTrip project Sent: Saturday, September 3, 2011 11:24 PM Subject: Re: [FieldTrip] 4D data reading problem Hi Eve, Hello experts! > > >I need help on 4D data reading with ft_read_header. >When I type hdr = ft_read_header('e,rfhp1.0Hz,COH) > >could it be that you are trying to read a file containing the coil measurement only? Just try the same without the extension ',COH' that should work. Good luck tzvetan ******************************************* Tzvetan Popov   Clinical Psychology        University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-883086 Fax:      0049-7531-884601 Email:  tzvetan.popov at uni-konstanz.de******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Mon Sep 5 12:59:37 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Mon, 5 Sep 2011 12:59:37 +0200 (CEST) Subject: [FieldTrip] Forward solution using concentric spheres and BEM models In-Reply-To: <586785902.1159239.1315218794046.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <780740987.1159792.1315220377719.JavaMail.root@draco.zimbra.ru.nl> Dear Juan Pablo and Margit The function 'ft_prepare_mesh' takes care of triangulating every compartment via the cfg.tissue option. This option contains the integers which describe a type of tissue, given that the user beforehand defined all voxels of the segmented MRI compartment as having that particular value. As an example, download the sample MRI in FieldTrip ftp location: ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip Create a folder and unzip these files. % read in the mri mri = ft_read_mri('Subject01.mri'); % segment it cfg = []; cfg.output = {'scalp', 'skull', 'brain'}; seg = ft_volumesegment(cfg, mri); % assign a label scalp = (seg.scalp) & ~(seg.skull | seg.brain); skull = 2*(seg.skull); brain = 3*(seg.brain); mri_segment = scalp + skull + brain; % build the meshes cfg = []; cfg.method = 'segmentation'; cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; cfg.numvertices = [2000 1000 800]; cfg.sourceunits = 'mm'; cfg.mriunits = 'mm'; bnd = ft_prepare_mesh(cfg, mri_segment); If any of the tissues has a different value from cfg.tissues this won't be triangulated. To check for this use ft_sourceplot in the interactive mode. By clicking around you can see the tissue's value in the command window: % view the labelled segmentations mri2 = mri; mri2.seg = mri_segment; cfg=[]; cfg.interactive = 'yes'; cfg.funparameter = 'seg'; ft_sourceplot(cfg,mri2); About the concentric spheres: both ways to derive a concentric spheres model are correct. In one case you directly build the vol structure and you assume you know the radiuses of your spheres. In the other case you allow the ft_prepare_concentricspheres function to build the spheres starting from realistic geometrical boundaries. The second approach is my favorite because the ft_prepare function contains a function that fits a sphere to each boundary and I don't have to do it myself. The first approach (directly force the radiuses in your vol structure) is preferable if you derive the information from other software (e.g. CTF's MRIView) or if you fit the sphere yourself. @Pablo If the sphere is fitted inside the brain it is correct. You do not want the sphere to include other tissues, because your assumption for the construction of the forward model is that the tissue inside the sphere is homogeneous. For a more realistic model (encompassing the whole brain volume) I would rather use a BEM model. I hope this helps, Cristiano ----- "Margit Schönherr" schreef: > Van: "Margit Schönherr" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Vrijdag 19 augustus 2011 17:23:34 > Onderwerp: Re: [FieldTrip] Forward solution using concentric spheres and BEM models > > Hello Juan Pablo, > > I am using fieldtrip-20110603. > Now that you say, that your problem persisted, I remember having > changed the code of prepare_mesh_segmentation. You find the function > in the private directory. In line 25, it sets cfg.tissue = 1 if mri > has fields 'brain' or 'scalp'. I think this explains why the > segmentation is done for compartment 1 only. So I have simply > commented this line, so that cfg.tissue is left unchanged, and the > segmentation is done for all compartments. > > I know that this is bad style, but I wanted to get it working. And > since I was relatively new to fieldtrip, I hesitated to ask the > discussion list... > > I hope this helps. And I'm open for better solutions. > Best, > Margit > > > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > im Auftrag von Juan Pablo Neira [jpnv2006 at gmail.com] > Gesendet: Freitag, 19. August 2011 16:01 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] Forward solution using concentric spheres and > BEM models > > Thank you Margit for your help, > > I tried your sugestion to create the geometrical description of the > brain, skull and scalp but > I am still having the same output bnd = 1x1 struct (pnt and tri just > of the brain). I should have > bnd = 1x3 struct (pnt and tri of the brain, skull and scalp). > > This is the information in the command line in matlab > not downsampling brain > not downsampling scalp > not downsampling skull > using the segmentation approach > using the segmented MRI > triangulating the boundary of compartment 1 > segmentation compartment 1 of 1 completed > > Can you tell me which version of fieldtrip (fieldtrip-yyyymmdd) are > you using so i could compare the code of the > function ft_prepare_mesh. > > Regards, > > Juan Pablo > > 2011/8/18 Schönherr, Margit : > > Hello, > > > > I probably cannot help you with all your questions, but currently > I'm also dealing with MRI segmentation and volume conductors, so maybe > my solutions can be useful for you. > > Concerning your point 5 (geometrical description of the brain, > skull, and scalp), I have done it the following way: > > > > cfg = []; > > cfg.method = 'segmentation'; > > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > > cfg.numvertices = [2000 1000 800]; > > cfg.sourceunits = 'mm'; > > cfg.mriunits = 'mm'; > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > I think you have to specify a vector 'cfg.numvertices', a number of > vertices for each compartment. > > By the way, at the beginning of ft_prepare_mesh the cfg-field > 'numcompartments' is removed from the cfg structure (at least in my > fieldtrip version, which is not the latest). > > > > Another question that comes to me is, why you need the segmented MRI > for a concentric spheres volume conductor? So, regarding point 6, you > can build such a vol-structure for example like this: > > > > vol.unit = 'm'; > > vol.o = origin; > > vol.r = [R_brain R_skull R_skin]; > > vol.c = [1 1/80 1]; > > > > By this, you can also define the radius as you like. > > > > Best, > > Margit > > > > > > > > > > ________________________________________ > > Von: fieldtrip-bounces at donders.ru.nl > [fieldtrip-bounces at donders.ru.nl] im Auftrag von Juan Pablo Neira > [jpnv2006 at gmail.com] > > Gesendet: Mittwoch, 17. August 2011 14:58 > > An: fieldtrip at donders.ru.nl > > Betreff: [FieldTrip] Forward solution using concentric spheres and > BEM models > > > > Hello, > > > > I am working with an individual MRI and EEG data to do the forward > > solution with two different volume's model (concentric spheres and > > BEM), > > so at the end i can compare the results. But i did not have the > > expected results of the concentric spheres model until now. > > > > This is my script: > > > > 1. Read individual MRI > > mri=ft_read_mri('data_patient_1\******.hdr'); > > > > %I got this "Warning: flipping 1st dimension (L-R) to obtain volume > in > > neurological convention" > > > > %How can i do a homogenous transformation matrix, using the voxel > dimensions > > %that are specified in hdr.dime.pixdim? > > > > 2. Realign to 'head coordinates' > > > > 3. MRI Reslicing > > > > 4. MRI segmentation: (brain, skull,scalp) > > > > 5. Create geometrical description of the brain, skull and scalp (3 > compartments) > > > > cfg = []; > > cfg.interactive = 'no'; %segmentation method > > cfg.numvertices = 3000; > > cfg.sourceunits = 'mm'; > > cfg.downsample = 2; > > cfg.numcompartments = 3; > > cfg.tissue = {'brain' 'skull' 'scalp'}; > > cfg.smooth = 'yes'; > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > %The output just give me the geometrical description of the brain. > > How can i get the geometrical description of > > %the skull and scalp also to proceed to create a 3 spheres > concentric > > sphere model? > > > > 6. If i have the 3 geometrical descriptions (brain, skull and > scalp). > > Create a 3 concentric spheres model. > > > > cfg = []; > > cfg.headshape = [bnd1 bnd2 bnd3]; % brain- skull - scalp > > cfg.conductivity = [0.33 0.0042 0.331]; > > [vol, cfg] = prepare_concentricspheres(cfg); > > > > %I got the model but part of the brain is outside of its sphere and > > also the skull. How can I increase the radius so > > % the whole brain will be inside its sphere and also the skull? > The > > sphere of the scalp fix good. > > > > I hope someone can help me solve these questions. > > > > Regards, > > > > Juan Pablo > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Nina.Kahlbrock at uni-duesseldorf.de Mon Sep 5 14:45:53 2011 From: Nina.Kahlbrock at uni-duesseldorf.de (Nina Kahlbrock) Date: Mon, 05 Sep 2011 14:45:53 +0200 Subject: [FieldTrip] effect sizes in M/EEG data Message-ID: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> Dear statistic experts, I have a rather general question concerning effect sizes. I understand that t-values give me an approximation of the effect size, as they state how big the difference between two conditions is by taking into account the variance and the number of observations. However, as I recall, effect sizes (like Cohen’s d) are computed in order to find out how important the effect is, independent of the number of observations. However, if I understand the code correctly, dependent samples t-values are computed in a very similar way as Cohen’s d (which is “the” value for effect sizes), both including the variance and thus the number of observations in their functions. In order to draw conclusions about the importance of the observed effect, is it necessary to compute effect sizes like Cohen’s d or is it sufficient to compute t-values as effect sizes for M/EEG data? If important to compute effect sizes in a way different from t-values, does anyone know of a function that computes effect sizes like that in FT? Thank you in advance for your answer. Best Regards, Nina - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Nina Kahlbrock Institute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Düsseldorf Tel.: +49 211 81 18075 Fax. .: +49 211 81 19916 Mail: Nina.Kahlbrock at med.uni-duesseldorf.de http://www.uniklinik-duesseldorf.de/medpsychologie -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Tue Sep 6 10:21:45 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Tue, 06 Sep 2011 10:21:45 +0200 Subject: [FieldTrip] Antw: effect sizes in M/EEG data In-Reply-To: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> References: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> Message-ID: <4E65F439020000570000A96D@gwsmtp1.uni-regensburg.de> Dear Nina, dependend samples t values can easily be transformed into Cohen's d as d = t / sqrt(df) [taken from Rosnow & Rosenthal, Effect sizes for Experimenting Psychologists, Canadian Journal of Experimental Psychology, 2003, 57:3, 221-237; you should find a pdf copy with a search on Google scholar]. For example, a t value of 5.15 with 19 degrees of freedom corresponds to a d of 5.15/sqrt(19) = 1.18. So just compute depsamplesT and divide the resulting vector or matrix by the number of dfs - no further FT functions are needed. My two cents are that effect sizes are especially useful for integrating results across studies where the very same design is applied to different samples, e.g., in clinical trials on pharmaceutical products. In EEG/MEG studies, even when they are on the same topic, there will be very divergent experimenting protocols (timing, task, etc), and also the dependent variable will differ from study to study, depending on the chosen time points / frequencies / channels of interest. A common effect size metric like Cohen's d does not improve the comparibility much in this case. I would therefore simply report the t statistic along with the corresponding df and p, and leave it for the interested reader to compute the corresponding d if there should be a need for that. Best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Nina Kahlbrock 9/5/2011 2:45 PM >>> Dear statistic experts, I have a rather general question concerning effect sizes. I understand that t-values give me an approximation of the effect size, as they state how big the difference between two conditions is by taking into account the variance and the number of observations. However, as I recall, effect sizes (like Cohen’s d) are computed in order to find out how important the effect is, independent of the number of observations. However, if I understand the code correctly, dependent samples t-values are computed in a very similar way as Cohen’s d (which is “the” value for effect sizes), both including the variance and thus the number of observations in their functions. In order to draw conclusions about the importance of the observed effect, is it necessary to compute effect sizes like Cohen’s d or is it sufficient to compute t-values as effect sizes for M/EEG data? If important to compute effect sizes in a way different from t-values, does anyone know of a function that computes effect sizes like that in FT? Thank you in advance for your answer. Best Regards, Nina - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Nina Kahlbrock Institute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Düsseldorf Tel.: +49 211 81 18075 Fax. .: +49 211 81 19916 Mail: Nina.Kahlbrock at med.uni-duesseldorf.de http://www.uniklinik-duesseldorf.de/medpsychologie -------------- next part -------------- An HTML attachment was scrubbed... URL: From dualitystan at gmail.com Tue Sep 6 11:16:25 2011 From: dualitystan at gmail.com (Stanley Klein) Date: Tue, 6 Sep 2011 02:16:25 -0700 Subject: [FieldTrip] Antw: effect sizes in M/EEG data In-Reply-To: <4E65F439020000570000A96D@gwsmtp1.uni-regensburg.de> References: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> <4E65F439020000570000A96D@gwsmtp1.uni-regensburg.de> Message-ID: Dear Nina, Gregor is correct. A simple way to think of it is that effect size (d) is the distance between two means divided by the standard deviation of the data (like IQ). For determining significance one uses t, which is the same difference of the means, but now divided by the standard error (the standard deviation of the means). SD doesn't depend on the number of trials, but SE does. I often advocate reporting d plus its standard error. That way one can avoid reporting an embarrassing naked statistic (a number without its error bar). Stan On Tue, Sep 6, 2011 at 1:21 AM, Gregor Volberg < Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > Dear Nina, > > dependend samples t values can easily be transformed into Cohen's d as d = > t / sqrt(df) [taken from Rosnow & Rosenthal, Effect sizes for Experimenting > Psychologists, Canadian Journal of Experimental Psychology, 2003, 57:3, > 221-237; you should find a pdf copy with a search on Google scholar]. For > example, a t value of 5.15 with 19 degrees of freedom corresponds to a d of > 5.15/sqrt(19) = 1.18. So just compute depsamplesT and divide the resulting > vector or matrix by the number of dfs - no further FT functions are needed. > > My two cents are that effect sizes are especially useful for integrating > results across studies where the very same design is applied to different > samples, e.g., in clinical trials on pharmaceutical products. In EEG/MEG > studies, even when they are on the same topic, there will be very divergent > experimenting protocols (timing, task, etc), and also the dependent variable > will differ from study to study, depending on the chosen time points / > frequencies / channels of interest. A common effect size metric like Cohen's > d does not improve the comparibility much in this case. I would therefore > simply report the t > > statistic along with the corresponding df and p, and leave it for the > interested reader to compute the corresponding d if there should be a need > for that. > > Best regards, > > Gregor > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > >>> Nina Kahlbrock 9/5/2011 2:45 PM > >>> > > Dear statistic experts,**** > > ** ** > > I have a rather general question concerning effect sizes. I understand that > t-values give me an approximation of the effect size, as they state how big > the difference between two conditions is by taking into account the variance > and the number of observations. However, as I recall, effect sizes (like > Cohen’s d) are computed in order to find out how important the effect is, > independent of the number of observations. However, if I understand the code > correctly, dependent samples t-values are computed in a very similar way as > Cohen’s d (which is “the” value for effect sizes), both including the > variance and thus the number of observations in their functions.**** > > In order to draw conclusions about the importance of the observed effect, > is it necessary to compute effect sizes like Cohen’s d or is it sufficient > to compute t-values as effect sizes for M/EEG data? If important to compute > effect sizes in a way different from t-values, does anyone know of a > function that computes effect sizes like that in FT?**** > > ** ** > > Thank you in advance for your answer.**** > > ** ** > > Best Regards,**** > > ** ** > > Nina**** > > ** ** > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - -**** > > ** ** > > Nina Kahlbrock**** > > Institute of Clinical Neuroscience and Medical Psychology **** > > Heinrich Heine University Duesseldorf**** > > Universitaetsstr. 1**** > > 40225 Düsseldorf**** > > ** ** > > Tel.: +49 211 81 18075**** > > Fax. .: +49 211 81 19916**** > > ** ** > > Mail: Nina.Kahlbrock at med.uni-duesseldorf.de**** > > http://www.uniklinik-duesseldorf.de/medpsychologie**** > > ** ** > > _______________________________________________ > 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 venug001 at crimson.ua.edu Tue Sep 6 14:14:52 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Tue, 6 Sep 2011 04:14:52 -0800 Subject: [FieldTrip] Antw: effect sizes in M/EEG data In-Reply-To: References: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> <4E65F439020000570000A96D@gwsmtp1.uni-regensburg.de> Message-ID: Dear All, Stevens (1996) in his multivariate statistics talks about the use of eta squared and partial eta squared for use in F and t tests. He cites Cohen (1977) while saying this: The partial Eta square (η2) has statistical benchmarks (small = .01, medium = .06, and large = .14) (Stevens, 1996). Most stat packages should come with a effect size calculator. In SPSS it is as simple as checking a box in the GUI. Like Gregor and Stanley say D2 (also called the Mahalanobis distance) is used for multivartiate situations. An earlier edition of Stevens (1980) comes with a table of power values for 2 to 7 groups means and alpha of .05 and .10. I believe Gregor is right on the use of this statistic in clinical situations, but is psych not moving in that direction, as I know most psych folks (and all grant applications!) ask for those statistics. Warm regards gopa On Tue, Sep 6, 2011 at 1:16 AM, Stanley Klein wrote: > Dear Nina, Gregor is correct. A simple way to think of it is that effect > size (d) is the distance between two means divided by the standard deviation > of the data (like IQ). For determining significance one uses t, which is the > same difference of the means, but now divided by the standard error (the > standard deviation of the means). SD doesn't depend on the number of > trials, but SE does. I often advocate reporting d plus its standard error. > That way one can avoid reporting an embarrassing naked statistic (a number > without its error bar). > Stan > > On Tue, Sep 6, 2011 at 1:21 AM, Gregor Volberg < > Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > >> Dear Nina, >> >> dependend samples t values can easily be transformed into Cohen's d as d = >> t / sqrt(df) [taken from Rosnow & Rosenthal, Effect sizes for Experimenting >> Psychologists, Canadian Journal of Experimental Psychology, 2003, 57:3, >> 221-237; you should find a pdf copy with a search on Google scholar]. For >> example, a t value of 5.15 with 19 degrees of freedom corresponds to a d of >> 5.15/sqrt(19) = 1.18. So just compute depsamplesT and divide the resulting >> vector or matrix by the number of dfs - no further FT functions are needed. >> >> My two cents are that effect sizes are especially useful for integrating >> results across studies where the very same design is applied to different >> samples, e.g., in clinical trials on pharmaceutical products. In EEG/MEG >> studies, even when they are on the same topic, there will be very divergent >> experimenting protocols (timing, task, etc), and also the dependent variable >> will differ from study to study, depending on the chosen time points / >> frequencies / channels of interest. A common effect size metric like Cohen's >> d does not improve the comparibility much in this case. I would therefore >> simply report the t >> >> statistic along with the corresponding df and p, and leave it for the >> interested reader to compute the corresponding d if there should be a need >> for that. >> >> Best regards, >> >> Gregor >> >> >> >> >> -- >> Dr. rer. nat. Gregor Volberg < >> gregor.volberg at psychologie.uni-regensburg.de> ( mailto: >> gregor.volberg at psychologie.uni-regensburg.de ) >> University of Regensburg >> Institute for Experimental Psychology >> 93040 Regensburg, Germany >> Tel: +49 941 943 3862 >> Fax: +49 941 943 3233 >> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >> >> >> >> >>> Nina Kahlbrock 9/5/2011 2:45 PM >> >>> >> >> Dear statistic experts,**** >> >> ** ** >> >> I have a rather general question concerning effect sizes. I understand >> that t-values give me an approximation of the effect size, as they state how >> big the difference between two conditions is by taking into account the >> variance and the number of observations. However, as I recall, effect sizes >> (like Cohen’s d) are computed in order to find out how important the effect >> is, independent of the number of observations. However, if I understand the >> code correctly, dependent samples t-values are computed in a very similar >> way as Cohen’s d (which is “the” value for effect sizes), both including the >> variance and thus the number of observations in their functions.**** >> >> In order to draw conclusions about the importance of the observed effect, >> is it necessary to compute effect sizes like Cohen’s d or is it sufficient >> to compute t-values as effect sizes for M/EEG data? If important to compute >> effect sizes in a way different from t-values, does anyone know of a >> function that computes effect sizes like that in FT?**** >> >> ** ** >> >> Thank you in advance for your answer.**** >> >> ** ** >> >> Best Regards,**** >> >> ** ** >> >> Nina**** >> >> ** ** >> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - - - - - - - - - - - - - - - - - - - -**** >> >> ** ** >> >> Nina Kahlbrock**** >> >> Institute of Clinical Neuroscience and Medical Psychology **** >> >> Heinrich Heine University Duesseldorf**** >> >> Universitaetsstr. 1**** >> >> 40225 Düsseldorf**** >> >> ** ** >> >> Tel.: +49 211 81 18075**** >> >> Fax. .: +49 211 81 19916**** >> >> ** ** >> >> Mail: Nina.Kahlbrock at med.uni-duesseldorf.de**** >> >> http://www.uniklinik-duesseldorf.de/medpsychologie**** >> >> ** ** >> >> _______________________________________________ >> 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 batrod at gmail.com Tue Sep 6 15:28:13 2011 From: batrod at gmail.com (Rodolphe Nenert) Date: Tue, 6 Sep 2011 13:28:13 +0000 (UTC) Subject: [FieldTrip] Invitation to connect on LinkedIn Message-ID: <668305227.10687519.1315315693169.JavaMail.app@ela4-bed81.prod> Email, I'd like to add you to my professional network on LinkedIn. - Rodolphe Rodolphe Nenert Ph.D. at UAB Birmingham, Alabama Area Confirm that you know Rodolphe Nenert: https://www.linkedin.com/e/-deyl8h-gs8x048f-18/isd/4098720488/avYRUa-g/?hs=false&tok=21MBoClA68w4U1 -- You are receiving Invitation to Connect emails. Click to unsubscribe: http://www.linkedin.com/e/-deyl8h-gs8x048f-18/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/goo/fieldtrip%40donders%2Eru%2Enl/20061/I1414007217_1/?hs=false&tok=3uoa9IwGe8w4U1 (c) 2011 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Thu Sep 8 16:39:47 2011 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Thu, 8 Sep 2011 10:39:47 -0400 Subject: [FieldTrip] [ANN] OpenMEEG 2.1 is out Message-ID: Hi, the new release 2.1 of OpenMEEG is finally out. Download page has been updated: https://gforge.inria.fr/frs/?group_id=435 See full changelog below. If you meet any issue, your feed back is very much appreciated. Best regards, Alex for the OpenMEEG team. http://openmeeg.gforge.inria.fr ChangeLog ----------------- Release 2.1: New features: - added the adjoint way for computing a leadfield for either EEG, MEG or MEEG simultaneously. This saves time and memory for big systems (>1000 pts/surfaces). Improvements: - better ordering in computations when inverting the matrix for the memory footprint. - storage now more effective using the matio library even for symmetric matrices. - support for matlab7.3 file format. - reducing memory footprint of DSM, Head2MEG, SurfSource2MEG and DipSource2MEG computations - improved MKL detection - lapack inclusion (experimental) to ease the build on architectures were there is no alternative. Bug corrections: - allowance of spaces in mesh file names with a new .geom format (old format is still accepted). - bug when loading sensor file with no empty line at the end - fix leak in Mesh class Removed features: - TV inverse solver From zizlsperger at gmail.com Thu Sep 8 18:09:57 2011 From: zizlsperger at gmail.com (Leopold Zizlsperger) Date: Thu, 8 Sep 2011 18:09:57 +0200 Subject: [FieldTrip] ft_appenddata Message-ID: Hello thanks in advance for your assistance. I'd like to merge 2 datasets after preprocessing using ft_appendata. Even though it works on first view, "trl" does not add up but keeps the structure of the last dataset (304 in the example): XY_merge=ft_appenddata(cfg, x1, x2); input dataset 1, 29 channels, 301 trials input dataset 2, 29 channels, 304 trials Warning: input data comes from different datafiles > In ft_appenddata at 182 concatenating the trials over all datasets removing sampleinfo field from output output dataset, 29 channels, 605 trials Do I miss the point ? Thanks Best regards Leopold -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 8 21:19:26 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 8 Sep 2011 21:19:26 +0200 Subject: [FieldTrip] ft_appenddata In-Reply-To: References: Message-ID: <7AA3D9A5-8A7A-4D3B-B7D7-759DB34FF7DB@donders.ru.nl> Hi Leo, With 'trl', are you referring to data.cfg.previous. ... .trl? I assume that data.trial (which contains the actual data) has the correct dimensionality of 1x605? In the past, fieldtrip also concatenated the trl-matrices, but we feel that this is not appropriate. The reason for this is, that the first 2 columns of these matrices represent the sample numbers that define the epochs of interest, with respect to the first sample in the recording. If the concatenated data are derived from two different datasets, these numbers become meaningless, because they cannot be interpreted unequivocally anymore. Yet, and I hope that this was motivating your question, the trl-matrix was also used (by some) to store trial-specific information, which of course still is meaningful even if the data comes from different recordings. If this indeed relates to your question, please have a look at: http://fieldtrip.fcdonders.nl/faq/i_used_to_work_with_trl-matrices_that_have_more_than_3_columns._why_is_this_not_supported_anymore If your actual question is of a different nature, could you please explain a bit more what is the problem? Thanks, Jan-Mathijs On Sep 8, 2011, at 6:09 PM, Leopold Zizlsperger wrote: > Hello > thanks in advance for your assistance. > I'd like to merge 2 datasets after preprocessing using ft_appendata. > Even though it works on first view, "trl" does not add up but keeps the structure of the last dataset (304 in the example): > > XY_merge=ft_appenddata(cfg, x1, x2); > input dataset 1, 29 channels, 301 trials > input dataset 2, 29 channels, 304 trials > Warning: input data comes from different datafiles > > In ft_appenddata at 182 > concatenating the trials over all datasets > removing sampleinfo field from output > output dataset, 29 channels, 605 trials > > Do I miss the point ? > > Thanks > Best regards > Leopold > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.muesch at uke.uni-hamburg.de Fri Sep 9 13:00:25 2011 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Fri, 9 Sep 2011 13:00:25 +0200 Subject: [FieldTrip] interaction within-subject indepsamplesT Message-ID: <1238529C-1B93-4BC9-B625-B16991718014@uke.uni-hamburg.de> Hello FieldTrip users, I need your advice on how to correctly test the interaction effects in a 2x2 within-subject design with cluster-based randomization tests. I have two factors A and B with the levels a1/a2 and b1/b2. In addition, the number of trials in A are about twice as much as in B. The procedure would be totally clear in a between-subject design (as in a previous post on the list: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) because I could easily compute the differences of the factor levels A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the differences. However, since I have to run the statistics across trials and not subjects I have independent samples and not dependent samples. If it is possible at all, how can I calculate the differences A_diff and B_diff across trials? Is it a problem that the number of trials are not equal? Any help is appreciated! Best, Kathrin _____________________________________ Kathrin Müsch Dept. of Neurophysiology and Pathophysiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg Germany Phone: +49-40-7410-54680 Fax: +49-40-7410-57752 E-Mail: k.muesch at uke.uni-hamburg.de _____________________________________ -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From m.severens at maartenskliniek.nl Fri Sep 9 21:02:55 2011 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Fri, 9 Sep 2011 21:02:55 +0200 Subject: [FieldTrip] ft_appenddata In-Reply-To: <7AA3D9A5-8A7A-4D3B-B7D7-759DB34FF7DB@donders.ru.nl> References: , <7AA3D9A5-8A7A-4D3B-B7D7-759DB34FF7DB@donders.ru.nl> Message-ID: <70FC3ACFFB46314EBEAF9101EA45F50E06AE0F0BCA@smkexch02.maartenskliniek.nl> Hi Leo, Jan-Mathijs I also have the same problem. When appending data from 2 datasets the trialinfo and sampleinfo only contains info from the first dataset. And I need the information to know which trials belong to each condition. I fixed it for my data by concatenating the trialinfo and sampleinfo field myself. You just need to make sure that the funtions you use afterwards do not depend on the sampleinfo field, because this is not correct any more as Jan-Mathijs explained. I'm not sure if this is the best thing to do, but it works for me! Best, Marianne ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Sent: Thursday, September 08, 2011 9:19 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] ft_appenddata Hi Leo, With 'trl', are you referring to data.cfg.previous. ... .trl? I assume that data.trial (which contains the actual data) has the correct dimensionality of 1x605? In the past, fieldtrip also concatenated the trl-matrices, but we feel that this is not appropriate. The reason for this is, that the first 2 columns of these matrices represent the sample numbers that define the epochs of interest, with respect to the first sample in the recording. If the concatenated data are derived from two different datasets, these numbers become meaningless, because they cannot be interpreted unequivocally anymore. Yet, and I hope that this was motivating your question, the trl-matrix was also used (by some) to store trial-specific information, which of course still is meaningful even if the data comes from different recordings. If this indeed relates to your question, please have a look at: http://fieldtrip.fcdonders.nl/faq/i_used_to_work_with_trl-matrices_that_have_more_than_3_columns._why_is_this_not_supported_anymore If your actual question is of a different nature, could you please explain a bit more what is the problem? Thanks, Jan-Mathijs On Sep 8, 2011, at 6:09 PM, Leopold Zizlsperger wrote: Hello thanks in advance for your assistance. I'd like to merge 2 datasets after preprocessing using ft_appendata. Even though it works on first view, "trl" does not add up but keeps the structure of the last dataset (304 in the example): XY_merge=ft_appenddata(cfg, x1, x2); input dataset 1, 29 channels, 301 trials input dataset 2, 29 channels, 304 trials Warning: input data comes from different datafiles > In ft_appenddata at 182 concatenating the trials over all datasets removing sampleinfo field from output output dataset, 29 channels, 605 trials Do I miss the point ? Thanks Best regards Leopold _______________________________________________ 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 From member at linkedin.com Sun Sep 11 12:10:49 2011 From: member at linkedin.com (Baptiste Gauthier via LinkedIn) Date: Sun, 11 Sep 2011 10:10:49 +0000 (UTC) Subject: [FieldTrip] Join my network on LinkedIn Message-ID: <1086134875.2200977.1315735849733.JavaMail.app@ela4-app0132.prod> LinkedIn ------------ Baptiste Gauthier requested to add you as a connection on LinkedIn: ------------------------------------------ I'd like to add you to my professional network on LinkedIn. Accept invitation from Baptiste Gauthier http://www.linkedin.com/e/-deyl8h-gsfv5j41-5i/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/blk/I1691228710_3/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYPnP0NdPwOcz4Vdz59bSVHgndQkTFMbPcRcPsUd34ScjgLrCBxbOYWrSlI/EML_comm_afe/?hs=false&tok=21QZ12ECDyCQU1 View invitation from Baptiste Gauthier http://www.linkedin.com/e/-deyl8h-gsfv5j41-5i/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/blk/I1691228710_3/3dvc34Te38OcjASckALqnpPbOYWrSlI/svi/?hs=false&tok=1C0mlKX7XyCQU1 -- (c) 2011, LinkedIn Corporation -------------- next part -------------- An HTML attachment was scrubbed... URL: From member at linkedin.com Sun Sep 11 12:18:16 2011 From: member at linkedin.com (Baptiste Gauthier via LinkedIn) Date: Sun, 11 Sep 2011 10:18:16 +0000 (UTC) Subject: [FieldTrip] Join my network on LinkedIn Message-ID: <1509982244.2166452.1315736296272.JavaMail.app@ela4-bed78.prod> LinkedIn ------------ Baptiste Gauthier requested to add you as a connection on LinkedIn: ------------------------------------------ I'd like to add you to my professional network on LinkedIn. Accept invitation from Baptiste Gauthier http://www.linkedin.com/e/-deyl8h-gsfvf3nw-2r/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/blk/I1691235494_3/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYPnPgVd3kPcz4Vdz59bSVHgndQkTFMbPcRcPsUd34ScjgLrCBxbOYWrSlI/EML_comm_afe/?hs=false&tok=3IMll11h_GCQU1 View invitation from Baptiste Gauthier http://www.linkedin.com/e/-deyl8h-gsfvf3nw-2r/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/blk/I1691235494_3/3dvd3AQdjcOcjASckALqnpPbOYWrSlI/svi/?hs=false&tok=3CAp_HJI3GCQU1 -- (c) 2011, LinkedIn Corporation -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Sep 12 08:51:48 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 12 Sep 2011 08:51:48 +0200 Subject: [FieldTrip] Fwd: Filtering References: Message-ID: <927A2866-EB73-4C63-A716-8435E4B562BC@donders.ru.nl> Hi Tadeusz, I forward the reply to your question to this forum, because other people may benefit from the discussion. Also, for future questions, it would be good if you directed any question to this list. Everybody can participate in the discussion, increasing the odds for its resolution. Also, in general, when posting a question it would be good to provide as many details as possible (with respect to matlab version, fieldtrip version etc, but also with for example relevant screen dumps). As to your question, please have a look at the pasted matlab-code and attached figure below. In short, I tried to reproduce your problem, but I fail to do so (because the blue and red lines look different enough). Be sure that you use an up-to-date version of FieldTrip. I remember that there have been some problems with filtering in the past, but these have been resolved quite some time ago (at least > 0.5 year or even longer). Best wishes, Jan-Mathijs >> data = []; >> data.trial{1} = randn(1,10000); >> data.time{1} = (0:9999)/1000; >> data.fsample = 1000; >> data.label = {'1'}; >> cfg = []; >> cfg.bpfilter = 'yes'; >> cfg.bpfreq = [0.01 0.2]; >> cfg.bpfilttype = 'fir'; >> datafilt = ft_preprocessing(cfg, data); Warning: the data does not contain a trial definition > In utilities/private/warning_once at 81 In utilities/private/fixsampleinfo at 51 In ft_datatype_raw at 95 In ft_checkdata at 170 In ft_preprocessing at 284 Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > In utilities/private/warning_once at 81 In utilities/private/fixsampleinfo at 64 In ft_datatype_raw at 95 In ft_checkdata at 170 In ft_preprocessing at 284 preprocessing preprocessing trial 1 from 1 the call to "ft_preprocessing" took 1 seconds and an estimated 8 MB >> figure;plot(data.trial{1});hold on;plot(datafilt.trial{1},'r'); Begin forwarded message: > From: "T.W. Kononowicz" > Date: September 9, 2011 3:01:07 PM GMT+02:00 > To: > Subject: Filtering > > Dear Prof. Schoffelen, > > I am trying to filter continuous data using the following code. However, this procedure doesn't affect the data at all. It looks similarly for low and high pass filtering options. I am really puzzled what could go wrong here. Any suggestions? > > cfg = []; > cfg.dataset = '01_21_mRef.vhdr'; > chans = {'FCz' 'Cz' 'Fz'}; > cfg.channel = chans; > cfg.bpfilter = 'yes'; > cfg.bpfilttype = 'fir'; > cfg.bpfreq = [0.01 0.2]; > data = ft_preprocessing(cfg); > > Thank you in advance, > > Tadeusz Kononowicz > University of Groningen, Experimental Psychology > > Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: untitled.png Type: image/png Size: 6767 bytes Desc: not available URL: From justin.sickkids at hotmail.com Tue Sep 13 00:07:36 2011 From: justin.sickkids at hotmail.com (JustinChen) Date: Mon, 12 Sep 2011 18:07:36 -0400 Subject: [FieldTrip] bufferviewer C++ code Message-ID: Hey, all, Recently I want to try to compile the bufferviewer C++ source code under the directory: fieldtrip/realtime/utilities/viewer/. I tried to use the Microsoft Visual C++ IDE to compile the code but it failed, and now I am using the Eclipse+MinGW under the windows environment to compile it. Does anyone know what environment the C++ codes were compiled and debugged originally? And also I notice the code uses the FLTK API pakage to draw the GUI part, any other API libraries required to compile the code? Anybody who is familiar with the code please reply and I really appreciate your help. Thanks and have a good day! Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Tue Sep 13 09:38:49 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 13 Sep 2011 09:38:49 +0200 Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function or method 'randperm' for input arguments of type 'double'.) Message-ID: Dear fieldtrippers, I wish to calculate the stat difference between stimulus and baseline in a group of subjects. I use ft_freqgrandaverage to average across subjects and then ft_freqstatistics (cluster statistic) to compare the 2 conditions (baseline & stimuli). I get this error: ??? Undefined function or method 'randperm' for input arguments of type 'double'. I tried even with the newest version (20110911) but the problem persists. I am not sure what I have to do. Any advice would be super. The script is below. Thanks a lot, Davide datainpath = '/data/home1/drivolta/Out4VG/DATA/'; dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; % Controls Controls = { 'ASS31_TFR_high.mat'; 'CSA07_TFR_high.mat'; 'BMR08_TFR_high.mat'; 'NPD18_TFR_high.mat'; %'BSA08_TFR_high.mat'; %'ABE08_TFR_high.mat'; %'EES05_TFR_high.mat'; %'GPS10_TFR_high.mat'; %'SDA01_TFR_high.mat'; %'CSA17_TFR_high.mat'; %'KBZ16_TFR_high.mat'; }; %-------------------------------------------------------------------------- NControls = length(Controls); %% CONCATENATE DATA for i = 1:length(Controls) fullname = strcat(datainpath, Controls{i,1}); load(fullname); % Activation time window TFR2 = power_continue_high; %Rename to change (select time window) idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); TFR2.time = power_continue_high.time(idx); Stimuli{i} = TFR2; % Baseline time window TFR3 = power_continue_high; idx = find((TFR3.time >= -1) &(TFR3.time < 0)); TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); TFR3.time = TFR2.time; Baseline{i} = TFR3; clear power_continue_high clear TFR2 clear TFR3 end; save Controls2Statistics Stimuli Baseline; cfg = []; cfg.channel = {'MEG', '-MRO31', '-MRO21'}; cfg.keepindividual = 'yes'; BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure containing grad field cfg = []; cfg.method = 'triangulation'; cfg.neighbourdist = 5; cfg.grad = TFR.grad; cfg.layout = 'CTF275.lay'; neighbour = ft_neighbourselection(cfg, Baseline{1}); cfg = []; cfg.grad = TFR.grad; cfg.channel = {'MEG', '-MRO31', '-MRO21'}; cfg.neighbourdist = 4; cfg.minnbchan = 1; cfg.clusteralpha = 0.05; % control admission to a cluster cfg.alpha = 0.05; % control the false alarm rate of the permutation test cfg.latency = [0.5 1.5]; % time interval over which the experimental conditions are compared (in sec) cfg.frequency = [50 70]; cfg.avgovertime = 'no'; cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.clusterstatistics = 'maxsum'; cfg.statistic = 'actvsblT'; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.approach = 'montecarlo'; cfg.dimord = 'chan_freq_time'; cfg.dim = 'chan_freq_time'; cfg.neighbours = neighbour; cfg.tail = 0; cfg.clustertail = 0; nSubjects = 2*length(Controls); a = [1:nSubjects]; b = ones(1,length(Controls)); c = 2*(ones(1,length(Controls))); cfg.design = [a; b c]; cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % row of the design matrix that contains the independent variable stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Tue Sep 13 11:00:13 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Tue, 13 Sep 2011 11:00:13 +0200 Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function or method 'randperm' for input arguments of type 'double'.) In-Reply-To: References: Message-ID: <4E6F1B9D.3050003@donders.ru.nl> Hi Davide, It sounds like you are missing the Statistics Toolbo x for matlab. I remember some internal discussions in the team about writing an internal version of randperm.m with similar functions, but we haven't done so far if I recall correctly. Installing the toolbox, or checking whether you have it on your path should solve your problem. Hope it helps, Roemer On 13-09-11 9:38, Davide Rivolta wrote: > Dear fieldtrippers, > I wish to calculate the stat difference between stimulus and baseline > in a group of subjects. I use ft_freqgrandaverage to average across > subjects and then ft_freqstatistics (cluster statistic) to compare the > 2 conditions (baseline & stimuli). > I get this error: ??? Undefined function or method 'randperm' for > input arguments of type 'double'. > I tried even with the newest version (20110911) but the problem > persists. I am not sure what I have to do. > Any advice would be super. The script is below. > Thanks a lot, > Davide > datainpath = '/data/home1/drivolta/Out4VG/DATA/'; > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; > > % Controls > Controls = { > 'ASS31_TFR_high.mat'; > 'CSA07_TFR_high.mat'; > 'BMR08_TFR_high.mat'; > 'NPD18_TFR_high.mat'; > %'BSA08_TFR_high.mat'; > %'ABE08_TFR_high.mat'; > %'EES05_TFR_high.mat'; > %'GPS10_TFR_high.mat'; > %'SDA01_TFR_high.mat'; > %'CSA17_TFR_high.mat'; > %'KBZ16_TFR_high.mat'; > > }; > %-------------------------------------------------------------------------- > NControls = length(Controls); > %% CONCATENATE DATA > for i = 1:length(Controls) > fullname = strcat(datainpath, Controls{i,1}); > load(fullname); > > % Activation time window > TFR2 = power_continue_high; %Rename to change (select time window) > idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); > TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); > TFR2.time = power_continue_high.time(idx); > Stimuli{i} = TFR2; > > % Baseline time window > TFR3 = power_continue_high; > idx = find((TFR3.time >= -1) &(TFR3.time < 0)); > TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); > TFR3.time = TFR2.time; > Baseline{i} = TFR3; > > clear power_continue_high > clear TFR2 > clear TFR3 > end; > save Controls2Statistics Stimuli Baseline; > > cfg = []; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.keepindividual = 'yes'; > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure > containing grad field > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbourdist = 5; > cfg.grad = TFR.grad; > cfg.layout = 'CTF275.lay'; > neighbour = ft_neighbourselection(cfg, Baseline{1}); > cfg = []; > cfg.grad = TFR.grad; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.neighbourdist = 4; > cfg.minnbchan = 1; > cfg.clusteralpha = 0.05; % control admission to a cluster > cfg.alpha = 0.05; % control the false alarm rate of the > permutation test > cfg.latency = [0.5 1.5]; % time interval over which the > experimental conditions are compared (in sec) > cfg.frequency = [50 70]; > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.clusterstatistics = 'maxsum'; > cfg.statistic = 'actvsblT'; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.approach = 'montecarlo'; > cfg.dimord = 'chan_freq_time'; > cfg.dim = 'chan_freq_time'; > cfg.neighbours = neighbour; > cfg.tail = 0; > cfg.clustertail = 0; > nSubjects = 2*length(Controls); > a = [1:nSubjects]; > b = ones(1,length(Controls)); > c = 2*(ones(1,length(Controls))); > cfg.design = [a; b c]; > cfg.uvar = 1; % "subject" is unit of observation > cfg.ivar = 2; % row of the design matrix that contains the independent > variable > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); > > > _______________________________________________ > 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 anna.lambrechts at gmail.com Tue Sep 13 11:11:49 2011 From: anna.lambrechts at gmail.com (Anna Lambrechts) Date: Tue, 13 Sep 2011 11:11:49 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 10, Issue 15 In-Reply-To: References: Message-ID: Dear David, I have had the same problem after end of August fieldtrip update. I had the right toolbox, but matlab couldn't find the path to it. I just added the exact path for randperm in setpath, which solved the problem. Best, Anna. 2011/9/13 > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. bufferviewer C++ code (JustinChen) > 2. ft_freqstatistics issue (??? Undefined function or method > 'randperm' for input arguments of type 'double'.) (Davide Rivolta) > 3. Re: ft_freqstatistics issue (??? Undefined function or method > 'randperm' for input arguments of type 'double'.) > (Roemer van der Meij) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 12 Sep 2011 18:07:36 -0400 > From: JustinChen > To: > Subject: [FieldTrip] bufferviewer C++ code > Message-ID: > Content-Type: text/plain; charset="gb2312" > > > > > > Hey, all, Recently I want to try to compile the bufferviewer C++ source > code under the directory: fieldtrip/realtime/utilities/viewer/. I tried to > use the Microsoft Visual C++ IDE to compile the code but it failed, and now > I am using the Eclipse+MinGW under the windows environment to compile it. > Does anyone know what environment the C++ codes were compiled and debugged > originally? And also I notice the code uses the FLTK API pakage to draw the > GUI part, any other API libraries required to compile the code? Anybody who > is familiar with the code please reply and I really appreciate your help. > Thanks and have a good day! Justin > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110912/040d9dcc/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Tue, 13 Sep 2011 09:38:49 +0200 > From: Davide Rivolta > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function > or method 'randperm' for input arguments of type 'double'.) > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear fieldtrippers, > > I wish to calculate the stat difference between stimulus and baseline in a > group of subjects. I use ft_freqgrandaverage to average across subjects and > then ft_freqstatistics (cluster statistic) to compare the 2 conditions > (baseline & stimuli). > > I get this error: ??? Undefined function or method 'randperm' for input > arguments of type 'double'. > > I tried even with the newest version (20110911) but the problem persists. I > am not sure what I have to do. > > Any advice would be super. The script is below. > > Thanks a lot, > > Davide > > > > datainpath = '/data/home1/drivolta/Out4VG/DATA/'; > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; > > % Controls > Controls = { > 'ASS31_TFR_high.mat'; > 'CSA07_TFR_high.mat'; > 'BMR08_TFR_high.mat'; > 'NPD18_TFR_high.mat'; > %'BSA08_TFR_high.mat'; > %'ABE08_TFR_high.mat'; > %'EES05_TFR_high.mat'; > %'GPS10_TFR_high.mat'; > %'SDA01_TFR_high.mat'; > %'CSA17_TFR_high.mat'; > %'KBZ16_TFR_high.mat'; > > }; > > %-------------------------------------------------------------------------- > NControls = length(Controls); > > %% CONCATENATE DATA > for i = 1:length(Controls) > fullname = strcat(datainpath, Controls{i,1}); > load(fullname); > > % Activation time window > TFR2 = power_continue_high; %Rename to change (select time window) > idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); > TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); > TFR2.time = power_continue_high.time(idx); > Stimuli{i} = TFR2; > > % Baseline time window > TFR3 = power_continue_high; > idx = find((TFR3.time >= -1) &(TFR3.time < 0)); > TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); > TFR3.time = TFR2.time; > Baseline{i} = TFR3; > > clear power_continue_high > clear TFR2 > clear TFR3 > end; > save Controls2Statistics Stimuli Baseline; > > > > cfg = []; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.keepindividual = 'yes'; > > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); > > > > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure > containing grad field > > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbourdist = 5; > cfg.grad = TFR.grad; > cfg.layout = 'CTF275.lay'; > neighbour = ft_neighbourselection(cfg, Baseline{1}); > cfg = []; > cfg.grad = TFR.grad; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.neighbourdist = 4; > cfg.minnbchan = 1; > cfg.clusteralpha = 0.05; % control admission to a cluster > cfg.alpha = 0.05; % control the false alarm rate of the > permutation test > cfg.latency = [0.5 1.5]; % time interval over which the > experimental conditions are compared (in sec) > cfg.frequency = [50 70]; > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.clusterstatistics = 'maxsum'; > cfg.statistic = 'actvsblT'; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.approach = 'montecarlo'; > cfg.dimord = 'chan_freq_time'; > cfg.dim = 'chan_freq_time'; > cfg.neighbours = neighbour; > cfg.tail = 0; > cfg.clustertail = 0; > > nSubjects = 2*length(Controls); > > a = [1:nSubjects]; > b = ones(1,length(Controls)); > c = 2*(ones(1,length(Controls))); > > cfg.design = [a; b c]; > cfg.uvar = 1; % "subject" is unit of observation > cfg.ivar = 2; % row of the design matrix that contains the independent > variable > > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110913/2e2f657f/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Tue, 13 Sep 2011 11:00:13 +0200 > From: Roemer van der Meij > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] ft_freqstatistics issue (??? Undefined > function or method 'randperm' for input arguments of type 'double'.) > Message-ID: <4E6F1B9D.3050003 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hi Davide, > > It sounds like you are missing the Statistics Toolbo > x for matlab. I > remember some internal discussions in the team about writing an internal > version of randperm.m with similar functions, but we haven't done so far > if I recall correctly. Installing the toolbox, or checking whether you > have it on your path should solve your problem. > > Hope it helps, > Roemer > > > > On 13-09-11 9:38, Davide Rivolta wrote: > > Dear fieldtrippers, > > I wish to calculate the stat difference between stimulus and baseline > > in a group of subjects. I use ft_freqgrandaverage to average across > > subjects and then ft_freqstatistics (cluster statistic) to compare the > > 2 conditions (baseline & stimuli). > > I get this error: ??? Undefined function or method 'randperm' for > > input arguments of type 'double'. > > I tried even with the newest version (20110911) but the problem > > persists. I am not sure what I have to do. > > Any advice would be super. The script is below. > > Thanks a lot, > > Davide > > datainpath = '/data/home1/drivolta/Out4VG/DATA/'; > > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; > > > > % Controls > > Controls = { > > 'ASS31_TFR_high.mat'; > > 'CSA07_TFR_high.mat'; > > 'BMR08_TFR_high.mat'; > > 'NPD18_TFR_high.mat'; > > %'BSA08_TFR_high.mat'; > > %'ABE08_TFR_high.mat'; > > %'EES05_TFR_high.mat'; > > %'GPS10_TFR_high.mat'; > > %'SDA01_TFR_high.mat'; > > %'CSA17_TFR_high.mat'; > > %'KBZ16_TFR_high.mat'; > > > > }; > > > %-------------------------------------------------------------------------- > > NControls = length(Controls); > > %% CONCATENATE DATA > > for i = 1:length(Controls) > > fullname = strcat(datainpath, Controls{i,1}); > > load(fullname); > > > > % Activation time window > > TFR2 = power_continue_high; %Rename to change (select time window) > > idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); > > TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); > > TFR2.time = power_continue_high.time(idx); > > Stimuli{i} = TFR2; > > > > % Baseline time window > > TFR3 = power_continue_high; > > idx = find((TFR3.time >= -1) &(TFR3.time < 0)); > > TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); > > TFR3.time = TFR2.time; > > Baseline{i} = TFR3; > > > > clear power_continue_high > > clear TFR2 > > clear TFR3 > > end; > > save Controls2Statistics Stimuli Baseline; > > > > cfg = []; > > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > > cfg.keepindividual = 'yes'; > > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); > > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); > > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure > > containing grad field > > cfg = []; > > cfg.method = 'triangulation'; > > cfg.neighbourdist = 5; > > cfg.grad = TFR.grad; > > cfg.layout = 'CTF275.lay'; > > neighbour = ft_neighbourselection(cfg, Baseline{1}); > > cfg = []; > > cfg.grad = TFR.grad; > > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > > cfg.neighbourdist = 4; > > cfg.minnbchan = 1; > > cfg.clusteralpha = 0.05; % control admission to a cluster > > cfg.alpha = 0.05; % control the false alarm rate of the > > permutation test > > cfg.latency = [0.5 1.5]; % time interval over which the > > experimental conditions are compared (in sec) > > cfg.frequency = [50 70]; > > cfg.avgovertime = 'no'; > > cfg.avgoverfreq = 'no'; > > cfg.avgoverchan = 'no'; > > cfg.clusterstatistics = 'maxsum'; > > cfg.statistic = 'actvsblT'; > > cfg.numrandomization = 1000; > > cfg.correctm = 'cluster'; > > cfg.method = 'montecarlo'; > > cfg.approach = 'montecarlo'; > > cfg.dimord = 'chan_freq_time'; > > cfg.dim = 'chan_freq_time'; > > cfg.neighbours = neighbour; > > cfg.tail = 0; > > cfg.clustertail = 0; > > nSubjects = 2*length(Controls); > > a = [1:nSubjects]; > > b = ones(1,length(Controls)); > > c = 2*(ones(1,length(Controls))); > > cfg.design = [a; b c]; > > cfg.uvar = 1; % "subject" is unit of observation > > cfg.ivar = 2; % row of the design matrix that contains the independent > > variable > > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); > > > > > > _______________________________________________ > > 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: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110913/b90d5fc8/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 15 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Tue Sep 13 15:31:31 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 13 Sep 2011 15:31:31 +0200 Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function or method 'randperm' for input arguments of type 'double'.) In-Reply-To: <4E6F1B9D.3050003@donders.ru.nl> References: <4E6F1B9D.3050003@donders.ru.nl> Message-ID: Dear Roemer and Anna, Thank you for your help. After setting the path the error disappears. However I know have an error saying that is "could not determine the parametric critical value for clustering". However, in the configuration, I put all the values that are in the tutorial. May it be a problem with my design? Thanks a lot, Davide On Tue, Sep 13, 2011 at 11:00 AM, Roemer van der Meij < r.vandermeij at donders.ru.nl> wrote: > Hi Davide, > > It sounds like you are missing the Statistics Toolbox > for matlab. I remember some internal discussions in the team about writing > an internal version of randperm.m with similar functions, but we haven't > done so far if I recall correctly. Installing the toolbox, or checking > whether you have it on your path should solve your problem. > > Hope it helps, > Roemer > > > > > On 13-09-11 9:38, Davide Rivolta wrote: > > Dear fieldtrippers, > > I wish to calculate the stat difference between stimulus and baseline in a > group of subjects. I use ft_freqgrandaverage to average across subjects and > then ft_freqstatistics (cluster statistic) to compare the 2 conditions > (baseline & stimuli). > > I get this error: ??? Undefined function or method 'randperm' for input > arguments of type 'double'. > > I tried even with the newest version (20110911) but the problem persists. I > am not sure what I have to do. > > Any advice would be super. The script is below. > > Thanks a lot, > > Davide > > > > datainpath = '/data/home1/drivolta/Out4VG/DATA/'; > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; > > % Controls > Controls = { > 'ASS31_TFR_high.mat'; > 'CSA07_TFR_high.mat'; > 'BMR08_TFR_high.mat'; > 'NPD18_TFR_high.mat'; > %'BSA08_TFR_high.mat'; > %'ABE08_TFR_high.mat'; > %'EES05_TFR_high.mat'; > %'GPS10_TFR_high.mat'; > %'SDA01_TFR_high.mat'; > %'CSA17_TFR_high.mat'; > %'KBZ16_TFR_high.mat'; > > }; > > %-------------------------------------------------------------------------- > NControls = length(Controls); > > %% CONCATENATE DATA > for i = 1:length(Controls) > fullname = strcat(datainpath, Controls{i,1}); > load(fullname); > > % Activation time window > TFR2 = power_continue_high; %Rename to change (select time window) > idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); > TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); > TFR2.time = power_continue_high.time(idx); > Stimuli{i} = TFR2; > > % Baseline time window > TFR3 = power_continue_high; > idx = find((TFR3.time >= -1) &(TFR3.time < 0)); > TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); > TFR3.time = TFR2.time; > Baseline{i} = TFR3; > > clear power_continue_high > clear TFR2 > clear TFR3 > end; > save Controls2Statistics Stimuli Baseline; > > > > cfg = []; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.keepindividual = 'yes'; > > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); > > > > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure > containing grad field > > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbourdist = 5; > cfg.grad = TFR.grad; > cfg.layout = 'CTF275.lay'; > neighbour = ft_neighbourselection(cfg, Baseline{1}); > cfg = []; > cfg.grad = TFR.grad; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.neighbourdist = 4; > cfg.minnbchan = 1; > cfg.clusteralpha = 0.05; % control admission to a cluster > cfg.alpha = 0.05; % control the false alarm rate of the > permutation test > cfg.latency = [0.5 1.5]; % time interval over which the > experimental conditions are compared (in sec) > cfg.frequency = [50 70]; > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.clusterstatistics = 'maxsum'; > cfg.statistic = 'actvsblT'; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.approach = 'montecarlo'; > cfg.dimord = 'chan_freq_time'; > cfg.dim = 'chan_freq_time'; > cfg.neighbours = neighbour; > cfg.tail = 0; > cfg.clustertail = 0; > > nSubjects = 2*length(Controls); > > a = [1:nSubjects]; > b = ones(1,length(Controls)); > c = 2*(ones(1,length(Controls))); > > cfg.design = [a; b c]; > cfg.uvar = 1; % "subject" is unit of observation > cfg.ivar = 2; % row of the design matrix that contains the independent > variable > > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); > > > > > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://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 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekanal at cmu.edu Tue Sep 13 22:04:38 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 13 Sep 2011 16:04:38 -0400 Subject: [FieldTrip] bug with localizing Message-ID: <0DA79623-DA99-45A0-8A32-E259771108A1@cmu.edu> Hello folks - I'm trying to localize some activity I recorded, and I'm having a problem with the scripts. Following the instructions in the beamformer tutorial [1], I have the following code, which results in the following error: ~~~~~~~~~~~ ... mri = ft_read_mri('MR.1.3.12.2.1107.5.2.32.35216.20110517110054966038966'); % segment the brain cfg = []; cfg.write = 'no'; cfg.coordsys = 'DICOM'; segmentedmri = ft_volumesegment(cfg, mri); % prepare head model vol = ft_prepare_singleshell([],segmentedmri); ??? Reference to non-existent field 'seg'. Error in ==> prepare_mesh_segmentation at 63 [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); Error in ==> dots_sourceLocalization at 41 vol = ft_prepare_singleshell([],segmentedmri); ~~~~~~~~~~~ It looks like the source of this error is in a recently commented-out line (line 25) in the prepare_mesh_segmentation.m file (build 4120, off the svn): ~~~~~~~~~~~ ... cfg = ft_checkconfig(cfg, 'forbidden', 'numcompartments'); % if ~isfield(mri, 'tissue') && any(ismember(fieldnames(mri), {'gray' 'brain' 'scalp'})), cfg.tissue = 1; end if ~isfield(cfg, 'threshold'), cfg.threshold = 0; end ... ~~~~~~~~~~~ The comment for that commit is "bugfix". Any ideas how to work around this problem? Thanks - Elli Kanal -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 [1] http://fieldtrip.fcdonders.nl/tutorial/beamformer#the_forward_model_and_lead_field_matrix From johanna.zumer at donders.ru.nl Wed Sep 14 08:50:49 2011 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 14 Sep 2011 08:50:49 +0200 Subject: [FieldTrip] bug with localizing In-Reply-To: <0DA79623-DA99-45A0-8A32-E259771108A1@cmu.edu> References: <0DA79623-DA99-45A0-8A32-E259771108A1@cmu.edu> Message-ID: Hi Elli and FT users, Apologies for this bug, I introduced it last week in attempting to fix something else (allowing 3 shells to work). I have already fixed this yesterday (reintroducing this line 25 with some extra 'if' clauses which hopefully will work for everyone), so it should already be on the SVN server as of this morning. Thank you for reporting it! Johanna On 13 September 2011 22:04, Kanal Eliezer wrote: > Hello folks - > > I'm trying to localize some activity I recorded, and I'm having a problem > with the scripts. Following the instructions in the beamformer tutorial [1], > I have the following code, which results in the following error: > > ~~~~~~~~~~~ > ... > mri = ft_read_mri('MR.1.3.12.2.1107.5.2.32.35216.20110517110054966038966'); > > % segment the brain > cfg = []; > cfg.write = 'no'; > cfg.coordsys = 'DICOM'; > segmentedmri = ft_volumesegment(cfg, mri); > > % prepare head model > vol = ft_prepare_singleshell([],segmentedmri); > > > ??? Reference to non-existent field 'seg'. > > Error in ==> prepare_mesh_segmentation at 63 > [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), > 1:size(mri.seg,3)); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > Error in ==> dots_sourceLocalization at 41 > vol = ft_prepare_singleshell([],segmentedmri); > ~~~~~~~~~~~ > > It looks like the source of this error is in a recently commented-out line > (line 25) in the prepare_mesh_segmentation.m file (build 4120, off the svn): > > ~~~~~~~~~~~ > ... > cfg = ft_checkconfig(cfg, 'forbidden', 'numcompartments'); > % if ~isfield(mri, 'tissue') && any(ismember(fieldnames(mri), {'gray' > 'brain' 'scalp'})), cfg.tissue = 1; end > if ~isfield(cfg, 'threshold'), cfg.threshold = 0; end > ... > ~~~~~~~~~~~ > > The comment for that commit is "bugfix". Any ideas how to work around this > problem? Thanks - > > Elli Kanal > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > > [1] > http://fieldtrip.fcdonders.nl/tutorial/beamformer#the_forward_model_and_lead_field_matrix > _______________________________________________ > 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 jm.horschig at donders.ru.nl Wed Sep 14 15:41:45 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 14 Sep 2011 15:41:45 +0200 Subject: [FieldTrip] Critical bug in ft_channelrepair fixed Message-ID: <4E70AF19.2040003@donders.ru.nl> Hey everyone, we found a critical bug in ft_channelrepair, which we fixed now. The bug caused wrong channels to be chosen for interpolation in some situations, meaning that the timecourse your repaired channel did not make sense. Please be aware of this, check your reconstructed channels and re-run your channel reconstruction if you are in doubt with the newest FieldTrip version! For more information, check Google code: http://code.google.com/p/fieldtrip/source/detail?r=4158 and Bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=941 Best regards, Jörn -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 c.micheli at fcdonders.ru.nl Wed Sep 14 17:56:38 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Wed, 14 Sep 2011 17:56:38 +0200 (CEST) Subject: [FieldTrip] Fwd: AW: Forward solution using concentric spheres and BEM models In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE2F@XMAIL1.medads.uk-erlangen.de> Message-ID: <1624476173.1270054.1316015798685.JavaMail.root@draco.zimbra.ru.nl> Hi Margit and Juan Pablo see my answers below. ----- "Margit Schönherr" schreef: > Van: "Margit Schönherr" > Aan: "c micheli" > Verzonden: Woensdag 7 september 2011 09:33:53 > Onderwerp: AW: [FieldTrip] Forward solution using concentric spheres and BEM models > > Hello Cristiano, > > thank you for your email. I have tried the code, but I have 2 problems > with it. > 1) When I do it exactly as suggested in the email, I get the following > error when using ft_prepare_mesh: > > bnd = ft_prepare_mesh(cfg, mri_segment); > ??? Error using ==> ft_prepare_mesh at 159 > unsupported cfg.method and/or input > > I think, this is simply a problem concerning the naming of the > variables. The segmented mri is called 'seg', the labels are assigned > to 'mri_segment'. I think, this is the wrong input for > ft_prepare_mesh, because 'mri_segment' does not contain any mri > information. Putting the labels into a new field 'seg.seg' and calling > bnd = ft_prepare_mesh(cfg, seg) solves this. > I could replicate the error and this is due to the fact that ft_prepare_mesh accepts inputs of FieldTrip type 'volume'. See ft_datatype_volume. The function crashed because I simply used an old version of the test file where I inputted the volume matrix only, whereas three fields are required (dim, transform and anatomy), that's why the input should look like this: mri2 = []; mri2.anatomy = mri_segment; mri2.dim = mri.dim; mri2.transform = mri.transform; I patched the correct code at the end of the mail. > 2) However, there is still only one surface triangulated. So as I > wrote in my last email, I still believe that line 25 in > prepare_mesh_segmentation needs to be commented. What do you mean? I agree. This function needs a general review altogether and at the moment I committed your correction. In the future I'll restructure the whole function taking care of the more recent guidelines. Thanks for your suggestion. Try this: % download from the FieldTrip ftp site % (ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip) % load the MRI mri = ft_read_mri('Subject01.mri'); % segment it cfg = []; cfg.output = {'scalp', 'skull', 'brain'}; seg = ft_volumesegment(cfg, mri); % volumetric preprocessing % Note: the three compartments have to be 'filled' otherwise the triangulation won't work correctly. The output of ft_volumesegment will change soon, making it compatible with ft_prepare_mesh. As of today we need the following: mri_segment{1} = seg.scalp; mri_segment{2} = imfill(seg.skull,'holes'); % you need the image processing toolbox here! mri_segment{3} = seg.brain; % triangulation (from volumes to surfaces) % Note: now the volumes are inputted one at a time mri2 = mri; cfg=[]; cfg.sourceunits = 'mm'; cfg.mrinuits = 'mm'; cfg.tissue = 1; cfg.numvertices = 1000; for i=1:3 mri2.seg = mri_segment{i}; mesh{i} = ft_prepare_mesh(cfg,mri2); end % visualization of the triangulated surfaces figure,ft_plot_mesh(mesh{1},'edgecolor','none','facecolor','w','facealpha',0.5) ft_plot_mesh(mesh{2},'edgecolor','none','facecolor','g','facealpha',0.7) ft_plot_mesh(mesh{3},'edgecolor','none','facecolor','r','facealpha',1) > Thank you. Be my guest. Cheers, Cristiano > > Best regards, > Margit > > > *********************************** > Margit Schönherr > Universitätsklinikum Erlangen > Neurologische Klinik > Epilepsiezentrum (Biomagnetismus) > Schwabachanlage 6 > 91054 Erlangen > Telefon: ++49 9131 / 85 36921 > Email: margit.schoenherr at uk-erlangen.de > *********************************** > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > im Auftrag von Micheli, C. [c.micheli at fcdonders.ru.nl] > Gesendet: Montag, 5. September 2011 12:59 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] Forward solution using concentric spheres > and BEM models > > Dear Juan Pablo and Margit > > The function 'ft_prepare_mesh' takes care of triangulating every > compartment via the cfg.tissue option. This option contains the > integers which describe a type of tissue, given that the user > beforehand defined all voxels of the segmented MRI compartment as > having that particular value. > As an example, download the sample MRI in FieldTrip ftp location: > > ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip > Create a folder and unzip these files. > > % read in the mri > mri = ft_read_mri('Subject01.mri'); > > % segment it > cfg = []; > cfg.output = {'scalp', 'skull', 'brain'}; > seg = ft_volumesegment(cfg, mri); > > % assign a label > scalp = (seg.scalp) & ~(seg.skull | seg.brain); > skull = 2*(seg.skull); > brain = 3*(seg.brain); > mri_segment = scalp + skull + brain; > > % build the meshes > cfg = []; > cfg.method = 'segmentation'; > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > cfg.numvertices = [2000 1000 800]; > cfg.sourceunits = 'mm'; > cfg.mriunits = 'mm'; > bnd = ft_prepare_mesh(cfg, mri_segment); > > If any of the tissues has a different value from cfg.tissues this > won't be triangulated. To check for this use ft_sourceplot in the > interactive mode. By clicking around you can see the tissue's value in > the command window: > > % view the labelled segmentations > mri2 = mri; > mri2.seg = mri_segment; > cfg=[]; > cfg.interactive = 'yes'; > cfg.funparameter = 'seg'; > ft_sourceplot(cfg,mri2); > > About the concentric spheres: > both ways to derive a concentric spheres model are correct. In one > case you directly build the vol structure and you assume you know the > radiuses of your spheres. In the other case you allow the > ft_prepare_concentricspheres function to build the spheres starting > from realistic geometrical boundaries. > The second approach is my favorite because the ft_prepare function > contains a function that fits a sphere to each boundary and I don't > have to do it myself. > The first approach (directly force the radiuses in your vol structure) > is preferable if you derive the information from other software (e.g. > CTF's MRIView) or if you fit the sphere yourself. > > @Pablo > If the sphere is fitted inside the brain it is correct. You do not > want the sphere to include other tissues, because your assumption for > the construction of the forward model is that the tissue inside the > sphere is homogeneous. > For a more realistic model (encompassing the whole brain volume) I > would rather use a BEM model. > > I hope this helps, > Cristiano From paolo.belardinelli at med.uni-tuebingen.de Wed Sep 14 18:18:36 2011 From: paolo.belardinelli at med.uni-tuebingen.de (Paolo Belardinelli) Date: Wed, 14 Sep 2011 18:18:36 +0200 Subject: [FieldTrip] cortical time-course reconstruction Message-ID: <4E70D3DC.4060403@med.uni-tuebingen.de> Hi Robert. We have some nice coherence maps with peaks in M1 for a finger tapping task. We were wondering how to properly reconstruct the power time-course in the M1 area in order to use it as a further reference signal. -Is the code necessary for the approach described in (Schoffelen et al., NeuroImage 2008) already implemented in ft (we observed in the code that it is possible in ft_sourceanalysis.m to give a location for a reference dipole but we found no documentation)? -Is the only reliable solution for reconstructing a time-course to project the activity in the dominant direction? We have the eigenvalues of the first dipole which are normally 3 to 6 times larger than the ones of the second. We are not sure this is enough to neglect the second component. - One last technical question: in the mailing list it is said that the orientation of the dipole is saved in source.avg.ori but it doesn't seem like that to us. Maybe we are doing something wrong. Best regards and thank you for your work, Paolo and Erick From e.maris at donders.ru.nl Thu Sep 15 10:10:36 2011 From: e.maris at donders.ru.nl (Eric Maris) Date: Thu, 15 Sep 2011 10:10:36 +0200 Subject: [FieldTrip] interaction within-subject indepsamplesT In-Reply-To: <1238529C-1B93-4BC9-B625-B16991718014@uke.uni-hamburg.de> References: <1238529C-1B93-4BC9-B625-B16991718014@uke.uni-hamburg.de> Message-ID: <008d01cc737e$f6192ba0$e24b82e0$@maris@donders.ru.nl> Dear Kathrin, > I need your advice on how to correctly test the interaction effects in a 2x2 > within-subject design with cluster-based randomization tests. I have two > factors A and B with the levels a1/a2 and b1/b2. In addition, the number of > trials in A are about twice as much as in B. > > The procedure would be totally clear in a between-subject design (as in a > previous post on the list: > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) This post is about a WITHIN-subjects design. > because I could easily compute the differences of the factor levels > A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the > differences. However, since I have to run the statistics across trials and not > subjects I have independent samples and not dependent samples. So, you have a between-trials design. If it is > possible at all, how can I calculate the differences A_diff and B_diff across > trials? Is it a problem that the number of trials are not equal? This is not possible. Permutation tests cannot be used for testing interactions in a multi-factorial between-subjects/trials design. Michael Wibral has a post in which he refers to a nice statistics paper on the issue. A proxy that is possible (but not statistically sound) is to perform two statistical tests of the first factor, once at the first level of second factor and once at the second level. Best, Eric Maris > > Any help is appreciated! > > Best, > Kathrin > > _____________________________________ > Kathrin Müsch > > Dept. of Neurophysiology and Pathophysiology > University Medical Center Hamburg-Eppendorf > Martinistr. 52 > 20246 Hamburg > Germany > Phone: +49-40-7410-54680 > Fax: +49-40-7410-57752 > E-Mail: k.muesch at uke.uni-hamburg.de > _____________________________________ > > > -- > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > Rechts; Gerichtsstand: Hamburg > > Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. Alexander > Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From johan.bergmann at yahoo.com Thu Sep 15 14:14:25 2011 From: johan.bergmann at yahoo.com (Johan Bergmann) Date: Thu, 15 Sep 2011 05:14:25 -0700 (PDT) Subject: [FieldTrip] I AM FREE NOW! Message-ID: <1316088865.66924.androidMobile@web45505.mail.sp1.yahoo.com>

ive always been pressured to be the best I learned to expect the unexpected this caught my eye a few weeks ago.
http://chojnacka-paulina.yoyo.pl/MarkCarter10.html now I dont feel something missing anymore I wouldnt waste your time

-------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Thu Sep 15 16:07:39 2011 From: fredericroux at hotmail.de (Frederic Roux) Date: Thu, 15 Sep 2011 16:07:39 +0200 Subject: [FieldTrip] channel_repair bug In-Reply-To: References: Message-ID: Hi Jorn, I was wondering if the bug you reported concerning the channel_repair function also applied to older versions of fieldtrip and in which cases this bug appears. This would be important for me to know as I have been using the function in the past and would like to know if it affects my results or not. Best, Frederic -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 > From: fieldtrip-request at donders.ru.nl > Subject: fieldtrip Digest, Vol 10, Issue 18 > To: fieldtrip at donders.ru.nl > Date: Thu, 15 Sep 2011 12:00:17 +0200 > > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Critical bug in ft_channelrepair fixed (J?rn M. Horschig) > 2. Fwd: AW: Forward solution using concentric spheres and BEM > models (Micheli, C.) > 3. cortical time-course reconstruction (Paolo Belardinelli) > 4. Re: interaction within-subject indepsamplesT (Eric Maris) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 14 Sep 2011 15:41:45 +0200 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: [FieldTrip] Critical bug in ft_channelrepair fixed > Message-ID: <4E70AF19.2040003 at donders.ru.nl> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hey everyone, > > we found a critical bug in ft_channelrepair, which we fixed now. The bug > caused wrong channels to be chosen for interpolation in some situations, > meaning that the timecourse your repaired channel did not make sense. > Please be aware of this, check your reconstructed channels and re-run > your channel reconstruction if you are in doubt with the newest > FieldTrip version! > > For more information, check Google code: > http://code.google.com/p/fieldtrip/source/detail?r=4158 > and Bugzilla: > http://bugzilla.fcdonders.nl/show_bug.cgi?id=941 > > Best regards, > J?rn > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > 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 > > > > ------------------------------ > > Message: 2 > Date: Wed, 14 Sep 2011 17:56:38 +0200 (CEST) > From: "Micheli, C." > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Fwd: AW: Forward solution using concentric > spheres and BEM models > Message-ID: > <1624476173.1270054.1316015798685.JavaMail.root at draco.zimbra.ru.nl> > Content-Type: text/plain; charset=utf-8 > > Hi Margit and Juan Pablo > see my answers below. > > ----- "Margit Sch?nherr" schreef: > > > Van: "Margit Sch?nherr" > > Aan: "c micheli" > > Verzonden: Woensdag 7 september 2011 09:33:53 > > Onderwerp: AW: [FieldTrip] Forward solution using concentric spheres and BEM models > > > > Hello Cristiano, > > > > thank you for your email. I have tried the code, but I have 2 problems > > with it. > > 1) When I do it exactly as suggested in the email, I get the following > > error when using ft_prepare_mesh: > > > > bnd = ft_prepare_mesh(cfg, mri_segment); > > ??? Error using ==> ft_prepare_mesh at 159 > > unsupported cfg.method and/or input > > > > I think, this is simply a problem concerning the naming of the > > variables. The segmented mri is called 'seg', the labels are assigned > > to 'mri_segment'. I think, this is the wrong input for > > ft_prepare_mesh, because 'mri_segment' does not contain any mri > > information. Putting the labels into a new field 'seg.seg' and calling > > bnd = ft_prepare_mesh(cfg, seg) solves this. > > > > I could replicate the error and this is due to the fact that ft_prepare_mesh accepts inputs of FieldTrip type 'volume'. See ft_datatype_volume. The function crashed because I simply used an old version of the test file where I inputted the volume matrix only, whereas three fields are required (dim, transform and anatomy), that's why the input should look like this: > > mri2 = []; > mri2.anatomy = mri_segment; > mri2.dim = mri.dim; > mri2.transform = mri.transform; > > I patched the correct code at the end of the mail. > > > 2) However, there is still only one surface triangulated. So as I > > wrote in my last email, I still believe that line 25 in > > prepare_mesh_segmentation needs to be commented. What do you mean? > > > I agree. This function needs a general review altogether and at the moment I committed your correction. In the future I'll restructure the whole function taking care of the more recent guidelines. Thanks for your suggestion. > > Try this: > > % download from the FieldTrip ftp site > % (ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip) > > % load the MRI > mri = ft_read_mri('Subject01.mri'); > > % segment it > cfg = []; > cfg.output = {'scalp', 'skull', 'brain'}; > seg = ft_volumesegment(cfg, mri); > > % volumetric preprocessing > % Note: the three compartments have to be 'filled' otherwise the triangulation won't work correctly. The output of ft_volumesegment will change soon, making it compatible with ft_prepare_mesh. As of today we need the following: > > mri_segment{1} = seg.scalp; > mri_segment{2} = imfill(seg.skull,'holes'); % you need the image processing toolbox here! > mri_segment{3} = seg.brain; > > % triangulation (from volumes to surfaces) > % Note: now the volumes are inputted one at a time > mri2 = mri; > cfg=[]; > cfg.sourceunits = 'mm'; > cfg.mrinuits = 'mm'; > cfg.tissue = 1; > cfg.numvertices = 1000; > for i=1:3 > mri2.seg = mri_segment{i}; > mesh{i} = ft_prepare_mesh(cfg,mri2); > end > > % visualization of the triangulated surfaces > figure,ft_plot_mesh(mesh{1},'edgecolor','none','facecolor','w','facealpha',0.5) > ft_plot_mesh(mesh{2},'edgecolor','none','facecolor','g','facealpha',0.7) > ft_plot_mesh(mesh{3},'edgecolor','none','facecolor','r','facealpha',1) > > > > Thank you. > > Be my guest. > Cheers, > Cristiano > > > > > Best regards, > > Margit > > > > > > *********************************** > > Margit Sch?nherr > > Universit?tsklinikum Erlangen > > Neurologische Klinik > > Epilepsiezentrum (Biomagnetismus) > > Schwabachanlage 6 > > 91054 Erlangen > > Telefon: ++49 9131 / 85 36921 > > Email: margit.schoenherr at uk-erlangen.de > > *********************************** > > ________________________________________ > > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > > im Auftrag von Micheli, C. [c.micheli at fcdonders.ru.nl] > > Gesendet: Montag, 5. September 2011 12:59 > > An: Email discussion list for the FieldTrip project > > Betreff: Re: [FieldTrip] Forward solution using concentric spheres > > and BEM models > > > > Dear Juan Pablo and Margit > > > > The function 'ft_prepare_mesh' takes care of triangulating every > > compartment via the cfg.tissue option. This option contains the > > integers which describe a type of tissue, given that the user > > beforehand defined all voxels of the segmented MRI compartment as > > having that particular value. > > As an example, download the sample MRI in FieldTrip ftp location: > > > > ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip > > Create a folder and unzip these files. > > > > % read in the mri > > mri = ft_read_mri('Subject01.mri'); > > > > % segment it > > cfg = []; > > cfg.output = {'scalp', 'skull', 'brain'}; > > seg = ft_volumesegment(cfg, mri); > > > > % assign a label > > scalp = (seg.scalp) & ~(seg.skull | seg.brain); > > skull = 2*(seg.skull); > > brain = 3*(seg.brain); > > mri_segment = scalp + skull + brain; > > > > % build the meshes > > cfg = []; > > cfg.method = 'segmentation'; > > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > > cfg.numvertices = [2000 1000 800]; > > cfg.sourceunits = 'mm'; > > cfg.mriunits = 'mm'; > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > If any of the tissues has a different value from cfg.tissues this > > won't be triangulated. To check for this use ft_sourceplot in the > > interactive mode. By clicking around you can see the tissue's value in > > the command window: > > > > % view the labelled segmentations > > mri2 = mri; > > mri2.seg = mri_segment; > > cfg=[]; > > cfg.interactive = 'yes'; > > cfg.funparameter = 'seg'; > > ft_sourceplot(cfg,mri2); > > > > About the concentric spheres: > > both ways to derive a concentric spheres model are correct. In one > > case you directly build the vol structure and you assume you know the > > radiuses of your spheres. In the other case you allow the > > ft_prepare_concentricspheres function to build the spheres starting > > from realistic geometrical boundaries. > > The second approach is my favorite because the ft_prepare function > > contains a function that fits a sphere to each boundary and I don't > > have to do it myself. > > The first approach (directly force the radiuses in your vol structure) > > is preferable if you derive the information from other software (e.g. > > CTF's MRIView) or if you fit the sphere yourself. > > > > @Pablo > > If the sphere is fitted inside the brain it is correct. You do not > > want the sphere to include other tissues, because your assumption for > > the construction of the forward model is that the tissue inside the > > sphere is homogeneous. > > For a more realistic model (encompassing the whole brain volume) I > > would rather use a BEM model. > > > > I hope this helps, > > Cristiano > > > > ------------------------------ > > Message: 3 > Date: Wed, 14 Sep 2011 18:18:36 +0200 > From: Paolo Belardinelli > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] cortical time-course reconstruction > Message-ID: <4E70D3DC.4060403 at med.uni-tuebingen.de> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Robert. > We have some nice coherence maps with peaks in M1 for a finger tapping > task. We were wondering how to properly reconstruct the power > time-course in the M1 area in order to use it as a further reference > signal. > > -Is the code necessary for the approach described in (Schoffelen et al., > NeuroImage 2008) already implemented in ft (we observed in the code that > it is possible in ft_sourceanalysis.m to give a location for a > reference dipole but we found no documentation)? > > -Is the only reliable solution for reconstructing a time-course to > project the activity in the dominant direction? We have the eigenvalues > of the first dipole which are normally 3 to 6 times larger > than the ones of the second. We are not sure this is enough to neglect > the second component. > > - One last technical question: in the mailing list it is said that the > orientation of the dipole is saved in source.avg.ori but it doesn't seem > like that to us. Maybe we are doing something wrong. > > Best regards and thank you for your work, > > Paolo and Erick > > > ------------------------------ > > Message: 4 > Date: Thu, 15 Sep 2011 10:10:36 +0200 > From: "Eric Maris" > To: "'Email discussion list for the FieldTrip project'" > > Subject: Re: [FieldTrip] interaction within-subject indepsamplesT > Message-ID: <008d01cc737e$f6192ba0$e24b82e0$@maris at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Dear Kathrin, > > > I need your advice on how to correctly test the interaction effects in a > 2x2 > > within-subject design with cluster-based randomization tests. I have two > > factors A and B with the levels a1/a2 and b1/b2. In addition, the number > of > > trials in A are about twice as much as in B. > > > > The procedure would be totally clear in a between-subject design (as in a > > previous post on the list: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) > > This post is about a WITHIN-subjects design. > > > because I could easily compute the differences of the factor levels > > A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the > > differences. However, since I have to run the statistics across trials and > not > > subjects I have independent samples and not dependent samples. > > So, you have a between-trials design. > > If it is > > possible at all, how can I calculate the differences A_diff and B_diff > across > > trials? Is it a problem that the number of trials are not equal? > > This is not possible. Permutation tests cannot be used for testing > interactions in a multi-factorial between-subjects/trials design. Michael > Wibral has a post in which he refers to a nice statistics paper on the > issue. > > A proxy that is possible (but not statistically sound) is to perform two > statistical tests of the first factor, once at the first level of second > factor and once at the second level. > > > Best, > > Eric Maris > > > > > > > > > > > > Any help is appreciated! > > > > Best, > > Kathrin > > > > _____________________________________ > > Kathrin M?sch > > > > Dept. of Neurophysiology and Pathophysiology > > University Medical Center Hamburg-Eppendorf > > Martinistr. 52 > > 20246 Hamburg > > Germany > > Phone: +49-40-7410-54680 > > Fax: +49-40-7410-57752 > > E-Mail: k.muesch at uke.uni-hamburg.de > > _____________________________________ > > > > > > -- > > Pflichtangaben gem?? Gesetz ?ber elektronische Handelsregister und > > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > > > Universit?tsklinikum Hamburg-Eppendorf; K?rperschaft des ?ffentlichen > > Rechts; Gerichtsstand: Hamburg > > > > Vorstandsmitglieder: Prof. Dr. J?rg F. Debatin (Vorsitzender), Dr. > Alexander > > Kirstein, Joachim Pr?l?, Prof. Dr. Dr. Uwe Koch-Gromus > > > > > > _______________________________________________ > > 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 > > End of fieldtrip Digest, Vol 10, Issue 18 > ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Thu Sep 15 16:17:21 2011 From: fredericroux at hotmail.de (Frederic Roux) Date: Thu, 15 Sep 2011 16:17:21 +0200 Subject: [FieldTrip] channel_repair bug In-Reply-To: References: Message-ID: Is the google code correct or does it still have the bug? -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 > From: fieldtrip-request at donders.ru.nl > Subject: fieldtrip Digest, Vol 10, Issue 18 > To: fieldtrip at donders.ru.nl > Date: Thu, 15 Sep 2011 12:00:17 +0200 > > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Critical bug in ft_channelrepair fixed (J?rn M. Horschig) > 2. Fwd: AW: Forward solution using concentric spheres and BEM > models (Micheli, C.) > 3. cortical time-course reconstruction (Paolo Belardinelli) > 4. Re: interaction within-subject indepsamplesT (Eric Maris) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 14 Sep 2011 15:41:45 +0200 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: [FieldTrip] Critical bug in ft_channelrepair fixed > Message-ID: <4E70AF19.2040003 at donders.ru.nl> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hey everyone, > > we found a critical bug in ft_channelrepair, which we fixed now. The bug > caused wrong channels to be chosen for interpolation in some situations, > meaning that the timecourse your repaired channel did not make sense. > Please be aware of this, check your reconstructed channels and re-run > your channel reconstruction if you are in doubt with the newest > FieldTrip version! > > For more information, check Google code: > http://code.google.com/p/fieldtrip/source/detail?r=4158 > and Bugzilla: > http://bugzilla.fcdonders.nl/show_bug.cgi?id=941 > > Best regards, > J?rn > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > 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 > > > > ------------------------------ > > Message: 2 > Date: Wed, 14 Sep 2011 17:56:38 +0200 (CEST) > From: "Micheli, C." > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Fwd: AW: Forward solution using concentric > spheres and BEM models > Message-ID: > <1624476173.1270054.1316015798685.JavaMail.root at draco.zimbra.ru.nl> > Content-Type: text/plain; charset=utf-8 > > Hi Margit and Juan Pablo > see my answers below. > > ----- "Margit Sch?nherr" schreef: > > > Van: "Margit Sch?nherr" > > Aan: "c micheli" > > Verzonden: Woensdag 7 september 2011 09:33:53 > > Onderwerp: AW: [FieldTrip] Forward solution using concentric spheres and BEM models > > > > Hello Cristiano, > > > > thank you for your email. I have tried the code, but I have 2 problems > > with it. > > 1) When I do it exactly as suggested in the email, I get the following > > error when using ft_prepare_mesh: > > > > bnd = ft_prepare_mesh(cfg, mri_segment); > > ??? Error using ==> ft_prepare_mesh at 159 > > unsupported cfg.method and/or input > > > > I think, this is simply a problem concerning the naming of the > > variables. The segmented mri is called 'seg', the labels are assigned > > to 'mri_segment'. I think, this is the wrong input for > > ft_prepare_mesh, because 'mri_segment' does not contain any mri > > information. Putting the labels into a new field 'seg.seg' and calling > > bnd = ft_prepare_mesh(cfg, seg) solves this. > > > > I could replicate the error and this is due to the fact that ft_prepare_mesh accepts inputs of FieldTrip type 'volume'. See ft_datatype_volume. The function crashed because I simply used an old version of the test file where I inputted the volume matrix only, whereas three fields are required (dim, transform and anatomy), that's why the input should look like this: > > mri2 = []; > mri2.anatomy = mri_segment; > mri2.dim = mri.dim; > mri2.transform = mri.transform; > > I patched the correct code at the end of the mail. > > > 2) However, there is still only one surface triangulated. So as I > > wrote in my last email, I still believe that line 25 in > > prepare_mesh_segmentation needs to be commented. What do you mean? > > > I agree. This function needs a general review altogether and at the moment I committed your correction. In the future I'll restructure the whole function taking care of the more recent guidelines. Thanks for your suggestion. > > Try this: > > % download from the FieldTrip ftp site > % (ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip) > > % load the MRI > mri = ft_read_mri('Subject01.mri'); > > % segment it > cfg = []; > cfg.output = {'scalp', 'skull', 'brain'}; > seg = ft_volumesegment(cfg, mri); > > % volumetric preprocessing > % Note: the three compartments have to be 'filled' otherwise the triangulation won't work correctly. The output of ft_volumesegment will change soon, making it compatible with ft_prepare_mesh. As of today we need the following: > > mri_segment{1} = seg.scalp; > mri_segment{2} = imfill(seg.skull,'holes'); % you need the image processing toolbox here! > mri_segment{3} = seg.brain; > > % triangulation (from volumes to surfaces) > % Note: now the volumes are inputted one at a time > mri2 = mri; > cfg=[]; > cfg.sourceunits = 'mm'; > cfg.mrinuits = 'mm'; > cfg.tissue = 1; > cfg.numvertices = 1000; > for i=1:3 > mri2.seg = mri_segment{i}; > mesh{i} = ft_prepare_mesh(cfg,mri2); > end > > % visualization of the triangulated surfaces > figure,ft_plot_mesh(mesh{1},'edgecolor','none','facecolor','w','facealpha',0.5) > ft_plot_mesh(mesh{2},'edgecolor','none','facecolor','g','facealpha',0.7) > ft_plot_mesh(mesh{3},'edgecolor','none','facecolor','r','facealpha',1) > > > > Thank you. > > Be my guest. > Cheers, > Cristiano > > > > > Best regards, > > Margit > > > > > > *********************************** > > Margit Sch?nherr > > Universit?tsklinikum Erlangen > > Neurologische Klinik > > Epilepsiezentrum (Biomagnetismus) > > Schwabachanlage 6 > > 91054 Erlangen > > Telefon: ++49 9131 / 85 36921 > > Email: margit.schoenherr at uk-erlangen.de > > *********************************** > > ________________________________________ > > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > > im Auftrag von Micheli, C. [c.micheli at fcdonders.ru.nl] > > Gesendet: Montag, 5. September 2011 12:59 > > An: Email discussion list for the FieldTrip project > > Betreff: Re: [FieldTrip] Forward solution using concentric spheres > > and BEM models > > > > Dear Juan Pablo and Margit > > > > The function 'ft_prepare_mesh' takes care of triangulating every > > compartment via the cfg.tissue option. This option contains the > > integers which describe a type of tissue, given that the user > > beforehand defined all voxels of the segmented MRI compartment as > > having that particular value. > > As an example, download the sample MRI in FieldTrip ftp location: > > > > ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip > > Create a folder and unzip these files. > > > > % read in the mri > > mri = ft_read_mri('Subject01.mri'); > > > > % segment it > > cfg = []; > > cfg.output = {'scalp', 'skull', 'brain'}; > > seg = ft_volumesegment(cfg, mri); > > > > % assign a label > > scalp = (seg.scalp) & ~(seg.skull | seg.brain); > > skull = 2*(seg.skull); > > brain = 3*(seg.brain); > > mri_segment = scalp + skull + brain; > > > > % build the meshes > > cfg = []; > > cfg.method = 'segmentation'; > > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > > cfg.numvertices = [2000 1000 800]; > > cfg.sourceunits = 'mm'; > > cfg.mriunits = 'mm'; > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > If any of the tissues has a different value from cfg.tissues this > > won't be triangulated. To check for this use ft_sourceplot in the > > interactive mode. By clicking around you can see the tissue's value in > > the command window: > > > > % view the labelled segmentations > > mri2 = mri; > > mri2.seg = mri_segment; > > cfg=[]; > > cfg.interactive = 'yes'; > > cfg.funparameter = 'seg'; > > ft_sourceplot(cfg,mri2); > > > > About the concentric spheres: > > both ways to derive a concentric spheres model are correct. In one > > case you directly build the vol structure and you assume you know the > > radiuses of your spheres. In the other case you allow the > > ft_prepare_concentricspheres function to build the spheres starting > > from realistic geometrical boundaries. > > The second approach is my favorite because the ft_prepare function > > contains a function that fits a sphere to each boundary and I don't > > have to do it myself. > > The first approach (directly force the radiuses in your vol structure) > > is preferable if you derive the information from other software (e.g. > > CTF's MRIView) or if you fit the sphere yourself. > > > > @Pablo > > If the sphere is fitted inside the brain it is correct. You do not > > want the sphere to include other tissues, because your assumption for > > the construction of the forward model is that the tissue inside the > > sphere is homogeneous. > > For a more realistic model (encompassing the whole brain volume) I > > would rather use a BEM model. > > > > I hope this helps, > > Cristiano > > > > ------------------------------ > > Message: 3 > Date: Wed, 14 Sep 2011 18:18:36 +0200 > From: Paolo Belardinelli > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] cortical time-course reconstruction > Message-ID: <4E70D3DC.4060403 at med.uni-tuebingen.de> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Robert. > We have some nice coherence maps with peaks in M1 for a finger tapping > task. We were wondering how to properly reconstruct the power > time-course in the M1 area in order to use it as a further reference > signal. > > -Is the code necessary for the approach described in (Schoffelen et al., > NeuroImage 2008) already implemented in ft (we observed in the code that > it is possible in ft_sourceanalysis.m to give a location for a > reference dipole but we found no documentation)? > > -Is the only reliable solution for reconstructing a time-course to > project the activity in the dominant direction? We have the eigenvalues > of the first dipole which are normally 3 to 6 times larger > than the ones of the second. We are not sure this is enough to neglect > the second component. > > - One last technical question: in the mailing list it is said that the > orientation of the dipole is saved in source.avg.ori but it doesn't seem > like that to us. Maybe we are doing something wrong. > > Best regards and thank you for your work, > > Paolo and Erick > > > ------------------------------ > > Message: 4 > Date: Thu, 15 Sep 2011 10:10:36 +0200 > From: "Eric Maris" > To: "'Email discussion list for the FieldTrip project'" > > Subject: Re: [FieldTrip] interaction within-subject indepsamplesT > Message-ID: <008d01cc737e$f6192ba0$e24b82e0$@maris at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Dear Kathrin, > > > I need your advice on how to correctly test the interaction effects in a > 2x2 > > within-subject design with cluster-based randomization tests. I have two > > factors A and B with the levels a1/a2 and b1/b2. In addition, the number > of > > trials in A are about twice as much as in B. > > > > The procedure would be totally clear in a between-subject design (as in a > > previous post on the list: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) > > This post is about a WITHIN-subjects design. > > > because I could easily compute the differences of the factor levels > > A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the > > differences. However, since I have to run the statistics across trials and > not > > subjects I have independent samples and not dependent samples. > > So, you have a between-trials design. > > If it is > > possible at all, how can I calculate the differences A_diff and B_diff > across > > trials? Is it a problem that the number of trials are not equal? > > This is not possible. Permutation tests cannot be used for testing > interactions in a multi-factorial between-subjects/trials design. Michael > Wibral has a post in which he refers to a nice statistics paper on the > issue. > > A proxy that is possible (but not statistically sound) is to perform two > statistical tests of the first factor, once at the first level of second > factor and once at the second level. > > > Best, > > Eric Maris > > > > > > > > > > > > Any help is appreciated! > > > > Best, > > Kathrin > > > > _____________________________________ > > Kathrin M?sch > > > > Dept. of Neurophysiology and Pathophysiology > > University Medical Center Hamburg-Eppendorf > > Martinistr. 52 > > 20246 Hamburg > > Germany > > Phone: +49-40-7410-54680 > > Fax: +49-40-7410-57752 > > E-Mail: k.muesch at uke.uni-hamburg.de > > _____________________________________ > > > > > > -- > > Pflichtangaben gem?? Gesetz ?ber elektronische Handelsregister und > > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > > > Universit?tsklinikum Hamburg-Eppendorf; K?rperschaft des ?ffentlichen > > Rechts; Gerichtsstand: Hamburg > > > > Vorstandsmitglieder: Prof. Dr. J?rg F. Debatin (Vorsitzender), Dr. > Alexander > > Kirstein, Joachim Pr?l?, Prof. Dr. Dr. Uwe Koch-Gromus > > > > > > _______________________________________________ > > 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 > > End of fieldtrip Digest, Vol 10, Issue 18 > ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Sep 16 08:30:24 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 16 Sep 2011 08:30:24 +0200 Subject: [FieldTrip] channel_repair bug In-Reply-To: References: Message-ID: <4E72ED00.2070906@donders.ru.nl> Hi Frederic, The one Google Code is the most recent version. My guess would be that it was introduced beginning of July in revision 3807 (apologies for that ). Any version after that had this bug, I cannot tell for the versions before (but doubt). Best regards, Jörn On 9/15/2011 4:07 PM, Frederic Roux wrote: > > Hi Jorn, > > I was wondering if the bug you reported concerning the channel_repair > function also applied to older versions of fieldtrip and in which > cases this bug appears. > > This would be important for me to know as I have been using the function > in the past and would like to know if it affects my results or not. > > Best, > > Frederic > > -- > Frédéric Roux, PhD student > Department of Neurophysiology > Max Planck Institute for Brain Research > D-60529 Frankfurt am Main > Frederic.Roux at brain.mpg.de > +49(0)69630183225 > > > > > > From: fieldtrip-request at donders.ru.nl > > Subject: fieldtrip Digest, Vol 10, Issue 18 > > To: fieldtrip at donders.ru.nl > > Date: Thu, 15 Sep 2011 12:00:17 +0200 > > > > Send fieldtrip mailing list submissions to > > fieldtrip at donders.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 donders.ru.nl > > > > You can reach the person managing the list at > > fieldtrip-owner at donders.ru.nl > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of fieldtrip digest..." > > > > > > Today's Topics: > > > > 1. Critical bug in ft_channelrepair fixed (J?rn M. Horschig) > > 2. Fwd: AW: Forward solution using concentric spheres and BEM > > models (Micheli, C.) > > 3. cortical time-course reconstruction (Paolo Belardinelli) > > 4. Re: interaction within-subject indepsamplesT (Eric Maris) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Wed, 14 Sep 2011 15:41:45 +0200 > > From: "J?rn M. Horschig" > > To: Email discussion list for the FieldTrip project > > > > Subject: [FieldTrip] Critical bug in ft_channelrepair fixed > > Message-ID: <4E70AF19.2040003 at donders.ru.nl> > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > > Hey everyone, > > > > we found a critical bug in ft_channelrepair, which we fixed now. The > bug > > caused wrong channels to be chosen for interpolation in some > situations, > > meaning that the timecourse your repaired channel did not make sense. > > Please be aware of this, check your reconstructed channels and re-run > > your channel reconstruction if you are in doubt with the newest > > FieldTrip version! > > > > For more information, check Google code: > > http://code.google.com/p/fieldtrip/source/detail?r=4158 > > and Bugzilla: > > http://bugzilla.fcdonders.nl/show_bug.cgi?id=941 > > > > Best regards, > > J?rn > > > > > > -- > > J?rn M. Horschig > > PhD Student > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognitive Neuroimaging > > Radboud University Nijmegen > > Neuronal Oscillations Group > > > > 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 > > > > > > > > ------------------------------ > > > > Message: 2 > > Date: Wed, 14 Sep 2011 17:56:38 +0200 (CEST) > > From: "Micheli, C." > > To: fieldtrip at donders.ru.nl > > Subject: [FieldTrip] Fwd: AW: Forward solution using concentric > > spheres and BEM models > > Message-ID: > > <1624476173.1270054.1316015798685.JavaMail.root at draco.zimbra.ru.nl> > > Content-Type: text/plain; charset=utf-8 > > > > Hi Margit and Juan Pablo > > see my answers below. > > > > ----- "Margit Sch?nherr" schreef: > > > > > Van: "Margit Sch?nherr" > > > Aan: "c micheli" > > > Verzonden: Woensdag 7 september 2011 09:33:53 > > > Onderwerp: AW: [FieldTrip] Forward solution using concentric > spheres and BEM models > > > > > > Hello Cristiano, > > > > > > thank you for your email. I have tried the code, but I have 2 problems > > > with it. > > > 1) When I do it exactly as suggested in the email, I get the following > > > error when using ft_prepare_mesh: > > > > > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > ??? Error using ==> ft_prepare_mesh at 159 > > > unsupported cfg.method and/or input > > > > > > I think, this is simply a problem concerning the naming of the > > > variables. The segmented mri is called 'seg', the labels are assigned > > > to 'mri_segment'. I think, this is the wrong input for > > > ft_prepare_mesh, because 'mri_segment' does not contain any mri > > > information. Putting the labels into a new field 'seg.seg' and calling > > > bnd = ft_prepare_mesh(cfg, seg) solves this. > > > > > > > I could replicate the error and this is due to the fact that > ft_prepare_mesh accepts inputs of FieldTrip type 'volume'. See > ft_datatype_volume. The function crashed because I simply used an old > version of the test file where I inputted the volume matrix only, > whereas three fields are required (dim, transform and anatomy), that's > why the input should look like this: > > > > mri2 = []; > > mri2.anatomy = mri_segment; > > mri2.dim = mri.dim; > > mri2.transform = mri.transform; > > > > I patched the correct code at the end of the mail. > > > > > 2) However, there is still only one surface triangulated. So as I > > > wrote in my last email, I still believe that line 25 in > > > prepare_mesh_segmentation needs to be commented. What do you mean? > > > > > > I agree. This function needs a general review altogether and at the > moment I committed your correction. In the future I'll restructure the > whole function taking care of the more recent guidelines. Thanks for > your suggestion. > > > > Try this: > > > > % download from the FieldTrip ftp site > > % (ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip) > > > > % load the MRI > > mri = ft_read_mri('Subject01.mri'); > > > > % segment it > > cfg = []; > > cfg.output = {'scalp', 'skull', 'brain'}; > > seg = ft_volumesegment(cfg, mri); > > > > % volumetric preprocessing > > % Note: the three compartments have to be 'filled' otherwise the > triangulation won't work correctly. The output of ft_volumesegment > will change soon, making it compatible with ft_prepare_mesh. As of > today we need the following: > > > > mri_segment{1} = seg.scalp; > > mri_segment{2} = imfill(seg.skull,'holes'); % you need the image > processing toolbox here! > > mri_segment{3} = seg.brain; > > > > % triangulation (from volumes to surfaces) > > % Note: now the volumes are inputted one at a time > > mri2 = mri; > > cfg=[]; > > cfg.sourceunits = 'mm'; > > cfg.mrinuits = 'mm'; > > cfg.tissue = 1; > > cfg.numvertices = 1000; > > for i=1:3 > > mri2.seg = mri_segment{i}; > > mesh{i} = ft_prepare_mesh(cfg,mri2); > > end > > > > % visualization of the triangulated surfaces > > > figure,ft_plot_mesh(mesh{1},'edgecolor','none','facecolor','w','facealpha',0.5) > > ft_plot_mesh(mesh{2},'edgecolor','none','facecolor','g','facealpha',0.7) > > ft_plot_mesh(mesh{3},'edgecolor','none','facecolor','r','facealpha',1) > > > > > > > Thank you. > > > > Be my guest. > > Cheers, > > Cristiano > > > > > > > > Best regards, > > > Margit > > > > > > > > > *********************************** > > > Margit Sch?nherr > > > Universit?tsklinikum Erlangen > > > Neurologische Klinik > > > Epilepsiezentrum (Biomagnetismus) > > > Schwabachanlage 6 > > > 91054 Erlangen > > > Telefon: ++49 9131 / 85 36921 > > > Email: margit.schoenherr at uk-erlangen.de > > > *********************************** > > > ________________________________________ > > > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > > > im Auftrag von Micheli, C. [c.micheli at fcdonders.ru.nl] > > > Gesendet: Montag, 5. September 2011 12:59 > > > An: Email discussion list for the FieldTrip project > > > Betreff: Re: [FieldTrip] Forward solution using concentric spheres > > > and BEM models > > > > > > Dear Juan Pablo and Margit > > > > > > The function 'ft_prepare_mesh' takes care of triangulating every > > > compartment via the cfg.tissue option. This option contains the > > > integers which describe a type of tissue, given that the user > > > beforehand defined all voxels of the segmented MRI compartment as > > > having that particular value. > > > As an example, download the sample MRI in FieldTrip ftp location: > > > > > > ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip > > > Create a folder and unzip these files. > > > > > > % read in the mri > > > mri = ft_read_mri('Subject01.mri'); > > > > > > % segment it > > > cfg = []; > > > cfg.output = {'scalp', 'skull', 'brain'}; > > > seg = ft_volumesegment(cfg, mri); > > > > > > % assign a label > > > scalp = (seg.scalp) & ~(seg.skull | seg.brain); > > > skull = 2*(seg.skull); > > > brain = 3*(seg.brain); > > > mri_segment = scalp + skull + brain; > > > > > > % build the meshes > > > cfg = []; > > > cfg.method = 'segmentation'; > > > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > > > cfg.numvertices = [2000 1000 800]; > > > cfg.sourceunits = 'mm'; > > > cfg.mriunits = 'mm'; > > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > > > If any of the tissues has a different value from cfg.tissues this > > > won't be triangulated. To check for this use ft_sourceplot in the > > > interactive mode. By clicking around you can see the tissue's value in > > > the command window: > > > > > > % view the labelled segmentations > > > mri2 = mri; > > > mri2.seg = mri_segment; > > > cfg=[]; > > > cfg.interactive = 'yes'; > > > cfg.funparameter = 'seg'; > > > ft_sourceplot(cfg,mri2); > > > > > > About the concentric spheres: > > > both ways to derive a concentric spheres model are correct. In one > > > case you directly build the vol structure and you assume you know the > > > radiuses of your spheres. In the other case you allow the > > > ft_prepare_concentricspheres function to build the spheres starting > > > from realistic geometrical boundaries. > > > The second approach is my favorite because the ft_prepare function > > > contains a function that fits a sphere to each boundary and I don't > > > have to do it myself. > > > The first approach (directly force the radiuses in your vol structure) > > > is preferable if you derive the information from other software (e.g. > > > CTF's MRIView) or if you fit the sphere yourself. > > > > > > @Pablo > > > If the sphere is fitted inside the brain it is correct. You do not > > > want the sphere to include other tissues, because your assumption for > > > the construction of the forward model is that the tissue inside the > > > sphere is homogeneous. > > > For a more realistic model (encompassing the whole brain volume) I > > > would rather use a BEM model. > > > > > > I hope this helps, > > > Cristiano > > > > > > > > ------------------------------ > > > > Message: 3 > > Date: Wed, 14 Sep 2011 18:18:36 +0200 > > From: Paolo Belardinelli > > To: fieldtrip at donders.ru.nl > > Subject: [FieldTrip] cortical time-course reconstruction > > Message-ID: <4E70D3DC.4060403 at med.uni-tuebingen.de> > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > > Hi Robert. > > We have some nice coherence maps with peaks in M1 for a finger tapping > > task. We were wondering how to properly reconstruct the power > > time-course in the M1 area in order to use it as a further reference > > signal. > > > > -Is the code necessary for the approach described in (Schoffelen et > al., > > NeuroImage 2008) already implemented in ft (we observed in the code > that > > it is possible in ft_sourceanalysis.m to give a location for a > > reference dipole but we found no documentation)? > > > > -Is the only reliable solution for reconstructing a time-course to > > project the activity in the dominant direction? We have the eigenvalues > > of the first dipole which are normally 3 to 6 times larger > > than the ones of the second. We are not sure this is enough to neglect > > the second component. > > > > - One last technical question: in the mailing list it is said that the > > orientation of the dipole is saved in source.avg.ori but it doesn't > seem > > like that to us. Maybe we are doing something wrong. > > > > Best regards and thank you for your work, > > > > Paolo and Erick > > > > > > ------------------------------ > > > > Message: 4 > > Date: Thu, 15 Sep 2011 10:10:36 +0200 > > From: "Eric Maris" > > To: "'Email discussion list for the FieldTrip project'" > > > > Subject: Re: [FieldTrip] interaction within-subject indepsamplesT > > Message-ID: <008d01cc737e$f6192ba0$e24b82e0$@maris at donders.ru.nl> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Dear Kathrin, > > > > > I need your advice on how to correctly test the interaction > effects in a > > 2x2 > > > within-subject design with cluster-based randomization tests. I > have two > > > factors A and B with the levels a1/a2 and b1/b2. In addition, the > number > > of > > > trials in A are about twice as much as in B. > > > > > > The procedure would be totally clear in a between-subject design > (as in a > > > previous post on the list: > > > > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) > > > > This post is about a WITHIN-subjects design. > > > > > because I could easily compute the differences of the factor levels > > > A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the > > > differences. However, since I have to run the statistics across > trials and > > not > > > subjects I have independent samples and not dependent samples. > > > > So, you have a between-trials design. > > > > If it is > > > possible at all, how can I calculate the differences A_diff and B_diff > > across > > > trials? Is it a problem that the number of trials are not equal? > > > > This is not possible. Permutation tests cannot be used for testing > > interactions in a multi-factorial between-subjects/trials design. > Michael > > Wibral has a post in which he refers to a nice statistics paper on the > > issue. > > > > A proxy that is possible (but not statistically sound) is to perform two > > statistical tests of the first factor, once at the first level of second > > factor and once at the second level. > > > > > > Best, > > > > Eric Maris > > > > > > > > > > > > > > > > > > > > > > Any help is appreciated! > > > > > > Best, > > > Kathrin > > > > > > _____________________________________ > > > Kathrin M?sch > > > > > > Dept. of Neurophysiology and Pathophysiology > > > University Medical Center Hamburg-Eppendorf > > > Martinistr. 52 > > > 20246 Hamburg > > > Germany > > > Phone: +49-40-7410-54680 > > > Fax: +49-40-7410-57752 > > > E-Mail: k.muesch at uke.uni-hamburg.de > > > _____________________________________ > > > > > > > > > -- > > > Pflichtangaben gem?? Gesetz ?ber elektronische Handelsregister und > > > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > > > > > Universit?tsklinikum Hamburg-Eppendorf; K?rperschaft des ?ffentlichen > > > Rechts; Gerichtsstand: Hamburg > > > > > > Vorstandsmitglieder: Prof. Dr. J?rg F. Debatin (Vorsitzender), Dr. > > Alexander > > > Kirstein, Joachim Pr?l?, Prof. Dr. Dr. Uwe Koch-Gromus > > > > > > > > > _______________________________________________ > > > 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 > > > > End of fieldtrip Digest, Vol 10, Issue 18 > > ***************************************** > > > _______________________________________________ > 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 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 giulia.rizza at tiscali.it Fri Sep 16 11:18:20 2011 From: giulia.rizza at tiscali.it (Giulia Rizza) Date: Fri, 16 Sep 2011 11:18:20 +0200 (CEST) Subject: [FieldTrip] matter of units? Message-ID: <32723147.58881316164700497.JavaMail.defaultUser@defaultHost> Hi everybody! Sorry for this banal question: I'm processinga EEG data from Neuroscan and everything seemed ok until I noticed that I find a very small activity in channels (-10 10) when browsing through the data, much lower than the one I can visualize from the same dataset with the acquisition software (-40 40 microV). Is it just a matter of units or am I doing something wrong? I'm working with the version 20110621 (now I'm passing to a new one) on Matlab 7.9.0 Here I've just defined trials and applied a filter. cfg = []; cfg. dataset = 'Cristiano_S2.cnt'; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef. eventvalue = 2; cfg.trialdef.prestim = 0.8; cfg.trialdef.poststim = 0.8; cfg = ft_definetrial(cfg); cfg.lpfilter = 'yes'; cfg.lpfreq = 100; data = ft_preprocessing(cfg); Thanks in advance to anyone Giulia Tutto Incluso 20 Mega light: telefono + ADSL a soli 19,95 € al mese fino al 2014. Risparmi 324 euro! Passa a Tiscali http://abbonati.tiscali.it/rd/rd2.html?u=http%3A%2F%2Fabbonati.tiscali.it%2Ftelefono-adsl%2Fprodotti%2Ftc%2Ftuttoincluso_light%2F%3FWT.mc_id%3D01fw%26r=TS00000A00002%26dm=DM_03%26p=footer From drivolta81 at gmail.com Fri Sep 16 11:57:17 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Fri, 16 Sep 2011 11:57:17 +0200 Subject: [FieldTrip] ??? Reference to non-existent field 'res4' Message-ID: Dear Fieldtrippers, I am trying to preprocess a subject. There is an error I have never seen before. It says: ??? Reference to non-existent field 'res4'. However, in my subject´s folder there is a .res4 file. To note that, when I have completed to test the subject, it was not possible to determine the head movement since “the system could not determine the position of the nasion”. May this be related? The file is corrupted and I can not open it with fieldtrip even with ft_read_header. Thanks for the help, Davide HERE IS THE ERROR: working on: SRW66_VisualGamma1_20110913_01.ds # of run in Design is:1 cfg = dataset: [1x94 char] datatype: 'continuous' trialdef: [1x1 struct] Warning: no trialfun was specified, using trialfun_general > In ft_definetrial at 101 In Main_VG_HF at 72 evaluating trialfunction 'trialfun_general' readCTFds: This dataset has multiple meg4 files. readCTFds: .11_meg4 file header= Valid header options: MEG41CP MEG42CP ??? Reference to non-existent field 'res4'. Error in ==> ft_read_header at 331 hdr.Fs = orig.res4.sample_rate; Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 144 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> Main_VG_HF at 72 cfg = ft_definetrial(cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From BelluscB at ninds.nih.gov Fri Sep 16 23:31:42 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Fri, 16 Sep 2011 17:31:42 -0400 Subject: [FieldTrip] FW: problem with ft_prepare_singleshell Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> Hi fellow fieldtrip users- I am currently using fieldtrip version 20110913 and have encountered a problem that wasn't there before. After reslicing and segmenting my mri data (which was realigned to CTF format), I segmented the data using cfg.output = {'skullstrip' 'brain'} and seg = ft_volumesegment(cfg, mri). I saved the resulting seg matrix. Then, when I run ft_prepare_singleshell to generate my volumetric model (vol): cfg = []; vol = ft_prepare_singleshell(cfg, seg) I get the following messages and error. not downsampling anatomy not downsampling brain the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB using the segmentation approach Warning: adding /home/belluscb/nindsip/matlab/fieldtrip-20110913/external/spm8 toolbox to your Matlab path using the segmented MRI ??? Reference to non-existent field 'seg'. Error in ==> prepare_mesh_segmentation at 63 [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); If I use an old version of fieldtrip (20100505) that I had, and run the same command cfg = []; vol = ft_prepare_singleshell(cfg, seg) on the same seg matrix, it runs without a problem. I am not skilled enough (yet) at reading code to figure out what is not working with the recent version of fieldtrip. Can someone please assist me? Thanks! Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 From jan.schoffelen at donders.ru.nl Sat Sep 17 10:10:33 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 17 Sep 2011 10:10:33 +0200 Subject: [FieldTrip] FW: problem with ft_prepare_singleshell In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> Message-ID: Dear Beth, Sorry for the bug. This is indeed a known problem which has found its way into recent versions. We are working on a permanent fix. I just checked in a temporary patch which should be available for download as of tonight (CET), or can be checked out from google-code soon. Alternatively, you could replace the recent version of ft_prepare_singleshell with and old version which works for you. This should affect anything else. Thanks for reporting this and sorry for the inconvenience. Best wishes, Jan-Mathijs On Sep 16, 2011, at 11:31 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > Hi fellow fieldtrip users- > I am currently using fieldtrip version 20110913 and have encountered a problem that wasn't there before. After reslicing and segmenting my mri data (which was realigned to CTF format), I segmented the data using cfg.output = {'skullstrip' 'brain'} and seg = ft_volumesegment(cfg, mri). I saved the resulting seg matrix. > Then, when I run ft_prepare_singleshell to generate my volumetric model (vol): > > cfg = []; > vol = ft_prepare_singleshell(cfg, seg) > > I get the following messages and error. > > > > not downsampling anatomy > not downsampling brain > the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB > using the segmentation approach > Warning: adding /home/belluscb/nindsip/matlab/fieldtrip-20110913/external/spm8 toolbox to your > Matlab path > using the segmented MRI > ??? Reference to non-existent field 'seg'. > > Error in ==> prepare_mesh_segmentation at 63 > [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > > > > If I use an old version of fieldtrip (20100505) that I had, and run the same command cfg = []; > vol = ft_prepare_singleshell(cfg, seg) on the same seg matrix, it runs without a problem. > > I am not skilled enough (yet) at reading code to figure out what is not working with the recent version of fieldtrip. > Can someone please assist me? > > Thanks! > Beth. > > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > > > _______________________________________________ > 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 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 Sat Sep 17 10:14:10 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 17 Sep 2011 10:14:10 +0200 Subject: [FieldTrip] FW: problem with ft_prepare_singleshell In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> Message-ID: <4BD2A835-A9CF-4CDD-B312-6EF543D31077@donders.ru.nl> Dear Beth, Sorry for the bug. This is indeed a known problem which has found its way into recent versions. We are working on a permanent fix. I just checked in a temporary patch which should be available for download as of tonight (CET), or can be checked out from google-code soon. Alternatively, you could replace the recent version of ft_prepare_singleshell with and old version which works for you. This should affect anything else. Thanks for reporting this and sorry for the inconvenience. Best wishes, Jan-Mathijs On Sep 16, 2011, at 11:31 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > Hi fellow fieldtrip users- > I am currently using fieldtrip version 20110913 and have encountered a problem that wasn't there before. After reslicing and segmenting my mri data (which was realigned to CTF format), I segmented the data using cfg.output = {'skullstrip' 'brain'} and seg = ft_volumesegment(cfg, mri). I saved the resulting seg matrix. > Then, when I run ft_prepare_singleshell to generate my volumetric model (vol): > > cfg = []; > vol = ft_prepare_singleshell(cfg, seg) > > I get the following messages and error. > > > > not downsampling anatomy > not downsampling brain > the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB > using the segmentation approach > Warning: adding /home/belluscb/nindsip/matlab/fieldtrip-20110913/external/spm8 toolbox to your > Matlab path > using the segmented MRI > ??? Reference to non-existent field 'seg'. > > Error in ==> prepare_mesh_segmentation at 63 > [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > > > > If I use an old version of fieldtrip (20100505) that I had, and run the same command cfg = []; > vol = ft_prepare_singleshell(cfg, seg) on the same seg matrix, it runs without a problem. > > I am not skilled enough (yet) at reading code to figure out what is not working with the recent version of fieldtrip. > Can someone please assist me? > > Thanks! > Beth. > > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > > > _______________________________________________ > 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 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 Sat Sep 17 10:18:20 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 17 Sep 2011 10:18:20 +0200 Subject: [FieldTrip] FW: problem with ft_prepare_singleshell In-Reply-To: References: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> Message-ID: <5D7EF8FF-AB9C-4D52-A485-3A5EA30BAAD4@donders.ru.nl> > Dear Beth, > > Sorry for the bug. This is indeed a known problem which has found its way into recent versions. We are working on a permanent fix. I just checked in a temporary patch which should be available for download as of tonight (CET), or can be checked out from google-code soon. Alternatively, you could replace the recent version of ft_prepare_singleshell with and old version which works for you. This should affect anything else. Sorry, of course I meant that it should NOT affect anything else. BW, JM >> Hi fellow fieldtrip users- >> I am currently using fieldtrip version 20110913 and have encountered a problem that wasn't there before. After reslicing and segmenting my mri data (which was realigned to CTF format), I segmented the data using cfg.output = {'skullstrip' 'brain'} and seg = ft_volumesegment(cfg, mri). I saved the resulting seg matrix. >> Then, when I run ft_prepare_singleshell to generate my volumetric model (vol): >> >> cfg = []; >> vol = ft_prepare_singleshell(cfg, seg) >> >> I get the following messages and error. >> >> >> >> not downsampling anatomy >> not downsampling brain >> the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB >> using the segmentation approach >> Warning: adding /home/belluscb/nindsip/matlab/fieldtrip-20110913/external/spm8 toolbox to your >> Matlab path >> using the segmented MRI >> ??? Reference to non-existent field 'seg'. >> >> Error in ==> prepare_mesh_segmentation at 63 >> [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); >> >> Error in ==> ft_prepare_mesh at 124 >> bnd = prepare_mesh_segmentation(cfg, mri); >> >> Error in ==> ft_prepare_singleshell at 89 >> vol.bnd = ft_prepare_mesh(cfg, mri); >> >> >> >> >> If I use an old version of fieldtrip (20100505) that I had, and run the same command cfg = []; >> vol = ft_prepare_singleshell(cfg, seg) on the same seg matrix, it runs without a problem. >> >> I am not skilled enough (yet) at reading code to figure out what is not working with the recent version of fieldtrip. >> Can someone please assist me? >> >> Thanks! >> Beth. >> >> >> Beth Belluscio MD-PhD >> Clinical Fellow >> Human Motor Control Section >> NINDS, NIH >> 301-402-3495 >> >> >> >> _______________________________________________ >> 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 > 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Sep 17 17:14:34 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 17 Sep 2011 10:14:34 -0500 Subject: [FieldTrip] Error in ft_timelockgrandaverage after import from EEGLAB Message-ID: Hello, I have imported data from EEGLAB (using eeglab2fieldtrip()) and averaged within fieldtrip, and then attempted to grand average (using ft_timelockgrandaverage with all the default options except cfg.keepindividual='yes'). I got the following error message: ??? Error using ==> fixdimord at 63 The data does not contain a dimord, but it also does not resemble raw data Error in ==> ft_checkdata at 151 data = fixdimord(data, strcmp(sourcerepresentation, 'new')); Error in ==> ft_timelockgrandaverage at 72 varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', 'feedback', 'no'); The structure of my average data after importing from EEGLAB looks like this, which I notice is missing some fields that data processed in fieldtrip with ft_preprocessing normally have: CF007_avg = label: {1x36 cell} fsample: 1000 elec: [1x1 struct] avg: [36x1201 single] var: [36x1201 single] time: [1x1201 double] cfg: [1x1 struct] Does anyone have any idea what might be causing the error? Thanks a lot, Steve Politzer-Ahles -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Sep 17 17:25:21 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 17 Sep 2011 10:25:21 -0500 Subject: [FieldTrip] Error in ft_timelockgrandaverage after import from EEGLAB In-Reply-To: References: Message-ID: Never mind, I just manually added data.dimord='chan_time' into each average and it worked now. Best, Steve Politzer-Ahles On Sat, Sep 17, 2011 at 10:14 AM, Stephen Politzer-Ahles < politzerahless at gmail.com> wrote: > Hello, > > I have imported data from EEGLAB (using eeglab2fieldtrip()) and averaged > within fieldtrip, and then attempted to grand average (using > ft_timelockgrandaverage with all the default options except > cfg.keepindividual='yes'). I got the following error message: > > ??? Error using ==> fixdimord at 63 > The data does not contain a dimord, but it also does not resemble raw data > > Error in ==> ft_checkdata at 151 > data = fixdimord(data, strcmp(sourcerepresentation, 'new')); > > Error in ==> ft_timelockgrandaverage at 72 > varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', > 'feedback', 'no'); > > The structure of my average data after importing from EEGLAB looks like > this, which I notice is missing some fields that data processed in fieldtrip > with ft_preprocessing normally have: > > CF007_avg = > > label: {1x36 cell} > fsample: 1000 > elec: [1x1 struct] > avg: [36x1201 single] > var: [36x1201 single] > time: [1x1201 double] > cfg: [1x1 struct] > > Does anyone have any idea what might be causing the error? > > Thanks a lot, > Steve Politzer-Ahles > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Sep 17 18:42:39 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 17 Sep 2011 11:42:39 -0500 Subject: [FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics Message-ID: When attempting to run cluster statistics on my EEG data (originally from Neuroscan .CNT, then processed in EEGLAB and finally imported to fieldtrip) using ft_timelockstatistics(), I receive the following error message: ??? Error using ==> ft_neighbourselection at 114 Did not find gradiometer or electrode information. Error in ==> statistics_wrapper at 241 cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); Error in ==> ft_timelockstatistics at 123 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); This seems to be because when I use cfg.channel = {'EEG'}; with my data, the channel information (the variable "sens" used in ft_neighbourselection) consists only of the list of channel labels: sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} On the other hand, when I run timelockstatistics on the sample data from the wiki, "sens" includes much more information: sens = pnt: [151x3 double] ori: [356x3 double] tra: [184x356 double] label: {151x1 cell} unit: 'cm' I think most of that extra information is planar gradient data (i.e., it comes from GA_FIC.grad). Since my data are EEG data, I assume it wouldn't make sense to use ft_megplanar on them. So, assuming that I need to get the extra channel location information into my EEG data, does anyone have any ideas on how to do that? Best, Steve Politzer-Ahles -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Sep 19 09:12:32 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 19 Sep 2011 09:12:32 +0200 Subject: [FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics In-Reply-To: References: Message-ID: <4E76EB60.9080801@donders.ru.nl> Hey Stephen, You need to specify the position of your electrodes, which are mostly stored in an 'elec' structure. If you do not have that available, you can circumvent the problem by defining a cfg.layout. In that case, neighbouring sensors will be selected according to how they are placed in that layout-file you specify. That's not 100% correct of course, but at least an estimate how the sensors are positioned (note that a layout has only 2D coordinates). For example, you could use cfg.layout = 'EEG1010.lay' as a start. Anyway, could you try using a more recent version of FieldTrip? A few months ago, we changed the way the neighbourselection works (actually, you have to call cfg.neighbours = ft_neighbourselection manually, now). You can then also check with cfg.feedback = 'yes' whether the neighbourselection looks alright to you (that's the same as calling ft_neighbourplot) Hope it helps! Best regards, Jörn On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote: > When attempting to run cluster statistics on my EEG data (originally > from Neuroscan .CNT, then processed in EEGLAB and finally imported to > fieldtrip) using ft_timelockstatistics(), I receive the following > error message: > > ??? Error using ==> ft_neighbourselection at 114 > Did not find gradiometer or electrode information. > > Error in ==> statistics_wrapper at 241 > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > Error in ==> ft_timelockstatistics at 123 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > This seems to be because when I use cfg.channel = {'EEG'}; with my > data, the channel information (the variable "sens" used in > ft_neighbourselection) consists only of the list of channel labels: > > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} > > On the other hand, when I run timelockstatistics on the sample data > from the wiki, "sens" includes much more information: > > sens = > > pnt: [151x3 double] > ori: [356x3 double] > tra: [184x356 double] > label: {151x1 cell} > unit: 'cm' > > I think most of that extra information is planar gradient data (i.e., > it comes from GA_FIC.grad). Since my data are EEG data, I assume it > wouldn't make sense to use ft_megplanar on them. So, assuming that I > need to get the extra channel location information into my EEG data, > does anyone have any ideas on how to do that? > > Best, > Steve Politzer-Ahles > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > > > _______________________________________________ > 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 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 irina.simanova at mpi.nl Mon Sep 19 13:14:59 2011 From: irina.simanova at mpi.nl (Irina Simanova) Date: Mon, 19 Sep 2011 13:14:59 +0200 Subject: [FieldTrip] ft_sourceplot error Message-ID: <33EAF058-5094-45A5-9164-73F672EA74F1@mpi.nl> Dear all, I have an error in checkconfig.m called from ft_sourceplot. What is wrong here? Thanks a lot, Irina vol = dim: [45 54 39] anatomy: [45x54x39 double] hdr: [1x1 struct] transform: [4x4 double] unit: 'mm' fun: [45x54x39 double] cfg_plot = funparameter: 'fun' method: 'ortho' >> ft_sourceplot(cfg_plot, vol) the input is volume data with dimensions [45 54 39] not downsampling anatomy not downsampling fun ??? Reference to non-existent field 'checksize'. Error in ==> ft_checkconfig at 559 if strcmp(checksize, 'yes') && ~isinf(cfg.checksize) Error in ==> ft_volumedownsample at 158 cfg = ft_checkconfig(cfg, 'trackconfig', 'off', 'checksize', 'yes'); Error in ==> ft_sourceplot at 307 data = ft_volumedownsample(tmpcfg, data); -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.muesch at uke.uni-hamburg.de Mon Sep 19 14:24:21 2011 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Mon, 19 Sep 2011 14:24:21 +0200 Subject: [FieldTrip] interaction within-subject indepsamplesT In-Reply-To: <008d01cc737e$f6192ba0$e24b82e0$@maris@donders.ru.nl> References: <1238529C-1B93-4BC9-B625-B16991718014@uke.uni-hamburg.de> <008d01cc737e$f6192ba0$e24b82e0$@maris@donders.ru.nl> Message-ID: Dear Eric, Thank you very much for your answer. I was afraid that this was the case. Best, Kathrin Am 15.09.2011 um 10:10 schrieb Eric Maris: > Dear Kathrin, > >> I need your advice on how to correctly test the interaction effects in a > 2x2 >> within-subject design with cluster-based randomization tests. I have two >> factors A and B with the levels a1/a2 and b1/b2. In addition, the number > of >> trials in A are about twice as much as in B. >> >> The procedure would be totally clear in a between-subject design (as in a >> previous post on the list: >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) > > This post is about a WITHIN-subjects design. > >> because I could easily compute the differences of the factor levels >> A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the >> differences. However, since I have to run the statistics across trials and > not >> subjects I have independent samples and not dependent samples. > > So, you have a between-trials design. > > If it is >> possible at all, how can I calculate the differences A_diff and B_diff > across >> trials? Is it a problem that the number of trials are not equal? > > This is not possible. Permutation tests cannot be used for testing > interactions in a multi-factorial between-subjects/trials design. Michael > Wibral has a post in which he refers to a nice statistics paper on the > issue. > > A proxy that is possible (but not statistically sound) is to perform two > statistical tests of the first factor, once at the first level of second > factor and once at the second level. > > > Best, > > Eric Maris > > > > > > > > >> >> Any help is appreciated! >> >> Best, >> Kathrin >> >> _____________________________________ >> Kathrin Müsch >> >> Dept. of Neurophysiology and Pathophysiology >> University Medical Center Hamburg-Eppendorf >> Martinistr. 52 >> 20246 Hamburg >> Germany >> Phone: +49-40-7410-54680 >> Fax: +49-40-7410-57752 >> E-Mail: k.muesch at uke.uni-hamburg.de >> _____________________________________ >> >> >> -- >> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und >> Genossenschaftsregister sowie das Unternehmensregister (EHUG): >> >> Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen >> Rechts; Gerichtsstand: Hamburg >> >> Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. > Alexander >> Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus >> >> >> _______________________________________________ >> 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 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From politzerahless at gmail.com Mon Sep 19 16:43:15 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 19 Sep 2011 09:43:15 -0500 Subject: [FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics Message-ID: Jörn, Thanks lot for this information. I tried specifying cfg.layout and got a new error message: ??? Error using ==> ft_neighbourselection at 130 Sensor distance is measured in an unknown unit type Error in ==> statistics_wrapper at 241 cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); Error in ==> ft_timelockstatistics at 123 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); (I get the same message when trying to run neighbours=ft_neighbourselection(cfg,data) with that layout file specified.) The layout file I was using is based directly on EEG1010.lay which is included in fieldtrip, and it works fine when I use it for topoplotting and multiplotting, so I'm not sure why it's causing errors when fed to ft_neighbourselection. As for the version, I actually am using the most recent version (which I downloaded yesterday before trying to run cluster statistics, and updated my path accordingly), but still getting these errors. The code I've been trying to run, though, is based on the sample code on the wiki page http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock, which may be out of date. Is there perhaps anyone on the list who has run cluster statistics on EEG data and would be willing to share a sample of their code? Best, Steve > Message: 1 > Date: Mon, 19 Sep 2011 09:12:32 +0200 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Problem with EEG channels in > ft_neighborselection when running cluster statistics > Message-ID: <4E76EB60.9080801 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hey Stephen, > > You need to specify the position of your electrodes, which are mostly > stored in an 'elec' structure. If you do not have that available, you > can circumvent the problem by defining a cfg.layout. In that case, > neighbouring sensors will be selected according to how they are placed > in that layout-file you specify. That's not 100% correct of course, but > at least an estimate how the sensors are positioned (note that a layout > has only 2D coordinates). For example, you could use cfg.layout = > 'EEG1010.lay' as a start. > > Anyway, could you try using a more recent version of FieldTrip? A few > months ago, we changed the way the neighbourselection works (actually, > you have to call cfg.neighbours = ft_neighbourselection manually, now). > You can then also check with cfg.feedback = 'yes' whether the > neighbourselection looks alright to you (that's the same as calling > ft_neighbourplot) > > Hope it helps! Best regards, > J?rn > > > > On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote: > > When attempting to run cluster statistics on my EEG data (originally > > from Neuroscan .CNT, then processed in EEGLAB and finally imported to > > fieldtrip) using ft_timelockstatistics(), I receive the following > > error message: > > > > ??? Error using ==> ft_neighbourselection at 114 > > Did not find gradiometer or electrode information. > > > > Error in ==> statistics_wrapper at 241 > > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > > > Error in ==> ft_timelockstatistics at 123 > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > This seems to be because when I use cfg.channel = {'EEG'}; with my > > data, the channel information (the variable "sens" used in > > ft_neighbourselection) consists only of the list of channel labels: > > > > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} > > > > On the other hand, when I run timelockstatistics on the sample data > > from the wiki, "sens" includes much more information: > > > > sens = > > > > pnt: [151x3 double] > > ori: [356x3 double] > > tra: [184x356 double] > > label: {151x1 cell} > > unit: 'cm' > > > > I think most of that extra information is planar gradient data (i.e., > > it comes from GA_FIC.grad). Since my data are EEG data, I assume it > > wouldn't make sense to use ft_megplanar on them. So, assuming that I > > need to get the extra channel location information into my EEG data, > > does anyone have any ideas on how to do that? > > > > Best, > > Steve Politzer-Ahles > > > > -- > > Stephen Politzer-Ahles > > University of Kansas > > Linguistics Department > > http://www.linguistics.ku.edu/ > > > > > > _______________________________________________ > > 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 > > 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/20110919/3fdfbedd/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 25 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Sep 19 17:13:53 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 19 Sep 2011 17:13:53 +0200 Subject: [FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics In-Reply-To: References: Message-ID: <4E775C31.7050305@donders.ru.nl> Hey Stephen, please check your FT path. You are definitely not using a recent FT version, because the line you quoted on statistics_wrapper does not exist anymore. You can verify your path by typing in Matlab 'which ft_defaults' or 'which ft_timelockstatistics' (without the quotes). Due to recent changes, it might additionally help to read these two FAQs: http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors http://fieldtrip.fcdonders.nl/faq/how_does_ft_neighbourselection_work Anyway, the tutorial wiki page is indeed out of date, as the neighbourselection is not included correctly anymore. I'm gonna fix this :) The only thing which you need to add is cfg.neighbours=ft_neighbourselection(cfg, [...]) before calling ft_timelockstatistics. That's all that changed. Best regards, Jörn On 9/19/2011 4:43 PM, Stephen Politzer-Ahles wrote: > Jörn, > > Thanks lot for this information. I tried specifying cfg.layout and got > a new error message: > > ??? Error using ==> ft_neighbourselection at 130 > Sensor distance is measured in an unknown unit type > > Error in ==> statistics_wrapper at 241 > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > Error in ==> ft_timelockstatistics at 123 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > (I get the same message when trying to run > neighbours=ft_neighbourselection(cfg,data) with that layout file > specified.) The layout file I was using is based directly on > EEG1010.lay which is included in fieldtrip, and it works fine when I > use it for topoplotting and multiplotting, so I'm not sure why it's > causing errors when fed to ft_neighbourselection. > > As for the version, I actually am using the most recent version (which > I downloaded yesterday before trying to run cluster statistics, and > updated my path accordingly), but still getting these errors. The code > I've been trying to run, though, is based on the sample code on the > wiki page > http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock, > which may be out of date. > > Is there perhaps anyone on the list who has run cluster statistics on > EEG data and would be willing to share a sample of their code? > > Best, > Steve > > Message: 1 > Date: Mon, 19 Sep 2011 09:12:32 +0200 > From: "J?rn M. Horschig" > > To: Email discussion list for the FieldTrip project > > > Subject: Re: [FieldTrip] Problem with EEG channels in > ft_neighborselection when running cluster statistics > Message-ID: <4E76EB60.9080801 at donders.ru.nl > > > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hey Stephen, > > You need to specify the position of your electrodes, which are mostly > stored in an 'elec' structure. If you do not have that available, you > can circumvent the problem by defining a cfg.layout. In that case, > neighbouring sensors will be selected according to how they are placed > in that layout-file you specify. That's not 100% correct of > course, but > at least an estimate how the sensors are positioned (note that a > layout > has only 2D coordinates). For example, you could use cfg.layout = > 'EEG1010.lay' as a start. > > Anyway, could you try using a more recent version of FieldTrip? A few > months ago, we changed the way the neighbourselection works (actually, > you have to call cfg.neighbours = ft_neighbourselection manually, > now). > You can then also check with cfg.feedback = 'yes' whether the > neighbourselection looks alright to you (that's the same as calling > ft_neighbourplot) > > Hope it helps! Best regards, > J?rn > > > > On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote: > > When attempting to run cluster statistics on my EEG data (originally > > from Neuroscan .CNT, then processed in EEGLAB and finally > imported to > > fieldtrip) using ft_timelockstatistics(), I receive the following > > error message: > > > > ??? Error using ==> ft_neighbourselection at 114 > > Did not find gradiometer or electrode information. > > > > Error in ==> statistics_wrapper at 241 > > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > > > Error in ==> ft_timelockstatistics at 123 > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > This seems to be because when I use cfg.channel = {'EEG'}; with my > > data, the channel information (the variable "sens" used in > > ft_neighbourselection) consists only of the list of channel labels: > > > > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} > > > > On the other hand, when I run timelockstatistics on the sample data > > from the wiki, "sens" includes much more information: > > > > sens = > > > > pnt: [151x3 double] > > ori: [356x3 double] > > tra: [184x356 double] > > label: {151x1 cell} > > unit: 'cm' > > > > I think most of that extra information is planar gradient data > (i.e., > > it comes from GA_FIC.grad). Since my data are EEG data, I assume it > > wouldn't make sense to use ft_megplanar on them. So, assuming that I > > need to get the extra channel location information into my EEG data, > > does anyone have any ideas on how to do that? > > > > Best, > > Steve Politzer-Ahles > > > > -- > > Stephen Politzer-Ahles > > University of Kansas > > Linguistics Department > > http://www.linguistics.ku.edu/ > > > > > > _______________________________________________ > > 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 > > 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: > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 25 > ***************************************** > > > > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > > > _______________________________________________ > 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 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 sguillor at brandeis.edu Mon Sep 19 22:34:39 2011 From: sguillor at brandeis.edu (Sylvia Guillory) Date: Mon, 19 Sep 2011 16:34:39 -0400 Subject: [FieldTrip] Time Frequency Analysis and padding Message-ID: Dear FieldTrip Community, I have a question regarding the ft_freqanalysis function. I acquired EEG data in a paradigm where each condition varied in length. For instance, the memory retention period was 600ms in one condition and 900ms in another condition. I want to perform time-frequency analysis using morlet wavelets. My question is that if my epochs are different lengths, would I need to set the cgf.pad parameter to pad the 600ms condition by 300ms so that they are the same length or is it recommend that when I segment the data that I produce longer epochs for my time of interest in the 600ms condition? Thank you for your time. -Sylvia -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Sep 20 09:57:37 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 20 Sep 2011 09:57:37 +0200 Subject: [FieldTrip] Time Frequency Analysis and padding In-Reply-To: References: Message-ID: Hi Sylvia, You can do both. Note that in specifying the cfg.pad parameter, you need to give the length of the trial including the padding, so in your example it should be >= 0.9. The consequence of the padding will be that you can still estimate the TF-map at latencies > 0.6 s, but note that thiswill be computed from fewer observations than the power at lower latencies. Best, Jan-mathijs On Sep 19, 2011, at 10:34 PM, Sylvia Guillory wrote: > Dear FieldTrip Community, > > I have a question regarding the ft_freqanalysis function. I acquired EEG data in a paradigm where each condition varied in length. For instance, the memory retention period was 600ms in one condition and 900ms in another condition. I want to perform time-frequency analysis using morlet wavelets. My question is that if my epochs are different lengths, would I need to set the cgf.pad parameter to pad the 600ms condition by 300ms so that they are the same length or is it recommend that when I segment the data that I produce longer epochs for my time of interest in the 600ms condition? Thank you for your time. > > -Sylvia > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Tue Sep 20 12:29:58 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Tue, 20 Sep 2011 12:29:58 +0200 (CEST) Subject: [FieldTrip] Fwd: [Fwd: Yum & rpm code dependencies for OpenMEEG] In-Reply-To: <1580753422.1324605.1316514594866.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <1034464623.1324607.1316514598348.JavaMail.root@draco.zimbra.ru.nl> Hi Steve and Alexandre Since this topic might be of interest for a bigger audience I took the liberty of forwarding it to the official discussion list. The pipeline to run the OpenMEEG forward solver is quite standard in FieldTrip. We have put effort in making things as general as possible. In principle the same pipeline can be used to generate other forward solutions. In your case, you have the mesh from Freesurfer and you want to generate a 'volume conductor structure', which will be fed to the ft_compute_leadfield function. The function to generate the vol structure is ft_prepare_headmodel. In FieldTrip code: % this is the FreeSurfer surface bnd = ft_read_headshape('filename'); % this generates a 'vol' structure (one boundary) cfg=[]; cfg.method = 'openmeeg'; cfg.geom = bnd; cfg.conductivity = 1; vol = ft_prepare_headmodel(cfg); Assuming you know the positions of your sensors, the next step will be: [vol,sens]=ft_prepare_vol_sens(vol,sens); % this makes the vol and the elec structure compatible % this generates a grid of source points for your forward solution cfg = []; cfg.pos = pos; % the positions of the dipoles gridfwd = ft_prepare_sourcemodel(cfg,vol,sens); % this calculates the lead fields cfg=[]; cfg.channel = 'all'; cfg.vol = vol; cfg.grid = gridfwd; cfg.elec = sens; % use cfg.grad for MEG data gridfwd = ft_prepare_leadfield(cfg); Take care that dipoles, electrodes and surfaces are expressed in the same coordinates system (and coregistered). Moreover you should know that some surface triangulations work better than others for a BEM method. Here I am implicitly assuming that you have one single boundary (must be a closed surface for BEM) and that the surface is a smooth rendering of the inner skull. I hope this helps Best regards, Cristiano ----- "Alexandre Gramfort" schreef: > Van: "Alexandre Gramfort" > Aan: sdeiss at ucsd.edu > Cc: "c micheli" > Verzonden: Maandag 19 september 2011 23:59:23 > Onderwerp: Re: [Fwd: Yum & rpm code dependencies for OpenMEEG] > > Hello steve, > > > I am trying to incorperate our intermediate results, which include > a > > freesurfer mesh, with OpenMEEG to get a new forward matrix to look > at. > > All I have to go on at the moment is the sample OpenMEEG script. >  But I > > think that leaves out a lot of the cfg fields that I have to specify > after > > looking at ft_prepare_bemmodel and ft_prepare_mesh that call > OpenMEEG in > > FieldTrip.  If I am right, is there an example script for doing > OpenMEEG > > with real head data as opposed to the sperical model? > > I am afraid not but there should be an example of forward modeling on > the wiki > and the api should be the same. > > maybe cristiano in CC knows? > > Alex > > > The information in this e-mail is intended only for the person to whom > it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you > in error > but does not contain patient information, please contact the sender > and properly > dispose of the e-mail. From ekanal at cmu.edu Tue Sep 20 20:28:58 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 20 Sep 2011 14:28:58 -0400 Subject: [FieldTrip] source localization difficulties Message-ID: <7ADAEFF1-98AE-465D-B6A0-486AFF8857A7@cmu.edu> Hello folks - I'm trying to use source localization on a number of datasets, and I'm finding the FT functions confusing. Firstly, and most problematic, examining the same MRI data using `ft_read_mri` + `ft_volumerealign` and the tkmedit tool that comes with FreeSurfer seems to show two completely different brains. I'm unable to locate landmarks in the FT browser that I can see in the tkmedit window, and vice versa. The data isn't simply flipped; it looks that each slice is different. Why would this be the case? Secondly, in an attempt to coregister the MRI and MEG data, I used `ft_determine_coordsys`, which simply opened a window with a picture of three axes (see attached image "ft_determine_coordsys.png"). Shouldn't there be image data overlaid on the axes? Lastly, I've already segmented and coregistered the MRI and MEG data using FreeSurfer. Is there a way to simply load this data into FieldTrip and get right to plotting the data? Thanks! Elli Kanal -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 From politzerahless at gmail.com Tue Sep 20 20:58:03 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 20 Sep 2011 13:58:03 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 10, Issue 27 In-Reply-To: References: Message-ID: Jorn, Thanks a lot for your assistance. It turns out I had in fact updated to a version that was not the most recent; I've now updated my version to the most recent one and eventually I was able to run the cluster statistics successfully. I have one [hopefully final!] very minor question... when I plot the results of the cluster test, the time windows with significant clusters show up correctly (like in the samples on the wiki, the significant channels are highlighted in those time windows). But in the time windows where there are no significant clusters, for some reason all channels are highlighted--this happens with both my own data and when I try plotting the sample data from the wiki. While plotting, I checked "neg_int" and didn't see any problems (i.e., in the nonsignificant time windows neg_int was all zeroes), so I'm not sure why channels are getting highlighted there. Like I said, this is not a major problem. But if anyone has any ideas why this might happen, I would greatly appreciate it. (And again, thanks a lot to Jorn for all your help so far!) Best, Steve Message: 1 > Date: Mon, 19 Sep 2011 17:13:53 +0200 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Problem with EEG channels in > ft_neighborselection when running cluster statistics > Message-ID: <4E775C31.7050305 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hey Stephen, > > please check your FT path. You are definitely not using a recent FT > version, because the line you quoted on statistics_wrapper does not > exist anymore. You can verify your path by typing in Matlab 'which > ft_defaults' or 'which ft_timelockstatistics' (without the quotes). > > Due to recent changes, it might additionally help to read these two FAQs: > http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors > http://fieldtrip.fcdonders.nl/faq/how_does_ft_neighbourselection_work > > Anyway, the tutorial wiki page is indeed out of date, as the > neighbourselection is not included correctly anymore. I'm gonna fix this > :) The only thing which you need to add is > cfg.neighbours=ft_neighbourselection(cfg, [...]) before calling > ft_timelockstatistics. That's all that changed. > > Best regards, > J?rn > > > On 9/19/2011 4:43 PM, Stephen Politzer-Ahles wrote: > > J?rn, > > > > Thanks lot for this information. I tried specifying cfg.layout and got > > a new error message: > > > > ??? Error using ==> ft_neighbourselection at 130 > > Sensor distance is measured in an unknown unit type > > > > Error in ==> statistics_wrapper at 241 > > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > > > Error in ==> ft_timelockstatistics at 123 > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > > > (I get the same message when trying to run > > neighbours=ft_neighbourselection(cfg,data) with that layout file > > specified.) The layout file I was using is based directly on > > EEG1010.lay which is included in fieldtrip, and it works fine when I > > use it for topoplotting and multiplotting, so I'm not sure why it's > > causing errors when fed to ft_neighbourselection. > > > > As for the version, I actually am using the most recent version (which > > I downloaded yesterday before trying to run cluster statistics, and > > updated my path accordingly), but still getting these errors. The code > > I've been trying to run, though, is based on the sample code on the > > wiki page > > http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock, > > which may be out of date. > > > > Is there perhaps anyone on the list who has run cluster statistics on > > EEG data and would be willing to share a sample of their code? > > > > Best, > > Steve > > > > Message: 1 > > Date: Mon, 19 Sep 2011 09:12:32 +0200 > > From: "J?rn M. Horschig" > > > > To: Email discussion list for the FieldTrip project > > > > > Subject: Re: [FieldTrip] Problem with EEG channels in > > ft_neighborselection when running cluster statistics > > Message-ID: <4E76EB60.9080801 at donders.ru.nl > > > > > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > > > Hey Stephen, > > > > You need to specify the position of your electrodes, which are mostly > > stored in an 'elec' structure. If you do not have that available, you > > can circumvent the problem by defining a cfg.layout. In that case, > > neighbouring sensors will be selected according to how they are > placed > > in that layout-file you specify. That's not 100% correct of > > course, but > > at least an estimate how the sensors are positioned (note that a > > layout > > has only 2D coordinates). For example, you could use cfg.layout = > > 'EEG1010.lay' as a start. > > > > Anyway, could you try using a more recent version of FieldTrip? A few > > months ago, we changed the way the neighbourselection works > (actually, > > you have to call cfg.neighbours = ft_neighbourselection manually, > > now). > > You can then also check with cfg.feedback = 'yes' whether the > > neighbourselection looks alright to you (that's the same as calling > > ft_neighbourplot) > > > > Hope it helps! Best regards, > > J?rn > > > > > > > > On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote: > > > When attempting to run cluster statistics on my EEG data > (originally > > > from Neuroscan .CNT, then processed in EEGLAB and finally > > imported to > > > fieldtrip) using ft_timelockstatistics(), I receive the following > > > error message: > > > > > > ??? Error using ==> ft_neighbourselection at 114 > > > Did not find gradiometer or electrode information. > > > > > > Error in ==> statistics_wrapper at 241 > > > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > > > > > Error in ==> ft_timelockstatistics at 123 > > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > > > This seems to be because when I use cfg.channel = {'EEG'}; with my > > > data, the channel information (the variable "sens" used in > > > ft_neighbourselection) consists only of the list of channel labels: > > > > > > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} > > > > > > On the other hand, when I run timelockstatistics on the sample data > > > from the wiki, "sens" includes much more information: > > > > > > sens = > > > > > > pnt: [151x3 double] > > > ori: [356x3 double] > > > tra: [184x356 double] > > > label: {151x1 cell} > > > unit: 'cm' > > > > > > I think most of that extra information is planar gradient data > > (i.e., > > > it comes from GA_FIC.grad). Since my data are EEG data, I assume it > > > wouldn't make sense to use ft_megplanar on them. So, assuming that > I > > > need to get the extra channel location information into my EEG > data, > > > does anyone have any ideas on how to do that? > > > > > > Best, > > > Steve Politzer-Ahles > > > > > > -- > > > Stephen Politzer-Ahles > > > University of Kansas > > > Linguistics Department > > > http://www.linguistics.ku.edu/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Sep 21 09:19:15 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 21 Sep 2011 09:19:15 +0200 Subject: [FieldTrip] source localization difficulties In-Reply-To: <7ADAEFF1-98AE-465D-B6A0-486AFF8857A7@cmu.edu> References: <7ADAEFF1-98AE-465D-B6A0-486AFF8857A7@cmu.edu> Message-ID: <75EC3F25-B486-4F52-8A0F-B83AEA0E19AA@donders.ru.nl> Hi Elli, > Firstly, and most problematic, examining the same MRI data using `ft_read_mri` + `ft_volumerealign` and the tkmedit tool that comes with FreeSurfer seems to show two completely different brains. I'm unable to locate landmarks in the FT browser that I can see in the tkmedit window, and vice versa. The data isn't simply flipped; it looks that each slice is different. Why would this be the case? ft_read_mri reads in the raw MRI-file(s) that you specified (e.g. the DICOM-slices) and stacks them in the right order. When displaying the data in ft_volumerealign, no magic is performed and you will just see the data as it is stored in the 3D-volume. Nothing more, nothing less. Did you apply any additional processing steps before displaying it with freesurfer? It is hard for me to judge whether something, and if so, what is going wrong here. > > Secondly, in an attempt to coregister the MRI and MEG data, I used `ft_determine_coordsys`, which simply opened a window with a picture of three axes (see attached image "ft_determine_coordsys.png"). Shouldn't there be image data overlaid on the axes? > There's no figure attached in the mail I got. I would indeed expect to see 3 axes and three intersecting orthogonal slices with anatomical data. That is, if the call to ft_determine_coordsys was ft_determine_coordsys([],mri). Note that this function is just intended to check whether the coordinate system attached to the input data (mri, sensor positions, volume conduction model of the head, source dipole positions etc.) is as expected, or to assign the coordinate system, if you provide some input as to how to interpret the 3 cardinal axes. In order to check whether the co-registration went OK I would -co-register the MRI to the coordinate system in which the meg sensors are expressed -segment the MRI (these previous 2 steps can be done in freesurfer -create a volume conduction model (let's call it 'vol') of the head (e.g. by calling ft_prepare_singleshell, or even better: call ft_prepare_headmodel with cfg.method = 'singleshell') -check the co-registration: ft_plot_sens(data.grad);hold on;ft_plot_vol(vol), this should show the brain surface and the sensors more or less properly aligned. > Lastly, I've already segmented and coregistered the MRI and MEG data using FreeSurfer. Is there a way to simply load this data into FieldTrip and get right to plotting the data? > Yes, as far as I know ft_read_mri should know how to deal with *.mgz volumes. > Thanks! You're welcome. Jan-Mathijs > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekanal at cmu.edu Wed Sep 21 19:53:49 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Wed, 21 Sep 2011 13:53:49 -0400 Subject: [FieldTrip] source localization difficulties In-Reply-To: <75EC3F25-B486-4F52-8A0F-B83AEA0E19AA@donders.ru.nl> References: <7ADAEFF1-98AE-465D-B6A0-486AFF8857A7@cmu.edu> <75EC3F25-B486-4F52-8A0F-B83AEA0E19AA@donders.ru.nl> Message-ID: Thanks for the reply. I'll look into the read_mri issue a bit more myself and see if I can't uncover anything. >> >> Secondly, in an attempt to coregister the MRI and MEG data, I used `ft_determine_coordsys`, which simply opened a window with a picture of three axes (see attached image "ft_determine_coordsys.png"). Shouldn't there be image data overlaid on the axes? >> > > There's no figure attached in the mail I got. I would indeed expect to see 3 axes and three intersecting orthogonal slices with anatomical data. That is, if the call to ft_determine_coordsys was ft_determine_coordsys([],mri). Note that this function is just intended to check whether the coordinate system attached to the input data (mri, sensor positions, volume conduction model of the head, source dipole positions etc.) is as expected, or to assign the coordinate system, if you provide some input as to how to interpret the 3 cardinal axes. > In order to check whether the co-registration went OK I would > -co-register the MRI to the coordinate system in which the meg sensors are expressed > -segment the MRI (these previous 2 steps can be done in freesurfer > -create a volume conduction model (let's call it 'vol') of the head (e.g. by calling ft_prepare_singleshell, or even better: call ft_prepare_headmodel with cfg.method = 'singleshell') > -check the co-registration: ft_plot_sens(data.grad);hold on;ft_plot_vol(vol), this should show the brain surface and the sensors more or less properly aligned. Thanks for the overview. Apparently I didn't attach the image. Here it is. There's no slices, just the gridlines. My code is as follows: % read raw DICOM data mri = ft_read_mri('raw_data/19/mprage_512x416.5/MR.1.3.12.2.1107.5.2.32.35216.2011051711005397198638928'); mri_coord = ft_determine_coordsys(mri,'interactive','yes'); This may be a bug, as it does seem to work appropriately with data loaded from .mgz files, as well as DICOM data loaded into and then saved out of SPM. >> >> Lastly, I've already segmented and coregistered the MRI and MEG data using FreeSurfer. Is there a way to simply load this data into FieldTrip and get right to plotting the data? >> > > Yes, as far as I know ft_read_mri should know how to deal with *.mgz volumes. Thanks. So, to make sure I get it: to use freesurfer data, I want to load up the .mgz volumes in such a way that I'll end up replicating the output of `ft_volumesegment`. That means finding the .mgz files that represent the `segmentedmri.gray` and `segmentedmri.white` structures and constructing a new structure with the contents of those files. One last point of confusion: can I actually do MEG-MRI coregistration in FreeSurfer? I've been doing it in MNE, which saves the data to a *.fif file. Is there a way to use the output of the MNE coregistration tool in FieldTrip? I've placed a .mat file with the MNE coregistration data (loaded from the fif file using the MNE `fiff_load_mri` function) online [1] so you can see it's contents; maybe you can tell which field in the structure is the correct transformation matrix. Thanks! Elli [1] http://erikdev.com/mne_coregistration_data.zip -------------- next part -------------- A non-text attachment was scrubbed... Name: ft_determine_coordsys.png Type: image/png Size: 37741 bytes Desc: not available URL: From B.Mouthaan at neuro.umcn.nl Thu Sep 22 11:38:04 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 22 Sep 2011 11:38:04 +0200 Subject: [FieldTrip] loading brainvision data Message-ID: Hello Fieldtrippers, Hello Fieldtrippers, For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: ??? Error using ==> ft_read_header at 86 file or directory 'heineken000003-kop.eeg' does not exist Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 161 [trl, event] = feval(cfg.trialfun, cfg); Especially the directory error pops up frequently. I don't have a clue. My script is like this: cfg = []; cfg.datafile = 'heineken000003.eeg'; cfg.headerfile = 'heineken000003.vhdr' cfg.trialdef.eventtype = '?'; ft_definetrial(cfg) Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. Hope to hear from you! Brian Mouthaan Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 22 11:43:28 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 22 Sep 2011 11:43:28 +0200 Subject: [FieldTrip] loading brainvision data In-Reply-To: References: Message-ID: <7CF81136-AB84-40AB-9CF9-17DEA36F61A9@donders.ru.nl> Hi Brian, Are you in the correct directory? In other words is your 'pwd' such that you can see the files when you type 'dir'? BW, JM On Sep 22, 2011, at 11:38 AM, wrote: > Hello Fieldtrippers, > > Hello Fieldtrippers, > > For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. > However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. > > I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: > > > ??? Error using ==> ft_read_header at 86 > file or directory 'heineken000003-kop.eeg' does not exist > > Error in ==> trialfun_general at 55 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 161 > [trl, event] = feval(cfg.trialfun, cfg); > > > Especially the directory error pops up frequently. I don't have a clue. > My script is like this: > > cfg = []; > > cfg.datafile = 'heineken000003.eeg'; > cfg.headerfile = 'heineken000003.vhdr' > > cfg.trialdef.eventtype = '?'; > > ft_definetrial(cfg) > > > Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. > > Hope to hear from you! > > Brian Mouthaan > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > _______________________________________________ > 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 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 Thu Sep 22 11:48:11 2011 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Thu, 22 Sep 2011 11:48:11 +0200 Subject: [FieldTrip] loading brainvision data In-Reply-To: References: Message-ID: Hi Brian, Also I noticed in your error you have '-kop' in the file name but not in the dataset name. I've noticed that one can't change the file name of .eeg files (e.g. copying them to a new file name) and then still load them; you should stick to the original name as it was given when collected. Best, Johanna On 22 September 2011 11:38, wrote: > ** > > Hello Fieldtrippers, > > Hello Fieldtrippers, > > For an assignment during my internship at the Radboud UMC, I want try to > use fieldtrip for Beamforming at Auditory Evoked Potentials. > However the first step is unsuccesful. I try to load *.eeg , *.vhdr , > *.vmrk and *.avr files but I receive multiple errors. > > I also tried to use the example script in the tutorial. However this > doesn't work either. I get errors like: > > > ??? Error using ==> ft_read_header at 86 > file or directory 'heineken000003-kop.eeg' does not exist > > Error in ==> trialfun_general at 55 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 161 > [trl, event] = feval(cfg.trialfun, cfg); > > > Especially the directory error pops up frequently. I don't have a clue. > My script is like this: > > cfg = []; > > cfg.datafile = 'heineken000003.eeg'; > cfg.headerfile = 'heineken000003.vhdr' > > cfg.trialdef.eventtype = '?'; > > ft_definetrial(cfg) > > > Can anyone help me? FIY I lack experience of working with EEG and fieltrip, > but I work with Matlab regularly. > > Hope to hear from you! > > Brian Mouthaan > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het > handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial > Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > 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 Gregor.Volberg at psychologie.uni-regensburg.de Thu Sep 22 12:56:14 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Thu, 22 Sep 2011 12:56:14 +0200 Subject: [FieldTrip] Antw: Re: loading brainvision data In-Reply-To: References: Message-ID: <4E7B306E020000570000AC3A@gwsmtp1.uni-regensburg.de> Hi Brian, Johanna is correct - manually editing the file names in Brainvision eeg data often causes problems. This is because the original name of the EEG data file ('*.eeg') and the corresponding marker file ('*.vmrk') are both stored within the header file ('*.vhdr'), and these information won't change accordingly if you rename the files on your hard disk. If the original data name is not available to re-rename the files on your hard disk, you can see them in the *.vhdr-file (5th and 6th row of the vhdr file, just open it with a text editor). Alternatively, you can edit the file name information within the vhdr-file to match the file names on your hard disk. Best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Johanna Zumer 9/22/2011 11:48 AM >>> Hi Brian, Also I noticed in your error you have '-kop' in the file name but not in the dataset name. I've noticed that one can't change the file name of .eeg files (e.g. copying them to a new file name) and then still load them; you should stick to the original name as it was given when collected. Best, Johanna On 22 September 2011 11:38, wrote: Hello Fieldtrippers, Hello Fieldtrippers, For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: ??? Error using ==> ft_read_header at 86 file or directory 'heineken000003-kop.eeg' does not exist Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 161 [trl, event] = feval(cfg.trialfun, cfg); Especially the directory error pops up frequently. I don't have a clue. My script is like this: cfg = []; cfg.datafile = 'heineken000003.eeg'; cfg.headerfile = 'heineken000003.vhdr' cfg.trialdef.eventtype = '?'; ft_definetrial(cfg) Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. Hope to hear from you! Brian Mouthaan Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. _______________________________________________ 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 zizlsperger at gmail.com Thu Sep 22 14:49:14 2011 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Thu, 22 Sep 2011 14:49:14 +0200 Subject: [FieldTrip] ft_timelockgrandaverage Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2@gmail.com> Dear Fieldtrippers, in a within-subjects design I use ft_timelockgrandaverage with cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of the form: avg: [29x5000 double] var: [29x5000 double] time: [1x5000 double] dof: [29x5000 double] label: {29x1 cell} trial: [172x29x5000 double] dimord: 'rpt_chan_time' trialinfo: [172x28 double] cfg: [1x1 struct] I stick closely to the FieldTrip tutorial for cluster permutation statistics. I use the newest version of fieldtrip. After the grandaverage there is no more 'avg' in the structure, so I can not go on in the tutorial e.g. with: GA_XvsY = GA_X; GA_XvsY.avg = GA_X.avg - GA_Y.avg; New data is of structure: label: {29x1 cell} time: [1x5000 double] individual: [10x29x5000 double] dimord: 'subj_chan_time' cfg: [1x1 struct] Do I get the tutorial wrong or is it my data ? Thanks in advance Best Leopold From B.Mouthaan at neuro.umcn.nl Thu Sep 22 15:20:47 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 22 Sep 2011 15:20:47 +0200 Subject: [FieldTrip] Problem solved, Vol 10, Issue 30, directory issue References: Message-ID: Thank you all for your fast responses! The problem was solved. My directory set-up was incorrect. The data was unable to be loaded because I filed this in a subfolder. I place all data loose (not in a subfolder), in the same directory were I have my script. Again, thanks! -----Oorspronkelijk bericht----- Van: fieldtrip-bounces at donders.ru.nl namens fieldtrip-request at donders.ru.nl Verzonden: do 22-9-2011 12:00 Aan: fieldtrip at donders.ru.nl Onderwerp: fieldtrip Digest, Vol 10, Issue 30 Send fieldtrip mailing list submissions to fieldtrip at donders.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 donders.ru.nl You can reach the person managing the list at fieldtrip-owner at donders.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. loading brainvision data (B.Mouthaan at neuro.umcn.nl) 2. Re: loading brainvision data (jan-mathijs schoffelen) 3. Re: loading brainvision data (Johanna Zumer) ---------------------------------------------------------------------- Message: 1 Date: Thu, 22 Sep 2011 11:38:04 +0200 From: To: Subject: [FieldTrip] loading brainvision data Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hello Fieldtrippers, Hello Fieldtrippers, For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: ??? Error using ==> ft_read_header at 86 file or directory 'heineken000003-kop.eeg' does not exist Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 161 [trl, event] = feval(cfg.trialfun, cfg); Especially the directory error pops up frequently. I don't have a clue. My script is like this: cfg = []; cfg.datafile = 'heineken000003.eeg'; cfg.headerfile = 'heineken000003.vhdr' cfg.trialdef.eventtype = '?'; ft_definetrial(cfg) Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. Hope to hear from you! Brian Mouthaan Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Thu, 22 Sep 2011 11:43:28 +0200 From: jan-mathijs schoffelen To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading brainvision data Message-ID: <7CF81136-AB84-40AB-9CF9-17DEA36F61A9 at donders.ru.nl> Content-Type: text/plain; charset="us-ascii" Hi Brian, Are you in the correct directory? In other words is your 'pwd' such that you can see the files when you type 'dir'? BW, JM On Sep 22, 2011, at 11:38 AM, wrote: > Hello Fieldtrippers, > > Hello Fieldtrippers, > > For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. > However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. > > I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: > > > ??? Error using ==> ft_read_header at 86 > file or directory 'heineken000003-kop.eeg' does not exist > > Error in ==> trialfun_general at 55 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 161 > [trl, event] = feval(cfg.trialfun, cfg); > > > Especially the directory error pops up frequently. I don't have a clue. > My script is like this: > > cfg = []; > > cfg.datafile = 'heineken000003.eeg'; > cfg.headerfile = 'heineken000003.vhdr' > > cfg.trialdef.eventtype = '?'; > > ft_definetrial(cfg) > > > Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. > > Hope to hear from you! > > Brian Mouthaan > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Thu, 22 Sep 2011 11:48:11 +0200 From: Johanna Zumer To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading brainvision data Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi Brian, Also I noticed in your error you have '-kop' in the file name but not in the dataset name. I've noticed that one can't change the file name of .eeg files (e.g. copying them to a new file name) and then still load them; you should stick to the original name as it was given when collected. Best, Johanna On 22 September 2011 11:38, wrote: > ** > > Hello Fieldtrippers, > > Hello Fieldtrippers, > > For an assignment during my internship at the Radboud UMC, I want try to > use fieldtrip for Beamforming at Auditory Evoked Potentials. > However the first step is unsuccesful. I try to load *.eeg , *.vhdr , > *.vmrk and *.avr files but I receive multiple errors. > > I also tried to use the example script in the tutorial. However this > doesn't work either. I get errors like: > > > ??? Error using ==> ft_read_header at 86 > file or directory 'heineken000003-kop.eeg' does not exist > > Error in ==> trialfun_general at 55 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 161 > [trl, event] = feval(cfg.trialfun, cfg); > > > Especially the directory error pops up frequently. I don't have a clue. > My script is like this: > > cfg = []; > > cfg.datafile = 'heineken000003.eeg'; > cfg.headerfile = 'heineken000003.vhdr' > > cfg.trialdef.eventtype = '?'; > > ft_definetrial(cfg) > > > Can anyone help me? FIY I lack experience of working with EEG and fieltrip, > but I work with Matlab regularly. > > Hope to hear from you! > > Brian Mouthaan > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het > handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial > Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 10, Issue 30 ***************************************** Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 5858 bytes Desc: not available URL: From politzerahless at gmail.com Thu Sep 22 15:48:59 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 22 Sep 2011 08:48:59 -0500 Subject: [FieldTrip] fft_timelockgrandaverage Message-ID: Leopold, The way I dealt with this was by running ft_timelockgrandaverage() twice, once with keepindividual='yes' and once with keepindividual='no', and I saved the structures under different names (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I used the former one for cluster statistics, and the latter one (which has the .avg field) for plotting. Alternatively, for each grand average structure with individuals you could just create an .avg field by running the following: GA.avg = squeeze( mean(GA.individual,1) ); This should average across individuals. Best, Steve Politzer-Ahles > Message: 2 > Date: Thu, 22 Sep 2011 14:49:14 +0200 > From: Zizlsperger Leopold > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_timelockgrandaverage > Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Dear Fieldtrippers, > > in a within-subjects design I use ft_timelockgrandaverage with > cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of > the form: > > avg: [29x5000 double] > var: [29x5000 double] > time: [1x5000 double] > dof: [29x5000 double] > label: {29x1 cell} > trial: [172x29x5000 double] > dimord: 'rpt_chan_time' > trialinfo: [172x28 double] > cfg: [1x1 struct] > > I stick closely to the FieldTrip tutorial for cluster permutation > statistics. I use the newest version of fieldtrip. After the grandaverage > there is no more 'avg' in the structure, so I can not go on in the tutorial > e.g. with: > GA_XvsY = GA_X; > GA_XvsY.avg = GA_X.avg - GA_Y.avg; > > New data is of structure: > > label: {29x1 cell} > time: [1x5000 double] > individual: [10x29x5000 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > > Do I get the tutorial wrong or is it my data ? > Thanks in advance > Best > Leopold > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Thu Sep 22 16:08:25 2011 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 22 Sep 2011 15:08:25 +0100 Subject: [FieldTrip] cluster based permutation ANOVA? Message-ID: Dear All, I have been running the cluster-based analysis on my data, but have had to compare across my conditions in pairs. Is there a way to do a full factorial ANOVA-like cluster permutation test? (My design is 3x2) Thank you, zita -- Zita Patai DPhil Candidate, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ eva.patai at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From zizlsperger at gmail.com Thu Sep 22 16:23:50 2011 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Thu, 22 Sep 2011 16:23:50 +0200 Subject: [FieldTrip] fft_timelockgrandaverage In-Reply-To: References: Message-ID: <5A6F7FCE-AD83-47CE-8F34-B25CFE44CBB0@gmail.com> Dear Steve thanks for your reply. I think that solves my problem. (I tried that already, but always got "??? Improper index matrix reference" but looks like I have to look closer again into the rest of the script, seems to be a problem with the clusters themselves). Thanks for your help Best Leo On 22.09.2011, at 15:48, Stephen Politzer-Ahles wrote: > Leopold, > > The way I dealt with this was by running ft_timelockgrandaverage() twice, once with keepindividual='yes' and once with keepindividual='no', and I saved the structures under different names (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I used the former one for cluster statistics, and the latter one (which has the .avg field) for plotting. > > Alternatively, for each grand average structure with individuals you could just create an .avg field by running the following: > > GA.avg = squeeze( mean(GA.individual,1) ); > > This should average across individuals. > > Best, > Steve Politzer-Ahles > > > > Message: 2 > Date: Thu, 22 Sep 2011 14:49:14 +0200 > From: Zizlsperger Leopold > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_timelockgrandaverage > Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Dear Fieldtrippers, > > in a within-subjects design I use ft_timelockgrandaverage with cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of the form: > > avg: [29x5000 double] > var: [29x5000 double] > time: [1x5000 double] > dof: [29x5000 double] > label: {29x1 cell} > trial: [172x29x5000 double] > dimord: 'rpt_chan_time' > trialinfo: [172x28 double] > cfg: [1x1 struct] > > I stick closely to the FieldTrip tutorial for cluster permutation statistics. I use the newest version of fieldtrip. After the grandaverage there is no more 'avg' in the structure, so I can not go on in the tutorial e.g. with: > GA_XvsY = GA_X; > GA_XvsY.avg = GA_X.avg - GA_Y.avg; > > New data is of structure: > > label: {29x1 cell} > time: [1x5000 double] > individual: [10x29x5000 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > > Do I get the tutorial wrong or is it my data ? > Thanks in advance > Best > Leopold > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 22 21:07:58 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 22 Sep 2011 21:07:58 +0200 Subject: [FieldTrip] Fwd: Questions about coherence statistics for group analysis related to J.Neurosci. 2011 and Science 2005 papers References: Message-ID: Hi Sophie, I forward your message to the discussion list so that others may also participate in and benefit from the discussion > I have been reading your J.Neurosci. 2011 and Science 2005 papers and I also read Maris' paper about "nonparametric statistical testing of coherence differences" and looked at Fieldtrip tutorial and browsed the fieldtrip mailing list archive about coherence statistics. However, i still have question, and hope you will have time to answer. > > Here a short description of our EEG-EMG experiment : we have 10 subjects, and we compute the corticomuscular coherence for each > EEG (64 channels) and EMG (4 channels, 2 muscles per hand) channels combination. Subjects are performing a visuotracking task and each trial contained 4 conditions (3sec long) . One trial is ~12 sec long ) . > > First, about your Science 2005 paper : in the materials and methods part, you z-transformed the coherence values and performed a non-parametric permutation test to test the significance of the difference between the prestimulus and the stimulus interval. Did you perform the test on the z-transformed coherence values (variable 'r' on your paper) ? Yes. > Concerning the implementation in Fieldtrip while using the ft_freqstatistics function, is it the z-transformed coherence difference you compute in the statfun_xxx (and as output variable 's.stat' )? so as to perform the montecarlo permutation? We would like to compare each of the four conditions with the baseline period we defined in our experiment in the group subject. No. The computations implemented in FieldTrip's statfun_indepsamplesZcoh function are aimed at computing the Z-transformed coherence difference for a single subject, i.e. where the unit-of-observation is a trial. This is the method which is described in Eric Maris' J Neurosci Methods paper. In the other two papers you mention, we did statistical inference across subjects, i.e. each unit-of-observation was a subject. In order to achieve this, we computed for each subject the Z-transformed coherence by hand. These Z-coherence differences were tested against 0 using the montecarlo permutation approach. This is essentially the same as testing whether the distribution of coherence values across subjects is exchangeable across conditions. Practically this means that you need to do some work by hand: For each subject you need to do something like this: coh1 = ft_connectivityanalysis(cfg, freq1); % create coherence for subject X condition1 coh2 = ft_connectivityanalysis(cfg, freq2); %create coherence for subject X condition 2 coh1.cohspctrm = atanh(....) - atanh(...) etc -> compute the Z-transformed coherence difference between coh1.cohspctrm and coh2.cohspctrm; coh2.cohspctrm(:) = 0; cfg = []; cfg.method = 'montecarlo'; cfg.statistic = 'diff'; cfg.parameter = 'cohspctrm'; ... stat=ft_freqstatistics(cfg, coh1, coh2, ..., ..., ..., ) > Second, about your J.Neurosci. 2011 ,as we would like to do comparison between conditions (comparable to what you did on your paper, i assume). In this case, as we want to know if the effect is relevant in our group of subjects, and from what i understood from http://mailman.science.ru.nl/pipermail/fieldtrip/2009-May/002147.html one should not use the "indepsamplesZcoh " statistic function when calling ft_freqstatistics . Is a function available soon in Fieldtrip release ? Or what modification should i do on indepsamplesZcoh function? (from what i understood, this function is also computing a z-transformation on the data) See above. i think in principle you could also take a 2-step approach. In other words, you could use the statfun_indepsamplesZcoh, to compute per subject and contrast the Z-transformed coherence (so you will have to use ft_freqstatistics with single trial data). Next, you can use the output to ft_freqstatistics for all subjects as an input to a second call to ft_freqstatistics to do the statistical inference across subjects. This still needs an extra set of input data-structures containing 0's as dummy condition. This is for the same reason as above. > Another question about fieldtrip, it is preferable to input 2 grand average structure per condition as input in the ft_freqstatistics function? Or Should i input one structure per subject and per condition? ft_freqstatistics accepts multiple input arguments so there is no reason to pass the data through ft_freqgrandaverage first. > I have been very confused reading these papers and it is even harder to express my misunderstanding, so I hope my writing has been quite understandable.... > > Thank you in advance for any help with these issues. best wishes, Jan-Mathijs > > > Sophie Chen - Ph.D Student in Neuroscience > > Performance Motrice et Modélisation P2M > Institut des Sciences du Mouvement http://www.ism.univmed.fr/ > UMR 6233 CNRS - Université Aix-Marseille > Tel : +33 (0)4 91 17 22 06 > Office : D 2.32 > Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Thu Sep 22 21:14:50 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 22 Sep 2011 14:14:50 -0500 Subject: [FieldTrip] cluster based permutation ANOVA? Message-ID: Zita, It should be possible. You may find these messages helpful: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003113.html Best, Steve Politzer-Ahles Message: 2 > Date: Thu, 22 Sep 2011 15:08:25 +0100 > From: Zita Eva Patai > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] cluster based permutation ANOVA? > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear All, > > I have been running the cluster-based analysis on my data, but have had to > compare across my conditions in pairs. > > Is there a way to do a full factorial ANOVA-like cluster permutation test? > (My design is 3x2) > > Thank you, > zita > > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > eva.patai at psy.ox.ac.uk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 22 21:20:14 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 22 Sep 2011 21:20:14 +0200 Subject: [FieldTrip] fft_timelockgrandaverage In-Reply-To: References: Message-ID: <54CE4961-23E9-460B-8D7B-190E30E12E36@donders.ru.nl> Hi all, Thanks for noticing this discrepancy in the documentation. Indeed when the functionality was changed some time ago, it seems that the wiki was not updated to mirror these changes. But hey, the fun thing about a wiki is that everybody can change it. I hereby give permission to any of you to bring this page up-to-date again ;o). Best wishes, Jan-Mathijs On Sep 22, 2011, at 3:48 PM, Stephen Politzer-Ahles wrote: > Leopold, > > The way I dealt with this was by running ft_timelockgrandaverage() twice, once with keepindividual='yes' and once with keepindividual='no', and I saved the structures under different names (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I used the former one for cluster statistics, and the latter one (which has the .avg field) for plotting. > > Alternatively, for each grand average structure with individuals you could just create an .avg field by running the following: > > GA.avg = squeeze( mean(GA.individual,1) ); > > This should average across individuals. > > Best, > Steve Politzer-Ahles > > > > Message: 2 > Date: Thu, 22 Sep 2011 14:49:14 +0200 > From: Zizlsperger Leopold > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_timelockgrandaverage > Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Dear Fieldtrippers, > > in a within-subjects design I use ft_timelockgrandaverage with cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of the form: > > avg: [29x5000 double] > var: [29x5000 double] > time: [1x5000 double] > dof: [29x5000 double] > label: {29x1 cell} > trial: [172x29x5000 double] > dimord: 'rpt_chan_time' > trialinfo: [172x28 double] > cfg: [1x1 struct] > > I stick closely to the FieldTrip tutorial for cluster permutation statistics. I use the newest version of fieldtrip. After the grandaverage there is no more 'avg' in the structure, so I can not go on in the tutorial e.g. with: > GA_XvsY = GA_X; > GA_XvsY.avg = GA_X.avg - GA_Y.avg; > > New data is of structure: > > label: {29x1 cell} > time: [1x5000 double] > individual: [10x29x5000 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > > Do I get the tutorial wrong or is it my data ? > Thanks in advance > Best > Leopold > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.ketz at gmail.com Thu Sep 22 21:28:08 2011 From: nick.ketz at gmail.com (Nick Ketz) Date: Thu, 22 Sep 2011 13:28:08 -0600 Subject: [FieldTrip] distributed computing with montecarlo clusterstatistics Message-ID: <4E7B8C48.4020605@gmail.com> Hi list, thanks in advance for input that can be provided... I'm working with a large data set involving all pairwise WPLI estimates for a 128 surface electrode EEG experiment(8128 pairs), and I would like to perform a 2 condition, within-subject time-frequency (and space if that's possible) cluster analysis. Given this I have a large number of possible clusters, I have been getting on the order of 10,000 observed clusters(with a standard clusteralpha of 0.05), which then leads to a lengthy randomization test. What I'm wondering is if there's any way to run this in a distributed way(peer-to-peer, or perhaps in parallel)? I could imagine a single processor handling one iteration of the randomization test at a time, however when I looked at the statistics_montecarlo.m file I saw no quick way to implement this. I've explored some ideas with 'parfor' loops but I wanted to get the lists' input before I start rewriting statistics_monetcarlo.m. Has anyone approached this problem thus far, and if so are there any currently available resources? thanks again... Nick From jm.horschig at donders.ru.nl Fri Sep 23 09:39:10 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 23 Sep 2011 09:39:10 +0200 Subject: [FieldTrip] fft_timelockgrandaverage In-Reply-To: <5A6F7FCE-AD83-47CE-8F34-B25CFE44CBB0@gmail.com> References: <5A6F7FCE-AD83-47CE-8F34-B25CFE44CBB0@gmail.com> Message-ID: <4E7C379E.9040002@donders.ru.nl> Dear Leo, I suppose you are using Matlab2011a, am I right? If so, then please see this bug: http://bugzilla.fcdonders.nl/show_bug.cgi?id=918 Unfortunately, we do not have a running version of Matlab2011a, yet, so we cannot look into this issue to track it down :/ In case you do not have Matlab2011a, this might be a different story. Best, Jörn On 9/22/2011 4:23 PM, Zizlsperger Leopold wrote: > Dear Steve > thanks for your reply. I think that solves my problem. > (I tried that already, but always got > "??? Improper index matrix reference" > but looks like I have to look closer again into the rest of the > script, seems to be a problem with the clusters themselves). > Thanks for your help > Best > Leo > > > On 22.09.2011, at 15:48, Stephen Politzer-Ahles wrote: > >> Leopold, >> >> The way I dealt with this was by running ft_timelockgrandaverage() >> twice, once with keepindividual='yes' and once with >> keepindividual='no', and I saved the structures under different names >> (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I >> used the former one for cluster statistics, and the latter one (which >> has the .avg field) for plotting. >> >> Alternatively, for each grand average structure with individuals you >> could just create an .avg field by running the following: >> >> GA.avg = squeeze( mean(GA.individual,1) ); >> >> This should average across individuals. >> >> Best, >> Steve Politzer-Ahles >> >> >> >> Message: 2 >> Date: Thu, 22 Sep 2011 14:49:14 +0200 >> From: Zizlsperger Leopold > > >> To: fieldtrip at donders.ru.nl >> Subject: [FieldTrip] ft_timelockgrandaverage >> Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2 at gmail.com >> > >> Content-Type: text/plain; charset=us-ascii >> >> Dear Fieldtrippers, >> >> in a within-subjects design I use ft_timelockgrandaverage with >> cfg.keepindividual = 'yes' to average timelocked EEG data (10 >> subjects) of the form: >> >> avg: [29x5000 double] >> var: [29x5000 double] >> time: [1x5000 double] >> dof: [29x5000 double] >> label: {29x1 cell} >> trial: [172x29x5000 double] >> dimord: 'rpt_chan_time' >> trialinfo: [172x28 double] >> cfg: [1x1 struct] >> >> I stick closely to the FieldTrip tutorial for cluster permutation >> statistics. I use the newest version of fieldtrip. After the >> grandaverage there is no more 'avg' in the structure, so I can >> not go on in the tutorial e.g. with: >> GA_XvsY = GA_X; >> GA_XvsY.avg = GA_X.avg - GA_Y.avg; >> >> New data is of structure: >> >> label: {29x1 cell} >> time: [1x5000 double] >> individual: [10x29x5000 double] >> dimord: 'subj_chan_time' >> cfg: [1x1 struct] >> >> Do I get the tutorial wrong or is it my data ? >> Thanks in advance >> Best >> Leopold >> >> _______________________________________________ >> 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 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 zizlsperger at gmail.com Fri Sep 23 15:27:22 2011 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Fri, 23 Sep 2011 15:27:22 +0200 Subject: [FieldTrip] ft_timelockstatistics > ftFuncMem=memtic(); Message-ID: Dear All, as the ft_neighbourselection / ft_prepare_neighbours-scripts seem to changed in progress at the moment, I downloaded a today's version of FieldTrip. The new ft_timelockstatistics stops early: ??? Undefined function or variable 'memtic'. Error in ==> ft_timelockstatistics at 69 ftFuncMem = memtic(); If I code it out, I experience problems with cfg.design I have not had before. Any ideas ? Thanks in advance Best Leopold From ekanal at cmu.edu Fri Sep 23 16:18:22 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Fri, 23 Sep 2011 10:18:22 -0400 Subject: [FieldTrip] ft_freqstatistics (nonparametric) on TFR across multiple frequencies Message-ID: <2E373097-F5A9-4F46-9A6C-2F444EB6745A@cmu.edu> Hello folks - I'm comparing the TFRs of two conditions using `ft_freqstatistics`, and I was wondering if there's a simple way to examine the significance of an effect over a range of frequencies. The way I'm doing it now, cfg.frequency = [8 12]; cfg.method = 'montecarlo'; ... stat = ft_freqstatistics(cfg, high_tfr, low_tfr); `ft_freqstatistics` returns a test for each individual frequency (i.e., the `stat.prob`, `stat.mask`, etc are "NumChan x 5 x NumFreq" variables instead of "NumChan x 1 x NumFreq"). Thanks - Elli -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 From jan.schoffelen at donders.ru.nl Fri Sep 23 16:20:58 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 23 Sep 2011 16:20:58 +0200 Subject: [FieldTrip] code change Message-ID: <96F233D2-E00B-48EF-9B3A-80A5E62CFF2A@donders.ru.nl> Dear community, I just committed some quite extensive changes to the FieldTrip-code, which I would like to briefly make you aware of. As such, the changes are intended to not affect you at all, because there is no change in functionality involved. Yet, it may be that some code may be broken, even though I took extreme care in checking whether all was OK. Now, what's the change all about? You can read about this change here: http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described. As mentioned, my intention is that this change is fully transparent for all of you, and does not lead to different analysis results. The worst thing that can happen is that the code is temporarily broken. In that case, please don't hesitate to report this (as detailed as you can) and we will fix it a.s.a.p, of course with apologies in advance from our side. With kind regards from the FieldTrip headquarters, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekanal at cmu.edu Fri Sep 23 16:26:08 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Fri, 23 Sep 2011 10:26:08 -0400 Subject: [FieldTrip] ft_freqstatistics (nonparametric) on TFR across multiple frequencies In-Reply-To: <12815_1316787570_p8NEJT0H003236_2E373097-F5A9-4F46-9A6C-2F444EB6745A@cmu.edu> References: <12815_1316787570_p8NEJT0H003236_2E373097-F5A9-4F46-9A6C-2F444EB6745A@cmu.edu> Message-ID: Never mind, I just now realized there's an option in ft_freqstatistics "avgoverfreq". Hopefully this communique is useful to someone else who missed that in the docs :) Elli On Sep 23, 2011, at 10:18 AM, Kanal Eliezer wrote: > Hello folks - > > I'm comparing the TFRs of two conditions using `ft_freqstatistics`, and I was wondering if there's a simple way to examine the significance of an effect over a range of frequencies. The way I'm doing it now, > > cfg.frequency = [8 12]; > cfg.method = 'montecarlo'; > ... > stat = ft_freqstatistics(cfg, high_tfr, low_tfr); > > `ft_freqstatistics` returns a test for each individual frequency (i.e., the `stat.prob`, `stat.mask`, etc are "NumChan x 5 x NumFreq" variables instead of "NumChan x 1 x NumFreq"). Thanks - > > Elli > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mark.noordenbos at gmail.com Fri Sep 23 18:09:18 2011 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Fri, 23 Sep 2011 18:09:18 +0200 Subject: [FieldTrip] Filter settings (Fieldtrip vs Brainvision Analyzer) Message-ID: Dear all, I analyzed some data using Brainvision Analyzer and would like to re-analyze the same data using Fieldtrip. However, the final results are a bit different between Brainvision Analyzer and Fieldtrip. The main difference is because of differences in filtering of the data (without filtering the data is exactly the same). The filter in Fieldtrip seems to be much 'stricter' and as a consequence the amplitude is almost halved in the grandaverage! In Brainvision Analyzer I used the following filter setting: Butterworth Zero Phase Filters Low Cutoff: 1.0000 Hz, Time constant 0.1592s, 24 dB/oct High Cutoff: 30.0000 Hz, 24 dB/oct Notch Filter: --- In Fieldtrip I used the following filter settings cfg.lpfilter = 'yes'; cfg.hpfilter = 'yes'; cfg.lpfreq = 30; cfg.hpfreq = 1; cfg.lpfiltord = 6; cfg.hpfiltord = 6; cfg.lpfiltdir = 'twopass'; cfg.hpfiltdir = 'twopass'; Any suggestions for the Fieldtrip filter settings to resemble the Brainvision Analyzer filter settings as much as possible? Best, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fieldtripvsbva.jpg Type: image/jpeg Size: 26475 bytes Desc: not available URL: From luoj at mail.nih.gov Sat Sep 24 22:12:28 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Sat, 24 Sep 2011 16:12:28 -0400 Subject: [FieldTrip] creating new dataset Message-ID: Hi, If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). Thanks, Jessie From jm.horschig at donders.ru.nl Sun Sep 25 10:09:00 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Sun, 25 Sep 2011 10:09:00 +0200 Subject: [FieldTrip] creating new dataset In-Reply-To: References: Message-ID: <4E7EE19C.4040103@donders.ru.nl> Hi Jessie, not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: You can also exclude channels or channel groups using the following syntax {'all', '-POz', '-Fp1', -EOG'} From ft_preprocessing: If you are callingFT_PREPROCESSING with also the second input argument "data", then that should contain data that was already read from file in a previous call toFT_PREPROCESSING . In that case only the configuration options below apply. The channels that will be read and/or preprocessed are specified with cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), seeFT_CHANNELSELECTION for details You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. Hope this all helps to what you are up to! Best, Jörn On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > > If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). > > Thanks, > > Jessie > _______________________________________________ > 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 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 lwn_07 at yahoo.com.cn Sun Sep 25 13:42:00 2011 From: lwn_07 at yahoo.com.cn (=?utf-8?B?5p2O5Y2r5aic?=) Date: Sun, 25 Sep 2011 19:42:00 +0800 (CST) Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? Message-ID: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> Dear all,   Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity?                                                                                                            Weina -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Sep 25 17:36:05 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sun, 25 Sep 2011 17:36:05 +0200 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> Message-ID: <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> Hi Weina, Yes, granger causality results will for sure change when you use different montages. When you replace each measurement (what you call 'mono-montage') with that measurement minus the average across the whole recording array (what you call 'average montage') the amount with which signals can be explained in terms of their own and the other signals' past will change as well. This most likely leads to 'granger causality' estimates which just reflect spurious interactions. Best wishes, Jan-Mathijs On Sep 25, 2011, at 1:42 PM, 李卫娜 wrote: > Dear all, > Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity? > > Weina > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sun Sep 25 18:19:25 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 25 Sep 2011 11:19:25 -0500 Subject: [FieldTrip] Filter settings (Fieldtrip vs Brainvision Message-ID: Mark, I don't have an answer to your problem, but I have noticed a similar issue with data from Neuroscan (like your data, mine seems more attenuated by the Fieldtrip filter than the Neuroscan one; here is a comparison using a 30Hz low-pass in Fieldtrip with the default options, versus 30Hz in Neuroscan with zero phase shift and 12 dB/oct: http://img685.imageshack.us/img685/5717/fieldtrippreprocessing.png). I'd also be interested to hear if anyone on the list knows about what filter settings to adjust to replicate those settings. Best, Steve Politzer-Ahles > Message: 5 > Date: Fri, 23 Sep 2011 18:09:18 +0200 > From: Mark Noordenbos > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Filter settings (Fieldtrip vs Brainvision > Analyzer) > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear all, > > I analyzed some data using Brainvision Analyzer and would like to > re-analyze > the same data using Fieldtrip. However, the final results are a bit > different between Brainvision Analyzer and Fieldtrip. > The main difference is because of differences in filtering of the data > (without filtering the data is exactly the same). The filter in Fieldtrip > seems to be much 'stricter' and as a consequence the amplitude is almost > halved in the grandaverage! > > In Brainvision Analyzer I used the following filter setting: > > Butterworth Zero Phase Filters > Low Cutoff: 1.0000 Hz, Time constant 0.1592s, 24 dB/oct > High Cutoff: 30.0000 Hz, 24 dB/oct > Notch Filter: --- > > In Fieldtrip I used the following filter settings > > cfg.lpfilter = 'yes'; > cfg.hpfilter = 'yes'; > cfg.lpfreq = 30; > cfg.hpfreq = 1; > > cfg.lpfiltord = 6; > cfg.hpfiltord = 6; > > cfg.lpfiltdir = 'twopass'; > cfg.hpfiltdir = 'twopass'; > > Any suggestions for the Fieldtrip filter settings to resemble the > Brainvision Analyzer filter settings as much as possible? > > Best, > Mark > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110923/eccb307f/attachment.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: fieldtripvsbva.jpg > Type: image/jpeg > Size: 26475 bytes > Desc: not available > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110923/eccb307f/attachment.jpg > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 34 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwn_07 at yahoo.com.cn Sun Sep 25 19:48:24 2011 From: lwn_07 at yahoo.com.cn (lwn_07) Date: Mon, 26 Sep 2011 01:48:24 +0800 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> Message-ID: <396096E2-923B-48D7-9201-A041A4F22571@yahoo.com.cn> Thanks Jan-Mathijs. Does it mean if I selected my data segment from mono montage (reference to mastoid), i'd better calculate the granger causality in mono montage? Some paper selected Cz as reference, is that OK? Best regards. Weina 发自我的 iPad 在 2011-9-25,23:36,jan-mathijs schoffelen 写道: > Hi Weina, > > Yes, granger causality results will for sure change when you use different montages. When you replace each measurement (what you call 'mono-montage') with that measurement minus the average across the whole recording array (what you call 'average montage') the amount with which signals can be explained in terms of their own and the other signals' past will change as well. This most likely leads to 'granger causality' estimates which just reflect spurious interactions. > > Best wishes, > > Jan-Mathijs > > On Sep 25, 2011, at 1:42 PM, 李卫娜 wrote: > >> Dear all, >> Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity? >> >> Weina >> _______________________________________________ >> 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 > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwn_07 at yahoo.com.cn Sun Sep 25 19:41:01 2011 From: lwn_07 at yahoo.com.cn (lwn_07) Date: Mon, 26 Sep 2011 01:41:01 +0800 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> Message-ID: <89EA1B95-9876-42E4-9082-AAFB3AA79E7D@yahoo.com.cn> Thanks Jan-Mathijs. Does it mean if I selected my data segment from mono montage (reference to mastoid), i'd better calculate the granger causality in mono montage? Some paper selected Cz as reference, is that OK? Best regards. Weina 发自我的 iPad 在 2011-9-25,23:36,jan-mathijs schoffelen 写道: > Hi Weina, > > Yes, granger causality results will for sure change when you use different montages. When you replace each measurement (what you call 'mono-montage') with that measurement minus the average across the whole recording array (what you call 'average montage') the amount with which signals can be explained in terms of their own and the other signals' past will change as well. This most likely leads to 'granger causality' estimates which just reflect spurious interactions. > > Best wishes, > > J an-Mathijs > > On Sep 25, 2011, at 1:42 PM, 李卫娜 wrote: > >> Dear all, >> Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity? >> >> Weina >> _______________________________________________ >> 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 > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Sep 26 09:56:04 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 26 Sep 2011 09:56:04 +0200 Subject: [FieldTrip] ft_timelockstatistics > ftFuncMem=memtic(); In-Reply-To: References: Message-ID: Dear Leopold, The memtic()-function should be specified in a file in /utilities/memtic.m. This directory should be automatically added to your path by ft_defaults(), which is called by all main Fieldtrip functions. Could you let me know whether you see this file? If you do, could you explicitly run ft_defaults() and check whether 'which memtic' gives anything in return? (In short: this is an error in your path settings :) ) I cannot speculate on what your problems with cfg.design might be. Best, Eelke 2011/9/23 Zizlsperger Leopold : > Dear All, > as the ft_neighbourselection / ft_prepare_neighbours-scripts seem to changed in progress at the moment, I downloaded a today's version of FieldTrip. The new ft_timelockstatistics stops early: > > ??? Undefined function or variable 'memtic'. > Error in ==> ft_timelockstatistics at 69 > ftFuncMem   = memtic(); > > If I code it out, I experience problems with cfg.design I have not had before. > Any ideas ? > Thanks in advance > Best > Leopold > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From jm.horschig at donders.ru.nl Mon Sep 26 11:45:33 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 26 Sep 2011 11:45:33 +0200 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <396096E2-923B-48D7-9201-A041A4F22571@yahoo.com.cn> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> <396096E2-923B-48D7-9201-A041A4F22571@yahoo.com.cn> Message-ID: <4E8049BD.5060303@donders.ru.nl> Dear Weina, Basically, any montage will cause signal characteristics from the sensors used for re-referencing to show up in all other sensors. If you use a common average, the signal from any sensor will depend to some degree to any other sensor (because common average uses all sensors for rereferencing). If you use only Cz, you will obtain a high granger causality for any sensors to Cz. This would of course not reflect a real brain process, but is just the consequence of substracting the signal from Cz from all other sensors. Best would be to use a sensor that you will not include in computing granger causality (e.g. a mastoid, or choose Cz but then exclude this sensor for further analyses). Best, Jörn On 9/25/2011 7:48 PM, lwn_07 wrote: > Thanks Jan-Mathijs. Does it mean if I selected my data segment from > mono montage (reference to mastoid), i'd better calculate the granger > causality in mono montage? Some paper selected Cz as reference, is > that OK? > > Best regards. > Weina > > ???? iPad > > ? 2011-9-25,23:36,jan-mathijs schoffelen > ??: > >> Hi Weina, >> >> Yes, granger causality results will for sure change when you use >> different montages. When you replace each measurement (what you call >> 'mono-montage') with that measurement minus the average across the >> whole recording array (what you call 'average montage') the amount >> with which signals can be explained in terms of their own and the >> other signals' past will change as well. This most likely leads to >> 'granger causality' estimates which just reflect spurious interactions. >> >> Best wishes, >> >> Jan-Mathijs >> >> On Sep 25, 2011, at 1:42 PM, ??? wrote: >> >>> Dear all, >>> Is anyone knows about that wether different EEG motages (such as >>> mono-motage or average montage) have effect on the result of granger >>> connectivity? >>> >>> Weina >>> >>> _______________________________________________ >>> 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 >> 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 > > > _______________________________________________ > 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 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 Sep 26 14:22:56 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 26 Sep 2011 14:22:56 +0200 Subject: [FieldTrip] quick fieldtrip question In-Reply-To: <904336920.303800.1317039139308.JavaMail.root@monoceros.zimbra.ru.nl> References: <904336920.303800.1317039139308.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: Hi Tom, I'm forwarding my response, and your question, to the FieldTrip mailing list, so that anyone who in the future might wonder the same thing will benefit. BTW, if you're not subscribed to the list yet, you really should (see http://fieldtrip.fcdonders.nl/discussion_list for instructions). The easiest way to select channels to remove or retain is by using the cfg.channel option which is understood by ft_preprocessing: cfg = []; cfg.channel = {'chan1', 'chan2'}; % this will *keep* only those channels data = ft_preprocessing(cfg, data); or: cfg = []; cfg.channel = {'all', '-chan1', '-chan2'}; % this will *remove* those channels data = ft_preprocessing(cfg, data); For more information, type 'doc ft_channelselection' into Matlab, or see http://fieldtrip.fcdonders.nl/reference/ft_channelselection . Hope this helps! Best, Eelke 2011/9/26 Marshall, T.R. (Tom) : > Hi Eelke, > > So I have a very quick question about channel selection in fieldtrip. > > I want to plot a contrast of my tDCS and no-tDCS data. My problem is that I had to throw away a lot more channels in the tDCS condition than in the no-tDCS condition, so datasets comprise different channels. I spent a few minutes trying to write fiddly code to compare the entries in the 'labels' field of the data structure, but surely fieldtrip has some general purpose function just to keep some channels and throw away others? I can't find exactly this on the wiki... > > Hope you can help. Thanks in advance. > Tom > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > From t.marshall at fcdonders.ru.nl Mon Sep 26 14:58:57 2011 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Mon, 26 Sep 2011 14:58:57 +0200 (CEST) Subject: [FieldTrip] quick fieldtrip question In-Reply-To: <848633094.304972.1317041809855.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <930446316.305029.1317041937124.JavaMail.root@monoceros.zimbra.ru.nl> Thanks Eelke. This seems like what I want, but I can't seem to actually implement it. To provide a little more detail, what I currently have are two data sets on which I have performed frequency analysis. One of them has a bunch of channels missing that I had to throw out. Now I want to have a look at the difference between the two. Of course it only makes sense to do this for the channels that are common to both datasets. In order to do my subtraction, I have this: *** %find channels that exist in both datasets common_channels=tdcs_low{1}.label(ismember(tdcs_low{1}.label,notdcs_low{1}.label)); %throw away channels that are unique to the notdcs dataset cfg=[]; cfg.channels=common_channels; notdcs_fewer_channels{1}=ft_preprocessing(cfg,notdcs_low{1}); *** ...which gives the following error *** ??? Error using ==> ft_checkdata>freq2raw at 1583 this only works for dimord='rpt_chan_freq_time' Error in ==> ft_checkdata at 257 data = freq2raw(data); Error in ==> ft_preprocessing at 284 data = ft_checkdata(data, 'datatype', 'raw', 'hassampleinfo', 'yes'); *** In the above datasets, the 'dimord', looks like channels x frequencies x time. Not sure what 'rpt' stands for in the error message, nor why there should be a 4th dimension. Best, Tom ----- Original Message ----- From: "Eelke Spaak" To: "T.R. Marshall (Tom)" , "Email discussion list for the FieldTrip project" Sent: Monday, 26 September, 2011 2:22:56 PM Subject: Re: quick fieldtrip question Hi Tom, I'm forwarding my response, and your question, to the FieldTrip mailing list, so that anyone who in the future might wonder the same thing will benefit. BTW, if you're not subscribed to the list yet, you really should (see http://fieldtrip.fcdonders.nl/discussion_list for instructions). The easiest way to select channels to remove or retain is by using the cfg.channel option which is understood by ft_preprocessing: cfg = []; cfg.channel = {'chan1', 'chan2'}; % this will *keep* only those channels data = ft_preprocessing(cfg, data); or: cfg = []; cfg.channel = {'all', '-chan1', '-chan2'}; % this will *remove* those channels data = ft_preprocessing(cfg, data); For more information, type 'doc ft_channelselection' into Matlab, or see http://fieldtrip.fcdonders.nl/reference/ft_channelselection . Hope this helps! Best, Eelke 2011/9/26 Marshall, T.R. (Tom) : > Hi Eelke, > > So I have a very quick question about channel selection in fieldtrip. > > I want to plot a contrast of my tDCS and no-tDCS data. My problem is that I had to throw away a lot more channels in the tDCS condition than in the no-tDCS condition, so datasets comprise different channels. I spent a few minutes trying to write fiddly code to compare the entries in the 'labels' field of the data structure, but surely fieldtrip has some general purpose function just to keep some channels and throw away others? I can't find exactly this on the wiki... > > Hope you can help. Thanks in advance. > Tom > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands From luoj at mail.nih.gov Mon Sep 26 16:11:42 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Mon, 26 Sep 2011 10:11:42 -0400 Subject: [FieldTrip] creating new dataset In-Reply-To: <4E7EE19C.4040103@donders.ru.nl> References: , <4E7EE19C.4040103@donders.ru.nl> Message-ID: Thanks for your answer Jörn . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... Jessie ________________________________________ From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] Sent: Sunday, September 25, 2011 4:09 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] creating new dataset Hi Jessie, not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: You can also exclude channels or channel groups using the following syntax {'all', '-POz', '-Fp1', -EOG'} >From ft_preprocessing: If you are calling FT_PREPROCESSING with also the second input argument "data", then that should contain data that was already read from file in a previous call to FT_PREPROCESSING. In that case only the configuration options below apply. The channels that will be read and/or preprocessed are specified with cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), see FT_CHANNELSELECTION for details You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. Hope this all helps to what you are up to! Best, Jörn On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Hi, If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). Thanks, Jessie _______________________________________________ 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 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 jan.schoffelen at donders.ru.nl Mon Sep 26 16:26:14 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 26 Sep 2011 16:26:14 +0200 Subject: [FieldTrip] creating new dataset In-Reply-To: References: , <4E7EE19C.4040103@donders.ru.nl> Message-ID: <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> Hi Jessie, FieldTrip is not able to write back into the native 4D neuroimaging format. If you want to create a new dataset, you need to have a look at the software which is provided by the 4D neuroimaging company. Your requested functionality may either be a feature of one of the applications, or may be implemented in one of the command line utilities. You may want to look in the software documentation for this. Best wishes, Jan-Mathijs On Sep 26, 2011, at 4:11 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Thanks for your answer Jörn . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... > > Jessie > ________________________________________ > From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] > Sent: Sunday, September 25, 2011 4:09 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] creating new dataset > > Hi Jessie, > > not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: > > You can also exclude channels or channel groups using the following syntax > {'all', '-POz', '-Fp1', -EOG'} > > > > >> From ft_preprocessing: > > If you are calling FT_PREPROCESSING with also the second input argument > "data", then that should contain data that was already read from file in > a previous call to FT_PREPROCESSING. In that case only the configuration > options below apply. > > The channels that will be read and/or preprocessed are specified with > cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), > see FT_CHANNELSELECTION for details > > > You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. > > Hope this all helps to what you are up to! > Best, > Jörn > > On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > > Hi, > > If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). > > Thanks, > > Jessie > _______________________________________________ > 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 > > 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Mon Sep 26 16:59:07 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Mon, 26 Sep 2011 08:59:07 -0600 Subject: [FieldTrip] creating new dataset In-Reply-To: <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> References: , <4E7EE19C.4040103@donders.ru.nl> <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> Message-ID: <582930B5-8C7E-4578-8014-F30D36450B76@ucdenver.edu> Hi Jessie, If you wish to take a FieldTrip dataset back to the native 4D format, then it will not be trivial, but if you have the original data in 4D format, there is a potential solution in Eugene Kronberg's pdf4D matlab object code: http://biomag.wikidot.com/msi-matlab If you do not have the native 4D data, this will not work. Look at the duplicate and write_data_block methods. However, note that if you do duplicate the dataset, it will expect there to be as many channels in the new dataset as in the original. You would then have to delete those channels in the 4D MSI software using the deleter command. Or, alternatively, if you have a working copy of the MSI software, you can delete the channels in the original dataset within 4D, then use the duplicate method on that file, then write your data back to it using the write_data_block method. Feel free to contact me off list if you have questions. Best, Don On Sep 26, 2011, at 8:26 AM, jan-mathijs schoffelen wrote: Hi Jessie, FieldTrip is not able to write back into the native 4D neuroimaging format. If you want to create a new dataset, you need to have a look at the software which is provided by the 4D neuroimaging company. Your requested functionality may either be a feature of one of the applications, or may be implemented in one of the command line utilities. You may want to look in the software documentation for this. Best wishes, Jan-Mathijs On Sep 26, 2011, at 4:11 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Thanks for your answer Jörn . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... Jessie ________________________________________ From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] Sent: Sunday, September 25, 2011 4:09 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] creating new dataset Hi Jessie, not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: You can also exclude channels or channel groups using the following syntax {'all', '-POz', '-Fp1', -EOG'} >From ft_preprocessing: If you are calling FT_PREPROCESSING with also the second input argument "data", then that should contain data that was already read from file in a previous call to FT_PREPROCESSING. In that case only the configuration options below apply. The channels that will be read and/or preprocessed are specified with cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), see FT_CHANNELSELECTION for details You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. Hope this all helps to what you are up to! Best, Jörn On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Hi, If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). Thanks, Jessie _______________________________________________ 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 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University 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 eelke.spaak at donders.ru.nl Mon Sep 26 17:07:07 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 26 Sep 2011 17:07:07 +0200 Subject: [FieldTrip] quick fieldtrip question In-Reply-To: <930446316.305029.1317041937124.JavaMail.root@monoceros.zimbra.ru.nl> References: <848633094.304972.1317041809855.JavaMail.root@monoceros.zimbra.ru.nl> <930446316.305029.1317041937124.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: Hi Tom, ft_preprocessing will try to convert your data structure into raw data before applying any preprocessing (which includes channel selection). Since you are providing output of ft_freqanalysis ('freq structures') as input, this will fail if the dimensionality of the freq data indicates that this would not make sense. You'll probably want to have a look at the ft_selectdata function, which also supports selecting subregions of freq/timelock structures, rather than only raw data: goodchans = intersect(freq1.label, freq2.label); freq1 = ft_selectdata(freq1, 'channel', goodchans); freq2 = ft_selectdata(freq2, 'channel', goodchans); Note by the way the use of Matlab's builtin 'intersect' function, which you will probably also find useful :) If the ft_selectdata approach fails, you might also take a look at the low-level fieldtrip utility function 'match_str'. Good luck, Eelke 2011/9/26 Marshall, T.R. (Tom) : > Thanks Eelke. This seems like what I want, but I can't seem to actually implement it. > > To provide a little more detail, what I currently have are two data sets on which I have performed frequency analysis. One of them has a bunch of channels missing that I had to throw out. Now I want to have a look at the difference between the two. Of course it only makes sense to do this for the channels that are common to both datasets. > > In order to do my subtraction, I have this: > > *** > %find channels that exist in both datasets > common_channels=tdcs_low{1}.label(ismember(tdcs_low{1}.label,notdcs_low{1}.label)); > > %throw away channels that are unique to the notdcs dataset > cfg=[]; > cfg.channels=common_channels; > > notdcs_fewer_channels{1}=ft_preprocessing(cfg,notdcs_low{1}); > *** > > ...which gives the following error > > *** > ??? Error using ==> ft_checkdata>freq2raw at 1583 > this only works for dimord='rpt_chan_freq_time' > > Error in ==> ft_checkdata at 257 >        data = freq2raw(data); > > Error in ==> ft_preprocessing at 284 >  data = ft_checkdata(data, 'datatype', 'raw', 'hassampleinfo', 'yes'); > *** > > In the above datasets, the 'dimord', looks like channels x frequencies x time. Not sure what 'rpt' stands for in the error message, nor why there should be a 4th dimension. > > Best, > Tom > > ----- Original Message ----- > From: "Eelke Spaak" > To: "T.R. Marshall (Tom)" , "Email discussion list for the FieldTrip project" > Sent: Monday, 26 September, 2011 2:22:56 PM > Subject: Re: quick fieldtrip question > > Hi Tom, > > I'm forwarding my response, and your question, to the FieldTrip > mailing list, so that anyone who in the future might wonder the same > thing will benefit. BTW, if you're not subscribed to the list yet, you > really should (see http://fieldtrip.fcdonders.nl/discussion_list for > instructions). > > The easiest way to select channels to remove or retain is by using the > cfg.channel option which is understood by ft_preprocessing: > > cfg = []; > cfg.channel = {'chan1', 'chan2'}; % this will *keep* only those channels > data = ft_preprocessing(cfg, data); > > or: > > cfg = []; > cfg.channel = {'all', '-chan1', '-chan2'}; % this will *remove* those channels > data = ft_preprocessing(cfg, data); > > For more information, type 'doc ft_channelselection' into Matlab, or > see http://fieldtrip.fcdonders.nl/reference/ft_channelselection . > > Hope this helps! > > Best, > Eelke > > > 2011/9/26 Marshall, T.R. (Tom) : >> Hi Eelke, >> >> So I have a very quick question about channel selection in fieldtrip. >> >> I want to plot a contrast of my tDCS and no-tDCS data. My problem is that I had to throw away a lot more channels in the tDCS condition than in the no-tDCS condition, so datasets comprise different channels. I spent a few minutes trying to write fiddly code to compare the entries in the 'labels' field of the data structure, but surely fieldtrip has some general purpose function just to keep some channels and throw away others? I can't find exactly this on the wiki... >> >> Hope you can help. Thanks in advance. >> Tom >> >> -- >> Tom Marshall, MSc. >> Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging >> tel: +31(0)243668487 >> email: t.marshall at fcdonders.ru.nl >> postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands >> visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands >> > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From lwn_07 at yahoo.com.cn Mon Sep 26 18:00:28 2011 From: lwn_07 at yahoo.com.cn (lwn_07) Date: Tue, 27 Sep 2011 00:00:28 +0800 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <4E8049BD.5060303@donders.ru.nl> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> <396096E2-923B-48D7-9201-A041A4F22571@yahoo.com.cn> <4E8049BD.5060303@donders.ru.nl> Message-ID: <8A2201D5-3F98-4715-8ED1-DFA8780141D1@yahoo.com.cn> Dear Jörn, Thanks for you helping. Weina 在 2011-9-26,17:45,"Jörn M. Horschig" 写道: > Dear Weina, > > Basically, any montage will cause signal characteristics from the sensors used for re-referencing to show up in all other sensors. If you use a common average, the signal from any sensor will depend to some degree to any other sensor (because common average uses all sensors for rereferencing). If you use only Cz, you will obtain a high granger causality for any sensors to Cz. This would of course not reflect a real brain process, but is just the consequence of substracting the signal from Cz from all other sensors. Best would be to use a sensor that you will not include in computing granger causality (e.g. a mastoid, or choose Cz but then exclude this sensor for further analyses). > > Best, > Jörn > > On 9/25/2011 7:48 PM, lwn_07 wrote: >> >> Thanks Jan-Mathijs. Does it mean if I selected my data segment from mono montage (reference to mastoid), i'd better calculate the granger causality in mono montage? Some paper selected Cz as reference, is that OK? >> >> Best regards. >> Weina >> >> 发自我的 iPad >> >> 在 2011-9-25,23:36,jan-mathijs schoffelen 写道: >> >>> Hi Weina, >>> >>> Yes, granger causality results will for sure change when you use different montages. When you replace each measurement (what you call 'mono-montage') with that measurement minus the average across the whole recording array (what you call 'average montage') the amount with which signals can be explained in terms of their own and the other signals' past will change as well. This most likely leads to 'granger causality' estimates which just reflect spurious interactions. >>> >>> Best wishes, >>> >>> Jan-Mathijs >>> >>> On Sep 25, 2011, at 1:42 PM, 李卫娜 wrote: >>> >>>> Dear all, >>>> Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity? >>>> >>>> Weina >>>> _______________________________________________ >>>> 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 >>> 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 >> >> >> _______________________________________________ >> 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 > > 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 BelluscB at ninds.nih.gov Mon Sep 26 21:17:04 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Mon, 26 Sep 2011 15:17:04 -0400 Subject: [FieldTrip] mne vs lcmv methods Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CCCF@NIHMLBX10.nih.gov> Hi fellow Fieldtripers- I am learning about the pros & cons of different methods for source localization. For some of my data sets, I want to localize evoked activity (ERFs). In one of them, I anticipated a single unilateral primary site of activation and MNE worked very nicely for this. In the second, I am using auditory stimuli and therefore anticipated bilaterally synchronous activity. As was to be expected, (I think) MNE gave a single site of activity near the midline. I tried a parallel approach, but specifying lcmv as the method for ft_sourceanalysis as follows: cfg = []; cfg.method = 'lcmv'; cfg.grid = leadfield_02_stim1; cfg.vol = vol; cfg.lambda = 1e8; cfg.checksize = inf; %I've been inserting this and the next line because I've gotten error messages about the size. This didn't happen before, but these lines avoid the problem cfg.checkconfig ='loose'; source3CB24_02_stim1 = ft_sourceanalysis(cfg, tlkCB24_02_stim1) The output has a time dimension 1x601, and a pos dimension of 8196x3 dimension, but the avg.pow is only 1x8196. I interpret this to mean that the analysis averaged the power over some time interval instead of computing the power in each leadfield position for each time point. When I use the mne method, the output is clearly power for each time point, and produces a beautiful movie, as indicated in the tutorial. My questions about the lcmv technique are: 1. Is there a fundamental difference between the lcmv approach and the mne approach whereby it cannot compute the power at each time point, but only gives a single average value for a time period? 2. If so, how do I specify the time interval of interest (ie that containing the main peak of the ERF) in ft_sourceanalysis? 3. I thought one advantage of either MNE or LCMV was that I could indicate my a priori hypothesis of the anticipated localization of the source activity. Do I do this with cfg.grid? Is there a way to indicate the number of anticipated dipoles? Thanks in advance for your help- Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at yahoo.com Mon Sep 26 23:42:04 2011 From: alotof_xd at yahoo.com (alotof eve) Date: Mon, 26 Sep 2011 14:42:04 -0700 (PDT) Subject: [FieldTrip] creating new dataset In-Reply-To: <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> References: , <4E7EE19C.4040103@donders.ru.nl> <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> Message-ID: <1317073324.13127.YahooMailNeo@web125514.mail.ne1.yahoo.com> Is that possible to create a new dataset based on pre-processed 4D neuroimaging dataset by FieldTrip? I mean, such as re-write average results data like in EEGLab? ________________________________ From: jan-mathijs schoffelen To: Email discussion list for the FieldTrip project Sent: Monday, September 26, 2011 7:26 AM Subject: Re: [FieldTrip] creating new dataset Hi Jessie, FieldTrip is not able to write back into the native 4D neuroimaging format. If you want to create a new dataset, you need to have a look at the software which is provided by the 4D neuroimaging company. Your requested functionality may either be a feature of one of the applications, or may be implemented in one of the command line utilities. You may want to look in the software documentation for this. Best wishes, Jan-Mathijs On Sep 26, 2011, at 4:11 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Thanks for your answer Jörn  . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... > >Jessie >________________________________________ >From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] >Sent: Sunday, September 25, 2011 4:09 AM >To: Email discussion list for the FieldTrip project >Subject: Re: [FieldTrip] creating new dataset > >Hi Jessie, > >not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: > >You can also exclude channels or channel groups using the following syntax >   {'all', '-POz', '-Fp1', -EOG'} > > > > > >From ft_preprocessing: >> >If you are calling FT_PREPROCESSING with also the second input argument > "data", then that should contain data that was already read from file in > a previous call to FT_PREPROCESSING. In that case only the configuration > options below apply. > > The channels that will be read and/or preprocessed are specified with >   cfg.channel      = Nx1 cell-array with selection of channels (default = 'all'), >                      see FT_CHANNELSELECTION for details > > >You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. > >Hope this all helps to what you are up to! >Best, >Jörn > >On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > >Hi, > >If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset  without those channels (not by defining them using the ft_... in fieldtrip). > >Thanks, > >Jessie >_______________________________________________ >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 > >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 > Jan-Mathijs Schoffelen, MD PhD  Donders Institute for Brain, Cognition and Behaviour,  Centre for Cognitive Neuroimaging, Radboud University 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Tue Sep 27 08:51:44 2011 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 27 Sep 2011 08:51:44 +0200 Subject: [FieldTrip] Fwd: source localization difficulties References: Message-ID: Begin forwarded message: > From: Kanal Eliezer > Date: September 26, 2011 9:45:00 PM GMT+02:00 > To: jan-mathijs schoffelen > Subject: Re: [FieldTrip] source localization difficulties > > Hello Dr Schoffelen - > > Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. > > However, it seems that there's another related issue. When running the > ft_plot_sens(data_preprocessed.hdr.grad); > hold on; > ft_plot_vol(vol); > check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. > > In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: > mri_realign.coordsys = 'ctf'; > That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. > > Any help would be most appreciated! Thanks - > > Elli > > > > > On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: > >> Hi Elli, >> >>> Hello Dr. Schoffelen - >>> >>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>> >>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >> >> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >> >>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >> >> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >> >>> Thanks - >>> >>> Eliezer Kanal >> >> >> Best, >> >> Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: check.jpg Type: image/jpg Size: 23087 bytes Desc: not available URL: From ekanal at cmu.edu Tue Sep 27 14:50:29 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 27 Sep 2011 08:50:29 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: References: Message-ID: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> Thanks for forwarding the message to the list. Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - Elli -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: > > > Begin forwarded message: > >> From: Kanal Eliezer >> Date: September 26, 2011 9:45:00 PM GMT+02:00 >> To: jan-mathijs schoffelen >> Subject: Re: [FieldTrip] source localization difficulties >> >> Hello Dr Schoffelen - >> >> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >> >> However, it seems that there's another related issue. When running the >> ft_plot_sens(data_preprocessed.hdr.grad); >> hold on; >> ft_plot_vol(vol); >> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >> >> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >> mri_realign.coordsys = 'ctf'; >> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >> >> Any help would be most appreciated! Thanks - >> >> Elli >> >> >> >> >> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >> >>> Hi Elli, >>> >>>> Hello Dr. Schoffelen - >>>> >>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>> >>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>> >>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>> >>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>> >>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>> >>>> Thanks - >>>> >>>> Eliezer Kanal >>> >>> >>> Best, >>> >>> Jan-Mathijs > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University 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 BelluscB at ninds.nih.gov Tue Sep 27 15:35:33 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Tue, 27 Sep 2011 09:35:33 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> Elli- I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. Hope this helps. Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -----Original Message----- From: Kanal Eliezer [mailto:ekanal at cmu.edu] Sent: Tuesday, September 27, 2011 8:50 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Fwd: source localization difficulties Thanks for forwarding the message to the list. Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - Elli -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: > > > Begin forwarded message: > >> From: Kanal Eliezer >> Date: September 26, 2011 9:45:00 PM GMT+02:00 >> To: jan-mathijs schoffelen >> Subject: Re: [FieldTrip] source localization difficulties >> >> Hello Dr Schoffelen - >> >> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >> >> However, it seems that there's another related issue. When running the >> ft_plot_sens(data_preprocessed.hdr.grad); >> hold on; >> ft_plot_vol(vol); >> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >> >> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >> mri_realign.coordsys = 'ctf'; >> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >> >> Any help would be most appreciated! Thanks - >> >> Elli >> >> >> >> >> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >> >>> Hi Elli, >>> >>>> Hello Dr. Schoffelen - >>>> >>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>> >>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>> >>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>> >>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>> >>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>> >>>> Thanks - >>>> >>>> Eliezer Kanal >>> >>> >>> Best, >>> >>> Jan-Mathijs > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University 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 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From albenin at mail.ru Tue Sep 27 17:23:53 2011 From: albenin at mail.ru (=?UTF-8?B?0JDQu9C10LrRgdC10Lkg0JHQtdC90LjQvQ==?=) Date: Tue, 27 Sep 2011 19:23:53 +0400 Subject: [FieldTrip] =?utf-8?q?parametric_statistics?= Message-ID: Hello! I need to perform t-test analysis between 2 categories through all subjects for each channel (in time-frequency domain) and I was unlucky to find this function in FiledTrip. So, could you please tell me if it is possible and how to perform this analysis. Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mscharinger at cbs.mpg.de Tue Sep 27 18:19:10 2011 From: mscharinger at cbs.mpg.de (Mathias Scharinger) Date: Tue, 27 Sep 2011 18:19:10 +0200 Subject: [FieldTrip] Trigger Detection in Yokogawa Data Message-ID: <4FD792CD-FFA5-4C86-9665-1FB42D847CAF@cbs.mpg.de> Dear all, I keep having problems with extracting triggers from Yokogawa Data (.sqd files). Usually, triggers are defined by clearly defined flanks, sent on channels 162-169, and code the occurrence of specific events/stimuli. Following the steps on the wiki, the problem is this line: event = ft_read_event(cfg.dataset,'trigindx',169,'threshold',1e3,'detectflank','up'); After determining the threshold from one trigger line, the above line would yield VERY different numbers on trigger lines that should be identical. If compared to the trigger extraction achieved by temp = sqdread(sourceFile,'Channels',triggerlines(tnum)); trigs = find((diff(temp))>1000); from the Jonathan Simon/Dan Hertz toolbox (http://www.isr.umd.edu/Labs/CSSL/simonlab/Resources.html) the ft_read_event method is always off by more than 5 trial, i.e. it is impossible to extract the correct number of trials by setting the threshold to one fixed value. My question is now: Could the two above lines somehow be implemented in the my_trial_fun file? The above line gives (for trigs) the following structure: trigs = 19 x 1 matrix (for a demo file called R1315test.sqd that I am willing to share) with the time points of the corresponding trigger line (here: 162). Or could the ft_read_event function use the sqdread algorithm somehow? I am not sure what causes the discrepancies with ft_read_event. Thanks for any help, Mathias ---------------------------------------------------------- Mathias Scharinger (PhD) Auditory Cognition Research Group Max Planck Institute for Human Cognitive & Brain Sciences Stephanstr. 1A - 04103 Leipzig, Germany Tel.: +49 (0) 341-9940-2482 From ekanal at cmu.edu Tue Sep 27 19:40:31 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 27 Sep 2011 13:40:31 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> Message-ID: <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> Hello Beth - I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - Elli On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: > Elli- > I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. > Hope this helps. > Beth. > > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > > > -----Original Message----- > From: Kanal Eliezer [mailto:ekanal at cmu.edu] > Sent: Tuesday, September 27, 2011 8:50 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Fwd: source localization difficulties > > Thanks for forwarding the message to the list. > > Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - > > Elli > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: > >> >> >> Begin forwarded message: >> >>> From: Kanal Eliezer >>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>> To: jan-mathijs schoffelen >>> Subject: Re: [FieldTrip] source localization difficulties >>> >>> Hello Dr Schoffelen - >>> >>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>> >>> However, it seems that there's another related issue. When running the >>> ft_plot_sens(data_preprocessed.hdr.grad); >>> hold on; >>> ft_plot_vol(vol); >>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>> >>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>> mri_realign.coordsys = 'ctf'; >>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>> >>> Any help would be most appreciated! Thanks - >>> >>> Elli >>> >>> >>> >>> >>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>> >>>> Hi Elli, >>>> >>>>> Hello Dr. Schoffelen - >>>>> >>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>> >>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>> >>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>> >>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>> >>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>> >>>>> Thanks - >>>>> >>>>> Eliezer Kanal >>>> >>>> >>>> Best, >>>> >>>> Jan-Mathijs >> >> Jan-Mathijs Schoffelen, MD PhD >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University 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 > > > _______________________________________________ > 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 BelluscB at ninds.nih.gov Tue Sep 27 20:14:35 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Tue, 27 Sep 2011 14:14:35 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. Beth. -----Original Message----- From: Kanal Eliezer [mailto:ekanal at cmu.edu] Sent: Tuesday, September 27, 2011 1:41 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Fwd: source localization difficulties Hello Beth - I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - Elli On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: > Elli- > I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. > Hope this helps. > Beth. > > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > > > -----Original Message----- > From: Kanal Eliezer [mailto:ekanal at cmu.edu] > Sent: Tuesday, September 27, 2011 8:50 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Fwd: source localization difficulties > > Thanks for forwarding the message to the list. > > Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - > > Elli > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: > >> >> >> Begin forwarded message: >> >>> From: Kanal Eliezer >>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>> To: jan-mathijs schoffelen >>> Subject: Re: [FieldTrip] source localization difficulties >>> >>> Hello Dr Schoffelen - >>> >>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>> >>> However, it seems that there's another related issue. When running the >>> ft_plot_sens(data_preprocessed.hdr.grad); >>> hold on; >>> ft_plot_vol(vol); >>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>> >>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>> mri_realign.coordsys = 'ctf'; >>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>> >>> Any help would be most appreciated! Thanks - >>> >>> Elli >>> >>> >>> >>> >>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>> >>>> Hi Elli, >>>> >>>>> Hello Dr. Schoffelen - >>>>> >>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>> >>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>> >>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>> >>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>> >>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>> >>>>> Thanks - >>>>> >>>>> Eliezer Kanal >>>> >>>> >>>> Best, >>>> >>>> Jan-Mathijs >> >> Jan-Mathijs Schoffelen, MD PhD >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From ekanal at cmu.edu Tue Sep 27 21:23:57 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 27 Sep 2011 15:23:57 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> Message-ID: Unfortunately, it looks like redoing the alignment didn't help. I re-ran `ft_volumerealign` in interactive, and it did add the correct field to the output structure, but the brain is still facing the wrong way. Is it possible that FieldTrip is ignoring this field when plotting? The plotting functions are pretty complex, and are even more obfuscated than usual due to all the transforms used in aligning everything, so I don't want to try to troubleshoot this one myself since I'd almost certainly find the wrong thing. In the end, I fixed the problem by simply taking vol.bnd.pnt and vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, this is a workaround rather than a direct fix. Still, if anyone else has this problem, I'm attaching the code below... it seems to have worked. Elli ~~~ tmp = vol; % transform to spherical coords [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... = cart2sph( ... tmp.bnd.pnt(:,1), ... tmp.bnd.pnt(:,2), ... tmp.bnd.pnt(:,3) ); [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... = cart2sph( ... tmp.bnd.tri(:,1), ... tmp.bnd.tri(:,2), ... tmp.bnd.tri(:,3) ); % rotate as necessary tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; % transform back to cartesian [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... = sph2cart( ... tmp.bnd.pnt(:,1), ... tmp.bnd.pnt(:,2), ... tmp.bnd.pnt(:,3) ); [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... = cart2sph( ... tmp.bnd.tri(:,1), ... tmp.bnd.tri(:,2), ... tmp.bnd.tri(:,3) ); vol = tmp; On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. > Beth. > > -----Original Message----- > From: Kanal Eliezer [mailto:ekanal at cmu.edu] > Sent: Tuesday, September 27, 2011 1:41 PM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Fwd: source localization difficulties > > Hello Beth - > > I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - > > Elli > > > On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: > >> Elli- >> I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. >> Hope this helps. >> Beth. >> >> >> Beth Belluscio MD-PhD >> Clinical Fellow >> Human Motor Control Section >> NINDS, NIH >> 301-402-3495 >> >> >> >> -----Original Message----- >> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >> Sent: Tuesday, September 27, 2011 8:50 AM >> To: Email discussion list for the FieldTrip project >> Subject: Re: [FieldTrip] Fwd: source localization difficulties >> >> Thanks for forwarding the message to the list. >> >> Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - >> >> Elli >> >> >> -------------------- >> Eliezer Kanal, Ph.D. >> Postdoctoral Fellow >> Center for the Neural Basis of Cognition >> Carnegie Mellon University >> 4400 Fifth Ave, Suite 110A >> Pittsburgh PA 15213 >> P: 412-268-4115 >> F: 412-268-5060 >> >> >> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >> >>> >>> >>> Begin forwarded message: >>> >>>> From: Kanal Eliezer >>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>> To: jan-mathijs schoffelen >>>> Subject: Re: [FieldTrip] source localization difficulties >>>> >>>> Hello Dr Schoffelen - >>>> >>>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>>> >>>> However, it seems that there's another related issue. When running the >>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>> hold on; >>>> ft_plot_vol(vol); >>>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>>> >>>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>>> mri_realign.coordsys = 'ctf'; >>>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>>> >>>> Any help would be most appreciated! Thanks - >>>> >>>> Elli >>>> >>>> >>>> >>>> >>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>> >>>>> Hi Elli, >>>>> >>>>>> Hello Dr. Schoffelen - >>>>>> >>>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>>> >>>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>>> >>>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>>> >>>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>>> >>>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>>> >>>>>> Thanks - >>>>>> >>>>>> Eliezer Kanal >>>>> >>>>> >>>>> Best, >>>>> >>>>> Jan-Mathijs >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University 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 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From ekanal at cmu.edu Tue Sep 27 21:34:57 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 27 Sep 2011 15:34:57 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <16149_1317151503_p8RJP2Rh020523_BDAA1CF9-9027-4F2C-ACE5-9CDDAB1673C7@cmu.edu> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> <16149_1317151503_p8RJP2Rh020523_BDAA1CF9-9027-4F2C-ACE5-9CDDAB1673C7@cmu.edu> Message-ID: <0535E384-0918-4D9A-97F7-EA07635C4699@cmu.edu> Addendum to previous email, the code was incorrect; `vol.bnd.tri` should not be rotated. Fixed code below. Elli ~~~~~~ tmp = vol; % transform to spherical coords [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... = cart2sph( ... tmp.bnd.pnt(:,1), ... tmp.bnd.pnt(:,2), ... tmp.bnd.pnt(:,3) ); % rotate as necessary tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; % transform back to cartesian [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... = sph2cart( ... tmp.bnd.pnt(:,1), ... tmp.bnd.pnt(:,2), ... tmp.bnd.pnt(:,3) ); vol = tmp; On Sep 27, 2011, at 3:23 PM, Kanal Eliezer wrote: > Unfortunately, it looks like redoing the alignment didn't help. I re-ran `ft_volumerealign` in interactive, and it did add the correct field to the output structure, but the brain is still facing the wrong way. > > Is it possible that FieldTrip is ignoring this field when plotting? The plotting functions are pretty complex, and are even more obfuscated than usual due to all the transforms used in aligning everything, so I don't want to try to troubleshoot this one myself since I'd almost certainly find the wrong thing. > > In the end, I fixed the problem by simply taking vol.bnd.pnt and vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, this is a workaround rather than a direct fix. Still, if anyone else has this problem, I'm attaching the code below... it seems to have worked. > > Elli > > ~~~ > > tmp = vol; > > % transform to spherical coords > [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... > = cart2sph( ... > tmp.bnd.pnt(:,1), ... > tmp.bnd.pnt(:,2), ... > tmp.bnd.pnt(:,3) ); > > % rotate as necessary > tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; > > % transform back to cartesian > [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... > = sph2cart( ... > tmp.bnd.pnt(:,1), ... > tmp.bnd.pnt(:,2), ... > tmp.bnd.pnt(:,3) ); > > vol = tmp; > > > > On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > >> OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. >> Beth. >> >> -----Original Message----- >> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >> Sent: Tuesday, September 27, 2011 1:41 PM >> To: Email discussion list for the FieldTrip project >> Subject: Re: [FieldTrip] Fwd: source localization difficulties >> >> Hello Beth - >> >> I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - >> >> Elli >> >> >> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >> >>> Elli- >>> I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. >>> Hope this helps. >>> Beth. >>> >>> >>> Beth Belluscio MD-PhD >>> Clinical Fellow >>> Human Motor Control Section >>> NINDS, NIH >>> 301-402-3495 >>> >>> >>> >>> -----Original Message----- >>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>> Sent: Tuesday, September 27, 2011 8:50 AM >>> To: Email discussion list for the FieldTrip project >>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>> >>> Thanks for forwarding the message to the list. >>> >>> Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - >>> >>> Elli >>> >>> >>> -------------------- >>> Eliezer Kanal, Ph.D. >>> Postdoctoral Fellow >>> Center for the Neural Basis of Cognition >>> Carnegie Mellon University >>> 4400 Fifth Ave, Suite 110A >>> Pittsburgh PA 15213 >>> P: 412-268-4115 >>> F: 412-268-5060 >>> >>> >>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>> >>>> >>>> >>>> Begin forwarded message: >>>> >>>>> From: Kanal Eliezer >>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>> To: jan-mathijs schoffelen >>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>> >>>>> Hello Dr Schoffelen - >>>>> >>>>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>>>> >>>>> However, it seems that there's another related issue. When running the >>>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>>> hold on; >>>>> ft_plot_vol(vol); >>>>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>>>> >>>>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>>>> mri_realign.coordsys = 'ctf'; >>>>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>>>> >>>>> Any help would be most appreciated! Thanks - >>>>> >>>>> Elli >>>>> >>>>> >>>>> >>>>> >>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>> >>>>>> Hi Elli, >>>>>> >>>>>>> Hello Dr. Schoffelen - >>>>>>> >>>>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>>>> >>>>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>>>> >>>>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>>>> >>>>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>>>> >>>>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>>>> >>>>>>> Thanks - >>>>>>> >>>>>>> Eliezer Kanal >>>>>> >>>>>> >>>>>> Best, >>>>>> >>>>>> Jan-Mathijs >>>> >>>> Jan-Mathijs Schoffelen, MD PhD >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University 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 >>> >>> >>> _______________________________________________ >>> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Caroline.Lustenberger at kispi.uzh.ch Wed Sep 28 10:46:16 2011 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Wed, 28 Sep 2011 10:46:16 +0200 Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset Message-ID: <8D58B6880DD231469FA0128331363CED03DB01AB@exzh1.kispi.int> Dear all Using EEGlab I have calculated ITC and ERSP of 16 subjects of 1 channel and the frequency range 1-4Hz (in average), thus I have 2 data arrays: 1st Condition Sham: 16 x 185 --> 16=number of subjects, 185=timepoints with event-related spectral values or intertrial coherence values 2nd Condition Field: 16 x 185 To see if there is any difference between the 2 conditions in all timepoints I performed 185 paired t-tests and now I should control for multiple comparison using a cluster analysis (meaning find out the probability that a certain number of neighbour-timepoints are suprathreshold). Is there a possibility to do that using fieldtrip statistics? And how can I do that? Thank you very much for your help Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Sep 28 12:15:26 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 28 Sep 2011 12:15:26 +0200 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> Message-ID: Dear Elli, Your proposed fix is equivalent to swapping the first 2 columns in your tmp.bnd.pnt matrix, i.e. swapping the y and x axis. To me this seems that you can also alleviate this by specifying the proper cfg.coordsys prior to your call to ft_volumerealign. The idea is the following: by specifying the location of nasion/lpa/rpa a transformation matrix can be computed. This transformation matrix will assign the X,Y, and Z axes of the coordinate system. According to different conventions, the X-axis either goes anterior (leading to a 'ALS'-like coordinate system, e.g. used in the CTF-systems and 4D neuroimaging systems), or the X-axis goes to the right (leading to a 'RAS'-like coordinate system, e.g. used in the Neuromag system). This specification will have an effect on the transformation matrix only at the level of ft_volumerealign. Specifying the coordinate system later on (through ft_estimate_coordsys) only adds the field coordsys to the mri-structure, without affecting the transformation matrix. Adding the coordsys-field just gives an interpretation to the coordinate system (and thus to the transformation matrix). To summarize, I expect that your expectation of the coordinate system in which the sensors are expressed, don't coincide with the coordinate system in which (according to the transformation matrix in combination with the coordsys) the MRI is expressed. See for the different coordinate systems definitions: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined For your call to ft_volumerealign you need to specify cfg.coordsys = 'one of the meg-systems'. At the moment this at least works for 'ctf' and 'itab' as strings. These reflect the two major conventions, i.e. X-axis anterior, or X-axis to the right. To de-confuse it a bit, I will add the other MEG-systems also as supported strings. For the time being you can look up in the table in the linked web-page which one you need. I suspect it is 'itab', because the default is ctf-convention. Best wishes, Jan-Mathijs On Sep 27, 2011, at 9:23 PM, Kanal Eliezer wrote: > Unfortunately, it looks like redoing the alignment didn't help. I re-ran `ft_volumerealign` in interactive, and it did add the correct field to the output structure, but the brain is still facing the wrong way. > > Is it possible that FieldTrip is ignoring this field when plotting? The plotting functions are pretty complex, and are even more obfuscated than usual due to all the transforms used in aligning everything, so I don't want to try to troubleshoot this one myself since I'd almost certainly find the wrong thing. > > In the end, I fixed the problem by simply taking vol.bnd.pnt and vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, this is a workaround rather than a direct fix. Still, if anyone else has this problem, I'm attaching the code below... it seems to have worked. > > Elli > > ~~~ > > tmp = vol; > > % transform to spherical coords > [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... > = cart2sph( ... > tmp.bnd.pnt(:,1), ... > tmp.bnd.pnt(:,2), ... > tmp.bnd.pnt(:,3) ); > [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... > = cart2sph( ... > tmp.bnd.tri(:,1), ... > tmp.bnd.tri(:,2), ... > tmp.bnd.tri(:,3) ); > > % rotate as necessary > tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; > tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; > > % transform back to cartesian > [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... > = sph2cart( ... > tmp.bnd.pnt(:,1), ... > tmp.bnd.pnt(:,2), ... > tmp.bnd.pnt(:,3) ); > [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... > = cart2sph( ... > tmp.bnd.tri(:,1), ... > tmp.bnd.tri(:,2), ... > tmp.bnd.tri(:,3) ); > > vol = tmp; > > > > On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > >> OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. >> Beth. >> >> -----Original Message----- >> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >> Sent: Tuesday, September 27, 2011 1:41 PM >> To: Email discussion list for the FieldTrip project >> Subject: Re: [FieldTrip] Fwd: source localization difficulties >> >> Hello Beth - >> >> I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - >> >> Elli >> >> >> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >> >>> Elli- >>> I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. >>> Hope this helps. >>> Beth. >>> >>> >>> Beth Belluscio MD-PhD >>> Clinical Fellow >>> Human Motor Control Section >>> NINDS, NIH >>> 301-402-3495 >>> >>> >>> >>> -----Original Message----- >>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>> Sent: Tuesday, September 27, 2011 8:50 AM >>> To: Email discussion list for the FieldTrip project >>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>> >>> Thanks for forwarding the message to the list. >>> >>> Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - >>> >>> Elli >>> >>> >>> -------------------- >>> Eliezer Kanal, Ph.D. >>> Postdoctoral Fellow >>> Center for the Neural Basis of Cognition >>> Carnegie Mellon University >>> 4400 Fifth Ave, Suite 110A >>> Pittsburgh PA 15213 >>> P: 412-268-4115 >>> F: 412-268-5060 >>> >>> >>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>> >>>> >>>> >>>> Begin forwarded message: >>>> >>>>> From: Kanal Eliezer >>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>> To: jan-mathijs schoffelen >>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>> >>>>> Hello Dr Schoffelen - >>>>> >>>>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>>>> >>>>> However, it seems that there's another related issue. When running the >>>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>>> hold on; >>>>> ft_plot_vol(vol); >>>>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>>>> >>>>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>>>> mri_realign.coordsys = 'ctf'; >>>>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>>>> >>>>> Any help would be most appreciated! Thanks - >>>>> >>>>> Elli >>>>> >>>>> >>>>> >>>>> >>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>> >>>>>> Hi Elli, >>>>>> >>>>>>> Hello Dr. Schoffelen - >>>>>>> >>>>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>>>> >>>>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>>>> >>>>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>>>> >>>>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>>>> >>>>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>>>> >>>>>>> Thanks - >>>>>>> >>>>>>> Eliezer Kanal >>>>>> >>>>>> >>>>>> Best, >>>>>> >>>>>> Jan-Mathijs >>>> >>>> Jan-Mathijs Schoffelen, MD PhD >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University 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 >>> >>> >>> _______________________________________________ >>> 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 > > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From Lilla.Magyari at mpi.nl Wed Sep 28 13:08:21 2011 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Wed, 28 Sep 2011 13:08:21 +0200 Subject: [FieldTrip] mne vs lcmv methods In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C059826CCCF@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C059826CCCF@NIHMLBX10.nih.gov> Message-ID: <4E830025.1050407@mpi.nl> Hi Beth, I do not know how lcmv beamforming is implemented in FieldTrip, and I haven't used it before. But I did use the mne method for sourcelocalization in FieldTrip, so may I can answer some of your questions partially. But if someone is more expert in this area, comments are appreciated. Belluscio, Beth (NIH/NINDS) [E] wrote: > Hi fellow Fieldtripers- > > I am learning about the pros & cons of different methods for source > localization. For some of my data sets, I want to localize evoked > activity (ERFs). In one of them, I anticipated a single unilateral > primary site of activation and MNE worked very nicely for this. In the > second, I am using auditory stimuli and therefore anticipated > bilaterally synchronous activity. As was to be expected, (I think) MNE > gave a single site of activity near the midline. I tried a parallel > approach, but specifying lcmv as the method for ft_sourceanalysis as > follows: > > > > cfg = []; > > cfg.method = 'lcmv'; > > cfg.grid = leadfield_02_stim1; > > cfg.vol = vol; > > cfg.lambda = 1e8; > > cfg.checksize = inf; %I’ve been inserting this and the next line > because I’ve gotten error messages about the size. This didn’t happen > before, but these lines avoid the problem > > cfg.checkconfig ='loose'; > > source3CB24_02_stim1 = ft_sourceanalysis(cfg, tlkCB24_02_stim1) > > > > The output has a time dimension 1x601, and a pos dimension of 8196x3 > dimension, but the avg.pow is only 1x8196. I interpret this to mean > that the analysis averaged the power over some time interval instead of > computing the power in each leadfield position for each time point. > When I use the mne method, the output is clearly power for each time > point, and produces a beautiful movie, as indicated in the tutorial. > > > > My questions about the lcmv technique are: > > 1. Is there a fundamental difference between the lcmv approach and > the mne approach whereby it cannot compute the power at each time point, > but only gives a single average value for a time period? As far as I know, the mne approach (compared to other methods, like beamforming) is favored for calculating source estimates of evoked activity over time. Therefore, I am not surprised that the lcmv is not doing the computation over time. I found this a useful reading about the differences between beamforming and mne: Jensen, O., Hesse, C., 2010, Estimating distributed representation of evoked responses and oscillatory brain activity, In: MEG: An Introduction to Methods, ed. by Hansen, P., Kringelbach, M., Salmelin, R., doi:10.1093/acprof:oso/9780195307238.001.0001 > > 2. If so, how do I specify the time interval of interest (ie that > containing the main peak of the ERF) in ft_sourceanalysis? I would use ft_redefinetrial. This function can select only a segment of your trials. > 3. I thought one advantage of either MNE or LCMV was that I could > indicate my a priori hypothesis of the anticipated localization of the > source activity. Do I do this with cfg.grid? Is there a way to > indicate the number of anticipated dipoles? A dipole model presupposes indeed that the activation is coming from a small area or from multiple separate small areas, while the mne and the beamforming approach are providing a distributed representation of the neural activity. The minimum "a priori" assumption is that the underlying activation is coming from the brain. The brain volume is discretized onto a 3-dimensional grid (this is the cfg.grid). And the current is estimated at these grid locations. So, in this sense, yes, these grid points are your dipoles. Typically, you specify more thousands of these points. I hope this helps. Lilla Magyari > > > Thanks in advance for your help- > > Beth. > > > > Beth Belluscio MD-PhD > > Clinical Fellow > > Human Motor Control Section > > NINDS, NIH > > 301-402-3495 > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD student Language and Cognition Group research assistant Neurobiology of Language Group Max Planck Institute for Psycholinguistics Nijmegen, P.O. Box 310, 6500AH, the Netherlands Phone: 0031 24 3521561 From mscharinger at cbs.mpg.de Wed Sep 28 14:52:09 2011 From: mscharinger at cbs.mpg.de (Mathias Scharinger) Date: Wed, 28 Sep 2011 14:52:09 +0200 Subject: [FieldTrip] Trigger Detection in Yokogawa Data: Link to Test File In-Reply-To: <4FD792CD-FFA5-4C86-9665-1FB42D847CAF@cbs.mpg.de> References: <4FD792CD-FFA5-4C86-9665-1FB42D847CAF@cbs.mpg.de> Message-ID: Dear all, I posted a problem on the list yesterday and now have a link to the test sqd. file: http://dl.dropbox.com/u/19074278/R1315test.sqd The problem is summarized below: > > > I keep having problems with extracting triggers from Yokogawa Data (.sqd files). Usually, triggers are defined by clearly defined flanks, sent on channels 162-169, and code the occurrence of specific events/stimuli. > > Following the steps on the wiki, the problem is this line: > > event = ft_read_event(cfg.dataset,'trigindx',169,'threshold',1e3,'detectflank','up'); > > After determining the threshold from one trigger line, the above line would yield VERY different numbers on trigger lines that should be identical. If compared to the trigger extraction achieved by > > temp = sqdread(sourceFile,'Channels',triggerlines(tnum)); > trigs = find((diff(temp))>1000); > > from the Jonathan Simon/Dan Hertz toolbox (http://www.isr.umd.edu/Labs/CSSL/simonlab/Resources.html) > > the ft_read_event method is always off by more than 5 trial, i.e. it is impossible to extract the correct number of trials by setting the threshold to one fixed value. > > My question is now: > Could the two above lines somehow be implemented in the my_trial_fun file? > > The above line gives (for trigs) the following structure: > > trigs = 19 x 1 matrix (for a demo file called R1315test.sqd that I am willing to share) > with the time points of the corresponding trigger line (here: 162). > > Or could the ft_read_event function use the sqdread algorithm somehow? > I am not sure what causes the discrepancies with ft_read_event. > Thanks for any help, Mathias From politzerahless at gmail.com Wed Sep 28 16:36:47 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Wed, 28 Sep 2011 09:36:47 -0500 Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset Message-ID: Caroline, This should be possible (I recently did something very similar, although I was analysizing ERPs rather than ERSPs). First you need to export the data for each subject from EEGLAB to Fieldtrip using EEGLAB's function eeg2fieldtrip(); when I did this I specified the option 'timelockanalysis' to compute ERPs of the EEGLAB data, but in your case I guess you will want to use 'freqanalysis' instead. Then, you need to compute grand averages using ft_freqgrandaverage() with cfg.keepindividual='yes'. Then you will be ready to perform cluster statistics following the instructions at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq . Best, Steve Politzer-Ahles Message: 1 > Date: Wed, 28 Sep 2011 10:46:16 +0200 > From: "Lustenberger Caroline" > To: > Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of > an already existing dataset > Message-ID: <8D58B6880DD231469FA0128331363CED03DB01AB at exzh1.kispi.int> > Content-Type: text/plain; charset="us-ascii" > > Dear all > > Using EEGlab I have calculated ITC and ERSP of 16 subjects of 1 channel > and the frequency range 1-4Hz (in average), thus I have 2 data arrays: > > 1st Condition Sham: 16 x 185 --> 16=number of subjects, 185=timepoints > with event-related spectral values or intertrial coherence values > 2nd Condition Field: 16 x 185 > > To see if there is any difference between the 2 conditions in all > timepoints I performed 185 paired t-tests and now I should control for > multiple comparison using a cluster analysis (meaning find out the > probability that a certain number of neighbour-timepoints are > suprathreshold). > > Is there a possibility to do that using fieldtrip statistics? And how > can I do that? > > Thank you very much for your help > Caroline > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110928/a27bc4a9/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 44 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Wed Sep 28 17:38:35 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Wed, 28 Sep 2011 09:38:35 -0600 Subject: [FieldTrip] mne vs lcmv methods In-Reply-To: <4E830025.1050407@mpi.nl> References: <794DFDD3C128EF44AC49ADC58FD0090C059826CCCF@NIHMLBX10.nih.gov> <4E830025.1050407@mpi.nl> Message-ID: Dear Beth, I think we'd need to know more about your analysis input to answer questions about the dimensionality of the source outputs, but in general, the lcmv beamformer suffers from the same problems as other beamformers - that is, when you have the expectation of highly correlated sources, one or both of the sources will be suppressed, particularly when the time range for the data input to the beamformer is restricted to short intervals. Many papers have been written on this issue, and there are some attempts at solutions (e.g., see Brookes et al. 2006 Neuroimage). I do not believe that the lcmv or dics beamformers in FieldTrip have any such implementation for highly correlated sources, but I may be wrong. Since you want to reconstruct the sources of an auditory evoked field, in general a beamfomer will be a poor choice of methods for you. For simple, passive auditory stimulation, two-dipole models work very nicely. If you have the expectation of more complicated source arrangements because of some cognitive manipulation, then the cortically constrained MNE approach seems reasonable to me. All that said, the lcmv beamformer in Fieldtrip should be able to give you output at the same times as you input for analysis. The dics beamformer, as it is done in the frequency domain, not the time domain, will generally give you a single output. Also, to clarify something that might be misinterpreted from Lilla's answer to you, at some level (the forward solution) all of these models (single dipole, multiple dipole, cortically constrained mne, beamformer) are all reliant on the dipole model. Distributed models simply have many dipoles, which are fixed in location to either the vertices of the cortical surface tesselation, oriented normal to the surface, or in the case of a beamformer, typically done on a regularly spaced grid with either fixed or optimized source orientation (e.g., lcmv vs. sam). Best, Don On Sep 28, 2011, at 5:08 AM, Magyari, Lilla wrote: > Hi Beth, > > I do not know how lcmv beamforming is implemented in FieldTrip, and I > haven't used it before. But I did use the mne method for > sourcelocalization in FieldTrip, so may I can answer some of your > questions partially. But if someone is more expert in this area, > comments are appreciated. > > Belluscio, Beth (NIH/NINDS) [E] wrote: >> Hi fellow Fieldtripers- >> >> I am learning about the pros & cons of different methods for source >> localization. For some of my data sets, I want to localize evoked >> activity (ERFs). In one of them, I anticipated a single unilateral >> primary site of activation and MNE worked very nicely for this. In the >> second, I am using auditory stimuli and therefore anticipated >> bilaterally synchronous activity. As was to be expected, (I think) MNE >> gave a single site of activity near the midline. I tried a parallel >> approach, but specifying lcmv as the method for ft_sourceanalysis as >> follows: >> >> >> >> cfg = []; >> >> cfg.method = 'lcmv'; >> >> cfg.grid = leadfield_02_stim1; >> >> cfg.vol = vol; >> >> cfg.lambda = 1e8; >> >> cfg.checksize = inf; %I’ve been inserting this and the next line >> because I’ve gotten error messages about the size. This didn’t happen >> before, but these lines avoid the problem >> >> cfg.checkconfig ='loose'; >> >> source3CB24_02_stim1 = ft_sourceanalysis(cfg, tlkCB24_02_stim1) >> >> >> >> The output has a time dimension 1x601, and a pos dimension of 8196x3 >> dimension, but the avg.pow is only 1x8196. I interpret this to mean >> that the analysis averaged the power over some time interval instead of >> computing the power in each leadfield position for each time point. >> When I use the mne method, the output is clearly power for each time >> point, and produces a beautiful movie, as indicated in the tutorial. >> >> >> >> My questions about the lcmv technique are: >> >> 1. Is there a fundamental difference between the lcmv approach and >> the mne approach whereby it cannot compute the power at each time point, >> but only gives a single average value for a time period? > > As far as I know, the mne approach (compared to other methods, like > beamforming) is favored for calculating source estimates of evoked > activity over time. Therefore, I am not surprised that the lcmv is not > doing the computation over time. > I found this a useful reading about the differences between beamforming > and mne: > > Jensen, O., Hesse, C., 2010, Estimating distributed representation of > evoked responses and oscillatory brain activity, In: MEG: An > Introduction to Methods, ed. by Hansen, P., Kringelbach, M., Salmelin, > R., doi:10.1093/acprof:oso/9780195307238.001.0001 > >> >> 2. If so, how do I specify the time interval of interest (ie that >> containing the main peak of the ERF) in ft_sourceanalysis? > > I would use ft_redefinetrial. This function can select only a segment of > your trials. > >> 3. I thought one advantage of either MNE or LCMV was that I could >> indicate my a priori hypothesis of the anticipated localization of the >> source activity. Do I do this with cfg.grid? Is there a way to >> indicate the number of anticipated dipoles? > > A dipole model presupposes indeed that the activation is coming from a > small area or from multiple separate small areas, while the mne and the > beamforming approach are providing a distributed representation of the > neural activity. The minimum "a priori" assumption is that the > underlying activation is coming from the brain. The brain volume is > discretized onto a 3-dimensional grid (this is the cfg.grid). And the > current is estimated at these grid locations. So, in this sense, yes, > these grid points are your dipoles. Typically, you specify more > thousands of these points. > > I hope this helps. > > Lilla Magyari > > >> >> >> Thanks in advance for your help- >> >> Beth. >> >> >> >> Beth Belluscio MD-PhD >> >> Clinical Fellow >> >> Human Motor Control Section >> >> NINDS, NIH >> >> 301-402-3495 >> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > PhD student > Language and Cognition Group > research assistant > Neurobiology of Language Group > > Max Planck Institute for Psycholinguistics > Nijmegen, P.O. Box 310, 6500AH, the Netherlands > Phone: 0031 24 3521561 > > _______________________________________________ > 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 From Caroline.Lustenberger at kispi.uzh.ch Wed Sep 28 17:56:04 2011 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Wed, 28 Sep 2011 17:56:04 +0200 Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset In-Reply-To: Message-ID: <8D58B6880DD231469FA0128331363CED03DB01DB@exzh1.kispi.int> Dear Steve Thank you very much, I was able to calculate montecarlo statistics with the fieldtrip toolbox using eeglab data. Probably you can help me answering this question too: How can I define neighbour-timepoints, normally all tutorials explain how to define neighbour sensors or channels, but have only 1 channel and 185 timepoints. Thus, I want to perform cluster analysis to see whether a certain timepoint cluster is significant. Thanks again and best wishes Caroline ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Mittwoch, 28. September 2011 16:37 An: fieldtrip at donders.ru.nl Betreff: Re: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset Caroline, This should be possible (I recently did something very similar, although I was analysizing ERPs rather than ERSPs). First you need to export the data for each subject from EEGLAB to Fieldtrip using EEGLAB's function eeg2fieldtrip(); when I did this I specified the option 'timelockanalysis' to compute ERPs of the EEGLAB data, but in your case I guess you will want to use 'freqanalysis' instead. Then, you need to compute grand averages using ft_freqgrandaverage() with cfg.keepindividual='yes'. Then you will be ready to perform cluster statistics following the instructions at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq . Best, Steve Politzer-Ahles Message: 1 Date: Wed, 28 Sep 2011 10:46:16 +0200 From: "Lustenberger Caroline" To: Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset Message-ID: <8D58B6880DD231469FA0128331363CED03DB01AB at exzh1.kispi.int> Content-Type: text/plain; charset="us-ascii" Dear all Using EEGlab I have calculated ITC and ERSP of 16 subjects of 1 channel and the frequency range 1-4Hz (in average), thus I have 2 data arrays: 1st Condition Sham: 16 x 185 --> 16=number of subjects, 185=timepoints with event-related spectral values or intertrial coherence values 2nd Condition Field: 16 x 185 To see if there is any difference between the 2 conditions in all timepoints I performed 185 paired t-tests and now I should control for multiple comparison using a cluster analysis (meaning find out the probability that a certain number of neighbour-timepoints are suprathreshold). Is there a possibility to do that using fieldtrip statistics? And how can I do that? Thank you very much for your help Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 10, Issue 44 ***************************************** -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tim.Bardouille at nrc-cnrc.gc.ca Wed Sep 28 18:24:08 2011 From: Tim.Bardouille at nrc-cnrc.gc.ca (Bardouille, Tim) Date: Wed, 28 Sep 2011 09:24:08 -0700 Subject: [FieldTrip] MSc/PhD Positions at Dalhousie University Message-ID: Hello all, We are recruiting MSc and PhD students for a funded MEG study looking at neuronal connectivity and stroke recovery. Students will have the opportunity to undergo research through the Depts of Kinesiology or Psychology/Neuroscience at Dalhousie University in Halifax, Nova Scotia, Canada. This research project will capitalize on the spatiotemporal resolution of MEG to examine changes in connectivity within the sensorimotor network of individuals post-stroke. Specifically, the goal of this research is to ‘pave the road to post-stroke rehabilitation’. Identifying the ‘normal’ sensorimotor network and establishing the relationship between network re-organization and functional recovery will permit the development and implementation of treatments to direct brain recovery. With regard to the proposed research project, and in groups of non-disabled controls and patients post-stroke, our objectives include: 1. To establish the connectivity pattern of the ‘normal’ sensorimotor network and demonstrate the ability to detect changes within the network using an established motor learning paradigm 2. Using clinical measures of upper limb function, we will establish the relationship between the pattern of sensorimotor network connectivity and functional recovery in well and poorly recovered patients You can find more information at: http://myweb.dal.ca/sh539856/ If interested, please e-mail Dr. Shaun Boe (s.boe at dal.ca) or Dr. Tim Bardouille (tim.bardouille at nrc.ca). Best, Tim Bardouille. --------------------------------------------------------- Timothy Bardouille, PhD, Research Officer Laboratory for Clinical MEG NRC Institute for Biodiagnostics (Atlantic) Office: Halifax Infirmary 3900 - 1796 Summer Street Halifax, Nova Scotia B3H 3A7 Phone: 902-473-1865 Lab: 902-470-3936 Fax: 902-473-1851 --------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekanal at cmu.edu Wed Sep 28 18:34:04 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Wed, 28 Sep 2011 12:34:04 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> Message-ID: <9AC10416-4F89-434E-A3BD-D20EE0E14D19@cmu.edu> Thanks for the clarification. The problem seemed to be that the function was ignoring the input I was providing to `cfg.coordsys`; hopefully the fix you described below will address that. Note that it should also recognize coordsys of `ras`, `als`, and whatever else can be outputted from the interactive alignment process. Thanks, Elli On Sep 28, 2011, at 6:15 AM, jan-mathijs schoffelen wrote: > Dear Elli, > > Your proposed fix is equivalent to swapping the first 2 columns in your tmp.bnd.pnt matrix, i.e. swapping the y and x axis. To me this seems that you can also alleviate this by specifying the proper cfg.coordsys prior to your call to ft_volumerealign. The idea is the following: by specifying the location of nasion/lpa/rpa a transformation matrix can be computed. This transformation matrix will assign the X,Y, and Z axes of the coordinate system. According to different conventions, the X-axis either goes anterior (leading to a 'ALS'-like coordinate system, e.g. used in the CTF-systems and 4D neuroimaging systems), or the X-axis goes to the right (leading to a 'RAS'-like coordinate system, e.g. used in the Neuromag system). This specification will have an effect on the transformation matrix only at the level of ft_volumerealign. Specifying the coordinate system later on (through ft_estimate_coordsys) only adds the field coordsys to the mri-structure, without affecting the tran! > sformation matrix. Adding the coordsys-field just gives an interpretation to the coordinate system (and thus to the transformation matrix). To summarize, I expect that your expectation of the coordinate system in which the sensors are expressed, don't coincide with the coordinate system in which (according to the transformation matrix in combination with the coordsys) the MRI is expressed. See for the different coordinate systems definitions: > > http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined > > For your call to ft_volumerealign you need to specify cfg.coordsys = 'one of the meg-systems'. At the moment this at least works for 'ctf' and 'itab' as strings. These reflect the two major conventions, i.e. X-axis anterior, or X-axis to the right. To de-confuse it a bit, I will add the other MEG-systems also as supported strings. For the time being you can look up in the table in the linked web-page which one you need. I suspect it is 'itab', because the default is ctf-convention. > > Best wishes, > > Jan-Mathijs > > > On Sep 27, 2011, at 9:23 PM, Kanal Eliezer wrote: > >> Unfortunately, it looks like redoing the alignment didn't help. I re-ran `ft_volumerealign` in interactive, and it did add the correct field to the output structure, but the brain is still facing the wrong way. >> >> Is it possible that FieldTrip is ignoring this field when plotting? The plotting functions are pretty complex, and are even more obfuscated than usual due to all the transforms used in aligning everything, so I don't want to try to troubleshoot this one myself since I'd almost certainly find the wrong thing. >> >> In the end, I fixed the problem by simply taking vol.bnd.pnt and vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, this is a workaround rather than a direct fix. Still, if anyone else has this problem, I'm attaching the code below... it seems to have worked. >> >> Elli >> >> ~~~ >> >> tmp = vol; >> >> % transform to spherical coords >> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >> = cart2sph( ... >> tmp.bnd.pnt(:,1), ... >> tmp.bnd.pnt(:,2), ... >> tmp.bnd.pnt(:,3) ); >> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >> = cart2sph( ... >> tmp.bnd.tri(:,1), ... >> tmp.bnd.tri(:,2), ... >> tmp.bnd.tri(:,3) ); >> >> % rotate as necessary >> tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; >> tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; >> >> % transform back to cartesian >> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >> = sph2cart( ... >> tmp.bnd.pnt(:,1), ... >> tmp.bnd.pnt(:,2), ... >> tmp.bnd.pnt(:,3) ); >> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >> = cart2sph( ... >> tmp.bnd.tri(:,1), ... >> tmp.bnd.tri(:,2), ... >> tmp.bnd.tri(:,3) ); >> >> vol = tmp; >> >> >> >> On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: >> >>> OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. >>> Beth. >>> >>> -----Original Message----- >>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>> Sent: Tuesday, September 27, 2011 1:41 PM >>> To: Email discussion list for the FieldTrip project >>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>> >>> Hello Beth - >>> >>> I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - >>> >>> Elli >>> >>> >>> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>> >>>> Elli- >>>> I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. >>>> Hope this helps. >>>> Beth. >>>> >>>> >>>> Beth Belluscio MD-PhD >>>> Clinical Fellow >>>> Human Motor Control Section >>>> NINDS, NIH >>>> 301-402-3495 >>>> >>>> >>>> >>>> -----Original Message----- >>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>> Sent: Tuesday, September 27, 2011 8:50 AM >>>> To: Email discussion list for the FieldTrip project >>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>> >>>> Thanks for forwarding the message to the list. >>>> >>>> Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - >>>> >>>> Elli >>>> >>>> >>>> -------------------- >>>> Eliezer Kanal, Ph.D. >>>> Postdoctoral Fellow >>>> Center for the Neural Basis of Cognition >>>> Carnegie Mellon University >>>> 4400 Fifth Ave, Suite 110A >>>> Pittsburgh PA 15213 >>>> P: 412-268-4115 >>>> F: 412-268-5060 >>>> >>>> >>>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>>> >>>>> >>>>> >>>>> Begin forwarded message: >>>>> >>>>>> From: Kanal Eliezer >>>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>>> To: jan-mathijs schoffelen >>>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>>> >>>>>> Hello Dr Schoffelen - >>>>>> >>>>>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>>>>> >>>>>> However, it seems that there's another related issue. When running the >>>>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>>>> hold on; >>>>>> ft_plot_vol(vol); >>>>>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>>>>> >>>>>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>>>>> mri_realign.coordsys = 'ctf'; >>>>>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>>>>> >>>>>> Any help would be most appreciated! Thanks - >>>>>> >>>>>> Elli >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>>> >>>>>>> Hi Elli, >>>>>>> >>>>>>>> Hello Dr. Schoffelen - >>>>>>>> >>>>>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>>>>> >>>>>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>>>>> >>>>>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>>>>> >>>>>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>>>>> >>>>>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>>>>> >>>>>>>> Thanks - >>>>>>>> >>>>>>>> Eliezer Kanal >>>>>>> >>>>>>> >>>>>>> Best, >>>>>>> >>>>>>> Jan-Mathijs >>>>> >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> >> _______________________________________________ >> 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 > 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 miellet at psy.gla.ac.uk Thu Sep 29 09:29:43 2011 From: miellet at psy.gla.ac.uk (miellet at psy.gla.ac.uk) Date: Thu, 29 Sep 2011 08:29:43 +0100 Subject: [FieldTrip] typo in ft_sourceplot ? In-Reply-To: <9AC10416-4F89-434E-A3BD-D20EE0E14D19@cmu.edu> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> <9AC10416-4F89-434E-A3BD-D20EE0E14D19@cmu.edu> Message-ID: <20110929082943.90622sm9ihbtlw13@horde.psy.gla.ac.uk> Hello, I think there is a typo in ft_sourceplot at line 205. cfg.funcolrolim = ft_getopt(cfg,'funcolorlim', 'auto'); Sorry if it's not the case or if this typo has already been corrected (I am not sure that I'm using the exact last version, I'm using fieldtrip on Glasgow grid). Sebastien ---------------------------------------------- Dr. Sébastien Miellet, Lecturer Department of Psychology University of Fribourg Faucigny 2 1700 Fribourg Switzerland tel: +41 (0)77 489 6468 ---------------------------------------------- Quoting Kanal Eliezer : > Thanks for the clarification. The problem seemed to be that the > function was ignoring the input I was providing to `cfg.coordsys`; > hopefully the fix you described below will address that. Note that > it should also recognize coordsys of `ras`, `als`, and whatever else > can be outputted from the interactive alignment process. > > Thanks, > Elli > > > On Sep 28, 2011, at 6:15 AM, jan-mathijs schoffelen wrote: > >> Dear Elli, >> >> Your proposed fix is equivalent to swapping the first 2 columns in >> your tmp.bnd.pnt matrix, i.e. swapping the y and x axis. To me this >> seems that you can also alleviate this by specifying the proper >> cfg.coordsys prior to your call to ft_volumerealign. The idea is >> the following: by specifying the location of nasion/lpa/rpa a >> transformation matrix can be computed. This transformation matrix >> will assign the X,Y, and Z axes of the coordinate system. According >> to different conventions, the X-axis either goes anterior (leading >> to a 'ALS'-like coordinate system, e.g. used in the CTF-systems and >> 4D neuroimaging systems), or the X-axis goes to the right (leading >> to a 'RAS'-like coordinate system, e.g. used in the Neuromag >> system). This specification will have an effect on the >> transformation matrix only at the level of ft_volumerealign. >> Specifying the coordinate system later on (through >> ft_estimate_coordsys) only adds the field coordsys to the >> mri-structure, without affecting the tran! >> sformation matrix. Adding the coordsys-field just gives an >> interpretation to the coordinate system (and thus to the >> transformation matrix). To summarize, I expect that your >> expectation of the coordinate system in which the sensors are >> expressed, don't coincide with the coordinate system in which >> (according to the transformation matrix in combination with the >> coordsys) the MRI is expressed. See for the different coordinate >> systems definitions: >> >> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >> >> For your call to ft_volumerealign you need to specify cfg.coordsys >> = 'one of the meg-systems'. At the moment this at least works for >> 'ctf' and 'itab' as strings. These reflect the two major >> conventions, i.e. X-axis anterior, or X-axis to the right. To >> de-confuse it a bit, I will add the other MEG-systems also as >> supported strings. For the time being you can look up in the table >> in the linked web-page which one you need. I suspect it is 'itab', >> because the default is ctf-convention. >> >> Best wishes, >> >> Jan-Mathijs >> >> >> On Sep 27, 2011, at 9:23 PM, Kanal Eliezer wrote: >> >>> Unfortunately, it looks like redoing the alignment didn't help. I >>> re-ran `ft_volumerealign` in interactive, and it did add the >>> correct field to the output structure, but the brain is still >>> facing the wrong way. >>> >>> Is it possible that FieldTrip is ignoring this field when >>> plotting? The plotting functions are pretty complex, and are even >>> more obfuscated than usual due to all the transforms used in >>> aligning everything, so I don't want to try to troubleshoot this >>> one myself since I'd almost certainly find the wrong thing. >>> >>> In the end, I fixed the problem by simply taking vol.bnd.pnt and >>> vol.bnd.tri, applying cart2sph, adding pi/2, and applying >>> sph2cart. However, this is a workaround rather than a direct fix. >>> Still, if anyone else has this problem, I'm attaching the code >>> below... it seems to have worked. >>> >>> Elli >>> >>> ~~~ >>> >>> tmp = vol; >>> >>> % transform to spherical coords >>> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >>> = cart2sph( ... >>> tmp.bnd.pnt(:,1), ... >>> tmp.bnd.pnt(:,2), ... >>> tmp.bnd.pnt(:,3) ); >>> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >>> = cart2sph( ... >>> tmp.bnd.tri(:,1), ... >>> tmp.bnd.tri(:,2), ... >>> tmp.bnd.tri(:,3) ); >>> >>> % rotate as necessary >>> tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; >>> tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; >>> >>> % transform back to cartesian >>> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >>> = sph2cart( ... >>> tmp.bnd.pnt(:,1), ... >>> tmp.bnd.pnt(:,2), ... >>> tmp.bnd.pnt(:,3) ); >>> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >>> = cart2sph( ... >>> tmp.bnd.tri(:,1), ... >>> tmp.bnd.tri(:,2), ... >>> tmp.bnd.tri(:,3) ); >>> >>> vol = tmp; >>> >>> >>> >>> On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>> >>>> OK, Elli, I think you have the source of your problem - I'm glad >>>> that helped. To redefine the alignment, you can use >>>> ft_volumerealign in interactive mode. Be sure to read the >>>> instructions that come up in your matlab workspace simultaneously >>>> with the image so that you mark your volume as you wish (I found >>>> this a little confusing initially). As you mark your landmarks >>>> (eg l, r, n or a,p,s) you should also see the coordinates written >>>> out in the workspace. This should confirm that your realignment >>>> is taking place. After you have done this, you can check it >>>> again with the ft_determine_coordsys to make sure. >>>> Beth. >>>> >>>> -----Original Message----- >>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>> Sent: Tuesday, September 27, 2011 1:41 PM >>>> To: Email discussion list for the FieldTrip project >>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>> >>>> Hello Beth - >>>> >>>> I actually hadn't tried using `ft_determine_coordsys` on the >>>> `ft_prepare_headmodel` output, and it turns out that it's >>>> incorrect; it has the anterior along the Y axis, when it should >>>> be along the Y. However, changing it doesn't seem to do anything! >>>> I.e., using `ft_determine_coordsys` to redefine the alignment, >>>> and then re-running `ft_plot_vol` - or even re-running >>>> `ft_determine_coordsys` on the new structure - doesn't seem to >>>> change anything! The field `coordsys` has been added (and now >>>> reads "ras"), but this doesn't seem to affect anything. Is this a >>>> bug? Do I need to apply a transformation function to make the new >>>> coordsys take effect? Thanks - >>>> >>>> Elli >>>> >>>> >>>> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>>> >>>>> Elli- >>>>> I had similar problems at one point. You may already have tried >>>>> this, but for what it's worth, here are a couple of suggestions: >>>>> you can check each type of volume or array with >>>>> ft_determine_coordsys. This will give you an image with the >>>>> x,y,z coordinates superimposed so that you can check directly >>>>> what type of coordinate system is attached to the volume. >>>>> Secondly, when using ft_volumerealign, interactive, make sure >>>>> you are not incorrectly identifying right and left. Sometimes >>>>> in the conversion of DICOM to another system, left and right are >>>>> switched. >>>>> Hope this helps. >>>>> Beth. >>>>> >>>>> >>>>> Beth Belluscio MD-PhD >>>>> Clinical Fellow >>>>> Human Motor Control Section >>>>> NINDS, NIH >>>>> 301-402-3495 >>>>> >>>>> >>>>> >>>>> -----Original Message----- >>>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>>> Sent: Tuesday, September 27, 2011 8:50 AM >>>>> To: Email discussion list for the FieldTrip project >>>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>>> >>>>> Thanks for forwarding the message to the list. >>>>> >>>>> Just to clarify, the reconstruction worked fine; the brain looks >>>>> good. The problem is that it's facing the wrong way; in the, the >>>>> helmet is facing left/back, and the brain is turned 90 degrees >>>>> to the right (facing forward in the image). If anyone knows how >>>>> to either correct it as it is or how to re-run the analysis to >>>>> prevent it from happening I'd be most appreciative. If any more >>>>> details are needed, please just ask! Thanks - >>>>> >>>>> Elli >>>>> >>>>> >>>>> -------------------- >>>>> Eliezer Kanal, Ph.D. >>>>> Postdoctoral Fellow >>>>> Center for the Neural Basis of Cognition >>>>> Carnegie Mellon University >>>>> 4400 Fifth Ave, Suite 110A >>>>> Pittsburgh PA 15213 >>>>> P: 412-268-4115 >>>>> F: 412-268-5060 >>>>> >>>>> >>>>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>>>> >>>>>> >>>>>> >>>>>> Begin forwarded message: >>>>>> >>>>>>> From: Kanal Eliezer >>>>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>>>> To: jan-mathijs schoffelen >>>>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>>>> >>>>>>> Hello Dr Schoffelen - >>>>>>> >>>>>>> Thanks for the advice. The way I got this part to work was to >>>>>>> use SPM to convert my DICOM files to NIfTI ('*.img') and use >>>>>>> `ft_read_mri` on that file, instead of reading the DICOM files >>>>>>> directly. Using this method, I was able to reconstruct well. >>>>>>> >>>>>>> However, it seems that there's another related issue. When running the >>>>>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>>>>> hold on; >>>>>>> ft_plot_vol(vol); >>>>>>> check, I got the attached image. Do you have any idea why it's >>>>>>> doing that? Please let me know if I can provide any more >>>>>>> details which could help troubleshoot. >>>>>>> >>>>>>> In case it's relevant, I did notice that the output structure >>>>>>> of the `ft_volumerealign` function (run with >>>>>>> method='interactive') contained the following field: >>>>>>> mri_realign.coordsys = 'ctf'; >>>>>>> That can't be correct. I'm pretty sure it should be 'nifti'. >>>>>>> However, I tried re-running `ft_volumesegment` after manually >>>>>>> changing that value, and the figure looks the same. >>>>>>> >>>>>>> Any help would be most appreciated! Thanks - >>>>>>> >>>>>>> Elli >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>>>> >>>>>>>> Hi Elli, >>>>>>>> >>>>>>>>> Hello Dr. Schoffelen - >>>>>>>>> >>>>>>>>> I sent a response to the below email, but I think it got >>>>>>>>> lost in the shuffle. I tried what you suggested, and I got >>>>>>>>> the image attached below (matlab figure). >>>>>>>>> >>>>>>>>> Two questions: (1) What could be the cause of this poor >>>>>>>>> alignment? This isn't right/left flipping, as the nose also >>>>>>>>> looks to be in the back. (2) Do you have any idea why the >>>>>>>>> reconstruction of the MRI looks so poor? FreeSurfer >>>>>>>>> reconstructions looked much "healthier". >>>>>>>> >>>>>>>> To combine both questions into 1 answer, I wouldn't say that >>>>>>>> the alignment is bad, it's the segmentation that seems to be >>>>>>>> completely off. This usually happens, when FieldTrip assigns >>>>>>>> the wrong coordinate system to the MRI. For the segmentation >>>>>>>> to work, SPM needs an approximate coregistration of the MRI >>>>>>>> in MNI-space. FieldTrip tries to achieve this, and needs the >>>>>>>> tag mri.coordsys for this. This tag is usually set after a >>>>>>>> pass through ft_volumerealign, where you can specify a >>>>>>>> cfg.coordsys (I just noticed this as an undocumented option: >>>>>>>> perhaps that needs to change). By default, this tag is set to >>>>>>>> 'ctf', see >>>>>>>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless >>>>>>>> segmentation. >>>>>>>> >>>>>>>>> You mentioned below that I could simply load the up >>>>>>>>> freesurfer files and go from there. All the *.mgz files I've >>>>>>>>> found from freesurfer processing are simply volumetric MRI >>>>>>>>> files. The surface files are stored in a variety of formats >>>>>>>>> with seemingly no file extension. Is there a way to load >>>>>>>>> FreeSurfer surfaces, or should I be using >>>>>>>>> `ft_prepare_headmodel` to do that? >>>>>>>> >>>>>>>> The ft_read_headshape function should be able to read >>>>>>>> freesurfer triangle and quadrangle files. Use it as >>>>>>>> ft_read_headshape(filename, 'fileformat', >>>>>>>> 'freesurfer-triangle_binary'); >>>>>>>> >>>>>>>>> Thanks - >>>>>>>>> >>>>>>>>> Eliezer Kanal >>>>>>>> >>>>>>>> >>>>>>>> Best, >>>>>>>> >>>>>>>> Jan-Mathijs >>>>>> >>>>>> Jan-Mathijs Schoffelen, MD PhD >>>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>>> Centre for Cognitive Neuroimaging, >>>>>> Radboud University 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 >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > ---------------------------------------------------------------- This message was sent using the Web mail system for The University of Glasgow School of Psychology ------------------------------------------------------------------ From Caroline.Lustenberger at kispi.uzh.ch Thu Sep 29 09:45:01 2011 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Thu, 29 Sep 2011 09:45:01 +0200 Subject: [FieldTrip] cluster analysis (statistics) with one channels and multiple timepoints Message-ID: <8D58B6880DD231469FA0128331363CED03DB01E5@exzh1.kispi.int> Dear all How can I define neighbour-timepoints, normally all tutorials explain how to define neighbour sensors or channels, but I have only 1 channel and 185 timepoints. Thus, I want to perform cluster analysis to see whether a certain timepoint cluster is significant. Thanks for help and best wishes Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Sep 29 09:49:03 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 29 Sep 2011 09:49:03 +0200 Subject: [FieldTrip] typo in ft_sourceplot ? In-Reply-To: <20110929082943.90622sm9ihbtlw13@horde.psy.gla.ac.uk> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> <9AC10416-4F89-434E-A3BD-D20EE0E14D19@cmu.edu> <20110929082943.90622sm9ihbtlw13@horde.psy.gla.ac.uk> Message-ID: Hi Sebastien, That indeed looks like a typo. It was, however, fixed in revision 3744 (see http://code.google.com/p/fieldtrip/source/diff?spec=svn4313&r=3744&format=side&path=/trunk/ft_sourceplot.m&old_path=/trunk/ft_sourceplot.m&old=3674), on June 29, so if you update your FT version it should disappear. Best, Eelke 2011/9/29 : > Hello, > I think there is a typo in ft_sourceplot at line 205. > > cfg.funcolrolim = ft_getopt(cfg,'funcolorlim', 'auto'); > > Sorry if it's not the case or if this typo has already been corrected (I am > not sure that I'm using the exact last version, I'm using fieldtrip on > Glasgow grid). > > Sebastien > > ---------------------------------------------- > Dr. Sébastien Miellet, Lecturer > > Department of Psychology > University of Fribourg > Faucigny 2 > 1700 Fribourg > Switzerland > > tel: +41 (0)77 489 6468 > ---------------------------------------------- > > > > Quoting Kanal Eliezer : > >> Thanks for the clarification. The problem seemed to be that the function >> was ignoring the input I was providing to `cfg.coordsys`; hopefully the fix >> you described below will address that. Note that it should also recognize >> coordsys of `ras`, `als`, and whatever else can be outputted from the >> interactive alignment process. >> >> Thanks, >> Elli >> >> >> On Sep 28, 2011, at 6:15 AM, jan-mathijs schoffelen wrote: >> >>> Dear Elli, >>> >>> Your proposed fix is equivalent to swapping the first 2 columns in your >>> tmp.bnd.pnt matrix, i.e. swapping the y and x axis. To me this seems that >>> you can also alleviate this by specifying the proper cfg.coordsys prior to >>> your call to ft_volumerealign. The idea is the following: by specifying the >>> location of nasion/lpa/rpa a transformation matrix can be computed. This >>> transformation matrix will assign the X,Y, and Z axes of the coordinate >>> system. According to different conventions, the X-axis either goes anterior >>> (leading to a 'ALS'-like coordinate system, e.g. used in the CTF-systems and >>> 4D neuroimaging systems), or the X-axis goes to the right (leading to a >>> 'RAS'-like coordinate system, e.g. used in the Neuromag system). This >>> specification will have an effect on the transformation matrix only at the >>> level of ft_volumerealign. Specifying the coordinate system later on >>> (through ft_estimate_coordsys) only adds the field coordsys to the >>> mri-structure, without affecting the tran! >>> sformation matrix. Adding the coordsys-field just gives an interpretation >>> to the coordinate system (and thus to the transformation matrix). To >>> summarize, I expect that your expectation of the coordinate system in which >>> the sensors are expressed, don't coincide with the coordinate system in >>> which (according to the transformation matrix in combination with the >>> coordsys) the MRI is expressed. See for the different coordinate systems >>> definitions: >>> >>> >>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>> >>> For your call to ft_volumerealign you need to specify cfg.coordsys = 'one >>> of the meg-systems'. At the moment this at least works for 'ctf' and 'itab' >>> as strings. These reflect the two major conventions, i.e. X-axis anterior, >>> or X-axis to the right. To de-confuse it a bit, I will add the other >>> MEG-systems also as supported strings. For the time being you can look up in >>> the table in the linked web-page which one you need. I suspect it is 'itab', >>> because the default is ctf-convention. >>> >>> Best wishes, >>> >>> Jan-Mathijs >>> >>> >>> On Sep 27, 2011, at 9:23 PM, Kanal Eliezer wrote: >>> >>>> Unfortunately, it looks like redoing the alignment didn't help. I re-ran >>>> `ft_volumerealign` in interactive, and it did add the correct field to the >>>> output structure, but the brain is still facing the wrong way. >>>> >>>> Is it possible that FieldTrip is ignoring this field when plotting? The >>>> plotting functions are pretty complex, and are even more obfuscated than >>>> usual due to all the transforms used in aligning everything, so I don't want >>>> to try to troubleshoot this one myself since I'd almost certainly find the >>>> wrong thing. >>>> >>>> In the end, I fixed the problem by simply taking vol.bnd.pnt and >>>> vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, >>>> this is a workaround rather than a direct fix. Still, if anyone else has >>>> this problem, I'm attaching the code below... it seems to have worked. >>>> >>>> Elli >>>> >>>> ~~~ >>>> >>>> tmp = vol; >>>> >>>> % transform to spherical coords >>>> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >>>> = cart2sph( ... >>>>  tmp.bnd.pnt(:,1), ... >>>>  tmp.bnd.pnt(:,2), ... >>>>  tmp.bnd.pnt(:,3) ); >>>> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >>>> = cart2sph( ... >>>>  tmp.bnd.tri(:,1), ... >>>>  tmp.bnd.tri(:,2), ... >>>>  tmp.bnd.tri(:,3) ); >>>> >>>> % rotate as necessary >>>> tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; >>>> tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; >>>> >>>> % transform back to cartesian >>>> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >>>> = sph2cart( ... >>>>  tmp.bnd.pnt(:,1), ... >>>>  tmp.bnd.pnt(:,2), ... >>>>  tmp.bnd.pnt(:,3) ); >>>> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >>>> = cart2sph( ... >>>>  tmp.bnd.tri(:,1), ... >>>>  tmp.bnd.tri(:,2), ... >>>>  tmp.bnd.tri(:,3) ); >>>> >>>> vol = tmp; >>>> >>>> >>>> >>>> On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>>> >>>>> OK, Elli, I think you have the source of your problem - I'm glad that >>>>> helped.  To redefine the alignment, you can use ft_volumerealign in >>>>> interactive mode.  Be sure to read the instructions that come up in your >>>>> matlab workspace simultaneously with the image so that you mark your volume >>>>> as you wish (I found this a little confusing initially). As you mark your >>>>> landmarks (eg l, r, n or a,p,s) you should also see the coordinates written >>>>> out in the workspace.  This should confirm that your realignment is taking >>>>> place.  After you have done this, you can check it again with the >>>>> ft_determine_coordsys to make sure. >>>>> Beth. >>>>> >>>>> -----Original Message----- >>>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>>> Sent: Tuesday, September 27, 2011 1:41 PM >>>>> To: Email discussion list for the FieldTrip project >>>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>>> >>>>> Hello Beth - >>>>> >>>>> I actually hadn't tried using `ft_determine_coordsys` on the >>>>> `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has >>>>> the anterior along the Y axis, when it should be along the Y. However, >>>>> changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` >>>>> to redefine the alignment, and then re-running `ft_plot_vol` - or even >>>>> re-running `ft_determine_coordsys` on the new structure - doesn't seem to >>>>> change anything! The field `coordsys` has been added (and now reads "ras"), >>>>> but this doesn't seem to affect anything. Is this a bug? Do I need to apply >>>>> a transformation function to make the new coordsys take effect? Thanks - >>>>> >>>>> Elli >>>>> >>>>> >>>>> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>>>> >>>>>> Elli- >>>>>> I had similar problems at one point.  You may already have tried this, >>>>>> but for what it's worth, here are a couple of suggestions:  you can check >>>>>> each type of volume or array with ft_determine_coordsys.  This will give you >>>>>> an image with the x,y,z coordinates superimposed so that you can check >>>>>> directly what type of coordinate system is attached to the volume. >>>>>>  Secondly, when using ft_volumerealign, interactive, make sure you are not >>>>>> incorrectly identifying right and left.  Sometimes in the conversion of >>>>>> DICOM to another system, left and right are switched. >>>>>> Hope this helps. >>>>>> Beth. >>>>>> >>>>>> >>>>>> Beth Belluscio MD-PhD >>>>>> Clinical Fellow >>>>>> Human Motor Control Section >>>>>> NINDS, NIH >>>>>> 301-402-3495 >>>>>> >>>>>> >>>>>> >>>>>> -----Original Message----- >>>>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>>>> Sent: Tuesday, September 27, 2011 8:50 AM >>>>>> To: Email discussion list for the FieldTrip project >>>>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>>>> >>>>>> Thanks for forwarding the message to the list. >>>>>> >>>>>> Just to clarify, the reconstruction worked fine; the brain looks good. >>>>>> The problem is that it's facing the wrong way; in the, the helmet is facing >>>>>> left/back, and the brain is turned 90 degrees to the right (facing forward >>>>>> in the image). If anyone knows how to either correct it as it is or how to >>>>>> re-run the analysis to prevent it from happening I'd be most appreciative. >>>>>> If any more details are needed, please just ask! Thanks - >>>>>> >>>>>> Elli >>>>>> >>>>>> >>>>>> -------------------- >>>>>> Eliezer Kanal, Ph.D. >>>>>> Postdoctoral Fellow >>>>>> Center for the Neural Basis of Cognition >>>>>> Carnegie Mellon University >>>>>> 4400 Fifth Ave, Suite 110A >>>>>> Pittsburgh PA 15213 >>>>>> P: 412-268-4115 >>>>>> F: 412-268-5060 >>>>>> >>>>>> >>>>>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> Begin forwarded message: >>>>>>> >>>>>>>> From: Kanal Eliezer >>>>>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>>>>> To: jan-mathijs schoffelen >>>>>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>>>>> >>>>>>>> Hello Dr Schoffelen - >>>>>>>> >>>>>>>> Thanks for the advice. The way I got this part to work was to use >>>>>>>> SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on >>>>>>>> that file, instead of reading the DICOM files directly. Using this method, I >>>>>>>> was able to reconstruct well. >>>>>>>> >>>>>>>> However, it seems that there's another related issue. When running >>>>>>>> the >>>>>>>>        ft_plot_sens(data_preprocessed.hdr.grad); >>>>>>>>        hold on; >>>>>>>>        ft_plot_vol(vol); >>>>>>>> check, I got the attached image. Do you have any idea why it's doing >>>>>>>> that? Please let me know if I can provide any more details which could help >>>>>>>> troubleshoot. >>>>>>>> >>>>>>>> In case it's relevant, I did notice that the output structure of the >>>>>>>> `ft_volumerealign` function (run with method='interactive') contained the >>>>>>>> following field: >>>>>>>>        mri_realign.coordsys = 'ctf'; >>>>>>>> That can't be correct. I'm pretty sure it should be 'nifti'. >>>>>>>> However, I tried re-running `ft_volumesegment` after manually changing that >>>>>>>> value, and the figure looks the same. >>>>>>>> >>>>>>>> Any help would be most appreciated! Thanks - >>>>>>>> >>>>>>>> Elli >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>>>>> >>>>>>>>> Hi Elli, >>>>>>>>> >>>>>>>>>> Hello Dr. Schoffelen - >>>>>>>>>> >>>>>>>>>> I sent a response to the below email, but I think it got lost in >>>>>>>>>> the shuffle. I tried what you suggested, and I got the image attached below >>>>>>>>>> (matlab figure). >>>>>>>>>> >>>>>>>>>> Two questions: (1) What could be the cause of this poor alignment? >>>>>>>>>> This isn't right/left flipping, as the nose also looks to be in the back. >>>>>>>>>> (2) Do you have any idea why the reconstruction of the MRI looks so poor? >>>>>>>>>> FreeSurfer reconstructions looked much "healthier". >>>>>>>>> >>>>>>>>> To combine both questions into 1 answer, I wouldn't say that the >>>>>>>>> alignment is bad, it's the segmentation that seems to be completely off. >>>>>>>>> This usually happens, when FieldTrip assigns the wrong coordinate system to >>>>>>>>> the MRI. For the segmentation to work, SPM needs an approximate >>>>>>>>> coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and >>>>>>>>> needs the tag mri.coordsys for this. This tag is usually set after a pass >>>>>>>>> through ft_volumerealign, where you can specify a cfg.coordsys (I just >>>>>>>>> noticed this as an undocumented option: perhaps that needs to change). By >>>>>>>>> default, this tag is set to 'ctf', see >>>>>>>>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>>>>>>>> for a definition of the coordinate systems. If the coordinate system in >>>>>>>>> which the sensors are defined differs from the ctf coordinate system, >>>>>>>>> causing a bad initial alignmnent prior to the segmentation and a worthless >>>>>>>>> segmentation. >>>>>>>>> >>>>>>>>>> You mentioned below that I could simply load the up freesurfer >>>>>>>>>> files and go from there. All the *.mgz files I've found from freesurfer >>>>>>>>>> processing are simply volumetric MRI files. The surface files are stored in >>>>>>>>>> a variety of formats with seemingly no file extension. Is there a way to >>>>>>>>>> load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do >>>>>>>>>> that? >>>>>>>>> >>>>>>>>> The ft_read_headshape function should be able to read freesurfer >>>>>>>>> triangle and quadrangle files. Use it as ft_read_headshape(filename, >>>>>>>>> 'fileformat', 'freesurfer-triangle_binary'); >>>>>>>>> >>>>>>>>>> Thanks - >>>>>>>>>> >>>>>>>>>> Eliezer Kanal >>>>>>>>> >>>>>>>>> >>>>>>>>> Best, >>>>>>>>> >>>>>>>>> Jan-Mathijs >>>>>>> >>>>>>> Jan-Mathijs Schoffelen, MD PhD >>>>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>>>> Centre for Cognitive Neuroimaging, >>>>>>> Radboud University 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 >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> 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 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > ---------------------------------------------------------------- >  This message was sent using the Web mail system for >  The University of Glasgow School of Psychology > ------------------------------------------------------------------ > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From Jan.Hirschmann at med.uni-duesseldorf.de Thu Sep 29 16:11:33 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Thu, 29 Sep 2011 16:11:33 +0200 Subject: [FieldTrip] reading NM data with newest filedtrip Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02F7C09F@Mail2-UKD.VMED.UKD> Hi, don't know if somebody pointed it out earlier... I changed to the newest ft version today and got the following error from ft_preprocessing when reading neuromag data. Undefined function or variable "ori". Error in channelposition (line 260) ori = ori; % second output argument Error in fixsens (line 53) [chanpos, chanori, tmp] = channelposition(sens, 'channel', 'all'); Error in ft_read_header (line 1472) hdr.grad = fixsens(hdr.grad); Error in ft_preprocessing (line 360) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 29 21:06:16 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 29 Sep 2011 21:06:16 +0200 Subject: [FieldTrip] reading NM data with newest filedtrip In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B02F7C09F@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B02F7C09F@Mail2-UKD.VMED.UKD> Message-ID: <3FAFA55E-EA71-489C-944E-42C36B4D7A40@donders.ru.nl> Dear Jan, Thanks for noticing. Apologies for this. It's my fault. I fixed it now. Best wishes, Jan-Mathijs On Sep 29, 2011, at 4:11 PM, wrote: > Hi, > > don’t know if somebody pointed it out earlier… I changed to the newest ft version today and got the following error from ft_preprocessing when reading neuromag data. > > Undefined function or variable "ori". > > Error in channelposition (line 260) > ori = ori; % second output argument > > Error in fixsens (line 53) > [chanpos, chanori, tmp] = channelposition(sens, 'channel', 'all'); > > Error in ft_read_header (line 1472) > hdr.grad = fixsens(hdr.grad); > > Error in ft_preprocessing (line 360) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Best, > jan > > Jan Hirschmann > MSc. Neuroscience > Insititute of Clinical Neuroscience and Medical Psychology > Heinrich Heine University Duesseldorf > Universitaetsstr. 1 > 40225 Duesseldorf > Tel: 0049 - (0)211 - 81 - 18415 > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From BelluscB at ninds.nih.gov Thu Sep 29 22:54:55 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Thu, 29 Sep 2011 16:54:55 -0400 Subject: [FieldTrip] beamforming tutorial, error using ft_freqanalysis to create CSD matrix Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CD01@NIHMLBX10.nih.gov> Hi group- When I follow the instructions of the tutorial for localizing oscillatory sources using beamforming, I run into a problem calculating the cross spectral density matrix. The tutorial does not indicate specifying the taper, and therefore ft_freqanalysis defaults to dpss. Then I get an error message as below. I confess ignorance that I do not understand what the code means when it says "ensure that the input arguments are double precision" so I don't know if my data structure conforms to this requirement. My data are time segments of 100 msec in length (each for pre and post) sampled at 1200 Hz, with 73 trials. Here are the commands I used and the error I got: cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 4; cfg.foilim = [20 20]; test = ft_freqanalysis(cfg, dataCB24_03_stim1_Pre) the input is raw data with 273 channels and 73 trials processing trials ??? Undefined function or method 'dpss' for input arguments of type 'double'. Error in ==> ft_specest_mtmfft>double_dpss at 171 tap = dpss(double(a), double(b), varargin{:}); Error in ==> ft_specest_mtmfft at 87 tap = double_dpss(ndatsample,ndatsample*(tapsmofrq./fsample))'; Error in ==> ft_freqanalysis at 492 [spectrum,ntaper,foi] = ft_specest_mtmfft(dat, time, 'taper', cfg.taper, options{:}, 'feedback', fbopt); This is specific to the dpss taper (obviously) and when I specify cfg.taper = 'hanning' the function runs fine. I can create the CSD matrix this way, but I'd like to understand why dpss isn't working and what the requirement for double precision means. Thanks for your help, Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.piantoni at nin.knaw.nl Fri Sep 30 09:46:01 2011 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Fri, 30 Sep 2011 09:46:01 +0200 Subject: [FieldTrip] beamforming tutorial, error using ft_freqanalysis to create CSD matrix In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C059826CD01@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C059826CD01@NIHMLBX10.nih.gov> Message-ID: Hi Beth, dpss is a function of the Signal Processing Toolbox of Matlab http://www.mathworks.nl/help/toolbox/signal/ref/dpss.html The Signal Processing Toolbox is a addon which requires an extra license. You can check the available toolboxes in your matlab installation by running "ver". I don't know if there are free implementations of dpss.m, otherwise you can ask your institute to buy one. Double and single precision is a way of storing numbers on the computer. http://www.mathworks.nl/help/techdoc/matlab_prog/f2-12135.html Double precision numbers have a larger range than single-precision (and use more memory). Some functions of Matlab, at least in earlier versions, were unstable with single precision values, that's why it's better if you store and work with your data as 'double'. Note that the function 'double_dpss' converts the data into 'double' before passing it to 'dpss.m' anyway. You can check if your data is single or double, by doing: class(data.trial{1}) HTH, Gio On Thu, Sep 29, 2011 at 22:54, Belluscio, Beth (NIH/NINDS) [E] wrote: > Hi group- > >   When I follow the instructions of the tutorial for localizing oscillatory > sources using beamforming, I run into a problem calculating the cross > spectral density matrix.  The tutorial does not indicate specifying the > taper, and therefore ft_freqanalysis defaults to dpss.  Then I get an error > message as below.  I confess ignorance that I do not understand what the > code means when it says “ensure that the input arguments are double > precision” so I don’t know if my data structure conforms to this > requirement.  My data are time segments of 100 msec in length (each for pre > and post) sampled at 1200 Hz, with 73 trials.  Here are the commands I used > and the error I got: > > > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [20 20]; > > test = ft_freqanalysis(cfg, dataCB24_03_stim1_Pre) the input is raw data > with 273 channels and 73 trials processing trials ??? Undefined function or > method 'dpss' for input arguments of type 'double'. > > > > Error in ==> ft_specest_mtmfft>double_dpss at 171 tap = dpss(double(a), > double(b), varargin{:}); > > > > Error in ==> ft_specest_mtmfft at 87 > >     tap = double_dpss(ndatsample,ndatsample*(tapsmofrq./fsample))'; > > > > Error in ==> ft_freqanalysis at 492 > >         [spectrum,ntaper,foi] = ft_specest_mtmfft(dat, time, 'taper', > cfg.taper, options{:}, > >         'feedback', fbopt); > > > > This is specific to the dpss taper (obviously) and when I specify cfg.taper > = ‘hanning’ the function runs fine.  I can create the CSD matrix this way, > but I’d like to understand why dpss isn’t working and what the requirement > for double precision means. > > Thanks for your help, > > Beth. > > > > > > > > > > Beth Belluscio MD-PhD > > Clinical Fellow > > Human Motor Control Section > > NINDS, NIH > > 301-402-3495 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From Jan.Hirschmann at med.uni-duesseldorf.de Fri Sep 30 15:23:49 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Fri, 30 Sep 2011 15:23:49 +0200 Subject: [FieldTrip] reading NM data with newest filedtrip In-Reply-To: <3FAFA55E-EA71-489C-944E-42C36B4D7A40@donders.ru.nl> References: <72E993C35FB11743B79FF9286E5B6D8B02F7C09F@Mail2-UKD.VMED.UKD> <3FAFA55E-EA71-489C-944E-42C36B4D7A40@donders.ru.nl> Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02F7C1CD@Mail2-UKD.VMED.UKD> Cheers!! ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von jan-mathijs schoffelen Gesendet: Donnerstag, 29. September 2011 21:06 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] reading NM data with newest filedtrip Dear Jan, Thanks for noticing. Apologies for this. It's my fault. I fixed it now. Best wishes, Jan-Mathijs On Sep 29, 2011, at 4:11 PM, wrote: Hi, don't know if somebody pointed it out earlier... I changed to the newest ft version today and got the following error from ft_preprocessing when reading neuromag data. Undefined function or variable "ori". Error in channelposition (line 260) ori = ori; % second output argument Error in fixsens (line 53) [chanpos, chanori, tmp] = channelposition(sens, 'channel', 'all'); Error in ft_read_header (line 1472) hdr.grad = fixsens(hdr.grad); Error in ft_preprocessing (line 360) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 _______________________________________________ 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From johemart at gmail.com Fri Sep 30 17:35:30 2011 From: johemart at gmail.com (=?ISO-8859-1?Q?Johann_Heinz_Mart=EDnez_Huartos?=) Date: Fri, 30 Sep 2011 17:35:30 +0200 Subject: [FieldTrip] dividing totoplot ot get channels! Message-ID: Hello dear fieldtripers Im trying to divide 148 MEG channels from ft_topoplotER( ) plot into several groups equally distributed (as much as it can) from that head plot in order to get those channel info groups to work with them in another script. I Dunno if anyone has already done that routine, and whether it is possible to send me the code or the pseudocode to do that, or instead, whether anyone can give me some recommendation about where i can start. tnks buddies Atentamente: Johann Martínez. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysoevao at psychiatry.wustl.edu Thu Sep 1 08:09:04 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 01:09:04 -0500 Subject: [FieldTrip] ROC Message-ID: <76DC57362137854CB9592B496182D5FA060CE58423@wusmexmbx2.medpriv.wucon.wustl.edu> Dear field trippers, I'd like to use the Receiver Operator Characteristic (ROC) as a stat_function for fr_timelockanlaysis (monte carlo perputation test). I found the relevant function in the statfun folder, but it does not have the critical value, at which to base the subsequent analysis. Can you provide me with the hint how to implement it properly. What value of AUC can be used as a threshold? The other issue is that I also want to construct the ROC based on the 2 independent parameters obtained from the same subjects. I mean that I want to use the conbined criterium for the classification (parameter1>X and parameter 2>Y). Can you recommend to me the proper way to do it in matlab? Best Regards, Olga. Olga Sysoeva, Research Associate, PhD Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. From sysoevao at psychiatry.wustl.edu Thu Sep 1 08:20:15 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 01:20:15 -0500 Subject: [FieldTrip] ANOVA mixed design, main effect Message-ID: <76DC57362137854CB9592B496182D5FA060CE58424@wusmexmbx2.medpriv.wucon.wustl.edu> Dear fieldtriper, I still a bit confused about mixed between/within subjects ANOVA design. For example I have 1 within subject factor (condition1 and condition2) and 2 group of subjects. I'd like to examine the effect the effect of group and effect of condition, a well as interaction. The only effect I managed to examine with filedtrip right now is the interaction one. I subtracted cond1-cond2 and applied ft_timelockstatistic with independentT. I believe this approach is related to the concept of the between/within factors interaction. But how to examine main effects? I can certainly test them separately, but I appreciate any help. I believe I more or less understand the theory underlying this analysis, but what I need more now is how to implement in technically. Best, Olga. Olga Sysoeva, Research Associate, PhD Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. From Irina.Simanova at mpi.nl Thu Sep 1 16:19:42 2011 From: Irina.Simanova at mpi.nl (Irina Simanova) Date: Thu, 1 Sep 2011 16:19:42 +0200 Subject: [FieldTrip] cluster statistic error Message-ID: <0BD10838-698F-4069-B29B-2BE15CED26A5@mpi.nl> Dear Fieldtripers, I am getting "Too many input arguments" error when running permutation test on event-related data. This has to do with the 'issource' input to "statistics_montecarlo": I use same cfg parameters as in the tutorials for the permutation test. I got the error repeatedly few times on my own data, and then I checked that the error was still there for the tutorial datasets FIC, FC . % this is the tutorial data. The cfg options are same as in the tutorials [stat] = ft_timelockstatistics(cfg, timelockFIC, timelockFC); selected 149 channels selected 301 time bins selected 1 frequency bins Using the gradiometer configuration from the dataset. there are on average 4.7 neighbours per channel using "statistics_montecarlo" for the statistical testing ??? Error using ==> fieldtrip/private/statistics_montecarlo Too many input arguments. Error in ==> statistics_wrapper at 285 [stat, cfg] = statmethod(cfg, dat, cfg.design, 'issource',issource); Error in ==> ft_timelockstatistics at 119 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What is wrong here? I would appreciate any help. Kind regards, Irina From e.maris at donders.ru.nl Thu Sep 1 16:26:34 2011 From: e.maris at donders.ru.nl (Eric Maris) Date: Thu, 1 Sep 2011 16:26:34 +0200 Subject: [FieldTrip] ANOVA mixed design, main effect In-Reply-To: <76DC57362137854CB9592B496182D5FA060CE58424@wusmexmbx2.medpriv.wucon.wustl.edu> References: <76DC57362137854CB9592B496182D5FA060CE58424@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: <019b01cc68b3$29a42640$7cec72c0$@maris@donders.ru.nl> Hi Olga, > I still a bit confused about mixed between/within subjects ANOVA design. > For example I have 1 within subject factor (condition1 and condition2) and 2 > group of subjects. I'd like to examine the effect the effect of group and > effect of condition, a well as interaction. The only effect I managed to > examine with filedtrip right now is the interaction one. I subtracted cond1- > cond2 and applied ft_timelockstatistic with independentT. I believe this > approach is related to the concept of the between/within factors > interaction. But how to examine main effects? I can certainly test them > separately, but > > I appreciate any help. > I believe I more or less understand the theory underlying this analysis, but > what I need more now is how to implement in technically. Main effect of Group: Do a between-subjects analysis (using indepsamplesT) on the dependent variable cond1+cond2 Main effect of the within subjects factor: Do a within-subjects analysis of cond1 versus cond2 (using depsamplesT), ignoring the Group variable. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands Visiting address: Spinozagebouw Room B.03.44 T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 mailto:e.maris at donders.ru.nl http://www.nphyscog.com/ > > Best, > Olga. > > > Olga Sysoeva, > Research Associate, PhD > Washington University School of Medicine > Campus Box 8134 > 660 South Euclid Ave > Saint Louis, MO 63110-9909 > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you are > not the intended recipient, be advised that any unauthorized use, disclosure, > copying or the taking of any action in reliance on the contents of this > information is strictly prohibited. If you have received this email in error, > please immediately notify the sender via telephone or return mail. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From BelluscB at ninds.nih.gov Thu Sep 1 16:56:09 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Thu, 1 Sep 2011 10:56:09 -0400 Subject: [FieldTrip] a small correction to tutorial on MNE source reconstruction Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C058A50C2EE@NIHMLBX10.nih.gov> For the tutorial found at http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate, I discovered that in the section "1. Source model: Volumetric processing in Freesurfer" the pipeline needed to have recon-all use -talairach first, and -nuintensitycor second. The rest works beautifully as outlined. Thanks! Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 1 17:49:41 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 1 Sep 2011 17:49:41 +0200 Subject: [FieldTrip] a small correction to tutorial on MNE source reconstruction In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C058A50C2EE@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C058A50C2EE@NIHMLBX10.nih.gov> Message-ID: <795600CA-15C3-46D8-8682-F9FEFD30E113@donders.ru.nl> Dear Beth, Thanks for the notification. We'll look into it and fix it. Best wishes, Jan-Mathijs On Sep 1, 2011, at 4:56 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > For the tutorial found at http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate, I discovered that in the section “1. Source model: Volumetric processing in Freesurfer” the pipeline needed to have recon-all use –talairach first, and –nuintensitycor second. The rest works beautifully as outlined. > Thanks! > Beth. > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysoevao at psychiatry.wustl.edu Thu Sep 1 17:51:09 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 10:51:09 -0500 Subject: [FieldTrip] ANOVA and tails Message-ID: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> Dear Fieldtrippers, I've tried to use between subject ANOVA (independentF) and a bit confused with the tails. I've got the following message "For an independent samples F-statistic, it does not make sense to calculate a two-sided critical value." Could you explain me why? Why only right tail is possible? Best Regards, Olga. ____________________________________________________________________________ Olga Sysoeva, Research Associate, PhD Psychiatry Department, Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 ________________________________ The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysoevao at psychiatry.wustl.edu Thu Sep 1 18:36:58 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 11:36:58 -0500 Subject: [FieldTrip] ANOVA mixed design, main effect In-Reply-To: <019b01cc68b3$29a42640$7cec72c0$@maris@donders.ru.nl> References: <76DC57362137854CB9592B496182D5FA060CE58424@wusmexmbx2.medpriv.wucon.wustl.edu> <019b01cc68b3$29a42640$7cec72c0$@maris@donders.ru.nl> Message-ID: <76DC57362137854CB9592B496182D5FA060CECF5A1@wusmexmbx2.medpriv.wucon.wustl.edu> Certainly! Thank you. -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Eric Maris Sent: Thursday, September 01, 2011 9:27 AM To: 'Email discussion list for the FieldTrip project' Subject: Re: [FieldTrip] ANOVA mixed design, main effect Hi Olga, > I still a bit confused about mixed between/within subjects ANOVA design. > For example I have 1 within subject factor (condition1 and condition2) > and 2 > group of subjects. I'd like to examine the effect the effect of group > and effect of condition, a well as interaction. The only effect I > managed to examine with filedtrip right now is the interaction one. I > subtracted cond1- > cond2 and applied ft_timelockstatistic with independentT. I believe > this approach is related to the concept of the between/within factors > interaction. But how to examine main effects? I can certainly test > them separately, but > > I appreciate any help. > I believe I more or less understand the theory underlying this > analysis, but > what I need more now is how to implement in technically. Main effect of Group: Do a between-subjects analysis (using indepsamplesT) on the dependent variable cond1+cond2 Main effect of the within subjects factor: Do a within-subjects analysis of cond1 versus cond2 (using depsamplesT), ignoring the Group variable. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands Visiting address: Spinozagebouw Room B.03.44 T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 mailto:e.maris at donders.ru.nl http://www.nphyscog.com/ > > Best, > Olga. > > > Olga Sysoeva, > Research Associate, PhD > Washington University School of Medicine Campus Box 8134 > 660 South Euclid Ave > Saint Louis, MO 63110-9909 > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If > you are > not the intended recipient, be advised that any unauthorized use, disclosure, > copying or the taking of any action in reliance on the contents of > this information is strictly prohibited. If you have received this > email in error, > please immediately notify the sender via telephone or return mail. > > _______________________________________________ > 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 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. From venug001 at crimson.ua.edu Thu Sep 1 18:58:23 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Thu, 1 Sep 2011 08:58:23 -0800 Subject: [FieldTrip] ANOVA and tails In-Reply-To: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: Dear Olga, this does not mean only right tail is possible. You could have a positive or negative sign for your test statistic, which is acceptable. That can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and Condition 2. But to answer your question more substantively: A one-tail test is more consevervative than a two-tail test. A two-tail test is when you have no a priori expectation where you expect the condition 1 - condition 2 to be higher or lower. Using a non EEG example if you have two groups treatment and control, you will expect yoga to lower the depression rates in treatment group and not the control group. Similarly if you have two groups treatment and control, you will expect some protein shake to yield higher muscle mass in the treatment group and not the control group. In both cases the outcome (negative or lower in scenario one, higher or positive on scenario two) is an a priori expectation. So in a EEG sense we know that the Incongruent or deviant word will have a higher displacement than the congruent or expected word.. Going back to the conservative versus liberal nature of the statistic. If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of the tail or the reject region, however when you halve that you tabled value is half of it. So you obtained value in the first case would have to be greater than 4.85, while in the two-tail case it slide with anything over 2.43. Therefore the two-tail is not only for exploratory purposes, but is also less conservative. I hope I have helped. Warm regards gopa On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna < sysoevao at psychiatry.wustl.edu> wrote: > Dear Fieldtrippers,**** > > I’ve tried to use between subject ANOVA (independentF) and a bit confused > with the tails.**** > > I’ve got the following message**** > > “For an independent samples F-statistic, it does not make sense to > calculate a two-sided critical value.”**** > > Could you explain me why? Why only right tail is possible? **** > > Best Regards,**** > > Olga.**** > > > ____________________________________________________________________________ > **** > > Olga Sysoeva,**** > > Research Associate, PhD**** > > Psychiatry Department,**** > > Washington University School of Medicine**** > > Campus Box 8134**** > > 660 South Euclid Ave**** > > Saint Louis, MO 63110-9909**** > > ** ** > > ------------------------------ > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > > _______________________________________________ > 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 sysoevao at psychiatry.wustl.edu Thu Sep 1 19:08:52 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 12:08:52 -0500 Subject: [FieldTrip] ANOVA and tails In-Reply-To: References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: <76DC57362137854CB9592B496182D5FA060CECF5B9@wusmexmbx2.medpriv.wucon.wustl.edu> Thank you, I understand all of this. I just do not understand why I can have more liberal, less conservative criteria (2 tail) in my ANOVA design here in Filedtrip. I do not have any prior expectation about the result ( for example both increase in value for positive component , such as P300, and decrease in value for negative component (such as N1) can be considered as increase in the amplitude of this components). From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Gopakumar Venugopalan Sent: Thursday, September 01, 2011 11:58 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] ANOVA and tails Dear Olga, this does not mean only right tail is possible. You could have a positive or negative sign for your test statistic, which is acceptable. That can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and Condition 2. But to answer your question more substantively: A one-tail test is more consevervative than a two-tail test. A two-tail test is when you have no a priori expectation where you expect the condition 1 - condition 2 to be higher or lower. Using a non EEG example if you have two groups treatment and control, you will expect yoga to lower the depression rates in treatment group and not the control group. Similarly if you have two groups treatment and control, you will expect some protein shake to yield higher muscle mass in the treatment group and not the control group. In both cases the outcome (negative or lower in scenario one, higher or positive on scenario two) is an a priori expectation. So in a EEG sense we know that the Incongruent or deviant word will have a higher displacement than the congruent or expected word.. Going back to the conservative versus liberal nature of the statistic. If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of the tail or the reject region, however when you halve that you tabled value is half of it. So you obtained value in the first case would have to be greater than 4.85, while in the two-tail case it slide with anything over 2.43. Therefore the two-tail is not only for exploratory purposes, but is also less conservative. I hope I have helped. Warm regards gopa On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna > wrote: Dear Fieldtrippers, I've tried to use between subject ANOVA (independentF) and a bit confused with the tails. I've got the following message "For an independent samples F-statistic, it does not make sense to calculate a two-sided critical value." Could you explain me why? Why only right tail is possible? Best Regards, Olga. ____________________________________________________________________________ Olga Sysoeva, Research Associate, PhD Psychiatry Department, Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 ________________________________ The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________ The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From venug001 at crimson.ua.edu Thu Sep 1 19:57:25 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Thu, 1 Sep 2011 09:57:25 -0800 Subject: [FieldTrip] ANOVA and tails In-Reply-To: <76DC57362137854CB9592B496182D5FA060CECF5B9@wusmexmbx2.medpriv.wucon.wustl.edu> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> <76DC57362137854CB9592B496182D5FA060CECF5B9@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: Well you must have some expectation: Those dependent on alcohol will have a more diminshed P300 response, than someone who is not. In this case the postive or negative outcome is a net result of one group having a higher value (P300) than another group. when you have examining two components P300 and N1 then you have to perform separate tests and/or a multivariate test. In this case you will also receive some kind or R or correlation statistic where it show that the two components are inversely related to each other. That is when P300 increases, then N1 will decrease, and possibly vice versa. Again I am thinking of all this when the values have been exported to SAS or SPSS, and not in Fieldtrip. Warm regards gopa On Thu, Sep 1, 2011 at 9:08 AM, Sysoeva, Olga Vladimirovna < sysoevao at psychiatry.wustl.edu> wrote: > Thank you, I understand all of this. I just do not understand why I can > have more liberal, less conservative criteria (2 tail) in my ANOVA design > here in Filedtrip.**** > > I do not have any prior expectation about the result ( for example both > increase in value for positive component , such as P300, and decrease in > value for negative component (such as N1) can be considered as increase in > the amplitude of this components).**** > > ** ** > > *From:* fieldtrip-bounces at donders.ru.nl [mailto: > fieldtrip-bounces at donders.ru.nl] *On Behalf Of *Gopakumar Venugopalan > *Sent:* Thursday, September 01, 2011 11:58 AM > *To:* Email discussion list for the FieldTrip project > *Subject:* Re: [FieldTrip] ANOVA and tails**** > > ** ** > > Dear Olga, this does not mean only right tail is possible. You could have a > positive or negative sign for your test statistic, which is acceptable. That > can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and > Condition 2. But to answer your question more substantively:**** > > A one-tail test is more consevervative than a two-tail test. A two-tail > test is when you have no a priori expectation where you expect the condition > 1 - condition 2 to be higher or lower. Using a non EEG example if you have > two groups treatment and control, you will expect yoga to lower the > depression rates in treatment group and not the control group. **** > > Similarly if you have two groups treatment and control, you will expect > some protein shake to yield higher muscle mass in the treatment group and > not the control group. In both cases the outcome (negative or lower in > scenario one, higher or positive on scenario two) is an a priori > expectation. So in a EEG sense we know that the Incongruent or deviant word > will have a higher displacement than the congruent or expected word..**** > > Going back to the conservative versus liberal nature of the statistic.**** > > If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of > the tail or the reject region, however when you halve that you tabled value > is half of it. So you obtained value in the first case would have to be > greater than 4.85, while in the two-tail case it slide with anything over > 2.43. Therefore the two-tail is not only for exploratory purposes, but is > also less conservative.**** > > **** > > I hope I have helped.**** > > **** > > Warm regards**** > > gopa**** > > On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna < > sysoevao at psychiatry.wustl.edu> wrote:**** > > Dear Fieldtrippers,**** > > I’ve tried to use between subject ANOVA (independentF) and a bit confused > with the tails.**** > > I’ve got the following message**** > > “For an independent samples F-statistic, it does not make sense to > calculate a two-sided critical value.”**** > > Could you explain me why? Why only right tail is possible? **** > > Best Regards,**** > > Olga.**** > > > ____________________________________________________________________________ > **** > > Olga Sysoeva,**** > > Research Associate, PhD**** > > Psychiatry Department,**** > > Washington University School of Medicine**** > > Campus Box 8134**** > > 660 South Euclid Ave**** > > Saint Louis, MO 63110-9909**** > > **** > > ** ** > ------------------------------ > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > **** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > ** ** > > ------------------------------ > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > > _______________________________________________ > 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 Gregor.Volberg at psychologie.uni-regensburg.de Fri Sep 2 09:45:21 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Fri, 02 Sep 2011 09:45:21 +0200 Subject: [FieldTrip] Antw: Re: ANOVA and tails In-Reply-To: References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> Dear Olga and Gopa, I would like to comment on this discussion because I fear that there could be some misunderstandings. Unlike t, the F statistic is not sensitive to the direction of a difference. The t value gets positive if means of group A > group B, and negative if B > A. Therefore, the hypothesis that A >< B can be tested on both tails of the t distribution. On contrast, the F value gets positive if A > B as well as if B > A. Small values of F, on the left tail of the distribition, indicate that there is no difference between means of A and B. This is why a left tail or a two-tailed test does not make sense with an F-Test. So Olga, if you have a two-group design, and if you want to apply a left- or two-tailed test, then use the t statistic. Beware that the two-sided test is usually considered more (not less) conservative that the one-sided test. This is because the critical value of t increases for two-sided tests. It is the size if the rejection region for H0 that needs to be halved, not the one-sided critical value of your test statistic. For example, a result of t(20)= 1.9 is significant in a one-tail right-sided test where it exceeds the critical value of 1.72 (the 0.95 quantile of a t distribution with 20 df). But it is not significant in a two sided test where the critical values are 2.09 (0.975 quantile) and -2.09 (0.025 quantile). Best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Gopakumar Venugopalan 9/1/2011 6:58 PM >>> Dear Olga, this does not mean only right tail is possible. You could have a positive or negative sign for your test statistic, which is acceptable. That can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and Condition 2. But to answer your question more substantively: A one-tail test is more consevervative than a two-tail test. A two-tail test is when you have no a priori expectation where you expect the condition 1 - condition 2 to be higher or lower. Using a non EEG example if you have two groups treatment and control, you will expect yoga to lower the depression rates in treatment group and not the control group. Similarly if you have two groups treatment and control, you will expect some protein shake to yield higher muscle mass in the treatment group and not the control group. In both cases the outcome (negative or lower in scenario one, higher or positive on scenario two) is an a priori expectation. So in a EEG sense we know that the Incongruent or deviant word will have a higher displacement than the congruent or expected word.. Going back to the conservative versus liberal nature of the statistic. If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of the tail or the reject region, however when you halve that you tabled value is half of it. So you obtained value in the first case would have to be greater than 4.85, while in the two-tail case it slide with anything over 2.43. Therefore the two-tail is not only for exploratory purposes, but is also less conservative. I hope I have helped. Warm regards gopa On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna wrote: Dear Fieldtrippers, I’ve tried to use between subject ANOVA (independentF) and a bit confused with the tails. I’ve got the following message “For an independent samples F-statistic, it does not make sense to calculate a two-sided critical value.” Could you explain me why? Why only right tail is possible? Best Regards, Olga. ____________________________________________________________________________ Olga Sysoeva, Research Associate, PhD Psychiatry Department, Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. _______________________________________________ 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 Gregor.Volberg at psychologie.uni-regensburg.de Fri Sep 2 11:01:26 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Fri, 02 Sep 2011 11:01:26 +0200 Subject: [FieldTrip] Antw: Re: ANOVA and tails In-Reply-To: <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> Message-ID: <4E60B786020000570000A93A@gwsmtp1.uni-regensburg.de> Dear Olga, Just to add to my former mail: Another way to think of F and t tests is that the F-Test is _always_ two-sided, in the sense that it tests for both differences A>B and B>A. So I think you already did the test that you intended to do. But formally, the rejection region is on the right side of the F distribution, and so it should be indicated in the cfg structure. Cheers, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> "Gregor Volberg" 9/2/2011 9:45 AM >>> Dear Olga and Gopa, I would like to comment on this discussion because I fear that there could be some misunderstandings. Unlike t, the F statistic is not sensitive to the direction of a difference. The t value gets positive if means of group A > group B, and negative if B > A. Therefore, the hypothesis that A >< B can be tested on both tails of the t distribution. On contrast, the F value gets positive if A > B as well as if B > A. Small values of F, on the left tail of the distribition, indicate that there is no difference between means of A and B. This is why a left tail or a two-tailed test does not make sense with an F-Test. So Olga, if you have a two-group design, and if you want to apply a left- or two-tailed test, then use the t statistic. Beware that the two-sided test is usually considered more (not less) conservative that the one-sided test. This is because the critical value of t increases for two-sided tests. It is the size if the rejection region for H0 that needs to be halved, not the one-sided critical value of your test statistic. For example, a result of t(20)= 1.9 is significant in a one-tail right-sided test where it exceeds the critical value of 1.72 (the 0.95 quantile of a t distribution with 20 df). But it is not significant in a two sided test where the critical values are 2.09 (0.975 quantile) and -2.09 (0.025 quantile). Best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Gopakumar Venugopalan 9/1/2011 6:58 PM >>> Dear Olga, this does not mean only right tail is possible. You could have a positive or negative sign for your test statistic, which is acceptable. That can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and Condition 2. But to answer your question more substantively: A one-tail test is more consevervative than a two-tail test. A two-tail test is when you have no a priori expectation where you expect the condition 1 - condition 2 to be higher or lower. Using a non EEG example if you have two groups treatment and control, you will expect yoga to lower the depression rates in treatment group and not the control group. Similarly if you have two groups treatment and control, you will expect some protein shake to yield higher muscle mass in the treatment group and not the control group. In both cases the outcome (negative or lower in scenario one, higher or positive on scenario two) is an a priori expectation. So in a EEG sense we know that the Incongruent or deviant word will have a higher displacement than the congruent or expected word.. Going back to the conservative versus liberal nature of the statistic. If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of the tail or the reject region, however when you halve that you tabled value is half of it. So you obtained value in the first case would have to be greater than 4.85, while in the two-tail case it slide with anything over 2.43. Therefore the two-tail is not only for exploratory purposes, but is also less conservative. I hope I have helped. Warm regards gopa On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna wrote: Dear Fieldtrippers, I’ve tried to use between subject ANOVA (independentF) and a bit confused with the tails. I’ve got the following message “For an independent samples F-statistic, it does not make sense to calculate a two-sided critical value.” Could you explain me why? Why only right tail is possible? Best Regards, Olga. ____________________________________________________________________________ Olga Sysoeva, Research Associate, PhD Psychiatry Department, Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. _______________________________________________ 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 dualitystan at gmail.com Fri Sep 2 11:21:59 2011 From: dualitystan at gmail.com (Stanley Klein) Date: Fri, 2 Sep 2011 02:21:59 -0700 Subject: [FieldTrip] Antw: Re: ANOVA and tails In-Reply-To: <4E60B786020000570000A93A@gwsmtp1.uni-regensburg.de> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> <4E60B786020000570000A93A@gwsmtp1.uni-regensburg.de> Message-ID: Gregor is correct in what he says. I would like to take it one step further. I hope future statistics books and even Fieldtrip would remove the option of doing a two tailed t-test. If you want to do a two tail t then simply use F =t^2. That removes ever needing to say you are doing a two-tail t. However in doing the one-tailed t you would need to specify which tail. The default of the t could be an upper tail default so you would simply switch sign if wanting to to the lower tail. The benefit of this approach is that it can minimize the errors and complexity of dealing with cfg structures. Stan On Fri, Sep 2, 2011 at 2:01 AM, Gregor Volberg < Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > Dear Olga, > > Just to add to my former mail: > > Another way to think of F and t tests is that the F-Test is _always_ > two-sided, in the sense that it tests for both differences A>B and B>A. So I > think you already did the test that you intended to do. But formally, the > rejection region is on the right side of the F distribution, and so it > should be indicated in the cfg structure. > > Cheers, > > Gregor > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > >>> "Gregor Volberg" > 9/2/2011 9:45 AM >>> > > Dear Olga and Gopa, > > > I would like to comment on this discussion because I fear that there could > be some misunderstandings. > > Unlike t, the F statistic is not sensitive to the direction of a > difference. The t value gets positive if means of group A > group B, and > negative if B > A. Therefore, the hypothesis that A >< B can be tested on > both tails of the t distribution. On contrast, the F value gets positive if > A > B as well as if B > A. Small values of F, on the left tail of the > distribition, indicate that there is no difference between means of A and B. > This is why a left tail or a two-tailed test does not make sense with an > F-Test. > > So Olga, if you have a two-group design, and if you want to apply a left- > or two-tailed test, then use the t statistic. Beware that the two-sided test > is usually considered more (not less) conservative that the one-sided test. > This is because the critical value of t increases for two-sided tests. It is > the size if the rejection region for H0 that needs to be halved, not the > one-sided critical value of your test statistic. For example, a result of > t(20)= 1.9 is significant in a one-tail right-sided test where it exceeds > the critical value of 1.72 (the 0.95 quantile of a t distribution with 20 > df). But it is not significant in a two sided test where the critical values > are 2.09 (0.975 quantile) and -2.09 (0.025 quantile). > > > Best regards, > > Gregor > > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > >>> Gopakumar Venugopalan 9/1/2011 6:58 PM >>> > > Dear Olga, this does not mean only right tail is possible. You could have a > positive or negative sign for your test statistic, which is acceptable. That > can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and > Condition 2. But to answer your question more substantively: > > A one-tail test is more consevervative than a two-tail test. A two-tail > test is when you have no a priori expectation where you expect the condition > 1 - condition 2 to be higher or lower. Using a non EEG example if you have > two groups treatment and control, you will expect yoga to lower the > depression rates in treatment group and not the control group. > > Similarly if you have two groups treatment and control, you will expect > some protein shake to yield higher muscle mass in the treatment group and > not the control group. In both cases the outcome (negative or lower in > scenario one, higher or positive on scenario two) is an a priori > expectation. So in a EEG sense we know that the Incongruent or deviant word > will have a higher displacement than the congruent or expected word.. > > Going back to the conservative versus liberal nature of the statistic. > > If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of > the tail or the reject region, however when you halve that you tabled value > is half of it. So you obtained value in the first case would have to be > greater than 4.85, while in the two-tail case it slide with anything over > 2.43. Therefore the two-tail is not only for exploratory purposes, but is > also less conservative. > > > I hope I have helped. > > > Warm regards > > gopa > > On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna < > sysoevao at psychiatry.wustl.edu> wrote: > >> Dear Fieldtrippers, >> >> I’ve tried to use between subject ANOVA (independentF) and a bit confused >> with the tails. >> >> I’ve got the following message >> >> “For an independent samples F-statistic, it does not make >> sense to calculate a two-sided critical value.” >> >> Could you explain me why? Why only right tail is possible? >> >> Best Regards, >> >> Olga. >> >> ____________________________________________________________________________ >> >> >> Olga Sysoeva, >> >> Research Associate, PhD >> >> Psychiatry Department, >> >> Washington University School of Medicine >> >> Campus Box 8134 >> >> 660 South Euclid Ave >> >> Saint Louis, MO 63110-9909 >> >> >> >> ------------------------------ >> The materials in this message are private and may contain Protected >> Healthcare Information or other information of a sensitive nature. If you >> are not the intended recipient, be advised that any unauthorized use, >> disclosure, copying or the taking of any action in reliance on the contents >> of this information is strictly prohibited. If you have received this email >> in error, please immediately notify the sender via telephone or return mail. >> >> >> _______________________________________________ >> 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 venug001 at crimson.ua.edu Fri Sep 2 13:36:20 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Fri, 2 Sep 2011 03:36:20 -0800 Subject: [FieldTrip] Antw: Re: ANOVA and tails In-Reply-To: <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> Message-ID: Thank you Gregor, I said the converse of everything I wanted to say. I appreciate the clarification. I know one thing never type or speak the day you have been sleep deprived. In my case I end up saying the opposite of everything I intended to say (tests of significances included!). Warm regards gopa On Thu, Sep 1, 2011 at 11:45 PM, Gregor Volberg < Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > Dear Olga and Gopa, > > I would like to comment on this discussion because I fear that there could > be some misunderstandings. > > Unlike t, the F statistic is not sensitive to the direction of a > difference. The t value gets positive if means of group A > group B, and > negative if B > A. Therefore, the hypothesis that A >< B can be tested on > both tails of the t distribution. On contrast, the F value gets positive if > A > B as well as if B > A. Small values of F, on the left tail of the > distribition, indicate that there is no difference between means of A and B. > This is why a left tail or a two-tailed test does not make sense with an > F-Test. > > So Olga, if you have a two-group design, and if you want to apply a left- > or two-tailed test, then use the t statistic. Beware that the two-sided test > is usually considered more (not less) conservative that the one-sided test. > This is because the critical value of t increases for two-sided tests. It is > the size if the rejection region for H0 that needs to be halved, not the > one-sided critical value of your test statistic. For example, a result of > t(20)= 1.9 is significant in a one-tail right-sided test where it exceeds > the critical value of 1.72 (the 0.95 quantile of a t distribution with 20 > df). But it is not significant in a two sided test where the critical values > are 2.09 (0.975 quantile) and -2.09 (0.025 quantile). > > Best regards, > > Gregor > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > >>> Gopakumar Venugopalan 9/1/2011 6:58 PM >>> > > Dear Olga, this does not mean only right tail is possible. You could have a > positive or negative sign for your test statistic, which is acceptable. That > can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and > Condition 2. But to answer your question more substantively: > > A one-tail test is more consevervative than a two-tail test. A two-tail > test is when you have no a priori expectation where you expect the condition > 1 - condition 2 to be higher or lower. Using a non EEG example if you have > two groups treatment and control, you will expect yoga to lower the > depression rates in treatment group and not the control group. > > Similarly if you have two groups treatment and control, you will expect > some protein shake to yield higher muscle mass in the treatment group and > not the control group. In both cases the outcome (negative or lower in > scenario one, higher or positive on scenario two) is an a priori > expectation. So in a EEG sense we know that the Incongruent or deviant word > will have a higher displacement than the congruent or expected word.. > > Going back to the conservative versus liberal nature of the statistic. > > If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of > the tail or the reject region, however when you halve that you tabled value > is half of it. So you obtained value in the first case would have to be > greater than 4.85, while in the two-tail case it slide with anything over > 2.43. Therefore the two-tail is not only for exploratory purposes, but is > also less conservative. > > I hope I have helped. > > Warm regards > > gopa > > On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna < > sysoevao at psychiatry.wustl.edu> wrote: > >> Dear Fieldtrippers, >> >> I’ve tried to use between subject ANOVA (independentF) and a bit confused >> with the tails. >> >> I’ve got the following message >> >> “For an independent samples F-statistic, it does not make sense to >> calculate a two-sided critical value.” >> >> Could you explain me why? Why only right tail is possible? >> >> Best Regards, >> >> Olga. >> >> ____________________________________________________________________________ >> >> >> Olga Sysoeva, >> >> Research Associate, PhD >> >> Psychiatry Department, >> >> Washington University School of Medicine >> >> Campus Box 8134 >> >> 660 South Euclid Ave >> >> Saint Louis, MO 63110-9909 >> >> >> ------------------------------ >> The materials in this message are private and may contain Protected >> Healthcare Information or other information of a sensitive nature. If you >> are not the intended recipient, be advised that any unauthorized use, >> disclosure, copying or the taking of any action in reliance on the contents >> of this information is strictly prohibited. If you have received this email >> in error, please immediately notify the sender via telephone or return mail. >> >> >> _______________________________________________ >> 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 alotof_xd at yahoo.com Sat Sep 3 04:27:59 2011 From: alotof_xd at yahoo.com (alotof eve) Date: Fri, 2 Sep 2011 19:27:59 -0700 (PDT) Subject: [FieldTrip] 4D data reading problem Message-ID: <1315016879.43614.YahooMailNeo@web125508.mail.ne1.yahoo.com> Hello experts! I need help on 4D data reading with ft_read_header. When I type hdr = ft_read_header('e,rfhp1.0Hz,COH) It always shows such error: ??? Error using ==> _colonobj Function '_colonobj' is not defined for values of class 'uint32'. Error in ==> C:\MATLAB6p5\toolbox\fieldtrip-20110420\fileio\private\read_4d_hdr.m On line 105  ==>     for event = 1:header.epoch_data(epoch).total_var_events Error in ==> C:\MATLAB6p5\toolbox\fieldtrip-20110420\fileio\ft_read_header.m On line 153  ==>     orig            = read_4d_hdr(datafile); I checked into the program and I am sure the error is from "for event = 1:header.epoch_data(epoch).total_var_events" which is line 153 in read_4d_hdr.m I tracked and got information before this sentence that in this data, epoch = [1, 2, 3, 4, 5]; epoch_data(epoch).total_var_events = [65536, 1.6511e+009, 0, 0, 0]; Cannot understand why it said "Function '_colonobj' is not defined for values of class 'uint32'." Any suggestions to settle this? Thanks, Eve -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Sun Sep 4 08:24:15 2011 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Sun, 4 Sep 2011 08:24:15 +0200 Subject: [FieldTrip] 4D data reading problem In-Reply-To: <1315016879.43614.YahooMailNeo@web125508.mail.ne1.yahoo.com> References: <1315016879.43614.YahooMailNeo@web125508.mail.ne1.yahoo.com> Message-ID: <27E08D8C-E9B2-4548-B221-31C831FA8974@uni-konstanz.de> Hi Eve, > Hello experts! > > I need help on 4D data reading with ft_read_header. > When I type hdr = ft_read_header('e,rfhp1.0Hz,COH) > could it be that you are trying to read a file containing the coil measurement only? Just try the same without the extension ',COH' that should work. Good luck tzvetan ******************************************* Tzvetan Popov Clinical Psychology University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-883086 Fax: 0049-7531-884601 Email: tzvetan.popov at uni-konstanz.de ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at yahoo.com Sun Sep 4 22:52:02 2011 From: alotof_xd at yahoo.com (alotof eve) Date: Sun, 4 Sep 2011 13:52:02 -0700 (PDT) Subject: [FieldTrip] 4D data reading problem In-Reply-To: <27E08D8C-E9B2-4548-B221-31C831FA8974@uni-konstanz.de> References: <1315016879.43614.YahooMailNeo@web125508.mail.ne1.yahoo.com> <27E08D8C-E9B2-4548-B221-31C831FA8974@uni-konstanz.de> Message-ID: <1315169522.94243.YahooMailNeo@web125503.mail.ne1.yahoo.com> Hi, Tzvetan, Thank you firstly. I tried it as your suggestion but still failed. I also tried another type of data "c,rfDC", same problem happened. A possibility I guess is that I run matlab under windows. I just found similar problem reported before and Jan-Mathijsmentioned that it might due to using windows. Just want to make sure if mine is the same problem and the possible way to settle it. Thanks, Eve ________________________________ From: Tzvetan Popov To: alotof eve ; Email discussion list for the FieldTrip project Sent: Saturday, September 3, 2011 11:24 PM Subject: Re: [FieldTrip] 4D data reading problem Hi Eve, Hello experts! > > >I need help on 4D data reading with ft_read_header. >When I type hdr = ft_read_header('e,rfhp1.0Hz,COH) > >could it be that you are trying to read a file containing the coil measurement only? Just try the same without the extension ',COH' that should work. Good luck tzvetan ******************************************* Tzvetan Popov   Clinical Psychology        University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-883086 Fax:      0049-7531-884601 Email:  tzvetan.popov at uni-konstanz.de******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Mon Sep 5 12:59:37 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Mon, 5 Sep 2011 12:59:37 +0200 (CEST) Subject: [FieldTrip] Forward solution using concentric spheres and BEM models In-Reply-To: <586785902.1159239.1315218794046.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <780740987.1159792.1315220377719.JavaMail.root@draco.zimbra.ru.nl> Dear Juan Pablo and Margit The function 'ft_prepare_mesh' takes care of triangulating every compartment via the cfg.tissue option. This option contains the integers which describe a type of tissue, given that the user beforehand defined all voxels of the segmented MRI compartment as having that particular value. As an example, download the sample MRI in FieldTrip ftp location: ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip Create a folder and unzip these files. % read in the mri mri = ft_read_mri('Subject01.mri'); % segment it cfg = []; cfg.output = {'scalp', 'skull', 'brain'}; seg = ft_volumesegment(cfg, mri); % assign a label scalp = (seg.scalp) & ~(seg.skull | seg.brain); skull = 2*(seg.skull); brain = 3*(seg.brain); mri_segment = scalp + skull + brain; % build the meshes cfg = []; cfg.method = 'segmentation'; cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; cfg.numvertices = [2000 1000 800]; cfg.sourceunits = 'mm'; cfg.mriunits = 'mm'; bnd = ft_prepare_mesh(cfg, mri_segment); If any of the tissues has a different value from cfg.tissues this won't be triangulated. To check for this use ft_sourceplot in the interactive mode. By clicking around you can see the tissue's value in the command window: % view the labelled segmentations mri2 = mri; mri2.seg = mri_segment; cfg=[]; cfg.interactive = 'yes'; cfg.funparameter = 'seg'; ft_sourceplot(cfg,mri2); About the concentric spheres: both ways to derive a concentric spheres model are correct. In one case you directly build the vol structure and you assume you know the radiuses of your spheres. In the other case you allow the ft_prepare_concentricspheres function to build the spheres starting from realistic geometrical boundaries. The second approach is my favorite because the ft_prepare function contains a function that fits a sphere to each boundary and I don't have to do it myself. The first approach (directly force the radiuses in your vol structure) is preferable if you derive the information from other software (e.g. CTF's MRIView) or if you fit the sphere yourself. @Pablo If the sphere is fitted inside the brain it is correct. You do not want the sphere to include other tissues, because your assumption for the construction of the forward model is that the tissue inside the sphere is homogeneous. For a more realistic model (encompassing the whole brain volume) I would rather use a BEM model. I hope this helps, Cristiano ----- "Margit Schönherr" schreef: > Van: "Margit Schönherr" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Vrijdag 19 augustus 2011 17:23:34 > Onderwerp: Re: [FieldTrip] Forward solution using concentric spheres and BEM models > > Hello Juan Pablo, > > I am using fieldtrip-20110603. > Now that you say, that your problem persisted, I remember having > changed the code of prepare_mesh_segmentation. You find the function > in the private directory. In line 25, it sets cfg.tissue = 1 if mri > has fields 'brain' or 'scalp'. I think this explains why the > segmentation is done for compartment 1 only. So I have simply > commented this line, so that cfg.tissue is left unchanged, and the > segmentation is done for all compartments. > > I know that this is bad style, but I wanted to get it working. And > since I was relatively new to fieldtrip, I hesitated to ask the > discussion list... > > I hope this helps. And I'm open for better solutions. > Best, > Margit > > > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > im Auftrag von Juan Pablo Neira [jpnv2006 at gmail.com] > Gesendet: Freitag, 19. August 2011 16:01 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] Forward solution using concentric spheres and > BEM models > > Thank you Margit for your help, > > I tried your sugestion to create the geometrical description of the > brain, skull and scalp but > I am still having the same output bnd = 1x1 struct (pnt and tri just > of the brain). I should have > bnd = 1x3 struct (pnt and tri of the brain, skull and scalp). > > This is the information in the command line in matlab > not downsampling brain > not downsampling scalp > not downsampling skull > using the segmentation approach > using the segmented MRI > triangulating the boundary of compartment 1 > segmentation compartment 1 of 1 completed > > Can you tell me which version of fieldtrip (fieldtrip-yyyymmdd) are > you using so i could compare the code of the > function ft_prepare_mesh. > > Regards, > > Juan Pablo > > 2011/8/18 Schönherr, Margit : > > Hello, > > > > I probably cannot help you with all your questions, but currently > I'm also dealing with MRI segmentation and volume conductors, so maybe > my solutions can be useful for you. > > Concerning your point 5 (geometrical description of the brain, > skull, and scalp), I have done it the following way: > > > > cfg = []; > > cfg.method = 'segmentation'; > > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > > cfg.numvertices = [2000 1000 800]; > > cfg.sourceunits = 'mm'; > > cfg.mriunits = 'mm'; > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > I think you have to specify a vector 'cfg.numvertices', a number of > vertices for each compartment. > > By the way, at the beginning of ft_prepare_mesh the cfg-field > 'numcompartments' is removed from the cfg structure (at least in my > fieldtrip version, which is not the latest). > > > > Another question that comes to me is, why you need the segmented MRI > for a concentric spheres volume conductor? So, regarding point 6, you > can build such a vol-structure for example like this: > > > > vol.unit = 'm'; > > vol.o = origin; > > vol.r = [R_brain R_skull R_skin]; > > vol.c = [1 1/80 1]; > > > > By this, you can also define the radius as you like. > > > > Best, > > Margit > > > > > > > > > > ________________________________________ > > Von: fieldtrip-bounces at donders.ru.nl > [fieldtrip-bounces at donders.ru.nl] im Auftrag von Juan Pablo Neira > [jpnv2006 at gmail.com] > > Gesendet: Mittwoch, 17. August 2011 14:58 > > An: fieldtrip at donders.ru.nl > > Betreff: [FieldTrip] Forward solution using concentric spheres and > BEM models > > > > Hello, > > > > I am working with an individual MRI and EEG data to do the forward > > solution with two different volume's model (concentric spheres and > > BEM), > > so at the end i can compare the results. But i did not have the > > expected results of the concentric spheres model until now. > > > > This is my script: > > > > 1. Read individual MRI > > mri=ft_read_mri('data_patient_1\******.hdr'); > > > > %I got this "Warning: flipping 1st dimension (L-R) to obtain volume > in > > neurological convention" > > > > %How can i do a homogenous transformation matrix, using the voxel > dimensions > > %that are specified in hdr.dime.pixdim? > > > > 2. Realign to 'head coordinates' > > > > 3. MRI Reslicing > > > > 4. MRI segmentation: (brain, skull,scalp) > > > > 5. Create geometrical description of the brain, skull and scalp (3 > compartments) > > > > cfg = []; > > cfg.interactive = 'no'; %segmentation method > > cfg.numvertices = 3000; > > cfg.sourceunits = 'mm'; > > cfg.downsample = 2; > > cfg.numcompartments = 3; > > cfg.tissue = {'brain' 'skull' 'scalp'}; > > cfg.smooth = 'yes'; > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > %The output just give me the geometrical description of the brain. > > How can i get the geometrical description of > > %the skull and scalp also to proceed to create a 3 spheres > concentric > > sphere model? > > > > 6. If i have the 3 geometrical descriptions (brain, skull and > scalp). > > Create a 3 concentric spheres model. > > > > cfg = []; > > cfg.headshape = [bnd1 bnd2 bnd3]; % brain- skull - scalp > > cfg.conductivity = [0.33 0.0042 0.331]; > > [vol, cfg] = prepare_concentricspheres(cfg); > > > > %I got the model but part of the brain is outside of its sphere and > > also the skull. How can I increase the radius so > > % the whole brain will be inside its sphere and also the skull? > The > > sphere of the scalp fix good. > > > > I hope someone can help me solve these questions. > > > > Regards, > > > > Juan Pablo > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Nina.Kahlbrock at uni-duesseldorf.de Mon Sep 5 14:45:53 2011 From: Nina.Kahlbrock at uni-duesseldorf.de (Nina Kahlbrock) Date: Mon, 05 Sep 2011 14:45:53 +0200 Subject: [FieldTrip] effect sizes in M/EEG data Message-ID: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> Dear statistic experts, I have a rather general question concerning effect sizes. I understand that t-values give me an approximation of the effect size, as they state how big the difference between two conditions is by taking into account the variance and the number of observations. However, as I recall, effect sizes (like Cohen’s d) are computed in order to find out how important the effect is, independent of the number of observations. However, if I understand the code correctly, dependent samples t-values are computed in a very similar way as Cohen’s d (which is “the” value for effect sizes), both including the variance and thus the number of observations in their functions. In order to draw conclusions about the importance of the observed effect, is it necessary to compute effect sizes like Cohen’s d or is it sufficient to compute t-values as effect sizes for M/EEG data? If important to compute effect sizes in a way different from t-values, does anyone know of a function that computes effect sizes like that in FT? Thank you in advance for your answer. Best Regards, Nina - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Nina Kahlbrock Institute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Düsseldorf Tel.: +49 211 81 18075 Fax. .: +49 211 81 19916 Mail: Nina.Kahlbrock at med.uni-duesseldorf.de http://www.uniklinik-duesseldorf.de/medpsychologie -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Tue Sep 6 10:21:45 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Tue, 06 Sep 2011 10:21:45 +0200 Subject: [FieldTrip] Antw: effect sizes in M/EEG data In-Reply-To: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> References: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> Message-ID: <4E65F439020000570000A96D@gwsmtp1.uni-regensburg.de> Dear Nina, dependend samples t values can easily be transformed into Cohen's d as d = t / sqrt(df) [taken from Rosnow & Rosenthal, Effect sizes for Experimenting Psychologists, Canadian Journal of Experimental Psychology, 2003, 57:3, 221-237; you should find a pdf copy with a search on Google scholar]. For example, a t value of 5.15 with 19 degrees of freedom corresponds to a d of 5.15/sqrt(19) = 1.18. So just compute depsamplesT and divide the resulting vector or matrix by the number of dfs - no further FT functions are needed. My two cents are that effect sizes are especially useful for integrating results across studies where the very same design is applied to different samples, e.g., in clinical trials on pharmaceutical products. In EEG/MEG studies, even when they are on the same topic, there will be very divergent experimenting protocols (timing, task, etc), and also the dependent variable will differ from study to study, depending on the chosen time points / frequencies / channels of interest. A common effect size metric like Cohen's d does not improve the comparibility much in this case. I would therefore simply report the t statistic along with the corresponding df and p, and leave it for the interested reader to compute the corresponding d if there should be a need for that. Best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Nina Kahlbrock 9/5/2011 2:45 PM >>> Dear statistic experts, I have a rather general question concerning effect sizes. I understand that t-values give me an approximation of the effect size, as they state how big the difference between two conditions is by taking into account the variance and the number of observations. However, as I recall, effect sizes (like Cohen’s d) are computed in order to find out how important the effect is, independent of the number of observations. However, if I understand the code correctly, dependent samples t-values are computed in a very similar way as Cohen’s d (which is “the” value for effect sizes), both including the variance and thus the number of observations in their functions. In order to draw conclusions about the importance of the observed effect, is it necessary to compute effect sizes like Cohen’s d or is it sufficient to compute t-values as effect sizes for M/EEG data? If important to compute effect sizes in a way different from t-values, does anyone know of a function that computes effect sizes like that in FT? Thank you in advance for your answer. Best Regards, Nina - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Nina Kahlbrock Institute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Düsseldorf Tel.: +49 211 81 18075 Fax. .: +49 211 81 19916 Mail: Nina.Kahlbrock at med.uni-duesseldorf.de http://www.uniklinik-duesseldorf.de/medpsychologie -------------- next part -------------- An HTML attachment was scrubbed... URL: From dualitystan at gmail.com Tue Sep 6 11:16:25 2011 From: dualitystan at gmail.com (Stanley Klein) Date: Tue, 6 Sep 2011 02:16:25 -0700 Subject: [FieldTrip] Antw: effect sizes in M/EEG data In-Reply-To: <4E65F439020000570000A96D@gwsmtp1.uni-regensburg.de> References: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> <4E65F439020000570000A96D@gwsmtp1.uni-regensburg.de> Message-ID: Dear Nina, Gregor is correct. A simple way to think of it is that effect size (d) is the distance between two means divided by the standard deviation of the data (like IQ). For determining significance one uses t, which is the same difference of the means, but now divided by the standard error (the standard deviation of the means). SD doesn't depend on the number of trials, but SE does. I often advocate reporting d plus its standard error. That way one can avoid reporting an embarrassing naked statistic (a number without its error bar). Stan On Tue, Sep 6, 2011 at 1:21 AM, Gregor Volberg < Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > Dear Nina, > > dependend samples t values can easily be transformed into Cohen's d as d = > t / sqrt(df) [taken from Rosnow & Rosenthal, Effect sizes for Experimenting > Psychologists, Canadian Journal of Experimental Psychology, 2003, 57:3, > 221-237; you should find a pdf copy with a search on Google scholar]. For > example, a t value of 5.15 with 19 degrees of freedom corresponds to a d of > 5.15/sqrt(19) = 1.18. So just compute depsamplesT and divide the resulting > vector or matrix by the number of dfs - no further FT functions are needed. > > My two cents are that effect sizes are especially useful for integrating > results across studies where the very same design is applied to different > samples, e.g., in clinical trials on pharmaceutical products. In EEG/MEG > studies, even when they are on the same topic, there will be very divergent > experimenting protocols (timing, task, etc), and also the dependent variable > will differ from study to study, depending on the chosen time points / > frequencies / channels of interest. A common effect size metric like Cohen's > d does not improve the comparibility much in this case. I would therefore > simply report the t > > statistic along with the corresponding df and p, and leave it for the > interested reader to compute the corresponding d if there should be a need > for that. > > Best regards, > > Gregor > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > >>> Nina Kahlbrock 9/5/2011 2:45 PM > >>> > > Dear statistic experts,**** > > ** ** > > I have a rather general question concerning effect sizes. I understand that > t-values give me an approximation of the effect size, as they state how big > the difference between two conditions is by taking into account the variance > and the number of observations. However, as I recall, effect sizes (like > Cohen’s d) are computed in order to find out how important the effect is, > independent of the number of observations. However, if I understand the code > correctly, dependent samples t-values are computed in a very similar way as > Cohen’s d (which is “the” value for effect sizes), both including the > variance and thus the number of observations in their functions.**** > > In order to draw conclusions about the importance of the observed effect, > is it necessary to compute effect sizes like Cohen’s d or is it sufficient > to compute t-values as effect sizes for M/EEG data? If important to compute > effect sizes in a way different from t-values, does anyone know of a > function that computes effect sizes like that in FT?**** > > ** ** > > Thank you in advance for your answer.**** > > ** ** > > Best Regards,**** > > ** ** > > Nina**** > > ** ** > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - -**** > > ** ** > > Nina Kahlbrock**** > > Institute of Clinical Neuroscience and Medical Psychology **** > > Heinrich Heine University Duesseldorf**** > > Universitaetsstr. 1**** > > 40225 Düsseldorf**** > > ** ** > > Tel.: +49 211 81 18075**** > > Fax. .: +49 211 81 19916**** > > ** ** > > Mail: Nina.Kahlbrock at med.uni-duesseldorf.de**** > > http://www.uniklinik-duesseldorf.de/medpsychologie**** > > ** ** > > _______________________________________________ > 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 venug001 at crimson.ua.edu Tue Sep 6 14:14:52 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Tue, 6 Sep 2011 04:14:52 -0800 Subject: [FieldTrip] Antw: effect sizes in M/EEG data In-Reply-To: References: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> <4E65F439020000570000A96D@gwsmtp1.uni-regensburg.de> Message-ID: Dear All, Stevens (1996) in his multivariate statistics talks about the use of eta squared and partial eta squared for use in F and t tests. He cites Cohen (1977) while saying this: The partial Eta square (η2) has statistical benchmarks (small = .01, medium = .06, and large = .14) (Stevens, 1996). Most stat packages should come with a effect size calculator. In SPSS it is as simple as checking a box in the GUI. Like Gregor and Stanley say D2 (also called the Mahalanobis distance) is used for multivartiate situations. An earlier edition of Stevens (1980) comes with a table of power values for 2 to 7 groups means and alpha of .05 and .10. I believe Gregor is right on the use of this statistic in clinical situations, but is psych not moving in that direction, as I know most psych folks (and all grant applications!) ask for those statistics. Warm regards gopa On Tue, Sep 6, 2011 at 1:16 AM, Stanley Klein wrote: > Dear Nina, Gregor is correct. A simple way to think of it is that effect > size (d) is the distance between two means divided by the standard deviation > of the data (like IQ). For determining significance one uses t, which is the > same difference of the means, but now divided by the standard error (the > standard deviation of the means). SD doesn't depend on the number of > trials, but SE does. I often advocate reporting d plus its standard error. > That way one can avoid reporting an embarrassing naked statistic (a number > without its error bar). > Stan > > On Tue, Sep 6, 2011 at 1:21 AM, Gregor Volberg < > Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > >> Dear Nina, >> >> dependend samples t values can easily be transformed into Cohen's d as d = >> t / sqrt(df) [taken from Rosnow & Rosenthal, Effect sizes for Experimenting >> Psychologists, Canadian Journal of Experimental Psychology, 2003, 57:3, >> 221-237; you should find a pdf copy with a search on Google scholar]. For >> example, a t value of 5.15 with 19 degrees of freedom corresponds to a d of >> 5.15/sqrt(19) = 1.18. So just compute depsamplesT and divide the resulting >> vector or matrix by the number of dfs - no further FT functions are needed. >> >> My two cents are that effect sizes are especially useful for integrating >> results across studies where the very same design is applied to different >> samples, e.g., in clinical trials on pharmaceutical products. In EEG/MEG >> studies, even when they are on the same topic, there will be very divergent >> experimenting protocols (timing, task, etc), and also the dependent variable >> will differ from study to study, depending on the chosen time points / >> frequencies / channels of interest. A common effect size metric like Cohen's >> d does not improve the comparibility much in this case. I would therefore >> simply report the t >> >> statistic along with the corresponding df and p, and leave it for the >> interested reader to compute the corresponding d if there should be a need >> for that. >> >> Best regards, >> >> Gregor >> >> >> >> >> -- >> Dr. rer. nat. Gregor Volberg < >> gregor.volberg at psychologie.uni-regensburg.de> ( mailto: >> gregor.volberg at psychologie.uni-regensburg.de ) >> University of Regensburg >> Institute for Experimental Psychology >> 93040 Regensburg, Germany >> Tel: +49 941 943 3862 >> Fax: +49 941 943 3233 >> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >> >> >> >> >>> Nina Kahlbrock 9/5/2011 2:45 PM >> >>> >> >> Dear statistic experts,**** >> >> ** ** >> >> I have a rather general question concerning effect sizes. I understand >> that t-values give me an approximation of the effect size, as they state how >> big the difference between two conditions is by taking into account the >> variance and the number of observations. However, as I recall, effect sizes >> (like Cohen’s d) are computed in order to find out how important the effect >> is, independent of the number of observations. However, if I understand the >> code correctly, dependent samples t-values are computed in a very similar >> way as Cohen’s d (which is “the” value for effect sizes), both including the >> variance and thus the number of observations in their functions.**** >> >> In order to draw conclusions about the importance of the observed effect, >> is it necessary to compute effect sizes like Cohen’s d or is it sufficient >> to compute t-values as effect sizes for M/EEG data? If important to compute >> effect sizes in a way different from t-values, does anyone know of a >> function that computes effect sizes like that in FT?**** >> >> ** ** >> >> Thank you in advance for your answer.**** >> >> ** ** >> >> Best Regards,**** >> >> ** ** >> >> Nina**** >> >> ** ** >> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - - - - - - - - - - - - - - - - - - - -**** >> >> ** ** >> >> Nina Kahlbrock**** >> >> Institute of Clinical Neuroscience and Medical Psychology **** >> >> Heinrich Heine University Duesseldorf**** >> >> Universitaetsstr. 1**** >> >> 40225 Düsseldorf**** >> >> ** ** >> >> Tel.: +49 211 81 18075**** >> >> Fax. .: +49 211 81 19916**** >> >> ** ** >> >> Mail: Nina.Kahlbrock at med.uni-duesseldorf.de**** >> >> http://www.uniklinik-duesseldorf.de/medpsychologie**** >> >> ** ** >> >> _______________________________________________ >> 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 batrod at gmail.com Tue Sep 6 15:28:13 2011 From: batrod at gmail.com (Rodolphe Nenert) Date: Tue, 6 Sep 2011 13:28:13 +0000 (UTC) Subject: [FieldTrip] Invitation to connect on LinkedIn Message-ID: <668305227.10687519.1315315693169.JavaMail.app@ela4-bed81.prod> Email, I'd like to add you to my professional network on LinkedIn. - Rodolphe Rodolphe Nenert Ph.D. at UAB Birmingham, Alabama Area Confirm that you know Rodolphe Nenert: https://www.linkedin.com/e/-deyl8h-gs8x048f-18/isd/4098720488/avYRUa-g/?hs=false&tok=21MBoClA68w4U1 -- You are receiving Invitation to Connect emails. Click to unsubscribe: http://www.linkedin.com/e/-deyl8h-gs8x048f-18/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/goo/fieldtrip%40donders%2Eru%2Enl/20061/I1414007217_1/?hs=false&tok=3uoa9IwGe8w4U1 (c) 2011 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Thu Sep 8 16:39:47 2011 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Thu, 8 Sep 2011 10:39:47 -0400 Subject: [FieldTrip] [ANN] OpenMEEG 2.1 is out Message-ID: Hi, the new release 2.1 of OpenMEEG is finally out. Download page has been updated: https://gforge.inria.fr/frs/?group_id=435 See full changelog below. If you meet any issue, your feed back is very much appreciated. Best regards, Alex for the OpenMEEG team. http://openmeeg.gforge.inria.fr ChangeLog ----------------- Release 2.1: New features: - added the adjoint way for computing a leadfield for either EEG, MEG or MEEG simultaneously. This saves time and memory for big systems (>1000 pts/surfaces). Improvements: - better ordering in computations when inverting the matrix for the memory footprint. - storage now more effective using the matio library even for symmetric matrices. - support for matlab7.3 file format. - reducing memory footprint of DSM, Head2MEG, SurfSource2MEG and DipSource2MEG computations - improved MKL detection - lapack inclusion (experimental) to ease the build on architectures were there is no alternative. Bug corrections: - allowance of spaces in mesh file names with a new .geom format (old format is still accepted). - bug when loading sensor file with no empty line at the end - fix leak in Mesh class Removed features: - TV inverse solver From zizlsperger at gmail.com Thu Sep 8 18:09:57 2011 From: zizlsperger at gmail.com (Leopold Zizlsperger) Date: Thu, 8 Sep 2011 18:09:57 +0200 Subject: [FieldTrip] ft_appenddata Message-ID: Hello thanks in advance for your assistance. I'd like to merge 2 datasets after preprocessing using ft_appendata. Even though it works on first view, "trl" does not add up but keeps the structure of the last dataset (304 in the example): XY_merge=ft_appenddata(cfg, x1, x2); input dataset 1, 29 channels, 301 trials input dataset 2, 29 channels, 304 trials Warning: input data comes from different datafiles > In ft_appenddata at 182 concatenating the trials over all datasets removing sampleinfo field from output output dataset, 29 channels, 605 trials Do I miss the point ? Thanks Best regards Leopold -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 8 21:19:26 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 8 Sep 2011 21:19:26 +0200 Subject: [FieldTrip] ft_appenddata In-Reply-To: References: Message-ID: <7AA3D9A5-8A7A-4D3B-B7D7-759DB34FF7DB@donders.ru.nl> Hi Leo, With 'trl', are you referring to data.cfg.previous. ... .trl? I assume that data.trial (which contains the actual data) has the correct dimensionality of 1x605? In the past, fieldtrip also concatenated the trl-matrices, but we feel that this is not appropriate. The reason for this is, that the first 2 columns of these matrices represent the sample numbers that define the epochs of interest, with respect to the first sample in the recording. If the concatenated data are derived from two different datasets, these numbers become meaningless, because they cannot be interpreted unequivocally anymore. Yet, and I hope that this was motivating your question, the trl-matrix was also used (by some) to store trial-specific information, which of course still is meaningful even if the data comes from different recordings. If this indeed relates to your question, please have a look at: http://fieldtrip.fcdonders.nl/faq/i_used_to_work_with_trl-matrices_that_have_more_than_3_columns._why_is_this_not_supported_anymore If your actual question is of a different nature, could you please explain a bit more what is the problem? Thanks, Jan-Mathijs On Sep 8, 2011, at 6:09 PM, Leopold Zizlsperger wrote: > Hello > thanks in advance for your assistance. > I'd like to merge 2 datasets after preprocessing using ft_appendata. > Even though it works on first view, "trl" does not add up but keeps the structure of the last dataset (304 in the example): > > XY_merge=ft_appenddata(cfg, x1, x2); > input dataset 1, 29 channels, 301 trials > input dataset 2, 29 channels, 304 trials > Warning: input data comes from different datafiles > > In ft_appenddata at 182 > concatenating the trials over all datasets > removing sampleinfo field from output > output dataset, 29 channels, 605 trials > > Do I miss the point ? > > Thanks > Best regards > Leopold > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.muesch at uke.uni-hamburg.de Fri Sep 9 13:00:25 2011 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Fri, 9 Sep 2011 13:00:25 +0200 Subject: [FieldTrip] interaction within-subject indepsamplesT Message-ID: <1238529C-1B93-4BC9-B625-B16991718014@uke.uni-hamburg.de> Hello FieldTrip users, I need your advice on how to correctly test the interaction effects in a 2x2 within-subject design with cluster-based randomization tests. I have two factors A and B with the levels a1/a2 and b1/b2. In addition, the number of trials in A are about twice as much as in B. The procedure would be totally clear in a between-subject design (as in a previous post on the list: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) because I could easily compute the differences of the factor levels A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the differences. However, since I have to run the statistics across trials and not subjects I have independent samples and not dependent samples. If it is possible at all, how can I calculate the differences A_diff and B_diff across trials? Is it a problem that the number of trials are not equal? Any help is appreciated! Best, Kathrin _____________________________________ Kathrin Müsch Dept. of Neurophysiology and Pathophysiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg Germany Phone: +49-40-7410-54680 Fax: +49-40-7410-57752 E-Mail: k.muesch at uke.uni-hamburg.de _____________________________________ -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From m.severens at maartenskliniek.nl Fri Sep 9 21:02:55 2011 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Fri, 9 Sep 2011 21:02:55 +0200 Subject: [FieldTrip] ft_appenddata In-Reply-To: <7AA3D9A5-8A7A-4D3B-B7D7-759DB34FF7DB@donders.ru.nl> References: , <7AA3D9A5-8A7A-4D3B-B7D7-759DB34FF7DB@donders.ru.nl> Message-ID: <70FC3ACFFB46314EBEAF9101EA45F50E06AE0F0BCA@smkexch02.maartenskliniek.nl> Hi Leo, Jan-Mathijs I also have the same problem. When appending data from 2 datasets the trialinfo and sampleinfo only contains info from the first dataset. And I need the information to know which trials belong to each condition. I fixed it for my data by concatenating the trialinfo and sampleinfo field myself. You just need to make sure that the funtions you use afterwards do not depend on the sampleinfo field, because this is not correct any more as Jan-Mathijs explained. I'm not sure if this is the best thing to do, but it works for me! Best, Marianne ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Sent: Thursday, September 08, 2011 9:19 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] ft_appenddata Hi Leo, With 'trl', are you referring to data.cfg.previous. ... .trl? I assume that data.trial (which contains the actual data) has the correct dimensionality of 1x605? In the past, fieldtrip also concatenated the trl-matrices, but we feel that this is not appropriate. The reason for this is, that the first 2 columns of these matrices represent the sample numbers that define the epochs of interest, with respect to the first sample in the recording. If the concatenated data are derived from two different datasets, these numbers become meaningless, because they cannot be interpreted unequivocally anymore. Yet, and I hope that this was motivating your question, the trl-matrix was also used (by some) to store trial-specific information, which of course still is meaningful even if the data comes from different recordings. If this indeed relates to your question, please have a look at: http://fieldtrip.fcdonders.nl/faq/i_used_to_work_with_trl-matrices_that_have_more_than_3_columns._why_is_this_not_supported_anymore If your actual question is of a different nature, could you please explain a bit more what is the problem? Thanks, Jan-Mathijs On Sep 8, 2011, at 6:09 PM, Leopold Zizlsperger wrote: Hello thanks in advance for your assistance. I'd like to merge 2 datasets after preprocessing using ft_appendata. Even though it works on first view, "trl" does not add up but keeps the structure of the last dataset (304 in the example): XY_merge=ft_appenddata(cfg, x1, x2); input dataset 1, 29 channels, 301 trials input dataset 2, 29 channels, 304 trials Warning: input data comes from different datafiles > In ft_appenddata at 182 concatenating the trials over all datasets removing sampleinfo field from output output dataset, 29 channels, 605 trials Do I miss the point ? Thanks Best regards Leopold _______________________________________________ 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 From member at linkedin.com Sun Sep 11 12:10:49 2011 From: member at linkedin.com (Baptiste Gauthier via LinkedIn) Date: Sun, 11 Sep 2011 10:10:49 +0000 (UTC) Subject: [FieldTrip] Join my network on LinkedIn Message-ID: <1086134875.2200977.1315735849733.JavaMail.app@ela4-app0132.prod> LinkedIn ------------ Baptiste Gauthier requested to add you as a connection on LinkedIn: ------------------------------------------ I'd like to add you to my professional network on LinkedIn. Accept invitation from Baptiste Gauthier http://www.linkedin.com/e/-deyl8h-gsfv5j41-5i/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/blk/I1691228710_3/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYPnP0NdPwOcz4Vdz59bSVHgndQkTFMbPcRcPsUd34ScjgLrCBxbOYWrSlI/EML_comm_afe/?hs=false&tok=21QZ12ECDyCQU1 View invitation from Baptiste Gauthier http://www.linkedin.com/e/-deyl8h-gsfv5j41-5i/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/blk/I1691228710_3/3dvc34Te38OcjASckALqnpPbOYWrSlI/svi/?hs=false&tok=1C0mlKX7XyCQU1 -- (c) 2011, LinkedIn Corporation -------------- next part -------------- An HTML attachment was scrubbed... URL: From member at linkedin.com Sun Sep 11 12:18:16 2011 From: member at linkedin.com (Baptiste Gauthier via LinkedIn) Date: Sun, 11 Sep 2011 10:18:16 +0000 (UTC) Subject: [FieldTrip] Join my network on LinkedIn Message-ID: <1509982244.2166452.1315736296272.JavaMail.app@ela4-bed78.prod> LinkedIn ------------ Baptiste Gauthier requested to add you as a connection on LinkedIn: ------------------------------------------ I'd like to add you to my professional network on LinkedIn. Accept invitation from Baptiste Gauthier http://www.linkedin.com/e/-deyl8h-gsfvf3nw-2r/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/blk/I1691235494_3/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYPnPgVd3kPcz4Vdz59bSVHgndQkTFMbPcRcPsUd34ScjgLrCBxbOYWrSlI/EML_comm_afe/?hs=false&tok=3IMll11h_GCQU1 View invitation from Baptiste Gauthier http://www.linkedin.com/e/-deyl8h-gsfvf3nw-2r/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/blk/I1691235494_3/3dvd3AQdjcOcjASckALqnpPbOYWrSlI/svi/?hs=false&tok=3CAp_HJI3GCQU1 -- (c) 2011, LinkedIn Corporation -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Sep 12 08:51:48 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 12 Sep 2011 08:51:48 +0200 Subject: [FieldTrip] Fwd: Filtering References: Message-ID: <927A2866-EB73-4C63-A716-8435E4B562BC@donders.ru.nl> Hi Tadeusz, I forward the reply to your question to this forum, because other people may benefit from the discussion. Also, for future questions, it would be good if you directed any question to this list. Everybody can participate in the discussion, increasing the odds for its resolution. Also, in general, when posting a question it would be good to provide as many details as possible (with respect to matlab version, fieldtrip version etc, but also with for example relevant screen dumps). As to your question, please have a look at the pasted matlab-code and attached figure below. In short, I tried to reproduce your problem, but I fail to do so (because the blue and red lines look different enough). Be sure that you use an up-to-date version of FieldTrip. I remember that there have been some problems with filtering in the past, but these have been resolved quite some time ago (at least > 0.5 year or even longer). Best wishes, Jan-Mathijs >> data = []; >> data.trial{1} = randn(1,10000); >> data.time{1} = (0:9999)/1000; >> data.fsample = 1000; >> data.label = {'1'}; >> cfg = []; >> cfg.bpfilter = 'yes'; >> cfg.bpfreq = [0.01 0.2]; >> cfg.bpfilttype = 'fir'; >> datafilt = ft_preprocessing(cfg, data); Warning: the data does not contain a trial definition > In utilities/private/warning_once at 81 In utilities/private/fixsampleinfo at 51 In ft_datatype_raw at 95 In ft_checkdata at 170 In ft_preprocessing at 284 Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > In utilities/private/warning_once at 81 In utilities/private/fixsampleinfo at 64 In ft_datatype_raw at 95 In ft_checkdata at 170 In ft_preprocessing at 284 preprocessing preprocessing trial 1 from 1 the call to "ft_preprocessing" took 1 seconds and an estimated 8 MB >> figure;plot(data.trial{1});hold on;plot(datafilt.trial{1},'r'); Begin forwarded message: > From: "T.W. Kononowicz" > Date: September 9, 2011 3:01:07 PM GMT+02:00 > To: > Subject: Filtering > > Dear Prof. Schoffelen, > > I am trying to filter continuous data using the following code. However, this procedure doesn't affect the data at all. It looks similarly for low and high pass filtering options. I am really puzzled what could go wrong here. Any suggestions? > > cfg = []; > cfg.dataset = '01_21_mRef.vhdr'; > chans = {'FCz' 'Cz' 'Fz'}; > cfg.channel = chans; > cfg.bpfilter = 'yes'; > cfg.bpfilttype = 'fir'; > cfg.bpfreq = [0.01 0.2]; > data = ft_preprocessing(cfg); > > Thank you in advance, > > Tadeusz Kononowicz > University of Groningen, Experimental Psychology > > Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: untitled.png Type: image/png Size: 6767 bytes Desc: not available URL: From justin.sickkids at hotmail.com Tue Sep 13 00:07:36 2011 From: justin.sickkids at hotmail.com (JustinChen) Date: Mon, 12 Sep 2011 18:07:36 -0400 Subject: [FieldTrip] bufferviewer C++ code Message-ID: Hey, all, Recently I want to try to compile the bufferviewer C++ source code under the directory: fieldtrip/realtime/utilities/viewer/. I tried to use the Microsoft Visual C++ IDE to compile the code but it failed, and now I am using the Eclipse+MinGW under the windows environment to compile it. Does anyone know what environment the C++ codes were compiled and debugged originally? And also I notice the code uses the FLTK API pakage to draw the GUI part, any other API libraries required to compile the code? Anybody who is familiar with the code please reply and I really appreciate your help. Thanks and have a good day! Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Tue Sep 13 09:38:49 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 13 Sep 2011 09:38:49 +0200 Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function or method 'randperm' for input arguments of type 'double'.) Message-ID: Dear fieldtrippers, I wish to calculate the stat difference between stimulus and baseline in a group of subjects. I use ft_freqgrandaverage to average across subjects and then ft_freqstatistics (cluster statistic) to compare the 2 conditions (baseline & stimuli). I get this error: ??? Undefined function or method 'randperm' for input arguments of type 'double'. I tried even with the newest version (20110911) but the problem persists. I am not sure what I have to do. Any advice would be super. The script is below. Thanks a lot, Davide datainpath = '/data/home1/drivolta/Out4VG/DATA/'; dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; % Controls Controls = { 'ASS31_TFR_high.mat'; 'CSA07_TFR_high.mat'; 'BMR08_TFR_high.mat'; 'NPD18_TFR_high.mat'; %'BSA08_TFR_high.mat'; %'ABE08_TFR_high.mat'; %'EES05_TFR_high.mat'; %'GPS10_TFR_high.mat'; %'SDA01_TFR_high.mat'; %'CSA17_TFR_high.mat'; %'KBZ16_TFR_high.mat'; }; %-------------------------------------------------------------------------- NControls = length(Controls); %% CONCATENATE DATA for i = 1:length(Controls) fullname = strcat(datainpath, Controls{i,1}); load(fullname); % Activation time window TFR2 = power_continue_high; %Rename to change (select time window) idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); TFR2.time = power_continue_high.time(idx); Stimuli{i} = TFR2; % Baseline time window TFR3 = power_continue_high; idx = find((TFR3.time >= -1) &(TFR3.time < 0)); TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); TFR3.time = TFR2.time; Baseline{i} = TFR3; clear power_continue_high clear TFR2 clear TFR3 end; save Controls2Statistics Stimuli Baseline; cfg = []; cfg.channel = {'MEG', '-MRO31', '-MRO21'}; cfg.keepindividual = 'yes'; BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure containing grad field cfg = []; cfg.method = 'triangulation'; cfg.neighbourdist = 5; cfg.grad = TFR.grad; cfg.layout = 'CTF275.lay'; neighbour = ft_neighbourselection(cfg, Baseline{1}); cfg = []; cfg.grad = TFR.grad; cfg.channel = {'MEG', '-MRO31', '-MRO21'}; cfg.neighbourdist = 4; cfg.minnbchan = 1; cfg.clusteralpha = 0.05; % control admission to a cluster cfg.alpha = 0.05; % control the false alarm rate of the permutation test cfg.latency = [0.5 1.5]; % time interval over which the experimental conditions are compared (in sec) cfg.frequency = [50 70]; cfg.avgovertime = 'no'; cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.clusterstatistics = 'maxsum'; cfg.statistic = 'actvsblT'; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.approach = 'montecarlo'; cfg.dimord = 'chan_freq_time'; cfg.dim = 'chan_freq_time'; cfg.neighbours = neighbour; cfg.tail = 0; cfg.clustertail = 0; nSubjects = 2*length(Controls); a = [1:nSubjects]; b = ones(1,length(Controls)); c = 2*(ones(1,length(Controls))); cfg.design = [a; b c]; cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % row of the design matrix that contains the independent variable stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Tue Sep 13 11:00:13 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Tue, 13 Sep 2011 11:00:13 +0200 Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function or method 'randperm' for input arguments of type 'double'.) In-Reply-To: References: Message-ID: <4E6F1B9D.3050003@donders.ru.nl> Hi Davide, It sounds like you are missing the Statistics Toolbo x for matlab. I remember some internal discussions in the team about writing an internal version of randperm.m with similar functions, but we haven't done so far if I recall correctly. Installing the toolbox, or checking whether you have it on your path should solve your problem. Hope it helps, Roemer On 13-09-11 9:38, Davide Rivolta wrote: > Dear fieldtrippers, > I wish to calculate the stat difference between stimulus and baseline > in a group of subjects. I use ft_freqgrandaverage to average across > subjects and then ft_freqstatistics (cluster statistic) to compare the > 2 conditions (baseline & stimuli). > I get this error: ??? Undefined function or method 'randperm' for > input arguments of type 'double'. > I tried even with the newest version (20110911) but the problem > persists. I am not sure what I have to do. > Any advice would be super. The script is below. > Thanks a lot, > Davide > datainpath = '/data/home1/drivolta/Out4VG/DATA/'; > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; > > % Controls > Controls = { > 'ASS31_TFR_high.mat'; > 'CSA07_TFR_high.mat'; > 'BMR08_TFR_high.mat'; > 'NPD18_TFR_high.mat'; > %'BSA08_TFR_high.mat'; > %'ABE08_TFR_high.mat'; > %'EES05_TFR_high.mat'; > %'GPS10_TFR_high.mat'; > %'SDA01_TFR_high.mat'; > %'CSA17_TFR_high.mat'; > %'KBZ16_TFR_high.mat'; > > }; > %-------------------------------------------------------------------------- > NControls = length(Controls); > %% CONCATENATE DATA > for i = 1:length(Controls) > fullname = strcat(datainpath, Controls{i,1}); > load(fullname); > > % Activation time window > TFR2 = power_continue_high; %Rename to change (select time window) > idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); > TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); > TFR2.time = power_continue_high.time(idx); > Stimuli{i} = TFR2; > > % Baseline time window > TFR3 = power_continue_high; > idx = find((TFR3.time >= -1) &(TFR3.time < 0)); > TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); > TFR3.time = TFR2.time; > Baseline{i} = TFR3; > > clear power_continue_high > clear TFR2 > clear TFR3 > end; > save Controls2Statistics Stimuli Baseline; > > cfg = []; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.keepindividual = 'yes'; > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure > containing grad field > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbourdist = 5; > cfg.grad = TFR.grad; > cfg.layout = 'CTF275.lay'; > neighbour = ft_neighbourselection(cfg, Baseline{1}); > cfg = []; > cfg.grad = TFR.grad; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.neighbourdist = 4; > cfg.minnbchan = 1; > cfg.clusteralpha = 0.05; % control admission to a cluster > cfg.alpha = 0.05; % control the false alarm rate of the > permutation test > cfg.latency = [0.5 1.5]; % time interval over which the > experimental conditions are compared (in sec) > cfg.frequency = [50 70]; > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.clusterstatistics = 'maxsum'; > cfg.statistic = 'actvsblT'; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.approach = 'montecarlo'; > cfg.dimord = 'chan_freq_time'; > cfg.dim = 'chan_freq_time'; > cfg.neighbours = neighbour; > cfg.tail = 0; > cfg.clustertail = 0; > nSubjects = 2*length(Controls); > a = [1:nSubjects]; > b = ones(1,length(Controls)); > c = 2*(ones(1,length(Controls))); > cfg.design = [a; b c]; > cfg.uvar = 1; % "subject" is unit of observation > cfg.ivar = 2; % row of the design matrix that contains the independent > variable > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); > > > _______________________________________________ > 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 anna.lambrechts at gmail.com Tue Sep 13 11:11:49 2011 From: anna.lambrechts at gmail.com (Anna Lambrechts) Date: Tue, 13 Sep 2011 11:11:49 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 10, Issue 15 In-Reply-To: References: Message-ID: Dear David, I have had the same problem after end of August fieldtrip update. I had the right toolbox, but matlab couldn't find the path to it. I just added the exact path for randperm in setpath, which solved the problem. Best, Anna. 2011/9/13 > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. bufferviewer C++ code (JustinChen) > 2. ft_freqstatistics issue (??? Undefined function or method > 'randperm' for input arguments of type 'double'.) (Davide Rivolta) > 3. Re: ft_freqstatistics issue (??? Undefined function or method > 'randperm' for input arguments of type 'double'.) > (Roemer van der Meij) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 12 Sep 2011 18:07:36 -0400 > From: JustinChen > To: > Subject: [FieldTrip] bufferviewer C++ code > Message-ID: > Content-Type: text/plain; charset="gb2312" > > > > > > Hey, all, Recently I want to try to compile the bufferviewer C++ source > code under the directory: fieldtrip/realtime/utilities/viewer/. I tried to > use the Microsoft Visual C++ IDE to compile the code but it failed, and now > I am using the Eclipse+MinGW under the windows environment to compile it. > Does anyone know what environment the C++ codes were compiled and debugged > originally? And also I notice the code uses the FLTK API pakage to draw the > GUI part, any other API libraries required to compile the code? Anybody who > is familiar with the code please reply and I really appreciate your help. > Thanks and have a good day! Justin > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110912/040d9dcc/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Tue, 13 Sep 2011 09:38:49 +0200 > From: Davide Rivolta > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function > or method 'randperm' for input arguments of type 'double'.) > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear fieldtrippers, > > I wish to calculate the stat difference between stimulus and baseline in a > group of subjects. I use ft_freqgrandaverage to average across subjects and > then ft_freqstatistics (cluster statistic) to compare the 2 conditions > (baseline & stimuli). > > I get this error: ??? Undefined function or method 'randperm' for input > arguments of type 'double'. > > I tried even with the newest version (20110911) but the problem persists. I > am not sure what I have to do. > > Any advice would be super. The script is below. > > Thanks a lot, > > Davide > > > > datainpath = '/data/home1/drivolta/Out4VG/DATA/'; > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; > > % Controls > Controls = { > 'ASS31_TFR_high.mat'; > 'CSA07_TFR_high.mat'; > 'BMR08_TFR_high.mat'; > 'NPD18_TFR_high.mat'; > %'BSA08_TFR_high.mat'; > %'ABE08_TFR_high.mat'; > %'EES05_TFR_high.mat'; > %'GPS10_TFR_high.mat'; > %'SDA01_TFR_high.mat'; > %'CSA17_TFR_high.mat'; > %'KBZ16_TFR_high.mat'; > > }; > > %-------------------------------------------------------------------------- > NControls = length(Controls); > > %% CONCATENATE DATA > for i = 1:length(Controls) > fullname = strcat(datainpath, Controls{i,1}); > load(fullname); > > % Activation time window > TFR2 = power_continue_high; %Rename to change (select time window) > idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); > TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); > TFR2.time = power_continue_high.time(idx); > Stimuli{i} = TFR2; > > % Baseline time window > TFR3 = power_continue_high; > idx = find((TFR3.time >= -1) &(TFR3.time < 0)); > TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); > TFR3.time = TFR2.time; > Baseline{i} = TFR3; > > clear power_continue_high > clear TFR2 > clear TFR3 > end; > save Controls2Statistics Stimuli Baseline; > > > > cfg = []; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.keepindividual = 'yes'; > > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); > > > > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure > containing grad field > > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbourdist = 5; > cfg.grad = TFR.grad; > cfg.layout = 'CTF275.lay'; > neighbour = ft_neighbourselection(cfg, Baseline{1}); > cfg = []; > cfg.grad = TFR.grad; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.neighbourdist = 4; > cfg.minnbchan = 1; > cfg.clusteralpha = 0.05; % control admission to a cluster > cfg.alpha = 0.05; % control the false alarm rate of the > permutation test > cfg.latency = [0.5 1.5]; % time interval over which the > experimental conditions are compared (in sec) > cfg.frequency = [50 70]; > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.clusterstatistics = 'maxsum'; > cfg.statistic = 'actvsblT'; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.approach = 'montecarlo'; > cfg.dimord = 'chan_freq_time'; > cfg.dim = 'chan_freq_time'; > cfg.neighbours = neighbour; > cfg.tail = 0; > cfg.clustertail = 0; > > nSubjects = 2*length(Controls); > > a = [1:nSubjects]; > b = ones(1,length(Controls)); > c = 2*(ones(1,length(Controls))); > > cfg.design = [a; b c]; > cfg.uvar = 1; % "subject" is unit of observation > cfg.ivar = 2; % row of the design matrix that contains the independent > variable > > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110913/2e2f657f/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Tue, 13 Sep 2011 11:00:13 +0200 > From: Roemer van der Meij > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] ft_freqstatistics issue (??? Undefined > function or method 'randperm' for input arguments of type 'double'.) > Message-ID: <4E6F1B9D.3050003 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hi Davide, > > It sounds like you are missing the Statistics Toolbo > x for matlab. I > remember some internal discussions in the team about writing an internal > version of randperm.m with similar functions, but we haven't done so far > if I recall correctly. Installing the toolbox, or checking whether you > have it on your path should solve your problem. > > Hope it helps, > Roemer > > > > On 13-09-11 9:38, Davide Rivolta wrote: > > Dear fieldtrippers, > > I wish to calculate the stat difference between stimulus and baseline > > in a group of subjects. I use ft_freqgrandaverage to average across > > subjects and then ft_freqstatistics (cluster statistic) to compare the > > 2 conditions (baseline & stimuli). > > I get this error: ??? Undefined function or method 'randperm' for > > input arguments of type 'double'. > > I tried even with the newest version (20110911) but the problem > > persists. I am not sure what I have to do. > > Any advice would be super. The script is below. > > Thanks a lot, > > Davide > > datainpath = '/data/home1/drivolta/Out4VG/DATA/'; > > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; > > > > % Controls > > Controls = { > > 'ASS31_TFR_high.mat'; > > 'CSA07_TFR_high.mat'; > > 'BMR08_TFR_high.mat'; > > 'NPD18_TFR_high.mat'; > > %'BSA08_TFR_high.mat'; > > %'ABE08_TFR_high.mat'; > > %'EES05_TFR_high.mat'; > > %'GPS10_TFR_high.mat'; > > %'SDA01_TFR_high.mat'; > > %'CSA17_TFR_high.mat'; > > %'KBZ16_TFR_high.mat'; > > > > }; > > > %-------------------------------------------------------------------------- > > NControls = length(Controls); > > %% CONCATENATE DATA > > for i = 1:length(Controls) > > fullname = strcat(datainpath, Controls{i,1}); > > load(fullname); > > > > % Activation time window > > TFR2 = power_continue_high; %Rename to change (select time window) > > idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); > > TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); > > TFR2.time = power_continue_high.time(idx); > > Stimuli{i} = TFR2; > > > > % Baseline time window > > TFR3 = power_continue_high; > > idx = find((TFR3.time >= -1) &(TFR3.time < 0)); > > TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); > > TFR3.time = TFR2.time; > > Baseline{i} = TFR3; > > > > clear power_continue_high > > clear TFR2 > > clear TFR3 > > end; > > save Controls2Statistics Stimuli Baseline; > > > > cfg = []; > > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > > cfg.keepindividual = 'yes'; > > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); > > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); > > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure > > containing grad field > > cfg = []; > > cfg.method = 'triangulation'; > > cfg.neighbourdist = 5; > > cfg.grad = TFR.grad; > > cfg.layout = 'CTF275.lay'; > > neighbour = ft_neighbourselection(cfg, Baseline{1}); > > cfg = []; > > cfg.grad = TFR.grad; > > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > > cfg.neighbourdist = 4; > > cfg.minnbchan = 1; > > cfg.clusteralpha = 0.05; % control admission to a cluster > > cfg.alpha = 0.05; % control the false alarm rate of the > > permutation test > > cfg.latency = [0.5 1.5]; % time interval over which the > > experimental conditions are compared (in sec) > > cfg.frequency = [50 70]; > > cfg.avgovertime = 'no'; > > cfg.avgoverfreq = 'no'; > > cfg.avgoverchan = 'no'; > > cfg.clusterstatistics = 'maxsum'; > > cfg.statistic = 'actvsblT'; > > cfg.numrandomization = 1000; > > cfg.correctm = 'cluster'; > > cfg.method = 'montecarlo'; > > cfg.approach = 'montecarlo'; > > cfg.dimord = 'chan_freq_time'; > > cfg.dim = 'chan_freq_time'; > > cfg.neighbours = neighbour; > > cfg.tail = 0; > > cfg.clustertail = 0; > > nSubjects = 2*length(Controls); > > a = [1:nSubjects]; > > b = ones(1,length(Controls)); > > c = 2*(ones(1,length(Controls))); > > cfg.design = [a; b c]; > > cfg.uvar = 1; % "subject" is unit of observation > > cfg.ivar = 2; % row of the design matrix that contains the independent > > variable > > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); > > > > > > _______________________________________________ > > 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: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110913/b90d5fc8/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 15 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Tue Sep 13 15:31:31 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 13 Sep 2011 15:31:31 +0200 Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function or method 'randperm' for input arguments of type 'double'.) In-Reply-To: <4E6F1B9D.3050003@donders.ru.nl> References: <4E6F1B9D.3050003@donders.ru.nl> Message-ID: Dear Roemer and Anna, Thank you for your help. After setting the path the error disappears. However I know have an error saying that is "could not determine the parametric critical value for clustering". However, in the configuration, I put all the values that are in the tutorial. May it be a problem with my design? Thanks a lot, Davide On Tue, Sep 13, 2011 at 11:00 AM, Roemer van der Meij < r.vandermeij at donders.ru.nl> wrote: > Hi Davide, > > It sounds like you are missing the Statistics Toolbox > for matlab. I remember some internal discussions in the team about writing > an internal version of randperm.m with similar functions, but we haven't > done so far if I recall correctly. Installing the toolbox, or checking > whether you have it on your path should solve your problem. > > Hope it helps, > Roemer > > > > > On 13-09-11 9:38, Davide Rivolta wrote: > > Dear fieldtrippers, > > I wish to calculate the stat difference between stimulus and baseline in a > group of subjects. I use ft_freqgrandaverage to average across subjects and > then ft_freqstatistics (cluster statistic) to compare the 2 conditions > (baseline & stimuli). > > I get this error: ??? Undefined function or method 'randperm' for input > arguments of type 'double'. > > I tried even with the newest version (20110911) but the problem persists. I > am not sure what I have to do. > > Any advice would be super. The script is below. > > Thanks a lot, > > Davide > > > > datainpath = '/data/home1/drivolta/Out4VG/DATA/'; > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; > > % Controls > Controls = { > 'ASS31_TFR_high.mat'; > 'CSA07_TFR_high.mat'; > 'BMR08_TFR_high.mat'; > 'NPD18_TFR_high.mat'; > %'BSA08_TFR_high.mat'; > %'ABE08_TFR_high.mat'; > %'EES05_TFR_high.mat'; > %'GPS10_TFR_high.mat'; > %'SDA01_TFR_high.mat'; > %'CSA17_TFR_high.mat'; > %'KBZ16_TFR_high.mat'; > > }; > > %-------------------------------------------------------------------------- > NControls = length(Controls); > > %% CONCATENATE DATA > for i = 1:length(Controls) > fullname = strcat(datainpath, Controls{i,1}); > load(fullname); > > % Activation time window > TFR2 = power_continue_high; %Rename to change (select time window) > idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); > TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); > TFR2.time = power_continue_high.time(idx); > Stimuli{i} = TFR2; > > % Baseline time window > TFR3 = power_continue_high; > idx = find((TFR3.time >= -1) &(TFR3.time < 0)); > TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); > TFR3.time = TFR2.time; > Baseline{i} = TFR3; > > clear power_continue_high > clear TFR2 > clear TFR3 > end; > save Controls2Statistics Stimuli Baseline; > > > > cfg = []; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.keepindividual = 'yes'; > > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); > > > > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure > containing grad field > > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbourdist = 5; > cfg.grad = TFR.grad; > cfg.layout = 'CTF275.lay'; > neighbour = ft_neighbourselection(cfg, Baseline{1}); > cfg = []; > cfg.grad = TFR.grad; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.neighbourdist = 4; > cfg.minnbchan = 1; > cfg.clusteralpha = 0.05; % control admission to a cluster > cfg.alpha = 0.05; % control the false alarm rate of the > permutation test > cfg.latency = [0.5 1.5]; % time interval over which the > experimental conditions are compared (in sec) > cfg.frequency = [50 70]; > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.clusterstatistics = 'maxsum'; > cfg.statistic = 'actvsblT'; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.approach = 'montecarlo'; > cfg.dimord = 'chan_freq_time'; > cfg.dim = 'chan_freq_time'; > cfg.neighbours = neighbour; > cfg.tail = 0; > cfg.clustertail = 0; > > nSubjects = 2*length(Controls); > > a = [1:nSubjects]; > b = ones(1,length(Controls)); > c = 2*(ones(1,length(Controls))); > > cfg.design = [a; b c]; > cfg.uvar = 1; % "subject" is unit of observation > cfg.ivar = 2; % row of the design matrix that contains the independent > variable > > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); > > > > > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://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 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekanal at cmu.edu Tue Sep 13 22:04:38 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 13 Sep 2011 16:04:38 -0400 Subject: [FieldTrip] bug with localizing Message-ID: <0DA79623-DA99-45A0-8A32-E259771108A1@cmu.edu> Hello folks - I'm trying to localize some activity I recorded, and I'm having a problem with the scripts. Following the instructions in the beamformer tutorial [1], I have the following code, which results in the following error: ~~~~~~~~~~~ ... mri = ft_read_mri('MR.1.3.12.2.1107.5.2.32.35216.20110517110054966038966'); % segment the brain cfg = []; cfg.write = 'no'; cfg.coordsys = 'DICOM'; segmentedmri = ft_volumesegment(cfg, mri); % prepare head model vol = ft_prepare_singleshell([],segmentedmri); ??? Reference to non-existent field 'seg'. Error in ==> prepare_mesh_segmentation at 63 [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); Error in ==> dots_sourceLocalization at 41 vol = ft_prepare_singleshell([],segmentedmri); ~~~~~~~~~~~ It looks like the source of this error is in a recently commented-out line (line 25) in the prepare_mesh_segmentation.m file (build 4120, off the svn): ~~~~~~~~~~~ ... cfg = ft_checkconfig(cfg, 'forbidden', 'numcompartments'); % if ~isfield(mri, 'tissue') && any(ismember(fieldnames(mri), {'gray' 'brain' 'scalp'})), cfg.tissue = 1; end if ~isfield(cfg, 'threshold'), cfg.threshold = 0; end ... ~~~~~~~~~~~ The comment for that commit is "bugfix". Any ideas how to work around this problem? Thanks - Elli Kanal -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 [1] http://fieldtrip.fcdonders.nl/tutorial/beamformer#the_forward_model_and_lead_field_matrix From johanna.zumer at donders.ru.nl Wed Sep 14 08:50:49 2011 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 14 Sep 2011 08:50:49 +0200 Subject: [FieldTrip] bug with localizing In-Reply-To: <0DA79623-DA99-45A0-8A32-E259771108A1@cmu.edu> References: <0DA79623-DA99-45A0-8A32-E259771108A1@cmu.edu> Message-ID: Hi Elli and FT users, Apologies for this bug, I introduced it last week in attempting to fix something else (allowing 3 shells to work). I have already fixed this yesterday (reintroducing this line 25 with some extra 'if' clauses which hopefully will work for everyone), so it should already be on the SVN server as of this morning. Thank you for reporting it! Johanna On 13 September 2011 22:04, Kanal Eliezer wrote: > Hello folks - > > I'm trying to localize some activity I recorded, and I'm having a problem > with the scripts. Following the instructions in the beamformer tutorial [1], > I have the following code, which results in the following error: > > ~~~~~~~~~~~ > ... > mri = ft_read_mri('MR.1.3.12.2.1107.5.2.32.35216.20110517110054966038966'); > > % segment the brain > cfg = []; > cfg.write = 'no'; > cfg.coordsys = 'DICOM'; > segmentedmri = ft_volumesegment(cfg, mri); > > % prepare head model > vol = ft_prepare_singleshell([],segmentedmri); > > > ??? Reference to non-existent field 'seg'. > > Error in ==> prepare_mesh_segmentation at 63 > [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), > 1:size(mri.seg,3)); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > Error in ==> dots_sourceLocalization at 41 > vol = ft_prepare_singleshell([],segmentedmri); > ~~~~~~~~~~~ > > It looks like the source of this error is in a recently commented-out line > (line 25) in the prepare_mesh_segmentation.m file (build 4120, off the svn): > > ~~~~~~~~~~~ > ... > cfg = ft_checkconfig(cfg, 'forbidden', 'numcompartments'); > % if ~isfield(mri, 'tissue') && any(ismember(fieldnames(mri), {'gray' > 'brain' 'scalp'})), cfg.tissue = 1; end > if ~isfield(cfg, 'threshold'), cfg.threshold = 0; end > ... > ~~~~~~~~~~~ > > The comment for that commit is "bugfix". Any ideas how to work around this > problem? Thanks - > > Elli Kanal > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > > [1] > http://fieldtrip.fcdonders.nl/tutorial/beamformer#the_forward_model_and_lead_field_matrix > _______________________________________________ > 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 jm.horschig at donders.ru.nl Wed Sep 14 15:41:45 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 14 Sep 2011 15:41:45 +0200 Subject: [FieldTrip] Critical bug in ft_channelrepair fixed Message-ID: <4E70AF19.2040003@donders.ru.nl> Hey everyone, we found a critical bug in ft_channelrepair, which we fixed now. The bug caused wrong channels to be chosen for interpolation in some situations, meaning that the timecourse your repaired channel did not make sense. Please be aware of this, check your reconstructed channels and re-run your channel reconstruction if you are in doubt with the newest FieldTrip version! For more information, check Google code: http://code.google.com/p/fieldtrip/source/detail?r=4158 and Bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=941 Best regards, Jörn -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 c.micheli at fcdonders.ru.nl Wed Sep 14 17:56:38 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Wed, 14 Sep 2011 17:56:38 +0200 (CEST) Subject: [FieldTrip] Fwd: AW: Forward solution using concentric spheres and BEM models In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE2F@XMAIL1.medads.uk-erlangen.de> Message-ID: <1624476173.1270054.1316015798685.JavaMail.root@draco.zimbra.ru.nl> Hi Margit and Juan Pablo see my answers below. ----- "Margit Schönherr" schreef: > Van: "Margit Schönherr" > Aan: "c micheli" > Verzonden: Woensdag 7 september 2011 09:33:53 > Onderwerp: AW: [FieldTrip] Forward solution using concentric spheres and BEM models > > Hello Cristiano, > > thank you for your email. I have tried the code, but I have 2 problems > with it. > 1) When I do it exactly as suggested in the email, I get the following > error when using ft_prepare_mesh: > > bnd = ft_prepare_mesh(cfg, mri_segment); > ??? Error using ==> ft_prepare_mesh at 159 > unsupported cfg.method and/or input > > I think, this is simply a problem concerning the naming of the > variables. The segmented mri is called 'seg', the labels are assigned > to 'mri_segment'. I think, this is the wrong input for > ft_prepare_mesh, because 'mri_segment' does not contain any mri > information. Putting the labels into a new field 'seg.seg' and calling > bnd = ft_prepare_mesh(cfg, seg) solves this. > I could replicate the error and this is due to the fact that ft_prepare_mesh accepts inputs of FieldTrip type 'volume'. See ft_datatype_volume. The function crashed because I simply used an old version of the test file where I inputted the volume matrix only, whereas three fields are required (dim, transform and anatomy), that's why the input should look like this: mri2 = []; mri2.anatomy = mri_segment; mri2.dim = mri.dim; mri2.transform = mri.transform; I patched the correct code at the end of the mail. > 2) However, there is still only one surface triangulated. So as I > wrote in my last email, I still believe that line 25 in > prepare_mesh_segmentation needs to be commented. What do you mean? I agree. This function needs a general review altogether and at the moment I committed your correction. In the future I'll restructure the whole function taking care of the more recent guidelines. Thanks for your suggestion. Try this: % download from the FieldTrip ftp site % (ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip) % load the MRI mri = ft_read_mri('Subject01.mri'); % segment it cfg = []; cfg.output = {'scalp', 'skull', 'brain'}; seg = ft_volumesegment(cfg, mri); % volumetric preprocessing % Note: the three compartments have to be 'filled' otherwise the triangulation won't work correctly. The output of ft_volumesegment will change soon, making it compatible with ft_prepare_mesh. As of today we need the following: mri_segment{1} = seg.scalp; mri_segment{2} = imfill(seg.skull,'holes'); % you need the image processing toolbox here! mri_segment{3} = seg.brain; % triangulation (from volumes to surfaces) % Note: now the volumes are inputted one at a time mri2 = mri; cfg=[]; cfg.sourceunits = 'mm'; cfg.mrinuits = 'mm'; cfg.tissue = 1; cfg.numvertices = 1000; for i=1:3 mri2.seg = mri_segment{i}; mesh{i} = ft_prepare_mesh(cfg,mri2); end % visualization of the triangulated surfaces figure,ft_plot_mesh(mesh{1},'edgecolor','none','facecolor','w','facealpha',0.5) ft_plot_mesh(mesh{2},'edgecolor','none','facecolor','g','facealpha',0.7) ft_plot_mesh(mesh{3},'edgecolor','none','facecolor','r','facealpha',1) > Thank you. Be my guest. Cheers, Cristiano > > Best regards, > Margit > > > *********************************** > Margit Schönherr > Universitätsklinikum Erlangen > Neurologische Klinik > Epilepsiezentrum (Biomagnetismus) > Schwabachanlage 6 > 91054 Erlangen > Telefon: ++49 9131 / 85 36921 > Email: margit.schoenherr at uk-erlangen.de > *********************************** > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > im Auftrag von Micheli, C. [c.micheli at fcdonders.ru.nl] > Gesendet: Montag, 5. September 2011 12:59 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] Forward solution using concentric spheres > and BEM models > > Dear Juan Pablo and Margit > > The function 'ft_prepare_mesh' takes care of triangulating every > compartment via the cfg.tissue option. This option contains the > integers which describe a type of tissue, given that the user > beforehand defined all voxels of the segmented MRI compartment as > having that particular value. > As an example, download the sample MRI in FieldTrip ftp location: > > ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip > Create a folder and unzip these files. > > % read in the mri > mri = ft_read_mri('Subject01.mri'); > > % segment it > cfg = []; > cfg.output = {'scalp', 'skull', 'brain'}; > seg = ft_volumesegment(cfg, mri); > > % assign a label > scalp = (seg.scalp) & ~(seg.skull | seg.brain); > skull = 2*(seg.skull); > brain = 3*(seg.brain); > mri_segment = scalp + skull + brain; > > % build the meshes > cfg = []; > cfg.method = 'segmentation'; > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > cfg.numvertices = [2000 1000 800]; > cfg.sourceunits = 'mm'; > cfg.mriunits = 'mm'; > bnd = ft_prepare_mesh(cfg, mri_segment); > > If any of the tissues has a different value from cfg.tissues this > won't be triangulated. To check for this use ft_sourceplot in the > interactive mode. By clicking around you can see the tissue's value in > the command window: > > % view the labelled segmentations > mri2 = mri; > mri2.seg = mri_segment; > cfg=[]; > cfg.interactive = 'yes'; > cfg.funparameter = 'seg'; > ft_sourceplot(cfg,mri2); > > About the concentric spheres: > both ways to derive a concentric spheres model are correct. In one > case you directly build the vol structure and you assume you know the > radiuses of your spheres. In the other case you allow the > ft_prepare_concentricspheres function to build the spheres starting > from realistic geometrical boundaries. > The second approach is my favorite because the ft_prepare function > contains a function that fits a sphere to each boundary and I don't > have to do it myself. > The first approach (directly force the radiuses in your vol structure) > is preferable if you derive the information from other software (e.g. > CTF's MRIView) or if you fit the sphere yourself. > > @Pablo > If the sphere is fitted inside the brain it is correct. You do not > want the sphere to include other tissues, because your assumption for > the construction of the forward model is that the tissue inside the > sphere is homogeneous. > For a more realistic model (encompassing the whole brain volume) I > would rather use a BEM model. > > I hope this helps, > Cristiano From paolo.belardinelli at med.uni-tuebingen.de Wed Sep 14 18:18:36 2011 From: paolo.belardinelli at med.uni-tuebingen.de (Paolo Belardinelli) Date: Wed, 14 Sep 2011 18:18:36 +0200 Subject: [FieldTrip] cortical time-course reconstruction Message-ID: <4E70D3DC.4060403@med.uni-tuebingen.de> Hi Robert. We have some nice coherence maps with peaks in M1 for a finger tapping task. We were wondering how to properly reconstruct the power time-course in the M1 area in order to use it as a further reference signal. -Is the code necessary for the approach described in (Schoffelen et al., NeuroImage 2008) already implemented in ft (we observed in the code that it is possible in ft_sourceanalysis.m to give a location for a reference dipole but we found no documentation)? -Is the only reliable solution for reconstructing a time-course to project the activity in the dominant direction? We have the eigenvalues of the first dipole which are normally 3 to 6 times larger than the ones of the second. We are not sure this is enough to neglect the second component. - One last technical question: in the mailing list it is said that the orientation of the dipole is saved in source.avg.ori but it doesn't seem like that to us. Maybe we are doing something wrong. Best regards and thank you for your work, Paolo and Erick From e.maris at donders.ru.nl Thu Sep 15 10:10:36 2011 From: e.maris at donders.ru.nl (Eric Maris) Date: Thu, 15 Sep 2011 10:10:36 +0200 Subject: [FieldTrip] interaction within-subject indepsamplesT In-Reply-To: <1238529C-1B93-4BC9-B625-B16991718014@uke.uni-hamburg.de> References: <1238529C-1B93-4BC9-B625-B16991718014@uke.uni-hamburg.de> Message-ID: <008d01cc737e$f6192ba0$e24b82e0$@maris@donders.ru.nl> Dear Kathrin, > I need your advice on how to correctly test the interaction effects in a 2x2 > within-subject design with cluster-based randomization tests. I have two > factors A and B with the levels a1/a2 and b1/b2. In addition, the number of > trials in A are about twice as much as in B. > > The procedure would be totally clear in a between-subject design (as in a > previous post on the list: > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) This post is about a WITHIN-subjects design. > because I could easily compute the differences of the factor levels > A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the > differences. However, since I have to run the statistics across trials and not > subjects I have independent samples and not dependent samples. So, you have a between-trials design. If it is > possible at all, how can I calculate the differences A_diff and B_diff across > trials? Is it a problem that the number of trials are not equal? This is not possible. Permutation tests cannot be used for testing interactions in a multi-factorial between-subjects/trials design. Michael Wibral has a post in which he refers to a nice statistics paper on the issue. A proxy that is possible (but not statistically sound) is to perform two statistical tests of the first factor, once at the first level of second factor and once at the second level. Best, Eric Maris > > Any help is appreciated! > > Best, > Kathrin > > _____________________________________ > Kathrin Müsch > > Dept. of Neurophysiology and Pathophysiology > University Medical Center Hamburg-Eppendorf > Martinistr. 52 > 20246 Hamburg > Germany > Phone: +49-40-7410-54680 > Fax: +49-40-7410-57752 > E-Mail: k.muesch at uke.uni-hamburg.de > _____________________________________ > > > -- > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > Rechts; Gerichtsstand: Hamburg > > Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. Alexander > Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From johan.bergmann at yahoo.com Thu Sep 15 14:14:25 2011 From: johan.bergmann at yahoo.com (Johan Bergmann) Date: Thu, 15 Sep 2011 05:14:25 -0700 (PDT) Subject: [FieldTrip] I AM FREE NOW! Message-ID: <1316088865.66924.androidMobile@web45505.mail.sp1.yahoo.com>

ive always been pressured to be the best I learned to expect the unexpected this caught my eye a few weeks ago.
http://chojnacka-paulina.yoyo.pl/MarkCarter10.html now I dont feel something missing anymore I wouldnt waste your time

-------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Thu Sep 15 16:07:39 2011 From: fredericroux at hotmail.de (Frederic Roux) Date: Thu, 15 Sep 2011 16:07:39 +0200 Subject: [FieldTrip] channel_repair bug In-Reply-To: References: Message-ID: Hi Jorn, I was wondering if the bug you reported concerning the channel_repair function also applied to older versions of fieldtrip and in which cases this bug appears. This would be important for me to know as I have been using the function in the past and would like to know if it affects my results or not. Best, Frederic -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 > From: fieldtrip-request at donders.ru.nl > Subject: fieldtrip Digest, Vol 10, Issue 18 > To: fieldtrip at donders.ru.nl > Date: Thu, 15 Sep 2011 12:00:17 +0200 > > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Critical bug in ft_channelrepair fixed (J?rn M. Horschig) > 2. Fwd: AW: Forward solution using concentric spheres and BEM > models (Micheli, C.) > 3. cortical time-course reconstruction (Paolo Belardinelli) > 4. Re: interaction within-subject indepsamplesT (Eric Maris) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 14 Sep 2011 15:41:45 +0200 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: [FieldTrip] Critical bug in ft_channelrepair fixed > Message-ID: <4E70AF19.2040003 at donders.ru.nl> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hey everyone, > > we found a critical bug in ft_channelrepair, which we fixed now. The bug > caused wrong channels to be chosen for interpolation in some situations, > meaning that the timecourse your repaired channel did not make sense. > Please be aware of this, check your reconstructed channels and re-run > your channel reconstruction if you are in doubt with the newest > FieldTrip version! > > For more information, check Google code: > http://code.google.com/p/fieldtrip/source/detail?r=4158 > and Bugzilla: > http://bugzilla.fcdonders.nl/show_bug.cgi?id=941 > > Best regards, > J?rn > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > 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 > > > > ------------------------------ > > Message: 2 > Date: Wed, 14 Sep 2011 17:56:38 +0200 (CEST) > From: "Micheli, C." > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Fwd: AW: Forward solution using concentric > spheres and BEM models > Message-ID: > <1624476173.1270054.1316015798685.JavaMail.root at draco.zimbra.ru.nl> > Content-Type: text/plain; charset=utf-8 > > Hi Margit and Juan Pablo > see my answers below. > > ----- "Margit Sch?nherr" schreef: > > > Van: "Margit Sch?nherr" > > Aan: "c micheli" > > Verzonden: Woensdag 7 september 2011 09:33:53 > > Onderwerp: AW: [FieldTrip] Forward solution using concentric spheres and BEM models > > > > Hello Cristiano, > > > > thank you for your email. I have tried the code, but I have 2 problems > > with it. > > 1) When I do it exactly as suggested in the email, I get the following > > error when using ft_prepare_mesh: > > > > bnd = ft_prepare_mesh(cfg, mri_segment); > > ??? Error using ==> ft_prepare_mesh at 159 > > unsupported cfg.method and/or input > > > > I think, this is simply a problem concerning the naming of the > > variables. The segmented mri is called 'seg', the labels are assigned > > to 'mri_segment'. I think, this is the wrong input for > > ft_prepare_mesh, because 'mri_segment' does not contain any mri > > information. Putting the labels into a new field 'seg.seg' and calling > > bnd = ft_prepare_mesh(cfg, seg) solves this. > > > > I could replicate the error and this is due to the fact that ft_prepare_mesh accepts inputs of FieldTrip type 'volume'. See ft_datatype_volume. The function crashed because I simply used an old version of the test file where I inputted the volume matrix only, whereas three fields are required (dim, transform and anatomy), that's why the input should look like this: > > mri2 = []; > mri2.anatomy = mri_segment; > mri2.dim = mri.dim; > mri2.transform = mri.transform; > > I patched the correct code at the end of the mail. > > > 2) However, there is still only one surface triangulated. So as I > > wrote in my last email, I still believe that line 25 in > > prepare_mesh_segmentation needs to be commented. What do you mean? > > > I agree. This function needs a general review altogether and at the moment I committed your correction. In the future I'll restructure the whole function taking care of the more recent guidelines. Thanks for your suggestion. > > Try this: > > % download from the FieldTrip ftp site > % (ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip) > > % load the MRI > mri = ft_read_mri('Subject01.mri'); > > % segment it > cfg = []; > cfg.output = {'scalp', 'skull', 'brain'}; > seg = ft_volumesegment(cfg, mri); > > % volumetric preprocessing > % Note: the three compartments have to be 'filled' otherwise the triangulation won't work correctly. The output of ft_volumesegment will change soon, making it compatible with ft_prepare_mesh. As of today we need the following: > > mri_segment{1} = seg.scalp; > mri_segment{2} = imfill(seg.skull,'holes'); % you need the image processing toolbox here! > mri_segment{3} = seg.brain; > > % triangulation (from volumes to surfaces) > % Note: now the volumes are inputted one at a time > mri2 = mri; > cfg=[]; > cfg.sourceunits = 'mm'; > cfg.mrinuits = 'mm'; > cfg.tissue = 1; > cfg.numvertices = 1000; > for i=1:3 > mri2.seg = mri_segment{i}; > mesh{i} = ft_prepare_mesh(cfg,mri2); > end > > % visualization of the triangulated surfaces > figure,ft_plot_mesh(mesh{1},'edgecolor','none','facecolor','w','facealpha',0.5) > ft_plot_mesh(mesh{2},'edgecolor','none','facecolor','g','facealpha',0.7) > ft_plot_mesh(mesh{3},'edgecolor','none','facecolor','r','facealpha',1) > > > > Thank you. > > Be my guest. > Cheers, > Cristiano > > > > > Best regards, > > Margit > > > > > > *********************************** > > Margit Sch?nherr > > Universit?tsklinikum Erlangen > > Neurologische Klinik > > Epilepsiezentrum (Biomagnetismus) > > Schwabachanlage 6 > > 91054 Erlangen > > Telefon: ++49 9131 / 85 36921 > > Email: margit.schoenherr at uk-erlangen.de > > *********************************** > > ________________________________________ > > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > > im Auftrag von Micheli, C. [c.micheli at fcdonders.ru.nl] > > Gesendet: Montag, 5. September 2011 12:59 > > An: Email discussion list for the FieldTrip project > > Betreff: Re: [FieldTrip] Forward solution using concentric spheres > > and BEM models > > > > Dear Juan Pablo and Margit > > > > The function 'ft_prepare_mesh' takes care of triangulating every > > compartment via the cfg.tissue option. This option contains the > > integers which describe a type of tissue, given that the user > > beforehand defined all voxels of the segmented MRI compartment as > > having that particular value. > > As an example, download the sample MRI in FieldTrip ftp location: > > > > ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip > > Create a folder and unzip these files. > > > > % read in the mri > > mri = ft_read_mri('Subject01.mri'); > > > > % segment it > > cfg = []; > > cfg.output = {'scalp', 'skull', 'brain'}; > > seg = ft_volumesegment(cfg, mri); > > > > % assign a label > > scalp = (seg.scalp) & ~(seg.skull | seg.brain); > > skull = 2*(seg.skull); > > brain = 3*(seg.brain); > > mri_segment = scalp + skull + brain; > > > > % build the meshes > > cfg = []; > > cfg.method = 'segmentation'; > > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > > cfg.numvertices = [2000 1000 800]; > > cfg.sourceunits = 'mm'; > > cfg.mriunits = 'mm'; > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > If any of the tissues has a different value from cfg.tissues this > > won't be triangulated. To check for this use ft_sourceplot in the > > interactive mode. By clicking around you can see the tissue's value in > > the command window: > > > > % view the labelled segmentations > > mri2 = mri; > > mri2.seg = mri_segment; > > cfg=[]; > > cfg.interactive = 'yes'; > > cfg.funparameter = 'seg'; > > ft_sourceplot(cfg,mri2); > > > > About the concentric spheres: > > both ways to derive a concentric spheres model are correct. In one > > case you directly build the vol structure and you assume you know the > > radiuses of your spheres. In the other case you allow the > > ft_prepare_concentricspheres function to build the spheres starting > > from realistic geometrical boundaries. > > The second approach is my favorite because the ft_prepare function > > contains a function that fits a sphere to each boundary and I don't > > have to do it myself. > > The first approach (directly force the radiuses in your vol structure) > > is preferable if you derive the information from other software (e.g. > > CTF's MRIView) or if you fit the sphere yourself. > > > > @Pablo > > If the sphere is fitted inside the brain it is correct. You do not > > want the sphere to include other tissues, because your assumption for > > the construction of the forward model is that the tissue inside the > > sphere is homogeneous. > > For a more realistic model (encompassing the whole brain volume) I > > would rather use a BEM model. > > > > I hope this helps, > > Cristiano > > > > ------------------------------ > > Message: 3 > Date: Wed, 14 Sep 2011 18:18:36 +0200 > From: Paolo Belardinelli > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] cortical time-course reconstruction > Message-ID: <4E70D3DC.4060403 at med.uni-tuebingen.de> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Robert. > We have some nice coherence maps with peaks in M1 for a finger tapping > task. We were wondering how to properly reconstruct the power > time-course in the M1 area in order to use it as a further reference > signal. > > -Is the code necessary for the approach described in (Schoffelen et al., > NeuroImage 2008) already implemented in ft (we observed in the code that > it is possible in ft_sourceanalysis.m to give a location for a > reference dipole but we found no documentation)? > > -Is the only reliable solution for reconstructing a time-course to > project the activity in the dominant direction? We have the eigenvalues > of the first dipole which are normally 3 to 6 times larger > than the ones of the second. We are not sure this is enough to neglect > the second component. > > - One last technical question: in the mailing list it is said that the > orientation of the dipole is saved in source.avg.ori but it doesn't seem > like that to us. Maybe we are doing something wrong. > > Best regards and thank you for your work, > > Paolo and Erick > > > ------------------------------ > > Message: 4 > Date: Thu, 15 Sep 2011 10:10:36 +0200 > From: "Eric Maris" > To: "'Email discussion list for the FieldTrip project'" > > Subject: Re: [FieldTrip] interaction within-subject indepsamplesT > Message-ID: <008d01cc737e$f6192ba0$e24b82e0$@maris at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Dear Kathrin, > > > I need your advice on how to correctly test the interaction effects in a > 2x2 > > within-subject design with cluster-based randomization tests. I have two > > factors A and B with the levels a1/a2 and b1/b2. In addition, the number > of > > trials in A are about twice as much as in B. > > > > The procedure would be totally clear in a between-subject design (as in a > > previous post on the list: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) > > This post is about a WITHIN-subjects design. > > > because I could easily compute the differences of the factor levels > > A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the > > differences. However, since I have to run the statistics across trials and > not > > subjects I have independent samples and not dependent samples. > > So, you have a between-trials design. > > If it is > > possible at all, how can I calculate the differences A_diff and B_diff > across > > trials? Is it a problem that the number of trials are not equal? > > This is not possible. Permutation tests cannot be used for testing > interactions in a multi-factorial between-subjects/trials design. Michael > Wibral has a post in which he refers to a nice statistics paper on the > issue. > > A proxy that is possible (but not statistically sound) is to perform two > statistical tests of the first factor, once at the first level of second > factor and once at the second level. > > > Best, > > Eric Maris > > > > > > > > > > > > Any help is appreciated! > > > > Best, > > Kathrin > > > > _____________________________________ > > Kathrin M?sch > > > > Dept. of Neurophysiology and Pathophysiology > > University Medical Center Hamburg-Eppendorf > > Martinistr. 52 > > 20246 Hamburg > > Germany > > Phone: +49-40-7410-54680 > > Fax: +49-40-7410-57752 > > E-Mail: k.muesch at uke.uni-hamburg.de > > _____________________________________ > > > > > > -- > > Pflichtangaben gem?? Gesetz ?ber elektronische Handelsregister und > > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > > > Universit?tsklinikum Hamburg-Eppendorf; K?rperschaft des ?ffentlichen > > Rechts; Gerichtsstand: Hamburg > > > > Vorstandsmitglieder: Prof. Dr. J?rg F. Debatin (Vorsitzender), Dr. > Alexander > > Kirstein, Joachim Pr?l?, Prof. Dr. Dr. Uwe Koch-Gromus > > > > > > _______________________________________________ > > 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 > > End of fieldtrip Digest, Vol 10, Issue 18 > ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Thu Sep 15 16:17:21 2011 From: fredericroux at hotmail.de (Frederic Roux) Date: Thu, 15 Sep 2011 16:17:21 +0200 Subject: [FieldTrip] channel_repair bug In-Reply-To: References: Message-ID: Is the google code correct or does it still have the bug? -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 > From: fieldtrip-request at donders.ru.nl > Subject: fieldtrip Digest, Vol 10, Issue 18 > To: fieldtrip at donders.ru.nl > Date: Thu, 15 Sep 2011 12:00:17 +0200 > > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Critical bug in ft_channelrepair fixed (J?rn M. Horschig) > 2. Fwd: AW: Forward solution using concentric spheres and BEM > models (Micheli, C.) > 3. cortical time-course reconstruction (Paolo Belardinelli) > 4. Re: interaction within-subject indepsamplesT (Eric Maris) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 14 Sep 2011 15:41:45 +0200 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: [FieldTrip] Critical bug in ft_channelrepair fixed > Message-ID: <4E70AF19.2040003 at donders.ru.nl> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hey everyone, > > we found a critical bug in ft_channelrepair, which we fixed now. The bug > caused wrong channels to be chosen for interpolation in some situations, > meaning that the timecourse your repaired channel did not make sense. > Please be aware of this, check your reconstructed channels and re-run > your channel reconstruction if you are in doubt with the newest > FieldTrip version! > > For more information, check Google code: > http://code.google.com/p/fieldtrip/source/detail?r=4158 > and Bugzilla: > http://bugzilla.fcdonders.nl/show_bug.cgi?id=941 > > Best regards, > J?rn > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > 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 > > > > ------------------------------ > > Message: 2 > Date: Wed, 14 Sep 2011 17:56:38 +0200 (CEST) > From: "Micheli, C." > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Fwd: AW: Forward solution using concentric > spheres and BEM models > Message-ID: > <1624476173.1270054.1316015798685.JavaMail.root at draco.zimbra.ru.nl> > Content-Type: text/plain; charset=utf-8 > > Hi Margit and Juan Pablo > see my answers below. > > ----- "Margit Sch?nherr" schreef: > > > Van: "Margit Sch?nherr" > > Aan: "c micheli" > > Verzonden: Woensdag 7 september 2011 09:33:53 > > Onderwerp: AW: [FieldTrip] Forward solution using concentric spheres and BEM models > > > > Hello Cristiano, > > > > thank you for your email. I have tried the code, but I have 2 problems > > with it. > > 1) When I do it exactly as suggested in the email, I get the following > > error when using ft_prepare_mesh: > > > > bnd = ft_prepare_mesh(cfg, mri_segment); > > ??? Error using ==> ft_prepare_mesh at 159 > > unsupported cfg.method and/or input > > > > I think, this is simply a problem concerning the naming of the > > variables. The segmented mri is called 'seg', the labels are assigned > > to 'mri_segment'. I think, this is the wrong input for > > ft_prepare_mesh, because 'mri_segment' does not contain any mri > > information. Putting the labels into a new field 'seg.seg' and calling > > bnd = ft_prepare_mesh(cfg, seg) solves this. > > > > I could replicate the error and this is due to the fact that ft_prepare_mesh accepts inputs of FieldTrip type 'volume'. See ft_datatype_volume. The function crashed because I simply used an old version of the test file where I inputted the volume matrix only, whereas three fields are required (dim, transform and anatomy), that's why the input should look like this: > > mri2 = []; > mri2.anatomy = mri_segment; > mri2.dim = mri.dim; > mri2.transform = mri.transform; > > I patched the correct code at the end of the mail. > > > 2) However, there is still only one surface triangulated. So as I > > wrote in my last email, I still believe that line 25 in > > prepare_mesh_segmentation needs to be commented. What do you mean? > > > I agree. This function needs a general review altogether and at the moment I committed your correction. In the future I'll restructure the whole function taking care of the more recent guidelines. Thanks for your suggestion. > > Try this: > > % download from the FieldTrip ftp site > % (ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip) > > % load the MRI > mri = ft_read_mri('Subject01.mri'); > > % segment it > cfg = []; > cfg.output = {'scalp', 'skull', 'brain'}; > seg = ft_volumesegment(cfg, mri); > > % volumetric preprocessing > % Note: the three compartments have to be 'filled' otherwise the triangulation won't work correctly. The output of ft_volumesegment will change soon, making it compatible with ft_prepare_mesh. As of today we need the following: > > mri_segment{1} = seg.scalp; > mri_segment{2} = imfill(seg.skull,'holes'); % you need the image processing toolbox here! > mri_segment{3} = seg.brain; > > % triangulation (from volumes to surfaces) > % Note: now the volumes are inputted one at a time > mri2 = mri; > cfg=[]; > cfg.sourceunits = 'mm'; > cfg.mrinuits = 'mm'; > cfg.tissue = 1; > cfg.numvertices = 1000; > for i=1:3 > mri2.seg = mri_segment{i}; > mesh{i} = ft_prepare_mesh(cfg,mri2); > end > > % visualization of the triangulated surfaces > figure,ft_plot_mesh(mesh{1},'edgecolor','none','facecolor','w','facealpha',0.5) > ft_plot_mesh(mesh{2},'edgecolor','none','facecolor','g','facealpha',0.7) > ft_plot_mesh(mesh{3},'edgecolor','none','facecolor','r','facealpha',1) > > > > Thank you. > > Be my guest. > Cheers, > Cristiano > > > > > Best regards, > > Margit > > > > > > *********************************** > > Margit Sch?nherr > > Universit?tsklinikum Erlangen > > Neurologische Klinik > > Epilepsiezentrum (Biomagnetismus) > > Schwabachanlage 6 > > 91054 Erlangen > > Telefon: ++49 9131 / 85 36921 > > Email: margit.schoenherr at uk-erlangen.de > > *********************************** > > ________________________________________ > > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > > im Auftrag von Micheli, C. [c.micheli at fcdonders.ru.nl] > > Gesendet: Montag, 5. September 2011 12:59 > > An: Email discussion list for the FieldTrip project > > Betreff: Re: [FieldTrip] Forward solution using concentric spheres > > and BEM models > > > > Dear Juan Pablo and Margit > > > > The function 'ft_prepare_mesh' takes care of triangulating every > > compartment via the cfg.tissue option. This option contains the > > integers which describe a type of tissue, given that the user > > beforehand defined all voxels of the segmented MRI compartment as > > having that particular value. > > As an example, download the sample MRI in FieldTrip ftp location: > > > > ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip > > Create a folder and unzip these files. > > > > % read in the mri > > mri = ft_read_mri('Subject01.mri'); > > > > % segment it > > cfg = []; > > cfg.output = {'scalp', 'skull', 'brain'}; > > seg = ft_volumesegment(cfg, mri); > > > > % assign a label > > scalp = (seg.scalp) & ~(seg.skull | seg.brain); > > skull = 2*(seg.skull); > > brain = 3*(seg.brain); > > mri_segment = scalp + skull + brain; > > > > % build the meshes > > cfg = []; > > cfg.method = 'segmentation'; > > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > > cfg.numvertices = [2000 1000 800]; > > cfg.sourceunits = 'mm'; > > cfg.mriunits = 'mm'; > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > If any of the tissues has a different value from cfg.tissues this > > won't be triangulated. To check for this use ft_sourceplot in the > > interactive mode. By clicking around you can see the tissue's value in > > the command window: > > > > % view the labelled segmentations > > mri2 = mri; > > mri2.seg = mri_segment; > > cfg=[]; > > cfg.interactive = 'yes'; > > cfg.funparameter = 'seg'; > > ft_sourceplot(cfg,mri2); > > > > About the concentric spheres: > > both ways to derive a concentric spheres model are correct. In one > > case you directly build the vol structure and you assume you know the > > radiuses of your spheres. In the other case you allow the > > ft_prepare_concentricspheres function to build the spheres starting > > from realistic geometrical boundaries. > > The second approach is my favorite because the ft_prepare function > > contains a function that fits a sphere to each boundary and I don't > > have to do it myself. > > The first approach (directly force the radiuses in your vol structure) > > is preferable if you derive the information from other software (e.g. > > CTF's MRIView) or if you fit the sphere yourself. > > > > @Pablo > > If the sphere is fitted inside the brain it is correct. You do not > > want the sphere to include other tissues, because your assumption for > > the construction of the forward model is that the tissue inside the > > sphere is homogeneous. > > For a more realistic model (encompassing the whole brain volume) I > > would rather use a BEM model. > > > > I hope this helps, > > Cristiano > > > > ------------------------------ > > Message: 3 > Date: Wed, 14 Sep 2011 18:18:36 +0200 > From: Paolo Belardinelli > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] cortical time-course reconstruction > Message-ID: <4E70D3DC.4060403 at med.uni-tuebingen.de> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Robert. > We have some nice coherence maps with peaks in M1 for a finger tapping > task. We were wondering how to properly reconstruct the power > time-course in the M1 area in order to use it as a further reference > signal. > > -Is the code necessary for the approach described in (Schoffelen et al., > NeuroImage 2008) already implemented in ft (we observed in the code that > it is possible in ft_sourceanalysis.m to give a location for a > reference dipole but we found no documentation)? > > -Is the only reliable solution for reconstructing a time-course to > project the activity in the dominant direction? We have the eigenvalues > of the first dipole which are normally 3 to 6 times larger > than the ones of the second. We are not sure this is enough to neglect > the second component. > > - One last technical question: in the mailing list it is said that the > orientation of the dipole is saved in source.avg.ori but it doesn't seem > like that to us. Maybe we are doing something wrong. > > Best regards and thank you for your work, > > Paolo and Erick > > > ------------------------------ > > Message: 4 > Date: Thu, 15 Sep 2011 10:10:36 +0200 > From: "Eric Maris" > To: "'Email discussion list for the FieldTrip project'" > > Subject: Re: [FieldTrip] interaction within-subject indepsamplesT > Message-ID: <008d01cc737e$f6192ba0$e24b82e0$@maris at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Dear Kathrin, > > > I need your advice on how to correctly test the interaction effects in a > 2x2 > > within-subject design with cluster-based randomization tests. I have two > > factors A and B with the levels a1/a2 and b1/b2. In addition, the number > of > > trials in A are about twice as much as in B. > > > > The procedure would be totally clear in a between-subject design (as in a > > previous post on the list: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) > > This post is about a WITHIN-subjects design. > > > because I could easily compute the differences of the factor levels > > A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the > > differences. However, since I have to run the statistics across trials and > not > > subjects I have independent samples and not dependent samples. > > So, you have a between-trials design. > > If it is > > possible at all, how can I calculate the differences A_diff and B_diff > across > > trials? Is it a problem that the number of trials are not equal? > > This is not possible. Permutation tests cannot be used for testing > interactions in a multi-factorial between-subjects/trials design. Michael > Wibral has a post in which he refers to a nice statistics paper on the > issue. > > A proxy that is possible (but not statistically sound) is to perform two > statistical tests of the first factor, once at the first level of second > factor and once at the second level. > > > Best, > > Eric Maris > > > > > > > > > > > > Any help is appreciated! > > > > Best, > > Kathrin > > > > _____________________________________ > > Kathrin M?sch > > > > Dept. of Neurophysiology and Pathophysiology > > University Medical Center Hamburg-Eppendorf > > Martinistr. 52 > > 20246 Hamburg > > Germany > > Phone: +49-40-7410-54680 > > Fax: +49-40-7410-57752 > > E-Mail: k.muesch at uke.uni-hamburg.de > > _____________________________________ > > > > > > -- > > Pflichtangaben gem?? Gesetz ?ber elektronische Handelsregister und > > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > > > Universit?tsklinikum Hamburg-Eppendorf; K?rperschaft des ?ffentlichen > > Rechts; Gerichtsstand: Hamburg > > > > Vorstandsmitglieder: Prof. Dr. J?rg F. Debatin (Vorsitzender), Dr. > Alexander > > Kirstein, Joachim Pr?l?, Prof. Dr. Dr. Uwe Koch-Gromus > > > > > > _______________________________________________ > > 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 > > End of fieldtrip Digest, Vol 10, Issue 18 > ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Sep 16 08:30:24 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 16 Sep 2011 08:30:24 +0200 Subject: [FieldTrip] channel_repair bug In-Reply-To: References: Message-ID: <4E72ED00.2070906@donders.ru.nl> Hi Frederic, The one Google Code is the most recent version. My guess would be that it was introduced beginning of July in revision 3807 (apologies for that ). Any version after that had this bug, I cannot tell for the versions before (but doubt). Best regards, Jörn On 9/15/2011 4:07 PM, Frederic Roux wrote: > > Hi Jorn, > > I was wondering if the bug you reported concerning the channel_repair > function also applied to older versions of fieldtrip and in which > cases this bug appears. > > This would be important for me to know as I have been using the function > in the past and would like to know if it affects my results or not. > > Best, > > Frederic > > -- > Frédéric Roux, PhD student > Department of Neurophysiology > Max Planck Institute for Brain Research > D-60529 Frankfurt am Main > Frederic.Roux at brain.mpg.de > +49(0)69630183225 > > > > > > From: fieldtrip-request at donders.ru.nl > > Subject: fieldtrip Digest, Vol 10, Issue 18 > > To: fieldtrip at donders.ru.nl > > Date: Thu, 15 Sep 2011 12:00:17 +0200 > > > > Send fieldtrip mailing list submissions to > > fieldtrip at donders.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 donders.ru.nl > > > > You can reach the person managing the list at > > fieldtrip-owner at donders.ru.nl > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of fieldtrip digest..." > > > > > > Today's Topics: > > > > 1. Critical bug in ft_channelrepair fixed (J?rn M. Horschig) > > 2. Fwd: AW: Forward solution using concentric spheres and BEM > > models (Micheli, C.) > > 3. cortical time-course reconstruction (Paolo Belardinelli) > > 4. Re: interaction within-subject indepsamplesT (Eric Maris) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Wed, 14 Sep 2011 15:41:45 +0200 > > From: "J?rn M. Horschig" > > To: Email discussion list for the FieldTrip project > > > > Subject: [FieldTrip] Critical bug in ft_channelrepair fixed > > Message-ID: <4E70AF19.2040003 at donders.ru.nl> > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > > Hey everyone, > > > > we found a critical bug in ft_channelrepair, which we fixed now. The > bug > > caused wrong channels to be chosen for interpolation in some > situations, > > meaning that the timecourse your repaired channel did not make sense. > > Please be aware of this, check your reconstructed channels and re-run > > your channel reconstruction if you are in doubt with the newest > > FieldTrip version! > > > > For more information, check Google code: > > http://code.google.com/p/fieldtrip/source/detail?r=4158 > > and Bugzilla: > > http://bugzilla.fcdonders.nl/show_bug.cgi?id=941 > > > > Best regards, > > J?rn > > > > > > -- > > J?rn M. Horschig > > PhD Student > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognitive Neuroimaging > > Radboud University Nijmegen > > Neuronal Oscillations Group > > > > 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 > > > > > > > > ------------------------------ > > > > Message: 2 > > Date: Wed, 14 Sep 2011 17:56:38 +0200 (CEST) > > From: "Micheli, C." > > To: fieldtrip at donders.ru.nl > > Subject: [FieldTrip] Fwd: AW: Forward solution using concentric > > spheres and BEM models > > Message-ID: > > <1624476173.1270054.1316015798685.JavaMail.root at draco.zimbra.ru.nl> > > Content-Type: text/plain; charset=utf-8 > > > > Hi Margit and Juan Pablo > > see my answers below. > > > > ----- "Margit Sch?nherr" schreef: > > > > > Van: "Margit Sch?nherr" > > > Aan: "c micheli" > > > Verzonden: Woensdag 7 september 2011 09:33:53 > > > Onderwerp: AW: [FieldTrip] Forward solution using concentric > spheres and BEM models > > > > > > Hello Cristiano, > > > > > > thank you for your email. I have tried the code, but I have 2 problems > > > with it. > > > 1) When I do it exactly as suggested in the email, I get the following > > > error when using ft_prepare_mesh: > > > > > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > ??? Error using ==> ft_prepare_mesh at 159 > > > unsupported cfg.method and/or input > > > > > > I think, this is simply a problem concerning the naming of the > > > variables. The segmented mri is called 'seg', the labels are assigned > > > to 'mri_segment'. I think, this is the wrong input for > > > ft_prepare_mesh, because 'mri_segment' does not contain any mri > > > information. Putting the labels into a new field 'seg.seg' and calling > > > bnd = ft_prepare_mesh(cfg, seg) solves this. > > > > > > > I could replicate the error and this is due to the fact that > ft_prepare_mesh accepts inputs of FieldTrip type 'volume'. See > ft_datatype_volume. The function crashed because I simply used an old > version of the test file where I inputted the volume matrix only, > whereas three fields are required (dim, transform and anatomy), that's > why the input should look like this: > > > > mri2 = []; > > mri2.anatomy = mri_segment; > > mri2.dim = mri.dim; > > mri2.transform = mri.transform; > > > > I patched the correct code at the end of the mail. > > > > > 2) However, there is still only one surface triangulated. So as I > > > wrote in my last email, I still believe that line 25 in > > > prepare_mesh_segmentation needs to be commented. What do you mean? > > > > > > I agree. This function needs a general review altogether and at the > moment I committed your correction. In the future I'll restructure the > whole function taking care of the more recent guidelines. Thanks for > your suggestion. > > > > Try this: > > > > % download from the FieldTrip ftp site > > % (ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip) > > > > % load the MRI > > mri = ft_read_mri('Subject01.mri'); > > > > % segment it > > cfg = []; > > cfg.output = {'scalp', 'skull', 'brain'}; > > seg = ft_volumesegment(cfg, mri); > > > > % volumetric preprocessing > > % Note: the three compartments have to be 'filled' otherwise the > triangulation won't work correctly. The output of ft_volumesegment > will change soon, making it compatible with ft_prepare_mesh. As of > today we need the following: > > > > mri_segment{1} = seg.scalp; > > mri_segment{2} = imfill(seg.skull,'holes'); % you need the image > processing toolbox here! > > mri_segment{3} = seg.brain; > > > > % triangulation (from volumes to surfaces) > > % Note: now the volumes are inputted one at a time > > mri2 = mri; > > cfg=[]; > > cfg.sourceunits = 'mm'; > > cfg.mrinuits = 'mm'; > > cfg.tissue = 1; > > cfg.numvertices = 1000; > > for i=1:3 > > mri2.seg = mri_segment{i}; > > mesh{i} = ft_prepare_mesh(cfg,mri2); > > end > > > > % visualization of the triangulated surfaces > > > figure,ft_plot_mesh(mesh{1},'edgecolor','none','facecolor','w','facealpha',0.5) > > ft_plot_mesh(mesh{2},'edgecolor','none','facecolor','g','facealpha',0.7) > > ft_plot_mesh(mesh{3},'edgecolor','none','facecolor','r','facealpha',1) > > > > > > > Thank you. > > > > Be my guest. > > Cheers, > > Cristiano > > > > > > > > Best regards, > > > Margit > > > > > > > > > *********************************** > > > Margit Sch?nherr > > > Universit?tsklinikum Erlangen > > > Neurologische Klinik > > > Epilepsiezentrum (Biomagnetismus) > > > Schwabachanlage 6 > > > 91054 Erlangen > > > Telefon: ++49 9131 / 85 36921 > > > Email: margit.schoenherr at uk-erlangen.de > > > *********************************** > > > ________________________________________ > > > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > > > im Auftrag von Micheli, C. [c.micheli at fcdonders.ru.nl] > > > Gesendet: Montag, 5. September 2011 12:59 > > > An: Email discussion list for the FieldTrip project > > > Betreff: Re: [FieldTrip] Forward solution using concentric spheres > > > and BEM models > > > > > > Dear Juan Pablo and Margit > > > > > > The function 'ft_prepare_mesh' takes care of triangulating every > > > compartment via the cfg.tissue option. This option contains the > > > integers which describe a type of tissue, given that the user > > > beforehand defined all voxels of the segmented MRI compartment as > > > having that particular value. > > > As an example, download the sample MRI in FieldTrip ftp location: > > > > > > ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip > > > Create a folder and unzip these files. > > > > > > % read in the mri > > > mri = ft_read_mri('Subject01.mri'); > > > > > > % segment it > > > cfg = []; > > > cfg.output = {'scalp', 'skull', 'brain'}; > > > seg = ft_volumesegment(cfg, mri); > > > > > > % assign a label > > > scalp = (seg.scalp) & ~(seg.skull | seg.brain); > > > skull = 2*(seg.skull); > > > brain = 3*(seg.brain); > > > mri_segment = scalp + skull + brain; > > > > > > % build the meshes > > > cfg = []; > > > cfg.method = 'segmentation'; > > > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > > > cfg.numvertices = [2000 1000 800]; > > > cfg.sourceunits = 'mm'; > > > cfg.mriunits = 'mm'; > > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > > > If any of the tissues has a different value from cfg.tissues this > > > won't be triangulated. To check for this use ft_sourceplot in the > > > interactive mode. By clicking around you can see the tissue's value in > > > the command window: > > > > > > % view the labelled segmentations > > > mri2 = mri; > > > mri2.seg = mri_segment; > > > cfg=[]; > > > cfg.interactive = 'yes'; > > > cfg.funparameter = 'seg'; > > > ft_sourceplot(cfg,mri2); > > > > > > About the concentric spheres: > > > both ways to derive a concentric spheres model are correct. In one > > > case you directly build the vol structure and you assume you know the > > > radiuses of your spheres. In the other case you allow the > > > ft_prepare_concentricspheres function to build the spheres starting > > > from realistic geometrical boundaries. > > > The second approach is my favorite because the ft_prepare function > > > contains a function that fits a sphere to each boundary and I don't > > > have to do it myself. > > > The first approach (directly force the radiuses in your vol structure) > > > is preferable if you derive the information from other software (e.g. > > > CTF's MRIView) or if you fit the sphere yourself. > > > > > > @Pablo > > > If the sphere is fitted inside the brain it is correct. You do not > > > want the sphere to include other tissues, because your assumption for > > > the construction of the forward model is that the tissue inside the > > > sphere is homogeneous. > > > For a more realistic model (encompassing the whole brain volume) I > > > would rather use a BEM model. > > > > > > I hope this helps, > > > Cristiano > > > > > > > > ------------------------------ > > > > Message: 3 > > Date: Wed, 14 Sep 2011 18:18:36 +0200 > > From: Paolo Belardinelli > > To: fieldtrip at donders.ru.nl > > Subject: [FieldTrip] cortical time-course reconstruction > > Message-ID: <4E70D3DC.4060403 at med.uni-tuebingen.de> > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > > Hi Robert. > > We have some nice coherence maps with peaks in M1 for a finger tapping > > task. We were wondering how to properly reconstruct the power > > time-course in the M1 area in order to use it as a further reference > > signal. > > > > -Is the code necessary for the approach described in (Schoffelen et > al., > > NeuroImage 2008) already implemented in ft (we observed in the code > that > > it is possible in ft_sourceanalysis.m to give a location for a > > reference dipole but we found no documentation)? > > > > -Is the only reliable solution for reconstructing a time-course to > > project the activity in the dominant direction? We have the eigenvalues > > of the first dipole which are normally 3 to 6 times larger > > than the ones of the second. We are not sure this is enough to neglect > > the second component. > > > > - One last technical question: in the mailing list it is said that the > > orientation of the dipole is saved in source.avg.ori but it doesn't > seem > > like that to us. Maybe we are doing something wrong. > > > > Best regards and thank you for your work, > > > > Paolo and Erick > > > > > > ------------------------------ > > > > Message: 4 > > Date: Thu, 15 Sep 2011 10:10:36 +0200 > > From: "Eric Maris" > > To: "'Email discussion list for the FieldTrip project'" > > > > Subject: Re: [FieldTrip] interaction within-subject indepsamplesT > > Message-ID: <008d01cc737e$f6192ba0$e24b82e0$@maris at donders.ru.nl> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Dear Kathrin, > > > > > I need your advice on how to correctly test the interaction > effects in a > > 2x2 > > > within-subject design with cluster-based randomization tests. I > have two > > > factors A and B with the levels a1/a2 and b1/b2. In addition, the > number > > of > > > trials in A are about twice as much as in B. > > > > > > The procedure would be totally clear in a between-subject design > (as in a > > > previous post on the list: > > > > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) > > > > This post is about a WITHIN-subjects design. > > > > > because I could easily compute the differences of the factor levels > > > A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the > > > differences. However, since I have to run the statistics across > trials and > > not > > > subjects I have independent samples and not dependent samples. > > > > So, you have a between-trials design. > > > > If it is > > > possible at all, how can I calculate the differences A_diff and B_diff > > across > > > trials? Is it a problem that the number of trials are not equal? > > > > This is not possible. Permutation tests cannot be used for testing > > interactions in a multi-factorial between-subjects/trials design. > Michael > > Wibral has a post in which he refers to a nice statistics paper on the > > issue. > > > > A proxy that is possible (but not statistically sound) is to perform two > > statistical tests of the first factor, once at the first level of second > > factor and once at the second level. > > > > > > Best, > > > > Eric Maris > > > > > > > > > > > > > > > > > > > > > > Any help is appreciated! > > > > > > Best, > > > Kathrin > > > > > > _____________________________________ > > > Kathrin M?sch > > > > > > Dept. of Neurophysiology and Pathophysiology > > > University Medical Center Hamburg-Eppendorf > > > Martinistr. 52 > > > 20246 Hamburg > > > Germany > > > Phone: +49-40-7410-54680 > > > Fax: +49-40-7410-57752 > > > E-Mail: k.muesch at uke.uni-hamburg.de > > > _____________________________________ > > > > > > > > > -- > > > Pflichtangaben gem?? Gesetz ?ber elektronische Handelsregister und > > > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > > > > > Universit?tsklinikum Hamburg-Eppendorf; K?rperschaft des ?ffentlichen > > > Rechts; Gerichtsstand: Hamburg > > > > > > Vorstandsmitglieder: Prof. Dr. J?rg F. Debatin (Vorsitzender), Dr. > > Alexander > > > Kirstein, Joachim Pr?l?, Prof. Dr. Dr. Uwe Koch-Gromus > > > > > > > > > _______________________________________________ > > > 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 > > > > End of fieldtrip Digest, Vol 10, Issue 18 > > ***************************************** > > > _______________________________________________ > 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 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 giulia.rizza at tiscali.it Fri Sep 16 11:18:20 2011 From: giulia.rizza at tiscali.it (Giulia Rizza) Date: Fri, 16 Sep 2011 11:18:20 +0200 (CEST) Subject: [FieldTrip] matter of units? Message-ID: <32723147.58881316164700497.JavaMail.defaultUser@defaultHost> Hi everybody! Sorry for this banal question: I'm processinga EEG data from Neuroscan and everything seemed ok until I noticed that I find a very small activity in channels (-10 10) when browsing through the data, much lower than the one I can visualize from the same dataset with the acquisition software (-40 40 microV). Is it just a matter of units or am I doing something wrong? I'm working with the version 20110621 (now I'm passing to a new one) on Matlab 7.9.0 Here I've just defined trials and applied a filter. cfg = []; cfg. dataset = 'Cristiano_S2.cnt'; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef. eventvalue = 2; cfg.trialdef.prestim = 0.8; cfg.trialdef.poststim = 0.8; cfg = ft_definetrial(cfg); cfg.lpfilter = 'yes'; cfg.lpfreq = 100; data = ft_preprocessing(cfg); Thanks in advance to anyone Giulia Tutto Incluso 20 Mega light: telefono + ADSL a soli 19,95 € al mese fino al 2014. Risparmi 324 euro! Passa a Tiscali http://abbonati.tiscali.it/rd/rd2.html?u=http%3A%2F%2Fabbonati.tiscali.it%2Ftelefono-adsl%2Fprodotti%2Ftc%2Ftuttoincluso_light%2F%3FWT.mc_id%3D01fw%26r=TS00000A00002%26dm=DM_03%26p=footer From drivolta81 at gmail.com Fri Sep 16 11:57:17 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Fri, 16 Sep 2011 11:57:17 +0200 Subject: [FieldTrip] ??? Reference to non-existent field 'res4' Message-ID: Dear Fieldtrippers, I am trying to preprocess a subject. There is an error I have never seen before. It says: ??? Reference to non-existent field 'res4'. However, in my subject´s folder there is a .res4 file. To note that, when I have completed to test the subject, it was not possible to determine the head movement since “the system could not determine the position of the nasion”. May this be related? The file is corrupted and I can not open it with fieldtrip even with ft_read_header. Thanks for the help, Davide HERE IS THE ERROR: working on: SRW66_VisualGamma1_20110913_01.ds # of run in Design is:1 cfg = dataset: [1x94 char] datatype: 'continuous' trialdef: [1x1 struct] Warning: no trialfun was specified, using trialfun_general > In ft_definetrial at 101 In Main_VG_HF at 72 evaluating trialfunction 'trialfun_general' readCTFds: This dataset has multiple meg4 files. readCTFds: .11_meg4 file header= Valid header options: MEG41CP MEG42CP ??? Reference to non-existent field 'res4'. Error in ==> ft_read_header at 331 hdr.Fs = orig.res4.sample_rate; Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 144 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> Main_VG_HF at 72 cfg = ft_definetrial(cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From BelluscB at ninds.nih.gov Fri Sep 16 23:31:42 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Fri, 16 Sep 2011 17:31:42 -0400 Subject: [FieldTrip] FW: problem with ft_prepare_singleshell Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> Hi fellow fieldtrip users- I am currently using fieldtrip version 20110913 and have encountered a problem that wasn't there before. After reslicing and segmenting my mri data (which was realigned to CTF format), I segmented the data using cfg.output = {'skullstrip' 'brain'} and seg = ft_volumesegment(cfg, mri). I saved the resulting seg matrix. Then, when I run ft_prepare_singleshell to generate my volumetric model (vol): cfg = []; vol = ft_prepare_singleshell(cfg, seg) I get the following messages and error. not downsampling anatomy not downsampling brain the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB using the segmentation approach Warning: adding /home/belluscb/nindsip/matlab/fieldtrip-20110913/external/spm8 toolbox to your Matlab path using the segmented MRI ??? Reference to non-existent field 'seg'. Error in ==> prepare_mesh_segmentation at 63 [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); If I use an old version of fieldtrip (20100505) that I had, and run the same command cfg = []; vol = ft_prepare_singleshell(cfg, seg) on the same seg matrix, it runs without a problem. I am not skilled enough (yet) at reading code to figure out what is not working with the recent version of fieldtrip. Can someone please assist me? Thanks! Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 From jan.schoffelen at donders.ru.nl Sat Sep 17 10:10:33 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 17 Sep 2011 10:10:33 +0200 Subject: [FieldTrip] FW: problem with ft_prepare_singleshell In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> Message-ID: Dear Beth, Sorry for the bug. This is indeed a known problem which has found its way into recent versions. We are working on a permanent fix. I just checked in a temporary patch which should be available for download as of tonight (CET), or can be checked out from google-code soon. Alternatively, you could replace the recent version of ft_prepare_singleshell with and old version which works for you. This should affect anything else. Thanks for reporting this and sorry for the inconvenience. Best wishes, Jan-Mathijs On Sep 16, 2011, at 11:31 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > Hi fellow fieldtrip users- > I am currently using fieldtrip version 20110913 and have encountered a problem that wasn't there before. After reslicing and segmenting my mri data (which was realigned to CTF format), I segmented the data using cfg.output = {'skullstrip' 'brain'} and seg = ft_volumesegment(cfg, mri). I saved the resulting seg matrix. > Then, when I run ft_prepare_singleshell to generate my volumetric model (vol): > > cfg = []; > vol = ft_prepare_singleshell(cfg, seg) > > I get the following messages and error. > > > > not downsampling anatomy > not downsampling brain > the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB > using the segmentation approach > Warning: adding /home/belluscb/nindsip/matlab/fieldtrip-20110913/external/spm8 toolbox to your > Matlab path > using the segmented MRI > ??? Reference to non-existent field 'seg'. > > Error in ==> prepare_mesh_segmentation at 63 > [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > > > > If I use an old version of fieldtrip (20100505) that I had, and run the same command cfg = []; > vol = ft_prepare_singleshell(cfg, seg) on the same seg matrix, it runs without a problem. > > I am not skilled enough (yet) at reading code to figure out what is not working with the recent version of fieldtrip. > Can someone please assist me? > > Thanks! > Beth. > > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > > > _______________________________________________ > 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 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 Sat Sep 17 10:14:10 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 17 Sep 2011 10:14:10 +0200 Subject: [FieldTrip] FW: problem with ft_prepare_singleshell In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> Message-ID: <4BD2A835-A9CF-4CDD-B312-6EF543D31077@donders.ru.nl> Dear Beth, Sorry for the bug. This is indeed a known problem which has found its way into recent versions. We are working on a permanent fix. I just checked in a temporary patch which should be available for download as of tonight (CET), or can be checked out from google-code soon. Alternatively, you could replace the recent version of ft_prepare_singleshell with and old version which works for you. This should affect anything else. Thanks for reporting this and sorry for the inconvenience. Best wishes, Jan-Mathijs On Sep 16, 2011, at 11:31 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > Hi fellow fieldtrip users- > I am currently using fieldtrip version 20110913 and have encountered a problem that wasn't there before. After reslicing and segmenting my mri data (which was realigned to CTF format), I segmented the data using cfg.output = {'skullstrip' 'brain'} and seg = ft_volumesegment(cfg, mri). I saved the resulting seg matrix. > Then, when I run ft_prepare_singleshell to generate my volumetric model (vol): > > cfg = []; > vol = ft_prepare_singleshell(cfg, seg) > > I get the following messages and error. > > > > not downsampling anatomy > not downsampling brain > the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB > using the segmentation approach > Warning: adding /home/belluscb/nindsip/matlab/fieldtrip-20110913/external/spm8 toolbox to your > Matlab path > using the segmented MRI > ??? Reference to non-existent field 'seg'. > > Error in ==> prepare_mesh_segmentation at 63 > [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > > > > If I use an old version of fieldtrip (20100505) that I had, and run the same command cfg = []; > vol = ft_prepare_singleshell(cfg, seg) on the same seg matrix, it runs without a problem. > > I am not skilled enough (yet) at reading code to figure out what is not working with the recent version of fieldtrip. > Can someone please assist me? > > Thanks! > Beth. > > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > > > _______________________________________________ > 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 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 Sat Sep 17 10:18:20 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 17 Sep 2011 10:18:20 +0200 Subject: [FieldTrip] FW: problem with ft_prepare_singleshell In-Reply-To: References: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> Message-ID: <5D7EF8FF-AB9C-4D52-A485-3A5EA30BAAD4@donders.ru.nl> > Dear Beth, > > Sorry for the bug. This is indeed a known problem which has found its way into recent versions. We are working on a permanent fix. I just checked in a temporary patch which should be available for download as of tonight (CET), or can be checked out from google-code soon. Alternatively, you could replace the recent version of ft_prepare_singleshell with and old version which works for you. This should affect anything else. Sorry, of course I meant that it should NOT affect anything else. BW, JM >> Hi fellow fieldtrip users- >> I am currently using fieldtrip version 20110913 and have encountered a problem that wasn't there before. After reslicing and segmenting my mri data (which was realigned to CTF format), I segmented the data using cfg.output = {'skullstrip' 'brain'} and seg = ft_volumesegment(cfg, mri). I saved the resulting seg matrix. >> Then, when I run ft_prepare_singleshell to generate my volumetric model (vol): >> >> cfg = []; >> vol = ft_prepare_singleshell(cfg, seg) >> >> I get the following messages and error. >> >> >> >> not downsampling anatomy >> not downsampling brain >> the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB >> using the segmentation approach >> Warning: adding /home/belluscb/nindsip/matlab/fieldtrip-20110913/external/spm8 toolbox to your >> Matlab path >> using the segmented MRI >> ??? Reference to non-existent field 'seg'. >> >> Error in ==> prepare_mesh_segmentation at 63 >> [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); >> >> Error in ==> ft_prepare_mesh at 124 >> bnd = prepare_mesh_segmentation(cfg, mri); >> >> Error in ==> ft_prepare_singleshell at 89 >> vol.bnd = ft_prepare_mesh(cfg, mri); >> >> >> >> >> If I use an old version of fieldtrip (20100505) that I had, and run the same command cfg = []; >> vol = ft_prepare_singleshell(cfg, seg) on the same seg matrix, it runs without a problem. >> >> I am not skilled enough (yet) at reading code to figure out what is not working with the recent version of fieldtrip. >> Can someone please assist me? >> >> Thanks! >> Beth. >> >> >> Beth Belluscio MD-PhD >> Clinical Fellow >> Human Motor Control Section >> NINDS, NIH >> 301-402-3495 >> >> >> >> _______________________________________________ >> 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 > 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Sep 17 17:14:34 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 17 Sep 2011 10:14:34 -0500 Subject: [FieldTrip] Error in ft_timelockgrandaverage after import from EEGLAB Message-ID: Hello, I have imported data from EEGLAB (using eeglab2fieldtrip()) and averaged within fieldtrip, and then attempted to grand average (using ft_timelockgrandaverage with all the default options except cfg.keepindividual='yes'). I got the following error message: ??? Error using ==> fixdimord at 63 The data does not contain a dimord, but it also does not resemble raw data Error in ==> ft_checkdata at 151 data = fixdimord(data, strcmp(sourcerepresentation, 'new')); Error in ==> ft_timelockgrandaverage at 72 varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', 'feedback', 'no'); The structure of my average data after importing from EEGLAB looks like this, which I notice is missing some fields that data processed in fieldtrip with ft_preprocessing normally have: CF007_avg = label: {1x36 cell} fsample: 1000 elec: [1x1 struct] avg: [36x1201 single] var: [36x1201 single] time: [1x1201 double] cfg: [1x1 struct] Does anyone have any idea what might be causing the error? Thanks a lot, Steve Politzer-Ahles -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Sep 17 17:25:21 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 17 Sep 2011 10:25:21 -0500 Subject: [FieldTrip] Error in ft_timelockgrandaverage after import from EEGLAB In-Reply-To: References: Message-ID: Never mind, I just manually added data.dimord='chan_time' into each average and it worked now. Best, Steve Politzer-Ahles On Sat, Sep 17, 2011 at 10:14 AM, Stephen Politzer-Ahles < politzerahless at gmail.com> wrote: > Hello, > > I have imported data from EEGLAB (using eeglab2fieldtrip()) and averaged > within fieldtrip, and then attempted to grand average (using > ft_timelockgrandaverage with all the default options except > cfg.keepindividual='yes'). I got the following error message: > > ??? Error using ==> fixdimord at 63 > The data does not contain a dimord, but it also does not resemble raw data > > Error in ==> ft_checkdata at 151 > data = fixdimord(data, strcmp(sourcerepresentation, 'new')); > > Error in ==> ft_timelockgrandaverage at 72 > varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', > 'feedback', 'no'); > > The structure of my average data after importing from EEGLAB looks like > this, which I notice is missing some fields that data processed in fieldtrip > with ft_preprocessing normally have: > > CF007_avg = > > label: {1x36 cell} > fsample: 1000 > elec: [1x1 struct] > avg: [36x1201 single] > var: [36x1201 single] > time: [1x1201 double] > cfg: [1x1 struct] > > Does anyone have any idea what might be causing the error? > > Thanks a lot, > Steve Politzer-Ahles > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Sep 17 18:42:39 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 17 Sep 2011 11:42:39 -0500 Subject: [FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics Message-ID: When attempting to run cluster statistics on my EEG data (originally from Neuroscan .CNT, then processed in EEGLAB and finally imported to fieldtrip) using ft_timelockstatistics(), I receive the following error message: ??? Error using ==> ft_neighbourselection at 114 Did not find gradiometer or electrode information. Error in ==> statistics_wrapper at 241 cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); Error in ==> ft_timelockstatistics at 123 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); This seems to be because when I use cfg.channel = {'EEG'}; with my data, the channel information (the variable "sens" used in ft_neighbourselection) consists only of the list of channel labels: sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} On the other hand, when I run timelockstatistics on the sample data from the wiki, "sens" includes much more information: sens = pnt: [151x3 double] ori: [356x3 double] tra: [184x356 double] label: {151x1 cell} unit: 'cm' I think most of that extra information is planar gradient data (i.e., it comes from GA_FIC.grad). Since my data are EEG data, I assume it wouldn't make sense to use ft_megplanar on them. So, assuming that I need to get the extra channel location information into my EEG data, does anyone have any ideas on how to do that? Best, Steve Politzer-Ahles -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Sep 19 09:12:32 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 19 Sep 2011 09:12:32 +0200 Subject: [FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics In-Reply-To: References: Message-ID: <4E76EB60.9080801@donders.ru.nl> Hey Stephen, You need to specify the position of your electrodes, which are mostly stored in an 'elec' structure. If you do not have that available, you can circumvent the problem by defining a cfg.layout. In that case, neighbouring sensors will be selected according to how they are placed in that layout-file you specify. That's not 100% correct of course, but at least an estimate how the sensors are positioned (note that a layout has only 2D coordinates). For example, you could use cfg.layout = 'EEG1010.lay' as a start. Anyway, could you try using a more recent version of FieldTrip? A few months ago, we changed the way the neighbourselection works (actually, you have to call cfg.neighbours = ft_neighbourselection manually, now). You can then also check with cfg.feedback = 'yes' whether the neighbourselection looks alright to you (that's the same as calling ft_neighbourplot) Hope it helps! Best regards, Jörn On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote: > When attempting to run cluster statistics on my EEG data (originally > from Neuroscan .CNT, then processed in EEGLAB and finally imported to > fieldtrip) using ft_timelockstatistics(), I receive the following > error message: > > ??? Error using ==> ft_neighbourselection at 114 > Did not find gradiometer or electrode information. > > Error in ==> statistics_wrapper at 241 > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > Error in ==> ft_timelockstatistics at 123 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > This seems to be because when I use cfg.channel = {'EEG'}; with my > data, the channel information (the variable "sens" used in > ft_neighbourselection) consists only of the list of channel labels: > > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} > > On the other hand, when I run timelockstatistics on the sample data > from the wiki, "sens" includes much more information: > > sens = > > pnt: [151x3 double] > ori: [356x3 double] > tra: [184x356 double] > label: {151x1 cell} > unit: 'cm' > > I think most of that extra information is planar gradient data (i.e., > it comes from GA_FIC.grad). Since my data are EEG data, I assume it > wouldn't make sense to use ft_megplanar on them. So, assuming that I > need to get the extra channel location information into my EEG data, > does anyone have any ideas on how to do that? > > Best, > Steve Politzer-Ahles > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > > > _______________________________________________ > 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 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 irina.simanova at mpi.nl Mon Sep 19 13:14:59 2011 From: irina.simanova at mpi.nl (Irina Simanova) Date: Mon, 19 Sep 2011 13:14:59 +0200 Subject: [FieldTrip] ft_sourceplot error Message-ID: <33EAF058-5094-45A5-9164-73F672EA74F1@mpi.nl> Dear all, I have an error in checkconfig.m called from ft_sourceplot. What is wrong here? Thanks a lot, Irina vol = dim: [45 54 39] anatomy: [45x54x39 double] hdr: [1x1 struct] transform: [4x4 double] unit: 'mm' fun: [45x54x39 double] cfg_plot = funparameter: 'fun' method: 'ortho' >> ft_sourceplot(cfg_plot, vol) the input is volume data with dimensions [45 54 39] not downsampling anatomy not downsampling fun ??? Reference to non-existent field 'checksize'. Error in ==> ft_checkconfig at 559 if strcmp(checksize, 'yes') && ~isinf(cfg.checksize) Error in ==> ft_volumedownsample at 158 cfg = ft_checkconfig(cfg, 'trackconfig', 'off', 'checksize', 'yes'); Error in ==> ft_sourceplot at 307 data = ft_volumedownsample(tmpcfg, data); -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.muesch at uke.uni-hamburg.de Mon Sep 19 14:24:21 2011 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Mon, 19 Sep 2011 14:24:21 +0200 Subject: [FieldTrip] interaction within-subject indepsamplesT In-Reply-To: <008d01cc737e$f6192ba0$e24b82e0$@maris@donders.ru.nl> References: <1238529C-1B93-4BC9-B625-B16991718014@uke.uni-hamburg.de> <008d01cc737e$f6192ba0$e24b82e0$@maris@donders.ru.nl> Message-ID: Dear Eric, Thank you very much for your answer. I was afraid that this was the case. Best, Kathrin Am 15.09.2011 um 10:10 schrieb Eric Maris: > Dear Kathrin, > >> I need your advice on how to correctly test the interaction effects in a > 2x2 >> within-subject design with cluster-based randomization tests. I have two >> factors A and B with the levels a1/a2 and b1/b2. In addition, the number > of >> trials in A are about twice as much as in B. >> >> The procedure would be totally clear in a between-subject design (as in a >> previous post on the list: >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) > > This post is about a WITHIN-subjects design. > >> because I could easily compute the differences of the factor levels >> A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the >> differences. However, since I have to run the statistics across trials and > not >> subjects I have independent samples and not dependent samples. > > So, you have a between-trials design. > > If it is >> possible at all, how can I calculate the differences A_diff and B_diff > across >> trials? Is it a problem that the number of trials are not equal? > > This is not possible. Permutation tests cannot be used for testing > interactions in a multi-factorial between-subjects/trials design. Michael > Wibral has a post in which he refers to a nice statistics paper on the > issue. > > A proxy that is possible (but not statistically sound) is to perform two > statistical tests of the first factor, once at the first level of second > factor and once at the second level. > > > Best, > > Eric Maris > > > > > > > > >> >> Any help is appreciated! >> >> Best, >> Kathrin >> >> _____________________________________ >> Kathrin Müsch >> >> Dept. of Neurophysiology and Pathophysiology >> University Medical Center Hamburg-Eppendorf >> Martinistr. 52 >> 20246 Hamburg >> Germany >> Phone: +49-40-7410-54680 >> Fax: +49-40-7410-57752 >> E-Mail: k.muesch at uke.uni-hamburg.de >> _____________________________________ >> >> >> -- >> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und >> Genossenschaftsregister sowie das Unternehmensregister (EHUG): >> >> Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen >> Rechts; Gerichtsstand: Hamburg >> >> Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. > Alexander >> Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus >> >> >> _______________________________________________ >> 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 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From politzerahless at gmail.com Mon Sep 19 16:43:15 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 19 Sep 2011 09:43:15 -0500 Subject: [FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics Message-ID: Jörn, Thanks lot for this information. I tried specifying cfg.layout and got a new error message: ??? Error using ==> ft_neighbourselection at 130 Sensor distance is measured in an unknown unit type Error in ==> statistics_wrapper at 241 cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); Error in ==> ft_timelockstatistics at 123 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); (I get the same message when trying to run neighbours=ft_neighbourselection(cfg,data) with that layout file specified.) The layout file I was using is based directly on EEG1010.lay which is included in fieldtrip, and it works fine when I use it for topoplotting and multiplotting, so I'm not sure why it's causing errors when fed to ft_neighbourselection. As for the version, I actually am using the most recent version (which I downloaded yesterday before trying to run cluster statistics, and updated my path accordingly), but still getting these errors. The code I've been trying to run, though, is based on the sample code on the wiki page http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock, which may be out of date. Is there perhaps anyone on the list who has run cluster statistics on EEG data and would be willing to share a sample of their code? Best, Steve > Message: 1 > Date: Mon, 19 Sep 2011 09:12:32 +0200 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Problem with EEG channels in > ft_neighborselection when running cluster statistics > Message-ID: <4E76EB60.9080801 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hey Stephen, > > You need to specify the position of your electrodes, which are mostly > stored in an 'elec' structure. If you do not have that available, you > can circumvent the problem by defining a cfg.layout. In that case, > neighbouring sensors will be selected according to how they are placed > in that layout-file you specify. That's not 100% correct of course, but > at least an estimate how the sensors are positioned (note that a layout > has only 2D coordinates). For example, you could use cfg.layout = > 'EEG1010.lay' as a start. > > Anyway, could you try using a more recent version of FieldTrip? A few > months ago, we changed the way the neighbourselection works (actually, > you have to call cfg.neighbours = ft_neighbourselection manually, now). > You can then also check with cfg.feedback = 'yes' whether the > neighbourselection looks alright to you (that's the same as calling > ft_neighbourplot) > > Hope it helps! Best regards, > J?rn > > > > On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote: > > When attempting to run cluster statistics on my EEG data (originally > > from Neuroscan .CNT, then processed in EEGLAB and finally imported to > > fieldtrip) using ft_timelockstatistics(), I receive the following > > error message: > > > > ??? Error using ==> ft_neighbourselection at 114 > > Did not find gradiometer or electrode information. > > > > Error in ==> statistics_wrapper at 241 > > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > > > Error in ==> ft_timelockstatistics at 123 > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > This seems to be because when I use cfg.channel = {'EEG'}; with my > > data, the channel information (the variable "sens" used in > > ft_neighbourselection) consists only of the list of channel labels: > > > > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} > > > > On the other hand, when I run timelockstatistics on the sample data > > from the wiki, "sens" includes much more information: > > > > sens = > > > > pnt: [151x3 double] > > ori: [356x3 double] > > tra: [184x356 double] > > label: {151x1 cell} > > unit: 'cm' > > > > I think most of that extra information is planar gradient data (i.e., > > it comes from GA_FIC.grad). Since my data are EEG data, I assume it > > wouldn't make sense to use ft_megplanar on them. So, assuming that I > > need to get the extra channel location information into my EEG data, > > does anyone have any ideas on how to do that? > > > > Best, > > Steve Politzer-Ahles > > > > -- > > Stephen Politzer-Ahles > > University of Kansas > > Linguistics Department > > http://www.linguistics.ku.edu/ > > > > > > _______________________________________________ > > 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 > > 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/20110919/3fdfbedd/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 25 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Sep 19 17:13:53 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 19 Sep 2011 17:13:53 +0200 Subject: [FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics In-Reply-To: References: Message-ID: <4E775C31.7050305@donders.ru.nl> Hey Stephen, please check your FT path. You are definitely not using a recent FT version, because the line you quoted on statistics_wrapper does not exist anymore. You can verify your path by typing in Matlab 'which ft_defaults' or 'which ft_timelockstatistics' (without the quotes). Due to recent changes, it might additionally help to read these two FAQs: http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors http://fieldtrip.fcdonders.nl/faq/how_does_ft_neighbourselection_work Anyway, the tutorial wiki page is indeed out of date, as the neighbourselection is not included correctly anymore. I'm gonna fix this :) The only thing which you need to add is cfg.neighbours=ft_neighbourselection(cfg, [...]) before calling ft_timelockstatistics. That's all that changed. Best regards, Jörn On 9/19/2011 4:43 PM, Stephen Politzer-Ahles wrote: > Jörn, > > Thanks lot for this information. I tried specifying cfg.layout and got > a new error message: > > ??? Error using ==> ft_neighbourselection at 130 > Sensor distance is measured in an unknown unit type > > Error in ==> statistics_wrapper at 241 > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > Error in ==> ft_timelockstatistics at 123 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > (I get the same message when trying to run > neighbours=ft_neighbourselection(cfg,data) with that layout file > specified.) The layout file I was using is based directly on > EEG1010.lay which is included in fieldtrip, and it works fine when I > use it for topoplotting and multiplotting, so I'm not sure why it's > causing errors when fed to ft_neighbourselection. > > As for the version, I actually am using the most recent version (which > I downloaded yesterday before trying to run cluster statistics, and > updated my path accordingly), but still getting these errors. The code > I've been trying to run, though, is based on the sample code on the > wiki page > http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock, > which may be out of date. > > Is there perhaps anyone on the list who has run cluster statistics on > EEG data and would be willing to share a sample of their code? > > Best, > Steve > > Message: 1 > Date: Mon, 19 Sep 2011 09:12:32 +0200 > From: "J?rn M. Horschig" > > To: Email discussion list for the FieldTrip project > > > Subject: Re: [FieldTrip] Problem with EEG channels in > ft_neighborselection when running cluster statistics > Message-ID: <4E76EB60.9080801 at donders.ru.nl > > > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hey Stephen, > > You need to specify the position of your electrodes, which are mostly > stored in an 'elec' structure. If you do not have that available, you > can circumvent the problem by defining a cfg.layout. In that case, > neighbouring sensors will be selected according to how they are placed > in that layout-file you specify. That's not 100% correct of > course, but > at least an estimate how the sensors are positioned (note that a > layout > has only 2D coordinates). For example, you could use cfg.layout = > 'EEG1010.lay' as a start. > > Anyway, could you try using a more recent version of FieldTrip? A few > months ago, we changed the way the neighbourselection works (actually, > you have to call cfg.neighbours = ft_neighbourselection manually, > now). > You can then also check with cfg.feedback = 'yes' whether the > neighbourselection looks alright to you (that's the same as calling > ft_neighbourplot) > > Hope it helps! Best regards, > J?rn > > > > On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote: > > When attempting to run cluster statistics on my EEG data (originally > > from Neuroscan .CNT, then processed in EEGLAB and finally > imported to > > fieldtrip) using ft_timelockstatistics(), I receive the following > > error message: > > > > ??? Error using ==> ft_neighbourselection at 114 > > Did not find gradiometer or electrode information. > > > > Error in ==> statistics_wrapper at 241 > > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > > > Error in ==> ft_timelockstatistics at 123 > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > This seems to be because when I use cfg.channel = {'EEG'}; with my > > data, the channel information (the variable "sens" used in > > ft_neighbourselection) consists only of the list of channel labels: > > > > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} > > > > On the other hand, when I run timelockstatistics on the sample data > > from the wiki, "sens" includes much more information: > > > > sens = > > > > pnt: [151x3 double] > > ori: [356x3 double] > > tra: [184x356 double] > > label: {151x1 cell} > > unit: 'cm' > > > > I think most of that extra information is planar gradient data > (i.e., > > it comes from GA_FIC.grad). Since my data are EEG data, I assume it > > wouldn't make sense to use ft_megplanar on them. So, assuming that I > > need to get the extra channel location information into my EEG data, > > does anyone have any ideas on how to do that? > > > > Best, > > Steve Politzer-Ahles > > > > -- > > Stephen Politzer-Ahles > > University of Kansas > > Linguistics Department > > http://www.linguistics.ku.edu/ > > > > > > _______________________________________________ > > 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 > > 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: > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 25 > ***************************************** > > > > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > > > _______________________________________________ > 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 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 sguillor at brandeis.edu Mon Sep 19 22:34:39 2011 From: sguillor at brandeis.edu (Sylvia Guillory) Date: Mon, 19 Sep 2011 16:34:39 -0400 Subject: [FieldTrip] Time Frequency Analysis and padding Message-ID: Dear FieldTrip Community, I have a question regarding the ft_freqanalysis function. I acquired EEG data in a paradigm where each condition varied in length. For instance, the memory retention period was 600ms in one condition and 900ms in another condition. I want to perform time-frequency analysis using morlet wavelets. My question is that if my epochs are different lengths, would I need to set the cgf.pad parameter to pad the 600ms condition by 300ms so that they are the same length or is it recommend that when I segment the data that I produce longer epochs for my time of interest in the 600ms condition? Thank you for your time. -Sylvia -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Sep 20 09:57:37 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 20 Sep 2011 09:57:37 +0200 Subject: [FieldTrip] Time Frequency Analysis and padding In-Reply-To: References: Message-ID: Hi Sylvia, You can do both. Note that in specifying the cfg.pad parameter, you need to give the length of the trial including the padding, so in your example it should be >= 0.9. The consequence of the padding will be that you can still estimate the TF-map at latencies > 0.6 s, but note that thiswill be computed from fewer observations than the power at lower latencies. Best, Jan-mathijs On Sep 19, 2011, at 10:34 PM, Sylvia Guillory wrote: > Dear FieldTrip Community, > > I have a question regarding the ft_freqanalysis function. I acquired EEG data in a paradigm where each condition varied in length. For instance, the memory retention period was 600ms in one condition and 900ms in another condition. I want to perform time-frequency analysis using morlet wavelets. My question is that if my epochs are different lengths, would I need to set the cgf.pad parameter to pad the 600ms condition by 300ms so that they are the same length or is it recommend that when I segment the data that I produce longer epochs for my time of interest in the 600ms condition? Thank you for your time. > > -Sylvia > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Tue Sep 20 12:29:58 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Tue, 20 Sep 2011 12:29:58 +0200 (CEST) Subject: [FieldTrip] Fwd: [Fwd: Yum & rpm code dependencies for OpenMEEG] In-Reply-To: <1580753422.1324605.1316514594866.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <1034464623.1324607.1316514598348.JavaMail.root@draco.zimbra.ru.nl> Hi Steve and Alexandre Since this topic might be of interest for a bigger audience I took the liberty of forwarding it to the official discussion list. The pipeline to run the OpenMEEG forward solver is quite standard in FieldTrip. We have put effort in making things as general as possible. In principle the same pipeline can be used to generate other forward solutions. In your case, you have the mesh from Freesurfer and you want to generate a 'volume conductor structure', which will be fed to the ft_compute_leadfield function. The function to generate the vol structure is ft_prepare_headmodel. In FieldTrip code: % this is the FreeSurfer surface bnd = ft_read_headshape('filename'); % this generates a 'vol' structure (one boundary) cfg=[]; cfg.method = 'openmeeg'; cfg.geom = bnd; cfg.conductivity = 1; vol = ft_prepare_headmodel(cfg); Assuming you know the positions of your sensors, the next step will be: [vol,sens]=ft_prepare_vol_sens(vol,sens); % this makes the vol and the elec structure compatible % this generates a grid of source points for your forward solution cfg = []; cfg.pos = pos; % the positions of the dipoles gridfwd = ft_prepare_sourcemodel(cfg,vol,sens); % this calculates the lead fields cfg=[]; cfg.channel = 'all'; cfg.vol = vol; cfg.grid = gridfwd; cfg.elec = sens; % use cfg.grad for MEG data gridfwd = ft_prepare_leadfield(cfg); Take care that dipoles, electrodes and surfaces are expressed in the same coordinates system (and coregistered). Moreover you should know that some surface triangulations work better than others for a BEM method. Here I am implicitly assuming that you have one single boundary (must be a closed surface for BEM) and that the surface is a smooth rendering of the inner skull. I hope this helps Best regards, Cristiano ----- "Alexandre Gramfort" schreef: > Van: "Alexandre Gramfort" > Aan: sdeiss at ucsd.edu > Cc: "c micheli" > Verzonden: Maandag 19 september 2011 23:59:23 > Onderwerp: Re: [Fwd: Yum & rpm code dependencies for OpenMEEG] > > Hello steve, > > > I am trying to incorperate our intermediate results, which include > a > > freesurfer mesh, with OpenMEEG to get a new forward matrix to look > at. > > All I have to go on at the moment is the sample OpenMEEG script. >  But I > > think that leaves out a lot of the cfg fields that I have to specify > after > > looking at ft_prepare_bemmodel and ft_prepare_mesh that call > OpenMEEG in > > FieldTrip.  If I am right, is there an example script for doing > OpenMEEG > > with real head data as opposed to the sperical model? > > I am afraid not but there should be an example of forward modeling on > the wiki > and the api should be the same. > > maybe cristiano in CC knows? > > Alex > > > The information in this e-mail is intended only for the person to whom > it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you > in error > but does not contain patient information, please contact the sender > and properly > dispose of the e-mail. From ekanal at cmu.edu Tue Sep 20 20:28:58 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 20 Sep 2011 14:28:58 -0400 Subject: [FieldTrip] source localization difficulties Message-ID: <7ADAEFF1-98AE-465D-B6A0-486AFF8857A7@cmu.edu> Hello folks - I'm trying to use source localization on a number of datasets, and I'm finding the FT functions confusing. Firstly, and most problematic, examining the same MRI data using `ft_read_mri` + `ft_volumerealign` and the tkmedit tool that comes with FreeSurfer seems to show two completely different brains. I'm unable to locate landmarks in the FT browser that I can see in the tkmedit window, and vice versa. The data isn't simply flipped; it looks that each slice is different. Why would this be the case? Secondly, in an attempt to coregister the MRI and MEG data, I used `ft_determine_coordsys`, which simply opened a window with a picture of three axes (see attached image "ft_determine_coordsys.png"). Shouldn't there be image data overlaid on the axes? Lastly, I've already segmented and coregistered the MRI and MEG data using FreeSurfer. Is there a way to simply load this data into FieldTrip and get right to plotting the data? Thanks! Elli Kanal -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 From politzerahless at gmail.com Tue Sep 20 20:58:03 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 20 Sep 2011 13:58:03 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 10, Issue 27 In-Reply-To: References: Message-ID: Jorn, Thanks a lot for your assistance. It turns out I had in fact updated to a version that was not the most recent; I've now updated my version to the most recent one and eventually I was able to run the cluster statistics successfully. I have one [hopefully final!] very minor question... when I plot the results of the cluster test, the time windows with significant clusters show up correctly (like in the samples on the wiki, the significant channels are highlighted in those time windows). But in the time windows where there are no significant clusters, for some reason all channels are highlighted--this happens with both my own data and when I try plotting the sample data from the wiki. While plotting, I checked "neg_int" and didn't see any problems (i.e., in the nonsignificant time windows neg_int was all zeroes), so I'm not sure why channels are getting highlighted there. Like I said, this is not a major problem. But if anyone has any ideas why this might happen, I would greatly appreciate it. (And again, thanks a lot to Jorn for all your help so far!) Best, Steve Message: 1 > Date: Mon, 19 Sep 2011 17:13:53 +0200 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Problem with EEG channels in > ft_neighborselection when running cluster statistics > Message-ID: <4E775C31.7050305 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hey Stephen, > > please check your FT path. You are definitely not using a recent FT > version, because the line you quoted on statistics_wrapper does not > exist anymore. You can verify your path by typing in Matlab 'which > ft_defaults' or 'which ft_timelockstatistics' (without the quotes). > > Due to recent changes, it might additionally help to read these two FAQs: > http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors > http://fieldtrip.fcdonders.nl/faq/how_does_ft_neighbourselection_work > > Anyway, the tutorial wiki page is indeed out of date, as the > neighbourselection is not included correctly anymore. I'm gonna fix this > :) The only thing which you need to add is > cfg.neighbours=ft_neighbourselection(cfg, [...]) before calling > ft_timelockstatistics. That's all that changed. > > Best regards, > J?rn > > > On 9/19/2011 4:43 PM, Stephen Politzer-Ahles wrote: > > J?rn, > > > > Thanks lot for this information. I tried specifying cfg.layout and got > > a new error message: > > > > ??? Error using ==> ft_neighbourselection at 130 > > Sensor distance is measured in an unknown unit type > > > > Error in ==> statistics_wrapper at 241 > > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > > > Error in ==> ft_timelockstatistics at 123 > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > > > (I get the same message when trying to run > > neighbours=ft_neighbourselection(cfg,data) with that layout file > > specified.) The layout file I was using is based directly on > > EEG1010.lay which is included in fieldtrip, and it works fine when I > > use it for topoplotting and multiplotting, so I'm not sure why it's > > causing errors when fed to ft_neighbourselection. > > > > As for the version, I actually am using the most recent version (which > > I downloaded yesterday before trying to run cluster statistics, and > > updated my path accordingly), but still getting these errors. The code > > I've been trying to run, though, is based on the sample code on the > > wiki page > > http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock, > > which may be out of date. > > > > Is there perhaps anyone on the list who has run cluster statistics on > > EEG data and would be willing to share a sample of their code? > > > > Best, > > Steve > > > > Message: 1 > > Date: Mon, 19 Sep 2011 09:12:32 +0200 > > From: "J?rn M. Horschig" > > > > To: Email discussion list for the FieldTrip project > > > > > Subject: Re: [FieldTrip] Problem with EEG channels in > > ft_neighborselection when running cluster statistics > > Message-ID: <4E76EB60.9080801 at donders.ru.nl > > > > > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > > > Hey Stephen, > > > > You need to specify the position of your electrodes, which are mostly > > stored in an 'elec' structure. If you do not have that available, you > > can circumvent the problem by defining a cfg.layout. In that case, > > neighbouring sensors will be selected according to how they are > placed > > in that layout-file you specify. That's not 100% correct of > > course, but > > at least an estimate how the sensors are positioned (note that a > > layout > > has only 2D coordinates). For example, you could use cfg.layout = > > 'EEG1010.lay' as a start. > > > > Anyway, could you try using a more recent version of FieldTrip? A few > > months ago, we changed the way the neighbourselection works > (actually, > > you have to call cfg.neighbours = ft_neighbourselection manually, > > now). > > You can then also check with cfg.feedback = 'yes' whether the > > neighbourselection looks alright to you (that's the same as calling > > ft_neighbourplot) > > > > Hope it helps! Best regards, > > J?rn > > > > > > > > On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote: > > > When attempting to run cluster statistics on my EEG data > (originally > > > from Neuroscan .CNT, then processed in EEGLAB and finally > > imported to > > > fieldtrip) using ft_timelockstatistics(), I receive the following > > > error message: > > > > > > ??? Error using ==> ft_neighbourselection at 114 > > > Did not find gradiometer or electrode information. > > > > > > Error in ==> statistics_wrapper at 241 > > > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > > > > > Error in ==> ft_timelockstatistics at 123 > > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > > > This seems to be because when I use cfg.channel = {'EEG'}; with my > > > data, the channel information (the variable "sens" used in > > > ft_neighbourselection) consists only of the list of channel labels: > > > > > > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} > > > > > > On the other hand, when I run timelockstatistics on the sample data > > > from the wiki, "sens" includes much more information: > > > > > > sens = > > > > > > pnt: [151x3 double] > > > ori: [356x3 double] > > > tra: [184x356 double] > > > label: {151x1 cell} > > > unit: 'cm' > > > > > > I think most of that extra information is planar gradient data > > (i.e., > > > it comes from GA_FIC.grad). Since my data are EEG data, I assume it > > > wouldn't make sense to use ft_megplanar on them. So, assuming that > I > > > need to get the extra channel location information into my EEG > data, > > > does anyone have any ideas on how to do that? > > > > > > Best, > > > Steve Politzer-Ahles > > > > > > -- > > > Stephen Politzer-Ahles > > > University of Kansas > > > Linguistics Department > > > http://www.linguistics.ku.edu/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Sep 21 09:19:15 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 21 Sep 2011 09:19:15 +0200 Subject: [FieldTrip] source localization difficulties In-Reply-To: <7ADAEFF1-98AE-465D-B6A0-486AFF8857A7@cmu.edu> References: <7ADAEFF1-98AE-465D-B6A0-486AFF8857A7@cmu.edu> Message-ID: <75EC3F25-B486-4F52-8A0F-B83AEA0E19AA@donders.ru.nl> Hi Elli, > Firstly, and most problematic, examining the same MRI data using `ft_read_mri` + `ft_volumerealign` and the tkmedit tool that comes with FreeSurfer seems to show two completely different brains. I'm unable to locate landmarks in the FT browser that I can see in the tkmedit window, and vice versa. The data isn't simply flipped; it looks that each slice is different. Why would this be the case? ft_read_mri reads in the raw MRI-file(s) that you specified (e.g. the DICOM-slices) and stacks them in the right order. When displaying the data in ft_volumerealign, no magic is performed and you will just see the data as it is stored in the 3D-volume. Nothing more, nothing less. Did you apply any additional processing steps before displaying it with freesurfer? It is hard for me to judge whether something, and if so, what is going wrong here. > > Secondly, in an attempt to coregister the MRI and MEG data, I used `ft_determine_coordsys`, which simply opened a window with a picture of three axes (see attached image "ft_determine_coordsys.png"). Shouldn't there be image data overlaid on the axes? > There's no figure attached in the mail I got. I would indeed expect to see 3 axes and three intersecting orthogonal slices with anatomical data. That is, if the call to ft_determine_coordsys was ft_determine_coordsys([],mri). Note that this function is just intended to check whether the coordinate system attached to the input data (mri, sensor positions, volume conduction model of the head, source dipole positions etc.) is as expected, or to assign the coordinate system, if you provide some input as to how to interpret the 3 cardinal axes. In order to check whether the co-registration went OK I would -co-register the MRI to the coordinate system in which the meg sensors are expressed -segment the MRI (these previous 2 steps can be done in freesurfer -create a volume conduction model (let's call it 'vol') of the head (e.g. by calling ft_prepare_singleshell, or even better: call ft_prepare_headmodel with cfg.method = 'singleshell') -check the co-registration: ft_plot_sens(data.grad);hold on;ft_plot_vol(vol), this should show the brain surface and the sensors more or less properly aligned. > Lastly, I've already segmented and coregistered the MRI and MEG data using FreeSurfer. Is there a way to simply load this data into FieldTrip and get right to plotting the data? > Yes, as far as I know ft_read_mri should know how to deal with *.mgz volumes. > Thanks! You're welcome. Jan-Mathijs > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekanal at cmu.edu Wed Sep 21 19:53:49 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Wed, 21 Sep 2011 13:53:49 -0400 Subject: [FieldTrip] source localization difficulties In-Reply-To: <75EC3F25-B486-4F52-8A0F-B83AEA0E19AA@donders.ru.nl> References: <7ADAEFF1-98AE-465D-B6A0-486AFF8857A7@cmu.edu> <75EC3F25-B486-4F52-8A0F-B83AEA0E19AA@donders.ru.nl> Message-ID: Thanks for the reply. I'll look into the read_mri issue a bit more myself and see if I can't uncover anything. >> >> Secondly, in an attempt to coregister the MRI and MEG data, I used `ft_determine_coordsys`, which simply opened a window with a picture of three axes (see attached image "ft_determine_coordsys.png"). Shouldn't there be image data overlaid on the axes? >> > > There's no figure attached in the mail I got. I would indeed expect to see 3 axes and three intersecting orthogonal slices with anatomical data. That is, if the call to ft_determine_coordsys was ft_determine_coordsys([],mri). Note that this function is just intended to check whether the coordinate system attached to the input data (mri, sensor positions, volume conduction model of the head, source dipole positions etc.) is as expected, or to assign the coordinate system, if you provide some input as to how to interpret the 3 cardinal axes. > In order to check whether the co-registration went OK I would > -co-register the MRI to the coordinate system in which the meg sensors are expressed > -segment the MRI (these previous 2 steps can be done in freesurfer > -create a volume conduction model (let's call it 'vol') of the head (e.g. by calling ft_prepare_singleshell, or even better: call ft_prepare_headmodel with cfg.method = 'singleshell') > -check the co-registration: ft_plot_sens(data.grad);hold on;ft_plot_vol(vol), this should show the brain surface and the sensors more or less properly aligned. Thanks for the overview. Apparently I didn't attach the image. Here it is. There's no slices, just the gridlines. My code is as follows: % read raw DICOM data mri = ft_read_mri('raw_data/19/mprage_512x416.5/MR.1.3.12.2.1107.5.2.32.35216.2011051711005397198638928'); mri_coord = ft_determine_coordsys(mri,'interactive','yes'); This may be a bug, as it does seem to work appropriately with data loaded from .mgz files, as well as DICOM data loaded into and then saved out of SPM. >> >> Lastly, I've already segmented and coregistered the MRI and MEG data using FreeSurfer. Is there a way to simply load this data into FieldTrip and get right to plotting the data? >> > > Yes, as far as I know ft_read_mri should know how to deal with *.mgz volumes. Thanks. So, to make sure I get it: to use freesurfer data, I want to load up the .mgz volumes in such a way that I'll end up replicating the output of `ft_volumesegment`. That means finding the .mgz files that represent the `segmentedmri.gray` and `segmentedmri.white` structures and constructing a new structure with the contents of those files. One last point of confusion: can I actually do MEG-MRI coregistration in FreeSurfer? I've been doing it in MNE, which saves the data to a *.fif file. Is there a way to use the output of the MNE coregistration tool in FieldTrip? I've placed a .mat file with the MNE coregistration data (loaded from the fif file using the MNE `fiff_load_mri` function) online [1] so you can see it's contents; maybe you can tell which field in the structure is the correct transformation matrix. Thanks! Elli [1] http://erikdev.com/mne_coregistration_data.zip -------------- next part -------------- A non-text attachment was scrubbed... Name: ft_determine_coordsys.png Type: image/png Size: 37741 bytes Desc: not available URL: From B.Mouthaan at neuro.umcn.nl Thu Sep 22 11:38:04 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 22 Sep 2011 11:38:04 +0200 Subject: [FieldTrip] loading brainvision data Message-ID: Hello Fieldtrippers, Hello Fieldtrippers, For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: ??? Error using ==> ft_read_header at 86 file or directory 'heineken000003-kop.eeg' does not exist Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 161 [trl, event] = feval(cfg.trialfun, cfg); Especially the directory error pops up frequently. I don't have a clue. My script is like this: cfg = []; cfg.datafile = 'heineken000003.eeg'; cfg.headerfile = 'heineken000003.vhdr' cfg.trialdef.eventtype = '?'; ft_definetrial(cfg) Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. Hope to hear from you! Brian Mouthaan Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 22 11:43:28 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 22 Sep 2011 11:43:28 +0200 Subject: [FieldTrip] loading brainvision data In-Reply-To: References: Message-ID: <7CF81136-AB84-40AB-9CF9-17DEA36F61A9@donders.ru.nl> Hi Brian, Are you in the correct directory? In other words is your 'pwd' such that you can see the files when you type 'dir'? BW, JM On Sep 22, 2011, at 11:38 AM, wrote: > Hello Fieldtrippers, > > Hello Fieldtrippers, > > For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. > However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. > > I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: > > > ??? Error using ==> ft_read_header at 86 > file or directory 'heineken000003-kop.eeg' does not exist > > Error in ==> trialfun_general at 55 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 161 > [trl, event] = feval(cfg.trialfun, cfg); > > > Especially the directory error pops up frequently. I don't have a clue. > My script is like this: > > cfg = []; > > cfg.datafile = 'heineken000003.eeg'; > cfg.headerfile = 'heineken000003.vhdr' > > cfg.trialdef.eventtype = '?'; > > ft_definetrial(cfg) > > > Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. > > Hope to hear from you! > > Brian Mouthaan > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > _______________________________________________ > 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 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 Thu Sep 22 11:48:11 2011 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Thu, 22 Sep 2011 11:48:11 +0200 Subject: [FieldTrip] loading brainvision data In-Reply-To: References: Message-ID: Hi Brian, Also I noticed in your error you have '-kop' in the file name but not in the dataset name. I've noticed that one can't change the file name of .eeg files (e.g. copying them to a new file name) and then still load them; you should stick to the original name as it was given when collected. Best, Johanna On 22 September 2011 11:38, wrote: > ** > > Hello Fieldtrippers, > > Hello Fieldtrippers, > > For an assignment during my internship at the Radboud UMC, I want try to > use fieldtrip for Beamforming at Auditory Evoked Potentials. > However the first step is unsuccesful. I try to load *.eeg , *.vhdr , > *.vmrk and *.avr files but I receive multiple errors. > > I also tried to use the example script in the tutorial. However this > doesn't work either. I get errors like: > > > ??? Error using ==> ft_read_header at 86 > file or directory 'heineken000003-kop.eeg' does not exist > > Error in ==> trialfun_general at 55 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 161 > [trl, event] = feval(cfg.trialfun, cfg); > > > Especially the directory error pops up frequently. I don't have a clue. > My script is like this: > > cfg = []; > > cfg.datafile = 'heineken000003.eeg'; > cfg.headerfile = 'heineken000003.vhdr' > > cfg.trialdef.eventtype = '?'; > > ft_definetrial(cfg) > > > Can anyone help me? FIY I lack experience of working with EEG and fieltrip, > but I work with Matlab regularly. > > Hope to hear from you! > > Brian Mouthaan > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het > handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial > Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > 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 Gregor.Volberg at psychologie.uni-regensburg.de Thu Sep 22 12:56:14 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Thu, 22 Sep 2011 12:56:14 +0200 Subject: [FieldTrip] Antw: Re: loading brainvision data In-Reply-To: References: Message-ID: <4E7B306E020000570000AC3A@gwsmtp1.uni-regensburg.de> Hi Brian, Johanna is correct - manually editing the file names in Brainvision eeg data often causes problems. This is because the original name of the EEG data file ('*.eeg') and the corresponding marker file ('*.vmrk') are both stored within the header file ('*.vhdr'), and these information won't change accordingly if you rename the files on your hard disk. If the original data name is not available to re-rename the files on your hard disk, you can see them in the *.vhdr-file (5th and 6th row of the vhdr file, just open it with a text editor). Alternatively, you can edit the file name information within the vhdr-file to match the file names on your hard disk. Best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Johanna Zumer 9/22/2011 11:48 AM >>> Hi Brian, Also I noticed in your error you have '-kop' in the file name but not in the dataset name. I've noticed that one can't change the file name of .eeg files (e.g. copying them to a new file name) and then still load them; you should stick to the original name as it was given when collected. Best, Johanna On 22 September 2011 11:38, wrote: Hello Fieldtrippers, Hello Fieldtrippers, For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: ??? Error using ==> ft_read_header at 86 file or directory 'heineken000003-kop.eeg' does not exist Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 161 [trl, event] = feval(cfg.trialfun, cfg); Especially the directory error pops up frequently. I don't have a clue. My script is like this: cfg = []; cfg.datafile = 'heineken000003.eeg'; cfg.headerfile = 'heineken000003.vhdr' cfg.trialdef.eventtype = '?'; ft_definetrial(cfg) Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. Hope to hear from you! Brian Mouthaan Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. _______________________________________________ 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 zizlsperger at gmail.com Thu Sep 22 14:49:14 2011 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Thu, 22 Sep 2011 14:49:14 +0200 Subject: [FieldTrip] ft_timelockgrandaverage Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2@gmail.com> Dear Fieldtrippers, in a within-subjects design I use ft_timelockgrandaverage with cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of the form: avg: [29x5000 double] var: [29x5000 double] time: [1x5000 double] dof: [29x5000 double] label: {29x1 cell} trial: [172x29x5000 double] dimord: 'rpt_chan_time' trialinfo: [172x28 double] cfg: [1x1 struct] I stick closely to the FieldTrip tutorial for cluster permutation statistics. I use the newest version of fieldtrip. After the grandaverage there is no more 'avg' in the structure, so I can not go on in the tutorial e.g. with: GA_XvsY = GA_X; GA_XvsY.avg = GA_X.avg - GA_Y.avg; New data is of structure: label: {29x1 cell} time: [1x5000 double] individual: [10x29x5000 double] dimord: 'subj_chan_time' cfg: [1x1 struct] Do I get the tutorial wrong or is it my data ? Thanks in advance Best Leopold From B.Mouthaan at neuro.umcn.nl Thu Sep 22 15:20:47 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 22 Sep 2011 15:20:47 +0200 Subject: [FieldTrip] Problem solved, Vol 10, Issue 30, directory issue References: Message-ID: Thank you all for your fast responses! The problem was solved. My directory set-up was incorrect. The data was unable to be loaded because I filed this in a subfolder. I place all data loose (not in a subfolder), in the same directory were I have my script. Again, thanks! -----Oorspronkelijk bericht----- Van: fieldtrip-bounces at donders.ru.nl namens fieldtrip-request at donders.ru.nl Verzonden: do 22-9-2011 12:00 Aan: fieldtrip at donders.ru.nl Onderwerp: fieldtrip Digest, Vol 10, Issue 30 Send fieldtrip mailing list submissions to fieldtrip at donders.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 donders.ru.nl You can reach the person managing the list at fieldtrip-owner at donders.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. loading brainvision data (B.Mouthaan at neuro.umcn.nl) 2. Re: loading brainvision data (jan-mathijs schoffelen) 3. Re: loading brainvision data (Johanna Zumer) ---------------------------------------------------------------------- Message: 1 Date: Thu, 22 Sep 2011 11:38:04 +0200 From: To: Subject: [FieldTrip] loading brainvision data Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hello Fieldtrippers, Hello Fieldtrippers, For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: ??? Error using ==> ft_read_header at 86 file or directory 'heineken000003-kop.eeg' does not exist Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 161 [trl, event] = feval(cfg.trialfun, cfg); Especially the directory error pops up frequently. I don't have a clue. My script is like this: cfg = []; cfg.datafile = 'heineken000003.eeg'; cfg.headerfile = 'heineken000003.vhdr' cfg.trialdef.eventtype = '?'; ft_definetrial(cfg) Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. Hope to hear from you! Brian Mouthaan Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Thu, 22 Sep 2011 11:43:28 +0200 From: jan-mathijs schoffelen To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading brainvision data Message-ID: <7CF81136-AB84-40AB-9CF9-17DEA36F61A9 at donders.ru.nl> Content-Type: text/plain; charset="us-ascii" Hi Brian, Are you in the correct directory? In other words is your 'pwd' such that you can see the files when you type 'dir'? BW, JM On Sep 22, 2011, at 11:38 AM, wrote: > Hello Fieldtrippers, > > Hello Fieldtrippers, > > For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. > However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. > > I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: > > > ??? Error using ==> ft_read_header at 86 > file or directory 'heineken000003-kop.eeg' does not exist > > Error in ==> trialfun_general at 55 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 161 > [trl, event] = feval(cfg.trialfun, cfg); > > > Especially the directory error pops up frequently. I don't have a clue. > My script is like this: > > cfg = []; > > cfg.datafile = 'heineken000003.eeg'; > cfg.headerfile = 'heineken000003.vhdr' > > cfg.trialdef.eventtype = '?'; > > ft_definetrial(cfg) > > > Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. > > Hope to hear from you! > > Brian Mouthaan > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Thu, 22 Sep 2011 11:48:11 +0200 From: Johanna Zumer To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading brainvision data Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi Brian, Also I noticed in your error you have '-kop' in the file name but not in the dataset name. I've noticed that one can't change the file name of .eeg files (e.g. copying them to a new file name) and then still load them; you should stick to the original name as it was given when collected. Best, Johanna On 22 September 2011 11:38, wrote: > ** > > Hello Fieldtrippers, > > Hello Fieldtrippers, > > For an assignment during my internship at the Radboud UMC, I want try to > use fieldtrip for Beamforming at Auditory Evoked Potentials. > However the first step is unsuccesful. I try to load *.eeg , *.vhdr , > *.vmrk and *.avr files but I receive multiple errors. > > I also tried to use the example script in the tutorial. However this > doesn't work either. I get errors like: > > > ??? Error using ==> ft_read_header at 86 > file or directory 'heineken000003-kop.eeg' does not exist > > Error in ==> trialfun_general at 55 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 161 > [trl, event] = feval(cfg.trialfun, cfg); > > > Especially the directory error pops up frequently. I don't have a clue. > My script is like this: > > cfg = []; > > cfg.datafile = 'heineken000003.eeg'; > cfg.headerfile = 'heineken000003.vhdr' > > cfg.trialdef.eventtype = '?'; > > ft_definetrial(cfg) > > > Can anyone help me? FIY I lack experience of working with EEG and fieltrip, > but I work with Matlab regularly. > > Hope to hear from you! > > Brian Mouthaan > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het > handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial > Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 10, Issue 30 ***************************************** Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 5858 bytes Desc: not available URL: From politzerahless at gmail.com Thu Sep 22 15:48:59 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 22 Sep 2011 08:48:59 -0500 Subject: [FieldTrip] fft_timelockgrandaverage Message-ID: Leopold, The way I dealt with this was by running ft_timelockgrandaverage() twice, once with keepindividual='yes' and once with keepindividual='no', and I saved the structures under different names (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I used the former one for cluster statistics, and the latter one (which has the .avg field) for plotting. Alternatively, for each grand average structure with individuals you could just create an .avg field by running the following: GA.avg = squeeze( mean(GA.individual,1) ); This should average across individuals. Best, Steve Politzer-Ahles > Message: 2 > Date: Thu, 22 Sep 2011 14:49:14 +0200 > From: Zizlsperger Leopold > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_timelockgrandaverage > Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Dear Fieldtrippers, > > in a within-subjects design I use ft_timelockgrandaverage with > cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of > the form: > > avg: [29x5000 double] > var: [29x5000 double] > time: [1x5000 double] > dof: [29x5000 double] > label: {29x1 cell} > trial: [172x29x5000 double] > dimord: 'rpt_chan_time' > trialinfo: [172x28 double] > cfg: [1x1 struct] > > I stick closely to the FieldTrip tutorial for cluster permutation > statistics. I use the newest version of fieldtrip. After the grandaverage > there is no more 'avg' in the structure, so I can not go on in the tutorial > e.g. with: > GA_XvsY = GA_X; > GA_XvsY.avg = GA_X.avg - GA_Y.avg; > > New data is of structure: > > label: {29x1 cell} > time: [1x5000 double] > individual: [10x29x5000 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > > Do I get the tutorial wrong or is it my data ? > Thanks in advance > Best > Leopold > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Thu Sep 22 16:08:25 2011 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 22 Sep 2011 15:08:25 +0100 Subject: [FieldTrip] cluster based permutation ANOVA? Message-ID: Dear All, I have been running the cluster-based analysis on my data, but have had to compare across my conditions in pairs. Is there a way to do a full factorial ANOVA-like cluster permutation test? (My design is 3x2) Thank you, zita -- Zita Patai DPhil Candidate, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ eva.patai at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From zizlsperger at gmail.com Thu Sep 22 16:23:50 2011 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Thu, 22 Sep 2011 16:23:50 +0200 Subject: [FieldTrip] fft_timelockgrandaverage In-Reply-To: References: Message-ID: <5A6F7FCE-AD83-47CE-8F34-B25CFE44CBB0@gmail.com> Dear Steve thanks for your reply. I think that solves my problem. (I tried that already, but always got "??? Improper index matrix reference" but looks like I have to look closer again into the rest of the script, seems to be a problem with the clusters themselves). Thanks for your help Best Leo On 22.09.2011, at 15:48, Stephen Politzer-Ahles wrote: > Leopold, > > The way I dealt with this was by running ft_timelockgrandaverage() twice, once with keepindividual='yes' and once with keepindividual='no', and I saved the structures under different names (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I used the former one for cluster statistics, and the latter one (which has the .avg field) for plotting. > > Alternatively, for each grand average structure with individuals you could just create an .avg field by running the following: > > GA.avg = squeeze( mean(GA.individual,1) ); > > This should average across individuals. > > Best, > Steve Politzer-Ahles > > > > Message: 2 > Date: Thu, 22 Sep 2011 14:49:14 +0200 > From: Zizlsperger Leopold > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_timelockgrandaverage > Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Dear Fieldtrippers, > > in a within-subjects design I use ft_timelockgrandaverage with cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of the form: > > avg: [29x5000 double] > var: [29x5000 double] > time: [1x5000 double] > dof: [29x5000 double] > label: {29x1 cell} > trial: [172x29x5000 double] > dimord: 'rpt_chan_time' > trialinfo: [172x28 double] > cfg: [1x1 struct] > > I stick closely to the FieldTrip tutorial for cluster permutation statistics. I use the newest version of fieldtrip. After the grandaverage there is no more 'avg' in the structure, so I can not go on in the tutorial e.g. with: > GA_XvsY = GA_X; > GA_XvsY.avg = GA_X.avg - GA_Y.avg; > > New data is of structure: > > label: {29x1 cell} > time: [1x5000 double] > individual: [10x29x5000 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > > Do I get the tutorial wrong or is it my data ? > Thanks in advance > Best > Leopold > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 22 21:07:58 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 22 Sep 2011 21:07:58 +0200 Subject: [FieldTrip] Fwd: Questions about coherence statistics for group analysis related to J.Neurosci. 2011 and Science 2005 papers References: Message-ID: Hi Sophie, I forward your message to the discussion list so that others may also participate in and benefit from the discussion > I have been reading your J.Neurosci. 2011 and Science 2005 papers and I also read Maris' paper about "nonparametric statistical testing of coherence differences" and looked at Fieldtrip tutorial and browsed the fieldtrip mailing list archive about coherence statistics. However, i still have question, and hope you will have time to answer. > > Here a short description of our EEG-EMG experiment : we have 10 subjects, and we compute the corticomuscular coherence for each > EEG (64 channels) and EMG (4 channels, 2 muscles per hand) channels combination. Subjects are performing a visuotracking task and each trial contained 4 conditions (3sec long) . One trial is ~12 sec long ) . > > First, about your Science 2005 paper : in the materials and methods part, you z-transformed the coherence values and performed a non-parametric permutation test to test the significance of the difference between the prestimulus and the stimulus interval. Did you perform the test on the z-transformed coherence values (variable 'r' on your paper) ? Yes. > Concerning the implementation in Fieldtrip while using the ft_freqstatistics function, is it the z-transformed coherence difference you compute in the statfun_xxx (and as output variable 's.stat' )? so as to perform the montecarlo permutation? We would like to compare each of the four conditions with the baseline period we defined in our experiment in the group subject. No. The computations implemented in FieldTrip's statfun_indepsamplesZcoh function are aimed at computing the Z-transformed coherence difference for a single subject, i.e. where the unit-of-observation is a trial. This is the method which is described in Eric Maris' J Neurosci Methods paper. In the other two papers you mention, we did statistical inference across subjects, i.e. each unit-of-observation was a subject. In order to achieve this, we computed for each subject the Z-transformed coherence by hand. These Z-coherence differences were tested against 0 using the montecarlo permutation approach. This is essentially the same as testing whether the distribution of coherence values across subjects is exchangeable across conditions. Practically this means that you need to do some work by hand: For each subject you need to do something like this: coh1 = ft_connectivityanalysis(cfg, freq1); % create coherence for subject X condition1 coh2 = ft_connectivityanalysis(cfg, freq2); %create coherence for subject X condition 2 coh1.cohspctrm = atanh(....) - atanh(...) etc -> compute the Z-transformed coherence difference between coh1.cohspctrm and coh2.cohspctrm; coh2.cohspctrm(:) = 0; cfg = []; cfg.method = 'montecarlo'; cfg.statistic = 'diff'; cfg.parameter = 'cohspctrm'; ... stat=ft_freqstatistics(cfg, coh1, coh2, ..., ..., ..., ) > Second, about your J.Neurosci. 2011 ,as we would like to do comparison between conditions (comparable to what you did on your paper, i assume). In this case, as we want to know if the effect is relevant in our group of subjects, and from what i understood from http://mailman.science.ru.nl/pipermail/fieldtrip/2009-May/002147.html one should not use the "indepsamplesZcoh " statistic function when calling ft_freqstatistics . Is a function available soon in Fieldtrip release ? Or what modification should i do on indepsamplesZcoh function? (from what i understood, this function is also computing a z-transformation on the data) See above. i think in principle you could also take a 2-step approach. In other words, you could use the statfun_indepsamplesZcoh, to compute per subject and contrast the Z-transformed coherence (so you will have to use ft_freqstatistics with single trial data). Next, you can use the output to ft_freqstatistics for all subjects as an input to a second call to ft_freqstatistics to do the statistical inference across subjects. This still needs an extra set of input data-structures containing 0's as dummy condition. This is for the same reason as above. > Another question about fieldtrip, it is preferable to input 2 grand average structure per condition as input in the ft_freqstatistics function? Or Should i input one structure per subject and per condition? ft_freqstatistics accepts multiple input arguments so there is no reason to pass the data through ft_freqgrandaverage first. > I have been very confused reading these papers and it is even harder to express my misunderstanding, so I hope my writing has been quite understandable.... > > Thank you in advance for any help with these issues. best wishes, Jan-Mathijs > > > Sophie Chen - Ph.D Student in Neuroscience > > Performance Motrice et Modélisation P2M > Institut des Sciences du Mouvement http://www.ism.univmed.fr/ > UMR 6233 CNRS - Université Aix-Marseille > Tel : +33 (0)4 91 17 22 06 > Office : D 2.32 > Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Thu Sep 22 21:14:50 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 22 Sep 2011 14:14:50 -0500 Subject: [FieldTrip] cluster based permutation ANOVA? Message-ID: Zita, It should be possible. You may find these messages helpful: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003113.html Best, Steve Politzer-Ahles Message: 2 > Date: Thu, 22 Sep 2011 15:08:25 +0100 > From: Zita Eva Patai > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] cluster based permutation ANOVA? > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear All, > > I have been running the cluster-based analysis on my data, but have had to > compare across my conditions in pairs. > > Is there a way to do a full factorial ANOVA-like cluster permutation test? > (My design is 3x2) > > Thank you, > zita > > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > eva.patai at psy.ox.ac.uk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 22 21:20:14 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 22 Sep 2011 21:20:14 +0200 Subject: [FieldTrip] fft_timelockgrandaverage In-Reply-To: References: Message-ID: <54CE4961-23E9-460B-8D7B-190E30E12E36@donders.ru.nl> Hi all, Thanks for noticing this discrepancy in the documentation. Indeed when the functionality was changed some time ago, it seems that the wiki was not updated to mirror these changes. But hey, the fun thing about a wiki is that everybody can change it. I hereby give permission to any of you to bring this page up-to-date again ;o). Best wishes, Jan-Mathijs On Sep 22, 2011, at 3:48 PM, Stephen Politzer-Ahles wrote: > Leopold, > > The way I dealt with this was by running ft_timelockgrandaverage() twice, once with keepindividual='yes' and once with keepindividual='no', and I saved the structures under different names (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I used the former one for cluster statistics, and the latter one (which has the .avg field) for plotting. > > Alternatively, for each grand average structure with individuals you could just create an .avg field by running the following: > > GA.avg = squeeze( mean(GA.individual,1) ); > > This should average across individuals. > > Best, > Steve Politzer-Ahles > > > > Message: 2 > Date: Thu, 22 Sep 2011 14:49:14 +0200 > From: Zizlsperger Leopold > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_timelockgrandaverage > Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Dear Fieldtrippers, > > in a within-subjects design I use ft_timelockgrandaverage with cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of the form: > > avg: [29x5000 double] > var: [29x5000 double] > time: [1x5000 double] > dof: [29x5000 double] > label: {29x1 cell} > trial: [172x29x5000 double] > dimord: 'rpt_chan_time' > trialinfo: [172x28 double] > cfg: [1x1 struct] > > I stick closely to the FieldTrip tutorial for cluster permutation statistics. I use the newest version of fieldtrip. After the grandaverage there is no more 'avg' in the structure, so I can not go on in the tutorial e.g. with: > GA_XvsY = GA_X; > GA_XvsY.avg = GA_X.avg - GA_Y.avg; > > New data is of structure: > > label: {29x1 cell} > time: [1x5000 double] > individual: [10x29x5000 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > > Do I get the tutorial wrong or is it my data ? > Thanks in advance > Best > Leopold > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.ketz at gmail.com Thu Sep 22 21:28:08 2011 From: nick.ketz at gmail.com (Nick Ketz) Date: Thu, 22 Sep 2011 13:28:08 -0600 Subject: [FieldTrip] distributed computing with montecarlo clusterstatistics Message-ID: <4E7B8C48.4020605@gmail.com> Hi list, thanks in advance for input that can be provided... I'm working with a large data set involving all pairwise WPLI estimates for a 128 surface electrode EEG experiment(8128 pairs), and I would like to perform a 2 condition, within-subject time-frequency (and space if that's possible) cluster analysis. Given this I have a large number of possible clusters, I have been getting on the order of 10,000 observed clusters(with a standard clusteralpha of 0.05), which then leads to a lengthy randomization test. What I'm wondering is if there's any way to run this in a distributed way(peer-to-peer, or perhaps in parallel)? I could imagine a single processor handling one iteration of the randomization test at a time, however when I looked at the statistics_montecarlo.m file I saw no quick way to implement this. I've explored some ideas with 'parfor' loops but I wanted to get the lists' input before I start rewriting statistics_monetcarlo.m. Has anyone approached this problem thus far, and if so are there any currently available resources? thanks again... Nick From jm.horschig at donders.ru.nl Fri Sep 23 09:39:10 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 23 Sep 2011 09:39:10 +0200 Subject: [FieldTrip] fft_timelockgrandaverage In-Reply-To: <5A6F7FCE-AD83-47CE-8F34-B25CFE44CBB0@gmail.com> References: <5A6F7FCE-AD83-47CE-8F34-B25CFE44CBB0@gmail.com> Message-ID: <4E7C379E.9040002@donders.ru.nl> Dear Leo, I suppose you are using Matlab2011a, am I right? If so, then please see this bug: http://bugzilla.fcdonders.nl/show_bug.cgi?id=918 Unfortunately, we do not have a running version of Matlab2011a, yet, so we cannot look into this issue to track it down :/ In case you do not have Matlab2011a, this might be a different story. Best, Jörn On 9/22/2011 4:23 PM, Zizlsperger Leopold wrote: > Dear Steve > thanks for your reply. I think that solves my problem. > (I tried that already, but always got > "??? Improper index matrix reference" > but looks like I have to look closer again into the rest of the > script, seems to be a problem with the clusters themselves). > Thanks for your help > Best > Leo > > > On 22.09.2011, at 15:48, Stephen Politzer-Ahles wrote: > >> Leopold, >> >> The way I dealt with this was by running ft_timelockgrandaverage() >> twice, once with keepindividual='yes' and once with >> keepindividual='no', and I saved the structures under different names >> (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I >> used the former one for cluster statistics, and the latter one (which >> has the .avg field) for plotting. >> >> Alternatively, for each grand average structure with individuals you >> could just create an .avg field by running the following: >> >> GA.avg = squeeze( mean(GA.individual,1) ); >> >> This should average across individuals. >> >> Best, >> Steve Politzer-Ahles >> >> >> >> Message: 2 >> Date: Thu, 22 Sep 2011 14:49:14 +0200 >> From: Zizlsperger Leopold > > >> To: fieldtrip at donders.ru.nl >> Subject: [FieldTrip] ft_timelockgrandaverage >> Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2 at gmail.com >> > >> Content-Type: text/plain; charset=us-ascii >> >> Dear Fieldtrippers, >> >> in a within-subjects design I use ft_timelockgrandaverage with >> cfg.keepindividual = 'yes' to average timelocked EEG data (10 >> subjects) of the form: >> >> avg: [29x5000 double] >> var: [29x5000 double] >> time: [1x5000 double] >> dof: [29x5000 double] >> label: {29x1 cell} >> trial: [172x29x5000 double] >> dimord: 'rpt_chan_time' >> trialinfo: [172x28 double] >> cfg: [1x1 struct] >> >> I stick closely to the FieldTrip tutorial for cluster permutation >> statistics. I use the newest version of fieldtrip. After the >> grandaverage there is no more 'avg' in the structure, so I can >> not go on in the tutorial e.g. with: >> GA_XvsY = GA_X; >> GA_XvsY.avg = GA_X.avg - GA_Y.avg; >> >> New data is of structure: >> >> label: {29x1 cell} >> time: [1x5000 double] >> individual: [10x29x5000 double] >> dimord: 'subj_chan_time' >> cfg: [1x1 struct] >> >> Do I get the tutorial wrong or is it my data ? >> Thanks in advance >> Best >> Leopold >> >> _______________________________________________ >> 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 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 zizlsperger at gmail.com Fri Sep 23 15:27:22 2011 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Fri, 23 Sep 2011 15:27:22 +0200 Subject: [FieldTrip] ft_timelockstatistics > ftFuncMem=memtic(); Message-ID: Dear All, as the ft_neighbourselection / ft_prepare_neighbours-scripts seem to changed in progress at the moment, I downloaded a today's version of FieldTrip. The new ft_timelockstatistics stops early: ??? Undefined function or variable 'memtic'. Error in ==> ft_timelockstatistics at 69 ftFuncMem = memtic(); If I code it out, I experience problems with cfg.design I have not had before. Any ideas ? Thanks in advance Best Leopold From ekanal at cmu.edu Fri Sep 23 16:18:22 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Fri, 23 Sep 2011 10:18:22 -0400 Subject: [FieldTrip] ft_freqstatistics (nonparametric) on TFR across multiple frequencies Message-ID: <2E373097-F5A9-4F46-9A6C-2F444EB6745A@cmu.edu> Hello folks - I'm comparing the TFRs of two conditions using `ft_freqstatistics`, and I was wondering if there's a simple way to examine the significance of an effect over a range of frequencies. The way I'm doing it now, cfg.frequency = [8 12]; cfg.method = 'montecarlo'; ... stat = ft_freqstatistics(cfg, high_tfr, low_tfr); `ft_freqstatistics` returns a test for each individual frequency (i.e., the `stat.prob`, `stat.mask`, etc are "NumChan x 5 x NumFreq" variables instead of "NumChan x 1 x NumFreq"). Thanks - Elli -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 From jan.schoffelen at donders.ru.nl Fri Sep 23 16:20:58 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 23 Sep 2011 16:20:58 +0200 Subject: [FieldTrip] code change Message-ID: <96F233D2-E00B-48EF-9B3A-80A5E62CFF2A@donders.ru.nl> Dear community, I just committed some quite extensive changes to the FieldTrip-code, which I would like to briefly make you aware of. As such, the changes are intended to not affect you at all, because there is no change in functionality involved. Yet, it may be that some code may be broken, even though I took extreme care in checking whether all was OK. Now, what's the change all about? You can read about this change here: http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described. As mentioned, my intention is that this change is fully transparent for all of you, and does not lead to different analysis results. The worst thing that can happen is that the code is temporarily broken. In that case, please don't hesitate to report this (as detailed as you can) and we will fix it a.s.a.p, of course with apologies in advance from our side. With kind regards from the FieldTrip headquarters, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekanal at cmu.edu Fri Sep 23 16:26:08 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Fri, 23 Sep 2011 10:26:08 -0400 Subject: [FieldTrip] ft_freqstatistics (nonparametric) on TFR across multiple frequencies In-Reply-To: <12815_1316787570_p8NEJT0H003236_2E373097-F5A9-4F46-9A6C-2F444EB6745A@cmu.edu> References: <12815_1316787570_p8NEJT0H003236_2E373097-F5A9-4F46-9A6C-2F444EB6745A@cmu.edu> Message-ID: Never mind, I just now realized there's an option in ft_freqstatistics "avgoverfreq". Hopefully this communique is useful to someone else who missed that in the docs :) Elli On Sep 23, 2011, at 10:18 AM, Kanal Eliezer wrote: > Hello folks - > > I'm comparing the TFRs of two conditions using `ft_freqstatistics`, and I was wondering if there's a simple way to examine the significance of an effect over a range of frequencies. The way I'm doing it now, > > cfg.frequency = [8 12]; > cfg.method = 'montecarlo'; > ... > stat = ft_freqstatistics(cfg, high_tfr, low_tfr); > > `ft_freqstatistics` returns a test for each individual frequency (i.e., the `stat.prob`, `stat.mask`, etc are "NumChan x 5 x NumFreq" variables instead of "NumChan x 1 x NumFreq"). Thanks - > > Elli > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mark.noordenbos at gmail.com Fri Sep 23 18:09:18 2011 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Fri, 23 Sep 2011 18:09:18 +0200 Subject: [FieldTrip] Filter settings (Fieldtrip vs Brainvision Analyzer) Message-ID: Dear all, I analyzed some data using Brainvision Analyzer and would like to re-analyze the same data using Fieldtrip. However, the final results are a bit different between Brainvision Analyzer and Fieldtrip. The main difference is because of differences in filtering of the data (without filtering the data is exactly the same). The filter in Fieldtrip seems to be much 'stricter' and as a consequence the amplitude is almost halved in the grandaverage! In Brainvision Analyzer I used the following filter setting: Butterworth Zero Phase Filters Low Cutoff: 1.0000 Hz, Time constant 0.1592s, 24 dB/oct High Cutoff: 30.0000 Hz, 24 dB/oct Notch Filter: --- In Fieldtrip I used the following filter settings cfg.lpfilter = 'yes'; cfg.hpfilter = 'yes'; cfg.lpfreq = 30; cfg.hpfreq = 1; cfg.lpfiltord = 6; cfg.hpfiltord = 6; cfg.lpfiltdir = 'twopass'; cfg.hpfiltdir = 'twopass'; Any suggestions for the Fieldtrip filter settings to resemble the Brainvision Analyzer filter settings as much as possible? Best, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fieldtripvsbva.jpg Type: image/jpeg Size: 26475 bytes Desc: not available URL: From luoj at mail.nih.gov Sat Sep 24 22:12:28 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Sat, 24 Sep 2011 16:12:28 -0400 Subject: [FieldTrip] creating new dataset Message-ID: Hi, If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). Thanks, Jessie From jm.horschig at donders.ru.nl Sun Sep 25 10:09:00 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Sun, 25 Sep 2011 10:09:00 +0200 Subject: [FieldTrip] creating new dataset In-Reply-To: References: Message-ID: <4E7EE19C.4040103@donders.ru.nl> Hi Jessie, not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: You can also exclude channels or channel groups using the following syntax {'all', '-POz', '-Fp1', -EOG'} From ft_preprocessing: If you are callingFT_PREPROCESSING with also the second input argument "data", then that should contain data that was already read from file in a previous call toFT_PREPROCESSING . In that case only the configuration options below apply. The channels that will be read and/or preprocessed are specified with cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), seeFT_CHANNELSELECTION for details You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. Hope this all helps to what you are up to! Best, Jörn On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > > If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). > > Thanks, > > Jessie > _______________________________________________ > 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 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 lwn_07 at yahoo.com.cn Sun Sep 25 13:42:00 2011 From: lwn_07 at yahoo.com.cn (=?utf-8?B?5p2O5Y2r5aic?=) Date: Sun, 25 Sep 2011 19:42:00 +0800 (CST) Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? Message-ID: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> Dear all,   Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity?                                                                                                            Weina -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Sep 25 17:36:05 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sun, 25 Sep 2011 17:36:05 +0200 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> Message-ID: <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> Hi Weina, Yes, granger causality results will for sure change when you use different montages. When you replace each measurement (what you call 'mono-montage') with that measurement minus the average across the whole recording array (what you call 'average montage') the amount with which signals can be explained in terms of their own and the other signals' past will change as well. This most likely leads to 'granger causality' estimates which just reflect spurious interactions. Best wishes, Jan-Mathijs On Sep 25, 2011, at 1:42 PM, 李卫娜 wrote: > Dear all, > Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity? > > Weina > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sun Sep 25 18:19:25 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 25 Sep 2011 11:19:25 -0500 Subject: [FieldTrip] Filter settings (Fieldtrip vs Brainvision Message-ID: Mark, I don't have an answer to your problem, but I have noticed a similar issue with data from Neuroscan (like your data, mine seems more attenuated by the Fieldtrip filter than the Neuroscan one; here is a comparison using a 30Hz low-pass in Fieldtrip with the default options, versus 30Hz in Neuroscan with zero phase shift and 12 dB/oct: http://img685.imageshack.us/img685/5717/fieldtrippreprocessing.png). I'd also be interested to hear if anyone on the list knows about what filter settings to adjust to replicate those settings. Best, Steve Politzer-Ahles > Message: 5 > Date: Fri, 23 Sep 2011 18:09:18 +0200 > From: Mark Noordenbos > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Filter settings (Fieldtrip vs Brainvision > Analyzer) > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear all, > > I analyzed some data using Brainvision Analyzer and would like to > re-analyze > the same data using Fieldtrip. However, the final results are a bit > different between Brainvision Analyzer and Fieldtrip. > The main difference is because of differences in filtering of the data > (without filtering the data is exactly the same). The filter in Fieldtrip > seems to be much 'stricter' and as a consequence the amplitude is almost > halved in the grandaverage! > > In Brainvision Analyzer I used the following filter setting: > > Butterworth Zero Phase Filters > Low Cutoff: 1.0000 Hz, Time constant 0.1592s, 24 dB/oct > High Cutoff: 30.0000 Hz, 24 dB/oct > Notch Filter: --- > > In Fieldtrip I used the following filter settings > > cfg.lpfilter = 'yes'; > cfg.hpfilter = 'yes'; > cfg.lpfreq = 30; > cfg.hpfreq = 1; > > cfg.lpfiltord = 6; > cfg.hpfiltord = 6; > > cfg.lpfiltdir = 'twopass'; > cfg.hpfiltdir = 'twopass'; > > Any suggestions for the Fieldtrip filter settings to resemble the > Brainvision Analyzer filter settings as much as possible? > > Best, > Mark > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110923/eccb307f/attachment.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: fieldtripvsbva.jpg > Type: image/jpeg > Size: 26475 bytes > Desc: not available > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110923/eccb307f/attachment.jpg > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 34 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwn_07 at yahoo.com.cn Sun Sep 25 19:48:24 2011 From: lwn_07 at yahoo.com.cn (lwn_07) Date: Mon, 26 Sep 2011 01:48:24 +0800 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> Message-ID: <396096E2-923B-48D7-9201-A041A4F22571@yahoo.com.cn> Thanks Jan-Mathijs. Does it mean if I selected my data segment from mono montage (reference to mastoid), i'd better calculate the granger causality in mono montage? Some paper selected Cz as reference, is that OK? Best regards. Weina 发自我的 iPad 在 2011-9-25,23:36,jan-mathijs schoffelen 写道: > Hi Weina, > > Yes, granger causality results will for sure change when you use different montages. When you replace each measurement (what you call 'mono-montage') with that measurement minus the average across the whole recording array (what you call 'average montage') the amount with which signals can be explained in terms of their own and the other signals' past will change as well. This most likely leads to 'granger causality' estimates which just reflect spurious interactions. > > Best wishes, > > Jan-Mathijs > > On Sep 25, 2011, at 1:42 PM, 李卫娜 wrote: > >> Dear all, >> Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity? >> >> Weina >> _______________________________________________ >> 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 > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwn_07 at yahoo.com.cn Sun Sep 25 19:41:01 2011 From: lwn_07 at yahoo.com.cn (lwn_07) Date: Mon, 26 Sep 2011 01:41:01 +0800 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> Message-ID: <89EA1B95-9876-42E4-9082-AAFB3AA79E7D@yahoo.com.cn> Thanks Jan-Mathijs. Does it mean if I selected my data segment from mono montage (reference to mastoid), i'd better calculate the granger causality in mono montage? Some paper selected Cz as reference, is that OK? Best regards. Weina 发自我的 iPad 在 2011-9-25,23:36,jan-mathijs schoffelen 写道: > Hi Weina, > > Yes, granger causality results will for sure change when you use different montages. When you replace each measurement (what you call 'mono-montage') with that measurement minus the average across the whole recording array (what you call 'average montage') the amount with which signals can be explained in terms of their own and the other signals' past will change as well. This most likely leads to 'granger causality' estimates which just reflect spurious interactions. > > Best wishes, > > J an-Mathijs > > On Sep 25, 2011, at 1:42 PM, 李卫娜 wrote: > >> Dear all, >> Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity? >> >> Weina >> _______________________________________________ >> 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 > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Sep 26 09:56:04 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 26 Sep 2011 09:56:04 +0200 Subject: [FieldTrip] ft_timelockstatistics > ftFuncMem=memtic(); In-Reply-To: References: Message-ID: Dear Leopold, The memtic()-function should be specified in a file in /utilities/memtic.m. This directory should be automatically added to your path by ft_defaults(), which is called by all main Fieldtrip functions. Could you let me know whether you see this file? If you do, could you explicitly run ft_defaults() and check whether 'which memtic' gives anything in return? (In short: this is an error in your path settings :) ) I cannot speculate on what your problems with cfg.design might be. Best, Eelke 2011/9/23 Zizlsperger Leopold : > Dear All, > as the ft_neighbourselection / ft_prepare_neighbours-scripts seem to changed in progress at the moment, I downloaded a today's version of FieldTrip. The new ft_timelockstatistics stops early: > > ??? Undefined function or variable 'memtic'. > Error in ==> ft_timelockstatistics at 69 > ftFuncMem   = memtic(); > > If I code it out, I experience problems with cfg.design I have not had before. > Any ideas ? > Thanks in advance > Best > Leopold > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From jm.horschig at donders.ru.nl Mon Sep 26 11:45:33 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 26 Sep 2011 11:45:33 +0200 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <396096E2-923B-48D7-9201-A041A4F22571@yahoo.com.cn> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> <396096E2-923B-48D7-9201-A041A4F22571@yahoo.com.cn> Message-ID: <4E8049BD.5060303@donders.ru.nl> Dear Weina, Basically, any montage will cause signal characteristics from the sensors used for re-referencing to show up in all other sensors. If you use a common average, the signal from any sensor will depend to some degree to any other sensor (because common average uses all sensors for rereferencing). If you use only Cz, you will obtain a high granger causality for any sensors to Cz. This would of course not reflect a real brain process, but is just the consequence of substracting the signal from Cz from all other sensors. Best would be to use a sensor that you will not include in computing granger causality (e.g. a mastoid, or choose Cz but then exclude this sensor for further analyses). Best, Jörn On 9/25/2011 7:48 PM, lwn_07 wrote: > Thanks Jan-Mathijs. Does it mean if I selected my data segment from > mono montage (reference to mastoid), i'd better calculate the granger > causality in mono montage? Some paper selected Cz as reference, is > that OK? > > Best regards. > Weina > > ???? iPad > > ? 2011-9-25,23:36,jan-mathijs schoffelen > ??: > >> Hi Weina, >> >> Yes, granger causality results will for sure change when you use >> different montages. When you replace each measurement (what you call >> 'mono-montage') with that measurement minus the average across the >> whole recording array (what you call 'average montage') the amount >> with which signals can be explained in terms of their own and the >> other signals' past will change as well. This most likely leads to >> 'granger causality' estimates which just reflect spurious interactions. >> >> Best wishes, >> >> Jan-Mathijs >> >> On Sep 25, 2011, at 1:42 PM, ??? wrote: >> >>> Dear all, >>> Is anyone knows about that wether different EEG motages (such as >>> mono-motage or average montage) have effect on the result of granger >>> connectivity? >>> >>> Weina >>> >>> _______________________________________________ >>> 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 >> 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 > > > _______________________________________________ > 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 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 Sep 26 14:22:56 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 26 Sep 2011 14:22:56 +0200 Subject: [FieldTrip] quick fieldtrip question In-Reply-To: <904336920.303800.1317039139308.JavaMail.root@monoceros.zimbra.ru.nl> References: <904336920.303800.1317039139308.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: Hi Tom, I'm forwarding my response, and your question, to the FieldTrip mailing list, so that anyone who in the future might wonder the same thing will benefit. BTW, if you're not subscribed to the list yet, you really should (see http://fieldtrip.fcdonders.nl/discussion_list for instructions). The easiest way to select channels to remove or retain is by using the cfg.channel option which is understood by ft_preprocessing: cfg = []; cfg.channel = {'chan1', 'chan2'}; % this will *keep* only those channels data = ft_preprocessing(cfg, data); or: cfg = []; cfg.channel = {'all', '-chan1', '-chan2'}; % this will *remove* those channels data = ft_preprocessing(cfg, data); For more information, type 'doc ft_channelselection' into Matlab, or see http://fieldtrip.fcdonders.nl/reference/ft_channelselection . Hope this helps! Best, Eelke 2011/9/26 Marshall, T.R. (Tom) : > Hi Eelke, > > So I have a very quick question about channel selection in fieldtrip. > > I want to plot a contrast of my tDCS and no-tDCS data. My problem is that I had to throw away a lot more channels in the tDCS condition than in the no-tDCS condition, so datasets comprise different channels. I spent a few minutes trying to write fiddly code to compare the entries in the 'labels' field of the data structure, but surely fieldtrip has some general purpose function just to keep some channels and throw away others? I can't find exactly this on the wiki... > > Hope you can help. Thanks in advance. > Tom > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > From t.marshall at fcdonders.ru.nl Mon Sep 26 14:58:57 2011 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Mon, 26 Sep 2011 14:58:57 +0200 (CEST) Subject: [FieldTrip] quick fieldtrip question In-Reply-To: <848633094.304972.1317041809855.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <930446316.305029.1317041937124.JavaMail.root@monoceros.zimbra.ru.nl> Thanks Eelke. This seems like what I want, but I can't seem to actually implement it. To provide a little more detail, what I currently have are two data sets on which I have performed frequency analysis. One of them has a bunch of channels missing that I had to throw out. Now I want to have a look at the difference between the two. Of course it only makes sense to do this for the channels that are common to both datasets. In order to do my subtraction, I have this: *** %find channels that exist in both datasets common_channels=tdcs_low{1}.label(ismember(tdcs_low{1}.label,notdcs_low{1}.label)); %throw away channels that are unique to the notdcs dataset cfg=[]; cfg.channels=common_channels; notdcs_fewer_channels{1}=ft_preprocessing(cfg,notdcs_low{1}); *** ...which gives the following error *** ??? Error using ==> ft_checkdata>freq2raw at 1583 this only works for dimord='rpt_chan_freq_time' Error in ==> ft_checkdata at 257 data = freq2raw(data); Error in ==> ft_preprocessing at 284 data = ft_checkdata(data, 'datatype', 'raw', 'hassampleinfo', 'yes'); *** In the above datasets, the 'dimord', looks like channels x frequencies x time. Not sure what 'rpt' stands for in the error message, nor why there should be a 4th dimension. Best, Tom ----- Original Message ----- From: "Eelke Spaak" To: "T.R. Marshall (Tom)" , "Email discussion list for the FieldTrip project" Sent: Monday, 26 September, 2011 2:22:56 PM Subject: Re: quick fieldtrip question Hi Tom, I'm forwarding my response, and your question, to the FieldTrip mailing list, so that anyone who in the future might wonder the same thing will benefit. BTW, if you're not subscribed to the list yet, you really should (see http://fieldtrip.fcdonders.nl/discussion_list for instructions). The easiest way to select channels to remove or retain is by using the cfg.channel option which is understood by ft_preprocessing: cfg = []; cfg.channel = {'chan1', 'chan2'}; % this will *keep* only those channels data = ft_preprocessing(cfg, data); or: cfg = []; cfg.channel = {'all', '-chan1', '-chan2'}; % this will *remove* those channels data = ft_preprocessing(cfg, data); For more information, type 'doc ft_channelselection' into Matlab, or see http://fieldtrip.fcdonders.nl/reference/ft_channelselection . Hope this helps! Best, Eelke 2011/9/26 Marshall, T.R. (Tom) : > Hi Eelke, > > So I have a very quick question about channel selection in fieldtrip. > > I want to plot a contrast of my tDCS and no-tDCS data. My problem is that I had to throw away a lot more channels in the tDCS condition than in the no-tDCS condition, so datasets comprise different channels. I spent a few minutes trying to write fiddly code to compare the entries in the 'labels' field of the data structure, but surely fieldtrip has some general purpose function just to keep some channels and throw away others? I can't find exactly this on the wiki... > > Hope you can help. Thanks in advance. > Tom > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands From luoj at mail.nih.gov Mon Sep 26 16:11:42 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Mon, 26 Sep 2011 10:11:42 -0400 Subject: [FieldTrip] creating new dataset In-Reply-To: <4E7EE19C.4040103@donders.ru.nl> References: , <4E7EE19C.4040103@donders.ru.nl> Message-ID: Thanks for your answer Jörn . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... Jessie ________________________________________ From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] Sent: Sunday, September 25, 2011 4:09 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] creating new dataset Hi Jessie, not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: You can also exclude channels or channel groups using the following syntax {'all', '-POz', '-Fp1', -EOG'} >From ft_preprocessing: If you are calling FT_PREPROCESSING with also the second input argument "data", then that should contain data that was already read from file in a previous call to FT_PREPROCESSING. In that case only the configuration options below apply. The channels that will be read and/or preprocessed are specified with cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), see FT_CHANNELSELECTION for details You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. Hope this all helps to what you are up to! Best, Jörn On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Hi, If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). Thanks, Jessie _______________________________________________ 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 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 jan.schoffelen at donders.ru.nl Mon Sep 26 16:26:14 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 26 Sep 2011 16:26:14 +0200 Subject: [FieldTrip] creating new dataset In-Reply-To: References: , <4E7EE19C.4040103@donders.ru.nl> Message-ID: <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> Hi Jessie, FieldTrip is not able to write back into the native 4D neuroimaging format. If you want to create a new dataset, you need to have a look at the software which is provided by the 4D neuroimaging company. Your requested functionality may either be a feature of one of the applications, or may be implemented in one of the command line utilities. You may want to look in the software documentation for this. Best wishes, Jan-Mathijs On Sep 26, 2011, at 4:11 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Thanks for your answer Jörn . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... > > Jessie > ________________________________________ > From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] > Sent: Sunday, September 25, 2011 4:09 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] creating new dataset > > Hi Jessie, > > not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: > > You can also exclude channels or channel groups using the following syntax > {'all', '-POz', '-Fp1', -EOG'} > > > > >> From ft_preprocessing: > > If you are calling FT_PREPROCESSING with also the second input argument > "data", then that should contain data that was already read from file in > a previous call to FT_PREPROCESSING. In that case only the configuration > options below apply. > > The channels that will be read and/or preprocessed are specified with > cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), > see FT_CHANNELSELECTION for details > > > You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. > > Hope this all helps to what you are up to! > Best, > Jörn > > On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > > Hi, > > If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). > > Thanks, > > Jessie > _______________________________________________ > 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 > > 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Mon Sep 26 16:59:07 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Mon, 26 Sep 2011 08:59:07 -0600 Subject: [FieldTrip] creating new dataset In-Reply-To: <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> References: , <4E7EE19C.4040103@donders.ru.nl> <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> Message-ID: <582930B5-8C7E-4578-8014-F30D36450B76@ucdenver.edu> Hi Jessie, If you wish to take a FieldTrip dataset back to the native 4D format, then it will not be trivial, but if you have the original data in 4D format, there is a potential solution in Eugene Kronberg's pdf4D matlab object code: http://biomag.wikidot.com/msi-matlab If you do not have the native 4D data, this will not work. Look at the duplicate and write_data_block methods. However, note that if you do duplicate the dataset, it will expect there to be as many channels in the new dataset as in the original. You would then have to delete those channels in the 4D MSI software using the deleter command. Or, alternatively, if you have a working copy of the MSI software, you can delete the channels in the original dataset within 4D, then use the duplicate method on that file, then write your data back to it using the write_data_block method. Feel free to contact me off list if you have questions. Best, Don On Sep 26, 2011, at 8:26 AM, jan-mathijs schoffelen wrote: Hi Jessie, FieldTrip is not able to write back into the native 4D neuroimaging format. If you want to create a new dataset, you need to have a look at the software which is provided by the 4D neuroimaging company. Your requested functionality may either be a feature of one of the applications, or may be implemented in one of the command line utilities. You may want to look in the software documentation for this. Best wishes, Jan-Mathijs On Sep 26, 2011, at 4:11 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Thanks for your answer Jörn . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... Jessie ________________________________________ From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] Sent: Sunday, September 25, 2011 4:09 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] creating new dataset Hi Jessie, not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: You can also exclude channels or channel groups using the following syntax {'all', '-POz', '-Fp1', -EOG'} >From ft_preprocessing: If you are calling FT_PREPROCESSING with also the second input argument "data", then that should contain data that was already read from file in a previous call to FT_PREPROCESSING. In that case only the configuration options below apply. The channels that will be read and/or preprocessed are specified with cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), see FT_CHANNELSELECTION for details You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. Hope this all helps to what you are up to! Best, Jörn On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Hi, If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). Thanks, Jessie _______________________________________________ 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 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University 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 eelke.spaak at donders.ru.nl Mon Sep 26 17:07:07 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 26 Sep 2011 17:07:07 +0200 Subject: [FieldTrip] quick fieldtrip question In-Reply-To: <930446316.305029.1317041937124.JavaMail.root@monoceros.zimbra.ru.nl> References: <848633094.304972.1317041809855.JavaMail.root@monoceros.zimbra.ru.nl> <930446316.305029.1317041937124.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: Hi Tom, ft_preprocessing will try to convert your data structure into raw data before applying any preprocessing (which includes channel selection). Since you are providing output of ft_freqanalysis ('freq structures') as input, this will fail if the dimensionality of the freq data indicates that this would not make sense. You'll probably want to have a look at the ft_selectdata function, which also supports selecting subregions of freq/timelock structures, rather than only raw data: goodchans = intersect(freq1.label, freq2.label); freq1 = ft_selectdata(freq1, 'channel', goodchans); freq2 = ft_selectdata(freq2, 'channel', goodchans); Note by the way the use of Matlab's builtin 'intersect' function, which you will probably also find useful :) If the ft_selectdata approach fails, you might also take a look at the low-level fieldtrip utility function 'match_str'. Good luck, Eelke 2011/9/26 Marshall, T.R. (Tom) : > Thanks Eelke. This seems like what I want, but I can't seem to actually implement it. > > To provide a little more detail, what I currently have are two data sets on which I have performed frequency analysis. One of them has a bunch of channels missing that I had to throw out. Now I want to have a look at the difference between the two. Of course it only makes sense to do this for the channels that are common to both datasets. > > In order to do my subtraction, I have this: > > *** > %find channels that exist in both datasets > common_channels=tdcs_low{1}.label(ismember(tdcs_low{1}.label,notdcs_low{1}.label)); > > %throw away channels that are unique to the notdcs dataset > cfg=[]; > cfg.channels=common_channels; > > notdcs_fewer_channels{1}=ft_preprocessing(cfg,notdcs_low{1}); > *** > > ...which gives the following error > > *** > ??? Error using ==> ft_checkdata>freq2raw at 1583 > this only works for dimord='rpt_chan_freq_time' > > Error in ==> ft_checkdata at 257 >        data = freq2raw(data); > > Error in ==> ft_preprocessing at 284 >  data = ft_checkdata(data, 'datatype', 'raw', 'hassampleinfo', 'yes'); > *** > > In the above datasets, the 'dimord', looks like channels x frequencies x time. Not sure what 'rpt' stands for in the error message, nor why there should be a 4th dimension. > > Best, > Tom > > ----- Original Message ----- > From: "Eelke Spaak" > To: "T.R. Marshall (Tom)" , "Email discussion list for the FieldTrip project" > Sent: Monday, 26 September, 2011 2:22:56 PM > Subject: Re: quick fieldtrip question > > Hi Tom, > > I'm forwarding my response, and your question, to the FieldTrip > mailing list, so that anyone who in the future might wonder the same > thing will benefit. BTW, if you're not subscribed to the list yet, you > really should (see http://fieldtrip.fcdonders.nl/discussion_list for > instructions). > > The easiest way to select channels to remove or retain is by using the > cfg.channel option which is understood by ft_preprocessing: > > cfg = []; > cfg.channel = {'chan1', 'chan2'}; % this will *keep* only those channels > data = ft_preprocessing(cfg, data); > > or: > > cfg = []; > cfg.channel = {'all', '-chan1', '-chan2'}; % this will *remove* those channels > data = ft_preprocessing(cfg, data); > > For more information, type 'doc ft_channelselection' into Matlab, or > see http://fieldtrip.fcdonders.nl/reference/ft_channelselection . > > Hope this helps! > > Best, > Eelke > > > 2011/9/26 Marshall, T.R. (Tom) : >> Hi Eelke, >> >> So I have a very quick question about channel selection in fieldtrip. >> >> I want to plot a contrast of my tDCS and no-tDCS data. My problem is that I had to throw away a lot more channels in the tDCS condition than in the no-tDCS condition, so datasets comprise different channels. I spent a few minutes trying to write fiddly code to compare the entries in the 'labels' field of the data structure, but surely fieldtrip has some general purpose function just to keep some channels and throw away others? I can't find exactly this on the wiki... >> >> Hope you can help. Thanks in advance. >> Tom >> >> -- >> Tom Marshall, MSc. >> Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging >> tel: +31(0)243668487 >> email: t.marshall at fcdonders.ru.nl >> postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands >> visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands >> > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From lwn_07 at yahoo.com.cn Mon Sep 26 18:00:28 2011 From: lwn_07 at yahoo.com.cn (lwn_07) Date: Tue, 27 Sep 2011 00:00:28 +0800 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <4E8049BD.5060303@donders.ru.nl> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> <396096E2-923B-48D7-9201-A041A4F22571@yahoo.com.cn> <4E8049BD.5060303@donders.ru.nl> Message-ID: <8A2201D5-3F98-4715-8ED1-DFA8780141D1@yahoo.com.cn> Dear Jörn, Thanks for you helping. Weina 在 2011-9-26,17:45,"Jörn M. Horschig" 写道: > Dear Weina, > > Basically, any montage will cause signal characteristics from the sensors used for re-referencing to show up in all other sensors. If you use a common average, the signal from any sensor will depend to some degree to any other sensor (because common average uses all sensors for rereferencing). If you use only Cz, you will obtain a high granger causality for any sensors to Cz. This would of course not reflect a real brain process, but is just the consequence of substracting the signal from Cz from all other sensors. Best would be to use a sensor that you will not include in computing granger causality (e.g. a mastoid, or choose Cz but then exclude this sensor for further analyses). > > Best, > Jörn > > On 9/25/2011 7:48 PM, lwn_07 wrote: >> >> Thanks Jan-Mathijs. Does it mean if I selected my data segment from mono montage (reference to mastoid), i'd better calculate the granger causality in mono montage? Some paper selected Cz as reference, is that OK? >> >> Best regards. >> Weina >> >> 发自我的 iPad >> >> 在 2011-9-25,23:36,jan-mathijs schoffelen 写道: >> >>> Hi Weina, >>> >>> Yes, granger causality results will for sure change when you use different montages. When you replace each measurement (what you call 'mono-montage') with that measurement minus the average across the whole recording array (what you call 'average montage') the amount with which signals can be explained in terms of their own and the other signals' past will change as well. This most likely leads to 'granger causality' estimates which just reflect spurious interactions. >>> >>> Best wishes, >>> >>> Jan-Mathijs >>> >>> On Sep 25, 2011, at 1:42 PM, 李卫娜 wrote: >>> >>>> Dear all, >>>> Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity? >>>> >>>> Weina >>>> _______________________________________________ >>>> 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 >>> 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 >> >> >> _______________________________________________ >> 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 > > 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 BelluscB at ninds.nih.gov Mon Sep 26 21:17:04 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Mon, 26 Sep 2011 15:17:04 -0400 Subject: [FieldTrip] mne vs lcmv methods Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CCCF@NIHMLBX10.nih.gov> Hi fellow Fieldtripers- I am learning about the pros & cons of different methods for source localization. For some of my data sets, I want to localize evoked activity (ERFs). In one of them, I anticipated a single unilateral primary site of activation and MNE worked very nicely for this. In the second, I am using auditory stimuli and therefore anticipated bilaterally synchronous activity. As was to be expected, (I think) MNE gave a single site of activity near the midline. I tried a parallel approach, but specifying lcmv as the method for ft_sourceanalysis as follows: cfg = []; cfg.method = 'lcmv'; cfg.grid = leadfield_02_stim1; cfg.vol = vol; cfg.lambda = 1e8; cfg.checksize = inf; %I've been inserting this and the next line because I've gotten error messages about the size. This didn't happen before, but these lines avoid the problem cfg.checkconfig ='loose'; source3CB24_02_stim1 = ft_sourceanalysis(cfg, tlkCB24_02_stim1) The output has a time dimension 1x601, and a pos dimension of 8196x3 dimension, but the avg.pow is only 1x8196. I interpret this to mean that the analysis averaged the power over some time interval instead of computing the power in each leadfield position for each time point. When I use the mne method, the output is clearly power for each time point, and produces a beautiful movie, as indicated in the tutorial. My questions about the lcmv technique are: 1. Is there a fundamental difference between the lcmv approach and the mne approach whereby it cannot compute the power at each time point, but only gives a single average value for a time period? 2. If so, how do I specify the time interval of interest (ie that containing the main peak of the ERF) in ft_sourceanalysis? 3. I thought one advantage of either MNE or LCMV was that I could indicate my a priori hypothesis of the anticipated localization of the source activity. Do I do this with cfg.grid? Is there a way to indicate the number of anticipated dipoles? Thanks in advance for your help- Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at yahoo.com Mon Sep 26 23:42:04 2011 From: alotof_xd at yahoo.com (alotof eve) Date: Mon, 26 Sep 2011 14:42:04 -0700 (PDT) Subject: [FieldTrip] creating new dataset In-Reply-To: <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> References: , <4E7EE19C.4040103@donders.ru.nl> <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> Message-ID: <1317073324.13127.YahooMailNeo@web125514.mail.ne1.yahoo.com> Is that possible to create a new dataset based on pre-processed 4D neuroimaging dataset by FieldTrip? I mean, such as re-write average results data like in EEGLab? ________________________________ From: jan-mathijs schoffelen To: Email discussion list for the FieldTrip project Sent: Monday, September 26, 2011 7:26 AM Subject: Re: [FieldTrip] creating new dataset Hi Jessie, FieldTrip is not able to write back into the native 4D neuroimaging format. If you want to create a new dataset, you need to have a look at the software which is provided by the 4D neuroimaging company. Your requested functionality may either be a feature of one of the applications, or may be implemented in one of the command line utilities. You may want to look in the software documentation for this. Best wishes, Jan-Mathijs On Sep 26, 2011, at 4:11 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Thanks for your answer Jörn  . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... > >Jessie >________________________________________ >From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] >Sent: Sunday, September 25, 2011 4:09 AM >To: Email discussion list for the FieldTrip project >Subject: Re: [FieldTrip] creating new dataset > >Hi Jessie, > >not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: > >You can also exclude channels or channel groups using the following syntax >   {'all', '-POz', '-Fp1', -EOG'} > > > > > >From ft_preprocessing: >> >If you are calling FT_PREPROCESSING with also the second input argument > "data", then that should contain data that was already read from file in > a previous call to FT_PREPROCESSING. In that case only the configuration > options below apply. > > The channels that will be read and/or preprocessed are specified with >   cfg.channel      = Nx1 cell-array with selection of channels (default = 'all'), >                      see FT_CHANNELSELECTION for details > > >You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. > >Hope this all helps to what you are up to! >Best, >Jörn > >On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > >Hi, > >If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset  without those channels (not by defining them using the ft_... in fieldtrip). > >Thanks, > >Jessie >_______________________________________________ >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 > >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 > Jan-Mathijs Schoffelen, MD PhD  Donders Institute for Brain, Cognition and Behaviour,  Centre for Cognitive Neuroimaging, Radboud University 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Tue Sep 27 08:51:44 2011 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 27 Sep 2011 08:51:44 +0200 Subject: [FieldTrip] Fwd: source localization difficulties References: Message-ID: Begin forwarded message: > From: Kanal Eliezer > Date: September 26, 2011 9:45:00 PM GMT+02:00 > To: jan-mathijs schoffelen > Subject: Re: [FieldTrip] source localization difficulties > > Hello Dr Schoffelen - > > Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. > > However, it seems that there's another related issue. When running the > ft_plot_sens(data_preprocessed.hdr.grad); > hold on; > ft_plot_vol(vol); > check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. > > In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: > mri_realign.coordsys = 'ctf'; > That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. > > Any help would be most appreciated! Thanks - > > Elli > > > > > On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: > >> Hi Elli, >> >>> Hello Dr. Schoffelen - >>> >>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>> >>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >> >> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >> >>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >> >> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >> >>> Thanks - >>> >>> Eliezer Kanal >> >> >> Best, >> >> Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: check.jpg Type: image/jpg Size: 23087 bytes Desc: not available URL: From ekanal at cmu.edu Tue Sep 27 14:50:29 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 27 Sep 2011 08:50:29 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: References: Message-ID: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> Thanks for forwarding the message to the list. Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - Elli -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: > > > Begin forwarded message: > >> From: Kanal Eliezer >> Date: September 26, 2011 9:45:00 PM GMT+02:00 >> To: jan-mathijs schoffelen >> Subject: Re: [FieldTrip] source localization difficulties >> >> Hello Dr Schoffelen - >> >> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >> >> However, it seems that there's another related issue. When running the >> ft_plot_sens(data_preprocessed.hdr.grad); >> hold on; >> ft_plot_vol(vol); >> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >> >> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >> mri_realign.coordsys = 'ctf'; >> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >> >> Any help would be most appreciated! Thanks - >> >> Elli >> >> >> >> >> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >> >>> Hi Elli, >>> >>>> Hello Dr. Schoffelen - >>>> >>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>> >>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>> >>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>> >>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>> >>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>> >>>> Thanks - >>>> >>>> Eliezer Kanal >>> >>> >>> Best, >>> >>> Jan-Mathijs > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University 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 BelluscB at ninds.nih.gov Tue Sep 27 15:35:33 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Tue, 27 Sep 2011 09:35:33 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> Elli- I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. Hope this helps. Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -----Original Message----- From: Kanal Eliezer [mailto:ekanal at cmu.edu] Sent: Tuesday, September 27, 2011 8:50 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Fwd: source localization difficulties Thanks for forwarding the message to the list. Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - Elli -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: > > > Begin forwarded message: > >> From: Kanal Eliezer >> Date: September 26, 2011 9:45:00 PM GMT+02:00 >> To: jan-mathijs schoffelen >> Subject: Re: [FieldTrip] source localization difficulties >> >> Hello Dr Schoffelen - >> >> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >> >> However, it seems that there's another related issue. When running the >> ft_plot_sens(data_preprocessed.hdr.grad); >> hold on; >> ft_plot_vol(vol); >> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >> >> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >> mri_realign.coordsys = 'ctf'; >> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >> >> Any help would be most appreciated! Thanks - >> >> Elli >> >> >> >> >> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >> >>> Hi Elli, >>> >>>> Hello Dr. Schoffelen - >>>> >>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>> >>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>> >>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>> >>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>> >>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>> >>>> Thanks - >>>> >>>> Eliezer Kanal >>> >>> >>> Best, >>> >>> Jan-Mathijs > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University 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 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From albenin at mail.ru Tue Sep 27 17:23:53 2011 From: albenin at mail.ru (=?UTF-8?B?0JDQu9C10LrRgdC10Lkg0JHQtdC90LjQvQ==?=) Date: Tue, 27 Sep 2011 19:23:53 +0400 Subject: [FieldTrip] =?utf-8?q?parametric_statistics?= Message-ID: Hello! I need to perform t-test analysis between 2 categories through all subjects for each channel (in time-frequency domain) and I was unlucky to find this function in FiledTrip. So, could you please tell me if it is possible and how to perform this analysis. Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mscharinger at cbs.mpg.de Tue Sep 27 18:19:10 2011 From: mscharinger at cbs.mpg.de (Mathias Scharinger) Date: Tue, 27 Sep 2011 18:19:10 +0200 Subject: [FieldTrip] Trigger Detection in Yokogawa Data Message-ID: <4FD792CD-FFA5-4C86-9665-1FB42D847CAF@cbs.mpg.de> Dear all, I keep having problems with extracting triggers from Yokogawa Data (.sqd files). Usually, triggers are defined by clearly defined flanks, sent on channels 162-169, and code the occurrence of specific events/stimuli. Following the steps on the wiki, the problem is this line: event = ft_read_event(cfg.dataset,'trigindx',169,'threshold',1e3,'detectflank','up'); After determining the threshold from one trigger line, the above line would yield VERY different numbers on trigger lines that should be identical. If compared to the trigger extraction achieved by temp = sqdread(sourceFile,'Channels',triggerlines(tnum)); trigs = find((diff(temp))>1000); from the Jonathan Simon/Dan Hertz toolbox (http://www.isr.umd.edu/Labs/CSSL/simonlab/Resources.html) the ft_read_event method is always off by more than 5 trial, i.e. it is impossible to extract the correct number of trials by setting the threshold to one fixed value. My question is now: Could the two above lines somehow be implemented in the my_trial_fun file? The above line gives (for trigs) the following structure: trigs = 19 x 1 matrix (for a demo file called R1315test.sqd that I am willing to share) with the time points of the corresponding trigger line (here: 162). Or could the ft_read_event function use the sqdread algorithm somehow? I am not sure what causes the discrepancies with ft_read_event. Thanks for any help, Mathias ---------------------------------------------------------- Mathias Scharinger (PhD) Auditory Cognition Research Group Max Planck Institute for Human Cognitive & Brain Sciences Stephanstr. 1A - 04103 Leipzig, Germany Tel.: +49 (0) 341-9940-2482 From ekanal at cmu.edu Tue Sep 27 19:40:31 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 27 Sep 2011 13:40:31 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> Message-ID: <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> Hello Beth - I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - Elli On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: > Elli- > I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. > Hope this helps. > Beth. > > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > > > -----Original Message----- > From: Kanal Eliezer [mailto:ekanal at cmu.edu] > Sent: Tuesday, September 27, 2011 8:50 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Fwd: source localization difficulties > > Thanks for forwarding the message to the list. > > Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - > > Elli > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: > >> >> >> Begin forwarded message: >> >>> From: Kanal Eliezer >>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>> To: jan-mathijs schoffelen >>> Subject: Re: [FieldTrip] source localization difficulties >>> >>> Hello Dr Schoffelen - >>> >>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>> >>> However, it seems that there's another related issue. When running the >>> ft_plot_sens(data_preprocessed.hdr.grad); >>> hold on; >>> ft_plot_vol(vol); >>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>> >>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>> mri_realign.coordsys = 'ctf'; >>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>> >>> Any help would be most appreciated! Thanks - >>> >>> Elli >>> >>> >>> >>> >>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>> >>>> Hi Elli, >>>> >>>>> Hello Dr. Schoffelen - >>>>> >>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>> >>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>> >>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>> >>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>> >>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>> >>>>> Thanks - >>>>> >>>>> Eliezer Kanal >>>> >>>> >>>> Best, >>>> >>>> Jan-Mathijs >> >> Jan-Mathijs Schoffelen, MD PhD >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University 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 > > > _______________________________________________ > 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 BelluscB at ninds.nih.gov Tue Sep 27 20:14:35 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Tue, 27 Sep 2011 14:14:35 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. Beth. -----Original Message----- From: Kanal Eliezer [mailto:ekanal at cmu.edu] Sent: Tuesday, September 27, 2011 1:41 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Fwd: source localization difficulties Hello Beth - I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - Elli On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: > Elli- > I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. > Hope this helps. > Beth. > > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > > > -----Original Message----- > From: Kanal Eliezer [mailto:ekanal at cmu.edu] > Sent: Tuesday, September 27, 2011 8:50 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Fwd: source localization difficulties > > Thanks for forwarding the message to the list. > > Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - > > Elli > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: > >> >> >> Begin forwarded message: >> >>> From: Kanal Eliezer >>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>> To: jan-mathijs schoffelen >>> Subject: Re: [FieldTrip] source localization difficulties >>> >>> Hello Dr Schoffelen - >>> >>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>> >>> However, it seems that there's another related issue. When running the >>> ft_plot_sens(data_preprocessed.hdr.grad); >>> hold on; >>> ft_plot_vol(vol); >>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>> >>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>> mri_realign.coordsys = 'ctf'; >>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>> >>> Any help would be most appreciated! Thanks - >>> >>> Elli >>> >>> >>> >>> >>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>> >>>> Hi Elli, >>>> >>>>> Hello Dr. Schoffelen - >>>>> >>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>> >>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>> >>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>> >>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>> >>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>> >>>>> Thanks - >>>>> >>>>> Eliezer Kanal >>>> >>>> >>>> Best, >>>> >>>> Jan-Mathijs >> >> Jan-Mathijs Schoffelen, MD PhD >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From ekanal at cmu.edu Tue Sep 27 21:23:57 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 27 Sep 2011 15:23:57 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> Message-ID: Unfortunately, it looks like redoing the alignment didn't help. I re-ran `ft_volumerealign` in interactive, and it did add the correct field to the output structure, but the brain is still facing the wrong way. Is it possible that FieldTrip is ignoring this field when plotting? The plotting functions are pretty complex, and are even more obfuscated than usual due to all the transforms used in aligning everything, so I don't want to try to troubleshoot this one myself since I'd almost certainly find the wrong thing. In the end, I fixed the problem by simply taking vol.bnd.pnt and vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, this is a workaround rather than a direct fix. Still, if anyone else has this problem, I'm attaching the code below... it seems to have worked. Elli ~~~ tmp = vol; % transform to spherical coords [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... = cart2sph( ... tmp.bnd.pnt(:,1), ... tmp.bnd.pnt(:,2), ... tmp.bnd.pnt(:,3) ); [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... = cart2sph( ... tmp.bnd.tri(:,1), ... tmp.bnd.tri(:,2), ... tmp.bnd.tri(:,3) ); % rotate as necessary tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; % transform back to cartesian [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... = sph2cart( ... tmp.bnd.pnt(:,1), ... tmp.bnd.pnt(:,2), ... tmp.bnd.pnt(:,3) ); [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... = cart2sph( ... tmp.bnd.tri(:,1), ... tmp.bnd.tri(:,2), ... tmp.bnd.tri(:,3) ); vol = tmp; On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. > Beth. > > -----Original Message----- > From: Kanal Eliezer [mailto:ekanal at cmu.edu] > Sent: Tuesday, September 27, 2011 1:41 PM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Fwd: source localization difficulties > > Hello Beth - > > I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - > > Elli > > > On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: > >> Elli- >> I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. >> Hope this helps. >> Beth. >> >> >> Beth Belluscio MD-PhD >> Clinical Fellow >> Human Motor Control Section >> NINDS, NIH >> 301-402-3495 >> >> >> >> -----Original Message----- >> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >> Sent: Tuesday, September 27, 2011 8:50 AM >> To: Email discussion list for the FieldTrip project >> Subject: Re: [FieldTrip] Fwd: source localization difficulties >> >> Thanks for forwarding the message to the list. >> >> Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - >> >> Elli >> >> >> -------------------- >> Eliezer Kanal, Ph.D. >> Postdoctoral Fellow >> Center for the Neural Basis of Cognition >> Carnegie Mellon University >> 4400 Fifth Ave, Suite 110A >> Pittsburgh PA 15213 >> P: 412-268-4115 >> F: 412-268-5060 >> >> >> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >> >>> >>> >>> Begin forwarded message: >>> >>>> From: Kanal Eliezer >>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>> To: jan-mathijs schoffelen >>>> Subject: Re: [FieldTrip] source localization difficulties >>>> >>>> Hello Dr Schoffelen - >>>> >>>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>>> >>>> However, it seems that there's another related issue. When running the >>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>> hold on; >>>> ft_plot_vol(vol); >>>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>>> >>>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>>> mri_realign.coordsys = 'ctf'; >>>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>>> >>>> Any help would be most appreciated! Thanks - >>>> >>>> Elli >>>> >>>> >>>> >>>> >>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>> >>>>> Hi Elli, >>>>> >>>>>> Hello Dr. Schoffelen - >>>>>> >>>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>>> >>>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>>> >>>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>>> >>>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>>> >>>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>>> >>>>>> Thanks - >>>>>> >>>>>> Eliezer Kanal >>>>> >>>>> >>>>> Best, >>>>> >>>>> Jan-Mathijs >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University 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 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From ekanal at cmu.edu Tue Sep 27 21:34:57 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 27 Sep 2011 15:34:57 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <16149_1317151503_p8RJP2Rh020523_BDAA1CF9-9027-4F2C-ACE5-9CDDAB1673C7@cmu.edu> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> <16149_1317151503_p8RJP2Rh020523_BDAA1CF9-9027-4F2C-ACE5-9CDDAB1673C7@cmu.edu> Message-ID: <0535E384-0918-4D9A-97F7-EA07635C4699@cmu.edu> Addendum to previous email, the code was incorrect; `vol.bnd.tri` should not be rotated. Fixed code below. Elli ~~~~~~ tmp = vol; % transform to spherical coords [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... = cart2sph( ... tmp.bnd.pnt(:,1), ... tmp.bnd.pnt(:,2), ... tmp.bnd.pnt(:,3) ); % rotate as necessary tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; % transform back to cartesian [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... = sph2cart( ... tmp.bnd.pnt(:,1), ... tmp.bnd.pnt(:,2), ... tmp.bnd.pnt(:,3) ); vol = tmp; On Sep 27, 2011, at 3:23 PM, Kanal Eliezer wrote: > Unfortunately, it looks like redoing the alignment didn't help. I re-ran `ft_volumerealign` in interactive, and it did add the correct field to the output structure, but the brain is still facing the wrong way. > > Is it possible that FieldTrip is ignoring this field when plotting? The plotting functions are pretty complex, and are even more obfuscated than usual due to all the transforms used in aligning everything, so I don't want to try to troubleshoot this one myself since I'd almost certainly find the wrong thing. > > In the end, I fixed the problem by simply taking vol.bnd.pnt and vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, this is a workaround rather than a direct fix. Still, if anyone else has this problem, I'm attaching the code below... it seems to have worked. > > Elli > > ~~~ > > tmp = vol; > > % transform to spherical coords > [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... > = cart2sph( ... > tmp.bnd.pnt(:,1), ... > tmp.bnd.pnt(:,2), ... > tmp.bnd.pnt(:,3) ); > > % rotate as necessary > tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; > > % transform back to cartesian > [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... > = sph2cart( ... > tmp.bnd.pnt(:,1), ... > tmp.bnd.pnt(:,2), ... > tmp.bnd.pnt(:,3) ); > > vol = tmp; > > > > On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > >> OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. >> Beth. >> >> -----Original Message----- >> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >> Sent: Tuesday, September 27, 2011 1:41 PM >> To: Email discussion list for the FieldTrip project >> Subject: Re: [FieldTrip] Fwd: source localization difficulties >> >> Hello Beth - >> >> I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - >> >> Elli >> >> >> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >> >>> Elli- >>> I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. >>> Hope this helps. >>> Beth. >>> >>> >>> Beth Belluscio MD-PhD >>> Clinical Fellow >>> Human Motor Control Section >>> NINDS, NIH >>> 301-402-3495 >>> >>> >>> >>> -----Original Message----- >>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>> Sent: Tuesday, September 27, 2011 8:50 AM >>> To: Email discussion list for the FieldTrip project >>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>> >>> Thanks for forwarding the message to the list. >>> >>> Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - >>> >>> Elli >>> >>> >>> -------------------- >>> Eliezer Kanal, Ph.D. >>> Postdoctoral Fellow >>> Center for the Neural Basis of Cognition >>> Carnegie Mellon University >>> 4400 Fifth Ave, Suite 110A >>> Pittsburgh PA 15213 >>> P: 412-268-4115 >>> F: 412-268-5060 >>> >>> >>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>> >>>> >>>> >>>> Begin forwarded message: >>>> >>>>> From: Kanal Eliezer >>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>> To: jan-mathijs schoffelen >>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>> >>>>> Hello Dr Schoffelen - >>>>> >>>>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>>>> >>>>> However, it seems that there's another related issue. When running the >>>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>>> hold on; >>>>> ft_plot_vol(vol); >>>>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>>>> >>>>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>>>> mri_realign.coordsys = 'ctf'; >>>>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>>>> >>>>> Any help would be most appreciated! Thanks - >>>>> >>>>> Elli >>>>> >>>>> >>>>> >>>>> >>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>> >>>>>> Hi Elli, >>>>>> >>>>>>> Hello Dr. Schoffelen - >>>>>>> >>>>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>>>> >>>>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>>>> >>>>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>>>> >>>>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>>>> >>>>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>>>> >>>>>>> Thanks - >>>>>>> >>>>>>> Eliezer Kanal >>>>>> >>>>>> >>>>>> Best, >>>>>> >>>>>> Jan-Mathijs >>>> >>>> Jan-Mathijs Schoffelen, MD PhD >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University 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 >>> >>> >>> _______________________________________________ >>> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Caroline.Lustenberger at kispi.uzh.ch Wed Sep 28 10:46:16 2011 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Wed, 28 Sep 2011 10:46:16 +0200 Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset Message-ID: <8D58B6880DD231469FA0128331363CED03DB01AB@exzh1.kispi.int> Dear all Using EEGlab I have calculated ITC and ERSP of 16 subjects of 1 channel and the frequency range 1-4Hz (in average), thus I have 2 data arrays: 1st Condition Sham: 16 x 185 --> 16=number of subjects, 185=timepoints with event-related spectral values or intertrial coherence values 2nd Condition Field: 16 x 185 To see if there is any difference between the 2 conditions in all timepoints I performed 185 paired t-tests and now I should control for multiple comparison using a cluster analysis (meaning find out the probability that a certain number of neighbour-timepoints are suprathreshold). Is there a possibility to do that using fieldtrip statistics? And how can I do that? Thank you very much for your help Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Sep 28 12:15:26 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 28 Sep 2011 12:15:26 +0200 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> Message-ID: Dear Elli, Your proposed fix is equivalent to swapping the first 2 columns in your tmp.bnd.pnt matrix, i.e. swapping the y and x axis. To me this seems that you can also alleviate this by specifying the proper cfg.coordsys prior to your call to ft_volumerealign. The idea is the following: by specifying the location of nasion/lpa/rpa a transformation matrix can be computed. This transformation matrix will assign the X,Y, and Z axes of the coordinate system. According to different conventions, the X-axis either goes anterior (leading to a 'ALS'-like coordinate system, e.g. used in the CTF-systems and 4D neuroimaging systems), or the X-axis goes to the right (leading to a 'RAS'-like coordinate system, e.g. used in the Neuromag system). This specification will have an effect on the transformation matrix only at the level of ft_volumerealign. Specifying the coordinate system later on (through ft_estimate_coordsys) only adds the field coordsys to the mri-structure, without affecting the transformation matrix. Adding the coordsys-field just gives an interpretation to the coordinate system (and thus to the transformation matrix). To summarize, I expect that your expectation of the coordinate system in which the sensors are expressed, don't coincide with the coordinate system in which (according to the transformation matrix in combination with the coordsys) the MRI is expressed. See for the different coordinate systems definitions: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined For your call to ft_volumerealign you need to specify cfg.coordsys = 'one of the meg-systems'. At the moment this at least works for 'ctf' and 'itab' as strings. These reflect the two major conventions, i.e. X-axis anterior, or X-axis to the right. To de-confuse it a bit, I will add the other MEG-systems also as supported strings. For the time being you can look up in the table in the linked web-page which one you need. I suspect it is 'itab', because the default is ctf-convention. Best wishes, Jan-Mathijs On Sep 27, 2011, at 9:23 PM, Kanal Eliezer wrote: > Unfortunately, it looks like redoing the alignment didn't help. I re-ran `ft_volumerealign` in interactive, and it did add the correct field to the output structure, but the brain is still facing the wrong way. > > Is it possible that FieldTrip is ignoring this field when plotting? The plotting functions are pretty complex, and are even more obfuscated than usual due to all the transforms used in aligning everything, so I don't want to try to troubleshoot this one myself since I'd almost certainly find the wrong thing. > > In the end, I fixed the problem by simply taking vol.bnd.pnt and vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, this is a workaround rather than a direct fix. Still, if anyone else has this problem, I'm attaching the code below... it seems to have worked. > > Elli > > ~~~ > > tmp = vol; > > % transform to spherical coords > [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... > = cart2sph( ... > tmp.bnd.pnt(:,1), ... > tmp.bnd.pnt(:,2), ... > tmp.bnd.pnt(:,3) ); > [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... > = cart2sph( ... > tmp.bnd.tri(:,1), ... > tmp.bnd.tri(:,2), ... > tmp.bnd.tri(:,3) ); > > % rotate as necessary > tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; > tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; > > % transform back to cartesian > [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... > = sph2cart( ... > tmp.bnd.pnt(:,1), ... > tmp.bnd.pnt(:,2), ... > tmp.bnd.pnt(:,3) ); > [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... > = cart2sph( ... > tmp.bnd.tri(:,1), ... > tmp.bnd.tri(:,2), ... > tmp.bnd.tri(:,3) ); > > vol = tmp; > > > > On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > >> OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. >> Beth. >> >> -----Original Message----- >> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >> Sent: Tuesday, September 27, 2011 1:41 PM >> To: Email discussion list for the FieldTrip project >> Subject: Re: [FieldTrip] Fwd: source localization difficulties >> >> Hello Beth - >> >> I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - >> >> Elli >> >> >> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >> >>> Elli- >>> I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. >>> Hope this helps. >>> Beth. >>> >>> >>> Beth Belluscio MD-PhD >>> Clinical Fellow >>> Human Motor Control Section >>> NINDS, NIH >>> 301-402-3495 >>> >>> >>> >>> -----Original Message----- >>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>> Sent: Tuesday, September 27, 2011 8:50 AM >>> To: Email discussion list for the FieldTrip project >>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>> >>> Thanks for forwarding the message to the list. >>> >>> Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - >>> >>> Elli >>> >>> >>> -------------------- >>> Eliezer Kanal, Ph.D. >>> Postdoctoral Fellow >>> Center for the Neural Basis of Cognition >>> Carnegie Mellon University >>> 4400 Fifth Ave, Suite 110A >>> Pittsburgh PA 15213 >>> P: 412-268-4115 >>> F: 412-268-5060 >>> >>> >>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>> >>>> >>>> >>>> Begin forwarded message: >>>> >>>>> From: Kanal Eliezer >>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>> To: jan-mathijs schoffelen >>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>> >>>>> Hello Dr Schoffelen - >>>>> >>>>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>>>> >>>>> However, it seems that there's another related issue. When running the >>>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>>> hold on; >>>>> ft_plot_vol(vol); >>>>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>>>> >>>>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>>>> mri_realign.coordsys = 'ctf'; >>>>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>>>> >>>>> Any help would be most appreciated! Thanks - >>>>> >>>>> Elli >>>>> >>>>> >>>>> >>>>> >>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>> >>>>>> Hi Elli, >>>>>> >>>>>>> Hello Dr. Schoffelen - >>>>>>> >>>>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>>>> >>>>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>>>> >>>>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>>>> >>>>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>>>> >>>>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>>>> >>>>>>> Thanks - >>>>>>> >>>>>>> Eliezer Kanal >>>>>> >>>>>> >>>>>> Best, >>>>>> >>>>>> Jan-Mathijs >>>> >>>> Jan-Mathijs Schoffelen, MD PhD >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University 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 >>> >>> >>> _______________________________________________ >>> 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 > > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From Lilla.Magyari at mpi.nl Wed Sep 28 13:08:21 2011 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Wed, 28 Sep 2011 13:08:21 +0200 Subject: [FieldTrip] mne vs lcmv methods In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C059826CCCF@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C059826CCCF@NIHMLBX10.nih.gov> Message-ID: <4E830025.1050407@mpi.nl> Hi Beth, I do not know how lcmv beamforming is implemented in FieldTrip, and I haven't used it before. But I did use the mne method for sourcelocalization in FieldTrip, so may I can answer some of your questions partially. But if someone is more expert in this area, comments are appreciated. Belluscio, Beth (NIH/NINDS) [E] wrote: > Hi fellow Fieldtripers- > > I am learning about the pros & cons of different methods for source > localization. For some of my data sets, I want to localize evoked > activity (ERFs). In one of them, I anticipated a single unilateral > primary site of activation and MNE worked very nicely for this. In the > second, I am using auditory stimuli and therefore anticipated > bilaterally synchronous activity. As was to be expected, (I think) MNE > gave a single site of activity near the midline. I tried a parallel > approach, but specifying lcmv as the method for ft_sourceanalysis as > follows: > > > > cfg = []; > > cfg.method = 'lcmv'; > > cfg.grid = leadfield_02_stim1; > > cfg.vol = vol; > > cfg.lambda = 1e8; > > cfg.checksize = inf; %I’ve been inserting this and the next line > because I’ve gotten error messages about the size. This didn’t happen > before, but these lines avoid the problem > > cfg.checkconfig ='loose'; > > source3CB24_02_stim1 = ft_sourceanalysis(cfg, tlkCB24_02_stim1) > > > > The output has a time dimension 1x601, and a pos dimension of 8196x3 > dimension, but the avg.pow is only 1x8196. I interpret this to mean > that the analysis averaged the power over some time interval instead of > computing the power in each leadfield position for each time point. > When I use the mne method, the output is clearly power for each time > point, and produces a beautiful movie, as indicated in the tutorial. > > > > My questions about the lcmv technique are: > > 1. Is there a fundamental difference between the lcmv approach and > the mne approach whereby it cannot compute the power at each time point, > but only gives a single average value for a time period? As far as I know, the mne approach (compared to other methods, like beamforming) is favored for calculating source estimates of evoked activity over time. Therefore, I am not surprised that the lcmv is not doing the computation over time. I found this a useful reading about the differences between beamforming and mne: Jensen, O., Hesse, C., 2010, Estimating distributed representation of evoked responses and oscillatory brain activity, In: MEG: An Introduction to Methods, ed. by Hansen, P., Kringelbach, M., Salmelin, R., doi:10.1093/acprof:oso/9780195307238.001.0001 > > 2. If so, how do I specify the time interval of interest (ie that > containing the main peak of the ERF) in ft_sourceanalysis? I would use ft_redefinetrial. This function can select only a segment of your trials. > 3. I thought one advantage of either MNE or LCMV was that I could > indicate my a priori hypothesis of the anticipated localization of the > source activity. Do I do this with cfg.grid? Is there a way to > indicate the number of anticipated dipoles? A dipole model presupposes indeed that the activation is coming from a small area or from multiple separate small areas, while the mne and the beamforming approach are providing a distributed representation of the neural activity. The minimum "a priori" assumption is that the underlying activation is coming from the brain. The brain volume is discretized onto a 3-dimensional grid (this is the cfg.grid). And the current is estimated at these grid locations. So, in this sense, yes, these grid points are your dipoles. Typically, you specify more thousands of these points. I hope this helps. Lilla Magyari > > > Thanks in advance for your help- > > Beth. > > > > Beth Belluscio MD-PhD > > Clinical Fellow > > Human Motor Control Section > > NINDS, NIH > > 301-402-3495 > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD student Language and Cognition Group research assistant Neurobiology of Language Group Max Planck Institute for Psycholinguistics Nijmegen, P.O. Box 310, 6500AH, the Netherlands Phone: 0031 24 3521561 From mscharinger at cbs.mpg.de Wed Sep 28 14:52:09 2011 From: mscharinger at cbs.mpg.de (Mathias Scharinger) Date: Wed, 28 Sep 2011 14:52:09 +0200 Subject: [FieldTrip] Trigger Detection in Yokogawa Data: Link to Test File In-Reply-To: <4FD792CD-FFA5-4C86-9665-1FB42D847CAF@cbs.mpg.de> References: <4FD792CD-FFA5-4C86-9665-1FB42D847CAF@cbs.mpg.de> Message-ID: Dear all, I posted a problem on the list yesterday and now have a link to the test sqd. file: http://dl.dropbox.com/u/19074278/R1315test.sqd The problem is summarized below: > > > I keep having problems with extracting triggers from Yokogawa Data (.sqd files). Usually, triggers are defined by clearly defined flanks, sent on channels 162-169, and code the occurrence of specific events/stimuli. > > Following the steps on the wiki, the problem is this line: > > event = ft_read_event(cfg.dataset,'trigindx',169,'threshold',1e3,'detectflank','up'); > > After determining the threshold from one trigger line, the above line would yield VERY different numbers on trigger lines that should be identical. If compared to the trigger extraction achieved by > > temp = sqdread(sourceFile,'Channels',triggerlines(tnum)); > trigs = find((diff(temp))>1000); > > from the Jonathan Simon/Dan Hertz toolbox (http://www.isr.umd.edu/Labs/CSSL/simonlab/Resources.html) > > the ft_read_event method is always off by more than 5 trial, i.e. it is impossible to extract the correct number of trials by setting the threshold to one fixed value. > > My question is now: > Could the two above lines somehow be implemented in the my_trial_fun file? > > The above line gives (for trigs) the following structure: > > trigs = 19 x 1 matrix (for a demo file called R1315test.sqd that I am willing to share) > with the time points of the corresponding trigger line (here: 162). > > Or could the ft_read_event function use the sqdread algorithm somehow? > I am not sure what causes the discrepancies with ft_read_event. > Thanks for any help, Mathias From politzerahless at gmail.com Wed Sep 28 16:36:47 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Wed, 28 Sep 2011 09:36:47 -0500 Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset Message-ID: Caroline, This should be possible (I recently did something very similar, although I was analysizing ERPs rather than ERSPs). First you need to export the data for each subject from EEGLAB to Fieldtrip using EEGLAB's function eeg2fieldtrip(); when I did this I specified the option 'timelockanalysis' to compute ERPs of the EEGLAB data, but in your case I guess you will want to use 'freqanalysis' instead. Then, you need to compute grand averages using ft_freqgrandaverage() with cfg.keepindividual='yes'. Then you will be ready to perform cluster statistics following the instructions at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq . Best, Steve Politzer-Ahles Message: 1 > Date: Wed, 28 Sep 2011 10:46:16 +0200 > From: "Lustenberger Caroline" > To: > Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of > an already existing dataset > Message-ID: <8D58B6880DD231469FA0128331363CED03DB01AB at exzh1.kispi.int> > Content-Type: text/plain; charset="us-ascii" > > Dear all > > Using EEGlab I have calculated ITC and ERSP of 16 subjects of 1 channel > and the frequency range 1-4Hz (in average), thus I have 2 data arrays: > > 1st Condition Sham: 16 x 185 --> 16=number of subjects, 185=timepoints > with event-related spectral values or intertrial coherence values > 2nd Condition Field: 16 x 185 > > To see if there is any difference between the 2 conditions in all > timepoints I performed 185 paired t-tests and now I should control for > multiple comparison using a cluster analysis (meaning find out the > probability that a certain number of neighbour-timepoints are > suprathreshold). > > Is there a possibility to do that using fieldtrip statistics? And how > can I do that? > > Thank you very much for your help > Caroline > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110928/a27bc4a9/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 44 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Wed Sep 28 17:38:35 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Wed, 28 Sep 2011 09:38:35 -0600 Subject: [FieldTrip] mne vs lcmv methods In-Reply-To: <4E830025.1050407@mpi.nl> References: <794DFDD3C128EF44AC49ADC58FD0090C059826CCCF@NIHMLBX10.nih.gov> <4E830025.1050407@mpi.nl> Message-ID: Dear Beth, I think we'd need to know more about your analysis input to answer questions about the dimensionality of the source outputs, but in general, the lcmv beamformer suffers from the same problems as other beamformers - that is, when you have the expectation of highly correlated sources, one or both of the sources will be suppressed, particularly when the time range for the data input to the beamformer is restricted to short intervals. Many papers have been written on this issue, and there are some attempts at solutions (e.g., see Brookes et al. 2006 Neuroimage). I do not believe that the lcmv or dics beamformers in FieldTrip have any such implementation for highly correlated sources, but I may be wrong. Since you want to reconstruct the sources of an auditory evoked field, in general a beamfomer will be a poor choice of methods for you. For simple, passive auditory stimulation, two-dipole models work very nicely. If you have the expectation of more complicated source arrangements because of some cognitive manipulation, then the cortically constrained MNE approach seems reasonable to me. All that said, the lcmv beamformer in Fieldtrip should be able to give you output at the same times as you input for analysis. The dics beamformer, as it is done in the frequency domain, not the time domain, will generally give you a single output. Also, to clarify something that might be misinterpreted from Lilla's answer to you, at some level (the forward solution) all of these models (single dipole, multiple dipole, cortically constrained mne, beamformer) are all reliant on the dipole model. Distributed models simply have many dipoles, which are fixed in location to either the vertices of the cortical surface tesselation, oriented normal to the surface, or in the case of a beamformer, typically done on a regularly spaced grid with either fixed or optimized source orientation (e.g., lcmv vs. sam). Best, Don On Sep 28, 2011, at 5:08 AM, Magyari, Lilla wrote: > Hi Beth, > > I do not know how lcmv beamforming is implemented in FieldTrip, and I > haven't used it before. But I did use the mne method for > sourcelocalization in FieldTrip, so may I can answer some of your > questions partially. But if someone is more expert in this area, > comments are appreciated. > > Belluscio, Beth (NIH/NINDS) [E] wrote: >> Hi fellow Fieldtripers- >> >> I am learning about the pros & cons of different methods for source >> localization. For some of my data sets, I want to localize evoked >> activity (ERFs). In one of them, I anticipated a single unilateral >> primary site of activation and MNE worked very nicely for this. In the >> second, I am using auditory stimuli and therefore anticipated >> bilaterally synchronous activity. As was to be expected, (I think) MNE >> gave a single site of activity near the midline. I tried a parallel >> approach, but specifying lcmv as the method for ft_sourceanalysis as >> follows: >> >> >> >> cfg = []; >> >> cfg.method = 'lcmv'; >> >> cfg.grid = leadfield_02_stim1; >> >> cfg.vol = vol; >> >> cfg.lambda = 1e8; >> >> cfg.checksize = inf; %I’ve been inserting this and the next line >> because I’ve gotten error messages about the size. This didn’t happen >> before, but these lines avoid the problem >> >> cfg.checkconfig ='loose'; >> >> source3CB24_02_stim1 = ft_sourceanalysis(cfg, tlkCB24_02_stim1) >> >> >> >> The output has a time dimension 1x601, and a pos dimension of 8196x3 >> dimension, but the avg.pow is only 1x8196. I interpret this to mean >> that the analysis averaged the power over some time interval instead of >> computing the power in each leadfield position for each time point. >> When I use the mne method, the output is clearly power for each time >> point, and produces a beautiful movie, as indicated in the tutorial. >> >> >> >> My questions about the lcmv technique are: >> >> 1. Is there a fundamental difference between the lcmv approach and >> the mne approach whereby it cannot compute the power at each time point, >> but only gives a single average value for a time period? > > As far as I know, the mne approach (compared to other methods, like > beamforming) is favored for calculating source estimates of evoked > activity over time. Therefore, I am not surprised that the lcmv is not > doing the computation over time. > I found this a useful reading about the differences between beamforming > and mne: > > Jensen, O., Hesse, C., 2010, Estimating distributed representation of > evoked responses and oscillatory brain activity, In: MEG: An > Introduction to Methods, ed. by Hansen, P., Kringelbach, M., Salmelin, > R., doi:10.1093/acprof:oso/9780195307238.001.0001 > >> >> 2. If so, how do I specify the time interval of interest (ie that >> containing the main peak of the ERF) in ft_sourceanalysis? > > I would use ft_redefinetrial. This function can select only a segment of > your trials. > >> 3. I thought one advantage of either MNE or LCMV was that I could >> indicate my a priori hypothesis of the anticipated localization of the >> source activity. Do I do this with cfg.grid? Is there a way to >> indicate the number of anticipated dipoles? > > A dipole model presupposes indeed that the activation is coming from a > small area or from multiple separate small areas, while the mne and the > beamforming approach are providing a distributed representation of the > neural activity. The minimum "a priori" assumption is that the > underlying activation is coming from the brain. The brain volume is > discretized onto a 3-dimensional grid (this is the cfg.grid). And the > current is estimated at these grid locations. So, in this sense, yes, > these grid points are your dipoles. Typically, you specify more > thousands of these points. > > I hope this helps. > > Lilla Magyari > > >> >> >> Thanks in advance for your help- >> >> Beth. >> >> >> >> Beth Belluscio MD-PhD >> >> Clinical Fellow >> >> Human Motor Control Section >> >> NINDS, NIH >> >> 301-402-3495 >> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > PhD student > Language and Cognition Group > research assistant > Neurobiology of Language Group > > Max Planck Institute for Psycholinguistics > Nijmegen, P.O. Box 310, 6500AH, the Netherlands > Phone: 0031 24 3521561 > > _______________________________________________ > 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 From Caroline.Lustenberger at kispi.uzh.ch Wed Sep 28 17:56:04 2011 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Wed, 28 Sep 2011 17:56:04 +0200 Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset In-Reply-To: Message-ID: <8D58B6880DD231469FA0128331363CED03DB01DB@exzh1.kispi.int> Dear Steve Thank you very much, I was able to calculate montecarlo statistics with the fieldtrip toolbox using eeglab data. Probably you can help me answering this question too: How can I define neighbour-timepoints, normally all tutorials explain how to define neighbour sensors or channels, but have only 1 channel and 185 timepoints. Thus, I want to perform cluster analysis to see whether a certain timepoint cluster is significant. Thanks again and best wishes Caroline ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Mittwoch, 28. September 2011 16:37 An: fieldtrip at donders.ru.nl Betreff: Re: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset Caroline, This should be possible (I recently did something very similar, although I was analysizing ERPs rather than ERSPs). First you need to export the data for each subject from EEGLAB to Fieldtrip using EEGLAB's function eeg2fieldtrip(); when I did this I specified the option 'timelockanalysis' to compute ERPs of the EEGLAB data, but in your case I guess you will want to use 'freqanalysis' instead. Then, you need to compute grand averages using ft_freqgrandaverage() with cfg.keepindividual='yes'. Then you will be ready to perform cluster statistics following the instructions at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq . Best, Steve Politzer-Ahles Message: 1 Date: Wed, 28 Sep 2011 10:46:16 +0200 From: "Lustenberger Caroline" To: Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset Message-ID: <8D58B6880DD231469FA0128331363CED03DB01AB at exzh1.kispi.int> Content-Type: text/plain; charset="us-ascii" Dear all Using EEGlab I have calculated ITC and ERSP of 16 subjects of 1 channel and the frequency range 1-4Hz (in average), thus I have 2 data arrays: 1st Condition Sham: 16 x 185 --> 16=number of subjects, 185=timepoints with event-related spectral values or intertrial coherence values 2nd Condition Field: 16 x 185 To see if there is any difference between the 2 conditions in all timepoints I performed 185 paired t-tests and now I should control for multiple comparison using a cluster analysis (meaning find out the probability that a certain number of neighbour-timepoints are suprathreshold). Is there a possibility to do that using fieldtrip statistics? And how can I do that? Thank you very much for your help Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 10, Issue 44 ***************************************** -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tim.Bardouille at nrc-cnrc.gc.ca Wed Sep 28 18:24:08 2011 From: Tim.Bardouille at nrc-cnrc.gc.ca (Bardouille, Tim) Date: Wed, 28 Sep 2011 09:24:08 -0700 Subject: [FieldTrip] MSc/PhD Positions at Dalhousie University Message-ID: Hello all, We are recruiting MSc and PhD students for a funded MEG study looking at neuronal connectivity and stroke recovery. Students will have the opportunity to undergo research through the Depts of Kinesiology or Psychology/Neuroscience at Dalhousie University in Halifax, Nova Scotia, Canada. This research project will capitalize on the spatiotemporal resolution of MEG to examine changes in connectivity within the sensorimotor network of individuals post-stroke. Specifically, the goal of this research is to ‘pave the road to post-stroke rehabilitation’. Identifying the ‘normal’ sensorimotor network and establishing the relationship between network re-organization and functional recovery will permit the development and implementation of treatments to direct brain recovery. With regard to the proposed research project, and in groups of non-disabled controls and patients post-stroke, our objectives include: 1. To establish the connectivity pattern of the ‘normal’ sensorimotor network and demonstrate the ability to detect changes within the network using an established motor learning paradigm 2. Using clinical measures of upper limb function, we will establish the relationship between the pattern of sensorimotor network connectivity and functional recovery in well and poorly recovered patients You can find more information at: http://myweb.dal.ca/sh539856/ If interested, please e-mail Dr. Shaun Boe (s.boe at dal.ca) or Dr. Tim Bardouille (tim.bardouille at nrc.ca). Best, Tim Bardouille. --------------------------------------------------------- Timothy Bardouille, PhD, Research Officer Laboratory for Clinical MEG NRC Institute for Biodiagnostics (Atlantic) Office: Halifax Infirmary 3900 - 1796 Summer Street Halifax, Nova Scotia B3H 3A7 Phone: 902-473-1865 Lab: 902-470-3936 Fax: 902-473-1851 --------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekanal at cmu.edu Wed Sep 28 18:34:04 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Wed, 28 Sep 2011 12:34:04 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> Message-ID: <9AC10416-4F89-434E-A3BD-D20EE0E14D19@cmu.edu> Thanks for the clarification. The problem seemed to be that the function was ignoring the input I was providing to `cfg.coordsys`; hopefully the fix you described below will address that. Note that it should also recognize coordsys of `ras`, `als`, and whatever else can be outputted from the interactive alignment process. Thanks, Elli On Sep 28, 2011, at 6:15 AM, jan-mathijs schoffelen wrote: > Dear Elli, > > Your proposed fix is equivalent to swapping the first 2 columns in your tmp.bnd.pnt matrix, i.e. swapping the y and x axis. To me this seems that you can also alleviate this by specifying the proper cfg.coordsys prior to your call to ft_volumerealign. The idea is the following: by specifying the location of nasion/lpa/rpa a transformation matrix can be computed. This transformation matrix will assign the X,Y, and Z axes of the coordinate system. According to different conventions, the X-axis either goes anterior (leading to a 'ALS'-like coordinate system, e.g. used in the CTF-systems and 4D neuroimaging systems), or the X-axis goes to the right (leading to a 'RAS'-like coordinate system, e.g. used in the Neuromag system). This specification will have an effect on the transformation matrix only at the level of ft_volumerealign. Specifying the coordinate system later on (through ft_estimate_coordsys) only adds the field coordsys to the mri-structure, without affecting the tran! > sformation matrix. Adding the coordsys-field just gives an interpretation to the coordinate system (and thus to the transformation matrix). To summarize, I expect that your expectation of the coordinate system in which the sensors are expressed, don't coincide with the coordinate system in which (according to the transformation matrix in combination with the coordsys) the MRI is expressed. See for the different coordinate systems definitions: > > http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined > > For your call to ft_volumerealign you need to specify cfg.coordsys = 'one of the meg-systems'. At the moment this at least works for 'ctf' and 'itab' as strings. These reflect the two major conventions, i.e. X-axis anterior, or X-axis to the right. To de-confuse it a bit, I will add the other MEG-systems also as supported strings. For the time being you can look up in the table in the linked web-page which one you need. I suspect it is 'itab', because the default is ctf-convention. > > Best wishes, > > Jan-Mathijs > > > On Sep 27, 2011, at 9:23 PM, Kanal Eliezer wrote: > >> Unfortunately, it looks like redoing the alignment didn't help. I re-ran `ft_volumerealign` in interactive, and it did add the correct field to the output structure, but the brain is still facing the wrong way. >> >> Is it possible that FieldTrip is ignoring this field when plotting? The plotting functions are pretty complex, and are even more obfuscated than usual due to all the transforms used in aligning everything, so I don't want to try to troubleshoot this one myself since I'd almost certainly find the wrong thing. >> >> In the end, I fixed the problem by simply taking vol.bnd.pnt and vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, this is a workaround rather than a direct fix. Still, if anyone else has this problem, I'm attaching the code below... it seems to have worked. >> >> Elli >> >> ~~~ >> >> tmp = vol; >> >> % transform to spherical coords >> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >> = cart2sph( ... >> tmp.bnd.pnt(:,1), ... >> tmp.bnd.pnt(:,2), ... >> tmp.bnd.pnt(:,3) ); >> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >> = cart2sph( ... >> tmp.bnd.tri(:,1), ... >> tmp.bnd.tri(:,2), ... >> tmp.bnd.tri(:,3) ); >> >> % rotate as necessary >> tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; >> tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; >> >> % transform back to cartesian >> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >> = sph2cart( ... >> tmp.bnd.pnt(:,1), ... >> tmp.bnd.pnt(:,2), ... >> tmp.bnd.pnt(:,3) ); >> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >> = cart2sph( ... >> tmp.bnd.tri(:,1), ... >> tmp.bnd.tri(:,2), ... >> tmp.bnd.tri(:,3) ); >> >> vol = tmp; >> >> >> >> On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: >> >>> OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. >>> Beth. >>> >>> -----Original Message----- >>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>> Sent: Tuesday, September 27, 2011 1:41 PM >>> To: Email discussion list for the FieldTrip project >>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>> >>> Hello Beth - >>> >>> I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - >>> >>> Elli >>> >>> >>> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>> >>>> Elli- >>>> I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. >>>> Hope this helps. >>>> Beth. >>>> >>>> >>>> Beth Belluscio MD-PhD >>>> Clinical Fellow >>>> Human Motor Control Section >>>> NINDS, NIH >>>> 301-402-3495 >>>> >>>> >>>> >>>> -----Original Message----- >>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>> Sent: Tuesday, September 27, 2011 8:50 AM >>>> To: Email discussion list for the FieldTrip project >>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>> >>>> Thanks for forwarding the message to the list. >>>> >>>> Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - >>>> >>>> Elli >>>> >>>> >>>> -------------------- >>>> Eliezer Kanal, Ph.D. >>>> Postdoctoral Fellow >>>> Center for the Neural Basis of Cognition >>>> Carnegie Mellon University >>>> 4400 Fifth Ave, Suite 110A >>>> Pittsburgh PA 15213 >>>> P: 412-268-4115 >>>> F: 412-268-5060 >>>> >>>> >>>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>>> >>>>> >>>>> >>>>> Begin forwarded message: >>>>> >>>>>> From: Kanal Eliezer >>>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>>> To: jan-mathijs schoffelen >>>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>>> >>>>>> Hello Dr Schoffelen - >>>>>> >>>>>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>>>>> >>>>>> However, it seems that there's another related issue. When running the >>>>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>>>> hold on; >>>>>> ft_plot_vol(vol); >>>>>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>>>>> >>>>>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>>>>> mri_realign.coordsys = 'ctf'; >>>>>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>>>>> >>>>>> Any help would be most appreciated! Thanks - >>>>>> >>>>>> Elli >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>>> >>>>>>> Hi Elli, >>>>>>> >>>>>>>> Hello Dr. Schoffelen - >>>>>>>> >>>>>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>>>>> >>>>>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>>>>> >>>>>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>>>>> >>>>>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>>>>> >>>>>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>>>>> >>>>>>>> Thanks - >>>>>>>> >>>>>>>> Eliezer Kanal >>>>>>> >>>>>>> >>>>>>> Best, >>>>>>> >>>>>>> Jan-Mathijs >>>>> >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> >> _______________________________________________ >> 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 > 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 miellet at psy.gla.ac.uk Thu Sep 29 09:29:43 2011 From: miellet at psy.gla.ac.uk (miellet at psy.gla.ac.uk) Date: Thu, 29 Sep 2011 08:29:43 +0100 Subject: [FieldTrip] typo in ft_sourceplot ? In-Reply-To: <9AC10416-4F89-434E-A3BD-D20EE0E14D19@cmu.edu> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> <9AC10416-4F89-434E-A3BD-D20EE0E14D19@cmu.edu> Message-ID: <20110929082943.90622sm9ihbtlw13@horde.psy.gla.ac.uk> Hello, I think there is a typo in ft_sourceplot at line 205. cfg.funcolrolim = ft_getopt(cfg,'funcolorlim', 'auto'); Sorry if it's not the case or if this typo has already been corrected (I am not sure that I'm using the exact last version, I'm using fieldtrip on Glasgow grid). Sebastien ---------------------------------------------- Dr. Sébastien Miellet, Lecturer Department of Psychology University of Fribourg Faucigny 2 1700 Fribourg Switzerland tel: +41 (0)77 489 6468 ---------------------------------------------- Quoting Kanal Eliezer : > Thanks for the clarification. The problem seemed to be that the > function was ignoring the input I was providing to `cfg.coordsys`; > hopefully the fix you described below will address that. Note that > it should also recognize coordsys of `ras`, `als`, and whatever else > can be outputted from the interactive alignment process. > > Thanks, > Elli > > > On Sep 28, 2011, at 6:15 AM, jan-mathijs schoffelen wrote: > >> Dear Elli, >> >> Your proposed fix is equivalent to swapping the first 2 columns in >> your tmp.bnd.pnt matrix, i.e. swapping the y and x axis. To me this >> seems that you can also alleviate this by specifying the proper >> cfg.coordsys prior to your call to ft_volumerealign. The idea is >> the following: by specifying the location of nasion/lpa/rpa a >> transformation matrix can be computed. This transformation matrix >> will assign the X,Y, and Z axes of the coordinate system. According >> to different conventions, the X-axis either goes anterior (leading >> to a 'ALS'-like coordinate system, e.g. used in the CTF-systems and >> 4D neuroimaging systems), or the X-axis goes to the right (leading >> to a 'RAS'-like coordinate system, e.g. used in the Neuromag >> system). This specification will have an effect on the >> transformation matrix only at the level of ft_volumerealign. >> Specifying the coordinate system later on (through >> ft_estimate_coordsys) only adds the field coordsys to the >> mri-structure, without affecting the tran! >> sformation matrix. Adding the coordsys-field just gives an >> interpretation to the coordinate system (and thus to the >> transformation matrix). To summarize, I expect that your >> expectation of the coordinate system in which the sensors are >> expressed, don't coincide with the coordinate system in which >> (according to the transformation matrix in combination with the >> coordsys) the MRI is expressed. See for the different coordinate >> systems definitions: >> >> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >> >> For your call to ft_volumerealign you need to specify cfg.coordsys >> = 'one of the meg-systems'. At the moment this at least works for >> 'ctf' and 'itab' as strings. These reflect the two major >> conventions, i.e. X-axis anterior, or X-axis to the right. To >> de-confuse it a bit, I will add the other MEG-systems also as >> supported strings. For the time being you can look up in the table >> in the linked web-page which one you need. I suspect it is 'itab', >> because the default is ctf-convention. >> >> Best wishes, >> >> Jan-Mathijs >> >> >> On Sep 27, 2011, at 9:23 PM, Kanal Eliezer wrote: >> >>> Unfortunately, it looks like redoing the alignment didn't help. I >>> re-ran `ft_volumerealign` in interactive, and it did add the >>> correct field to the output structure, but the brain is still >>> facing the wrong way. >>> >>> Is it possible that FieldTrip is ignoring this field when >>> plotting? The plotting functions are pretty complex, and are even >>> more obfuscated than usual due to all the transforms used in >>> aligning everything, so I don't want to try to troubleshoot this >>> one myself since I'd almost certainly find the wrong thing. >>> >>> In the end, I fixed the problem by simply taking vol.bnd.pnt and >>> vol.bnd.tri, applying cart2sph, adding pi/2, and applying >>> sph2cart. However, this is a workaround rather than a direct fix. >>> Still, if anyone else has this problem, I'm attaching the code >>> below... it seems to have worked. >>> >>> Elli >>> >>> ~~~ >>> >>> tmp = vol; >>> >>> % transform to spherical coords >>> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >>> = cart2sph( ... >>> tmp.bnd.pnt(:,1), ... >>> tmp.bnd.pnt(:,2), ... >>> tmp.bnd.pnt(:,3) ); >>> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >>> = cart2sph( ... >>> tmp.bnd.tri(:,1), ... >>> tmp.bnd.tri(:,2), ... >>> tmp.bnd.tri(:,3) ); >>> >>> % rotate as necessary >>> tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; >>> tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; >>> >>> % transform back to cartesian >>> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >>> = sph2cart( ... >>> tmp.bnd.pnt(:,1), ... >>> tmp.bnd.pnt(:,2), ... >>> tmp.bnd.pnt(:,3) ); >>> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >>> = cart2sph( ... >>> tmp.bnd.tri(:,1), ... >>> tmp.bnd.tri(:,2), ... >>> tmp.bnd.tri(:,3) ); >>> >>> vol = tmp; >>> >>> >>> >>> On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>> >>>> OK, Elli, I think you have the source of your problem - I'm glad >>>> that helped. To redefine the alignment, you can use >>>> ft_volumerealign in interactive mode. Be sure to read the >>>> instructions that come up in your matlab workspace simultaneously >>>> with the image so that you mark your volume as you wish (I found >>>> this a little confusing initially). As you mark your landmarks >>>> (eg l, r, n or a,p,s) you should also see the coordinates written >>>> out in the workspace. This should confirm that your realignment >>>> is taking place. After you have done this, you can check it >>>> again with the ft_determine_coordsys to make sure. >>>> Beth. >>>> >>>> -----Original Message----- >>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>> Sent: Tuesday, September 27, 2011 1:41 PM >>>> To: Email discussion list for the FieldTrip project >>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>> >>>> Hello Beth - >>>> >>>> I actually hadn't tried using `ft_determine_coordsys` on the >>>> `ft_prepare_headmodel` output, and it turns out that it's >>>> incorrect; it has the anterior along the Y axis, when it should >>>> be along the Y. However, changing it doesn't seem to do anything! >>>> I.e., using `ft_determine_coordsys` to redefine the alignment, >>>> and then re-running `ft_plot_vol` - or even re-running >>>> `ft_determine_coordsys` on the new structure - doesn't seem to >>>> change anything! The field `coordsys` has been added (and now >>>> reads "ras"), but this doesn't seem to affect anything. Is this a >>>> bug? Do I need to apply a transformation function to make the new >>>> coordsys take effect? Thanks - >>>> >>>> Elli >>>> >>>> >>>> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>>> >>>>> Elli- >>>>> I had similar problems at one point. You may already have tried >>>>> this, but for what it's worth, here are a couple of suggestions: >>>>> you can check each type of volume or array with >>>>> ft_determine_coordsys. This will give you an image with the >>>>> x,y,z coordinates superimposed so that you can check directly >>>>> what type of coordinate system is attached to the volume. >>>>> Secondly, when using ft_volumerealign, interactive, make sure >>>>> you are not incorrectly identifying right and left. Sometimes >>>>> in the conversion of DICOM to another system, left and right are >>>>> switched. >>>>> Hope this helps. >>>>> Beth. >>>>> >>>>> >>>>> Beth Belluscio MD-PhD >>>>> Clinical Fellow >>>>> Human Motor Control Section >>>>> NINDS, NIH >>>>> 301-402-3495 >>>>> >>>>> >>>>> >>>>> -----Original Message----- >>>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>>> Sent: Tuesday, September 27, 2011 8:50 AM >>>>> To: Email discussion list for the FieldTrip project >>>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>>> >>>>> Thanks for forwarding the message to the list. >>>>> >>>>> Just to clarify, the reconstruction worked fine; the brain looks >>>>> good. The problem is that it's facing the wrong way; in the, the >>>>> helmet is facing left/back, and the brain is turned 90 degrees >>>>> to the right (facing forward in the image). If anyone knows how >>>>> to either correct it as it is or how to re-run the analysis to >>>>> prevent it from happening I'd be most appreciative. If any more >>>>> details are needed, please just ask! Thanks - >>>>> >>>>> Elli >>>>> >>>>> >>>>> -------------------- >>>>> Eliezer Kanal, Ph.D. >>>>> Postdoctoral Fellow >>>>> Center for the Neural Basis of Cognition >>>>> Carnegie Mellon University >>>>> 4400 Fifth Ave, Suite 110A >>>>> Pittsburgh PA 15213 >>>>> P: 412-268-4115 >>>>> F: 412-268-5060 >>>>> >>>>> >>>>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>>>> >>>>>> >>>>>> >>>>>> Begin forwarded message: >>>>>> >>>>>>> From: Kanal Eliezer >>>>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>>>> To: jan-mathijs schoffelen >>>>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>>>> >>>>>>> Hello Dr Schoffelen - >>>>>>> >>>>>>> Thanks for the advice. The way I got this part to work was to >>>>>>> use SPM to convert my DICOM files to NIfTI ('*.img') and use >>>>>>> `ft_read_mri` on that file, instead of reading the DICOM files >>>>>>> directly. Using this method, I was able to reconstruct well. >>>>>>> >>>>>>> However, it seems that there's another related issue. When running the >>>>>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>>>>> hold on; >>>>>>> ft_plot_vol(vol); >>>>>>> check, I got the attached image. Do you have any idea why it's >>>>>>> doing that? Please let me know if I can provide any more >>>>>>> details which could help troubleshoot. >>>>>>> >>>>>>> In case it's relevant, I did notice that the output structure >>>>>>> of the `ft_volumerealign` function (run with >>>>>>> method='interactive') contained the following field: >>>>>>> mri_realign.coordsys = 'ctf'; >>>>>>> That can't be correct. I'm pretty sure it should be 'nifti'. >>>>>>> However, I tried re-running `ft_volumesegment` after manually >>>>>>> changing that value, and the figure looks the same. >>>>>>> >>>>>>> Any help would be most appreciated! Thanks - >>>>>>> >>>>>>> Elli >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>>>> >>>>>>>> Hi Elli, >>>>>>>> >>>>>>>>> Hello Dr. Schoffelen - >>>>>>>>> >>>>>>>>> I sent a response to the below email, but I think it got >>>>>>>>> lost in the shuffle. I tried what you suggested, and I got >>>>>>>>> the image attached below (matlab figure). >>>>>>>>> >>>>>>>>> Two questions: (1) What could be the cause of this poor >>>>>>>>> alignment? This isn't right/left flipping, as the nose also >>>>>>>>> looks to be in the back. (2) Do you have any idea why the >>>>>>>>> reconstruction of the MRI looks so poor? FreeSurfer >>>>>>>>> reconstructions looked much "healthier". >>>>>>>> >>>>>>>> To combine both questions into 1 answer, I wouldn't say that >>>>>>>> the alignment is bad, it's the segmentation that seems to be >>>>>>>> completely off. This usually happens, when FieldTrip assigns >>>>>>>> the wrong coordinate system to the MRI. For the segmentation >>>>>>>> to work, SPM needs an approximate coregistration of the MRI >>>>>>>> in MNI-space. FieldTrip tries to achieve this, and needs the >>>>>>>> tag mri.coordsys for this. This tag is usually set after a >>>>>>>> pass through ft_volumerealign, where you can specify a >>>>>>>> cfg.coordsys (I just noticed this as an undocumented option: >>>>>>>> perhaps that needs to change). By default, this tag is set to >>>>>>>> 'ctf', see >>>>>>>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless >>>>>>>> segmentation. >>>>>>>> >>>>>>>>> You mentioned below that I could simply load the up >>>>>>>>> freesurfer files and go from there. All the *.mgz files I've >>>>>>>>> found from freesurfer processing are simply volumetric MRI >>>>>>>>> files. The surface files are stored in a variety of formats >>>>>>>>> with seemingly no file extension. Is there a way to load >>>>>>>>> FreeSurfer surfaces, or should I be using >>>>>>>>> `ft_prepare_headmodel` to do that? >>>>>>>> >>>>>>>> The ft_read_headshape function should be able to read >>>>>>>> freesurfer triangle and quadrangle files. Use it as >>>>>>>> ft_read_headshape(filename, 'fileformat', >>>>>>>> 'freesurfer-triangle_binary'); >>>>>>>> >>>>>>>>> Thanks - >>>>>>>>> >>>>>>>>> Eliezer Kanal >>>>>>>> >>>>>>>> >>>>>>>> Best, >>>>>>>> >>>>>>>> Jan-Mathijs >>>>>> >>>>>> Jan-Mathijs Schoffelen, MD PhD >>>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>>> Centre for Cognitive Neuroimaging, >>>>>> Radboud University 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 >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > ---------------------------------------------------------------- This message was sent using the Web mail system for The University of Glasgow School of Psychology ------------------------------------------------------------------ From Caroline.Lustenberger at kispi.uzh.ch Thu Sep 29 09:45:01 2011 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Thu, 29 Sep 2011 09:45:01 +0200 Subject: [FieldTrip] cluster analysis (statistics) with one channels and multiple timepoints Message-ID: <8D58B6880DD231469FA0128331363CED03DB01E5@exzh1.kispi.int> Dear all How can I define neighbour-timepoints, normally all tutorials explain how to define neighbour sensors or channels, but I have only 1 channel and 185 timepoints. Thus, I want to perform cluster analysis to see whether a certain timepoint cluster is significant. Thanks for help and best wishes Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Sep 29 09:49:03 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 29 Sep 2011 09:49:03 +0200 Subject: [FieldTrip] typo in ft_sourceplot ? In-Reply-To: <20110929082943.90622sm9ihbtlw13@horde.psy.gla.ac.uk> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> <9AC10416-4F89-434E-A3BD-D20EE0E14D19@cmu.edu> <20110929082943.90622sm9ihbtlw13@horde.psy.gla.ac.uk> Message-ID: Hi Sebastien, That indeed looks like a typo. It was, however, fixed in revision 3744 (see http://code.google.com/p/fieldtrip/source/diff?spec=svn4313&r=3744&format=side&path=/trunk/ft_sourceplot.m&old_path=/trunk/ft_sourceplot.m&old=3674), on June 29, so if you update your FT version it should disappear. Best, Eelke 2011/9/29 : > Hello, > I think there is a typo in ft_sourceplot at line 205. > > cfg.funcolrolim = ft_getopt(cfg,'funcolorlim', 'auto'); > > Sorry if it's not the case or if this typo has already been corrected (I am > not sure that I'm using the exact last version, I'm using fieldtrip on > Glasgow grid). > > Sebastien > > ---------------------------------------------- > Dr. Sébastien Miellet, Lecturer > > Department of Psychology > University of Fribourg > Faucigny 2 > 1700 Fribourg > Switzerland > > tel: +41 (0)77 489 6468 > ---------------------------------------------- > > > > Quoting Kanal Eliezer : > >> Thanks for the clarification. The problem seemed to be that the function >> was ignoring the input I was providing to `cfg.coordsys`; hopefully the fix >> you described below will address that. Note that it should also recognize >> coordsys of `ras`, `als`, and whatever else can be outputted from the >> interactive alignment process. >> >> Thanks, >> Elli >> >> >> On Sep 28, 2011, at 6:15 AM, jan-mathijs schoffelen wrote: >> >>> Dear Elli, >>> >>> Your proposed fix is equivalent to swapping the first 2 columns in your >>> tmp.bnd.pnt matrix, i.e. swapping the y and x axis. To me this seems that >>> you can also alleviate this by specifying the proper cfg.coordsys prior to >>> your call to ft_volumerealign. The idea is the following: by specifying the >>> location of nasion/lpa/rpa a transformation matrix can be computed. This >>> transformation matrix will assign the X,Y, and Z axes of the coordinate >>> system. According to different conventions, the X-axis either goes anterior >>> (leading to a 'ALS'-like coordinate system, e.g. used in the CTF-systems and >>> 4D neuroimaging systems), or the X-axis goes to the right (leading to a >>> 'RAS'-like coordinate system, e.g. used in the Neuromag system). This >>> specification will have an effect on the transformation matrix only at the >>> level of ft_volumerealign. Specifying the coordinate system later on >>> (through ft_estimate_coordsys) only adds the field coordsys to the >>> mri-structure, without affecting the tran! >>> sformation matrix. Adding the coordsys-field just gives an interpretation >>> to the coordinate system (and thus to the transformation matrix). To >>> summarize, I expect that your expectation of the coordinate system in which >>> the sensors are expressed, don't coincide with the coordinate system in >>> which (according to the transformation matrix in combination with the >>> coordsys) the MRI is expressed. See for the different coordinate systems >>> definitions: >>> >>> >>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>> >>> For your call to ft_volumerealign you need to specify cfg.coordsys = 'one >>> of the meg-systems'. At the moment this at least works for 'ctf' and 'itab' >>> as strings. These reflect the two major conventions, i.e. X-axis anterior, >>> or X-axis to the right. To de-confuse it a bit, I will add the other >>> MEG-systems also as supported strings. For the time being you can look up in >>> the table in the linked web-page which one you need. I suspect it is 'itab', >>> because the default is ctf-convention. >>> >>> Best wishes, >>> >>> Jan-Mathijs >>> >>> >>> On Sep 27, 2011, at 9:23 PM, Kanal Eliezer wrote: >>> >>>> Unfortunately, it looks like redoing the alignment didn't help. I re-ran >>>> `ft_volumerealign` in interactive, and it did add the correct field to the >>>> output structure, but the brain is still facing the wrong way. >>>> >>>> Is it possible that FieldTrip is ignoring this field when plotting? The >>>> plotting functions are pretty complex, and are even more obfuscated than >>>> usual due to all the transforms used in aligning everything, so I don't want >>>> to try to troubleshoot this one myself since I'd almost certainly find the >>>> wrong thing. >>>> >>>> In the end, I fixed the problem by simply taking vol.bnd.pnt and >>>> vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, >>>> this is a workaround rather than a direct fix. Still, if anyone else has >>>> this problem, I'm attaching the code below... it seems to have worked. >>>> >>>> Elli >>>> >>>> ~~~ >>>> >>>> tmp = vol; >>>> >>>> % transform to spherical coords >>>> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >>>> = cart2sph( ... >>>>  tmp.bnd.pnt(:,1), ... >>>>  tmp.bnd.pnt(:,2), ... >>>>  tmp.bnd.pnt(:,3) ); >>>> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >>>> = cart2sph( ... >>>>  tmp.bnd.tri(:,1), ... >>>>  tmp.bnd.tri(:,2), ... >>>>  tmp.bnd.tri(:,3) ); >>>> >>>> % rotate as necessary >>>> tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; >>>> tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; >>>> >>>> % transform back to cartesian >>>> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >>>> = sph2cart( ... >>>>  tmp.bnd.pnt(:,1), ... >>>>  tmp.bnd.pnt(:,2), ... >>>>  tmp.bnd.pnt(:,3) ); >>>> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >>>> = cart2sph( ... >>>>  tmp.bnd.tri(:,1), ... >>>>  tmp.bnd.tri(:,2), ... >>>>  tmp.bnd.tri(:,3) ); >>>> >>>> vol = tmp; >>>> >>>> >>>> >>>> On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>>> >>>>> OK, Elli, I think you have the source of your problem - I'm glad that >>>>> helped.  To redefine the alignment, you can use ft_volumerealign in >>>>> interactive mode.  Be sure to read the instructions that come up in your >>>>> matlab workspace simultaneously with the image so that you mark your volume >>>>> as you wish (I found this a little confusing initially). As you mark your >>>>> landmarks (eg l, r, n or a,p,s) you should also see the coordinates written >>>>> out in the workspace.  This should confirm that your realignment is taking >>>>> place.  After you have done this, you can check it again with the >>>>> ft_determine_coordsys to make sure. >>>>> Beth. >>>>> >>>>> -----Original Message----- >>>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>>> Sent: Tuesday, September 27, 2011 1:41 PM >>>>> To: Email discussion list for the FieldTrip project >>>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>>> >>>>> Hello Beth - >>>>> >>>>> I actually hadn't tried using `ft_determine_coordsys` on the >>>>> `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has >>>>> the anterior along the Y axis, when it should be along the Y. However, >>>>> changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` >>>>> to redefine the alignment, and then re-running `ft_plot_vol` - or even >>>>> re-running `ft_determine_coordsys` on the new structure - doesn't seem to >>>>> change anything! The field `coordsys` has been added (and now reads "ras"), >>>>> but this doesn't seem to affect anything. Is this a bug? Do I need to apply >>>>> a transformation function to make the new coordsys take effect? Thanks - >>>>> >>>>> Elli >>>>> >>>>> >>>>> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>>>> >>>>>> Elli- >>>>>> I had similar problems at one point.  You may already have tried this, >>>>>> but for what it's worth, here are a couple of suggestions:  you can check >>>>>> each type of volume or array with ft_determine_coordsys.  This will give you >>>>>> an image with the x,y,z coordinates superimposed so that you can check >>>>>> directly what type of coordinate system is attached to the volume. >>>>>>  Secondly, when using ft_volumerealign, interactive, make sure you are not >>>>>> incorrectly identifying right and left.  Sometimes in the conversion of >>>>>> DICOM to another system, left and right are switched. >>>>>> Hope this helps. >>>>>> Beth. >>>>>> >>>>>> >>>>>> Beth Belluscio MD-PhD >>>>>> Clinical Fellow >>>>>> Human Motor Control Section >>>>>> NINDS, NIH >>>>>> 301-402-3495 >>>>>> >>>>>> >>>>>> >>>>>> -----Original Message----- >>>>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>>>> Sent: Tuesday, September 27, 2011 8:50 AM >>>>>> To: Email discussion list for the FieldTrip project >>>>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>>>> >>>>>> Thanks for forwarding the message to the list. >>>>>> >>>>>> Just to clarify, the reconstruction worked fine; the brain looks good. >>>>>> The problem is that it's facing the wrong way; in the, the helmet is facing >>>>>> left/back, and the brain is turned 90 degrees to the right (facing forward >>>>>> in the image). If anyone knows how to either correct it as it is or how to >>>>>> re-run the analysis to prevent it from happening I'd be most appreciative. >>>>>> If any more details are needed, please just ask! Thanks - >>>>>> >>>>>> Elli >>>>>> >>>>>> >>>>>> -------------------- >>>>>> Eliezer Kanal, Ph.D. >>>>>> Postdoctoral Fellow >>>>>> Center for the Neural Basis of Cognition >>>>>> Carnegie Mellon University >>>>>> 4400 Fifth Ave, Suite 110A >>>>>> Pittsburgh PA 15213 >>>>>> P: 412-268-4115 >>>>>> F: 412-268-5060 >>>>>> >>>>>> >>>>>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> Begin forwarded message: >>>>>>> >>>>>>>> From: Kanal Eliezer >>>>>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>>>>> To: jan-mathijs schoffelen >>>>>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>>>>> >>>>>>>> Hello Dr Schoffelen - >>>>>>>> >>>>>>>> Thanks for the advice. The way I got this part to work was to use >>>>>>>> SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on >>>>>>>> that file, instead of reading the DICOM files directly. Using this method, I >>>>>>>> was able to reconstruct well. >>>>>>>> >>>>>>>> However, it seems that there's another related issue. When running >>>>>>>> the >>>>>>>>        ft_plot_sens(data_preprocessed.hdr.grad); >>>>>>>>        hold on; >>>>>>>>        ft_plot_vol(vol); >>>>>>>> check, I got the attached image. Do you have any idea why it's doing >>>>>>>> that? Please let me know if I can provide any more details which could help >>>>>>>> troubleshoot. >>>>>>>> >>>>>>>> In case it's relevant, I did notice that the output structure of the >>>>>>>> `ft_volumerealign` function (run with method='interactive') contained the >>>>>>>> following field: >>>>>>>>        mri_realign.coordsys = 'ctf'; >>>>>>>> That can't be correct. I'm pretty sure it should be 'nifti'. >>>>>>>> However, I tried re-running `ft_volumesegment` after manually changing that >>>>>>>> value, and the figure looks the same. >>>>>>>> >>>>>>>> Any help would be most appreciated! Thanks - >>>>>>>> >>>>>>>> Elli >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>>>>> >>>>>>>>> Hi Elli, >>>>>>>>> >>>>>>>>>> Hello Dr. Schoffelen - >>>>>>>>>> >>>>>>>>>> I sent a response to the below email, but I think it got lost in >>>>>>>>>> the shuffle. I tried what you suggested, and I got the image attached below >>>>>>>>>> (matlab figure). >>>>>>>>>> >>>>>>>>>> Two questions: (1) What could be the cause of this poor alignment? >>>>>>>>>> This isn't right/left flipping, as the nose also looks to be in the back. >>>>>>>>>> (2) Do you have any idea why the reconstruction of the MRI looks so poor? >>>>>>>>>> FreeSurfer reconstructions looked much "healthier". >>>>>>>>> >>>>>>>>> To combine both questions into 1 answer, I wouldn't say that the >>>>>>>>> alignment is bad, it's the segmentation that seems to be completely off. >>>>>>>>> This usually happens, when FieldTrip assigns the wrong coordinate system to >>>>>>>>> the MRI. For the segmentation to work, SPM needs an approximate >>>>>>>>> coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and >>>>>>>>> needs the tag mri.coordsys for this. This tag is usually set after a pass >>>>>>>>> through ft_volumerealign, where you can specify a cfg.coordsys (I just >>>>>>>>> noticed this as an undocumented option: perhaps that needs to change). By >>>>>>>>> default, this tag is set to 'ctf', see >>>>>>>>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>>>>>>>> for a definition of the coordinate systems. If the coordinate system in >>>>>>>>> which the sensors are defined differs from the ctf coordinate system, >>>>>>>>> causing a bad initial alignmnent prior to the segmentation and a worthless >>>>>>>>> segmentation. >>>>>>>>> >>>>>>>>>> You mentioned below that I could simply load the up freesurfer >>>>>>>>>> files and go from there. All the *.mgz files I've found from freesurfer >>>>>>>>>> processing are simply volumetric MRI files. The surface files are stored in >>>>>>>>>> a variety of formats with seemingly no file extension. Is there a way to >>>>>>>>>> load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do >>>>>>>>>> that? >>>>>>>>> >>>>>>>>> The ft_read_headshape function should be able to read freesurfer >>>>>>>>> triangle and quadrangle files. Use it as ft_read_headshape(filename, >>>>>>>>> 'fileformat', 'freesurfer-triangle_binary'); >>>>>>>>> >>>>>>>>>> Thanks - >>>>>>>>>> >>>>>>>>>> Eliezer Kanal >>>>>>>>> >>>>>>>>> >>>>>>>>> Best, >>>>>>>>> >>>>>>>>> Jan-Mathijs >>>>>>> >>>>>>> Jan-Mathijs Schoffelen, MD PhD >>>>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>>>> Centre for Cognitive Neuroimaging, >>>>>>> Radboud University 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 >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> 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 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > ---------------------------------------------------------------- >  This message was sent using the Web mail system for >  The University of Glasgow School of Psychology > ------------------------------------------------------------------ > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From Jan.Hirschmann at med.uni-duesseldorf.de Thu Sep 29 16:11:33 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Thu, 29 Sep 2011 16:11:33 +0200 Subject: [FieldTrip] reading NM data with newest filedtrip Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02F7C09F@Mail2-UKD.VMED.UKD> Hi, don't know if somebody pointed it out earlier... I changed to the newest ft version today and got the following error from ft_preprocessing when reading neuromag data. Undefined function or variable "ori". Error in channelposition (line 260) ori = ori; % second output argument Error in fixsens (line 53) [chanpos, chanori, tmp] = channelposition(sens, 'channel', 'all'); Error in ft_read_header (line 1472) hdr.grad = fixsens(hdr.grad); Error in ft_preprocessing (line 360) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 29 21:06:16 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 29 Sep 2011 21:06:16 +0200 Subject: [FieldTrip] reading NM data with newest filedtrip In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B02F7C09F@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B02F7C09F@Mail2-UKD.VMED.UKD> Message-ID: <3FAFA55E-EA71-489C-944E-42C36B4D7A40@donders.ru.nl> Dear Jan, Thanks for noticing. Apologies for this. It's my fault. I fixed it now. Best wishes, Jan-Mathijs On Sep 29, 2011, at 4:11 PM, wrote: > Hi, > > don’t know if somebody pointed it out earlier… I changed to the newest ft version today and got the following error from ft_preprocessing when reading neuromag data. > > Undefined function or variable "ori". > > Error in channelposition (line 260) > ori = ori; % second output argument > > Error in fixsens (line 53) > [chanpos, chanori, tmp] = channelposition(sens, 'channel', 'all'); > > Error in ft_read_header (line 1472) > hdr.grad = fixsens(hdr.grad); > > Error in ft_preprocessing (line 360) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Best, > jan > > Jan Hirschmann > MSc. Neuroscience > Insititute of Clinical Neuroscience and Medical Psychology > Heinrich Heine University Duesseldorf > Universitaetsstr. 1 > 40225 Duesseldorf > Tel: 0049 - (0)211 - 81 - 18415 > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From BelluscB at ninds.nih.gov Thu Sep 29 22:54:55 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Thu, 29 Sep 2011 16:54:55 -0400 Subject: [FieldTrip] beamforming tutorial, error using ft_freqanalysis to create CSD matrix Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CD01@NIHMLBX10.nih.gov> Hi group- When I follow the instructions of the tutorial for localizing oscillatory sources using beamforming, I run into a problem calculating the cross spectral density matrix. The tutorial does not indicate specifying the taper, and therefore ft_freqanalysis defaults to dpss. Then I get an error message as below. I confess ignorance that I do not understand what the code means when it says "ensure that the input arguments are double precision" so I don't know if my data structure conforms to this requirement. My data are time segments of 100 msec in length (each for pre and post) sampled at 1200 Hz, with 73 trials. Here are the commands I used and the error I got: cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 4; cfg.foilim = [20 20]; test = ft_freqanalysis(cfg, dataCB24_03_stim1_Pre) the input is raw data with 273 channels and 73 trials processing trials ??? Undefined function or method 'dpss' for input arguments of type 'double'. Error in ==> ft_specest_mtmfft>double_dpss at 171 tap = dpss(double(a), double(b), varargin{:}); Error in ==> ft_specest_mtmfft at 87 tap = double_dpss(ndatsample,ndatsample*(tapsmofrq./fsample))'; Error in ==> ft_freqanalysis at 492 [spectrum,ntaper,foi] = ft_specest_mtmfft(dat, time, 'taper', cfg.taper, options{:}, 'feedback', fbopt); This is specific to the dpss taper (obviously) and when I specify cfg.taper = 'hanning' the function runs fine. I can create the CSD matrix this way, but I'd like to understand why dpss isn't working and what the requirement for double precision means. Thanks for your help, Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.piantoni at nin.knaw.nl Fri Sep 30 09:46:01 2011 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Fri, 30 Sep 2011 09:46:01 +0200 Subject: [FieldTrip] beamforming tutorial, error using ft_freqanalysis to create CSD matrix In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C059826CD01@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C059826CD01@NIHMLBX10.nih.gov> Message-ID: Hi Beth, dpss is a function of the Signal Processing Toolbox of Matlab http://www.mathworks.nl/help/toolbox/signal/ref/dpss.html The Signal Processing Toolbox is a addon which requires an extra license. You can check the available toolboxes in your matlab installation by running "ver". I don't know if there are free implementations of dpss.m, otherwise you can ask your institute to buy one. Double and single precision is a way of storing numbers on the computer. http://www.mathworks.nl/help/techdoc/matlab_prog/f2-12135.html Double precision numbers have a larger range than single-precision (and use more memory). Some functions of Matlab, at least in earlier versions, were unstable with single precision values, that's why it's better if you store and work with your data as 'double'. Note that the function 'double_dpss' converts the data into 'double' before passing it to 'dpss.m' anyway. You can check if your data is single or double, by doing: class(data.trial{1}) HTH, Gio On Thu, Sep 29, 2011 at 22:54, Belluscio, Beth (NIH/NINDS) [E] wrote: > Hi group- > >   When I follow the instructions of the tutorial for localizing oscillatory > sources using beamforming, I run into a problem calculating the cross > spectral density matrix.  The tutorial does not indicate specifying the > taper, and therefore ft_freqanalysis defaults to dpss.  Then I get an error > message as below.  I confess ignorance that I do not understand what the > code means when it says “ensure that the input arguments are double > precision” so I don’t know if my data structure conforms to this > requirement.  My data are time segments of 100 msec in length (each for pre > and post) sampled at 1200 Hz, with 73 trials.  Here are the commands I used > and the error I got: > > > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [20 20]; > > test = ft_freqanalysis(cfg, dataCB24_03_stim1_Pre) the input is raw data > with 273 channels and 73 trials processing trials ??? Undefined function or > method 'dpss' for input arguments of type 'double'. > > > > Error in ==> ft_specest_mtmfft>double_dpss at 171 tap = dpss(double(a), > double(b), varargin{:}); > > > > Error in ==> ft_specest_mtmfft at 87 > >     tap = double_dpss(ndatsample,ndatsample*(tapsmofrq./fsample))'; > > > > Error in ==> ft_freqanalysis at 492 > >         [spectrum,ntaper,foi] = ft_specest_mtmfft(dat, time, 'taper', > cfg.taper, options{:}, > >         'feedback', fbopt); > > > > This is specific to the dpss taper (obviously) and when I specify cfg.taper > = ‘hanning’ the function runs fine.  I can create the CSD matrix this way, > but I’d like to understand why dpss isn’t working and what the requirement > for double precision means. > > Thanks for your help, > > Beth. > > > > > > > > > > Beth Belluscio MD-PhD > > Clinical Fellow > > Human Motor Control Section > > NINDS, NIH > > 301-402-3495 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From Jan.Hirschmann at med.uni-duesseldorf.de Fri Sep 30 15:23:49 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Fri, 30 Sep 2011 15:23:49 +0200 Subject: [FieldTrip] reading NM data with newest filedtrip In-Reply-To: <3FAFA55E-EA71-489C-944E-42C36B4D7A40@donders.ru.nl> References: <72E993C35FB11743B79FF9286E5B6D8B02F7C09F@Mail2-UKD.VMED.UKD> <3FAFA55E-EA71-489C-944E-42C36B4D7A40@donders.ru.nl> Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02F7C1CD@Mail2-UKD.VMED.UKD> Cheers!! ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von jan-mathijs schoffelen Gesendet: Donnerstag, 29. September 2011 21:06 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] reading NM data with newest filedtrip Dear Jan, Thanks for noticing. Apologies for this. It's my fault. I fixed it now. Best wishes, Jan-Mathijs On Sep 29, 2011, at 4:11 PM, wrote: Hi, don't know if somebody pointed it out earlier... I changed to the newest ft version today and got the following error from ft_preprocessing when reading neuromag data. Undefined function or variable "ori". Error in channelposition (line 260) ori = ori; % second output argument Error in fixsens (line 53) [chanpos, chanori, tmp] = channelposition(sens, 'channel', 'all'); Error in ft_read_header (line 1472) hdr.grad = fixsens(hdr.grad); Error in ft_preprocessing (line 360) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 _______________________________________________ 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From johemart at gmail.com Fri Sep 30 17:35:30 2011 From: johemart at gmail.com (=?ISO-8859-1?Q?Johann_Heinz_Mart=EDnez_Huartos?=) Date: Fri, 30 Sep 2011 17:35:30 +0200 Subject: [FieldTrip] dividing totoplot ot get channels! Message-ID: Hello dear fieldtripers Im trying to divide 148 MEG channels from ft_topoplotER( ) plot into several groups equally distributed (as much as it can) from that head plot in order to get those channel info groups to work with them in another script. I Dunno if anyone has already done that routine, and whether it is possible to send me the code or the pseudocode to do that, or instead, whether anyone can give me some recommendation about where i can start. tnks buddies Atentamente: Johann Martínez. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysoevao at psychiatry.wustl.edu Thu Sep 1 08:09:04 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 01:09:04 -0500 Subject: [FieldTrip] ROC Message-ID: <76DC57362137854CB9592B496182D5FA060CE58423@wusmexmbx2.medpriv.wucon.wustl.edu> Dear field trippers, I'd like to use the Receiver Operator Characteristic (ROC) as a stat_function for fr_timelockanlaysis (monte carlo perputation test). I found the relevant function in the statfun folder, but it does not have the critical value, at which to base the subsequent analysis. Can you provide me with the hint how to implement it properly. What value of AUC can be used as a threshold? The other issue is that I also want to construct the ROC based on the 2 independent parameters obtained from the same subjects. I mean that I want to use the conbined criterium for the classification (parameter1>X and parameter 2>Y). Can you recommend to me the proper way to do it in matlab? Best Regards, Olga. Olga Sysoeva, Research Associate, PhD Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. From sysoevao at psychiatry.wustl.edu Thu Sep 1 08:20:15 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 01:20:15 -0500 Subject: [FieldTrip] ANOVA mixed design, main effect Message-ID: <76DC57362137854CB9592B496182D5FA060CE58424@wusmexmbx2.medpriv.wucon.wustl.edu> Dear fieldtriper, I still a bit confused about mixed between/within subjects ANOVA design. For example I have 1 within subject factor (condition1 and condition2) and 2 group of subjects. I'd like to examine the effect the effect of group and effect of condition, a well as interaction. The only effect I managed to examine with filedtrip right now is the interaction one. I subtracted cond1-cond2 and applied ft_timelockstatistic with independentT. I believe this approach is related to the concept of the between/within factors interaction. But how to examine main effects? I can certainly test them separately, but I appreciate any help. I believe I more or less understand the theory underlying this analysis, but what I need more now is how to implement in technically. Best, Olga. Olga Sysoeva, Research Associate, PhD Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. From Irina.Simanova at mpi.nl Thu Sep 1 16:19:42 2011 From: Irina.Simanova at mpi.nl (Irina Simanova) Date: Thu, 1 Sep 2011 16:19:42 +0200 Subject: [FieldTrip] cluster statistic error Message-ID: <0BD10838-698F-4069-B29B-2BE15CED26A5@mpi.nl> Dear Fieldtripers, I am getting "Too many input arguments" error when running permutation test on event-related data. This has to do with the 'issource' input to "statistics_montecarlo": I use same cfg parameters as in the tutorials for the permutation test. I got the error repeatedly few times on my own data, and then I checked that the error was still there for the tutorial datasets FIC, FC . % this is the tutorial data. The cfg options are same as in the tutorials [stat] = ft_timelockstatistics(cfg, timelockFIC, timelockFC); selected 149 channels selected 301 time bins selected 1 frequency bins Using the gradiometer configuration from the dataset. there are on average 4.7 neighbours per channel using "statistics_montecarlo" for the statistical testing ??? Error using ==> fieldtrip/private/statistics_montecarlo Too many input arguments. Error in ==> statistics_wrapper at 285 [stat, cfg] = statmethod(cfg, dat, cfg.design, 'issource',issource); Error in ==> ft_timelockstatistics at 119 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What is wrong here? I would appreciate any help. Kind regards, Irina From e.maris at donders.ru.nl Thu Sep 1 16:26:34 2011 From: e.maris at donders.ru.nl (Eric Maris) Date: Thu, 1 Sep 2011 16:26:34 +0200 Subject: [FieldTrip] ANOVA mixed design, main effect In-Reply-To: <76DC57362137854CB9592B496182D5FA060CE58424@wusmexmbx2.medpriv.wucon.wustl.edu> References: <76DC57362137854CB9592B496182D5FA060CE58424@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: <019b01cc68b3$29a42640$7cec72c0$@maris@donders.ru.nl> Hi Olga, > I still a bit confused about mixed between/within subjects ANOVA design. > For example I have 1 within subject factor (condition1 and condition2) and 2 > group of subjects. I'd like to examine the effect the effect of group and > effect of condition, a well as interaction. The only effect I managed to > examine with filedtrip right now is the interaction one. I subtracted cond1- > cond2 and applied ft_timelockstatistic with independentT. I believe this > approach is related to the concept of the between/within factors > interaction. But how to examine main effects? I can certainly test them > separately, but > > I appreciate any help. > I believe I more or less understand the theory underlying this analysis, but > what I need more now is how to implement in technically. Main effect of Group: Do a between-subjects analysis (using indepsamplesT) on the dependent variable cond1+cond2 Main effect of the within subjects factor: Do a within-subjects analysis of cond1 versus cond2 (using depsamplesT), ignoring the Group variable. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands Visiting address: Spinozagebouw Room B.03.44 T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 mailto:e.maris at donders.ru.nl http://www.nphyscog.com/ > > Best, > Olga. > > > Olga Sysoeva, > Research Associate, PhD > Washington University School of Medicine > Campus Box 8134 > 660 South Euclid Ave > Saint Louis, MO 63110-9909 > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you are > not the intended recipient, be advised that any unauthorized use, disclosure, > copying or the taking of any action in reliance on the contents of this > information is strictly prohibited. If you have received this email in error, > please immediately notify the sender via telephone or return mail. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From BelluscB at ninds.nih.gov Thu Sep 1 16:56:09 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Thu, 1 Sep 2011 10:56:09 -0400 Subject: [FieldTrip] a small correction to tutorial on MNE source reconstruction Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C058A50C2EE@NIHMLBX10.nih.gov> For the tutorial found at http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate, I discovered that in the section "1. Source model: Volumetric processing in Freesurfer" the pipeline needed to have recon-all use -talairach first, and -nuintensitycor second. The rest works beautifully as outlined. Thanks! Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 1 17:49:41 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 1 Sep 2011 17:49:41 +0200 Subject: [FieldTrip] a small correction to tutorial on MNE source reconstruction In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C058A50C2EE@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C058A50C2EE@NIHMLBX10.nih.gov> Message-ID: <795600CA-15C3-46D8-8682-F9FEFD30E113@donders.ru.nl> Dear Beth, Thanks for the notification. We'll look into it and fix it. Best wishes, Jan-Mathijs On Sep 1, 2011, at 4:56 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > For the tutorial found at http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate, I discovered that in the section “1. Source model: Volumetric processing in Freesurfer” the pipeline needed to have recon-all use –talairach first, and –nuintensitycor second. The rest works beautifully as outlined. > Thanks! > Beth. > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysoevao at psychiatry.wustl.edu Thu Sep 1 17:51:09 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 10:51:09 -0500 Subject: [FieldTrip] ANOVA and tails Message-ID: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> Dear Fieldtrippers, I've tried to use between subject ANOVA (independentF) and a bit confused with the tails. I've got the following message "For an independent samples F-statistic, it does not make sense to calculate a two-sided critical value." Could you explain me why? Why only right tail is possible? Best Regards, Olga. ____________________________________________________________________________ Olga Sysoeva, Research Associate, PhD Psychiatry Department, Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 ________________________________ The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sysoevao at psychiatry.wustl.edu Thu Sep 1 18:36:58 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 11:36:58 -0500 Subject: [FieldTrip] ANOVA mixed design, main effect In-Reply-To: <019b01cc68b3$29a42640$7cec72c0$@maris@donders.ru.nl> References: <76DC57362137854CB9592B496182D5FA060CE58424@wusmexmbx2.medpriv.wucon.wustl.edu> <019b01cc68b3$29a42640$7cec72c0$@maris@donders.ru.nl> Message-ID: <76DC57362137854CB9592B496182D5FA060CECF5A1@wusmexmbx2.medpriv.wucon.wustl.edu> Certainly! Thank you. -----Original Message----- From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Eric Maris Sent: Thursday, September 01, 2011 9:27 AM To: 'Email discussion list for the FieldTrip project' Subject: Re: [FieldTrip] ANOVA mixed design, main effect Hi Olga, > I still a bit confused about mixed between/within subjects ANOVA design. > For example I have 1 within subject factor (condition1 and condition2) > and 2 > group of subjects. I'd like to examine the effect the effect of group > and effect of condition, a well as interaction. The only effect I > managed to examine with filedtrip right now is the interaction one. I > subtracted cond1- > cond2 and applied ft_timelockstatistic with independentT. I believe > this approach is related to the concept of the between/within factors > interaction. But how to examine main effects? I can certainly test > them separately, but > > I appreciate any help. > I believe I more or less understand the theory underlying this > analysis, but > what I need more now is how to implement in technically. Main effect of Group: Do a between-subjects analysis (using indepsamplesT) on the dependent variable cond1+cond2 Main effect of the within subjects factor: Do a within-subjects analysis of cond1 versus cond2 (using depsamplesT), ignoring the Group variable. Best, Eric Maris dr. Eric Maris Donders Institute for Brain, Cognition and Behavior Radboud University P.O. Box 9104 6500 HE Nijmegen The Netherlands Visiting address: Spinozagebouw Room B.03.44 T:+31 24 3612651 Mobile: 06 39584581 F:+31 24 3616066 mailto:e.maris at donders.ru.nl http://www.nphyscog.com/ > > Best, > Olga. > > > Olga Sysoeva, > Research Associate, PhD > Washington University School of Medicine Campus Box 8134 > 660 South Euclid Ave > Saint Louis, MO 63110-9909 > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If > you are > not the intended recipient, be advised that any unauthorized use, disclosure, > copying or the taking of any action in reliance on the contents of > this information is strictly prohibited. If you have received this > email in error, > please immediately notify the sender via telephone or return mail. > > _______________________________________________ > 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 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. From venug001 at crimson.ua.edu Thu Sep 1 18:58:23 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Thu, 1 Sep 2011 08:58:23 -0800 Subject: [FieldTrip] ANOVA and tails In-Reply-To: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: Dear Olga, this does not mean only right tail is possible. You could have a positive or negative sign for your test statistic, which is acceptable. That can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and Condition 2. But to answer your question more substantively: A one-tail test is more consevervative than a two-tail test. A two-tail test is when you have no a priori expectation where you expect the condition 1 - condition 2 to be higher or lower. Using a non EEG example if you have two groups treatment and control, you will expect yoga to lower the depression rates in treatment group and not the control group. Similarly if you have two groups treatment and control, you will expect some protein shake to yield higher muscle mass in the treatment group and not the control group. In both cases the outcome (negative or lower in scenario one, higher or positive on scenario two) is an a priori expectation. So in a EEG sense we know that the Incongruent or deviant word will have a higher displacement than the congruent or expected word.. Going back to the conservative versus liberal nature of the statistic. If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of the tail or the reject region, however when you halve that you tabled value is half of it. So you obtained value in the first case would have to be greater than 4.85, while in the two-tail case it slide with anything over 2.43. Therefore the two-tail is not only for exploratory purposes, but is also less conservative. I hope I have helped. Warm regards gopa On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna < sysoevao at psychiatry.wustl.edu> wrote: > Dear Fieldtrippers,**** > > I’ve tried to use between subject ANOVA (independentF) and a bit confused > with the tails.**** > > I’ve got the following message**** > > “For an independent samples F-statistic, it does not make sense to > calculate a two-sided critical value.”**** > > Could you explain me why? Why only right tail is possible? **** > > Best Regards,**** > > Olga.**** > > > ____________________________________________________________________________ > **** > > Olga Sysoeva,**** > > Research Associate, PhD**** > > Psychiatry Department,**** > > Washington University School of Medicine**** > > Campus Box 8134**** > > 660 South Euclid Ave**** > > Saint Louis, MO 63110-9909**** > > ** ** > > ------------------------------ > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > > _______________________________________________ > 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 sysoevao at psychiatry.wustl.edu Thu Sep 1 19:08:52 2011 From: sysoevao at psychiatry.wustl.edu (Sysoeva, Olga Vladimirovna) Date: Thu, 1 Sep 2011 12:08:52 -0500 Subject: [FieldTrip] ANOVA and tails In-Reply-To: References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: <76DC57362137854CB9592B496182D5FA060CECF5B9@wusmexmbx2.medpriv.wucon.wustl.edu> Thank you, I understand all of this. I just do not understand why I can have more liberal, less conservative criteria (2 tail) in my ANOVA design here in Filedtrip. I do not have any prior expectation about the result ( for example both increase in value for positive component , such as P300, and decrease in value for negative component (such as N1) can be considered as increase in the amplitude of this components). From: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] On Behalf Of Gopakumar Venugopalan Sent: Thursday, September 01, 2011 11:58 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] ANOVA and tails Dear Olga, this does not mean only right tail is possible. You could have a positive or negative sign for your test statistic, which is acceptable. That can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and Condition 2. But to answer your question more substantively: A one-tail test is more consevervative than a two-tail test. A two-tail test is when you have no a priori expectation where you expect the condition 1 - condition 2 to be higher or lower. Using a non EEG example if you have two groups treatment and control, you will expect yoga to lower the depression rates in treatment group and not the control group. Similarly if you have two groups treatment and control, you will expect some protein shake to yield higher muscle mass in the treatment group and not the control group. In both cases the outcome (negative or lower in scenario one, higher or positive on scenario two) is an a priori expectation. So in a EEG sense we know that the Incongruent or deviant word will have a higher displacement than the congruent or expected word.. Going back to the conservative versus liberal nature of the statistic. If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of the tail or the reject region, however when you halve that you tabled value is half of it. So you obtained value in the first case would have to be greater than 4.85, while in the two-tail case it slide with anything over 2.43. Therefore the two-tail is not only for exploratory purposes, but is also less conservative. I hope I have helped. Warm regards gopa On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna > wrote: Dear Fieldtrippers, I've tried to use between subject ANOVA (independentF) and a bit confused with the tails. I've got the following message "For an independent samples F-statistic, it does not make sense to calculate a two-sided critical value." Could you explain me why? Why only right tail is possible? Best Regards, Olga. ____________________________________________________________________________ Olga Sysoeva, Research Associate, PhD Psychiatry Department, Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 ________________________________ The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ________________________________ The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: From venug001 at crimson.ua.edu Thu Sep 1 19:57:25 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Thu, 1 Sep 2011 09:57:25 -0800 Subject: [FieldTrip] ANOVA and tails In-Reply-To: <76DC57362137854CB9592B496182D5FA060CECF5B9@wusmexmbx2.medpriv.wucon.wustl.edu> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> <76DC57362137854CB9592B496182D5FA060CECF5B9@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: Well you must have some expectation: Those dependent on alcohol will have a more diminshed P300 response, than someone who is not. In this case the postive or negative outcome is a net result of one group having a higher value (P300) than another group. when you have examining two components P300 and N1 then you have to perform separate tests and/or a multivariate test. In this case you will also receive some kind or R or correlation statistic where it show that the two components are inversely related to each other. That is when P300 increases, then N1 will decrease, and possibly vice versa. Again I am thinking of all this when the values have been exported to SAS or SPSS, and not in Fieldtrip. Warm regards gopa On Thu, Sep 1, 2011 at 9:08 AM, Sysoeva, Olga Vladimirovna < sysoevao at psychiatry.wustl.edu> wrote: > Thank you, I understand all of this. I just do not understand why I can > have more liberal, less conservative criteria (2 tail) in my ANOVA design > here in Filedtrip.**** > > I do not have any prior expectation about the result ( for example both > increase in value for positive component , such as P300, and decrease in > value for negative component (such as N1) can be considered as increase in > the amplitude of this components).**** > > ** ** > > *From:* fieldtrip-bounces at donders.ru.nl [mailto: > fieldtrip-bounces at donders.ru.nl] *On Behalf Of *Gopakumar Venugopalan > *Sent:* Thursday, September 01, 2011 11:58 AM > *To:* Email discussion list for the FieldTrip project > *Subject:* Re: [FieldTrip] ANOVA and tails**** > > ** ** > > Dear Olga, this does not mean only right tail is possible. You could have a > positive or negative sign for your test statistic, which is acceptable. That > can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and > Condition 2. But to answer your question more substantively:**** > > A one-tail test is more consevervative than a two-tail test. A two-tail > test is when you have no a priori expectation where you expect the condition > 1 - condition 2 to be higher or lower. Using a non EEG example if you have > two groups treatment and control, you will expect yoga to lower the > depression rates in treatment group and not the control group. **** > > Similarly if you have two groups treatment and control, you will expect > some protein shake to yield higher muscle mass in the treatment group and > not the control group. In both cases the outcome (negative or lower in > scenario one, higher or positive on scenario two) is an a priori > expectation. So in a EEG sense we know that the Incongruent or deviant word > will have a higher displacement than the congruent or expected word..**** > > Going back to the conservative versus liberal nature of the statistic.**** > > If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of > the tail or the reject region, however when you halve that you tabled value > is half of it. So you obtained value in the first case would have to be > greater than 4.85, while in the two-tail case it slide with anything over > 2.43. Therefore the two-tail is not only for exploratory purposes, but is > also less conservative.**** > > **** > > I hope I have helped.**** > > **** > > Warm regards**** > > gopa**** > > On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna < > sysoevao at psychiatry.wustl.edu> wrote:**** > > Dear Fieldtrippers,**** > > I’ve tried to use between subject ANOVA (independentF) and a bit confused > with the tails.**** > > I’ve got the following message**** > > “For an independent samples F-statistic, it does not make sense to > calculate a two-sided critical value.”**** > > Could you explain me why? Why only right tail is possible? **** > > Best Regards,**** > > Olga.**** > > > ____________________________________________________________________________ > **** > > Olga Sysoeva,**** > > Research Associate, PhD**** > > Psychiatry Department,**** > > Washington University School of Medicine**** > > Campus Box 8134**** > > 660 South Euclid Ave**** > > Saint Louis, MO 63110-9909**** > > **** > > ** ** > ------------------------------ > > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > **** > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip**** > > ** ** > > ------------------------------ > The materials in this message are private and may contain Protected > Healthcare Information or other information of a sensitive nature. If you > are not the intended recipient, be advised that any unauthorized use, > disclosure, copying or the taking of any action in reliance on the contents > of this information is strictly prohibited. If you have received this email > in error, please immediately notify the sender via telephone or return mail. > > _______________________________________________ > 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 Gregor.Volberg at psychologie.uni-regensburg.de Fri Sep 2 09:45:21 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Fri, 02 Sep 2011 09:45:21 +0200 Subject: [FieldTrip] Antw: Re: ANOVA and tails In-Reply-To: References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> Message-ID: <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> Dear Olga and Gopa, I would like to comment on this discussion because I fear that there could be some misunderstandings. Unlike t, the F statistic is not sensitive to the direction of a difference. The t value gets positive if means of group A > group B, and negative if B > A. Therefore, the hypothesis that A >< B can be tested on both tails of the t distribution. On contrast, the F value gets positive if A > B as well as if B > A. Small values of F, on the left tail of the distribition, indicate that there is no difference between means of A and B. This is why a left tail or a two-tailed test does not make sense with an F-Test. So Olga, if you have a two-group design, and if you want to apply a left- or two-tailed test, then use the t statistic. Beware that the two-sided test is usually considered more (not less) conservative that the one-sided test. This is because the critical value of t increases for two-sided tests. It is the size if the rejection region for H0 that needs to be halved, not the one-sided critical value of your test statistic. For example, a result of t(20)= 1.9 is significant in a one-tail right-sided test where it exceeds the critical value of 1.72 (the 0.95 quantile of a t distribution with 20 df). But it is not significant in a two sided test where the critical values are 2.09 (0.975 quantile) and -2.09 (0.025 quantile). Best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Gopakumar Venugopalan 9/1/2011 6:58 PM >>> Dear Olga, this does not mean only right tail is possible. You could have a positive or negative sign for your test statistic, which is acceptable. That can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and Condition 2. But to answer your question more substantively: A one-tail test is more consevervative than a two-tail test. A two-tail test is when you have no a priori expectation where you expect the condition 1 - condition 2 to be higher or lower. Using a non EEG example if you have two groups treatment and control, you will expect yoga to lower the depression rates in treatment group and not the control group. Similarly if you have two groups treatment and control, you will expect some protein shake to yield higher muscle mass in the treatment group and not the control group. In both cases the outcome (negative or lower in scenario one, higher or positive on scenario two) is an a priori expectation. So in a EEG sense we know that the Incongruent or deviant word will have a higher displacement than the congruent or expected word.. Going back to the conservative versus liberal nature of the statistic. If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of the tail or the reject region, however when you halve that you tabled value is half of it. So you obtained value in the first case would have to be greater than 4.85, while in the two-tail case it slide with anything over 2.43. Therefore the two-tail is not only for exploratory purposes, but is also less conservative. I hope I have helped. Warm regards gopa On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna wrote: Dear Fieldtrippers, I’ve tried to use between subject ANOVA (independentF) and a bit confused with the tails. I’ve got the following message “For an independent samples F-statistic, it does not make sense to calculate a two-sided critical value.” Could you explain me why? Why only right tail is possible? Best Regards, Olga. ____________________________________________________________________________ Olga Sysoeva, Research Associate, PhD Psychiatry Department, Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. _______________________________________________ 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 Gregor.Volberg at psychologie.uni-regensburg.de Fri Sep 2 11:01:26 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Fri, 02 Sep 2011 11:01:26 +0200 Subject: [FieldTrip] Antw: Re: ANOVA and tails In-Reply-To: <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> Message-ID: <4E60B786020000570000A93A@gwsmtp1.uni-regensburg.de> Dear Olga, Just to add to my former mail: Another way to think of F and t tests is that the F-Test is _always_ two-sided, in the sense that it tests for both differences A>B and B>A. So I think you already did the test that you intended to do. But formally, the rejection region is on the right side of the F distribution, and so it should be indicated in the cfg structure. Cheers, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> "Gregor Volberg" 9/2/2011 9:45 AM >>> Dear Olga and Gopa, I would like to comment on this discussion because I fear that there could be some misunderstandings. Unlike t, the F statistic is not sensitive to the direction of a difference. The t value gets positive if means of group A > group B, and negative if B > A. Therefore, the hypothesis that A >< B can be tested on both tails of the t distribution. On contrast, the F value gets positive if A > B as well as if B > A. Small values of F, on the left tail of the distribition, indicate that there is no difference between means of A and B. This is why a left tail or a two-tailed test does not make sense with an F-Test. So Olga, if you have a two-group design, and if you want to apply a left- or two-tailed test, then use the t statistic. Beware that the two-sided test is usually considered more (not less) conservative that the one-sided test. This is because the critical value of t increases for two-sided tests. It is the size if the rejection region for H0 that needs to be halved, not the one-sided critical value of your test statistic. For example, a result of t(20)= 1.9 is significant in a one-tail right-sided test where it exceeds the critical value of 1.72 (the 0.95 quantile of a t distribution with 20 df). But it is not significant in a two sided test where the critical values are 2.09 (0.975 quantile) and -2.09 (0.025 quantile). Best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Gopakumar Venugopalan 9/1/2011 6:58 PM >>> Dear Olga, this does not mean only right tail is possible. You could have a positive or negative sign for your test statistic, which is acceptable. That can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and Condition 2. But to answer your question more substantively: A one-tail test is more consevervative than a two-tail test. A two-tail test is when you have no a priori expectation where you expect the condition 1 - condition 2 to be higher or lower. Using a non EEG example if you have two groups treatment and control, you will expect yoga to lower the depression rates in treatment group and not the control group. Similarly if you have two groups treatment and control, you will expect some protein shake to yield higher muscle mass in the treatment group and not the control group. In both cases the outcome (negative or lower in scenario one, higher or positive on scenario two) is an a priori expectation. So in a EEG sense we know that the Incongruent or deviant word will have a higher displacement than the congruent or expected word.. Going back to the conservative versus liberal nature of the statistic. If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of the tail or the reject region, however when you halve that you tabled value is half of it. So you obtained value in the first case would have to be greater than 4.85, while in the two-tail case it slide with anything over 2.43. Therefore the two-tail is not only for exploratory purposes, but is also less conservative. I hope I have helped. Warm regards gopa On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna wrote: Dear Fieldtrippers, I’ve tried to use between subject ANOVA (independentF) and a bit confused with the tails. I’ve got the following message “For an independent samples F-statistic, it does not make sense to calculate a two-sided critical value.” Could you explain me why? Why only right tail is possible? Best Regards, Olga. ____________________________________________________________________________ Olga Sysoeva, Research Associate, PhD Psychiatry Department, Washington University School of Medicine Campus Box 8134 660 South Euclid Ave Saint Louis, MO 63110-9909 The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. _______________________________________________ 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 dualitystan at gmail.com Fri Sep 2 11:21:59 2011 From: dualitystan at gmail.com (Stanley Klein) Date: Fri, 2 Sep 2011 02:21:59 -0700 Subject: [FieldTrip] Antw: Re: ANOVA and tails In-Reply-To: <4E60B786020000570000A93A@gwsmtp1.uni-regensburg.de> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> <4E60B786020000570000A93A@gwsmtp1.uni-regensburg.de> Message-ID: Gregor is correct in what he says. I would like to take it one step further. I hope future statistics books and even Fieldtrip would remove the option of doing a two tailed t-test. If you want to do a two tail t then simply use F =t^2. That removes ever needing to say you are doing a two-tail t. However in doing the one-tailed t you would need to specify which tail. The default of the t could be an upper tail default so you would simply switch sign if wanting to to the lower tail. The benefit of this approach is that it can minimize the errors and complexity of dealing with cfg structures. Stan On Fri, Sep 2, 2011 at 2:01 AM, Gregor Volberg < Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > Dear Olga, > > Just to add to my former mail: > > Another way to think of F and t tests is that the F-Test is _always_ > two-sided, in the sense that it tests for both differences A>B and B>A. So I > think you already did the test that you intended to do. But formally, the > rejection region is on the right side of the F distribution, and so it > should be indicated in the cfg structure. > > Cheers, > > Gregor > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > >>> "Gregor Volberg" > 9/2/2011 9:45 AM >>> > > Dear Olga and Gopa, > > > I would like to comment on this discussion because I fear that there could > be some misunderstandings. > > Unlike t, the F statistic is not sensitive to the direction of a > difference. The t value gets positive if means of group A > group B, and > negative if B > A. Therefore, the hypothesis that A >< B can be tested on > both tails of the t distribution. On contrast, the F value gets positive if > A > B as well as if B > A. Small values of F, on the left tail of the > distribition, indicate that there is no difference between means of A and B. > This is why a left tail or a two-tailed test does not make sense with an > F-Test. > > So Olga, if you have a two-group design, and if you want to apply a left- > or two-tailed test, then use the t statistic. Beware that the two-sided test > is usually considered more (not less) conservative that the one-sided test. > This is because the critical value of t increases for two-sided tests. It is > the size if the rejection region for H0 that needs to be halved, not the > one-sided critical value of your test statistic. For example, a result of > t(20)= 1.9 is significant in a one-tail right-sided test where it exceeds > the critical value of 1.72 (the 0.95 quantile of a t distribution with 20 > df). But it is not significant in a two sided test where the critical values > are 2.09 (0.975 quantile) and -2.09 (0.025 quantile). > > > Best regards, > > Gregor > > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > >>> Gopakumar Venugopalan 9/1/2011 6:58 PM >>> > > Dear Olga, this does not mean only right tail is possible. You could have a > positive or negative sign for your test statistic, which is acceptable. That > can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and > Condition 2. But to answer your question more substantively: > > A one-tail test is more consevervative than a two-tail test. A two-tail > test is when you have no a priori expectation where you expect the condition > 1 - condition 2 to be higher or lower. Using a non EEG example if you have > two groups treatment and control, you will expect yoga to lower the > depression rates in treatment group and not the control group. > > Similarly if you have two groups treatment and control, you will expect > some protein shake to yield higher muscle mass in the treatment group and > not the control group. In both cases the outcome (negative or lower in > scenario one, higher or positive on scenario two) is an a priori > expectation. So in a EEG sense we know that the Incongruent or deviant word > will have a higher displacement than the congruent or expected word.. > > Going back to the conservative versus liberal nature of the statistic. > > If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of > the tail or the reject region, however when you halve that you tabled value > is half of it. So you obtained value in the first case would have to be > greater than 4.85, while in the two-tail case it slide with anything over > 2.43. Therefore the two-tail is not only for exploratory purposes, but is > also less conservative. > > > I hope I have helped. > > > Warm regards > > gopa > > On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna < > sysoevao at psychiatry.wustl.edu> wrote: > >> Dear Fieldtrippers, >> >> I’ve tried to use between subject ANOVA (independentF) and a bit confused >> with the tails. >> >> I’ve got the following message >> >> “For an independent samples F-statistic, it does not make >> sense to calculate a two-sided critical value.” >> >> Could you explain me why? Why only right tail is possible? >> >> Best Regards, >> >> Olga. >> >> ____________________________________________________________________________ >> >> >> Olga Sysoeva, >> >> Research Associate, PhD >> >> Psychiatry Department, >> >> Washington University School of Medicine >> >> Campus Box 8134 >> >> 660 South Euclid Ave >> >> Saint Louis, MO 63110-9909 >> >> >> >> ------------------------------ >> The materials in this message are private and may contain Protected >> Healthcare Information or other information of a sensitive nature. If you >> are not the intended recipient, be advised that any unauthorized use, >> disclosure, copying or the taking of any action in reliance on the contents >> of this information is strictly prohibited. If you have received this email >> in error, please immediately notify the sender via telephone or return mail. >> >> >> _______________________________________________ >> 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 venug001 at crimson.ua.edu Fri Sep 2 13:36:20 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Fri, 2 Sep 2011 03:36:20 -0800 Subject: [FieldTrip] Antw: Re: ANOVA and tails In-Reply-To: <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> References: <76DC57362137854CB9592B496182D5FA060CECF578@wusmexmbx2.medpriv.wucon.wustl.edu> <4E60A5B1020000570000A935@gwsmtp1.uni-regensburg.de> Message-ID: Thank you Gregor, I said the converse of everything I wanted to say. I appreciate the clarification. I know one thing never type or speak the day you have been sleep deprived. In my case I end up saying the opposite of everything I intended to say (tests of significances included!). Warm regards gopa On Thu, Sep 1, 2011 at 11:45 PM, Gregor Volberg < Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > Dear Olga and Gopa, > > I would like to comment on this discussion because I fear that there could > be some misunderstandings. > > Unlike t, the F statistic is not sensitive to the direction of a > difference. The t value gets positive if means of group A > group B, and > negative if B > A. Therefore, the hypothesis that A >< B can be tested on > both tails of the t distribution. On contrast, the F value gets positive if > A > B as well as if B > A. Small values of F, on the left tail of the > distribition, indicate that there is no difference between means of A and B. > This is why a left tail or a two-tailed test does not make sense with an > F-Test. > > So Olga, if you have a two-group design, and if you want to apply a left- > or two-tailed test, then use the t statistic. Beware that the two-sided test > is usually considered more (not less) conservative that the one-sided test. > This is because the critical value of t increases for two-sided tests. It is > the size if the rejection region for H0 that needs to be halved, not the > one-sided critical value of your test statistic. For example, a result of > t(20)= 1.9 is significant in a one-tail right-sided test where it exceeds > the critical value of 1.72 (the 0.95 quantile of a t distribution with 20 > df). But it is not significant in a two sided test where the critical values > are 2.09 (0.975 quantile) and -2.09 (0.025 quantile). > > Best regards, > > Gregor > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > >>> Gopakumar Venugopalan 9/1/2011 6:58 PM >>> > > Dear Olga, this does not mean only right tail is possible. You could have a > positive or negative sign for your test statistic, which is acceptable. That > can be fixed in Fieldtrip or EEGLAB by the order you enter Condition1 and > Condition 2. But to answer your question more substantively: > > A one-tail test is more consevervative than a two-tail test. A two-tail > test is when you have no a priori expectation where you expect the condition > 1 - condition 2 to be higher or lower. Using a non EEG example if you have > two groups treatment and control, you will expect yoga to lower the > depression rates in treatment group and not the control group. > > Similarly if you have two groups treatment and control, you will expect > some protein shake to yield higher muscle mass in the treatment group and > not the control group. In both cases the outcome (negative or lower in > scenario one, higher or positive on scenario two) is an a priori > expectation. So in a EEG sense we know that the Incongruent or deviant word > will have a higher displacement than the congruent or expected word.. > > Going back to the conservative versus liberal nature of the statistic. > > If the tabled value of the F (df1=1, df2=11) is 4.84 that is the size of > the tail or the reject region, however when you halve that you tabled value > is half of it. So you obtained value in the first case would have to be > greater than 4.85, while in the two-tail case it slide with anything over > 2.43. Therefore the two-tail is not only for exploratory purposes, but is > also less conservative. > > I hope I have helped. > > Warm regards > > gopa > > On Thu, Sep 1, 2011 at 7:51 AM, Sysoeva, Olga Vladimirovna < > sysoevao at psychiatry.wustl.edu> wrote: > >> Dear Fieldtrippers, >> >> I’ve tried to use between subject ANOVA (independentF) and a bit confused >> with the tails. >> >> I’ve got the following message >> >> “For an independent samples F-statistic, it does not make sense to >> calculate a two-sided critical value.” >> >> Could you explain me why? Why only right tail is possible? >> >> Best Regards, >> >> Olga. >> >> ____________________________________________________________________________ >> >> >> Olga Sysoeva, >> >> Research Associate, PhD >> >> Psychiatry Department, >> >> Washington University School of Medicine >> >> Campus Box 8134 >> >> 660 South Euclid Ave >> >> Saint Louis, MO 63110-9909 >> >> >> ------------------------------ >> The materials in this message are private and may contain Protected >> Healthcare Information or other information of a sensitive nature. If you >> are not the intended recipient, be advised that any unauthorized use, >> disclosure, copying or the taking of any action in reliance on the contents >> of this information is strictly prohibited. If you have received this email >> in error, please immediately notify the sender via telephone or return mail. >> >> >> _______________________________________________ >> 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 alotof_xd at yahoo.com Sat Sep 3 04:27:59 2011 From: alotof_xd at yahoo.com (alotof eve) Date: Fri, 2 Sep 2011 19:27:59 -0700 (PDT) Subject: [FieldTrip] 4D data reading problem Message-ID: <1315016879.43614.YahooMailNeo@web125508.mail.ne1.yahoo.com> Hello experts! I need help on 4D data reading with ft_read_header. When I type hdr = ft_read_header('e,rfhp1.0Hz,COH) It always shows such error: ??? Error using ==> _colonobj Function '_colonobj' is not defined for values of class 'uint32'. Error in ==> C:\MATLAB6p5\toolbox\fieldtrip-20110420\fileio\private\read_4d_hdr.m On line 105  ==>     for event = 1:header.epoch_data(epoch).total_var_events Error in ==> C:\MATLAB6p5\toolbox\fieldtrip-20110420\fileio\ft_read_header.m On line 153  ==>     orig            = read_4d_hdr(datafile); I checked into the program and I am sure the error is from "for event = 1:header.epoch_data(epoch).total_var_events" which is line 153 in read_4d_hdr.m I tracked and got information before this sentence that in this data, epoch = [1, 2, 3, 4, 5]; epoch_data(epoch).total_var_events = [65536, 1.6511e+009, 0, 0, 0]; Cannot understand why it said "Function '_colonobj' is not defined for values of class 'uint32'." Any suggestions to settle this? Thanks, Eve -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Sun Sep 4 08:24:15 2011 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Sun, 4 Sep 2011 08:24:15 +0200 Subject: [FieldTrip] 4D data reading problem In-Reply-To: <1315016879.43614.YahooMailNeo@web125508.mail.ne1.yahoo.com> References: <1315016879.43614.YahooMailNeo@web125508.mail.ne1.yahoo.com> Message-ID: <27E08D8C-E9B2-4548-B221-31C831FA8974@uni-konstanz.de> Hi Eve, > Hello experts! > > I need help on 4D data reading with ft_read_header. > When I type hdr = ft_read_header('e,rfhp1.0Hz,COH) > could it be that you are trying to read a file containing the coil measurement only? Just try the same without the extension ',COH' that should work. Good luck tzvetan ******************************************* Tzvetan Popov Clinical Psychology University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-883086 Fax: 0049-7531-884601 Email: tzvetan.popov at uni-konstanz.de ******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at yahoo.com Sun Sep 4 22:52:02 2011 From: alotof_xd at yahoo.com (alotof eve) Date: Sun, 4 Sep 2011 13:52:02 -0700 (PDT) Subject: [FieldTrip] 4D data reading problem In-Reply-To: <27E08D8C-E9B2-4548-B221-31C831FA8974@uni-konstanz.de> References: <1315016879.43614.YahooMailNeo@web125508.mail.ne1.yahoo.com> <27E08D8C-E9B2-4548-B221-31C831FA8974@uni-konstanz.de> Message-ID: <1315169522.94243.YahooMailNeo@web125503.mail.ne1.yahoo.com> Hi, Tzvetan, Thank you firstly. I tried it as your suggestion but still failed. I also tried another type of data "c,rfDC", same problem happened. A possibility I guess is that I run matlab under windows. I just found similar problem reported before and Jan-Mathijsmentioned that it might due to using windows. Just want to make sure if mine is the same problem and the possible way to settle it. Thanks, Eve ________________________________ From: Tzvetan Popov To: alotof eve ; Email discussion list for the FieldTrip project Sent: Saturday, September 3, 2011 11:24 PM Subject: Re: [FieldTrip] 4D data reading problem Hi Eve, Hello experts! > > >I need help on 4D data reading with ft_read_header. >When I type hdr = ft_read_header('e,rfhp1.0Hz,COH) > >could it be that you are trying to read a file containing the coil measurement only? Just try the same without the extension ',COH' that should work. Good luck tzvetan ******************************************* Tzvetan Popov   Clinical Psychology        University of Konstanz Box 23 78457 Konstanz, GERMANY Phone: 0049-7531-883086 Fax:      0049-7531-884601 Email:  tzvetan.popov at uni-konstanz.de******************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Mon Sep 5 12:59:37 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Mon, 5 Sep 2011 12:59:37 +0200 (CEST) Subject: [FieldTrip] Forward solution using concentric spheres and BEM models In-Reply-To: <586785902.1159239.1315218794046.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <780740987.1159792.1315220377719.JavaMail.root@draco.zimbra.ru.nl> Dear Juan Pablo and Margit The function 'ft_prepare_mesh' takes care of triangulating every compartment via the cfg.tissue option. This option contains the integers which describe a type of tissue, given that the user beforehand defined all voxels of the segmented MRI compartment as having that particular value. As an example, download the sample MRI in FieldTrip ftp location: ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip Create a folder and unzip these files. % read in the mri mri = ft_read_mri('Subject01.mri'); % segment it cfg = []; cfg.output = {'scalp', 'skull', 'brain'}; seg = ft_volumesegment(cfg, mri); % assign a label scalp = (seg.scalp) & ~(seg.skull | seg.brain); skull = 2*(seg.skull); brain = 3*(seg.brain); mri_segment = scalp + skull + brain; % build the meshes cfg = []; cfg.method = 'segmentation'; cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; cfg.numvertices = [2000 1000 800]; cfg.sourceunits = 'mm'; cfg.mriunits = 'mm'; bnd = ft_prepare_mesh(cfg, mri_segment); If any of the tissues has a different value from cfg.tissues this won't be triangulated. To check for this use ft_sourceplot in the interactive mode. By clicking around you can see the tissue's value in the command window: % view the labelled segmentations mri2 = mri; mri2.seg = mri_segment; cfg=[]; cfg.interactive = 'yes'; cfg.funparameter = 'seg'; ft_sourceplot(cfg,mri2); About the concentric spheres: both ways to derive a concentric spheres model are correct. In one case you directly build the vol structure and you assume you know the radiuses of your spheres. In the other case you allow the ft_prepare_concentricspheres function to build the spheres starting from realistic geometrical boundaries. The second approach is my favorite because the ft_prepare function contains a function that fits a sphere to each boundary and I don't have to do it myself. The first approach (directly force the radiuses in your vol structure) is preferable if you derive the information from other software (e.g. CTF's MRIView) or if you fit the sphere yourself. @Pablo If the sphere is fitted inside the brain it is correct. You do not want the sphere to include other tissues, because your assumption for the construction of the forward model is that the tissue inside the sphere is homogeneous. For a more realistic model (encompassing the whole brain volume) I would rather use a BEM model. I hope this helps, Cristiano ----- "Margit Schönherr" schreef: > Van: "Margit Schönherr" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Vrijdag 19 augustus 2011 17:23:34 > Onderwerp: Re: [FieldTrip] Forward solution using concentric spheres and BEM models > > Hello Juan Pablo, > > I am using fieldtrip-20110603. > Now that you say, that your problem persisted, I remember having > changed the code of prepare_mesh_segmentation. You find the function > in the private directory. In line 25, it sets cfg.tissue = 1 if mri > has fields 'brain' or 'scalp'. I think this explains why the > segmentation is done for compartment 1 only. So I have simply > commented this line, so that cfg.tissue is left unchanged, and the > segmentation is done for all compartments. > > I know that this is bad style, but I wanted to get it working. And > since I was relatively new to fieldtrip, I hesitated to ask the > discussion list... > > I hope this helps. And I'm open for better solutions. > Best, > Margit > > > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > im Auftrag von Juan Pablo Neira [jpnv2006 at gmail.com] > Gesendet: Freitag, 19. August 2011 16:01 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] Forward solution using concentric spheres and > BEM models > > Thank you Margit for your help, > > I tried your sugestion to create the geometrical description of the > brain, skull and scalp but > I am still having the same output bnd = 1x1 struct (pnt and tri just > of the brain). I should have > bnd = 1x3 struct (pnt and tri of the brain, skull and scalp). > > This is the information in the command line in matlab > not downsampling brain > not downsampling scalp > not downsampling skull > using the segmentation approach > using the segmented MRI > triangulating the boundary of compartment 1 > segmentation compartment 1 of 1 completed > > Can you tell me which version of fieldtrip (fieldtrip-yyyymmdd) are > you using so i could compare the code of the > function ft_prepare_mesh. > > Regards, > > Juan Pablo > > 2011/8/18 Schönherr, Margit : > > Hello, > > > > I probably cannot help you with all your questions, but currently > I'm also dealing with MRI segmentation and volume conductors, so maybe > my solutions can be useful for you. > > Concerning your point 5 (geometrical description of the brain, > skull, and scalp), I have done it the following way: > > > > cfg = []; > > cfg.method = 'segmentation'; > > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > > cfg.numvertices = [2000 1000 800]; > > cfg.sourceunits = 'mm'; > > cfg.mriunits = 'mm'; > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > I think you have to specify a vector 'cfg.numvertices', a number of > vertices for each compartment. > > By the way, at the beginning of ft_prepare_mesh the cfg-field > 'numcompartments' is removed from the cfg structure (at least in my > fieldtrip version, which is not the latest). > > > > Another question that comes to me is, why you need the segmented MRI > for a concentric spheres volume conductor? So, regarding point 6, you > can build such a vol-structure for example like this: > > > > vol.unit = 'm'; > > vol.o = origin; > > vol.r = [R_brain R_skull R_skin]; > > vol.c = [1 1/80 1]; > > > > By this, you can also define the radius as you like. > > > > Best, > > Margit > > > > > > > > > > ________________________________________ > > Von: fieldtrip-bounces at donders.ru.nl > [fieldtrip-bounces at donders.ru.nl] im Auftrag von Juan Pablo Neira > [jpnv2006 at gmail.com] > > Gesendet: Mittwoch, 17. August 2011 14:58 > > An: fieldtrip at donders.ru.nl > > Betreff: [FieldTrip] Forward solution using concentric spheres and > BEM models > > > > Hello, > > > > I am working with an individual MRI and EEG data to do the forward > > solution with two different volume's model (concentric spheres and > > BEM), > > so at the end i can compare the results. But i did not have the > > expected results of the concentric spheres model until now. > > > > This is my script: > > > > 1. Read individual MRI > > mri=ft_read_mri('data_patient_1\******.hdr'); > > > > %I got this "Warning: flipping 1st dimension (L-R) to obtain volume > in > > neurological convention" > > > > %How can i do a homogenous transformation matrix, using the voxel > dimensions > > %that are specified in hdr.dime.pixdim? > > > > 2. Realign to 'head coordinates' > > > > 3. MRI Reslicing > > > > 4. MRI segmentation: (brain, skull,scalp) > > > > 5. Create geometrical description of the brain, skull and scalp (3 > compartments) > > > > cfg = []; > > cfg.interactive = 'no'; %segmentation method > > cfg.numvertices = 3000; > > cfg.sourceunits = 'mm'; > > cfg.downsample = 2; > > cfg.numcompartments = 3; > > cfg.tissue = {'brain' 'skull' 'scalp'}; > > cfg.smooth = 'yes'; > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > %The output just give me the geometrical description of the brain. > > How can i get the geometrical description of > > %the skull and scalp also to proceed to create a 3 spheres > concentric > > sphere model? > > > > 6. If i have the 3 geometrical descriptions (brain, skull and > scalp). > > Create a 3 concentric spheres model. > > > > cfg = []; > > cfg.headshape = [bnd1 bnd2 bnd3]; % brain- skull - scalp > > cfg.conductivity = [0.33 0.0042 0.331]; > > [vol, cfg] = prepare_concentricspheres(cfg); > > > > %I got the model but part of the brain is outside of its sphere and > > also the skull. How can I increase the radius so > > % the whole brain will be inside its sphere and also the skull? > The > > sphere of the scalp fix good. > > > > I hope someone can help me solve these questions. > > > > Regards, > > > > Juan Pablo > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Nina.Kahlbrock at uni-duesseldorf.de Mon Sep 5 14:45:53 2011 From: Nina.Kahlbrock at uni-duesseldorf.de (Nina Kahlbrock) Date: Mon, 05 Sep 2011 14:45:53 +0200 Subject: [FieldTrip] effect sizes in M/EEG data Message-ID: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> Dear statistic experts, I have a rather general question concerning effect sizes. I understand that t-values give me an approximation of the effect size, as they state how big the difference between two conditions is by taking into account the variance and the number of observations. However, as I recall, effect sizes (like Cohen’s d) are computed in order to find out how important the effect is, independent of the number of observations. However, if I understand the code correctly, dependent samples t-values are computed in a very similar way as Cohen’s d (which is “the” value for effect sizes), both including the variance and thus the number of observations in their functions. In order to draw conclusions about the importance of the observed effect, is it necessary to compute effect sizes like Cohen’s d or is it sufficient to compute t-values as effect sizes for M/EEG data? If important to compute effect sizes in a way different from t-values, does anyone know of a function that computes effect sizes like that in FT? Thank you in advance for your answer. Best Regards, Nina - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Nina Kahlbrock Institute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Düsseldorf Tel.: +49 211 81 18075 Fax. .: +49 211 81 19916 Mail: Nina.Kahlbrock at med.uni-duesseldorf.de http://www.uniklinik-duesseldorf.de/medpsychologie -------------- next part -------------- An HTML attachment was scrubbed... URL: From Gregor.Volberg at psychologie.uni-regensburg.de Tue Sep 6 10:21:45 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Tue, 06 Sep 2011 10:21:45 +0200 Subject: [FieldTrip] Antw: effect sizes in M/EEG data In-Reply-To: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> References: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> Message-ID: <4E65F439020000570000A96D@gwsmtp1.uni-regensburg.de> Dear Nina, dependend samples t values can easily be transformed into Cohen's d as d = t / sqrt(df) [taken from Rosnow & Rosenthal, Effect sizes for Experimenting Psychologists, Canadian Journal of Experimental Psychology, 2003, 57:3, 221-237; you should find a pdf copy with a search on Google scholar]. For example, a t value of 5.15 with 19 degrees of freedom corresponds to a d of 5.15/sqrt(19) = 1.18. So just compute depsamplesT and divide the resulting vector or matrix by the number of dfs - no further FT functions are needed. My two cents are that effect sizes are especially useful for integrating results across studies where the very same design is applied to different samples, e.g., in clinical trials on pharmaceutical products. In EEG/MEG studies, even when they are on the same topic, there will be very divergent experimenting protocols (timing, task, etc), and also the dependent variable will differ from study to study, depending on the chosen time points / frequencies / channels of interest. A common effect size metric like Cohen's d does not improve the comparibility much in this case. I would therefore simply report the t statistic along with the corresponding df and p, and leave it for the interested reader to compute the corresponding d if there should be a need for that. Best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Nina Kahlbrock 9/5/2011 2:45 PM >>> Dear statistic experts, I have a rather general question concerning effect sizes. I understand that t-values give me an approximation of the effect size, as they state how big the difference between two conditions is by taking into account the variance and the number of observations. However, as I recall, effect sizes (like Cohen’s d) are computed in order to find out how important the effect is, independent of the number of observations. However, if I understand the code correctly, dependent samples t-values are computed in a very similar way as Cohen’s d (which is “the” value for effect sizes), both including the variance and thus the number of observations in their functions. In order to draw conclusions about the importance of the observed effect, is it necessary to compute effect sizes like Cohen’s d or is it sufficient to compute t-values as effect sizes for M/EEG data? If important to compute effect sizes in a way different from t-values, does anyone know of a function that computes effect sizes like that in FT? Thank you in advance for your answer. Best Regards, Nina - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Nina Kahlbrock Institute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Düsseldorf Tel.: +49 211 81 18075 Fax. .: +49 211 81 19916 Mail: Nina.Kahlbrock at med.uni-duesseldorf.de http://www.uniklinik-duesseldorf.de/medpsychologie -------------- next part -------------- An HTML attachment was scrubbed... URL: From dualitystan at gmail.com Tue Sep 6 11:16:25 2011 From: dualitystan at gmail.com (Stanley Klein) Date: Tue, 6 Sep 2011 02:16:25 -0700 Subject: [FieldTrip] Antw: effect sizes in M/EEG data In-Reply-To: <4E65F439020000570000A96D@gwsmtp1.uni-regensburg.de> References: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> <4E65F439020000570000A96D@gwsmtp1.uni-regensburg.de> Message-ID: Dear Nina, Gregor is correct. A simple way to think of it is that effect size (d) is the distance between two means divided by the standard deviation of the data (like IQ). For determining significance one uses t, which is the same difference of the means, but now divided by the standard error (the standard deviation of the means). SD doesn't depend on the number of trials, but SE does. I often advocate reporting d plus its standard error. That way one can avoid reporting an embarrassing naked statistic (a number without its error bar). Stan On Tue, Sep 6, 2011 at 1:21 AM, Gregor Volberg < Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > Dear Nina, > > dependend samples t values can easily be transformed into Cohen's d as d = > t / sqrt(df) [taken from Rosnow & Rosenthal, Effect sizes for Experimenting > Psychologists, Canadian Journal of Experimental Psychology, 2003, 57:3, > 221-237; you should find a pdf copy with a search on Google scholar]. For > example, a t value of 5.15 with 19 degrees of freedom corresponds to a d of > 5.15/sqrt(19) = 1.18. So just compute depsamplesT and divide the resulting > vector or matrix by the number of dfs - no further FT functions are needed. > > My two cents are that effect sizes are especially useful for integrating > results across studies where the very same design is applied to different > samples, e.g., in clinical trials on pharmaceutical products. In EEG/MEG > studies, even when they are on the same topic, there will be very divergent > experimenting protocols (timing, task, etc), and also the dependent variable > will differ from study to study, depending on the chosen time points / > frequencies / channels of interest. A common effect size metric like Cohen's > d does not improve the comparibility much in this case. I would therefore > simply report the t > > statistic along with the corresponding df and p, and leave it for the > interested reader to compute the corresponding d if there should be a need > for that. > > Best regards, > > Gregor > > > > > -- > Dr. rer. nat. Gregor Volberg > ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) > University of Regensburg > Institute for Experimental Psychology > 93040 Regensburg, Germany > Tel: +49 941 943 3862 > Fax: +49 941 943 3233 > http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html > > > > >>> Nina Kahlbrock 9/5/2011 2:45 PM > >>> > > Dear statistic experts,**** > > ** ** > > I have a rather general question concerning effect sizes. I understand that > t-values give me an approximation of the effect size, as they state how big > the difference between two conditions is by taking into account the variance > and the number of observations. However, as I recall, effect sizes (like > Cohen’s d) are computed in order to find out how important the effect is, > independent of the number of observations. However, if I understand the code > correctly, dependent samples t-values are computed in a very similar way as > Cohen’s d (which is “the” value for effect sizes), both including the > variance and thus the number of observations in their functions.**** > > In order to draw conclusions about the importance of the observed effect, > is it necessary to compute effect sizes like Cohen’s d or is it sufficient > to compute t-values as effect sizes for M/EEG data? If important to compute > effect sizes in a way different from t-values, does anyone know of a > function that computes effect sizes like that in FT?**** > > ** ** > > Thank you in advance for your answer.**** > > ** ** > > Best Regards,**** > > ** ** > > Nina**** > > ** ** > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - -**** > > ** ** > > Nina Kahlbrock**** > > Institute of Clinical Neuroscience and Medical Psychology **** > > Heinrich Heine University Duesseldorf**** > > Universitaetsstr. 1**** > > 40225 Düsseldorf**** > > ** ** > > Tel.: +49 211 81 18075**** > > Fax. .: +49 211 81 19916**** > > ** ** > > Mail: Nina.Kahlbrock at med.uni-duesseldorf.de**** > > http://www.uniklinik-duesseldorf.de/medpsychologie**** > > ** ** > > _______________________________________________ > 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 venug001 at crimson.ua.edu Tue Sep 6 14:14:52 2011 From: venug001 at crimson.ua.edu (Gopakumar Venugopalan) Date: Tue, 6 Sep 2011 04:14:52 -0800 Subject: [FieldTrip] Antw: effect sizes in M/EEG data In-Reply-To: References: <004a01cc6bc9$bf6f4240$cd136386@VMED.UKD> <4E65F439020000570000A96D@gwsmtp1.uni-regensburg.de> Message-ID: Dear All, Stevens (1996) in his multivariate statistics talks about the use of eta squared and partial eta squared for use in F and t tests. He cites Cohen (1977) while saying this: The partial Eta square (η2) has statistical benchmarks (small = .01, medium = .06, and large = .14) (Stevens, 1996). Most stat packages should come with a effect size calculator. In SPSS it is as simple as checking a box in the GUI. Like Gregor and Stanley say D2 (also called the Mahalanobis distance) is used for multivartiate situations. An earlier edition of Stevens (1980) comes with a table of power values for 2 to 7 groups means and alpha of .05 and .10. I believe Gregor is right on the use of this statistic in clinical situations, but is psych not moving in that direction, as I know most psych folks (and all grant applications!) ask for those statistics. Warm regards gopa On Tue, Sep 6, 2011 at 1:16 AM, Stanley Klein wrote: > Dear Nina, Gregor is correct. A simple way to think of it is that effect > size (d) is the distance between two means divided by the standard deviation > of the data (like IQ). For determining significance one uses t, which is the > same difference of the means, but now divided by the standard error (the > standard deviation of the means). SD doesn't depend on the number of > trials, but SE does. I often advocate reporting d plus its standard error. > That way one can avoid reporting an embarrassing naked statistic (a number > without its error bar). > Stan > > On Tue, Sep 6, 2011 at 1:21 AM, Gregor Volberg < > Gregor.Volberg at psychologie.uni-regensburg.de> wrote: > >> Dear Nina, >> >> dependend samples t values can easily be transformed into Cohen's d as d = >> t / sqrt(df) [taken from Rosnow & Rosenthal, Effect sizes for Experimenting >> Psychologists, Canadian Journal of Experimental Psychology, 2003, 57:3, >> 221-237; you should find a pdf copy with a search on Google scholar]. For >> example, a t value of 5.15 with 19 degrees of freedom corresponds to a d of >> 5.15/sqrt(19) = 1.18. So just compute depsamplesT and divide the resulting >> vector or matrix by the number of dfs - no further FT functions are needed. >> >> My two cents are that effect sizes are especially useful for integrating >> results across studies where the very same design is applied to different >> samples, e.g., in clinical trials on pharmaceutical products. In EEG/MEG >> studies, even when they are on the same topic, there will be very divergent >> experimenting protocols (timing, task, etc), and also the dependent variable >> will differ from study to study, depending on the chosen time points / >> frequencies / channels of interest. A common effect size metric like Cohen's >> d does not improve the comparibility much in this case. I would therefore >> simply report the t >> >> statistic along with the corresponding df and p, and leave it for the >> interested reader to compute the corresponding d if there should be a need >> for that. >> >> Best regards, >> >> Gregor >> >> >> >> >> -- >> Dr. rer. nat. Gregor Volberg < >> gregor.volberg at psychologie.uni-regensburg.de> ( mailto: >> gregor.volberg at psychologie.uni-regensburg.de ) >> University of Regensburg >> Institute for Experimental Psychology >> 93040 Regensburg, Germany >> Tel: +49 941 943 3862 >> Fax: +49 941 943 3233 >> http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >> >> >> >> >>> Nina Kahlbrock 9/5/2011 2:45 PM >> >>> >> >> Dear statistic experts,**** >> >> ** ** >> >> I have a rather general question concerning effect sizes. I understand >> that t-values give me an approximation of the effect size, as they state how >> big the difference between two conditions is by taking into account the >> variance and the number of observations. However, as I recall, effect sizes >> (like Cohen’s d) are computed in order to find out how important the effect >> is, independent of the number of observations. However, if I understand the >> code correctly, dependent samples t-values are computed in a very similar >> way as Cohen’s d (which is “the” value for effect sizes), both including the >> variance and thus the number of observations in their functions.**** >> >> In order to draw conclusions about the importance of the observed effect, >> is it necessary to compute effect sizes like Cohen’s d or is it sufficient >> to compute t-values as effect sizes for M/EEG data? If important to compute >> effect sizes in a way different from t-values, does anyone know of a >> function that computes effect sizes like that in FT?**** >> >> ** ** >> >> Thank you in advance for your answer.**** >> >> ** ** >> >> Best Regards,**** >> >> ** ** >> >> Nina**** >> >> ** ** >> >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >> - - - - - - - - - - - - - - - - - - - - -**** >> >> ** ** >> >> Nina Kahlbrock**** >> >> Institute of Clinical Neuroscience and Medical Psychology **** >> >> Heinrich Heine University Duesseldorf**** >> >> Universitaetsstr. 1**** >> >> 40225 Düsseldorf**** >> >> ** ** >> >> Tel.: +49 211 81 18075**** >> >> Fax. .: +49 211 81 19916**** >> >> ** ** >> >> Mail: Nina.Kahlbrock at med.uni-duesseldorf.de**** >> >> http://www.uniklinik-duesseldorf.de/medpsychologie**** >> >> ** ** >> >> _______________________________________________ >> 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 batrod at gmail.com Tue Sep 6 15:28:13 2011 From: batrod at gmail.com (Rodolphe Nenert) Date: Tue, 6 Sep 2011 13:28:13 +0000 (UTC) Subject: [FieldTrip] Invitation to connect on LinkedIn Message-ID: <668305227.10687519.1315315693169.JavaMail.app@ela4-bed81.prod> Email, I'd like to add you to my professional network on LinkedIn. - Rodolphe Rodolphe Nenert Ph.D. at UAB Birmingham, Alabama Area Confirm that you know Rodolphe Nenert: https://www.linkedin.com/e/-deyl8h-gs8x048f-18/isd/4098720488/avYRUa-g/?hs=false&tok=21MBoClA68w4U1 -- You are receiving Invitation to Connect emails. Click to unsubscribe: http://www.linkedin.com/e/-deyl8h-gs8x048f-18/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/goo/fieldtrip%40donders%2Eru%2Enl/20061/I1414007217_1/?hs=false&tok=3uoa9IwGe8w4U1 (c) 2011 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at inria.fr Thu Sep 8 16:39:47 2011 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Thu, 8 Sep 2011 10:39:47 -0400 Subject: [FieldTrip] [ANN] OpenMEEG 2.1 is out Message-ID: Hi, the new release 2.1 of OpenMEEG is finally out. Download page has been updated: https://gforge.inria.fr/frs/?group_id=435 See full changelog below. If you meet any issue, your feed back is very much appreciated. Best regards, Alex for the OpenMEEG team. http://openmeeg.gforge.inria.fr ChangeLog ----------------- Release 2.1: New features: - added the adjoint way for computing a leadfield for either EEG, MEG or MEEG simultaneously. This saves time and memory for big systems (>1000 pts/surfaces). Improvements: - better ordering in computations when inverting the matrix for the memory footprint. - storage now more effective using the matio library even for symmetric matrices. - support for matlab7.3 file format. - reducing memory footprint of DSM, Head2MEG, SurfSource2MEG and DipSource2MEG computations - improved MKL detection - lapack inclusion (experimental) to ease the build on architectures were there is no alternative. Bug corrections: - allowance of spaces in mesh file names with a new .geom format (old format is still accepted). - bug when loading sensor file with no empty line at the end - fix leak in Mesh class Removed features: - TV inverse solver From zizlsperger at gmail.com Thu Sep 8 18:09:57 2011 From: zizlsperger at gmail.com (Leopold Zizlsperger) Date: Thu, 8 Sep 2011 18:09:57 +0200 Subject: [FieldTrip] ft_appenddata Message-ID: Hello thanks in advance for your assistance. I'd like to merge 2 datasets after preprocessing using ft_appendata. Even though it works on first view, "trl" does not add up but keeps the structure of the last dataset (304 in the example): XY_merge=ft_appenddata(cfg, x1, x2); input dataset 1, 29 channels, 301 trials input dataset 2, 29 channels, 304 trials Warning: input data comes from different datafiles > In ft_appenddata at 182 concatenating the trials over all datasets removing sampleinfo field from output output dataset, 29 channels, 605 trials Do I miss the point ? Thanks Best regards Leopold -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 8 21:19:26 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 8 Sep 2011 21:19:26 +0200 Subject: [FieldTrip] ft_appenddata In-Reply-To: References: Message-ID: <7AA3D9A5-8A7A-4D3B-B7D7-759DB34FF7DB@donders.ru.nl> Hi Leo, With 'trl', are you referring to data.cfg.previous. ... .trl? I assume that data.trial (which contains the actual data) has the correct dimensionality of 1x605? In the past, fieldtrip also concatenated the trl-matrices, but we feel that this is not appropriate. The reason for this is, that the first 2 columns of these matrices represent the sample numbers that define the epochs of interest, with respect to the first sample in the recording. If the concatenated data are derived from two different datasets, these numbers become meaningless, because they cannot be interpreted unequivocally anymore. Yet, and I hope that this was motivating your question, the trl-matrix was also used (by some) to store trial-specific information, which of course still is meaningful even if the data comes from different recordings. If this indeed relates to your question, please have a look at: http://fieldtrip.fcdonders.nl/faq/i_used_to_work_with_trl-matrices_that_have_more_than_3_columns._why_is_this_not_supported_anymore If your actual question is of a different nature, could you please explain a bit more what is the problem? Thanks, Jan-Mathijs On Sep 8, 2011, at 6:09 PM, Leopold Zizlsperger wrote: > Hello > thanks in advance for your assistance. > I'd like to merge 2 datasets after preprocessing using ft_appendata. > Even though it works on first view, "trl" does not add up but keeps the structure of the last dataset (304 in the example): > > XY_merge=ft_appenddata(cfg, x1, x2); > input dataset 1, 29 channels, 301 trials > input dataset 2, 29 channels, 304 trials > Warning: input data comes from different datafiles > > In ft_appenddata at 182 > concatenating the trials over all datasets > removing sampleinfo field from output > output dataset, 29 channels, 605 trials > > Do I miss the point ? > > Thanks > Best regards > Leopold > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.muesch at uke.uni-hamburg.de Fri Sep 9 13:00:25 2011 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Fri, 9 Sep 2011 13:00:25 +0200 Subject: [FieldTrip] interaction within-subject indepsamplesT Message-ID: <1238529C-1B93-4BC9-B625-B16991718014@uke.uni-hamburg.de> Hello FieldTrip users, I need your advice on how to correctly test the interaction effects in a 2x2 within-subject design with cluster-based randomization tests. I have two factors A and B with the levels a1/a2 and b1/b2. In addition, the number of trials in A are about twice as much as in B. The procedure would be totally clear in a between-subject design (as in a previous post on the list: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) because I could easily compute the differences of the factor levels A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the differences. However, since I have to run the statistics across trials and not subjects I have independent samples and not dependent samples. If it is possible at all, how can I calculate the differences A_diff and B_diff across trials? Is it a problem that the number of trials are not equal? Any help is appreciated! Best, Kathrin _____________________________________ Kathrin Müsch Dept. of Neurophysiology and Pathophysiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg Germany Phone: +49-40-7410-54680 Fax: +49-40-7410-57752 E-Mail: k.muesch at uke.uni-hamburg.de _____________________________________ -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From m.severens at maartenskliniek.nl Fri Sep 9 21:02:55 2011 From: m.severens at maartenskliniek.nl (Severens, Marianne) Date: Fri, 9 Sep 2011 21:02:55 +0200 Subject: [FieldTrip] ft_appenddata In-Reply-To: <7AA3D9A5-8A7A-4D3B-B7D7-759DB34FF7DB@donders.ru.nl> References: , <7AA3D9A5-8A7A-4D3B-B7D7-759DB34FF7DB@donders.ru.nl> Message-ID: <70FC3ACFFB46314EBEAF9101EA45F50E06AE0F0BCA@smkexch02.maartenskliniek.nl> Hi Leo, Jan-Mathijs I also have the same problem. When appending data from 2 datasets the trialinfo and sampleinfo only contains info from the first dataset. And I need the information to know which trials belong to each condition. I fixed it for my data by concatenating the trialinfo and sampleinfo field myself. You just need to make sure that the funtions you use afterwards do not depend on the sampleinfo field, because this is not correct any more as Jan-Mathijs explained. I'm not sure if this is the best thing to do, but it works for me! Best, Marianne ________________________________________ From: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] On Behalf Of jan-mathijs schoffelen [jan.schoffelen at donders.ru.nl] Sent: Thursday, September 08, 2011 9:19 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] ft_appenddata Hi Leo, With 'trl', are you referring to data.cfg.previous. ... .trl? I assume that data.trial (which contains the actual data) has the correct dimensionality of 1x605? In the past, fieldtrip also concatenated the trl-matrices, but we feel that this is not appropriate. The reason for this is, that the first 2 columns of these matrices represent the sample numbers that define the epochs of interest, with respect to the first sample in the recording. If the concatenated data are derived from two different datasets, these numbers become meaningless, because they cannot be interpreted unequivocally anymore. Yet, and I hope that this was motivating your question, the trl-matrix was also used (by some) to store trial-specific information, which of course still is meaningful even if the data comes from different recordings. If this indeed relates to your question, please have a look at: http://fieldtrip.fcdonders.nl/faq/i_used_to_work_with_trl-matrices_that_have_more_than_3_columns._why_is_this_not_supported_anymore If your actual question is of a different nature, could you please explain a bit more what is the problem? Thanks, Jan-Mathijs On Sep 8, 2011, at 6:09 PM, Leopold Zizlsperger wrote: Hello thanks in advance for your assistance. I'd like to merge 2 datasets after preprocessing using ft_appendata. Even though it works on first view, "trl" does not add up but keeps the structure of the last dataset (304 in the example): XY_merge=ft_appenddata(cfg, x1, x2); input dataset 1, 29 channels, 301 trials input dataset 2, 29 channels, 304 trials Warning: input data comes from different datafiles > In ft_appenddata at 182 concatenating the trials over all datasets removing sampleinfo field from output output dataset, 29 channels, 605 trials Do I miss the point ? Thanks Best regards Leopold _______________________________________________ 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 Disclaimer Vrijgave van de informatie verzonden met dit e-mail bericht is geaccordeerd door de ontvanger en/of zijn behandelend arts. Verstrekking van deze informatie is conform het Privacy reglement van de Sint Maartenskliniek. De informatie is uitsluitend bestemd voor de geadresseerde. Gebruik van deze informatie door anderen dan de geadresseerde is, zonder voorafgaande schriftelijke toestemming van de rechthebbende , verboden. De Sint Maartenskliniek staat niet in voor de juiste en volledige overbrenging van de inhoud van een gezonden e-mail, noch voor de ontvangst daarvan. Sint Maartenskliniek Hengstdal 3, 6574 NA Ubbergen (bij Nijmegen) Telefoon 024-3659 911 Telefax 024-3659 204 KvK nummer 41055111 From member at linkedin.com Sun Sep 11 12:10:49 2011 From: member at linkedin.com (Baptiste Gauthier via LinkedIn) Date: Sun, 11 Sep 2011 10:10:49 +0000 (UTC) Subject: [FieldTrip] Join my network on LinkedIn Message-ID: <1086134875.2200977.1315735849733.JavaMail.app@ela4-app0132.prod> LinkedIn ------------ Baptiste Gauthier requested to add you as a connection on LinkedIn: ------------------------------------------ I'd like to add you to my professional network on LinkedIn. Accept invitation from Baptiste Gauthier http://www.linkedin.com/e/-deyl8h-gsfv5j41-5i/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/blk/I1691228710_3/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYPnP0NdPwOcz4Vdz59bSVHgndQkTFMbPcRcPsUd34ScjgLrCBxbOYWrSlI/EML_comm_afe/?hs=false&tok=21QZ12ECDyCQU1 View invitation from Baptiste Gauthier http://www.linkedin.com/e/-deyl8h-gsfv5j41-5i/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/blk/I1691228710_3/3dvc34Te38OcjASckALqnpPbOYWrSlI/svi/?hs=false&tok=1C0mlKX7XyCQU1 -- (c) 2011, LinkedIn Corporation -------------- next part -------------- An HTML attachment was scrubbed... URL: From member at linkedin.com Sun Sep 11 12:18:16 2011 From: member at linkedin.com (Baptiste Gauthier via LinkedIn) Date: Sun, 11 Sep 2011 10:18:16 +0000 (UTC) Subject: [FieldTrip] Join my network on LinkedIn Message-ID: <1509982244.2166452.1315736296272.JavaMail.app@ela4-bed78.prod> LinkedIn ------------ Baptiste Gauthier requested to add you as a connection on LinkedIn: ------------------------------------------ I'd like to add you to my professional network on LinkedIn. Accept invitation from Baptiste Gauthier http://www.linkedin.com/e/-deyl8h-gsfvf3nw-2r/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/blk/I1691235494_3/1BpC5vrmRLoRZcjkkZt5YCpnlOt3RApnhMpmdzgmhxrSNBszYPnPgVd3kPcz4Vdz59bSVHgndQkTFMbPcRcPsUd34ScjgLrCBxbOYWrSlI/EML_comm_afe/?hs=false&tok=3IMll11h_GCQU1 View invitation from Baptiste Gauthier http://www.linkedin.com/e/-deyl8h-gsfvf3nw-2r/2ql61bZWrtgNAx4NauUqWbaswiGNhc8KtyoV/blk/I1691235494_3/3dvd3AQdjcOcjASckALqnpPbOYWrSlI/svi/?hs=false&tok=3CAp_HJI3GCQU1 -- (c) 2011, LinkedIn Corporation -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Sep 12 08:51:48 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 12 Sep 2011 08:51:48 +0200 Subject: [FieldTrip] Fwd: Filtering References: Message-ID: <927A2866-EB73-4C63-A716-8435E4B562BC@donders.ru.nl> Hi Tadeusz, I forward the reply to your question to this forum, because other people may benefit from the discussion. Also, for future questions, it would be good if you directed any question to this list. Everybody can participate in the discussion, increasing the odds for its resolution. Also, in general, when posting a question it would be good to provide as many details as possible (with respect to matlab version, fieldtrip version etc, but also with for example relevant screen dumps). As to your question, please have a look at the pasted matlab-code and attached figure below. In short, I tried to reproduce your problem, but I fail to do so (because the blue and red lines look different enough). Be sure that you use an up-to-date version of FieldTrip. I remember that there have been some problems with filtering in the past, but these have been resolved quite some time ago (at least > 0.5 year or even longer). Best wishes, Jan-Mathijs >> data = []; >> data.trial{1} = randn(1,10000); >> data.time{1} = (0:9999)/1000; >> data.fsample = 1000; >> data.label = {'1'}; >> cfg = []; >> cfg.bpfilter = 'yes'; >> cfg.bpfreq = [0.01 0.2]; >> cfg.bpfilttype = 'fir'; >> datafilt = ft_preprocessing(cfg, data); Warning: the data does not contain a trial definition > In utilities/private/warning_once at 81 In utilities/private/fixsampleinfo at 51 In ft_datatype_raw at 95 In ft_checkdata at 170 In ft_preprocessing at 284 Warning: reconstructing sampleinfo by assuming that the trials are consecutive segments of a continuous recording > In utilities/private/warning_once at 81 In utilities/private/fixsampleinfo at 64 In ft_datatype_raw at 95 In ft_checkdata at 170 In ft_preprocessing at 284 preprocessing preprocessing trial 1 from 1 the call to "ft_preprocessing" took 1 seconds and an estimated 8 MB >> figure;plot(data.trial{1});hold on;plot(datafilt.trial{1},'r'); Begin forwarded message: > From: "T.W. Kononowicz" > Date: September 9, 2011 3:01:07 PM GMT+02:00 > To: > Subject: Filtering > > Dear Prof. Schoffelen, > > I am trying to filter continuous data using the following code. However, this procedure doesn't affect the data at all. It looks similarly for low and high pass filtering options. I am really puzzled what could go wrong here. Any suggestions? > > cfg = []; > cfg.dataset = '01_21_mRef.vhdr'; > chans = {'FCz' 'Cz' 'Fz'}; > cfg.channel = chans; > cfg.bpfilter = 'yes'; > cfg.bpfilttype = 'fir'; > cfg.bpfreq = [0.01 0.2]; > data = ft_preprocessing(cfg); > > Thank you in advance, > > Tadeusz Kononowicz > University of Groningen, Experimental Psychology > > Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: untitled.png Type: image/png Size: 6767 bytes Desc: not available URL: From justin.sickkids at hotmail.com Tue Sep 13 00:07:36 2011 From: justin.sickkids at hotmail.com (JustinChen) Date: Mon, 12 Sep 2011 18:07:36 -0400 Subject: [FieldTrip] bufferviewer C++ code Message-ID: Hey, all, Recently I want to try to compile the bufferviewer C++ source code under the directory: fieldtrip/realtime/utilities/viewer/. I tried to use the Microsoft Visual C++ IDE to compile the code but it failed, and now I am using the Eclipse+MinGW under the windows environment to compile it. Does anyone know what environment the C++ codes were compiled and debugged originally? And also I notice the code uses the FLTK API pakage to draw the GUI part, any other API libraries required to compile the code? Anybody who is familiar with the code please reply and I really appreciate your help. Thanks and have a good day! Justin -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Tue Sep 13 09:38:49 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 13 Sep 2011 09:38:49 +0200 Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function or method 'randperm' for input arguments of type 'double'.) Message-ID: Dear fieldtrippers, I wish to calculate the stat difference between stimulus and baseline in a group of subjects. I use ft_freqgrandaverage to average across subjects and then ft_freqstatistics (cluster statistic) to compare the 2 conditions (baseline & stimuli). I get this error: ??? Undefined function or method 'randperm' for input arguments of type 'double'. I tried even with the newest version (20110911) but the problem persists. I am not sure what I have to do. Any advice would be super. The script is below. Thanks a lot, Davide datainpath = '/data/home1/drivolta/Out4VG/DATA/'; dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; % Controls Controls = { 'ASS31_TFR_high.mat'; 'CSA07_TFR_high.mat'; 'BMR08_TFR_high.mat'; 'NPD18_TFR_high.mat'; %'BSA08_TFR_high.mat'; %'ABE08_TFR_high.mat'; %'EES05_TFR_high.mat'; %'GPS10_TFR_high.mat'; %'SDA01_TFR_high.mat'; %'CSA17_TFR_high.mat'; %'KBZ16_TFR_high.mat'; }; %-------------------------------------------------------------------------- NControls = length(Controls); %% CONCATENATE DATA for i = 1:length(Controls) fullname = strcat(datainpath, Controls{i,1}); load(fullname); % Activation time window TFR2 = power_continue_high; %Rename to change (select time window) idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); TFR2.time = power_continue_high.time(idx); Stimuli{i} = TFR2; % Baseline time window TFR3 = power_continue_high; idx = find((TFR3.time >= -1) &(TFR3.time < 0)); TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); TFR3.time = TFR2.time; Baseline{i} = TFR3; clear power_continue_high clear TFR2 clear TFR3 end; save Controls2Statistics Stimuli Baseline; cfg = []; cfg.channel = {'MEG', '-MRO31', '-MRO21'}; cfg.keepindividual = 'yes'; BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure containing grad field cfg = []; cfg.method = 'triangulation'; cfg.neighbourdist = 5; cfg.grad = TFR.grad; cfg.layout = 'CTF275.lay'; neighbour = ft_neighbourselection(cfg, Baseline{1}); cfg = []; cfg.grad = TFR.grad; cfg.channel = {'MEG', '-MRO31', '-MRO21'}; cfg.neighbourdist = 4; cfg.minnbchan = 1; cfg.clusteralpha = 0.05; % control admission to a cluster cfg.alpha = 0.05; % control the false alarm rate of the permutation test cfg.latency = [0.5 1.5]; % time interval over which the experimental conditions are compared (in sec) cfg.frequency = [50 70]; cfg.avgovertime = 'no'; cfg.avgoverfreq = 'no'; cfg.avgoverchan = 'no'; cfg.clusterstatistics = 'maxsum'; cfg.statistic = 'actvsblT'; cfg.numrandomization = 1000; cfg.correctm = 'cluster'; cfg.method = 'montecarlo'; cfg.approach = 'montecarlo'; cfg.dimord = 'chan_freq_time'; cfg.dim = 'chan_freq_time'; cfg.neighbours = neighbour; cfg.tail = 0; cfg.clustertail = 0; nSubjects = 2*length(Controls); a = [1:nSubjects]; b = ones(1,length(Controls)); c = 2*(ones(1,length(Controls))); cfg.design = [a; b c]; cfg.uvar = 1; % "subject" is unit of observation cfg.ivar = 2; % row of the design matrix that contains the independent variable stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Tue Sep 13 11:00:13 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Tue, 13 Sep 2011 11:00:13 +0200 Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function or method 'randperm' for input arguments of type 'double'.) In-Reply-To: References: Message-ID: <4E6F1B9D.3050003@donders.ru.nl> Hi Davide, It sounds like you are missing the Statistics Toolbo x for matlab. I remember some internal discussions in the team about writing an internal version of randperm.m with similar functions, but we haven't done so far if I recall correctly. Installing the toolbox, or checking whether you have it on your path should solve your problem. Hope it helps, Roemer On 13-09-11 9:38, Davide Rivolta wrote: > Dear fieldtrippers, > I wish to calculate the stat difference between stimulus and baseline > in a group of subjects. I use ft_freqgrandaverage to average across > subjects and then ft_freqstatistics (cluster statistic) to compare the > 2 conditions (baseline & stimuli). > I get this error: ??? Undefined function or method 'randperm' for > input arguments of type 'double'. > I tried even with the newest version (20110911) but the problem > persists. I am not sure what I have to do. > Any advice would be super. The script is below. > Thanks a lot, > Davide > datainpath = '/data/home1/drivolta/Out4VG/DATA/'; > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; > > % Controls > Controls = { > 'ASS31_TFR_high.mat'; > 'CSA07_TFR_high.mat'; > 'BMR08_TFR_high.mat'; > 'NPD18_TFR_high.mat'; > %'BSA08_TFR_high.mat'; > %'ABE08_TFR_high.mat'; > %'EES05_TFR_high.mat'; > %'GPS10_TFR_high.mat'; > %'SDA01_TFR_high.mat'; > %'CSA17_TFR_high.mat'; > %'KBZ16_TFR_high.mat'; > > }; > %-------------------------------------------------------------------------- > NControls = length(Controls); > %% CONCATENATE DATA > for i = 1:length(Controls) > fullname = strcat(datainpath, Controls{i,1}); > load(fullname); > > % Activation time window > TFR2 = power_continue_high; %Rename to change (select time window) > idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); > TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); > TFR2.time = power_continue_high.time(idx); > Stimuli{i} = TFR2; > > % Baseline time window > TFR3 = power_continue_high; > idx = find((TFR3.time >= -1) &(TFR3.time < 0)); > TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); > TFR3.time = TFR2.time; > Baseline{i} = TFR3; > > clear power_continue_high > clear TFR2 > clear TFR3 > end; > save Controls2Statistics Stimuli Baseline; > > cfg = []; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.keepindividual = 'yes'; > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure > containing grad field > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbourdist = 5; > cfg.grad = TFR.grad; > cfg.layout = 'CTF275.lay'; > neighbour = ft_neighbourselection(cfg, Baseline{1}); > cfg = []; > cfg.grad = TFR.grad; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.neighbourdist = 4; > cfg.minnbchan = 1; > cfg.clusteralpha = 0.05; % control admission to a cluster > cfg.alpha = 0.05; % control the false alarm rate of the > permutation test > cfg.latency = [0.5 1.5]; % time interval over which the > experimental conditions are compared (in sec) > cfg.frequency = [50 70]; > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.clusterstatistics = 'maxsum'; > cfg.statistic = 'actvsblT'; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.approach = 'montecarlo'; > cfg.dimord = 'chan_freq_time'; > cfg.dim = 'chan_freq_time'; > cfg.neighbours = neighbour; > cfg.tail = 0; > cfg.clustertail = 0; > nSubjects = 2*length(Controls); > a = [1:nSubjects]; > b = ones(1,length(Controls)); > c = 2*(ones(1,length(Controls))); > cfg.design = [a; b c]; > cfg.uvar = 1; % "subject" is unit of observation > cfg.ivar = 2; % row of the design matrix that contains the independent > variable > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); > > > _______________________________________________ > 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 anna.lambrechts at gmail.com Tue Sep 13 11:11:49 2011 From: anna.lambrechts at gmail.com (Anna Lambrechts) Date: Tue, 13 Sep 2011 11:11:49 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 10, Issue 15 In-Reply-To: References: Message-ID: Dear David, I have had the same problem after end of August fieldtrip update. I had the right toolbox, but matlab couldn't find the path to it. I just added the exact path for randperm in setpath, which solved the problem. Best, Anna. 2011/9/13 > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. bufferviewer C++ code (JustinChen) > 2. ft_freqstatistics issue (??? Undefined function or method > 'randperm' for input arguments of type 'double'.) (Davide Rivolta) > 3. Re: ft_freqstatistics issue (??? Undefined function or method > 'randperm' for input arguments of type 'double'.) > (Roemer van der Meij) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 12 Sep 2011 18:07:36 -0400 > From: JustinChen > To: > Subject: [FieldTrip] bufferviewer C++ code > Message-ID: > Content-Type: text/plain; charset="gb2312" > > > > > > Hey, all, Recently I want to try to compile the bufferviewer C++ source > code under the directory: fieldtrip/realtime/utilities/viewer/. I tried to > use the Microsoft Visual C++ IDE to compile the code but it failed, and now > I am using the Eclipse+MinGW under the windows environment to compile it. > Does anyone know what environment the C++ codes were compiled and debugged > originally? And also I notice the code uses the FLTK API pakage to draw the > GUI part, any other API libraries required to compile the code? Anybody who > is familiar with the code please reply and I really appreciate your help. > Thanks and have a good day! Justin > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110912/040d9dcc/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Tue, 13 Sep 2011 09:38:49 +0200 > From: Davide Rivolta > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function > or method 'randperm' for input arguments of type 'double'.) > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear fieldtrippers, > > I wish to calculate the stat difference between stimulus and baseline in a > group of subjects. I use ft_freqgrandaverage to average across subjects and > then ft_freqstatistics (cluster statistic) to compare the 2 conditions > (baseline & stimuli). > > I get this error: ??? Undefined function or method 'randperm' for input > arguments of type 'double'. > > I tried even with the newest version (20110911) but the problem persists. I > am not sure what I have to do. > > Any advice would be super. The script is below. > > Thanks a lot, > > Davide > > > > datainpath = '/data/home1/drivolta/Out4VG/DATA/'; > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; > > % Controls > Controls = { > 'ASS31_TFR_high.mat'; > 'CSA07_TFR_high.mat'; > 'BMR08_TFR_high.mat'; > 'NPD18_TFR_high.mat'; > %'BSA08_TFR_high.mat'; > %'ABE08_TFR_high.mat'; > %'EES05_TFR_high.mat'; > %'GPS10_TFR_high.mat'; > %'SDA01_TFR_high.mat'; > %'CSA17_TFR_high.mat'; > %'KBZ16_TFR_high.mat'; > > }; > > %-------------------------------------------------------------------------- > NControls = length(Controls); > > %% CONCATENATE DATA > for i = 1:length(Controls) > fullname = strcat(datainpath, Controls{i,1}); > load(fullname); > > % Activation time window > TFR2 = power_continue_high; %Rename to change (select time window) > idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); > TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); > TFR2.time = power_continue_high.time(idx); > Stimuli{i} = TFR2; > > % Baseline time window > TFR3 = power_continue_high; > idx = find((TFR3.time >= -1) &(TFR3.time < 0)); > TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); > TFR3.time = TFR2.time; > Baseline{i} = TFR3; > > clear power_continue_high > clear TFR2 > clear TFR3 > end; > save Controls2Statistics Stimuli Baseline; > > > > cfg = []; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.keepindividual = 'yes'; > > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); > > > > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure > containing grad field > > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbourdist = 5; > cfg.grad = TFR.grad; > cfg.layout = 'CTF275.lay'; > neighbour = ft_neighbourselection(cfg, Baseline{1}); > cfg = []; > cfg.grad = TFR.grad; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.neighbourdist = 4; > cfg.minnbchan = 1; > cfg.clusteralpha = 0.05; % control admission to a cluster > cfg.alpha = 0.05; % control the false alarm rate of the > permutation test > cfg.latency = [0.5 1.5]; % time interval over which the > experimental conditions are compared (in sec) > cfg.frequency = [50 70]; > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.clusterstatistics = 'maxsum'; > cfg.statistic = 'actvsblT'; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.approach = 'montecarlo'; > cfg.dimord = 'chan_freq_time'; > cfg.dim = 'chan_freq_time'; > cfg.neighbours = neighbour; > cfg.tail = 0; > cfg.clustertail = 0; > > nSubjects = 2*length(Controls); > > a = [1:nSubjects]; > b = ones(1,length(Controls)); > c = 2*(ones(1,length(Controls))); > > cfg.design = [a; b c]; > cfg.uvar = 1; % "subject" is unit of observation > cfg.ivar = 2; % row of the design matrix that contains the independent > variable > > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110913/2e2f657f/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Tue, 13 Sep 2011 11:00:13 +0200 > From: Roemer van der Meij > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] ft_freqstatistics issue (??? Undefined > function or method 'randperm' for input arguments of type 'double'.) > Message-ID: <4E6F1B9D.3050003 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hi Davide, > > It sounds like you are missing the Statistics Toolbo > x for matlab. I > remember some internal discussions in the team about writing an internal > version of randperm.m with similar functions, but we haven't done so far > if I recall correctly. Installing the toolbox, or checking whether you > have it on your path should solve your problem. > > Hope it helps, > Roemer > > > > On 13-09-11 9:38, Davide Rivolta wrote: > > Dear fieldtrippers, > > I wish to calculate the stat difference between stimulus and baseline > > in a group of subjects. I use ft_freqgrandaverage to average across > > subjects and then ft_freqstatistics (cluster statistic) to compare the > > 2 conditions (baseline & stimuli). > > I get this error: ??? Undefined function or method 'randperm' for > > input arguments of type 'double'. > > I tried even with the newest version (20110911) but the problem > > persists. I am not sure what I have to do. > > Any advice would be super. The script is below. > > Thanks a lot, > > Davide > > datainpath = '/data/home1/drivolta/Out4VG/DATA/'; > > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; > > > > % Controls > > Controls = { > > 'ASS31_TFR_high.mat'; > > 'CSA07_TFR_high.mat'; > > 'BMR08_TFR_high.mat'; > > 'NPD18_TFR_high.mat'; > > %'BSA08_TFR_high.mat'; > > %'ABE08_TFR_high.mat'; > > %'EES05_TFR_high.mat'; > > %'GPS10_TFR_high.mat'; > > %'SDA01_TFR_high.mat'; > > %'CSA17_TFR_high.mat'; > > %'KBZ16_TFR_high.mat'; > > > > }; > > > %-------------------------------------------------------------------------- > > NControls = length(Controls); > > %% CONCATENATE DATA > > for i = 1:length(Controls) > > fullname = strcat(datainpath, Controls{i,1}); > > load(fullname); > > > > % Activation time window > > TFR2 = power_continue_high; %Rename to change (select time window) > > idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); > > TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); > > TFR2.time = power_continue_high.time(idx); > > Stimuli{i} = TFR2; > > > > % Baseline time window > > TFR3 = power_continue_high; > > idx = find((TFR3.time >= -1) &(TFR3.time < 0)); > > TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); > > TFR3.time = TFR2.time; > > Baseline{i} = TFR3; > > > > clear power_continue_high > > clear TFR2 > > clear TFR3 > > end; > > save Controls2Statistics Stimuli Baseline; > > > > cfg = []; > > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > > cfg.keepindividual = 'yes'; > > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); > > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); > > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure > > containing grad field > > cfg = []; > > cfg.method = 'triangulation'; > > cfg.neighbourdist = 5; > > cfg.grad = TFR.grad; > > cfg.layout = 'CTF275.lay'; > > neighbour = ft_neighbourselection(cfg, Baseline{1}); > > cfg = []; > > cfg.grad = TFR.grad; > > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > > cfg.neighbourdist = 4; > > cfg.minnbchan = 1; > > cfg.clusteralpha = 0.05; % control admission to a cluster > > cfg.alpha = 0.05; % control the false alarm rate of the > > permutation test > > cfg.latency = [0.5 1.5]; % time interval over which the > > experimental conditions are compared (in sec) > > cfg.frequency = [50 70]; > > cfg.avgovertime = 'no'; > > cfg.avgoverfreq = 'no'; > > cfg.avgoverchan = 'no'; > > cfg.clusterstatistics = 'maxsum'; > > cfg.statistic = 'actvsblT'; > > cfg.numrandomization = 1000; > > cfg.correctm = 'cluster'; > > cfg.method = 'montecarlo'; > > cfg.approach = 'montecarlo'; > > cfg.dimord = 'chan_freq_time'; > > cfg.dim = 'chan_freq_time'; > > cfg.neighbours = neighbour; > > cfg.tail = 0; > > cfg.clustertail = 0; > > nSubjects = 2*length(Controls); > > a = [1:nSubjects]; > > b = ones(1,length(Controls)); > > c = 2*(ones(1,length(Controls))); > > cfg.design = [a; b c]; > > cfg.uvar = 1; % "subject" is unit of observation > > cfg.ivar = 2; % row of the design matrix that contains the independent > > variable > > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); > > > > > > _______________________________________________ > > 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: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110913/b90d5fc8/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 15 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Tue Sep 13 15:31:31 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 13 Sep 2011 15:31:31 +0200 Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function or method 'randperm' for input arguments of type 'double'.) In-Reply-To: <4E6F1B9D.3050003@donders.ru.nl> References: <4E6F1B9D.3050003@donders.ru.nl> Message-ID: Dear Roemer and Anna, Thank you for your help. After setting the path the error disappears. However I know have an error saying that is "could not determine the parametric critical value for clustering". However, in the configuration, I put all the values that are in the tutorial. May it be a problem with my design? Thanks a lot, Davide On Tue, Sep 13, 2011 at 11:00 AM, Roemer van der Meij < r.vandermeij at donders.ru.nl> wrote: > Hi Davide, > > It sounds like you are missing the Statistics Toolbox > for matlab. I remember some internal discussions in the team about writing > an internal version of randperm.m with similar functions, but we haven't > done so far if I recall correctly. Installing the toolbox, or checking > whether you have it on your path should solve your problem. > > Hope it helps, > Roemer > > > > > On 13-09-11 9:38, Davide Rivolta wrote: > > Dear fieldtrippers, > > I wish to calculate the stat difference between stimulus and baseline in a > group of subjects. I use ft_freqgrandaverage to average across subjects and > then ft_freqstatistics (cluster statistic) to compare the 2 conditions > (baseline & stimuli). > > I get this error: ??? Undefined function or method 'randperm' for input > arguments of type 'double'. > > I tried even with the newest version (20110911) but the problem persists. I > am not sure what I have to do. > > Any advice would be super. The script is below. > > Thanks a lot, > > Davide > > > > datainpath = '/data/home1/drivolta/Out4VG/DATA/'; > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/'; > > % Controls > Controls = { > 'ASS31_TFR_high.mat'; > 'CSA07_TFR_high.mat'; > 'BMR08_TFR_high.mat'; > 'NPD18_TFR_high.mat'; > %'BSA08_TFR_high.mat'; > %'ABE08_TFR_high.mat'; > %'EES05_TFR_high.mat'; > %'GPS10_TFR_high.mat'; > %'SDA01_TFR_high.mat'; > %'CSA17_TFR_high.mat'; > %'KBZ16_TFR_high.mat'; > > }; > > %-------------------------------------------------------------------------- > NControls = length(Controls); > > %% CONCATENATE DATA > for i = 1:length(Controls) > fullname = strcat(datainpath, Controls{i,1}); > load(fullname); > > % Activation time window > TFR2 = power_continue_high; %Rename to change (select time window) > idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5)); > TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx); > TFR2.time = power_continue_high.time(idx); > Stimuli{i} = TFR2; > > % Baseline time window > TFR3 = power_continue_high; > idx = find((TFR3.time >= -1) &(TFR3.time < 0)); > TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx); > TFR3.time = TFR2.time; > Baseline{i} = TFR3; > > clear power_continue_high > clear TFR2 > clear TFR3 > end; > save Controls2Statistics Stimuli Baseline; > > > > cfg = []; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.keepindividual = 'yes'; > > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:}); > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:}); > > > > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure > containing grad field > > cfg = []; > cfg.method = 'triangulation'; > cfg.neighbourdist = 5; > cfg.grad = TFR.grad; > cfg.layout = 'CTF275.lay'; > neighbour = ft_neighbourselection(cfg, Baseline{1}); > cfg = []; > cfg.grad = TFR.grad; > cfg.channel = {'MEG', '-MRO31', '-MRO21'}; > cfg.neighbourdist = 4; > cfg.minnbchan = 1; > cfg.clusteralpha = 0.05; % control admission to a cluster > cfg.alpha = 0.05; % control the false alarm rate of the > permutation test > cfg.latency = [0.5 1.5]; % time interval over which the > experimental conditions are compared (in sec) > cfg.frequency = [50 70]; > cfg.avgovertime = 'no'; > cfg.avgoverfreq = 'no'; > cfg.avgoverchan = 'no'; > cfg.clusterstatistics = 'maxsum'; > cfg.statistic = 'actvsblT'; > cfg.numrandomization = 1000; > cfg.correctm = 'cluster'; > cfg.method = 'montecarlo'; > cfg.approach = 'montecarlo'; > cfg.dimord = 'chan_freq_time'; > cfg.dim = 'chan_freq_time'; > cfg.neighbours = neighbour; > cfg.tail = 0; > cfg.clustertail = 0; > > nSubjects = 2*length(Controls); > > a = [1:nSubjects]; > b = ones(1,length(Controls)); > c = 2*(ones(1,length(Controls))); > > cfg.design = [a; b c]; > cfg.uvar = 1; % "subject" is unit of observation > cfg.ivar = 2; % row of the design matrix that contains the independent > variable > > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll); > > > > > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://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 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekanal at cmu.edu Tue Sep 13 22:04:38 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 13 Sep 2011 16:04:38 -0400 Subject: [FieldTrip] bug with localizing Message-ID: <0DA79623-DA99-45A0-8A32-E259771108A1@cmu.edu> Hello folks - I'm trying to localize some activity I recorded, and I'm having a problem with the scripts. Following the instructions in the beamformer tutorial [1], I have the following code, which results in the following error: ~~~~~~~~~~~ ... mri = ft_read_mri('MR.1.3.12.2.1107.5.2.32.35216.20110517110054966038966'); % segment the brain cfg = []; cfg.write = 'no'; cfg.coordsys = 'DICOM'; segmentedmri = ft_volumesegment(cfg, mri); % prepare head model vol = ft_prepare_singleshell([],segmentedmri); ??? Reference to non-existent field 'seg'. Error in ==> prepare_mesh_segmentation at 63 [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); Error in ==> dots_sourceLocalization at 41 vol = ft_prepare_singleshell([],segmentedmri); ~~~~~~~~~~~ It looks like the source of this error is in a recently commented-out line (line 25) in the prepare_mesh_segmentation.m file (build 4120, off the svn): ~~~~~~~~~~~ ... cfg = ft_checkconfig(cfg, 'forbidden', 'numcompartments'); % if ~isfield(mri, 'tissue') && any(ismember(fieldnames(mri), {'gray' 'brain' 'scalp'})), cfg.tissue = 1; end if ~isfield(cfg, 'threshold'), cfg.threshold = 0; end ... ~~~~~~~~~~~ The comment for that commit is "bugfix". Any ideas how to work around this problem? Thanks - Elli Kanal -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 [1] http://fieldtrip.fcdonders.nl/tutorial/beamformer#the_forward_model_and_lead_field_matrix From johanna.zumer at donders.ru.nl Wed Sep 14 08:50:49 2011 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Wed, 14 Sep 2011 08:50:49 +0200 Subject: [FieldTrip] bug with localizing In-Reply-To: <0DA79623-DA99-45A0-8A32-E259771108A1@cmu.edu> References: <0DA79623-DA99-45A0-8A32-E259771108A1@cmu.edu> Message-ID: Hi Elli and FT users, Apologies for this bug, I introduced it last week in attempting to fix something else (allowing 3 shells to work). I have already fixed this yesterday (reintroducing this line 25 with some extra 'if' clauses which hopefully will work for everyone), so it should already be on the SVN server as of this morning. Thank you for reporting it! Johanna On 13 September 2011 22:04, Kanal Eliezer wrote: > Hello folks - > > I'm trying to localize some activity I recorded, and I'm having a problem > with the scripts. Following the instructions in the beamformer tutorial [1], > I have the following code, which results in the following error: > > ~~~~~~~~~~~ > ... > mri = ft_read_mri('MR.1.3.12.2.1107.5.2.32.35216.20110517110054966038966'); > > % segment the brain > cfg = []; > cfg.write = 'no'; > cfg.coordsys = 'DICOM'; > segmentedmri = ft_volumesegment(cfg, mri); > > % prepare head model > vol = ft_prepare_singleshell([],segmentedmri); > > > ??? Reference to non-existent field 'seg'. > > Error in ==> prepare_mesh_segmentation at 63 > [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), > 1:size(mri.seg,3)); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > Error in ==> dots_sourceLocalization at 41 > vol = ft_prepare_singleshell([],segmentedmri); > ~~~~~~~~~~~ > > It looks like the source of this error is in a recently commented-out line > (line 25) in the prepare_mesh_segmentation.m file (build 4120, off the svn): > > ~~~~~~~~~~~ > ... > cfg = ft_checkconfig(cfg, 'forbidden', 'numcompartments'); > % if ~isfield(mri, 'tissue') && any(ismember(fieldnames(mri), {'gray' > 'brain' 'scalp'})), cfg.tissue = 1; end > if ~isfield(cfg, 'threshold'), cfg.threshold = 0; end > ... > ~~~~~~~~~~~ > > The comment for that commit is "bugfix". Any ideas how to work around this > problem? Thanks - > > Elli Kanal > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > > [1] > http://fieldtrip.fcdonders.nl/tutorial/beamformer#the_forward_model_and_lead_field_matrix > _______________________________________________ > 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 jm.horschig at donders.ru.nl Wed Sep 14 15:41:45 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 14 Sep 2011 15:41:45 +0200 Subject: [FieldTrip] Critical bug in ft_channelrepair fixed Message-ID: <4E70AF19.2040003@donders.ru.nl> Hey everyone, we found a critical bug in ft_channelrepair, which we fixed now. The bug caused wrong channels to be chosen for interpolation in some situations, meaning that the timecourse your repaired channel did not make sense. Please be aware of this, check your reconstructed channels and re-run your channel reconstruction if you are in doubt with the newest FieldTrip version! For more information, check Google code: http://code.google.com/p/fieldtrip/source/detail?r=4158 and Bugzilla: http://bugzilla.fcdonders.nl/show_bug.cgi?id=941 Best regards, Jörn -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group 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 c.micheli at fcdonders.ru.nl Wed Sep 14 17:56:38 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Wed, 14 Sep 2011 17:56:38 +0200 (CEST) Subject: [FieldTrip] Fwd: AW: Forward solution using concentric spheres and BEM models In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE2F@XMAIL1.medads.uk-erlangen.de> Message-ID: <1624476173.1270054.1316015798685.JavaMail.root@draco.zimbra.ru.nl> Hi Margit and Juan Pablo see my answers below. ----- "Margit Schönherr" schreef: > Van: "Margit Schönherr" > Aan: "c micheli" > Verzonden: Woensdag 7 september 2011 09:33:53 > Onderwerp: AW: [FieldTrip] Forward solution using concentric spheres and BEM models > > Hello Cristiano, > > thank you for your email. I have tried the code, but I have 2 problems > with it. > 1) When I do it exactly as suggested in the email, I get the following > error when using ft_prepare_mesh: > > bnd = ft_prepare_mesh(cfg, mri_segment); > ??? Error using ==> ft_prepare_mesh at 159 > unsupported cfg.method and/or input > > I think, this is simply a problem concerning the naming of the > variables. The segmented mri is called 'seg', the labels are assigned > to 'mri_segment'. I think, this is the wrong input for > ft_prepare_mesh, because 'mri_segment' does not contain any mri > information. Putting the labels into a new field 'seg.seg' and calling > bnd = ft_prepare_mesh(cfg, seg) solves this. > I could replicate the error and this is due to the fact that ft_prepare_mesh accepts inputs of FieldTrip type 'volume'. See ft_datatype_volume. The function crashed because I simply used an old version of the test file where I inputted the volume matrix only, whereas three fields are required (dim, transform and anatomy), that's why the input should look like this: mri2 = []; mri2.anatomy = mri_segment; mri2.dim = mri.dim; mri2.transform = mri.transform; I patched the correct code at the end of the mail. > 2) However, there is still only one surface triangulated. So as I > wrote in my last email, I still believe that line 25 in > prepare_mesh_segmentation needs to be commented. What do you mean? I agree. This function needs a general review altogether and at the moment I committed your correction. In the future I'll restructure the whole function taking care of the more recent guidelines. Thanks for your suggestion. Try this: % download from the FieldTrip ftp site % (ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip) % load the MRI mri = ft_read_mri('Subject01.mri'); % segment it cfg = []; cfg.output = {'scalp', 'skull', 'brain'}; seg = ft_volumesegment(cfg, mri); % volumetric preprocessing % Note: the three compartments have to be 'filled' otherwise the triangulation won't work correctly. The output of ft_volumesegment will change soon, making it compatible with ft_prepare_mesh. As of today we need the following: mri_segment{1} = seg.scalp; mri_segment{2} = imfill(seg.skull,'holes'); % you need the image processing toolbox here! mri_segment{3} = seg.brain; % triangulation (from volumes to surfaces) % Note: now the volumes are inputted one at a time mri2 = mri; cfg=[]; cfg.sourceunits = 'mm'; cfg.mrinuits = 'mm'; cfg.tissue = 1; cfg.numvertices = 1000; for i=1:3 mri2.seg = mri_segment{i}; mesh{i} = ft_prepare_mesh(cfg,mri2); end % visualization of the triangulated surfaces figure,ft_plot_mesh(mesh{1},'edgecolor','none','facecolor','w','facealpha',0.5) ft_plot_mesh(mesh{2},'edgecolor','none','facecolor','g','facealpha',0.7) ft_plot_mesh(mesh{3},'edgecolor','none','facecolor','r','facealpha',1) > Thank you. Be my guest. Cheers, Cristiano > > Best regards, > Margit > > > *********************************** > Margit Schönherr > Universitätsklinikum Erlangen > Neurologische Klinik > Epilepsiezentrum (Biomagnetismus) > Schwabachanlage 6 > 91054 Erlangen > Telefon: ++49 9131 / 85 36921 > Email: margit.schoenherr at uk-erlangen.de > *********************************** > ________________________________________ > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > im Auftrag von Micheli, C. [c.micheli at fcdonders.ru.nl] > Gesendet: Montag, 5. September 2011 12:59 > An: Email discussion list for the FieldTrip project > Betreff: Re: [FieldTrip] Forward solution using concentric spheres > and BEM models > > Dear Juan Pablo and Margit > > The function 'ft_prepare_mesh' takes care of triangulating every > compartment via the cfg.tissue option. This option contains the > integers which describe a type of tissue, given that the user > beforehand defined all voxels of the segmented MRI compartment as > having that particular value. > As an example, download the sample MRI in FieldTrip ftp location: > > ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip > Create a folder and unzip these files. > > % read in the mri > mri = ft_read_mri('Subject01.mri'); > > % segment it > cfg = []; > cfg.output = {'scalp', 'skull', 'brain'}; > seg = ft_volumesegment(cfg, mri); > > % assign a label > scalp = (seg.scalp) & ~(seg.skull | seg.brain); > skull = 2*(seg.skull); > brain = 3*(seg.brain); > mri_segment = scalp + skull + brain; > > % build the meshes > cfg = []; > cfg.method = 'segmentation'; > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > cfg.numvertices = [2000 1000 800]; > cfg.sourceunits = 'mm'; > cfg.mriunits = 'mm'; > bnd = ft_prepare_mesh(cfg, mri_segment); > > If any of the tissues has a different value from cfg.tissues this > won't be triangulated. To check for this use ft_sourceplot in the > interactive mode. By clicking around you can see the tissue's value in > the command window: > > % view the labelled segmentations > mri2 = mri; > mri2.seg = mri_segment; > cfg=[]; > cfg.interactive = 'yes'; > cfg.funparameter = 'seg'; > ft_sourceplot(cfg,mri2); > > About the concentric spheres: > both ways to derive a concentric spheres model are correct. In one > case you directly build the vol structure and you assume you know the > radiuses of your spheres. In the other case you allow the > ft_prepare_concentricspheres function to build the spheres starting > from realistic geometrical boundaries. > The second approach is my favorite because the ft_prepare function > contains a function that fits a sphere to each boundary and I don't > have to do it myself. > The first approach (directly force the radiuses in your vol structure) > is preferable if you derive the information from other software (e.g. > CTF's MRIView) or if you fit the sphere yourself. > > @Pablo > If the sphere is fitted inside the brain it is correct. You do not > want the sphere to include other tissues, because your assumption for > the construction of the forward model is that the tissue inside the > sphere is homogeneous. > For a more realistic model (encompassing the whole brain volume) I > would rather use a BEM model. > > I hope this helps, > Cristiano From paolo.belardinelli at med.uni-tuebingen.de Wed Sep 14 18:18:36 2011 From: paolo.belardinelli at med.uni-tuebingen.de (Paolo Belardinelli) Date: Wed, 14 Sep 2011 18:18:36 +0200 Subject: [FieldTrip] cortical time-course reconstruction Message-ID: <4E70D3DC.4060403@med.uni-tuebingen.de> Hi Robert. We have some nice coherence maps with peaks in M1 for a finger tapping task. We were wondering how to properly reconstruct the power time-course in the M1 area in order to use it as a further reference signal. -Is the code necessary for the approach described in (Schoffelen et al., NeuroImage 2008) already implemented in ft (we observed in the code that it is possible in ft_sourceanalysis.m to give a location for a reference dipole but we found no documentation)? -Is the only reliable solution for reconstructing a time-course to project the activity in the dominant direction? We have the eigenvalues of the first dipole which are normally 3 to 6 times larger than the ones of the second. We are not sure this is enough to neglect the second component. - One last technical question: in the mailing list it is said that the orientation of the dipole is saved in source.avg.ori but it doesn't seem like that to us. Maybe we are doing something wrong. Best regards and thank you for your work, Paolo and Erick From e.maris at donders.ru.nl Thu Sep 15 10:10:36 2011 From: e.maris at donders.ru.nl (Eric Maris) Date: Thu, 15 Sep 2011 10:10:36 +0200 Subject: [FieldTrip] interaction within-subject indepsamplesT In-Reply-To: <1238529C-1B93-4BC9-B625-B16991718014@uke.uni-hamburg.de> References: <1238529C-1B93-4BC9-B625-B16991718014@uke.uni-hamburg.de> Message-ID: <008d01cc737e$f6192ba0$e24b82e0$@maris@donders.ru.nl> Dear Kathrin, > I need your advice on how to correctly test the interaction effects in a 2x2 > within-subject design with cluster-based randomization tests. I have two > factors A and B with the levels a1/a2 and b1/b2. In addition, the number of > trials in A are about twice as much as in B. > > The procedure would be totally clear in a between-subject design (as in a > previous post on the list: > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) This post is about a WITHIN-subjects design. > because I could easily compute the differences of the factor levels > A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the > differences. However, since I have to run the statistics across trials and not > subjects I have independent samples and not dependent samples. So, you have a between-trials design. If it is > possible at all, how can I calculate the differences A_diff and B_diff across > trials? Is it a problem that the number of trials are not equal? This is not possible. Permutation tests cannot be used for testing interactions in a multi-factorial between-subjects/trials design. Michael Wibral has a post in which he refers to a nice statistics paper on the issue. A proxy that is possible (but not statistically sound) is to perform two statistical tests of the first factor, once at the first level of second factor and once at the second level. Best, Eric Maris > > Any help is appreciated! > > Best, > Kathrin > > _____________________________________ > Kathrin Müsch > > Dept. of Neurophysiology and Pathophysiology > University Medical Center Hamburg-Eppendorf > Martinistr. 52 > 20246 Hamburg > Germany > Phone: +49-40-7410-54680 > Fax: +49-40-7410-57752 > E-Mail: k.muesch at uke.uni-hamburg.de > _____________________________________ > > > -- > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen > Rechts; Gerichtsstand: Hamburg > > Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. Alexander > Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From johan.bergmann at yahoo.com Thu Sep 15 14:14:25 2011 From: johan.bergmann at yahoo.com (Johan Bergmann) Date: Thu, 15 Sep 2011 05:14:25 -0700 (PDT) Subject: [FieldTrip] I AM FREE NOW! Message-ID: <1316088865.66924.androidMobile@web45505.mail.sp1.yahoo.com>

ive always been pressured to be the best I learned to expect the unexpected this caught my eye a few weeks ago.
http://chojnacka-paulina.yoyo.pl/MarkCarter10.html now I dont feel something missing anymore I wouldnt waste your time

-------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Thu Sep 15 16:07:39 2011 From: fredericroux at hotmail.de (Frederic Roux) Date: Thu, 15 Sep 2011 16:07:39 +0200 Subject: [FieldTrip] channel_repair bug In-Reply-To: References: Message-ID: Hi Jorn, I was wondering if the bug you reported concerning the channel_repair function also applied to older versions of fieldtrip and in which cases this bug appears. This would be important for me to know as I have been using the function in the past and would like to know if it affects my results or not. Best, Frederic -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 > From: fieldtrip-request at donders.ru.nl > Subject: fieldtrip Digest, Vol 10, Issue 18 > To: fieldtrip at donders.ru.nl > Date: Thu, 15 Sep 2011 12:00:17 +0200 > > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Critical bug in ft_channelrepair fixed (J?rn M. Horschig) > 2. Fwd: AW: Forward solution using concentric spheres and BEM > models (Micheli, C.) > 3. cortical time-course reconstruction (Paolo Belardinelli) > 4. Re: interaction within-subject indepsamplesT (Eric Maris) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 14 Sep 2011 15:41:45 +0200 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: [FieldTrip] Critical bug in ft_channelrepair fixed > Message-ID: <4E70AF19.2040003 at donders.ru.nl> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hey everyone, > > we found a critical bug in ft_channelrepair, which we fixed now. The bug > caused wrong channels to be chosen for interpolation in some situations, > meaning that the timecourse your repaired channel did not make sense. > Please be aware of this, check your reconstructed channels and re-run > your channel reconstruction if you are in doubt with the newest > FieldTrip version! > > For more information, check Google code: > http://code.google.com/p/fieldtrip/source/detail?r=4158 > and Bugzilla: > http://bugzilla.fcdonders.nl/show_bug.cgi?id=941 > > Best regards, > J?rn > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > 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 > > > > ------------------------------ > > Message: 2 > Date: Wed, 14 Sep 2011 17:56:38 +0200 (CEST) > From: "Micheli, C." > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Fwd: AW: Forward solution using concentric > spheres and BEM models > Message-ID: > <1624476173.1270054.1316015798685.JavaMail.root at draco.zimbra.ru.nl> > Content-Type: text/plain; charset=utf-8 > > Hi Margit and Juan Pablo > see my answers below. > > ----- "Margit Sch?nherr" schreef: > > > Van: "Margit Sch?nherr" > > Aan: "c micheli" > > Verzonden: Woensdag 7 september 2011 09:33:53 > > Onderwerp: AW: [FieldTrip] Forward solution using concentric spheres and BEM models > > > > Hello Cristiano, > > > > thank you for your email. I have tried the code, but I have 2 problems > > with it. > > 1) When I do it exactly as suggested in the email, I get the following > > error when using ft_prepare_mesh: > > > > bnd = ft_prepare_mesh(cfg, mri_segment); > > ??? Error using ==> ft_prepare_mesh at 159 > > unsupported cfg.method and/or input > > > > I think, this is simply a problem concerning the naming of the > > variables. The segmented mri is called 'seg', the labels are assigned > > to 'mri_segment'. I think, this is the wrong input for > > ft_prepare_mesh, because 'mri_segment' does not contain any mri > > information. Putting the labels into a new field 'seg.seg' and calling > > bnd = ft_prepare_mesh(cfg, seg) solves this. > > > > I could replicate the error and this is due to the fact that ft_prepare_mesh accepts inputs of FieldTrip type 'volume'. See ft_datatype_volume. The function crashed because I simply used an old version of the test file where I inputted the volume matrix only, whereas three fields are required (dim, transform and anatomy), that's why the input should look like this: > > mri2 = []; > mri2.anatomy = mri_segment; > mri2.dim = mri.dim; > mri2.transform = mri.transform; > > I patched the correct code at the end of the mail. > > > 2) However, there is still only one surface triangulated. So as I > > wrote in my last email, I still believe that line 25 in > > prepare_mesh_segmentation needs to be commented. What do you mean? > > > I agree. This function needs a general review altogether and at the moment I committed your correction. In the future I'll restructure the whole function taking care of the more recent guidelines. Thanks for your suggestion. > > Try this: > > % download from the FieldTrip ftp site > % (ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip) > > % load the MRI > mri = ft_read_mri('Subject01.mri'); > > % segment it > cfg = []; > cfg.output = {'scalp', 'skull', 'brain'}; > seg = ft_volumesegment(cfg, mri); > > % volumetric preprocessing > % Note: the three compartments have to be 'filled' otherwise the triangulation won't work correctly. The output of ft_volumesegment will change soon, making it compatible with ft_prepare_mesh. As of today we need the following: > > mri_segment{1} = seg.scalp; > mri_segment{2} = imfill(seg.skull,'holes'); % you need the image processing toolbox here! > mri_segment{3} = seg.brain; > > % triangulation (from volumes to surfaces) > % Note: now the volumes are inputted one at a time > mri2 = mri; > cfg=[]; > cfg.sourceunits = 'mm'; > cfg.mrinuits = 'mm'; > cfg.tissue = 1; > cfg.numvertices = 1000; > for i=1:3 > mri2.seg = mri_segment{i}; > mesh{i} = ft_prepare_mesh(cfg,mri2); > end > > % visualization of the triangulated surfaces > figure,ft_plot_mesh(mesh{1},'edgecolor','none','facecolor','w','facealpha',0.5) > ft_plot_mesh(mesh{2},'edgecolor','none','facecolor','g','facealpha',0.7) > ft_plot_mesh(mesh{3},'edgecolor','none','facecolor','r','facealpha',1) > > > > Thank you. > > Be my guest. > Cheers, > Cristiano > > > > > Best regards, > > Margit > > > > > > *********************************** > > Margit Sch?nherr > > Universit?tsklinikum Erlangen > > Neurologische Klinik > > Epilepsiezentrum (Biomagnetismus) > > Schwabachanlage 6 > > 91054 Erlangen > > Telefon: ++49 9131 / 85 36921 > > Email: margit.schoenherr at uk-erlangen.de > > *********************************** > > ________________________________________ > > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > > im Auftrag von Micheli, C. [c.micheli at fcdonders.ru.nl] > > Gesendet: Montag, 5. September 2011 12:59 > > An: Email discussion list for the FieldTrip project > > Betreff: Re: [FieldTrip] Forward solution using concentric spheres > > and BEM models > > > > Dear Juan Pablo and Margit > > > > The function 'ft_prepare_mesh' takes care of triangulating every > > compartment via the cfg.tissue option. This option contains the > > integers which describe a type of tissue, given that the user > > beforehand defined all voxels of the segmented MRI compartment as > > having that particular value. > > As an example, download the sample MRI in FieldTrip ftp location: > > > > ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip > > Create a folder and unzip these files. > > > > % read in the mri > > mri = ft_read_mri('Subject01.mri'); > > > > % segment it > > cfg = []; > > cfg.output = {'scalp', 'skull', 'brain'}; > > seg = ft_volumesegment(cfg, mri); > > > > % assign a label > > scalp = (seg.scalp) & ~(seg.skull | seg.brain); > > skull = 2*(seg.skull); > > brain = 3*(seg.brain); > > mri_segment = scalp + skull + brain; > > > > % build the meshes > > cfg = []; > > cfg.method = 'segmentation'; > > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > > cfg.numvertices = [2000 1000 800]; > > cfg.sourceunits = 'mm'; > > cfg.mriunits = 'mm'; > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > If any of the tissues has a different value from cfg.tissues this > > won't be triangulated. To check for this use ft_sourceplot in the > > interactive mode. By clicking around you can see the tissue's value in > > the command window: > > > > % view the labelled segmentations > > mri2 = mri; > > mri2.seg = mri_segment; > > cfg=[]; > > cfg.interactive = 'yes'; > > cfg.funparameter = 'seg'; > > ft_sourceplot(cfg,mri2); > > > > About the concentric spheres: > > both ways to derive a concentric spheres model are correct. In one > > case you directly build the vol structure and you assume you know the > > radiuses of your spheres. In the other case you allow the > > ft_prepare_concentricspheres function to build the spheres starting > > from realistic geometrical boundaries. > > The second approach is my favorite because the ft_prepare function > > contains a function that fits a sphere to each boundary and I don't > > have to do it myself. > > The first approach (directly force the radiuses in your vol structure) > > is preferable if you derive the information from other software (e.g. > > CTF's MRIView) or if you fit the sphere yourself. > > > > @Pablo > > If the sphere is fitted inside the brain it is correct. You do not > > want the sphere to include other tissues, because your assumption for > > the construction of the forward model is that the tissue inside the > > sphere is homogeneous. > > For a more realistic model (encompassing the whole brain volume) I > > would rather use a BEM model. > > > > I hope this helps, > > Cristiano > > > > ------------------------------ > > Message: 3 > Date: Wed, 14 Sep 2011 18:18:36 +0200 > From: Paolo Belardinelli > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] cortical time-course reconstruction > Message-ID: <4E70D3DC.4060403 at med.uni-tuebingen.de> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Robert. > We have some nice coherence maps with peaks in M1 for a finger tapping > task. We were wondering how to properly reconstruct the power > time-course in the M1 area in order to use it as a further reference > signal. > > -Is the code necessary for the approach described in (Schoffelen et al., > NeuroImage 2008) already implemented in ft (we observed in the code that > it is possible in ft_sourceanalysis.m to give a location for a > reference dipole but we found no documentation)? > > -Is the only reliable solution for reconstructing a time-course to > project the activity in the dominant direction? We have the eigenvalues > of the first dipole which are normally 3 to 6 times larger > than the ones of the second. We are not sure this is enough to neglect > the second component. > > - One last technical question: in the mailing list it is said that the > orientation of the dipole is saved in source.avg.ori but it doesn't seem > like that to us. Maybe we are doing something wrong. > > Best regards and thank you for your work, > > Paolo and Erick > > > ------------------------------ > > Message: 4 > Date: Thu, 15 Sep 2011 10:10:36 +0200 > From: "Eric Maris" > To: "'Email discussion list for the FieldTrip project'" > > Subject: Re: [FieldTrip] interaction within-subject indepsamplesT > Message-ID: <008d01cc737e$f6192ba0$e24b82e0$@maris at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Dear Kathrin, > > > I need your advice on how to correctly test the interaction effects in a > 2x2 > > within-subject design with cluster-based randomization tests. I have two > > factors A and B with the levels a1/a2 and b1/b2. In addition, the number > of > > trials in A are about twice as much as in B. > > > > The procedure would be totally clear in a between-subject design (as in a > > previous post on the list: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) > > This post is about a WITHIN-subjects design. > > > because I could easily compute the differences of the factor levels > > A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the > > differences. However, since I have to run the statistics across trials and > not > > subjects I have independent samples and not dependent samples. > > So, you have a between-trials design. > > If it is > > possible at all, how can I calculate the differences A_diff and B_diff > across > > trials? Is it a problem that the number of trials are not equal? > > This is not possible. Permutation tests cannot be used for testing > interactions in a multi-factorial between-subjects/trials design. Michael > Wibral has a post in which he refers to a nice statistics paper on the > issue. > > A proxy that is possible (but not statistically sound) is to perform two > statistical tests of the first factor, once at the first level of second > factor and once at the second level. > > > Best, > > Eric Maris > > > > > > > > > > > > Any help is appreciated! > > > > Best, > > Kathrin > > > > _____________________________________ > > Kathrin M?sch > > > > Dept. of Neurophysiology and Pathophysiology > > University Medical Center Hamburg-Eppendorf > > Martinistr. 52 > > 20246 Hamburg > > Germany > > Phone: +49-40-7410-54680 > > Fax: +49-40-7410-57752 > > E-Mail: k.muesch at uke.uni-hamburg.de > > _____________________________________ > > > > > > -- > > Pflichtangaben gem?? Gesetz ?ber elektronische Handelsregister und > > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > > > Universit?tsklinikum Hamburg-Eppendorf; K?rperschaft des ?ffentlichen > > Rechts; Gerichtsstand: Hamburg > > > > Vorstandsmitglieder: Prof. Dr. J?rg F. Debatin (Vorsitzender), Dr. > Alexander > > Kirstein, Joachim Pr?l?, Prof. Dr. Dr. Uwe Koch-Gromus > > > > > > _______________________________________________ > > 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 > > End of fieldtrip Digest, Vol 10, Issue 18 > ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Thu Sep 15 16:17:21 2011 From: fredericroux at hotmail.de (Frederic Roux) Date: Thu, 15 Sep 2011 16:17:21 +0200 Subject: [FieldTrip] channel_repair bug In-Reply-To: References: Message-ID: Is the google code correct or does it still have the bug? -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 > From: fieldtrip-request at donders.ru.nl > Subject: fieldtrip Digest, Vol 10, Issue 18 > To: fieldtrip at donders.ru.nl > Date: Thu, 15 Sep 2011 12:00:17 +0200 > > Send fieldtrip mailing list submissions to > fieldtrip at donders.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 donders.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at donders.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Critical bug in ft_channelrepair fixed (J?rn M. Horschig) > 2. Fwd: AW: Forward solution using concentric spheres and BEM > models (Micheli, C.) > 3. cortical time-course reconstruction (Paolo Belardinelli) > 4. Re: interaction within-subject indepsamplesT (Eric Maris) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 14 Sep 2011 15:41:45 +0200 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: [FieldTrip] Critical bug in ft_channelrepair fixed > Message-ID: <4E70AF19.2040003 at donders.ru.nl> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hey everyone, > > we found a critical bug in ft_channelrepair, which we fixed now. The bug > caused wrong channels to be chosen for interpolation in some situations, > meaning that the timecourse your repaired channel did not make sense. > Please be aware of this, check your reconstructed channels and re-run > your channel reconstruction if you are in doubt with the newest > FieldTrip version! > > For more information, check Google code: > http://code.google.com/p/fieldtrip/source/detail?r=4158 > and Bugzilla: > http://bugzilla.fcdonders.nl/show_bug.cgi?id=941 > > Best regards, > J?rn > > > -- > J?rn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > 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 > > > > ------------------------------ > > Message: 2 > Date: Wed, 14 Sep 2011 17:56:38 +0200 (CEST) > From: "Micheli, C." > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Fwd: AW: Forward solution using concentric > spheres and BEM models > Message-ID: > <1624476173.1270054.1316015798685.JavaMail.root at draco.zimbra.ru.nl> > Content-Type: text/plain; charset=utf-8 > > Hi Margit and Juan Pablo > see my answers below. > > ----- "Margit Sch?nherr" schreef: > > > Van: "Margit Sch?nherr" > > Aan: "c micheli" > > Verzonden: Woensdag 7 september 2011 09:33:53 > > Onderwerp: AW: [FieldTrip] Forward solution using concentric spheres and BEM models > > > > Hello Cristiano, > > > > thank you for your email. I have tried the code, but I have 2 problems > > with it. > > 1) When I do it exactly as suggested in the email, I get the following > > error when using ft_prepare_mesh: > > > > bnd = ft_prepare_mesh(cfg, mri_segment); > > ??? Error using ==> ft_prepare_mesh at 159 > > unsupported cfg.method and/or input > > > > I think, this is simply a problem concerning the naming of the > > variables. The segmented mri is called 'seg', the labels are assigned > > to 'mri_segment'. I think, this is the wrong input for > > ft_prepare_mesh, because 'mri_segment' does not contain any mri > > information. Putting the labels into a new field 'seg.seg' and calling > > bnd = ft_prepare_mesh(cfg, seg) solves this. > > > > I could replicate the error and this is due to the fact that ft_prepare_mesh accepts inputs of FieldTrip type 'volume'. See ft_datatype_volume. The function crashed because I simply used an old version of the test file where I inputted the volume matrix only, whereas three fields are required (dim, transform and anatomy), that's why the input should look like this: > > mri2 = []; > mri2.anatomy = mri_segment; > mri2.dim = mri.dim; > mri2.transform = mri.transform; > > I patched the correct code at the end of the mail. > > > 2) However, there is still only one surface triangulated. So as I > > wrote in my last email, I still believe that line 25 in > > prepare_mesh_segmentation needs to be commented. What do you mean? > > > I agree. This function needs a general review altogether and at the moment I committed your correction. In the future I'll restructure the whole function taking care of the more recent guidelines. Thanks for your suggestion. > > Try this: > > % download from the FieldTrip ftp site > % (ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip) > > % load the MRI > mri = ft_read_mri('Subject01.mri'); > > % segment it > cfg = []; > cfg.output = {'scalp', 'skull', 'brain'}; > seg = ft_volumesegment(cfg, mri); > > % volumetric preprocessing > % Note: the three compartments have to be 'filled' otherwise the triangulation won't work correctly. The output of ft_volumesegment will change soon, making it compatible with ft_prepare_mesh. As of today we need the following: > > mri_segment{1} = seg.scalp; > mri_segment{2} = imfill(seg.skull,'holes'); % you need the image processing toolbox here! > mri_segment{3} = seg.brain; > > % triangulation (from volumes to surfaces) > % Note: now the volumes are inputted one at a time > mri2 = mri; > cfg=[]; > cfg.sourceunits = 'mm'; > cfg.mrinuits = 'mm'; > cfg.tissue = 1; > cfg.numvertices = 1000; > for i=1:3 > mri2.seg = mri_segment{i}; > mesh{i} = ft_prepare_mesh(cfg,mri2); > end > > % visualization of the triangulated surfaces > figure,ft_plot_mesh(mesh{1},'edgecolor','none','facecolor','w','facealpha',0.5) > ft_plot_mesh(mesh{2},'edgecolor','none','facecolor','g','facealpha',0.7) > ft_plot_mesh(mesh{3},'edgecolor','none','facecolor','r','facealpha',1) > > > > Thank you. > > Be my guest. > Cheers, > Cristiano > > > > > Best regards, > > Margit > > > > > > *********************************** > > Margit Sch?nherr > > Universit?tsklinikum Erlangen > > Neurologische Klinik > > Epilepsiezentrum (Biomagnetismus) > > Schwabachanlage 6 > > 91054 Erlangen > > Telefon: ++49 9131 / 85 36921 > > Email: margit.schoenherr at uk-erlangen.de > > *********************************** > > ________________________________________ > > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > > im Auftrag von Micheli, C. [c.micheli at fcdonders.ru.nl] > > Gesendet: Montag, 5. September 2011 12:59 > > An: Email discussion list for the FieldTrip project > > Betreff: Re: [FieldTrip] Forward solution using concentric spheres > > and BEM models > > > > Dear Juan Pablo and Margit > > > > The function 'ft_prepare_mesh' takes care of triangulating every > > compartment via the cfg.tissue option. This option contains the > > integers which describe a type of tissue, given that the user > > beforehand defined all voxels of the segmented MRI compartment as > > having that particular value. > > As an example, download the sample MRI in FieldTrip ftp location: > > > > ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip > > Create a folder and unzip these files. > > > > % read in the mri > > mri = ft_read_mri('Subject01.mri'); > > > > % segment it > > cfg = []; > > cfg.output = {'scalp', 'skull', 'brain'}; > > seg = ft_volumesegment(cfg, mri); > > > > % assign a label > > scalp = (seg.scalp) & ~(seg.skull | seg.brain); > > skull = 2*(seg.skull); > > brain = 3*(seg.brain); > > mri_segment = scalp + skull + brain; > > > > % build the meshes > > cfg = []; > > cfg.method = 'segmentation'; > > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > > cfg.numvertices = [2000 1000 800]; > > cfg.sourceunits = 'mm'; > > cfg.mriunits = 'mm'; > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > If any of the tissues has a different value from cfg.tissues this > > won't be triangulated. To check for this use ft_sourceplot in the > > interactive mode. By clicking around you can see the tissue's value in > > the command window: > > > > % view the labelled segmentations > > mri2 = mri; > > mri2.seg = mri_segment; > > cfg=[]; > > cfg.interactive = 'yes'; > > cfg.funparameter = 'seg'; > > ft_sourceplot(cfg,mri2); > > > > About the concentric spheres: > > both ways to derive a concentric spheres model are correct. In one > > case you directly build the vol structure and you assume you know the > > radiuses of your spheres. In the other case you allow the > > ft_prepare_concentricspheres function to build the spheres starting > > from realistic geometrical boundaries. > > The second approach is my favorite because the ft_prepare function > > contains a function that fits a sphere to each boundary and I don't > > have to do it myself. > > The first approach (directly force the radiuses in your vol structure) > > is preferable if you derive the information from other software (e.g. > > CTF's MRIView) or if you fit the sphere yourself. > > > > @Pablo > > If the sphere is fitted inside the brain it is correct. You do not > > want the sphere to include other tissues, because your assumption for > > the construction of the forward model is that the tissue inside the > > sphere is homogeneous. > > For a more realistic model (encompassing the whole brain volume) I > > would rather use a BEM model. > > > > I hope this helps, > > Cristiano > > > > ------------------------------ > > Message: 3 > Date: Wed, 14 Sep 2011 18:18:36 +0200 > From: Paolo Belardinelli > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] cortical time-course reconstruction > Message-ID: <4E70D3DC.4060403 at med.uni-tuebingen.de> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi Robert. > We have some nice coherence maps with peaks in M1 for a finger tapping > task. We were wondering how to properly reconstruct the power > time-course in the M1 area in order to use it as a further reference > signal. > > -Is the code necessary for the approach described in (Schoffelen et al., > NeuroImage 2008) already implemented in ft (we observed in the code that > it is possible in ft_sourceanalysis.m to give a location for a > reference dipole but we found no documentation)? > > -Is the only reliable solution for reconstructing a time-course to > project the activity in the dominant direction? We have the eigenvalues > of the first dipole which are normally 3 to 6 times larger > than the ones of the second. We are not sure this is enough to neglect > the second component. > > - One last technical question: in the mailing list it is said that the > orientation of the dipole is saved in source.avg.ori but it doesn't seem > like that to us. Maybe we are doing something wrong. > > Best regards and thank you for your work, > > Paolo and Erick > > > ------------------------------ > > Message: 4 > Date: Thu, 15 Sep 2011 10:10:36 +0200 > From: "Eric Maris" > To: "'Email discussion list for the FieldTrip project'" > > Subject: Re: [FieldTrip] interaction within-subject indepsamplesT > Message-ID: <008d01cc737e$f6192ba0$e24b82e0$@maris at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Dear Kathrin, > > > I need your advice on how to correctly test the interaction effects in a > 2x2 > > within-subject design with cluster-based randomization tests. I have two > > factors A and B with the levels a1/a2 and b1/b2. In addition, the number > of > > trials in A are about twice as much as in B. > > > > The procedure would be totally clear in a between-subject design (as in a > > previous post on the list: > > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) > > This post is about a WITHIN-subjects design. > > > because I could easily compute the differences of the factor levels > > A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the > > differences. However, since I have to run the statistics across trials and > not > > subjects I have independent samples and not dependent samples. > > So, you have a between-trials design. > > If it is > > possible at all, how can I calculate the differences A_diff and B_diff > across > > trials? Is it a problem that the number of trials are not equal? > > This is not possible. Permutation tests cannot be used for testing > interactions in a multi-factorial between-subjects/trials design. Michael > Wibral has a post in which he refers to a nice statistics paper on the > issue. > > A proxy that is possible (but not statistically sound) is to perform two > statistical tests of the first factor, once at the first level of second > factor and once at the second level. > > > Best, > > Eric Maris > > > > > > > > > > > > Any help is appreciated! > > > > Best, > > Kathrin > > > > _____________________________________ > > Kathrin M?sch > > > > Dept. of Neurophysiology and Pathophysiology > > University Medical Center Hamburg-Eppendorf > > Martinistr. 52 > > 20246 Hamburg > > Germany > > Phone: +49-40-7410-54680 > > Fax: +49-40-7410-57752 > > E-Mail: k.muesch at uke.uni-hamburg.de > > _____________________________________ > > > > > > -- > > Pflichtangaben gem?? Gesetz ?ber elektronische Handelsregister und > > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > > > Universit?tsklinikum Hamburg-Eppendorf; K?rperschaft des ?ffentlichen > > Rechts; Gerichtsstand: Hamburg > > > > Vorstandsmitglieder: Prof. Dr. J?rg F. Debatin (Vorsitzender), Dr. > Alexander > > Kirstein, Joachim Pr?l?, Prof. Dr. Dr. Uwe Koch-Gromus > > > > > > _______________________________________________ > > 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 > > End of fieldtrip Digest, Vol 10, Issue 18 > ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Fri Sep 16 08:30:24 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 16 Sep 2011 08:30:24 +0200 Subject: [FieldTrip] channel_repair bug In-Reply-To: References: Message-ID: <4E72ED00.2070906@donders.ru.nl> Hi Frederic, The one Google Code is the most recent version. My guess would be that it was introduced beginning of July in revision 3807 (apologies for that ). Any version after that had this bug, I cannot tell for the versions before (but doubt). Best regards, Jörn On 9/15/2011 4:07 PM, Frederic Roux wrote: > > Hi Jorn, > > I was wondering if the bug you reported concerning the channel_repair > function also applied to older versions of fieldtrip and in which > cases this bug appears. > > This would be important for me to know as I have been using the function > in the past and would like to know if it affects my results or not. > > Best, > > Frederic > > -- > Frédéric Roux, PhD student > Department of Neurophysiology > Max Planck Institute for Brain Research > D-60529 Frankfurt am Main > Frederic.Roux at brain.mpg.de > +49(0)69630183225 > > > > > > From: fieldtrip-request at donders.ru.nl > > Subject: fieldtrip Digest, Vol 10, Issue 18 > > To: fieldtrip at donders.ru.nl > > Date: Thu, 15 Sep 2011 12:00:17 +0200 > > > > Send fieldtrip mailing list submissions to > > fieldtrip at donders.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 donders.ru.nl > > > > You can reach the person managing the list at > > fieldtrip-owner at donders.ru.nl > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of fieldtrip digest..." > > > > > > Today's Topics: > > > > 1. Critical bug in ft_channelrepair fixed (J?rn M. Horschig) > > 2. Fwd: AW: Forward solution using concentric spheres and BEM > > models (Micheli, C.) > > 3. cortical time-course reconstruction (Paolo Belardinelli) > > 4. Re: interaction within-subject indepsamplesT (Eric Maris) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Wed, 14 Sep 2011 15:41:45 +0200 > > From: "J?rn M. Horschig" > > To: Email discussion list for the FieldTrip project > > > > Subject: [FieldTrip] Critical bug in ft_channelrepair fixed > > Message-ID: <4E70AF19.2040003 at donders.ru.nl> > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > > Hey everyone, > > > > we found a critical bug in ft_channelrepair, which we fixed now. The > bug > > caused wrong channels to be chosen for interpolation in some > situations, > > meaning that the timecourse your repaired channel did not make sense. > > Please be aware of this, check your reconstructed channels and re-run > > your channel reconstruction if you are in doubt with the newest > > FieldTrip version! > > > > For more information, check Google code: > > http://code.google.com/p/fieldtrip/source/detail?r=4158 > > and Bugzilla: > > http://bugzilla.fcdonders.nl/show_bug.cgi?id=941 > > > > Best regards, > > J?rn > > > > > > -- > > J?rn M. Horschig > > PhD Student > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognitive Neuroimaging > > Radboud University Nijmegen > > Neuronal Oscillations Group > > > > 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 > > > > > > > > ------------------------------ > > > > Message: 2 > > Date: Wed, 14 Sep 2011 17:56:38 +0200 (CEST) > > From: "Micheli, C." > > To: fieldtrip at donders.ru.nl > > Subject: [FieldTrip] Fwd: AW: Forward solution using concentric > > spheres and BEM models > > Message-ID: > > <1624476173.1270054.1316015798685.JavaMail.root at draco.zimbra.ru.nl> > > Content-Type: text/plain; charset=utf-8 > > > > Hi Margit and Juan Pablo > > see my answers below. > > > > ----- "Margit Sch?nherr" schreef: > > > > > Van: "Margit Sch?nherr" > > > Aan: "c micheli" > > > Verzonden: Woensdag 7 september 2011 09:33:53 > > > Onderwerp: AW: [FieldTrip] Forward solution using concentric > spheres and BEM models > > > > > > Hello Cristiano, > > > > > > thank you for your email. I have tried the code, but I have 2 problems > > > with it. > > > 1) When I do it exactly as suggested in the email, I get the following > > > error when using ft_prepare_mesh: > > > > > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > ??? Error using ==> ft_prepare_mesh at 159 > > > unsupported cfg.method and/or input > > > > > > I think, this is simply a problem concerning the naming of the > > > variables. The segmented mri is called 'seg', the labels are assigned > > > to 'mri_segment'. I think, this is the wrong input for > > > ft_prepare_mesh, because 'mri_segment' does not contain any mri > > > information. Putting the labels into a new field 'seg.seg' and calling > > > bnd = ft_prepare_mesh(cfg, seg) solves this. > > > > > > > I could replicate the error and this is due to the fact that > ft_prepare_mesh accepts inputs of FieldTrip type 'volume'. See > ft_datatype_volume. The function crashed because I simply used an old > version of the test file where I inputted the volume matrix only, > whereas three fields are required (dim, transform and anatomy), that's > why the input should look like this: > > > > mri2 = []; > > mri2.anatomy = mri_segment; > > mri2.dim = mri.dim; > > mri2.transform = mri.transform; > > > > I patched the correct code at the end of the mail. > > > > > 2) However, there is still only one surface triangulated. So as I > > > wrote in my last email, I still believe that line 25 in > > > prepare_mesh_segmentation needs to be commented. What do you mean? > > > > > > I agree. This function needs a general review altogether and at the > moment I committed your correction. In the future I'll restructure the > whole function taking care of the more recent guidelines. Thanks for > your suggestion. > > > > Try this: > > > > % download from the FieldTrip ftp site > > % (ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip) > > > > % load the MRI > > mri = ft_read_mri('Subject01.mri'); > > > > % segment it > > cfg = []; > > cfg.output = {'scalp', 'skull', 'brain'}; > > seg = ft_volumesegment(cfg, mri); > > > > % volumetric preprocessing > > % Note: the three compartments have to be 'filled' otherwise the > triangulation won't work correctly. The output of ft_volumesegment > will change soon, making it compatible with ft_prepare_mesh. As of > today we need the following: > > > > mri_segment{1} = seg.scalp; > > mri_segment{2} = imfill(seg.skull,'holes'); % you need the image > processing toolbox here! > > mri_segment{3} = seg.brain; > > > > % triangulation (from volumes to surfaces) > > % Note: now the volumes are inputted one at a time > > mri2 = mri; > > cfg=[]; > > cfg.sourceunits = 'mm'; > > cfg.mrinuits = 'mm'; > > cfg.tissue = 1; > > cfg.numvertices = 1000; > > for i=1:3 > > mri2.seg = mri_segment{i}; > > mesh{i} = ft_prepare_mesh(cfg,mri2); > > end > > > > % visualization of the triangulated surfaces > > > figure,ft_plot_mesh(mesh{1},'edgecolor','none','facecolor','w','facealpha',0.5) > > ft_plot_mesh(mesh{2},'edgecolor','none','facecolor','g','facealpha',0.7) > > ft_plot_mesh(mesh{3},'edgecolor','none','facecolor','r','facealpha',1) > > > > > > > Thank you. > > > > Be my guest. > > Cheers, > > Cristiano > > > > > > > > Best regards, > > > Margit > > > > > > > > > *********************************** > > > Margit Sch?nherr > > > Universit?tsklinikum Erlangen > > > Neurologische Klinik > > > Epilepsiezentrum (Biomagnetismus) > > > Schwabachanlage 6 > > > 91054 Erlangen > > > Telefon: ++49 9131 / 85 36921 > > > Email: margit.schoenherr at uk-erlangen.de > > > *********************************** > > > ________________________________________ > > > Von: fieldtrip-bounces at donders.ru.nl [fieldtrip-bounces at donders.ru.nl] > > > im Auftrag von Micheli, C. [c.micheli at fcdonders.ru.nl] > > > Gesendet: Montag, 5. September 2011 12:59 > > > An: Email discussion list for the FieldTrip project > > > Betreff: Re: [FieldTrip] Forward solution using concentric spheres > > > and BEM models > > > > > > Dear Juan Pablo and Margit > > > > > > The function 'ft_prepare_mesh' takes care of triangulating every > > > compartment via the cfg.tissue option. This option contains the > > > integers which describe a type of tissue, given that the user > > > beforehand defined all voxels of the segmented MRI compartment as > > > having that particular value. > > > As an example, download the sample MRI in FieldTrip ftp location: > > > > > > ftp://ftp.fcdonders.nl/pub/fieldtrip/tutorial/Subject01.zip > > > Create a folder and unzip these files. > > > > > > % read in the mri > > > mri = ft_read_mri('Subject01.mri'); > > > > > > % segment it > > > cfg = []; > > > cfg.output = {'scalp', 'skull', 'brain'}; > > > seg = ft_volumesegment(cfg, mri); > > > > > > % assign a label > > > scalp = (seg.scalp) & ~(seg.skull | seg.brain); > > > skull = 2*(seg.skull); > > > brain = 3*(seg.brain); > > > mri_segment = scalp + skull + brain; > > > > > > % build the meshes > > > cfg = []; > > > cfg.method = 'segmentation'; > > > cfg.tissue = [1 2 3]; % scalp = 1; skull = 2; brain = 3; > > > cfg.numvertices = [2000 1000 800]; > > > cfg.sourceunits = 'mm'; > > > cfg.mriunits = 'mm'; > > > bnd = ft_prepare_mesh(cfg, mri_segment); > > > > > > If any of the tissues has a different value from cfg.tissues this > > > won't be triangulated. To check for this use ft_sourceplot in the > > > interactive mode. By clicking around you can see the tissue's value in > > > the command window: > > > > > > % view the labelled segmentations > > > mri2 = mri; > > > mri2.seg = mri_segment; > > > cfg=[]; > > > cfg.interactive = 'yes'; > > > cfg.funparameter = 'seg'; > > > ft_sourceplot(cfg,mri2); > > > > > > About the concentric spheres: > > > both ways to derive a concentric spheres model are correct. In one > > > case you directly build the vol structure and you assume you know the > > > radiuses of your spheres. In the other case you allow the > > > ft_prepare_concentricspheres function to build the spheres starting > > > from realistic geometrical boundaries. > > > The second approach is my favorite because the ft_prepare function > > > contains a function that fits a sphere to each boundary and I don't > > > have to do it myself. > > > The first approach (directly force the radiuses in your vol structure) > > > is preferable if you derive the information from other software (e.g. > > > CTF's MRIView) or if you fit the sphere yourself. > > > > > > @Pablo > > > If the sphere is fitted inside the brain it is correct. You do not > > > want the sphere to include other tissues, because your assumption for > > > the construction of the forward model is that the tissue inside the > > > sphere is homogeneous. > > > For a more realistic model (encompassing the whole brain volume) I > > > would rather use a BEM model. > > > > > > I hope this helps, > > > Cristiano > > > > > > > > ------------------------------ > > > > Message: 3 > > Date: Wed, 14 Sep 2011 18:18:36 +0200 > > From: Paolo Belardinelli > > To: fieldtrip at donders.ru.nl > > Subject: [FieldTrip] cortical time-course reconstruction > > Message-ID: <4E70D3DC.4060403 at med.uni-tuebingen.de> > > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > > > Hi Robert. > > We have some nice coherence maps with peaks in M1 for a finger tapping > > task. We were wondering how to properly reconstruct the power > > time-course in the M1 area in order to use it as a further reference > > signal. > > > > -Is the code necessary for the approach described in (Schoffelen et > al., > > NeuroImage 2008) already implemented in ft (we observed in the code > that > > it is possible in ft_sourceanalysis.m to give a location for a > > reference dipole but we found no documentation)? > > > > -Is the only reliable solution for reconstructing a time-course to > > project the activity in the dominant direction? We have the eigenvalues > > of the first dipole which are normally 3 to 6 times larger > > than the ones of the second. We are not sure this is enough to neglect > > the second component. > > > > - One last technical question: in the mailing list it is said that the > > orientation of the dipole is saved in source.avg.ori but it doesn't > seem > > like that to us. Maybe we are doing something wrong. > > > > Best regards and thank you for your work, > > > > Paolo and Erick > > > > > > ------------------------------ > > > > Message: 4 > > Date: Thu, 15 Sep 2011 10:10:36 +0200 > > From: "Eric Maris" > > To: "'Email discussion list for the FieldTrip project'" > > > > Subject: Re: [FieldTrip] interaction within-subject indepsamplesT > > Message-ID: <008d01cc737e$f6192ba0$e24b82e0$@maris at donders.ru.nl> > > Content-Type: text/plain; charset="iso-8859-1" > > > > Dear Kathrin, > > > > > I need your advice on how to correctly test the interaction > effects in a > > 2x2 > > > within-subject design with cluster-based randomization tests. I > have two > > > factors A and B with the levels a1/a2 and b1/b2. In addition, the > number > > of > > > trials in A are about twice as much as in B. > > > > > > The procedure would be totally clear in a between-subject design > (as in a > > > previous post on the list: > > > > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) > > > > This post is about a WITHIN-subjects design. > > > > > because I could easily compute the differences of the factor levels > > > A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the > > > differences. However, since I have to run the statistics across > trials and > > not > > > subjects I have independent samples and not dependent samples. > > > > So, you have a between-trials design. > > > > If it is > > > possible at all, how can I calculate the differences A_diff and B_diff > > across > > > trials? Is it a problem that the number of trials are not equal? > > > > This is not possible. Permutation tests cannot be used for testing > > interactions in a multi-factorial between-subjects/trials design. > Michael > > Wibral has a post in which he refers to a nice statistics paper on the > > issue. > > > > A proxy that is possible (but not statistically sound) is to perform two > > statistical tests of the first factor, once at the first level of second > > factor and once at the second level. > > > > > > Best, > > > > Eric Maris > > > > > > > > > > > > > > > > > > > > > > Any help is appreciated! > > > > > > Best, > > > Kathrin > > > > > > _____________________________________ > > > Kathrin M?sch > > > > > > Dept. of Neurophysiology and Pathophysiology > > > University Medical Center Hamburg-Eppendorf > > > Martinistr. 52 > > > 20246 Hamburg > > > Germany > > > Phone: +49-40-7410-54680 > > > Fax: +49-40-7410-57752 > > > E-Mail: k.muesch at uke.uni-hamburg.de > > > _____________________________________ > > > > > > > > > -- > > > Pflichtangaben gem?? Gesetz ?ber elektronische Handelsregister und > > > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > > > > > Universit?tsklinikum Hamburg-Eppendorf; K?rperschaft des ?ffentlichen > > > Rechts; Gerichtsstand: Hamburg > > > > > > Vorstandsmitglieder: Prof. Dr. J?rg F. Debatin (Vorsitzender), Dr. > > Alexander > > > Kirstein, Joachim Pr?l?, Prof. Dr. Dr. Uwe Koch-Gromus > > > > > > > > > _______________________________________________ > > > 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 > > > > End of fieldtrip Digest, Vol 10, Issue 18 > > ***************************************** > > > _______________________________________________ > 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 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 giulia.rizza at tiscali.it Fri Sep 16 11:18:20 2011 From: giulia.rizza at tiscali.it (Giulia Rizza) Date: Fri, 16 Sep 2011 11:18:20 +0200 (CEST) Subject: [FieldTrip] matter of units? Message-ID: <32723147.58881316164700497.JavaMail.defaultUser@defaultHost> Hi everybody! Sorry for this banal question: I'm processinga EEG data from Neuroscan and everything seemed ok until I noticed that I find a very small activity in channels (-10 10) when browsing through the data, much lower than the one I can visualize from the same dataset with the acquisition software (-40 40 microV). Is it just a matter of units or am I doing something wrong? I'm working with the version 20110621 (now I'm passing to a new one) on Matlab 7.9.0 Here I've just defined trials and applied a filter. cfg = []; cfg. dataset = 'Cristiano_S2.cnt'; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef. eventvalue = 2; cfg.trialdef.prestim = 0.8; cfg.trialdef.poststim = 0.8; cfg = ft_definetrial(cfg); cfg.lpfilter = 'yes'; cfg.lpfreq = 100; data = ft_preprocessing(cfg); Thanks in advance to anyone Giulia Tutto Incluso 20 Mega light: telefono + ADSL a soli 19,95 € al mese fino al 2014. Risparmi 324 euro! Passa a Tiscali http://abbonati.tiscali.it/rd/rd2.html?u=http%3A%2F%2Fabbonati.tiscali.it%2Ftelefono-adsl%2Fprodotti%2Ftc%2Ftuttoincluso_light%2F%3FWT.mc_id%3D01fw%26r=TS00000A00002%26dm=DM_03%26p=footer From drivolta81 at gmail.com Fri Sep 16 11:57:17 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Fri, 16 Sep 2011 11:57:17 +0200 Subject: [FieldTrip] ??? Reference to non-existent field 'res4' Message-ID: Dear Fieldtrippers, I am trying to preprocess a subject. There is an error I have never seen before. It says: ??? Reference to non-existent field 'res4'. However, in my subject´s folder there is a .res4 file. To note that, when I have completed to test the subject, it was not possible to determine the head movement since “the system could not determine the position of the nasion”. May this be related? The file is corrupted and I can not open it with fieldtrip even with ft_read_header. Thanks for the help, Davide HERE IS THE ERROR: working on: SRW66_VisualGamma1_20110913_01.ds # of run in Design is:1 cfg = dataset: [1x94 char] datatype: 'continuous' trialdef: [1x1 struct] Warning: no trialfun was specified, using trialfun_general > In ft_definetrial at 101 In Main_VG_HF at 72 evaluating trialfunction 'trialfun_general' readCTFds: This dataset has multiple meg4 files. readCTFds: .11_meg4 file header= Valid header options: MEG41CP MEG42CP ??? Reference to non-existent field 'res4'. Error in ==> ft_read_header at 331 hdr.Fs = orig.res4.sample_rate; Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 144 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> Main_VG_HF at 72 cfg = ft_definetrial(cfg); -------------- next part -------------- An HTML attachment was scrubbed... URL: From BelluscB at ninds.nih.gov Fri Sep 16 23:31:42 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Fri, 16 Sep 2011 17:31:42 -0400 Subject: [FieldTrip] FW: problem with ft_prepare_singleshell Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> Hi fellow fieldtrip users- I am currently using fieldtrip version 20110913 and have encountered a problem that wasn't there before. After reslicing and segmenting my mri data (which was realigned to CTF format), I segmented the data using cfg.output = {'skullstrip' 'brain'} and seg = ft_volumesegment(cfg, mri). I saved the resulting seg matrix. Then, when I run ft_prepare_singleshell to generate my volumetric model (vol): cfg = []; vol = ft_prepare_singleshell(cfg, seg) I get the following messages and error. not downsampling anatomy not downsampling brain the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB using the segmentation approach Warning: adding /home/belluscb/nindsip/matlab/fieldtrip-20110913/external/spm8 toolbox to your Matlab path using the segmented MRI ??? Reference to non-existent field 'seg'. Error in ==> prepare_mesh_segmentation at 63 [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); If I use an old version of fieldtrip (20100505) that I had, and run the same command cfg = []; vol = ft_prepare_singleshell(cfg, seg) on the same seg matrix, it runs without a problem. I am not skilled enough (yet) at reading code to figure out what is not working with the recent version of fieldtrip. Can someone please assist me? Thanks! Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 From jan.schoffelen at donders.ru.nl Sat Sep 17 10:10:33 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 17 Sep 2011 10:10:33 +0200 Subject: [FieldTrip] FW: problem with ft_prepare_singleshell In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> Message-ID: Dear Beth, Sorry for the bug. This is indeed a known problem which has found its way into recent versions. We are working on a permanent fix. I just checked in a temporary patch which should be available for download as of tonight (CET), or can be checked out from google-code soon. Alternatively, you could replace the recent version of ft_prepare_singleshell with and old version which works for you. This should affect anything else. Thanks for reporting this and sorry for the inconvenience. Best wishes, Jan-Mathijs On Sep 16, 2011, at 11:31 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > Hi fellow fieldtrip users- > I am currently using fieldtrip version 20110913 and have encountered a problem that wasn't there before. After reslicing and segmenting my mri data (which was realigned to CTF format), I segmented the data using cfg.output = {'skullstrip' 'brain'} and seg = ft_volumesegment(cfg, mri). I saved the resulting seg matrix. > Then, when I run ft_prepare_singleshell to generate my volumetric model (vol): > > cfg = []; > vol = ft_prepare_singleshell(cfg, seg) > > I get the following messages and error. > > > > not downsampling anatomy > not downsampling brain > the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB > using the segmentation approach > Warning: adding /home/belluscb/nindsip/matlab/fieldtrip-20110913/external/spm8 toolbox to your > Matlab path > using the segmented MRI > ??? Reference to non-existent field 'seg'. > > Error in ==> prepare_mesh_segmentation at 63 > [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > > > > If I use an old version of fieldtrip (20100505) that I had, and run the same command cfg = []; > vol = ft_prepare_singleshell(cfg, seg) on the same seg matrix, it runs without a problem. > > I am not skilled enough (yet) at reading code to figure out what is not working with the recent version of fieldtrip. > Can someone please assist me? > > Thanks! > Beth. > > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > > > _______________________________________________ > 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 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 Sat Sep 17 10:14:10 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 17 Sep 2011 10:14:10 +0200 Subject: [FieldTrip] FW: problem with ft_prepare_singleshell In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> Message-ID: <4BD2A835-A9CF-4CDD-B312-6EF543D31077@donders.ru.nl> Dear Beth, Sorry for the bug. This is indeed a known problem which has found its way into recent versions. We are working on a permanent fix. I just checked in a temporary patch which should be available for download as of tonight (CET), or can be checked out from google-code soon. Alternatively, you could replace the recent version of ft_prepare_singleshell with and old version which works for you. This should affect anything else. Thanks for reporting this and sorry for the inconvenience. Best wishes, Jan-Mathijs On Sep 16, 2011, at 11:31 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > Hi fellow fieldtrip users- > I am currently using fieldtrip version 20110913 and have encountered a problem that wasn't there before. After reslicing and segmenting my mri data (which was realigned to CTF format), I segmented the data using cfg.output = {'skullstrip' 'brain'} and seg = ft_volumesegment(cfg, mri). I saved the resulting seg matrix. > Then, when I run ft_prepare_singleshell to generate my volumetric model (vol): > > cfg = []; > vol = ft_prepare_singleshell(cfg, seg) > > I get the following messages and error. > > > > not downsampling anatomy > not downsampling brain > the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB > using the segmentation approach > Warning: adding /home/belluscb/nindsip/matlab/fieldtrip-20110913/external/spm8 toolbox to your > Matlab path > using the segmented MRI > ??? Reference to non-existent field 'seg'. > > Error in ==> prepare_mesh_segmentation at 63 > [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > > > > If I use an old version of fieldtrip (20100505) that I had, and run the same command cfg = []; > vol = ft_prepare_singleshell(cfg, seg) on the same seg matrix, it runs without a problem. > > I am not skilled enough (yet) at reading code to figure out what is not working with the recent version of fieldtrip. > Can someone please assist me? > > Thanks! > Beth. > > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > > > _______________________________________________ > 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 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 Sat Sep 17 10:18:20 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sat, 17 Sep 2011 10:18:20 +0200 Subject: [FieldTrip] FW: problem with ft_prepare_singleshell In-Reply-To: References: <794DFDD3C128EF44AC49ADC58FD0090C058A50C373@NIHMLBX10.nih.gov> Message-ID: <5D7EF8FF-AB9C-4D52-A485-3A5EA30BAAD4@donders.ru.nl> > Dear Beth, > > Sorry for the bug. This is indeed a known problem which has found its way into recent versions. We are working on a permanent fix. I just checked in a temporary patch which should be available for download as of tonight (CET), or can be checked out from google-code soon. Alternatively, you could replace the recent version of ft_prepare_singleshell with and old version which works for you. This should affect anything else. Sorry, of course I meant that it should NOT affect anything else. BW, JM >> Hi fellow fieldtrip users- >> I am currently using fieldtrip version 20110913 and have encountered a problem that wasn't there before. After reslicing and segmenting my mri data (which was realigned to CTF format), I segmented the data using cfg.output = {'skullstrip' 'brain'} and seg = ft_volumesegment(cfg, mri). I saved the resulting seg matrix. >> Then, when I run ft_prepare_singleshell to generate my volumetric model (vol): >> >> cfg = []; >> vol = ft_prepare_singleshell(cfg, seg) >> >> I get the following messages and error. >> >> >> >> not downsampling anatomy >> not downsampling brain >> the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB >> using the segmentation approach >> Warning: adding /home/belluscb/nindsip/matlab/fieldtrip-20110913/external/spm8 toolbox to your >> Matlab path >> using the segmented MRI >> ??? Reference to non-existent field 'seg'. >> >> Error in ==> prepare_mesh_segmentation at 63 >> [mrix, mriy, mriz] = ndgrid(1:size(mri.seg,1), 1:size(mri.seg,2), 1:size(mri.seg,3)); >> >> Error in ==> ft_prepare_mesh at 124 >> bnd = prepare_mesh_segmentation(cfg, mri); >> >> Error in ==> ft_prepare_singleshell at 89 >> vol.bnd = ft_prepare_mesh(cfg, mri); >> >> >> >> >> If I use an old version of fieldtrip (20100505) that I had, and run the same command cfg = []; >> vol = ft_prepare_singleshell(cfg, seg) on the same seg matrix, it runs without a problem. >> >> I am not skilled enough (yet) at reading code to figure out what is not working with the recent version of fieldtrip. >> Can someone please assist me? >> >> Thanks! >> Beth. >> >> >> Beth Belluscio MD-PhD >> Clinical Fellow >> Human Motor Control Section >> NINDS, NIH >> 301-402-3495 >> >> >> >> _______________________________________________ >> 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 > 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Sep 17 17:14:34 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 17 Sep 2011 10:14:34 -0500 Subject: [FieldTrip] Error in ft_timelockgrandaverage after import from EEGLAB Message-ID: Hello, I have imported data from EEGLAB (using eeglab2fieldtrip()) and averaged within fieldtrip, and then attempted to grand average (using ft_timelockgrandaverage with all the default options except cfg.keepindividual='yes'). I got the following error message: ??? Error using ==> fixdimord at 63 The data does not contain a dimord, but it also does not resemble raw data Error in ==> ft_checkdata at 151 data = fixdimord(data, strcmp(sourcerepresentation, 'new')); Error in ==> ft_timelockgrandaverage at 72 varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', 'feedback', 'no'); The structure of my average data after importing from EEGLAB looks like this, which I notice is missing some fields that data processed in fieldtrip with ft_preprocessing normally have: CF007_avg = label: {1x36 cell} fsample: 1000 elec: [1x1 struct] avg: [36x1201 single] var: [36x1201 single] time: [1x1201 double] cfg: [1x1 struct] Does anyone have any idea what might be causing the error? Thanks a lot, Steve Politzer-Ahles -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Sep 17 17:25:21 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 17 Sep 2011 10:25:21 -0500 Subject: [FieldTrip] Error in ft_timelockgrandaverage after import from EEGLAB In-Reply-To: References: Message-ID: Never mind, I just manually added data.dimord='chan_time' into each average and it worked now. Best, Steve Politzer-Ahles On Sat, Sep 17, 2011 at 10:14 AM, Stephen Politzer-Ahles < politzerahless at gmail.com> wrote: > Hello, > > I have imported data from EEGLAB (using eeglab2fieldtrip()) and averaged > within fieldtrip, and then attempted to grand average (using > ft_timelockgrandaverage with all the default options except > cfg.keepindividual='yes'). I got the following error message: > > ??? Error using ==> fixdimord at 63 > The data does not contain a dimord, but it also does not resemble raw data > > Error in ==> ft_checkdata at 151 > data = fixdimord(data, strcmp(sourcerepresentation, 'new')); > > Error in ==> ft_timelockgrandaverage at 72 > varargin{i} = ft_checkdata(varargin{i}, 'datatype', 'timelock', > 'feedback', 'no'); > > The structure of my average data after importing from EEGLAB looks like > this, which I notice is missing some fields that data processed in fieldtrip > with ft_preprocessing normally have: > > CF007_avg = > > label: {1x36 cell} > fsample: 1000 > elec: [1x1 struct] > avg: [36x1201 single] > var: [36x1201 single] > time: [1x1201 double] > cfg: [1x1 struct] > > Does anyone have any idea what might be causing the error? > > Thanks a lot, > Steve Politzer-Ahles > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sat Sep 17 18:42:39 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sat, 17 Sep 2011 11:42:39 -0500 Subject: [FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics Message-ID: When attempting to run cluster statistics on my EEG data (originally from Neuroscan .CNT, then processed in EEGLAB and finally imported to fieldtrip) using ft_timelockstatistics(), I receive the following error message: ??? Error using ==> ft_neighbourselection at 114 Did not find gradiometer or electrode information. Error in ==> statistics_wrapper at 241 cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); Error in ==> ft_timelockstatistics at 123 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); This seems to be because when I use cfg.channel = {'EEG'}; with my data, the channel information (the variable "sens" used in ft_neighbourselection) consists only of the list of channel labels: sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} On the other hand, when I run timelockstatistics on the sample data from the wiki, "sens" includes much more information: sens = pnt: [151x3 double] ori: [356x3 double] tra: [184x356 double] label: {151x1 cell} unit: 'cm' I think most of that extra information is planar gradient data (i.e., it comes from GA_FIC.grad). Since my data are EEG data, I assume it wouldn't make sense to use ft_megplanar on them. So, assuming that I need to get the extra channel location information into my EEG data, does anyone have any ideas on how to do that? Best, Steve Politzer-Ahles -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Sep 19 09:12:32 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 19 Sep 2011 09:12:32 +0200 Subject: [FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics In-Reply-To: References: Message-ID: <4E76EB60.9080801@donders.ru.nl> Hey Stephen, You need to specify the position of your electrodes, which are mostly stored in an 'elec' structure. If you do not have that available, you can circumvent the problem by defining a cfg.layout. In that case, neighbouring sensors will be selected according to how they are placed in that layout-file you specify. That's not 100% correct of course, but at least an estimate how the sensors are positioned (note that a layout has only 2D coordinates). For example, you could use cfg.layout = 'EEG1010.lay' as a start. Anyway, could you try using a more recent version of FieldTrip? A few months ago, we changed the way the neighbourselection works (actually, you have to call cfg.neighbours = ft_neighbourselection manually, now). You can then also check with cfg.feedback = 'yes' whether the neighbourselection looks alright to you (that's the same as calling ft_neighbourplot) Hope it helps! Best regards, Jörn On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote: > When attempting to run cluster statistics on my EEG data (originally > from Neuroscan .CNT, then processed in EEGLAB and finally imported to > fieldtrip) using ft_timelockstatistics(), I receive the following > error message: > > ??? Error using ==> ft_neighbourselection at 114 > Did not find gradiometer or electrode information. > > Error in ==> statistics_wrapper at 241 > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > Error in ==> ft_timelockstatistics at 123 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > This seems to be because when I use cfg.channel = {'EEG'}; with my > data, the channel information (the variable "sens" used in > ft_neighbourselection) consists only of the list of channel labels: > > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} > > On the other hand, when I run timelockstatistics on the sample data > from the wiki, "sens" includes much more information: > > sens = > > pnt: [151x3 double] > ori: [356x3 double] > tra: [184x356 double] > label: {151x1 cell} > unit: 'cm' > > I think most of that extra information is planar gradient data (i.e., > it comes from GA_FIC.grad). Since my data are EEG data, I assume it > wouldn't make sense to use ft_megplanar on them. So, assuming that I > need to get the extra channel location information into my EEG data, > does anyone have any ideas on how to do that? > > Best, > Steve Politzer-Ahles > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > > > _______________________________________________ > 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 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 irina.simanova at mpi.nl Mon Sep 19 13:14:59 2011 From: irina.simanova at mpi.nl (Irina Simanova) Date: Mon, 19 Sep 2011 13:14:59 +0200 Subject: [FieldTrip] ft_sourceplot error Message-ID: <33EAF058-5094-45A5-9164-73F672EA74F1@mpi.nl> Dear all, I have an error in checkconfig.m called from ft_sourceplot. What is wrong here? Thanks a lot, Irina vol = dim: [45 54 39] anatomy: [45x54x39 double] hdr: [1x1 struct] transform: [4x4 double] unit: 'mm' fun: [45x54x39 double] cfg_plot = funparameter: 'fun' method: 'ortho' >> ft_sourceplot(cfg_plot, vol) the input is volume data with dimensions [45 54 39] not downsampling anatomy not downsampling fun ??? Reference to non-existent field 'checksize'. Error in ==> ft_checkconfig at 559 if strcmp(checksize, 'yes') && ~isinf(cfg.checksize) Error in ==> ft_volumedownsample at 158 cfg = ft_checkconfig(cfg, 'trackconfig', 'off', 'checksize', 'yes'); Error in ==> ft_sourceplot at 307 data = ft_volumedownsample(tmpcfg, data); -------------- next part -------------- An HTML attachment was scrubbed... URL: From k.muesch at uke.uni-hamburg.de Mon Sep 19 14:24:21 2011 From: k.muesch at uke.uni-hamburg.de (=?iso-8859-1?Q?Kathrin_M=FCsch?=) Date: Mon, 19 Sep 2011 14:24:21 +0200 Subject: [FieldTrip] interaction within-subject indepsamplesT In-Reply-To: <008d01cc737e$f6192ba0$e24b82e0$@maris@donders.ru.nl> References: <1238529C-1B93-4BC9-B625-B16991718014@uke.uni-hamburg.de> <008d01cc737e$f6192ba0$e24b82e0$@maris@donders.ru.nl> Message-ID: Dear Eric, Thank you very much for your answer. I was afraid that this was the case. Best, Kathrin Am 15.09.2011 um 10:10 schrieb Eric Maris: > Dear Kathrin, > >> I need your advice on how to correctly test the interaction effects in a > 2x2 >> within-subject design with cluster-based randomization tests. I have two >> factors A and B with the levels a1/a2 and b1/b2. In addition, the number > of >> trials in A are about twice as much as in B. >> >> The procedure would be totally clear in a between-subject design (as in a >> previous post on the list: >> http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html) > > This post is about a WITHIN-subjects design. > >> because I could easily compute the differences of the factor levels >> A_diff=a1-a2 and B_diff=b1-b2 and then run ft_freqstatistics on the >> differences. However, since I have to run the statistics across trials and > not >> subjects I have independent samples and not dependent samples. > > So, you have a between-trials design. > > If it is >> possible at all, how can I calculate the differences A_diff and B_diff > across >> trials? Is it a problem that the number of trials are not equal? > > This is not possible. Permutation tests cannot be used for testing > interactions in a multi-factorial between-subjects/trials design. Michael > Wibral has a post in which he refers to a nice statistics paper on the > issue. > > A proxy that is possible (but not statistically sound) is to perform two > statistical tests of the first factor, once at the first level of second > factor and once at the second level. > > > Best, > > Eric Maris > > > > > > > > >> >> Any help is appreciated! >> >> Best, >> Kathrin >> >> _____________________________________ >> Kathrin Müsch >> >> Dept. of Neurophysiology and Pathophysiology >> University Medical Center Hamburg-Eppendorf >> Martinistr. 52 >> 20246 Hamburg >> Germany >> Phone: +49-40-7410-54680 >> Fax: +49-40-7410-57752 >> E-Mail: k.muesch at uke.uni-hamburg.de >> _____________________________________ >> >> >> -- >> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und >> Genossenschaftsregister sowie das Unternehmensregister (EHUG): >> >> Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen >> Rechts; Gerichtsstand: Hamburg >> >> Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. > Alexander >> Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus >> >> >> _______________________________________________ >> 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 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus From politzerahless at gmail.com Mon Sep 19 16:43:15 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Mon, 19 Sep 2011 09:43:15 -0500 Subject: [FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics Message-ID: Jörn, Thanks lot for this information. I tried specifying cfg.layout and got a new error message: ??? Error using ==> ft_neighbourselection at 130 Sensor distance is measured in an unknown unit type Error in ==> statistics_wrapper at 241 cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); Error in ==> ft_timelockstatistics at 123 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); (I get the same message when trying to run neighbours=ft_neighbourselection(cfg,data) with that layout file specified.) The layout file I was using is based directly on EEG1010.lay which is included in fieldtrip, and it works fine when I use it for topoplotting and multiplotting, so I'm not sure why it's causing errors when fed to ft_neighbourselection. As for the version, I actually am using the most recent version (which I downloaded yesterday before trying to run cluster statistics, and updated my path accordingly), but still getting these errors. The code I've been trying to run, though, is based on the sample code on the wiki page http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock, which may be out of date. Is there perhaps anyone on the list who has run cluster statistics on EEG data and would be willing to share a sample of their code? Best, Steve > Message: 1 > Date: Mon, 19 Sep 2011 09:12:32 +0200 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Problem with EEG channels in > ft_neighborselection when running cluster statistics > Message-ID: <4E76EB60.9080801 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hey Stephen, > > You need to specify the position of your electrodes, which are mostly > stored in an 'elec' structure. If you do not have that available, you > can circumvent the problem by defining a cfg.layout. In that case, > neighbouring sensors will be selected according to how they are placed > in that layout-file you specify. That's not 100% correct of course, but > at least an estimate how the sensors are positioned (note that a layout > has only 2D coordinates). For example, you could use cfg.layout = > 'EEG1010.lay' as a start. > > Anyway, could you try using a more recent version of FieldTrip? A few > months ago, we changed the way the neighbourselection works (actually, > you have to call cfg.neighbours = ft_neighbourselection manually, now). > You can then also check with cfg.feedback = 'yes' whether the > neighbourselection looks alright to you (that's the same as calling > ft_neighbourplot) > > Hope it helps! Best regards, > J?rn > > > > On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote: > > When attempting to run cluster statistics on my EEG data (originally > > from Neuroscan .CNT, then processed in EEGLAB and finally imported to > > fieldtrip) using ft_timelockstatistics(), I receive the following > > error message: > > > > ??? Error using ==> ft_neighbourselection at 114 > > Did not find gradiometer or electrode information. > > > > Error in ==> statistics_wrapper at 241 > > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > > > Error in ==> ft_timelockstatistics at 123 > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > This seems to be because when I use cfg.channel = {'EEG'}; with my > > data, the channel information (the variable "sens" used in > > ft_neighbourselection) consists only of the list of channel labels: > > > > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} > > > > On the other hand, when I run timelockstatistics on the sample data > > from the wiki, "sens" includes much more information: > > > > sens = > > > > pnt: [151x3 double] > > ori: [356x3 double] > > tra: [184x356 double] > > label: {151x1 cell} > > unit: 'cm' > > > > I think most of that extra information is planar gradient data (i.e., > > it comes from GA_FIC.grad). Since my data are EEG data, I assume it > > wouldn't make sense to use ft_megplanar on them. So, assuming that I > > need to get the extra channel location information into my EEG data, > > does anyone have any ideas on how to do that? > > > > Best, > > Steve Politzer-Ahles > > > > -- > > Stephen Politzer-Ahles > > University of Kansas > > Linguistics Department > > http://www.linguistics.ku.edu/ > > > > > > _______________________________________________ > > 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 > > 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/20110919/3fdfbedd/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 25 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Sep 19 17:13:53 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 19 Sep 2011 17:13:53 +0200 Subject: [FieldTrip] Problem with EEG channels in ft_neighborselection when running cluster statistics In-Reply-To: References: Message-ID: <4E775C31.7050305@donders.ru.nl> Hey Stephen, please check your FT path. You are definitely not using a recent FT version, because the line you quoted on statistics_wrapper does not exist anymore. You can verify your path by typing in Matlab 'which ft_defaults' or 'which ft_timelockstatistics' (without the quotes). Due to recent changes, it might additionally help to read these two FAQs: http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors http://fieldtrip.fcdonders.nl/faq/how_does_ft_neighbourselection_work Anyway, the tutorial wiki page is indeed out of date, as the neighbourselection is not included correctly anymore. I'm gonna fix this :) The only thing which you need to add is cfg.neighbours=ft_neighbourselection(cfg, [...]) before calling ft_timelockstatistics. That's all that changed. Best regards, Jörn On 9/19/2011 4:43 PM, Stephen Politzer-Ahles wrote: > Jörn, > > Thanks lot for this information. I tried specifying cfg.layout and got > a new error message: > > ??? Error using ==> ft_neighbourselection at 130 > Sensor distance is measured in an unknown unit type > > Error in ==> statistics_wrapper at 241 > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > Error in ==> ft_timelockstatistics at 123 > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > (I get the same message when trying to run > neighbours=ft_neighbourselection(cfg,data) with that layout file > specified.) The layout file I was using is based directly on > EEG1010.lay which is included in fieldtrip, and it works fine when I > use it for topoplotting and multiplotting, so I'm not sure why it's > causing errors when fed to ft_neighbourselection. > > As for the version, I actually am using the most recent version (which > I downloaded yesterday before trying to run cluster statistics, and > updated my path accordingly), but still getting these errors. The code > I've been trying to run, though, is based on the sample code on the > wiki page > http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock, > which may be out of date. > > Is there perhaps anyone on the list who has run cluster statistics on > EEG data and would be willing to share a sample of their code? > > Best, > Steve > > Message: 1 > Date: Mon, 19 Sep 2011 09:12:32 +0200 > From: "J?rn M. Horschig" > > To: Email discussion list for the FieldTrip project > > > Subject: Re: [FieldTrip] Problem with EEG channels in > ft_neighborselection when running cluster statistics > Message-ID: <4E76EB60.9080801 at donders.ru.nl > > > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hey Stephen, > > You need to specify the position of your electrodes, which are mostly > stored in an 'elec' structure. If you do not have that available, you > can circumvent the problem by defining a cfg.layout. In that case, > neighbouring sensors will be selected according to how they are placed > in that layout-file you specify. That's not 100% correct of > course, but > at least an estimate how the sensors are positioned (note that a > layout > has only 2D coordinates). For example, you could use cfg.layout = > 'EEG1010.lay' as a start. > > Anyway, could you try using a more recent version of FieldTrip? A few > months ago, we changed the way the neighbourselection works (actually, > you have to call cfg.neighbours = ft_neighbourselection manually, > now). > You can then also check with cfg.feedback = 'yes' whether the > neighbourselection looks alright to you (that's the same as calling > ft_neighbourplot) > > Hope it helps! Best regards, > J?rn > > > > On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote: > > When attempting to run cluster statistics on my EEG data (originally > > from Neuroscan .CNT, then processed in EEGLAB and finally > imported to > > fieldtrip) using ft_timelockstatistics(), I receive the following > > error message: > > > > ??? Error using ==> ft_neighbourselection at 114 > > Did not find gradiometer or electrode information. > > > > Error in ==> statistics_wrapper at 241 > > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > > > Error in ==> ft_timelockstatistics at 123 > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > This seems to be because when I use cfg.channel = {'EEG'}; with my > > data, the channel information (the variable "sens" used in > > ft_neighbourselection) consists only of the list of channel labels: > > > > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} > > > > On the other hand, when I run timelockstatistics on the sample data > > from the wiki, "sens" includes much more information: > > > > sens = > > > > pnt: [151x3 double] > > ori: [356x3 double] > > tra: [184x356 double] > > label: {151x1 cell} > > unit: 'cm' > > > > I think most of that extra information is planar gradient data > (i.e., > > it comes from GA_FIC.grad). Since my data are EEG data, I assume it > > wouldn't make sense to use ft_megplanar on them. So, assuming that I > > need to get the extra channel location information into my EEG data, > > does anyone have any ideas on how to do that? > > > > Best, > > Steve Politzer-Ahles > > > > -- > > Stephen Politzer-Ahles > > University of Kansas > > Linguistics Department > > http://www.linguistics.ku.edu/ > > > > > > _______________________________________________ > > 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 > > 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: > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 25 > ***************************************** > > > > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > > > _______________________________________________ > 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 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 sguillor at brandeis.edu Mon Sep 19 22:34:39 2011 From: sguillor at brandeis.edu (Sylvia Guillory) Date: Mon, 19 Sep 2011 16:34:39 -0400 Subject: [FieldTrip] Time Frequency Analysis and padding Message-ID: Dear FieldTrip Community, I have a question regarding the ft_freqanalysis function. I acquired EEG data in a paradigm where each condition varied in length. For instance, the memory retention period was 600ms in one condition and 900ms in another condition. I want to perform time-frequency analysis using morlet wavelets. My question is that if my epochs are different lengths, would I need to set the cgf.pad parameter to pad the 600ms condition by 300ms so that they are the same length or is it recommend that when I segment the data that I produce longer epochs for my time of interest in the 600ms condition? Thank you for your time. -Sylvia -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Sep 20 09:57:37 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 20 Sep 2011 09:57:37 +0200 Subject: [FieldTrip] Time Frequency Analysis and padding In-Reply-To: References: Message-ID: Hi Sylvia, You can do both. Note that in specifying the cfg.pad parameter, you need to give the length of the trial including the padding, so in your example it should be >= 0.9. The consequence of the padding will be that you can still estimate the TF-map at latencies > 0.6 s, but note that thiswill be computed from fewer observations than the power at lower latencies. Best, Jan-mathijs On Sep 19, 2011, at 10:34 PM, Sylvia Guillory wrote: > Dear FieldTrip Community, > > I have a question regarding the ft_freqanalysis function. I acquired EEG data in a paradigm where each condition varied in length. For instance, the memory retention period was 600ms in one condition and 900ms in another condition. I want to perform time-frequency analysis using morlet wavelets. My question is that if my epochs are different lengths, would I need to set the cgf.pad parameter to pad the 600ms condition by 300ms so that they are the same length or is it recommend that when I segment the data that I produce longer epochs for my time of interest in the 600ms condition? Thank you for your time. > > -Sylvia > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Tue Sep 20 12:29:58 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Tue, 20 Sep 2011 12:29:58 +0200 (CEST) Subject: [FieldTrip] Fwd: [Fwd: Yum & rpm code dependencies for OpenMEEG] In-Reply-To: <1580753422.1324605.1316514594866.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <1034464623.1324607.1316514598348.JavaMail.root@draco.zimbra.ru.nl> Hi Steve and Alexandre Since this topic might be of interest for a bigger audience I took the liberty of forwarding it to the official discussion list. The pipeline to run the OpenMEEG forward solver is quite standard in FieldTrip. We have put effort in making things as general as possible. In principle the same pipeline can be used to generate other forward solutions. In your case, you have the mesh from Freesurfer and you want to generate a 'volume conductor structure', which will be fed to the ft_compute_leadfield function. The function to generate the vol structure is ft_prepare_headmodel. In FieldTrip code: % this is the FreeSurfer surface bnd = ft_read_headshape('filename'); % this generates a 'vol' structure (one boundary) cfg=[]; cfg.method = 'openmeeg'; cfg.geom = bnd; cfg.conductivity = 1; vol = ft_prepare_headmodel(cfg); Assuming you know the positions of your sensors, the next step will be: [vol,sens]=ft_prepare_vol_sens(vol,sens); % this makes the vol and the elec structure compatible % this generates a grid of source points for your forward solution cfg = []; cfg.pos = pos; % the positions of the dipoles gridfwd = ft_prepare_sourcemodel(cfg,vol,sens); % this calculates the lead fields cfg=[]; cfg.channel = 'all'; cfg.vol = vol; cfg.grid = gridfwd; cfg.elec = sens; % use cfg.grad for MEG data gridfwd = ft_prepare_leadfield(cfg); Take care that dipoles, electrodes and surfaces are expressed in the same coordinates system (and coregistered). Moreover you should know that some surface triangulations work better than others for a BEM method. Here I am implicitly assuming that you have one single boundary (must be a closed surface for BEM) and that the surface is a smooth rendering of the inner skull. I hope this helps Best regards, Cristiano ----- "Alexandre Gramfort" schreef: > Van: "Alexandre Gramfort" > Aan: sdeiss at ucsd.edu > Cc: "c micheli" > Verzonden: Maandag 19 september 2011 23:59:23 > Onderwerp: Re: [Fwd: Yum & rpm code dependencies for OpenMEEG] > > Hello steve, > > > I am trying to incorperate our intermediate results, which include > a > > freesurfer mesh, with OpenMEEG to get a new forward matrix to look > at. > > All I have to go on at the moment is the sample OpenMEEG script. >  But I > > think that leaves out a lot of the cfg fields that I have to specify > after > > looking at ft_prepare_bemmodel and ft_prepare_mesh that call > OpenMEEG in > > FieldTrip.  If I am right, is there an example script for doing > OpenMEEG > > with real head data as opposed to the sperical model? > > I am afraid not but there should be an example of forward modeling on > the wiki > and the api should be the same. > > maybe cristiano in CC knows? > > Alex > > > The information in this e-mail is intended only for the person to whom > it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you > in error > but does not contain patient information, please contact the sender > and properly > dispose of the e-mail. From ekanal at cmu.edu Tue Sep 20 20:28:58 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 20 Sep 2011 14:28:58 -0400 Subject: [FieldTrip] source localization difficulties Message-ID: <7ADAEFF1-98AE-465D-B6A0-486AFF8857A7@cmu.edu> Hello folks - I'm trying to use source localization on a number of datasets, and I'm finding the FT functions confusing. Firstly, and most problematic, examining the same MRI data using `ft_read_mri` + `ft_volumerealign` and the tkmedit tool that comes with FreeSurfer seems to show two completely different brains. I'm unable to locate landmarks in the FT browser that I can see in the tkmedit window, and vice versa. The data isn't simply flipped; it looks that each slice is different. Why would this be the case? Secondly, in an attempt to coregister the MRI and MEG data, I used `ft_determine_coordsys`, which simply opened a window with a picture of three axes (see attached image "ft_determine_coordsys.png"). Shouldn't there be image data overlaid on the axes? Lastly, I've already segmented and coregistered the MRI and MEG data using FreeSurfer. Is there a way to simply load this data into FieldTrip and get right to plotting the data? Thanks! Elli Kanal -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 From politzerahless at gmail.com Tue Sep 20 20:58:03 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 20 Sep 2011 13:58:03 -0500 Subject: [FieldTrip] fieldtrip Digest, Vol 10, Issue 27 In-Reply-To: References: Message-ID: Jorn, Thanks a lot for your assistance. It turns out I had in fact updated to a version that was not the most recent; I've now updated my version to the most recent one and eventually I was able to run the cluster statistics successfully. I have one [hopefully final!] very minor question... when I plot the results of the cluster test, the time windows with significant clusters show up correctly (like in the samples on the wiki, the significant channels are highlighted in those time windows). But in the time windows where there are no significant clusters, for some reason all channels are highlighted--this happens with both my own data and when I try plotting the sample data from the wiki. While plotting, I checked "neg_int" and didn't see any problems (i.e., in the nonsignificant time windows neg_int was all zeroes), so I'm not sure why channels are getting highlighted there. Like I said, this is not a major problem. But if anyone has any ideas why this might happen, I would greatly appreciate it. (And again, thanks a lot to Jorn for all your help so far!) Best, Steve Message: 1 > Date: Mon, 19 Sep 2011 17:13:53 +0200 > From: "J?rn M. Horschig" > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] Problem with EEG channels in > ft_neighborselection when running cluster statistics > Message-ID: <4E775C31.7050305 at donders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > Hey Stephen, > > please check your FT path. You are definitely not using a recent FT > version, because the line you quoted on statistics_wrapper does not > exist anymore. You can verify your path by typing in Matlab 'which > ft_defaults' or 'which ft_timelockstatistics' (without the quotes). > > Due to recent changes, it might additionally help to read these two FAQs: > http://fieldtrip.fcdonders.nl/faq/how_can_i_define_neighbouring_sensors > http://fieldtrip.fcdonders.nl/faq/how_does_ft_neighbourselection_work > > Anyway, the tutorial wiki page is indeed out of date, as the > neighbourselection is not included correctly anymore. I'm gonna fix this > :) The only thing which you need to add is > cfg.neighbours=ft_neighbourselection(cfg, [...]) before calling > ft_timelockstatistics. That's all that changed. > > Best regards, > J?rn > > > On 9/19/2011 4:43 PM, Stephen Politzer-Ahles wrote: > > J?rn, > > > > Thanks lot for this information. I tried specifying cfg.layout and got > > a new error message: > > > > ??? Error using ==> ft_neighbourselection at 130 > > Sensor distance is measured in an unknown unit type > > > > Error in ==> statistics_wrapper at 241 > > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > > > Error in ==> ft_timelockstatistics at 123 > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > > > (I get the same message when trying to run > > neighbours=ft_neighbourselection(cfg,data) with that layout file > > specified.) The layout file I was using is based directly on > > EEG1010.lay which is included in fieldtrip, and it works fine when I > > use it for topoplotting and multiplotting, so I'm not sure why it's > > causing errors when fed to ft_neighbourselection. > > > > As for the version, I actually am using the most recent version (which > > I downloaded yesterday before trying to run cluster statistics, and > > updated my path accordingly), but still getting these errors. The code > > I've been trying to run, though, is based on the sample code on the > > wiki page > > http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock, > > which may be out of date. > > > > Is there perhaps anyone on the list who has run cluster statistics on > > EEG data and would be willing to share a sample of their code? > > > > Best, > > Steve > > > > Message: 1 > > Date: Mon, 19 Sep 2011 09:12:32 +0200 > > From: "J?rn M. Horschig" > > > > To: Email discussion list for the FieldTrip project > > > > > Subject: Re: [FieldTrip] Problem with EEG channels in > > ft_neighborselection when running cluster statistics > > Message-ID: <4E76EB60.9080801 at donders.ru.nl > > > > > Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" > > > > Hey Stephen, > > > > You need to specify the position of your electrodes, which are mostly > > stored in an 'elec' structure. If you do not have that available, you > > can circumvent the problem by defining a cfg.layout. In that case, > > neighbouring sensors will be selected according to how they are > placed > > in that layout-file you specify. That's not 100% correct of > > course, but > > at least an estimate how the sensors are positioned (note that a > > layout > > has only 2D coordinates). For example, you could use cfg.layout = > > 'EEG1010.lay' as a start. > > > > Anyway, could you try using a more recent version of FieldTrip? A few > > months ago, we changed the way the neighbourselection works > (actually, > > you have to call cfg.neighbours = ft_neighbourselection manually, > > now). > > You can then also check with cfg.feedback = 'yes' whether the > > neighbourselection looks alright to you (that's the same as calling > > ft_neighbourplot) > > > > Hope it helps! Best regards, > > J?rn > > > > > > > > On 9/17/2011 6:42 PM, Stephen Politzer-Ahles wrote: > > > When attempting to run cluster statistics on my EEG data > (originally > > > from Neuroscan .CNT, then processed in EEGLAB and finally > > imported to > > > fieldtrip) using ft_timelockstatistics(), I receive the following > > > error message: > > > > > > ??? Error using ==> ft_neighbourselection at 114 > > > Did not find gradiometer or electrode information. > > > > > > Error in ==> statistics_wrapper at 241 > > > cfg.neighbours = ft_neighbourselection(cfg,varargin{1}); > > > > > > Error in ==> ft_timelockstatistics at 123 > > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > > > This seems to be because when I use cfg.channel = {'EEG'}; with my > > > data, the channel information (the variable "sens" used in > > > ft_neighbourselection) consists only of the list of channel labels: > > > > > > sens = {'FPZ' 'CPZ' 'FP2' 'F7' .........} > > > > > > On the other hand, when I run timelockstatistics on the sample data > > > from the wiki, "sens" includes much more information: > > > > > > sens = > > > > > > pnt: [151x3 double] > > > ori: [356x3 double] > > > tra: [184x356 double] > > > label: {151x1 cell} > > > unit: 'cm' > > > > > > I think most of that extra information is planar gradient data > > (i.e., > > > it comes from GA_FIC.grad). Since my data are EEG data, I assume it > > > wouldn't make sense to use ft_megplanar on them. So, assuming that > I > > > need to get the extra channel location information into my EEG > data, > > > does anyone have any ideas on how to do that? > > > > > > Best, > > > Steve Politzer-Ahles > > > > > > -- > > > Stephen Politzer-Ahles > > > University of Kansas > > > Linguistics Department > > > http://www.linguistics.ku.edu/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Sep 21 09:19:15 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 21 Sep 2011 09:19:15 +0200 Subject: [FieldTrip] source localization difficulties In-Reply-To: <7ADAEFF1-98AE-465D-B6A0-486AFF8857A7@cmu.edu> References: <7ADAEFF1-98AE-465D-B6A0-486AFF8857A7@cmu.edu> Message-ID: <75EC3F25-B486-4F52-8A0F-B83AEA0E19AA@donders.ru.nl> Hi Elli, > Firstly, and most problematic, examining the same MRI data using `ft_read_mri` + `ft_volumerealign` and the tkmedit tool that comes with FreeSurfer seems to show two completely different brains. I'm unable to locate landmarks in the FT browser that I can see in the tkmedit window, and vice versa. The data isn't simply flipped; it looks that each slice is different. Why would this be the case? ft_read_mri reads in the raw MRI-file(s) that you specified (e.g. the DICOM-slices) and stacks them in the right order. When displaying the data in ft_volumerealign, no magic is performed and you will just see the data as it is stored in the 3D-volume. Nothing more, nothing less. Did you apply any additional processing steps before displaying it with freesurfer? It is hard for me to judge whether something, and if so, what is going wrong here. > > Secondly, in an attempt to coregister the MRI and MEG data, I used `ft_determine_coordsys`, which simply opened a window with a picture of three axes (see attached image "ft_determine_coordsys.png"). Shouldn't there be image data overlaid on the axes? > There's no figure attached in the mail I got. I would indeed expect to see 3 axes and three intersecting orthogonal slices with anatomical data. That is, if the call to ft_determine_coordsys was ft_determine_coordsys([],mri). Note that this function is just intended to check whether the coordinate system attached to the input data (mri, sensor positions, volume conduction model of the head, source dipole positions etc.) is as expected, or to assign the coordinate system, if you provide some input as to how to interpret the 3 cardinal axes. In order to check whether the co-registration went OK I would -co-register the MRI to the coordinate system in which the meg sensors are expressed -segment the MRI (these previous 2 steps can be done in freesurfer -create a volume conduction model (let's call it 'vol') of the head (e.g. by calling ft_prepare_singleshell, or even better: call ft_prepare_headmodel with cfg.method = 'singleshell') -check the co-registration: ft_plot_sens(data.grad);hold on;ft_plot_vol(vol), this should show the brain surface and the sensors more or less properly aligned. > Lastly, I've already segmented and coregistered the MRI and MEG data using FreeSurfer. Is there a way to simply load this data into FieldTrip and get right to plotting the data? > Yes, as far as I know ft_read_mri should know how to deal with *.mgz volumes. > Thanks! You're welcome. Jan-Mathijs > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekanal at cmu.edu Wed Sep 21 19:53:49 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Wed, 21 Sep 2011 13:53:49 -0400 Subject: [FieldTrip] source localization difficulties In-Reply-To: <75EC3F25-B486-4F52-8A0F-B83AEA0E19AA@donders.ru.nl> References: <7ADAEFF1-98AE-465D-B6A0-486AFF8857A7@cmu.edu> <75EC3F25-B486-4F52-8A0F-B83AEA0E19AA@donders.ru.nl> Message-ID: Thanks for the reply. I'll look into the read_mri issue a bit more myself and see if I can't uncover anything. >> >> Secondly, in an attempt to coregister the MRI and MEG data, I used `ft_determine_coordsys`, which simply opened a window with a picture of three axes (see attached image "ft_determine_coordsys.png"). Shouldn't there be image data overlaid on the axes? >> > > There's no figure attached in the mail I got. I would indeed expect to see 3 axes and three intersecting orthogonal slices with anatomical data. That is, if the call to ft_determine_coordsys was ft_determine_coordsys([],mri). Note that this function is just intended to check whether the coordinate system attached to the input data (mri, sensor positions, volume conduction model of the head, source dipole positions etc.) is as expected, or to assign the coordinate system, if you provide some input as to how to interpret the 3 cardinal axes. > In order to check whether the co-registration went OK I would > -co-register the MRI to the coordinate system in which the meg sensors are expressed > -segment the MRI (these previous 2 steps can be done in freesurfer > -create a volume conduction model (let's call it 'vol') of the head (e.g. by calling ft_prepare_singleshell, or even better: call ft_prepare_headmodel with cfg.method = 'singleshell') > -check the co-registration: ft_plot_sens(data.grad);hold on;ft_plot_vol(vol), this should show the brain surface and the sensors more or less properly aligned. Thanks for the overview. Apparently I didn't attach the image. Here it is. There's no slices, just the gridlines. My code is as follows: % read raw DICOM data mri = ft_read_mri('raw_data/19/mprage_512x416.5/MR.1.3.12.2.1107.5.2.32.35216.2011051711005397198638928'); mri_coord = ft_determine_coordsys(mri,'interactive','yes'); This may be a bug, as it does seem to work appropriately with data loaded from .mgz files, as well as DICOM data loaded into and then saved out of SPM. >> >> Lastly, I've already segmented and coregistered the MRI and MEG data using FreeSurfer. Is there a way to simply load this data into FieldTrip and get right to plotting the data? >> > > Yes, as far as I know ft_read_mri should know how to deal with *.mgz volumes. Thanks. So, to make sure I get it: to use freesurfer data, I want to load up the .mgz volumes in such a way that I'll end up replicating the output of `ft_volumesegment`. That means finding the .mgz files that represent the `segmentedmri.gray` and `segmentedmri.white` structures and constructing a new structure with the contents of those files. One last point of confusion: can I actually do MEG-MRI coregistration in FreeSurfer? I've been doing it in MNE, which saves the data to a *.fif file. Is there a way to use the output of the MNE coregistration tool in FieldTrip? I've placed a .mat file with the MNE coregistration data (loaded from the fif file using the MNE `fiff_load_mri` function) online [1] so you can see it's contents; maybe you can tell which field in the structure is the correct transformation matrix. Thanks! Elli [1] http://erikdev.com/mne_coregistration_data.zip -------------- next part -------------- A non-text attachment was scrubbed... Name: ft_determine_coordsys.png Type: image/png Size: 37741 bytes Desc: not available URL: From B.Mouthaan at neuro.umcn.nl Thu Sep 22 11:38:04 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 22 Sep 2011 11:38:04 +0200 Subject: [FieldTrip] loading brainvision data Message-ID: Hello Fieldtrippers, Hello Fieldtrippers, For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: ??? Error using ==> ft_read_header at 86 file or directory 'heineken000003-kop.eeg' does not exist Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 161 [trl, event] = feval(cfg.trialfun, cfg); Especially the directory error pops up frequently. I don't have a clue. My script is like this: cfg = []; cfg.datafile = 'heineken000003.eeg'; cfg.headerfile = 'heineken000003.vhdr' cfg.trialdef.eventtype = '?'; ft_definetrial(cfg) Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. Hope to hear from you! Brian Mouthaan Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 22 11:43:28 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 22 Sep 2011 11:43:28 +0200 Subject: [FieldTrip] loading brainvision data In-Reply-To: References: Message-ID: <7CF81136-AB84-40AB-9CF9-17DEA36F61A9@donders.ru.nl> Hi Brian, Are you in the correct directory? In other words is your 'pwd' such that you can see the files when you type 'dir'? BW, JM On Sep 22, 2011, at 11:38 AM, wrote: > Hello Fieldtrippers, > > Hello Fieldtrippers, > > For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. > However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. > > I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: > > > ??? Error using ==> ft_read_header at 86 > file or directory 'heineken000003-kop.eeg' does not exist > > Error in ==> trialfun_general at 55 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 161 > [trl, event] = feval(cfg.trialfun, cfg); > > > Especially the directory error pops up frequently. I don't have a clue. > My script is like this: > > cfg = []; > > cfg.datafile = 'heineken000003.eeg'; > cfg.headerfile = 'heineken000003.vhdr' > > cfg.trialdef.eventtype = '?'; > > ft_definetrial(cfg) > > > Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. > > Hope to hear from you! > > Brian Mouthaan > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > _______________________________________________ > 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 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 Thu Sep 22 11:48:11 2011 From: johanna.zumer at donders.ru.nl (Johanna Zumer) Date: Thu, 22 Sep 2011 11:48:11 +0200 Subject: [FieldTrip] loading brainvision data In-Reply-To: References: Message-ID: Hi Brian, Also I noticed in your error you have '-kop' in the file name but not in the dataset name. I've noticed that one can't change the file name of .eeg files (e.g. copying them to a new file name) and then still load them; you should stick to the original name as it was given when collected. Best, Johanna On 22 September 2011 11:38, wrote: > ** > > Hello Fieldtrippers, > > Hello Fieldtrippers, > > For an assignment during my internship at the Radboud UMC, I want try to > use fieldtrip for Beamforming at Auditory Evoked Potentials. > However the first step is unsuccesful. I try to load *.eeg , *.vhdr , > *.vmrk and *.avr files but I receive multiple errors. > > I also tried to use the example script in the tutorial. However this > doesn't work either. I get errors like: > > > ??? Error using ==> ft_read_header at 86 > file or directory 'heineken000003-kop.eeg' does not exist > > Error in ==> trialfun_general at 55 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 161 > [trl, event] = feval(cfg.trialfun, cfg); > > > Especially the directory error pops up frequently. I don't have a clue. > My script is like this: > > cfg = []; > > cfg.datafile = 'heineken000003.eeg'; > cfg.headerfile = 'heineken000003.vhdr' > > cfg.trialdef.eventtype = '?'; > > ft_definetrial(cfg) > > > Can anyone help me? FIY I lack experience of working with EEG and fieltrip, > but I work with Matlab regularly. > > Hope to hear from you! > > Brian Mouthaan > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het > handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial > Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > 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 Gregor.Volberg at psychologie.uni-regensburg.de Thu Sep 22 12:56:14 2011 From: Gregor.Volberg at psychologie.uni-regensburg.de (Gregor Volberg) Date: Thu, 22 Sep 2011 12:56:14 +0200 Subject: [FieldTrip] Antw: Re: loading brainvision data In-Reply-To: References: Message-ID: <4E7B306E020000570000AC3A@gwsmtp1.uni-regensburg.de> Hi Brian, Johanna is correct - manually editing the file names in Brainvision eeg data often causes problems. This is because the original name of the EEG data file ('*.eeg') and the corresponding marker file ('*.vmrk') are both stored within the header file ('*.vhdr'), and these information won't change accordingly if you rename the files on your hard disk. If the original data name is not available to re-rename the files on your hard disk, you can see them in the *.vhdr-file (5th and 6th row of the vhdr file, just open it with a text editor). Alternatively, you can edit the file name information within the vhdr-file to match the file names on your hard disk. Best regards, Gregor -- Dr. rer. nat. Gregor Volberg ( mailto:gregor.volberg at psychologie.uni-regensburg.de ) University of Regensburg Institute for Experimental Psychology 93040 Regensburg, Germany Tel: +49 941 943 3862 Fax: +49 941 943 3233 http://www.psychologie.uni-regensburg.de/Greenlee/team/volberg/volberg.html >>> Johanna Zumer 9/22/2011 11:48 AM >>> Hi Brian, Also I noticed in your error you have '-kop' in the file name but not in the dataset name. I've noticed that one can't change the file name of .eeg files (e.g. copying them to a new file name) and then still load them; you should stick to the original name as it was given when collected. Best, Johanna On 22 September 2011 11:38, wrote: Hello Fieldtrippers, Hello Fieldtrippers, For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: ??? Error using ==> ft_read_header at 86 file or directory 'heineken000003-kop.eeg' does not exist Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 161 [trl, event] = feval(cfg.trialfun, cfg); Especially the directory error pops up frequently. I don't have a clue. My script is like this: cfg = []; cfg.datafile = 'heineken000003.eeg'; cfg.headerfile = 'heineken000003.vhdr' cfg.trialdef.eventtype = '?'; ft_definetrial(cfg) Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. Hope to hear from you! Brian Mouthaan Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. _______________________________________________ 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 zizlsperger at gmail.com Thu Sep 22 14:49:14 2011 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Thu, 22 Sep 2011 14:49:14 +0200 Subject: [FieldTrip] ft_timelockgrandaverage Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2@gmail.com> Dear Fieldtrippers, in a within-subjects design I use ft_timelockgrandaverage with cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of the form: avg: [29x5000 double] var: [29x5000 double] time: [1x5000 double] dof: [29x5000 double] label: {29x1 cell} trial: [172x29x5000 double] dimord: 'rpt_chan_time' trialinfo: [172x28 double] cfg: [1x1 struct] I stick closely to the FieldTrip tutorial for cluster permutation statistics. I use the newest version of fieldtrip. After the grandaverage there is no more 'avg' in the structure, so I can not go on in the tutorial e.g. with: GA_XvsY = GA_X; GA_XvsY.avg = GA_X.avg - GA_Y.avg; New data is of structure: label: {29x1 cell} time: [1x5000 double] individual: [10x29x5000 double] dimord: 'subj_chan_time' cfg: [1x1 struct] Do I get the tutorial wrong or is it my data ? Thanks in advance Best Leopold From B.Mouthaan at neuro.umcn.nl Thu Sep 22 15:20:47 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 22 Sep 2011 15:20:47 +0200 Subject: [FieldTrip] Problem solved, Vol 10, Issue 30, directory issue References: Message-ID: Thank you all for your fast responses! The problem was solved. My directory set-up was incorrect. The data was unable to be loaded because I filed this in a subfolder. I place all data loose (not in a subfolder), in the same directory were I have my script. Again, thanks! -----Oorspronkelijk bericht----- Van: fieldtrip-bounces at donders.ru.nl namens fieldtrip-request at donders.ru.nl Verzonden: do 22-9-2011 12:00 Aan: fieldtrip at donders.ru.nl Onderwerp: fieldtrip Digest, Vol 10, Issue 30 Send fieldtrip mailing list submissions to fieldtrip at donders.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 donders.ru.nl You can reach the person managing the list at fieldtrip-owner at donders.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics: 1. loading brainvision data (B.Mouthaan at neuro.umcn.nl) 2. Re: loading brainvision data (jan-mathijs schoffelen) 3. Re: loading brainvision data (Johanna Zumer) ---------------------------------------------------------------------- Message: 1 Date: Thu, 22 Sep 2011 11:38:04 +0200 From: To: Subject: [FieldTrip] loading brainvision data Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hello Fieldtrippers, Hello Fieldtrippers, For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: ??? Error using ==> ft_read_header at 86 file or directory 'heineken000003-kop.eeg' does not exist Error in ==> trialfun_general at 55 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 161 [trl, event] = feval(cfg.trialfun, cfg); Especially the directory error pops up frequently. I don't have a clue. My script is like this: cfg = []; cfg.datafile = 'heineken000003.eeg'; cfg.headerfile = 'heineken000003.vhdr' cfg.trialdef.eventtype = '?'; ft_definetrial(cfg) Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. Hope to hear from you! Brian Mouthaan Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Thu, 22 Sep 2011 11:43:28 +0200 From: jan-mathijs schoffelen To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading brainvision data Message-ID: <7CF81136-AB84-40AB-9CF9-17DEA36F61A9 at donders.ru.nl> Content-Type: text/plain; charset="us-ascii" Hi Brian, Are you in the correct directory? In other words is your 'pwd' such that you can see the files when you type 'dir'? BW, JM On Sep 22, 2011, at 11:38 AM, wrote: > Hello Fieldtrippers, > > Hello Fieldtrippers, > > For an assignment during my internship at the Radboud UMC, I want try to use fieldtrip for Beamforming at Auditory Evoked Potentials. > However the first step is unsuccesful. I try to load *.eeg , *.vhdr , *.vmrk and *.avr files but I receive multiple errors. > > I also tried to use the example script in the tutorial. However this doesn't work either. I get errors like: > > > ??? Error using ==> ft_read_header at 86 > file or directory 'heineken000003-kop.eeg' does not exist > > Error in ==> trialfun_general at 55 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 161 > [trl, event] = feval(cfg.trialfun, cfg); > > > Especially the directory error pops up frequently. I don't have a clue. > My script is like this: > > cfg = []; > > cfg.datafile = 'heineken000003.eeg'; > cfg.headerfile = 'heineken000003.vhdr' > > cfg.trialdef.eventtype = '?'; > > ft_definetrial(cfg) > > > Can anyone help me? FIY I lack experience of working with EEG and fieltrip, but I work with Matlab regularly. > > Hope to hear from you! > > Brian Mouthaan > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Thu, 22 Sep 2011 11:48:11 +0200 From: Johanna Zumer To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] loading brainvision data Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi Brian, Also I noticed in your error you have '-kop' in the file name but not in the dataset name. I've noticed that one can't change the file name of .eeg files (e.g. copying them to a new file name) and then still load them; you should stick to the original name as it was given when collected. Best, Johanna On 22 September 2011 11:38, wrote: > ** > > Hello Fieldtrippers, > > Hello Fieldtrippers, > > For an assignment during my internship at the Radboud UMC, I want try to > use fieldtrip for Beamforming at Auditory Evoked Potentials. > However the first step is unsuccesful. I try to load *.eeg , *.vhdr , > *.vmrk and *.avr files but I receive multiple errors. > > I also tried to use the example script in the tutorial. However this > doesn't work either. I get errors like: > > > ??? Error using ==> ft_read_header at 86 > file or directory 'heineken000003-kop.eeg' does not exist > > Error in ==> trialfun_general at 55 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 161 > [trl, event] = feval(cfg.trialfun, cfg); > > > Especially the directory error pops up frequently. I don't have a clue. > My script is like this: > > cfg = []; > > cfg.datafile = 'heineken000003.eeg'; > cfg.headerfile = 'heineken000003.vhdr' > > cfg.trialdef.eventtype = '?'; > > ft_definetrial(cfg) > > > Can anyone help me? FIY I lack experience of working with EEG and fieltrip, > but I work with Matlab regularly. > > Hope to hear from you! > > Brian Mouthaan > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het > handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial > Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 10, Issue 30 ***************************************** Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 5858 bytes Desc: not available URL: From politzerahless at gmail.com Thu Sep 22 15:48:59 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 22 Sep 2011 08:48:59 -0500 Subject: [FieldTrip] fft_timelockgrandaverage Message-ID: Leopold, The way I dealt with this was by running ft_timelockgrandaverage() twice, once with keepindividual='yes' and once with keepindividual='no', and I saved the structures under different names (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I used the former one for cluster statistics, and the latter one (which has the .avg field) for plotting. Alternatively, for each grand average structure with individuals you could just create an .avg field by running the following: GA.avg = squeeze( mean(GA.individual,1) ); This should average across individuals. Best, Steve Politzer-Ahles > Message: 2 > Date: Thu, 22 Sep 2011 14:49:14 +0200 > From: Zizlsperger Leopold > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_timelockgrandaverage > Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Dear Fieldtrippers, > > in a within-subjects design I use ft_timelockgrandaverage with > cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of > the form: > > avg: [29x5000 double] > var: [29x5000 double] > time: [1x5000 double] > dof: [29x5000 double] > label: {29x1 cell} > trial: [172x29x5000 double] > dimord: 'rpt_chan_time' > trialinfo: [172x28 double] > cfg: [1x1 struct] > > I stick closely to the FieldTrip tutorial for cluster permutation > statistics. I use the newest version of fieldtrip. After the grandaverage > there is no more 'avg' in the structure, so I can not go on in the tutorial > e.g. with: > GA_XvsY = GA_X; > GA_XvsY.avg = GA_X.avg - GA_Y.avg; > > New data is of structure: > > label: {29x1 cell} > time: [1x5000 double] > individual: [10x29x5000 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > > Do I get the tutorial wrong or is it my data ? > Thanks in advance > Best > Leopold > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Thu Sep 22 16:08:25 2011 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Thu, 22 Sep 2011 15:08:25 +0100 Subject: [FieldTrip] cluster based permutation ANOVA? Message-ID: Dear All, I have been running the cluster-based analysis on my data, but have had to compare across my conditions in pairs. Is there a way to do a full factorial ANOVA-like cluster permutation test? (My design is 3x2) Thank you, zita -- Zita Patai DPhil Candidate, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ eva.patai at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From zizlsperger at gmail.com Thu Sep 22 16:23:50 2011 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Thu, 22 Sep 2011 16:23:50 +0200 Subject: [FieldTrip] fft_timelockgrandaverage In-Reply-To: References: Message-ID: <5A6F7FCE-AD83-47CE-8F34-B25CFE44CBB0@gmail.com> Dear Steve thanks for your reply. I think that solves my problem. (I tried that already, but always got "??? Improper index matrix reference" but looks like I have to look closer again into the rest of the script, seems to be a problem with the clusters themselves). Thanks for your help Best Leo On 22.09.2011, at 15:48, Stephen Politzer-Ahles wrote: > Leopold, > > The way I dealt with this was by running ft_timelockgrandaverage() twice, once with keepindividual='yes' and once with keepindividual='no', and I saved the structures under different names (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I used the former one for cluster statistics, and the latter one (which has the .avg field) for plotting. > > Alternatively, for each grand average structure with individuals you could just create an .avg field by running the following: > > GA.avg = squeeze( mean(GA.individual,1) ); > > This should average across individuals. > > Best, > Steve Politzer-Ahles > > > > Message: 2 > Date: Thu, 22 Sep 2011 14:49:14 +0200 > From: Zizlsperger Leopold > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_timelockgrandaverage > Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Dear Fieldtrippers, > > in a within-subjects design I use ft_timelockgrandaverage with cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of the form: > > avg: [29x5000 double] > var: [29x5000 double] > time: [1x5000 double] > dof: [29x5000 double] > label: {29x1 cell} > trial: [172x29x5000 double] > dimord: 'rpt_chan_time' > trialinfo: [172x28 double] > cfg: [1x1 struct] > > I stick closely to the FieldTrip tutorial for cluster permutation statistics. I use the newest version of fieldtrip. After the grandaverage there is no more 'avg' in the structure, so I can not go on in the tutorial e.g. with: > GA_XvsY = GA_X; > GA_XvsY.avg = GA_X.avg - GA_Y.avg; > > New data is of structure: > > label: {29x1 cell} > time: [1x5000 double] > individual: [10x29x5000 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > > Do I get the tutorial wrong or is it my data ? > Thanks in advance > Best > Leopold > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 22 21:07:58 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 22 Sep 2011 21:07:58 +0200 Subject: [FieldTrip] Fwd: Questions about coherence statistics for group analysis related to J.Neurosci. 2011 and Science 2005 papers References: Message-ID: Hi Sophie, I forward your message to the discussion list so that others may also participate in and benefit from the discussion > I have been reading your J.Neurosci. 2011 and Science 2005 papers and I also read Maris' paper about "nonparametric statistical testing of coherence differences" and looked at Fieldtrip tutorial and browsed the fieldtrip mailing list archive about coherence statistics. However, i still have question, and hope you will have time to answer. > > Here a short description of our EEG-EMG experiment : we have 10 subjects, and we compute the corticomuscular coherence for each > EEG (64 channels) and EMG (4 channels, 2 muscles per hand) channels combination. Subjects are performing a visuotracking task and each trial contained 4 conditions (3sec long) . One trial is ~12 sec long ) . > > First, about your Science 2005 paper : in the materials and methods part, you z-transformed the coherence values and performed a non-parametric permutation test to test the significance of the difference between the prestimulus and the stimulus interval. Did you perform the test on the z-transformed coherence values (variable 'r' on your paper) ? Yes. > Concerning the implementation in Fieldtrip while using the ft_freqstatistics function, is it the z-transformed coherence difference you compute in the statfun_xxx (and as output variable 's.stat' )? so as to perform the montecarlo permutation? We would like to compare each of the four conditions with the baseline period we defined in our experiment in the group subject. No. The computations implemented in FieldTrip's statfun_indepsamplesZcoh function are aimed at computing the Z-transformed coherence difference for a single subject, i.e. where the unit-of-observation is a trial. This is the method which is described in Eric Maris' J Neurosci Methods paper. In the other two papers you mention, we did statistical inference across subjects, i.e. each unit-of-observation was a subject. In order to achieve this, we computed for each subject the Z-transformed coherence by hand. These Z-coherence differences were tested against 0 using the montecarlo permutation approach. This is essentially the same as testing whether the distribution of coherence values across subjects is exchangeable across conditions. Practically this means that you need to do some work by hand: For each subject you need to do something like this: coh1 = ft_connectivityanalysis(cfg, freq1); % create coherence for subject X condition1 coh2 = ft_connectivityanalysis(cfg, freq2); %create coherence for subject X condition 2 coh1.cohspctrm = atanh(....) - atanh(...) etc -> compute the Z-transformed coherence difference between coh1.cohspctrm and coh2.cohspctrm; coh2.cohspctrm(:) = 0; cfg = []; cfg.method = 'montecarlo'; cfg.statistic = 'diff'; cfg.parameter = 'cohspctrm'; ... stat=ft_freqstatistics(cfg, coh1, coh2, ..., ..., ..., ) > Second, about your J.Neurosci. 2011 ,as we would like to do comparison between conditions (comparable to what you did on your paper, i assume). In this case, as we want to know if the effect is relevant in our group of subjects, and from what i understood from http://mailman.science.ru.nl/pipermail/fieldtrip/2009-May/002147.html one should not use the "indepsamplesZcoh " statistic function when calling ft_freqstatistics . Is a function available soon in Fieldtrip release ? Or what modification should i do on indepsamplesZcoh function? (from what i understood, this function is also computing a z-transformation on the data) See above. i think in principle you could also take a 2-step approach. In other words, you could use the statfun_indepsamplesZcoh, to compute per subject and contrast the Z-transformed coherence (so you will have to use ft_freqstatistics with single trial data). Next, you can use the output to ft_freqstatistics for all subjects as an input to a second call to ft_freqstatistics to do the statistical inference across subjects. This still needs an extra set of input data-structures containing 0's as dummy condition. This is for the same reason as above. > Another question about fieldtrip, it is preferable to input 2 grand average structure per condition as input in the ft_freqstatistics function? Or Should i input one structure per subject and per condition? ft_freqstatistics accepts multiple input arguments so there is no reason to pass the data through ft_freqgrandaverage first. > I have been very confused reading these papers and it is even harder to express my misunderstanding, so I hope my writing has been quite understandable.... > > Thank you in advance for any help with these issues. best wishes, Jan-Mathijs > > > Sophie Chen - Ph.D Student in Neuroscience > > Performance Motrice et Modélisation P2M > Institut des Sciences du Mouvement http://www.ism.univmed.fr/ > UMR 6233 CNRS - Université Aix-Marseille > Tel : +33 (0)4 91 17 22 06 > Office : D 2.32 > Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Thu Sep 22 21:14:50 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 22 Sep 2011 14:14:50 -0500 Subject: [FieldTrip] cluster based permutation ANOVA? Message-ID: Zita, It should be possible. You may find these messages helpful: http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003113.html Best, Steve Politzer-Ahles Message: 2 > Date: Thu, 22 Sep 2011 15:08:25 +0100 > From: Zita Eva Patai > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] cluster based permutation ANOVA? > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear All, > > I have been running the cluster-based analysis on my data, but have had to > compare across my conditions in pairs. > > Is there a way to do a full factorial ANOVA-like cluster permutation test? > (My design is 3x2) > > Thank you, > zita > > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > eva.patai at psy.ox.ac.uk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 22 21:20:14 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 22 Sep 2011 21:20:14 +0200 Subject: [FieldTrip] fft_timelockgrandaverage In-Reply-To: References: Message-ID: <54CE4961-23E9-460B-8D7B-190E30E12E36@donders.ru.nl> Hi all, Thanks for noticing this discrepancy in the documentation. Indeed when the functionality was changed some time ago, it seems that the wiki was not updated to mirror these changes. But hey, the fun thing about a wiki is that everybody can change it. I hereby give permission to any of you to bring this page up-to-date again ;o). Best wishes, Jan-Mathijs On Sep 22, 2011, at 3:48 PM, Stephen Politzer-Ahles wrote: > Leopold, > > The way I dealt with this was by running ft_timelockgrandaverage() twice, once with keepindividual='yes' and once with keepindividual='no', and I saved the structures under different names (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I used the former one for cluster statistics, and the latter one (which has the .avg field) for plotting. > > Alternatively, for each grand average structure with individuals you could just create an .avg field by running the following: > > GA.avg = squeeze( mean(GA.individual,1) ); > > This should average across individuals. > > Best, > Steve Politzer-Ahles > > > > Message: 2 > Date: Thu, 22 Sep 2011 14:49:14 +0200 > From: Zizlsperger Leopold > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_timelockgrandaverage > Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2 at gmail.com> > Content-Type: text/plain; charset=us-ascii > > Dear Fieldtrippers, > > in a within-subjects design I use ft_timelockgrandaverage with cfg.keepindividual = 'yes' to average timelocked EEG data (10 subjects) of the form: > > avg: [29x5000 double] > var: [29x5000 double] > time: [1x5000 double] > dof: [29x5000 double] > label: {29x1 cell} > trial: [172x29x5000 double] > dimord: 'rpt_chan_time' > trialinfo: [172x28 double] > cfg: [1x1 struct] > > I stick closely to the FieldTrip tutorial for cluster permutation statistics. I use the newest version of fieldtrip. After the grandaverage there is no more 'avg' in the structure, so I can not go on in the tutorial e.g. with: > GA_XvsY = GA_X; > GA_XvsY.avg = GA_X.avg - GA_Y.avg; > > New data is of structure: > > label: {29x1 cell} > time: [1x5000 double] > individual: [10x29x5000 double] > dimord: 'subj_chan_time' > cfg: [1x1 struct] > > Do I get the tutorial wrong or is it my data ? > Thanks in advance > Best > Leopold > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.ketz at gmail.com Thu Sep 22 21:28:08 2011 From: nick.ketz at gmail.com (Nick Ketz) Date: Thu, 22 Sep 2011 13:28:08 -0600 Subject: [FieldTrip] distributed computing with montecarlo clusterstatistics Message-ID: <4E7B8C48.4020605@gmail.com> Hi list, thanks in advance for input that can be provided... I'm working with a large data set involving all pairwise WPLI estimates for a 128 surface electrode EEG experiment(8128 pairs), and I would like to perform a 2 condition, within-subject time-frequency (and space if that's possible) cluster analysis. Given this I have a large number of possible clusters, I have been getting on the order of 10,000 observed clusters(with a standard clusteralpha of 0.05), which then leads to a lengthy randomization test. What I'm wondering is if there's any way to run this in a distributed way(peer-to-peer, or perhaps in parallel)? I could imagine a single processor handling one iteration of the randomization test at a time, however when I looked at the statistics_montecarlo.m file I saw no quick way to implement this. I've explored some ideas with 'parfor' loops but I wanted to get the lists' input before I start rewriting statistics_monetcarlo.m. Has anyone approached this problem thus far, and if so are there any currently available resources? thanks again... Nick From jm.horschig at donders.ru.nl Fri Sep 23 09:39:10 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 23 Sep 2011 09:39:10 +0200 Subject: [FieldTrip] fft_timelockgrandaverage In-Reply-To: <5A6F7FCE-AD83-47CE-8F34-B25CFE44CBB0@gmail.com> References: <5A6F7FCE-AD83-47CE-8F34-B25CFE44CBB0@gmail.com> Message-ID: <4E7C379E.9040002@donders.ru.nl> Dear Leo, I suppose you are using Matlab2011a, am I right? If so, then please see this bug: http://bugzilla.fcdonders.nl/show_bug.cgi?id=918 Unfortunately, we do not have a running version of Matlab2011a, yet, so we cannot look into this issue to track it down :/ In case you do not have Matlab2011a, this might be a different story. Best, Jörn On 9/22/2011 4:23 PM, Zizlsperger Leopold wrote: > Dear Steve > thanks for your reply. I think that solves my problem. > (I tried that already, but always got > "??? Improper index matrix reference" > but looks like I have to look closer again into the rest of the > script, seems to be a problem with the clusters themselves). > Thanks for your help > Best > Leo > > > On 22.09.2011, at 15:48, Stephen Politzer-Ahles wrote: > >> Leopold, >> >> The way I dealt with this was by running ft_timelockgrandaverage() >> twice, once with keepindividual='yes' and once with >> keepindividual='no', and I saved the structures under different names >> (i.e., 'condition1_grandindividuals' and 'condition1_grandonly'). I >> used the former one for cluster statistics, and the latter one (which >> has the .avg field) for plotting. >> >> Alternatively, for each grand average structure with individuals you >> could just create an .avg field by running the following: >> >> GA.avg = squeeze( mean(GA.individual,1) ); >> >> This should average across individuals. >> >> Best, >> Steve Politzer-Ahles >> >> >> >> Message: 2 >> Date: Thu, 22 Sep 2011 14:49:14 +0200 >> From: Zizlsperger Leopold > > >> To: fieldtrip at donders.ru.nl >> Subject: [FieldTrip] ft_timelockgrandaverage >> Message-ID: <058344EB-FCDD-42FB-8A60-E70A339F35F2 at gmail.com >> > >> Content-Type: text/plain; charset=us-ascii >> >> Dear Fieldtrippers, >> >> in a within-subjects design I use ft_timelockgrandaverage with >> cfg.keepindividual = 'yes' to average timelocked EEG data (10 >> subjects) of the form: >> >> avg: [29x5000 double] >> var: [29x5000 double] >> time: [1x5000 double] >> dof: [29x5000 double] >> label: {29x1 cell} >> trial: [172x29x5000 double] >> dimord: 'rpt_chan_time' >> trialinfo: [172x28 double] >> cfg: [1x1 struct] >> >> I stick closely to the FieldTrip tutorial for cluster permutation >> statistics. I use the newest version of fieldtrip. After the >> grandaverage there is no more 'avg' in the structure, so I can >> not go on in the tutorial e.g. with: >> GA_XvsY = GA_X; >> GA_XvsY.avg = GA_X.avg - GA_Y.avg; >> >> New data is of structure: >> >> label: {29x1 cell} >> time: [1x5000 double] >> individual: [10x29x5000 double] >> dimord: 'subj_chan_time' >> cfg: [1x1 struct] >> >> Do I get the tutorial wrong or is it my data ? >> Thanks in advance >> Best >> Leopold >> >> _______________________________________________ >> 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 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 zizlsperger at gmail.com Fri Sep 23 15:27:22 2011 From: zizlsperger at gmail.com (Zizlsperger Leopold) Date: Fri, 23 Sep 2011 15:27:22 +0200 Subject: [FieldTrip] ft_timelockstatistics > ftFuncMem=memtic(); Message-ID: Dear All, as the ft_neighbourselection / ft_prepare_neighbours-scripts seem to changed in progress at the moment, I downloaded a today's version of FieldTrip. The new ft_timelockstatistics stops early: ??? Undefined function or variable 'memtic'. Error in ==> ft_timelockstatistics at 69 ftFuncMem = memtic(); If I code it out, I experience problems with cfg.design I have not had before. Any ideas ? Thanks in advance Best Leopold From ekanal at cmu.edu Fri Sep 23 16:18:22 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Fri, 23 Sep 2011 10:18:22 -0400 Subject: [FieldTrip] ft_freqstatistics (nonparametric) on TFR across multiple frequencies Message-ID: <2E373097-F5A9-4F46-9A6C-2F444EB6745A@cmu.edu> Hello folks - I'm comparing the TFRs of two conditions using `ft_freqstatistics`, and I was wondering if there's a simple way to examine the significance of an effect over a range of frequencies. The way I'm doing it now, cfg.frequency = [8 12]; cfg.method = 'montecarlo'; ... stat = ft_freqstatistics(cfg, high_tfr, low_tfr); `ft_freqstatistics` returns a test for each individual frequency (i.e., the `stat.prob`, `stat.mask`, etc are "NumChan x 5 x NumFreq" variables instead of "NumChan x 1 x NumFreq"). Thanks - Elli -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 From jan.schoffelen at donders.ru.nl Fri Sep 23 16:20:58 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 23 Sep 2011 16:20:58 +0200 Subject: [FieldTrip] code change Message-ID: <96F233D2-E00B-48EF-9B3A-80A5E62CFF2A@donders.ru.nl> Dear community, I just committed some quite extensive changes to the FieldTrip-code, which I would like to briefly make you aware of. As such, the changes are intended to not affect you at all, because there is no change in functionality involved. Yet, it may be that some code may be broken, even though I took extreme care in checking whether all was OK. Now, what's the change all about? You can read about this change here: http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described. As mentioned, my intention is that this change is fully transparent for all of you, and does not lead to different analysis results. The worst thing that can happen is that the code is temporarily broken. In that case, please don't hesitate to report this (as detailed as you can) and we will fix it a.s.a.p, of course with apologies in advance from our side. With kind regards from the FieldTrip headquarters, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekanal at cmu.edu Fri Sep 23 16:26:08 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Fri, 23 Sep 2011 10:26:08 -0400 Subject: [FieldTrip] ft_freqstatistics (nonparametric) on TFR across multiple frequencies In-Reply-To: <12815_1316787570_p8NEJT0H003236_2E373097-F5A9-4F46-9A6C-2F444EB6745A@cmu.edu> References: <12815_1316787570_p8NEJT0H003236_2E373097-F5A9-4F46-9A6C-2F444EB6745A@cmu.edu> Message-ID: Never mind, I just now realized there's an option in ft_freqstatistics "avgoverfreq". Hopefully this communique is useful to someone else who missed that in the docs :) Elli On Sep 23, 2011, at 10:18 AM, Kanal Eliezer wrote: > Hello folks - > > I'm comparing the TFRs of two conditions using `ft_freqstatistics`, and I was wondering if there's a simple way to examine the significance of an effect over a range of frequencies. The way I'm doing it now, > > cfg.frequency = [8 12]; > cfg.method = 'montecarlo'; > ... > stat = ft_freqstatistics(cfg, high_tfr, low_tfr); > > `ft_freqstatistics` returns a test for each individual frequency (i.e., the `stat.prob`, `stat.mask`, etc are "NumChan x 5 x NumFreq" variables instead of "NumChan x 1 x NumFreq"). Thanks - > > Elli > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mark.noordenbos at gmail.com Fri Sep 23 18:09:18 2011 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Fri, 23 Sep 2011 18:09:18 +0200 Subject: [FieldTrip] Filter settings (Fieldtrip vs Brainvision Analyzer) Message-ID: Dear all, I analyzed some data using Brainvision Analyzer and would like to re-analyze the same data using Fieldtrip. However, the final results are a bit different between Brainvision Analyzer and Fieldtrip. The main difference is because of differences in filtering of the data (without filtering the data is exactly the same). The filter in Fieldtrip seems to be much 'stricter' and as a consequence the amplitude is almost halved in the grandaverage! In Brainvision Analyzer I used the following filter setting: Butterworth Zero Phase Filters Low Cutoff: 1.0000 Hz, Time constant 0.1592s, 24 dB/oct High Cutoff: 30.0000 Hz, 24 dB/oct Notch Filter: --- In Fieldtrip I used the following filter settings cfg.lpfilter = 'yes'; cfg.hpfilter = 'yes'; cfg.lpfreq = 30; cfg.hpfreq = 1; cfg.lpfiltord = 6; cfg.hpfiltord = 6; cfg.lpfiltdir = 'twopass'; cfg.hpfiltdir = 'twopass'; Any suggestions for the Fieldtrip filter settings to resemble the Brainvision Analyzer filter settings as much as possible? Best, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fieldtripvsbva.jpg Type: image/jpeg Size: 26475 bytes Desc: not available URL: From luoj at mail.nih.gov Sat Sep 24 22:12:28 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Sat, 24 Sep 2011 16:12:28 -0400 Subject: [FieldTrip] creating new dataset Message-ID: Hi, If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). Thanks, Jessie From jm.horschig at donders.ru.nl Sun Sep 25 10:09:00 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Sun, 25 Sep 2011 10:09:00 +0200 Subject: [FieldTrip] creating new dataset In-Reply-To: References: Message-ID: <4E7EE19C.4040103@donders.ru.nl> Hi Jessie, not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: You can also exclude channels or channel groups using the following syntax {'all', '-POz', '-Fp1', -EOG'} From ft_preprocessing: If you are callingFT_PREPROCESSING with also the second input argument "data", then that should contain data that was already read from file in a previous call toFT_PREPROCESSING . In that case only the configuration options below apply. The channels that will be read and/or preprocessed are specified with cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), seeFT_CHANNELSELECTION for details You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. Hope this all helps to what you are up to! Best, Jörn On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Hi, > > If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). > > Thanks, > > Jessie > _______________________________________________ > 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 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 lwn_07 at yahoo.com.cn Sun Sep 25 13:42:00 2011 From: lwn_07 at yahoo.com.cn (=?utf-8?B?5p2O5Y2r5aic?=) Date: Sun, 25 Sep 2011 19:42:00 +0800 (CST) Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? Message-ID: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> Dear all,   Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity?                                                                                                            Weina -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Sep 25 17:36:05 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Sun, 25 Sep 2011 17:36:05 +0200 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> Message-ID: <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> Hi Weina, Yes, granger causality results will for sure change when you use different montages. When you replace each measurement (what you call 'mono-montage') with that measurement minus the average across the whole recording array (what you call 'average montage') the amount with which signals can be explained in terms of their own and the other signals' past will change as well. This most likely leads to 'granger causality' estimates which just reflect spurious interactions. Best wishes, Jan-Mathijs On Sep 25, 2011, at 1:42 PM, 李卫娜 wrote: > Dear all, > Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity? > > Weina > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sun Sep 25 18:19:25 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 25 Sep 2011 11:19:25 -0500 Subject: [FieldTrip] Filter settings (Fieldtrip vs Brainvision Message-ID: Mark, I don't have an answer to your problem, but I have noticed a similar issue with data from Neuroscan (like your data, mine seems more attenuated by the Fieldtrip filter than the Neuroscan one; here is a comparison using a 30Hz low-pass in Fieldtrip with the default options, versus 30Hz in Neuroscan with zero phase shift and 12 dB/oct: http://img685.imageshack.us/img685/5717/fieldtrippreprocessing.png). I'd also be interested to hear if anyone on the list knows about what filter settings to adjust to replicate those settings. Best, Steve Politzer-Ahles > Message: 5 > Date: Fri, 23 Sep 2011 18:09:18 +0200 > From: Mark Noordenbos > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Filter settings (Fieldtrip vs Brainvision > Analyzer) > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear all, > > I analyzed some data using Brainvision Analyzer and would like to > re-analyze > the same data using Fieldtrip. However, the final results are a bit > different between Brainvision Analyzer and Fieldtrip. > The main difference is because of differences in filtering of the data > (without filtering the data is exactly the same). The filter in Fieldtrip > seems to be much 'stricter' and as a consequence the amplitude is almost > halved in the grandaverage! > > In Brainvision Analyzer I used the following filter setting: > > Butterworth Zero Phase Filters > Low Cutoff: 1.0000 Hz, Time constant 0.1592s, 24 dB/oct > High Cutoff: 30.0000 Hz, 24 dB/oct > Notch Filter: --- > > In Fieldtrip I used the following filter settings > > cfg.lpfilter = 'yes'; > cfg.hpfilter = 'yes'; > cfg.lpfreq = 30; > cfg.hpfreq = 1; > > cfg.lpfiltord = 6; > cfg.hpfiltord = 6; > > cfg.lpfiltdir = 'twopass'; > cfg.hpfiltdir = 'twopass'; > > Any suggestions for the Fieldtrip filter settings to resemble the > Brainvision Analyzer filter settings as much as possible? > > Best, > Mark > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110923/eccb307f/attachment.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: fieldtripvsbva.jpg > Type: image/jpeg > Size: 26475 bytes > Desc: not available > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110923/eccb307f/attachment.jpg > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 34 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwn_07 at yahoo.com.cn Sun Sep 25 19:48:24 2011 From: lwn_07 at yahoo.com.cn (lwn_07) Date: Mon, 26 Sep 2011 01:48:24 +0800 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> Message-ID: <396096E2-923B-48D7-9201-A041A4F22571@yahoo.com.cn> Thanks Jan-Mathijs. Does it mean if I selected my data segment from mono montage (reference to mastoid), i'd better calculate the granger causality in mono montage? Some paper selected Cz as reference, is that OK? Best regards. Weina 发自我的 iPad 在 2011-9-25,23:36,jan-mathijs schoffelen 写道: > Hi Weina, > > Yes, granger causality results will for sure change when you use different montages. When you replace each measurement (what you call 'mono-montage') with that measurement minus the average across the whole recording array (what you call 'average montage') the amount with which signals can be explained in terms of their own and the other signals' past will change as well. This most likely leads to 'granger causality' estimates which just reflect spurious interactions. > > Best wishes, > > Jan-Mathijs > > On Sep 25, 2011, at 1:42 PM, 李卫娜 wrote: > >> Dear all, >> Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity? >> >> Weina >> _______________________________________________ >> 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 > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwn_07 at yahoo.com.cn Sun Sep 25 19:41:01 2011 From: lwn_07 at yahoo.com.cn (lwn_07) Date: Mon, 26 Sep 2011 01:41:01 +0800 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> Message-ID: <89EA1B95-9876-42E4-9082-AAFB3AA79E7D@yahoo.com.cn> Thanks Jan-Mathijs. Does it mean if I selected my data segment from mono montage (reference to mastoid), i'd better calculate the granger causality in mono montage? Some paper selected Cz as reference, is that OK? Best regards. Weina 发自我的 iPad 在 2011-9-25,23:36,jan-mathijs schoffelen 写道: > Hi Weina, > > Yes, granger causality results will for sure change when you use different montages. When you replace each measurement (what you call 'mono-montage') with that measurement minus the average across the whole recording array (what you call 'average montage') the amount with which signals can be explained in terms of their own and the other signals' past will change as well. This most likely leads to 'granger causality' estimates which just reflect spurious interactions. > > Best wishes, > > J an-Mathijs > > On Sep 25, 2011, at 1:42 PM, 李卫娜 wrote: > >> Dear all, >> Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity? >> >> Weina >> _______________________________________________ >> 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 > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Sep 26 09:56:04 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 26 Sep 2011 09:56:04 +0200 Subject: [FieldTrip] ft_timelockstatistics > ftFuncMem=memtic(); In-Reply-To: References: Message-ID: Dear Leopold, The memtic()-function should be specified in a file in /utilities/memtic.m. This directory should be automatically added to your path by ft_defaults(), which is called by all main Fieldtrip functions. Could you let me know whether you see this file? If you do, could you explicitly run ft_defaults() and check whether 'which memtic' gives anything in return? (In short: this is an error in your path settings :) ) I cannot speculate on what your problems with cfg.design might be. Best, Eelke 2011/9/23 Zizlsperger Leopold : > Dear All, > as the ft_neighbourselection / ft_prepare_neighbours-scripts seem to changed in progress at the moment, I downloaded a today's version of FieldTrip. The new ft_timelockstatistics stops early: > > ??? Undefined function or variable 'memtic'. > Error in ==> ft_timelockstatistics at 69 > ftFuncMem   = memtic(); > > If I code it out, I experience problems with cfg.design I have not had before. > Any ideas ? > Thanks in advance > Best > Leopold > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From jm.horschig at donders.ru.nl Mon Sep 26 11:45:33 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 26 Sep 2011 11:45:33 +0200 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <396096E2-923B-48D7-9201-A041A4F22571@yahoo.com.cn> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> <396096E2-923B-48D7-9201-A041A4F22571@yahoo.com.cn> Message-ID: <4E8049BD.5060303@donders.ru.nl> Dear Weina, Basically, any montage will cause signal characteristics from the sensors used for re-referencing to show up in all other sensors. If you use a common average, the signal from any sensor will depend to some degree to any other sensor (because common average uses all sensors for rereferencing). If you use only Cz, you will obtain a high granger causality for any sensors to Cz. This would of course not reflect a real brain process, but is just the consequence of substracting the signal from Cz from all other sensors. Best would be to use a sensor that you will not include in computing granger causality (e.g. a mastoid, or choose Cz but then exclude this sensor for further analyses). Best, Jörn On 9/25/2011 7:48 PM, lwn_07 wrote: > Thanks Jan-Mathijs. Does it mean if I selected my data segment from > mono montage (reference to mastoid), i'd better calculate the granger > causality in mono montage? Some paper selected Cz as reference, is > that OK? > > Best regards. > Weina > > ???? iPad > > ? 2011-9-25,23:36,jan-mathijs schoffelen > ??: > >> Hi Weina, >> >> Yes, granger causality results will for sure change when you use >> different montages. When you replace each measurement (what you call >> 'mono-montage') with that measurement minus the average across the >> whole recording array (what you call 'average montage') the amount >> with which signals can be explained in terms of their own and the >> other signals' past will change as well. This most likely leads to >> 'granger causality' estimates which just reflect spurious interactions. >> >> Best wishes, >> >> Jan-Mathijs >> >> On Sep 25, 2011, at 1:42 PM, ??? wrote: >> >>> Dear all, >>> Is anyone knows about that wether different EEG motages (such as >>> mono-motage or average montage) have effect on the result of granger >>> connectivity? >>> >>> Weina >>> >>> _______________________________________________ >>> 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 >> 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 > > > _______________________________________________ > 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 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 Sep 26 14:22:56 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 26 Sep 2011 14:22:56 +0200 Subject: [FieldTrip] quick fieldtrip question In-Reply-To: <904336920.303800.1317039139308.JavaMail.root@monoceros.zimbra.ru.nl> References: <904336920.303800.1317039139308.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: Hi Tom, I'm forwarding my response, and your question, to the FieldTrip mailing list, so that anyone who in the future might wonder the same thing will benefit. BTW, if you're not subscribed to the list yet, you really should (see http://fieldtrip.fcdonders.nl/discussion_list for instructions). The easiest way to select channels to remove or retain is by using the cfg.channel option which is understood by ft_preprocessing: cfg = []; cfg.channel = {'chan1', 'chan2'}; % this will *keep* only those channels data = ft_preprocessing(cfg, data); or: cfg = []; cfg.channel = {'all', '-chan1', '-chan2'}; % this will *remove* those channels data = ft_preprocessing(cfg, data); For more information, type 'doc ft_channelselection' into Matlab, or see http://fieldtrip.fcdonders.nl/reference/ft_channelselection . Hope this helps! Best, Eelke 2011/9/26 Marshall, T.R. (Tom) : > Hi Eelke, > > So I have a very quick question about channel selection in fieldtrip. > > I want to plot a contrast of my tDCS and no-tDCS data. My problem is that I had to throw away a lot more channels in the tDCS condition than in the no-tDCS condition, so datasets comprise different channels. I spent a few minutes trying to write fiddly code to compare the entries in the 'labels' field of the data structure, but surely fieldtrip has some general purpose function just to keep some channels and throw away others? I can't find exactly this on the wiki... > > Hope you can help. Thanks in advance. > Tom > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > From t.marshall at fcdonders.ru.nl Mon Sep 26 14:58:57 2011 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Mon, 26 Sep 2011 14:58:57 +0200 (CEST) Subject: [FieldTrip] quick fieldtrip question In-Reply-To: <848633094.304972.1317041809855.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <930446316.305029.1317041937124.JavaMail.root@monoceros.zimbra.ru.nl> Thanks Eelke. This seems like what I want, but I can't seem to actually implement it. To provide a little more detail, what I currently have are two data sets on which I have performed frequency analysis. One of them has a bunch of channels missing that I had to throw out. Now I want to have a look at the difference between the two. Of course it only makes sense to do this for the channels that are common to both datasets. In order to do my subtraction, I have this: *** %find channels that exist in both datasets common_channels=tdcs_low{1}.label(ismember(tdcs_low{1}.label,notdcs_low{1}.label)); %throw away channels that are unique to the notdcs dataset cfg=[]; cfg.channels=common_channels; notdcs_fewer_channels{1}=ft_preprocessing(cfg,notdcs_low{1}); *** ...which gives the following error *** ??? Error using ==> ft_checkdata>freq2raw at 1583 this only works for dimord='rpt_chan_freq_time' Error in ==> ft_checkdata at 257 data = freq2raw(data); Error in ==> ft_preprocessing at 284 data = ft_checkdata(data, 'datatype', 'raw', 'hassampleinfo', 'yes'); *** In the above datasets, the 'dimord', looks like channels x frequencies x time. Not sure what 'rpt' stands for in the error message, nor why there should be a 4th dimension. Best, Tom ----- Original Message ----- From: "Eelke Spaak" To: "T.R. Marshall (Tom)" , "Email discussion list for the FieldTrip project" Sent: Monday, 26 September, 2011 2:22:56 PM Subject: Re: quick fieldtrip question Hi Tom, I'm forwarding my response, and your question, to the FieldTrip mailing list, so that anyone who in the future might wonder the same thing will benefit. BTW, if you're not subscribed to the list yet, you really should (see http://fieldtrip.fcdonders.nl/discussion_list for instructions). The easiest way to select channels to remove or retain is by using the cfg.channel option which is understood by ft_preprocessing: cfg = []; cfg.channel = {'chan1', 'chan2'}; % this will *keep* only those channels data = ft_preprocessing(cfg, data); or: cfg = []; cfg.channel = {'all', '-chan1', '-chan2'}; % this will *remove* those channels data = ft_preprocessing(cfg, data); For more information, type 'doc ft_channelselection' into Matlab, or see http://fieldtrip.fcdonders.nl/reference/ft_channelselection . Hope this helps! Best, Eelke 2011/9/26 Marshall, T.R. (Tom) : > Hi Eelke, > > So I have a very quick question about channel selection in fieldtrip. > > I want to plot a contrast of my tDCS and no-tDCS data. My problem is that I had to throw away a lot more channels in the tDCS condition than in the no-tDCS condition, so datasets comprise different channels. I spent a few minutes trying to write fiddly code to compare the entries in the 'labels' field of the data structure, but surely fieldtrip has some general purpose function just to keep some channels and throw away others? I can't find exactly this on the wiki... > > Hope you can help. Thanks in advance. > Tom > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands From luoj at mail.nih.gov Mon Sep 26 16:11:42 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Mon, 26 Sep 2011 10:11:42 -0400 Subject: [FieldTrip] creating new dataset In-Reply-To: <4E7EE19C.4040103@donders.ru.nl> References: , <4E7EE19C.4040103@donders.ru.nl> Message-ID: Thanks for your answer Jörn . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... Jessie ________________________________________ From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] Sent: Sunday, September 25, 2011 4:09 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] creating new dataset Hi Jessie, not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: You can also exclude channels or channel groups using the following syntax {'all', '-POz', '-Fp1', -EOG'} >From ft_preprocessing: If you are calling FT_PREPROCESSING with also the second input argument "data", then that should contain data that was already read from file in a previous call to FT_PREPROCESSING. In that case only the configuration options below apply. The channels that will be read and/or preprocessed are specified with cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), see FT_CHANNELSELECTION for details You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. Hope this all helps to what you are up to! Best, Jörn On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Hi, If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). Thanks, Jessie _______________________________________________ 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 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 jan.schoffelen at donders.ru.nl Mon Sep 26 16:26:14 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 26 Sep 2011 16:26:14 +0200 Subject: [FieldTrip] creating new dataset In-Reply-To: References: , <4E7EE19C.4040103@donders.ru.nl> Message-ID: <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> Hi Jessie, FieldTrip is not able to write back into the native 4D neuroimaging format. If you want to create a new dataset, you need to have a look at the software which is provided by the 4D neuroimaging company. Your requested functionality may either be a feature of one of the applications, or may be implemented in one of the command line utilities. You may want to look in the software documentation for this. Best wishes, Jan-Mathijs On Sep 26, 2011, at 4:11 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > Thanks for your answer Jörn . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... > > Jessie > ________________________________________ > From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] > Sent: Sunday, September 25, 2011 4:09 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] creating new dataset > > Hi Jessie, > > not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: > > You can also exclude channels or channel groups using the following syntax > {'all', '-POz', '-Fp1', -EOG'} > > > > >> From ft_preprocessing: > > If you are calling FT_PREPROCESSING with also the second input argument > "data", then that should contain data that was already read from file in > a previous call to FT_PREPROCESSING. In that case only the configuration > options below apply. > > The channels that will be read and/or preprocessed are specified with > cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), > see FT_CHANNELSELECTION for details > > > You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. > > Hope this all helps to what you are up to! > Best, > Jörn > > On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > > Hi, > > If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). > > Thanks, > > Jessie > _______________________________________________ > 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 > > 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Mon Sep 26 16:59:07 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Mon, 26 Sep 2011 08:59:07 -0600 Subject: [FieldTrip] creating new dataset In-Reply-To: <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> References: , <4E7EE19C.4040103@donders.ru.nl> <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> Message-ID: <582930B5-8C7E-4578-8014-F30D36450B76@ucdenver.edu> Hi Jessie, If you wish to take a FieldTrip dataset back to the native 4D format, then it will not be trivial, but if you have the original data in 4D format, there is a potential solution in Eugene Kronberg's pdf4D matlab object code: http://biomag.wikidot.com/msi-matlab If you do not have the native 4D data, this will not work. Look at the duplicate and write_data_block methods. However, note that if you do duplicate the dataset, it will expect there to be as many channels in the new dataset as in the original. You would then have to delete those channels in the 4D MSI software using the deleter command. Or, alternatively, if you have a working copy of the MSI software, you can delete the channels in the original dataset within 4D, then use the duplicate method on that file, then write your data back to it using the write_data_block method. Feel free to contact me off list if you have questions. Best, Don On Sep 26, 2011, at 8:26 AM, jan-mathijs schoffelen wrote: Hi Jessie, FieldTrip is not able to write back into the native 4D neuroimaging format. If you want to create a new dataset, you need to have a look at the software which is provided by the 4D neuroimaging company. Your requested functionality may either be a feature of one of the applications, or may be implemented in one of the command line utilities. You may want to look in the software documentation for this. Best wishes, Jan-Mathijs On Sep 26, 2011, at 4:11 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Thanks for your answer Jörn . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... Jessie ________________________________________ From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] Sent: Sunday, September 25, 2011 4:09 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] creating new dataset Hi Jessie, not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: You can also exclude channels or channel groups using the following syntax {'all', '-POz', '-Fp1', -EOG'} >From ft_preprocessing: If you are calling FT_PREPROCESSING with also the second input argument "data", then that should contain data that was already read from file in a previous call to FT_PREPROCESSING. In that case only the configuration options below apply. The channels that will be read and/or preprocessed are specified with cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), see FT_CHANNELSELECTION for details You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. Hope this all helps to what you are up to! Best, Jörn On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Hi, If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). Thanks, Jessie _______________________________________________ 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 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 Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University 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 eelke.spaak at donders.ru.nl Mon Sep 26 17:07:07 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 26 Sep 2011 17:07:07 +0200 Subject: [FieldTrip] quick fieldtrip question In-Reply-To: <930446316.305029.1317041937124.JavaMail.root@monoceros.zimbra.ru.nl> References: <848633094.304972.1317041809855.JavaMail.root@monoceros.zimbra.ru.nl> <930446316.305029.1317041937124.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: Hi Tom, ft_preprocessing will try to convert your data structure into raw data before applying any preprocessing (which includes channel selection). Since you are providing output of ft_freqanalysis ('freq structures') as input, this will fail if the dimensionality of the freq data indicates that this would not make sense. You'll probably want to have a look at the ft_selectdata function, which also supports selecting subregions of freq/timelock structures, rather than only raw data: goodchans = intersect(freq1.label, freq2.label); freq1 = ft_selectdata(freq1, 'channel', goodchans); freq2 = ft_selectdata(freq2, 'channel', goodchans); Note by the way the use of Matlab's builtin 'intersect' function, which you will probably also find useful :) If the ft_selectdata approach fails, you might also take a look at the low-level fieldtrip utility function 'match_str'. Good luck, Eelke 2011/9/26 Marshall, T.R. (Tom) : > Thanks Eelke. This seems like what I want, but I can't seem to actually implement it. > > To provide a little more detail, what I currently have are two data sets on which I have performed frequency analysis. One of them has a bunch of channels missing that I had to throw out. Now I want to have a look at the difference between the two. Of course it only makes sense to do this for the channels that are common to both datasets. > > In order to do my subtraction, I have this: > > *** > %find channels that exist in both datasets > common_channels=tdcs_low{1}.label(ismember(tdcs_low{1}.label,notdcs_low{1}.label)); > > %throw away channels that are unique to the notdcs dataset > cfg=[]; > cfg.channels=common_channels; > > notdcs_fewer_channels{1}=ft_preprocessing(cfg,notdcs_low{1}); > *** > > ...which gives the following error > > *** > ??? Error using ==> ft_checkdata>freq2raw at 1583 > this only works for dimord='rpt_chan_freq_time' > > Error in ==> ft_checkdata at 257 >        data = freq2raw(data); > > Error in ==> ft_preprocessing at 284 >  data = ft_checkdata(data, 'datatype', 'raw', 'hassampleinfo', 'yes'); > *** > > In the above datasets, the 'dimord', looks like channels x frequencies x time. Not sure what 'rpt' stands for in the error message, nor why there should be a 4th dimension. > > Best, > Tom > > ----- Original Message ----- > From: "Eelke Spaak" > To: "T.R. Marshall (Tom)" , "Email discussion list for the FieldTrip project" > Sent: Monday, 26 September, 2011 2:22:56 PM > Subject: Re: quick fieldtrip question > > Hi Tom, > > I'm forwarding my response, and your question, to the FieldTrip > mailing list, so that anyone who in the future might wonder the same > thing will benefit. BTW, if you're not subscribed to the list yet, you > really should (see http://fieldtrip.fcdonders.nl/discussion_list for > instructions). > > The easiest way to select channels to remove or retain is by using the > cfg.channel option which is understood by ft_preprocessing: > > cfg = []; > cfg.channel = {'chan1', 'chan2'}; % this will *keep* only those channels > data = ft_preprocessing(cfg, data); > > or: > > cfg = []; > cfg.channel = {'all', '-chan1', '-chan2'}; % this will *remove* those channels > data = ft_preprocessing(cfg, data); > > For more information, type 'doc ft_channelselection' into Matlab, or > see http://fieldtrip.fcdonders.nl/reference/ft_channelselection . > > Hope this helps! > > Best, > Eelke > > > 2011/9/26 Marshall, T.R. (Tom) : >> Hi Eelke, >> >> So I have a very quick question about channel selection in fieldtrip. >> >> I want to plot a contrast of my tDCS and no-tDCS data. My problem is that I had to throw away a lot more channels in the tDCS condition than in the no-tDCS condition, so datasets comprise different channels. I spent a few minutes trying to write fiddly code to compare the entries in the 'labels' field of the data structure, but surely fieldtrip has some general purpose function just to keep some channels and throw away others? I can't find exactly this on the wiki... >> >> Hope you can help. Thanks in advance. >> Tom >> >> -- >> Tom Marshall, MSc. >> Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging >> tel: +31(0)243668487 >> email: t.marshall at fcdonders.ru.nl >> postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands >> visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands >> > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From lwn_07 at yahoo.com.cn Mon Sep 26 18:00:28 2011 From: lwn_07 at yahoo.com.cn (lwn_07) Date: Tue, 27 Sep 2011 00:00:28 +0800 Subject: [FieldTrip] Will different EEG motages have effect on the result of granger connectivity? In-Reply-To: <4E8049BD.5060303@donders.ru.nl> References: <1316950920.76748.YahooMailClassic@web15606.mail.cnb.yahoo.com> <062EFAB9-E4D6-44DE-953E-14C96335C068@donders.ru.nl> <396096E2-923B-48D7-9201-A041A4F22571@yahoo.com.cn> <4E8049BD.5060303@donders.ru.nl> Message-ID: <8A2201D5-3F98-4715-8ED1-DFA8780141D1@yahoo.com.cn> Dear Jörn, Thanks for you helping. Weina 在 2011-9-26,17:45,"Jörn M. Horschig" 写道: > Dear Weina, > > Basically, any montage will cause signal characteristics from the sensors used for re-referencing to show up in all other sensors. If you use a common average, the signal from any sensor will depend to some degree to any other sensor (because common average uses all sensors for rereferencing). If you use only Cz, you will obtain a high granger causality for any sensors to Cz. This would of course not reflect a real brain process, but is just the consequence of substracting the signal from Cz from all other sensors. Best would be to use a sensor that you will not include in computing granger causality (e.g. a mastoid, or choose Cz but then exclude this sensor for further analyses). > > Best, > Jörn > > On 9/25/2011 7:48 PM, lwn_07 wrote: >> >> Thanks Jan-Mathijs. Does it mean if I selected my data segment from mono montage (reference to mastoid), i'd better calculate the granger causality in mono montage? Some paper selected Cz as reference, is that OK? >> >> Best regards. >> Weina >> >> 发自我的 iPad >> >> 在 2011-9-25,23:36,jan-mathijs schoffelen 写道: >> >>> Hi Weina, >>> >>> Yes, granger causality results will for sure change when you use different montages. When you replace each measurement (what you call 'mono-montage') with that measurement minus the average across the whole recording array (what you call 'average montage') the amount with which signals can be explained in terms of their own and the other signals' past will change as well. This most likely leads to 'granger causality' estimates which just reflect spurious interactions. >>> >>> Best wishes, >>> >>> Jan-Mathijs >>> >>> On Sep 25, 2011, at 1:42 PM, 李卫娜 wrote: >>> >>>> Dear all, >>>> Is anyone knows about that wether different EEG motages (such as mono-motage or average montage) have effect on the result of granger connectivity? >>>> >>>> Weina >>>> _______________________________________________ >>>> 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 >>> 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 >> >> >> _______________________________________________ >> 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 > > 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 BelluscB at ninds.nih.gov Mon Sep 26 21:17:04 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Mon, 26 Sep 2011 15:17:04 -0400 Subject: [FieldTrip] mne vs lcmv methods Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CCCF@NIHMLBX10.nih.gov> Hi fellow Fieldtripers- I am learning about the pros & cons of different methods for source localization. For some of my data sets, I want to localize evoked activity (ERFs). In one of them, I anticipated a single unilateral primary site of activation and MNE worked very nicely for this. In the second, I am using auditory stimuli and therefore anticipated bilaterally synchronous activity. As was to be expected, (I think) MNE gave a single site of activity near the midline. I tried a parallel approach, but specifying lcmv as the method for ft_sourceanalysis as follows: cfg = []; cfg.method = 'lcmv'; cfg.grid = leadfield_02_stim1; cfg.vol = vol; cfg.lambda = 1e8; cfg.checksize = inf; %I've been inserting this and the next line because I've gotten error messages about the size. This didn't happen before, but these lines avoid the problem cfg.checkconfig ='loose'; source3CB24_02_stim1 = ft_sourceanalysis(cfg, tlkCB24_02_stim1) The output has a time dimension 1x601, and a pos dimension of 8196x3 dimension, but the avg.pow is only 1x8196. I interpret this to mean that the analysis averaged the power over some time interval instead of computing the power in each leadfield position for each time point. When I use the mne method, the output is clearly power for each time point, and produces a beautiful movie, as indicated in the tutorial. My questions about the lcmv technique are: 1. Is there a fundamental difference between the lcmv approach and the mne approach whereby it cannot compute the power at each time point, but only gives a single average value for a time period? 2. If so, how do I specify the time interval of interest (ie that containing the main peak of the ERF) in ft_sourceanalysis? 3. I thought one advantage of either MNE or LCMV was that I could indicate my a priori hypothesis of the anticipated localization of the source activity. Do I do this with cfg.grid? Is there a way to indicate the number of anticipated dipoles? Thanks in advance for your help- Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at yahoo.com Mon Sep 26 23:42:04 2011 From: alotof_xd at yahoo.com (alotof eve) Date: Mon, 26 Sep 2011 14:42:04 -0700 (PDT) Subject: [FieldTrip] creating new dataset In-Reply-To: <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> References: , <4E7EE19C.4040103@donders.ru.nl> <11DD3181-1D36-4EDE-A004-81ACC8ED62B5@donders.ru.nl> Message-ID: <1317073324.13127.YahooMailNeo@web125514.mail.ne1.yahoo.com> Is that possible to create a new dataset based on pre-processed 4D neuroimaging dataset by FieldTrip? I mean, such as re-write average results data like in EEGLab? ________________________________ From: jan-mathijs schoffelen To: Email discussion list for the FieldTrip project Sent: Monday, September 26, 2011 7:26 AM Subject: Re: [FieldTrip] creating new dataset Hi Jessie, FieldTrip is not able to write back into the native 4D neuroimaging format. If you want to create a new dataset, you need to have a look at the software which is provided by the 4D neuroimaging company. Your requested functionality may either be a feature of one of the applications, or may be implemented in one of the command line utilities. You may want to look in the software documentation for this. Best wishes, Jan-Mathijs On Sep 26, 2011, at 4:11 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Thanks for your answer Jörn  . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... > >Jessie >________________________________________ >From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] >Sent: Sunday, September 25, 2011 4:09 AM >To: Email discussion list for the FieldTrip project >Subject: Re: [FieldTrip] creating new dataset > >Hi Jessie, > >not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: > >You can also exclude channels or channel groups using the following syntax >   {'all', '-POz', '-Fp1', -EOG'} > > > > > >From ft_preprocessing: >> >If you are calling FT_PREPROCESSING with also the second input argument > "data", then that should contain data that was already read from file in > a previous call to FT_PREPROCESSING. In that case only the configuration > options below apply. > > The channels that will be read and/or preprocessed are specified with >   cfg.channel      = Nx1 cell-array with selection of channels (default = 'all'), >                      see FT_CHANNELSELECTION for details > > >You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. > >Hope this all helps to what you are up to! >Best, >Jörn > >On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: > >Hi, > >If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset  without those channels (not by defining them using the ft_... in fieldtrip). > >Thanks, > >Jessie >_______________________________________________ >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 > >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 > Jan-Mathijs Schoffelen, MD PhD  Donders Institute for Brain, Cognition and Behaviour,  Centre for Cognitive Neuroimaging, Radboud University 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at DONDERS.RU.NL Tue Sep 27 08:51:44 2011 From: jan.schoffelen at DONDERS.RU.NL (jan-mathijs schoffelen) Date: Tue, 27 Sep 2011 08:51:44 +0200 Subject: [FieldTrip] Fwd: source localization difficulties References: Message-ID: Begin forwarded message: > From: Kanal Eliezer > Date: September 26, 2011 9:45:00 PM GMT+02:00 > To: jan-mathijs schoffelen > Subject: Re: [FieldTrip] source localization difficulties > > Hello Dr Schoffelen - > > Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. > > However, it seems that there's another related issue. When running the > ft_plot_sens(data_preprocessed.hdr.grad); > hold on; > ft_plot_vol(vol); > check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. > > In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: > mri_realign.coordsys = 'ctf'; > That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. > > Any help would be most appreciated! Thanks - > > Elli > > > > > On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: > >> Hi Elli, >> >>> Hello Dr. Schoffelen - >>> >>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>> >>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >> >> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >> >>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >> >> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >> >>> Thanks - >>> >>> Eliezer Kanal >> >> >> Best, >> >> Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: check.jpg Type: image/jpg Size: 23087 bytes Desc: not available URL: From ekanal at cmu.edu Tue Sep 27 14:50:29 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 27 Sep 2011 08:50:29 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: References: Message-ID: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> Thanks for forwarding the message to the list. Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - Elli -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: > > > Begin forwarded message: > >> From: Kanal Eliezer >> Date: September 26, 2011 9:45:00 PM GMT+02:00 >> To: jan-mathijs schoffelen >> Subject: Re: [FieldTrip] source localization difficulties >> >> Hello Dr Schoffelen - >> >> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >> >> However, it seems that there's another related issue. When running the >> ft_plot_sens(data_preprocessed.hdr.grad); >> hold on; >> ft_plot_vol(vol); >> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >> >> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >> mri_realign.coordsys = 'ctf'; >> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >> >> Any help would be most appreciated! Thanks - >> >> Elli >> >> >> >> >> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >> >>> Hi Elli, >>> >>>> Hello Dr. Schoffelen - >>>> >>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>> >>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>> >>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>> >>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>> >>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>> >>>> Thanks - >>>> >>>> Eliezer Kanal >>> >>> >>> Best, >>> >>> Jan-Mathijs > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University 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 BelluscB at ninds.nih.gov Tue Sep 27 15:35:33 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Tue, 27 Sep 2011 09:35:33 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> Elli- I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. Hope this helps. Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -----Original Message----- From: Kanal Eliezer [mailto:ekanal at cmu.edu] Sent: Tuesday, September 27, 2011 8:50 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Fwd: source localization difficulties Thanks for forwarding the message to the list. Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - Elli -------------------- Eliezer Kanal, Ph.D. Postdoctoral Fellow Center for the Neural Basis of Cognition Carnegie Mellon University 4400 Fifth Ave, Suite 110A Pittsburgh PA 15213 P: 412-268-4115 F: 412-268-5060 On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: > > > Begin forwarded message: > >> From: Kanal Eliezer >> Date: September 26, 2011 9:45:00 PM GMT+02:00 >> To: jan-mathijs schoffelen >> Subject: Re: [FieldTrip] source localization difficulties >> >> Hello Dr Schoffelen - >> >> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >> >> However, it seems that there's another related issue. When running the >> ft_plot_sens(data_preprocessed.hdr.grad); >> hold on; >> ft_plot_vol(vol); >> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >> >> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >> mri_realign.coordsys = 'ctf'; >> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >> >> Any help would be most appreciated! Thanks - >> >> Elli >> >> >> >> >> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >> >>> Hi Elli, >>> >>>> Hello Dr. Schoffelen - >>>> >>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>> >>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>> >>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>> >>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>> >>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>> >>>> Thanks - >>>> >>>> Eliezer Kanal >>> >>> >>> Best, >>> >>> Jan-Mathijs > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University 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 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From albenin at mail.ru Tue Sep 27 17:23:53 2011 From: albenin at mail.ru (=?UTF-8?B?0JDQu9C10LrRgdC10Lkg0JHQtdC90LjQvQ==?=) Date: Tue, 27 Sep 2011 19:23:53 +0400 Subject: [FieldTrip] =?utf-8?q?parametric_statistics?= Message-ID: Hello! I need to perform t-test analysis between 2 categories through all subjects for each channel (in time-frequency domain) and I was unlucky to find this function in FiledTrip. So, could you please tell me if it is possible and how to perform this analysis. Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mscharinger at cbs.mpg.de Tue Sep 27 18:19:10 2011 From: mscharinger at cbs.mpg.de (Mathias Scharinger) Date: Tue, 27 Sep 2011 18:19:10 +0200 Subject: [FieldTrip] Trigger Detection in Yokogawa Data Message-ID: <4FD792CD-FFA5-4C86-9665-1FB42D847CAF@cbs.mpg.de> Dear all, I keep having problems with extracting triggers from Yokogawa Data (.sqd files). Usually, triggers are defined by clearly defined flanks, sent on channels 162-169, and code the occurrence of specific events/stimuli. Following the steps on the wiki, the problem is this line: event = ft_read_event(cfg.dataset,'trigindx',169,'threshold',1e3,'detectflank','up'); After determining the threshold from one trigger line, the above line would yield VERY different numbers on trigger lines that should be identical. If compared to the trigger extraction achieved by temp = sqdread(sourceFile,'Channels',triggerlines(tnum)); trigs = find((diff(temp))>1000); from the Jonathan Simon/Dan Hertz toolbox (http://www.isr.umd.edu/Labs/CSSL/simonlab/Resources.html) the ft_read_event method is always off by more than 5 trial, i.e. it is impossible to extract the correct number of trials by setting the threshold to one fixed value. My question is now: Could the two above lines somehow be implemented in the my_trial_fun file? The above line gives (for trigs) the following structure: trigs = 19 x 1 matrix (for a demo file called R1315test.sqd that I am willing to share) with the time points of the corresponding trigger line (here: 162). Or could the ft_read_event function use the sqdread algorithm somehow? I am not sure what causes the discrepancies with ft_read_event. Thanks for any help, Mathias ---------------------------------------------------------- Mathias Scharinger (PhD) Auditory Cognition Research Group Max Planck Institute for Human Cognitive & Brain Sciences Stephanstr. 1A - 04103 Leipzig, Germany Tel.: +49 (0) 341-9940-2482 From ekanal at cmu.edu Tue Sep 27 19:40:31 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 27 Sep 2011 13:40:31 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> Message-ID: <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> Hello Beth - I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - Elli On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: > Elli- > I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. > Hope this helps. > Beth. > > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > > > -----Original Message----- > From: Kanal Eliezer [mailto:ekanal at cmu.edu] > Sent: Tuesday, September 27, 2011 8:50 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Fwd: source localization difficulties > > Thanks for forwarding the message to the list. > > Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - > > Elli > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: > >> >> >> Begin forwarded message: >> >>> From: Kanal Eliezer >>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>> To: jan-mathijs schoffelen >>> Subject: Re: [FieldTrip] source localization difficulties >>> >>> Hello Dr Schoffelen - >>> >>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>> >>> However, it seems that there's another related issue. When running the >>> ft_plot_sens(data_preprocessed.hdr.grad); >>> hold on; >>> ft_plot_vol(vol); >>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>> >>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>> mri_realign.coordsys = 'ctf'; >>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>> >>> Any help would be most appreciated! Thanks - >>> >>> Elli >>> >>> >>> >>> >>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>> >>>> Hi Elli, >>>> >>>>> Hello Dr. Schoffelen - >>>>> >>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>> >>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>> >>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>> >>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>> >>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>> >>>>> Thanks - >>>>> >>>>> Eliezer Kanal >>>> >>>> >>>> Best, >>>> >>>> Jan-Mathijs >> >> Jan-Mathijs Schoffelen, MD PhD >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University 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 > > > _______________________________________________ > 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 BelluscB at ninds.nih.gov Tue Sep 27 20:14:35 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Tue, 27 Sep 2011 14:14:35 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. Beth. -----Original Message----- From: Kanal Eliezer [mailto:ekanal at cmu.edu] Sent: Tuesday, September 27, 2011 1:41 PM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] Fwd: source localization difficulties Hello Beth - I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - Elli On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: > Elli- > I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. > Hope this helps. > Beth. > > > Beth Belluscio MD-PhD > Clinical Fellow > Human Motor Control Section > NINDS, NIH > 301-402-3495 > > > > -----Original Message----- > From: Kanal Eliezer [mailto:ekanal at cmu.edu] > Sent: Tuesday, September 27, 2011 8:50 AM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Fwd: source localization difficulties > > Thanks for forwarding the message to the list. > > Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - > > Elli > > > -------------------- > Eliezer Kanal, Ph.D. > Postdoctoral Fellow > Center for the Neural Basis of Cognition > Carnegie Mellon University > 4400 Fifth Ave, Suite 110A > Pittsburgh PA 15213 > P: 412-268-4115 > F: 412-268-5060 > > > On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: > >> >> >> Begin forwarded message: >> >>> From: Kanal Eliezer >>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>> To: jan-mathijs schoffelen >>> Subject: Re: [FieldTrip] source localization difficulties >>> >>> Hello Dr Schoffelen - >>> >>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>> >>> However, it seems that there's another related issue. When running the >>> ft_plot_sens(data_preprocessed.hdr.grad); >>> hold on; >>> ft_plot_vol(vol); >>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>> >>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>> mri_realign.coordsys = 'ctf'; >>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>> >>> Any help would be most appreciated! Thanks - >>> >>> Elli >>> >>> >>> >>> >>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>> >>>> Hi Elli, >>>> >>>>> Hello Dr. Schoffelen - >>>>> >>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>> >>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>> >>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>> >>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>> >>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>> >>>>> Thanks - >>>>> >>>>> Eliezer Kanal >>>> >>>> >>>> Best, >>>> >>>> Jan-Mathijs >> >> Jan-Mathijs Schoffelen, MD PhD >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From ekanal at cmu.edu Tue Sep 27 21:23:57 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 27 Sep 2011 15:23:57 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> Message-ID: Unfortunately, it looks like redoing the alignment didn't help. I re-ran `ft_volumerealign` in interactive, and it did add the correct field to the output structure, but the brain is still facing the wrong way. Is it possible that FieldTrip is ignoring this field when plotting? The plotting functions are pretty complex, and are even more obfuscated than usual due to all the transforms used in aligning everything, so I don't want to try to troubleshoot this one myself since I'd almost certainly find the wrong thing. In the end, I fixed the problem by simply taking vol.bnd.pnt and vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, this is a workaround rather than a direct fix. Still, if anyone else has this problem, I'm attaching the code below... it seems to have worked. Elli ~~~ tmp = vol; % transform to spherical coords [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... = cart2sph( ... tmp.bnd.pnt(:,1), ... tmp.bnd.pnt(:,2), ... tmp.bnd.pnt(:,3) ); [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... = cart2sph( ... tmp.bnd.tri(:,1), ... tmp.bnd.tri(:,2), ... tmp.bnd.tri(:,3) ); % rotate as necessary tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; % transform back to cartesian [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... = sph2cart( ... tmp.bnd.pnt(:,1), ... tmp.bnd.pnt(:,2), ... tmp.bnd.pnt(:,3) ); [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... = cart2sph( ... tmp.bnd.tri(:,1), ... tmp.bnd.tri(:,2), ... tmp.bnd.tri(:,3) ); vol = tmp; On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. > Beth. > > -----Original Message----- > From: Kanal Eliezer [mailto:ekanal at cmu.edu] > Sent: Tuesday, September 27, 2011 1:41 PM > To: Email discussion list for the FieldTrip project > Subject: Re: [FieldTrip] Fwd: source localization difficulties > > Hello Beth - > > I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - > > Elli > > > On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: > >> Elli- >> I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. >> Hope this helps. >> Beth. >> >> >> Beth Belluscio MD-PhD >> Clinical Fellow >> Human Motor Control Section >> NINDS, NIH >> 301-402-3495 >> >> >> >> -----Original Message----- >> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >> Sent: Tuesday, September 27, 2011 8:50 AM >> To: Email discussion list for the FieldTrip project >> Subject: Re: [FieldTrip] Fwd: source localization difficulties >> >> Thanks for forwarding the message to the list. >> >> Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - >> >> Elli >> >> >> -------------------- >> Eliezer Kanal, Ph.D. >> Postdoctoral Fellow >> Center for the Neural Basis of Cognition >> Carnegie Mellon University >> 4400 Fifth Ave, Suite 110A >> Pittsburgh PA 15213 >> P: 412-268-4115 >> F: 412-268-5060 >> >> >> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >> >>> >>> >>> Begin forwarded message: >>> >>>> From: Kanal Eliezer >>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>> To: jan-mathijs schoffelen >>>> Subject: Re: [FieldTrip] source localization difficulties >>>> >>>> Hello Dr Schoffelen - >>>> >>>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>>> >>>> However, it seems that there's another related issue. When running the >>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>> hold on; >>>> ft_plot_vol(vol); >>>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>>> >>>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>>> mri_realign.coordsys = 'ctf'; >>>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>>> >>>> Any help would be most appreciated! Thanks - >>>> >>>> Elli >>>> >>>> >>>> >>>> >>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>> >>>>> Hi Elli, >>>>> >>>>>> Hello Dr. Schoffelen - >>>>>> >>>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>>> >>>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>>> >>>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>>> >>>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>>> >>>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>>> >>>>>> Thanks - >>>>>> >>>>>> Eliezer Kanal >>>>> >>>>> >>>>> Best, >>>>> >>>>> Jan-Mathijs >>> >>> Jan-Mathijs Schoffelen, MD PhD >>> Donders Institute for Brain, Cognition and Behaviour, >>> Centre for Cognitive Neuroimaging, >>> Radboud University 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 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From ekanal at cmu.edu Tue Sep 27 21:34:57 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Tue, 27 Sep 2011 15:34:57 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: <16149_1317151503_p8RJP2Rh020523_BDAA1CF9-9027-4F2C-ACE5-9CDDAB1673C7@cmu.edu> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> <16149_1317151503_p8RJP2Rh020523_BDAA1CF9-9027-4F2C-ACE5-9CDDAB1673C7@cmu.edu> Message-ID: <0535E384-0918-4D9A-97F7-EA07635C4699@cmu.edu> Addendum to previous email, the code was incorrect; `vol.bnd.tri` should not be rotated. Fixed code below. Elli ~~~~~~ tmp = vol; % transform to spherical coords [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... = cart2sph( ... tmp.bnd.pnt(:,1), ... tmp.bnd.pnt(:,2), ... tmp.bnd.pnt(:,3) ); % rotate as necessary tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; % transform back to cartesian [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... = sph2cart( ... tmp.bnd.pnt(:,1), ... tmp.bnd.pnt(:,2), ... tmp.bnd.pnt(:,3) ); vol = tmp; On Sep 27, 2011, at 3:23 PM, Kanal Eliezer wrote: > Unfortunately, it looks like redoing the alignment didn't help. I re-ran `ft_volumerealign` in interactive, and it did add the correct field to the output structure, but the brain is still facing the wrong way. > > Is it possible that FieldTrip is ignoring this field when plotting? The plotting functions are pretty complex, and are even more obfuscated than usual due to all the transforms used in aligning everything, so I don't want to try to troubleshoot this one myself since I'd almost certainly find the wrong thing. > > In the end, I fixed the problem by simply taking vol.bnd.pnt and vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, this is a workaround rather than a direct fix. Still, if anyone else has this problem, I'm attaching the code below... it seems to have worked. > > Elli > > ~~~ > > tmp = vol; > > % transform to spherical coords > [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... > = cart2sph( ... > tmp.bnd.pnt(:,1), ... > tmp.bnd.pnt(:,2), ... > tmp.bnd.pnt(:,3) ); > > % rotate as necessary > tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; > > % transform back to cartesian > [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... > = sph2cart( ... > tmp.bnd.pnt(:,1), ... > tmp.bnd.pnt(:,2), ... > tmp.bnd.pnt(:,3) ); > > vol = tmp; > > > > On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > >> OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. >> Beth. >> >> -----Original Message----- >> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >> Sent: Tuesday, September 27, 2011 1:41 PM >> To: Email discussion list for the FieldTrip project >> Subject: Re: [FieldTrip] Fwd: source localization difficulties >> >> Hello Beth - >> >> I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - >> >> Elli >> >> >> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >> >>> Elli- >>> I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. >>> Hope this helps. >>> Beth. >>> >>> >>> Beth Belluscio MD-PhD >>> Clinical Fellow >>> Human Motor Control Section >>> NINDS, NIH >>> 301-402-3495 >>> >>> >>> >>> -----Original Message----- >>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>> Sent: Tuesday, September 27, 2011 8:50 AM >>> To: Email discussion list for the FieldTrip project >>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>> >>> Thanks for forwarding the message to the list. >>> >>> Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - >>> >>> Elli >>> >>> >>> -------------------- >>> Eliezer Kanal, Ph.D. >>> Postdoctoral Fellow >>> Center for the Neural Basis of Cognition >>> Carnegie Mellon University >>> 4400 Fifth Ave, Suite 110A >>> Pittsburgh PA 15213 >>> P: 412-268-4115 >>> F: 412-268-5060 >>> >>> >>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>> >>>> >>>> >>>> Begin forwarded message: >>>> >>>>> From: Kanal Eliezer >>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>> To: jan-mathijs schoffelen >>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>> >>>>> Hello Dr Schoffelen - >>>>> >>>>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>>>> >>>>> However, it seems that there's another related issue. When running the >>>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>>> hold on; >>>>> ft_plot_vol(vol); >>>>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>>>> >>>>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>>>> mri_realign.coordsys = 'ctf'; >>>>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>>>> >>>>> Any help would be most appreciated! Thanks - >>>>> >>>>> Elli >>>>> >>>>> >>>>> >>>>> >>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>> >>>>>> Hi Elli, >>>>>> >>>>>>> Hello Dr. Schoffelen - >>>>>>> >>>>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>>>> >>>>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>>>> >>>>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>>>> >>>>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>>>> >>>>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>>>> >>>>>>> Thanks - >>>>>>> >>>>>>> Eliezer Kanal >>>>>> >>>>>> >>>>>> Best, >>>>>> >>>>>> Jan-Mathijs >>>> >>>> Jan-Mathijs Schoffelen, MD PhD >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University 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 >>> >>> >>> _______________________________________________ >>> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From Caroline.Lustenberger at kispi.uzh.ch Wed Sep 28 10:46:16 2011 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Wed, 28 Sep 2011 10:46:16 +0200 Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset Message-ID: <8D58B6880DD231469FA0128331363CED03DB01AB@exzh1.kispi.int> Dear all Using EEGlab I have calculated ITC and ERSP of 16 subjects of 1 channel and the frequency range 1-4Hz (in average), thus I have 2 data arrays: 1st Condition Sham: 16 x 185 --> 16=number of subjects, 185=timepoints with event-related spectral values or intertrial coherence values 2nd Condition Field: 16 x 185 To see if there is any difference between the 2 conditions in all timepoints I performed 185 paired t-tests and now I should control for multiple comparison using a cluster analysis (meaning find out the probability that a certain number of neighbour-timepoints are suprathreshold). Is there a possibility to do that using fieldtrip statistics? And how can I do that? Thank you very much for your help Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Sep 28 12:15:26 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 28 Sep 2011 12:15:26 +0200 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> Message-ID: Dear Elli, Your proposed fix is equivalent to swapping the first 2 columns in your tmp.bnd.pnt matrix, i.e. swapping the y and x axis. To me this seems that you can also alleviate this by specifying the proper cfg.coordsys prior to your call to ft_volumerealign. The idea is the following: by specifying the location of nasion/lpa/rpa a transformation matrix can be computed. This transformation matrix will assign the X,Y, and Z axes of the coordinate system. According to different conventions, the X-axis either goes anterior (leading to a 'ALS'-like coordinate system, e.g. used in the CTF-systems and 4D neuroimaging systems), or the X-axis goes to the right (leading to a 'RAS'-like coordinate system, e.g. used in the Neuromag system). This specification will have an effect on the transformation matrix only at the level of ft_volumerealign. Specifying the coordinate system later on (through ft_estimate_coordsys) only adds the field coordsys to the mri-structure, without affecting the transformation matrix. Adding the coordsys-field just gives an interpretation to the coordinate system (and thus to the transformation matrix). To summarize, I expect that your expectation of the coordinate system in which the sensors are expressed, don't coincide with the coordinate system in which (according to the transformation matrix in combination with the coordsys) the MRI is expressed. See for the different coordinate systems definitions: http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined For your call to ft_volumerealign you need to specify cfg.coordsys = 'one of the meg-systems'. At the moment this at least works for 'ctf' and 'itab' as strings. These reflect the two major conventions, i.e. X-axis anterior, or X-axis to the right. To de-confuse it a bit, I will add the other MEG-systems also as supported strings. For the time being you can look up in the table in the linked web-page which one you need. I suspect it is 'itab', because the default is ctf-convention. Best wishes, Jan-Mathijs On Sep 27, 2011, at 9:23 PM, Kanal Eliezer wrote: > Unfortunately, it looks like redoing the alignment didn't help. I re-ran `ft_volumerealign` in interactive, and it did add the correct field to the output structure, but the brain is still facing the wrong way. > > Is it possible that FieldTrip is ignoring this field when plotting? The plotting functions are pretty complex, and are even more obfuscated than usual due to all the transforms used in aligning everything, so I don't want to try to troubleshoot this one myself since I'd almost certainly find the wrong thing. > > In the end, I fixed the problem by simply taking vol.bnd.pnt and vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, this is a workaround rather than a direct fix. Still, if anyone else has this problem, I'm attaching the code below... it seems to have worked. > > Elli > > ~~~ > > tmp = vol; > > % transform to spherical coords > [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... > = cart2sph( ... > tmp.bnd.pnt(:,1), ... > tmp.bnd.pnt(:,2), ... > tmp.bnd.pnt(:,3) ); > [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... > = cart2sph( ... > tmp.bnd.tri(:,1), ... > tmp.bnd.tri(:,2), ... > tmp.bnd.tri(:,3) ); > > % rotate as necessary > tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; > tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; > > % transform back to cartesian > [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... > = sph2cart( ... > tmp.bnd.pnt(:,1), ... > tmp.bnd.pnt(:,2), ... > tmp.bnd.pnt(:,3) ); > [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... > = cart2sph( ... > tmp.bnd.tri(:,1), ... > tmp.bnd.tri(:,2), ... > tmp.bnd.tri(:,3) ); > > vol = tmp; > > > > On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: > >> OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. >> Beth. >> >> -----Original Message----- >> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >> Sent: Tuesday, September 27, 2011 1:41 PM >> To: Email discussion list for the FieldTrip project >> Subject: Re: [FieldTrip] Fwd: source localization difficulties >> >> Hello Beth - >> >> I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - >> >> Elli >> >> >> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >> >>> Elli- >>> I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. >>> Hope this helps. >>> Beth. >>> >>> >>> Beth Belluscio MD-PhD >>> Clinical Fellow >>> Human Motor Control Section >>> NINDS, NIH >>> 301-402-3495 >>> >>> >>> >>> -----Original Message----- >>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>> Sent: Tuesday, September 27, 2011 8:50 AM >>> To: Email discussion list for the FieldTrip project >>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>> >>> Thanks for forwarding the message to the list. >>> >>> Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - >>> >>> Elli >>> >>> >>> -------------------- >>> Eliezer Kanal, Ph.D. >>> Postdoctoral Fellow >>> Center for the Neural Basis of Cognition >>> Carnegie Mellon University >>> 4400 Fifth Ave, Suite 110A >>> Pittsburgh PA 15213 >>> P: 412-268-4115 >>> F: 412-268-5060 >>> >>> >>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>> >>>> >>>> >>>> Begin forwarded message: >>>> >>>>> From: Kanal Eliezer >>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>> To: jan-mathijs schoffelen >>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>> >>>>> Hello Dr Schoffelen - >>>>> >>>>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>>>> >>>>> However, it seems that there's another related issue. When running the >>>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>>> hold on; >>>>> ft_plot_vol(vol); >>>>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>>>> >>>>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>>>> mri_realign.coordsys = 'ctf'; >>>>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>>>> >>>>> Any help would be most appreciated! Thanks - >>>>> >>>>> Elli >>>>> >>>>> >>>>> >>>>> >>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>> >>>>>> Hi Elli, >>>>>> >>>>>>> Hello Dr. Schoffelen - >>>>>>> >>>>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>>>> >>>>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>>>> >>>>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>>>> >>>>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>>>> >>>>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>>>> >>>>>>> Thanks - >>>>>>> >>>>>>> Eliezer Kanal >>>>>> >>>>>> >>>>>> Best, >>>>>> >>>>>> Jan-Mathijs >>>> >>>> Jan-Mathijs Schoffelen, MD PhD >>>> Donders Institute for Brain, Cognition and Behaviour, >>>> Centre for Cognitive Neuroimaging, >>>> Radboud University 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 >>> >>> >>> _______________________________________________ >>> 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 > > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 From Lilla.Magyari at mpi.nl Wed Sep 28 13:08:21 2011 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Wed, 28 Sep 2011 13:08:21 +0200 Subject: [FieldTrip] mne vs lcmv methods In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C059826CCCF@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C059826CCCF@NIHMLBX10.nih.gov> Message-ID: <4E830025.1050407@mpi.nl> Hi Beth, I do not know how lcmv beamforming is implemented in FieldTrip, and I haven't used it before. But I did use the mne method for sourcelocalization in FieldTrip, so may I can answer some of your questions partially. But if someone is more expert in this area, comments are appreciated. Belluscio, Beth (NIH/NINDS) [E] wrote: > Hi fellow Fieldtripers- > > I am learning about the pros & cons of different methods for source > localization. For some of my data sets, I want to localize evoked > activity (ERFs). In one of them, I anticipated a single unilateral > primary site of activation and MNE worked very nicely for this. In the > second, I am using auditory stimuli and therefore anticipated > bilaterally synchronous activity. As was to be expected, (I think) MNE > gave a single site of activity near the midline. I tried a parallel > approach, but specifying lcmv as the method for ft_sourceanalysis as > follows: > > > > cfg = []; > > cfg.method = 'lcmv'; > > cfg.grid = leadfield_02_stim1; > > cfg.vol = vol; > > cfg.lambda = 1e8; > > cfg.checksize = inf; %I’ve been inserting this and the next line > because I’ve gotten error messages about the size. This didn’t happen > before, but these lines avoid the problem > > cfg.checkconfig ='loose'; > > source3CB24_02_stim1 = ft_sourceanalysis(cfg, tlkCB24_02_stim1) > > > > The output has a time dimension 1x601, and a pos dimension of 8196x3 > dimension, but the avg.pow is only 1x8196. I interpret this to mean > that the analysis averaged the power over some time interval instead of > computing the power in each leadfield position for each time point. > When I use the mne method, the output is clearly power for each time > point, and produces a beautiful movie, as indicated in the tutorial. > > > > My questions about the lcmv technique are: > > 1. Is there a fundamental difference between the lcmv approach and > the mne approach whereby it cannot compute the power at each time point, > but only gives a single average value for a time period? As far as I know, the mne approach (compared to other methods, like beamforming) is favored for calculating source estimates of evoked activity over time. Therefore, I am not surprised that the lcmv is not doing the computation over time. I found this a useful reading about the differences between beamforming and mne: Jensen, O., Hesse, C., 2010, Estimating distributed representation of evoked responses and oscillatory brain activity, In: MEG: An Introduction to Methods, ed. by Hansen, P., Kringelbach, M., Salmelin, R., doi:10.1093/acprof:oso/9780195307238.001.0001 > > 2. If so, how do I specify the time interval of interest (ie that > containing the main peak of the ERF) in ft_sourceanalysis? I would use ft_redefinetrial. This function can select only a segment of your trials. > 3. I thought one advantage of either MNE or LCMV was that I could > indicate my a priori hypothesis of the anticipated localization of the > source activity. Do I do this with cfg.grid? Is there a way to > indicate the number of anticipated dipoles? A dipole model presupposes indeed that the activation is coming from a small area or from multiple separate small areas, while the mne and the beamforming approach are providing a distributed representation of the neural activity. The minimum "a priori" assumption is that the underlying activation is coming from the brain. The brain volume is discretized onto a 3-dimensional grid (this is the cfg.grid). And the current is estimated at these grid locations. So, in this sense, yes, these grid points are your dipoles. Typically, you specify more thousands of these points. I hope this helps. Lilla Magyari > > > Thanks in advance for your help- > > Beth. > > > > Beth Belluscio MD-PhD > > Clinical Fellow > > Human Motor Control Section > > NINDS, NIH > > 301-402-3495 > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD student Language and Cognition Group research assistant Neurobiology of Language Group Max Planck Institute for Psycholinguistics Nijmegen, P.O. Box 310, 6500AH, the Netherlands Phone: 0031 24 3521561 From mscharinger at cbs.mpg.de Wed Sep 28 14:52:09 2011 From: mscharinger at cbs.mpg.de (Mathias Scharinger) Date: Wed, 28 Sep 2011 14:52:09 +0200 Subject: [FieldTrip] Trigger Detection in Yokogawa Data: Link to Test File In-Reply-To: <4FD792CD-FFA5-4C86-9665-1FB42D847CAF@cbs.mpg.de> References: <4FD792CD-FFA5-4C86-9665-1FB42D847CAF@cbs.mpg.de> Message-ID: Dear all, I posted a problem on the list yesterday and now have a link to the test sqd. file: http://dl.dropbox.com/u/19074278/R1315test.sqd The problem is summarized below: > > > I keep having problems with extracting triggers from Yokogawa Data (.sqd files). Usually, triggers are defined by clearly defined flanks, sent on channels 162-169, and code the occurrence of specific events/stimuli. > > Following the steps on the wiki, the problem is this line: > > event = ft_read_event(cfg.dataset,'trigindx',169,'threshold',1e3,'detectflank','up'); > > After determining the threshold from one trigger line, the above line would yield VERY different numbers on trigger lines that should be identical. If compared to the trigger extraction achieved by > > temp = sqdread(sourceFile,'Channels',triggerlines(tnum)); > trigs = find((diff(temp))>1000); > > from the Jonathan Simon/Dan Hertz toolbox (http://www.isr.umd.edu/Labs/CSSL/simonlab/Resources.html) > > the ft_read_event method is always off by more than 5 trial, i.e. it is impossible to extract the correct number of trials by setting the threshold to one fixed value. > > My question is now: > Could the two above lines somehow be implemented in the my_trial_fun file? > > The above line gives (for trigs) the following structure: > > trigs = 19 x 1 matrix (for a demo file called R1315test.sqd that I am willing to share) > with the time points of the corresponding trigger line (here: 162). > > Or could the ft_read_event function use the sqdread algorithm somehow? > I am not sure what causes the discrepancies with ft_read_event. > Thanks for any help, Mathias From politzerahless at gmail.com Wed Sep 28 16:36:47 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Wed, 28 Sep 2011 09:36:47 -0500 Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset Message-ID: Caroline, This should be possible (I recently did something very similar, although I was analysizing ERPs rather than ERSPs). First you need to export the data for each subject from EEGLAB to Fieldtrip using EEGLAB's function eeg2fieldtrip(); when I did this I specified the option 'timelockanalysis' to compute ERPs of the EEGLAB data, but in your case I guess you will want to use 'freqanalysis' instead. Then, you need to compute grand averages using ft_freqgrandaverage() with cfg.keepindividual='yes'. Then you will be ready to perform cluster statistics following the instructions at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq . Best, Steve Politzer-Ahles Message: 1 > Date: Wed, 28 Sep 2011 10:46:16 +0200 > From: "Lustenberger Caroline" > To: > Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of > an already existing dataset > Message-ID: <8D58B6880DD231469FA0128331363CED03DB01AB at exzh1.kispi.int> > Content-Type: text/plain; charset="us-ascii" > > Dear all > > Using EEGlab I have calculated ITC and ERSP of 16 subjects of 1 channel > and the frequency range 1-4Hz (in average), thus I have 2 data arrays: > > 1st Condition Sham: 16 x 185 --> 16=number of subjects, 185=timepoints > with event-related spectral values or intertrial coherence values > 2nd Condition Field: 16 x 185 > > To see if there is any difference between the 2 conditions in all > timepoints I performed 185 paired t-tests and now I should control for > multiple comparison using a cluster analysis (meaning find out the > probability that a certain number of neighbour-timepoints are > suprathreshold). > > Is there a possibility to do that using fieldtrip statistics? And how > can I do that? > > Thank you very much for your help > Caroline > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110928/a27bc4a9/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 10, Issue 44 > ***************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Wed Sep 28 17:38:35 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Wed, 28 Sep 2011 09:38:35 -0600 Subject: [FieldTrip] mne vs lcmv methods In-Reply-To: <4E830025.1050407@mpi.nl> References: <794DFDD3C128EF44AC49ADC58FD0090C059826CCCF@NIHMLBX10.nih.gov> <4E830025.1050407@mpi.nl> Message-ID: Dear Beth, I think we'd need to know more about your analysis input to answer questions about the dimensionality of the source outputs, but in general, the lcmv beamformer suffers from the same problems as other beamformers - that is, when you have the expectation of highly correlated sources, one or both of the sources will be suppressed, particularly when the time range for the data input to the beamformer is restricted to short intervals. Many papers have been written on this issue, and there are some attempts at solutions (e.g., see Brookes et al. 2006 Neuroimage). I do not believe that the lcmv or dics beamformers in FieldTrip have any such implementation for highly correlated sources, but I may be wrong. Since you want to reconstruct the sources of an auditory evoked field, in general a beamfomer will be a poor choice of methods for you. For simple, passive auditory stimulation, two-dipole models work very nicely. If you have the expectation of more complicated source arrangements because of some cognitive manipulation, then the cortically constrained MNE approach seems reasonable to me. All that said, the lcmv beamformer in Fieldtrip should be able to give you output at the same times as you input for analysis. The dics beamformer, as it is done in the frequency domain, not the time domain, will generally give you a single output. Also, to clarify something that might be misinterpreted from Lilla's answer to you, at some level (the forward solution) all of these models (single dipole, multiple dipole, cortically constrained mne, beamformer) are all reliant on the dipole model. Distributed models simply have many dipoles, which are fixed in location to either the vertices of the cortical surface tesselation, oriented normal to the surface, or in the case of a beamformer, typically done on a regularly spaced grid with either fixed or optimized source orientation (e.g., lcmv vs. sam). Best, Don On Sep 28, 2011, at 5:08 AM, Magyari, Lilla wrote: > Hi Beth, > > I do not know how lcmv beamforming is implemented in FieldTrip, and I > haven't used it before. But I did use the mne method for > sourcelocalization in FieldTrip, so may I can answer some of your > questions partially. But if someone is more expert in this area, > comments are appreciated. > > Belluscio, Beth (NIH/NINDS) [E] wrote: >> Hi fellow Fieldtripers- >> >> I am learning about the pros & cons of different methods for source >> localization. For some of my data sets, I want to localize evoked >> activity (ERFs). In one of them, I anticipated a single unilateral >> primary site of activation and MNE worked very nicely for this. In the >> second, I am using auditory stimuli and therefore anticipated >> bilaterally synchronous activity. As was to be expected, (I think) MNE >> gave a single site of activity near the midline. I tried a parallel >> approach, but specifying lcmv as the method for ft_sourceanalysis as >> follows: >> >> >> >> cfg = []; >> >> cfg.method = 'lcmv'; >> >> cfg.grid = leadfield_02_stim1; >> >> cfg.vol = vol; >> >> cfg.lambda = 1e8; >> >> cfg.checksize = inf; %I’ve been inserting this and the next line >> because I’ve gotten error messages about the size. This didn’t happen >> before, but these lines avoid the problem >> >> cfg.checkconfig ='loose'; >> >> source3CB24_02_stim1 = ft_sourceanalysis(cfg, tlkCB24_02_stim1) >> >> >> >> The output has a time dimension 1x601, and a pos dimension of 8196x3 >> dimension, but the avg.pow is only 1x8196. I interpret this to mean >> that the analysis averaged the power over some time interval instead of >> computing the power in each leadfield position for each time point. >> When I use the mne method, the output is clearly power for each time >> point, and produces a beautiful movie, as indicated in the tutorial. >> >> >> >> My questions about the lcmv technique are: >> >> 1. Is there a fundamental difference between the lcmv approach and >> the mne approach whereby it cannot compute the power at each time point, >> but only gives a single average value for a time period? > > As far as I know, the mne approach (compared to other methods, like > beamforming) is favored for calculating source estimates of evoked > activity over time. Therefore, I am not surprised that the lcmv is not > doing the computation over time. > I found this a useful reading about the differences between beamforming > and mne: > > Jensen, O., Hesse, C., 2010, Estimating distributed representation of > evoked responses and oscillatory brain activity, In: MEG: An > Introduction to Methods, ed. by Hansen, P., Kringelbach, M., Salmelin, > R., doi:10.1093/acprof:oso/9780195307238.001.0001 > >> >> 2. If so, how do I specify the time interval of interest (ie that >> containing the main peak of the ERF) in ft_sourceanalysis? > > I would use ft_redefinetrial. This function can select only a segment of > your trials. > >> 3. I thought one advantage of either MNE or LCMV was that I could >> indicate my a priori hypothesis of the anticipated localization of the >> source activity. Do I do this with cfg.grid? Is there a way to >> indicate the number of anticipated dipoles? > > A dipole model presupposes indeed that the activation is coming from a > small area or from multiple separate small areas, while the mne and the > beamforming approach are providing a distributed representation of the > neural activity. The minimum "a priori" assumption is that the > underlying activation is coming from the brain. The brain volume is > discretized onto a 3-dimensional grid (this is the cfg.grid). And the > current is estimated at these grid locations. So, in this sense, yes, > these grid points are your dipoles. Typically, you specify more > thousands of these points. > > I hope this helps. > > Lilla Magyari > > >> >> >> Thanks in advance for your help- >> >> Beth. >> >> >> >> Beth Belluscio MD-PhD >> >> Clinical Fellow >> >> Human Motor Control Section >> >> NINDS, NIH >> >> 301-402-3495 >> >> >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > PhD student > Language and Cognition Group > research assistant > Neurobiology of Language Group > > Max Planck Institute for Psycholinguistics > Nijmegen, P.O. Box 310, 6500AH, the Netherlands > Phone: 0031 24 3521561 > > _______________________________________________ > 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 From Caroline.Lustenberger at kispi.uzh.ch Wed Sep 28 17:56:04 2011 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Wed, 28 Sep 2011 17:56:04 +0200 Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset In-Reply-To: Message-ID: <8D58B6880DD231469FA0128331363CED03DB01DB@exzh1.kispi.int> Dear Steve Thank you very much, I was able to calculate montecarlo statistics with the fieldtrip toolbox using eeglab data. Probably you can help me answering this question too: How can I define neighbour-timepoints, normally all tutorials explain how to define neighbour sensors or channels, but have only 1 channel and 185 timepoints. Thus, I want to perform cluster analysis to see whether a certain timepoint cluster is significant. Thanks again and best wishes Caroline ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von Stephen Politzer-Ahles Gesendet: Mittwoch, 28. September 2011 16:37 An: fieldtrip at donders.ru.nl Betreff: Re: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset Caroline, This should be possible (I recently did something very similar, although I was analysizing ERPs rather than ERSPs). First you need to export the data for each subject from EEGLAB to Fieldtrip using EEGLAB's function eeg2fieldtrip(); when I did this I specified the option 'timelockanalysis' to compute ERPs of the EEGLAB data, but in your case I guess you will want to use 'freqanalysis' instead. Then, you need to compute grand averages using ft_freqgrandaverage() with cfg.keepindividual='yes'. Then you will be ready to perform cluster statistics following the instructions at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_freq . Best, Steve Politzer-Ahles Message: 1 Date: Wed, 28 Sep 2011 10:46:16 +0200 From: "Lustenberger Caroline" To: Subject: [FieldTrip] Using fieldtrip statistic for cluster analysis of an already existing dataset Message-ID: <8D58B6880DD231469FA0128331363CED03DB01AB at exzh1.kispi.int> Content-Type: text/plain; charset="us-ascii" Dear all Using EEGlab I have calculated ITC and ERSP of 16 subjects of 1 channel and the frequency range 1-4Hz (in average), thus I have 2 data arrays: 1st Condition Sham: 16 x 185 --> 16=number of subjects, 185=timepoints with event-related spectral values or intertrial coherence values 2nd Condition Field: 16 x 185 To see if there is any difference between the 2 conditions in all timepoints I performed 185 paired t-tests and now I should control for multiple comparison using a cluster analysis (meaning find out the probability that a certain number of neighbour-timepoints are suprathreshold). Is there a possibility to do that using fieldtrip statistics? And how can I do that? Thank you very much for your help Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 10, Issue 44 ***************************************** -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tim.Bardouille at nrc-cnrc.gc.ca Wed Sep 28 18:24:08 2011 From: Tim.Bardouille at nrc-cnrc.gc.ca (Bardouille, Tim) Date: Wed, 28 Sep 2011 09:24:08 -0700 Subject: [FieldTrip] MSc/PhD Positions at Dalhousie University Message-ID: Hello all, We are recruiting MSc and PhD students for a funded MEG study looking at neuronal connectivity and stroke recovery. Students will have the opportunity to undergo research through the Depts of Kinesiology or Psychology/Neuroscience at Dalhousie University in Halifax, Nova Scotia, Canada. This research project will capitalize on the spatiotemporal resolution of MEG to examine changes in connectivity within the sensorimotor network of individuals post-stroke. Specifically, the goal of this research is to ‘pave the road to post-stroke rehabilitation’. Identifying the ‘normal’ sensorimotor network and establishing the relationship between network re-organization and functional recovery will permit the development and implementation of treatments to direct brain recovery. With regard to the proposed research project, and in groups of non-disabled controls and patients post-stroke, our objectives include: 1. To establish the connectivity pattern of the ‘normal’ sensorimotor network and demonstrate the ability to detect changes within the network using an established motor learning paradigm 2. Using clinical measures of upper limb function, we will establish the relationship between the pattern of sensorimotor network connectivity and functional recovery in well and poorly recovered patients You can find more information at: http://myweb.dal.ca/sh539856/ If interested, please e-mail Dr. Shaun Boe (s.boe at dal.ca) or Dr. Tim Bardouille (tim.bardouille at nrc.ca). Best, Tim Bardouille. --------------------------------------------------------- Timothy Bardouille, PhD, Research Officer Laboratory for Clinical MEG NRC Institute for Biodiagnostics (Atlantic) Office: Halifax Infirmary 3900 - 1796 Summer Street Halifax, Nova Scotia B3H 3A7 Phone: 902-473-1865 Lab: 902-470-3936 Fax: 902-473-1851 --------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ekanal at cmu.edu Wed Sep 28 18:34:04 2011 From: ekanal at cmu.edu (Kanal Eliezer) Date: Wed, 28 Sep 2011 12:34:04 -0400 Subject: [FieldTrip] Fwd: source localization difficulties In-Reply-To: References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> Message-ID: <9AC10416-4F89-434E-A3BD-D20EE0E14D19@cmu.edu> Thanks for the clarification. The problem seemed to be that the function was ignoring the input I was providing to `cfg.coordsys`; hopefully the fix you described below will address that. Note that it should also recognize coordsys of `ras`, `als`, and whatever else can be outputted from the interactive alignment process. Thanks, Elli On Sep 28, 2011, at 6:15 AM, jan-mathijs schoffelen wrote: > Dear Elli, > > Your proposed fix is equivalent to swapping the first 2 columns in your tmp.bnd.pnt matrix, i.e. swapping the y and x axis. To me this seems that you can also alleviate this by specifying the proper cfg.coordsys prior to your call to ft_volumerealign. The idea is the following: by specifying the location of nasion/lpa/rpa a transformation matrix can be computed. This transformation matrix will assign the X,Y, and Z axes of the coordinate system. According to different conventions, the X-axis either goes anterior (leading to a 'ALS'-like coordinate system, e.g. used in the CTF-systems and 4D neuroimaging systems), or the X-axis goes to the right (leading to a 'RAS'-like coordinate system, e.g. used in the Neuromag system). This specification will have an effect on the transformation matrix only at the level of ft_volumerealign. Specifying the coordinate system later on (through ft_estimate_coordsys) only adds the field coordsys to the mri-structure, without affecting the tran! > sformation matrix. Adding the coordsys-field just gives an interpretation to the coordinate system (and thus to the transformation matrix). To summarize, I expect that your expectation of the coordinate system in which the sensors are expressed, don't coincide with the coordinate system in which (according to the transformation matrix in combination with the coordsys) the MRI is expressed. See for the different coordinate systems definitions: > > http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined > > For your call to ft_volumerealign you need to specify cfg.coordsys = 'one of the meg-systems'. At the moment this at least works for 'ctf' and 'itab' as strings. These reflect the two major conventions, i.e. X-axis anterior, or X-axis to the right. To de-confuse it a bit, I will add the other MEG-systems also as supported strings. For the time being you can look up in the table in the linked web-page which one you need. I suspect it is 'itab', because the default is ctf-convention. > > Best wishes, > > Jan-Mathijs > > > On Sep 27, 2011, at 9:23 PM, Kanal Eliezer wrote: > >> Unfortunately, it looks like redoing the alignment didn't help. I re-ran `ft_volumerealign` in interactive, and it did add the correct field to the output structure, but the brain is still facing the wrong way. >> >> Is it possible that FieldTrip is ignoring this field when plotting? The plotting functions are pretty complex, and are even more obfuscated than usual due to all the transforms used in aligning everything, so I don't want to try to troubleshoot this one myself since I'd almost certainly find the wrong thing. >> >> In the end, I fixed the problem by simply taking vol.bnd.pnt and vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, this is a workaround rather than a direct fix. Still, if anyone else has this problem, I'm attaching the code below... it seems to have worked. >> >> Elli >> >> ~~~ >> >> tmp = vol; >> >> % transform to spherical coords >> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >> = cart2sph( ... >> tmp.bnd.pnt(:,1), ... >> tmp.bnd.pnt(:,2), ... >> tmp.bnd.pnt(:,3) ); >> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >> = cart2sph( ... >> tmp.bnd.tri(:,1), ... >> tmp.bnd.tri(:,2), ... >> tmp.bnd.tri(:,3) ); >> >> % rotate as necessary >> tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; >> tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; >> >> % transform back to cartesian >> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >> = sph2cart( ... >> tmp.bnd.pnt(:,1), ... >> tmp.bnd.pnt(:,2), ... >> tmp.bnd.pnt(:,3) ); >> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >> = cart2sph( ... >> tmp.bnd.tri(:,1), ... >> tmp.bnd.tri(:,2), ... >> tmp.bnd.tri(:,3) ); >> >> vol = tmp; >> >> >> >> On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: >> >>> OK, Elli, I think you have the source of your problem - I'm glad that helped. To redefine the alignment, you can use ft_volumerealign in interactive mode. Be sure to read the instructions that come up in your matlab workspace simultaneously with the image so that you mark your volume as you wish (I found this a little confusing initially). As you mark your landmarks (eg l, r, n or a,p,s) you should also see the coordinates written out in the workspace. This should confirm that your realignment is taking place. After you have done this, you can check it again with the ft_determine_coordsys to make sure. >>> Beth. >>> >>> -----Original Message----- >>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>> Sent: Tuesday, September 27, 2011 1:41 PM >>> To: Email discussion list for the FieldTrip project >>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>> >>> Hello Beth - >>> >>> I actually hadn't tried using `ft_determine_coordsys` on the `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has the anterior along the Y axis, when it should be along the Y. However, changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` to redefine the alignment, and then re-running `ft_plot_vol` - or even re-running `ft_determine_coordsys` on the new structure - doesn't seem to change anything! The field `coordsys` has been added (and now reads "ras"), but this doesn't seem to affect anything. Is this a bug? Do I need to apply a transformation function to make the new coordsys take effect? Thanks - >>> >>> Elli >>> >>> >>> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>> >>>> Elli- >>>> I had similar problems at one point. You may already have tried this, but for what it's worth, here are a couple of suggestions: you can check each type of volume or array with ft_determine_coordsys. This will give you an image with the x,y,z coordinates superimposed so that you can check directly what type of coordinate system is attached to the volume. Secondly, when using ft_volumerealign, interactive, make sure you are not incorrectly identifying right and left. Sometimes in the conversion of DICOM to another system, left and right are switched. >>>> Hope this helps. >>>> Beth. >>>> >>>> >>>> Beth Belluscio MD-PhD >>>> Clinical Fellow >>>> Human Motor Control Section >>>> NINDS, NIH >>>> 301-402-3495 >>>> >>>> >>>> >>>> -----Original Message----- >>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>> Sent: Tuesday, September 27, 2011 8:50 AM >>>> To: Email discussion list for the FieldTrip project >>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>> >>>> Thanks for forwarding the message to the list. >>>> >>>> Just to clarify, the reconstruction worked fine; the brain looks good. The problem is that it's facing the wrong way; in the, the helmet is facing left/back, and the brain is turned 90 degrees to the right (facing forward in the image). If anyone knows how to either correct it as it is or how to re-run the analysis to prevent it from happening I'd be most appreciative. If any more details are needed, please just ask! Thanks - >>>> >>>> Elli >>>> >>>> >>>> -------------------- >>>> Eliezer Kanal, Ph.D. >>>> Postdoctoral Fellow >>>> Center for the Neural Basis of Cognition >>>> Carnegie Mellon University >>>> 4400 Fifth Ave, Suite 110A >>>> Pittsburgh PA 15213 >>>> P: 412-268-4115 >>>> F: 412-268-5060 >>>> >>>> >>>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>>> >>>>> >>>>> >>>>> Begin forwarded message: >>>>> >>>>>> From: Kanal Eliezer >>>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>>> To: jan-mathijs schoffelen >>>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>>> >>>>>> Hello Dr Schoffelen - >>>>>> >>>>>> Thanks for the advice. The way I got this part to work was to use SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on that file, instead of reading the DICOM files directly. Using this method, I was able to reconstruct well. >>>>>> >>>>>> However, it seems that there's another related issue. When running the >>>>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>>>> hold on; >>>>>> ft_plot_vol(vol); >>>>>> check, I got the attached image. Do you have any idea why it's doing that? Please let me know if I can provide any more details which could help troubleshoot. >>>>>> >>>>>> In case it's relevant, I did notice that the output structure of the `ft_volumerealign` function (run with method='interactive') contained the following field: >>>>>> mri_realign.coordsys = 'ctf'; >>>>>> That can't be correct. I'm pretty sure it should be 'nifti'. However, I tried re-running `ft_volumesegment` after manually changing that value, and the figure looks the same. >>>>>> >>>>>> Any help would be most appreciated! Thanks - >>>>>> >>>>>> Elli >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>>> >>>>>>> Hi Elli, >>>>>>> >>>>>>>> Hello Dr. Schoffelen - >>>>>>>> >>>>>>>> I sent a response to the below email, but I think it got lost in the shuffle. I tried what you suggested, and I got the image attached below (matlab figure). >>>>>>>> >>>>>>>> Two questions: (1) What could be the cause of this poor alignment? This isn't right/left flipping, as the nose also looks to be in the back. (2) Do you have any idea why the reconstruction of the MRI looks so poor? FreeSurfer reconstructions looked much "healthier". >>>>>>> >>>>>>> To combine both questions into 1 answer, I wouldn't say that the alignment is bad, it's the segmentation that seems to be completely off. This usually happens, when FieldTrip assigns the wrong coordinate system to the MRI. For the segmentation to work, SPM needs an approximate coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and needs the tag mri.coordsys for this. This tag is usually set after a pass through ft_volumerealign, where you can specify a cfg.coordsys (I just noticed this as an undocumented option: perhaps that needs to change). By default, this tag is set to 'ctf', see http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless segmentation. >>>>>>> >>>>>>>> You mentioned below that I could simply load the up freesurfer files and go from there. All the *.mgz files I've found from freesurfer processing are simply volumetric MRI files. The surface files are stored in a variety of formats with seemingly no file extension. Is there a way to load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do that? >>>>>>> >>>>>>> The ft_read_headshape function should be able to read freesurfer triangle and quadrangle files. Use it as ft_read_headshape(filename, 'fileformat', 'freesurfer-triangle_binary'); >>>>>>> >>>>>>>> Thanks - >>>>>>>> >>>>>>>> Eliezer Kanal >>>>>>> >>>>>>> >>>>>>> Best, >>>>>>> >>>>>>> Jan-Mathijs >>>>> >>>>> Jan-Mathijs Schoffelen, MD PhD >>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>> Centre for Cognitive Neuroimaging, >>>>> Radboud University 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> >> _______________________________________________ >> 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 > 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 miellet at psy.gla.ac.uk Thu Sep 29 09:29:43 2011 From: miellet at psy.gla.ac.uk (miellet at psy.gla.ac.uk) Date: Thu, 29 Sep 2011 08:29:43 +0100 Subject: [FieldTrip] typo in ft_sourceplot ? In-Reply-To: <9AC10416-4F89-434E-A3BD-D20EE0E14D19@cmu.edu> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> <9AC10416-4F89-434E-A3BD-D20EE0E14D19@cmu.edu> Message-ID: <20110929082943.90622sm9ihbtlw13@horde.psy.gla.ac.uk> Hello, I think there is a typo in ft_sourceplot at line 205. cfg.funcolrolim = ft_getopt(cfg,'funcolorlim', 'auto'); Sorry if it's not the case or if this typo has already been corrected (I am not sure that I'm using the exact last version, I'm using fieldtrip on Glasgow grid). Sebastien ---------------------------------------------- Dr. Sébastien Miellet, Lecturer Department of Psychology University of Fribourg Faucigny 2 1700 Fribourg Switzerland tel: +41 (0)77 489 6468 ---------------------------------------------- Quoting Kanal Eliezer : > Thanks for the clarification. The problem seemed to be that the > function was ignoring the input I was providing to `cfg.coordsys`; > hopefully the fix you described below will address that. Note that > it should also recognize coordsys of `ras`, `als`, and whatever else > can be outputted from the interactive alignment process. > > Thanks, > Elli > > > On Sep 28, 2011, at 6:15 AM, jan-mathijs schoffelen wrote: > >> Dear Elli, >> >> Your proposed fix is equivalent to swapping the first 2 columns in >> your tmp.bnd.pnt matrix, i.e. swapping the y and x axis. To me this >> seems that you can also alleviate this by specifying the proper >> cfg.coordsys prior to your call to ft_volumerealign. The idea is >> the following: by specifying the location of nasion/lpa/rpa a >> transformation matrix can be computed. This transformation matrix >> will assign the X,Y, and Z axes of the coordinate system. According >> to different conventions, the X-axis either goes anterior (leading >> to a 'ALS'-like coordinate system, e.g. used in the CTF-systems and >> 4D neuroimaging systems), or the X-axis goes to the right (leading >> to a 'RAS'-like coordinate system, e.g. used in the Neuromag >> system). This specification will have an effect on the >> transformation matrix only at the level of ft_volumerealign. >> Specifying the coordinate system later on (through >> ft_estimate_coordsys) only adds the field coordsys to the >> mri-structure, without affecting the tran! >> sformation matrix. Adding the coordsys-field just gives an >> interpretation to the coordinate system (and thus to the >> transformation matrix). To summarize, I expect that your >> expectation of the coordinate system in which the sensors are >> expressed, don't coincide with the coordinate system in which >> (according to the transformation matrix in combination with the >> coordsys) the MRI is expressed. See for the different coordinate >> systems definitions: >> >> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >> >> For your call to ft_volumerealign you need to specify cfg.coordsys >> = 'one of the meg-systems'. At the moment this at least works for >> 'ctf' and 'itab' as strings. These reflect the two major >> conventions, i.e. X-axis anterior, or X-axis to the right. To >> de-confuse it a bit, I will add the other MEG-systems also as >> supported strings. For the time being you can look up in the table >> in the linked web-page which one you need. I suspect it is 'itab', >> because the default is ctf-convention. >> >> Best wishes, >> >> Jan-Mathijs >> >> >> On Sep 27, 2011, at 9:23 PM, Kanal Eliezer wrote: >> >>> Unfortunately, it looks like redoing the alignment didn't help. I >>> re-ran `ft_volumerealign` in interactive, and it did add the >>> correct field to the output structure, but the brain is still >>> facing the wrong way. >>> >>> Is it possible that FieldTrip is ignoring this field when >>> plotting? The plotting functions are pretty complex, and are even >>> more obfuscated than usual due to all the transforms used in >>> aligning everything, so I don't want to try to troubleshoot this >>> one myself since I'd almost certainly find the wrong thing. >>> >>> In the end, I fixed the problem by simply taking vol.bnd.pnt and >>> vol.bnd.tri, applying cart2sph, adding pi/2, and applying >>> sph2cart. However, this is a workaround rather than a direct fix. >>> Still, if anyone else has this problem, I'm attaching the code >>> below... it seems to have worked. >>> >>> Elli >>> >>> ~~~ >>> >>> tmp = vol; >>> >>> % transform to spherical coords >>> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >>> = cart2sph( ... >>> tmp.bnd.pnt(:,1), ... >>> tmp.bnd.pnt(:,2), ... >>> tmp.bnd.pnt(:,3) ); >>> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >>> = cart2sph( ... >>> tmp.bnd.tri(:,1), ... >>> tmp.bnd.tri(:,2), ... >>> tmp.bnd.tri(:,3) ); >>> >>> % rotate as necessary >>> tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; >>> tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; >>> >>> % transform back to cartesian >>> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >>> = sph2cart( ... >>> tmp.bnd.pnt(:,1), ... >>> tmp.bnd.pnt(:,2), ... >>> tmp.bnd.pnt(:,3) ); >>> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >>> = cart2sph( ... >>> tmp.bnd.tri(:,1), ... >>> tmp.bnd.tri(:,2), ... >>> tmp.bnd.tri(:,3) ); >>> >>> vol = tmp; >>> >>> >>> >>> On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>> >>>> OK, Elli, I think you have the source of your problem - I'm glad >>>> that helped. To redefine the alignment, you can use >>>> ft_volumerealign in interactive mode. Be sure to read the >>>> instructions that come up in your matlab workspace simultaneously >>>> with the image so that you mark your volume as you wish (I found >>>> this a little confusing initially). As you mark your landmarks >>>> (eg l, r, n or a,p,s) you should also see the coordinates written >>>> out in the workspace. This should confirm that your realignment >>>> is taking place. After you have done this, you can check it >>>> again with the ft_determine_coordsys to make sure. >>>> Beth. >>>> >>>> -----Original Message----- >>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>> Sent: Tuesday, September 27, 2011 1:41 PM >>>> To: Email discussion list for the FieldTrip project >>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>> >>>> Hello Beth - >>>> >>>> I actually hadn't tried using `ft_determine_coordsys` on the >>>> `ft_prepare_headmodel` output, and it turns out that it's >>>> incorrect; it has the anterior along the Y axis, when it should >>>> be along the Y. However, changing it doesn't seem to do anything! >>>> I.e., using `ft_determine_coordsys` to redefine the alignment, >>>> and then re-running `ft_plot_vol` - or even re-running >>>> `ft_determine_coordsys` on the new structure - doesn't seem to >>>> change anything! The field `coordsys` has been added (and now >>>> reads "ras"), but this doesn't seem to affect anything. Is this a >>>> bug? Do I need to apply a transformation function to make the new >>>> coordsys take effect? Thanks - >>>> >>>> Elli >>>> >>>> >>>> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>>> >>>>> Elli- >>>>> I had similar problems at one point. You may already have tried >>>>> this, but for what it's worth, here are a couple of suggestions: >>>>> you can check each type of volume or array with >>>>> ft_determine_coordsys. This will give you an image with the >>>>> x,y,z coordinates superimposed so that you can check directly >>>>> what type of coordinate system is attached to the volume. >>>>> Secondly, when using ft_volumerealign, interactive, make sure >>>>> you are not incorrectly identifying right and left. Sometimes >>>>> in the conversion of DICOM to another system, left and right are >>>>> switched. >>>>> Hope this helps. >>>>> Beth. >>>>> >>>>> >>>>> Beth Belluscio MD-PhD >>>>> Clinical Fellow >>>>> Human Motor Control Section >>>>> NINDS, NIH >>>>> 301-402-3495 >>>>> >>>>> >>>>> >>>>> -----Original Message----- >>>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>>> Sent: Tuesday, September 27, 2011 8:50 AM >>>>> To: Email discussion list for the FieldTrip project >>>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>>> >>>>> Thanks for forwarding the message to the list. >>>>> >>>>> Just to clarify, the reconstruction worked fine; the brain looks >>>>> good. The problem is that it's facing the wrong way; in the, the >>>>> helmet is facing left/back, and the brain is turned 90 degrees >>>>> to the right (facing forward in the image). If anyone knows how >>>>> to either correct it as it is or how to re-run the analysis to >>>>> prevent it from happening I'd be most appreciative. If any more >>>>> details are needed, please just ask! Thanks - >>>>> >>>>> Elli >>>>> >>>>> >>>>> -------------------- >>>>> Eliezer Kanal, Ph.D. >>>>> Postdoctoral Fellow >>>>> Center for the Neural Basis of Cognition >>>>> Carnegie Mellon University >>>>> 4400 Fifth Ave, Suite 110A >>>>> Pittsburgh PA 15213 >>>>> P: 412-268-4115 >>>>> F: 412-268-5060 >>>>> >>>>> >>>>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>>>> >>>>>> >>>>>> >>>>>> Begin forwarded message: >>>>>> >>>>>>> From: Kanal Eliezer >>>>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>>>> To: jan-mathijs schoffelen >>>>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>>>> >>>>>>> Hello Dr Schoffelen - >>>>>>> >>>>>>> Thanks for the advice. The way I got this part to work was to >>>>>>> use SPM to convert my DICOM files to NIfTI ('*.img') and use >>>>>>> `ft_read_mri` on that file, instead of reading the DICOM files >>>>>>> directly. Using this method, I was able to reconstruct well. >>>>>>> >>>>>>> However, it seems that there's another related issue. When running the >>>>>>> ft_plot_sens(data_preprocessed.hdr.grad); >>>>>>> hold on; >>>>>>> ft_plot_vol(vol); >>>>>>> check, I got the attached image. Do you have any idea why it's >>>>>>> doing that? Please let me know if I can provide any more >>>>>>> details which could help troubleshoot. >>>>>>> >>>>>>> In case it's relevant, I did notice that the output structure >>>>>>> of the `ft_volumerealign` function (run with >>>>>>> method='interactive') contained the following field: >>>>>>> mri_realign.coordsys = 'ctf'; >>>>>>> That can't be correct. I'm pretty sure it should be 'nifti'. >>>>>>> However, I tried re-running `ft_volumesegment` after manually >>>>>>> changing that value, and the figure looks the same. >>>>>>> >>>>>>> Any help would be most appreciated! Thanks - >>>>>>> >>>>>>> Elli >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>>>> >>>>>>>> Hi Elli, >>>>>>>> >>>>>>>>> Hello Dr. Schoffelen - >>>>>>>>> >>>>>>>>> I sent a response to the below email, but I think it got >>>>>>>>> lost in the shuffle. I tried what you suggested, and I got >>>>>>>>> the image attached below (matlab figure). >>>>>>>>> >>>>>>>>> Two questions: (1) What could be the cause of this poor >>>>>>>>> alignment? This isn't right/left flipping, as the nose also >>>>>>>>> looks to be in the back. (2) Do you have any idea why the >>>>>>>>> reconstruction of the MRI looks so poor? FreeSurfer >>>>>>>>> reconstructions looked much "healthier". >>>>>>>> >>>>>>>> To combine both questions into 1 answer, I wouldn't say that >>>>>>>> the alignment is bad, it's the segmentation that seems to be >>>>>>>> completely off. This usually happens, when FieldTrip assigns >>>>>>>> the wrong coordinate system to the MRI. For the segmentation >>>>>>>> to work, SPM needs an approximate coregistration of the MRI >>>>>>>> in MNI-space. FieldTrip tries to achieve this, and needs the >>>>>>>> tag mri.coordsys for this. This tag is usually set after a >>>>>>>> pass through ft_volumerealign, where you can specify a >>>>>>>> cfg.coordsys (I just noticed this as an undocumented option: >>>>>>>> perhaps that needs to change). By default, this tag is set to >>>>>>>> 'ctf', see >>>>>>>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined for a definition of the coordinate systems. If the coordinate system in which the sensors are defined differs from the ctf coordinate system, causing a bad initial alignmnent prior to the segmentation and a worthless >>>>>>>> segmentation. >>>>>>>> >>>>>>>>> You mentioned below that I could simply load the up >>>>>>>>> freesurfer files and go from there. All the *.mgz files I've >>>>>>>>> found from freesurfer processing are simply volumetric MRI >>>>>>>>> files. The surface files are stored in a variety of formats >>>>>>>>> with seemingly no file extension. Is there a way to load >>>>>>>>> FreeSurfer surfaces, or should I be using >>>>>>>>> `ft_prepare_headmodel` to do that? >>>>>>>> >>>>>>>> The ft_read_headshape function should be able to read >>>>>>>> freesurfer triangle and quadrangle files. Use it as >>>>>>>> ft_read_headshape(filename, 'fileformat', >>>>>>>> 'freesurfer-triangle_binary'); >>>>>>>> >>>>>>>>> Thanks - >>>>>>>>> >>>>>>>>> Eliezer Kanal >>>>>>>> >>>>>>>> >>>>>>>> Best, >>>>>>>> >>>>>>>> Jan-Mathijs >>>>>> >>>>>> Jan-Mathijs Schoffelen, MD PhD >>>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>>> Centre for Cognitive Neuroimaging, >>>>>> Radboud University 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 >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>> >>> >>> _______________________________________________ >>> 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 >> 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 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > ---------------------------------------------------------------- This message was sent using the Web mail system for The University of Glasgow School of Psychology ------------------------------------------------------------------ From Caroline.Lustenberger at kispi.uzh.ch Thu Sep 29 09:45:01 2011 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Thu, 29 Sep 2011 09:45:01 +0200 Subject: [FieldTrip] cluster analysis (statistics) with one channels and multiple timepoints Message-ID: <8D58B6880DD231469FA0128331363CED03DB01E5@exzh1.kispi.int> Dear all How can I define neighbour-timepoints, normally all tutorials explain how to define neighbour sensors or channels, but I have only 1 channel and 185 timepoints. Thus, I want to perform cluster analysis to see whether a certain timepoint cluster is significant. Thanks for help and best wishes Caroline -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Sep 29 09:49:03 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 29 Sep 2011 09:49:03 +0200 Subject: [FieldTrip] typo in ft_sourceplot ? In-Reply-To: <20110929082943.90622sm9ihbtlw13@horde.psy.gla.ac.uk> References: <8999B9E7-3CE0-40E5-BDEA-92DB08324451@cmu.edu> <26567_1317130595_p8RDaXPA024950_794DFDD3C128EF44AC49ADC58FD0090C059826CCD7@NIHMLBX10.nih.gov> <34CF997F-5349-46B3-A9D5-3DDA6BF81D4C@cmu.edu> <26614_1317147334_p8RIFXSI010187_794DFDD3C128EF44AC49ADC58FD0090C059826CCE0@NIHMLBX10.nih.gov> <9AC10416-4F89-434E-A3BD-D20EE0E14D19@cmu.edu> <20110929082943.90622sm9ihbtlw13@horde.psy.gla.ac.uk> Message-ID: Hi Sebastien, That indeed looks like a typo. It was, however, fixed in revision 3744 (see http://code.google.com/p/fieldtrip/source/diff?spec=svn4313&r=3744&format=side&path=/trunk/ft_sourceplot.m&old_path=/trunk/ft_sourceplot.m&old=3674), on June 29, so if you update your FT version it should disappear. Best, Eelke 2011/9/29 : > Hello, > I think there is a typo in ft_sourceplot at line 205. > > cfg.funcolrolim = ft_getopt(cfg,'funcolorlim', 'auto'); > > Sorry if it's not the case or if this typo has already been corrected (I am > not sure that I'm using the exact last version, I'm using fieldtrip on > Glasgow grid). > > Sebastien > > ---------------------------------------------- > Dr. Sébastien Miellet, Lecturer > > Department of Psychology > University of Fribourg > Faucigny 2 > 1700 Fribourg > Switzerland > > tel: +41 (0)77 489 6468 > ---------------------------------------------- > > > > Quoting Kanal Eliezer : > >> Thanks for the clarification. The problem seemed to be that the function >> was ignoring the input I was providing to `cfg.coordsys`; hopefully the fix >> you described below will address that. Note that it should also recognize >> coordsys of `ras`, `als`, and whatever else can be outputted from the >> interactive alignment process. >> >> Thanks, >> Elli >> >> >> On Sep 28, 2011, at 6:15 AM, jan-mathijs schoffelen wrote: >> >>> Dear Elli, >>> >>> Your proposed fix is equivalent to swapping the first 2 columns in your >>> tmp.bnd.pnt matrix, i.e. swapping the y and x axis. To me this seems that >>> you can also alleviate this by specifying the proper cfg.coordsys prior to >>> your call to ft_volumerealign. The idea is the following: by specifying the >>> location of nasion/lpa/rpa a transformation matrix can be computed. This >>> transformation matrix will assign the X,Y, and Z axes of the coordinate >>> system. According to different conventions, the X-axis either goes anterior >>> (leading to a 'ALS'-like coordinate system, e.g. used in the CTF-systems and >>> 4D neuroimaging systems), or the X-axis goes to the right (leading to a >>> 'RAS'-like coordinate system, e.g. used in the Neuromag system). This >>> specification will have an effect on the transformation matrix only at the >>> level of ft_volumerealign. Specifying the coordinate system later on >>> (through ft_estimate_coordsys) only adds the field coordsys to the >>> mri-structure, without affecting the tran! >>> sformation matrix. Adding the coordsys-field just gives an interpretation >>> to the coordinate system (and thus to the transformation matrix). To >>> summarize, I expect that your expectation of the coordinate system in which >>> the sensors are expressed, don't coincide with the coordinate system in >>> which (according to the transformation matrix in combination with the >>> coordsys) the MRI is expressed. See for the different coordinate systems >>> definitions: >>> >>> >>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>> >>> For your call to ft_volumerealign you need to specify cfg.coordsys = 'one >>> of the meg-systems'. At the moment this at least works for 'ctf' and 'itab' >>> as strings. These reflect the two major conventions, i.e. X-axis anterior, >>> or X-axis to the right. To de-confuse it a bit, I will add the other >>> MEG-systems also as supported strings. For the time being you can look up in >>> the table in the linked web-page which one you need. I suspect it is 'itab', >>> because the default is ctf-convention. >>> >>> Best wishes, >>> >>> Jan-Mathijs >>> >>> >>> On Sep 27, 2011, at 9:23 PM, Kanal Eliezer wrote: >>> >>>> Unfortunately, it looks like redoing the alignment didn't help. I re-ran >>>> `ft_volumerealign` in interactive, and it did add the correct field to the >>>> output structure, but the brain is still facing the wrong way. >>>> >>>> Is it possible that FieldTrip is ignoring this field when plotting? The >>>> plotting functions are pretty complex, and are even more obfuscated than >>>> usual due to all the transforms used in aligning everything, so I don't want >>>> to try to troubleshoot this one myself since I'd almost certainly find the >>>> wrong thing. >>>> >>>> In the end, I fixed the problem by simply taking vol.bnd.pnt and >>>> vol.bnd.tri, applying cart2sph, adding pi/2, and applying sph2cart. However, >>>> this is a workaround rather than a direct fix. Still, if anyone else has >>>> this problem, I'm attaching the code below... it seems to have worked. >>>> >>>> Elli >>>> >>>> ~~~ >>>> >>>> tmp = vol; >>>> >>>> % transform to spherical coords >>>> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >>>> = cart2sph( ... >>>>  tmp.bnd.pnt(:,1), ... >>>>  tmp.bnd.pnt(:,2), ... >>>>  tmp.bnd.pnt(:,3) ); >>>> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >>>> = cart2sph( ... >>>>  tmp.bnd.tri(:,1), ... >>>>  tmp.bnd.tri(:,2), ... >>>>  tmp.bnd.tri(:,3) ); >>>> >>>> % rotate as necessary >>>> tmp.bnd.pnt(:,1) = tmp.bnd.pnt(:,1) + pi()/2; >>>> tmp.bnd.tri(:,1) = tmp.bnd.tri(:,1) + pi()/2; >>>> >>>> % transform back to cartesian >>>> [tmp.bnd.pnt(:,1) tmp.bnd.pnt(:,2) tmp.bnd.pnt(:,3)] ... >>>> = sph2cart( ... >>>>  tmp.bnd.pnt(:,1), ... >>>>  tmp.bnd.pnt(:,2), ... >>>>  tmp.bnd.pnt(:,3) ); >>>> [tmp.bnd.tri(:,1) tmp.bnd.tri(:,2) tmp.bnd.tri(:,3)] ... >>>> = cart2sph( ... >>>>  tmp.bnd.tri(:,1), ... >>>>  tmp.bnd.tri(:,2), ... >>>>  tmp.bnd.tri(:,3) ); >>>> >>>> vol = tmp; >>>> >>>> >>>> >>>> On Sep 27, 2011, at 2:14 PM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>>> >>>>> OK, Elli, I think you have the source of your problem - I'm glad that >>>>> helped.  To redefine the alignment, you can use ft_volumerealign in >>>>> interactive mode.  Be sure to read the instructions that come up in your >>>>> matlab workspace simultaneously with the image so that you mark your volume >>>>> as you wish (I found this a little confusing initially). As you mark your >>>>> landmarks (eg l, r, n or a,p,s) you should also see the coordinates written >>>>> out in the workspace.  This should confirm that your realignment is taking >>>>> place.  After you have done this, you can check it again with the >>>>> ft_determine_coordsys to make sure. >>>>> Beth. >>>>> >>>>> -----Original Message----- >>>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>>> Sent: Tuesday, September 27, 2011 1:41 PM >>>>> To: Email discussion list for the FieldTrip project >>>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>>> >>>>> Hello Beth - >>>>> >>>>> I actually hadn't tried using `ft_determine_coordsys` on the >>>>> `ft_prepare_headmodel` output, and it turns out that it's incorrect; it has >>>>> the anterior along the Y axis, when it should be along the Y. However, >>>>> changing it doesn't seem to do anything! I.e., using `ft_determine_coordsys` >>>>> to redefine the alignment, and then re-running `ft_plot_vol` - or even >>>>> re-running `ft_determine_coordsys` on the new structure - doesn't seem to >>>>> change anything! The field `coordsys` has been added (and now reads "ras"), >>>>> but this doesn't seem to affect anything. Is this a bug? Do I need to apply >>>>> a transformation function to make the new coordsys take effect? Thanks - >>>>> >>>>> Elli >>>>> >>>>> >>>>> On Sep 27, 2011, at 9:35 AM, Belluscio, Beth (NIH/NINDS) [E] wrote: >>>>> >>>>>> Elli- >>>>>> I had similar problems at one point.  You may already have tried this, >>>>>> but for what it's worth, here are a couple of suggestions:  you can check >>>>>> each type of volume or array with ft_determine_coordsys.  This will give you >>>>>> an image with the x,y,z coordinates superimposed so that you can check >>>>>> directly what type of coordinate system is attached to the volume. >>>>>>  Secondly, when using ft_volumerealign, interactive, make sure you are not >>>>>> incorrectly identifying right and left.  Sometimes in the conversion of >>>>>> DICOM to another system, left and right are switched. >>>>>> Hope this helps. >>>>>> Beth. >>>>>> >>>>>> >>>>>> Beth Belluscio MD-PhD >>>>>> Clinical Fellow >>>>>> Human Motor Control Section >>>>>> NINDS, NIH >>>>>> 301-402-3495 >>>>>> >>>>>> >>>>>> >>>>>> -----Original Message----- >>>>>> From: Kanal Eliezer [mailto:ekanal at cmu.edu] >>>>>> Sent: Tuesday, September 27, 2011 8:50 AM >>>>>> To: Email discussion list for the FieldTrip project >>>>>> Subject: Re: [FieldTrip] Fwd: source localization difficulties >>>>>> >>>>>> Thanks for forwarding the message to the list. >>>>>> >>>>>> Just to clarify, the reconstruction worked fine; the brain looks good. >>>>>> The problem is that it's facing the wrong way; in the, the helmet is facing >>>>>> left/back, and the brain is turned 90 degrees to the right (facing forward >>>>>> in the image). If anyone knows how to either correct it as it is or how to >>>>>> re-run the analysis to prevent it from happening I'd be most appreciative. >>>>>> If any more details are needed, please just ask! Thanks - >>>>>> >>>>>> Elli >>>>>> >>>>>> >>>>>> -------------------- >>>>>> Eliezer Kanal, Ph.D. >>>>>> Postdoctoral Fellow >>>>>> Center for the Neural Basis of Cognition >>>>>> Carnegie Mellon University >>>>>> 4400 Fifth Ave, Suite 110A >>>>>> Pittsburgh PA 15213 >>>>>> P: 412-268-4115 >>>>>> F: 412-268-5060 >>>>>> >>>>>> >>>>>> On Sep 27, 2011, at 2:51 AM, jan-mathijs schoffelen wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> Begin forwarded message: >>>>>>> >>>>>>>> From: Kanal Eliezer >>>>>>>> Date: September 26, 2011 9:45:00 PM GMT+02:00 >>>>>>>> To: jan-mathijs schoffelen >>>>>>>> Subject: Re: [FieldTrip] source localization difficulties >>>>>>>> >>>>>>>> Hello Dr Schoffelen - >>>>>>>> >>>>>>>> Thanks for the advice. The way I got this part to work was to use >>>>>>>> SPM to convert my DICOM files to NIfTI ('*.img') and use `ft_read_mri` on >>>>>>>> that file, instead of reading the DICOM files directly. Using this method, I >>>>>>>> was able to reconstruct well. >>>>>>>> >>>>>>>> However, it seems that there's another related issue. When running >>>>>>>> the >>>>>>>>        ft_plot_sens(data_preprocessed.hdr.grad); >>>>>>>>        hold on; >>>>>>>>        ft_plot_vol(vol); >>>>>>>> check, I got the attached image. Do you have any idea why it's doing >>>>>>>> that? Please let me know if I can provide any more details which could help >>>>>>>> troubleshoot. >>>>>>>> >>>>>>>> In case it's relevant, I did notice that the output structure of the >>>>>>>> `ft_volumerealign` function (run with method='interactive') contained the >>>>>>>> following field: >>>>>>>>        mri_realign.coordsys = 'ctf'; >>>>>>>> That can't be correct. I'm pretty sure it should be 'nifti'. >>>>>>>> However, I tried re-running `ft_volumesegment` after manually changing that >>>>>>>> value, and the figure looks the same. >>>>>>>> >>>>>>>> Any help would be most appreciated! Thanks - >>>>>>>> >>>>>>>> Elli >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Sep 24, 2011, at 3:09 AM, jan-mathijs schoffelen wrote: >>>>>>>> >>>>>>>>> Hi Elli, >>>>>>>>> >>>>>>>>>> Hello Dr. Schoffelen - >>>>>>>>>> >>>>>>>>>> I sent a response to the below email, but I think it got lost in >>>>>>>>>> the shuffle. I tried what you suggested, and I got the image attached below >>>>>>>>>> (matlab figure). >>>>>>>>>> >>>>>>>>>> Two questions: (1) What could be the cause of this poor alignment? >>>>>>>>>> This isn't right/left flipping, as the nose also looks to be in the back. >>>>>>>>>> (2) Do you have any idea why the reconstruction of the MRI looks so poor? >>>>>>>>>> FreeSurfer reconstructions looked much "healthier". >>>>>>>>> >>>>>>>>> To combine both questions into 1 answer, I wouldn't say that the >>>>>>>>> alignment is bad, it's the segmentation that seems to be completely off. >>>>>>>>> This usually happens, when FieldTrip assigns the wrong coordinate system to >>>>>>>>> the MRI. For the segmentation to work, SPM needs an approximate >>>>>>>>> coregistration of the MRI in MNI-space. FieldTrip tries to achieve this, and >>>>>>>>> needs the tag mri.coordsys for this. This tag is usually set after a pass >>>>>>>>> through ft_volumerealign, where you can specify a cfg.coordsys (I just >>>>>>>>> noticed this as an undocumented option: perhaps that needs to change). By >>>>>>>>> default, this tag is set to 'ctf', see >>>>>>>>> http://fieldtrip.fcdonders.nl/faq/how_are_the_different_head_and_mri_coordinate_systems_defined >>>>>>>>> for a definition of the coordinate systems. If the coordinate system in >>>>>>>>> which the sensors are defined differs from the ctf coordinate system, >>>>>>>>> causing a bad initial alignmnent prior to the segmentation and a worthless >>>>>>>>> segmentation. >>>>>>>>> >>>>>>>>>> You mentioned below that I could simply load the up freesurfer >>>>>>>>>> files and go from there. All the *.mgz files I've found from freesurfer >>>>>>>>>> processing are simply volumetric MRI files. The surface files are stored in >>>>>>>>>> a variety of formats with seemingly no file extension. Is there a way to >>>>>>>>>> load FreeSurfer surfaces, or should I be using `ft_prepare_headmodel` to do >>>>>>>>>> that? >>>>>>>>> >>>>>>>>> The ft_read_headshape function should be able to read freesurfer >>>>>>>>> triangle and quadrangle files. Use it as ft_read_headshape(filename, >>>>>>>>> 'fileformat', 'freesurfer-triangle_binary'); >>>>>>>>> >>>>>>>>>> Thanks - >>>>>>>>>> >>>>>>>>>> Eliezer Kanal >>>>>>>>> >>>>>>>>> >>>>>>>>> Best, >>>>>>>>> >>>>>>>>> Jan-Mathijs >>>>>>> >>>>>>> Jan-Mathijs Schoffelen, MD PhD >>>>>>> Donders Institute for Brain, Cognition and Behaviour, >>>>>>> Centre for Cognitive Neuroimaging, >>>>>>> Radboud University 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 >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>> >>>> >>>> _______________________________________________ >>>> 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 >>> 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 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > ---------------------------------------------------------------- >  This message was sent using the Web mail system for >  The University of Glasgow School of Psychology > ------------------------------------------------------------------ > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From Jan.Hirschmann at med.uni-duesseldorf.de Thu Sep 29 16:11:33 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Thu, 29 Sep 2011 16:11:33 +0200 Subject: [FieldTrip] reading NM data with newest filedtrip Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02F7C09F@Mail2-UKD.VMED.UKD> Hi, don't know if somebody pointed it out earlier... I changed to the newest ft version today and got the following error from ft_preprocessing when reading neuromag data. Undefined function or variable "ori". Error in channelposition (line 260) ori = ori; % second output argument Error in fixsens (line 53) [chanpos, chanori, tmp] = channelposition(sens, 'channel', 'all'); Error in ft_read_header (line 1472) hdr.grad = fixsens(hdr.grad); Error in ft_preprocessing (line 360) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 29 21:06:16 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 29 Sep 2011 21:06:16 +0200 Subject: [FieldTrip] reading NM data with newest filedtrip In-Reply-To: <72E993C35FB11743B79FF9286E5B6D8B02F7C09F@Mail2-UKD.VMED.UKD> References: <72E993C35FB11743B79FF9286E5B6D8B02F7C09F@Mail2-UKD.VMED.UKD> Message-ID: <3FAFA55E-EA71-489C-944E-42C36B4D7A40@donders.ru.nl> Dear Jan, Thanks for noticing. Apologies for this. It's my fault. I fixed it now. Best wishes, Jan-Mathijs On Sep 29, 2011, at 4:11 PM, wrote: > Hi, > > don’t know if somebody pointed it out earlier… I changed to the newest ft version today and got the following error from ft_preprocessing when reading neuromag data. > > Undefined function or variable "ori". > > Error in channelposition (line 260) > ori = ori; % second output argument > > Error in fixsens (line 53) > [chanpos, chanori, tmp] = channelposition(sens, 'channel', 'all'); > > Error in ft_read_header (line 1472) > hdr.grad = fixsens(hdr.grad); > > Error in ft_preprocessing (line 360) > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Best, > jan > > Jan Hirschmann > MSc. Neuroscience > Insititute of Clinical Neuroscience and Medical Psychology > Heinrich Heine University Duesseldorf > Universitaetsstr. 1 > 40225 Duesseldorf > Tel: 0049 - (0)211 - 81 - 18415 > > _______________________________________________ > 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From BelluscB at ninds.nih.gov Thu Sep 29 22:54:55 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Thu, 29 Sep 2011 16:54:55 -0400 Subject: [FieldTrip] beamforming tutorial, error using ft_freqanalysis to create CSD matrix Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CD01@NIHMLBX10.nih.gov> Hi group- When I follow the instructions of the tutorial for localizing oscillatory sources using beamforming, I run into a problem calculating the cross spectral density matrix. The tutorial does not indicate specifying the taper, and therefore ft_freqanalysis defaults to dpss. Then I get an error message as below. I confess ignorance that I do not understand what the code means when it says "ensure that the input arguments are double precision" so I don't know if my data structure conforms to this requirement. My data are time segments of 100 msec in length (each for pre and post) sampled at 1200 Hz, with 73 trials. Here are the commands I used and the error I got: cfg = []; cfg.method = 'mtmfft'; cfg.output = 'powandcsd'; cfg.tapsmofrq = 4; cfg.foilim = [20 20]; test = ft_freqanalysis(cfg, dataCB24_03_stim1_Pre) the input is raw data with 273 channels and 73 trials processing trials ??? Undefined function or method 'dpss' for input arguments of type 'double'. Error in ==> ft_specest_mtmfft>double_dpss at 171 tap = dpss(double(a), double(b), varargin{:}); Error in ==> ft_specest_mtmfft at 87 tap = double_dpss(ndatsample,ndatsample*(tapsmofrq./fsample))'; Error in ==> ft_freqanalysis at 492 [spectrum,ntaper,foi] = ft_specest_mtmfft(dat, time, 'taper', cfg.taper, options{:}, 'feedback', fbopt); This is specific to the dpss taper (obviously) and when I specify cfg.taper = 'hanning' the function runs fine. I can create the CSD matrix this way, but I'd like to understand why dpss isn't working and what the requirement for double precision means. Thanks for your help, Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.piantoni at nin.knaw.nl Fri Sep 30 09:46:01 2011 From: g.piantoni at nin.knaw.nl (Gio Piantoni) Date: Fri, 30 Sep 2011 09:46:01 +0200 Subject: [FieldTrip] beamforming tutorial, error using ft_freqanalysis to create CSD matrix In-Reply-To: <794DFDD3C128EF44AC49ADC58FD0090C059826CD01@NIHMLBX10.nih.gov> References: <794DFDD3C128EF44AC49ADC58FD0090C059826CD01@NIHMLBX10.nih.gov> Message-ID: Hi Beth, dpss is a function of the Signal Processing Toolbox of Matlab http://www.mathworks.nl/help/toolbox/signal/ref/dpss.html The Signal Processing Toolbox is a addon which requires an extra license. You can check the available toolboxes in your matlab installation by running "ver". I don't know if there are free implementations of dpss.m, otherwise you can ask your institute to buy one. Double and single precision is a way of storing numbers on the computer. http://www.mathworks.nl/help/techdoc/matlab_prog/f2-12135.html Double precision numbers have a larger range than single-precision (and use more memory). Some functions of Matlab, at least in earlier versions, were unstable with single precision values, that's why it's better if you store and work with your data as 'double'. Note that the function 'double_dpss' converts the data into 'double' before passing it to 'dpss.m' anyway. You can check if your data is single or double, by doing: class(data.trial{1}) HTH, Gio On Thu, Sep 29, 2011 at 22:54, Belluscio, Beth (NIH/NINDS) [E] wrote: > Hi group- > >   When I follow the instructions of the tutorial for localizing oscillatory > sources using beamforming, I run into a problem calculating the cross > spectral density matrix.  The tutorial does not indicate specifying the > taper, and therefore ft_freqanalysis defaults to dpss.  Then I get an error > message as below.  I confess ignorance that I do not understand what the > code means when it says “ensure that the input arguments are double > precision” so I don’t know if my data structure conforms to this > requirement.  My data are time segments of 100 msec in length (each for pre > and post) sampled at 1200 Hz, with 73 trials.  Here are the commands I used > and the error I got: > > > > cfg = []; > > cfg.method = 'mtmfft'; > > cfg.output = 'powandcsd'; > > cfg.tapsmofrq = 4; > > cfg.foilim = [20 20]; > > test = ft_freqanalysis(cfg, dataCB24_03_stim1_Pre) the input is raw data > with 273 channels and 73 trials processing trials ??? Undefined function or > method 'dpss' for input arguments of type 'double'. > > > > Error in ==> ft_specest_mtmfft>double_dpss at 171 tap = dpss(double(a), > double(b), varargin{:}); > > > > Error in ==> ft_specest_mtmfft at 87 > >     tap = double_dpss(ndatsample,ndatsample*(tapsmofrq./fsample))'; > > > > Error in ==> ft_freqanalysis at 492 > >         [spectrum,ntaper,foi] = ft_specest_mtmfft(dat, time, 'taper', > cfg.taper, options{:}, > >         'feedback', fbopt); > > > > This is specific to the dpss taper (obviously) and when I specify cfg.taper > = ‘hanning’ the function runs fine.  I can create the CSD matrix this way, > but I’d like to understand why dpss isn’t working and what the requirement > for double precision means. > > Thanks for your help, > > Beth. > > > > > > > > > > Beth Belluscio MD-PhD > > Clinical Fellow > > Human Motor Control Section > > NINDS, NIH > > 301-402-3495 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From Jan.Hirschmann at med.uni-duesseldorf.de Fri Sep 30 15:23:49 2011 From: Jan.Hirschmann at med.uni-duesseldorf.de (Jan.Hirschmann at med.uni-duesseldorf.de) Date: Fri, 30 Sep 2011 15:23:49 +0200 Subject: [FieldTrip] reading NM data with newest filedtrip In-Reply-To: <3FAFA55E-EA71-489C-944E-42C36B4D7A40@donders.ru.nl> References: <72E993C35FB11743B79FF9286E5B6D8B02F7C09F@Mail2-UKD.VMED.UKD> <3FAFA55E-EA71-489C-944E-42C36B4D7A40@donders.ru.nl> Message-ID: <72E993C35FB11743B79FF9286E5B6D8B02F7C1CD@Mail2-UKD.VMED.UKD> Cheers!! ________________________________ Von: fieldtrip-bounces at donders.ru.nl [mailto:fieldtrip-bounces at donders.ru.nl] Im Auftrag von jan-mathijs schoffelen Gesendet: Donnerstag, 29. September 2011 21:06 An: Email discussion list for the FieldTrip project Betreff: Re: [FieldTrip] reading NM data with newest filedtrip Dear Jan, Thanks for noticing. Apologies for this. It's my fault. I fixed it now. Best wishes, Jan-Mathijs On Sep 29, 2011, at 4:11 PM, wrote: Hi, don't know if somebody pointed it out earlier... I changed to the newest ft version today and got the following error from ft_preprocessing when reading neuromag data. Undefined function or variable "ori". Error in channelposition (line 260) ori = ori; % second output argument Error in fixsens (line 53) [chanpos, chanori, tmp] = channelposition(sens, 'channel', 'all'); Error in ft_read_header (line 1472) hdr.grad = fixsens(hdr.grad); Error in ft_preprocessing (line 360) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Best, jan Jan Hirschmann MSc. Neuroscience Insititute of Clinical Neuroscience and Medical Psychology Heinrich Heine University Duesseldorf Universitaetsstr. 1 40225 Duesseldorf Tel: 0049 - (0)211 - 81 - 18415 _______________________________________________ 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 J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From johemart at gmail.com Fri Sep 30 17:35:30 2011 From: johemart at gmail.com (=?ISO-8859-1?Q?Johann_Heinz_Mart=EDnez_Huartos?=) Date: Fri, 30 Sep 2011 17:35:30 +0200 Subject: [FieldTrip] dividing totoplot ot get channels! Message-ID: Hello dear fieldtripers Im trying to divide 148 MEG channels from ft_topoplotER( ) plot into several groups equally distributed (as much as it can) from that head plot in order to get those channel info groups to work with them in another script. I Dunno if anyone has already done that routine, and whether it is possible to send me the code or the pseudocode to do that, or instead, whether anyone can give me some recommendation about where i can start. tnks buddies Atentamente: Johann Martínez. -------------- next part -------------- An HTML attachment was scrubbed... URL: