From matsuham at NINDS.NIH.GOV Wed Jun 1 04:20:30 2005 From: matsuham at NINDS.NIH.GOV (Matsuhashi, Masao (NIH/NINDS)) Date: Tue, 31 May 2005 22:20:30 -0400 Subject: Source coherence Message-ID: Hi Robert, > I had a look at your data, and at the computations that you perfomed > for the analysis. Your frequencies of interest are 4.6 and 5Hz, and > your time windows are 10 seconds long (right?). Yes. Based on your suggestions, I did some additional analyses with precaution to: - cfg.taper='hanning' instead of the default 'dpss' - Add coherence calculation at the frequency which shouldn't have meaningful coherence - Calculate and show coherence between MEG channels and Reference channels using topoplotER - Check the topological map of power distribution for possible artifacts However, I still have the same problem. I put a new data to ftp://m50-336.azn.nl/pub/incoming/sources02_12_15.zip There are two reference signals, with frequencies of interest of 12 Hz and 15 Hz, respectively. The coherence between MEG sensors and reference signal are around 0.8 - 0.9 at 12 Hz, but below 0.35 at 15 Hz. However the coherence value of distributed source activities at 12 Hz was below 0.06, while it was above 0.1 at 15 Hz. > coherence. But I still would not be too confident about it, since the > influence of artifacts on the filter can be difficult to predict. In the case above, 12 Hz reference signal may be too close to the dominant frequency and can cause problem. However, when I calculate the coherence at 12 Hz between MEG and 15 Hz reference signal, the same thing happened again. The coherence between EMG sensors and reference signal was below 0.3 as expected, but source coherence peak was more than 0.1!? (Remember that the coherence at 12 Hz with true reference signal was no more than 0.06) Could you tell me what is going wrong, please? Thanks, Masao ------------------------------------------------ Masao Matsuhashi, MD, PhD NINDS, NIH Tel: 1-301-594-9139 E-mail: MatsuhaM at ninds.nih.gov ------------------------------------------------ From angel.nevado at YNIC.YORK.AC.UK Thu Jun 9 15:48:14 2005 From: angel.nevado at YNIC.YORK.AC.UK (Angel Nevado) Date: Thu, 9 Jun 2005 14:48:14 +0100 Subject: data2raw function Message-ID: Hello, When going through the Event Related Averaging tutorial I get the error below when executing function "meginterpolate". I cannot find the function "data2raw" within the Fieldtrip folders. Thanks and best regards, Angel >> avgFICplanar = meginterpolate(cfg, avgFIC); not repairing bad channels ??? Undefined command/function 'data2raw'. Error in ==> megrealign at 103 [data, inputdimord] = data2raw(data); From r.oostenveld at FCDONDERS.RU.NL Fri Jun 10 09:17:28 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 10 Jun 2005 09:17:28 +0200 Subject: data2raw function In-Reply-To: <42A8489E.5040402@ynic.york.ac.uk> Message-ID: Dear Angel, That function has accidentaly been left out of the daily release version. It will be included in the next one. I have also attached it to this mail (together with another function that was missing), please put the attachements in your fieldtrip/private directory. best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: raw2data.m Type: application/octet-stream Size: 2462 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: data2raw.m Type: application/octet-stream Size: 3549 bytes Desc: not available URL: -------------- next part -------------- On 9 Jun 2005, at 15:48, Angel Nevado wrote: > Hello, > > When going through the Event Related Averaging tutorial I get the > error below when executing function "meginterpolate". > I cannot find the function "data2raw" within the Fieldtrip folders. > > Thanks and best regards, > > Angel > From litvak at TECHUNIX.TECHNION.AC.IL Sun Jun 12 18:11:53 2005 From: litvak at TECHUNIX.TECHNION.AC.IL (Litvak Vladimir) Date: Sun, 12 Jun 2005 19:11:53 +0300 Subject: Realigning trials Message-ID: Dear all, We have a somatosensory paradigm where we cannot measure exactly when the subject starts feeling the stimulus. We do have triggers but there may be varying delays of tens to hundreds ms. Nevertheless, it's possible to get a kind of SEP. But I suspect it would look better if I found a way to realign the trials. I heard about Woody filter but maybe it would be better to try to align all the trials to the first or to use some kind of template. I have some ideas about how this can be implemented but if anyone already has a working Matlab code for something like this (including Woody filter) it'd save me a lot of time and efforts. Suggestions and ideas will also be appreciated. Thanks in advance, Vladimir Litvak From r.oostenveld at FCDONDERS.RU.NL Tue Jun 14 11:53:42 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 14 Jun 2005 11:53:42 +0200 Subject: Realigning trials In-Reply-To: Message-ID: Dear Vladimir, You might want to look into Wang K, Begleiter H, Porjesz B. Warp-averaging event-related potentials. Clin Neurophysiol. 2001 Oct;112(10):1917-24. and references therein. best regards, Robert On 12 Jun 2005, at 18:11, Litvak Vladimir wrote: > Dear all, > > We have a somatosensory paradigm where we cannot measure exactly > when the subject starts feeling the stimulus. We do have triggers > but there may be varying delays of tens to hundreds ms. > Nevertheless, it's possible to get a kind of SEP. But I suspect it > would look better if I found a way to realign the trials. I heard > about Woody filter but maybe it would be better to try to align all > the trials to the first or to use some kind of template. > > I have some ideas about how this can be implemented but if anyone > already has a working Matlab code for something like this > (including Woody filter) it'd save me a lot of time and efforts. > Suggestions and ideas will also be appreciated. > > Thanks in advance, > > Vladimir Litvak > > From r.oostenveld at FCDONDERS.RU.NL Tue Jun 21 12:23:36 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 21 Jun 2005 12:23:36 +0200 Subject: Fwd: Trial function Message-ID: Begin forwarded message: > From: Susanne Leiberg > Date: 21 juni 2005 12:12:10 GMT+02:00 > To: Robert Oostenveld > Subject: Trial function > > > Dear Mr. Oostenveld, > > my name is Susanne Leiberg and I'm working on the MEG center in > Tübingen. > Currently I start using Fieldtrip with the help of your tutorial > data. Unfortunately, > downloading the 'ClusRandDistrib.zip' file failed several times. > Since I'm mainly > interested in the trial function "maketrlSemCon.m" I wanted to ask > you whether it > is possible to send me this file via email. I would really much > appreciate it. > > Thanks very much in advance! > Best regards, Susanne Leiberg > > -- > > ------------------------------------------------------ > Dipl.-Psych. Susanne Leiberg > Institute of Medical Psychology and Behavioral Neurobiology > MEG-Center > Otfried-Müller-Str. 47 > 72076 Tübingen > > Phone: + 49-7071-2987716 > Fax: + 49-7071-295706 > Email: Susanne.Leiberg at med.uni-tuebingen.de > > > ======================================================= Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ From litvak at TECHUNIX.TECHNION.AC.IL Thu Jun 23 15:19:47 2005 From: litvak at TECHUNIX.TECHNION.AC.IL (Litvak Vladimir) Date: Thu, 23 Jun 2005 16:19:47 +0300 Subject: Comparing to zero In-Reply-To: Message-ID: Dear Eric (and others), What would be the best way to find clusters that are significally different from zero (or any other constant value for this matter)? I once saw in SnPM of Nichols an option to have a single input with the permutations done my toggling the sign, but there is no such option in the current version of clusterrandanalysis. Thanks, Vladimir From tomh at KURAGE.NIMH.NIH.GOV Thu Jun 23 16:18:43 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Thu, 23 Jun 2005 10:18:43 -0400 Subject: Comparing to zero In-Reply-To: Message-ID: > What would be the best way to find clusters that are significally > different from zero? One way is to to a group analysis using AFNI. I'm using that for coherences---here's a snippet. ... [source] = sourceanalysis(cfg, freq); [source] = sourcedescriptives([], source); brikname = 'blah'; [err, errmsg, info] = writesourcebrik(source, source.avg.coh, brikname); if err disp(errmsg) end I've attached writesourcebrik.m, which sets things up to write a brik in a format that is compatible with CTF datasets, although that's not really important. It uses a function called WriteBrik.m from the AFNI library, you can get that from the same website where you get AFNI. Once you have a set of datasets in BRIK format, you can do the test using 3dttest. You have to first warp all your datasets to some common space such as Talairach or MNI (AFNI is more at home with Talairach), using adwarp. Then something like 3dttest -prefix outname -base1 0 -set2 subj1+tlrc subj2+tlrc ... subN+tlrc will do the test. There's a randpermute function that does the non-parametric correction on our website, too, at kurage.nimh.nih.gov. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce -------------- next part -------------- A non-text attachment was scrubbed... Name: writesourcebrik.m Type: text/x-objcsrc Size: 1238 bytes Desc: not available URL: From tomh at KURAGE.NIMH.NIH.GOV Thu Jun 23 16:22:57 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Thu, 23 Jun 2005 10:22:57 -0400 Subject: Comparing to zero In-Reply-To: <42BAC4C3.3070900@kurage.nimh.nih.gov> Message-ID: Tom Holroyd wrote: >> What would be the best way to find clusters that are significally >> different from zero? > > > One way is to to a group analysis using AFNI. I'm using that for > coherences---here's a snippet. Just a brief followup. You can also do a within-subject analysis using AFNI by writing out each trial as a separate subbrik and doing a repeated-measures 3dANOVA or 3dttest. Then you don't need to be in Talairach space. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce From sanja at UNM.EDU Thu Jun 23 18:16:20 2005 From: sanja at UNM.EDU (Sanja Kovacevic) Date: Thu, 23 Jun 2005 10:16:20 -0600 Subject: Comparing to zero In-Reply-To: <42BAC5C1.5010902@kurage.nimh.nih.gov> Message-ID: Hi Dr. Holroyd, I have a related question to your suggestion about using afni to do the group analysis. Presumably afni is capable to read CTF .mri and .svl files, but when I open afni from a directory full of .mri files, I get a bunch of error messages like ** THD_open_ctfmri(path/filename.mri): bad version string. Have you ever encountered this problem? Our CTF mri version, according to mrihead filename.mri, is CTF_MRI_FORMAT VER 4.0. Could this be a reason for the error messages I am getting? Thank you in advance, Sanja Kovacevic Research Assistant MIND Imaging Center Albuquerque, New Mexico, USA Phone: +1 (505) 272 3327 Fax: +1 (505) 272 4056 On Thu, 23 Jun 2005 10:22:57 -0400 Tom Holroyd wrote: > Tom Holroyd wrote: >>> What would be the best way to find clusters that are >>>significally >>> different from zero? >> >> >> One way is to to a group analysis using AFNI. I'm using >>that for >> coherences---here's a snippet. > > Just a brief followup. You can also do a within-subject >analysis using AFNI by writing out each trial as a >separate subbrik and doing a repeated-measures 3dANOVA or >3dttest. Then you don't need to be in Talairach space. > > -- > Dr. Tom Holroyd > "A man of genius makes no mistakes. His errors are >volitional and > are the portals of discovery." -- James Joyce From tomh at KURAGE.NIMH.NIH.GOV Thu Jun 23 18:36:53 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Thu, 23 Jun 2005 12:36:53 -0400 Subject: Comparing to zero In-Reply-To: Message-ID: Sanja Kovacevic wrote: > I have a related question to your suggestion about using afni to do the > group analysis. Presumably afni is capable to read CTF .mri and .svl > files Yes, but see below. > but when I open afni from a directory full of .mri files, I get a > bunch of error messages like ** THD_open_ctfmri(path/filename.mri): bad > version string. Have you ever encountered this problem? Our CTF mri > version, according to mrihead filename.mri, is CTF_MRI_FORMAT VER 4.0. > Could this be a reason for the error messages I am getting? Indeed. AFNI only reads CTF_MRI_FORMAT VER 2.2 mri files at present. There hasn't been a lot of demand for AFNI to read the new .mri files, since generally we use to3d to read in the MRI data in the first place. The version 5 .svl files can be read by AFNI, though. I had actually thought that AFNI had been updated to handle the newer .mri files, too, though, but I guess not. That should probably be corrected. If you send me (by separate email) a copy of your .mri file, I can get it done. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce From tomh at KURAGE.NIMH.NIH.GOV Thu Jun 23 19:59:38 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Thu, 23 Jun 2005 13:59:38 -0400 Subject: Comparing to zero In-Reply-To: <42BAE525.4000208@kurage.nimh.nih.gov> Message-ID: > Sanja Kovacevic wrote: >> but when I open afni from a directory full of .mri files, I get a >> bunch of error messages like ** THD_open_ctfmri(path/filename.mri): >> bad version string. FYI, the MRIViewer program has an option under the File menu to convert to V2 format. Then it works. It even converts the fiducials correctly. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce From maris at NICI.RU.NL Thu Jun 23 21:28:12 2005 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 23 Jun 2005 21:28:12 +0200 Subject: Comparing to zero Message-ID: Hi Litvak (and others), > What would be the best way to find clusters that are significally > different from zero (or any other constant value for this matter)? I once > saw in SnPM of Nichols an option to have a single input with the > permutations done my toggling the sign, but there is no such option in the > current version of clusterrandanalysis. As far as I know, there is no randomization/permutation test by means of which one can test the null hypothesis that some random variable has expectation zero. The randomization tests that are implemented in clusterrandanalysis all test null hypotheses about the effect of an independent variable. Now, if you have a two-level within-subjects design, then the null hypothesis of exchangeability between these two levels (our specification of the null hypothesis of no effect) is equivalent to the following null hypothesis: the probability of the difference between the two levels is equal to the probability of minus this difference. In this case, randomly toggling the sign of the difference produces the randomization/permutation distribution. However, if you want to produce this randomization distribution using clusterrandanalysis, you have to feed it the data of both levels (and not just their difference). Eric Maris From r.oostenveld at FCDONDERS.RU.NL Fri Jun 24 09:54:22 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 24 Jun 2005 09:54:22 +0200 Subject: Comparing to zero In-Reply-To: <003a01c57829$b91fabe0$6401a8c0@fcdc195> Message-ID: Hi Eric and others, The test that Vladimir refers to does not test the hypothesis of the expected value of the mean being zero, but it tests the null hypothesis of exchangeability of the sign of the data. If it is very improbable (say p<0.05) that the sign can be exchanged, you would accept the alternative hypothesis which states that the random distribution of your data is not symmetric with respect to zero. That is already very close to what Vladimir is interested in. However, not only a shift in the mean of the random distribution would violate the null hypothesis, but also any other asymmetry with respect to zero. Therefore it is not possible to immediately translate the alternative hypothesis (as I phrased it above) into a statement about the mean (which is what Vladimir wants). What you could do, after finding with the randomization test that the distribution is not symemtric around zero, is 1) assume that that assymetry is caused by a shift in the mean and not test it (which seems fair enough to me in quite some cases, e.g. when you know that the random distribution is close to a normal distribution), or 2) perform a second test in which you test whether the distribution of the random variable is symmetric around its estimated mean (i.e. repeat the same test as done before, after subtracting the mean of the random variable). I think that that would be relatively simple to implement in FieldTrip. Robert >> What would be the best way to find clusters that are significally >> different from zero (or any other constant value for this matter)? >> I once >> saw in SnPM of Nichols an option to have a single input with the >> permutations done my toggling the sign, but there is no such >> option in the >> current version of clusterrandanalysis > > As far as I know, there is no randomization/permutation test by > means of which > one can test the null hypothesis that some random variable has > expectation zero. From maris at NICI.RU.NL Fri Jun 24 11:08:11 2005 From: maris at NICI.RU.NL (Eric Maris) Date: Fri, 24 Jun 2005 11:08:11 +0200 Subject: Comparing to zero Message-ID: Hi Fieldtrippers, Some comments to Robert's contribution: > The test that Vladimir refers to does not test the hypothesis of the > expected value of the mean being zero, but it tests the null hypothesis > of exchangeability of the sign of the data. If it is very improbable (say > p<0.05) that the sign can be exchanged, you would accept the alternative > hypothesis which states that the random distribution of your data is not > symmetric with respect to zero. That is already very close to what > Vladimir is interested in. Sounds good. What you propose is a randomization test for symmetry around zero. This null hypothesis implies the hypothesis of interest (expectation equal to 0) but unfortunately not the other way around, as Robert also notes. However, by proper choice of your test statistic one can try to make it insensitive to other deviations from the null hypothesis (symmetry around 0) than a nonzero expectation. A terminological remark: exchangeability refers to an array and not to a single element, such as the sign of the data. What Robert means is usually denoted as "the sign has a Bernoulli distribution with probability 0.5". This ("the sign etc.") is a property of random variable that is symmetric around zero. > What you could do, after finding with the randomization test that the > distribution is not symemtric around zero, is > 1) assume that that assymetry is caused by a shift in the mean and not > test it (which seems fair enough to me in quite some cases, e.g. when you > know that the random distribution is close to a normal distribution), or > 2) perform a second test in which you test whether the distribution of > the random variable is symmetric around its estimated mean (i.e. repeat > the same test as done before, after subtracting the mean of the random > variable). This second test has much intuitive appeal, but it still has to be shown that it controls the false alarm rate. The null hypothesis of interest is the following: the distribution is symmetric around an unknown expectation X. Because X is unknown, one may consider replacing it by its sample mean, as Robert proposes, but trick may spoil your false alarm rate control. Eric Maris From tnt at PHYSIOL.OX.AC.UK Sat Jun 25 17:13:06 2005 From: tnt at PHYSIOL.OX.AC.UK (Thomas Thesen) Date: Sat, 25 Jun 2005 17:13:06 +0200 Subject: custom topography for topoplotER Message-ID: Hi Robert, Eric & Others, I am trying to use TOPOPLOTER to make topographic plots of averaged waveforms with interpolation between electrode positions. However, it seems that TOPOPLOTER uses a 2-D circular view of the head (with nose & ears) as a a default plotting background structure. My data was recorded from a 8x8 electrode grid (square and equal spacing). I made an appropriate layout file (.lay), which works well with MULTIPLOTER, but not with TOPOPLOTER. Any suggestions on how to make this work would be greatly appreciated. Cheers, Thomas From ole.jensen at FCDONDERS.RU.NL Sun Jun 26 13:40:03 2005 From: ole.jensen at FCDONDERS.RU.NL (Ole Jensen) Date: Sun, 26 Jun 2005 13:40:03 +0200 Subject: custom topography for topoplotER In-Reply-To: Message-ID: Hi Thomas, Please understand that our resources for support are limited; you can save us a lot of time by providing 1) error messages 2) the cfg settings you used 3) your *.lay file I will then do my best to resolve the problem. Bests, Ole Thomas Thesen wrote: >Hi Robert, Eric & Others, > >I am trying to use TOPOPLOTER to make topographic plots of averaged >waveforms with interpolation between electrode positions. > >However, it seems that TOPOPLOTER uses a 2-D circular view of the head (with >nose & ears) as a a default plotting background structure. My data was >recorded from a 8x8 electrode grid (square and equal spacing). I made an >appropriate layout file (.lay), which works well with MULTIPLOTER, but not >with TOPOPLOTER. > >Any suggestions on how to make this work would be greatly appreciated. > >Cheers, > >Thomas > > > -- Ole Jensen Principal Investigator F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at fcdonders.ru.nl URL : http://oase.uci.ru.nl/~olejen From tnt at PHYSIOL.OX.AC.UK Sun Jun 26 16:43:41 2005 From: tnt at PHYSIOL.OX.AC.UK (Thomas Thesen) Date: Sun, 26 Jun 2005 16:43:41 +0200 Subject: custom topography for topoplotER Message-ID: Dear Ole & others, Thanks a lot for your time in helping to figure out this problem. I greatly appreciate it. I have put an example data file (avg_ft_TT_S106Cond1.mat), the layout file (iEEG_64.lay) and an image of the output figure of TOPOPLOTER (topoplotER_iEEG_64.jpg) and MULTIPLOTER (multiplotER_iEEG_64.jpg on the web: http://www.physiol.ox.ac.uk/~tnt/fieldtrip/ I ran the following: >> load avg_ft_TT_S106Cond1.mat >> avg_ft_TT_S106Cond1 avg_ft_TT_S106Cond1 = cfg: [1x1 struct] avg: [64x2500 double] var: [64x2500 double] fsample: 1000 numsamples: [70x1 double] time: [1x2500 double] dofvec: [1x2500 double] label: {64x1 cell} trial: [70x64x2500 double] dimord: 'trial_chan_time' >> >> cfg=[]; >> cfg.xlim = [0.5 1]; >> figure; >> cfg.layout='iEEG_64.lay'; >> topoplotER(cfg, avg_ft_TT_S106Cond1); reading layout from file iEEG_64.lay selected 64 channels for plotting >> As you can see there is no error message but the topopgraphy is mapped onto a circular headshape with ears and nose (see topoplotER_iEEG_64.jpg). The actual data is recorded from an intra-cranial EEG electrode grid implant on the superior temporal sulcus and has the following channel arrangement: 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 (The numbers correspond to the channels/sensors in avg_ft_TT_S106Cond1.avg) Ideally, I would like to plot the topography on a 8x8 square (equal spacing) instead of a round scalp. The layout file seems to be correct. If MULTIPLOTER is used with the cfg configs: >> cfg.layout='iEEG_64.lay'; >> figure; >> cfg.xlim = [0.5 1]; >> cfg.axes = 'no'; >> cfg.showlabels ='yes'; >> multiplotER(cfg, avg_ft_TT_S106Cond1); reading layout from file iEEG_64.lay it produces a figure as in multiplotER_iEEG_64.jpg, and has the correct sensor arrnagements. cheers, Thomas On Sun, 26 Jun 2005 13:40:03 +0200, Ole Jensen wrote: >Hi Thomas, >Please understand that our resources for support are limited; you can >save us a lot of time by providing >1) error messages >2) the cfg settings you used >3) your *.lay file >I will then do my best to resolve the problem. >Bests, > >Ole > > >Thomas Thesen wrote: > >>Hi Robert, Eric & Others, >> >>I am trying to use TOPOPLOTER to make topographic plots of averaged >>waveforms with interpolation between electrode positions. >> >>However, it seems that TOPOPLOTER uses a 2-D circular view of the head (with >>nose & ears) as a a default plotting background structure. My data was >>recorded from a 8x8 electrode grid (square and equal spacing). I made an >>appropriate layout file (.lay), which works well with MULTIPLOTER, but not >>with TOPOPLOTER. >> >>Any suggestions on how to make this work would be greatly appreciated. >> >>Cheers, >> >>Thomas >> >> >> > > >-- >Ole Jensen >Principal Investigator >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Office : +31 24 36 10884 >MEG lab : +31 24 36 10988 > >Fax : +31 24 36 10989 > >e-mail : ole.jensen at fcdonders.ru.nl >URL : http://oase.uci.ru.nl/~olejen From ole.jensen at FCDONDERS.RU.NL Sun Jun 26 17:14:54 2005 From: ole.jensen at FCDONDERS.RU.NL (Ole Jensen) Date: Sun, 26 Jun 2005 17:14:54 +0200 Subject: custom topography for topoplotER In-Reply-To: Message-ID: Hi Thomas, Thanks for the info. I now understand from your figures that your want to plot the topography of intracranial EEG data and thats why you do not want the head drawn. If you try cfg.showlabels = 'yes' you will probably find that the sensors are correctly placed. In order to suppress the drawing of the head I suggest you modify private/topoplot.m (which is used by topoplotER.m). The last part of this function draws the head. If you make it general with an option (e.g. cfg.headplot = 'yes'/'no') in topoplot.m we can include it in the toolbox with the documentation in topoplotER.m and topoplotTFR.m (its probably easier if we update topoplotER/topoplotTFR here). I hope this helps you along! Bests, Ole Thomas Thesen wrote: >Dear Ole & others, > >Thanks a lot for your time in helping to figure out this problem. I greatly >appreciate it. > >I have put an example data file (avg_ft_TT_S106Cond1.mat), the layout file >(iEEG_64.lay) and an image of the output figure of TOPOPLOTER >(topoplotER_iEEG_64.jpg) and MULTIPLOTER (multiplotER_iEEG_64.jpg on the web: > >http://www.physiol.ox.ac.uk/~tnt/fieldtrip/ > >I ran the following: > > > >>>load avg_ft_TT_S106Cond1.mat >>> >>> > > > >>>avg_ft_TT_S106Cond1 >>> >>> > >avg_ft_TT_S106Cond1 = > > cfg: [1x1 struct] > avg: [64x2500 double] > var: [64x2500 double] > fsample: 1000 > numsamples: [70x1 double] > time: [1x2500 double] > dofvec: [1x2500 double] > label: {64x1 cell} > trial: [70x64x2500 double] > dimord: 'trial_chan_time' > > > >>>cfg=[]; >>>cfg.xlim = [0.5 1]; >>>figure; >>>cfg.layout='iEEG_64.lay'; >>>topoplotER(cfg, avg_ft_TT_S106Cond1); >>> >>> >reading layout from file iEEG_64.lay >selected 64 channels for plotting > > > >As you can see there is no error message but the topopgraphy is mapped onto >a circular headshape with ears and nose (see topoplotER_iEEG_64.jpg). > >The actual data is recorded from an intra-cranial EEG electrode grid implant >on the superior temporal sulcus and has the following channel arrangement: > >64 63 62 61 60 59 58 57 >56 55 54 53 52 51 50 49 >48 47 46 45 44 43 42 41 >40 39 38 37 36 35 34 33 >32 31 30 29 28 27 26 25 >24 23 22 21 20 19 18 17 >16 15 14 13 12 11 10 9 >8 7 6 5 4 3 2 1 > >(The numbers correspond to the channels/sensors in avg_ft_TT_S106Cond1.avg) > >Ideally, I would like to plot the topography on a 8x8 square (equal spacing) >instead of a round scalp. The layout file seems to be correct. If >MULTIPLOTER is used with the cfg configs: > > > >>>cfg.layout='iEEG_64.lay'; >>>figure; >>>cfg.xlim = [0.5 1]; >>>cfg.axes = 'no'; >>>cfg.showlabels ='yes'; >>>multiplotER(cfg, avg_ft_TT_S106Cond1); >>> >>> >reading layout from file iEEG_64.lay > >it produces a figure as in multiplotER_iEEG_64.jpg, and has the correct >sensor arrnagements. > >cheers, > >Thomas > > > >On Sun, 26 Jun 2005 13:40:03 +0200, Ole Jensen >wrote: > > > >>Hi Thomas, >>Please understand that our resources for support are limited; you can >>save us a lot of time by providing >>1) error messages >>2) the cfg settings you used >>3) your *.lay file >>I will then do my best to resolve the problem. >>Bests, >> >>Ole >> >> >>Thomas Thesen wrote: >> >> >> >>>Hi Robert, Eric & Others, >>> >>>I am trying to use TOPOPLOTER to make topographic plots of averaged >>>waveforms with interpolation between electrode positions. >>> >>>However, it seems that TOPOPLOTER uses a 2-D circular view of the head (with >>>nose & ears) as a a default plotting background structure. My data was >>>recorded from a 8x8 electrode grid (square and equal spacing). I made an >>>appropriate layout file (.lay), which works well with MULTIPLOTER, but not >>>with TOPOPLOTER. >>> >>>Any suggestions on how to make this work would be greatly appreciated. >>> >>>Cheers, >>> >>>Thomas >>> >>> >>> >>> >>> >>-- >>Ole Jensen >>Principal Investigator >>F.C. Donders Centre for Cognitive Neuroimaging >>P.O. Box 9101 >>NL-6500 HB Nijmegen >>The Netherlands >> >>Office : +31 24 36 10884 >>MEG lab : +31 24 36 10988 >> >>Fax : +31 24 36 10989 >> >>e-mail : ole.jensen at fcdonders.ru.nl >>URL : http://oase.uci.ru.nl/~olejen >> >> > > > -- Ole Jensen Principal Investigator F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at fcdonders.ru.nl URL : http://oase.uci.ru.nl/~olejen From luis.patino at UNIKLINIK-FREIBURG.DE Mon Jun 27 08:47:23 2005 From: luis.patino at UNIKLINIK-FREIBURG.DE (Dr. Jose Luis Patino Vilchis) Date: Mon, 27 Jun 2005 08:47:23 +0200 Subject: Comparing to zero In-Reply-To: <42BAC4C3.3070900@kurage.nimh.nih.gov> Message-ID: We are also working with coherences. I would be interested to know more about the algorithm embedded in the function and to know how you use it to find significant coherence. Could it bepossible to have more information on this? Many Thanks Luis Patino Universitätsklinikum Freiburg Quoting Tom Holroyd : > > What would be the best way to find clusters that are significally > > different from zero? > > One way is to to a group analysis using AFNI. I'm using that for > coherences---here's a snippet. > > ... > [source] = sourceanalysis(cfg, freq); > [source] = sourcedescriptives([], source); > > brikname = 'blah'; > [err, errmsg, info] = writesourcebrik(source, source.avg.coh, brikname); > if err > disp(errmsg) > end > > I've attached writesourcebrik.m, which sets things up to write a brik in a > format that is compatible with CTF datasets, although that's not really > important. It uses a function called WriteBrik.m from the AFNI library, you > can > get that from the same website where you get AFNI. Once you have a set of > datasets in BRIK format, you can do the test using 3dttest. You have to > first > warp all your datasets to some common space such as Talairach or MNI (AFNI is > > more at home with Talairach), using adwarp. Then something like > > 3dttest -prefix outname -base1 0 -set2 subj1+tlrc subj2+tlrc ... subN+tlrc > > will do the test. There's a randpermute function that does the > non-parametric > correction on our website, too, at kurage.nimh.nih.gov. > > -- > Dr. Tom Holroyd > "A man of genius makes no mistakes. His errors are volitional and > are the portals of discovery." -- James Joyce > From litvak at TECHUNIX.TECHNION.AC.IL Mon Jun 27 09:57:07 2005 From: litvak at TECHUNIX.TECHNION.AC.IL (Litvak Vladimir) Date: Mon, 27 Jun 2005 10:57:07 +0300 Subject: Comparing to zero In-Reply-To: <002101c5789c$3f297500$5b030d0a@fcdc195> Message-ID: Dear Robert and Eric, Maybe I should explain what I really want to do and then you'll be able to suggest another solution for me. I want to compare power between two conditions A and B (dependent samples). I already tried comparing it the usual way but I want to also try comparing relative increase (A-B)/B. This way I have only one dataset that needs to be compared to zero. If I apply the same transformation to B I'll get of course just an array of zeros and it doesn't seem right to me to compare it with the normalized A. Any ideas? Maybe I should just normalize both by the average 2A/(A+B) and 2B/(A+B) and the compare? Thanks, Vladimir From rbg26471 at YAHOO.COM Mon Jun 27 15:51:28 2005 From: rbg26471 at YAHOO.COM (rathinaswamy bavanandan govindan) Date: Mon, 27 Jun 2005 06:51:28 -0700 Subject: Govindan In-Reply-To: Message-ID: Dear Litvak, I am not using Fieldtrip, but I can try to address your query. Subtracting one spectrum from other is not a correct way to compare two spectra. On the otherhand, you can consider the ratio of the two spectra. Further, in the spectral analysis, no one is interested in the power in all the frequency bands but in a specific frequency band! So, in that case you can calculate the signal to noise ratio (SNR) for both processes and compare the SNR of the two processes! You don't have to search for a complicated formula to compute SNR. Just sum up the powers in the desired frequency range and divide by the sum of powers in all the frequencies up to Nyquist frequency. In this definition care should be taken to avoid the effects due to filter. If you are using bandpass filter, say up to 80 Hz, then restrict your second summation only up to the frequency band of 80 Hz. Best regards Govindan --- Litvak Vladimir wrote: > Dear Robert and Eric, > > Maybe I should explain what I really want to do and > then you'll be able to > suggest another solution for me. > > I want to compare power between two conditions A and > B (dependent > samples). I already tried comparing it the usual way > but I want to also > try comparing relative increase (A-B)/B. This way I > have only one dataset > that needs to be compared to zero. If I apply the > same transformation to B > I'll get of course just an array of zeros and it > doesn't seem right to me > to compare it with the normalized A. > > Any ideas? Maybe I should just normalize both by the > average 2A/(A+B) and > 2B/(A+B) and the compare? > > Thanks, > > Vladimir > ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com From tomh at KURAGE.NIMH.NIH.GOV Mon Jun 27 16:44:38 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Mon, 27 Jun 2005 10:44:38 -0400 Subject: Comparing to zero In-Reply-To: <1119854843.42bfa0fb84849@webmail1.uniklinik-freiburg.de> Message-ID: Dr. Jose Luis Patino Vilchis wrote: > We are also working with coherences. I would be interested to know more about > the algorithm embedded in the function and to know how you use it to find > significant coherence. Could it bepossible to have more information on this? At the moment the best way I've found is as follows: Compute 'powandcsd' with freqanalysis(). Use the coh_refdip method of sourceanalysis(). Save the avg.coh array of the result per subject. Using AFNI, I then take the sqrt() and z-score each volume. The result is reasonably normally distributed. Warp to Talairach space. The final step is to use 3dANOVA2 with a mixed effects model, with factor A as the conditions in the experiment, and factor B as subjects. The most important step here is that the results are computed as contrasts between different conditions. Otherwise there is a huge (quarter brain) coherence blob around the reference dipole. It usually subtracts out pretty well in a contrast. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce Note: if tomh at kurage doesn't work try holroydt at mail.nih.gov. From r.oostenveld at FCDONDERS.RU.NL Mon Jun 27 17:07:00 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 27 Jun 2005 17:07:00 +0200 Subject: Comparing to zero In-Reply-To: Message-ID: On 27-jun-2005, at 9:57, Litvak Vladimir wrote: > Dear Robert and Eric, > > Maybe I should explain what I really want to do and then you'll be > able to suggest another solution for me. > > I want to compare power between two conditions A and B (dependent > samples). I already tried comparing it the usual way but I want to > also try comparing relative increase (A-B)/B. This way I have only > one dataset that needs to be compared to zero. If I apply the same > transformation to B I'll get of course just an array of zeros and > it doesn't seem right to me to compare it with the normalized A. My first reaction is: if A is different from B, then (A-B) is different from zero, and hence (A-B)/B is also different from zero (given that B is not zero). So what is the use of testing A==B separately from testing whether (A-B)==0? Do you expect your statistical sensitivity to be larger? I can think of situations where you do want to normalise the power difference by the power itself, i.e. relative change. But in those situations the normalisation is meant to remove variability between subjects prior to averaging or computing variance over subjects, which provides you with an alternative to the repeated measures test. So, in that sense, it makes sense to do either repeated measures, or normalise each subject towards a ratio, but not neccessary both. In clusterrandanalysis, the clusters are grown using a thresholded parametric statistical representation of the effect of interest. The summed parametric statistical measure over the whole cluster is subjected to the randomization procedure (testing the hypothesis of exchangeability), which results in a non-parametric test. I am not aware of a parametric statistical measure for which it would be possible to define a meaningfull threshold for the clustering based on the ratio (A-B)/B. It could be done however using a randomization test that is not based on clusters. Robert From litvak at TECHUNIX.TECHNION.AC.IL Mon Jun 27 17:25:35 2005 From: litvak at TECHUNIX.TECHNION.AC.IL (Litvak Vladimir) Date: Mon, 27 Jun 2005 18:25:35 +0300 Subject: Comparing to zero In-Reply-To: <35CC818F-CCF0-401B-8A1C-6ADCFFE3BC9E@fcdonders.ru.nl> Message-ID: > My first reaction is: if A is different from B, then (A-B) is different from > zero, and hence (A-B)/B is also different from zero (given that B is not > zero). So what is the use of testing A==B separately from testing whether > (A-B)==0? Do you expect your statistical sensitivity to be larger? The point is I do the normalization for each subject separately. So I get % change for each subject and not absolute values that can be very different between individuals. I didn't think it violates any of the assumptions of clusterrandanalysis but if it does I'll probably have to look for other ways. > > In clusterrandanalysis, the clusters are grown using a thresholded parametric > statistical representation of the effect of interest. The summed parametric > statistical measure over the whole cluster is subjected to the randomization > procedure (testing the hypothesis of exchangeability), which results in a > non-parametric test. I am not aware of a parametric statistical measure for > which it would be possible to define a meaningfull threshold for the > clustering based on the ratio (A-B)/B. It could be done however using a > randomization test that is not based on clusters. I don't understand why this normalized data is different from raw data. You can define the distribution under the null hypothesis using permutations and proceed from there. If there is something basic I don't understand please explain it to me because it's important to know the limitations of the method. Thanks, Vladimir From maris at NICI.RU.NL Mon Jun 27 22:19:19 2005 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 27 Jun 2005 22:19:19 +0200 Subject: Comparing to zero Message-ID: Hi Litvak, >> My first reaction is: if A is different from B, then (A-B) is different >> from zero, and hence (A-B)/B is also different from zero (given that B is >> not zero). So what is the use of testing A==B separately from testing >> whether (A-B)==0? Do you expect your statistical sensitivity to be >> larger? > > The point is I do the normalization for each subject separately. So I get > % change for each subject and not absolute values that can be very > different between individuals. I didn't think it violates any of the > assumptions of clusterrandanalysis but if it does I'll probably have to > look for other ways. If I understand you correctly, then A and B denote baseline-normalized power (i.e. percent increase/decrease relative to baseline). In that case, pass the data structures containing (in the powspctrm-field) A and B in the argument of clusterrandanalysis and perform a dependent samples T-test. This does not violate any of the assumptions of randomization statistics. It is equivalent to a test of symmetry-around-zero of the difference variable (A-B) (see this thread some steps ago). >> >> In clusterrandanalysis, the clusters are grown using a thresholded >> parametric statistical representation of the effect of interest. The >> summed parametric statistical measure over the whole cluster is subjected >> to the randomization procedure (testing the hypothesis of >> exchangeability), which results in a non-parametric test. I am not aware >> of a parametric statistical measure for which it would be possible to >> define a meaningfull threshold for the clustering based on the ratio >> (A-B)/B. It could be done however using a randomization test that is not >> based on clusters. > > > I don't understand why this normalized data is different from raw data. > You can define the distribution under the null hypothesis using > permutations and proceed from there. If there is something basic I don't > understand please explain it to me because it's important to know the > limitations of the method. No, there is nothing basic that you miss. Robert's point is that the calculation of the cluster-level statistics is based on a thresholding that has a parametric rationale. However, this does not make clusterrandanalysis a parametric test. In fact, if one would threshold according to a different rationale (e.g., by asking your girlfriend which number she likes most ;-), then clusterrandanalysis would still control the false alarm rate. Anyhow, I think this discussion is too long for the small problem you have (at least, if I understand you correctly): 1. I think you want to test whether the baseline-normalized powers A and B are different. Performing this test with clusterrandanalysis is straightforward 2. You say that you want to test whether (A-B)/B is different from zero. As Robert points out, this is equivalent to the hypothesis that A and B are equal. This brings us back to 1. 3. At the end of his last email, Robert mentions something about the parametric rationale of the thresholding that is performed in clusterrandanalysis. This remark is given under the assumption that you really want to perform calculations on (A-B)/B, because then clusterrandanalysis (in its current implementation) cannot help you. However, because your question is whether A and B are different (at least, that's how I see it), you should not worry about this. greetings, Eric Maris From barbara.haendel at UNI-TUEBINGEN.DE Thu Jun 30 15:56:01 2005 From: barbara.haendel at UNI-TUEBINGEN.DE (Barbara H=?ISO-8859-1?Q?=E4ndel?=) Date: Thu, 30 Jun 2005 15:56:01 +0200 Subject: definetrial in CTF-file Message-ID: Hi anyone, I just started today to use fieldtrip with ctf.data but already have a Problem I don't seem to be able to solve myself. So if anyone has some advice I would be very thankful. I tried to execute preprocessing.m however when I define my relevant trials using cfg.trialdef.includeTrigger=['6']; I get the error message that no trials are beeing defined. Now, looking into the code of definetrial.m in line 407 the variable “triggerchan” is defined by triggerChan = read_ctf_trigger(cfg.dataset); The problem is that it seems like that only the “backpanel” is extracted from read_ctf_trigger however I would need the “frontpanel”. So definetrial.m later on only finds “triggerchan” with loads of zeros and can not match my defined trigger. Is there any reason why only one variable is taken instead of two (as it is done at line 455 in definetrial.m)? Thankful for any suggestion, Barbara From Jan.Schoffelen at FCDONDERS.RU.NL Thu Jun 30 16:45:43 2005 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Thu, 30 Jun 2005 16:45:43 +0200 Subject: definetrial in CTF-file In-Reply-To: Message-ID: Dear Barbara, Please have a close look at the documentation of definetrial, by typing help definetrial. I think it is quite clearly documented: >>From about line 28 it reads: % Simple trial definitions (e.g. based on a trigger alone) are supported by % DEFINETRIAL itself. For this, the general and dataformat-independent way % of handling trials is by relying on the READ_FCDC_EVENT function to % collect all event information (such as triggers) from your dataset and % select trials based on those events. This is implemented in DEFINETRIAL as % cfg.trialdef.eventtype = 'string' % cfg.trialdef.eventvalue = number, string or list with numbers or strings % cfg.trialdef.prestim = 0.300 latency in seconds (optional) % cfg.trialdef.poststim = 0.700 latency in seconds (optional) So, this is the most up-to-date implementation of the function, You have to specify your cfg.trialdef.eventtype as 'frontpanel trigger'. In this case it selects the triggers from the frontpanel. Then just take cfg.trialdef.eventvalue = [6] (no ''!). What remains is the optional time-window with respect to your relevant trigger. This is not necessary if you have a trial-based collection, as far as I know. The includeTrigger-field is also usable, but it is only left in for backward-compatibility. Hope this helps, Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Barbara H ändel Sent: Thursday, June 30, 2005 3:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] definetrial in CTF-file Hi anyone, I just started today to use fieldtrip with ctf.data but already have a Problem I don't seem to be able to solve myself. So if anyone has some advice I would be very thankful. I tried to execute preprocessing.m however when I define my relevant trials using cfg.trialdef.includeTrigger=['6']; I get the error message that no trials are beeing defined. Now, looking into the code of definetrial.m in line 407 the variable “triggerchan” is defined by triggerChan = read_ctf_trigger(cfg.dataset); The problem is that it seems like that only the “backpanel” is extracted from read_ctf_trigger however I would need the “frontpanel”. So definetrial.m later on only finds “triggerchan” with loads of zeros and can not match my defined trigger. Is there any reason why only one variable is taken instead of two (as it is done at line 455 in definetrial.m)? Thankful for any suggestion, Barbara From ole.jensen at FCDONDERS.RU.NL Thu Jun 30 17:40:30 2005 From: ole.jensen at FCDONDERS.RU.NL (Ole Jensen) Date: Thu, 30 Jun 2005 17:40:30 +0200 Subject: definetrial in CTF-file In-Reply-To: <0IIW00J50JOANV@mailserver.uci.kun.nl> Message-ID: Dear Barbara, I suggest you also have a look at the example in the appendix of the EventRelatedProcessing.pdf tutorial. There you will find an example on how to define your own trialfun.m (mytrialfun.m) - it will allow to you to inspect the events etc (e.g. the event structure/array will have the info on back/front panel, the available event/stimulus values etc). Bests, Ole J.M. Schoffelen wrote: >Dear Barbara, > >Please have a close look at the documentation of definetrial, by typing help >definetrial. I think it is quite clearly documented: > >>From about line 28 it reads: > >% Simple trial definitions (e.g. based on a trigger alone) are supported by >% DEFINETRIAL itself. For this, the general and dataformat-independent way >% of handling trials is by relying on the READ_FCDC_EVENT function to >% collect all event information (such as triggers) from your dataset and >% select trials based on those events. This is implemented in DEFINETRIAL as >% cfg.trialdef.eventtype = 'string' >% cfg.trialdef.eventvalue = number, string or list with numbers or strings >% cfg.trialdef.prestim = 0.300 latency in seconds (optional) >% cfg.trialdef.poststim = 0.700 latency in seconds (optional) > >So, this is the most up-to-date implementation of the function, >You have to specify your cfg.trialdef.eventtype as 'frontpanel trigger'. >In this case it selects the triggers from the frontpanel. >Then just take cfg.trialdef.eventvalue = [6] (no ''!). What remains is the >optional time-window with respect to your relevant trigger. This is not >necessary if you have a trial-based collection, as far as I know. > >The includeTrigger-field is also usable, but it is only left in for >backward-compatibility. > > >Hope this helps, > >Yours, > >Jan-Mathijs > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Barbara H ändel >Sent: Thursday, June 30, 2005 3:56 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: [FIELDTRIP] definetrial in CTF-file > >Hi anyone, >I just started today to use fieldtrip with ctf.data but already have a >Problem I don't seem to be able to solve myself. So if anyone has some >advice I would be very thankful. > >I tried to execute preprocessing.m however when I define my relevant trials >using > >cfg.trialdef.includeTrigger=['6']; > >I get the error message that no trials are beeing defined. > >Now, looking into the code of definetrial.m in line 407 the variable >“triggerchan” is defined by triggerChan = read_ctf_trigger(cfg.dataset); > >The problem is that it seems like that only the “backpanel” is extracted >from read_ctf_trigger however I would need the “frontpanel”. So >definetrial.m later on only finds “triggerchan” with loads of zeros and can >not match my defined trigger. > >Is there any reason why only one variable is taken instead of two (as it is >done at line 455 in definetrial.m)? > > >Thankful for any suggestion, >Barbara > > > From barbara.haendel at UNI-TUEBINGEN.DE Thu Jun 30 20:15:43 2005 From: barbara.haendel at UNI-TUEBINGEN.DE (Barbara H=?ISO-8859-1?Q?=E4ndel?=) Date: Thu, 30 Jun 2005 20:15:43 +0200 Subject: definetrial in CTF-file In-Reply-To: <42C4126E.6030103@fcdonders.ru.nl> Message-ID: Thank you for you replies, I probably was too eager to start and looking at the definetrial.m code I just saw that one can define trials by the stimulus channel so I just went for it (unfortunately ignoring the read_fcdf_event.m option). mytrialfun.m works just perfect! Cheers, Barbara Ole Jensen schrieb: > Dear Barbara, > > I suggest you also have a look at the example in the appendix of the > EventRelatedProcessing.pdf tutorial. There you will find an example on > how to define your own trialfun.m (mytrialfun.m) - it will allow to you > to inspect the events etc (e.g. the event structure/array will have the > info on back/front panel, the available event/stimulus values etc). > > Bests, > > Ole > > > > > J.M. Schoffelen wrote: > > >Dear Barbara, > > > >Please have a close look at the documentation of definetrial, by typing help > >definetrial. I think it is quite clearly documented: > > > >From about line 28 it reads: > > > >% Simple trial definitions (e.g. based on a trigger alone) are supported by > >% DEFINETRIAL itself. For this, the general and dataformat-independent way > >% of handling trials is by relying on the READ_FCDC_EVENT function to > >% collect all event information (such as triggers) from your dataset and > >% select trials based on those events. This is implemented in DEFINETRIAL as > >% cfg.trialdef.eventtype = 'string' > >% cfg.trialdef.eventvalue = number, string or list with numbers or strings > >% cfg.trialdef.prestim = 0.300 latency in seconds (optional) > >% cfg.trialdef.poststim = 0.700 latency in seconds (optional) > > > >So, this is the most up-to-date implementation of the function, > >You have to specify your cfg.trialdef.eventtype as 'frontpanel trigger'. > >In this case it selects the triggers from the frontpanel. > >Then just take cfg.trialdef.eventvalue = [6] (no ''!). What remains is the > >optional time-window with respect to your relevant trigger. This is not > >necessary if you have a trial-based collection, as far as I know. > > > >The includeTrigger-field is also usable, but it is only left in for > >backward-compatibility. > > > > > >Hope this helps, > > > >Yours, > > > >Jan-Mathijs > > > >-----Original Message----- > >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > >Of Barbara H �ndel > >Sent: Thursday, June 30, 2005 3:56 PM > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: [FIELDTRIP] definetrial in CTF-file > > > >Hi anyone, > >I just started today to use fieldtrip with ctf.data but already have a > >Problem I don't seem to be able to solve myself. So if anyone has some > >advice I would be very thankful. > > > >I tried to execute preprocessing.m however when I define my relevant trials > >using > > > >cfg.trialdef.includeTrigger=['6']; > > > >I get the error message that no trials are beeing defined. > > > >Now, looking into the code of definetrial.m in line 407 the variable > >�triggerchan� is defined by triggerChan = read_ctf_trigger(cfg.dataset); > > > >The problem is that it seems like that only the �backpanel� is extracted > >from read_ctf_trigger however I would need the �frontpanel�. So > >definetrial.m later on only finds �triggerchan� with loads of zeros and can > >not match my defined trigger. > > > >Is there any reason why only one variable is taken instead of two (as it is > >done at line 455 in definetrial.m)? > > > > > >Thankful for any suggestion, > >Barbara > > > > > > > -- --------------------------- Barbara H�ndel Kognitive Neurologie Universit�tsklinikum T�bingen Hoppe-Seyler-Str. 3 D72076 Tuebingen Tel. +49(0)7071-29 82060 Fax +49(0)7071-29 5326 From matsuham at NINDS.NIH.GOV Wed Jun 1 04:20:30 2005 From: matsuham at NINDS.NIH.GOV (Matsuhashi, Masao (NIH/NINDS)) Date: Tue, 31 May 2005 22:20:30 -0400 Subject: Source coherence Message-ID: Hi Robert, > I had a look at your data, and at the computations that you perfomed > for the analysis. Your frequencies of interest are 4.6 and 5Hz, and > your time windows are 10 seconds long (right?). Yes. Based on your suggestions, I did some additional analyses with precaution to: - cfg.taper='hanning' instead of the default 'dpss' - Add coherence calculation at the frequency which shouldn't have meaningful coherence - Calculate and show coherence between MEG channels and Reference channels using topoplotER - Check the topological map of power distribution for possible artifacts However, I still have the same problem. I put a new data to ftp://m50-336.azn.nl/pub/incoming/sources02_12_15.zip There are two reference signals, with frequencies of interest of 12 Hz and 15 Hz, respectively. The coherence between MEG sensors and reference signal are around 0.8 - 0.9 at 12 Hz, but below 0.35 at 15 Hz. However the coherence value of distributed source activities at 12 Hz was below 0.06, while it was above 0.1 at 15 Hz. > coherence. But I still would not be too confident about it, since the > influence of artifacts on the filter can be difficult to predict. In the case above, 12 Hz reference signal may be too close to the dominant frequency and can cause problem. However, when I calculate the coherence at 12 Hz between MEG and 15 Hz reference signal, the same thing happened again. The coherence between EMG sensors and reference signal was below 0.3 as expected, but source coherence peak was more than 0.1!? (Remember that the coherence at 12 Hz with true reference signal was no more than 0.06) Could you tell me what is going wrong, please? Thanks, Masao ------------------------------------------------ Masao Matsuhashi, MD, PhD NINDS, NIH Tel: 1-301-594-9139 E-mail: MatsuhaM at ninds.nih.gov ------------------------------------------------ From angel.nevado at YNIC.YORK.AC.UK Thu Jun 9 15:48:14 2005 From: angel.nevado at YNIC.YORK.AC.UK (Angel Nevado) Date: Thu, 9 Jun 2005 14:48:14 +0100 Subject: data2raw function Message-ID: Hello, When going through the Event Related Averaging tutorial I get the error below when executing function "meginterpolate". I cannot find the function "data2raw" within the Fieldtrip folders. Thanks and best regards, Angel >> avgFICplanar = meginterpolate(cfg, avgFIC); not repairing bad channels ??? Undefined command/function 'data2raw'. Error in ==> megrealign at 103 [data, inputdimord] = data2raw(data); From r.oostenveld at FCDONDERS.RU.NL Fri Jun 10 09:17:28 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 10 Jun 2005 09:17:28 +0200 Subject: data2raw function In-Reply-To: <42A8489E.5040402@ynic.york.ac.uk> Message-ID: Dear Angel, That function has accidentaly been left out of the daily release version. It will be included in the next one. I have also attached it to this mail (together with another function that was missing), please put the attachements in your fieldtrip/private directory. best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: raw2data.m Type: application/octet-stream Size: 2462 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: data2raw.m Type: application/octet-stream Size: 3549 bytes Desc: not available URL: -------------- next part -------------- On 9 Jun 2005, at 15:48, Angel Nevado wrote: > Hello, > > When going through the Event Related Averaging tutorial I get the > error below when executing function "meginterpolate". > I cannot find the function "data2raw" within the Fieldtrip folders. > > Thanks and best regards, > > Angel > From litvak at TECHUNIX.TECHNION.AC.IL Sun Jun 12 18:11:53 2005 From: litvak at TECHUNIX.TECHNION.AC.IL (Litvak Vladimir) Date: Sun, 12 Jun 2005 19:11:53 +0300 Subject: Realigning trials Message-ID: Dear all, We have a somatosensory paradigm where we cannot measure exactly when the subject starts feeling the stimulus. We do have triggers but there may be varying delays of tens to hundreds ms. Nevertheless, it's possible to get a kind of SEP. But I suspect it would look better if I found a way to realign the trials. I heard about Woody filter but maybe it would be better to try to align all the trials to the first or to use some kind of template. I have some ideas about how this can be implemented but if anyone already has a working Matlab code for something like this (including Woody filter) it'd save me a lot of time and efforts. Suggestions and ideas will also be appreciated. Thanks in advance, Vladimir Litvak From r.oostenveld at FCDONDERS.RU.NL Tue Jun 14 11:53:42 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 14 Jun 2005 11:53:42 +0200 Subject: Realigning trials In-Reply-To: Message-ID: Dear Vladimir, You might want to look into Wang K, Begleiter H, Porjesz B. Warp-averaging event-related potentials. Clin Neurophysiol. 2001 Oct;112(10):1917-24. and references therein. best regards, Robert On 12 Jun 2005, at 18:11, Litvak Vladimir wrote: > Dear all, > > We have a somatosensory paradigm where we cannot measure exactly > when the subject starts feeling the stimulus. We do have triggers > but there may be varying delays of tens to hundreds ms. > Nevertheless, it's possible to get a kind of SEP. But I suspect it > would look better if I found a way to realign the trials. I heard > about Woody filter but maybe it would be better to try to align all > the trials to the first or to use some kind of template. > > I have some ideas about how this can be implemented but if anyone > already has a working Matlab code for something like this > (including Woody filter) it'd save me a lot of time and efforts. > Suggestions and ideas will also be appreciated. > > Thanks in advance, > > Vladimir Litvak > > From r.oostenveld at FCDONDERS.RU.NL Tue Jun 21 12:23:36 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 21 Jun 2005 12:23:36 +0200 Subject: Fwd: Trial function Message-ID: Begin forwarded message: > From: Susanne Leiberg > Date: 21 juni 2005 12:12:10 GMT+02:00 > To: Robert Oostenveld > Subject: Trial function > > > Dear Mr. Oostenveld, > > my name is Susanne Leiberg and I'm working on the MEG center in > Tübingen. > Currently I start using Fieldtrip with the help of your tutorial > data. Unfortunately, > downloading the 'ClusRandDistrib.zip' file failed several times. > Since I'm mainly > interested in the trial function "maketrlSemCon.m" I wanted to ask > you whether it > is possible to send me this file via email. I would really much > appreciate it. > > Thanks very much in advance! > Best regards, Susanne Leiberg > > -- > > ------------------------------------------------------ > Dipl.-Psych. Susanne Leiberg > Institute of Medical Psychology and Behavioral Neurobiology > MEG-Center > Otfried-Müller-Str. 47 > 72076 Tübingen > > Phone: + 49-7071-2987716 > Fax: + 49-7071-295706 > Email: Susanne.Leiberg at med.uni-tuebingen.de > > > ======================================================= Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ From litvak at TECHUNIX.TECHNION.AC.IL Thu Jun 23 15:19:47 2005 From: litvak at TECHUNIX.TECHNION.AC.IL (Litvak Vladimir) Date: Thu, 23 Jun 2005 16:19:47 +0300 Subject: Comparing to zero In-Reply-To: Message-ID: Dear Eric (and others), What would be the best way to find clusters that are significally different from zero (or any other constant value for this matter)? I once saw in SnPM of Nichols an option to have a single input with the permutations done my toggling the sign, but there is no such option in the current version of clusterrandanalysis. Thanks, Vladimir From tomh at KURAGE.NIMH.NIH.GOV Thu Jun 23 16:18:43 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Thu, 23 Jun 2005 10:18:43 -0400 Subject: Comparing to zero In-Reply-To: Message-ID: > What would be the best way to find clusters that are significally > different from zero? One way is to to a group analysis using AFNI. I'm using that for coherences---here's a snippet. ... [source] = sourceanalysis(cfg, freq); [source] = sourcedescriptives([], source); brikname = 'blah'; [err, errmsg, info] = writesourcebrik(source, source.avg.coh, brikname); if err disp(errmsg) end I've attached writesourcebrik.m, which sets things up to write a brik in a format that is compatible with CTF datasets, although that's not really important. It uses a function called WriteBrik.m from the AFNI library, you can get that from the same website where you get AFNI. Once you have a set of datasets in BRIK format, you can do the test using 3dttest. You have to first warp all your datasets to some common space such as Talairach or MNI (AFNI is more at home with Talairach), using adwarp. Then something like 3dttest -prefix outname -base1 0 -set2 subj1+tlrc subj2+tlrc ... subN+tlrc will do the test. There's a randpermute function that does the non-parametric correction on our website, too, at kurage.nimh.nih.gov. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce -------------- next part -------------- A non-text attachment was scrubbed... Name: writesourcebrik.m Type: text/x-objcsrc Size: 1238 bytes Desc: not available URL: From tomh at KURAGE.NIMH.NIH.GOV Thu Jun 23 16:22:57 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Thu, 23 Jun 2005 10:22:57 -0400 Subject: Comparing to zero In-Reply-To: <42BAC4C3.3070900@kurage.nimh.nih.gov> Message-ID: Tom Holroyd wrote: >> What would be the best way to find clusters that are significally >> different from zero? > > > One way is to to a group analysis using AFNI. I'm using that for > coherences---here's a snippet. Just a brief followup. You can also do a within-subject analysis using AFNI by writing out each trial as a separate subbrik and doing a repeated-measures 3dANOVA or 3dttest. Then you don't need to be in Talairach space. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce From sanja at UNM.EDU Thu Jun 23 18:16:20 2005 From: sanja at UNM.EDU (Sanja Kovacevic) Date: Thu, 23 Jun 2005 10:16:20 -0600 Subject: Comparing to zero In-Reply-To: <42BAC5C1.5010902@kurage.nimh.nih.gov> Message-ID: Hi Dr. Holroyd, I have a related question to your suggestion about using afni to do the group analysis. Presumably afni is capable to read CTF .mri and .svl files, but when I open afni from a directory full of .mri files, I get a bunch of error messages like ** THD_open_ctfmri(path/filename.mri): bad version string. Have you ever encountered this problem? Our CTF mri version, according to mrihead filename.mri, is CTF_MRI_FORMAT VER 4.0. Could this be a reason for the error messages I am getting? Thank you in advance, Sanja Kovacevic Research Assistant MIND Imaging Center Albuquerque, New Mexico, USA Phone: +1 (505) 272 3327 Fax: +1 (505) 272 4056 On Thu, 23 Jun 2005 10:22:57 -0400 Tom Holroyd wrote: > Tom Holroyd wrote: >>> What would be the best way to find clusters that are >>>significally >>> different from zero? >> >> >> One way is to to a group analysis using AFNI. I'm using >>that for >> coherences---here's a snippet. > > Just a brief followup. You can also do a within-subject >analysis using AFNI by writing out each trial as a >separate subbrik and doing a repeated-measures 3dANOVA or >3dttest. Then you don't need to be in Talairach space. > > -- > Dr. Tom Holroyd > "A man of genius makes no mistakes. His errors are >volitional and > are the portals of discovery." -- James Joyce From tomh at KURAGE.NIMH.NIH.GOV Thu Jun 23 18:36:53 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Thu, 23 Jun 2005 12:36:53 -0400 Subject: Comparing to zero In-Reply-To: Message-ID: Sanja Kovacevic wrote: > I have a related question to your suggestion about using afni to do the > group analysis. Presumably afni is capable to read CTF .mri and .svl > files Yes, but see below. > but when I open afni from a directory full of .mri files, I get a > bunch of error messages like ** THD_open_ctfmri(path/filename.mri): bad > version string. Have you ever encountered this problem? Our CTF mri > version, according to mrihead filename.mri, is CTF_MRI_FORMAT VER 4.0. > Could this be a reason for the error messages I am getting? Indeed. AFNI only reads CTF_MRI_FORMAT VER 2.2 mri files at present. There hasn't been a lot of demand for AFNI to read the new .mri files, since generally we use to3d to read in the MRI data in the first place. The version 5 .svl files can be read by AFNI, though. I had actually thought that AFNI had been updated to handle the newer .mri files, too, though, but I guess not. That should probably be corrected. If you send me (by separate email) a copy of your .mri file, I can get it done. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce From tomh at KURAGE.NIMH.NIH.GOV Thu Jun 23 19:59:38 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Thu, 23 Jun 2005 13:59:38 -0400 Subject: Comparing to zero In-Reply-To: <42BAE525.4000208@kurage.nimh.nih.gov> Message-ID: > Sanja Kovacevic wrote: >> but when I open afni from a directory full of .mri files, I get a >> bunch of error messages like ** THD_open_ctfmri(path/filename.mri): >> bad version string. FYI, the MRIViewer program has an option under the File menu to convert to V2 format. Then it works. It even converts the fiducials correctly. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce From maris at NICI.RU.NL Thu Jun 23 21:28:12 2005 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 23 Jun 2005 21:28:12 +0200 Subject: Comparing to zero Message-ID: Hi Litvak (and others), > What would be the best way to find clusters that are significally > different from zero (or any other constant value for this matter)? I once > saw in SnPM of Nichols an option to have a single input with the > permutations done my toggling the sign, but there is no such option in the > current version of clusterrandanalysis. As far as I know, there is no randomization/permutation test by means of which one can test the null hypothesis that some random variable has expectation zero. The randomization tests that are implemented in clusterrandanalysis all test null hypotheses about the effect of an independent variable. Now, if you have a two-level within-subjects design, then the null hypothesis of exchangeability between these two levels (our specification of the null hypothesis of no effect) is equivalent to the following null hypothesis: the probability of the difference between the two levels is equal to the probability of minus this difference. In this case, randomly toggling the sign of the difference produces the randomization/permutation distribution. However, if you want to produce this randomization distribution using clusterrandanalysis, you have to feed it the data of both levels (and not just their difference). Eric Maris From r.oostenveld at FCDONDERS.RU.NL Fri Jun 24 09:54:22 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 24 Jun 2005 09:54:22 +0200 Subject: Comparing to zero In-Reply-To: <003a01c57829$b91fabe0$6401a8c0@fcdc195> Message-ID: Hi Eric and others, The test that Vladimir refers to does not test the hypothesis of the expected value of the mean being zero, but it tests the null hypothesis of exchangeability of the sign of the data. If it is very improbable (say p<0.05) that the sign can be exchanged, you would accept the alternative hypothesis which states that the random distribution of your data is not symmetric with respect to zero. That is already very close to what Vladimir is interested in. However, not only a shift in the mean of the random distribution would violate the null hypothesis, but also any other asymmetry with respect to zero. Therefore it is not possible to immediately translate the alternative hypothesis (as I phrased it above) into a statement about the mean (which is what Vladimir wants). What you could do, after finding with the randomization test that the distribution is not symemtric around zero, is 1) assume that that assymetry is caused by a shift in the mean and not test it (which seems fair enough to me in quite some cases, e.g. when you know that the random distribution is close to a normal distribution), or 2) perform a second test in which you test whether the distribution of the random variable is symmetric around its estimated mean (i.e. repeat the same test as done before, after subtracting the mean of the random variable). I think that that would be relatively simple to implement in FieldTrip. Robert >> What would be the best way to find clusters that are significally >> different from zero (or any other constant value for this matter)? >> I once >> saw in SnPM of Nichols an option to have a single input with the >> permutations done my toggling the sign, but there is no such >> option in the >> current version of clusterrandanalysis > > As far as I know, there is no randomization/permutation test by > means of which > one can test the null hypothesis that some random variable has > expectation zero. From maris at NICI.RU.NL Fri Jun 24 11:08:11 2005 From: maris at NICI.RU.NL (Eric Maris) Date: Fri, 24 Jun 2005 11:08:11 +0200 Subject: Comparing to zero Message-ID: Hi Fieldtrippers, Some comments to Robert's contribution: > The test that Vladimir refers to does not test the hypothesis of the > expected value of the mean being zero, but it tests the null hypothesis > of exchangeability of the sign of the data. If it is very improbable (say > p<0.05) that the sign can be exchanged, you would accept the alternative > hypothesis which states that the random distribution of your data is not > symmetric with respect to zero. That is already very close to what > Vladimir is interested in. Sounds good. What you propose is a randomization test for symmetry around zero. This null hypothesis implies the hypothesis of interest (expectation equal to 0) but unfortunately not the other way around, as Robert also notes. However, by proper choice of your test statistic one can try to make it insensitive to other deviations from the null hypothesis (symmetry around 0) than a nonzero expectation. A terminological remark: exchangeability refers to an array and not to a single element, such as the sign of the data. What Robert means is usually denoted as "the sign has a Bernoulli distribution with probability 0.5". This ("the sign etc.") is a property of random variable that is symmetric around zero. > What you could do, after finding with the randomization test that the > distribution is not symemtric around zero, is > 1) assume that that assymetry is caused by a shift in the mean and not > test it (which seems fair enough to me in quite some cases, e.g. when you > know that the random distribution is close to a normal distribution), or > 2) perform a second test in which you test whether the distribution of > the random variable is symmetric around its estimated mean (i.e. repeat > the same test as done before, after subtracting the mean of the random > variable). This second test has much intuitive appeal, but it still has to be shown that it controls the false alarm rate. The null hypothesis of interest is the following: the distribution is symmetric around an unknown expectation X. Because X is unknown, one may consider replacing it by its sample mean, as Robert proposes, but trick may spoil your false alarm rate control. Eric Maris From tnt at PHYSIOL.OX.AC.UK Sat Jun 25 17:13:06 2005 From: tnt at PHYSIOL.OX.AC.UK (Thomas Thesen) Date: Sat, 25 Jun 2005 17:13:06 +0200 Subject: custom topography for topoplotER Message-ID: Hi Robert, Eric & Others, I am trying to use TOPOPLOTER to make topographic plots of averaged waveforms with interpolation between electrode positions. However, it seems that TOPOPLOTER uses a 2-D circular view of the head (with nose & ears) as a a default plotting background structure. My data was recorded from a 8x8 electrode grid (square and equal spacing). I made an appropriate layout file (.lay), which works well with MULTIPLOTER, but not with TOPOPLOTER. Any suggestions on how to make this work would be greatly appreciated. Cheers, Thomas From ole.jensen at FCDONDERS.RU.NL Sun Jun 26 13:40:03 2005 From: ole.jensen at FCDONDERS.RU.NL (Ole Jensen) Date: Sun, 26 Jun 2005 13:40:03 +0200 Subject: custom topography for topoplotER In-Reply-To: Message-ID: Hi Thomas, Please understand that our resources for support are limited; you can save us a lot of time by providing 1) error messages 2) the cfg settings you used 3) your *.lay file I will then do my best to resolve the problem. Bests, Ole Thomas Thesen wrote: >Hi Robert, Eric & Others, > >I am trying to use TOPOPLOTER to make topographic plots of averaged >waveforms with interpolation between electrode positions. > >However, it seems that TOPOPLOTER uses a 2-D circular view of the head (with >nose & ears) as a a default plotting background structure. My data was >recorded from a 8x8 electrode grid (square and equal spacing). I made an >appropriate layout file (.lay), which works well with MULTIPLOTER, but not >with TOPOPLOTER. > >Any suggestions on how to make this work would be greatly appreciated. > >Cheers, > >Thomas > > > -- Ole Jensen Principal Investigator F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at fcdonders.ru.nl URL : http://oase.uci.ru.nl/~olejen From tnt at PHYSIOL.OX.AC.UK Sun Jun 26 16:43:41 2005 From: tnt at PHYSIOL.OX.AC.UK (Thomas Thesen) Date: Sun, 26 Jun 2005 16:43:41 +0200 Subject: custom topography for topoplotER Message-ID: Dear Ole & others, Thanks a lot for your time in helping to figure out this problem. I greatly appreciate it. I have put an example data file (avg_ft_TT_S106Cond1.mat), the layout file (iEEG_64.lay) and an image of the output figure of TOPOPLOTER (topoplotER_iEEG_64.jpg) and MULTIPLOTER (multiplotER_iEEG_64.jpg on the web: http://www.physiol.ox.ac.uk/~tnt/fieldtrip/ I ran the following: >> load avg_ft_TT_S106Cond1.mat >> avg_ft_TT_S106Cond1 avg_ft_TT_S106Cond1 = cfg: [1x1 struct] avg: [64x2500 double] var: [64x2500 double] fsample: 1000 numsamples: [70x1 double] time: [1x2500 double] dofvec: [1x2500 double] label: {64x1 cell} trial: [70x64x2500 double] dimord: 'trial_chan_time' >> >> cfg=[]; >> cfg.xlim = [0.5 1]; >> figure; >> cfg.layout='iEEG_64.lay'; >> topoplotER(cfg, avg_ft_TT_S106Cond1); reading layout from file iEEG_64.lay selected 64 channels for plotting >> As you can see there is no error message but the topopgraphy is mapped onto a circular headshape with ears and nose (see topoplotER_iEEG_64.jpg). The actual data is recorded from an intra-cranial EEG electrode grid implant on the superior temporal sulcus and has the following channel arrangement: 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 (The numbers correspond to the channels/sensors in avg_ft_TT_S106Cond1.avg) Ideally, I would like to plot the topography on a 8x8 square (equal spacing) instead of a round scalp. The layout file seems to be correct. If MULTIPLOTER is used with the cfg configs: >> cfg.layout='iEEG_64.lay'; >> figure; >> cfg.xlim = [0.5 1]; >> cfg.axes = 'no'; >> cfg.showlabels ='yes'; >> multiplotER(cfg, avg_ft_TT_S106Cond1); reading layout from file iEEG_64.lay it produces a figure as in multiplotER_iEEG_64.jpg, and has the correct sensor arrnagements. cheers, Thomas On Sun, 26 Jun 2005 13:40:03 +0200, Ole Jensen wrote: >Hi Thomas, >Please understand that our resources for support are limited; you can >save us a lot of time by providing >1) error messages >2) the cfg settings you used >3) your *.lay file >I will then do my best to resolve the problem. >Bests, > >Ole > > >Thomas Thesen wrote: > >>Hi Robert, Eric & Others, >> >>I am trying to use TOPOPLOTER to make topographic plots of averaged >>waveforms with interpolation between electrode positions. >> >>However, it seems that TOPOPLOTER uses a 2-D circular view of the head (with >>nose & ears) as a a default plotting background structure. My data was >>recorded from a 8x8 electrode grid (square and equal spacing). I made an >>appropriate layout file (.lay), which works well with MULTIPLOTER, but not >>with TOPOPLOTER. >> >>Any suggestions on how to make this work would be greatly appreciated. >> >>Cheers, >> >>Thomas >> >> >> > > >-- >Ole Jensen >Principal Investigator >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Office : +31 24 36 10884 >MEG lab : +31 24 36 10988 > >Fax : +31 24 36 10989 > >e-mail : ole.jensen at fcdonders.ru.nl >URL : http://oase.uci.ru.nl/~olejen From ole.jensen at FCDONDERS.RU.NL Sun Jun 26 17:14:54 2005 From: ole.jensen at FCDONDERS.RU.NL (Ole Jensen) Date: Sun, 26 Jun 2005 17:14:54 +0200 Subject: custom topography for topoplotER In-Reply-To: Message-ID: Hi Thomas, Thanks for the info. I now understand from your figures that your want to plot the topography of intracranial EEG data and thats why you do not want the head drawn. If you try cfg.showlabels = 'yes' you will probably find that the sensors are correctly placed. In order to suppress the drawing of the head I suggest you modify private/topoplot.m (which is used by topoplotER.m). The last part of this function draws the head. If you make it general with an option (e.g. cfg.headplot = 'yes'/'no') in topoplot.m we can include it in the toolbox with the documentation in topoplotER.m and topoplotTFR.m (its probably easier if we update topoplotER/topoplotTFR here). I hope this helps you along! Bests, Ole Thomas Thesen wrote: >Dear Ole & others, > >Thanks a lot for your time in helping to figure out this problem. I greatly >appreciate it. > >I have put an example data file (avg_ft_TT_S106Cond1.mat), the layout file >(iEEG_64.lay) and an image of the output figure of TOPOPLOTER >(topoplotER_iEEG_64.jpg) and MULTIPLOTER (multiplotER_iEEG_64.jpg on the web: > >http://www.physiol.ox.ac.uk/~tnt/fieldtrip/ > >I ran the following: > > > >>>load avg_ft_TT_S106Cond1.mat >>> >>> > > > >>>avg_ft_TT_S106Cond1 >>> >>> > >avg_ft_TT_S106Cond1 = > > cfg: [1x1 struct] > avg: [64x2500 double] > var: [64x2500 double] > fsample: 1000 > numsamples: [70x1 double] > time: [1x2500 double] > dofvec: [1x2500 double] > label: {64x1 cell} > trial: [70x64x2500 double] > dimord: 'trial_chan_time' > > > >>>cfg=[]; >>>cfg.xlim = [0.5 1]; >>>figure; >>>cfg.layout='iEEG_64.lay'; >>>topoplotER(cfg, avg_ft_TT_S106Cond1); >>> >>> >reading layout from file iEEG_64.lay >selected 64 channels for plotting > > > >As you can see there is no error message but the topopgraphy is mapped onto >a circular headshape with ears and nose (see topoplotER_iEEG_64.jpg). > >The actual data is recorded from an intra-cranial EEG electrode grid implant >on the superior temporal sulcus and has the following channel arrangement: > >64 63 62 61 60 59 58 57 >56 55 54 53 52 51 50 49 >48 47 46 45 44 43 42 41 >40 39 38 37 36 35 34 33 >32 31 30 29 28 27 26 25 >24 23 22 21 20 19 18 17 >16 15 14 13 12 11 10 9 >8 7 6 5 4 3 2 1 > >(The numbers correspond to the channels/sensors in avg_ft_TT_S106Cond1.avg) > >Ideally, I would like to plot the topography on a 8x8 square (equal spacing) >instead of a round scalp. The layout file seems to be correct. If >MULTIPLOTER is used with the cfg configs: > > > >>>cfg.layout='iEEG_64.lay'; >>>figure; >>>cfg.xlim = [0.5 1]; >>>cfg.axes = 'no'; >>>cfg.showlabels ='yes'; >>>multiplotER(cfg, avg_ft_TT_S106Cond1); >>> >>> >reading layout from file iEEG_64.lay > >it produces a figure as in multiplotER_iEEG_64.jpg, and has the correct >sensor arrnagements. > >cheers, > >Thomas > > > >On Sun, 26 Jun 2005 13:40:03 +0200, Ole Jensen >wrote: > > > >>Hi Thomas, >>Please understand that our resources for support are limited; you can >>save us a lot of time by providing >>1) error messages >>2) the cfg settings you used >>3) your *.lay file >>I will then do my best to resolve the problem. >>Bests, >> >>Ole >> >> >>Thomas Thesen wrote: >> >> >> >>>Hi Robert, Eric & Others, >>> >>>I am trying to use TOPOPLOTER to make topographic plots of averaged >>>waveforms with interpolation between electrode positions. >>> >>>However, it seems that TOPOPLOTER uses a 2-D circular view of the head (with >>>nose & ears) as a a default plotting background structure. My data was >>>recorded from a 8x8 electrode grid (square and equal spacing). I made an >>>appropriate layout file (.lay), which works well with MULTIPLOTER, but not >>>with TOPOPLOTER. >>> >>>Any suggestions on how to make this work would be greatly appreciated. >>> >>>Cheers, >>> >>>Thomas >>> >>> >>> >>> >>> >>-- >>Ole Jensen >>Principal Investigator >>F.C. Donders Centre for Cognitive Neuroimaging >>P.O. Box 9101 >>NL-6500 HB Nijmegen >>The Netherlands >> >>Office : +31 24 36 10884 >>MEG lab : +31 24 36 10988 >> >>Fax : +31 24 36 10989 >> >>e-mail : ole.jensen at fcdonders.ru.nl >>URL : http://oase.uci.ru.nl/~olejen >> >> > > > -- Ole Jensen Principal Investigator F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at fcdonders.ru.nl URL : http://oase.uci.ru.nl/~olejen From luis.patino at UNIKLINIK-FREIBURG.DE Mon Jun 27 08:47:23 2005 From: luis.patino at UNIKLINIK-FREIBURG.DE (Dr. Jose Luis Patino Vilchis) Date: Mon, 27 Jun 2005 08:47:23 +0200 Subject: Comparing to zero In-Reply-To: <42BAC4C3.3070900@kurage.nimh.nih.gov> Message-ID: We are also working with coherences. I would be interested to know more about the algorithm embedded in the function and to know how you use it to find significant coherence. Could it bepossible to have more information on this? Many Thanks Luis Patino Universitätsklinikum Freiburg Quoting Tom Holroyd : > > What would be the best way to find clusters that are significally > > different from zero? > > One way is to to a group analysis using AFNI. I'm using that for > coherences---here's a snippet. > > ... > [source] = sourceanalysis(cfg, freq); > [source] = sourcedescriptives([], source); > > brikname = 'blah'; > [err, errmsg, info] = writesourcebrik(source, source.avg.coh, brikname); > if err > disp(errmsg) > end > > I've attached writesourcebrik.m, which sets things up to write a brik in a > format that is compatible with CTF datasets, although that's not really > important. It uses a function called WriteBrik.m from the AFNI library, you > can > get that from the same website where you get AFNI. Once you have a set of > datasets in BRIK format, you can do the test using 3dttest. You have to > first > warp all your datasets to some common space such as Talairach or MNI (AFNI is > > more at home with Talairach), using adwarp. Then something like > > 3dttest -prefix outname -base1 0 -set2 subj1+tlrc subj2+tlrc ... subN+tlrc > > will do the test. There's a randpermute function that does the > non-parametric > correction on our website, too, at kurage.nimh.nih.gov. > > -- > Dr. Tom Holroyd > "A man of genius makes no mistakes. His errors are volitional and > are the portals of discovery." -- James Joyce > From litvak at TECHUNIX.TECHNION.AC.IL Mon Jun 27 09:57:07 2005 From: litvak at TECHUNIX.TECHNION.AC.IL (Litvak Vladimir) Date: Mon, 27 Jun 2005 10:57:07 +0300 Subject: Comparing to zero In-Reply-To: <002101c5789c$3f297500$5b030d0a@fcdc195> Message-ID: Dear Robert and Eric, Maybe I should explain what I really want to do and then you'll be able to suggest another solution for me. I want to compare power between two conditions A and B (dependent samples). I already tried comparing it the usual way but I want to also try comparing relative increase (A-B)/B. This way I have only one dataset that needs to be compared to zero. If I apply the same transformation to B I'll get of course just an array of zeros and it doesn't seem right to me to compare it with the normalized A. Any ideas? Maybe I should just normalize both by the average 2A/(A+B) and 2B/(A+B) and the compare? Thanks, Vladimir From rbg26471 at YAHOO.COM Mon Jun 27 15:51:28 2005 From: rbg26471 at YAHOO.COM (rathinaswamy bavanandan govindan) Date: Mon, 27 Jun 2005 06:51:28 -0700 Subject: Govindan In-Reply-To: Message-ID: Dear Litvak, I am not using Fieldtrip, but I can try to address your query. Subtracting one spectrum from other is not a correct way to compare two spectra. On the otherhand, you can consider the ratio of the two spectra. Further, in the spectral analysis, no one is interested in the power in all the frequency bands but in a specific frequency band! So, in that case you can calculate the signal to noise ratio (SNR) for both processes and compare the SNR of the two processes! You don't have to search for a complicated formula to compute SNR. Just sum up the powers in the desired frequency range and divide by the sum of powers in all the frequencies up to Nyquist frequency. In this definition care should be taken to avoid the effects due to filter. If you are using bandpass filter, say up to 80 Hz, then restrict your second summation only up to the frequency band of 80 Hz. Best regards Govindan --- Litvak Vladimir wrote: > Dear Robert and Eric, > > Maybe I should explain what I really want to do and > then you'll be able to > suggest another solution for me. > > I want to compare power between two conditions A and > B (dependent > samples). I already tried comparing it the usual way > but I want to also > try comparing relative increase (A-B)/B. This way I > have only one dataset > that needs to be compared to zero. If I apply the > same transformation to B > I'll get of course just an array of zeros and it > doesn't seem right to me > to compare it with the normalized A. > > Any ideas? Maybe I should just normalize both by the > average 2A/(A+B) and > 2B/(A+B) and the compare? > > Thanks, > > Vladimir > ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com From tomh at KURAGE.NIMH.NIH.GOV Mon Jun 27 16:44:38 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Mon, 27 Jun 2005 10:44:38 -0400 Subject: Comparing to zero In-Reply-To: <1119854843.42bfa0fb84849@webmail1.uniklinik-freiburg.de> Message-ID: Dr. Jose Luis Patino Vilchis wrote: > We are also working with coherences. I would be interested to know more about > the algorithm embedded in the function and to know how you use it to find > significant coherence. Could it bepossible to have more information on this? At the moment the best way I've found is as follows: Compute 'powandcsd' with freqanalysis(). Use the coh_refdip method of sourceanalysis(). Save the avg.coh array of the result per subject. Using AFNI, I then take the sqrt() and z-score each volume. The result is reasonably normally distributed. Warp to Talairach space. The final step is to use 3dANOVA2 with a mixed effects model, with factor A as the conditions in the experiment, and factor B as subjects. The most important step here is that the results are computed as contrasts between different conditions. Otherwise there is a huge (quarter brain) coherence blob around the reference dipole. It usually subtracts out pretty well in a contrast. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce Note: if tomh at kurage doesn't work try holroydt at mail.nih.gov. From r.oostenveld at FCDONDERS.RU.NL Mon Jun 27 17:07:00 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 27 Jun 2005 17:07:00 +0200 Subject: Comparing to zero In-Reply-To: Message-ID: On 27-jun-2005, at 9:57, Litvak Vladimir wrote: > Dear Robert and Eric, > > Maybe I should explain what I really want to do and then you'll be > able to suggest another solution for me. > > I want to compare power between two conditions A and B (dependent > samples). I already tried comparing it the usual way but I want to > also try comparing relative increase (A-B)/B. This way I have only > one dataset that needs to be compared to zero. If I apply the same > transformation to B I'll get of course just an array of zeros and > it doesn't seem right to me to compare it with the normalized A. My first reaction is: if A is different from B, then (A-B) is different from zero, and hence (A-B)/B is also different from zero (given that B is not zero). So what is the use of testing A==B separately from testing whether (A-B)==0? Do you expect your statistical sensitivity to be larger? I can think of situations where you do want to normalise the power difference by the power itself, i.e. relative change. But in those situations the normalisation is meant to remove variability between subjects prior to averaging or computing variance over subjects, which provides you with an alternative to the repeated measures test. So, in that sense, it makes sense to do either repeated measures, or normalise each subject towards a ratio, but not neccessary both. In clusterrandanalysis, the clusters are grown using a thresholded parametric statistical representation of the effect of interest. The summed parametric statistical measure over the whole cluster is subjected to the randomization procedure (testing the hypothesis of exchangeability), which results in a non-parametric test. I am not aware of a parametric statistical measure for which it would be possible to define a meaningfull threshold for the clustering based on the ratio (A-B)/B. It could be done however using a randomization test that is not based on clusters. Robert From litvak at TECHUNIX.TECHNION.AC.IL Mon Jun 27 17:25:35 2005 From: litvak at TECHUNIX.TECHNION.AC.IL (Litvak Vladimir) Date: Mon, 27 Jun 2005 18:25:35 +0300 Subject: Comparing to zero In-Reply-To: <35CC818F-CCF0-401B-8A1C-6ADCFFE3BC9E@fcdonders.ru.nl> Message-ID: > My first reaction is: if A is different from B, then (A-B) is different from > zero, and hence (A-B)/B is also different from zero (given that B is not > zero). So what is the use of testing A==B separately from testing whether > (A-B)==0? Do you expect your statistical sensitivity to be larger? The point is I do the normalization for each subject separately. So I get % change for each subject and not absolute values that can be very different between individuals. I didn't think it violates any of the assumptions of clusterrandanalysis but if it does I'll probably have to look for other ways. > > In clusterrandanalysis, the clusters are grown using a thresholded parametric > statistical representation of the effect of interest. The summed parametric > statistical measure over the whole cluster is subjected to the randomization > procedure (testing the hypothesis of exchangeability), which results in a > non-parametric test. I am not aware of a parametric statistical measure for > which it would be possible to define a meaningfull threshold for the > clustering based on the ratio (A-B)/B. It could be done however using a > randomization test that is not based on clusters. I don't understand why this normalized data is different from raw data. You can define the distribution under the null hypothesis using permutations and proceed from there. If there is something basic I don't understand please explain it to me because it's important to know the limitations of the method. Thanks, Vladimir From maris at NICI.RU.NL Mon Jun 27 22:19:19 2005 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 27 Jun 2005 22:19:19 +0200 Subject: Comparing to zero Message-ID: Hi Litvak, >> My first reaction is: if A is different from B, then (A-B) is different >> from zero, and hence (A-B)/B is also different from zero (given that B is >> not zero). So what is the use of testing A==B separately from testing >> whether (A-B)==0? Do you expect your statistical sensitivity to be >> larger? > > The point is I do the normalization for each subject separately. So I get > % change for each subject and not absolute values that can be very > different between individuals. I didn't think it violates any of the > assumptions of clusterrandanalysis but if it does I'll probably have to > look for other ways. If I understand you correctly, then A and B denote baseline-normalized power (i.e. percent increase/decrease relative to baseline). In that case, pass the data structures containing (in the powspctrm-field) A and B in the argument of clusterrandanalysis and perform a dependent samples T-test. This does not violate any of the assumptions of randomization statistics. It is equivalent to a test of symmetry-around-zero of the difference variable (A-B) (see this thread some steps ago). >> >> In clusterrandanalysis, the clusters are grown using a thresholded >> parametric statistical representation of the effect of interest. The >> summed parametric statistical measure over the whole cluster is subjected >> to the randomization procedure (testing the hypothesis of >> exchangeability), which results in a non-parametric test. I am not aware >> of a parametric statistical measure for which it would be possible to >> define a meaningfull threshold for the clustering based on the ratio >> (A-B)/B. It could be done however using a randomization test that is not >> based on clusters. > > > I don't understand why this normalized data is different from raw data. > You can define the distribution under the null hypothesis using > permutations and proceed from there. If there is something basic I don't > understand please explain it to me because it's important to know the > limitations of the method. No, there is nothing basic that you miss. Robert's point is that the calculation of the cluster-level statistics is based on a thresholding that has a parametric rationale. However, this does not make clusterrandanalysis a parametric test. In fact, if one would threshold according to a different rationale (e.g., by asking your girlfriend which number she likes most ;-), then clusterrandanalysis would still control the false alarm rate. Anyhow, I think this discussion is too long for the small problem you have (at least, if I understand you correctly): 1. I think you want to test whether the baseline-normalized powers A and B are different. Performing this test with clusterrandanalysis is straightforward 2. You say that you want to test whether (A-B)/B is different from zero. As Robert points out, this is equivalent to the hypothesis that A and B are equal. This brings us back to 1. 3. At the end of his last email, Robert mentions something about the parametric rationale of the thresholding that is performed in clusterrandanalysis. This remark is given under the assumption that you really want to perform calculations on (A-B)/B, because then clusterrandanalysis (in its current implementation) cannot help you. However, because your question is whether A and B are different (at least, that's how I see it), you should not worry about this. greetings, Eric Maris From barbara.haendel at UNI-TUEBINGEN.DE Thu Jun 30 15:56:01 2005 From: barbara.haendel at UNI-TUEBINGEN.DE (Barbara H=?ISO-8859-1?Q?=E4ndel?=) Date: Thu, 30 Jun 2005 15:56:01 +0200 Subject: definetrial in CTF-file Message-ID: Hi anyone, I just started today to use fieldtrip with ctf.data but already have a Problem I don't seem to be able to solve myself. So if anyone has some advice I would be very thankful. I tried to execute preprocessing.m however when I define my relevant trials using cfg.trialdef.includeTrigger=['6']; I get the error message that no trials are beeing defined. Now, looking into the code of definetrial.m in line 407 the variable “triggerchan” is defined by triggerChan = read_ctf_trigger(cfg.dataset); The problem is that it seems like that only the “backpanel” is extracted from read_ctf_trigger however I would need the “frontpanel”. So definetrial.m later on only finds “triggerchan” with loads of zeros and can not match my defined trigger. Is there any reason why only one variable is taken instead of two (as it is done at line 455 in definetrial.m)? Thankful for any suggestion, Barbara From Jan.Schoffelen at FCDONDERS.RU.NL Thu Jun 30 16:45:43 2005 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Thu, 30 Jun 2005 16:45:43 +0200 Subject: definetrial in CTF-file In-Reply-To: Message-ID: Dear Barbara, Please have a close look at the documentation of definetrial, by typing help definetrial. I think it is quite clearly documented: >>From about line 28 it reads: % Simple trial definitions (e.g. based on a trigger alone) are supported by % DEFINETRIAL itself. For this, the general and dataformat-independent way % of handling trials is by relying on the READ_FCDC_EVENT function to % collect all event information (such as triggers) from your dataset and % select trials based on those events. This is implemented in DEFINETRIAL as % cfg.trialdef.eventtype = 'string' % cfg.trialdef.eventvalue = number, string or list with numbers or strings % cfg.trialdef.prestim = 0.300 latency in seconds (optional) % cfg.trialdef.poststim = 0.700 latency in seconds (optional) So, this is the most up-to-date implementation of the function, You have to specify your cfg.trialdef.eventtype as 'frontpanel trigger'. In this case it selects the triggers from the frontpanel. Then just take cfg.trialdef.eventvalue = [6] (no ''!). What remains is the optional time-window with respect to your relevant trigger. This is not necessary if you have a trial-based collection, as far as I know. The includeTrigger-field is also usable, but it is only left in for backward-compatibility. Hope this helps, Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Barbara H ändel Sent: Thursday, June 30, 2005 3:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] definetrial in CTF-file Hi anyone, I just started today to use fieldtrip with ctf.data but already have a Problem I don't seem to be able to solve myself. So if anyone has some advice I would be very thankful. I tried to execute preprocessing.m however when I define my relevant trials using cfg.trialdef.includeTrigger=['6']; I get the error message that no trials are beeing defined. Now, looking into the code of definetrial.m in line 407 the variable “triggerchan” is defined by triggerChan = read_ctf_trigger(cfg.dataset); The problem is that it seems like that only the “backpanel” is extracted from read_ctf_trigger however I would need the “frontpanel”. So definetrial.m later on only finds “triggerchan” with loads of zeros and can not match my defined trigger. Is there any reason why only one variable is taken instead of two (as it is done at line 455 in definetrial.m)? Thankful for any suggestion, Barbara From ole.jensen at FCDONDERS.RU.NL Thu Jun 30 17:40:30 2005 From: ole.jensen at FCDONDERS.RU.NL (Ole Jensen) Date: Thu, 30 Jun 2005 17:40:30 +0200 Subject: definetrial in CTF-file In-Reply-To: <0IIW00J50JOANV@mailserver.uci.kun.nl> Message-ID: Dear Barbara, I suggest you also have a look at the example in the appendix of the EventRelatedProcessing.pdf tutorial. There you will find an example on how to define your own trialfun.m (mytrialfun.m) - it will allow to you to inspect the events etc (e.g. the event structure/array will have the info on back/front panel, the available event/stimulus values etc). Bests, Ole J.M. Schoffelen wrote: >Dear Barbara, > >Please have a close look at the documentation of definetrial, by typing help >definetrial. I think it is quite clearly documented: > >>From about line 28 it reads: > >% Simple trial definitions (e.g. based on a trigger alone) are supported by >% DEFINETRIAL itself. For this, the general and dataformat-independent way >% of handling trials is by relying on the READ_FCDC_EVENT function to >% collect all event information (such as triggers) from your dataset and >% select trials based on those events. This is implemented in DEFINETRIAL as >% cfg.trialdef.eventtype = 'string' >% cfg.trialdef.eventvalue = number, string or list with numbers or strings >% cfg.trialdef.prestim = 0.300 latency in seconds (optional) >% cfg.trialdef.poststim = 0.700 latency in seconds (optional) > >So, this is the most up-to-date implementation of the function, >You have to specify your cfg.trialdef.eventtype as 'frontpanel trigger'. >In this case it selects the triggers from the frontpanel. >Then just take cfg.trialdef.eventvalue = [6] (no ''!). What remains is the >optional time-window with respect to your relevant trigger. This is not >necessary if you have a trial-based collection, as far as I know. > >The includeTrigger-field is also usable, but it is only left in for >backward-compatibility. > > >Hope this helps, > >Yours, > >Jan-Mathijs > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Barbara H ändel >Sent: Thursday, June 30, 2005 3:56 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: [FIELDTRIP] definetrial in CTF-file > >Hi anyone, >I just started today to use fieldtrip with ctf.data but already have a >Problem I don't seem to be able to solve myself. So if anyone has some >advice I would be very thankful. > >I tried to execute preprocessing.m however when I define my relevant trials >using > >cfg.trialdef.includeTrigger=['6']; > >I get the error message that no trials are beeing defined. > >Now, looking into the code of definetrial.m in line 407 the variable >“triggerchan” is defined by triggerChan = read_ctf_trigger(cfg.dataset); > >The problem is that it seems like that only the “backpanel” is extracted >from read_ctf_trigger however I would need the “frontpanel”. So >definetrial.m later on only finds “triggerchan” with loads of zeros and can >not match my defined trigger. > >Is there any reason why only one variable is taken instead of two (as it is >done at line 455 in definetrial.m)? > > >Thankful for any suggestion, >Barbara > > > From barbara.haendel at UNI-TUEBINGEN.DE Thu Jun 30 20:15:43 2005 From: barbara.haendel at UNI-TUEBINGEN.DE (Barbara H=?ISO-8859-1?Q?=E4ndel?=) Date: Thu, 30 Jun 2005 20:15:43 +0200 Subject: definetrial in CTF-file In-Reply-To: <42C4126E.6030103@fcdonders.ru.nl> Message-ID: Thank you for you replies, I probably was too eager to start and looking at the definetrial.m code I just saw that one can define trials by the stimulus channel so I just went for it (unfortunately ignoring the read_fcdf_event.m option). mytrialfun.m works just perfect! Cheers, Barbara Ole Jensen schrieb: > Dear Barbara, > > I suggest you also have a look at the example in the appendix of the > EventRelatedProcessing.pdf tutorial. There you will find an example on > how to define your own trialfun.m (mytrialfun.m) - it will allow to you > to inspect the events etc (e.g. the event structure/array will have the > info on back/front panel, the available event/stimulus values etc). > > Bests, > > Ole > > > > > J.M. Schoffelen wrote: > > >Dear Barbara, > > > >Please have a close look at the documentation of definetrial, by typing help > >definetrial. I think it is quite clearly documented: > > > >From about line 28 it reads: > > > >% Simple trial definitions (e.g. based on a trigger alone) are supported by > >% DEFINETRIAL itself. For this, the general and dataformat-independent way > >% of handling trials is by relying on the READ_FCDC_EVENT function to > >% collect all event information (such as triggers) from your dataset and > >% select trials based on those events. This is implemented in DEFINETRIAL as > >% cfg.trialdef.eventtype = 'string' > >% cfg.trialdef.eventvalue = number, string or list with numbers or strings > >% cfg.trialdef.prestim = 0.300 latency in seconds (optional) > >% cfg.trialdef.poststim = 0.700 latency in seconds (optional) > > > >So, this is the most up-to-date implementation of the function, > >You have to specify your cfg.trialdef.eventtype as 'frontpanel trigger'. > >In this case it selects the triggers from the frontpanel. > >Then just take cfg.trialdef.eventvalue = [6] (no ''!). What remains is the > >optional time-window with respect to your relevant trigger. This is not > >necessary if you have a trial-based collection, as far as I know. > > > >The includeTrigger-field is also usable, but it is only left in for > >backward-compatibility. > > > > > >Hope this helps, > > > >Yours, > > > >Jan-Mathijs > > > >-----Original Message----- > >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > >Of Barbara H �ndel > >Sent: Thursday, June 30, 2005 3:56 PM > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: [FIELDTRIP] definetrial in CTF-file > > > >Hi anyone, > >I just started today to use fieldtrip with ctf.data but already have a > >Problem I don't seem to be able to solve myself. So if anyone has some > >advice I would be very thankful. > > > >I tried to execute preprocessing.m however when I define my relevant trials > >using > > > >cfg.trialdef.includeTrigger=['6']; > > > >I get the error message that no trials are beeing defined. > > > >Now, looking into the code of definetrial.m in line 407 the variable > >�triggerchan� is defined by triggerChan = read_ctf_trigger(cfg.dataset); > > > >The problem is that it seems like that only the �backpanel� is extracted > >from read_ctf_trigger however I would need the �frontpanel�. So > >definetrial.m later on only finds �triggerchan� with loads of zeros and can > >not match my defined trigger. > > > >Is there any reason why only one variable is taken instead of two (as it is > >done at line 455 in definetrial.m)? > > > > > >Thankful for any suggestion, > >Barbara > > > > > > > -- --------------------------- Barbara H�ndel Kognitive Neurologie Universit�tsklinikum T�bingen Hoppe-Seyler-Str. 3 D72076 Tuebingen Tel. +49(0)7071-29 82060 Fax +49(0)7071-29 5326 From matsuham at NINDS.NIH.GOV Wed Jun 1 04:20:30 2005 From: matsuham at NINDS.NIH.GOV (Matsuhashi, Masao (NIH/NINDS)) Date: Tue, 31 May 2005 22:20:30 -0400 Subject: Source coherence Message-ID: Hi Robert, > I had a look at your data, and at the computations that you perfomed > for the analysis. Your frequencies of interest are 4.6 and 5Hz, and > your time windows are 10 seconds long (right?). Yes. Based on your suggestions, I did some additional analyses with precaution to: - cfg.taper='hanning' instead of the default 'dpss' - Add coherence calculation at the frequency which shouldn't have meaningful coherence - Calculate and show coherence between MEG channels and Reference channels using topoplotER - Check the topological map of power distribution for possible artifacts However, I still have the same problem. I put a new data to ftp://m50-336.azn.nl/pub/incoming/sources02_12_15.zip There are two reference signals, with frequencies of interest of 12 Hz and 15 Hz, respectively. The coherence between MEG sensors and reference signal are around 0.8 - 0.9 at 12 Hz, but below 0.35 at 15 Hz. However the coherence value of distributed source activities at 12 Hz was below 0.06, while it was above 0.1 at 15 Hz. > coherence. But I still would not be too confident about it, since the > influence of artifacts on the filter can be difficult to predict. In the case above, 12 Hz reference signal may be too close to the dominant frequency and can cause problem. However, when I calculate the coherence at 12 Hz between MEG and 15 Hz reference signal, the same thing happened again. The coherence between EMG sensors and reference signal was below 0.3 as expected, but source coherence peak was more than 0.1!? (Remember that the coherence at 12 Hz with true reference signal was no more than 0.06) Could you tell me what is going wrong, please? Thanks, Masao ------------------------------------------------ Masao Matsuhashi, MD, PhD NINDS, NIH Tel: 1-301-594-9139 E-mail: MatsuhaM at ninds.nih.gov ------------------------------------------------ From angel.nevado at YNIC.YORK.AC.UK Thu Jun 9 15:48:14 2005 From: angel.nevado at YNIC.YORK.AC.UK (Angel Nevado) Date: Thu, 9 Jun 2005 14:48:14 +0100 Subject: data2raw function Message-ID: Hello, When going through the Event Related Averaging tutorial I get the error below when executing function "meginterpolate". I cannot find the function "data2raw" within the Fieldtrip folders. Thanks and best regards, Angel >> avgFICplanar = meginterpolate(cfg, avgFIC); not repairing bad channels ??? Undefined command/function 'data2raw'. Error in ==> megrealign at 103 [data, inputdimord] = data2raw(data); From r.oostenveld at FCDONDERS.RU.NL Fri Jun 10 09:17:28 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 10 Jun 2005 09:17:28 +0200 Subject: data2raw function In-Reply-To: <42A8489E.5040402@ynic.york.ac.uk> Message-ID: Dear Angel, That function has accidentaly been left out of the daily release version. It will be included in the next one. I have also attached it to this mail (together with another function that was missing), please put the attachements in your fieldtrip/private directory. best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: raw2data.m Type: application/octet-stream Size: 2462 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: data2raw.m Type: application/octet-stream Size: 3549 bytes Desc: not available URL: -------------- next part -------------- On 9 Jun 2005, at 15:48, Angel Nevado wrote: > Hello, > > When going through the Event Related Averaging tutorial I get the > error below when executing function "meginterpolate". > I cannot find the function "data2raw" within the Fieldtrip folders. > > Thanks and best regards, > > Angel > From litvak at TECHUNIX.TECHNION.AC.IL Sun Jun 12 18:11:53 2005 From: litvak at TECHUNIX.TECHNION.AC.IL (Litvak Vladimir) Date: Sun, 12 Jun 2005 19:11:53 +0300 Subject: Realigning trials Message-ID: Dear all, We have a somatosensory paradigm where we cannot measure exactly when the subject starts feeling the stimulus. We do have triggers but there may be varying delays of tens to hundreds ms. Nevertheless, it's possible to get a kind of SEP. But I suspect it would look better if I found a way to realign the trials. I heard about Woody filter but maybe it would be better to try to align all the trials to the first or to use some kind of template. I have some ideas about how this can be implemented but if anyone already has a working Matlab code for something like this (including Woody filter) it'd save me a lot of time and efforts. Suggestions and ideas will also be appreciated. Thanks in advance, Vladimir Litvak From r.oostenveld at FCDONDERS.RU.NL Tue Jun 14 11:53:42 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 14 Jun 2005 11:53:42 +0200 Subject: Realigning trials In-Reply-To: Message-ID: Dear Vladimir, You might want to look into Wang K, Begleiter H, Porjesz B. Warp-averaging event-related potentials. Clin Neurophysiol. 2001 Oct;112(10):1917-24. and references therein. best regards, Robert On 12 Jun 2005, at 18:11, Litvak Vladimir wrote: > Dear all, > > We have a somatosensory paradigm where we cannot measure exactly > when the subject starts feeling the stimulus. We do have triggers > but there may be varying delays of tens to hundreds ms. > Nevertheless, it's possible to get a kind of SEP. But I suspect it > would look better if I found a way to realign the trials. I heard > about Woody filter but maybe it would be better to try to align all > the trials to the first or to use some kind of template. > > I have some ideas about how this can be implemented but if anyone > already has a working Matlab code for something like this > (including Woody filter) it'd save me a lot of time and efforts. > Suggestions and ideas will also be appreciated. > > Thanks in advance, > > Vladimir Litvak > > From r.oostenveld at FCDONDERS.RU.NL Tue Jun 21 12:23:36 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 21 Jun 2005 12:23:36 +0200 Subject: Fwd: Trial function Message-ID: Begin forwarded message: > From: Susanne Leiberg > Date: 21 juni 2005 12:12:10 GMT+02:00 > To: Robert Oostenveld > Subject: Trial function > > > Dear Mr. Oostenveld, > > my name is Susanne Leiberg and I'm working on the MEG center in > Tübingen. > Currently I start using Fieldtrip with the help of your tutorial > data. Unfortunately, > downloading the 'ClusRandDistrib.zip' file failed several times. > Since I'm mainly > interested in the trial function "maketrlSemCon.m" I wanted to ask > you whether it > is possible to send me this file via email. I would really much > appreciate it. > > Thanks very much in advance! > Best regards, Susanne Leiberg > > -- > > ------------------------------------------------------ > Dipl.-Psych. Susanne Leiberg > Institute of Medical Psychology and Behavioral Neurobiology > MEG-Center > Otfried-Müller-Str. 47 > 72076 Tübingen > > Phone: + 49-7071-2987716 > Fax: + 49-7071-295706 > Email: Susanne.Leiberg at med.uni-tuebingen.de > > > ======================================================= Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ From litvak at TECHUNIX.TECHNION.AC.IL Thu Jun 23 15:19:47 2005 From: litvak at TECHUNIX.TECHNION.AC.IL (Litvak Vladimir) Date: Thu, 23 Jun 2005 16:19:47 +0300 Subject: Comparing to zero In-Reply-To: Message-ID: Dear Eric (and others), What would be the best way to find clusters that are significally different from zero (or any other constant value for this matter)? I once saw in SnPM of Nichols an option to have a single input with the permutations done my toggling the sign, but there is no such option in the current version of clusterrandanalysis. Thanks, Vladimir From tomh at KURAGE.NIMH.NIH.GOV Thu Jun 23 16:18:43 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Thu, 23 Jun 2005 10:18:43 -0400 Subject: Comparing to zero In-Reply-To: Message-ID: > What would be the best way to find clusters that are significally > different from zero? One way is to to a group analysis using AFNI. I'm using that for coherences---here's a snippet. ... [source] = sourceanalysis(cfg, freq); [source] = sourcedescriptives([], source); brikname = 'blah'; [err, errmsg, info] = writesourcebrik(source, source.avg.coh, brikname); if err disp(errmsg) end I've attached writesourcebrik.m, which sets things up to write a brik in a format that is compatible with CTF datasets, although that's not really important. It uses a function called WriteBrik.m from the AFNI library, you can get that from the same website where you get AFNI. Once you have a set of datasets in BRIK format, you can do the test using 3dttest. You have to first warp all your datasets to some common space such as Talairach or MNI (AFNI is more at home with Talairach), using adwarp. Then something like 3dttest -prefix outname -base1 0 -set2 subj1+tlrc subj2+tlrc ... subN+tlrc will do the test. There's a randpermute function that does the non-parametric correction on our website, too, at kurage.nimh.nih.gov. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce -------------- next part -------------- A non-text attachment was scrubbed... Name: writesourcebrik.m Type: text/x-objcsrc Size: 1238 bytes Desc: not available URL: From tomh at KURAGE.NIMH.NIH.GOV Thu Jun 23 16:22:57 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Thu, 23 Jun 2005 10:22:57 -0400 Subject: Comparing to zero In-Reply-To: <42BAC4C3.3070900@kurage.nimh.nih.gov> Message-ID: Tom Holroyd wrote: >> What would be the best way to find clusters that are significally >> different from zero? > > > One way is to to a group analysis using AFNI. I'm using that for > coherences---here's a snippet. Just a brief followup. You can also do a within-subject analysis using AFNI by writing out each trial as a separate subbrik and doing a repeated-measures 3dANOVA or 3dttest. Then you don't need to be in Talairach space. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce From sanja at UNM.EDU Thu Jun 23 18:16:20 2005 From: sanja at UNM.EDU (Sanja Kovacevic) Date: Thu, 23 Jun 2005 10:16:20 -0600 Subject: Comparing to zero In-Reply-To: <42BAC5C1.5010902@kurage.nimh.nih.gov> Message-ID: Hi Dr. Holroyd, I have a related question to your suggestion about using afni to do the group analysis. Presumably afni is capable to read CTF .mri and .svl files, but when I open afni from a directory full of .mri files, I get a bunch of error messages like ** THD_open_ctfmri(path/filename.mri): bad version string. Have you ever encountered this problem? Our CTF mri version, according to mrihead filename.mri, is CTF_MRI_FORMAT VER 4.0. Could this be a reason for the error messages I am getting? Thank you in advance, Sanja Kovacevic Research Assistant MIND Imaging Center Albuquerque, New Mexico, USA Phone: +1 (505) 272 3327 Fax: +1 (505) 272 4056 On Thu, 23 Jun 2005 10:22:57 -0400 Tom Holroyd wrote: > Tom Holroyd wrote: >>> What would be the best way to find clusters that are >>>significally >>> different from zero? >> >> >> One way is to to a group analysis using AFNI. I'm using >>that for >> coherences---here's a snippet. > > Just a brief followup. You can also do a within-subject >analysis using AFNI by writing out each trial as a >separate subbrik and doing a repeated-measures 3dANOVA or >3dttest. Then you don't need to be in Talairach space. > > -- > Dr. Tom Holroyd > "A man of genius makes no mistakes. His errors are >volitional and > are the portals of discovery." -- James Joyce From tomh at KURAGE.NIMH.NIH.GOV Thu Jun 23 18:36:53 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Thu, 23 Jun 2005 12:36:53 -0400 Subject: Comparing to zero In-Reply-To: Message-ID: Sanja Kovacevic wrote: > I have a related question to your suggestion about using afni to do the > group analysis. Presumably afni is capable to read CTF .mri and .svl > files Yes, but see below. > but when I open afni from a directory full of .mri files, I get a > bunch of error messages like ** THD_open_ctfmri(path/filename.mri): bad > version string. Have you ever encountered this problem? Our CTF mri > version, according to mrihead filename.mri, is CTF_MRI_FORMAT VER 4.0. > Could this be a reason for the error messages I am getting? Indeed. AFNI only reads CTF_MRI_FORMAT VER 2.2 mri files at present. There hasn't been a lot of demand for AFNI to read the new .mri files, since generally we use to3d to read in the MRI data in the first place. The version 5 .svl files can be read by AFNI, though. I had actually thought that AFNI had been updated to handle the newer .mri files, too, though, but I guess not. That should probably be corrected. If you send me (by separate email) a copy of your .mri file, I can get it done. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce From tomh at KURAGE.NIMH.NIH.GOV Thu Jun 23 19:59:38 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Thu, 23 Jun 2005 13:59:38 -0400 Subject: Comparing to zero In-Reply-To: <42BAE525.4000208@kurage.nimh.nih.gov> Message-ID: > Sanja Kovacevic wrote: >> but when I open afni from a directory full of .mri files, I get a >> bunch of error messages like ** THD_open_ctfmri(path/filename.mri): >> bad version string. FYI, the MRIViewer program has an option under the File menu to convert to V2 format. Then it works. It even converts the fiducials correctly. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce From maris at NICI.RU.NL Thu Jun 23 21:28:12 2005 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 23 Jun 2005 21:28:12 +0200 Subject: Comparing to zero Message-ID: Hi Litvak (and others), > What would be the best way to find clusters that are significally > different from zero (or any other constant value for this matter)? I once > saw in SnPM of Nichols an option to have a single input with the > permutations done my toggling the sign, but there is no such option in the > current version of clusterrandanalysis. As far as I know, there is no randomization/permutation test by means of which one can test the null hypothesis that some random variable has expectation zero. The randomization tests that are implemented in clusterrandanalysis all test null hypotheses about the effect of an independent variable. Now, if you have a two-level within-subjects design, then the null hypothesis of exchangeability between these two levels (our specification of the null hypothesis of no effect) is equivalent to the following null hypothesis: the probability of the difference between the two levels is equal to the probability of minus this difference. In this case, randomly toggling the sign of the difference produces the randomization/permutation distribution. However, if you want to produce this randomization distribution using clusterrandanalysis, you have to feed it the data of both levels (and not just their difference). Eric Maris From r.oostenveld at FCDONDERS.RU.NL Fri Jun 24 09:54:22 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 24 Jun 2005 09:54:22 +0200 Subject: Comparing to zero In-Reply-To: <003a01c57829$b91fabe0$6401a8c0@fcdc195> Message-ID: Hi Eric and others, The test that Vladimir refers to does not test the hypothesis of the expected value of the mean being zero, but it tests the null hypothesis of exchangeability of the sign of the data. If it is very improbable (say p<0.05) that the sign can be exchanged, you would accept the alternative hypothesis which states that the random distribution of your data is not symmetric with respect to zero. That is already very close to what Vladimir is interested in. However, not only a shift in the mean of the random distribution would violate the null hypothesis, but also any other asymmetry with respect to zero. Therefore it is not possible to immediately translate the alternative hypothesis (as I phrased it above) into a statement about the mean (which is what Vladimir wants). What you could do, after finding with the randomization test that the distribution is not symemtric around zero, is 1) assume that that assymetry is caused by a shift in the mean and not test it (which seems fair enough to me in quite some cases, e.g. when you know that the random distribution is close to a normal distribution), or 2) perform a second test in which you test whether the distribution of the random variable is symmetric around its estimated mean (i.e. repeat the same test as done before, after subtracting the mean of the random variable). I think that that would be relatively simple to implement in FieldTrip. Robert >> What would be the best way to find clusters that are significally >> different from zero (or any other constant value for this matter)? >> I once >> saw in SnPM of Nichols an option to have a single input with the >> permutations done my toggling the sign, but there is no such >> option in the >> current version of clusterrandanalysis > > As far as I know, there is no randomization/permutation test by > means of which > one can test the null hypothesis that some random variable has > expectation zero. From maris at NICI.RU.NL Fri Jun 24 11:08:11 2005 From: maris at NICI.RU.NL (Eric Maris) Date: Fri, 24 Jun 2005 11:08:11 +0200 Subject: Comparing to zero Message-ID: Hi Fieldtrippers, Some comments to Robert's contribution: > The test that Vladimir refers to does not test the hypothesis of the > expected value of the mean being zero, but it tests the null hypothesis > of exchangeability of the sign of the data. If it is very improbable (say > p<0.05) that the sign can be exchanged, you would accept the alternative > hypothesis which states that the random distribution of your data is not > symmetric with respect to zero. That is already very close to what > Vladimir is interested in. Sounds good. What you propose is a randomization test for symmetry around zero. This null hypothesis implies the hypothesis of interest (expectation equal to 0) but unfortunately not the other way around, as Robert also notes. However, by proper choice of your test statistic one can try to make it insensitive to other deviations from the null hypothesis (symmetry around 0) than a nonzero expectation. A terminological remark: exchangeability refers to an array and not to a single element, such as the sign of the data. What Robert means is usually denoted as "the sign has a Bernoulli distribution with probability 0.5". This ("the sign etc.") is a property of random variable that is symmetric around zero. > What you could do, after finding with the randomization test that the > distribution is not symemtric around zero, is > 1) assume that that assymetry is caused by a shift in the mean and not > test it (which seems fair enough to me in quite some cases, e.g. when you > know that the random distribution is close to a normal distribution), or > 2) perform a second test in which you test whether the distribution of > the random variable is symmetric around its estimated mean (i.e. repeat > the same test as done before, after subtracting the mean of the random > variable). This second test has much intuitive appeal, but it still has to be shown that it controls the false alarm rate. The null hypothesis of interest is the following: the distribution is symmetric around an unknown expectation X. Because X is unknown, one may consider replacing it by its sample mean, as Robert proposes, but trick may spoil your false alarm rate control. Eric Maris From tnt at PHYSIOL.OX.AC.UK Sat Jun 25 17:13:06 2005 From: tnt at PHYSIOL.OX.AC.UK (Thomas Thesen) Date: Sat, 25 Jun 2005 17:13:06 +0200 Subject: custom topography for topoplotER Message-ID: Hi Robert, Eric & Others, I am trying to use TOPOPLOTER to make topographic plots of averaged waveforms with interpolation between electrode positions. However, it seems that TOPOPLOTER uses a 2-D circular view of the head (with nose & ears) as a a default plotting background structure. My data was recorded from a 8x8 electrode grid (square and equal spacing). I made an appropriate layout file (.lay), which works well with MULTIPLOTER, but not with TOPOPLOTER. Any suggestions on how to make this work would be greatly appreciated. Cheers, Thomas From ole.jensen at FCDONDERS.RU.NL Sun Jun 26 13:40:03 2005 From: ole.jensen at FCDONDERS.RU.NL (Ole Jensen) Date: Sun, 26 Jun 2005 13:40:03 +0200 Subject: custom topography for topoplotER In-Reply-To: Message-ID: Hi Thomas, Please understand that our resources for support are limited; you can save us a lot of time by providing 1) error messages 2) the cfg settings you used 3) your *.lay file I will then do my best to resolve the problem. Bests, Ole Thomas Thesen wrote: >Hi Robert, Eric & Others, > >I am trying to use TOPOPLOTER to make topographic plots of averaged >waveforms with interpolation between electrode positions. > >However, it seems that TOPOPLOTER uses a 2-D circular view of the head (with >nose & ears) as a a default plotting background structure. My data was >recorded from a 8x8 electrode grid (square and equal spacing). I made an >appropriate layout file (.lay), which works well with MULTIPLOTER, but not >with TOPOPLOTER. > >Any suggestions on how to make this work would be greatly appreciated. > >Cheers, > >Thomas > > > -- Ole Jensen Principal Investigator F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at fcdonders.ru.nl URL : http://oase.uci.ru.nl/~olejen From tnt at PHYSIOL.OX.AC.UK Sun Jun 26 16:43:41 2005 From: tnt at PHYSIOL.OX.AC.UK (Thomas Thesen) Date: Sun, 26 Jun 2005 16:43:41 +0200 Subject: custom topography for topoplotER Message-ID: Dear Ole & others, Thanks a lot for your time in helping to figure out this problem. I greatly appreciate it. I have put an example data file (avg_ft_TT_S106Cond1.mat), the layout file (iEEG_64.lay) and an image of the output figure of TOPOPLOTER (topoplotER_iEEG_64.jpg) and MULTIPLOTER (multiplotER_iEEG_64.jpg on the web: http://www.physiol.ox.ac.uk/~tnt/fieldtrip/ I ran the following: >> load avg_ft_TT_S106Cond1.mat >> avg_ft_TT_S106Cond1 avg_ft_TT_S106Cond1 = cfg: [1x1 struct] avg: [64x2500 double] var: [64x2500 double] fsample: 1000 numsamples: [70x1 double] time: [1x2500 double] dofvec: [1x2500 double] label: {64x1 cell} trial: [70x64x2500 double] dimord: 'trial_chan_time' >> >> cfg=[]; >> cfg.xlim = [0.5 1]; >> figure; >> cfg.layout='iEEG_64.lay'; >> topoplotER(cfg, avg_ft_TT_S106Cond1); reading layout from file iEEG_64.lay selected 64 channels for plotting >> As you can see there is no error message but the topopgraphy is mapped onto a circular headshape with ears and nose (see topoplotER_iEEG_64.jpg). The actual data is recorded from an intra-cranial EEG electrode grid implant on the superior temporal sulcus and has the following channel arrangement: 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 (The numbers correspond to the channels/sensors in avg_ft_TT_S106Cond1.avg) Ideally, I would like to plot the topography on a 8x8 square (equal spacing) instead of a round scalp. The layout file seems to be correct. If MULTIPLOTER is used with the cfg configs: >> cfg.layout='iEEG_64.lay'; >> figure; >> cfg.xlim = [0.5 1]; >> cfg.axes = 'no'; >> cfg.showlabels ='yes'; >> multiplotER(cfg, avg_ft_TT_S106Cond1); reading layout from file iEEG_64.lay it produces a figure as in multiplotER_iEEG_64.jpg, and has the correct sensor arrnagements. cheers, Thomas On Sun, 26 Jun 2005 13:40:03 +0200, Ole Jensen wrote: >Hi Thomas, >Please understand that our resources for support are limited; you can >save us a lot of time by providing >1) error messages >2) the cfg settings you used >3) your *.lay file >I will then do my best to resolve the problem. >Bests, > >Ole > > >Thomas Thesen wrote: > >>Hi Robert, Eric & Others, >> >>I am trying to use TOPOPLOTER to make topographic plots of averaged >>waveforms with interpolation between electrode positions. >> >>However, it seems that TOPOPLOTER uses a 2-D circular view of the head (with >>nose & ears) as a a default plotting background structure. My data was >>recorded from a 8x8 electrode grid (square and equal spacing). I made an >>appropriate layout file (.lay), which works well with MULTIPLOTER, but not >>with TOPOPLOTER. >> >>Any suggestions on how to make this work would be greatly appreciated. >> >>Cheers, >> >>Thomas >> >> >> > > >-- >Ole Jensen >Principal Investigator >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Office : +31 24 36 10884 >MEG lab : +31 24 36 10988 > >Fax : +31 24 36 10989 > >e-mail : ole.jensen at fcdonders.ru.nl >URL : http://oase.uci.ru.nl/~olejen From ole.jensen at FCDONDERS.RU.NL Sun Jun 26 17:14:54 2005 From: ole.jensen at FCDONDERS.RU.NL (Ole Jensen) Date: Sun, 26 Jun 2005 17:14:54 +0200 Subject: custom topography for topoplotER In-Reply-To: Message-ID: Hi Thomas, Thanks for the info. I now understand from your figures that your want to plot the topography of intracranial EEG data and thats why you do not want the head drawn. If you try cfg.showlabels = 'yes' you will probably find that the sensors are correctly placed. In order to suppress the drawing of the head I suggest you modify private/topoplot.m (which is used by topoplotER.m). The last part of this function draws the head. If you make it general with an option (e.g. cfg.headplot = 'yes'/'no') in topoplot.m we can include it in the toolbox with the documentation in topoplotER.m and topoplotTFR.m (its probably easier if we update topoplotER/topoplotTFR here). I hope this helps you along! Bests, Ole Thomas Thesen wrote: >Dear Ole & others, > >Thanks a lot for your time in helping to figure out this problem. I greatly >appreciate it. > >I have put an example data file (avg_ft_TT_S106Cond1.mat), the layout file >(iEEG_64.lay) and an image of the output figure of TOPOPLOTER >(topoplotER_iEEG_64.jpg) and MULTIPLOTER (multiplotER_iEEG_64.jpg on the web: > >http://www.physiol.ox.ac.uk/~tnt/fieldtrip/ > >I ran the following: > > > >>>load avg_ft_TT_S106Cond1.mat >>> >>> > > > >>>avg_ft_TT_S106Cond1 >>> >>> > >avg_ft_TT_S106Cond1 = > > cfg: [1x1 struct] > avg: [64x2500 double] > var: [64x2500 double] > fsample: 1000 > numsamples: [70x1 double] > time: [1x2500 double] > dofvec: [1x2500 double] > label: {64x1 cell} > trial: [70x64x2500 double] > dimord: 'trial_chan_time' > > > >>>cfg=[]; >>>cfg.xlim = [0.5 1]; >>>figure; >>>cfg.layout='iEEG_64.lay'; >>>topoplotER(cfg, avg_ft_TT_S106Cond1); >>> >>> >reading layout from file iEEG_64.lay >selected 64 channels for plotting > > > >As you can see there is no error message but the topopgraphy is mapped onto >a circular headshape with ears and nose (see topoplotER_iEEG_64.jpg). > >The actual data is recorded from an intra-cranial EEG electrode grid implant >on the superior temporal sulcus and has the following channel arrangement: > >64 63 62 61 60 59 58 57 >56 55 54 53 52 51 50 49 >48 47 46 45 44 43 42 41 >40 39 38 37 36 35 34 33 >32 31 30 29 28 27 26 25 >24 23 22 21 20 19 18 17 >16 15 14 13 12 11 10 9 >8 7 6 5 4 3 2 1 > >(The numbers correspond to the channels/sensors in avg_ft_TT_S106Cond1.avg) > >Ideally, I would like to plot the topography on a 8x8 square (equal spacing) >instead of a round scalp. The layout file seems to be correct. If >MULTIPLOTER is used with the cfg configs: > > > >>>cfg.layout='iEEG_64.lay'; >>>figure; >>>cfg.xlim = [0.5 1]; >>>cfg.axes = 'no'; >>>cfg.showlabels ='yes'; >>>multiplotER(cfg, avg_ft_TT_S106Cond1); >>> >>> >reading layout from file iEEG_64.lay > >it produces a figure as in multiplotER_iEEG_64.jpg, and has the correct >sensor arrnagements. > >cheers, > >Thomas > > > >On Sun, 26 Jun 2005 13:40:03 +0200, Ole Jensen >wrote: > > > >>Hi Thomas, >>Please understand that our resources for support are limited; you can >>save us a lot of time by providing >>1) error messages >>2) the cfg settings you used >>3) your *.lay file >>I will then do my best to resolve the problem. >>Bests, >> >>Ole >> >> >>Thomas Thesen wrote: >> >> >> >>>Hi Robert, Eric & Others, >>> >>>I am trying to use TOPOPLOTER to make topographic plots of averaged >>>waveforms with interpolation between electrode positions. >>> >>>However, it seems that TOPOPLOTER uses a 2-D circular view of the head (with >>>nose & ears) as a a default plotting background structure. My data was >>>recorded from a 8x8 electrode grid (square and equal spacing). I made an >>>appropriate layout file (.lay), which works well with MULTIPLOTER, but not >>>with TOPOPLOTER. >>> >>>Any suggestions on how to make this work would be greatly appreciated. >>> >>>Cheers, >>> >>>Thomas >>> >>> >>> >>> >>> >>-- >>Ole Jensen >>Principal Investigator >>F.C. Donders Centre for Cognitive Neuroimaging >>P.O. Box 9101 >>NL-6500 HB Nijmegen >>The Netherlands >> >>Office : +31 24 36 10884 >>MEG lab : +31 24 36 10988 >> >>Fax : +31 24 36 10989 >> >>e-mail : ole.jensen at fcdonders.ru.nl >>URL : http://oase.uci.ru.nl/~olejen >> >> > > > -- Ole Jensen Principal Investigator F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Office : +31 24 36 10884 MEG lab : +31 24 36 10988 Fax : +31 24 36 10989 e-mail : ole.jensen at fcdonders.ru.nl URL : http://oase.uci.ru.nl/~olejen From luis.patino at UNIKLINIK-FREIBURG.DE Mon Jun 27 08:47:23 2005 From: luis.patino at UNIKLINIK-FREIBURG.DE (Dr. Jose Luis Patino Vilchis) Date: Mon, 27 Jun 2005 08:47:23 +0200 Subject: Comparing to zero In-Reply-To: <42BAC4C3.3070900@kurage.nimh.nih.gov> Message-ID: We are also working with coherences. I would be interested to know more about the algorithm embedded in the function and to know how you use it to find significant coherence. Could it bepossible to have more information on this? Many Thanks Luis Patino Universitätsklinikum Freiburg Quoting Tom Holroyd : > > What would be the best way to find clusters that are significally > > different from zero? > > One way is to to a group analysis using AFNI. I'm using that for > coherences---here's a snippet. > > ... > [source] = sourceanalysis(cfg, freq); > [source] = sourcedescriptives([], source); > > brikname = 'blah'; > [err, errmsg, info] = writesourcebrik(source, source.avg.coh, brikname); > if err > disp(errmsg) > end > > I've attached writesourcebrik.m, which sets things up to write a brik in a > format that is compatible with CTF datasets, although that's not really > important. It uses a function called WriteBrik.m from the AFNI library, you > can > get that from the same website where you get AFNI. Once you have a set of > datasets in BRIK format, you can do the test using 3dttest. You have to > first > warp all your datasets to some common space such as Talairach or MNI (AFNI is > > more at home with Talairach), using adwarp. Then something like > > 3dttest -prefix outname -base1 0 -set2 subj1+tlrc subj2+tlrc ... subN+tlrc > > will do the test. There's a randpermute function that does the > non-parametric > correction on our website, too, at kurage.nimh.nih.gov. > > -- > Dr. Tom Holroyd > "A man of genius makes no mistakes. His errors are volitional and > are the portals of discovery." -- James Joyce > From litvak at TECHUNIX.TECHNION.AC.IL Mon Jun 27 09:57:07 2005 From: litvak at TECHUNIX.TECHNION.AC.IL (Litvak Vladimir) Date: Mon, 27 Jun 2005 10:57:07 +0300 Subject: Comparing to zero In-Reply-To: <002101c5789c$3f297500$5b030d0a@fcdc195> Message-ID: Dear Robert and Eric, Maybe I should explain what I really want to do and then you'll be able to suggest another solution for me. I want to compare power between two conditions A and B (dependent samples). I already tried comparing it the usual way but I want to also try comparing relative increase (A-B)/B. This way I have only one dataset that needs to be compared to zero. If I apply the same transformation to B I'll get of course just an array of zeros and it doesn't seem right to me to compare it with the normalized A. Any ideas? Maybe I should just normalize both by the average 2A/(A+B) and 2B/(A+B) and the compare? Thanks, Vladimir From rbg26471 at YAHOO.COM Mon Jun 27 15:51:28 2005 From: rbg26471 at YAHOO.COM (rathinaswamy bavanandan govindan) Date: Mon, 27 Jun 2005 06:51:28 -0700 Subject: Govindan In-Reply-To: Message-ID: Dear Litvak, I am not using Fieldtrip, but I can try to address your query. Subtracting one spectrum from other is not a correct way to compare two spectra. On the otherhand, you can consider the ratio of the two spectra. Further, in the spectral analysis, no one is interested in the power in all the frequency bands but in a specific frequency band! So, in that case you can calculate the signal to noise ratio (SNR) for both processes and compare the SNR of the two processes! You don't have to search for a complicated formula to compute SNR. Just sum up the powers in the desired frequency range and divide by the sum of powers in all the frequencies up to Nyquist frequency. In this definition care should be taken to avoid the effects due to filter. If you are using bandpass filter, say up to 80 Hz, then restrict your second summation only up to the frequency band of 80 Hz. Best regards Govindan --- Litvak Vladimir wrote: > Dear Robert and Eric, > > Maybe I should explain what I really want to do and > then you'll be able to > suggest another solution for me. > > I want to compare power between two conditions A and > B (dependent > samples). I already tried comparing it the usual way > but I want to also > try comparing relative increase (A-B)/B. This way I > have only one dataset > that needs to be compared to zero. If I apply the > same transformation to B > I'll get of course just an array of zeros and it > doesn't seem right to me > to compare it with the normalized A. > > Any ideas? Maybe I should just normalize both by the > average 2A/(A+B) and > 2B/(A+B) and the compare? > > Thanks, > > Vladimir > ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com From tomh at KURAGE.NIMH.NIH.GOV Mon Jun 27 16:44:38 2005 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Mon, 27 Jun 2005 10:44:38 -0400 Subject: Comparing to zero In-Reply-To: <1119854843.42bfa0fb84849@webmail1.uniklinik-freiburg.de> Message-ID: Dr. Jose Luis Patino Vilchis wrote: > We are also working with coherences. I would be interested to know more about > the algorithm embedded in the function and to know how you use it to find > significant coherence. Could it bepossible to have more information on this? At the moment the best way I've found is as follows: Compute 'powandcsd' with freqanalysis(). Use the coh_refdip method of sourceanalysis(). Save the avg.coh array of the result per subject. Using AFNI, I then take the sqrt() and z-score each volume. The result is reasonably normally distributed. Warp to Talairach space. The final step is to use 3dANOVA2 with a mixed effects model, with factor A as the conditions in the experiment, and factor B as subjects. The most important step here is that the results are computed as contrasts between different conditions. Otherwise there is a huge (quarter brain) coherence blob around the reference dipole. It usually subtracts out pretty well in a contrast. -- Dr. Tom Holroyd "A man of genius makes no mistakes. His errors are volitional and are the portals of discovery." -- James Joyce Note: if tomh at kurage doesn't work try holroydt at mail.nih.gov. From r.oostenveld at FCDONDERS.RU.NL Mon Jun 27 17:07:00 2005 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 27 Jun 2005 17:07:00 +0200 Subject: Comparing to zero In-Reply-To: Message-ID: On 27-jun-2005, at 9:57, Litvak Vladimir wrote: > Dear Robert and Eric, > > Maybe I should explain what I really want to do and then you'll be > able to suggest another solution for me. > > I want to compare power between two conditions A and B (dependent > samples). I already tried comparing it the usual way but I want to > also try comparing relative increase (A-B)/B. This way I have only > one dataset that needs to be compared to zero. If I apply the same > transformation to B I'll get of course just an array of zeros and > it doesn't seem right to me to compare it with the normalized A. My first reaction is: if A is different from B, then (A-B) is different from zero, and hence (A-B)/B is also different from zero (given that B is not zero). So what is the use of testing A==B separately from testing whether (A-B)==0? Do you expect your statistical sensitivity to be larger? I can think of situations where you do want to normalise the power difference by the power itself, i.e. relative change. But in those situations the normalisation is meant to remove variability between subjects prior to averaging or computing variance over subjects, which provides you with an alternative to the repeated measures test. So, in that sense, it makes sense to do either repeated measures, or normalise each subject towards a ratio, but not neccessary both. In clusterrandanalysis, the clusters are grown using a thresholded parametric statistical representation of the effect of interest. The summed parametric statistical measure over the whole cluster is subjected to the randomization procedure (testing the hypothesis of exchangeability), which results in a non-parametric test. I am not aware of a parametric statistical measure for which it would be possible to define a meaningfull threshold for the clustering based on the ratio (A-B)/B. It could be done however using a randomization test that is not based on clusters. Robert From litvak at TECHUNIX.TECHNION.AC.IL Mon Jun 27 17:25:35 2005 From: litvak at TECHUNIX.TECHNION.AC.IL (Litvak Vladimir) Date: Mon, 27 Jun 2005 18:25:35 +0300 Subject: Comparing to zero In-Reply-To: <35CC818F-CCF0-401B-8A1C-6ADCFFE3BC9E@fcdonders.ru.nl> Message-ID: > My first reaction is: if A is different from B, then (A-B) is different from > zero, and hence (A-B)/B is also different from zero (given that B is not > zero). So what is the use of testing A==B separately from testing whether > (A-B)==0? Do you expect your statistical sensitivity to be larger? The point is I do the normalization for each subject separately. So I get % change for each subject and not absolute values that can be very different between individuals. I didn't think it violates any of the assumptions of clusterrandanalysis but if it does I'll probably have to look for other ways. > > In clusterrandanalysis, the clusters are grown using a thresholded parametric > statistical representation of the effect of interest. The summed parametric > statistical measure over the whole cluster is subjected to the randomization > procedure (testing the hypothesis of exchangeability), which results in a > non-parametric test. I am not aware of a parametric statistical measure for > which it would be possible to define a meaningfull threshold for the > clustering based on the ratio (A-B)/B. It could be done however using a > randomization test that is not based on clusters. I don't understand why this normalized data is different from raw data. You can define the distribution under the null hypothesis using permutations and proceed from there. If there is something basic I don't understand please explain it to me because it's important to know the limitations of the method. Thanks, Vladimir From maris at NICI.RU.NL Mon Jun 27 22:19:19 2005 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 27 Jun 2005 22:19:19 +0200 Subject: Comparing to zero Message-ID: Hi Litvak, >> My first reaction is: if A is different from B, then (A-B) is different >> from zero, and hence (A-B)/B is also different from zero (given that B is >> not zero). So what is the use of testing A==B separately from testing >> whether (A-B)==0? Do you expect your statistical sensitivity to be >> larger? > > The point is I do the normalization for each subject separately. So I get > % change for each subject and not absolute values that can be very > different between individuals. I didn't think it violates any of the > assumptions of clusterrandanalysis but if it does I'll probably have to > look for other ways. If I understand you correctly, then A and B denote baseline-normalized power (i.e. percent increase/decrease relative to baseline). In that case, pass the data structures containing (in the powspctrm-field) A and B in the argument of clusterrandanalysis and perform a dependent samples T-test. This does not violate any of the assumptions of randomization statistics. It is equivalent to a test of symmetry-around-zero of the difference variable (A-B) (see this thread some steps ago). >> >> In clusterrandanalysis, the clusters are grown using a thresholded >> parametric statistical representation of the effect of interest. The >> summed parametric statistical measure over the whole cluster is subjected >> to the randomization procedure (testing the hypothesis of >> exchangeability), which results in a non-parametric test. I am not aware >> of a parametric statistical measure for which it would be possible to >> define a meaningfull threshold for the clustering based on the ratio >> (A-B)/B. It could be done however using a randomization test that is not >> based on clusters. > > > I don't understand why this normalized data is different from raw data. > You can define the distribution under the null hypothesis using > permutations and proceed from there. If there is something basic I don't > understand please explain it to me because it's important to know the > limitations of the method. No, there is nothing basic that you miss. Robert's point is that the calculation of the cluster-level statistics is based on a thresholding that has a parametric rationale. However, this does not make clusterrandanalysis a parametric test. In fact, if one would threshold according to a different rationale (e.g., by asking your girlfriend which number she likes most ;-), then clusterrandanalysis would still control the false alarm rate. Anyhow, I think this discussion is too long for the small problem you have (at least, if I understand you correctly): 1. I think you want to test whether the baseline-normalized powers A and B are different. Performing this test with clusterrandanalysis is straightforward 2. You say that you want to test whether (A-B)/B is different from zero. As Robert points out, this is equivalent to the hypothesis that A and B are equal. This brings us back to 1. 3. At the end of his last email, Robert mentions something about the parametric rationale of the thresholding that is performed in clusterrandanalysis. This remark is given under the assumption that you really want to perform calculations on (A-B)/B, because then clusterrandanalysis (in its current implementation) cannot help you. However, because your question is whether A and B are different (at least, that's how I see it), you should not worry about this. greetings, Eric Maris From barbara.haendel at UNI-TUEBINGEN.DE Thu Jun 30 15:56:01 2005 From: barbara.haendel at UNI-TUEBINGEN.DE (Barbara H=?ISO-8859-1?Q?=E4ndel?=) Date: Thu, 30 Jun 2005 15:56:01 +0200 Subject: definetrial in CTF-file Message-ID: Hi anyone, I just started today to use fieldtrip with ctf.data but already have a Problem I don't seem to be able to solve myself. So if anyone has some advice I would be very thankful. I tried to execute preprocessing.m however when I define my relevant trials using cfg.trialdef.includeTrigger=['6']; I get the error message that no trials are beeing defined. Now, looking into the code of definetrial.m in line 407 the variable “triggerchan” is defined by triggerChan = read_ctf_trigger(cfg.dataset); The problem is that it seems like that only the “backpanel” is extracted from read_ctf_trigger however I would need the “frontpanel”. So definetrial.m later on only finds “triggerchan” with loads of zeros and can not match my defined trigger. Is there any reason why only one variable is taken instead of two (as it is done at line 455 in definetrial.m)? Thankful for any suggestion, Barbara From Jan.Schoffelen at FCDONDERS.RU.NL Thu Jun 30 16:45:43 2005 From: Jan.Schoffelen at FCDONDERS.RU.NL (J.M. Schoffelen) Date: Thu, 30 Jun 2005 16:45:43 +0200 Subject: definetrial in CTF-file In-Reply-To: Message-ID: Dear Barbara, Please have a close look at the documentation of definetrial, by typing help definetrial. I think it is quite clearly documented: >>From about line 28 it reads: % Simple trial definitions (e.g. based on a trigger alone) are supported by % DEFINETRIAL itself. For this, the general and dataformat-independent way % of handling trials is by relying on the READ_FCDC_EVENT function to % collect all event information (such as triggers) from your dataset and % select trials based on those events. This is implemented in DEFINETRIAL as % cfg.trialdef.eventtype = 'string' % cfg.trialdef.eventvalue = number, string or list with numbers or strings % cfg.trialdef.prestim = 0.300 latency in seconds (optional) % cfg.trialdef.poststim = 0.700 latency in seconds (optional) So, this is the most up-to-date implementation of the function, You have to specify your cfg.trialdef.eventtype as 'frontpanel trigger'. In this case it selects the triggers from the frontpanel. Then just take cfg.trialdef.eventvalue = [6] (no ''!). What remains is the optional time-window with respect to your relevant trigger. This is not necessary if you have a trial-based collection, as far as I know. The includeTrigger-field is also usable, but it is only left in for backward-compatibility. Hope this helps, Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Barbara H ändel Sent: Thursday, June 30, 2005 3:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] definetrial in CTF-file Hi anyone, I just started today to use fieldtrip with ctf.data but already have a Problem I don't seem to be able to solve myself. So if anyone has some advice I would be very thankful. I tried to execute preprocessing.m however when I define my relevant trials using cfg.trialdef.includeTrigger=['6']; I get the error message that no trials are beeing defined. Now, looking into the code of definetrial.m in line 407 the variable “triggerchan” is defined by triggerChan = read_ctf_trigger(cfg.dataset); The problem is that it seems like that only the “backpanel” is extracted from read_ctf_trigger however I would need the “frontpanel”. So definetrial.m later on only finds “triggerchan” with loads of zeros and can not match my defined trigger. Is there any reason why only one variable is taken instead of two (as it is done at line 455 in definetrial.m)? Thankful for any suggestion, Barbara From ole.jensen at FCDONDERS.RU.NL Thu Jun 30 17:40:30 2005 From: ole.jensen at FCDONDERS.RU.NL (Ole Jensen) Date: Thu, 30 Jun 2005 17:40:30 +0200 Subject: definetrial in CTF-file In-Reply-To: <0IIW00J50JOANV@mailserver.uci.kun.nl> Message-ID: Dear Barbara, I suggest you also have a look at the example in the appendix of the EventRelatedProcessing.pdf tutorial. There you will find an example on how to define your own trialfun.m (mytrialfun.m) - it will allow to you to inspect the events etc (e.g. the event structure/array will have the info on back/front panel, the available event/stimulus values etc). Bests, Ole J.M. Schoffelen wrote: >Dear Barbara, > >Please have a close look at the documentation of definetrial, by typing help >definetrial. I think it is quite clearly documented: > >>From about line 28 it reads: > >% Simple trial definitions (e.g. based on a trigger alone) are supported by >% DEFINETRIAL itself. For this, the general and dataformat-independent way >% of handling trials is by relying on the READ_FCDC_EVENT function to >% collect all event information (such as triggers) from your dataset and >% select trials based on those events. This is implemented in DEFINETRIAL as >% cfg.trialdef.eventtype = 'string' >% cfg.trialdef.eventvalue = number, string or list with numbers or strings >% cfg.trialdef.prestim = 0.300 latency in seconds (optional) >% cfg.trialdef.poststim = 0.700 latency in seconds (optional) > >So, this is the most up-to-date implementation of the function, >You have to specify your cfg.trialdef.eventtype as 'frontpanel trigger'. >In this case it selects the triggers from the frontpanel. >Then just take cfg.trialdef.eventvalue = [6] (no ''!). What remains is the >optional time-window with respect to your relevant trigger. This is not >necessary if you have a trial-based collection, as far as I know. > >The includeTrigger-field is also usable, but it is only left in for >backward-compatibility. > > >Hope this helps, > >Yours, > >Jan-Mathijs > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Barbara H ändel >Sent: Thursday, June 30, 2005 3:56 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: [FIELDTRIP] definetrial in CTF-file > >Hi anyone, >I just started today to use fieldtrip with ctf.data but already have a >Problem I don't seem to be able to solve myself. So if anyone has some >advice I would be very thankful. > >I tried to execute preprocessing.m however when I define my relevant trials >using > >cfg.trialdef.includeTrigger=['6']; > >I get the error message that no trials are beeing defined. > >Now, looking into the code of definetrial.m in line 407 the variable >“triggerchan” is defined by triggerChan = read_ctf_trigger(cfg.dataset); > >The problem is that it seems like that only the “backpanel” is extracted >from read_ctf_trigger however I would need the “frontpanel”. So >definetrial.m later on only finds “triggerchan” with loads of zeros and can >not match my defined trigger. > >Is there any reason why only one variable is taken instead of two (as it is >done at line 455 in definetrial.m)? > > >Thankful for any suggestion, >Barbara > > > From barbara.haendel at UNI-TUEBINGEN.DE Thu Jun 30 20:15:43 2005 From: barbara.haendel at UNI-TUEBINGEN.DE (Barbara H=?ISO-8859-1?Q?=E4ndel?=) Date: Thu, 30 Jun 2005 20:15:43 +0200 Subject: definetrial in CTF-file In-Reply-To: <42C4126E.6030103@fcdonders.ru.nl> Message-ID: Thank you for you replies, I probably was too eager to start and looking at the definetrial.m code I just saw that one can define trials by the stimulus channel so I just went for it (unfortunately ignoring the read_fcdf_event.m option). mytrialfun.m works just perfect! Cheers, Barbara Ole Jensen schrieb: > Dear Barbara, > > I suggest you also have a look at the example in the appendix of the > EventRelatedProcessing.pdf tutorial. There you will find an example on > how to define your own trialfun.m (mytrialfun.m) - it will allow to you > to inspect the events etc (e.g. the event structure/array will have the > info on back/front panel, the available event/stimulus values etc). > > Bests, > > Ole > > > > > J.M. Schoffelen wrote: > > >Dear Barbara, > > > >Please have a close look at the documentation of definetrial, by typing help > >definetrial. I think it is quite clearly documented: > > > >From about line 28 it reads: > > > >% Simple trial definitions (e.g. based on a trigger alone) are supported by > >% DEFINETRIAL itself. For this, the general and dataformat-independent way > >% of handling trials is by relying on the READ_FCDC_EVENT function to > >% collect all event information (such as triggers) from your dataset and > >% select trials based on those events. This is implemented in DEFINETRIAL as > >% cfg.trialdef.eventtype = 'string' > >% cfg.trialdef.eventvalue = number, string or list with numbers or strings > >% cfg.trialdef.prestim = 0.300 latency in seconds (optional) > >% cfg.trialdef.poststim = 0.700 latency in seconds (optional) > > > >So, this is the most up-to-date implementation of the function, > >You have to specify your cfg.trialdef.eventtype as 'frontpanel trigger'. > >In this case it selects the triggers from the frontpanel. > >Then just take cfg.trialdef.eventvalue = [6] (no ''!). What remains is the > >optional time-window with respect to your relevant trigger. This is not > >necessary if you have a trial-based collection, as far as I know. > > > >The includeTrigger-field is also usable, but it is only left in for > >backward-compatibility. > > > > > >Hope this helps, > > > >Yours, > > > >Jan-Mathijs > > > >-----Original Message----- > >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > >Of Barbara H �ndel > >Sent: Thursday, June 30, 2005 3:56 PM > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: [FIELDTRIP] definetrial in CTF-file > > > >Hi anyone, > >I just started today to use fieldtrip with ctf.data but already have a > >Problem I don't seem to be able to solve myself. So if anyone has some > >advice I would be very thankful. > > > >I tried to execute preprocessing.m however when I define my relevant trials > >using > > > >cfg.trialdef.includeTrigger=['6']; > > > >I get the error message that no trials are beeing defined. > > > >Now, looking into the code of definetrial.m in line 407 the variable > >�triggerchan� is defined by triggerChan = read_ctf_trigger(cfg.dataset); > > > >The problem is that it seems like that only the �backpanel� is extracted > >from read_ctf_trigger however I would need the �frontpanel�. So > >definetrial.m later on only finds �triggerchan� with loads of zeros and can > >not match my defined trigger. > > > >Is there any reason why only one variable is taken instead of two (as it is > >done at line 455 in definetrial.m)? > > > > > >Thankful for any suggestion, > >Barbara > > > > > > > -- --------------------------- Barbara H�ndel Kognitive Neurologie Universit�tsklinikum T�bingen Hoppe-Seyler-Str. 3 D72076 Tuebingen Tel. +49(0)7071-29 82060 Fax +49(0)7071-29 5326