From sameer at ANDREW.CMU.EDU Tue Feb 6 14:32:44 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 6 Feb 2007 08:32:44 -0500 Subject: too many trials/overlapping trials Message-ID: Hello, I am currently familiarizing myself with Fieldtrip by using the information gleaned from http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:examp$g_started_with_reading_raw_eeg_or_meg_data beginning with the most basic application which starts with defining the trials. http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:getting_started_with_reading_raw_eeg_or_meg_data I use the first three lines to set up cfg, and then issue the command definetrial(cfg); Note: the data is from Elekta Neuromag 306 channel MEG. It returns some thousand odd events and finds STI 101 and STI 301 as Stim channels. So next I do the following: >> cfg = [] ; >> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >> cfg.trialdef.eventtype = 'STI101' ; >> cfg.trialdef.eventvalue = 7 ; >> cfg.trialdef.prestim = 1.500; >> cfg.trialdef.poststim = 2.501; >> cfg = definetrial(cfg); evaluating trialfunction 'trialfun_general' found 61361 events created 60 trials My first problem is, I should have 30 trials for this event. The file contains a total of 60 trials, but the other 30 are for eventtype = 11 So it is clearly doing something wrong. Next, I decided to see what is in cfg.trl and I get the Nx3 matrix that I find the following problems with it 1> each trial should be 4000 milli seconds long. That happens here, however, there seem to be overlap between trials which does not make sense. This is what leads to the double counting. Thus I get 4000 msec long trials bunched in group of two where the second trial starts about 1000 to 1300 msecs after the beginning of the first trial. 2> If the first trial is at 8502, all subsequent trials should be in increments of integral multiples of 4000 ( plus or minus a few). But that does not seem to happen (and I am looking at on the leading trial of the pair and discounting the trials that follow 1000 msecs later.) Thanks for your help. sameer From r.oostenveld at FCDONDERS.RU.NL Wed Feb 7 16:47:43 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 7 Feb 2007 16:47:43 +0100 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Dear Sameer, On 6 Feb 2007, at 14:32, Sameer Walawalkar wrote: > I use the first three lines to set up cfg, and then issue the command > definetrial(cfg); > Note: the data is from Elekta Neuromag 306 channel MEG. > > It returns some thousand odd events and finds STI 101 and STI 301 > as Stim channels. > > So next I do the following: > >>> cfg = [] ; >>> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >>> cfg.trialdef.eventtype = 'STI101' ; >>> cfg.trialdef.eventvalue = 7 ; >>> cfg.trialdef.prestim = 1.500; >>> cfg.trialdef.poststim = 2.501; >>> cfg = definetrial(cfg); > evaluating trialfunction 'trialfun_general' > found 61361 events > created 60 trials Maybe you could try cfg = [] ; cfg.dataset = 'JD_012507_Beeps_One.fif' ; cfg.trialdef.eventtype = '?'; dum = definetrial(cfg); and look what is printed on screen. > My first problem is, I should have 30 trials for this event. The file > contains a total of 60 trials, but the other 30 are for eventtype = 11 > So it is clearly doing something wrong. > Next, I decided to see what is in cfg.trl and I get the Nx3 matrix > that I find the following problems with it > > 1> each trial should be 4000 milli seconds long. That happens here, > however, there seem to be overlap between trials which does not make > sense. This is what leads to the double counting. Thus I get 4000 > msec long trials bunched in group of two where the second trial > starts about 1000 to 1300 msecs after the beginning of the first > trial. Please have a look in cfg.event. > 2> If the first trial is at 8502, all subsequent trials should be in > increments of integral multiples of 4000 ( plus or minus a few). > But that does not seem to happen (and I am looking at on the > leading trial of the pair and discounting the trials that follow > 1000 msecs later.) That means that there are events detected that are not supposed to be there according to your knowledge of the dataset. Could it be that both the positive and the negative flank of the trigger are detected? Robert From sameer at ANDREW.CMU.EDU Wed Feb 7 17:30:26 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 7 Feb 2007 11:30:26 -0500 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Thanks for the reply Robert. here's some more info. > Dear Sameer, > > Maybe you could try > cfg = [] ; > cfg.dataset = 'JD_012507_Beeps_One.fif' ; > cfg.trialdef.eventtype = '?'; > dum = definetrial(cfg); > and look what is printed on screen. evaluating trialfunction 'trialfun_general' the following events were found in the datafile event type: 'STI101' with event values: 5 6 7 8 9 11 15 16388 16391 16392 16396 event type: 'STI301' with event values: 5.0003 5.0018 ...(many more...) event type: 'trial' with event values: no trials have been defined yet, see DEFINETRIAL for further help found 61361 events created 0 trials (I address another point at the bottom of the email. I have left the following paragraphs in for refrence) >> My first problem is, I should have 30 trials for this event. The file >> contains a total of 60 trials, but the other 30 are for eventtype = 11 >> So it is clearly doing something wrong. > >> Next, I decided to see what is in cfg.trl and I get the Nx3 matrix that I >> find the following problems with it >> >> 1> each trial should be 4000 milli seconds long. That happens here, >> however, there seem to be overlap between trials which does not make >> sense. This is what leads to the double counting. Thus I get 4000 msec long >> trials bunched in group of two where the second trial starts about 1000 to >> 1300 msecs after the beginning of the first trial. > > Please have a look in cfg.event. > >> 2> If the first trial is at 8502, all subsequent trials should be in >> increments of integral multiples of 4000 ( plus or minus a few). But that >> does not seem to happen (and I am looking at on the leading trial of the >> pair and discounting the trials that follow 1000 msecs later.) > > That means that there are events detected that are not supposed to be there > according to your knowledge of the dataset. Could it be that both the > positive and the negative flank of the trigger are detected? I have looked into this as it was the first thing I suspected. What has been confusing me is that it seems to be counting the rising flank of the correct trigger and the falling flank of the earlier trigger, even though the event type for the earlier trigger is different. I am looking for cfg.trialdef.eventtype = 'STI101' and cfg.trialdef.eventvalue = 7 or 11. The earlier falling trigger is 5,6 or 8.9 and so should not be considered at all. I never use STI301 sameer From r.oostenveld at FCDONDERS.RU.NL Wed Feb 7 21:43:37 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 7 Feb 2007 21:43:37 +0100 Subject: New statistics In-Reply-To: <000001c74495$5f6aa930$f0463ec1@sobell.ion.ucl.ac.uk> Message-ID: Hi Vladimir, On 30 Jan 2007, at 18:37, Vladimir Litvak wrote: > I'm trying to switch from clusterrandanalysis to the new statistics > routines. I made my best to configure the new routine in a way that > would yield results identical to the old routine, but the results I > get are very different. I put an example athttp:// > download.yousendit.com/7CE5F69B35B1C739 . Please check what's going > on. I looked in the script and data that you have sent and notice that >> cfg.design ans = 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 >> size(cfg.design) ans = 2 22 and furthermore >> size(freqavg{1}.powspctrm) ans = 22 1 50 965 >> size(freqavg{2}.powspctrm) ans = 22 1 50 965 So even though you seem to have 22+22=44 observations/subjects in the data, you are only using 22 in the design to compute your statistical contrast: You are actually computing the contast between the first 11 subjects in the first condition versus the second 11 subjects in the first condition. Your design probably should be cfg.design = [ 1:22 1:22 % subject index, runs from 1 to 22 (twice, since paired data) 1*ones(1,22) 2*ones(1,22) % condition number, is either 1 or 2 ]; best regards, Robert From Brian.Roach at YALE.EDU Thu Feb 8 18:25:21 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Thu, 8 Feb 2007 12:25:21 -0500 Subject: sourceanalysis.m on EEG data Message-ID: I am working through this tutorial on the web: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?%20id=fieldtrip:documentation:tutorial:beamformer#plot_the_result I am wondering, do you only need to use MRIviewer to construct a forward model for MEG data (and not for EEG data)? What kind of software do I need to use to construct an .hdm file for EEG data? thanks! Brian From sameer at ANDREW.CMU.EDU Thu Feb 8 18:52:11 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 8 Feb 2007 12:52:11 -0500 Subject: ??? Undefined command/function 'componentanalysis'. Message-ID: Hello, I am interested in doing independent component analysis (for removing blinks) on my data. But it seems my fieldtrip download did not include the file componentanalysis and I get the following error (visual inspection of folder with the fieldtrip installation confirms too). >> comp = componentanalysis(cfg, dataLL); ??? Undefined command/function 'componentanalysis'. I have downloaded the latest version available today. Is it available differently? thanks, sameer From sameer at ANDREW.CMU.EDU Thu Feb 8 18:59:06 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 8 Feb 2007 12:59:06 -0500 Subject: generating data structure for all trials Message-ID: Hello, My basic question is: Can definetrial be used in such a way as to create the data structure without breaking the data up into trials? or Is there some other way to generate the data structure with all its fields without breaking the data up into trials? What follows is a bit more information. The first twenty independent components of my data acquired by using EEGlab or fastICA contain blinks, heart beats and other extraneous signals which I can subtract. I can infact do all the preprocessing on my data that Fieldtrip can do. The problem is in order to now use Fieldtrip for further analysis (I want to eventually do DICS), I have to generate the data structure with all its fields as fieldtrip likes it, and that seems tedious. Hence I want to stick with Fieldtrip all the way. However, while using Fieldtrip, the first point where a MATLAB variable containing data is created is during trial definition at data = preprocessing(cfg); (from online tutorial) Trial rejections, and independent component analysis is done after this. Instead I would prefer to use independent component analysis first to remove blinks etc, then do channels and trial rejections, and then do the trial definitions based on event types etc. Central to this is having the structure data with all its fields defined before using componentanalysis.m. Can definetrial be used in such a way as to create the data structure without breaking the data up into trials? Is there some other way to generate this structure without breaking the data up into trials? thanks, sameer From tomh at KURAGE.NIMH.NIH.GOV Thu Feb 8 19:40:27 2007 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd (NIH/NIMH) [E]) Date: Thu, 8 Feb 2007 13:40:27 -0500 Subject: Reading in data from a new CTF system with ECC In-Reply-To: <06112915111720_2800013E@mpih-frankfurt.mpg.de> Message-ID: I usually do something like: T0 = -.3; T1 = .75; mark = 'beep'; cfg = []; cfg.dataset = 'BJVWOZGQ_pacing_20050712_01-f.ds'; cfg.trialdef.eventtype = mark; cfg.trialdef.prestim = -T0; cfg.trialdef.poststim = T1; cfg.channel = { 'MLC11' 'MLC22' }; cfg.blc = 'yes'; cfg.detrend = 'yes'; #cfg.hilbert = 'yes'; cfg.bpfilter = 'yes'; cfg.bpfreq = [1. 50.]; [data] = preprocessing(cfg); I have the same kind of system. Check my tools at http://kurage.nimh.nih.gov/, especially parsemarks, which is helpful for writing scripts that recode the UPPT001 data. -- Tom Holroyd, Ph.D. We experience the world not as it is, but as we expect it to be. From litvak at TX.TECHNION.AC.IL Thu Feb 8 20:24:32 2007 From: litvak at TX.TECHNION.AC.IL (Vladimir Litvak) Date: Thu, 8 Feb 2007 19:24:32 -0000 Subject: New statistics In-Reply-To: Message-ID: Hi Robert, Stupid mistake indeed, but even after fixing it the results are not the same. There is a very nice big positive cluster in the gamma range I get with clusterrandanalysis that is completely absent in the new result. Since the effect is pretty clear in the raw data I think there is still a problem. Please run the fixed version with and compare the old results with new. Thanks, Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Wednesday, February 07, 2007 8:44 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] New statistics Hi Vladimir, On 30 Jan 2007, at 18:37, Vladimir Litvak wrote: > I'm trying to switch from clusterrandanalysis to the new statistics > routines. I made my best to configure the new routine in a way that > would yield results identical to the old routine, but the results I > get are very different. I put an example athttp:// > download.yousendit.com/7CE5F69B35B1C739 . Please check what's going > on. I looked in the script and data that you have sent and notice that >> cfg.design ans = 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 >> size(cfg.design) ans = 2 22 and furthermore >> size(freqavg{1}.powspctrm) ans = 22 1 50 965 >> size(freqavg{2}.powspctrm) ans = 22 1 50 965 So even though you seem to have 22+22=44 observations/subjects in the data, you are only using 22 in the design to compute your statistical contrast: You are actually computing the contast between the first 11 subjects in the first condition versus the second 11 subjects in the first condition. Your design probably should be cfg.design = [ 1:22 1:22 % subject index, runs from 1 to 22 (twice, since paired data) 1*ones(1,22) 2*ones(1,22) % condition number, is either 1 or 2 ]; best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Thu Feb 8 21:52:24 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 8 Feb 2007 21:52:24 +0100 Subject: New statistics In-Reply-To: <002201c74bb6$c2fb2b00$f0463ec1@sobell.ion.ucl.ac.uk> Message-ID: Hi Vladimir On 8 Feb 2007, at 20:24, Vladimir Litvak wrote: > Stupid mistake indeed, but even after fixing it the results are not > the > same. There is a very nice big positive cluster in the gamma range > I get > with clusterrandanalysis that is completely absent in the new > result. Since > the effect is pretty clear in the raw data I think there is still a > problem. > > Please run the fixed version with and compare the old results with > new. I only compared the observed statistics in both cases, and they were the same with the proper design matrix. The gamma blob that I noticed was identical in both versions, and the clusters hence should be the same (assuming you use the same clusterthreshold). I have not run the two versions 1000 times each to compare the p-values of each cluster, but from what you now write, I understand that the p-values of this gamma cluster are different. Am I right? I will run the 1000 randomizations to see whether the p-values are different, but please do check the presense of the gabba-blob cluster and the threshold setting first. Robert From c.hesse at FCDONDERS.RU.NL Fri Feb 9 09:33:17 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 9 Feb 2007 09:33:17 +0100 Subject: generating data structure for all trials In-Reply-To: Message-ID: Hi Sameer, first of all (in reference to your other email): have you managed to get hold of the componentanalysis function yet? On 8 Feb 2007, at 18:59, Sameer Walawalkar wrote: > Hello, > > My basic question is: > > Can definetrial be used in such a way as to create the data > structure without breaking the data up into trials? or Is there > some other way to generate the data structure with all its fields > without breaking the data up into trials? In principle you could define a single trial that contains all of your data, but you don't really want to do that. > What follows is a bit more information. > > > The first twenty independent components of my data acquired by using > EEGlab or fastICA contain blinks, heart beats and other extraneous > signals which I can subtract. I can infact do all the preprocessing > on my data that Fieldtrip can do. The problem is in order to now > use Fieldtrip for further analysis (I want to eventually do DICS), > I have to generate the data structure with all its fields as > fieldtrip likes it, and that seems tedious. > > Hence I want to stick with Fieldtrip all the way. > > However, while using Fieldtrip, the first point where a MATLAB > variable > containing data is created is during trial definition at > data = preprocessing(cfg); (from online tutorial) > Trial rejections, and independent component analysis is done after > this. > > Instead I would prefer to use independent component analysis > first to > remove blinks etc, then do channels and trial rejections, and then > do the > trial definitions based on event types etc. > > Central to this is having the structure data with all its fields > defined > before using componentanalysis.m. Can definetrial be used in such > a way > as to create the data structure without breaking the data up into > trials? > > Is there some other way to generate this structure without breaking > the > data up into trials? > some of the low-level I/O functions can read the data into a matrix for you, but then the housekeeping becomes awkward if you later want to extract the trials (it is doable, but I really do not recommend it). The function componentanalysis actually concatenates all trials before estimating the ICA model, so the fact that pre-processed data is split into trials is not an obstacle to doing what you want to do. Sure, you might miss out a few bits of data between trials, but as such that does not matter in ICA (e.g., infomax, fastica) anyway, since it treats the data as a random variables and not time-series. I would just try doing the ICA on the trial-based data, remove the artifacts and then see if it sufficiently improves your analysis. You could always define your trials in such a way that they correspond to the "raw" signal when you concatenate them. One more thing: if you need (or want) to remove channels from your data then either do it as part of the ICA (if the bad channels don't make the ICA "fall over") or remove them first and then do ICA. Doing ICA first to remove only ocular artifacts, then recombining the signals and rejecting channels strikes me as a potentially problematic approach. Hope this helps. Christian p.s. another (and somewhat unorthodox from a FT perspective) solution might be to do ICA as you have been outside of Fieldtrip and simply apply the de-mixing (W) matrix to your trialbased data in Fieldtrip (need to keep track of the channel labels though!). That might be the solution closest to your wishes. You would have to rescale as follows though (assuming square W): A = inv(W), set columns of A to unit norm, W = inv(A). -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Fri Feb 9 09:45:42 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 9 Feb 2007 09:45:42 +0100 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Hi Sameer, as far as I can follow the discussion there appear to be quite a few triggers in your data whose values are not 7 or 11 ... I assume you know where they come from? What might be helpful is if you could provide a little more detail about your data collection and especially the triggers on each trial. Thanks, Christian On 7 Feb 2007, at 17:30, Sameer Walawalkar wrote: > Thanks for the reply Robert. here's some more info. > >> Dear Sameer, >> >> Maybe you could try >> cfg = [] ; >> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >> cfg.trialdef.eventtype = '?'; >> dum = definetrial(cfg); >> and look what is printed on screen. > > evaluating trialfunction 'trialfun_general' > the following events were found in the datafile > event type: 'STI101' with event values: 5 6 7 8 > 9 11 15 16388 16391 16392 16396 > event type: 'STI301' with event values: 5.0003 5.0018 ...(many > more...) > event type: 'trial' with event values: > no trials have been defined yet, see DEFINETRIAL for further help > found 61361 events > created 0 trials > > (I address another point at the bottom of the email. I have left > the following paragraphs in for refrence) > >>> My first problem is, I should have 30 trials for this event. The >>> file >>> contains a total of 60 trials, but the other 30 are for eventtype >>> = 11 >>> So it is clearly doing something wrong. >> >>> Next, I decided to see what is in cfg.trl and I get the Nx3 >>> matrix that I find the following problems with it >>> 1> each trial should be 4000 milli seconds long. That happens here, >>> however, there seem to be overlap between trials which does not make >>> sense. This is what leads to the double counting. Thus I get 4000 >>> msec long trials bunched in group of two where the second trial >>> starts about 1000 to 1300 msecs after the beginning of the first >>> trial. >> >> Please have a look in cfg.event. >> >>> 2> If the first trial is at 8502, all subsequent trials should be in >>> increments of integral multiples of 4000 ( plus or minus a few). >>> But that does not seem to happen (and I am looking at on the >>> leading trial of the pair and discounting the trials that follow >>> 1000 msecs later.) >> >> That means that there are events detected that are not supposed to >> be there according to your knowledge of the dataset. Could it be >> that both the positive and the negative flank of the trigger are >> detected? > > > I have looked into this as it was the first thing I suspected. What > has been confusing me is that it seems to be counting the rising > flank of the correct trigger and the falling flank of the earlier > trigger, even though the event type for the earlier trigger is > different. I am looking for > cfg.trialdef.eventtype = 'STI101' and > cfg.trialdef.eventvalue = 7 or 11. > The earlier falling trigger is 5,6 or 8.9 and so should not be > considered at all. I never use STI301 > > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak at TX.TECHNION.AC.IL Fri Feb 9 12:54:57 2007 From: litvak at TX.TECHNION.AC.IL (Vladimir Litvak) Date: Fri, 9 Feb 2007 11:54:57 -0000 Subject: New statistics In-Reply-To: <48BA8DBF-F4BC-45A2-A36C-ED93D2ED8828@fcdonders.ru.nl> Message-ID: Hi Robert, It was a graphics problem. I can see the cluster now. Thanks, Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Thursday, February 08, 2007 8:52 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] New statistics Hi Vladimir On 8 Feb 2007, at 20:24, Vladimir Litvak wrote: > Stupid mistake indeed, but even after fixing it the results are not > the > same. There is a very nice big positive cluster in the gamma range > I get > with clusterrandanalysis that is completely absent in the new > result. Since > the effect is pretty clear in the raw data I think there is still a > problem. > > Please run the fixed version with and compare the old results with > new. I only compared the observed statistics in both cases, and they were the same with the proper design matrix. The gamma blob that I noticed was identical in both versions, and the clusters hence should be the same (assuming you use the same clusterthreshold). I have not run the two versions 1000 times each to compare the p-values of each cluster, but from what you now write, I understand that the p-values of this gamma cluster are different. Am I right? I will run the 1000 randomizations to see whether the p-values are different, but please do check the presense of the gabba-blob cluster and the threshold setting first. Robert From muthuraman10 at HOTMAIL.COM Fri Feb 9 13:05:51 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Fri, 9 Feb 2007 12:05:51 +0000 Subject: Frequency Analysis! Message-ID: Hello , Thankyou JM, for the suggestions regarding the Time-Frequency Analysis, it works well now. I need the time information inorder to see what happens to the power at a specific time interval. >>From the previous discussion for the Freqanalysis_mtmwelch method as Prof.Robert as suggested i tried to change the frequency resolution to 1 Hz in the Mtmwelch method. Now i get all the values to be Nan's. cfg.foi = [2:1:30]; cfg.t_ftimwin = ones(1,length(cfg.foi)).*1; And also is there way to load the Laplacian transformed data to the Fieldtip analysis which is a .mat file and work on it for the coherence analysis. I do the laplacian transformation and the welch periodogram method with my own programs not any software. With regards M.Muthuraman. _________________________________________________________________ Catch all the cricketing action right here. Live score, match reports, photos et al. http://content.msn.co.in/Sports/Cricket/Default.aspx From c.hesse at FCDONDERS.RU.NL Fri Feb 9 16:21:15 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 9 Feb 2007 16:21:15 +0100 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Hi Sameer, thanks for the additional info and data from the STI101 channel you sent me. I think that the double counting of your triggers must be caused by the way that the function "trialfun_general.m" computes the (valid) flanks for your data format (e.g., line 467, and see all the comments in lines nearby). Using the content of your STI101 channel (referred to as x below) I was unable to reproduce the double counting using a slightly simpler approach: d = [0, diff(x)]; ii = find((d~=0) & (x==7)); % length(ii) gives 30 ii = find((d~=0) & (x==11)); % length(ii) gives 30 For the time being, the easiest solution (in my view, since you have the STI101 channel) is to construct the "trl" matrix from the content of the ii arrays above for each trigger, and copy this into the cfg structure used to call preprocessing.m: cfg.trl = trl; The more elegant solution in a Fieldtrip sense is to write your own trialfun, which would consist of wrapper code around the essential operations outlined above. I suggest you have a closer look at the code and documentation in preprocessing.m and definetrial.m if you decide to pursue this route. Hope this helps, Christian On 7 Feb 2007, at 17:30, Sameer Walawalkar wrote: > Thanks for the reply Robert. here's some more info. > >> Dear Sameer, >> >> Maybe you could try >> cfg = [] ; >> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >> cfg.trialdef.eventtype = '?'; >> dum = definetrial(cfg); >> and look what is printed on screen. > > evaluating trialfunction 'trialfun_general' > the following events were found in the datafile > event type: 'STI101' with event values: 5 6 7 8 > 9 11 15 16388 16391 16392 16396 > event type: 'STI301' with event values: 5.0003 5.0018 ...(many > more...) > event type: 'trial' with event values: > no trials have been defined yet, see DEFINETRIAL for further help > found 61361 events > created 0 trials > > (I address another point at the bottom of the email. I have left > the following paragraphs in for refrence) > >>> My first problem is, I should have 30 trials for this event. The >>> file >>> contains a total of 60 trials, but the other 30 are for eventtype >>> = 11 >>> So it is clearly doing something wrong. >> >>> Next, I decided to see what is in cfg.trl and I get the Nx3 >>> matrix that I find the following problems with it >>> 1> each trial should be 4000 milli seconds long. That happens here, >>> however, there seem to be overlap between trials which does not make >>> sense. This is what leads to the double counting. Thus I get 4000 >>> msec long trials bunched in group of two where the second trial >>> starts about 1000 to 1300 msecs after the beginning of the first >>> trial. >> >> Please have a look in cfg.event. >> >>> 2> If the first trial is at 8502, all subsequent trials should be in >>> increments of integral multiples of 4000 ( plus or minus a few). >>> But that does not seem to happen (and I am looking at on the >>> leading trial of the pair and discounting the trials that follow >>> 1000 msecs later.) >> >> That means that there are events detected that are not supposed to >> be there according to your knowledge of the dataset. Could it be >> that both the positive and the negative flank of the trigger are >> detected? > > > I have looked into this as it was the first thing I suspected. What > has been confusing me is that it seems to be counting the rising > flank of the correct trigger and the falling flank of the earlier > trigger, even though the event type for the earlier trigger is > different. I am looking for > cfg.trialdef.eventtype = 'STI101' and > cfg.trialdef.eventvalue = 7 or 11. > The earlier falling trigger is 5,6 or 8.9 and so should not be > considered at all. I never use STI301 > > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 9 20:35:36 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 9 Feb 2007 14:35:36 -0500 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Thanks for your email. I tried to look into trialfun_general.m file, but the one I have is only 286 lines long. I looked into preprocessing.m, just in case you meant it rather than trialfun_general.m and it is 432 lines long. sameer On Fri, 9 Feb 2007, Christian Hesse wrote: > Hi Sameer, > > thanks for the additional info and data from the STI101 channel you sent me. > > I think that the double counting of your triggers must be caused by the way > that the function "trialfun_general.m" computes the (valid) flanks for your > data format (e.g., line 467, and see all the comments in lines nearby). Using > the content of your STI101 channel (referred to as x below) I was unable to > reproduce the double counting using a slightly simpler approach: > > d = [0, diff(x)]; > ii = find((d~=0) & (x==7)); > % length(ii) gives 30 > ii = find((d~=0) & (x==11)); > % length(ii) gives 30 > > For the time being, the easiest solution (in my view, since you have the > STI101 channel) is to construct the "trl" matrix from the content of the ii > arrays above for each trigger, and copy this into the cfg structure used to > call preprocessing.m: > cfg.trl = trl; > > The more elegant solution in a Fieldtrip sense is to write your own trialfun, > which would consist of wrapper code around the essential operations outlined > above. I suggest you have a closer look at the code and documentation in > preprocessing.m and definetrial.m if you decide to pursue this route. > > Hope this helps, > Christian > > > > > > On 7 Feb 2007, at 17:30, Sameer Walawalkar wrote: > >> Thanks for the reply Robert. here's some more info. >> >>> Dear Sameer, >>> >>> Maybe you could try >>> cfg = [] ; >>> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >>> cfg.trialdef.eventtype = '?'; >>> dum = definetrial(cfg); >>> and look what is printed on screen. >> >> evaluating trialfunction 'trialfun_general' >> the following events were found in the datafile >> event type: 'STI101' with event values: 5 6 7 8 9 11 >> 15 16388 16391 16392 16396 >> event type: 'STI301' with event values: 5.0003 5.0018 ...(many >> more...) >> event type: 'trial' with event values: >> no trials have been defined yet, see DEFINETRIAL for further help >> found 61361 events >> created 0 trials >> >> (I address another point at the bottom of the email. I have left the >> following paragraphs in for refrence) >> >>>> My first problem is, I should have 30 trials for this event. The file >>>> contains a total of 60 trials, but the other 30 are for eventtype = 11 >>>> So it is clearly doing something wrong. >>> >>>> Next, I decided to see what is in cfg.trl and I get the Nx3 matrix that I >>>> find the following problems with it >>>> 1> each trial should be 4000 milli seconds long. That happens here, >>>> however, there seem to be overlap between trials which does not make >>>> sense. This is what leads to the double counting. Thus I get 4000 msec >>>> long trials bunched in group of two where the second trial starts about >>>> 1000 to 1300 msecs after the beginning of the first trial. >>> >>> Please have a look in cfg.event. >>> >>>> 2> If the first trial is at 8502, all subsequent trials should be in >>>> increments of integral multiples of 4000 ( plus or minus a few). But that >>>> does not seem to happen (and I am looking at on the leading trial of the >>>> pair and discounting the trials that follow 1000 msecs later.) >>> >>> That means that there are events detected that are not supposed to be >>> there according to your knowledge of the dataset. Could it be that both >>> the positive and the negative flank of the trigger are detected? >> >> >> I have looked into this as it was the first thing I suspected. What has >> been confusing me is that it seems to be counting the rising flank of the >> correct trigger and the falling flank of the earlier trigger, even though >> the event type for the earlier trigger is different. I am looking for >> cfg.trialdef.eventtype = 'STI101' and >> cfg.trialdef.eventvalue = 7 or 11. >> The earlier falling trigger is 5,6 or 8.9 and so should not be considered >> at all. I never use STI301 >> >> sameer >> > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > > From sameer at ANDREW.CMU.EDU Fri Feb 9 23:28:04 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 9 Feb 2007 17:28:04 -0500 Subject: binica in fieldtrip Message-ID: Hello, I am running componentanalysis.m within fieldtrip to do ICA in order to remove blinks etc. I tried using cfg.method = 'fastICA' cfg.trials = 1:100 (data has 306 channels) but got failure to converge on 19th ica and analysis was aborted. Does anyone have any ideas about dealing with this? I also tried cfg.method = 'runica' cfg.trials = 1:100 but it takes a very looooong time. Any ways around it? I know that one can implement binica in EEGLAB. It is supposed to be 12 xs faster and can use smaller memory. Can I implement cfg.method = 'binica'? in fieldtrip? thanks, sameer From s.debener at UKE.UNI-HAMBURG.DE Fri Feb 9 22:46:41 2007 From: s.debener at UKE.UNI-HAMBURG.DE (Stefan Debener) Date: Fri, 9 Feb 2007 22:46:41 +0100 Subject: binica in fieldtrip In-Reply-To: Message-ID: Dear Sameer, Try running extended infomax ICA with the PCA option switched on and a reduction to about 50 components. This should speed up the decomposition substantially, and return nice eye blink components. If you do not get dipolar-like component maps, your data may suffer from substantial head movements. Temporal ICA expects that the sensors-to-source configuration remains unchanged during recording. I have not done systematic comparisons myself, but know from others that fastICA is not necessarily that. It can be even slower that other ICA algorithms... Hope this helps, Stefan Sameer Walawalkar wrote: > Hello, > > I am running componentanalysis.m within fieldtrip to do ICA in order > to remove blinks etc. I tried using > > cfg.method = 'fastICA' > cfg.trials = 1:100 (data has 306 channels) > but got failure to converge on 19th ica and analysis was aborted. > Does anyone have any ideas about dealing with this? > > I also tried > cfg.method = 'runica' cfg.trials = 1:100 > > but it takes a very looooong time. > > Any ways around it? I know that one can implement binica in EEGLAB. It > is supposed to be 12 xs faster and can use smaller memory. > > Can I implement cfg.method = 'binica'? in fieldtrip? > > thanks, > sameer > > From sameer at ANDREW.CMU.EDU Sun Feb 11 17:40:36 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 11 Feb 2007 11:40:36 -0500 Subject: No subject Message-ID: Hi, I am interested in removing blinks and other artifacts from my MEG data. Many of these artifacts can be visually identified. And from my experience with EEGLAB and fastICA, the first 19-20 independent components in my data seem to be artifacts. After doing (from http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:use_independent_component_analysis_ica_to_remove_ecg_artifacts) comp = componentanalysis(cfg, data); what command can I use in order to visually identify which components I should remove, In other words, how do I plot the components (like in EEGlab) before I can use the command to remove the components? Finally, while trying to see the spatial topography of the signals, using >> lay = createlayout('neuromag306.lay'); gives me error ??? Undefined command/function 'createlayout' even though the createlayout.m file exists in the private folder. (I am aware this might be a matlab problem and am looking into that too.) Thanks, sameer From Jan.Schoffelen at FCDONDERS.RU.NL Mon Feb 12 08:43:23 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 12 Feb 2007 08:43:23 +0100 Subject: No subject In-Reply-To: Message-ID: Hi Sameer, To start with your last question: >Finally, while trying to see the spatial topography of the signals, >using > >> lay = createlayout('neuromag306.lay'); >gives me error > ??? Undefined command/function 'createlayout' >even though the createlayout.m file exists in the private folder. (I am >aware this might be a matlab problem and am looking into that too.) The problem you mention is probably due to the fact, that createlayout is inside the private-folder. M-files which are located within the folder which contains the private-folder, have access to the functions which are private. However, private functions cannot be accessed from the command-line. You might try copying createlayout to a location which is on your matlab-path and retry the command. >After doing (from >http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:u >se_independent_component_analysis_ica_to_remove_ecg_artifacts) > > comp = componentanalysis(cfg, data); > >what command can I use in order to visually identify which >components I should remove, In other words, how do I plot the components >(like in EEGlab) before I can use the command to remove the components? Identifying the artifactual components can be done in a variety of ways: 1 you can plot the spatial topography, as specified in comp.comp. Artifacts often have a typical topography. 2 if you recorded an ECG-channel you can compute a QRS-complex triggered average, to identify those components being ECG-like. (Or similarly, you can compute coherence between the external ECG and your components). 3 eye-movements and muscle artifacts betray themselves by their spatial topography and time course. Yours, Jan-Mathijs From Jan.Schoffelen at FCDONDERS.RU.NL Mon Feb 12 08:47:43 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 12 Feb 2007 08:47:43 +0100 Subject: binica in fieldtrip In-Reply-To: Message-ID: Hi Sameer, Everyone is greatly encouraged to implement new features into fieldtrip. As a matter, that's the whole idea behind it. I don't know what the sampling rate of your data is, but what might help to reduce computation time, is to downsample the data before doing componentanalysis, using resampledata. Typically, artifacts of interest have a frequency < 100 Hz, so downsampling to 256 Hz doesn't hurt too much. Yours again, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Friday, February 09, 2007 11:28 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] binica in fieldtrip Hello, I am running componentanalysis.m within fieldtrip to do ICA in order to remove blinks etc. I tried using cfg.method = 'fastICA' cfg.trials = 1:100 (data has 306 channels) but got failure to converge on 19th ica and analysis was aborted. Does anyone have any ideas about dealing with this? I also tried cfg.method = 'runica' cfg.trials = 1:100 but it takes a very looooong time. Any ways around it? I know that one can implement binica in EEGLAB. It is supposed to be 12 xs faster and can use smaller memory. Can I implement cfg.method = 'binica'? in fieldtrip? thanks, sameer From Jan.Schoffelen at FCDONDERS.RU.NL Mon Feb 12 08:57:28 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 12 Feb 2007 08:57:28 +0100 Subject: Frequency Analysis! In-Reply-To: Message-ID: Dear Muthuraman, For the mtmwelch-method, the same caveats apply as to the mtmconvol-method. If you specify your window to be one second, and your data is also one second (perhaps even one sample less? Did you check this, a lonely sample is easily lost), then there is nothing to welch (because your data can be only split up in one overlapping segment of one second, or even cannot be split up at all, dependent on your data: see above). In the following link you find some info how to create fieldtrippish data-objects in matlab: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:da taformats You can read in your laplacian transformed data into matlab and create a data-structure (some hints are given in the link). Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Friday, February 09, 2007 1:06 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Frequency Analysis! Hello , Thankyou JM, for the suggestions regarding the Time-Frequency Analysis, it works well now. I need the time information inorder to see what happens to the power at a specific time interval. >>From the previous discussion for the Freqanalysis_mtmwelch method as Prof.Robert as suggested i tried to change the frequency resolution to 1 Hz in the Mtmwelch method. Now i get all the values to be Nan's. cfg.foi = [2:1:30]; cfg.t_ftimwin = ones(1,length(cfg.foi)).*1; And also is there way to load the Laplacian transformed data to the Fieldtip analysis which is a .mat file and work on it for the coherence analysis. I do the laplacian transformation and the welch periodogram method with my own programs not any software. With regards M.Muthuraman. _________________________________________________________________ Catch all the cricketing action right here. Live score, match reports, photos et al. http://content.msn.co.in/Sports/Cricket/Default.aspx From c.hesse at FCDONDERS.RU.NL Mon Feb 12 09:51:07 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 12 Feb 2007 09:51:07 +0100 Subject: binica in fieldtrip In-Reply-To: Message-ID: Hi Sameer, when using any ICA algorithm in Fiieldtrip, you must, of course, specify and pass the usual algorithm control parameters, since the componentanalysis funcntion is only a wrapper. As I mentioned in a previous email, you need to do model order selection (i.e. choose the number of ICs) and often reduce the dimension of your data (usually the same as the number of ICs). For FastICA you probably also want to specify the nonlinearity and whether the components are to be estimated one by one or all together. Please see the relevant documentation in the FastICA Matlab package. With the appropriate data dimension reduction, the performance of FastICA (tanh nonlinearity and symmetric approach) and Infomax should be essentially the same, so I suggest you pick whichever method you can get to work. You may also want to try the JADE algorithm (fine if you reduce data dimension). Hope that helps, Christian On 9 Feb 2007, at 23:28, Sameer Walawalkar wrote: > Hello, > > I am running componentanalysis.m within fieldtrip to do ICA in > order to remove blinks etc. I tried using > > cfg.method = 'fastICA' > cfg.trials = 1:100 (data has 306 channels) > but got failure to converge on 19th ica and analysis was aborted. > Does anyone have any ideas about dealing with this? > > I also tried > cfg.method = 'runica' cfg.trials = 1:100 > > but it takes a very looooong time. > > Any ways around it? I know that one can implement binica in EEGLAB. > It is supposed to be 12 xs faster and can use smaller memory. > > Can I implement cfg.method = 'binica'? in fieldtrip? > > thanks, > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Mon Feb 12 17:54:40 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 12 Feb 2007 11:54:40 -0500 Subject: No subject In-Reply-To: <001801c74e79$79498860$902dae83@fcdonders.nl> Message-ID: createlayout has new problems : ??? Error using ==> createlayout could not open electrode file: neuromag306 The field trip directory contains many layout files but not the ones useful for neuromag. How does one go about making one? sameer On Mon, 12 Feb 2007, Jan Mathijs Schoffelen wrote: > Hi Sameer, > > To start with your last question: > >> Finally, while trying to see the spatial topography of the signals, >> using >> >> lay = createlayout('neuromag306.lay'); >> gives me error >> ??? Undefined command/function 'createlayout' >> even though the createlayout.m file exists in the private folder. (I am >> aware this might be a matlab problem and am looking into that too.) > > The problem you mention is probably due to the fact, that createlayout is > inside the private-folder. M-files which are located within the folder which > contains the private-folder, have access to the functions which are private. > However, private functions cannot be accessed from the command-line. You > might try copying createlayout to a location which is on your matlab-path > and retry the command. > >> After doing (from >> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:u >> se_independent_component_analysis_ica_to_remove_ecg_artifacts) >> >> comp = componentanalysis(cfg, data); >> >> what command can I use in order to visually identify which >> components I should remove, In other words, how do I plot the components >> (like in EEGlab) before I can use the command to remove the components? > > Identifying the artifactual components can be done in a variety of ways: > 1 you can plot the spatial topography, as specified in comp.comp. Artifacts > often have a typical topography. > 2 if you recorded an ECG-channel you can compute a QRS-complex triggered > average, to identify those components being ECG-like. (Or similarly, you can > compute coherence between the external ECG and your components). > 3 eye-movements and muscle artifacts betray themselves by their spatial > topography and time course. > > Yours, > > Jan-Mathijs > > From Brian.Roach at YALE.EDU Mon Feb 12 18:17:07 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Mon, 12 Feb 2007 12:17:07 -0500 Subject: sourceanalysis.m on EEG data In-Reply-To: <6.1.2.0.2.20070208122223.01e48d98@email.med.yale.edu> Message-ID: Sorry, I am a beginner in the source localization realm. I am still wondering what software to use with EEG data - we have a polhemus system, which creates a .hdm file - but is that the same type referred to in the tutorial below? Also, do this software: http://neuroimage.usc.edu/brainstorm/ interact with fieldTrip at all? Have any FieldTrip users had any experience with it? If not, where can I download the MRIviewer software mentioned in the tutorial (in the link below). thanks for any info, it is greatly appreciated! Brian At 12:25 PM 2/8/2007, Brian Roach wrote: >I am working through this tutorial on the web: > >http://www2.ru.nl/fcdonders/fieldtrip/doku.php?%20id=fieldtrip:documentation:tutorial:beamformer#plot_the_result > >I am wondering, do you only need to use MRIviewer to construct a forward >model for MEG data (and not for EEG data)? What kind of software do I >need to use to construct an .hdm file for EEG data? > >thanks! >Brian > From r.oostenveld at FCDONDERS.RU.NL Mon Feb 12 20:28:52 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 12 Feb 2007 20:28:52 +0100 Subject: generating data structure for all trials In-Reply-To: Message-ID: Hi Sameer, To add a few statements to Christians reply On 8 Feb 2007, at 18:59, Sameer Walawalkar wrote: > However, while using Fieldtrip, the first point where a MATLAB > variable > containing data is created is during trial definition at > data = preprocessing(cfg); (from online tutorial) > Trial rejections, and independent component analysis is done after > this. > > Instead I would prefer to use independent component analysis > first to > remove blinks etc, then do channels and trial rejections, and then > do the > trial definitions based on event types etc. If you do everything in FT, then you would do it like this definetrial -> preprocessing -> componentanalysis -> rejectcomponent -> freqananlysis -> sourceanalysis -> sourcestatistics and the datastructures would look like only cfg -> raw data (1) -> raw data (2) -> raw data (3) -> freq -> source -> source So the same datastructures are used multiple times, only the content slightly changes. Even if you decide not to do everything within FT, it is relevant to know that there are not that many data structures in FT and that raw data can be used in multiple fashions. Regarding the raw data above - the 1st raw data is the original. It is cut into segments, and could in principle be a single segment but that is probably not desirable for the freqanalysis later (and certainly not for statistics in the end). - the 2nd raw data consists of the component timecourses, and includes the ICA mixing matrix - the 3rd raw data is again mixed and contains channel data, but now without the artifacts Using the same raw data representation allows us to do freqanalysis or timelockanalysis on both channel-level "raw" data and on ICA-level "raw" data. I don't think that rejectcomponent is in the ftp version, please find it attached. I will also put it on the ftp server. Also have a look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:use_independent_component_analysis_ica_to_rem ove_ecg_artifacts best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: rejectcomponent.m Type: application/octet-stream Size: 3451 bytes Desc: not available URL: From werkle at MPIB-BERLIN.MPG.DE Mon Feb 12 20:39:40 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Mon, 12 Feb 2007 20:39:40 +0100 Subject: Question concerning statistics in fieldtrip Message-ID: Dear, in my PhD studies, I am working on lifespan differences on binding processes during visual perception. And for most parts of my ERP and TFR analyses, I use Fieldtrip - and it works fine. But currently, I'm a bit puzzled, how to set up appropriate statistical tests for my power and phase-locking analyses. Perhaps, I first describe my basic design: Subjects from three age-groups (factor AGE, 3 levels, between subject) performed a simple visual discrimination task, while I varied the 'amount' of visual input in three levels (factor SIZE, 3 levels, whithin subject). The data was recored from 64 electrodes. I am mainly interested in the question, whether the effect of visual stimulation changes across age-groups (AGE x SIZE interaction), and where this interaction effect is located topographically (on the scalp level). Is it in general possible, to use the statistical interface of Fieltrip (e.g. clusterrandanalysis) to estimate - in one model - mixed designs like the one decribed above (with more than three levels per factor)? If this is the case, could anyone please give me a hint how to implement it? Thank you very much for your suggestions. Best regards, Markus From r.oostenveld at FCDONDERS.RU.NL Mon Feb 12 21:01:07 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 12 Feb 2007 21:01:07 +0100 Subject: binica in fieldtrip In-Reply-To: <45CCEBC1.50708@uke.uni-hamburg.de> Message-ID: Hi Sameer On 9 Feb 2007, at 22:46, Stefan Debener wrote: > Try running extended infomax ICA with the PCA option switched on > and a reduction to about 50 components. This should speed up the > decomposition substantially, and return nice eye blink components. > If you do not get dipolar-like component maps, your data may suffer > from substantial head movements. Temporal ICA expects that the > sensors-to-source configuration remains unchanged during recording. Note that cfg.method='runica' also implements extended infomax ICA, see "help runica for details". Passing option (such as PCA- dimensionality reduction) to runica is done using the cfg.runica substructure in componentanalysis, e.g. cfg.runica.pca = 50. Since runica and binica have almost the same functionality, it was actually trivial to implement it in componentanalysis. I have just added it, you can download the latest FT version from the ftp server. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Mon Feb 12 21:10:59 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 12 Feb 2007 21:10:59 +0100 Subject: sourceanalysis.m on EEG data In-Reply-To: <6.1.2.0.2.20070212121453.01e2aa00@email.med.yale.edu> Message-ID: Hi Brian On 12 Feb 2007, at 18:17, Brian Roach wrote: > Sorry, I am a beginner in the source localization realm. I am > still wondering what software to use with EEG data - we have a > polhemus system, which creates a .hdm file - but is that the same > type referred to in the tutorial below? I am pretty sure that the hdm file from your Polhemus software is NOT the same as the hdm file generated by our CTF software. > Also, do this software: http://neuroimage.usc.edu/brainstorm/ > interact with fieldTrip at all? No, the two toolboxes do not share code. BrainStorm is probably better suited for making EEG head models (at the Donders we mainly use our MEG system if we plan to do source reconstruction). I suspect that it would not be very difficult to use a headmodel generated using BrainStorm in FT, but it will also not be trivial. > Have any FieldTrip users had any experience with it? If not, where > can I download the MRIviewer software mentioned in the tutorial (in > the link below). MRIviewer is a CTF/MEG specific software (it comes with the CTF software) and cannot be used for construction EEG head models. Instead have a look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:create_bem_headmodel_for_eeg. best regards Robert From sameer at ANDREW.CMU.EDU Mon Feb 12 21:17:58 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 12 Feb 2007 15:17:58 -0500 Subject: binica in fieldtrip In-Reply-To: <59383822-25C5-453B-A458-93FDD26135E6@fcdonders.ru.nl> Message-ID: thanks robert, and the info cfg.runica.pca = 50 was precisely what I was looking for. sameer On Mon, 12 Feb 2007, Robert Oostenveld wrote: > Hi Sameer > > On 9 Feb 2007, at 22:46, Stefan Debener wrote: >> Try running extended infomax ICA with the PCA option switched on and a >> reduction to about 50 components. This should speed up the decomposition >> substantially, and return nice eye blink components. If you do not get >> dipolar-like component maps, your data may suffer from substantial head >> movements. Temporal ICA expects that the sensors-to-source configuration >> remains unchanged during recording. > > Note that cfg.method='runica' also implements extended infomax ICA, see "help > runica for details". Passing option (such as PCA-dimensionality reduction) to > runica is done using the cfg.runica substructure in componentanalysis, e.g. > cfg.runica.pca = 50. > > Since runica and binica have almost the same functionality, it was actually > trivial to implement it in componentanalysis. I have just added it, you can > download the latest FT version from the ftp server. > > best regards, > Robert > > From maris at NICI.RU.NL Mon Feb 12 21:35:13 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 12 Feb 2007 21:35:13 +0100 Subject: Question concerning statistics in fieldtrip In-Reply-To: <45D0C27C.5000601@mpib-berlin.mpg.de> Message-ID: Dear Markus, Good to hear that you like our statistics routines. However, I'm afraid that I have to disappoint you a little bit now. Permutation test are not well suited for testing interaction effects. This is because the null hypothesis (i.e., additive effects) is a constraint on the expected values of your dependent variable, observed in the different conditions. In contrast, the null hypotheses that can be tested with a permutation test all have to be phrased in terms of equality of probability distributions in the different conditions. The closest you can get with a permutation test, is testing the effect of one independent variable (say SIZE) within the different levels of AGE. Hopefully, you will get significant effects for some levels of AGE, but not for others. This result would be a sort of nonparametric interaction. Good luck, Eric Maris > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > Markus Werkle-Bergner > Sent: Monday, February 12, 2007 8:40 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] Question concerning statistics in fieldtrip > > Dear, > > in my PhD studies, I am working on lifespan differences on binding > processes during visual perception. And for most parts of my ERP and TFR > analyses, I use Fieldtrip - and it works fine. > > But currently, I'm a bit puzzled, how to set up appropriate statistical > tests for my power and phase-locking analyses. Perhaps, I first describe > my basic design: > Subjects from three age-groups (factor AGE, 3 levels, between subject) > performed a simple visual discrimination task, while I varied the > 'amount' of visual input in three levels (factor SIZE, 3 levels, whithin > subject). The data was recored from 64 electrodes. I am mainly > interested in the question, whether the effect of visual stimulation > changes across age-groups (AGE x SIZE interaction), and where this > interaction effect is located topographically (on the scalp level). > > Is it in general possible, to use the statistical interface of Fieltrip > (e.g. clusterrandanalysis) to estimate - in one model - mixed designs > like the one decribed above (with more than three levels per factor)? If > this is the case, could anyone please give me a hint how to implement it? > > Thank you very much for your suggestions. > > Best regards, > Markus From Brian.Roach at YALE.EDU Mon Feb 12 22:32:18 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Mon, 12 Feb 2007 16:32:18 -0500 Subject: sourceanalysis.m on EEG data In-Reply-To: <2A3986A0-C8E5-40F1-8B4F-4655456BA4CA@fcdonders.ru.nl> Message-ID: Where can I find these functions listed below? % the prepare_bemmodel function is available upon request % the dipoli stand-alone executable is available upon request At 03:10 PM 2/12/2007, Robert Oostenveld wrote: >Hi Brian > >On 12 Feb 2007, at 18:17, Brian Roach wrote: >>Sorry, I am a beginner in the source localization realm. I am >>still wondering what software to use with EEG data - we have a >>polhemus system, which creates a .hdm file - but is that the same >>type referred to in the tutorial below? > >I am pretty sure that the hdm file from your Polhemus software is NOT >the same as the hdm file generated by our CTF software. > >>Also, do this software: http://neuroimage.usc.edu/brainstorm/ >>interact with fieldTrip at all? > >No, the two toolboxes do not share code. BrainStorm is probably >better suited for making EEG head models (at the Donders we mainly >use our MEG system if we plan to do source reconstruction). I suspect >that it would not be very difficult to use a headmodel generated >using BrainStorm in FT, but it will also not be trivial. > >>Have any FieldTrip users had any experience with it? If not, where >>can I download the MRIviewer software mentioned in the tutorial (in >>the link below). > >MRIviewer is a CTF/MEG specific software (it comes with the CTF >software) and cannot be used for construction EEG head models. >Instead have a look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? >id=fieldtrip:documentation:create_bem_headmodel_for_eeg. > >best regards >Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Tue Feb 13 15:09:18 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 13 Feb 2007 15:09:18 +0100 Subject: sourceanalysis.m on EEG data In-Reply-To: <6.1.2.0.2.20070212154706.04afcec0@email.med.yale.edu> Message-ID: The prepare_bemmodel function is in the zip file on the ftp server. The dipoli executable is attached to this mail. There exists only a linux i386 and an apple PPC version. You are not permitted to distribute the dipoli executable, it is not covered under the GPL license but made available courtesy of Thom Oostendorp. best regards, Robert On 12 Feb 2007, at 22:32, Brian Roach wrote: > Where can I find these functions listed below? > > % the prepare_bemmodel function is available upon request % the > dipoli stand-alone executable is available upon request -------------- next part -------------- A non-text attachment was scrubbed... Name: dipoli.zip Type: application/zip Size: 129801 bytes Desc: not available URL: -------------- next part -------------- From r.oostenveld at FCDONDERS.RU.NL Tue Feb 13 17:01:18 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 13 Feb 2007 17:01:18 +0100 Subject: bug in megrealign Message-ID: Dear FT-MEG users, I just noticed a bug in the MEGREALIGN function. I don't know how long it has been there, nor whether it affects all configurations or only whis particular one. The problem could be recognized from the output that MEGREALIGN prints on the screen: the buggy version shows original -> template RV 4128.84 % whereas the corrected version shows original -> template RV 10.32 % Also the scalp topography of the realigned ERF looked completely messy in the buggy version. The problem relates to the shift of the dipole layer on which the scalp data is projected: instead of shifting it inward with 2.5 cm, it was shifted outward and the dipoles bumped into the MEG helmet, causing weird interpolation effects. I noticed the problem when using a single-sphere headmodel fitted to the skin surface. It may be that the problem would not have as obvious for other head models, but am not sure. Maybe someone who recently used MEGREALIGN with singleshell headmodels could comment... I have made an attempt to fix it (per direct on fcdc/common, in this evening version on the ftp). Furthermore, I have now removed the default of 2.5 cm for cfg.inwardshift, since probably a lot of people are not using single-sphere headmodel fitted to the skin surface anymore. See the help of MEGREALIGN for more details. If you are unsure of wheteher it affects your results, I suggest that you rerun the megrealign part and also use the option cfg.feedback=yes (besides the default cfg.verify=yes). Note that from now on you must explicitely specify cfg.inwardshift. sorry for the inconvenience, Robert From t.schneider at UKE.UNI-HAMBURG.DE Tue Feb 13 17:26:18 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Tue, 13 Feb 2007 17:26:18 +0100 Subject: sourceanalysis.m on EEG data In-Reply-To: <60A04A24-9EC0-462D-893A-32B5E3F1563A@fcdonders.ru.nl> Message-ID: Dear Brian, I`ve worked with the prepare_bemmodel script for constructing a forward model for source localization of EEG data. Find attached a little tutorial with the steps I took for creating the BEM from an individual MRI. The plan is to put it also on the fieldtrip wiki (sooner or later). Please let me know if you have questions on this tutorial. Hope this helps, Till Robert Oostenveld schrieb: > The prepare_bemmodel function is in the zip file on the ftp server. > The dipoli executable is attached to this mail. There exists only a > linux i386 and an apple PPC version. You are not permitted to > distribute the dipoli executable, it is not covered under the GPL > license but made available courtesy of Thom Oostendorp. > > best regards, > Robert > > On 12 Feb 2007, at 22:32, Brian Roach wrote: > >> Where can I find these functions listed below? >> >> % the prepare_bemmodel function is available upon request % the >> dipoli stand-alone executable is available upon request > > -------------- next part -------------- A non-text attachment was scrubbed... Name: BEM Tutorial1.doc Type: application/msword Size: 390656 bytes Desc: not available URL: From ulla.rantakokko at TKK.FI Wed Feb 14 13:26:22 2007 From: ulla.rantakokko at TKK.FI (Ulla Rantakokko) Date: Wed, 14 Feb 2007 14:26:22 +0200 Subject: reading mat-files Message-ID: Hello all, I have tried to read in a mat-file or a fif-file. Fif-file is having problems with coilfile acceptance and also I get _________________________ ??? Invalid MEX-file 'D:\meg_pd_1.2\megmodel.dll': The specified module could not be found. ------------------------- even when the megmodel.dll exists. I would prefare to read in my preprocessed data in mat file and proceed with time-frequency analysis. However I get: ____________________ ??? Error using ==> fieldtrip-20061213\private\read_header unsupported data format Error in ==> read_fcdc_header at 37 [hdr] = read_header(varargin{:}); --------------------- even though mat files should be ok. How to give datafile and headerfile separately? Can datafile be in .mat or in .bin format ? I get "unsupported data format" from both options. in read_header.m : case 'fcdc_matbin' [path, file, ext] = fileparts(filename); headerfile = fullfile(path, [file '.mat']); datafile = fullfile(path, [file '.bin']); Thank you ulla From c.hesse at FCDONDERS.RU.NL Wed Feb 14 16:49:41 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 14 Feb 2007 16:49:41 +0100 Subject: reading mat-files In-Reply-To: <20070214142622.ghf59dugowk800oc@webmail1.tkk.fi> Message-ID: Hi Ulla, > I have tried to read in a mat-file or a fif-file. Fif-file is > having problems with coilfile acceptance and also I get > _________________________ > > ??? Invalid MEX-file 'D:\meg_pd_1.2\megmodel.dll': The specified > module could not be found. > ------------------------- > even when the megmodel.dll exists. have you added the location of the DLL to the matlab path? > I would prefare to read in my preprocessed data in mat file and > proceed with time-frequency analysis. Whether this will work, or not, depends on what software you use to preprocess your data and which format you subsequently save it in. At first glance, if you have stored your data in a mat file, then presumably it comprises various data structures, and it is unlikely that these will correspond to the data structures that Fieldtrip uses. So in this situation, you would have to convert whatever is in your mat file into FieldTrip data structures "by hand", which may or may not be possible. If you can provide more information on the content of your mat file, I may be able to say more. > However I get: > ____________________ > > ??? Error using ==> fieldtrip-20061213\private\read_header > unsupported data format > > Error in ==> read_fcdc_header at 37 > [hdr] = read_header(varargin{:}); > > --------------------- > even though mat files should be ok. > > How to give datafile and headerfile separately? > > Can datafile be in .mat or in .bin format ? > I get "unsupported data format" from both options. > > in read_header.m : > case 'fcdc_matbin' > [path, file, ext] = fileparts(filename); > headerfile = fullfile(path, [file '.mat']); > datafile = fullfile(path, [file '.bin']); > The 'fcdc_matbin" option assumes that the data header is stored in a mat file (in a suitable structure) and that the data itself is in a binary file. From your description above, I gather that this is not the format your data is in, right? You have the data in a mat file, and this is indeed not supported in FieldTrip. Depending on what kind of analysis you wish to do later on in FieldTrip, e.g. source analysis or beamforming on your time-frequency data, I would generally advise you to pre-process your data in FieldTrip as well, as this avoids all sorts of headaches and compatibility problems. I would therefore recommend focussing attention on solving the problem of reading in your raw data fif file in the first instance. Hope this helps, Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Wed Feb 14 17:07:14 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 14 Feb 2007 17:07:14 +0100 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Hi Sameer, > Thanks for your email. I tried to look into trialfun_general.m > file, but the one I have is only 286 lines long. I looked into > preprocessing.m, just in case you meant it rather than > trialfun_general.m and it is 432 lines long. It turns out that I was actually referring to the function read_event (which is called by trialfun_general) that does all the flank detection which leads to the double counting. Sorry for the mixup! I gather from your other emails about component analysis that you have managed to successfully read in all of your data, yes? Christian From muthuraman10 at HOTMAIL.COM Wed Feb 14 18:06:14 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 14 Feb 2007 17:06:14 +0000 Subject: Frequency Analysis! In-Reply-To: <005901c74e7b$72472e80$902dae83@fcdonders.nl> Message-ID: Hello , Thankyou for the suggestions! I created my own data format and i able to read in Laplacian transformed data and the result are comparable now Is there a way to calculate the significance level in fieldtrip for the coherence calculated, last time i was referred to a Jacknife variance estimate does it still exist in the fieldtrip coherence analysis, or is there any other way to calculate the significance level in Fieldtrip One more question regarding the Time frequency Analysis, i have EMG data of 24000 data points with a sampling frequeny of 800Hz(30 seconds of data). I would like to do the Timefrequency analysis for this data and to see the power for the whole 30 seconds cfg.t_ftimwin(:)=0.5; If i go for 0.5 seconds then i can go only for the time interval of interest cfg.toi=0.25:0.05:0.725; all the other values are above and below this limit are Nan's I am interested mostly on the lower frequency range from 4 hz to 15 hz, what would be the right time window if i want to look for the whole 30 seconds of data. Thanking you with regards M.Muthuraman. >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Frequency Analysis! >Date: Mon, 12 Feb 2007 08:57:28 +0100 > >Dear Muthuraman, > >For the mtmwelch-method, the same caveats apply as to the mtmconvol-method. >If you specify your window to be one second, and your data is also one >second (perhaps even one sample less? Did you check this, a lonely sample >is >easily lost), then there is nothing to welch (because your data can be only >split up in one overlapping segment of one second, or even cannot be split >up at all, dependent on your data: see above). > >In the following link you find some info how to create fieldtrippish >data-objects in matlab: > >http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:da >taformats > >You can read in your laplacian transformed data into matlab and create a >data-structure (some hints are given in the link). > >Yours, > >Jan-Mathijs > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Friday, February 09, 2007 1:06 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: [FIELDTRIP] Frequency Analysis! > >Hello , > >Thankyou JM, for the suggestions regarding the Time-Frequency Analysis, it >works well now. I need the time information inorder to see what happens to >the power at a specific time interval. > >>From the previous discussion for the Freqanalysis_mtmwelch method as >Prof.Robert as suggested i tried to change the frequency resolution to 1 Hz >in the Mtmwelch method. Now i get all the values to be Nan's. > >cfg.foi = [2:1:30]; >cfg.t_ftimwin = ones(1,length(cfg.foi)).*1; > >And also is there way to load the Laplacian transformed data to the >Fieldtip > >analysis which is a .mat file and work on it for the coherence analysis. I >do the laplacian transformation and the welch periodogram method with my >own > >programs not any software. > >With regards >M.Muthuraman. > >_________________________________________________________________ >Catch all the cricketing action right here. Live score, match reports, >photos et al. http://content.msn.co.in/Sports/Cricket/Default.aspx _________________________________________________________________ Crave for a healthier lifestyle? Ask an expert http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm From sghosh at HSS.IITD.AC.IN Thu Feb 15 14:00:34 2007 From: sghosh at HSS.IITD.AC.IN (Shantanu Ghosh) Date: Thu, 15 Feb 2007 14:00:34 +0100 Subject: electrodes coordinates? Message-ID: Dear all: What do the columns in biosemi32.lay signify? I guess they are place coordinates for electrodes, except the first and last columns, but do not know which column is what. can anybody help? thanks. -Shantanu From ingrid.nieuwenhuis at FCDONDERS.RU.NL Thu Feb 15 14:25:26 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Thu, 15 Feb 2007 14:25:26 +0100 Subject: electrodes coordinates? In-Reply-To: Message-ID: Dear Shantanu, You can find this at the fieldtrip homepage, documentation -> frequently asked questions. See: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:fr equently_asked_questions Ciao Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Shantanu Ghosh Sent: Thursday, February 15, 2007 2:01 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] electrodes coordinates? Dear all: What do the columns in biosemi32.lay signify? I guess they are place coordinates for electrodes, except the first and last columns, but do not know which column is what. can anybody help? thanks. -Shantanu From c.hesse at FCDONDERS.RU.NL Thu Feb 15 14:28:49 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Thu, 15 Feb 2007 14:28:49 +0100 Subject: electrodes coordinates? In-Reply-To: Message-ID: Hi Shantanu, The 1st column is the channel number in the layout file, it is not used any more. The 2nd and 3rd are the X-position and Y-position. The 4th and 5th column specify the with and height of the subplot that will be made in multiplotER and multiplotTFR. The 5th column is a string with the channel label. Cheers, Christian On 15 Feb 2007, at 14:00, Shantanu Ghosh wrote: > Dear all: > What do the columns in biosemi32.lay signify? I guess they are place > coordinates for electrodes, except the first and last columns, but > do not > know which column is what. can anybody help? > thanks. > -Shantanu > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at YAHOO.COM Thu Feb 15 17:32:17 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Thu, 15 Feb 2007 08:32:17 -0800 Subject: environment needed for meg-pd In-Reply-To: Message-ID: Hi, experts, I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment. The error showed as: Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. The specified module could not be found. The true is the .dll is in the same path as .m and the path has been add the Matlab. I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. Please help me. Thanks. Best, Eve --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Thu Feb 15 18:35:30 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 15 Feb 2007 12:35:30 -0500 Subject: environment needed for meg-pd In-Reply-To: <20070215163217.33486.qmail@web51409.mail.yahoo.com> Message-ID: use linux environment with 32 bit architecture. sameer On Thu, 15 Feb 2007, alotof eve wrote: > Hi, experts, > > I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment. > The error showed as: > Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. > The specified module could not be found. > > The true is the .dll is in the same path as .m and the path has been add the Matlab. > I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. > > Please help me. Thanks. > > Best, > Eve > > > --------------------------------- > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. From sameer at ANDREW.CMU.EDU Thu Feb 15 23:12:35 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 15 Feb 2007 17:12:35 -0500 Subject: too many trials/overlapping trials In-Reply-To: <4625E8A1-318C-4292-A901-6B2027508936@fcdonders.ru.nl> Message-ID: Hello Christian, Thanks for your email and sorry for the late reply. I was hoping to reply positively... But, no, I havn't been able to read all my dta properly into fieldtrip. I was asking about the other questions becasue I knew I would be facing them soon. I don't quite understand the whole pading issue in read_event. So I am trying to write my own code to generate cfg.trl. That I think will be much easier. sameer On Wed, 14 Feb 2007, Christian Hesse wrote: > Hi Sameer, > >> Thanks for your email. I tried to look into trialfun_general.m file, but >> the one I have is only 286 lines long. I looked into preprocessing.m, just >> in case you meant it rather than trialfun_general.m and it is 432 lines >> long. > > It turns out that I was actually referring to the function read_event (which > is called by trialfun_general) that does all the flank detection which leads > to the double counting. Sorry for the mixup! > > I gather from your other emails about component analysis that you have > managed to successfully read in all of your data, yes? > > Christian > > From c.hesse at FCDONDERS.RU.NL Fri Feb 16 17:59:00 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 16 Feb 2007 17:59:00 +0100 Subject: environment needed for meg-pd In-Reply-To: <20070215163217.33486.qmail@web51409.mail.yahoo.com> Message-ID: Hi Eve, you should be able to use the meg-pd toolbox (also from FieldTrip) in Matlab under Windows. I got the toolbox to work in Matlab7 under WindowsXP as follows: - extract the meg-pd-1.2-10.mswin.zip file to somewhere - then copy (or move) the meg_pd_1.2 directory wherever you want - in the README file in the meg-pd-1.2-10.mswin directory it specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin\lib \i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of Matlab on your system, in my case this was the directory "MATLAB71\bin \win32" - start up Matlab, add the fieldtrip and meg_pd_1.2 directories to your path and try to read your .fif file Let me know if this works on your Windows system Regards, Christian On 15 Feb 2007, at 17:32, alotof eve wrote: > Hi, experts, > > I am a new user of fieldtrip. I try to use meg-pd package to > import NeuroMag data but it seems there is something wrong with the > environment. > The error showed as: > Unable to load mex file: F:\MATLAB6p5\toolbox > \fieldtrip-20070213\meg_pd_1.2\loadfif.dll. > The specified module could not be found. > > The true is the .dll is in the same path as .m and the path > has been add the Matlab. > I use Latlab 6.5 under WindowXP. I don't know if it affects. > I saw the "lib" in the same meg-pd package included a .dll for pc- > cygwin. I wonder if I have to use Matlab under Linux/Unix > environment. Or if any other limits. > > Please help me. Thanks. > > Best, > Eve > > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 16 18:12:35 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 16 Feb 2007 12:12:35 -0500 Subject: too many trials Message-ID: Hello, I am close to fixing the problem with too many trials, principaly by writing another function which takes the cfg output from definetrial, discards the trial definitions in cfg.trl and replaces it with the correct set based on my reading the trigger channel. But I have left cfg.event untouched. My question is, for the proper working of DICS (and other processing) once the trials have been defined, do I have to make any changes to cfg.event at all or I could proceed. sameer From alotof_xd at YAHOO.COM Fri Feb 16 20:13:46 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Fri, 16 Feb 2007 11:13:46 -0800 Subject: environment needed for meg-pd In-Reply-To: Message-ID: Hi Christian, Yes it works. Thank you so much. But now I met a new problem. I got only a whole .fif data. When I tried the command "MEGMODEL", it said any argument can be left out. However, the error showed up again: >> MEGMODEL ??? Could not load the coil files Error in ==> F:\MATLAB6p5\bin\win32\megmodel.dll I couldn't find any .fif file like Neuromag-122 or coilfile.fif. How do you settle it? Thanks. Best, Eve Christian Hesse wrote: Hi Eve, you should be able to use the meg-pd toolbox (also from FieldTrip) in Matlab under Windows. I got the toolbox to work in Matlab7 under WindowsXP as follows: - extract the meg-pd-1.2-10.mswin.zip file to somewhere - then copy (or move) the meg_pd_1.2 directory wherever you want - in the README file in the meg-pd-1.2-10.mswin directory it specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin\lib\i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of Matlab on your system, in my case this was the directory "MATLAB71\bin\win32" - start up Matlab, add the fieldtrip and meg_pd_1.2 directories to your path and try to read your .fif file Let me know if this works on your Windows system Regards, Christian On 15 Feb 2007, at 17:32, alotof eve wrote: Hi, experts, I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment. The error showed as: Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. The specified module could not be found. The true is the .dll is in the same path as .m and the path has been add the Matlab. I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. Please help me. Thanks. Best, Eve --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 16 21:46:04 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 16 Feb 2007 15:46:04 -0500 Subject: .lay layout file for neuromag 306 channels Message-ID: Hi, As I had written some time ago, I could not find a .lay file which would be useful for neuromag 306 (there is a NM122.lay file there). Is there some way around this? sameer From alotof_xd at YAHOO.COM Sat Feb 17 21:03:31 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Sat, 17 Feb 2007 12:03:31 -0800 Subject: MEGMODEL Message-ID: Hi, experts, Maybe I misunderstood the command. My MEG data is from NeuroMag 306 channels. Does that mean I should use "Neuromag-306" as argument? Thanks for any suggestion. Best, Eve alotof eve wrote: Hi Christian, Yes it works. Thank you so much. But now I met a new problem. I got only a whole .fif data. When I tried the command "MEGMODEL", it said any argument can be left out. However, the error showed up again: >> MEGMODEL ??? Could not load the coil files Error in ==> F:\MATLAB6p5\bin\win32\megmodel.dll I couldn't find any .fif file like Neuromag-122 or coilfile.fif. How do you settle it? Thanks. Best, Eve Christian Hesse wrote: Hi Eve, you should be able to use the meg-pd toolbox (also from FieldTrip) in Matlab under Windows. I got the toolbox to work in Matlab7 under WindowsXP as follows: - extract the meg-pd-1.2-10.mswin.zip file to somewhere - then copy (or move) the meg_pd_1.2 directory wherever you want - in the README file in the meg-pd-1.2-10.mswin directory it specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin\lib\i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of Matlab on your system, in my case this was the directory "MATLAB71\bin\win32" - start up Matlab, add the fieldtrip and meg_pd_1.2 directories to your path and try to read your .fif file Let me know if this works on your Windows system Regards, Christian On 15 Feb 2007, at 17:32, alotof eve wrote: Hi, experts, I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment. The error showed as: Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. The specified module could not be found. The true is the .dll is in the same path as .m and the path has been add the Matlab. I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. Please help me. Thanks. Best, Eve --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. --------------------------------- No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Sun Feb 18 12:23:49 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Sun, 18 Feb 2007 12:23:49 +0100 Subject: too many trials In-Reply-To: Message-ID: Hi Sameer, On 16 Feb 2007, at 18:12, Sameer Walawalkar wrote: > I am close to fixing the problem with too many trials, principaly > by writing another function which takes the cfg output from > definetrial, discards the trial definitions in cfg.trl and replaces > it with the correct set based on my reading the trigger channel. What you have done is that you have created your own 'trialfun'. That is perfectly acceptable, and actually FT is explicitely designed to support that. See also http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:tutorial:preprocessing at the bottom for an example. Another example is at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:detect_the_muscle_activity_in_an_emg_channel_ and_use_that_as_trial_definition In custom trialfuns, people can use whatever they want to make the "trl" structure, and use read_fcdc_event of they wish or not. You can still use definetrial by cfg.trialfun = 'your_function' Actually the default is cfg.trialfun = 'trialfun_general' and trialfun_general is using the data-independent read_fcdc_event. Feel free to add your trialfun to the example matlab scripts section on the documentation wiki. > But I have left cfg.event untouched. > My question is, for the proper working of DICS (and other > processing) once the trials have been defined, do I have to make > any changes to cfg.event at all or I could proceed. cfg.event is only stored for later reference by yourself. Other FT functions (except for "recodeevent", which is not included in the ftp version sofar) do not use it. Robert From sameer at ANDREW.CMU.EDU Sun Feb 18 16:53:01 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 18 Feb 2007 10:53:01 -0500 Subject: too many trials In-Reply-To: <2B82FF0A-252E-4C21-B7F7-3C4AA31D5272@fcdonders.ru.nl> Message-ID: thanks Robert, I managed to do ICA for the data, but runica, fastica and jader gave errors. Varimax finally worked. jader: ??? Error using ==> zeros Product of dimensions is greater than maximum integer. Error in ==> jader at 90 CM = zeros(m,m*nbcm); % Storage for cumulant matrices Error in ==> componentanalysis at 323 weights = jader(dat); fastica: Calculating covariance... ??? Error using ==> componentanalysis call to fastica failed runica: step 60 - lrate 0.000000, wchange 69.06649297, angledelta 99.6 deg runica(): QUITTING - weight matrix may not be invertible! ??? Error using ==> mtimes Inner matrix dimensions must agree. Error in ==> componentanalysis at 394 comp.trial{trial} = weights * sphere * data.trial{trial}; Do these errors tell you anything about the data? Finally, I really need to know (do I) about the .lay file to be used for neuromag 306 data to see the independent components. I have asked about this two or three times in earlier emails. thanks, sameer On Sun, 18 Feb 2007, Robert Oostenveld wrote: > Hi Sameer, > > On 16 Feb 2007, at 18:12, Sameer Walawalkar wrote: >> I am close to fixing the problem with too many trials, principaly by >> writing another function which takes the cfg output from definetrial, >> discards the trial definitions in cfg.trl and replaces it with the correct >> set based on my reading the trigger channel. > > What you have done is that you have created your own 'trialfun'. That is > perfectly acceptable, and actually FT is explicitely designed to support > that. See also http://www2.ru.nl/fcdonders/fieldtrip/doku.php? > id=fieldtrip:documentation:tutorial:preprocessing at the bottom for an > example. Another example is at > http://www2.ru.nl/fcdonders/fieldtrip/doku.php? > id=fieldtrip:documentation:detect_the_muscle_activity_in_an_emg_channel_ > and_use_that_as_trial_definition > > In custom trialfuns, people can use whatever they want to make the "trl" > structure, and use read_fcdc_event of they wish or not. > > You can still use definetrial by > cfg.trialfun = 'your_function' > Actually the default is > cfg.trialfun = 'trialfun_general' > and trialfun_general is using the data-independent read_fcdc_event. Feel free > to add your trialfun to the example matlab scripts section on the > documentation wiki. > >> But I have left cfg.event untouched. >> My question is, for the proper working of DICS (and other processing) once >> the trials have been defined, do I have to make any changes to cfg.event at >> all or I could proceed. > > cfg.event is only stored for later reference by yourself. Other FT functions > (except for "recodeevent", which is not included in the ftp version sofar) do > not use it. > > Robert > > From c.hesse at FCDONDERS.RU.NL Mon Feb 19 09:18:00 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 19 Feb 2007 09:18:00 +0100 Subject: MEGMODEL In-Reply-To: <15180.61475.qm@web51411.mail.yahoo.com> Message-ID: Hi Eve, FieldTrip handles (pretty much) all function calls to the meg-pd toolbox for you (in particular which are the appropriate input arguments to use) so you don't have to deal with these issues yourself. See if you can extract the header information and some data from your .fif file using filename = "fullpath/name.fif" hdr = read_fcdc_header(filename); % hdr should be a structure dat = read_fcdc_data(filename); % dat should be a nchan x nsamp matrix see what you get. Regards, Christian On 17 Feb 2007, at 21:03, alotof eve wrote: > Hi, experts, > > Maybe I misunderstood the command. My MEG data is from NeuroMag > 306 channels. Does that mean I should use "Neuromag-306" as > argument? Thanks for any suggestion. > > Best, > Eve > > > alotof eve wrote: > Hi Christian, > > Yes it works. Thank you so much. > But now I met a new problem. I got only a whole .fif data. When > I tried the command "MEGMODEL", it said any argument can be left > out. However, the error showed up again: > >> MEGMODEL > ??? Could not load the coil files > > Error in ==> F:\MATLAB6p5\bin\win32\megmodel.dll > > I couldn't find any .fif file like Neuromag-122 or coilfile.fif. > How do you settle it? > Thanks. > > Best, > Eve > > Christian Hesse wrote: > Hi Eve, > > you should be able to use the meg-pd toolbox (also from FieldTrip) > in Matlab under Windows. I got the toolbox to work in Matlab7 under > WindowsXP as follows: > > - extract the meg-pd-1.2-10.mswin.zip file to somewhere > - then copy (or move) the meg_pd_1.2 directory wherever you want > - in the README file in the meg-pd-1.2-10.mswin directory it > specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin > \lib\i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of > Matlab on your system, in my case this was the directory "MATLAB71 > \bin\win32" > - start up Matlab, add the fieldtrip and meg_pd_1.2 directories to > your path and try to read your .fif file > > Let me know if this works on your Windows system > > Regards, > Christian > > > On 15 Feb 2007, at 17:32, alotof eve wrote: > >> Hi, experts, >> >> I am a new user of fieldtrip. I try to use meg-pd package to >> import NeuroMag data but it seems there is something wrong with >> the environment. >> The error showed as: >> Unable to load mex file: F:\MATLAB6p5\toolbox >> \fieldtrip-20070213\meg_pd_1.2\loadfif.dll. >> The specified module could not be found. >> >> The true is the .dll is in the same path as .m and the path >> has been add the Matlab. >> I use Latlab 6.5 under WindowXP. I don't know if it affects. >> I saw the "lib" in the same meg-pd package included a .dll for pc- >> cygwin. I wonder if I have to use Matlab under Linux/Unix >> environment. Or if any other limits. >> >> Please help me. Thanks. >> >> Best, >> Eve >> >> TV dinner still cooling? >> Check out "Tonight's Picks" on Yahoo! TV. > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > > > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. > > > No need to miss a message. Get email on-the-go > with Yahoo! Mail for Mobile. Get started. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Mon Feb 19 09:18:53 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 19 Feb 2007 09:18:53 +0100 Subject: .lay layout file for neuromag 306 channels In-Reply-To: Message-ID: Hi Sameer, please have a look at the FT (in fieldtrip/private) function "createlayout.m" (in the fieldtrip/private directory) which should be able to create a layout for your Neuromag306 data on the fly. The function takes a structure containing gradiometer information as input. If you read in your data using "preprocessing.m" then the gradiometer info will be contained in a field called data.grad. Hope this helps, Christian On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: > Hi, > > As I had written some time ago, I could not find a .lay file which > would be useful for neuromag 306 (there is a NM122.lay file there). > > Is there some way around this? > > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at HOTMAIL.COM Mon Feb 19 11:23:27 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 19 Feb 2007 10:23:27 +0000 Subject: Time Frequency Analysis! In-Reply-To: <005901c74e7b$72472e80$902dae83@fcdonders.nl> Message-ID: Hello Fieldtrippers, One more question regarding the Time frequency Analysis, i have EMG data of 24000 data points with a sampling frequeny of 800Hz(30 seconds of continous data). I would like to do the Timefrequency analysis for this data and to see the power for the whole 30 seconds cfg.t_ftimwin(:)=0.5; If i go for 0.5 seconds then i can go only for the time interval of interest cfg.toi=0.25:0.05:0.725; all the other values are above and below this limit are Nan's I am interested mostly on the lower frequency range from 4 hz to 15 hz, what would be the right time window if i want to look for the continous 30 seconds of data. Thanking you with regards M.Muthuraman _________________________________________________________________ Latest updates from the world of sports http://content.msn.co.in/Sports/Default From c.hesse at FCDONDERS.RU.NL Mon Feb 19 11:56:19 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 19 Feb 2007 11:56:19 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Hi Muthuraman, > One more question regarding the Time frequency Analysis, i have EMG > data of 24000 data points with a sampling frequeny of 800Hz(30 > seconds of continous data). I would like to do the Timefrequency > analysis for this data and to see the power for the whole 30 seconds use preprocessing to get the EMG data into a single 30s trial (if you want to analyze the rectified EMG, then do the rectification in preprocessing), then use frequanalysis with cfg.method = 'mtmfft'; cfg.output = 'pow'; this should give you the power spectrum of your EMG data over the entire 30 second period. Regards, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at HOTMAIL.COM Mon Feb 19 12:52:25 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 19 Feb 2007 11:52:25 +0000 Subject: Time Frequency Analysis! In-Reply-To: <25799ED0-47CF-4D9C-8852-D18E0BD0CDC1@fcdonders.ru.nl> Message-ID: Hello, Thanks for the suggestion but using the mtmfft which i have done already and it works, my interest now is that i would like to use the Time frequency analysis 'mtmconvol' to estimate the power in the time frequency scale, in which how to get the whole 30secs continous data in one time frequency plot(TFR). Thanking you with regards M.Muthuraman. >From: Christian Hesse >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Mon, 19 Feb 2007 11:56:19 +0100 > >Hi Muthuraman, > >>One more question regarding the Time frequency Analysis, i have EMG data >>of 24000 data points with a sampling frequeny of 800Hz(30 seconds of >>continous data). I would like to do the Timefrequency analysis for this >>data and to see the power for the whole 30 seconds > >use preprocessing to get the EMG data into a single 30s trial (if you want >to analyze the rectified EMG, then do the rectification in preprocessing), >then use frequanalysis with > >cfg.method = 'mtmfft'; >cfg.output = 'pow'; > >this should give you the power spectrum of your EMG data over the entire >30 second period. > >Regards, >Christian > > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > _________________________________________________________________ Tried the new MSN Messenger? It�s cool! Download now. http://messenger.msn.com/Download/Default.aspx?mkt=en-in From c.hesse at FCDONDERS.RU.NL Mon Feb 19 13:12:03 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 19 Feb 2007 13:12:03 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Hi Muthuraman, ok, in that case you can try the following (this assumes you have windows of length "winlen" which overlap by "halfwin = winlen/2") winlen = 0.5; % this is in seconds you can also use another time window halfwin = winlen/2; % the total number of windows covering the 30 second period nwin = 2.*(30./winlen) - 1; cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.t_ftimwin = ones(1,nwin).*winlen; cfg.toi = [0:halfwin:30-winlen]; The important things here to check are 1) that cfg.t_ftimwin and cfg.toi contain the same number of elements 2) the times you specify in cfg.toi actually correspond to your time axis (i.e. do not start before or go on after). If you want to use a different overlap, you need to calculate nwin slightly differently. Hope this helps more, Christian > Thanks for the suggestion but using the mtmfft which i have done > already and it works, my interest now is that i would like to use > the Time frequency analysis 'mtmconvol' to estimate the power in > the time frequency scale, in which how to get the whole 30secs > continous data in one time frequency plot(TFR). > > Thanking you > > with regards > M.Muthuraman. > >> From: Christian Hesse >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> Date: Mon, 19 Feb 2007 11:56:19 +0100 >> >> Hi Muthuraman, >> >>> One more question regarding the Time frequency Analysis, i have >>> EMG data of 24000 data points with a sampling frequeny of 800Hz >>> (30 seconds of continous data). I would like to do the >>> Timefrequency analysis for this data and to see the power for >>> the whole 30 seconds >> >> use preprocessing to get the EMG data into a single 30s trial (if >> you want to analyze the rectified EMG, then do the rectification >> in preprocessing), then use frequanalysis with >> >> cfg.method = 'mtmfft'; >> cfg.output = 'pow'; >> >> this should give you the power spectrum of your EMG data over the >> entire 30 second period. >> >> Regards, >> Christian >> >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> > > _________________________________________________________________ > Tried the new MSN Messenger? It’s cool! Download now. http:// > messenger.msn.com/Download/Default.aspx?mkt=en-in > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From Daria.Osipova at FCDONDERS.RU.NL Mon Feb 19 16:31:29 2007 From: Daria.Osipova at FCDONDERS.RU.NL (Daria Osipova) Date: Mon, 19 Feb 2007 16:31:29 +0100 Subject: .lay layout file for neuromag 306 channels In-Reply-To: Message-ID: Hi Attached are 306-channel Neuromag layout files (also for magnetometers and gradiometers separately). Cheers, Dasha _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Christian Hesse Sent: Monday, February 19, 2007 9:19 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels Hi Sameer, please have a look at the FT (in fieldtrip/private) function "createlayout.m" (in the fieldtrip/private directory) which should be able to create a layout for your Neuromag306 data on the fly. The function takes a structure containing gradiometer information as input. If you read in your data using "preprocessing.m" then the gradiometer info will be contained in a field called data.grad. Hope this helps, Christian On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: Hi, As I had written some time ago, I could not find a .lay file which would be useful for neuromag 306 (there is a NM122.lay file there). Is there some way around this? sameer ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306all.lay Type: application/octet-stream Size: 14476 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306mag.lay Type: application/octet-stream Size: 5027 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306planar.lay Type: application/octet-stream Size: 9638 bytes Desc: not available URL: From sameer at ANDREW.CMU.EDU Mon Feb 19 18:23:48 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 19 Feb 2007 12:23:48 -0500 Subject: .lay layout file for neuromag 306 channels In-Reply-To: <004e01c7543b$06f4f930$032dae83@fcdonders.nl> Message-ID: Thanks Dasha for the files, though I learned from Christaian's email and further studying createlayout that if the appropriate layout files do not exist, createlayout can be used to create them. But now I am getting an error which I dont understand. topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) ??? Error using ==> topoplot Flag arguments must be strings While trying to understand this error, I realized that in the topoplot.m file function [handle] = topoplot(varargin) handle is never assigned a value.... best, sameer On Mon, 19 Feb 2007, Daria Osipova wrote: > Hi > > Attached are 306-channel Neuromag layout files (also for magnetometers and > gradiometers separately). > > Cheers, > > Dasha > > > > > > _____ > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Christian Hesse > Sent: Monday, February 19, 2007 9:19 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels > > > > Hi Sameer, > > > > please have a look at the FT (in fieldtrip/private) function > "createlayout.m" (in the fieldtrip/private directory) which should be able > to create a layout for your Neuromag306 data on the fly. The function takes > a structure containing gradiometer information as input. If you read in your > data using "preprocessing.m" then the gradiometer info will be contained in > a field called data.grad. > > > > Hope this helps, > > Christian > > > > > > > > On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: > > > > > > Hi, > > > > As I had written some time ago, I could not find a .lay file which would be > useful for neuromag 306 (there is a NM122.lay file there). > > > > Is there some way around this? > > > > sameer > > > > > > ---------------------------------------------------------------------- > > Christian Hesse, PhD, MIEEE > > > > F.C. Donders Centre for Cognitive Neuroimaging > > P.O. Box 9101 > > NL-6500 HB Nijmegen > > The Netherlands > > > > Tel.: +31 (0)24 36 68293 > > Fax: +31 (0)24 36 10989 > > > > Email: c.hesse at fcdonders.ru.nl > > Web: www.fcdonders.ru.nl > > ---------------------------------------------------------------------- > > > > > > > > > > > > From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Feb 19 18:55:23 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 19 Feb 2007 18:55:23 +0100 Subject: .lay layout file for neuromag 306 channels In-Reply-To: Message-ID: Hi Sameer, I might be able to help, but could you specify a bit more what you did? So which topoplot did you call, and what was your cfg? And what are the fields in your data that you want to plot? Best, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Monday, February 19, 2007 6:24 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels Thanks Dasha for the files, though I learned from Christaian's email and further studying createlayout that if the appropriate layout files do not exist, createlayout can be used to create them. But now I am getting an error which I dont understand. topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) ??? Error using ==> topoplot Flag arguments must be strings While trying to understand this error, I realized that in the topoplot.m file function [handle] = topoplot(varargin) handle is never assigned a value.... best, sameer On Mon, 19 Feb 2007, Daria Osipova wrote: > Hi > > Attached are 306-channel Neuromag layout files (also for magnetometers and > gradiometers separately). > > Cheers, > > Dasha > > > > > > _____ > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Christian Hesse > Sent: Monday, February 19, 2007 9:19 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels > > > > Hi Sameer, > > > > please have a look at the FT (in fieldtrip/private) function > "createlayout.m" (in the fieldtrip/private directory) which should be able > to create a layout for your Neuromag306 data on the fly. The function takes > a structure containing gradiometer information as input. If you read in your > data using "preprocessing.m" then the gradiometer info will be contained in > a field called data.grad. > > > > Hope this helps, > > Christian > > > > > > > > On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: > > > > > > Hi, > > > > As I had written some time ago, I could not find a .lay file which would be > useful for neuromag 306 (there is a NM122.lay file there). > > > > Is there some way around this? > > > > sameer > > > > > > ---------------------------------------------------------------------- > > Christian Hesse, PhD, MIEEE > > > > F.C. Donders Centre for Cognitive Neuroimaging > > P.O. Box 9101 > > NL-6500 HB Nijmegen > > The Netherlands > > > > Tel.: +31 (0)24 36 68293 > > Fax: +31 (0)24 36 10989 > > > > Email: c.hesse at fcdonders.ru.nl > > Web: www.fcdonders.ru.nl > > ---------------------------------------------------------------------- > > > > > > > > > > > > From sameer at ANDREW.CMU.EDU Mon Feb 19 19:31:28 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 19 Feb 2007 13:31:28 -0500 Subject: .lay layout file for neuromag 306 channels In-Reply-To: <002701c7544f$20d49220$642dae83@fcdonders.nl> Message-ID: Hello Ingrid, Thanks for your email. Here is some info which might help you. lay = prj: [307x2 double] box: [307x2 double] label: {307x1 cell} compRR_orig = fsample: 1000 time: {1x30 cell} trial: {1x30 cell} label: {307x1 cell} topolabel: {307x1 cell} topo: [307x307 double] cfg: [1x1 struct] The command I used was topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) so my cfg was essentially cfg = []; I am not sure what you mean by which topoplot. The vector compRR_orig contains independent components calculated by componentanalysis.m; maybe this helps. thanks, sameer On Mon, 19 Feb 2007, Ingrid Nieuwenhuis wrote: > Hi Sameer, > > I might be able to help, but could you specify a bit more what you did? So > which topoplot did you call, and what was your cfg? And what are the fields > in your data that you want to plot? > > Best, > Ingrid > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Sameer Walawalkar > Sent: Monday, February 19, 2007 6:24 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels > > Thanks Dasha for the files, though I learned from Christaian's email and > further studying createlayout that if the appropriate layout files do not > exist, createlayout can be used to create them. > > But now I am getting an error which I dont understand. > > topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) > ??? Error using ==> topoplot > Flag arguments must be strings > > > While trying to understand this error, I realized that in the topoplot.m > file > > function [handle] = topoplot(varargin) > > handle is never assigned a value.... > > > best, > sameer > > > > > > > > > > > > On Mon, 19 Feb 2007, Daria Osipova wrote: > >> Hi >> >> Attached are 306-channel Neuromag layout files (also for magnetometers and >> gradiometers separately). >> >> Cheers, >> >> Dasha >> >> >> >> >> >> _____ >> >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf >> Of Christian Hesse >> Sent: Monday, February 19, 2007 9:19 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels >> >> >> >> Hi Sameer, >> >> >> >> please have a look at the FT (in fieldtrip/private) function >> "createlayout.m" (in the fieldtrip/private directory) which should be able >> to create a layout for your Neuromag306 data on the fly. The function > takes >> a structure containing gradiometer information as input. If you read in > your >> data using "preprocessing.m" then the gradiometer info will be contained > in >> a field called data.grad. >> >> >> >> Hope this helps, >> >> Christian >> >> >> >> >> >> >> >> On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: >> >> >> >> >> >> Hi, >> >> >> >> As I had written some time ago, I could not find a .lay file which would > be >> useful for neuromag 306 (there is a NM122.lay file there). >> >> >> >> Is there some way around this? >> >> >> >> sameer >> >> >> >> >> >> ---------------------------------------------------------------------- >> >> Christian Hesse, PhD, MIEEE >> >> >> >> F.C. Donders Centre for Cognitive Neuroimaging >> >> P.O. Box 9101 >> >> NL-6500 HB Nijmegen >> >> The Netherlands >> >> >> >> Tel.: +31 (0)24 36 68293 >> >> Fax: +31 (0)24 36 10989 >> >> >> >> Email: c.hesse at fcdonders.ru.nl >> >> Web: www.fcdonders.ru.nl >> >> ---------------------------------------------------------------------- >> >> >> >> >> >> >> >> >> >> >> >> > > From r.oostenveld at FCDONDERS.RU.NL Mon Feb 19 20:41:54 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 19 Feb 2007 20:41:54 +0100 Subject: .lay layout file for neuromag 306 channels In-Reply-To: Message-ID: On 19 Feb 2007, at 19:31, Sameer Walawalkar wrote: >> topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo >> (:,1)) >> ??? Error using ==> topoplot >> Flag arguments must be strings I suspect that you are mixing up EEGLAB and FieldTrip. >> cd ~/matlab/fieldtrip >> topoplot([], randn(100,1), randn(100,1), randn(100,1)) ??? Error using ==> topoplot When four input arguments are supplied, the following syntax should be used: topoplot(cfg,X,Y,datavector); >> cd ~/matlab/eeglab/functions >> topoplot([], randn(100,1), randn(100,1), randn(100,1)) ??? Error using ==> topoplot Flag arguments must be strings Your error corresponds with the EEGLAB one. Note that the FT version wants the first argument as a struct, so you cannot specify []. I will fix the empty input struct. For the moment you can do cfg.dummy= [] to make a structure of the cfg and the example above will work. Robert From sameer at ANDREW.CMU.EDU Mon Feb 19 21:01:19 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 19 Feb 2007 15:01:19 -0500 Subject: .lay layout file for neuromag 306 channels In-Reply-To: <6106EC24-4112-4648-937F-0FE91CC44DC1@fcdonders.ru.nl> Message-ID: thanks, It works. sameer On Mon, 19 Feb 2007, Robert Oostenveld wrote: > On 19 Feb 2007, at 19:31, Sameer Walawalkar wrote: >>> topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) >>> ??? Error using ==> topoplot >>> Flag arguments must be strings > > I suspect that you are mixing up EEGLAB and FieldTrip. > >>> cd ~/matlab/fieldtrip >>> topoplot([], randn(100,1), randn(100,1), randn(100,1)) > ??? Error using ==> topoplot > When four input arguments are supplied, the following syntax should be used: > topoplot(cfg,X,Y,datavector); > >>> cd ~/matlab/eeglab/functions >>> topoplot([], randn(100,1), randn(100,1), randn(100,1)) > ??? Error using ==> topoplot > Flag arguments must be strings > > Your error corresponds with the EEGLAB one. Note that the FT version wants > the first argument as a struct, so you cannot specify []. I will fix the > empty input struct. For the moment you can do cfg.dummy=[] to make a > structure of the cfg and the example above will work. > > Robert > > From sameer at ANDREW.CMU.EDU Tue Feb 20 17:06:50 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 20 Feb 2007 11:06:50 -0500 Subject: eog artifact rejection Message-ID: I am interested in removing blink artifacts. Unfortunately, with fieldtrip component analysis, it is difficult to identify the independent component corresponding to blinks by visual inspection due to the short timecourse over which they are presented (trial length). There are essentially two errors: 1> ??? Error using ==> timelockanalysis data has variable trial lengths, you specified not to accept that ! 2> fdcomp.cohspctrm does not exist. I tried to follow instructions under independent component analysis (ICA) to remove ECG artifacts replacing eog for ecg. (I did not do any resampling). (Is this a good idea?) So I did, % go back to the raw data on disk and detect the peaks in the EOG channel, cfg = same.old.cfg.used.for.component.analysis.of.data; cfg.artfctdef.eog.pretim = 0.25; cfg.artfctdef.eog.psttim = 0.50-1/1200; [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts) % preprocess the data around the peaks, i.e. read the segments of raw data containing the EOG artifact cfg = []; cfg.dataset = 'JD_012507_Beeps_One.fif'; cfg.datatype = 'continuous'; cfg.padding = 10; cfg.dftfilter = 'yes'; cfg.blc = 'yes'; cfg.trl = [artifact zeros(size(artifact,1),1)]; cfg.channel = {'MEG' 'EOG'}; data_eog = preprocessing(cfg) % decompose the ECG-locked datasegments into components, using the previously found (un)mixing matrix cfg = []; cfg.topo = compRR_orig.topo; cfg.topolabel = compRR_orig.topolabel; comp_eog = componentanalysis(cfg, data_eog); selecting 307 channels baseline correcting data starting decomposition using predetermined mixing matrix total time in componentanalysis 1.2 seconds % compute a frequency decomposition of all components and the ECG cfg = []; timelock = timelockanalysis(cfg, comp_eog); applying preprocessing options ??? Error using ==> timelockanalysis data has variable trial lengths, you specified not to accept that ! % compute a frequency decomposition of all components and the ECG cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.foilim = [0 100]; cfg.taper = 'hanning'; cfg.pad = 'maxperlen'; freq = freqanalysis(cfg, comp_ecg); % compute coherence between all components and the ECG cfg = []; cfg.channelcmb = {'all' 'ECG'}; cfg.jackknife = 'no'; fdcomp = freqdescriptives(cfg, freq); Even though I get computing cross-spectral densities message, I do not get .cohspctrm. fdcomp = dimord: 'chan_freq' freq: [1x155 double] label: {307x1 cell} powspctrm: [307x155 double] dof: [307x155 double] cfg: [1x1 struct] Sorry for the long email, and thanks for your help. sameer From Jan.Schoffelen at FCDONDERS.RU.NL Tue Feb 20 17:12:20 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 20 Feb 2007 17:12:20 +0100 Subject: eog artifact rejection In-Reply-To: Message-ID: Dear sameer, Ad problem 1: Please specify: cfg.vartrllength = 2, prior to doing the timelockanalysis Ad problem 2: Please specify: cfg.channelcmb = {'all' 'EOG'}, prior to doing freqdescriptives. (instead of {'all' 'ECG'} JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, February 20, 2007 5:07 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] eog artifact rejection I am interested in removing blink artifacts. Unfortunately, with fieldtrip component analysis, it is difficult to identify the independent component corresponding to blinks by visual inspection due to the short timecourse over which they are presented (trial length). There are essentially two errors: 1> ??? Error using ==> timelockanalysis data has variable trial lengths, you specified not to accept that ! 2> fdcomp.cohspctrm does not exist. I tried to follow instructions under independent component analysis (ICA) to remove ECG artifacts replacing eog for ecg. (I did not do any resampling). (Is this a good idea?) So I did, % go back to the raw data on disk and detect the peaks in the EOG channel, cfg = same.old.cfg.used.for.component.analysis.of.data; cfg.artfctdef.eog.pretim = 0.25; cfg.artfctdef.eog.psttim = 0.50-1/1200; [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts) % preprocess the data around the peaks, i.e. read the segments of raw data containing the EOG artifact cfg = []; cfg.dataset = 'JD_012507_Beeps_One.fif'; cfg.datatype = 'continuous'; cfg.padding = 10; cfg.dftfilter = 'yes'; cfg.blc = 'yes'; cfg.trl = [artifact zeros(size(artifact,1),1)]; cfg.channel = {'MEG' 'EOG'}; data_eog = preprocessing(cfg) % decompose the ECG-locked datasegments into components, using the previously found (un)mixing matrix cfg = []; cfg.topo = compRR_orig.topo; cfg.topolabel = compRR_orig.topolabel; comp_eog = componentanalysis(cfg, data_eog); selecting 307 channels baseline correcting data starting decomposition using predetermined mixing matrix total time in componentanalysis 1.2 seconds % compute a frequency decomposition of all components and the ECG cfg = []; timelock = timelockanalysis(cfg, comp_eog); applying preprocessing options ??? Error using ==> timelockanalysis data has variable trial lengths, you specified not to accept that ! % compute a frequency decomposition of all components and the ECG cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.foilim = [0 100]; cfg.taper = 'hanning'; cfg.pad = 'maxperlen'; freq = freqanalysis(cfg, comp_ecg); % compute coherence between all components and the ECG cfg = []; cfg.channelcmb = {'all' 'ECG'}; cfg.jackknife = 'no'; fdcomp = freqdescriptives(cfg, freq); Even though I get computing cross-spectral densities message, I do not get .cohspctrm. fdcomp = dimord: 'chan_freq' freq: [1x155 double] label: {307x1 cell} powspctrm: [307x155 double] dof: [307x155 double] cfg: [1x1 struct] Sorry for the long email, and thanks for your help. sameer From c.hesse at FCDONDERS.RU.NL Tue Feb 20 17:13:02 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Tue, 20 Feb 2007 17:13:02 +0100 Subject: eog artifact rejection In-Reply-To: Message-ID: Hi Samer, try sorting your ICs by the (absolute) correlation of their waveforms with the EOG signal -> the one or two components with the highest correlation are those that should be removed. If you encounter problems in getting this to work, please let me know. Christian On 20 Feb 2007, at 17:06, Sameer Walawalkar wrote: > I am interested in removing blink artifacts. Unfortunately, with > fieldtrip component analysis, it is difficult to identify the > independent component corresponding to blinks by visual inspection > due to the short timecourse over which they are presented (trial > length). > > There are essentially two errors: > 1> ??? Error using ==> timelockanalysis > data has variable trial lengths, you specified not to accept that ! > 2> fdcomp.cohspctrm does not exist. > > I tried to follow instructions under independent component > analysis (ICA) to remove ECG artifacts replacing eog for ecg. (I > did not do any resampling). (Is this a good idea?) > > So I did, > % go back to the raw data on disk and detect the peaks in the EOG > channel, > cfg = same.old.cfg.used.for.component.analysis.of.data; > cfg.artfctdef.eog.pretim = 0.25; > cfg.artfctdef.eog.psttim = 0.50-1/1200; > > [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts) > > > % preprocess the data around the peaks, i.e. read the segments of > raw data containing the EOG artifact > cfg = []; > cfg.dataset = 'JD_012507_Beeps_One.fif'; > cfg.datatype = 'continuous'; > cfg.padding = 10; > cfg.dftfilter = 'yes'; > cfg.blc = 'yes'; > cfg.trl = [artifact zeros(size(artifact,1),1)]; > cfg.channel = {'MEG' 'EOG'}; > data_eog = preprocessing(cfg) > > % decompose the ECG-locked datasegments into components, using the > previously found (un)mixing matrix > cfg = []; > cfg.topo = compRR_orig.topo; > cfg.topolabel = compRR_orig.topolabel; > comp_eog = componentanalysis(cfg, data_eog); > selecting 307 channels > baseline correcting data > starting decomposition using predetermined mixing matrix > total time in componentanalysis 1.2 seconds > > > % compute a frequency decomposition of all components and the ECG > > cfg = []; > timelock = timelockanalysis(cfg, comp_eog); > applying preprocessing options > ??? Error using ==> timelockanalysis > data has variable trial lengths, you specified not to accept that ! > > % compute a frequency decomposition of all components and the ECG > > cfg = []; > cfg.method = 'mtmfft'; > cfg.output = 'fourier'; > cfg.foilim = [0 100]; > cfg.taper = 'hanning'; > cfg.pad = 'maxperlen'; > freq = freqanalysis(cfg, comp_ecg); > > > % compute coherence between all components and the ECG > cfg = []; > cfg.channelcmb = {'all' 'ECG'}; > cfg.jackknife = 'no'; > fdcomp = freqdescriptives(cfg, freq); > > Even though I get computing cross-spectral densities message, I do > not get .cohspctrm. > > fdcomp = > > dimord: 'chan_freq' > freq: [1x155 double] > label: {307x1 cell} > powspctrm: [307x155 double] > dof: [307x155 double] > cfg: [1x1 struct] > > > Sorry for the long email, and thanks for your help. > > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at YAHOO.COM Wed Feb 21 08:09:26 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Tue, 20 Feb 2007 23:09:26 -0800 Subject: Neuromag data processing In-Reply-To: <8969EAA5-A62D-4141-AFA5-F94E3170C116@fcdonders.ru.nl> Message-ID: Thank you Christian. I can use meg-pd toolbox now. However, it seems all the functions in FieldTrip are for evoked data while my raw data is continuous data. I tried your suggestion. read_head works but read_data doesn't work. I don't know this error just due to memory or continuous data format. I remember previous discussion (2-feb-2006) in this emaillist mentioned that read_data couldn't deal with continuous data. The error shows as below: ??? Out of memory. Type HELP MEMORY for your options. Error in ==> F:\MATLAB6p5\toolbox\fieldtrip-20070213\private\read_data.m On line 529 ==> dat(:,((i-begepoch)*hdr.nSamples+1):((i-begepoch+1)*hdr.nSamples)) = buf(chanindx,:); Error in ==> F:\MATLAB6p5\toolbox\fieldtrip-20070213\read_fcdc_data.m On line 49 ==> [dat] = read_data(varargin{:}); Even the read_data has been improved as continuous data acceptable, I still wonder the following data processing. Is there tool to convert continuous data to "epoch mode" data? Thanks. Best, Eve Christian Hesse wrote: Hi Eve, FieldTrip handles (pretty much) all function calls to the meg-pd toolbox for you (in particular which are the appropriate input arguments to use) so you don't have to deal with these issues yourself. See if you can extract the header information and some data from your .fif file using?lt;/DIV> filename = "fullpath/name.fif" hdr = read_fcdc_header(filename); % hdr should be a structure dat = read_fcdc_data(filename); % dat should be a nchan x nsamp matrix see what you get. Regards, Christian On 17 Feb 2007, at 21:03, alotof eve wrote: Hi, experts, ?lt;/DIV>    Maybe I misunderstood the command. My MEG data is from NeuroMag 306 channels.  Does that mean I should use "Neuromag-306" as argument? Thanks for any suggestion. ?lt;/DIV> Best, Eve alotof eve wrote: Hi Christian,   ?Yes it works. Thank you so much.   ?But now I met a new problem. I got only a whole .fif data. When I tried the command "MEGMODEL", it said any argument can be left out. However, the error showed up again: >> MEGMODEL ??? Could not load the coil files Error in ==> F:\MATLAB6p5\bin\win32\megmodel.dll   ? I couldn't find any .fif file like Neuromag-122 or coilfile.fif. How do you settle it? Thanks. Best, Eve Christian Hesse wrote: Hi Eve, you should be able to use the meg-pd toolbox (also from FieldTrip) in Matlab under Windows. I got the toolbox to work in Matlab7 under WindowsXP as follows: ? extract the meg-pd-1.2-10.mswin.zip file to somewhere -?then copy (or move) the meg_pd_1.2 directory wherever you want -?in the README file in the meg-pd-1.2-10.mswin directory it specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin\lib\i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of Matlab on your system, in my case this was the directory "MATLAB71\bin\win32" -?start up Matlab, add the fieldtrip and meg_pd_1.2 directories to your path and try to read your .fif file Let me know if this works on your Windows system Regards, Christian On 15 Feb 2007, at 17:32, alotof eve wrote: Hi, experts, ?lt;/DIV>      I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment.   ?The error?showed as:       ?Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. The specified module could not be found.          ?The true is the .dll is in the same path as .m and the path has been add the Matlab.     ?I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. ?lt;/DIV>      Please help me. Thanks. ?lt;/DIV> Best, Eve --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging?lt;/DIV> P.O. Box 9101?lt;/DIV> NL-6500 HB Nijmegen?lt;/DIV> The Netherlands Tel.:?31 (0)24 36 68293 Fax: +31?0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. --------------------------------- No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging?lt;/DIV> P.O. Box 9101?lt;/DIV> NL-6500 HB Nijmegen?lt;/DIV> The Netherlands Tel.:?31 (0)24 36 68293 Fax: +31?0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- --------------------------------- Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Wed Feb 21 09:02:31 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 21 Feb 2007 09:02:31 +0100 Subject: Neuromag data processing In-Reply-To: <596226.68250.qm@web51415.mail.yahoo.com> Message-ID: Hi Eve, > I can use meg-pd toolbox now. However, it seems all the functions > in FieldTrip are for evoked data while my raw data is continuous data. FieldTrip handles a variety of data, and the low level reading functions can deal with continuous or epoch based raw data. When you analyze your data in FT, you usually start by defining your trials, i.e. epochs in your continuous data that are of interest, w.r.t. to some sort of trigger or event. The function PREPROCESSING then scans through your raw data file and returns a data structure which contains all of the specified epochs (for a particular trial definition) in a field data.trial. Please note that this has nothing to do with evoked vs induced responses just yet. You can use the output of PREPROCESSING as input to either TIMELOCKANALYSIS or FREQUANALYSIS which look at evoked and induced phenomena, respectively. Afterwards you can call various statistical functions such as FREQDESCRIPTIVES, etc ... So the reason why I have been giving you the examples using read_header and read_data is because I needed to determine the nature of the error you were getting without really knowning anything about what sort of data is in your file. In your use of FT you do not actually use these functions yourself, but basically use functions like DEFINE_TRIAL and PREPROCESSING to start with. > I tried your suggestion. read_head works but read_data doesn't > work. I don't know this error just due to memory or continuous data > format. I remember previous discussion (2-feb-2006) in this > emaillist mentioned that read_data couldn't deal with continuous > data. The error shows as below: > > ??? Out of memory. Type HELP MEMORY for your options. > Error in ==> F:\MATLAB6p5\toolbox\fieldtrip-20070213\private > \read_data.m > On line 529 ==> dat(:,((i-begepoch)*hdr.nSamples+1):((i- > begepoch+1)*hdr.nSamples)) = buf(chanindx,:); > Error in ==> F:\MATLAB6p5\toolbox\fieldtrip-20070213\read_fcdc_data.m > On line 49 ==> [dat] = read_data(varargin{:}); > Just as one final double check, can you try the following to confirm that you can read a block of data from your .fif file: filename = 'fullpath/name.fif'; dat = read_fcdc_data(filename, 'begsample', 1, 'endsample', 100); size(dat) % this should be an nchan x 100 matrix Please let me know if this works, and then look at how to use the PREPROCESSING and DEFINE_TRIAL funcitons to extract relevant epochs from your raw data file (see http://www2.ru.nl/fcdonders/fieldtrip/ doku.php?id=fieldtrip:documentation:tutorial:preprocessing) Regards, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at HOTMAIL.COM Wed Feb 21 12:15:52 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 21 Feb 2007 11:15:52 +0000 Subject: Time Frequency Analysis! In-Reply-To: <19C4B8DD-20DF-433A-A3C8-90DF045A199E@fcdonders.ru.nl> Message-ID: Hello, A brief on how to do i get the data1, I have the data for 24000 data points with 800 Hz sampling rate (30 secs of data), i construct my own data format according to the data format specified in fieltrip with data.label,fsample,trial,time. I tried the way you have mentioned with the window length this is what i do cfg=[]; winlen=0.5; halfwin=winlen/2; nwin=2.*(30./winlen)-1; cfg.output='pow'; cfg.method='mtmconvol'; cfg.channel = channelselection({'all' 'all'}, data1.label); cfg.foi=2:1:30; cfg.t_ftimwin=zeros(1,nwin).*winlen; cfg.toi=[0:halfwin:30-winlen]; cfg.taper='hanning'; cfg.pad=2; cfg.keeptrials='no'; TFRmult=freqanalysis(cfg,data1); and it throws a error ??? Subscript indices must either be real positive integers or logicals. Error in ==> freqanalysis_mtmconvol at 424 autspctrmacttap(sgnlop,:) = dum(acttimboi); Error in ==> freqanalysis at 167 [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); Please let me know, why do i get this error Thanking you with regards M.Muthuraman. >From: Christian Hesse >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Mon, 19 Feb 2007 13:12:03 +0100 > >Hi Muthuraman, > >ok, in that case you can try the following (this assumes you have windows >of length "winlen" which overlap by "halfwin = winlen/2") > >winlen = 0.5; >% this is in seconds you can also use another time window >halfwin = winlen/2; > >% the total number of windows covering the 30 second period >nwin = 2.*(30./winlen) - 1; > >cfg.method = 'mtmconvol'; >cfg.output = 'pow'; >cfg.t_ftimwin = ones(1,nwin).*winlen; >cfg.toi = [0:halfwin:30-winlen]; > >The important things here to check are >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >2) the times you specify in cfg.toi actually correspond to your time axis >(i.e. do not start before or go on after). > >If you want to use a different overlap, you need to calculate nwin >slightly differently. > >Hope this helps more, >Christian > > > >>Thanks for the suggestion but using the mtmfft which i have done already >>and it works, my interest now is that i would like to use the Time >>frequency analysis 'mtmconvol' to estimate the power in the time >>frequency scale, in which how to get the whole 30secs continous data in >>one time frequency plot(TFR). >> >>Thanking you >> >>with regards >>M.Muthuraman. >> >>>From: Christian Hesse >>>Reply-To: FieldTrip discussion list >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 >>> >>>Hi Muthuraman, >>> >>>>One more question regarding the Time frequency Analysis, i have EMG >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 seconds >>>>of continous data). I would like to do the Timefrequency analysis for >>>>this data and to see the power for the whole 30 seconds >>> >>>use preprocessing to get the EMG data into a single 30s trial (if you >>>want to analyze the rectified EMG, then do the rectification in >>>preprocessing), then use frequanalysis with >>> >>>cfg.method = 'mtmfft'; >>>cfg.output = 'pow'; >>> >>>this should give you the power spectrum of your EMG data over the >>>entire 30 second period. >>> >>>Regards, >>>Christian >>> >>> >>>--------------------------------------------------------------------- - >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: c.hesse at fcdonders.ru.nl >>>Web: www.fcdonders.ru.nl >>>--------------------------------------------------------------------- - >>> >>> >>> >>> >> >>_________________________________________________________________ >>Tried the new MSN Messenger? It�s cool! Download now. http:// >>messenger.msn.com/Download/Default.aspx?mkt=en-in >> > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > _________________________________________________________________ Get Married in 2007. Join Shaadi.com http://www.shaadi.com/ptnr.php?ptnr=mhottag From Jan.Schoffelen at FCDONDERS.RU.NL Wed Feb 21 12:39:30 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 21 Feb 2007 12:39:30 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Please use this: cfg.channel = channelselection({'all'}, data1.label); instead of this: cfg.channel = channelselection({'all' 'all'}, data1.label); JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Wednesday, February 21, 2007 12:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Time Frequency Analysis! Hello, A brief on how to do i get the data1, I have the data for 24000 data points with 800 Hz sampling rate (30 secs of data), i construct my own data format according to the data format specified in fieltrip with data.label,fsample,trial,time. I tried the way you have mentioned with the window length this is what i do cfg=[]; winlen=0.5; halfwin=winlen/2; nwin=2.*(30./winlen)-1; cfg.output='pow'; cfg.method='mtmconvol'; cfg.channel = channelselection({'all' 'all'}, data1.label); cfg.foi=2:1:30; cfg.t_ftimwin=zeros(1,nwin).*winlen; cfg.toi=[0:halfwin:30-winlen]; cfg.taper='hanning'; cfg.pad=2; cfg.keeptrials='no'; TFRmult=freqanalysis(cfg,data1); and it throws a error ??? Subscript indices must either be real positive integers or logicals. Error in ==> freqanalysis_mtmconvol at 424 autspctrmacttap(sgnlop,:) = dum(acttimboi); Error in ==> freqanalysis at 167 [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); Please let me know, why do i get this error Thanking you with regards M.Muthuraman. >From: Christian Hesse >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Mon, 19 Feb 2007 13:12:03 +0100 > >Hi Muthuraman, > >ok, in that case you can try the following (this assumes you have windows >of length "winlen" which overlap by "halfwin = winlen/2") > >winlen = 0.5; >% this is in seconds you can also use another time window >halfwin = winlen/2; > >% the total number of windows covering the 30 second period >nwin = 2.*(30./winlen) - 1; > >cfg.method = 'mtmconvol'; >cfg.output = 'pow'; >cfg.t_ftimwin = ones(1,nwin).*winlen; >cfg.toi = [0:halfwin:30-winlen]; > >The important things here to check are >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >2) the times you specify in cfg.toi actually correspond to your time axis >(i.e. do not start before or go on after). > >If you want to use a different overlap, you need to calculate nwin >slightly differently. > >Hope this helps more, >Christian > > > >>Thanks for the suggestion but using the mtmfft which i have done already >>and it works, my interest now is that i would like to use the Time >>frequency analysis 'mtmconvol' to estimate the power in the time >>frequency scale, in which how to get the whole 30secs continous data in >>one time frequency plot(TFR). >> >>Thanking you >> >>with regards >>M.Muthuraman. >> >>>From: Christian Hesse >>>Reply-To: FieldTrip discussion list >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 >>> >>>Hi Muthuraman, >>> >>>>One more question regarding the Time frequency Analysis, i have EMG >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 seconds >>>>of continous data). I would like to do the Timefrequency analysis for >>>>this data and to see the power for the whole 30 seconds >>> >>>use preprocessing to get the EMG data into a single 30s trial (if you >>>want to analyze the rectified EMG, then do the rectification in >>>preprocessing), then use frequanalysis with >>> >>>cfg.method = 'mtmfft'; >>>cfg.output = 'pow'; >>> >>>this should give you the power spectrum of your EMG data over the >>>entire 30 second period. >>> >>>Regards, >>>Christian >>> >>> >>>--------------------------------------------------------------------- - >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: c.hesse at fcdonders.ru.nl >>>Web: www.fcdonders.ru.nl >>>--------------------------------------------------------------------- - >>> >>> >>> >>> >> >>_________________________________________________________________ >>Tried the new MSN Messenger? It's cool! Download now. http:// >>messenger.msn.com/Download/Default.aspx?mkt=en-in >> > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > _________________________________________________________________ Get Married in 2007. Join Shaadi.com http://www.shaadi.com/ptnr.php?ptnr=mhottag From Jan.Schoffelen at FCDONDERS.RU.NL Wed Feb 21 12:41:24 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 21 Feb 2007 12:41:24 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: What's the time-axis in your data? JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Wednesday, February 21, 2007 12:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Time Frequency Analysis! Hello, A brief on how to do i get the data1, I have the data for 24000 data points with 800 Hz sampling rate (30 secs of data), i construct my own data format according to the data format specified in fieltrip with data.label,fsample,trial,time. I tried the way you have mentioned with the window length this is what i do cfg=[]; winlen=0.5; halfwin=winlen/2; nwin=2.*(30./winlen)-1; cfg.output='pow'; cfg.method='mtmconvol'; cfg.channel = channelselection({'all' 'all'}, data1.label); cfg.foi=2:1:30; cfg.t_ftimwin=zeros(1,nwin).*winlen; cfg.toi=[0:halfwin:30-winlen]; cfg.taper='hanning'; cfg.pad=2; cfg.keeptrials='no'; TFRmult=freqanalysis(cfg,data1); and it throws a error ??? Subscript indices must either be real positive integers or logicals. Error in ==> freqanalysis_mtmconvol at 424 autspctrmacttap(sgnlop,:) = dum(acttimboi); Error in ==> freqanalysis at 167 [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); Please let me know, why do i get this error Thanking you with regards M.Muthuraman. >From: Christian Hesse >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Mon, 19 Feb 2007 13:12:03 +0100 > >Hi Muthuraman, > >ok, in that case you can try the following (this assumes you have windows >of length "winlen" which overlap by "halfwin = winlen/2") > >winlen = 0.5; >% this is in seconds you can also use another time window >halfwin = winlen/2; > >% the total number of windows covering the 30 second period >nwin = 2.*(30./winlen) - 1; > >cfg.method = 'mtmconvol'; >cfg.output = 'pow'; >cfg.t_ftimwin = ones(1,nwin).*winlen; >cfg.toi = [0:halfwin:30-winlen]; > >The important things here to check are >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >2) the times you specify in cfg.toi actually correspond to your time axis >(i.e. do not start before or go on after). > >If you want to use a different overlap, you need to calculate nwin >slightly differently. > >Hope this helps more, >Christian > > > >>Thanks for the suggestion but using the mtmfft which i have done already >>and it works, my interest now is that i would like to use the Time >>frequency analysis 'mtmconvol' to estimate the power in the time >>frequency scale, in which how to get the whole 30secs continous data in >>one time frequency plot(TFR). >> >>Thanking you >> >>with regards >>M.Muthuraman. >> >>>From: Christian Hesse >>>Reply-To: FieldTrip discussion list >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 >>> >>>Hi Muthuraman, >>> >>>>One more question regarding the Time frequency Analysis, i have EMG >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 seconds >>>>of continous data). I would like to do the Timefrequency analysis for >>>>this data and to see the power for the whole 30 seconds >>> >>>use preprocessing to get the EMG data into a single 30s trial (if you >>>want to analyze the rectified EMG, then do the rectification in >>>preprocessing), then use frequanalysis with >>> >>>cfg.method = 'mtmfft'; >>>cfg.output = 'pow'; >>> >>>this should give you the power spectrum of your EMG data over the >>>entire 30 second period. >>> >>>Regards, >>>Christian >>> >>> >>>--------------------------------------------------------------------- - >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: c.hesse at fcdonders.ru.nl >>>Web: www.fcdonders.ru.nl >>>--------------------------------------------------------------------- - >>> >>> >>> >>> >> >>_________________________________________________________________ >>Tried the new MSN Messenger? It's cool! Download now. http:// >>messenger.msn.com/Download/Default.aspx?mkt=en-in >> > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > _________________________________________________________________ Get Married in 2007. Join Shaadi.com http://www.shaadi.com/ptnr.php?ptnr=mhottag From c.hesse at FCDONDERS.RU.NL Wed Feb 21 12:52:01 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 21 Feb 2007 12:52:01 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: > A brief on how to do i get the data1, I have the data for 24000 > data points with 800 Hz sampling rate (30 secs of data), i > construct my own data format according to the data format specified > in fieltrip with > data.label,fsample,trial,time. > I tried the way you have mentioned with the window length > this is what i do > > cfg=[]; > winlen=0.5; > halfwin=winlen/2; > nwin=2.*(30./winlen)-1; > cfg.output='pow'; > cfg.method='mtmconvol'; > cfg.channel = channelselection({'all' 'all'}, data1.label); > cfg.foi=2:1:30; > cfg.t_ftimwin=zeros(1,nwin).*winlen; this should be cfg.t_ftimwin=ones(1,nwin).*winlen; Christian > cfg.toi=[0:halfwin:30-winlen]; > cfg.taper='hanning'; > cfg.pad=2; > cfg.keeptrials='no'; > TFRmult=freqanalysis(cfg,data1); > > and it throws a error > ??? Subscript indices must either be real positive integers or > logicals. > > Error in ==> freqanalysis_mtmconvol at 424 > autspctrmacttap(sgnlop,:) = dum(acttimboi); > > Error in ==> freqanalysis at 167 > [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, > data); > > Please let me know, why do i get this error > > > Thanking you > > with regards > M.Muthuraman. > >> From: Christian Hesse >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> Date: Mon, 19 Feb 2007 13:12:03 +0100 >> >> Hi Muthuraman, >> >> ok, in that case you can try the following (this assumes you have >> windows of length "winlen" which overlap by "halfwin = winlen/2") >> >> winlen = 0.5; >> % this is in seconds you can also use another time window >> halfwin = winlen/2; >> >> % the total number of windows covering the 30 second period >> nwin = 2.*(30./winlen) - 1; >> >> cfg.method = 'mtmconvol'; >> cfg.output = 'pow'; >> cfg.t_ftimwin = ones(1,nwin).*winlen; >> cfg.toi = [0:halfwin:30-winlen]; >> >> The important things here to check are >> 1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >> 2) the times you specify in cfg.toi actually correspond to your >> time axis (i.e. do not start before or go on after). >> >> If you want to use a different overlap, you need to calculate >> nwin slightly differently. >> >> Hope this helps more, >> Christian >> >> >> >>> Thanks for the suggestion but using the mtmfft which i have done >>> already and it works, my interest now is that i would like to >>> use the Time frequency analysis 'mtmconvol' to estimate the >>> power in the time frequency scale, in which how to get the whole >>> 30secs continous data in one time frequency plot(TFR). >>> >>> Thanking you >>> >>> with regards >>> M.Muthuraman. >>> >>>> From: Christian Hesse >>>> Reply-To: FieldTrip discussion list >>>> To: FIELDTRIP at NIC.SURFNET.NL >>>> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >>>> Date: Mon, 19 Feb 2007 11:56:19 +0100 >>>> >>>> Hi Muthuraman, >>>> >>>>> One more question regarding the Time frequency Analysis, i >>>>> have EMG data of 24000 data points with a sampling frequeny >>>>> of 800Hz (30 seconds of continous data). I would like to do >>>>> the Timefrequency analysis for this data and to see the power >>>>> for the whole 30 seconds >>>> >>>> use preprocessing to get the EMG data into a single 30s trial >>>> (if you want to analyze the rectified EMG, then do the >>>> rectification in preprocessing), then use frequanalysis with >>>> >>>> cfg.method = 'mtmfft'; >>>> cfg.output = 'pow'; >>>> >>>> this should give you the power spectrum of your EMG data over >>>> the entire 30 second period. >>>> >>>> Regards, >>>> Christian >>>> >>>> >>>> ------------------------------------------------------------------- >>>> -- - >>>> Christian Hesse, PhD, MIEEE >>>> >>>> F.C. Donders Centre for Cognitive Neuroimaging >>>> P.O. Box 9101 >>>> NL-6500 HB Nijmegen >>>> The Netherlands >>>> >>>> Tel.: +31 (0)24 36 68293 >>>> Fax: +31 (0)24 36 10989 >>>> >>>> Email: c.hesse at fcdonders.ru.nl >>>> Web: www.fcdonders.ru.nl >>>> ------------------------------------------------------------------- >>>> -- - >>>> >>>> >>>> >>>> >>> >>> _________________________________________________________________ >>> Tried the new MSN Messenger? It’s cool! Download now. http:// >>> messenger.msn.com/Download/Default.aspx?mkt=en-in >>> >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> > > _________________________________________________________________ > Get Married in 2007. Join Shaadi.com http://www.shaadi.com/ptnr.php? > ptnr=mhottag > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at HOTMAIL.COM Wed Feb 21 13:14:40 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 21 Feb 2007 12:14:40 +0000 Subject: Time Frequency Analysis! In-Reply-To: <002901c755ad$37635b70$902dae83@fcdonders.nl> Message-ID: Hello JM, The time axis in my data which i define from 0 to 30 secs data1.time{1,1}=0:0.0375:29.99875; after making the changes it works now but i get the only values from 0.125 to 0.625 and all the other values are Nan's thanking you with regards M.Muthuraman. >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Wed, 21 Feb 2007 12:41:24 +0100 > >What's the time-axis in your data? > >JM > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Wednesday, February 21, 2007 12:16 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Hello, > >A brief on how to do i get the data1, I have the data for 24000 data points >with 800 Hz sampling rate (30 secs of data), i construct my own data format >according to the data format specified in fieltrip with >data.label,fsample,trial,time. >I tried the way you have mentioned with the window length >this is what i do > >cfg=[]; >winlen=0.5; >halfwin=winlen/2; >nwin=2.*(30./winlen)-1; >cfg.output='pow'; >cfg.method='mtmconvol'; >cfg.channel = channelselection({'all' 'all'}, data1.label); >cfg.foi=2:1:30; >cfg.t_ftimwin=zeros(1,nwin).*winlen; >cfg.toi=[0:halfwin:30-winlen]; >cfg.taper='hanning'; >cfg.pad=2; >cfg.keeptrials='no'; >TFRmult=freqanalysis(cfg,data1); > >and it throws a error >??? Subscript indices must either be real positive integers or logicals. > >Error in ==> freqanalysis_mtmconvol at 424 > autspctrmacttap(sgnlop,:) = dum(acttimboi); > >Error in ==> freqanalysis at 167 >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); > >Please let me know, why do i get this error > > >Thanking you > >with regards >M.Muthuraman. > > >From: Christian Hesse > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Date: Mon, 19 Feb 2007 13:12:03 +0100 > > > >Hi Muthuraman, > > > >ok, in that case you can try the following (this assumes you have >windows > >of length "winlen" which overlap by "halfwin = winlen/2") > > > >winlen = 0.5; > >% this is in seconds you can also use another time window > >halfwin = winlen/2; > > > >% the total number of windows covering the 30 second period > >nwin = 2.*(30./winlen) - 1; > > > >cfg.method = 'mtmconvol'; > >cfg.output = 'pow'; > >cfg.t_ftimwin = ones(1,nwin).*winlen; > >cfg.toi = [0:halfwin:30-winlen]; > > > >The important things here to check are > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements > >2) the times you specify in cfg.toi actually correspond to your time >axis > >(i.e. do not start before or go on after). > > > >If you want to use a different overlap, you need to calculate nwin > >slightly differently. > > > >Hope this helps more, > >Christian > > > > > > > >>Thanks for the suggestion but using the mtmfft which i have done >already > >>and it works, my interest now is that i would like to use the Time > >>frequency analysis 'mtmconvol' to estimate the power in the time > >>frequency scale, in which how to get the whole 30secs continous data >in > >>one time frequency plot(TFR). > >> > >>Thanking you > >> > >>with regards > >>M.Muthuraman. > >> > >>>From: Christian Hesse > >>>Reply-To: FieldTrip discussion list > >>>To: FIELDTRIP at NIC.SURFNET.NL > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 > >>> > >>>Hi Muthuraman, > >>> > >>>>One more question regarding the Time frequency Analysis, i have EMG > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 >seconds > > >>>>of continous data). I would like to do the Timefrequency analysis >for > >>>>this data and to see the power for the whole 30 seconds > >>> > >>>use preprocessing to get the EMG data into a single 30s trial (if you > >>>want to analyze the rectified EMG, then do the rectification in > >>>preprocessing), then use frequanalysis with > >>> > >>>cfg.method = 'mtmfft'; > >>>cfg.output = 'pow'; > >>> > >>>this should give you the power spectrum of your EMG data over the > >>>entire 30 second period. > >>> > >>>Regards, > >>>Christian > >>> > >>> > >>>--------------------------------------------------------------------- - > >>>Christian Hesse, PhD, MIEEE > >>> > >>>F.C. Donders Centre for Cognitive Neuroimaging > >>>P.O. Box 9101 > >>>NL-6500 HB Nijmegen > >>>The Netherlands > >>> > >>>Tel.: +31 (0)24 36 68293 > >>>Fax: +31 (0)24 36 10989 > >>> > >>>Email: c.hesse at fcdonders.ru.nl > >>>Web: www.fcdonders.ru.nl > >>>--------------------------------------------------------------------- - > >>> > >>> > >>> > >>> > >> > >>_________________________________________________________________ > >>Tried the new MSN Messenger? It's cool! Download now. http:// > >>messenger.msn.com/Download/Default.aspx?mkt=en-in > >> > > > >---------------------------------------------------------------------- > >Christian Hesse, PhD, MIEEE > > > >F.C. Donders Centre for Cognitive Neuroimaging > >P.O. Box 9101 > >NL-6500 HB Nijmegen > >The Netherlands > > > >Tel.: +31 (0)24 36 68293 > >Fax: +31 (0)24 36 10989 > > > >Email: c.hesse at fcdonders.ru.nl > >Web: www.fcdonders.ru.nl > >---------------------------------------------------------------------- > > > > > > > > > >_________________________________________________________________ >Get Married in 2007. Join Shaadi.com >http://www.shaadi.com/ptnr.php?ptnr=mhottag _________________________________________________________________ Crave for a healthier lifestyle? Ask an expert http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm From Jan.Schoffelen at FCDONDERS.RU.NL Wed Feb 21 13:39:33 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 21 Feb 2007 13:39:33 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Hi Muthu, Please put cfg.pad at 30. As you can read in the frequency analysis tutorials, the cfg.pad is used to pad out your data with zeros until the specified length, to obtain the spectral interpolation required. I suspect that having your cfg.pad at only 2, while having a data length which is way longer, you run into problems. JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Wednesday, February 21, 2007 1:15 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Time Frequency Analysis! Hello JM, The time axis in my data which i define from 0 to 30 secs data1.time{1,1}=0:0.0375:29.99875; after making the changes it works now but i get the only values from 0.125 to 0.625 and all the other values are Nan's thanking you with regards M.Muthuraman. >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Wed, 21 Feb 2007 12:41:24 +0100 > >What's the time-axis in your data? > >JM > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Wednesday, February 21, 2007 12:16 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Hello, > >A brief on how to do i get the data1, I have the data for 24000 data points >with 800 Hz sampling rate (30 secs of data), i construct my own data format >according to the data format specified in fieltrip with >data.label,fsample,trial,time. >I tried the way you have mentioned with the window length >this is what i do > >cfg=[]; >winlen=0.5; >halfwin=winlen/2; >nwin=2.*(30./winlen)-1; >cfg.output='pow'; >cfg.method='mtmconvol'; >cfg.channel = channelselection({'all' 'all'}, data1.label); >cfg.foi=2:1:30; >cfg.t_ftimwin=zeros(1,nwin).*winlen; >cfg.toi=[0:halfwin:30-winlen]; >cfg.taper='hanning'; >cfg.pad=2; >cfg.keeptrials='no'; >TFRmult=freqanalysis(cfg,data1); > >and it throws a error >??? Subscript indices must either be real positive integers or logicals. > >Error in ==> freqanalysis_mtmconvol at 424 > autspctrmacttap(sgnlop,:) = dum(acttimboi); > >Error in ==> freqanalysis at 167 >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); > >Please let me know, why do i get this error > > >Thanking you > >with regards >M.Muthuraman. > > >From: Christian Hesse > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Date: Mon, 19 Feb 2007 13:12:03 +0100 > > > >Hi Muthuraman, > > > >ok, in that case you can try the following (this assumes you have >windows > >of length "winlen" which overlap by "halfwin = winlen/2") > > > >winlen = 0.5; > >% this is in seconds you can also use another time window > >halfwin = winlen/2; > > > >% the total number of windows covering the 30 second period > >nwin = 2.*(30./winlen) - 1; > > > >cfg.method = 'mtmconvol'; > >cfg.output = 'pow'; > >cfg.t_ftimwin = ones(1,nwin).*winlen; > >cfg.toi = [0:halfwin:30-winlen]; > > > >The important things here to check are > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements > >2) the times you specify in cfg.toi actually correspond to your time >axis > >(i.e. do not start before or go on after). > > > >If you want to use a different overlap, you need to calculate nwin > >slightly differently. > > > >Hope this helps more, > >Christian > > > > > > > >>Thanks for the suggestion but using the mtmfft which i have done >already > >>and it works, my interest now is that i would like to use the Time > >>frequency analysis 'mtmconvol' to estimate the power in the time > >>frequency scale, in which how to get the whole 30secs continous data >in > >>one time frequency plot(TFR). > >> > >>Thanking you > >> > >>with regards > >>M.Muthuraman. > >> > >>>From: Christian Hesse > >>>Reply-To: FieldTrip discussion list > >>>To: FIELDTRIP at NIC.SURFNET.NL > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 > >>> > >>>Hi Muthuraman, > >>> > >>>>One more question regarding the Time frequency Analysis, i have EMG > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 >seconds > > >>>>of continous data). I would like to do the Timefrequency analysis >for > >>>>this data and to see the power for the whole 30 seconds > >>> > >>>use preprocessing to get the EMG data into a single 30s trial (if you > >>>want to analyze the rectified EMG, then do the rectification in > >>>preprocessing), then use frequanalysis with > >>> > >>>cfg.method = 'mtmfft'; > >>>cfg.output = 'pow'; > >>> > >>>this should give you the power spectrum of your EMG data over the > >>>entire 30 second period. > >>> > >>>Regards, > >>>Christian > >>> > >>> > >>>--------------------------------------------------------------------- - > >>>Christian Hesse, PhD, MIEEE > >>> > >>>F.C. Donders Centre for Cognitive Neuroimaging > >>>P.O. Box 9101 > >>>NL-6500 HB Nijmegen > >>>The Netherlands > >>> > >>>Tel.: +31 (0)24 36 68293 > >>>Fax: +31 (0)24 36 10989 > >>> > >>>Email: c.hesse at fcdonders.ru.nl > >>>Web: www.fcdonders.ru.nl > >>>--------------------------------------------------------------------- - > >>> > >>> > >>> > >>> > >> > >>_________________________________________________________________ > >>Tried the new MSN Messenger? It's cool! Download now. http:// > >>messenger.msn.com/Download/Default.aspx?mkt=en-in > >> > > > >---------------------------------------------------------------------- > >Christian Hesse, PhD, MIEEE > > > >F.C. Donders Centre for Cognitive Neuroimaging > >P.O. Box 9101 > >NL-6500 HB Nijmegen > >The Netherlands > > > >Tel.: +31 (0)24 36 68293 > >Fax: +31 (0)24 36 10989 > > > >Email: c.hesse at fcdonders.ru.nl > >Web: www.fcdonders.ru.nl > >---------------------------------------------------------------------- > > > > > > > > > >_________________________________________________________________ >Get Married in 2007. Join Shaadi.com >http://www.shaadi.com/ptnr.php?ptnr=mhottag _________________________________________________________________ Crave for a healthier lifestyle? Ask an expert http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm From arno at SALK.EDU Wed Feb 21 13:57:14 2007 From: arno at SALK.EDU (arno) Date: Wed, 21 Feb 2007 13:57:14 +0100 Subject: Neuromag data processing In-Reply-To: Message-ID: Is it possible to do source localization of Neuromag data using Fieldtrip? I looked at the documentation but did not find anything. How can I read the BEM model within Fieldtrip and use it. Just a few commands to start up would be useful. The goal of this is to allow EEGLAB users to perform source localization of their independent components through the EEGLAB-Fieldtrip pipeline. Thanks a lot, Arno From muthuraman10 at HOTMAIL.COM Wed Feb 21 14:39:52 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 21 Feb 2007 13:39:52 +0000 Subject: Time Frequency Analysis! In-Reply-To: <002d01c755b5$56993070$902dae83@fcdonders.nl> Message-ID: Hi JM, After changing the padding to 30 still i get the values from 0.125 to 0.625 and all the other values are Nan's in the TFR. Thanking you With regards M.Muthuraman >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Wed, 21 Feb 2007 13:39:33 +0100 > >Hi Muthu, > >Please put cfg.pad at 30. >As you can read in the frequency analysis tutorials, the cfg.pad is used to >pad out your data with zeros until the specified length, to obtain the >spectral interpolation required. I suspect that having your cfg.pad at only >2, while having a data length which is way longer, you run into problems. > >JM > > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Wednesday, February 21, 2007 1:15 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Hello JM, > >The time axis in my data which i define from 0 to 30 secs > >data1.time{1,1}=0:0.0375:29.99875; > >after making the changes it works now but i get the only values from > >0.125 to 0.625 and all the other values are Nan's > >thanking you > >with regards >M.Muthuraman. > > >From: Jan Mathijs Schoffelen > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Date: Wed, 21 Feb 2007 12:41:24 +0100 > > > >What's the time-axis in your data? > > > >JM > > > >-----Original Message----- > >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >Behalf > >Of Muthuraman Muthuraman > >Sent: Wednesday, February 21, 2007 12:16 PM > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > > >Hello, > > > >A brief on how to do i get the data1, I have the data for 24000 data >points > >with 800 Hz sampling rate (30 secs of data), i construct my own data >format > >according to the data format specified in fieltrip with > >data.label,fsample,trial,time. > >I tried the way you have mentioned with the window length > >this is what i do > > > >cfg=[]; > >winlen=0.5; > >halfwin=winlen/2; > >nwin=2.*(30./winlen)-1; > >cfg.output='pow'; > >cfg.method='mtmconvol'; > >cfg.channel = channelselection({'all' 'all'}, data1.label); > >cfg.foi=2:1:30; > >cfg.t_ftimwin=zeros(1,nwin).*winlen; > >cfg.toi=[0:halfwin:30-winlen]; > >cfg.taper='hanning'; > >cfg.pad=2; > >cfg.keeptrials='no'; > >TFRmult=freqanalysis(cfg,data1); > > > >and it throws a error > >??? Subscript indices must either be real positive integers or logicals. > > > >Error in ==> freqanalysis_mtmconvol at 424 > > autspctrmacttap(sgnlop,:) = dum(acttimboi); > > > >Error in ==> freqanalysis at 167 > >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); > > > >Please let me know, why do i get this error > > > > > >Thanking you > > > >with regards > >M.Muthuraman. > > > > >From: Christian Hesse > > >Reply-To: FieldTrip discussion list > > >To: FIELDTRIP at NIC.SURFNET.NL > > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > >Date: Mon, 19 Feb 2007 13:12:03 +0100 > > > > > >Hi Muthuraman, > > > > > >ok, in that case you can try the following (this assumes you have > >windows > > >of length "winlen" which overlap by "halfwin = winlen/2") > > > > > >winlen = 0.5; > > >% this is in seconds you can also use another time window > > >halfwin = winlen/2; > > > > > >% the total number of windows covering the 30 second period > > >nwin = 2.*(30./winlen) - 1; > > > > > >cfg.method = 'mtmconvol'; > > >cfg.output = 'pow'; > > >cfg.t_ftimwin = ones(1,nwin).*winlen; > > >cfg.toi = [0:halfwin:30-winlen]; > > > > > >The important things here to check are > > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements > > >2) the times you specify in cfg.toi actually correspond to your time > >axis > > >(i.e. do not start before or go on after). > > > > > >If you want to use a different overlap, you need to calculate nwin > > >slightly differently. > > > > > >Hope this helps more, > > >Christian > > > > > > > > > > > >>Thanks for the suggestion but using the mtmfft which i have done > >already > > >>and it works, my interest now is that i would like to use the Time > > >>frequency analysis 'mtmconvol' to estimate the power in the time > > >>frequency scale, in which how to get the whole 30secs continous data > >in > > >>one time frequency plot(TFR). > > >> > > >>Thanking you > > >> > > >>with regards > > >>M.Muthuraman. > > >> > > >>>From: Christian Hesse > > >>>Reply-To: FieldTrip discussion list > > >>>To: FIELDTRIP at NIC.SURFNET.NL > > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 > > >>> > > >>>Hi Muthuraman, > > >>> > > >>>>One more question regarding the Time frequency Analysis, i have EMG > > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 > >seconds > > > > >>>>of continous data). I would like to do the Timefrequency analysis > >for > > >>>>this data and to see the power for the whole 30 seconds > > >>> > > >>>use preprocessing to get the EMG data into a single 30s trial (if >you > > >>>want to analyze the rectified EMG, then do the rectification in > > >>>preprocessing), then use frequanalysis with > > >>> > > >>>cfg.method = 'mtmfft'; > > >>>cfg.output = 'pow'; > > >>> > > >>>this should give you the power spectrum of your EMG data over the > > >>>entire 30 second period. > > >>> > > >>>Regards, > > >>>Christian > > >>> > > >>> > > >>>--------------------------------------------------------------------- >- > > >>>Christian Hesse, PhD, MIEEE > > >>> > > >>>F.C. Donders Centre for Cognitive Neuroimaging > > >>>P.O. Box 9101 > > >>>NL-6500 HB Nijmegen > > >>>The Netherlands > > >>> > > >>>Tel.: +31 (0)24 36 68293 > > >>>Fax: +31 (0)24 36 10989 > > >>> > > >>>Email: c.hesse at fcdonders.ru.nl > > >>>Web: www.fcdonders.ru.nl > > >>>--------------------------------------------------------------------- >- > > >>> > > >>> > > >>> > > >>> > > >> > > >>_________________________________________________________________ > > >>Tried the new MSN Messenger? It's cool! Download now. http:// > > >>messenger.msn.com/Download/Default.aspx?mkt=en-in > > >> > > > > > >---------------------------------------------------------------------- > > >Christian Hesse, PhD, MIEEE > > > > > >F.C. Donders Centre for Cognitive Neuroimaging > > >P.O. Box 9101 > > >NL-6500 HB Nijmegen > > >The Netherlands > > > > > >Tel.: +31 (0)24 36 68293 > > >Fax: +31 (0)24 36 10989 > > > > > >Email: c.hesse at fcdonders.ru.nl > > >Web: www.fcdonders.ru.nl > > >---------------------------------------------------------------------- > > > > > > > > > > > > > > > >_________________________________________________________________ > >Get Married in 2007. Join Shaadi.com > >http://www.shaadi.com/ptnr.php?ptnr=mhottag > >_________________________________________________________________ >Crave for a healthier lifestyle? Ask an expert >http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm _________________________________________________________________ Spice up your IM conversations. New, colorful and animated emoticons. Get chatting! http://server1.msn.co.in/SP05/emoticons/ From Jan.Schoffelen at FCDONDERS.RU.NL Wed Feb 21 14:46:14 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 21 Feb 2007 14:46:14 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: What about specifying a correct time axis? I would say, that a sampling rate of 800 hertz has a sampling interval of 0.00125 seconds, so your data.time{1} = 0:0.00125:30-0.00125; instead of what you had. JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Wednesday, February 21, 2007 2:40 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Time Frequency Analysis! Hi JM, After changing the padding to 30 still i get the values from 0.125 to 0.625 and all the other values are Nan's in the TFR. Thanking you With regards M.Muthuraman >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Wed, 21 Feb 2007 13:39:33 +0100 > >Hi Muthu, > >Please put cfg.pad at 30. >As you can read in the frequency analysis tutorials, the cfg.pad is used to >pad out your data with zeros until the specified length, to obtain the >spectral interpolation required. I suspect that having your cfg.pad at only >2, while having a data length which is way longer, you run into problems. > >JM > > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Wednesday, February 21, 2007 1:15 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Hello JM, > >The time axis in my data which i define from 0 to 30 secs > >data1.time{1,1}=0:0.0375:29.99875; > >after making the changes it works now but i get the only values from > >0.125 to 0.625 and all the other values are Nan's > >thanking you > >with regards >M.Muthuraman. > > >From: Jan Mathijs Schoffelen > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Date: Wed, 21 Feb 2007 12:41:24 +0100 > > > >What's the time-axis in your data? > > > >JM > > > >-----Original Message----- > >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >Behalf > >Of Muthuraman Muthuraman > >Sent: Wednesday, February 21, 2007 12:16 PM > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > > >Hello, > > > >A brief on how to do i get the data1, I have the data for 24000 data >points > >with 800 Hz sampling rate (30 secs of data), i construct my own data >format > >according to the data format specified in fieltrip with > >data.label,fsample,trial,time. > >I tried the way you have mentioned with the window length > >this is what i do > > > >cfg=[]; > >winlen=0.5; > >halfwin=winlen/2; > >nwin=2.*(30./winlen)-1; > >cfg.output='pow'; > >cfg.method='mtmconvol'; > >cfg.channel = channelselection({'all' 'all'}, data1.label); > >cfg.foi=2:1:30; > >cfg.t_ftimwin=zeros(1,nwin).*winlen; > >cfg.toi=[0:halfwin:30-winlen]; > >cfg.taper='hanning'; > >cfg.pad=2; > >cfg.keeptrials='no'; > >TFRmult=freqanalysis(cfg,data1); > > > >and it throws a error > >??? Subscript indices must either be real positive integers or logicals. > > > >Error in ==> freqanalysis_mtmconvol at 424 > > autspctrmacttap(sgnlop,:) = dum(acttimboi); > > > >Error in ==> freqanalysis at 167 > >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); > > > >Please let me know, why do i get this error > > > > > >Thanking you > > > >with regards > >M.Muthuraman. > > > > >From: Christian Hesse > > >Reply-To: FieldTrip discussion list > > >To: FIELDTRIP at NIC.SURFNET.NL > > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > >Date: Mon, 19 Feb 2007 13:12:03 +0100 > > > > > >Hi Muthuraman, > > > > > >ok, in that case you can try the following (this assumes you have > >windows > > >of length "winlen" which overlap by "halfwin = winlen/2") > > > > > >winlen = 0.5; > > >% this is in seconds you can also use another time window > > >halfwin = winlen/2; > > > > > >% the total number of windows covering the 30 second period > > >nwin = 2.*(30./winlen) - 1; > > > > > >cfg.method = 'mtmconvol'; > > >cfg.output = 'pow'; > > >cfg.t_ftimwin = ones(1,nwin).*winlen; > > >cfg.toi = [0:halfwin:30-winlen]; > > > > > >The important things here to check are > > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements > > >2) the times you specify in cfg.toi actually correspond to your time > >axis > > >(i.e. do not start before or go on after). > > > > > >If you want to use a different overlap, you need to calculate nwin > > >slightly differently. > > > > > >Hope this helps more, > > >Christian > > > > > > > > > > > >>Thanks for the suggestion but using the mtmfft which i have done > >already > > >>and it works, my interest now is that i would like to use the Time > > >>frequency analysis 'mtmconvol' to estimate the power in the time > > >>frequency scale, in which how to get the whole 30secs continous data > >in > > >>one time frequency plot(TFR). > > >> > > >>Thanking you > > >> > > >>with regards > > >>M.Muthuraman. > > >> > > >>>From: Christian Hesse > > >>>Reply-To: FieldTrip discussion list > > >>>To: FIELDTRIP at NIC.SURFNET.NL > > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 > > >>> > > >>>Hi Muthuraman, > > >>> > > >>>>One more question regarding the Time frequency Analysis, i have EMG > > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 > >seconds > > > > >>>>of continous data). I would like to do the Timefrequency analysis > >for > > >>>>this data and to see the power for the whole 30 seconds > > >>> > > >>>use preprocessing to get the EMG data into a single 30s trial (if >you > > >>>want to analyze the rectified EMG, then do the rectification in > > >>>preprocessing), then use frequanalysis with > > >>> > > >>>cfg.method = 'mtmfft'; > > >>>cfg.output = 'pow'; > > >>> > > >>>this should give you the power spectrum of your EMG data over the > > >>>entire 30 second period. > > >>> > > >>>Regards, > > >>>Christian > > >>> > > >>> > > >>>--------------------------------------------------------------------- >- > > >>>Christian Hesse, PhD, MIEEE > > >>> > > >>>F.C. Donders Centre for Cognitive Neuroimaging > > >>>P.O. Box 9101 > > >>>NL-6500 HB Nijmegen > > >>>The Netherlands > > >>> > > >>>Tel.: +31 (0)24 36 68293 > > >>>Fax: +31 (0)24 36 10989 > > >>> > > >>>Email: c.hesse at fcdonders.ru.nl > > >>>Web: www.fcdonders.ru.nl > > >>>--------------------------------------------------------------------- >- > > >>> > > >>> > > >>> > > >>> > > >> > > >>_________________________________________________________________ > > >>Tried the new MSN Messenger? It's cool! Download now. http:// > > >>messenger.msn.com/Download/Default.aspx?mkt=en-in > > >> > > > > > >---------------------------------------------------------------------- > > >Christian Hesse, PhD, MIEEE > > > > > >F.C. Donders Centre for Cognitive Neuroimaging > > >P.O. Box 9101 > > >NL-6500 HB Nijmegen > > >The Netherlands > > > > > >Tel.: +31 (0)24 36 68293 > > >Fax: +31 (0)24 36 10989 > > > > > >Email: c.hesse at fcdonders.ru.nl > > >Web: www.fcdonders.ru.nl > > >---------------------------------------------------------------------- > > > > > > > > > > > > > > > >_________________________________________________________________ > >Get Married in 2007. Join Shaadi.com > >http://www.shaadi.com/ptnr.php?ptnr=mhottag > >_________________________________________________________________ >Crave for a healthier lifestyle? Ask an expert >http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm _________________________________________________________________ Spice up your IM conversations. New, colorful and animated emoticons. Get chatting! http://server1.msn.co.in/SP05/emoticons/ From Marcel.Bastiaansen at FCDONDERS.RU.NL Wed Feb 21 14:46:27 2007 From: Marcel.Bastiaansen at FCDONDERS.RU.NL (Marcel Bastiaansen) Date: Wed, 21 Feb 2007 14:46:27 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Dear Muthuraman & Jan Matthijs, It is good to have an email discussion list for fieldtrip, so that all users can benefit from each others problems, questions/answers and experiences with the software. However, if an email correspondence between two persons only involves highly user-specific details about scripts, properties of the data of that specific user etc., I think it would be better to switch to 'bilateral mode', that is, to continue the exchange of information outside of the discussion list. This prevent people's mailboxes of getting filled with lots of emails about details they don't need to know. Thanks, Marcel Muthuraman Muthuraman wrote: > Hi JM, > > After changing the padding to 30 still i get the values from 0.125 to > 0.625 and all the other values are Nan's in the TFR. > > Thanking you > > With regards > M.Muthuraman > > > >> From: Jan Mathijs Schoffelen >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> Date: Wed, 21 Feb 2007 13:39:33 +0100 >> >> Hi Muthu, >> >> Please put cfg.pad at 30. >> As you can read in the frequency analysis tutorials, the cfg.pad is >> used to >> pad out your data with zeros until the specified length, to obtain the >> spectral interpolation required. I suspect that having your cfg.pad >> at only >> 2, while having a data length which is way longer, you run into >> problems. >> >> JM >> >> >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf >> Of Muthuraman Muthuraman >> Sent: Wednesday, February 21, 2007 1:15 PM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> >> Hello JM, >> >> The time axis in my data which i define from 0 to 30 secs >> >> data1.time{1,1}=0:0.0375:29.99875; >> >> after making the changes it works now but i get the only values from >> >> 0.125 to 0.625 and all the other values are Nan's >> >> thanking you >> >> with regards >> M.Muthuraman. >> >> >From: Jan Mathijs Schoffelen >> >Reply-To: FieldTrip discussion list >> >To: FIELDTRIP at NIC.SURFNET.NL >> >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> >Date: Wed, 21 Feb 2007 12:41:24 +0100 >> > >> >What's the time-axis in your data? >> > >> >JM >> > >> >-----Original Message----- >> >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf >> >Of Muthuraman Muthuraman >> >Sent: Wednesday, February 21, 2007 12:16 PM >> >To: FIELDTRIP at NIC.SURFNET.NL >> >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> > >> >Hello, >> > >> >A brief on how to do i get the data1, I have the data for 24000 data >> points >> >with 800 Hz sampling rate (30 secs of data), i construct my own data >> format >> >according to the data format specified in fieltrip with >> >data.label,fsample,trial,time. >> >I tried the way you have mentioned with the window length >> >this is what i do >> > >> >cfg=[]; >> >winlen=0.5; >> >halfwin=winlen/2; >> >nwin=2.*(30./winlen)-1; >> >cfg.output='pow'; >> >cfg.method='mtmconvol'; >> >cfg.channel = channelselection({'all' 'all'}, data1.label); >> >cfg.foi=2:1:30; >> >cfg.t_ftimwin=zeros(1,nwin).*winlen; >> >cfg.toi=[0:halfwin:30-winlen]; >> >cfg.taper='hanning'; >> >cfg.pad=2; >> >cfg.keeptrials='no'; >> >TFRmult=freqanalysis(cfg,data1); >> > >> >and it throws a error >> >??? Subscript indices must either be real positive integers or >> logicals. >> > >> >Error in ==> freqanalysis_mtmconvol at 424 >> > autspctrmacttap(sgnlop,:) = dum(acttimboi); >> > >> >Error in ==> freqanalysis at 167 >> >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, >> data); >> > >> >Please let me know, why do i get this error >> > >> > >> >Thanking you >> > >> >with regards >> >M.Muthuraman. >> > >> > >From: Christian Hesse >> > >Reply-To: FieldTrip discussion list >> > >To: FIELDTRIP at NIC.SURFNET.NL >> > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> > >Date: Mon, 19 Feb 2007 13:12:03 +0100 >> > > >> > >Hi Muthuraman, >> > > >> > >ok, in that case you can try the following (this assumes you have >> >windows >> > >of length "winlen" which overlap by "halfwin = winlen/2") >> > > >> > >winlen = 0.5; >> > >% this is in seconds you can also use another time window >> > >halfwin = winlen/2; >> > > >> > >% the total number of windows covering the 30 second period >> > >nwin = 2.*(30./winlen) - 1; >> > > >> > >cfg.method = 'mtmconvol'; >> > >cfg.output = 'pow'; >> > >cfg.t_ftimwin = ones(1,nwin).*winlen; >> > >cfg.toi = [0:halfwin:30-winlen]; >> > > >> > >The important things here to check are >> > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >> > >2) the times you specify in cfg.toi actually correspond to your time >> >axis >> > >(i.e. do not start before or go on after). >> > > >> > >If you want to use a different overlap, you need to calculate nwin >> > >slightly differently. >> > > >> > >Hope this helps more, >> > >Christian >> > > >> > > >> > > >> > >>Thanks for the suggestion but using the mtmfft which i have done >> >already >> > >>and it works, my interest now is that i would like to use the Time >> > >>frequency analysis 'mtmconvol' to estimate the power in the time >> > >>frequency scale, in which how to get the whole 30secs continous >> data >> >in >> > >>one time frequency plot(TFR). >> > >> >> > >>Thanking you >> > >> >> > >>with regards >> > >>M.Muthuraman. >> > >> >> > >>>From: Christian Hesse >> > >>>Reply-To: FieldTrip discussion list >> > >>>To: FIELDTRIP at NIC.SURFNET.NL >> > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 >> > >>> >> > >>>Hi Muthuraman, >> > >>> >> > >>>>One more question regarding the Time frequency Analysis, i >> have EMG >> > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 >> >seconds >> > >> > >>>>of continous data). I would like to do the Timefrequency >> analysis >> >for >> > >>>>this data and to see the power for the whole 30 seconds >> > >>> >> > >>>use preprocessing to get the EMG data into a single 30s trial >> (if you >> > >>>want to analyze the rectified EMG, then do the rectification in >> > >>>preprocessing), then use frequanalysis with >> > >>> >> > >>>cfg.method = 'mtmfft'; >> > >>>cfg.output = 'pow'; >> > >>> >> > >>>this should give you the power spectrum of your EMG data over the >> > >>>entire 30 second period. >> > >>> >> > >>>Regards, >> > >>>Christian >> > >>> >> > >>> >> > >> >>>--------------------------------------------------------------------- >> - >> > >>>Christian Hesse, PhD, MIEEE >> > >>> >> > >>>F.C. Donders Centre for Cognitive Neuroimaging >> > >>>P.O. Box 9101 >> > >>>NL-6500 HB Nijmegen >> > >>>The Netherlands >> > >>> >> > >>>Tel.: +31 (0)24 36 68293 >> > >>>Fax: +31 (0)24 36 10989 >> > >>> >> > >>>Email: c.hesse at fcdonders.ru.nl >> > >>>Web: www.fcdonders.ru.nl >> > >> >>>--------------------------------------------------------------------- >> - >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >>_________________________________________________________________ >> > >>Tried the new MSN Messenger? It's cool! Download now. http:// >> > >>messenger.msn.com/Download/Default.aspx?mkt=en-in >> > >> >> > > >> > >> >---------------------------------------------------------------------- >> > >Christian Hesse, PhD, MIEEE >> > > >> > >F.C. Donders Centre for Cognitive Neuroimaging >> > >P.O. Box 9101 >> > >NL-6500 HB Nijmegen >> > >The Netherlands >> > > >> > >Tel.: +31 (0)24 36 68293 >> > >Fax: +31 (0)24 36 10989 >> > > >> > >Email: c.hesse at fcdonders.ru.nl >> > >Web: www.fcdonders.ru.nl >> > >> >---------------------------------------------------------------------- >> > > >> > > >> > > >> > > >> > >> >_________________________________________________________________ >> >Get Married in 2007. Join Shaadi.com >> >http://www.shaadi.com/ptnr.php?ptnr=mhottag >> >> _________________________________________________________________ >> Crave for a healthier lifestyle? Ask an expert >> http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm > > _________________________________________________________________ > Spice up your IM conversations. New, colorful and animated emoticons. > Get chatting! http://server1.msn.co.in/SP05/emoticons/ > -- dr. Marcel C.M. Bastiaansen. Max Planck Institute for Psycholinguistics Visiting Adress: Wundtlaan 1, 6525 XD Nijmegen, the Netherlands Mailing adress: P.O. Box 310, 6500 AH Nijmegen, the Netherlands phone: +31 24 3521 347 fax: +31 24 3521 213 mail: marcel.bastiaansen at mpi.nl web: http://www.mpi.nl/Members/MarcelBastiaansen and FC Donders Centre for Cognitive Neuroimaging Visiting address: Kapittelweg 29, 6525 EN Nijmegen, the Netherlands Mailing address: PO Box 9101, 6500 HB Nijmegen, the Netherlands phone: + 31 24 3610 882 fax: + 31 24 3610 989 mail: marcel.bastiaansen at fcdonders.ru.nl web: http://www.ru.nl/aspx/get.aspx?xdl=/views/run/xdl/page&ItmIdt=20592&SitIdt=119&VarIdt=96 -- From r.oostenveld at FCDONDERS.RU.NL Wed Feb 21 15:32:51 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 21 Feb 2007 15:32:51 +0100 Subject: too many mails on list? -> use digest mode In-Reply-To: <45DC4D33.8040800@fcdonders.ru.nl> Message-ID: Dear FieldTrip list subscribers, It seems that the amount of traffic on the list recently has increased quite a bit. That is good, since it means that there are ideas to be shared, but not all emails will be equally interesting to everyone. I still suggest to keep the discussions on the list and not move them off the list, since quite some other people on the list can also learn from it. Futhermore, it helps to distribute the load of replying to questions over multiple people. Also it is good to build up an archive with email correspondence that is accessible to everyone (see https://listserv.surfnet.nl/archives/fieldtrip.html). For people who feel that the number of mails on the list is too high, I have two suggestions 1) you can use email filter rules in your email client (works in Outlook, but also in most other email clients). 2) you can switch your subscription to the discussion list to "digest mode". With a "digest" subscription, you receive larger messages (called "digests") at regular intervals, usually once per day or once per week. These "digests" are collections of individual list postings. Some lists are so active that they produce several digests per day. Digests are a good compromise between reading everything as it is posted and feeling like the list is clogging your mailbox with a multitude of individual postings. You can switch to digest mode on the listserv website, see https:// listserv.surfnet.nl/scripts/wa.cgi?SUBED1=fieldtrip&A=1 best regards, Robert PS note that I don't know at the moment how the digests are currently configured on the FT discussion list, daily or even less frequent On 21 Feb 2007, at 14:46, Marcel Bastiaansen wrote: > It is good to have an email discussion list for fieldtrip, so that > all users can benefit from each others problems, questions/answers > and experiences with the software. > > However, if an email correspondence between two persons only > involves highly user-specific details about scripts, properties of > the data of that specific user etc., I think it would be better to > switch to 'bilateral mode', that is, to continue the exchange of > information outside of the discussion list. This prevent people's > mailboxes of getting filled with lots of emails about details they > don't need to know. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 21 15:43:37 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 21 Feb 2007 15:43:37 +0100 Subject: Neuromag data processing In-Reply-To: <45DC41AA.2020509@salk.edu> Message-ID: Hi Arno On 21 Feb 2007, at 13:57, arno wrote: > Is it possible to do source localization of Neuromag data using > Fieldtrip? I looked at the documentation but did not find anything. > How can I read the BEM model within Fieldtrip and use it. Just a > few commands to start up would be useful. Yes, that is possible. You can either use headmodels (single sphere, multi-sphere, or realistic single-shell) that are constructed within FieldTrip, but you can also use the neuromag mex files in combination with headmodels that were constructed in the Neuromag software. Since I do not have the complete neuomag software, I cannot explain in detail how to follow the second "neuromag" path: I did write part of the code for it, and included other parts contributed by Joachim Gross and Lauri Parkkonen, but I cannot easily test it myself or make a demo script. The first path (i.e. using "pure fieldtrip") is of course fully accessible to anyone. Note that although we at the Donders sometimes use the CTF software to construct headmodels, that is not a requirement as you can do it completely within FieldTrip. An example for the different MEG headmodels is given on http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:make_leadfields_using_different_headmodels I suggest that you start with the simplest one, a manually specified single-sphere model cfg.vol.r = 12; % radius, here in cm cfg.vol.r = [0 0 4]; % origin, here in cm The preferred headmodel is a single-shell model (based on an algorithm and code from Guido Nolte) which is the las one on the example page, see the PREPARE_SINGLESHELL function for that. Note that the headmodel, the anatomical MRI (for plotting and headmodel construction), the sensors and the dipoles all should be expressed in the same (head-)coordinate system. best regards, Robert From sameer at ANDREW.CMU.EDU Wed Feb 21 16:13:10 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 21 Feb 2007 10:13:10 -0500 Subject: eog artifact rejection In-Reply-To: <001e01c75509$e6400390$902dae83@fcdonders.nl> Message-ID: Dear JM and Christian, On Tue, 20 Feb 2007, Jan Mathijs Schoffelen wrote: > Dear sameer, > > Ad problem 1: Please specify: > > cfg.vartrllength = 2, prior to doing the timelockanalysis This fixed the problem, thanks. > Ad problem 2: Please specify: > > cfg.channelcmb = {'all' 'EOG'}, prior to doing freqdescriptives. (instead of > {'all' 'ECG'} Actually, I was using EOG, forgot to change it in the notes. so it is still not working. But I think I'll follow Christian's suggestion. I did not think of trying that with Fieldtrip data structure. I am assuming if I find components with artifacts, in one set of trials, the same components will be blink artifacts in all trials as the ICAs = W * trialdata. sameer > > > JM > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Sameer Walawalkar > Sent: Tuesday, February 20, 2007 5:07 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] eog artifact rejection > > I am interested in removing blink artifacts. Unfortunately, with > fieldtrip component analysis, it is difficult to identify the independent > component corresponding to blinks by visual inspection due to the short > timecourse over which they are presented (trial length). > > There are essentially two errors: > 1> ??? Error using ==> timelockanalysis > data has variable trial lengths, you specified not to accept that ! > 2> fdcomp.cohspctrm does not exist. > > I tried to follow instructions under independent component analysis (ICA) > to remove ECG artifacts replacing eog for ecg. (I did not do any > resampling). (Is this a good idea?) > > So I did, > % go back to the raw data on disk and detect the peaks in the EOG channel, > cfg = same.old.cfg.used.for.component.analysis.of.data; > cfg.artfctdef.eog.pretim = 0.25; > cfg.artfctdef.eog.psttim = 0.50-1/1200; > > [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts) > > > % preprocess the data around the peaks, i.e. read the segments of raw data > containing the EOG artifact > cfg = []; > cfg.dataset = 'JD_012507_Beeps_One.fif'; > cfg.datatype = 'continuous'; > cfg.padding = 10; > cfg.dftfilter = 'yes'; > cfg.blc = 'yes'; > cfg.trl = [artifact zeros(size(artifact,1),1)]; > cfg.channel = {'MEG' 'EOG'}; > data_eog = preprocessing(cfg) > > % decompose the ECG-locked datasegments into components, using the > previously found (un)mixing matrix > cfg = []; > cfg.topo = compRR_orig.topo; > cfg.topolabel = compRR_orig.topolabel; > comp_eog = componentanalysis(cfg, data_eog); > selecting 307 channels > baseline correcting data > starting decomposition using predetermined mixing matrix > total time in componentanalysis 1.2 seconds > > > % compute a frequency decomposition of all components and the ECG > > cfg = []; > timelock = timelockanalysis(cfg, comp_eog); > applying preprocessing options > ??? Error using ==> timelockanalysis > data has variable trial lengths, you specified not to accept that ! > > % compute a frequency decomposition of all components and the ECG > > cfg = []; > cfg.method = 'mtmfft'; > cfg.output = 'fourier'; > cfg.foilim = [0 100]; > cfg.taper = 'hanning'; > cfg.pad = 'maxperlen'; > freq = freqanalysis(cfg, comp_ecg); > > > % compute coherence between all components and the ECG > cfg = []; > cfg.channelcmb = {'all' 'ECG'}; > cfg.jackknife = 'no'; > fdcomp = freqdescriptives(cfg, freq); > > Even though I get computing cross-spectral densities message, I do not get > .cohspctrm. > > fdcomp = > > dimord: 'chan_freq' > freq: [1x155 double] > label: {307x1 cell} > powspctrm: [307x155 double] > dof: [307x155 double] > cfg: [1x1 struct] > > > Sorry for the long email, and thanks for your help. > > sameer > > From sameer at ANDREW.CMU.EDU Wed Feb 21 16:51:42 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 21 Feb 2007 10:51:42 -0500 Subject: rejectcomponent Message-ID: While using rejectcomponent, dataRR_clean = rejectcomponent(cfg, compRR_orig); removing 2 components keeping 305 components But I tried dataRR_clean = rejectcomponent(cfg, compRR_orig, dataRR); ??? Error using ==> rejectcomponent Too many input arguments. The second manner of rejecting components will be necessary if ICAs are done using data reduction. sameer From sghosh at HSS.IITD.AC.IN Thu Feb 22 05:25:09 2007 From: sghosh at HSS.IITD.AC.IN (Shantanu Ghosh) Date: Thu, 22 Feb 2007 05:25:09 +0100 Subject: Estimating the power in EEG frequency bands Message-ID: Hello FT users, When I want to analyze the power in different eeg frequency bands (alpha, beta, etc), do I use a grand average for all subjects, or do i take only data trial by trial for all electrodes, estimate the powers, and then average them for all trials? Thanks, Shantanu From c.hesse at FCDONDERS.RU.NL Thu Feb 22 09:40:42 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Thu, 22 Feb 2007 09:40:42 +0100 Subject: Estimating the power in EEG frequency bands In-Reply-To: Message-ID: Hi Shantanu, > When I want to analyze the power in different eeg frequency bands > (alpha, > beta, etc), do I use a grand average for all subjects, or do i take > only > data trial by trial for all electrodes, estimate the powers, and then > average them for all trials? You use the the latter approach, averaging the power over trials (subject average) and then over subjects (grand average) if you wish to look at INDUCED activity, i.e. task or event related modulation in the amplitude time-course of ongoing oscillatory activity (this analysis is not sensitive to the phase differences of the oscillations on different trials). You can also average the signals first (in the time domain) and then compute the power spectrum, in which case you will see the spectral properties of EVOKED activity, i.e., activity that is phase or time locked to the event / stimulus / response. Both of these time frequency visualizations give information that is complementary to looking a the time course of your event-related or evoked potentials (for EEG) or fields (for MEG) which you get by doing a time-locked average of the raw signals. Hope this helps to clarify, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulla.rantakokko at TKK.FI Thu Feb 22 15:37:21 2007 From: ulla.rantakokko at TKK.FI (Ulla Rantakokko) Date: Thu, 22 Feb 2007 16:37:21 +0200 Subject: neuromag/definetrial Message-ID: Hi, I have also similar problems to 'too many trials' i.e. I get over 800 trials that last all fixed 300 ms when I expect to get 64 trials with varying lentghs. What is the eventvalue? From where it comes? I get ten (instead of seven) event values of order 0.00067.. I get no reference to STI channels, only channels marked 'trial'. What are the trials corresponding to the raw data channels? regards Ulla From thomas at UCSD.EDU Thu Feb 22 15:39:43 2007 From: thomas at UCSD.EDU (Thomas Thesen) Date: Thu, 22 Feb 2007 09:39:43 -0500 Subject: Estimating the power in EEG frequency bands In-Reply-To: <07ECB755-0FBB-454B-9E26-3C5A04F645D1@fcdonders.ru.nl> Message-ID: Hi FieldTrippers, Following up on this conversation. It seems that the 'induced activity' contains both phase-locked and non-phase-locked activity, whereby the 'evoked' activity contains only phase-locked activity. Is it then kosher to separate these components by linear subtraction? For example, if we first compute the 'induced' activity by averaging power over individual trials, and from that subtract the 'evoked activity' (calculated based on average response) to get the induced activity without any phase-locked activity? So if Induced = Phase + Non-Phase And Evoked = Phase Then Non-Phase = Induced - Evoked Or does the fact that this is a linear operations on data that have been constructed through a non-linear process render this somehow invalid? It has certainly been done before. Your comments would be much appreciated. Cheers, Thomas _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Christian Hesse Sent: Thursday, February 22, 2007 3:41 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Estimating the power in EEG frequency bands Hi Shantanu, When I want to analyze the power in different eeg frequency bands (alpha, beta, etc), do I use a grand average for all subjects, or do i take only data trial by trial for all electrodes, estimate the powers, and then average them for all trials? You use the the latter approach, averaging the power over trials (subject average) and then over subjects (grand average) if you wish to look at INDUCED activity, i.e. task or event related modulation in the amplitude time-course of ongoing oscillatory activity (this analysis is not sensitive to the phase differences of the oscillations on different trials). You can also average the signals first (in the time domain) and then compute the power spectrum, in which case you will see the spectral properties of EVOKED activity, i.e., activity that is phase or time locked to the event / stimulus / response. Both of these time frequency visualizations give information that is complementary to looking a the time course of your event-related or evoked potentials (for EEG) or fields (for MEG) which you get by doing a time-locked average of the raw signals. Hope this helps to clarify, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marcel.Bastiaansen at FCDONDERS.RU.NL Thu Feb 22 15:52:56 2007 From: Marcel.Bastiaansen at FCDONDERS.RU.NL (Marcel Bastiaansen) Date: Thu, 22 Feb 2007 15:52:56 +0100 Subject: Estimating the power in EEG frequency bands In-Reply-To: <001d01c7568f$4b0d1890$0202fea9@D3K61L91> Message-ID: An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Thu Feb 22 16:38:56 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 22 Feb 2007 10:38:56 -0500 Subject: No subject Message-ID: Do I have to install fmrlab to be able to use binica? (Look below). this is all in interest of trying to do ICA as quick as possible. Runica or varimax seem to take 3 hrs (without pca reduction). cfg.method = 'binica' cfg.binica.pca = 50; compRR_binica_pca = componentanalysis(cfg, dataRR); selecting 307 channels baseline correcting data concatenating data.............................. concatenated data matrix size 307x120030 starting decomposition using binica binica: using source file '/home/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/EEGLab/eeglab5.03/eeglab5.03/functions/binica.sc' binica(): ica binary '/data/common/matlab/fmrlab/ica_linux' is not in your Matlab path, check ??? One or more output arguments not assigned during call to '/home/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/EEGLab/eeglab5.03/eeglab5.03/functions/binica.m (binica)'. Error in ==> componentanalysis at 331 [weights, sphere] = binica(dat, optarg{:}); On a connected note, rejectcomponent.m for rejecting ICAs gives an error when we pass three arguments (cfg, components, data). you need to do this (correct me if I am wrong) if you have done pca reduction. thanks, sameer From muthuraman10 at HOTMAIL.COM Thu Feb 22 17:21:28 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Thu, 22 Feb 2007 16:21:28 +0000 Subject: leadfieldmatrix! Message-ID: Hello Fieldtrippers, I am using the DICS algorithm for the source analysis, in which i am successfull upto the freqanalysis calculating coherence the next step inorder to use the source analysis. I construct the leadfield matrix the parameters are vol = []; vol.r = 12 * [0.88 0.92 1.00]; vol.c = [1 1/80 1]; vol.o = [0 0 0]; cfg1 = []; cfg1.elec = elec; cfg1.vol = vol; cfg1.resolution = 1; grid = prepare_leadfield(cfg1,freqmtmfft); I am constructing a volume conduction model with the elec file[standard locations from the Sphere2 ] which is been constructed for the 55 electrodes which i use for the source analysis, i get these warnings is it because the locations which i use from the standard location files. using headmodel specified in the configuration using electrodes specified in the configuration selected 55 electrodes 8 dipoles inside, 0 dipoles outside brain making tight grid 8 dipoles inside, 0 dipoles outside brain computing leadfield computing leadfield 1/8 Warning: electrodes do not ly on sphere surface -> using projection >In fieldtrip-20070109\private\eeg_leadfield4 at 60 In fieldtrip-20070109\private\compute_leadfield at 435 In prepare_leadfield at 209 and when i go on further with the source analysis with this leadfield matrix has cfg.frequency=9; cfg.method='dics'; cfg.grid=grid; cfg.elec=elec; cfg.vol=vol; [source]=sourceanalysis(cfg,freqmtmfft); %PLOTTING SOURCE cfg.location='interactive'; cfg.funparameter='source'; cfg.maskparameter='source'; sourceplot(cfg,source); and when i use the source plot i get the errors updating homogenous coordinate transformation matrix ??? Error using ==> horzcat The following error occurred converting from char to cell: Error using ==> cell Conversion to cell from char is not possible. Error in ==> fieldtrip-20070109\private\parameterselection at 77 if ~issubfield(data, param{i}) && issubfield(data, ['avg.' param{i}]) Error in ==> volumedownsample at 139 cfg.parameter = parameterselection(cfg.parameter, source); Error in ==> sourceplot at 203 interp = volumedownsample(tmpcfg, interp); sorry for the long mail Thanking you with regards M.Muthuraman. _________________________________________________________________ News and updates from Indian diaspora http://content.msn.co.in/NRI/Default From r.oostenveld at FCDONDERS.RU.NL Thu Feb 22 18:12:13 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 22 Feb 2007 18:12:13 +0100 Subject: leadfieldmatrix! In-Reply-To: Message-ID: On 22 Feb 2007, at 17:21, Muthuraman Muthuraman wrote: > Warning: electrodes do not ly on sphere surface -> using projection >> In fieldtrip-20070109\private\eeg_leadfield4 at 60 > In fieldtrip-20070109\private\compute_leadfield at 435 > In prepare_leadfield at 209 Electrodes of course should ly on the skin surface, that is the case in the real world and it should also be the case in your model. Did you plot the electrodes in combination with the sphere on which they should ly? You can use headmodelplot for that. > %PLOTTING SOURCE > > cfg.location='interactive'; > cfg.funparameter='source'; > cfg.maskparameter='source'; > sourceplot(cfg,source); Please update to the latest version of fieldtrip, the sourceplot function has recently been improved. The documentation of sourceplot explains how to use the funparameter and maskparameter. See also the tutorial documentation. Your specification 'source' is certainly not going to work, sice 'source' is not a source parameter. regards, Robert From r.oostenveld at FCDONDERS.RU.NL Thu Feb 22 18:18:43 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 22 Feb 2007 18:18:43 +0100 Subject: No subject In-Reply-To: Message-ID: Hi Sameer On 22 Feb 2007, at 16:38, Sameer Walawalkar wrote: > Do I have to install fmrlab to be able to use binica? (Look below). > this is all in interest of trying to do ICA as quick as possible. > Runica or varimax seem to take 3 hrs (without pca reduction). .... > starting decomposition using binica > binica: using source file '/home/sameer/KarmaCond/ > DataNeuroMagCondor2/MegSoftwareCondor2/EEGLab/eeglab5.03/eeglab5.03/ > functions/binica.sc' > binica(): ica binary '/data/common/matlab/fmrlab/ica_linux' is not > in your Matlab path, check it seems to me that in the EEGLAB binica.m wrapper-function the path to the actual binica linux binary is incorrectly hardcoded. I expect the ica_linux binary to be included in the EEGLAB release version, if not then I suggest that you contact the EEGLAB developpers. Robert From sameer at ANDREW.CMU.EDU Thu Feb 22 18:29:06 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 22 Feb 2007 12:29:06 -0500 Subject: resampling Message-ID: Hello, How exactly does resampling work? If I resample data to 300 Hz from 1KHz, will the resulting data structure have encoded information for going back to 1KHz? This is so that I could resample down, do ICA, remove components, and then get back to 1KHz. (Clearly, I dont understnad the resampling algorithm). thanks, sameer From c.hesse at FCDONDERS.RU.NL Thu Feb 22 19:28:10 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Thu, 22 Feb 2007 19:28:10 +0100 Subject: resampling In-Reply-To: Message-ID: Hi Sameer, If you are resampling your data for the purposes of speeding up the ICA algorithm, then you just take the (de-)mixing matrix and apply to your original data. Although I would recommend the following normalization of the mixing matrix (in the following A is the mixing matrix and W = inv(A) is the de-mixing matrix): [nchan, nsrcs] = size(A); for i=1:nsrcs A(:,i) = A(:,i)./norm(A(:,i),2); end W = inv(A); this way you ensure that your mixing (and de-mixing) matrix do not contain information about the power of the components but merely about spatial projections (and the spatial correlations of these), so that when you apply W to your data (at the original sampling rate), you can treat the variance (power) of the components s = Wx as "correct". Some further comments to bear in mind: since in estimating the ICA on the downsampled data you in effect assume that the high-frequency content (above the Nyquist limit of your resampling frequency) is not relevant. Hence you might as well continue working with the downsampled data. However, if there IS stuff going on in the high- frequency bands that is important (e.g., part of a string artifact signal which has a broad band spectrum), then the ICA model estimated on the downsampled data will effectively be "wrong" and will not be able to successfully separate your data into independent components. This may be an unlikely scenario for very high frequencies, but the considerations should guide you in choosing a resampling rate that is not "too low". Regards, Christian On 22 Feb 2007, at 18:29, Sameer Walawalkar wrote: > Hello, > > How exactly does resampling work? If I resample data to 300 Hz from > 1KHz, will the resulting data structure have encoded information > for going back to 1KHz? > > This is so that I could resample down, do ICA, remove components, > and then get back to 1KHz. (Clearly, I dont understnad the > resampling algorithm). > > thanks, > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Fri Feb 23 00:40:12 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 00:40:12 +0100 Subject: Estimating the power in EEG frequency bands In-Reply-To: <001d01c7568f$4b0d1890$0202fea9@D3K61L91> Message-ID: Hi Thomas, > Following up on this conversation. It seems that the ‘induced > activity’ contains both phase-locked and non-phase-locked activity, > whereby the ‘evoked’ activity contains only phase-locked activity. > Is it then kosher to separate these components by linear > subtraction? For example, if we first compute the ‘induced’ > activity by averaging power over individual trials, and from that > subtract the ‘evoked activity’ (calculated based on average > response) to get the induced activity without any phase-locked > activity? It is not correct to subtract because computing the induced and evoked power spectra involves squaring signal amplitudes (a non- linear operation), and hence, taking your terminology to refer to the instantaneous amplitudes of the signal components (this applies to any time-frequency tile) > Induced = Phase + Non-Phase > > And > > Evoked = Phase > > Then > > Non-Phase = Induced – Evoked > > what you actually get from spectral or time-frequency analysis is the power of your MEASURED signal Induced^2 = (Phase + Non-Phase)^2 = Phase^2 + 2*Phase*Non-Phase + Non- Phase^2 Evoked^2 = Phase^2 Then Induced^2 - Evoked^2 = 2*Phase*Non-Phase + Non-Phase^2 AND NOT Non- Phase^2 This bit of high-school algebra shows quite clearly that even if you had a perfect estimate of Evoked and Induced power (which you of course in practice do not have due to a finite number of trials, amplitude non-stationarities, artifacts and noise) it is not possible to obtain an estimate of Non-Phase^2 using time-frequency analysis, averaging and subtraction. Cheers, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Fri Feb 23 01:44:59 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 01:44:59 +0100 Subject: Estimating the power in EEG frequency bands In-Reply-To: Message-ID: One further comment (please see below): > Hi Thomas, >> Following up on this conversation. It seems that the ‘induced >> activity’ contains both phase-locked and non-phase-locked >> activity, whereby the ‘evoked’ activity contains only phase-locked >> activity. Is it then kosher to separate these components by linear >> subtraction? For example, if we first compute the ‘induced’ >> activity by averaging power over individual trials, and from that >> subtract the ‘evoked activity’ (calculated based on average >> response) to get the induced activity without any phase-locked >> activity? > > It is not correct to subtract because computing the induced and > evoked power spectra involves squaring signal amplitudes (a non- > linear operation), and hence, taking your terminology to refer to > the instantaneous amplitudes of the signal components (this applies > to any time-frequency tile) >> Induced = Phase + Non-Phase >> >> And >> >> Evoked = Phase >> >> Then >> >> Non-Phase = Induced – Evoked >> >> > what you actually get from spectral or time-frequency analysis is > the power of your MEASURED signal > > Induced^2 = (Phase + Non-Phase)^2 = Phase^2 + 2*Phase*Non-Phase + > Non-Phase^2 > > Evoked^2 = Phase^2 > > Then > > Induced^2 - Evoked^2 = 2*Phase*Non-Phase + Non-Phase^2 AND NOT Non- > Phase^2 > Note that the other crucial thing to consider here is that you are in one case averaging power over trials over trials: E[ (Induced^2) ] = E[ (Phase + Non-Phase)^2 ] = E[ (Phase^2 + 2*Phase*Non-Phase + Non-Phase^2) ] = E[ (Phase^2) ] E[ (Non- Phase^2) ] + E[ 2*Phase*Non-Phase ] this is why taking the square root of sqrt(Induced^2) does not give (Phase + Non-Phase) but sqrt(E[ (Phase+Non-Phase)^2 ]). in the evoked case you are taking the power of the average amplitude Evoked^2 = E[ Phase ]^2 (---> note the ^2 on the outside of the sum) so in subtracting you are actually assuming that E[Phase]^2 = E [(Phase)^2] which is unlikely to be accurate the case in finite samples. Hope I have not confused others (or myself) here. Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From werkle at MPIB-BERLIN.MPG.DE Fri Feb 23 12:24:42 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Fri, 23 Feb 2007 12:24:42 +0100 Subject: ICA based artifact correction and phase-locking Message-ID: Dear all, in my studies, I'm investigating early preceptual binding (visual) across the lifespan (i.e., I have data form children, younger and older adults) with EEG measures. My main interest concerns changes in gamma-power and measures of phase-synchronization in the gamma frequency range(e.g., phase-locking index, n:m (theta:gamma) phase synchronization). Currently I use a 'semi-automatic' procedure for artifact rejection, i.e., I use thresholding in the time-domain (min/max in segment -/+ 100µV)to 'suggest' contaminated epochs. After that I visually inspect the data again for eye-blink and muscle activity, and completely reject the contaminated epochs. The problem with this procedure is that, especially in the older adults group, for many subjects only too few trials remain in the final sample. Therefore, I thought I could use ICA for artifact correction (instead of complete rejection). After identification of the components that reflect muscle activity (and also other artifacts), I thought to recombine the remaining ICs and perform my analyses (power, PLI, n:m synchronization) on the recombined (cleaned data). Now my question(s): Is there any experience whether removing certain ICs may change the phase spectrum, i.e. may this approach induce some systematic bias? If there is a systematic bias, are different frequency bands affected differentialy? Could anyone give me some references on these issues? Any comments are very much appreciated. Best regards, Markus -- ************************************************************** Markus Werkle-Bergner, Dipl. Psych. Predoctoral Research Fellow Center for Lifespan Psychology Max Planck Institute for Human Development Lentzeallee 94, Room 211, D-14195 Berlin, Germany. Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 ************************************************************** From c.hesse at FCDONDERS.RU.NL Fri Feb 23 13:18:18 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 13:18:18 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: <45DECEFA.5030200@mpib-berlin.mpg.de> Message-ID: Hi Markus, the short answer is: if (and only if, big if by the way) ICA correctly separates artifacts from brain activity, and you correctly identify the artifact components, removal of the artifact components from your data does not affect the time-frequency properties (including phase) of the other components (i.e. the rest of the data) if you project back to the sensor level. This is because ICA assumes a linear (instantaneous) mixing of statistically independent signals. I would just try it out for the time being - if you get funny results (or things too good to be true), please get back in touch as there is also a slightly longer answer. Hope this helps, Christian On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: > Dear all, > > in my studies, I'm investigating early preceptual binding (visual) > across the lifespan (i.e., I have data form children, younger and > older > adults) with EEG measures. My main interest concerns changes in > gamma-power and measures of phase-synchronization in the gamma > frequency range(e.g., phase-locking index, n:m (theta:gamma) phase > synchronization). > > Currently I use a 'semi-automatic' procedure for artifact > rejection, i.e., I use thresholding in the time-domain (min/max in > segment -/+ 100µV)to 'suggest' contaminated epochs. After that I > visually inspect the data again for eye-blink and muscle activity, > and completely reject the contaminated epochs. > > The problem with this procedure is that, especially in the older > adults group, for many subjects only too few trials remain in the > final sample. > > Therefore, I thought I could use ICA for artifact correction > (instead of complete rejection). After identification of the > components that reflect muscle activity (and also other artifacts), > I thought to recombine the remaining ICs and perform my analyses > (power, PLI, n:m synchronization) on the recombined (cleaned data). > > Now my question(s): Is there any experience whether removing > certain ICs > may change the phase spectrum, i.e. may this approach induce some > systematic bias? If there is a systematic bias, are different > frequency > bands affected differentialy? Could anyone give me some references on > these issues? > > Any comments are very much appreciated. > > Best regards, > Markus > > -- > ************************************************************** > Markus Werkle-Bergner, Dipl. Psych. > Predoctoral Research Fellow > > Center for Lifespan Psychology > Max Planck Institute for Human Development > Lentzeallee 94, Room 211, D-14195 Berlin, Germany. > Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 > ************************************************************** > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From werkle at MPIB-BERLIN.MPG.DE Fri Feb 23 13:39:31 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Fri, 23 Feb 2007 13:39:31 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: Message-ID: Hi Christian, thank you for your fast reply. Indeed, I had the same thought and tried it out at least for the power-measures (the analysis for the PLI is currently underway). The results look somewhat similar (i.e., I used the original data from one subject (artifacts rejected according to the semi-automatic procedure) and compared the results with the ICA-cleaned data), although there are some changes: From my current view, I see the same spots of increased TF-power (in gamma but also in lower frequency ranges) in both analyses. However the main spots appear somewhat deminished in the ICA-cleaned data. Additionally, for high gamma-power (> 55 Hz), I recognize a power increase in the main spots. Because I expected some changes (i.e., I assumed to get rid of some artifactual muscle activity), now I can not judge whether these results are 'good' or 'bad'. Therefore, I would be interested in the 'slightly longer answer'. Furthermore, currently I do the ICA decomposition on all available segments (minus those with really excessive artifacts, which I took out before running ICA). This means, my trials are a mixture of clearly contaminated as well as clearly uncontaminated trials. Because my main goal is to identify the eye and muscle artifacts, would it improve the detection of components reflecting artifacts if I do the ICA decomposition only on pre-identified artifactual trials? (My idea is that then the components reflecting artifacts would catch less 'true' brain activity. But perhaps I have a missconception here ...) Thank you very much for your help. Best regards, Markus Christian Hesse schrieb: > Hi Markus, > > the short answer is: if (and only if, big if by the way) ICA correctly > separates artifacts from brain activity, and you correctly identify > the artifact components, removal of the artifact components from your > data does not affect the time-frequency properties (including phase) > of the other components (i.e. the rest of the data) if you project > back to the sensor level. This is because ICA assumes a linear > (instantaneous) mixing of statistically independent signals. > > I would just try it out for the time being - if you get funny results > (or things too good to be true), please get back in touch as there is > also a slightly longer answer. > > Hope this helps, > Christian > > > On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: > >> Dear all, >> >> in my studies, I'm investigating early preceptual binding (visual) >> across the lifespan (i.e., I have data form children, younger and older >> adults) with EEG measures. My main interest concerns changes in >> gamma-power and measures of phase-synchronization in the gamma >> frequency range(e.g., phase-locking index, n:m (theta:gamma) phase >> synchronization). >> >> Currently I use a 'semi-automatic' procedure for artifact rejection, >> i.e., I use thresholding in the time-domain (min/max in segment -/+ >> 100µV)to 'suggest' contaminated epochs. After that I visually inspect >> the data again for eye-blink and muscle activity, and completely >> reject the contaminated epochs. >> >> The problem with this procedure is that, especially in the older >> adults group, for many subjects only too few trials remain in the >> final sample. >> >> Therefore, I thought I could use ICA for artifact correction (instead >> of complete rejection). After identification of the components that >> reflect muscle activity (and also other artifacts), I thought to >> recombine the remaining ICs and perform my analyses (power, PLI, n:m >> synchronization) on the recombined (cleaned data). >> >> Now my question(s): Is there any experience whether removing certain ICs >> may change the phase spectrum, i.e. may this approach induce some >> systematic bias? If there is a systematic bias, are different frequency >> bands affected differentialy? Could anyone give me some references on >> these issues? >> >> Any comments are very much appreciated. >> >> Best regards, >> Markus >> >> -- >> ************************************************************** >> Markus Werkle-Bergner, Dipl. Psych. >> Predoctoral Research Fellow >> >> Center for Lifespan Psychology >> Max Planck Institute for Human Development >> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >> ************************************************************** >> > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > -- ************************************************************** Markus Werkle-Bergner, Dipl. Psych. Predoctoral Research Fellow Center for Lifespan Psychology Max Planck Institute for Human Development Lentzeallee 94, Room 211, D-14195 Berlin, Germany. Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 ************************************************************** From c.hesse at FCDONDERS.RU.NL Fri Feb 23 14:11:41 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 14:11:41 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: <45DEE083.9030509@mpib-berlin.mpg.de> Message-ID: Hi Markus, > Because I expected some changes (i.e., I assumed to get rid of some > artifactual muscle activity), now I can not judge whether these > results are 'good' or 'bad'. Therefore, I would be interested in > the 'slightly longer answer'. When applying ICA to "real" data (i.e. where we do not really know everything about how the observed data are really generated) it is actually impossible to tell "objectively" whether removing components and then reconstructing the signal leads to "good" or "bad" results - it is basically a judgement call. Alternatively, you could use indirect arguments, e.g. related to improved ability to discriminate between two different conditions or something like that. The only way you can tell whether you successfully removed components from data is using synthetic data where you have a "ground truth". (Philosophical / Methodological Aside: the same arguments apply to ANY mathematical or statistical method which involves numerical estimation of some model (always based on some assumptions) from data. Believe it or not, this would include nummerical integration techniques. The best you can ever do with numerical techniques is to understand their applicability criteria recognize their behaviour when these are criteria are not met. In the case of "real" data you must judge whether the data to satisfy the applicability criteria (big judgement), then brace yourself and jump ... that's as good as it ever gets, I am afraid :-) > Furthermore, currently I do the ICA decomposition on all available > segments (minus those with really excessive artifacts, which I took > out before running ICA). Why do you remove these epochs? Do the signals saturate or is there excessive electrode(-cap) or subject movement in these? > This means, my trials are a mixture of clearly contaminated as well > as clearly uncontaminated trials. Because my main goal is to > identify the eye and muscle artifacts, would it improve the > detection of components reflecting artifacts if I do the ICA > decomposition only on pre-identified artifactual trials? (My idea > is that then the components reflecting artifacts would catch less > 'true' brain activity. But perhaps I have a missconception here ...) The accuracy of the ICA decomposition relies fundamentally on the accuracy of the mixing matrix estimate A from which you form the de- mixing matrix (or vice versa). So if only some columns of A (e.g. artifact source sensor projections) are accurately estimated while the sensor projection estimates of brain activity are inaccurate (individually or as a subspace), then the de-mixing the data using W = inv(A) will not be fully successful in removing artifact activity from components reflecting the brain activity (subspace). In order to accurately estimate the sensor projections of ALL sources, the data needs to comprise example activity from ALL sources, i.e. BOTH artifact activity and brain activity. So since you need to estimate your brain activity (subspace) as accurately as your artifact sources, you should use as much of the data, i.e. contaminated and clean segments, as possible. How many EEG channels do you have, by the way? I need to know in order to continue with the 'slightly longer answer' Regards, Christian > > Thank you very much for your help. > > Best regards, > Markus > > Christian Hesse schrieb: >> Hi Markus, >> >> the short answer is: if (and only if, big if by the way) ICA >> correctly separates artifacts from brain activity, and you >> correctly identify the artifact components, removal of the >> artifact components from your data does not affect the time- >> frequency properties (including phase) of the other components >> (i.e. the rest of the data) if you project back to the sensor >> level. This is because ICA assumes a linear (instantaneous) mixing >> of statistically independent signals. >> >> I would just try it out for the time being - if you get funny >> results (or things too good to be true), please get back in touch >> as there is also a slightly longer answer. >> >> Hope this helps, >> Christian >> >> >> On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: >> >>> Dear all, >>> >>> in my studies, I'm investigating early preceptual binding (visual) >>> across the lifespan (i.e., I have data form children, younger and >>> older >>> adults) with EEG measures. My main interest concerns changes in >>> gamma-power and measures of phase-synchronization in the gamma >>> frequency range(e.g., phase-locking index, n:m (theta:gamma) >>> phase synchronization). >>> >>> Currently I use a 'semi-automatic' procedure for artifact >>> rejection, i.e., I use thresholding in the time-domain (min/max >>> in segment -/+ 100µV)to 'suggest' contaminated epochs. After that >>> I visually inspect the data again for eye-blink and muscle >>> activity, and completely reject the contaminated epochs. >>> >>> The problem with this procedure is that, especially in the older >>> adults group, for many subjects only too few trials remain in the >>> final sample. >>> >>> Therefore, I thought I could use ICA for artifact correction >>> (instead of complete rejection). After identification of the >>> components that reflect muscle activity (and also other >>> artifacts), I thought to recombine the remaining ICs and perform >>> my analyses (power, PLI, n:m synchronization) on the recombined >>> (cleaned data). >>> >>> Now my question(s): Is there any experience whether removing >>> certain ICs >>> may change the phase spectrum, i.e. may this approach induce some >>> systematic bias? If there is a systematic bias, are different >>> frequency >>> bands affected differentialy? Could anyone give me some >>> references on >>> these issues? >>> >>> Any comments are very much appreciated. >>> >>> Best regards, >>> Markus >>> >>> -- >>> ************************************************************** >>> Markus Werkle-Bergner, Dipl. Psych. >>> Predoctoral Research Fellow >>> >>> Center for Lifespan Psychology >>> Max Planck Institute for Human Development >>> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >>> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >>> ************************************************************** >>> >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 >> NL-6500 HB Nijmegen The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> > > > -- > ************************************************************** > Markus Werkle-Bergner, Dipl. Psych. > Predoctoral Research Fellow > > Center for Lifespan Psychology > Max Planck Institute for Human Development > Lentzeallee 94, Room 211, D-14195 Berlin, Germany. > Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 > ************************************************************** > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From werkle at MPIB-BERLIN.MPG.DE Fri Feb 23 14:36:43 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Fri, 23 Feb 2007 14:36:43 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: <54CFEDE8-1B36-4A40-8100-318034AEE2C0@fcdonders.ru.nl> Message-ID: Dear Christian, > Why do you remove these epochs? Do the signals saturate or is there > excessive electrode(-cap) or subject movement in these? > Yes, that's correct. I remove epochs before any further analysis, if I find saturated channels or excessive subject movements. > >> This means, my trials are a mixture of clearly contaminated as well >> as clearly uncontaminated trials. Because my main goal is to identify >> the eye and muscle artifacts, would it improve the detection of >> components reflecting artifacts if I do the ICA decomposition only on >> pre-identified artifactual trials? (My idea is that then the >> components reflecting artifacts would catch less 'true' brain >> activity. But perhaps I have a missconception here ...) > > The accuracy of the ICA decomposition relies fundamentally on the > accuracy of the mixing matrix estimate A from which you form the > de-mixing matrix (or vice versa). So if only some columns of A (e.g. > artifact source sensor projections) are accurately estimated while the > sensor projection estimates of brain activity are inaccurate > (individually or as a subspace), then the de-mixing the data using W = > inv(A) will not be fully successful in removing artifact activity from > components reflecting the brain activity (subspace). In order to > accurately estimate the sensor projections of ALL sources, the data > needs to comprise example activity from ALL sources, i.e. BOTH > artifact activity and brain activity. > Thanks for this clarification. > So since you need to estimate your brain activity (subspace) as > accurately as your artifact sources, you should use as much of the > data, i.e. contaminated and clean segments, as possible. > > How many EEG channels do you have, by the way? I need to know in order > to continue with the 'slightly longer answer' > I recorded my data from 60 Ag/Ag-Cl electrodes embedded in an elastic cap (with BrainAmp amplifiers) positioned according to the extended 10/20 system. Additionally, I record EOG with two electrodes placed at the outher canthi and one electrode placed below the left eye. All channels are referenced to the right mastoid during recording, while the left mastoid electrode is recorded as an additional active channel (off-line re-refrenced to the mean of both mastoids). Best regards, Markus > Regards, > Christian > > > >> >> Thank you very much for your help. >> >> Best regards, >> Markus >> >> Christian Hesse schrieb: >>> Hi Markus, >>> >>> the short answer is: if (and only if, big if by the way) ICA >>> correctly separates artifacts from brain activity, and you correctly >>> identify the artifact components, removal of the artifact components >>> from your data does not affect the time-frequency properties >>> (including phase) of the other components (i.e. the rest of the >>> data) if you project back to the sensor level. This is because ICA >>> assumes a linear (instantaneous) mixing of statistically independent >>> signals. >>> >>> I would just try it out for the time being - if you get funny >>> results (or things too good to be true), please get back in touch as >>> there is also a slightly longer answer. >>> >>> Hope this helps, >>> Christian >>> >>> >>> On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: >>> >>>> Dear all, >>>> >>>> in my studies, I'm investigating early preceptual binding (visual) >>>> across the lifespan (i.e., I have data form children, younger and older >>>> adults) with EEG measures. My main interest concerns changes in >>>> gamma-power and measures of phase-synchronization in the gamma >>>> frequency range(e.g., phase-locking index, n:m (theta:gamma) phase >>>> synchronization). >>>> >>>> Currently I use a 'semi-automatic' procedure for artifact >>>> rejection, i.e., I use thresholding in the time-domain (min/max in >>>> segment -/+ 100µV)to 'suggest' contaminated epochs. After that I >>>> visually inspect the data again for eye-blink and muscle activity, >>>> and completely reject the contaminated epochs. >>>> >>>> The problem with this procedure is that, especially in the older >>>> adults group, for many subjects only too few trials remain in the >>>> final sample. >>>> >>>> Therefore, I thought I could use ICA for artifact correction >>>> (instead of complete rejection). After identification of the >>>> components that reflect muscle activity (and also other artifacts), >>>> I thought to recombine the remaining ICs and perform my analyses >>>> (power, PLI, n:m synchronization) on the recombined (cleaned data). >>>> >>>> Now my question(s): Is there any experience whether removing >>>> certain ICs >>>> may change the phase spectrum, i.e. may this approach induce some >>>> systematic bias? If there is a systematic bias, are different frequency >>>> bands affected differentialy? Could anyone give me some references on >>>> these issues? >>>> >>>> Any comments are very much appreciated. >>>> >>>> Best regards, >>>> Markus >>>> >>>> -- >>>> ************************************************************** >>>> Markus Werkle-Bergner, Dipl. Psych. >>>> Predoctoral Research Fellow >>>> >>>> Center for Lifespan Psychology >>>> Max Planck Institute for Human Development >>>> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >>>> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >>>> ************************************************************** >>>> >>> >>> ---------------------------------------------------------------------- >>> Christian Hesse, PhD, MIEEE >>> >>> F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 >>> HB Nijmegen The Netherlands >>> >>> Tel.: +31 (0)24 36 68293 >>> Fax: +31 (0)24 36 10989 >>> >>> Email: c.hesse at fcdonders.ru.nl >>> Web: www.fcdonders.ru.nl >>> ---------------------------------------------------------------------- >>> >>> >>> >>> >> >> >> -- >> ************************************************************** >> Markus Werkle-Bergner, Dipl. Psych. >> Predoctoral Research Fellow >> >> Center for Lifespan Psychology >> Max Planck Institute for Human Development >> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >> ************************************************************** >> > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > -- ************************************************************** Markus Werkle-Bergner, Dipl. Psych. Predoctoral Research Fellow Center for Lifespan Psychology Max Planck Institute for Human Development Lentzeallee 94, Room 211, D-14195 Berlin, Germany. Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 ************************************************************** From muthuraman10 at HOTMAIL.COM Fri Feb 23 15:13:40 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Fri, 23 Feb 2007 14:13:40 +0000 Subject: Sourceplot! In-Reply-To: Message-ID: Hello, Thanks for the reply, i have plotted the headmodel plot for the 55 electrodes and attached it with this mail The next step of using the source analysis with calculated grid works without any problem, i needed to adjust elec structure according to the radius of the volume conduction model How can i plot the source, i do not have any anatomical MRI at this moment? Is there a way to see the results from the source analysis using DICS in the structure of a normal topoplot Thanking you With regards M.Muthuraman. >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] leadfieldmatrix! >Date: Thu, 22 Feb 2007 18:12:13 +0100 > >On 22 Feb 2007, at 17:21, Muthuraman Muthuraman wrote: > >>Warning: electrodes do not ly on sphere surface -> using projection >>>In fieldtrip-20070109\private\eeg_leadfield4 at 60 >> In fieldtrip-20070109\private\compute_leadfield at 435 >> In prepare_leadfield at 209 > >Electrodes of course should ly on the skin surface, that is the case in >the real world and it should also be the case in your model. Did you plot >the electrodes in combination with the sphere on which they should ly? You >can use headmodelplot for that. > >>%PLOTTING SOURCE >> >>cfg.location='interactive'; >>cfg.funparameter='source'; >>cfg.maskparameter='source'; >>sourceplot(cfg,source); > >Please update to the latest version of fieldtrip, the sourceplot function >has recently been improved. The documentation of sourceplot explains how >to use the funparameter and maskparameter. See also the tutorial >documentation. Your specification 'source' is certainly not going to work, >sice 'source' is not a source parameter. > >regards, >Robert _________________________________________________________________ Tried the new MSN Messenger? It�s cool! Download now. http://messenger.msn.com/Download/Default.aspx?mkt=en-in From s.debener at UKE.UNI-HAMBURG.DE Fri Feb 23 15:25:44 2007 From: s.debener at UKE.UNI-HAMBURG.DE (Stefan Debener) Date: Fri, 23 Feb 2007 14:25:44 +0000 Subject: ICA based artifact correction and phase-locking In-Reply-To: <45DEEDEB.3030103@mpib-berlin.mpg.de> Message-ID: Dear Markus, While Christian is certainly correct, I do have a more optimistic interpretation of ICA for artefact removal. In order to tell with some scientific "objectivity" whether any artefact removal improves your data or not, you should, in my opinion, always look at the amount of artefact removal AND the change in signal quality at the same time. For both artefact and signal you should have some a priori assumptions in mind what actually your signals and artefacts look like (you implicitely have this in mind by excluding some epochs and keeping others, or, more generally, for every single EEG signal processing step). If you keep this in mind, you will find that ICA sometimes, even though reducing the amount of artefact, also reduces the SNR. For a nice demo that this can happen, you may look up Debener et al., 2007, Neuroimage, 34, 587-97. However, in my experience, this happens only if you massively violate ICA assumptions. If you compare ICA artefact removal with any other artefact processing techniques (Gratton & Coles, epoch rejection, etc.) or uncorrected data, you will very likely find that ICA, if applied correctly, returns substantially better results. For an example where we could analyse ALL(!) recorded single trials from EEG data recorded inside a 3T MRI see: J Neurosci, 25, 11730-37. Marcel Bastiaansen from the FCD and others used the same ICA approach but with different tasks and components, and were similarly successful...In sum, from a practical standpoint, ICA can massivley improve your SNR and this in turn allows you to do things with your EEG data that otherwise seem impossible. You wrote that you observed channel saturation in your data. GIGO? ICA is not very good in the very high and very low frequency domain (personal opinion) and won't deal well with DC recorded data. In fact, a few drifting channels can easily spoil a decompositon....this and further issues are (hopefully) discussed in the EEGLAB tutorial, which also explains how to pre-process your data in order to obtain reasonable decompositions. Best, Stefan Markus Werkle-Bergner wrote: > Dear Christian, > > >> Why do you remove these epochs? Do the signals saturate or is there >> excessive electrode(-cap) or subject movement in these? >> > Yes, that's correct. I remove epochs before any further analysis, if I > find saturated channels or excessive subject movements. > >> >>> This means, my trials are a mixture of clearly contaminated as well >>> as clearly uncontaminated trials. Because my main goal is to >>> identify the eye and muscle artifacts, would it improve the >>> detection of components reflecting artifacts if I do the ICA >>> decomposition only on pre-identified artifactual trials? (My idea is >>> that then the components reflecting artifacts would catch less >>> 'true' brain activity. But perhaps I have a missconception here ...) >> >> The accuracy of the ICA decomposition relies fundamentally on the >> accuracy of the mixing matrix estimate A from which you form the >> de-mixing matrix (or vice versa). So if only some columns of A (e.g. >> artifact source sensor projections) are accurately estimated while >> the sensor projection estimates of brain activity are inaccurate >> (individually or as a subspace), then the de-mixing the data using W >> = inv(A) will not be fully successful in removing artifact activity >> from components reflecting the brain activity (subspace). In order to >> accurately estimate the sensor projections of ALL sources, the data >> needs to comprise example activity from ALL sources, i.e. BOTH >> artifact activity and brain activity. >> > > > Thanks for this clarification. > > >> So since you need to estimate your brain activity (subspace) as >> accurately as your artifact sources, you should use as much of the >> data, i.e. contaminated and clean segments, as possible. >> >> How many EEG channels do you have, by the way? I need to know in >> order to continue with the 'slightly longer answer' >> > > I recorded my data from 60 Ag/Ag-Cl electrodes embedded in an elastic > cap (with BrainAmp amplifiers) positioned according to the extended > 10/20 system. Additionally, I record EOG with two electrodes placed at > the outher canthi and one electrode placed below the left eye. All > channels are referenced to the right mastoid during recording, while > the left mastoid electrode is recorded as an additional active channel > (off-line re-refrenced to the mean of both mastoids). > > > Best regards, > Markus > > > > > >> Regards, >> Christian >> >> >> >>> >>> Thank you very much for your help. >>> >>> Best regards, >>> Markus >>> >>> Christian Hesse schrieb: >>>> Hi Markus, >>>> >>>> the short answer is: if (and only if, big if by the way) ICA >>>> correctly separates artifacts from brain activity, and you >>>> correctly identify the artifact components, removal of the artifact >>>> components from your data does not affect the time-frequency >>>> properties (including phase) of the other components (i.e. the rest >>>> of the data) if you project back to the sensor level. This is >>>> because ICA assumes a linear (instantaneous) mixing of >>>> statistically independent signals. >>>> >>>> I would just try it out for the time being - if you get funny >>>> results (or things too good to be true), please get back in touch >>>> as there is also a slightly longer answer. >>>> >>>> Hope this helps, >>>> Christian >>>> >>>> >>>> On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: >>>> >>>>> Dear all, >>>>> >>>>> in my studies, I'm investigating early preceptual binding (visual) >>>>> across the lifespan (i.e., I have data form children, younger and >>>>> older >>>>> adults) with EEG measures. My main interest concerns changes in >>>>> gamma-power and measures of phase-synchronization in the gamma >>>>> frequency range(e.g., phase-locking index, n:m (theta:gamma) phase >>>>> synchronization). >>>>> >>>>> Currently I use a 'semi-automatic' procedure for artifact >>>>> rejection, i.e., I use thresholding in the time-domain (min/max in >>>>> segment -/+ 100µV)to 'suggest' contaminated epochs. After that I >>>>> visually inspect the data again for eye-blink and muscle activity, >>>>> and completely reject the contaminated epochs. >>>>> >>>>> The problem with this procedure is that, especially in the older >>>>> adults group, for many subjects only too few trials remain in the >>>>> final sample. >>>>> >>>>> Therefore, I thought I could use ICA for artifact correction >>>>> (instead of complete rejection). After identification of the >>>>> components that reflect muscle activity (and also other >>>>> artifacts), I thought to recombine the remaining ICs and perform >>>>> my analyses (power, PLI, n:m synchronization) on the recombined >>>>> (cleaned data). >>>>> >>>>> Now my question(s): Is there any experience whether removing >>>>> certain ICs >>>>> may change the phase spectrum, i.e. may this approach induce some >>>>> systematic bias? If there is a systematic bias, are different >>>>> frequency >>>>> bands affected differentialy? Could anyone give me some references on >>>>> these issues? >>>>> >>>>> Any comments are very much appreciated. >>>>> >>>>> Best regards, >>>>> Markus >>>>> >>>>> -- >>>>> ************************************************************** >>>>> Markus Werkle-Bergner, Dipl. Psych. >>>>> Predoctoral Research Fellow >>>>> >>>>> Center for Lifespan Psychology >>>>> Max Planck Institute for Human Development >>>>> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >>>>> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >>>>> ************************************************************** >>>>> >>>> >>>> ---------------------------------------------------------------------- >>>> Christian Hesse, PhD, MIEEE >>>> >>>> F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 >>>> NL-6500 HB Nijmegen The Netherlands >>>> >>>> Tel.: +31 (0)24 36 68293 >>>> Fax: +31 (0)24 36 10989 >>>> >>>> Email: c.hesse at fcdonders.ru.nl >>>> Web: www.fcdonders.ru.nl >>>> ---------------------------------------------------------------------- >>>> >>>> >>>> >>>> >>> >>> >>> -- >>> ************************************************************** >>> Markus Werkle-Bergner, Dipl. Psych. >>> Predoctoral Research Fellow >>> >>> Center for Lifespan Psychology >>> Max Planck Institute for Human Development >>> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >>> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >>> ************************************************************** >>> >> >> ---------------------------------------------------------------------- >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 >> HB Nijmegen The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> ---------------------------------------------------------------------- >> >> >> >> > > From c.hesse at FCDONDERS.RU.NL Fri Feb 23 15:41:03 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 15:41:03 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: <45DEEDEB.3030103@mpib-berlin.mpg.de> Message-ID: Hi Markus, >> Why do you remove these epochs? Do the signals saturate or is >> there excessive electrode(-cap) or subject movement in these? >> > Yes, that's correct. I remove epochs before any further analysis, > if I find saturated channels or excessive subject movements. Seems reasonable to me, then. >> How many EEG channels do you have, by the way? I need to know in >> order to continue with the 'slightly longer answer' > > I recorded my data from 60 Ag/Ag-Cl electrodes embedded in an > elastic cap (with BrainAmp amplifiers) positioned according to the > extended 10/20 system. Additionally, I record EOG with two > electrodes placed at the outher canthi and one electrode placed > below the left eye. All channels are referenced to the right > mastoid during recording, while the left mastoid electrode is > recorded as an additional active channel (off-line re-refrenced to > the mean of both mastoids). Ok, thanks for this extra info. 60 channels is (I think) a good number in that you are less likely to be affected by the problem of over-fitting in ICA: this can sometimes happen when there are fewer source signals which are identifiable by the ICA algorithm (i.e., statistically independent signals with non-gaussian marginal distributions) than sensors. Note that fewer sources than sensors does not necessarily mean that your data is rank-deficient (you can easily check this by looking at the singular spectrum of your data matrix or, equivalently, at the spectrum of eigenvalues of the data covariance matrix - the former is gives the square root of the latter) because there is always some form of either "sensor" or "ambient" noise, which will have a gaussian distribution. The point is that when ICA has found all the obvious components (non-gaussian ones) it then tries to decompose the gaussian part of the signal into non-gaussian parts, and this will lead to so-called "over-fitting", which also affects the accuracy of the estimates of the "true" components. Different ICA algorithms behave differently in this case, some will give you spurious solutions, others will simply not converge to a solution (because there is none in the ICA sense, and throw an error of the code is smart enough to spot this). But you should not really have to worry too much about that; although do watch out for it: warnings and error messages about mixing or de- mixing matrix being (close to) singular is a good indication of over- fitting, and PCA-based dimension reduction of your data as part of the ICA is then recommended (though not a "magic" solution, either). When there are fewer channels than sources, you can have the opposite problem, namely under-fitting. In this situation, there are not enough components to describe all of the data, and the solution is then likely to be some sort of compromise, where "true" sources that are "weak" are spread over several ICs, none of which individually describes a source. In this case the accuracy of your mixing matrix estimate will also be "off", but the estimates of the stronger components are usually pretty robust in this case. What can also affect the accuracy of the mixing matrix estimate is the violation of the assumption of statistical independence of the sources, and this is pretty likely in the case of networks of neuronal populations displaying oscillatory activity with greater or lesser coherence because coherent signals (i.e. with a constant phase relationship other than 90 degrees) are generally not statistically independent. This need not be a disaster provided that the total activity of these coherent networks (i.e. in the signal subspace of coherent sources) is statistically independent of all the artifact stuff you wish to remove. Then you can go ahead with ICA and remove artifacts, but you will not necessarily be able to identify/interpret individual oscillatory components of brain activity. But since you do your analysis at the sensor level, this does not matter. Another problem related to ICA and sources of oscillatory activity is that the amplitude time course of this activity is generally modulated over time, which in turn can make these sources have marginal distributions which "look" essentially Gaussian, in which case the ICA algorithm may again be unable to correctly (or uniquely) identify the sensor projections associated with such source signals, EVEN if they are statistically independent, since ICA ONLY works exactly if the sources are statistically independent AND non-gaussian. So in summary, I guess my advice to you would be to always use EXTREME CAUTION when working with ICA :-), but to go ahead with what you're doing and just make sure you are able to robustly identity all of your artifacts, and don't spend too much time worrying about which components reflect brain activity, as this is likely to live in a subspace so individial topographies give a limited story. I really don't mean to sound negative, but these problems and limitations regularly occur in real life ICA-usage, and you need to know that it is not a "cure" for "bad" data (from an ICA point of view). Hope this helps, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 23 17:09:44 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 23 Feb 2007 11:09:44 -0500 Subject: Various ICA warnings and failures Message-ID: Hi, This mail has 3 questions related to implementing ICA is fieldtrip. 1) I am now getting the following warnings from runica I am getting these messages while doing ICA on a datafile which contains sss MaxFiltered data (Elekta Neuromag). When I visually inspect the independent components, they seem fairly identical to me. Their basic time structure seems to be same, just the scale is different. Prior to this, I had run ICA on the same datafile but with no MaxFiltering (or SSP projection for that matter). Final training data range: -0.00443438 to 0.00355995 Computing the sphering matrix... Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.156998e-29. > In runica at 774 In componentanalysis at 331 Starting weights are the identity matrix ... Sphering the data ... Beginning ICA training ... Data has rank 286. Cannot compute 307 components. Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.155705e-29. > In componentanalysis at 437 total time in componentanalysis 160.6 seconds 2) binica on this datafile just hangs, after one learning, it sends nan and just hangs. 3) Fast ICA is giving me following errors >> compRR_One_fastica_sss = componentanalysis(cfg,dataRR_One); Warning: cannot determine whether the FASTICA toolbox is present > In fieldtrip/private/hastoolbox at 121 In componentanalysis at 176 Warning: adding FASTICA toolbox to your Matlab path > In fieldtrip/private/hastoolbox at 145 In componentanalysis at 176 Warning: Name is nonexistent or not a directory: fastica. > In path at 113 In addpath at 100 In fieldtrip/private/hastoolbox at 146 In componentanalysis at 176 selecting 307 channels baseline correcting data concatenating data.............................. concatenated data matrix size 307x120030 starting decomposition using fastica Number of signals: 307 Number of samples: 120030 Calculating covariance... ??? Error using ==> componentanalysis call to fastica failed But when I do >> which fastica /mnt/condor2/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/FastICA_2.5/FastICA_25/fastica.m >> exist('fastica','file') (as seen in hastoolbox) ans = 2 thanks, sameer p.s: I am currently running varimax on the sssed data and binica on the non sssed to see what happens. From arno at SALK.EDU Fri Feb 23 18:02:34 2007 From: arno at SALK.EDU (arno) Date: Fri, 23 Feb 2007 18:02:34 +0100 Subject: Various ICA warnings and failures In-Reply-To: Message-ID: The rank problem might be related to this issue on 64-bit machines http://sccn.ucsd.edu/pipermail/eeglablist/2007/001675.html Best, Arno Sameer Walawalkar wrote: > Hi, > > This mail has 3 questions related to implementing ICA is fieldtrip. > > 1) > I am now getting the following warnings from runica > I am getting these messages while doing ICA on a datafile which contains > sss MaxFiltered data (Elekta Neuromag). When I visually inspect the > independent components, they seem fairly identical to me. Their basic > time > structure seems to be same, just the scale is different. > > Prior to this, I had run ICA on the same datafile but with no > MaxFiltering > (or SSP projection for that matter). > > Final training data range: -0.00443438 to 0.00355995 > Computing the sphering matrix... > Warning: Matrix is close to singular or badly scaled. > Results may be inaccurate. RCOND = 2.156998e-29. >> In runica at 774 > In componentanalysis at 331 > Starting weights are the identity matrix ... > Sphering the data ... > Beginning ICA training ... > Data has rank 286. Cannot compute 307 components. > Warning: Matrix is close to singular or badly scaled. > Results may be inaccurate. RCOND = 2.155705e-29. >> In componentanalysis at 437 > total time in componentanalysis 160.6 seconds > > 2) > binica on this datafile just hangs, after one learning, it sends nan > and just hangs. > > > > 3) > Fast ICA is giving me following errors >>> compRR_One_fastica_sss = componentanalysis(cfg,dataRR_One); > Warning: cannot determine whether the FASTICA toolbox is present >> In fieldtrip/private/hastoolbox at 121 > In componentanalysis at 176 > Warning: adding FASTICA toolbox to your Matlab path >> In fieldtrip/private/hastoolbox at 145 > In componentanalysis at 176 > Warning: Name is nonexistent or not a directory: fastica. >> In path at 113 > In addpath at 100 > In fieldtrip/private/hastoolbox at 146 > In componentanalysis at 176 > selecting 307 channels > baseline correcting data > concatenating data.............................. > concatenated data matrix size 307x120030 > starting decomposition using fastica > Number of signals: 307 > Number of samples: 120030 > Calculating covariance... > ??? Error using ==> componentanalysis > call to fastica failed > > But when I do >>> which fastica > /mnt/condor2/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/FastICA_2.5/FastICA_25/fastica.m > > >>> exist('fastica','file') (as seen in hastoolbox) > > ans = > > 2 > > > thanks, > sameer > > p.s: I am currently running varimax on the sssed data and binica on > the non sssed to see what happens. > From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Feb 23 18:09:29 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 23 Feb 2007 18:09:29 +0100 Subject: Sourceplot! In-Reply-To: Message-ID: Hello Muthuraman, >How can i plot the source, i do not have any anatomical MRI at this >moment? Is there a way to see the results from the source analysis >using DICS in the structure of a normal topoplot You can also plot your results without an MRI. Since your source data is a volume (3 space dimensions and one functional dimension) you can not plot it "in the structure a normal topoplot" (2 space dimensions, one functional dimension). You can plot slices from your volume. See the documentation on the new sourceplot function at the fieldtrip webpage. http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu torial:plotting More info can also be found in the help of sourceplot.m You cfg could for instance be: Cfg.method = 'slice'; Cfg.funparameter = 'pow'; (or what ever it is that you want to plot in color) Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Friday, February 23, 2007 3:14 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Sourceplot! Hello, Thanks for the reply, i have plotted the headmodel plot for the 55 electrodes and attached it with this mail The next step of using the source analysis with calculated grid works without any problem, i needed to adjust elec structure according to the radius of the volume conduction model How can i plot the source, i do not have any anatomical MRI at this moment? Is there a way to see the results from the source analysis using DICS in the structure of a normal topoplot Thanking you With regards M.Muthuraman. >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] leadfieldmatrix! >Date: Thu, 22 Feb 2007 18:12:13 +0100 > >On 22 Feb 2007, at 17:21, Muthuraman Muthuraman wrote: > >>Warning: electrodes do not ly on sphere surface -> using projection >>>In fieldtrip-20070109\private\eeg_leadfield4 at 60 >> In fieldtrip-20070109\private\compute_leadfield at 435 >> In prepare_leadfield at 209 > >Electrodes of course should ly on the skin surface, that is the case in >the real world and it should also be the case in your model. Did you plot >the electrodes in combination with the sphere on which they should ly? You >can use headmodelplot for that. > >>%PLOTTING SOURCE >> >>cfg.location='interactive'; >>cfg.funparameter='source'; >>cfg.maskparameter='source'; >>sourceplot(cfg,source); > >Please update to the latest version of fieldtrip, the sourceplot function >has recently been improved. The documentation of sourceplot explains how >to use the funparameter and maskparameter. See also the tutorial >documentation. Your specification 'source' is certainly not going to work, >sice 'source' is not a source parameter. > >regards, >Robert _________________________________________________________________ Tried the new MSN Messenger? It's cool! Download now. http://messenger.msn.com/Download/Default.aspx?mkt=en-in From alotof_xd at YAHOO.COM Fri Feb 23 20:29:27 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Fri, 23 Feb 2007 11:29:27 -0800 Subject: A question on Baseline choosing In-Reply-To: <008001c7576d$611e3590$642dae83@fcdonders.nl> Message-ID: Hi, experts, Could I know for block design, which kind of baseline you choose for analysis? Use common baseline before a block of stimuli, or use separate baseline just before each stimulus? I suppose if the data is ideal, there is not difference between these two. However, there is different results for real data. And could you give me the theoric support for the baseline choosing? Thanks. Best, Eve --------------------------------- Have a burning question? Go to Yahoo! Answers and get answers from real people who know. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 23 20:36:31 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 23 Feb 2007 14:36:31 -0500 Subject: TFR: labels in data and labels in layout do not match Message-ID: Hi, I am listing the settings and command used to plot time frequency analysis results. The analysis was done by blindly copying the material on the online example script. cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.foi = 1:2:30; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = -0.5:0.05:1.5; cfg.pad = 'maxperlen'; TFRmult = freqanalysis(cfg,data); the analysis works well giving the TFRmult variable. But cfgTFR = output: 'pow' channel: 'MEG' method: 'mtmconvol' foi: [20 22 24 26 28 30] t_ftimwin: [0.2500 0.2273 0.2083 0.1923 0.1786 0.1667] tapsmofrq: [8 8.8000 9.6000 10.4000 11.2000 12] toi: [1x41 double] pad: 'maxperlen' multiplotTFR(cfgTFRout, TFRmult); multiplotTFR(cfgTFRout, TFRmult); reading layout from file NM306all.lay ??? Error using ==> multiplotTFR labels in data and labels in layout do not match The NM306all.lay file has worked for ICAs in the past (used as shown below). for i = 1 : 8 subplot(2,4,i); topoplot(cfg, lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,i)); % for all title(num2str(i)); end thanks, sameer From sameer at ANDREW.CMU.EDU Fri Feb 23 20:39:53 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 23 Feb 2007 14:39:53 -0500 Subject: Various ICA warnings and failures In-Reply-To: <45DF1E2A.50504@salk.edu> Message-ID: thanks, This fixed the rank problem. With the new pop_runica, runica worked very fast on the ICA but the ICAs don't seem to make sense at all. As I said in the earlier email, they all look the same except for overall scale issues. best, sameer On Fri, 23 Feb 2007, arno wrote: > The rank problem might be related to this issue on 64-bit machines > > http://sccn.ucsd.edu/pipermail/eeglablist/2007/001675.html > > Best, > > Arno > > Sameer Walawalkar wrote: >> Hi, >> >> This mail has 3 questions related to implementing ICA is fieldtrip. >> >> 1) >> I am now getting the following warnings from runica >> I am getting these messages while doing ICA on a datafile which contains >> sss MaxFiltered data (Elekta Neuromag). When I visually inspect the >> independent components, they seem fairly identical to me. Their basic time >> structure seems to be same, just the scale is different. >> >> Prior to this, I had run ICA on the same datafile but with no MaxFiltering >> (or SSP projection for that matter). >> >> Final training data range: -0.00443438 to 0.00355995 >> Computing the sphering matrix... >> Warning: Matrix is close to singular or badly scaled. >> Results may be inaccurate. RCOND = 2.156998e-29. >>> In runica at 774 >> In componentanalysis at 331 >> Starting weights are the identity matrix ... >> Sphering the data ... >> Beginning ICA training ... >> Data has rank 286. Cannot compute 307 components. >> Warning: Matrix is close to singular or badly scaled. >> Results may be inaccurate. RCOND = 2.155705e-29. >>> In componentanalysis at 437 >> total time in componentanalysis 160.6 seconds >> >> 2) >> binica on this datafile just hangs, after one learning, it sends nan and >> just hangs. >> >> >> >> 3) >> Fast ICA is giving me following errors >>>> compRR_One_fastica_sss = componentanalysis(cfg,dataRR_One); >> Warning: cannot determine whether the FASTICA toolbox is present >>> In fieldtrip/private/hastoolbox at 121 >> In componentanalysis at 176 >> Warning: adding FASTICA toolbox to your Matlab path >>> In fieldtrip/private/hastoolbox at 145 >> In componentanalysis at 176 >> Warning: Name is nonexistent or not a directory: fastica. >>> In path at 113 >> In addpath at 100 >> In fieldtrip/private/hastoolbox at 146 >> In componentanalysis at 176 >> selecting 307 channels >> baseline correcting data >> concatenating data.............................. >> concatenated data matrix size 307x120030 >> starting decomposition using fastica >> Number of signals: 307 >> Number of samples: 120030 >> Calculating covariance... >> ??? Error using ==> componentanalysis >> call to fastica failed >> >> But when I do >>>> which fastica >> /mnt/condor2/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/FastICA_2.5/FastICA_25/fastica.m >> >>>> exist('fastica','file') (as seen in hastoolbox) >> >> ans = >> >> 2 >> >> >> thanks, >> sameer >> >> p.s: I am currently running varimax on the sssed data and binica on the non >> sssed to see what happens. >> > > From sameer at ANDREW.CMU.EDU Fri Feb 23 21:01:10 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 23 Feb 2007 15:01:10 -0500 Subject: only two components! Message-ID: Hi, please add case 'FASTICA' status = exist('fastica','file'); to your hastoolbox file. but after I do that, I get only two components for 306 channel Neuromag data! It might be related to my crude adding shown above, but... cfg.method = 'fastica'; >> compRR_one_sss_fastica = componentanalysis(cfg,dataRR_One) selecting 307 channels baseline correcting data concatenating data.............................. concatenated data matrix size 307x120030 starting decomposition using fastica Number of signals: 307 Number of samples: 120030 Calculating covariance... Reducing dimension... Selected [ 2 ] dimensions. Smallest remaining (non-zero) eigenvalue [ 1.04859e+08 ] Largest remaining (non-zero) eigenvalue [ 2.68806e+09 ] Sum of removed eigenvalues [ 8.96883e-05 ] [ 100 ] % of (non-zero) eigenvalues retained. Whitening... Check: covariance differs from identity by [ 1.9984e-15 ]. Used approach [ defl ]. Used nonlinearity [ pow3 ]. Starting ICA calculation... IC 1 .....computed ( 5 steps ) IC 2 ..computed ( 2 steps ) Done. Adding the mean back to the data. total time in componentanalysis 46.9 seconds compRR_one_sss_fastica = fsample: 1000 time: {1x30 cell} trial: {1x30 cell} label: {307x1 cell} topolabel: {307x1 cell} topo: [307x2 double] cfg: [1x1 struct] best, sameer From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Feb 23 21:24:43 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 23 Feb 2007 21:24:43 +0100 Subject: TFR: labels in data and labels in layout do not match In-Reply-To: Message-ID: Hi Sameer, What is TFRmult.label? If everything did what it should, that should be a cell array with the labels of the 306 channels. The names of those channels should match the names in the NM306all.lay (5th column). That it worked for the ica plotting is because there you called topoplot.m directly, and now you use topoplotTFR.m, in the last function the labels are checked. Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Friday, February 23, 2007 8:37 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] TFR: labels in data and labels in layout do not match Hi, I am listing the settings and command used to plot time frequency analysis results. The analysis was done by blindly copying the material on the online example script. cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.foi = 1:2:30; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = -0.5:0.05:1.5; cfg.pad = 'maxperlen'; TFRmult = freqanalysis(cfg,data); the analysis works well giving the TFRmult variable. But cfgTFR = output: 'pow' channel: 'MEG' method: 'mtmconvol' foi: [20 22 24 26 28 30] t_ftimwin: [0.2500 0.2273 0.2083 0.1923 0.1786 0.1667] tapsmofrq: [8 8.8000 9.6000 10.4000 11.2000 12] toi: [1x41 double] pad: 'maxperlen' multiplotTFR(cfgTFRout, TFRmult); multiplotTFR(cfgTFRout, TFRmult); reading layout from file NM306all.lay ??? Error using ==> multiplotTFR labels in data and labels in layout do not match The NM306all.lay file has worked for ICAs in the past (used as shown below). for i = 1 : 8 subplot(2,4,i); topoplot(cfg, lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,i)); % for all title(num2str(i)); end thanks, sameer From arno at SALK.EDU Sat Feb 24 12:12:28 2007 From: arno at SALK.EDU (arno) Date: Sat, 24 Feb 2007 12:12:28 +0100 Subject: No subject In-Reply-To: <7836F6CC-746D-48A3-A359-B9B64384815D@fcdonders.ru.nl> Message-ID: Yes, ica_linux is included by you have to setup the correct path in the file icadefs.m This is described on the web page when you download binica usually. Hope this helps, Arno Robert Oostenveld wrote: > Hi Sameer > > On 22 Feb 2007, at 16:38, Sameer Walawalkar wrote: >> Do I have to install fmrlab to be able to use binica? (Look below). >> this is all in interest of trying to do ICA as quick as possible. >> Runica or varimax seem to take 3 hrs (without pca reduction). > > .... > >> starting decomposition using binica >> binica: using source file >> '/home/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/EEGLab/eeglab5.03/eeglab5.03/functions/binica.sc' >> >> binica(): ica binary '/data/common/matlab/fmrlab/ica_linux' is not in >> your Matlab path, check > > it seems to me that in the EEGLAB binica.m wrapper-function the path > to the actual binica linux binary is incorrectly hardcoded. I expect > the ica_linux binary to be included in the EEGLAB release version, if > not then I suggest that you contact the EEGLAB developpers. > > Robert > > > > From abastos at BERKELEY.EDU Sun Feb 25 04:12:36 2007 From: abastos at BERKELEY.EDU (Andre Bastos) Date: Sat, 24 Feb 2007 19:12:36 -0800 Subject: displaying 4d power and coherence data In-Reply-To: <45E01D9C.1050202@salk.edu> Message-ID: Hello, I am trying to display 4d coherence and power data (num trials x num time points x num electrodes or elec pairs x freq). Do the plotting functions in fieldtrip handle this case or do I have to reduce the dimensionality by averaging across num trials? Thanks Andre From ingrid.nieuwenhuis at FCDONDERS.RU.NL Sun Feb 25 16:35:55 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Sun, 25 Feb 2007 16:35:55 +0100 Subject: displaying 4d power and coherence data In-Reply-To: <61826.69.181.124.179.1172373156.squirrel@calmail.berkeley.edu> Message-ID: Hi Andre, Yes, the plotting functions do not handle multiple trials, so you have to average over trials first before plotting. Bests Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Andre Bastos Sent: Sunday, February 25, 2007 4:13 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] displaying 4d power and coherence data Hello, I am trying to display 4d coherence and power data (num trials x num time points x num electrodes or elec pairs x freq). Do the plotting functions in fieldtrip handle this case or do I have to reduce the dimensionality by averaging across num trials? Thanks Andre From muthuraman10 at HOTMAIL.COM Mon Feb 26 11:11:38 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 26 Feb 2007 10:11:38 +0000 Subject: Sourceplot! In-Reply-To: <008001c7576d$611e3590$642dae83@fcdonders.nl> Message-ID: Hello Ingrid, Thanks for the answer, i tried to plot using the source plot with this configuration and i get the error, in this case should i need to transform the data before i plot cfg.method='slice'; cfg.funparameter='coh'; cfg.nslices = 20; cfg.slicedim = 3; sourceplot(cfg,fdmtmfft); ??? Reference to non-existent field 'dim'. Error in ==> fieldtrip-20070222\private\grid2transform at 9 if ~isfield(volume, 'xgrid'), volume.xgrid=1:volume.dim(1); end Error in ==> sourceplot at 189 data = grid2transform(data); Thanking you With regards M.Muthuraman. >From: Ingrid Nieuwenhuis >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Sourceplot! >Date: Fri, 23 Feb 2007 18:09:29 +0100 > >Hello Muthuraman, > > >How can i plot the source, i do not have any anatomical MRI at this > >moment? Is there a way to see the results from the source analysis > >using DICS in the structure of a normal topoplot > >You can also plot your results without an MRI. >Since your source data is a volume (3 space dimensions and one functional >dimension) you can not plot it "in the structure a normal topoplot" (2 >space >dimensions, one functional dimension). You can plot slices from your >volume. > >See the documentation on the new sourceplot function at the fieldtrip >webpage. > >http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu >torial:plotting > >More info can also be found in the help of sourceplot.m > >You cfg could for instance be: > >Cfg.method = 'slice'; >Cfg.funparameter = 'pow'; (or what ever it is that you want to plot in >color) > >Good luck, > >Ingrid > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Friday, February 23, 2007 3:14 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Sourceplot! > >Hello, > >Thanks for the reply, i have plotted the headmodel plot for the 55 >electrodes and attached it with this mail > >The next step of using the source analysis with calculated grid works >without any problem, >i needed to adjust elec structure according to the radius of the volume >conduction model > >How can i plot the source, i do not have any anatomical MRI at this moment? >Is there a way to see the results from the source analysis using DICS in >the > >structure of a normal topoplot > >Thanking you > >With regards >M.Muthuraman. > > > > >From: Robert Oostenveld > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] leadfieldmatrix! > >Date: Thu, 22 Feb 2007 18:12:13 +0100 > > > >On 22 Feb 2007, at 17:21, Muthuraman Muthuraman wrote: > > > >>Warning: electrodes do not ly on sphere surface -> using projection > >>>In fieldtrip-20070109\private\eeg_leadfield4 at 60 > >> In fieldtrip-20070109\private\compute_leadfield at 435 > >> In prepare_leadfield at 209 > > > >Electrodes of course should ly on the skin surface, that is the case in > >the real world and it should also be the case in your model. Did you >plot > >the electrodes in combination with the sphere on which they should ly? >You > > >can use headmodelplot for that. > > > >>%PLOTTING SOURCE > >> > >>cfg.location='interactive'; > >>cfg.funparameter='source'; > >>cfg.maskparameter='source'; > >>sourceplot(cfg,source); > > > >Please update to the latest version of fieldtrip, the sourceplot >function > >has recently been improved. The documentation of sourceplot explains how > >to use the funparameter and maskparameter. See also the tutorial > >documentation. Your specification 'source' is certainly not going to >work, > > >sice 'source' is not a source parameter. > > > >regards, > >Robert > >_________________________________________________________________ >Tried the new MSN Messenger? It's cool! Download now. >http://messenger.msn.com/Download/Default.aspx?mkt=en-in _________________________________________________________________ "Airtel Song Catcher. Get your Hello Tunes instantly" http://www.airtel.in/songcatcher/SONG_CATCHER.html From werkle at MPIB-BERLIN.MPG.DE Mon Feb 26 11:49:18 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Mon, 26 Feb 2007 11:49:18 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: Message-ID: Hi Christian, hi Stefan, I thank both of you for your helpful comments. I now know better about the possible problems, but I also see that it may be worth a try. I will keep you posted about the progress via the discussion list as soon as new problems arise ;-) Thank you and best regards, Markus Christian Hesse schrieb: > Hi Markus, > >>> Why do you remove these epochs? Do the signals saturate or is there >>> excessive electrode(-cap) or subject movement in these? >>> >> Yes, that's correct. I remove epochs before any further analysis, if >> I find saturated channels or excessive subject movements. > > Seems reasonable to me, then. > > >>> How many EEG channels do you have, by the way? I need to know in >>> order to continue with the 'slightly longer answer' >> >> I recorded my data from 60 Ag/Ag-Cl electrodes embedded in an elastic >> cap (with BrainAmp amplifiers) positioned according to the extended >> 10/20 system. Additionally, I record EOG with two electrodes placed >> at the outher canthi and one electrode placed below the left eye. All >> channels are referenced to the right mastoid during recording, while >> the left mastoid electrode is recorded as an additional active >> channel (off-line re-refrenced to the mean of both mastoids). > > Ok, thanks for this extra info. 60 channels is (I think) a good number > in that you are less likely to be affected by the problem of > over-fitting in ICA: this can sometimes happen when there are fewer > source signals which are identifiable by the ICA algorithm (i.e., > statistically independent signals with non-gaussian marginal > distributions) than sensors. Note that fewer sources than sensors does > not necessarily mean that your data is rank-deficient (you can easily > check this by looking at the singular spectrum of your data matrix or, > equivalently, at the spectrum of eigenvalues of the data covariance > matrix - the former is gives the square root of the latter) because > there is always some form of either "sensor" or "ambient" noise, which > will have a gaussian distribution. The point is that when ICA has > found all the obvious components (non-gaussian ones) it then tries to > decompose the gaussian part of the signal into non-gaussian parts, and > this will lead to so-called "over-fitting", which also affects the > accuracy of the estimates of the "true" components. Different ICA > algorithms behave differently in this case, some will give you > spurious solutions, others will simply not converge to a solution > (because there is none in the ICA sense, and throw an error of the > code is smart enough to spot this). But you should not really have to > worry too much about that; although do watch out for it: warnings and > error messages about mixing or de-mixing matrix being (close to) > singular is a good indication of over-fitting, and PCA-based dimension > reduction of your data as part of the ICA is then recommended (though > not a "magic" solution, either). > > When there are fewer channels than sources, you can have the opposite > problem, namely under-fitting. In this situation, there are not enough > components to describe all of the data, and the solution is then > likely to be some sort of compromise, where "true" sources that are > "weak" are spread over several ICs, none of which individually > describes a source. In this case the accuracy of your mixing matrix > estimate will also be "off", but the estimates of the stronger > components are usually pretty robust in this case. > > What can also affect the accuracy of the mixing matrix estimate is the > violation of the assumption of statistical independence of the > sources, and this is pretty likely in the case of networks of neuronal > populations displaying oscillatory activity with greater or lesser > coherence because coherent signals (i.e. with a constant phase > relationship other than 90 degrees) are generally not statistically > independent. This need not be a disaster provided that the total > activity of these coherent networks (i.e. in the signal subspace of > coherent sources) is statistically independent of all the artifact > stuff you wish to remove. Then you can go ahead with ICA and remove > artifacts, but you will not necessarily be able to identify/interpret > individual oscillatory components of brain activity. But since you do > your analysis at the sensor level, this does not matter. > > Another problem related to ICA and sources of oscillatory activity is > that the amplitude time course of this activity is generally modulated > over time, which in turn can make these sources have marginal > distributions which "look" essentially Gaussian, in which case the ICA > algorithm may again be unable to correctly (or uniquely) identify the > sensor projections associated with such source signals, EVEN if they > are statistically independent, since ICA ONLY works exactly if the > sources are statistically independent AND non-gaussian. > > So in summary, I guess my advice to you would be to always use EXTREME > CAUTION when working with ICA :-), but to go ahead with what you're > doing and just make sure you are able to robustly identity all of your > artifacts, and don't spend too much time worrying about which > components reflect brain activity, as this is likely to live in a > subspace so individial topographies give a limited story. I really > don't mean to sound negative, but these problems and limitations > regularly occur in real life ICA-usage, and you need to know that it > is not a "cure" for "bad" data (from an ICA point of view). > > Hope this helps, > Christian > > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > -- ************************************************************** Markus Werkle-Bergner, Dipl. Psych. Predoctoral Research Fellow Center for Lifespan Psychology Max Planck Institute for Human Development Lentzeallee 94, Room 211, D-14195 Berlin, Germany. Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 ************************************************************** From r.oostenveld at FCDONDERS.RU.NL Mon Feb 26 14:39:28 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 26 Feb 2007 14:39:28 +0100 Subject: TFR: labels in data and labels in layout do not match In-Reply-To: Message-ID: Hi Sameer On 23 Feb 2007, at 20:36, Sameer Walawalkar wrote: > cfgTFR = > output: 'pow' > channel: 'MEG' > ... > > multiplotTFR(cfgTFRout, TFRmult); > > multiplotTFR(cfgTFRout, TFRmult); > reading layout from file NM306all.lay > ??? Error using ==> multiplotTFR > labels in data and labels in layout do not match I suspect the problem might be related to channel selection (do "help channelselection"). The indication cfg.channel = 'MEG' results in a selection of known MEG channels, but that selection was implemented for the CTF system (where MEG channels start with the letter "M") and might not work for your Neuromag data. please try cfg1.channel = 'MEG' % or something else cfg2.channel = channelselection(cfg1.channel, data.label) and you will see which channels are selected for subsequent processing (in this case plotting, but the same applies to all other analyses). best regards, Robert PS note that you can do dbstop if error on the matlab command line and you will automatically jump to the line where the error happens, which facilitates debugging. From sghosh at HSS.IITD.AC.IN Mon Feb 26 15:17:14 2007 From: sghosh at HSS.IITD.AC.IN (Shantanu Ghosh) Date: Mon, 26 Feb 2007 15:17:14 +0100 Subject: how to create data structure Message-ID: Hi FT users, This is a stupid question but I will ask it anyway. I have started to understand a lot of the FT program logics, but I still have to get a bearing on the data structure of the input. My data is 116384 datapoints long sampled at 115.34 Hz. I can load my data data structure not in FT list)from single subject in a single recording session( in matlab workspace and implement the following code as suggested: data = []; > data.fsample = 115.34 > data.label = {'Fz';'Fp1'; ... 'Oz'}; > data.trial = cell(Ntrial,1); > for i=1:Ntrial > data.trial{i} = 24 x 40 > end However, at the prompt it says: Data structure not compatible. Error in matrix location or matrix dimension. My question is, how do you create the Nchan (=24) X NTrialSamp (= 40 trials) matrix from continuous data? Thanks, Shantanu From c.hesse at FCDONDERS.RU.NL Mon Feb 26 18:47:58 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 26 Feb 2007 18:47:58 +0100 Subject: how to create data structure In-Reply-To: Message-ID: Hi Shantanu > My data is 116384 datapoints long sampled at 115.34 Hz. > I can load my data data structure not in FT list)from single > subject in a > single recording session( in matlab workspace and implement the > following > code as suggested: > > data = []; >> data.fsample = 115.34 >> data.label = {'Fz';'Fp1'; ... 'Oz'}; >> data.trial = cell(Ntrial,1); >> for i=1:Ntrial >> data.trial{i} = 24 x 40 >> end > > However, at the prompt it says: > > Data structure not compatible. Error in matrix location or matrix > dimension. comment 1: the data structure also needs a (local) time axis for each trial: data.time = cell(Ntrial,1) for i=1:Ntrial data.time{i} = [trial_start:dt:trial_stop]; % trial_start could be -1.5 seconds % trial_stop could be 3.0 seconds % dt = 1./data.fsample; end > My question is, how do you create the Nchan (=24) X NTrialSamp (= > 40 trials) > matrix from continuous data? comment 2: NTrialSamp is NOT the number of trials (NTrial = 40) but instead refers to the "Number_of_time_samples_per_trial" which is determined by the duration of the trial in seconds (TrialDuration) and your sampling frequency FSample: NTrialSamp = TrialDuration*FSample; % this can in principle be different for each trial % so you have data.trial = cell(Ntrial,1) for i=1:Ntrial data.trial{i} = X; % where X is a Nchan x NTrialSamp matrix containing the data from each trial end comment 3: Your question essentially is: How do youI get X from what you have read into Matlab? To answer this, you need to tell me what sort of variable your data are stored in once they have been read into Matlab. You can load your data in and then type "whos" at the command prompts and email me what is displayed on the screen after you press Kind Regards, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From marie at PSY.GLA.AC.UK Mon Feb 26 18:49:23 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Mon, 26 Feb 2007 17:49:23 +0000 Subject: Beamforming across trials not time In-Reply-To: Message-ID: Dear FIELDTRIP, In order to achieve a better temporal resolution with a beamformer analysis it has been suggested to use single trial data in place of single time point data. Eg. In an experiment with 1000trials, 400time points - rather than compute the covariance across the 400 time points (averaged over trials), compute it over 1000 points (for a very short fixed time interval e.g. 10ms). I have tried to implement this and would like some advice on whether or not the steps i have taken make sense in terms of fieldtrip functions and in general. Any advice would be welcome. Thanks, Marie Effectively what I am doing is: Step 1) Choose a time point of interest Step 2) Smooth the single trial data with a 30point moving average to increase SNR Step 3) Generate a fake "single trial" which is the concatenation of each of these points across all trials e.g. the matrix has dims (nchans, (ntrials*ntimes)); Step 4) Perform time-lock analysis on this "single trial" to compute the covariance - avg1 Step 5) Perform time-lock analysis on the actual data over the same short time range with keeptrials = 'yes' -avg2 Step 6) Perform lcmv sourceanalysis on avg1 (output of step 4) Step 7) Apply this filter to avg2 (output of step 5 and sourceanalysis) to estimate the single trial time courses at each grid location, across the short time interval. From sghosh at HSS.IITD.AC.IN Tue Feb 27 05:59:57 2007 From: sghosh at HSS.IITD.AC.IN (Shantanu Ghosh) Date: Tue, 27 Feb 2007 05:59:57 +0100 Subject: Read data structure-contd Message-ID: Hello Christian, Sorry to use this mail id, but the Listserv server was temporarily unavailable from my IP address. > Hi Shantanu > >> My data is 116384 datapoints long sampled at 115.34 Hz. >> I can load my data data structure not in FT list)from single >> subject in a >> single recording session( in matlab workspace and implement the >> following >> code as suggested: >> >> data = []; >>> data.fsample = 115.34 >>> data.label = {'Fz';'Fp1'; ... 'Oz'}; >>> data.trial = cell(Ntrial,1); >>> for i=1:Ntrial >>> data.trial{i} = 24 x 40 >>> end >> >> However, at the prompt it says: >> >> Data structure not compatible. Error in matrix location or matrix >> dimension. > > comment 1: > the data structure also needs a (local) time axis for each trial: > > data.time = cell(Ntrial,1) > for i=1:Ntrial > data.time{i} = [trial_start:dt:trial_stop]; > % trial_start could be -1.5 seconds > % trial_stop could be 3.0 seconds > % dt = 1./data.fsample; > end > > >> My question is, how do you create the Nchan (=24) X NTrialSamp (= >> 40 trials) >> matrix from continuous data? > > comment 2: > NTrialSamp is NOT the number of trials (NTrial = 40) but instead > refers to the "Number_of_time_samples_per_trial" which is determined > by the duration of the trial in seconds (TrialDuration) and your > sampling frequency FSample: > > NTrialSamp = TrialDuration*FSample; > % this can in principle be different for each trial > > % so you have > data.trial = cell(Ntrial,1) > for i=1:Ntrial > data.trial{i} = X; > % where X is a Nchan x NTrialSamp matrix containing the data from > each trial > end > > > comment 3: > Your question essentially is: How do youI get X from what you have > read into Matlab? > > > To answer this, you need to tell me what sort of variable your data > are stored in once they have been read into Matlab. You can load your > data in and then type "whos" at the command prompts and email me what > is displayed on the screen after you press > Reply to comment 3: This is what is displayed at 'whos' command after the data is loaded: >> y=dlmread('C:\\priyanka\\exp1\\SegmentedEEGData\\S1\\audi\\A1 \\1_E_1.txt'); >> whos Name Size Bytes Class y 347x1 2776 double array Grand total is 347 elements using 2776 bytes >> Additional comments: The file is a 3 sec EEG voltage record from our experiment on episodic memory encoding and recall in auditory mode ('Process'), for subject 'S1' for electrode 'A1'. '1_E_1' refers to 'BlockNum_Process_TrialNumber'. The experiment has the following design: After displaying a blank screen for 1 min, a 4 sec red spot in the centre of the screen alerts the subject that a CVC syllable is presented (trial). There are 6 trials, each of 3 sec duration, followed by another green spot in screen centre for 4 s to alert the subject that recall is to be effected, followed by 6 trials of CVC sequences each of 3 sec, but only half of them from the earlier encoding block. this [encoding-recall] sequence is repeated for 20 times. All CVC sequences in encoding and recall were randomised. EEG was acquired continuously. The continuous EEG was then segmented stored in separate .txt files using a Matlab routine (see attached file: 'mySegmentData.m'). One of these files is then loaded using 'dlmread'. I also have the continuous EEG as .txt files for each electrode, as separate files in a folder [say, called subject 'S1','S2',... ] (if you require that data to get X) Best and thanks, Shantanu -------------- next part -------------- % This codes segments the data of each subject for a specific mode % (Auditory or Visual) and a specific channel depending on the stimulus, % block and the process. % % Format of the Data File provided: Subject_Mode_eeg_Channel % Subject = S1, S2, S3, S4, S5, S6, S7, S8, S9, S10 % Mode = audi (for Auditory), visu (for Visual) % Channel = F3, F4, F7, F8, T3, T4, T5, T6, P3, P4, Pz, O1, O2, Oz, % FP1, FP2, Fz, C3, C4, Cz, A1, A2, EKG % % Format of the Data File Outputted: Block_Process_Stimulus % Block = 1, 2,..., 10 % Process = E (for Encoding), R (for Retrieval) % Stimulus = 1, 2, 3, 4, 5, 6 clc; close all; clear all; SamplingTime = 0.00867; % in secs InitialTime = 60; % in secs GapTime = 4; % in secs nBlocks = 10; % Number of Blocks BlockTime = 18; % in secs Process = {'E'; 'R'}; % Processes (E - Encoding; R - Retrieval) nStimuli = 6; % Number of Stimuli StimulusTime = 3; % in secs % Subjects_Modes = {'Subject','Mode'} % Subjects = S1, S2, S3, S4, S5, S6, S7, S8, S9, S10 % Modes = audi (for Auditory), visu (for Visual), both (for Both) % Subjects_Modes = {'S1','both'; 'S2','both'; 'S3','both'; 'S4','both';... % 'S5','both'; 'S6','both'; 'S7','both'; 'S8','both'; 'S9','both'; 'S10','both'}; Subjects_Modes = {'S1','both'; 'S2','both'; 'S3','both'; 'S4','both';... 'S5','both'; 'S6','both'; 'S7','visu'; 'S8','both'; 'S9','both';... 'S10','both'}; % Channels = {'F3'; 'F4'; 'F7'; 'F8'; 'T3'; 'T4'; 'T5'; 'T6';... % 'P3'; 'P4'; 'Pz'; 'O1'; 'O2'; 'Oz';... % 'FP1'; 'FP2'; 'Fz'; 'C3'; 'C4'; 'Cz'; 'A1'; 'A2'; 'EKG'}; Channels = {'F3'; 'F4'; 'F7'; 'F8'; 'T3'; 'T4'; 'T5'; 'T6';... 'P3'; 'P4'; 'Pz'; 'O1'; 'O2'; 'Oz';... 'FP1'; 'FP2'; 'Fz'; 'C3'; 'C4'; 'Cz'; 'A1'; 'A2'; 'EKG'}; for i = 1:size(Subjects_Modes,1) % Runs over all the Subjects Subject = Subjects_Modes{i,1}; if Subjects_Modes{i,2} == 'both' Mode = {'audi'; 'visu'}; else Mode = {Subjects_Modes{i,2}}; end for j = 1:length(Mode) % Runs over all the Modes for k = 1:length(Channels) % Runs over all the Channels filename = ['eegdata','\',Subject,'\',Subject,'_',Mode{j},'_eeg_',Channels{k},'.eeg']; fid = fopen(filename); % Open a file if fid == -1 break end entiredata = fscanf(fid,'%f'); % Read data from the file fclose(fid); directoryname = ['SegmentedEEGData','\',Subject,'\',Mode{j},'\',Channels{k}]; mkdir(directoryname); % Create a directory entiredata = entiredata(round(InitialTime/SamplingTime):end); % Eliminate the first 1 min of the data flag = -1; % Flag for determining the process (E or R) for a = 1:2*nBlocks % Runs over all the blocks (both E and R) flag = -1*flag; % Toggle the flag if flag == 1 c = 1; % E Process else c = 2; % R Process end for b = 1:nStimuli % Runs over all the Stimuli l = round((a*GapTime + (a-1)*BlockTime + (b-1)*StimulusTime)/SamplingTime); h = round((a*GapTime + (a-1)*BlockTime + b*StimulusTime)/SamplingTime); data = entiredata(l:h); filename = [directoryname,'\',num2str(a),'_',Process{c},'_',num2str(b),'.txt']; fid = fopen(filename,'w'); % Open a file if fid == -1 break end fprintf(fid,'%f\n',data); % Write data to a file fclose(fid); end end end end end display('Files successfully segmented!') From r.oostenveld at FCDONDERS.RU.NL Tue Feb 27 10:40:11 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 27 Feb 2007 10:40:11 +0100 Subject: Beamforming across trials not time In-Reply-To: Message-ID: Dear Marie, On 26 Feb 2007, at 18:49, Marie Smith wrote: > In order to achieve a better temporal resolution with a beamformer > analysis it has been suggested to use single trial data in place of > single time point data. Eg. In an experiment with 1000trials, > 400time points - rather than compute the covariance across the 400 > time points (averaged over trials), compute it over 1000 points > (for a very short fixed time interval e.g. 10ms). I have tried to > implement this and would like some advice on whether or not the > steps i have taken make sense in terms of fieldtrip functions and > in general. Any advice would be welcome. I suspect that what you have implemented is largely supported by the existing code (see below). Regardless of that, it would be interestnig if you would share your experiences on this with us. > Effectively what I am doing is: > > Step 1) Choose a time point of interest > Step 2) Smooth the single trial data with a 30point moving average > to increase SNR > Step 3) Generate a fake "single trial" which is the concatenation > of each of these points across all trials e.g. the matrix has dims > (nchans, (ntrials*ntimes)); > Step 4) Perform time-lock analysis on this "single trial" to > compute the covariance - avg1 > Step 5) Perform time-lock analysis on the actual data over the same > short time range with keeptrials = 'yes' -avg2 > Step 6) Perform lcmv sourceanalysis on avg1 (output of step 4) > Step 7) Apply this filter to avg2 (output of step 5 and > sourceanalysis) to estimate the single trial time courses at each > grid location, across the short time interval. The timelockanalysis function computes covariances (and also averages, but the averaging is more or less independent from the covariance computation. Timelockanalysis does the following: a- it filters the data in each trial (optional, see private/preproc), one of the options is also to apply a boxcar smoothing kernel b- it selects the timewindow for averaging the ERF and computing the single sample variance over trials c- it selects the timewindow for covariance computation d- for each trial, it selects the avg-timewindow and sums the data e- for each trial, it selects the cov-timewindow and computes the covariance within that timewindow f- in case of keeptrials=yes, the single trial covariance (and the data trials) are returned g- in case of keeptrials=no, the covariance matrices are averaged over trials When beaming the data in sourceanalysis, the single trial covariance matrices are averaged over trials. This is a bit messy in the documentation but also in the code (e.g. the sourceanalysis options keepfilters, rawtrial and singletrial interact with each other) Regarding your 2 -> that can be done with step "a". The smoothing can be done with a boxcar, and the selection of samples of interest is done in our step "e". Regarding your 3 and 4 -> averaging covariance matrixes (step "g" or alternatively in sourceanalysis) is the same as your steps: consider for i=1:40 a{i} = randn(151,1000); end for i=1:10 ca{i} = cov(a{i}); end % concatenate trials b = cat(2, a{:}); cb = cov(b); in this case the average over ca is the same as cb. However, I now realise what the main difference appears to be between your approach and the obvious use of the existing code: it relates to baseline correction. Covariance in general is computed like this a = randn(151, 1000); for i=1:151 a(i,:) = a(i,:) - mean(a(i,:)); % ensure zero mean end c = a * a'; % compute covariance c = c ./ 1000; % divide by number of samples That means that in the current implementation, the data within each trial is baseline subtracted (over the whole timewindow) prior to computing the covariance within that trial. It is possible to specify in timelockanalysis removemean=no, but that does not achieve exactly the same as your implementation, since your implementation removes the mean OVER trials and then computes the covariance by multiplying the matrix with its transpose. So part of your method should already be possible with the existing code (although admittedly not well documented). But your different approach in baseline correcting is not possible with existing code. Please have a look at the timelockanalysis code together with the suggestions above and let me know whether you concur. Of course we could extend timelockanalysis with your approach. best regards, Robert From jgross at UNI-DUESSELDORF.DE Tue Feb 27 11:35:00 2007 From: jgross at UNI-DUESSELDORF.DE (Joachim Gross) Date: Tue, 27 Feb 2007 10:35:00 +0000 Subject: Postdoctoral Research Assistant position in Glasgow Message-ID: Postdoctoral Research Assistant Centre for Cognitive Neuroimaging (CCNi) Department of Psychology £25,889 - £31,840 per annum REF: 13078/DPO/A3 A strategic priority of the University is the current creation within the Department of Psychology of a Centre for Cognitive Neuroimaging (CCNi), a major initiative to install an in-house platform of complementary, state-of-the-art brain imaging facilities dedicated to Cognitive Neuroscience research. Equipment will include a 3T fMRI scanner, a MEG system, a TMS system, and several EEG systems – including fMRI compatible systems. Applications are invited for a Postdoctoral Research Assistant to work with Professor Joachim Gross in the Magnetoencephalography (MEG) group in the newly established CCNi. The overall mission of the group is the non-invasive investigation of large-scale oscillatory neural interactions and their role in information processing by using advanced signal processing techniques. You will have the opportunity to: contribute to the design of MEG experiments; collect the data with a state of the art MEG system; develop, validate and apply cutting edge techniques to analyse brain signals in the time and frequency domain; solve the inverse problem in order to identify processing networks. You will be expected to contribute to the overall mission of the group, to ongoing MEG projects, and provide expertise and support for the research at CCNi. You will be qualified, with a PhD, or equivalent, in Psychology, Neuroscience, Medicine, Neuroinformatics, Physics or a related discipline. Advanced programming skills (preferably with MATLAB) are essential. Experience with MEG/EEG data acquisition and analysis is highly desirable. You should be familiar with principles of signal processing (also in the frequency domain), statistical methods and possibly the MEG inverse problem. Finally you should have a strong interest in developing your own scientific programme and pursuing a research career. This post is available from 1 May 2007 and funding is available for 24 months initially. Informal enquiries may be made to Professor J Gross, (+44 (0)141 330 3947; j.gross at psy.gla.ac.uk. For further details about the post and how to apply: see our web site at http://www.psy.gla.ac.uk/jobs.php or contact Clare Alexander, Department of Psychology, University of Glasgow, G12 8QQ (+44 (0)141 330 5090, e-mail c.alexander at psy.gla.ac.uk or the University web site at http://www.gla.ac.uk Closing date: 30 March 2007. From jgross at UNI-DUESSELDORF.DE Tue Feb 27 11:37:26 2007 From: jgross at UNI-DUESSELDORF.DE (Joachim Gross) Date: Tue, 27 Feb 2007 11:37:26 +0100 Subject: Postdoctoral Research Assistant position in Glasgow Message-ID: Postdoctoral Research Assistant Centre for Cognitive Neuroimaging (CCNi) Department of Psychology �25,889 - �31,840 per annum REF: 13078/DPO/A3 A strategic priority of the University of Glasgow is the current creation within the Department of Psychology of a Centre for Cognitive Neuroimaging (CCNi), a major initiative to install an in-house platform of complementary, state-of-the-art brain imaging facilities dedicated to Cognitive Neuroscience research. Equipment will include a 3T fMRI scanner, a MEG system, a TMS system, and several EEG systems – including fMRI compatible systems. Applications are invited for a Postdoctoral Research Assistant to work with Professor Joachim Gross in the Magnetoencephalography (MEG) group in the newly established CCNi. The overall mission of the group is the non-invasive investigation of large-scale oscillatory neural interactions and their role in information processing by using advanced signal processing techniques. You will have the opportunity to: contribute to the design of MEG experiments; collect the data with a state of the art MEG system; develop, validate and apply cutting edge techniques to analyse brain signals in the time and frequency domain; solve the inverse problem in order to identify processing networks. You will be expected to contribute to the overall mission of the group, to ongoing MEG projects, and provide expertise and support for the research at CCNi. You will be qualified, with a PhD, or equivalent, in Psychology, Neuroscience, Medicine, Neuroinformatics, Physics or a related discipline. Advanced programming skills (preferably with MATLAB) are essential. Experience with MEG/EEG data acquisition and analysis is highly desirable. You should be familiar with principles of signal processing (also in the frequency domain), statistical methods and possibly the MEG inverse problem. Finally you should have a strong interest in developing your own scientific programme and pursuing a research career. This post is available from 1 May 2007 and funding is available for 24 months initially. Informal enquiries may be made to Professor J Gross, (+44 (0)141 330 3947; j.gross at psy.gla.ac.uk. For further details about the post and how to apply: see our web site at http://www.psy.gla.ac.uk/jobs.php or contact Clare Alexander, Department of Psychology, University of Glasgow, G12 8QQ (+44 (0)141 330 5090, e-mail c.alexander at psy.gla.ac.uk or the University web site at http://www.gla.ac.uk Closing date: 30 March 2007. From muthuraman10 at HOTMAIL.COM Tue Feb 27 12:19:31 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Tue, 27 Feb 2007 11:19:31 +0000 Subject: Plotting using Slice! Message-ID: Hello Fieldtrippers, I am not sure whether this mail has reached the group ! I am sending it again ! Thanks for the answer, i tried to plot using the source plot with this configuration and i get the error, in this case should i need to transform the data before plotting using slice any comments on this cfg.method='slice'; cfg.funparameter='coh'; cfg.nslices = 20; cfg.slicedim = 3; sourceplot(cfg,freqmtmfft); ??? Reference to non-existent field 'dim'. Error in ==> fieldtrip-20070222\private\grid2transform at 9 if ~isfield(volume, 'xgrid'), volume.xgrid=1:volume.dim(1); end Error in ==> sourceplot at 189 data = grid2transform(data); Thanking you With regards M.Muthuraman. _________________________________________________________________ News and updates from Indian diaspora http://content.msn.co.in/NRI/Default From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Feb 27 12:34:44 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 27 Feb 2007 12:34:44 +0100 Subject: Plotting using Slice! In-Reply-To: Message-ID: Hi Muthuraman, What are you trying to plot? Could you send which fields are in your freqmtmfft? Bests Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Tuesday, February 27, 2007 12:20 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Plotting using Slice! Hello Fieldtrippers, I am not sure whether this mail has reached the group ! I am sending it again ! Thanks for the answer, i tried to plot using the source plot with this configuration and i get the error, in this case should i need to transform the data before plotting using slice any comments on this cfg.method='slice'; cfg.funparameter='coh'; cfg.nslices = 20; cfg.slicedim = 3; sourceplot(cfg,freqmtmfft); ??? Reference to non-existent field 'dim'. Error in ==> fieldtrip-20070222\private\grid2transform at 9 if ~isfield(volume, 'xgrid'), volume.xgrid=1:volume.dim(1); end Error in ==> sourceplot at 189 data = grid2transform(data); Thanking you With regards M.Muthuraman. _________________________________________________________________ News and updates from Indian diaspora http://content.msn.co.in/NRI/Default From marie at PSY.GLA.AC.UK Tue Feb 27 17:07:51 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 27 Feb 2007 16:07:51 +0000 Subject: Beamforming across trials not time In-Reply-To: <4A61AF16-04FE-4B68-AD39-763623D34A9B@fcdonders.ru.nl> Message-ID: Hi Robert, > The timelockanalysis function computes covariances (and also > averages, but the averaging is more or less independent from the > covariance computation. Timelockanalysis does the following: > > a- it filters the data in each trial (optional, see private/ > preproc), one of the options is also to apply a boxcar smoothing > kernel > b- it selects the timewindow for averaging the ERF and computing > the single sample variance over trials > c- it selects the timewindow for covariance computation > d- for each trial, it selects the avg-timewindow and sums the data > e- for each trial, it selects the cov-timewindow and computes the > covariance within that timewindow > f- in case of keeptrials=yes, the single trial covariance (and the > data trials) are returned > g- in case of keeptrials=no, the covariance matrices are averaged > over trials > When beaming the data in sourceanalysis, the single trial > covariance matrices are averaged over trials. This is a bit messy > in the documentation but also in the code (e.g. the sourceanalysis > options keepfilters, rawtrial and singletrial interact with each > other) Just to be clear, the covariance is always computed for single trials and then either averaged across trials (keeptrials = 'no') or kept separate (keeptrials = 'yes') to be averaged in the beamforming step? At no time is the data averaged and then the covariance computed on this one average trial? > Regarding your 2 -> that can be done with step "a". The smoothing > can be done with a boxcar, and the selection of samples of interest > is done in our step "e". I'm not sure that this is the same thing. I am smoothing the data across trials at each time point, where i think time lock analysis is smoothing the data in each trial across time points. > However, I now realise what the main difference appears to be > between your approach and the obvious use of the existing code: it > relates to baseline correction. Covariance in general is computed > like this > a = randn(151, 1000); > for i=1:151 > a(i,:) = a(i,:) - mean(a(i,:)); % ensure zero mean > end > c = a * a'; % compute covariance > c = c ./ 1000; % divide by number of samples > That means that in the current implementation, the data within each > trial is baseline subtracted (over the whole timewindow) prior to > computing the covariance within that trial. So, if I were to look at only one time point across trials, implementing things in fieldtrip would always result in a zero value (as the mean == the data value here)? > It is possible to specify in timelockanalysis removemean=no, but > that does not achieve exactly the same as your implementation, > since your implementation removes the mean OVER trials and then > computes the covariance by multiplying the matrix with its transpose. Yes, I agree that this is what I am doing - and i think is the "more correct" thing to do here. > So part of your method should already be possible with the existing > code (although admittedly not well documented). But your different > approach in baseline correcting is not possible with existing code. > Please have a look at the timelockanalysis code together with the > suggestions above and let me know whether you concur. Of course we > could extend timelockanalysis with your approach. Yes I concur with your comments (though please see the points above). From sameer at ANDREW.CMU.EDU Tue Feb 27 18:22:23 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 27 Feb 2007 12:22:23 -0500 Subject: topoplot after pca reduction Message-ID: Hello, Is it possible to plot the topological plot of independent components derived after pca reduction (using binica)? How would one go about doing this? thanks, sameer From r.oostenveld at FCDONDERS.RU.NL Tue Feb 27 20:52:41 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 27 Feb 2007 20:52:41 +0100 Subject: Beamforming across trials not time In-Reply-To: <4773D6EC-5FDB-4B95-B7BD-F594BB8D4E18@psy.gla.ac.uk> Message-ID: Hi Marie On 27 Feb 2007, at 17:07, Marie Smith wrote: > Just to be clear, the covariance is always computed for single > trials and then either averaged across trials (keeptrials = 'no') > or kept separate (keeptrials = 'yes') to be averaged in the > beamforming step? correct. The averaging in the beamforming step is optional, you can also beam single-trial (rawtrials=yes in sourceanalysis). Or you can beam the single trial ERF timecourses using a filter constructed from the average covariance (requires a first run of sourceanalysis with rawtrials=no and keepfilters=yes, and a second run with cfg.grid=previous_source and rawtrials=yes). > At no time is the data averaged and then the covariance computed on > this one average trial? correct. There is no averaging of the ERFs over trials prior to computing the covariance. It is possible to "average" over time within a single trial by boxcar smoothing. >> Regarding your 2 -> that can be done with step "a". The smoothing >> can be done with a boxcar, and the selection of samples of >> interest is done in our step "e". > > I'm not sure that this is the same thing. I am smoothing the data > across trials at each time point, where i think time lock analysis > is smoothing the data in each trial across time points. Oh, I thought you smoothed over time. Then indeed it is quite different. Averaging (smoothing) over a subset of M trials prior to computing the covariance in the most extreme case (M=Ntrials) corresponds to taking the covariance of the ERF, right? And in the other most extreme case (M=1) it resembles to the approach implemented in timelockanalysis. Am I correct? In the M=Ntrials case, the covariance matrix probably would be rather rank deficient (if the time window is short), and the data covariance would include little or no noise structure (data covariance = signal covariance + noise covariance). But the same applies to induced activity, i.e. that would also not be present in your covariance, so it stresses the effect of the evoked at the expense of the induced activity. I can't tell whether that is good or bad, that depends on your data and research question. >> That means that in the current implementation, the data within >> each trial is baseline subtracted (over the whole timewindow) >> prior to computing the covariance within that trial. > > So, if I were to look at only one time point across trials, > implementing things in fieldtrip would always result in a zero > value (as the mean == the data value here)? yes, that is correct. So I would phrase the approach that you suggest as a "resampling approach", in which you compute the covarioance over M subsets of trials, in which each subset is averaged (c.f. bootstraping). You mentioned in your previous mail that "it has been suggested". Could you give a reference? And how does it behave in your data? best regards, Robert PS we can discuss it in detail during my visit From litvak at TX.TECHNION.AC.IL Wed Feb 28 14:11:02 2007 From: litvak at TX.TECHNION.AC.IL (Vladimir Litvak) Date: Wed, 28 Feb 2007 13:11:02 -0000 Subject: Layout for planar gradient Message-ID: Dear all, I'm playing with MEGPLANAR function for CTF data. I'd like to plot the results with topoplotTFR but there is no layout file matching the planar gradient channels. What should I do? Thanks, Vladimir -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Wed Feb 28 14:24:24 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 28 Feb 2007 14:24:24 +0100 Subject: Layout for planar gradient In-Reply-To: <002101c75b39$e57349f0$f0463ec1@sobell.ion.ucl.ac.uk> Message-ID: Hi Vladimir, > I'm playing with MEGPLANAR function for CTF data. I'd like to plot > the results with topoplotTFR but there is no layout file matching > the planar gradient channels. What should I do? Options: (1) Use COMBINEPLANAR first, then TOPOPLOTTFR (2) You can try to create an appropriate layout using the function CREATELAYOUT in fieldtrip/private (I do not known if that will work tho ...) and use that Cheers, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Wed Feb 28 21:59:52 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 28 Feb 2007 15:59:52 -0500 Subject: No subject Message-ID: Hi, I am currently experimenting with beamformers and was playing with http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:use_your_own_forward_leadfield_model_in_an_inverse_beamformer_computation to generate the grid. I did the following vol = []; vol.r = 12 * [0.88 0.92 1.00]; % radii of spheres, the head radius is 12 cm vol.c = [1 1/80 1]; % conductivity vol.o = [0 0 0]; % center of sphere % compute the leadfields that can be used for the beamforming cfg = []; cfg.vol = vol; cfg.resolution = 2; % same unit as above, i.e. in cm grid = prepare_leadfield(cfg, dataPre); (I expect prepare_leadfield to pick up grad definitions from the data) ??? Error using ==> fieldtrip/private/compute_leadfield different number of spheres for the radius and origin Error in ==> prepare_leadfield at 209 grid.leadfield{dipindx} = compute_leadfield(grid.pos(dipindx,:), sens, vol, 'reducerank', cfg.reducerank, 'normalize', cfg.normalize); Error in ==> SomeMaster at 15 grid = prepare_leadfield(cfg, dataPre); To get around this error, I change vol to vol.o = [0 0 0 ; 0 0 0 ; 0 0 0 ]; ??? Error using ==> fieldtrip/private/compute_leadfield number of spheres is not equal to the number of coils Error in ==> prepare_leadfield at 209 grid.leadfield{dipindx} = compute_leadfield(grid.pos(dipindx,:), sens, vol, 'reducerank', cfg.reducerank, 'normalize', cfg.normalize); Error in ==> SomeMaster at 15 grid = prepare_leadfield(cfg, dataPre); I thought this might be due to the 4 HPI coils, so I changed vol to vol.r = 12 * [0.88 0.92 0.96 1.00]; vol.o = [0 0 0 ; 0 0 0 ; 0 0 0 ; 0 0 0 ]; but it was of no use. Any suggestions? Thanks, sameer From sameer at ANDREW.CMU.EDU Tue Feb 6 14:32:44 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 6 Feb 2007 08:32:44 -0500 Subject: too many trials/overlapping trials Message-ID: Hello, I am currently familiarizing myself with Fieldtrip by using the information gleaned from http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:examp$g_started_with_reading_raw_eeg_or_meg_data beginning with the most basic application which starts with defining the trials. http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:getting_started_with_reading_raw_eeg_or_meg_data I use the first three lines to set up cfg, and then issue the command definetrial(cfg); Note: the data is from Elekta Neuromag 306 channel MEG. It returns some thousand odd events and finds STI 101 and STI 301 as Stim channels. So next I do the following: >> cfg = [] ; >> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >> cfg.trialdef.eventtype = 'STI101' ; >> cfg.trialdef.eventvalue = 7 ; >> cfg.trialdef.prestim = 1.500; >> cfg.trialdef.poststim = 2.501; >> cfg = definetrial(cfg); evaluating trialfunction 'trialfun_general' found 61361 events created 60 trials My first problem is, I should have 30 trials for this event. The file contains a total of 60 trials, but the other 30 are for eventtype = 11 So it is clearly doing something wrong. Next, I decided to see what is in cfg.trl and I get the Nx3 matrix that I find the following problems with it 1> each trial should be 4000 milli seconds long. That happens here, however, there seem to be overlap between trials which does not make sense. This is what leads to the double counting. Thus I get 4000 msec long trials bunched in group of two where the second trial starts about 1000 to 1300 msecs after the beginning of the first trial. 2> If the first trial is at 8502, all subsequent trials should be in increments of integral multiples of 4000 ( plus or minus a few). But that does not seem to happen (and I am looking at on the leading trial of the pair and discounting the trials that follow 1000 msecs later.) Thanks for your help. sameer From r.oostenveld at FCDONDERS.RU.NL Wed Feb 7 16:47:43 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 7 Feb 2007 16:47:43 +0100 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Dear Sameer, On 6 Feb 2007, at 14:32, Sameer Walawalkar wrote: > I use the first three lines to set up cfg, and then issue the command > definetrial(cfg); > Note: the data is from Elekta Neuromag 306 channel MEG. > > It returns some thousand odd events and finds STI 101 and STI 301 > as Stim channels. > > So next I do the following: > >>> cfg = [] ; >>> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >>> cfg.trialdef.eventtype = 'STI101' ; >>> cfg.trialdef.eventvalue = 7 ; >>> cfg.trialdef.prestim = 1.500; >>> cfg.trialdef.poststim = 2.501; >>> cfg = definetrial(cfg); > evaluating trialfunction 'trialfun_general' > found 61361 events > created 60 trials Maybe you could try cfg = [] ; cfg.dataset = 'JD_012507_Beeps_One.fif' ; cfg.trialdef.eventtype = '?'; dum = definetrial(cfg); and look what is printed on screen. > My first problem is, I should have 30 trials for this event. The file > contains a total of 60 trials, but the other 30 are for eventtype = 11 > So it is clearly doing something wrong. > Next, I decided to see what is in cfg.trl and I get the Nx3 matrix > that I find the following problems with it > > 1> each trial should be 4000 milli seconds long. That happens here, > however, there seem to be overlap between trials which does not make > sense. This is what leads to the double counting. Thus I get 4000 > msec long trials bunched in group of two where the second trial > starts about 1000 to 1300 msecs after the beginning of the first > trial. Please have a look in cfg.event. > 2> If the first trial is at 8502, all subsequent trials should be in > increments of integral multiples of 4000 ( plus or minus a few). > But that does not seem to happen (and I am looking at on the > leading trial of the pair and discounting the trials that follow > 1000 msecs later.) That means that there are events detected that are not supposed to be there according to your knowledge of the dataset. Could it be that both the positive and the negative flank of the trigger are detected? Robert From sameer at ANDREW.CMU.EDU Wed Feb 7 17:30:26 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 7 Feb 2007 11:30:26 -0500 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Thanks for the reply Robert. here's some more info. > Dear Sameer, > > Maybe you could try > cfg = [] ; > cfg.dataset = 'JD_012507_Beeps_One.fif' ; > cfg.trialdef.eventtype = '?'; > dum = definetrial(cfg); > and look what is printed on screen. evaluating trialfunction 'trialfun_general' the following events were found in the datafile event type: 'STI101' with event values: 5 6 7 8 9 11 15 16388 16391 16392 16396 event type: 'STI301' with event values: 5.0003 5.0018 ...(many more...) event type: 'trial' with event values: no trials have been defined yet, see DEFINETRIAL for further help found 61361 events created 0 trials (I address another point at the bottom of the email. I have left the following paragraphs in for refrence) >> My first problem is, I should have 30 trials for this event. The file >> contains a total of 60 trials, but the other 30 are for eventtype = 11 >> So it is clearly doing something wrong. > >> Next, I decided to see what is in cfg.trl and I get the Nx3 matrix that I >> find the following problems with it >> >> 1> each trial should be 4000 milli seconds long. That happens here, >> however, there seem to be overlap between trials which does not make >> sense. This is what leads to the double counting. Thus I get 4000 msec long >> trials bunched in group of two where the second trial starts about 1000 to >> 1300 msecs after the beginning of the first trial. > > Please have a look in cfg.event. > >> 2> If the first trial is at 8502, all subsequent trials should be in >> increments of integral multiples of 4000 ( plus or minus a few). But that >> does not seem to happen (and I am looking at on the leading trial of the >> pair and discounting the trials that follow 1000 msecs later.) > > That means that there are events detected that are not supposed to be there > according to your knowledge of the dataset. Could it be that both the > positive and the negative flank of the trigger are detected? I have looked into this as it was the first thing I suspected. What has been confusing me is that it seems to be counting the rising flank of the correct trigger and the falling flank of the earlier trigger, even though the event type for the earlier trigger is different. I am looking for cfg.trialdef.eventtype = 'STI101' and cfg.trialdef.eventvalue = 7 or 11. The earlier falling trigger is 5,6 or 8.9 and so should not be considered at all. I never use STI301 sameer From r.oostenveld at FCDONDERS.RU.NL Wed Feb 7 21:43:37 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 7 Feb 2007 21:43:37 +0100 Subject: New statistics In-Reply-To: <000001c74495$5f6aa930$f0463ec1@sobell.ion.ucl.ac.uk> Message-ID: Hi Vladimir, On 30 Jan 2007, at 18:37, Vladimir Litvak wrote: > I'm trying to switch from clusterrandanalysis to the new statistics > routines. I made my best to configure the new routine in a way that > would yield results identical to the old routine, but the results I > get are very different. I put an example athttp:// > download.yousendit.com/7CE5F69B35B1C739 . Please check what's going > on. I looked in the script and data that you have sent and notice that >> cfg.design ans = 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 >> size(cfg.design) ans = 2 22 and furthermore >> size(freqavg{1}.powspctrm) ans = 22 1 50 965 >> size(freqavg{2}.powspctrm) ans = 22 1 50 965 So even though you seem to have 22+22=44 observations/subjects in the data, you are only using 22 in the design to compute your statistical contrast: You are actually computing the contast between the first 11 subjects in the first condition versus the second 11 subjects in the first condition. Your design probably should be cfg.design = [ 1:22 1:22 % subject index, runs from 1 to 22 (twice, since paired data) 1*ones(1,22) 2*ones(1,22) % condition number, is either 1 or 2 ]; best regards, Robert From Brian.Roach at YALE.EDU Thu Feb 8 18:25:21 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Thu, 8 Feb 2007 12:25:21 -0500 Subject: sourceanalysis.m on EEG data Message-ID: I am working through this tutorial on the web: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?%20id=fieldtrip:documentation:tutorial:beamformer#plot_the_result I am wondering, do you only need to use MRIviewer to construct a forward model for MEG data (and not for EEG data)? What kind of software do I need to use to construct an .hdm file for EEG data? thanks! Brian From sameer at ANDREW.CMU.EDU Thu Feb 8 18:52:11 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 8 Feb 2007 12:52:11 -0500 Subject: ??? Undefined command/function 'componentanalysis'. Message-ID: Hello, I am interested in doing independent component analysis (for removing blinks) on my data. But it seems my fieldtrip download did not include the file componentanalysis and I get the following error (visual inspection of folder with the fieldtrip installation confirms too). >> comp = componentanalysis(cfg, dataLL); ??? Undefined command/function 'componentanalysis'. I have downloaded the latest version available today. Is it available differently? thanks, sameer From sameer at ANDREW.CMU.EDU Thu Feb 8 18:59:06 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 8 Feb 2007 12:59:06 -0500 Subject: generating data structure for all trials Message-ID: Hello, My basic question is: Can definetrial be used in such a way as to create the data structure without breaking the data up into trials? or Is there some other way to generate the data structure with all its fields without breaking the data up into trials? What follows is a bit more information. The first twenty independent components of my data acquired by using EEGlab or fastICA contain blinks, heart beats and other extraneous signals which I can subtract. I can infact do all the preprocessing on my data that Fieldtrip can do. The problem is in order to now use Fieldtrip for further analysis (I want to eventually do DICS), I have to generate the data structure with all its fields as fieldtrip likes it, and that seems tedious. Hence I want to stick with Fieldtrip all the way. However, while using Fieldtrip, the first point where a MATLAB variable containing data is created is during trial definition at data = preprocessing(cfg); (from online tutorial) Trial rejections, and independent component analysis is done after this. Instead I would prefer to use independent component analysis first to remove blinks etc, then do channels and trial rejections, and then do the trial definitions based on event types etc. Central to this is having the structure data with all its fields defined before using componentanalysis.m. Can definetrial be used in such a way as to create the data structure without breaking the data up into trials? Is there some other way to generate this structure without breaking the data up into trials? thanks, sameer From tomh at KURAGE.NIMH.NIH.GOV Thu Feb 8 19:40:27 2007 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd (NIH/NIMH) [E]) Date: Thu, 8 Feb 2007 13:40:27 -0500 Subject: Reading in data from a new CTF system with ECC In-Reply-To: <06112915111720_2800013E@mpih-frankfurt.mpg.de> Message-ID: I usually do something like: T0 = -.3; T1 = .75; mark = 'beep'; cfg = []; cfg.dataset = 'BJVWOZGQ_pacing_20050712_01-f.ds'; cfg.trialdef.eventtype = mark; cfg.trialdef.prestim = -T0; cfg.trialdef.poststim = T1; cfg.channel = { 'MLC11' 'MLC22' }; cfg.blc = 'yes'; cfg.detrend = 'yes'; #cfg.hilbert = 'yes'; cfg.bpfilter = 'yes'; cfg.bpfreq = [1. 50.]; [data] = preprocessing(cfg); I have the same kind of system. Check my tools at http://kurage.nimh.nih.gov/, especially parsemarks, which is helpful for writing scripts that recode the UPPT001 data. -- Tom Holroyd, Ph.D. We experience the world not as it is, but as we expect it to be. From litvak at TX.TECHNION.AC.IL Thu Feb 8 20:24:32 2007 From: litvak at TX.TECHNION.AC.IL (Vladimir Litvak) Date: Thu, 8 Feb 2007 19:24:32 -0000 Subject: New statistics In-Reply-To: Message-ID: Hi Robert, Stupid mistake indeed, but even after fixing it the results are not the same. There is a very nice big positive cluster in the gamma range I get with clusterrandanalysis that is completely absent in the new result. Since the effect is pretty clear in the raw data I think there is still a problem. Please run the fixed version with and compare the old results with new. Thanks, Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Wednesday, February 07, 2007 8:44 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] New statistics Hi Vladimir, On 30 Jan 2007, at 18:37, Vladimir Litvak wrote: > I'm trying to switch from clusterrandanalysis to the new statistics > routines. I made my best to configure the new routine in a way that > would yield results identical to the old routine, but the results I > get are very different. I put an example athttp:// > download.yousendit.com/7CE5F69B35B1C739 . Please check what's going > on. I looked in the script and data that you have sent and notice that >> cfg.design ans = 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 >> size(cfg.design) ans = 2 22 and furthermore >> size(freqavg{1}.powspctrm) ans = 22 1 50 965 >> size(freqavg{2}.powspctrm) ans = 22 1 50 965 So even though you seem to have 22+22=44 observations/subjects in the data, you are only using 22 in the design to compute your statistical contrast: You are actually computing the contast between the first 11 subjects in the first condition versus the second 11 subjects in the first condition. Your design probably should be cfg.design = [ 1:22 1:22 % subject index, runs from 1 to 22 (twice, since paired data) 1*ones(1,22) 2*ones(1,22) % condition number, is either 1 or 2 ]; best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Thu Feb 8 21:52:24 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 8 Feb 2007 21:52:24 +0100 Subject: New statistics In-Reply-To: <002201c74bb6$c2fb2b00$f0463ec1@sobell.ion.ucl.ac.uk> Message-ID: Hi Vladimir On 8 Feb 2007, at 20:24, Vladimir Litvak wrote: > Stupid mistake indeed, but even after fixing it the results are not > the > same. There is a very nice big positive cluster in the gamma range > I get > with clusterrandanalysis that is completely absent in the new > result. Since > the effect is pretty clear in the raw data I think there is still a > problem. > > Please run the fixed version with and compare the old results with > new. I only compared the observed statistics in both cases, and they were the same with the proper design matrix. The gamma blob that I noticed was identical in both versions, and the clusters hence should be the same (assuming you use the same clusterthreshold). I have not run the two versions 1000 times each to compare the p-values of each cluster, but from what you now write, I understand that the p-values of this gamma cluster are different. Am I right? I will run the 1000 randomizations to see whether the p-values are different, but please do check the presense of the gabba-blob cluster and the threshold setting first. Robert From c.hesse at FCDONDERS.RU.NL Fri Feb 9 09:33:17 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 9 Feb 2007 09:33:17 +0100 Subject: generating data structure for all trials In-Reply-To: Message-ID: Hi Sameer, first of all (in reference to your other email): have you managed to get hold of the componentanalysis function yet? On 8 Feb 2007, at 18:59, Sameer Walawalkar wrote: > Hello, > > My basic question is: > > Can definetrial be used in such a way as to create the data > structure without breaking the data up into trials? or Is there > some other way to generate the data structure with all its fields > without breaking the data up into trials? In principle you could define a single trial that contains all of your data, but you don't really want to do that. > What follows is a bit more information. > > > The first twenty independent components of my data acquired by using > EEGlab or fastICA contain blinks, heart beats and other extraneous > signals which I can subtract. I can infact do all the preprocessing > on my data that Fieldtrip can do. The problem is in order to now > use Fieldtrip for further analysis (I want to eventually do DICS), > I have to generate the data structure with all its fields as > fieldtrip likes it, and that seems tedious. > > Hence I want to stick with Fieldtrip all the way. > > However, while using Fieldtrip, the first point where a MATLAB > variable > containing data is created is during trial definition at > data = preprocessing(cfg); (from online tutorial) > Trial rejections, and independent component analysis is done after > this. > > Instead I would prefer to use independent component analysis > first to > remove blinks etc, then do channels and trial rejections, and then > do the > trial definitions based on event types etc. > > Central to this is having the structure data with all its fields > defined > before using componentanalysis.m. Can definetrial be used in such > a way > as to create the data structure without breaking the data up into > trials? > > Is there some other way to generate this structure without breaking > the > data up into trials? > some of the low-level I/O functions can read the data into a matrix for you, but then the housekeeping becomes awkward if you later want to extract the trials (it is doable, but I really do not recommend it). The function componentanalysis actually concatenates all trials before estimating the ICA model, so the fact that pre-processed data is split into trials is not an obstacle to doing what you want to do. Sure, you might miss out a few bits of data between trials, but as such that does not matter in ICA (e.g., infomax, fastica) anyway, since it treats the data as a random variables and not time-series. I would just try doing the ICA on the trial-based data, remove the artifacts and then see if it sufficiently improves your analysis. You could always define your trials in such a way that they correspond to the "raw" signal when you concatenate them. One more thing: if you need (or want) to remove channels from your data then either do it as part of the ICA (if the bad channels don't make the ICA "fall over") or remove them first and then do ICA. Doing ICA first to remove only ocular artifacts, then recombining the signals and rejecting channels strikes me as a potentially problematic approach. Hope this helps. Christian p.s. another (and somewhat unorthodox from a FT perspective) solution might be to do ICA as you have been outside of Fieldtrip and simply apply the de-mixing (W) matrix to your trialbased data in Fieldtrip (need to keep track of the channel labels though!). That might be the solution closest to your wishes. You would have to rescale as follows though (assuming square W): A = inv(W), set columns of A to unit norm, W = inv(A). -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Fri Feb 9 09:45:42 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 9 Feb 2007 09:45:42 +0100 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Hi Sameer, as far as I can follow the discussion there appear to be quite a few triggers in your data whose values are not 7 or 11 ... I assume you know where they come from? What might be helpful is if you could provide a little more detail about your data collection and especially the triggers on each trial. Thanks, Christian On 7 Feb 2007, at 17:30, Sameer Walawalkar wrote: > Thanks for the reply Robert. here's some more info. > >> Dear Sameer, >> >> Maybe you could try >> cfg = [] ; >> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >> cfg.trialdef.eventtype = '?'; >> dum = definetrial(cfg); >> and look what is printed on screen. > > evaluating trialfunction 'trialfun_general' > the following events were found in the datafile > event type: 'STI101' with event values: 5 6 7 8 > 9 11 15 16388 16391 16392 16396 > event type: 'STI301' with event values: 5.0003 5.0018 ...(many > more...) > event type: 'trial' with event values: > no trials have been defined yet, see DEFINETRIAL for further help > found 61361 events > created 0 trials > > (I address another point at the bottom of the email. I have left > the following paragraphs in for refrence) > >>> My first problem is, I should have 30 trials for this event. The >>> file >>> contains a total of 60 trials, but the other 30 are for eventtype >>> = 11 >>> So it is clearly doing something wrong. >> >>> Next, I decided to see what is in cfg.trl and I get the Nx3 >>> matrix that I find the following problems with it >>> 1> each trial should be 4000 milli seconds long. That happens here, >>> however, there seem to be overlap between trials which does not make >>> sense. This is what leads to the double counting. Thus I get 4000 >>> msec long trials bunched in group of two where the second trial >>> starts about 1000 to 1300 msecs after the beginning of the first >>> trial. >> >> Please have a look in cfg.event. >> >>> 2> If the first trial is at 8502, all subsequent trials should be in >>> increments of integral multiples of 4000 ( plus or minus a few). >>> But that does not seem to happen (and I am looking at on the >>> leading trial of the pair and discounting the trials that follow >>> 1000 msecs later.) >> >> That means that there are events detected that are not supposed to >> be there according to your knowledge of the dataset. Could it be >> that both the positive and the negative flank of the trigger are >> detected? > > > I have looked into this as it was the first thing I suspected. What > has been confusing me is that it seems to be counting the rising > flank of the correct trigger and the falling flank of the earlier > trigger, even though the event type for the earlier trigger is > different. I am looking for > cfg.trialdef.eventtype = 'STI101' and > cfg.trialdef.eventvalue = 7 or 11. > The earlier falling trigger is 5,6 or 8.9 and so should not be > considered at all. I never use STI301 > > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak at TX.TECHNION.AC.IL Fri Feb 9 12:54:57 2007 From: litvak at TX.TECHNION.AC.IL (Vladimir Litvak) Date: Fri, 9 Feb 2007 11:54:57 -0000 Subject: New statistics In-Reply-To: <48BA8DBF-F4BC-45A2-A36C-ED93D2ED8828@fcdonders.ru.nl> Message-ID: Hi Robert, It was a graphics problem. I can see the cluster now. Thanks, Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Thursday, February 08, 2007 8:52 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] New statistics Hi Vladimir On 8 Feb 2007, at 20:24, Vladimir Litvak wrote: > Stupid mistake indeed, but even after fixing it the results are not > the > same. There is a very nice big positive cluster in the gamma range > I get > with clusterrandanalysis that is completely absent in the new > result. Since > the effect is pretty clear in the raw data I think there is still a > problem. > > Please run the fixed version with and compare the old results with > new. I only compared the observed statistics in both cases, and they were the same with the proper design matrix. The gamma blob that I noticed was identical in both versions, and the clusters hence should be the same (assuming you use the same clusterthreshold). I have not run the two versions 1000 times each to compare the p-values of each cluster, but from what you now write, I understand that the p-values of this gamma cluster are different. Am I right? I will run the 1000 randomizations to see whether the p-values are different, but please do check the presense of the gabba-blob cluster and the threshold setting first. Robert From muthuraman10 at HOTMAIL.COM Fri Feb 9 13:05:51 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Fri, 9 Feb 2007 12:05:51 +0000 Subject: Frequency Analysis! Message-ID: Hello , Thankyou JM, for the suggestions regarding the Time-Frequency Analysis, it works well now. I need the time information inorder to see what happens to the power at a specific time interval. >>From the previous discussion for the Freqanalysis_mtmwelch method as Prof.Robert as suggested i tried to change the frequency resolution to 1 Hz in the Mtmwelch method. Now i get all the values to be Nan's. cfg.foi = [2:1:30]; cfg.t_ftimwin = ones(1,length(cfg.foi)).*1; And also is there way to load the Laplacian transformed data to the Fieldtip analysis which is a .mat file and work on it for the coherence analysis. I do the laplacian transformation and the welch periodogram method with my own programs not any software. With regards M.Muthuraman. _________________________________________________________________ Catch all the cricketing action right here. Live score, match reports, photos et al. http://content.msn.co.in/Sports/Cricket/Default.aspx From c.hesse at FCDONDERS.RU.NL Fri Feb 9 16:21:15 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 9 Feb 2007 16:21:15 +0100 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Hi Sameer, thanks for the additional info and data from the STI101 channel you sent me. I think that the double counting of your triggers must be caused by the way that the function "trialfun_general.m" computes the (valid) flanks for your data format (e.g., line 467, and see all the comments in lines nearby). Using the content of your STI101 channel (referred to as x below) I was unable to reproduce the double counting using a slightly simpler approach: d = [0, diff(x)]; ii = find((d~=0) & (x==7)); % length(ii) gives 30 ii = find((d~=0) & (x==11)); % length(ii) gives 30 For the time being, the easiest solution (in my view, since you have the STI101 channel) is to construct the "trl" matrix from the content of the ii arrays above for each trigger, and copy this into the cfg structure used to call preprocessing.m: cfg.trl = trl; The more elegant solution in a Fieldtrip sense is to write your own trialfun, which would consist of wrapper code around the essential operations outlined above. I suggest you have a closer look at the code and documentation in preprocessing.m and definetrial.m if you decide to pursue this route. Hope this helps, Christian On 7 Feb 2007, at 17:30, Sameer Walawalkar wrote: > Thanks for the reply Robert. here's some more info. > >> Dear Sameer, >> >> Maybe you could try >> cfg = [] ; >> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >> cfg.trialdef.eventtype = '?'; >> dum = definetrial(cfg); >> and look what is printed on screen. > > evaluating trialfunction 'trialfun_general' > the following events were found in the datafile > event type: 'STI101' with event values: 5 6 7 8 > 9 11 15 16388 16391 16392 16396 > event type: 'STI301' with event values: 5.0003 5.0018 ...(many > more...) > event type: 'trial' with event values: > no trials have been defined yet, see DEFINETRIAL for further help > found 61361 events > created 0 trials > > (I address another point at the bottom of the email. I have left > the following paragraphs in for refrence) > >>> My first problem is, I should have 30 trials for this event. The >>> file >>> contains a total of 60 trials, but the other 30 are for eventtype >>> = 11 >>> So it is clearly doing something wrong. >> >>> Next, I decided to see what is in cfg.trl and I get the Nx3 >>> matrix that I find the following problems with it >>> 1> each trial should be 4000 milli seconds long. That happens here, >>> however, there seem to be overlap between trials which does not make >>> sense. This is what leads to the double counting. Thus I get 4000 >>> msec long trials bunched in group of two where the second trial >>> starts about 1000 to 1300 msecs after the beginning of the first >>> trial. >> >> Please have a look in cfg.event. >> >>> 2> If the first trial is at 8502, all subsequent trials should be in >>> increments of integral multiples of 4000 ( plus or minus a few). >>> But that does not seem to happen (and I am looking at on the >>> leading trial of the pair and discounting the trials that follow >>> 1000 msecs later.) >> >> That means that there are events detected that are not supposed to >> be there according to your knowledge of the dataset. Could it be >> that both the positive and the negative flank of the trigger are >> detected? > > > I have looked into this as it was the first thing I suspected. What > has been confusing me is that it seems to be counting the rising > flank of the correct trigger and the falling flank of the earlier > trigger, even though the event type for the earlier trigger is > different. I am looking for > cfg.trialdef.eventtype = 'STI101' and > cfg.trialdef.eventvalue = 7 or 11. > The earlier falling trigger is 5,6 or 8.9 and so should not be > considered at all. I never use STI301 > > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 9 20:35:36 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 9 Feb 2007 14:35:36 -0500 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Thanks for your email. I tried to look into trialfun_general.m file, but the one I have is only 286 lines long. I looked into preprocessing.m, just in case you meant it rather than trialfun_general.m and it is 432 lines long. sameer On Fri, 9 Feb 2007, Christian Hesse wrote: > Hi Sameer, > > thanks for the additional info and data from the STI101 channel you sent me. > > I think that the double counting of your triggers must be caused by the way > that the function "trialfun_general.m" computes the (valid) flanks for your > data format (e.g., line 467, and see all the comments in lines nearby). Using > the content of your STI101 channel (referred to as x below) I was unable to > reproduce the double counting using a slightly simpler approach: > > d = [0, diff(x)]; > ii = find((d~=0) & (x==7)); > % length(ii) gives 30 > ii = find((d~=0) & (x==11)); > % length(ii) gives 30 > > For the time being, the easiest solution (in my view, since you have the > STI101 channel) is to construct the "trl" matrix from the content of the ii > arrays above for each trigger, and copy this into the cfg structure used to > call preprocessing.m: > cfg.trl = trl; > > The more elegant solution in a Fieldtrip sense is to write your own trialfun, > which would consist of wrapper code around the essential operations outlined > above. I suggest you have a closer look at the code and documentation in > preprocessing.m and definetrial.m if you decide to pursue this route. > > Hope this helps, > Christian > > > > > > On 7 Feb 2007, at 17:30, Sameer Walawalkar wrote: > >> Thanks for the reply Robert. here's some more info. >> >>> Dear Sameer, >>> >>> Maybe you could try >>> cfg = [] ; >>> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >>> cfg.trialdef.eventtype = '?'; >>> dum = definetrial(cfg); >>> and look what is printed on screen. >> >> evaluating trialfunction 'trialfun_general' >> the following events were found in the datafile >> event type: 'STI101' with event values: 5 6 7 8 9 11 >> 15 16388 16391 16392 16396 >> event type: 'STI301' with event values: 5.0003 5.0018 ...(many >> more...) >> event type: 'trial' with event values: >> no trials have been defined yet, see DEFINETRIAL for further help >> found 61361 events >> created 0 trials >> >> (I address another point at the bottom of the email. I have left the >> following paragraphs in for refrence) >> >>>> My first problem is, I should have 30 trials for this event. The file >>>> contains a total of 60 trials, but the other 30 are for eventtype = 11 >>>> So it is clearly doing something wrong. >>> >>>> Next, I decided to see what is in cfg.trl and I get the Nx3 matrix that I >>>> find the following problems with it >>>> 1> each trial should be 4000 milli seconds long. That happens here, >>>> however, there seem to be overlap between trials which does not make >>>> sense. This is what leads to the double counting. Thus I get 4000 msec >>>> long trials bunched in group of two where the second trial starts about >>>> 1000 to 1300 msecs after the beginning of the first trial. >>> >>> Please have a look in cfg.event. >>> >>>> 2> If the first trial is at 8502, all subsequent trials should be in >>>> increments of integral multiples of 4000 ( plus or minus a few). But that >>>> does not seem to happen (and I am looking at on the leading trial of the >>>> pair and discounting the trials that follow 1000 msecs later.) >>> >>> That means that there are events detected that are not supposed to be >>> there according to your knowledge of the dataset. Could it be that both >>> the positive and the negative flank of the trigger are detected? >> >> >> I have looked into this as it was the first thing I suspected. What has >> been confusing me is that it seems to be counting the rising flank of the >> correct trigger and the falling flank of the earlier trigger, even though >> the event type for the earlier trigger is different. I am looking for >> cfg.trialdef.eventtype = 'STI101' and >> cfg.trialdef.eventvalue = 7 or 11. >> The earlier falling trigger is 5,6 or 8.9 and so should not be considered >> at all. I never use STI301 >> >> sameer >> > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > > From sameer at ANDREW.CMU.EDU Fri Feb 9 23:28:04 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 9 Feb 2007 17:28:04 -0500 Subject: binica in fieldtrip Message-ID: Hello, I am running componentanalysis.m within fieldtrip to do ICA in order to remove blinks etc. I tried using cfg.method = 'fastICA' cfg.trials = 1:100 (data has 306 channels) but got failure to converge on 19th ica and analysis was aborted. Does anyone have any ideas about dealing with this? I also tried cfg.method = 'runica' cfg.trials = 1:100 but it takes a very looooong time. Any ways around it? I know that one can implement binica in EEGLAB. It is supposed to be 12 xs faster and can use smaller memory. Can I implement cfg.method = 'binica'? in fieldtrip? thanks, sameer From s.debener at UKE.UNI-HAMBURG.DE Fri Feb 9 22:46:41 2007 From: s.debener at UKE.UNI-HAMBURG.DE (Stefan Debener) Date: Fri, 9 Feb 2007 22:46:41 +0100 Subject: binica in fieldtrip In-Reply-To: Message-ID: Dear Sameer, Try running extended infomax ICA with the PCA option switched on and a reduction to about 50 components. This should speed up the decomposition substantially, and return nice eye blink components. If you do not get dipolar-like component maps, your data may suffer from substantial head movements. Temporal ICA expects that the sensors-to-source configuration remains unchanged during recording. I have not done systematic comparisons myself, but know from others that fastICA is not necessarily that. It can be even slower that other ICA algorithms... Hope this helps, Stefan Sameer Walawalkar wrote: > Hello, > > I am running componentanalysis.m within fieldtrip to do ICA in order > to remove blinks etc. I tried using > > cfg.method = 'fastICA' > cfg.trials = 1:100 (data has 306 channels) > but got failure to converge on 19th ica and analysis was aborted. > Does anyone have any ideas about dealing with this? > > I also tried > cfg.method = 'runica' cfg.trials = 1:100 > > but it takes a very looooong time. > > Any ways around it? I know that one can implement binica in EEGLAB. It > is supposed to be 12 xs faster and can use smaller memory. > > Can I implement cfg.method = 'binica'? in fieldtrip? > > thanks, > sameer > > From sameer at ANDREW.CMU.EDU Sun Feb 11 17:40:36 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 11 Feb 2007 11:40:36 -0500 Subject: No subject Message-ID: Hi, I am interested in removing blinks and other artifacts from my MEG data. Many of these artifacts can be visually identified. And from my experience with EEGLAB and fastICA, the first 19-20 independent components in my data seem to be artifacts. After doing (from http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:use_independent_component_analysis_ica_to_remove_ecg_artifacts) comp = componentanalysis(cfg, data); what command can I use in order to visually identify which components I should remove, In other words, how do I plot the components (like in EEGlab) before I can use the command to remove the components? Finally, while trying to see the spatial topography of the signals, using >> lay = createlayout('neuromag306.lay'); gives me error ??? Undefined command/function 'createlayout' even though the createlayout.m file exists in the private folder. (I am aware this might be a matlab problem and am looking into that too.) Thanks, sameer From Jan.Schoffelen at FCDONDERS.RU.NL Mon Feb 12 08:43:23 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 12 Feb 2007 08:43:23 +0100 Subject: No subject In-Reply-To: Message-ID: Hi Sameer, To start with your last question: >Finally, while trying to see the spatial topography of the signals, >using > >> lay = createlayout('neuromag306.lay'); >gives me error > ??? Undefined command/function 'createlayout' >even though the createlayout.m file exists in the private folder. (I am >aware this might be a matlab problem and am looking into that too.) The problem you mention is probably due to the fact, that createlayout is inside the private-folder. M-files which are located within the folder which contains the private-folder, have access to the functions which are private. However, private functions cannot be accessed from the command-line. You might try copying createlayout to a location which is on your matlab-path and retry the command. >After doing (from >http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:u >se_independent_component_analysis_ica_to_remove_ecg_artifacts) > > comp = componentanalysis(cfg, data); > >what command can I use in order to visually identify which >components I should remove, In other words, how do I plot the components >(like in EEGlab) before I can use the command to remove the components? Identifying the artifactual components can be done in a variety of ways: 1 you can plot the spatial topography, as specified in comp.comp. Artifacts often have a typical topography. 2 if you recorded an ECG-channel you can compute a QRS-complex triggered average, to identify those components being ECG-like. (Or similarly, you can compute coherence between the external ECG and your components). 3 eye-movements and muscle artifacts betray themselves by their spatial topography and time course. Yours, Jan-Mathijs From Jan.Schoffelen at FCDONDERS.RU.NL Mon Feb 12 08:47:43 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 12 Feb 2007 08:47:43 +0100 Subject: binica in fieldtrip In-Reply-To: Message-ID: Hi Sameer, Everyone is greatly encouraged to implement new features into fieldtrip. As a matter, that's the whole idea behind it. I don't know what the sampling rate of your data is, but what might help to reduce computation time, is to downsample the data before doing componentanalysis, using resampledata. Typically, artifacts of interest have a frequency < 100 Hz, so downsampling to 256 Hz doesn't hurt too much. Yours again, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Friday, February 09, 2007 11:28 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] binica in fieldtrip Hello, I am running componentanalysis.m within fieldtrip to do ICA in order to remove blinks etc. I tried using cfg.method = 'fastICA' cfg.trials = 1:100 (data has 306 channels) but got failure to converge on 19th ica and analysis was aborted. Does anyone have any ideas about dealing with this? I also tried cfg.method = 'runica' cfg.trials = 1:100 but it takes a very looooong time. Any ways around it? I know that one can implement binica in EEGLAB. It is supposed to be 12 xs faster and can use smaller memory. Can I implement cfg.method = 'binica'? in fieldtrip? thanks, sameer From Jan.Schoffelen at FCDONDERS.RU.NL Mon Feb 12 08:57:28 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 12 Feb 2007 08:57:28 +0100 Subject: Frequency Analysis! In-Reply-To: Message-ID: Dear Muthuraman, For the mtmwelch-method, the same caveats apply as to the mtmconvol-method. If you specify your window to be one second, and your data is also one second (perhaps even one sample less? Did you check this, a lonely sample is easily lost), then there is nothing to welch (because your data can be only split up in one overlapping segment of one second, or even cannot be split up at all, dependent on your data: see above). In the following link you find some info how to create fieldtrippish data-objects in matlab: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:da taformats You can read in your laplacian transformed data into matlab and create a data-structure (some hints are given in the link). Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Friday, February 09, 2007 1:06 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Frequency Analysis! Hello , Thankyou JM, for the suggestions regarding the Time-Frequency Analysis, it works well now. I need the time information inorder to see what happens to the power at a specific time interval. >>From the previous discussion for the Freqanalysis_mtmwelch method as Prof.Robert as suggested i tried to change the frequency resolution to 1 Hz in the Mtmwelch method. Now i get all the values to be Nan's. cfg.foi = [2:1:30]; cfg.t_ftimwin = ones(1,length(cfg.foi)).*1; And also is there way to load the Laplacian transformed data to the Fieldtip analysis which is a .mat file and work on it for the coherence analysis. I do the laplacian transformation and the welch periodogram method with my own programs not any software. With regards M.Muthuraman. _________________________________________________________________ Catch all the cricketing action right here. Live score, match reports, photos et al. http://content.msn.co.in/Sports/Cricket/Default.aspx From c.hesse at FCDONDERS.RU.NL Mon Feb 12 09:51:07 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 12 Feb 2007 09:51:07 +0100 Subject: binica in fieldtrip In-Reply-To: Message-ID: Hi Sameer, when using any ICA algorithm in Fiieldtrip, you must, of course, specify and pass the usual algorithm control parameters, since the componentanalysis funcntion is only a wrapper. As I mentioned in a previous email, you need to do model order selection (i.e. choose the number of ICs) and often reduce the dimension of your data (usually the same as the number of ICs). For FastICA you probably also want to specify the nonlinearity and whether the components are to be estimated one by one or all together. Please see the relevant documentation in the FastICA Matlab package. With the appropriate data dimension reduction, the performance of FastICA (tanh nonlinearity and symmetric approach) and Infomax should be essentially the same, so I suggest you pick whichever method you can get to work. You may also want to try the JADE algorithm (fine if you reduce data dimension). Hope that helps, Christian On 9 Feb 2007, at 23:28, Sameer Walawalkar wrote: > Hello, > > I am running componentanalysis.m within fieldtrip to do ICA in > order to remove blinks etc. I tried using > > cfg.method = 'fastICA' > cfg.trials = 1:100 (data has 306 channels) > but got failure to converge on 19th ica and analysis was aborted. > Does anyone have any ideas about dealing with this? > > I also tried > cfg.method = 'runica' cfg.trials = 1:100 > > but it takes a very looooong time. > > Any ways around it? I know that one can implement binica in EEGLAB. > It is supposed to be 12 xs faster and can use smaller memory. > > Can I implement cfg.method = 'binica'? in fieldtrip? > > thanks, > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Mon Feb 12 17:54:40 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 12 Feb 2007 11:54:40 -0500 Subject: No subject In-Reply-To: <001801c74e79$79498860$902dae83@fcdonders.nl> Message-ID: createlayout has new problems : ??? Error using ==> createlayout could not open electrode file: neuromag306 The field trip directory contains many layout files but not the ones useful for neuromag. How does one go about making one? sameer On Mon, 12 Feb 2007, Jan Mathijs Schoffelen wrote: > Hi Sameer, > > To start with your last question: > >> Finally, while trying to see the spatial topography of the signals, >> using >> >> lay = createlayout('neuromag306.lay'); >> gives me error >> ??? Undefined command/function 'createlayout' >> even though the createlayout.m file exists in the private folder. (I am >> aware this might be a matlab problem and am looking into that too.) > > The problem you mention is probably due to the fact, that createlayout is > inside the private-folder. M-files which are located within the folder which > contains the private-folder, have access to the functions which are private. > However, private functions cannot be accessed from the command-line. You > might try copying createlayout to a location which is on your matlab-path > and retry the command. > >> After doing (from >> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:u >> se_independent_component_analysis_ica_to_remove_ecg_artifacts) >> >> comp = componentanalysis(cfg, data); >> >> what command can I use in order to visually identify which >> components I should remove, In other words, how do I plot the components >> (like in EEGlab) before I can use the command to remove the components? > > Identifying the artifactual components can be done in a variety of ways: > 1 you can plot the spatial topography, as specified in comp.comp. Artifacts > often have a typical topography. > 2 if you recorded an ECG-channel you can compute a QRS-complex triggered > average, to identify those components being ECG-like. (Or similarly, you can > compute coherence between the external ECG and your components). > 3 eye-movements and muscle artifacts betray themselves by their spatial > topography and time course. > > Yours, > > Jan-Mathijs > > From Brian.Roach at YALE.EDU Mon Feb 12 18:17:07 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Mon, 12 Feb 2007 12:17:07 -0500 Subject: sourceanalysis.m on EEG data In-Reply-To: <6.1.2.0.2.20070208122223.01e48d98@email.med.yale.edu> Message-ID: Sorry, I am a beginner in the source localization realm. I am still wondering what software to use with EEG data - we have a polhemus system, which creates a .hdm file - but is that the same type referred to in the tutorial below? Also, do this software: http://neuroimage.usc.edu/brainstorm/ interact with fieldTrip at all? Have any FieldTrip users had any experience with it? If not, where can I download the MRIviewer software mentioned in the tutorial (in the link below). thanks for any info, it is greatly appreciated! Brian At 12:25 PM 2/8/2007, Brian Roach wrote: >I am working through this tutorial on the web: > >http://www2.ru.nl/fcdonders/fieldtrip/doku.php?%20id=fieldtrip:documentation:tutorial:beamformer#plot_the_result > >I am wondering, do you only need to use MRIviewer to construct a forward >model for MEG data (and not for EEG data)? What kind of software do I >need to use to construct an .hdm file for EEG data? > >thanks! >Brian > From r.oostenveld at FCDONDERS.RU.NL Mon Feb 12 20:28:52 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 12 Feb 2007 20:28:52 +0100 Subject: generating data structure for all trials In-Reply-To: Message-ID: Hi Sameer, To add a few statements to Christians reply On 8 Feb 2007, at 18:59, Sameer Walawalkar wrote: > However, while using Fieldtrip, the first point where a MATLAB > variable > containing data is created is during trial definition at > data = preprocessing(cfg); (from online tutorial) > Trial rejections, and independent component analysis is done after > this. > > Instead I would prefer to use independent component analysis > first to > remove blinks etc, then do channels and trial rejections, and then > do the > trial definitions based on event types etc. If you do everything in FT, then you would do it like this definetrial -> preprocessing -> componentanalysis -> rejectcomponent -> freqananlysis -> sourceanalysis -> sourcestatistics and the datastructures would look like only cfg -> raw data (1) -> raw data (2) -> raw data (3) -> freq -> source -> source So the same datastructures are used multiple times, only the content slightly changes. Even if you decide not to do everything within FT, it is relevant to know that there are not that many data structures in FT and that raw data can be used in multiple fashions. Regarding the raw data above - the 1st raw data is the original. It is cut into segments, and could in principle be a single segment but that is probably not desirable for the freqanalysis later (and certainly not for statistics in the end). - the 2nd raw data consists of the component timecourses, and includes the ICA mixing matrix - the 3rd raw data is again mixed and contains channel data, but now without the artifacts Using the same raw data representation allows us to do freqanalysis or timelockanalysis on both channel-level "raw" data and on ICA-level "raw" data. I don't think that rejectcomponent is in the ftp version, please find it attached. I will also put it on the ftp server. Also have a look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:use_independent_component_analysis_ica_to_rem ove_ecg_artifacts best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: rejectcomponent.m Type: application/octet-stream Size: 3451 bytes Desc: not available URL: From werkle at MPIB-BERLIN.MPG.DE Mon Feb 12 20:39:40 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Mon, 12 Feb 2007 20:39:40 +0100 Subject: Question concerning statistics in fieldtrip Message-ID: Dear, in my PhD studies, I am working on lifespan differences on binding processes during visual perception. And for most parts of my ERP and TFR analyses, I use Fieldtrip - and it works fine. But currently, I'm a bit puzzled, how to set up appropriate statistical tests for my power and phase-locking analyses. Perhaps, I first describe my basic design: Subjects from three age-groups (factor AGE, 3 levels, between subject) performed a simple visual discrimination task, while I varied the 'amount' of visual input in three levels (factor SIZE, 3 levels, whithin subject). The data was recored from 64 electrodes. I am mainly interested in the question, whether the effect of visual stimulation changes across age-groups (AGE x SIZE interaction), and where this interaction effect is located topographically (on the scalp level). Is it in general possible, to use the statistical interface of Fieltrip (e.g. clusterrandanalysis) to estimate - in one model - mixed designs like the one decribed above (with more than three levels per factor)? If this is the case, could anyone please give me a hint how to implement it? Thank you very much for your suggestions. Best regards, Markus From r.oostenveld at FCDONDERS.RU.NL Mon Feb 12 21:01:07 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 12 Feb 2007 21:01:07 +0100 Subject: binica in fieldtrip In-Reply-To: <45CCEBC1.50708@uke.uni-hamburg.de> Message-ID: Hi Sameer On 9 Feb 2007, at 22:46, Stefan Debener wrote: > Try running extended infomax ICA with the PCA option switched on > and a reduction to about 50 components. This should speed up the > decomposition substantially, and return nice eye blink components. > If you do not get dipolar-like component maps, your data may suffer > from substantial head movements. Temporal ICA expects that the > sensors-to-source configuration remains unchanged during recording. Note that cfg.method='runica' also implements extended infomax ICA, see "help runica for details". Passing option (such as PCA- dimensionality reduction) to runica is done using the cfg.runica substructure in componentanalysis, e.g. cfg.runica.pca = 50. Since runica and binica have almost the same functionality, it was actually trivial to implement it in componentanalysis. I have just added it, you can download the latest FT version from the ftp server. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Mon Feb 12 21:10:59 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 12 Feb 2007 21:10:59 +0100 Subject: sourceanalysis.m on EEG data In-Reply-To: <6.1.2.0.2.20070212121453.01e2aa00@email.med.yale.edu> Message-ID: Hi Brian On 12 Feb 2007, at 18:17, Brian Roach wrote: > Sorry, I am a beginner in the source localization realm. I am > still wondering what software to use with EEG data - we have a > polhemus system, which creates a .hdm file - but is that the same > type referred to in the tutorial below? I am pretty sure that the hdm file from your Polhemus software is NOT the same as the hdm file generated by our CTF software. > Also, do this software: http://neuroimage.usc.edu/brainstorm/ > interact with fieldTrip at all? No, the two toolboxes do not share code. BrainStorm is probably better suited for making EEG head models (at the Donders we mainly use our MEG system if we plan to do source reconstruction). I suspect that it would not be very difficult to use a headmodel generated using BrainStorm in FT, but it will also not be trivial. > Have any FieldTrip users had any experience with it? If not, where > can I download the MRIviewer software mentioned in the tutorial (in > the link below). MRIviewer is a CTF/MEG specific software (it comes with the CTF software) and cannot be used for construction EEG head models. Instead have a look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:create_bem_headmodel_for_eeg. best regards Robert From sameer at ANDREW.CMU.EDU Mon Feb 12 21:17:58 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 12 Feb 2007 15:17:58 -0500 Subject: binica in fieldtrip In-Reply-To: <59383822-25C5-453B-A458-93FDD26135E6@fcdonders.ru.nl> Message-ID: thanks robert, and the info cfg.runica.pca = 50 was precisely what I was looking for. sameer On Mon, 12 Feb 2007, Robert Oostenveld wrote: > Hi Sameer > > On 9 Feb 2007, at 22:46, Stefan Debener wrote: >> Try running extended infomax ICA with the PCA option switched on and a >> reduction to about 50 components. This should speed up the decomposition >> substantially, and return nice eye blink components. If you do not get >> dipolar-like component maps, your data may suffer from substantial head >> movements. Temporal ICA expects that the sensors-to-source configuration >> remains unchanged during recording. > > Note that cfg.method='runica' also implements extended infomax ICA, see "help > runica for details". Passing option (such as PCA-dimensionality reduction) to > runica is done using the cfg.runica substructure in componentanalysis, e.g. > cfg.runica.pca = 50. > > Since runica and binica have almost the same functionality, it was actually > trivial to implement it in componentanalysis. I have just added it, you can > download the latest FT version from the ftp server. > > best regards, > Robert > > From maris at NICI.RU.NL Mon Feb 12 21:35:13 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 12 Feb 2007 21:35:13 +0100 Subject: Question concerning statistics in fieldtrip In-Reply-To: <45D0C27C.5000601@mpib-berlin.mpg.de> Message-ID: Dear Markus, Good to hear that you like our statistics routines. However, I'm afraid that I have to disappoint you a little bit now. Permutation test are not well suited for testing interaction effects. This is because the null hypothesis (i.e., additive effects) is a constraint on the expected values of your dependent variable, observed in the different conditions. In contrast, the null hypotheses that can be tested with a permutation test all have to be phrased in terms of equality of probability distributions in the different conditions. The closest you can get with a permutation test, is testing the effect of one independent variable (say SIZE) within the different levels of AGE. Hopefully, you will get significant effects for some levels of AGE, but not for others. This result would be a sort of nonparametric interaction. Good luck, Eric Maris > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > Markus Werkle-Bergner > Sent: Monday, February 12, 2007 8:40 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] Question concerning statistics in fieldtrip > > Dear, > > in my PhD studies, I am working on lifespan differences on binding > processes during visual perception. And for most parts of my ERP and TFR > analyses, I use Fieldtrip - and it works fine. > > But currently, I'm a bit puzzled, how to set up appropriate statistical > tests for my power and phase-locking analyses. Perhaps, I first describe > my basic design: > Subjects from three age-groups (factor AGE, 3 levels, between subject) > performed a simple visual discrimination task, while I varied the > 'amount' of visual input in three levels (factor SIZE, 3 levels, whithin > subject). The data was recored from 64 electrodes. I am mainly > interested in the question, whether the effect of visual stimulation > changes across age-groups (AGE x SIZE interaction), and where this > interaction effect is located topographically (on the scalp level). > > Is it in general possible, to use the statistical interface of Fieltrip > (e.g. clusterrandanalysis) to estimate - in one model - mixed designs > like the one decribed above (with more than three levels per factor)? If > this is the case, could anyone please give me a hint how to implement it? > > Thank you very much for your suggestions. > > Best regards, > Markus From Brian.Roach at YALE.EDU Mon Feb 12 22:32:18 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Mon, 12 Feb 2007 16:32:18 -0500 Subject: sourceanalysis.m on EEG data In-Reply-To: <2A3986A0-C8E5-40F1-8B4F-4655456BA4CA@fcdonders.ru.nl> Message-ID: Where can I find these functions listed below? % the prepare_bemmodel function is available upon request % the dipoli stand-alone executable is available upon request At 03:10 PM 2/12/2007, Robert Oostenveld wrote: >Hi Brian > >On 12 Feb 2007, at 18:17, Brian Roach wrote: >>Sorry, I am a beginner in the source localization realm. I am >>still wondering what software to use with EEG data - we have a >>polhemus system, which creates a .hdm file - but is that the same >>type referred to in the tutorial below? > >I am pretty sure that the hdm file from your Polhemus software is NOT >the same as the hdm file generated by our CTF software. > >>Also, do this software: http://neuroimage.usc.edu/brainstorm/ >>interact with fieldTrip at all? > >No, the two toolboxes do not share code. BrainStorm is probably >better suited for making EEG head models (at the Donders we mainly >use our MEG system if we plan to do source reconstruction). I suspect >that it would not be very difficult to use a headmodel generated >using BrainStorm in FT, but it will also not be trivial. > >>Have any FieldTrip users had any experience with it? If not, where >>can I download the MRIviewer software mentioned in the tutorial (in >>the link below). > >MRIviewer is a CTF/MEG specific software (it comes with the CTF >software) and cannot be used for construction EEG head models. >Instead have a look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? >id=fieldtrip:documentation:create_bem_headmodel_for_eeg. > >best regards >Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Tue Feb 13 15:09:18 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 13 Feb 2007 15:09:18 +0100 Subject: sourceanalysis.m on EEG data In-Reply-To: <6.1.2.0.2.20070212154706.04afcec0@email.med.yale.edu> Message-ID: The prepare_bemmodel function is in the zip file on the ftp server. The dipoli executable is attached to this mail. There exists only a linux i386 and an apple PPC version. You are not permitted to distribute the dipoli executable, it is not covered under the GPL license but made available courtesy of Thom Oostendorp. best regards, Robert On 12 Feb 2007, at 22:32, Brian Roach wrote: > Where can I find these functions listed below? > > % the prepare_bemmodel function is available upon request % the > dipoli stand-alone executable is available upon request -------------- next part -------------- A non-text attachment was scrubbed... Name: dipoli.zip Type: application/zip Size: 129801 bytes Desc: not available URL: -------------- next part -------------- From r.oostenveld at FCDONDERS.RU.NL Tue Feb 13 17:01:18 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 13 Feb 2007 17:01:18 +0100 Subject: bug in megrealign Message-ID: Dear FT-MEG users, I just noticed a bug in the MEGREALIGN function. I don't know how long it has been there, nor whether it affects all configurations or only whis particular one. The problem could be recognized from the output that MEGREALIGN prints on the screen: the buggy version shows original -> template RV 4128.84 % whereas the corrected version shows original -> template RV 10.32 % Also the scalp topography of the realigned ERF looked completely messy in the buggy version. The problem relates to the shift of the dipole layer on which the scalp data is projected: instead of shifting it inward with 2.5 cm, it was shifted outward and the dipoles bumped into the MEG helmet, causing weird interpolation effects. I noticed the problem when using a single-sphere headmodel fitted to the skin surface. It may be that the problem would not have as obvious for other head models, but am not sure. Maybe someone who recently used MEGREALIGN with singleshell headmodels could comment... I have made an attempt to fix it (per direct on fcdc/common, in this evening version on the ftp). Furthermore, I have now removed the default of 2.5 cm for cfg.inwardshift, since probably a lot of people are not using single-sphere headmodel fitted to the skin surface anymore. See the help of MEGREALIGN for more details. If you are unsure of wheteher it affects your results, I suggest that you rerun the megrealign part and also use the option cfg.feedback=yes (besides the default cfg.verify=yes). Note that from now on you must explicitely specify cfg.inwardshift. sorry for the inconvenience, Robert From t.schneider at UKE.UNI-HAMBURG.DE Tue Feb 13 17:26:18 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Tue, 13 Feb 2007 17:26:18 +0100 Subject: sourceanalysis.m on EEG data In-Reply-To: <60A04A24-9EC0-462D-893A-32B5E3F1563A@fcdonders.ru.nl> Message-ID: Dear Brian, I`ve worked with the prepare_bemmodel script for constructing a forward model for source localization of EEG data. Find attached a little tutorial with the steps I took for creating the BEM from an individual MRI. The plan is to put it also on the fieldtrip wiki (sooner or later). Please let me know if you have questions on this tutorial. Hope this helps, Till Robert Oostenveld schrieb: > The prepare_bemmodel function is in the zip file on the ftp server. > The dipoli executable is attached to this mail. There exists only a > linux i386 and an apple PPC version. You are not permitted to > distribute the dipoli executable, it is not covered under the GPL > license but made available courtesy of Thom Oostendorp. > > best regards, > Robert > > On 12 Feb 2007, at 22:32, Brian Roach wrote: > >> Where can I find these functions listed below? >> >> % the prepare_bemmodel function is available upon request % the >> dipoli stand-alone executable is available upon request > > -------------- next part -------------- A non-text attachment was scrubbed... Name: BEM Tutorial1.doc Type: application/msword Size: 390656 bytes Desc: not available URL: From ulla.rantakokko at TKK.FI Wed Feb 14 13:26:22 2007 From: ulla.rantakokko at TKK.FI (Ulla Rantakokko) Date: Wed, 14 Feb 2007 14:26:22 +0200 Subject: reading mat-files Message-ID: Hello all, I have tried to read in a mat-file or a fif-file. Fif-file is having problems with coilfile acceptance and also I get _________________________ ??? Invalid MEX-file 'D:\meg_pd_1.2\megmodel.dll': The specified module could not be found. ------------------------- even when the megmodel.dll exists. I would prefare to read in my preprocessed data in mat file and proceed with time-frequency analysis. However I get: ____________________ ??? Error using ==> fieldtrip-20061213\private\read_header unsupported data format Error in ==> read_fcdc_header at 37 [hdr] = read_header(varargin{:}); --------------------- even though mat files should be ok. How to give datafile and headerfile separately? Can datafile be in .mat or in .bin format ? I get "unsupported data format" from both options. in read_header.m : case 'fcdc_matbin' [path, file, ext] = fileparts(filename); headerfile = fullfile(path, [file '.mat']); datafile = fullfile(path, [file '.bin']); Thank you ulla From c.hesse at FCDONDERS.RU.NL Wed Feb 14 16:49:41 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 14 Feb 2007 16:49:41 +0100 Subject: reading mat-files In-Reply-To: <20070214142622.ghf59dugowk800oc@webmail1.tkk.fi> Message-ID: Hi Ulla, > I have tried to read in a mat-file or a fif-file. Fif-file is > having problems with coilfile acceptance and also I get > _________________________ > > ??? Invalid MEX-file 'D:\meg_pd_1.2\megmodel.dll': The specified > module could not be found. > ------------------------- > even when the megmodel.dll exists. have you added the location of the DLL to the matlab path? > I would prefare to read in my preprocessed data in mat file and > proceed with time-frequency analysis. Whether this will work, or not, depends on what software you use to preprocess your data and which format you subsequently save it in. At first glance, if you have stored your data in a mat file, then presumably it comprises various data structures, and it is unlikely that these will correspond to the data structures that Fieldtrip uses. So in this situation, you would have to convert whatever is in your mat file into FieldTrip data structures "by hand", which may or may not be possible. If you can provide more information on the content of your mat file, I may be able to say more. > However I get: > ____________________ > > ??? Error using ==> fieldtrip-20061213\private\read_header > unsupported data format > > Error in ==> read_fcdc_header at 37 > [hdr] = read_header(varargin{:}); > > --------------------- > even though mat files should be ok. > > How to give datafile and headerfile separately? > > Can datafile be in .mat or in .bin format ? > I get "unsupported data format" from both options. > > in read_header.m : > case 'fcdc_matbin' > [path, file, ext] = fileparts(filename); > headerfile = fullfile(path, [file '.mat']); > datafile = fullfile(path, [file '.bin']); > The 'fcdc_matbin" option assumes that the data header is stored in a mat file (in a suitable structure) and that the data itself is in a binary file. From your description above, I gather that this is not the format your data is in, right? You have the data in a mat file, and this is indeed not supported in FieldTrip. Depending on what kind of analysis you wish to do later on in FieldTrip, e.g. source analysis or beamforming on your time-frequency data, I would generally advise you to pre-process your data in FieldTrip as well, as this avoids all sorts of headaches and compatibility problems. I would therefore recommend focussing attention on solving the problem of reading in your raw data fif file in the first instance. Hope this helps, Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Wed Feb 14 17:07:14 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 14 Feb 2007 17:07:14 +0100 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Hi Sameer, > Thanks for your email. I tried to look into trialfun_general.m > file, but the one I have is only 286 lines long. I looked into > preprocessing.m, just in case you meant it rather than > trialfun_general.m and it is 432 lines long. It turns out that I was actually referring to the function read_event (which is called by trialfun_general) that does all the flank detection which leads to the double counting. Sorry for the mixup! I gather from your other emails about component analysis that you have managed to successfully read in all of your data, yes? Christian From muthuraman10 at HOTMAIL.COM Wed Feb 14 18:06:14 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 14 Feb 2007 17:06:14 +0000 Subject: Frequency Analysis! In-Reply-To: <005901c74e7b$72472e80$902dae83@fcdonders.nl> Message-ID: Hello , Thankyou for the suggestions! I created my own data format and i able to read in Laplacian transformed data and the result are comparable now Is there a way to calculate the significance level in fieldtrip for the coherence calculated, last time i was referred to a Jacknife variance estimate does it still exist in the fieldtrip coherence analysis, or is there any other way to calculate the significance level in Fieldtrip One more question regarding the Time frequency Analysis, i have EMG data of 24000 data points with a sampling frequeny of 800Hz(30 seconds of data). I would like to do the Timefrequency analysis for this data and to see the power for the whole 30 seconds cfg.t_ftimwin(:)=0.5; If i go for 0.5 seconds then i can go only for the time interval of interest cfg.toi=0.25:0.05:0.725; all the other values are above and below this limit are Nan's I am interested mostly on the lower frequency range from 4 hz to 15 hz, what would be the right time window if i want to look for the whole 30 seconds of data. Thanking you with regards M.Muthuraman. >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Frequency Analysis! >Date: Mon, 12 Feb 2007 08:57:28 +0100 > >Dear Muthuraman, > >For the mtmwelch-method, the same caveats apply as to the mtmconvol-method. >If you specify your window to be one second, and your data is also one >second (perhaps even one sample less? Did you check this, a lonely sample >is >easily lost), then there is nothing to welch (because your data can be only >split up in one overlapping segment of one second, or even cannot be split >up at all, dependent on your data: see above). > >In the following link you find some info how to create fieldtrippish >data-objects in matlab: > >http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:da >taformats > >You can read in your laplacian transformed data into matlab and create a >data-structure (some hints are given in the link). > >Yours, > >Jan-Mathijs > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Friday, February 09, 2007 1:06 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: [FIELDTRIP] Frequency Analysis! > >Hello , > >Thankyou JM, for the suggestions regarding the Time-Frequency Analysis, it >works well now. I need the time information inorder to see what happens to >the power at a specific time interval. > >>From the previous discussion for the Freqanalysis_mtmwelch method as >Prof.Robert as suggested i tried to change the frequency resolution to 1 Hz >in the Mtmwelch method. Now i get all the values to be Nan's. > >cfg.foi = [2:1:30]; >cfg.t_ftimwin = ones(1,length(cfg.foi)).*1; > >And also is there way to load the Laplacian transformed data to the >Fieldtip > >analysis which is a .mat file and work on it for the coherence analysis. I >do the laplacian transformation and the welch periodogram method with my >own > >programs not any software. > >With regards >M.Muthuraman. > >_________________________________________________________________ >Catch all the cricketing action right here. Live score, match reports, >photos et al. http://content.msn.co.in/Sports/Cricket/Default.aspx _________________________________________________________________ Crave for a healthier lifestyle? Ask an expert http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm From sghosh at HSS.IITD.AC.IN Thu Feb 15 14:00:34 2007 From: sghosh at HSS.IITD.AC.IN (Shantanu Ghosh) Date: Thu, 15 Feb 2007 14:00:34 +0100 Subject: electrodes coordinates? Message-ID: Dear all: What do the columns in biosemi32.lay signify? I guess they are place coordinates for electrodes, except the first and last columns, but do not know which column is what. can anybody help? thanks. -Shantanu From ingrid.nieuwenhuis at FCDONDERS.RU.NL Thu Feb 15 14:25:26 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Thu, 15 Feb 2007 14:25:26 +0100 Subject: electrodes coordinates? In-Reply-To: Message-ID: Dear Shantanu, You can find this at the fieldtrip homepage, documentation -> frequently asked questions. See: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:fr equently_asked_questions Ciao Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Shantanu Ghosh Sent: Thursday, February 15, 2007 2:01 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] electrodes coordinates? Dear all: What do the columns in biosemi32.lay signify? I guess they are place coordinates for electrodes, except the first and last columns, but do not know which column is what. can anybody help? thanks. -Shantanu From c.hesse at FCDONDERS.RU.NL Thu Feb 15 14:28:49 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Thu, 15 Feb 2007 14:28:49 +0100 Subject: electrodes coordinates? In-Reply-To: Message-ID: Hi Shantanu, The 1st column is the channel number in the layout file, it is not used any more. The 2nd and 3rd are the X-position and Y-position. The 4th and 5th column specify the with and height of the subplot that will be made in multiplotER and multiplotTFR. The 5th column is a string with the channel label. Cheers, Christian On 15 Feb 2007, at 14:00, Shantanu Ghosh wrote: > Dear all: > What do the columns in biosemi32.lay signify? I guess they are place > coordinates for electrodes, except the first and last columns, but > do not > know which column is what. can anybody help? > thanks. > -Shantanu > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at YAHOO.COM Thu Feb 15 17:32:17 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Thu, 15 Feb 2007 08:32:17 -0800 Subject: environment needed for meg-pd In-Reply-To: Message-ID: Hi, experts, I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment. The error showed as: Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. The specified module could not be found. The true is the .dll is in the same path as .m and the path has been add the Matlab. I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. Please help me. Thanks. Best, Eve --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Thu Feb 15 18:35:30 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 15 Feb 2007 12:35:30 -0500 Subject: environment needed for meg-pd In-Reply-To: <20070215163217.33486.qmail@web51409.mail.yahoo.com> Message-ID: use linux environment with 32 bit architecture. sameer On Thu, 15 Feb 2007, alotof eve wrote: > Hi, experts, > > I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment. > The error showed as: > Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. > The specified module could not be found. > > The true is the .dll is in the same path as .m and the path has been add the Matlab. > I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. > > Please help me. Thanks. > > Best, > Eve > > > --------------------------------- > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. From sameer at ANDREW.CMU.EDU Thu Feb 15 23:12:35 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 15 Feb 2007 17:12:35 -0500 Subject: too many trials/overlapping trials In-Reply-To: <4625E8A1-318C-4292-A901-6B2027508936@fcdonders.ru.nl> Message-ID: Hello Christian, Thanks for your email and sorry for the late reply. I was hoping to reply positively... But, no, I havn't been able to read all my dta properly into fieldtrip. I was asking about the other questions becasue I knew I would be facing them soon. I don't quite understand the whole pading issue in read_event. So I am trying to write my own code to generate cfg.trl. That I think will be much easier. sameer On Wed, 14 Feb 2007, Christian Hesse wrote: > Hi Sameer, > >> Thanks for your email. I tried to look into trialfun_general.m file, but >> the one I have is only 286 lines long. I looked into preprocessing.m, just >> in case you meant it rather than trialfun_general.m and it is 432 lines >> long. > > It turns out that I was actually referring to the function read_event (which > is called by trialfun_general) that does all the flank detection which leads > to the double counting. Sorry for the mixup! > > I gather from your other emails about component analysis that you have > managed to successfully read in all of your data, yes? > > Christian > > From c.hesse at FCDONDERS.RU.NL Fri Feb 16 17:59:00 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 16 Feb 2007 17:59:00 +0100 Subject: environment needed for meg-pd In-Reply-To: <20070215163217.33486.qmail@web51409.mail.yahoo.com> Message-ID: Hi Eve, you should be able to use the meg-pd toolbox (also from FieldTrip) in Matlab under Windows. I got the toolbox to work in Matlab7 under WindowsXP as follows: - extract the meg-pd-1.2-10.mswin.zip file to somewhere - then copy (or move) the meg_pd_1.2 directory wherever you want - in the README file in the meg-pd-1.2-10.mswin directory it specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin\lib \i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of Matlab on your system, in my case this was the directory "MATLAB71\bin \win32" - start up Matlab, add the fieldtrip and meg_pd_1.2 directories to your path and try to read your .fif file Let me know if this works on your Windows system Regards, Christian On 15 Feb 2007, at 17:32, alotof eve wrote: > Hi, experts, > > I am a new user of fieldtrip. I try to use meg-pd package to > import NeuroMag data but it seems there is something wrong with the > environment. > The error showed as: > Unable to load mex file: F:\MATLAB6p5\toolbox > \fieldtrip-20070213\meg_pd_1.2\loadfif.dll. > The specified module could not be found. > > The true is the .dll is in the same path as .m and the path > has been add the Matlab. > I use Latlab 6.5 under WindowXP. I don't know if it affects. > I saw the "lib" in the same meg-pd package included a .dll for pc- > cygwin. I wonder if I have to use Matlab under Linux/Unix > environment. Or if any other limits. > > Please help me. Thanks. > > Best, > Eve > > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 16 18:12:35 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 16 Feb 2007 12:12:35 -0500 Subject: too many trials Message-ID: Hello, I am close to fixing the problem with too many trials, principaly by writing another function which takes the cfg output from definetrial, discards the trial definitions in cfg.trl and replaces it with the correct set based on my reading the trigger channel. But I have left cfg.event untouched. My question is, for the proper working of DICS (and other processing) once the trials have been defined, do I have to make any changes to cfg.event at all or I could proceed. sameer From alotof_xd at YAHOO.COM Fri Feb 16 20:13:46 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Fri, 16 Feb 2007 11:13:46 -0800 Subject: environment needed for meg-pd In-Reply-To: Message-ID: Hi Christian, Yes it works. Thank you so much. But now I met a new problem. I got only a whole .fif data. When I tried the command "MEGMODEL", it said any argument can be left out. However, the error showed up again: >> MEGMODEL ??? Could not load the coil files Error in ==> F:\MATLAB6p5\bin\win32\megmodel.dll I couldn't find any .fif file like Neuromag-122 or coilfile.fif. How do you settle it? Thanks. Best, Eve Christian Hesse wrote: Hi Eve, you should be able to use the meg-pd toolbox (also from FieldTrip) in Matlab under Windows. I got the toolbox to work in Matlab7 under WindowsXP as follows: - extract the meg-pd-1.2-10.mswin.zip file to somewhere - then copy (or move) the meg_pd_1.2 directory wherever you want - in the README file in the meg-pd-1.2-10.mswin directory it specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin\lib\i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of Matlab on your system, in my case this was the directory "MATLAB71\bin\win32" - start up Matlab, add the fieldtrip and meg_pd_1.2 directories to your path and try to read your .fif file Let me know if this works on your Windows system Regards, Christian On 15 Feb 2007, at 17:32, alotof eve wrote: Hi, experts, I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment. The error showed as: Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. The specified module could not be found. The true is the .dll is in the same path as .m and the path has been add the Matlab. I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. Please help me. Thanks. Best, Eve --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 16 21:46:04 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 16 Feb 2007 15:46:04 -0500 Subject: .lay layout file for neuromag 306 channels Message-ID: Hi, As I had written some time ago, I could not find a .lay file which would be useful for neuromag 306 (there is a NM122.lay file there). Is there some way around this? sameer From alotof_xd at YAHOO.COM Sat Feb 17 21:03:31 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Sat, 17 Feb 2007 12:03:31 -0800 Subject: MEGMODEL Message-ID: Hi, experts, Maybe I misunderstood the command. My MEG data is from NeuroMag 306 channels. Does that mean I should use "Neuromag-306" as argument? Thanks for any suggestion. Best, Eve alotof eve wrote: Hi Christian, Yes it works. Thank you so much. But now I met a new problem. I got only a whole .fif data. When I tried the command "MEGMODEL", it said any argument can be left out. However, the error showed up again: >> MEGMODEL ??? Could not load the coil files Error in ==> F:\MATLAB6p5\bin\win32\megmodel.dll I couldn't find any .fif file like Neuromag-122 or coilfile.fif. How do you settle it? Thanks. Best, Eve Christian Hesse wrote: Hi Eve, you should be able to use the meg-pd toolbox (also from FieldTrip) in Matlab under Windows. I got the toolbox to work in Matlab7 under WindowsXP as follows: - extract the meg-pd-1.2-10.mswin.zip file to somewhere - then copy (or move) the meg_pd_1.2 directory wherever you want - in the README file in the meg-pd-1.2-10.mswin directory it specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin\lib\i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of Matlab on your system, in my case this was the directory "MATLAB71\bin\win32" - start up Matlab, add the fieldtrip and meg_pd_1.2 directories to your path and try to read your .fif file Let me know if this works on your Windows system Regards, Christian On 15 Feb 2007, at 17:32, alotof eve wrote: Hi, experts, I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment. The error showed as: Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. The specified module could not be found. The true is the .dll is in the same path as .m and the path has been add the Matlab. I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. Please help me. Thanks. Best, Eve --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. --------------------------------- No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Sun Feb 18 12:23:49 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Sun, 18 Feb 2007 12:23:49 +0100 Subject: too many trials In-Reply-To: Message-ID: Hi Sameer, On 16 Feb 2007, at 18:12, Sameer Walawalkar wrote: > I am close to fixing the problem with too many trials, principaly > by writing another function which takes the cfg output from > definetrial, discards the trial definitions in cfg.trl and replaces > it with the correct set based on my reading the trigger channel. What you have done is that you have created your own 'trialfun'. That is perfectly acceptable, and actually FT is explicitely designed to support that. See also http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:tutorial:preprocessing at the bottom for an example. Another example is at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:detect_the_muscle_activity_in_an_emg_channel_ and_use_that_as_trial_definition In custom trialfuns, people can use whatever they want to make the "trl" structure, and use read_fcdc_event of they wish or not. You can still use definetrial by cfg.trialfun = 'your_function' Actually the default is cfg.trialfun = 'trialfun_general' and trialfun_general is using the data-independent read_fcdc_event. Feel free to add your trialfun to the example matlab scripts section on the documentation wiki. > But I have left cfg.event untouched. > My question is, for the proper working of DICS (and other > processing) once the trials have been defined, do I have to make > any changes to cfg.event at all or I could proceed. cfg.event is only stored for later reference by yourself. Other FT functions (except for "recodeevent", which is not included in the ftp version sofar) do not use it. Robert From sameer at ANDREW.CMU.EDU Sun Feb 18 16:53:01 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 18 Feb 2007 10:53:01 -0500 Subject: too many trials In-Reply-To: <2B82FF0A-252E-4C21-B7F7-3C4AA31D5272@fcdonders.ru.nl> Message-ID: thanks Robert, I managed to do ICA for the data, but runica, fastica and jader gave errors. Varimax finally worked. jader: ??? Error using ==> zeros Product of dimensions is greater than maximum integer. Error in ==> jader at 90 CM = zeros(m,m*nbcm); % Storage for cumulant matrices Error in ==> componentanalysis at 323 weights = jader(dat); fastica: Calculating covariance... ??? Error using ==> componentanalysis call to fastica failed runica: step 60 - lrate 0.000000, wchange 69.06649297, angledelta 99.6 deg runica(): QUITTING - weight matrix may not be invertible! ??? Error using ==> mtimes Inner matrix dimensions must agree. Error in ==> componentanalysis at 394 comp.trial{trial} = weights * sphere * data.trial{trial}; Do these errors tell you anything about the data? Finally, I really need to know (do I) about the .lay file to be used for neuromag 306 data to see the independent components. I have asked about this two or three times in earlier emails. thanks, sameer On Sun, 18 Feb 2007, Robert Oostenveld wrote: > Hi Sameer, > > On 16 Feb 2007, at 18:12, Sameer Walawalkar wrote: >> I am close to fixing the problem with too many trials, principaly by >> writing another function which takes the cfg output from definetrial, >> discards the trial definitions in cfg.trl and replaces it with the correct >> set based on my reading the trigger channel. > > What you have done is that you have created your own 'trialfun'. That is > perfectly acceptable, and actually FT is explicitely designed to support > that. See also http://www2.ru.nl/fcdonders/fieldtrip/doku.php? > id=fieldtrip:documentation:tutorial:preprocessing at the bottom for an > example. Another example is at > http://www2.ru.nl/fcdonders/fieldtrip/doku.php? > id=fieldtrip:documentation:detect_the_muscle_activity_in_an_emg_channel_ > and_use_that_as_trial_definition > > In custom trialfuns, people can use whatever they want to make the "trl" > structure, and use read_fcdc_event of they wish or not. > > You can still use definetrial by > cfg.trialfun = 'your_function' > Actually the default is > cfg.trialfun = 'trialfun_general' > and trialfun_general is using the data-independent read_fcdc_event. Feel free > to add your trialfun to the example matlab scripts section on the > documentation wiki. > >> But I have left cfg.event untouched. >> My question is, for the proper working of DICS (and other processing) once >> the trials have been defined, do I have to make any changes to cfg.event at >> all or I could proceed. > > cfg.event is only stored for later reference by yourself. Other FT functions > (except for "recodeevent", which is not included in the ftp version sofar) do > not use it. > > Robert > > From c.hesse at FCDONDERS.RU.NL Mon Feb 19 09:18:00 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 19 Feb 2007 09:18:00 +0100 Subject: MEGMODEL In-Reply-To: <15180.61475.qm@web51411.mail.yahoo.com> Message-ID: Hi Eve, FieldTrip handles (pretty much) all function calls to the meg-pd toolbox for you (in particular which are the appropriate input arguments to use) so you don't have to deal with these issues yourself. See if you can extract the header information and some data from your .fif file using filename = "fullpath/name.fif" hdr = read_fcdc_header(filename); % hdr should be a structure dat = read_fcdc_data(filename); % dat should be a nchan x nsamp matrix see what you get. Regards, Christian On 17 Feb 2007, at 21:03, alotof eve wrote: > Hi, experts, > > Maybe I misunderstood the command. My MEG data is from NeuroMag > 306 channels. Does that mean I should use "Neuromag-306" as > argument? Thanks for any suggestion. > > Best, > Eve > > > alotof eve wrote: > Hi Christian, > > Yes it works. Thank you so much. > But now I met a new problem. I got only a whole .fif data. When > I tried the command "MEGMODEL", it said any argument can be left > out. However, the error showed up again: > >> MEGMODEL > ??? Could not load the coil files > > Error in ==> F:\MATLAB6p5\bin\win32\megmodel.dll > > I couldn't find any .fif file like Neuromag-122 or coilfile.fif. > How do you settle it? > Thanks. > > Best, > Eve > > Christian Hesse wrote: > Hi Eve, > > you should be able to use the meg-pd toolbox (also from FieldTrip) > in Matlab under Windows. I got the toolbox to work in Matlab7 under > WindowsXP as follows: > > - extract the meg-pd-1.2-10.mswin.zip file to somewhere > - then copy (or move) the meg_pd_1.2 directory wherever you want > - in the README file in the meg-pd-1.2-10.mswin directory it > specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin > \lib\i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of > Matlab on your system, in my case this was the directory "MATLAB71 > \bin\win32" > - start up Matlab, add the fieldtrip and meg_pd_1.2 directories to > your path and try to read your .fif file > > Let me know if this works on your Windows system > > Regards, > Christian > > > On 15 Feb 2007, at 17:32, alotof eve wrote: > >> Hi, experts, >> >> I am a new user of fieldtrip. I try to use meg-pd package to >> import NeuroMag data but it seems there is something wrong with >> the environment. >> The error showed as: >> Unable to load mex file: F:\MATLAB6p5\toolbox >> \fieldtrip-20070213\meg_pd_1.2\loadfif.dll. >> The specified module could not be found. >> >> The true is the .dll is in the same path as .m and the path >> has been add the Matlab. >> I use Latlab 6.5 under WindowXP. I don't know if it affects. >> I saw the "lib" in the same meg-pd package included a .dll for pc- >> cygwin. I wonder if I have to use Matlab under Linux/Unix >> environment. Or if any other limits. >> >> Please help me. Thanks. >> >> Best, >> Eve >> >> TV dinner still cooling? >> Check out "Tonight's Picks" on Yahoo! TV. > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > > > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. > > > No need to miss a message. Get email on-the-go > with Yahoo! Mail for Mobile. Get started. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Mon Feb 19 09:18:53 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 19 Feb 2007 09:18:53 +0100 Subject: .lay layout file for neuromag 306 channels In-Reply-To: Message-ID: Hi Sameer, please have a look at the FT (in fieldtrip/private) function "createlayout.m" (in the fieldtrip/private directory) which should be able to create a layout for your Neuromag306 data on the fly. The function takes a structure containing gradiometer information as input. If you read in your data using "preprocessing.m" then the gradiometer info will be contained in a field called data.grad. Hope this helps, Christian On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: > Hi, > > As I had written some time ago, I could not find a .lay file which > would be useful for neuromag 306 (there is a NM122.lay file there). > > Is there some way around this? > > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at HOTMAIL.COM Mon Feb 19 11:23:27 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 19 Feb 2007 10:23:27 +0000 Subject: Time Frequency Analysis! In-Reply-To: <005901c74e7b$72472e80$902dae83@fcdonders.nl> Message-ID: Hello Fieldtrippers, One more question regarding the Time frequency Analysis, i have EMG data of 24000 data points with a sampling frequeny of 800Hz(30 seconds of continous data). I would like to do the Timefrequency analysis for this data and to see the power for the whole 30 seconds cfg.t_ftimwin(:)=0.5; If i go for 0.5 seconds then i can go only for the time interval of interest cfg.toi=0.25:0.05:0.725; all the other values are above and below this limit are Nan's I am interested mostly on the lower frequency range from 4 hz to 15 hz, what would be the right time window if i want to look for the continous 30 seconds of data. Thanking you with regards M.Muthuraman _________________________________________________________________ Latest updates from the world of sports http://content.msn.co.in/Sports/Default From c.hesse at FCDONDERS.RU.NL Mon Feb 19 11:56:19 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 19 Feb 2007 11:56:19 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Hi Muthuraman, > One more question regarding the Time frequency Analysis, i have EMG > data of 24000 data points with a sampling frequeny of 800Hz(30 > seconds of continous data). I would like to do the Timefrequency > analysis for this data and to see the power for the whole 30 seconds use preprocessing to get the EMG data into a single 30s trial (if you want to analyze the rectified EMG, then do the rectification in preprocessing), then use frequanalysis with cfg.method = 'mtmfft'; cfg.output = 'pow'; this should give you the power spectrum of your EMG data over the entire 30 second period. Regards, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at HOTMAIL.COM Mon Feb 19 12:52:25 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 19 Feb 2007 11:52:25 +0000 Subject: Time Frequency Analysis! In-Reply-To: <25799ED0-47CF-4D9C-8852-D18E0BD0CDC1@fcdonders.ru.nl> Message-ID: Hello, Thanks for the suggestion but using the mtmfft which i have done already and it works, my interest now is that i would like to use the Time frequency analysis 'mtmconvol' to estimate the power in the time frequency scale, in which how to get the whole 30secs continous data in one time frequency plot(TFR). Thanking you with regards M.Muthuraman. >From: Christian Hesse >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Mon, 19 Feb 2007 11:56:19 +0100 > >Hi Muthuraman, > >>One more question regarding the Time frequency Analysis, i have EMG data >>of 24000 data points with a sampling frequeny of 800Hz(30 seconds of >>continous data). I would like to do the Timefrequency analysis for this >>data and to see the power for the whole 30 seconds > >use preprocessing to get the EMG data into a single 30s trial (if you want >to analyze the rectified EMG, then do the rectification in preprocessing), >then use frequanalysis with > >cfg.method = 'mtmfft'; >cfg.output = 'pow'; > >this should give you the power spectrum of your EMG data over the entire >30 second period. > >Regards, >Christian > > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > _________________________________________________________________ Tried the new MSN Messenger? It�s cool! Download now. http://messenger.msn.com/Download/Default.aspx?mkt=en-in From c.hesse at FCDONDERS.RU.NL Mon Feb 19 13:12:03 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 19 Feb 2007 13:12:03 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Hi Muthuraman, ok, in that case you can try the following (this assumes you have windows of length "winlen" which overlap by "halfwin = winlen/2") winlen = 0.5; % this is in seconds you can also use another time window halfwin = winlen/2; % the total number of windows covering the 30 second period nwin = 2.*(30./winlen) - 1; cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.t_ftimwin = ones(1,nwin).*winlen; cfg.toi = [0:halfwin:30-winlen]; The important things here to check are 1) that cfg.t_ftimwin and cfg.toi contain the same number of elements 2) the times you specify in cfg.toi actually correspond to your time axis (i.e. do not start before or go on after). If you want to use a different overlap, you need to calculate nwin slightly differently. Hope this helps more, Christian > Thanks for the suggestion but using the mtmfft which i have done > already and it works, my interest now is that i would like to use > the Time frequency analysis 'mtmconvol' to estimate the power in > the time frequency scale, in which how to get the whole 30secs > continous data in one time frequency plot(TFR). > > Thanking you > > with regards > M.Muthuraman. > >> From: Christian Hesse >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> Date: Mon, 19 Feb 2007 11:56:19 +0100 >> >> Hi Muthuraman, >> >>> One more question regarding the Time frequency Analysis, i have >>> EMG data of 24000 data points with a sampling frequeny of 800Hz >>> (30 seconds of continous data). I would like to do the >>> Timefrequency analysis for this data and to see the power for >>> the whole 30 seconds >> >> use preprocessing to get the EMG data into a single 30s trial (if >> you want to analyze the rectified EMG, then do the rectification >> in preprocessing), then use frequanalysis with >> >> cfg.method = 'mtmfft'; >> cfg.output = 'pow'; >> >> this should give you the power spectrum of your EMG data over the >> entire 30 second period. >> >> Regards, >> Christian >> >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> > > _________________________________________________________________ > Tried the new MSN Messenger? It’s cool! Download now. http:// > messenger.msn.com/Download/Default.aspx?mkt=en-in > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From Daria.Osipova at FCDONDERS.RU.NL Mon Feb 19 16:31:29 2007 From: Daria.Osipova at FCDONDERS.RU.NL (Daria Osipova) Date: Mon, 19 Feb 2007 16:31:29 +0100 Subject: .lay layout file for neuromag 306 channels In-Reply-To: Message-ID: Hi Attached are 306-channel Neuromag layout files (also for magnetometers and gradiometers separately). Cheers, Dasha _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Christian Hesse Sent: Monday, February 19, 2007 9:19 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels Hi Sameer, please have a look at the FT (in fieldtrip/private) function "createlayout.m" (in the fieldtrip/private directory) which should be able to create a layout for your Neuromag306 data on the fly. The function takes a structure containing gradiometer information as input. If you read in your data using "preprocessing.m" then the gradiometer info will be contained in a field called data.grad. Hope this helps, Christian On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: Hi, As I had written some time ago, I could not find a .lay file which would be useful for neuromag 306 (there is a NM122.lay file there). Is there some way around this? sameer ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306all.lay Type: application/octet-stream Size: 14476 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306mag.lay Type: application/octet-stream Size: 5027 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306planar.lay Type: application/octet-stream Size: 9638 bytes Desc: not available URL: From sameer at ANDREW.CMU.EDU Mon Feb 19 18:23:48 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 19 Feb 2007 12:23:48 -0500 Subject: .lay layout file for neuromag 306 channels In-Reply-To: <004e01c7543b$06f4f930$032dae83@fcdonders.nl> Message-ID: Thanks Dasha for the files, though I learned from Christaian's email and further studying createlayout that if the appropriate layout files do not exist, createlayout can be used to create them. But now I am getting an error which I dont understand. topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) ??? Error using ==> topoplot Flag arguments must be strings While trying to understand this error, I realized that in the topoplot.m file function [handle] = topoplot(varargin) handle is never assigned a value.... best, sameer On Mon, 19 Feb 2007, Daria Osipova wrote: > Hi > > Attached are 306-channel Neuromag layout files (also for magnetometers and > gradiometers separately). > > Cheers, > > Dasha > > > > > > _____ > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Christian Hesse > Sent: Monday, February 19, 2007 9:19 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels > > > > Hi Sameer, > > > > please have a look at the FT (in fieldtrip/private) function > "createlayout.m" (in the fieldtrip/private directory) which should be able > to create a layout for your Neuromag306 data on the fly. The function takes > a structure containing gradiometer information as input. If you read in your > data using "preprocessing.m" then the gradiometer info will be contained in > a field called data.grad. > > > > Hope this helps, > > Christian > > > > > > > > On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: > > > > > > Hi, > > > > As I had written some time ago, I could not find a .lay file which would be > useful for neuromag 306 (there is a NM122.lay file there). > > > > Is there some way around this? > > > > sameer > > > > > > ---------------------------------------------------------------------- > > Christian Hesse, PhD, MIEEE > > > > F.C. Donders Centre for Cognitive Neuroimaging > > P.O. Box 9101 > > NL-6500 HB Nijmegen > > The Netherlands > > > > Tel.: +31 (0)24 36 68293 > > Fax: +31 (0)24 36 10989 > > > > Email: c.hesse at fcdonders.ru.nl > > Web: www.fcdonders.ru.nl > > ---------------------------------------------------------------------- > > > > > > > > > > > > From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Feb 19 18:55:23 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 19 Feb 2007 18:55:23 +0100 Subject: .lay layout file for neuromag 306 channels In-Reply-To: Message-ID: Hi Sameer, I might be able to help, but could you specify a bit more what you did? So which topoplot did you call, and what was your cfg? And what are the fields in your data that you want to plot? Best, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Monday, February 19, 2007 6:24 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels Thanks Dasha for the files, though I learned from Christaian's email and further studying createlayout that if the appropriate layout files do not exist, createlayout can be used to create them. But now I am getting an error which I dont understand. topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) ??? Error using ==> topoplot Flag arguments must be strings While trying to understand this error, I realized that in the topoplot.m file function [handle] = topoplot(varargin) handle is never assigned a value.... best, sameer On Mon, 19 Feb 2007, Daria Osipova wrote: > Hi > > Attached are 306-channel Neuromag layout files (also for magnetometers and > gradiometers separately). > > Cheers, > > Dasha > > > > > > _____ > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Christian Hesse > Sent: Monday, February 19, 2007 9:19 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels > > > > Hi Sameer, > > > > please have a look at the FT (in fieldtrip/private) function > "createlayout.m" (in the fieldtrip/private directory) which should be able > to create a layout for your Neuromag306 data on the fly. The function takes > a structure containing gradiometer information as input. If you read in your > data using "preprocessing.m" then the gradiometer info will be contained in > a field called data.grad. > > > > Hope this helps, > > Christian > > > > > > > > On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: > > > > > > Hi, > > > > As I had written some time ago, I could not find a .lay file which would be > useful for neuromag 306 (there is a NM122.lay file there). > > > > Is there some way around this? > > > > sameer > > > > > > ---------------------------------------------------------------------- > > Christian Hesse, PhD, MIEEE > > > > F.C. Donders Centre for Cognitive Neuroimaging > > P.O. Box 9101 > > NL-6500 HB Nijmegen > > The Netherlands > > > > Tel.: +31 (0)24 36 68293 > > Fax: +31 (0)24 36 10989 > > > > Email: c.hesse at fcdonders.ru.nl > > Web: www.fcdonders.ru.nl > > ---------------------------------------------------------------------- > > > > > > > > > > > > From sameer at ANDREW.CMU.EDU Mon Feb 19 19:31:28 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 19 Feb 2007 13:31:28 -0500 Subject: .lay layout file for neuromag 306 channels In-Reply-To: <002701c7544f$20d49220$642dae83@fcdonders.nl> Message-ID: Hello Ingrid, Thanks for your email. Here is some info which might help you. lay = prj: [307x2 double] box: [307x2 double] label: {307x1 cell} compRR_orig = fsample: 1000 time: {1x30 cell} trial: {1x30 cell} label: {307x1 cell} topolabel: {307x1 cell} topo: [307x307 double] cfg: [1x1 struct] The command I used was topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) so my cfg was essentially cfg = []; I am not sure what you mean by which topoplot. The vector compRR_orig contains independent components calculated by componentanalysis.m; maybe this helps. thanks, sameer On Mon, 19 Feb 2007, Ingrid Nieuwenhuis wrote: > Hi Sameer, > > I might be able to help, but could you specify a bit more what you did? So > which topoplot did you call, and what was your cfg? And what are the fields > in your data that you want to plot? > > Best, > Ingrid > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Sameer Walawalkar > Sent: Monday, February 19, 2007 6:24 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels > > Thanks Dasha for the files, though I learned from Christaian's email and > further studying createlayout that if the appropriate layout files do not > exist, createlayout can be used to create them. > > But now I am getting an error which I dont understand. > > topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) > ??? Error using ==> topoplot > Flag arguments must be strings > > > While trying to understand this error, I realized that in the topoplot.m > file > > function [handle] = topoplot(varargin) > > handle is never assigned a value.... > > > best, > sameer > > > > > > > > > > > > On Mon, 19 Feb 2007, Daria Osipova wrote: > >> Hi >> >> Attached are 306-channel Neuromag layout files (also for magnetometers and >> gradiometers separately). >> >> Cheers, >> >> Dasha >> >> >> >> >> >> _____ >> >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf >> Of Christian Hesse >> Sent: Monday, February 19, 2007 9:19 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels >> >> >> >> Hi Sameer, >> >> >> >> please have a look at the FT (in fieldtrip/private) function >> "createlayout.m" (in the fieldtrip/private directory) which should be able >> to create a layout for your Neuromag306 data on the fly. The function > takes >> a structure containing gradiometer information as input. If you read in > your >> data using "preprocessing.m" then the gradiometer info will be contained > in >> a field called data.grad. >> >> >> >> Hope this helps, >> >> Christian >> >> >> >> >> >> >> >> On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: >> >> >> >> >> >> Hi, >> >> >> >> As I had written some time ago, I could not find a .lay file which would > be >> useful for neuromag 306 (there is a NM122.lay file there). >> >> >> >> Is there some way around this? >> >> >> >> sameer >> >> >> >> >> >> ---------------------------------------------------------------------- >> >> Christian Hesse, PhD, MIEEE >> >> >> >> F.C. Donders Centre for Cognitive Neuroimaging >> >> P.O. Box 9101 >> >> NL-6500 HB Nijmegen >> >> The Netherlands >> >> >> >> Tel.: +31 (0)24 36 68293 >> >> Fax: +31 (0)24 36 10989 >> >> >> >> Email: c.hesse at fcdonders.ru.nl >> >> Web: www.fcdonders.ru.nl >> >> ---------------------------------------------------------------------- >> >> >> >> >> >> >> >> >> >> >> >> > > From r.oostenveld at FCDONDERS.RU.NL Mon Feb 19 20:41:54 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 19 Feb 2007 20:41:54 +0100 Subject: .lay layout file for neuromag 306 channels In-Reply-To: Message-ID: On 19 Feb 2007, at 19:31, Sameer Walawalkar wrote: >> topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo >> (:,1)) >> ??? Error using ==> topoplot >> Flag arguments must be strings I suspect that you are mixing up EEGLAB and FieldTrip. >> cd ~/matlab/fieldtrip >> topoplot([], randn(100,1), randn(100,1), randn(100,1)) ??? Error using ==> topoplot When four input arguments are supplied, the following syntax should be used: topoplot(cfg,X,Y,datavector); >> cd ~/matlab/eeglab/functions >> topoplot([], randn(100,1), randn(100,1), randn(100,1)) ??? Error using ==> topoplot Flag arguments must be strings Your error corresponds with the EEGLAB one. Note that the FT version wants the first argument as a struct, so you cannot specify []. I will fix the empty input struct. For the moment you can do cfg.dummy= [] to make a structure of the cfg and the example above will work. Robert From sameer at ANDREW.CMU.EDU Mon Feb 19 21:01:19 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 19 Feb 2007 15:01:19 -0500 Subject: .lay layout file for neuromag 306 channels In-Reply-To: <6106EC24-4112-4648-937F-0FE91CC44DC1@fcdonders.ru.nl> Message-ID: thanks, It works. sameer On Mon, 19 Feb 2007, Robert Oostenveld wrote: > On 19 Feb 2007, at 19:31, Sameer Walawalkar wrote: >>> topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) >>> ??? Error using ==> topoplot >>> Flag arguments must be strings > > I suspect that you are mixing up EEGLAB and FieldTrip. > >>> cd ~/matlab/fieldtrip >>> topoplot([], randn(100,1), randn(100,1), randn(100,1)) > ??? Error using ==> topoplot > When four input arguments are supplied, the following syntax should be used: > topoplot(cfg,X,Y,datavector); > >>> cd ~/matlab/eeglab/functions >>> topoplot([], randn(100,1), randn(100,1), randn(100,1)) > ??? Error using ==> topoplot > Flag arguments must be strings > > Your error corresponds with the EEGLAB one. Note that the FT version wants > the first argument as a struct, so you cannot specify []. I will fix the > empty input struct. For the moment you can do cfg.dummy=[] to make a > structure of the cfg and the example above will work. > > Robert > > From sameer at ANDREW.CMU.EDU Tue Feb 20 17:06:50 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 20 Feb 2007 11:06:50 -0500 Subject: eog artifact rejection Message-ID: I am interested in removing blink artifacts. Unfortunately, with fieldtrip component analysis, it is difficult to identify the independent component corresponding to blinks by visual inspection due to the short timecourse over which they are presented (trial length). There are essentially two errors: 1> ??? Error using ==> timelockanalysis data has variable trial lengths, you specified not to accept that ! 2> fdcomp.cohspctrm does not exist. I tried to follow instructions under independent component analysis (ICA) to remove ECG artifacts replacing eog for ecg. (I did not do any resampling). (Is this a good idea?) So I did, % go back to the raw data on disk and detect the peaks in the EOG channel, cfg = same.old.cfg.used.for.component.analysis.of.data; cfg.artfctdef.eog.pretim = 0.25; cfg.artfctdef.eog.psttim = 0.50-1/1200; [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts) % preprocess the data around the peaks, i.e. read the segments of raw data containing the EOG artifact cfg = []; cfg.dataset = 'JD_012507_Beeps_One.fif'; cfg.datatype = 'continuous'; cfg.padding = 10; cfg.dftfilter = 'yes'; cfg.blc = 'yes'; cfg.trl = [artifact zeros(size(artifact,1),1)]; cfg.channel = {'MEG' 'EOG'}; data_eog = preprocessing(cfg) % decompose the ECG-locked datasegments into components, using the previously found (un)mixing matrix cfg = []; cfg.topo = compRR_orig.topo; cfg.topolabel = compRR_orig.topolabel; comp_eog = componentanalysis(cfg, data_eog); selecting 307 channels baseline correcting data starting decomposition using predetermined mixing matrix total time in componentanalysis 1.2 seconds % compute a frequency decomposition of all components and the ECG cfg = []; timelock = timelockanalysis(cfg, comp_eog); applying preprocessing options ??? Error using ==> timelockanalysis data has variable trial lengths, you specified not to accept that ! % compute a frequency decomposition of all components and the ECG cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.foilim = [0 100]; cfg.taper = 'hanning'; cfg.pad = 'maxperlen'; freq = freqanalysis(cfg, comp_ecg); % compute coherence between all components and the ECG cfg = []; cfg.channelcmb = {'all' 'ECG'}; cfg.jackknife = 'no'; fdcomp = freqdescriptives(cfg, freq); Even though I get computing cross-spectral densities message, I do not get .cohspctrm. fdcomp = dimord: 'chan_freq' freq: [1x155 double] label: {307x1 cell} powspctrm: [307x155 double] dof: [307x155 double] cfg: [1x1 struct] Sorry for the long email, and thanks for your help. sameer From Jan.Schoffelen at FCDONDERS.RU.NL Tue Feb 20 17:12:20 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 20 Feb 2007 17:12:20 +0100 Subject: eog artifact rejection In-Reply-To: Message-ID: Dear sameer, Ad problem 1: Please specify: cfg.vartrllength = 2, prior to doing the timelockanalysis Ad problem 2: Please specify: cfg.channelcmb = {'all' 'EOG'}, prior to doing freqdescriptives. (instead of {'all' 'ECG'} JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, February 20, 2007 5:07 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] eog artifact rejection I am interested in removing blink artifacts. Unfortunately, with fieldtrip component analysis, it is difficult to identify the independent component corresponding to blinks by visual inspection due to the short timecourse over which they are presented (trial length). There are essentially two errors: 1> ??? Error using ==> timelockanalysis data has variable trial lengths, you specified not to accept that ! 2> fdcomp.cohspctrm does not exist. I tried to follow instructions under independent component analysis (ICA) to remove ECG artifacts replacing eog for ecg. (I did not do any resampling). (Is this a good idea?) So I did, % go back to the raw data on disk and detect the peaks in the EOG channel, cfg = same.old.cfg.used.for.component.analysis.of.data; cfg.artfctdef.eog.pretim = 0.25; cfg.artfctdef.eog.psttim = 0.50-1/1200; [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts) % preprocess the data around the peaks, i.e. read the segments of raw data containing the EOG artifact cfg = []; cfg.dataset = 'JD_012507_Beeps_One.fif'; cfg.datatype = 'continuous'; cfg.padding = 10; cfg.dftfilter = 'yes'; cfg.blc = 'yes'; cfg.trl = [artifact zeros(size(artifact,1),1)]; cfg.channel = {'MEG' 'EOG'}; data_eog = preprocessing(cfg) % decompose the ECG-locked datasegments into components, using the previously found (un)mixing matrix cfg = []; cfg.topo = compRR_orig.topo; cfg.topolabel = compRR_orig.topolabel; comp_eog = componentanalysis(cfg, data_eog); selecting 307 channels baseline correcting data starting decomposition using predetermined mixing matrix total time in componentanalysis 1.2 seconds % compute a frequency decomposition of all components and the ECG cfg = []; timelock = timelockanalysis(cfg, comp_eog); applying preprocessing options ??? Error using ==> timelockanalysis data has variable trial lengths, you specified not to accept that ! % compute a frequency decomposition of all components and the ECG cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.foilim = [0 100]; cfg.taper = 'hanning'; cfg.pad = 'maxperlen'; freq = freqanalysis(cfg, comp_ecg); % compute coherence between all components and the ECG cfg = []; cfg.channelcmb = {'all' 'ECG'}; cfg.jackknife = 'no'; fdcomp = freqdescriptives(cfg, freq); Even though I get computing cross-spectral densities message, I do not get .cohspctrm. fdcomp = dimord: 'chan_freq' freq: [1x155 double] label: {307x1 cell} powspctrm: [307x155 double] dof: [307x155 double] cfg: [1x1 struct] Sorry for the long email, and thanks for your help. sameer From c.hesse at FCDONDERS.RU.NL Tue Feb 20 17:13:02 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Tue, 20 Feb 2007 17:13:02 +0100 Subject: eog artifact rejection In-Reply-To: Message-ID: Hi Samer, try sorting your ICs by the (absolute) correlation of their waveforms with the EOG signal -> the one or two components with the highest correlation are those that should be removed. If you encounter problems in getting this to work, please let me know. Christian On 20 Feb 2007, at 17:06, Sameer Walawalkar wrote: > I am interested in removing blink artifacts. Unfortunately, with > fieldtrip component analysis, it is difficult to identify the > independent component corresponding to blinks by visual inspection > due to the short timecourse over which they are presented (trial > length). > > There are essentially two errors: > 1> ??? Error using ==> timelockanalysis > data has variable trial lengths, you specified not to accept that ! > 2> fdcomp.cohspctrm does not exist. > > I tried to follow instructions under independent component > analysis (ICA) to remove ECG artifacts replacing eog for ecg. (I > did not do any resampling). (Is this a good idea?) > > So I did, > % go back to the raw data on disk and detect the peaks in the EOG > channel, > cfg = same.old.cfg.used.for.component.analysis.of.data; > cfg.artfctdef.eog.pretim = 0.25; > cfg.artfctdef.eog.psttim = 0.50-1/1200; > > [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts) > > > % preprocess the data around the peaks, i.e. read the segments of > raw data containing the EOG artifact > cfg = []; > cfg.dataset = 'JD_012507_Beeps_One.fif'; > cfg.datatype = 'continuous'; > cfg.padding = 10; > cfg.dftfilter = 'yes'; > cfg.blc = 'yes'; > cfg.trl = [artifact zeros(size(artifact,1),1)]; > cfg.channel = {'MEG' 'EOG'}; > data_eog = preprocessing(cfg) > > % decompose the ECG-locked datasegments into components, using the > previously found (un)mixing matrix > cfg = []; > cfg.topo = compRR_orig.topo; > cfg.topolabel = compRR_orig.topolabel; > comp_eog = componentanalysis(cfg, data_eog); > selecting 307 channels > baseline correcting data > starting decomposition using predetermined mixing matrix > total time in componentanalysis 1.2 seconds > > > % compute a frequency decomposition of all components and the ECG > > cfg = []; > timelock = timelockanalysis(cfg, comp_eog); > applying preprocessing options > ??? Error using ==> timelockanalysis > data has variable trial lengths, you specified not to accept that ! > > % compute a frequency decomposition of all components and the ECG > > cfg = []; > cfg.method = 'mtmfft'; > cfg.output = 'fourier'; > cfg.foilim = [0 100]; > cfg.taper = 'hanning'; > cfg.pad = 'maxperlen'; > freq = freqanalysis(cfg, comp_ecg); > > > % compute coherence between all components and the ECG > cfg = []; > cfg.channelcmb = {'all' 'ECG'}; > cfg.jackknife = 'no'; > fdcomp = freqdescriptives(cfg, freq); > > Even though I get computing cross-spectral densities message, I do > not get .cohspctrm. > > fdcomp = > > dimord: 'chan_freq' > freq: [1x155 double] > label: {307x1 cell} > powspctrm: [307x155 double] > dof: [307x155 double] > cfg: [1x1 struct] > > > Sorry for the long email, and thanks for your help. > > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at YAHOO.COM Wed Feb 21 08:09:26 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Tue, 20 Feb 2007 23:09:26 -0800 Subject: Neuromag data processing In-Reply-To: <8969EAA5-A62D-4141-AFA5-F94E3170C116@fcdonders.ru.nl> Message-ID: Thank you Christian. I can use meg-pd toolbox now. However, it seems all the functions in FieldTrip are for evoked data while my raw data is continuous data. I tried your suggestion. read_head works but read_data doesn't work. I don't know this error just due to memory or continuous data format. I remember previous discussion (2-feb-2006) in this emaillist mentioned that read_data couldn't deal with continuous data. The error shows as below: ??? Out of memory. Type HELP MEMORY for your options. Error in ==> F:\MATLAB6p5\toolbox\fieldtrip-20070213\private\read_data.m On line 529 ==> dat(:,((i-begepoch)*hdr.nSamples+1):((i-begepoch+1)*hdr.nSamples)) = buf(chanindx,:); Error in ==> F:\MATLAB6p5\toolbox\fieldtrip-20070213\read_fcdc_data.m On line 49 ==> [dat] = read_data(varargin{:}); Even the read_data has been improved as continuous data acceptable, I still wonder the following data processing. Is there tool to convert continuous data to "epoch mode" data? Thanks. Best, Eve Christian Hesse wrote: Hi Eve, FieldTrip handles (pretty much) all function calls to the meg-pd toolbox for you (in particular which are the appropriate input arguments to use) so you don't have to deal with these issues yourself. See if you can extract the header information and some data from your .fif file using?lt;/DIV> filename = "fullpath/name.fif" hdr = read_fcdc_header(filename); % hdr should be a structure dat = read_fcdc_data(filename); % dat should be a nchan x nsamp matrix see what you get. Regards, Christian On 17 Feb 2007, at 21:03, alotof eve wrote: Hi, experts, ?lt;/DIV>    Maybe I misunderstood the command. My MEG data is from NeuroMag 306 channels.  Does that mean I should use "Neuromag-306" as argument? Thanks for any suggestion. ?lt;/DIV> Best, Eve alotof eve wrote: Hi Christian,   ?Yes it works. Thank you so much.   ?But now I met a new problem. I got only a whole .fif data. When I tried the command "MEGMODEL", it said any argument can be left out. However, the error showed up again: >> MEGMODEL ??? Could not load the coil files Error in ==> F:\MATLAB6p5\bin\win32\megmodel.dll   ? I couldn't find any .fif file like Neuromag-122 or coilfile.fif. How do you settle it? Thanks. Best, Eve Christian Hesse wrote: Hi Eve, you should be able to use the meg-pd toolbox (also from FieldTrip) in Matlab under Windows. I got the toolbox to work in Matlab7 under WindowsXP as follows: ? extract the meg-pd-1.2-10.mswin.zip file to somewhere -?then copy (or move) the meg_pd_1.2 directory wherever you want -?in the README file in the meg-pd-1.2-10.mswin directory it specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin\lib\i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of Matlab on your system, in my case this was the directory "MATLAB71\bin\win32" -?start up Matlab, add the fieldtrip and meg_pd_1.2 directories to your path and try to read your .fif file Let me know if this works on your Windows system Regards, Christian On 15 Feb 2007, at 17:32, alotof eve wrote: Hi, experts, ?lt;/DIV>      I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment.   ?The error?showed as:       ?Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. The specified module could not be found.          ?The true is the .dll is in the same path as .m and the path has been add the Matlab.     ?I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. ?lt;/DIV>      Please help me. Thanks. ?lt;/DIV> Best, Eve --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging?lt;/DIV> P.O. Box 9101?lt;/DIV> NL-6500 HB Nijmegen?lt;/DIV> The Netherlands Tel.:?31 (0)24 36 68293 Fax: +31?0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. --------------------------------- No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging?lt;/DIV> P.O. Box 9101?lt;/DIV> NL-6500 HB Nijmegen?lt;/DIV> The Netherlands Tel.:?31 (0)24 36 68293 Fax: +31?0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- --------------------------------- Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Wed Feb 21 09:02:31 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 21 Feb 2007 09:02:31 +0100 Subject: Neuromag data processing In-Reply-To: <596226.68250.qm@web51415.mail.yahoo.com> Message-ID: Hi Eve, > I can use meg-pd toolbox now. However, it seems all the functions > in FieldTrip are for evoked data while my raw data is continuous data. FieldTrip handles a variety of data, and the low level reading functions can deal with continuous or epoch based raw data. When you analyze your data in FT, you usually start by defining your trials, i.e. epochs in your continuous data that are of interest, w.r.t. to some sort of trigger or event. The function PREPROCESSING then scans through your raw data file and returns a data structure which contains all of the specified epochs (for a particular trial definition) in a field data.trial. Please note that this has nothing to do with evoked vs induced responses just yet. You can use the output of PREPROCESSING as input to either TIMELOCKANALYSIS or FREQUANALYSIS which look at evoked and induced phenomena, respectively. Afterwards you can call various statistical functions such as FREQDESCRIPTIVES, etc ... So the reason why I have been giving you the examples using read_header and read_data is because I needed to determine the nature of the error you were getting without really knowning anything about what sort of data is in your file. In your use of FT you do not actually use these functions yourself, but basically use functions like DEFINE_TRIAL and PREPROCESSING to start with. > I tried your suggestion. read_head works but read_data doesn't > work. I don't know this error just due to memory or continuous data > format. I remember previous discussion (2-feb-2006) in this > emaillist mentioned that read_data couldn't deal with continuous > data. The error shows as below: > > ??? Out of memory. Type HELP MEMORY for your options. > Error in ==> F:\MATLAB6p5\toolbox\fieldtrip-20070213\private > \read_data.m > On line 529 ==> dat(:,((i-begepoch)*hdr.nSamples+1):((i- > begepoch+1)*hdr.nSamples)) = buf(chanindx,:); > Error in ==> F:\MATLAB6p5\toolbox\fieldtrip-20070213\read_fcdc_data.m > On line 49 ==> [dat] = read_data(varargin{:}); > Just as one final double check, can you try the following to confirm that you can read a block of data from your .fif file: filename = 'fullpath/name.fif'; dat = read_fcdc_data(filename, 'begsample', 1, 'endsample', 100); size(dat) % this should be an nchan x 100 matrix Please let me know if this works, and then look at how to use the PREPROCESSING and DEFINE_TRIAL funcitons to extract relevant epochs from your raw data file (see http://www2.ru.nl/fcdonders/fieldtrip/ doku.php?id=fieldtrip:documentation:tutorial:preprocessing) Regards, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at HOTMAIL.COM Wed Feb 21 12:15:52 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 21 Feb 2007 11:15:52 +0000 Subject: Time Frequency Analysis! In-Reply-To: <19C4B8DD-20DF-433A-A3C8-90DF045A199E@fcdonders.ru.nl> Message-ID: Hello, A brief on how to do i get the data1, I have the data for 24000 data points with 800 Hz sampling rate (30 secs of data), i construct my own data format according to the data format specified in fieltrip with data.label,fsample,trial,time. I tried the way you have mentioned with the window length this is what i do cfg=[]; winlen=0.5; halfwin=winlen/2; nwin=2.*(30./winlen)-1; cfg.output='pow'; cfg.method='mtmconvol'; cfg.channel = channelselection({'all' 'all'}, data1.label); cfg.foi=2:1:30; cfg.t_ftimwin=zeros(1,nwin).*winlen; cfg.toi=[0:halfwin:30-winlen]; cfg.taper='hanning'; cfg.pad=2; cfg.keeptrials='no'; TFRmult=freqanalysis(cfg,data1); and it throws a error ??? Subscript indices must either be real positive integers or logicals. Error in ==> freqanalysis_mtmconvol at 424 autspctrmacttap(sgnlop,:) = dum(acttimboi); Error in ==> freqanalysis at 167 [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); Please let me know, why do i get this error Thanking you with regards M.Muthuraman. >From: Christian Hesse >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Mon, 19 Feb 2007 13:12:03 +0100 > >Hi Muthuraman, > >ok, in that case you can try the following (this assumes you have windows >of length "winlen" which overlap by "halfwin = winlen/2") > >winlen = 0.5; >% this is in seconds you can also use another time window >halfwin = winlen/2; > >% the total number of windows covering the 30 second period >nwin = 2.*(30./winlen) - 1; > >cfg.method = 'mtmconvol'; >cfg.output = 'pow'; >cfg.t_ftimwin = ones(1,nwin).*winlen; >cfg.toi = [0:halfwin:30-winlen]; > >The important things here to check are >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >2) the times you specify in cfg.toi actually correspond to your time axis >(i.e. do not start before or go on after). > >If you want to use a different overlap, you need to calculate nwin >slightly differently. > >Hope this helps more, >Christian > > > >>Thanks for the suggestion but using the mtmfft which i have done already >>and it works, my interest now is that i would like to use the Time >>frequency analysis 'mtmconvol' to estimate the power in the time >>frequency scale, in which how to get the whole 30secs continous data in >>one time frequency plot(TFR). >> >>Thanking you >> >>with regards >>M.Muthuraman. >> >>>From: Christian Hesse >>>Reply-To: FieldTrip discussion list >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 >>> >>>Hi Muthuraman, >>> >>>>One more question regarding the Time frequency Analysis, i have EMG >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 seconds >>>>of continous data). I would like to do the Timefrequency analysis for >>>>this data and to see the power for the whole 30 seconds >>> >>>use preprocessing to get the EMG data into a single 30s trial (if you >>>want to analyze the rectified EMG, then do the rectification in >>>preprocessing), then use frequanalysis with >>> >>>cfg.method = 'mtmfft'; >>>cfg.output = 'pow'; >>> >>>this should give you the power spectrum of your EMG data over the >>>entire 30 second period. >>> >>>Regards, >>>Christian >>> >>> >>>--------------------------------------------------------------------- - >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: c.hesse at fcdonders.ru.nl >>>Web: www.fcdonders.ru.nl >>>--------------------------------------------------------------------- - >>> >>> >>> >>> >> >>_________________________________________________________________ >>Tried the new MSN Messenger? It�s cool! Download now. http:// >>messenger.msn.com/Download/Default.aspx?mkt=en-in >> > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > _________________________________________________________________ Get Married in 2007. Join Shaadi.com http://www.shaadi.com/ptnr.php?ptnr=mhottag From Jan.Schoffelen at FCDONDERS.RU.NL Wed Feb 21 12:39:30 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 21 Feb 2007 12:39:30 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Please use this: cfg.channel = channelselection({'all'}, data1.label); instead of this: cfg.channel = channelselection({'all' 'all'}, data1.label); JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Wednesday, February 21, 2007 12:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Time Frequency Analysis! Hello, A brief on how to do i get the data1, I have the data for 24000 data points with 800 Hz sampling rate (30 secs of data), i construct my own data format according to the data format specified in fieltrip with data.label,fsample,trial,time. I tried the way you have mentioned with the window length this is what i do cfg=[]; winlen=0.5; halfwin=winlen/2; nwin=2.*(30./winlen)-1; cfg.output='pow'; cfg.method='mtmconvol'; cfg.channel = channelselection({'all' 'all'}, data1.label); cfg.foi=2:1:30; cfg.t_ftimwin=zeros(1,nwin).*winlen; cfg.toi=[0:halfwin:30-winlen]; cfg.taper='hanning'; cfg.pad=2; cfg.keeptrials='no'; TFRmult=freqanalysis(cfg,data1); and it throws a error ??? Subscript indices must either be real positive integers or logicals. Error in ==> freqanalysis_mtmconvol at 424 autspctrmacttap(sgnlop,:) = dum(acttimboi); Error in ==> freqanalysis at 167 [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); Please let me know, why do i get this error Thanking you with regards M.Muthuraman. >From: Christian Hesse >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Mon, 19 Feb 2007 13:12:03 +0100 > >Hi Muthuraman, > >ok, in that case you can try the following (this assumes you have windows >of length "winlen" which overlap by "halfwin = winlen/2") > >winlen = 0.5; >% this is in seconds you can also use another time window >halfwin = winlen/2; > >% the total number of windows covering the 30 second period >nwin = 2.*(30./winlen) - 1; > >cfg.method = 'mtmconvol'; >cfg.output = 'pow'; >cfg.t_ftimwin = ones(1,nwin).*winlen; >cfg.toi = [0:halfwin:30-winlen]; > >The important things here to check are >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >2) the times you specify in cfg.toi actually correspond to your time axis >(i.e. do not start before or go on after). > >If you want to use a different overlap, you need to calculate nwin >slightly differently. > >Hope this helps more, >Christian > > > >>Thanks for the suggestion but using the mtmfft which i have done already >>and it works, my interest now is that i would like to use the Time >>frequency analysis 'mtmconvol' to estimate the power in the time >>frequency scale, in which how to get the whole 30secs continous data in >>one time frequency plot(TFR). >> >>Thanking you >> >>with regards >>M.Muthuraman. >> >>>From: Christian Hesse >>>Reply-To: FieldTrip discussion list >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 >>> >>>Hi Muthuraman, >>> >>>>One more question regarding the Time frequency Analysis, i have EMG >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 seconds >>>>of continous data). I would like to do the Timefrequency analysis for >>>>this data and to see the power for the whole 30 seconds >>> >>>use preprocessing to get the EMG data into a single 30s trial (if you >>>want to analyze the rectified EMG, then do the rectification in >>>preprocessing), then use frequanalysis with >>> >>>cfg.method = 'mtmfft'; >>>cfg.output = 'pow'; >>> >>>this should give you the power spectrum of your EMG data over the >>>entire 30 second period. >>> >>>Regards, >>>Christian >>> >>> >>>--------------------------------------------------------------------- - >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: c.hesse at fcdonders.ru.nl >>>Web: www.fcdonders.ru.nl >>>--------------------------------------------------------------------- - >>> >>> >>> >>> >> >>_________________________________________________________________ >>Tried the new MSN Messenger? It's cool! Download now. http:// >>messenger.msn.com/Download/Default.aspx?mkt=en-in >> > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > _________________________________________________________________ Get Married in 2007. Join Shaadi.com http://www.shaadi.com/ptnr.php?ptnr=mhottag From Jan.Schoffelen at FCDONDERS.RU.NL Wed Feb 21 12:41:24 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 21 Feb 2007 12:41:24 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: What's the time-axis in your data? JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Wednesday, February 21, 2007 12:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Time Frequency Analysis! Hello, A brief on how to do i get the data1, I have the data for 24000 data points with 800 Hz sampling rate (30 secs of data), i construct my own data format according to the data format specified in fieltrip with data.label,fsample,trial,time. I tried the way you have mentioned with the window length this is what i do cfg=[]; winlen=0.5; halfwin=winlen/2; nwin=2.*(30./winlen)-1; cfg.output='pow'; cfg.method='mtmconvol'; cfg.channel = channelselection({'all' 'all'}, data1.label); cfg.foi=2:1:30; cfg.t_ftimwin=zeros(1,nwin).*winlen; cfg.toi=[0:halfwin:30-winlen]; cfg.taper='hanning'; cfg.pad=2; cfg.keeptrials='no'; TFRmult=freqanalysis(cfg,data1); and it throws a error ??? Subscript indices must either be real positive integers or logicals. Error in ==> freqanalysis_mtmconvol at 424 autspctrmacttap(sgnlop,:) = dum(acttimboi); Error in ==> freqanalysis at 167 [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); Please let me know, why do i get this error Thanking you with regards M.Muthuraman. >From: Christian Hesse >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Mon, 19 Feb 2007 13:12:03 +0100 > >Hi Muthuraman, > >ok, in that case you can try the following (this assumes you have windows >of length "winlen" which overlap by "halfwin = winlen/2") > >winlen = 0.5; >% this is in seconds you can also use another time window >halfwin = winlen/2; > >% the total number of windows covering the 30 second period >nwin = 2.*(30./winlen) - 1; > >cfg.method = 'mtmconvol'; >cfg.output = 'pow'; >cfg.t_ftimwin = ones(1,nwin).*winlen; >cfg.toi = [0:halfwin:30-winlen]; > >The important things here to check are >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >2) the times you specify in cfg.toi actually correspond to your time axis >(i.e. do not start before or go on after). > >If you want to use a different overlap, you need to calculate nwin >slightly differently. > >Hope this helps more, >Christian > > > >>Thanks for the suggestion but using the mtmfft which i have done already >>and it works, my interest now is that i would like to use the Time >>frequency analysis 'mtmconvol' to estimate the power in the time >>frequency scale, in which how to get the whole 30secs continous data in >>one time frequency plot(TFR). >> >>Thanking you >> >>with regards >>M.Muthuraman. >> >>>From: Christian Hesse >>>Reply-To: FieldTrip discussion list >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 >>> >>>Hi Muthuraman, >>> >>>>One more question regarding the Time frequency Analysis, i have EMG >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 seconds >>>>of continous data). I would like to do the Timefrequency analysis for >>>>this data and to see the power for the whole 30 seconds >>> >>>use preprocessing to get the EMG data into a single 30s trial (if you >>>want to analyze the rectified EMG, then do the rectification in >>>preprocessing), then use frequanalysis with >>> >>>cfg.method = 'mtmfft'; >>>cfg.output = 'pow'; >>> >>>this should give you the power spectrum of your EMG data over the >>>entire 30 second period. >>> >>>Regards, >>>Christian >>> >>> >>>--------------------------------------------------------------------- - >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: c.hesse at fcdonders.ru.nl >>>Web: www.fcdonders.ru.nl >>>--------------------------------------------------------------------- - >>> >>> >>> >>> >> >>_________________________________________________________________ >>Tried the new MSN Messenger? It's cool! Download now. http:// >>messenger.msn.com/Download/Default.aspx?mkt=en-in >> > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > _________________________________________________________________ Get Married in 2007. Join Shaadi.com http://www.shaadi.com/ptnr.php?ptnr=mhottag From c.hesse at FCDONDERS.RU.NL Wed Feb 21 12:52:01 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 21 Feb 2007 12:52:01 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: > A brief on how to do i get the data1, I have the data for 24000 > data points with 800 Hz sampling rate (30 secs of data), i > construct my own data format according to the data format specified > in fieltrip with > data.label,fsample,trial,time. > I tried the way you have mentioned with the window length > this is what i do > > cfg=[]; > winlen=0.5; > halfwin=winlen/2; > nwin=2.*(30./winlen)-1; > cfg.output='pow'; > cfg.method='mtmconvol'; > cfg.channel = channelselection({'all' 'all'}, data1.label); > cfg.foi=2:1:30; > cfg.t_ftimwin=zeros(1,nwin).*winlen; this should be cfg.t_ftimwin=ones(1,nwin).*winlen; Christian > cfg.toi=[0:halfwin:30-winlen]; > cfg.taper='hanning'; > cfg.pad=2; > cfg.keeptrials='no'; > TFRmult=freqanalysis(cfg,data1); > > and it throws a error > ??? Subscript indices must either be real positive integers or > logicals. > > Error in ==> freqanalysis_mtmconvol at 424 > autspctrmacttap(sgnlop,:) = dum(acttimboi); > > Error in ==> freqanalysis at 167 > [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, > data); > > Please let me know, why do i get this error > > > Thanking you > > with regards > M.Muthuraman. > >> From: Christian Hesse >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> Date: Mon, 19 Feb 2007 13:12:03 +0100 >> >> Hi Muthuraman, >> >> ok, in that case you can try the following (this assumes you have >> windows of length "winlen" which overlap by "halfwin = winlen/2") >> >> winlen = 0.5; >> % this is in seconds you can also use another time window >> halfwin = winlen/2; >> >> % the total number of windows covering the 30 second period >> nwin = 2.*(30./winlen) - 1; >> >> cfg.method = 'mtmconvol'; >> cfg.output = 'pow'; >> cfg.t_ftimwin = ones(1,nwin).*winlen; >> cfg.toi = [0:halfwin:30-winlen]; >> >> The important things here to check are >> 1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >> 2) the times you specify in cfg.toi actually correspond to your >> time axis (i.e. do not start before or go on after). >> >> If you want to use a different overlap, you need to calculate >> nwin slightly differently. >> >> Hope this helps more, >> Christian >> >> >> >>> Thanks for the suggestion but using the mtmfft which i have done >>> already and it works, my interest now is that i would like to >>> use the Time frequency analysis 'mtmconvol' to estimate the >>> power in the time frequency scale, in which how to get the whole >>> 30secs continous data in one time frequency plot(TFR). >>> >>> Thanking you >>> >>> with regards >>> M.Muthuraman. >>> >>>> From: Christian Hesse >>>> Reply-To: FieldTrip discussion list >>>> To: FIELDTRIP at NIC.SURFNET.NL >>>> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >>>> Date: Mon, 19 Feb 2007 11:56:19 +0100 >>>> >>>> Hi Muthuraman, >>>> >>>>> One more question regarding the Time frequency Analysis, i >>>>> have EMG data of 24000 data points with a sampling frequeny >>>>> of 800Hz (30 seconds of continous data). I would like to do >>>>> the Timefrequency analysis for this data and to see the power >>>>> for the whole 30 seconds >>>> >>>> use preprocessing to get the EMG data into a single 30s trial >>>> (if you want to analyze the rectified EMG, then do the >>>> rectification in preprocessing), then use frequanalysis with >>>> >>>> cfg.method = 'mtmfft'; >>>> cfg.output = 'pow'; >>>> >>>> this should give you the power spectrum of your EMG data over >>>> the entire 30 second period. >>>> >>>> Regards, >>>> Christian >>>> >>>> >>>> ------------------------------------------------------------------- >>>> -- - >>>> Christian Hesse, PhD, MIEEE >>>> >>>> F.C. Donders Centre for Cognitive Neuroimaging >>>> P.O. Box 9101 >>>> NL-6500 HB Nijmegen >>>> The Netherlands >>>> >>>> Tel.: +31 (0)24 36 68293 >>>> Fax: +31 (0)24 36 10989 >>>> >>>> Email: c.hesse at fcdonders.ru.nl >>>> Web: www.fcdonders.ru.nl >>>> ------------------------------------------------------------------- >>>> -- - >>>> >>>> >>>> >>>> >>> >>> _________________________________________________________________ >>> Tried the new MSN Messenger? It’s cool! Download now. http:// >>> messenger.msn.com/Download/Default.aspx?mkt=en-in >>> >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> > > _________________________________________________________________ > Get Married in 2007. Join Shaadi.com http://www.shaadi.com/ptnr.php? > ptnr=mhottag > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at HOTMAIL.COM Wed Feb 21 13:14:40 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 21 Feb 2007 12:14:40 +0000 Subject: Time Frequency Analysis! In-Reply-To: <002901c755ad$37635b70$902dae83@fcdonders.nl> Message-ID: Hello JM, The time axis in my data which i define from 0 to 30 secs data1.time{1,1}=0:0.0375:29.99875; after making the changes it works now but i get the only values from 0.125 to 0.625 and all the other values are Nan's thanking you with regards M.Muthuraman. >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Wed, 21 Feb 2007 12:41:24 +0100 > >What's the time-axis in your data? > >JM > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Wednesday, February 21, 2007 12:16 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Hello, > >A brief on how to do i get the data1, I have the data for 24000 data points >with 800 Hz sampling rate (30 secs of data), i construct my own data format >according to the data format specified in fieltrip with >data.label,fsample,trial,time. >I tried the way you have mentioned with the window length >this is what i do > >cfg=[]; >winlen=0.5; >halfwin=winlen/2; >nwin=2.*(30./winlen)-1; >cfg.output='pow'; >cfg.method='mtmconvol'; >cfg.channel = channelselection({'all' 'all'}, data1.label); >cfg.foi=2:1:30; >cfg.t_ftimwin=zeros(1,nwin).*winlen; >cfg.toi=[0:halfwin:30-winlen]; >cfg.taper='hanning'; >cfg.pad=2; >cfg.keeptrials='no'; >TFRmult=freqanalysis(cfg,data1); > >and it throws a error >??? Subscript indices must either be real positive integers or logicals. > >Error in ==> freqanalysis_mtmconvol at 424 > autspctrmacttap(sgnlop,:) = dum(acttimboi); > >Error in ==> freqanalysis at 167 >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); > >Please let me know, why do i get this error > > >Thanking you > >with regards >M.Muthuraman. > > >From: Christian Hesse > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Date: Mon, 19 Feb 2007 13:12:03 +0100 > > > >Hi Muthuraman, > > > >ok, in that case you can try the following (this assumes you have >windows > >of length "winlen" which overlap by "halfwin = winlen/2") > > > >winlen = 0.5; > >% this is in seconds you can also use another time window > >halfwin = winlen/2; > > > >% the total number of windows covering the 30 second period > >nwin = 2.*(30./winlen) - 1; > > > >cfg.method = 'mtmconvol'; > >cfg.output = 'pow'; > >cfg.t_ftimwin = ones(1,nwin).*winlen; > >cfg.toi = [0:halfwin:30-winlen]; > > > >The important things here to check are > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements > >2) the times you specify in cfg.toi actually correspond to your time >axis > >(i.e. do not start before or go on after). > > > >If you want to use a different overlap, you need to calculate nwin > >slightly differently. > > > >Hope this helps more, > >Christian > > > > > > > >>Thanks for the suggestion but using the mtmfft which i have done >already > >>and it works, my interest now is that i would like to use the Time > >>frequency analysis 'mtmconvol' to estimate the power in the time > >>frequency scale, in which how to get the whole 30secs continous data >in > >>one time frequency plot(TFR). > >> > >>Thanking you > >> > >>with regards > >>M.Muthuraman. > >> > >>>From: Christian Hesse > >>>Reply-To: FieldTrip discussion list > >>>To: FIELDTRIP at NIC.SURFNET.NL > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 > >>> > >>>Hi Muthuraman, > >>> > >>>>One more question regarding the Time frequency Analysis, i have EMG > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 >seconds > > >>>>of continous data). I would like to do the Timefrequency analysis >for > >>>>this data and to see the power for the whole 30 seconds > >>> > >>>use preprocessing to get the EMG data into a single 30s trial (if you > >>>want to analyze the rectified EMG, then do the rectification in > >>>preprocessing), then use frequanalysis with > >>> > >>>cfg.method = 'mtmfft'; > >>>cfg.output = 'pow'; > >>> > >>>this should give you the power spectrum of your EMG data over the > >>>entire 30 second period. > >>> > >>>Regards, > >>>Christian > >>> > >>> > >>>--------------------------------------------------------------------- - > >>>Christian Hesse, PhD, MIEEE > >>> > >>>F.C. Donders Centre for Cognitive Neuroimaging > >>>P.O. Box 9101 > >>>NL-6500 HB Nijmegen > >>>The Netherlands > >>> > >>>Tel.: +31 (0)24 36 68293 > >>>Fax: +31 (0)24 36 10989 > >>> > >>>Email: c.hesse at fcdonders.ru.nl > >>>Web: www.fcdonders.ru.nl > >>>--------------------------------------------------------------------- - > >>> > >>> > >>> > >>> > >> > >>_________________________________________________________________ > >>Tried the new MSN Messenger? It's cool! Download now. http:// > >>messenger.msn.com/Download/Default.aspx?mkt=en-in > >> > > > >---------------------------------------------------------------------- > >Christian Hesse, PhD, MIEEE > > > >F.C. Donders Centre for Cognitive Neuroimaging > >P.O. Box 9101 > >NL-6500 HB Nijmegen > >The Netherlands > > > >Tel.: +31 (0)24 36 68293 > >Fax: +31 (0)24 36 10989 > > > >Email: c.hesse at fcdonders.ru.nl > >Web: www.fcdonders.ru.nl > >---------------------------------------------------------------------- > > > > > > > > > >_________________________________________________________________ >Get Married in 2007. Join Shaadi.com >http://www.shaadi.com/ptnr.php?ptnr=mhottag _________________________________________________________________ Crave for a healthier lifestyle? Ask an expert http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm From Jan.Schoffelen at FCDONDERS.RU.NL Wed Feb 21 13:39:33 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 21 Feb 2007 13:39:33 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Hi Muthu, Please put cfg.pad at 30. As you can read in the frequency analysis tutorials, the cfg.pad is used to pad out your data with zeros until the specified length, to obtain the spectral interpolation required. I suspect that having your cfg.pad at only 2, while having a data length which is way longer, you run into problems. JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Wednesday, February 21, 2007 1:15 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Time Frequency Analysis! Hello JM, The time axis in my data which i define from 0 to 30 secs data1.time{1,1}=0:0.0375:29.99875; after making the changes it works now but i get the only values from 0.125 to 0.625 and all the other values are Nan's thanking you with regards M.Muthuraman. >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Wed, 21 Feb 2007 12:41:24 +0100 > >What's the time-axis in your data? > >JM > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Wednesday, February 21, 2007 12:16 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Hello, > >A brief on how to do i get the data1, I have the data for 24000 data points >with 800 Hz sampling rate (30 secs of data), i construct my own data format >according to the data format specified in fieltrip with >data.label,fsample,trial,time. >I tried the way you have mentioned with the window length >this is what i do > >cfg=[]; >winlen=0.5; >halfwin=winlen/2; >nwin=2.*(30./winlen)-1; >cfg.output='pow'; >cfg.method='mtmconvol'; >cfg.channel = channelselection({'all' 'all'}, data1.label); >cfg.foi=2:1:30; >cfg.t_ftimwin=zeros(1,nwin).*winlen; >cfg.toi=[0:halfwin:30-winlen]; >cfg.taper='hanning'; >cfg.pad=2; >cfg.keeptrials='no'; >TFRmult=freqanalysis(cfg,data1); > >and it throws a error >??? Subscript indices must either be real positive integers or logicals. > >Error in ==> freqanalysis_mtmconvol at 424 > autspctrmacttap(sgnlop,:) = dum(acttimboi); > >Error in ==> freqanalysis at 167 >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); > >Please let me know, why do i get this error > > >Thanking you > >with regards >M.Muthuraman. > > >From: Christian Hesse > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Date: Mon, 19 Feb 2007 13:12:03 +0100 > > > >Hi Muthuraman, > > > >ok, in that case you can try the following (this assumes you have >windows > >of length "winlen" which overlap by "halfwin = winlen/2") > > > >winlen = 0.5; > >% this is in seconds you can also use another time window > >halfwin = winlen/2; > > > >% the total number of windows covering the 30 second period > >nwin = 2.*(30./winlen) - 1; > > > >cfg.method = 'mtmconvol'; > >cfg.output = 'pow'; > >cfg.t_ftimwin = ones(1,nwin).*winlen; > >cfg.toi = [0:halfwin:30-winlen]; > > > >The important things here to check are > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements > >2) the times you specify in cfg.toi actually correspond to your time >axis > >(i.e. do not start before or go on after). > > > >If you want to use a different overlap, you need to calculate nwin > >slightly differently. > > > >Hope this helps more, > >Christian > > > > > > > >>Thanks for the suggestion but using the mtmfft which i have done >already > >>and it works, my interest now is that i would like to use the Time > >>frequency analysis 'mtmconvol' to estimate the power in the time > >>frequency scale, in which how to get the whole 30secs continous data >in > >>one time frequency plot(TFR). > >> > >>Thanking you > >> > >>with regards > >>M.Muthuraman. > >> > >>>From: Christian Hesse > >>>Reply-To: FieldTrip discussion list > >>>To: FIELDTRIP at NIC.SURFNET.NL > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 > >>> > >>>Hi Muthuraman, > >>> > >>>>One more question regarding the Time frequency Analysis, i have EMG > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 >seconds > > >>>>of continous data). I would like to do the Timefrequency analysis >for > >>>>this data and to see the power for the whole 30 seconds > >>> > >>>use preprocessing to get the EMG data into a single 30s trial (if you > >>>want to analyze the rectified EMG, then do the rectification in > >>>preprocessing), then use frequanalysis with > >>> > >>>cfg.method = 'mtmfft'; > >>>cfg.output = 'pow'; > >>> > >>>this should give you the power spectrum of your EMG data over the > >>>entire 30 second period. > >>> > >>>Regards, > >>>Christian > >>> > >>> > >>>--------------------------------------------------------------------- - > >>>Christian Hesse, PhD, MIEEE > >>> > >>>F.C. Donders Centre for Cognitive Neuroimaging > >>>P.O. Box 9101 > >>>NL-6500 HB Nijmegen > >>>The Netherlands > >>> > >>>Tel.: +31 (0)24 36 68293 > >>>Fax: +31 (0)24 36 10989 > >>> > >>>Email: c.hesse at fcdonders.ru.nl > >>>Web: www.fcdonders.ru.nl > >>>--------------------------------------------------------------------- - > >>> > >>> > >>> > >>> > >> > >>_________________________________________________________________ > >>Tried the new MSN Messenger? It's cool! Download now. http:// > >>messenger.msn.com/Download/Default.aspx?mkt=en-in > >> > > > >---------------------------------------------------------------------- > >Christian Hesse, PhD, MIEEE > > > >F.C. Donders Centre for Cognitive Neuroimaging > >P.O. Box 9101 > >NL-6500 HB Nijmegen > >The Netherlands > > > >Tel.: +31 (0)24 36 68293 > >Fax: +31 (0)24 36 10989 > > > >Email: c.hesse at fcdonders.ru.nl > >Web: www.fcdonders.ru.nl > >---------------------------------------------------------------------- > > > > > > > > > >_________________________________________________________________ >Get Married in 2007. Join Shaadi.com >http://www.shaadi.com/ptnr.php?ptnr=mhottag _________________________________________________________________ Crave for a healthier lifestyle? Ask an expert http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm From arno at SALK.EDU Wed Feb 21 13:57:14 2007 From: arno at SALK.EDU (arno) Date: Wed, 21 Feb 2007 13:57:14 +0100 Subject: Neuromag data processing In-Reply-To: Message-ID: Is it possible to do source localization of Neuromag data using Fieldtrip? I looked at the documentation but did not find anything. How can I read the BEM model within Fieldtrip and use it. Just a few commands to start up would be useful. The goal of this is to allow EEGLAB users to perform source localization of their independent components through the EEGLAB-Fieldtrip pipeline. Thanks a lot, Arno From muthuraman10 at HOTMAIL.COM Wed Feb 21 14:39:52 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 21 Feb 2007 13:39:52 +0000 Subject: Time Frequency Analysis! In-Reply-To: <002d01c755b5$56993070$902dae83@fcdonders.nl> Message-ID: Hi JM, After changing the padding to 30 still i get the values from 0.125 to 0.625 and all the other values are Nan's in the TFR. Thanking you With regards M.Muthuraman >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Wed, 21 Feb 2007 13:39:33 +0100 > >Hi Muthu, > >Please put cfg.pad at 30. >As you can read in the frequency analysis tutorials, the cfg.pad is used to >pad out your data with zeros until the specified length, to obtain the >spectral interpolation required. I suspect that having your cfg.pad at only >2, while having a data length which is way longer, you run into problems. > >JM > > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Wednesday, February 21, 2007 1:15 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Hello JM, > >The time axis in my data which i define from 0 to 30 secs > >data1.time{1,1}=0:0.0375:29.99875; > >after making the changes it works now but i get the only values from > >0.125 to 0.625 and all the other values are Nan's > >thanking you > >with regards >M.Muthuraman. > > >From: Jan Mathijs Schoffelen > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Date: Wed, 21 Feb 2007 12:41:24 +0100 > > > >What's the time-axis in your data? > > > >JM > > > >-----Original Message----- > >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >Behalf > >Of Muthuraman Muthuraman > >Sent: Wednesday, February 21, 2007 12:16 PM > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > > >Hello, > > > >A brief on how to do i get the data1, I have the data for 24000 data >points > >with 800 Hz sampling rate (30 secs of data), i construct my own data >format > >according to the data format specified in fieltrip with > >data.label,fsample,trial,time. > >I tried the way you have mentioned with the window length > >this is what i do > > > >cfg=[]; > >winlen=0.5; > >halfwin=winlen/2; > >nwin=2.*(30./winlen)-1; > >cfg.output='pow'; > >cfg.method='mtmconvol'; > >cfg.channel = channelselection({'all' 'all'}, data1.label); > >cfg.foi=2:1:30; > >cfg.t_ftimwin=zeros(1,nwin).*winlen; > >cfg.toi=[0:halfwin:30-winlen]; > >cfg.taper='hanning'; > >cfg.pad=2; > >cfg.keeptrials='no'; > >TFRmult=freqanalysis(cfg,data1); > > > >and it throws a error > >??? Subscript indices must either be real positive integers or logicals. > > > >Error in ==> freqanalysis_mtmconvol at 424 > > autspctrmacttap(sgnlop,:) = dum(acttimboi); > > > >Error in ==> freqanalysis at 167 > >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); > > > >Please let me know, why do i get this error > > > > > >Thanking you > > > >with regards > >M.Muthuraman. > > > > >From: Christian Hesse > > >Reply-To: FieldTrip discussion list > > >To: FIELDTRIP at NIC.SURFNET.NL > > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > >Date: Mon, 19 Feb 2007 13:12:03 +0100 > > > > > >Hi Muthuraman, > > > > > >ok, in that case you can try the following (this assumes you have > >windows > > >of length "winlen" which overlap by "halfwin = winlen/2") > > > > > >winlen = 0.5; > > >% this is in seconds you can also use another time window > > >halfwin = winlen/2; > > > > > >% the total number of windows covering the 30 second period > > >nwin = 2.*(30./winlen) - 1; > > > > > >cfg.method = 'mtmconvol'; > > >cfg.output = 'pow'; > > >cfg.t_ftimwin = ones(1,nwin).*winlen; > > >cfg.toi = [0:halfwin:30-winlen]; > > > > > >The important things here to check are > > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements > > >2) the times you specify in cfg.toi actually correspond to your time > >axis > > >(i.e. do not start before or go on after). > > > > > >If you want to use a different overlap, you need to calculate nwin > > >slightly differently. > > > > > >Hope this helps more, > > >Christian > > > > > > > > > > > >>Thanks for the suggestion but using the mtmfft which i have done > >already > > >>and it works, my interest now is that i would like to use the Time > > >>frequency analysis 'mtmconvol' to estimate the power in the time > > >>frequency scale, in which how to get the whole 30secs continous data > >in > > >>one time frequency plot(TFR). > > >> > > >>Thanking you > > >> > > >>with regards > > >>M.Muthuraman. > > >> > > >>>From: Christian Hesse > > >>>Reply-To: FieldTrip discussion list > > >>>To: FIELDTRIP at NIC.SURFNET.NL > > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 > > >>> > > >>>Hi Muthuraman, > > >>> > > >>>>One more question regarding the Time frequency Analysis, i have EMG > > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 > >seconds > > > > >>>>of continous data). I would like to do the Timefrequency analysis > >for > > >>>>this data and to see the power for the whole 30 seconds > > >>> > > >>>use preprocessing to get the EMG data into a single 30s trial (if >you > > >>>want to analyze the rectified EMG, then do the rectification in > > >>>preprocessing), then use frequanalysis with > > >>> > > >>>cfg.method = 'mtmfft'; > > >>>cfg.output = 'pow'; > > >>> > > >>>this should give you the power spectrum of your EMG data over the > > >>>entire 30 second period. > > >>> > > >>>Regards, > > >>>Christian > > >>> > > >>> > > >>>--------------------------------------------------------------------- >- > > >>>Christian Hesse, PhD, MIEEE > > >>> > > >>>F.C. Donders Centre for Cognitive Neuroimaging > > >>>P.O. Box 9101 > > >>>NL-6500 HB Nijmegen > > >>>The Netherlands > > >>> > > >>>Tel.: +31 (0)24 36 68293 > > >>>Fax: +31 (0)24 36 10989 > > >>> > > >>>Email: c.hesse at fcdonders.ru.nl > > >>>Web: www.fcdonders.ru.nl > > >>>--------------------------------------------------------------------- >- > > >>> > > >>> > > >>> > > >>> > > >> > > >>_________________________________________________________________ > > >>Tried the new MSN Messenger? It's cool! Download now. http:// > > >>messenger.msn.com/Download/Default.aspx?mkt=en-in > > >> > > > > > >---------------------------------------------------------------------- > > >Christian Hesse, PhD, MIEEE > > > > > >F.C. Donders Centre for Cognitive Neuroimaging > > >P.O. Box 9101 > > >NL-6500 HB Nijmegen > > >The Netherlands > > > > > >Tel.: +31 (0)24 36 68293 > > >Fax: +31 (0)24 36 10989 > > > > > >Email: c.hesse at fcdonders.ru.nl > > >Web: www.fcdonders.ru.nl > > >---------------------------------------------------------------------- > > > > > > > > > > > > > > > >_________________________________________________________________ > >Get Married in 2007. Join Shaadi.com > >http://www.shaadi.com/ptnr.php?ptnr=mhottag > >_________________________________________________________________ >Crave for a healthier lifestyle? Ask an expert >http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm _________________________________________________________________ Spice up your IM conversations. New, colorful and animated emoticons. Get chatting! http://server1.msn.co.in/SP05/emoticons/ From Jan.Schoffelen at FCDONDERS.RU.NL Wed Feb 21 14:46:14 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 21 Feb 2007 14:46:14 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: What about specifying a correct time axis? I would say, that a sampling rate of 800 hertz has a sampling interval of 0.00125 seconds, so your data.time{1} = 0:0.00125:30-0.00125; instead of what you had. JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Wednesday, February 21, 2007 2:40 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Time Frequency Analysis! Hi JM, After changing the padding to 30 still i get the values from 0.125 to 0.625 and all the other values are Nan's in the TFR. Thanking you With regards M.Muthuraman >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Wed, 21 Feb 2007 13:39:33 +0100 > >Hi Muthu, > >Please put cfg.pad at 30. >As you can read in the frequency analysis tutorials, the cfg.pad is used to >pad out your data with zeros until the specified length, to obtain the >spectral interpolation required. I suspect that having your cfg.pad at only >2, while having a data length which is way longer, you run into problems. > >JM > > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Wednesday, February 21, 2007 1:15 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Hello JM, > >The time axis in my data which i define from 0 to 30 secs > >data1.time{1,1}=0:0.0375:29.99875; > >after making the changes it works now but i get the only values from > >0.125 to 0.625 and all the other values are Nan's > >thanking you > >with regards >M.Muthuraman. > > >From: Jan Mathijs Schoffelen > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Date: Wed, 21 Feb 2007 12:41:24 +0100 > > > >What's the time-axis in your data? > > > >JM > > > >-----Original Message----- > >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >Behalf > >Of Muthuraman Muthuraman > >Sent: Wednesday, February 21, 2007 12:16 PM > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > > >Hello, > > > >A brief on how to do i get the data1, I have the data for 24000 data >points > >with 800 Hz sampling rate (30 secs of data), i construct my own data >format > >according to the data format specified in fieltrip with > >data.label,fsample,trial,time. > >I tried the way you have mentioned with the window length > >this is what i do > > > >cfg=[]; > >winlen=0.5; > >halfwin=winlen/2; > >nwin=2.*(30./winlen)-1; > >cfg.output='pow'; > >cfg.method='mtmconvol'; > >cfg.channel = channelselection({'all' 'all'}, data1.label); > >cfg.foi=2:1:30; > >cfg.t_ftimwin=zeros(1,nwin).*winlen; > >cfg.toi=[0:halfwin:30-winlen]; > >cfg.taper='hanning'; > >cfg.pad=2; > >cfg.keeptrials='no'; > >TFRmult=freqanalysis(cfg,data1); > > > >and it throws a error > >??? Subscript indices must either be real positive integers or logicals. > > > >Error in ==> freqanalysis_mtmconvol at 424 > > autspctrmacttap(sgnlop,:) = dum(acttimboi); > > > >Error in ==> freqanalysis at 167 > >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); > > > >Please let me know, why do i get this error > > > > > >Thanking you > > > >with regards > >M.Muthuraman. > > > > >From: Christian Hesse > > >Reply-To: FieldTrip discussion list > > >To: FIELDTRIP at NIC.SURFNET.NL > > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > >Date: Mon, 19 Feb 2007 13:12:03 +0100 > > > > > >Hi Muthuraman, > > > > > >ok, in that case you can try the following (this assumes you have > >windows > > >of length "winlen" which overlap by "halfwin = winlen/2") > > > > > >winlen = 0.5; > > >% this is in seconds you can also use another time window > > >halfwin = winlen/2; > > > > > >% the total number of windows covering the 30 second period > > >nwin = 2.*(30./winlen) - 1; > > > > > >cfg.method = 'mtmconvol'; > > >cfg.output = 'pow'; > > >cfg.t_ftimwin = ones(1,nwin).*winlen; > > >cfg.toi = [0:halfwin:30-winlen]; > > > > > >The important things here to check are > > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements > > >2) the times you specify in cfg.toi actually correspond to your time > >axis > > >(i.e. do not start before or go on after). > > > > > >If you want to use a different overlap, you need to calculate nwin > > >slightly differently. > > > > > >Hope this helps more, > > >Christian > > > > > > > > > > > >>Thanks for the suggestion but using the mtmfft which i have done > >already > > >>and it works, my interest now is that i would like to use the Time > > >>frequency analysis 'mtmconvol' to estimate the power in the time > > >>frequency scale, in which how to get the whole 30secs continous data > >in > > >>one time frequency plot(TFR). > > >> > > >>Thanking you > > >> > > >>with regards > > >>M.Muthuraman. > > >> > > >>>From: Christian Hesse > > >>>Reply-To: FieldTrip discussion list > > >>>To: FIELDTRIP at NIC.SURFNET.NL > > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 > > >>> > > >>>Hi Muthuraman, > > >>> > > >>>>One more question regarding the Time frequency Analysis, i have EMG > > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 > >seconds > > > > >>>>of continous data). I would like to do the Timefrequency analysis > >for > > >>>>this data and to see the power for the whole 30 seconds > > >>> > > >>>use preprocessing to get the EMG data into a single 30s trial (if >you > > >>>want to analyze the rectified EMG, then do the rectification in > > >>>preprocessing), then use frequanalysis with > > >>> > > >>>cfg.method = 'mtmfft'; > > >>>cfg.output = 'pow'; > > >>> > > >>>this should give you the power spectrum of your EMG data over the > > >>>entire 30 second period. > > >>> > > >>>Regards, > > >>>Christian > > >>> > > >>> > > >>>--------------------------------------------------------------------- >- > > >>>Christian Hesse, PhD, MIEEE > > >>> > > >>>F.C. Donders Centre for Cognitive Neuroimaging > > >>>P.O. Box 9101 > > >>>NL-6500 HB Nijmegen > > >>>The Netherlands > > >>> > > >>>Tel.: +31 (0)24 36 68293 > > >>>Fax: +31 (0)24 36 10989 > > >>> > > >>>Email: c.hesse at fcdonders.ru.nl > > >>>Web: www.fcdonders.ru.nl > > >>>--------------------------------------------------------------------- >- > > >>> > > >>> > > >>> > > >>> > > >> > > >>_________________________________________________________________ > > >>Tried the new MSN Messenger? It's cool! Download now. http:// > > >>messenger.msn.com/Download/Default.aspx?mkt=en-in > > >> > > > > > >---------------------------------------------------------------------- > > >Christian Hesse, PhD, MIEEE > > > > > >F.C. Donders Centre for Cognitive Neuroimaging > > >P.O. Box 9101 > > >NL-6500 HB Nijmegen > > >The Netherlands > > > > > >Tel.: +31 (0)24 36 68293 > > >Fax: +31 (0)24 36 10989 > > > > > >Email: c.hesse at fcdonders.ru.nl > > >Web: www.fcdonders.ru.nl > > >---------------------------------------------------------------------- > > > > > > > > > > > > > > > >_________________________________________________________________ > >Get Married in 2007. Join Shaadi.com > >http://www.shaadi.com/ptnr.php?ptnr=mhottag > >_________________________________________________________________ >Crave for a healthier lifestyle? Ask an expert >http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm _________________________________________________________________ Spice up your IM conversations. New, colorful and animated emoticons. Get chatting! http://server1.msn.co.in/SP05/emoticons/ From Marcel.Bastiaansen at FCDONDERS.RU.NL Wed Feb 21 14:46:27 2007 From: Marcel.Bastiaansen at FCDONDERS.RU.NL (Marcel Bastiaansen) Date: Wed, 21 Feb 2007 14:46:27 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Dear Muthuraman & Jan Matthijs, It is good to have an email discussion list for fieldtrip, so that all users can benefit from each others problems, questions/answers and experiences with the software. However, if an email correspondence between two persons only involves highly user-specific details about scripts, properties of the data of that specific user etc., I think it would be better to switch to 'bilateral mode', that is, to continue the exchange of information outside of the discussion list. This prevent people's mailboxes of getting filled with lots of emails about details they don't need to know. Thanks, Marcel Muthuraman Muthuraman wrote: > Hi JM, > > After changing the padding to 30 still i get the values from 0.125 to > 0.625 and all the other values are Nan's in the TFR. > > Thanking you > > With regards > M.Muthuraman > > > >> From: Jan Mathijs Schoffelen >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> Date: Wed, 21 Feb 2007 13:39:33 +0100 >> >> Hi Muthu, >> >> Please put cfg.pad at 30. >> As you can read in the frequency analysis tutorials, the cfg.pad is >> used to >> pad out your data with zeros until the specified length, to obtain the >> spectral interpolation required. I suspect that having your cfg.pad >> at only >> 2, while having a data length which is way longer, you run into >> problems. >> >> JM >> >> >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf >> Of Muthuraman Muthuraman >> Sent: Wednesday, February 21, 2007 1:15 PM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> >> Hello JM, >> >> The time axis in my data which i define from 0 to 30 secs >> >> data1.time{1,1}=0:0.0375:29.99875; >> >> after making the changes it works now but i get the only values from >> >> 0.125 to 0.625 and all the other values are Nan's >> >> thanking you >> >> with regards >> M.Muthuraman. >> >> >From: Jan Mathijs Schoffelen >> >Reply-To: FieldTrip discussion list >> >To: FIELDTRIP at NIC.SURFNET.NL >> >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> >Date: Wed, 21 Feb 2007 12:41:24 +0100 >> > >> >What's the time-axis in your data? >> > >> >JM >> > >> >-----Original Message----- >> >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf >> >Of Muthuraman Muthuraman >> >Sent: Wednesday, February 21, 2007 12:16 PM >> >To: FIELDTRIP at NIC.SURFNET.NL >> >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> > >> >Hello, >> > >> >A brief on how to do i get the data1, I have the data for 24000 data >> points >> >with 800 Hz sampling rate (30 secs of data), i construct my own data >> format >> >according to the data format specified in fieltrip with >> >data.label,fsample,trial,time. >> >I tried the way you have mentioned with the window length >> >this is what i do >> > >> >cfg=[]; >> >winlen=0.5; >> >halfwin=winlen/2; >> >nwin=2.*(30./winlen)-1; >> >cfg.output='pow'; >> >cfg.method='mtmconvol'; >> >cfg.channel = channelselection({'all' 'all'}, data1.label); >> >cfg.foi=2:1:30; >> >cfg.t_ftimwin=zeros(1,nwin).*winlen; >> >cfg.toi=[0:halfwin:30-winlen]; >> >cfg.taper='hanning'; >> >cfg.pad=2; >> >cfg.keeptrials='no'; >> >TFRmult=freqanalysis(cfg,data1); >> > >> >and it throws a error >> >??? Subscript indices must either be real positive integers or >> logicals. >> > >> >Error in ==> freqanalysis_mtmconvol at 424 >> > autspctrmacttap(sgnlop,:) = dum(acttimboi); >> > >> >Error in ==> freqanalysis at 167 >> >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, >> data); >> > >> >Please let me know, why do i get this error >> > >> > >> >Thanking you >> > >> >with regards >> >M.Muthuraman. >> > >> > >From: Christian Hesse >> > >Reply-To: FieldTrip discussion list >> > >To: FIELDTRIP at NIC.SURFNET.NL >> > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> > >Date: Mon, 19 Feb 2007 13:12:03 +0100 >> > > >> > >Hi Muthuraman, >> > > >> > >ok, in that case you can try the following (this assumes you have >> >windows >> > >of length "winlen" which overlap by "halfwin = winlen/2") >> > > >> > >winlen = 0.5; >> > >% this is in seconds you can also use another time window >> > >halfwin = winlen/2; >> > > >> > >% the total number of windows covering the 30 second period >> > >nwin = 2.*(30./winlen) - 1; >> > > >> > >cfg.method = 'mtmconvol'; >> > >cfg.output = 'pow'; >> > >cfg.t_ftimwin = ones(1,nwin).*winlen; >> > >cfg.toi = [0:halfwin:30-winlen]; >> > > >> > >The important things here to check are >> > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >> > >2) the times you specify in cfg.toi actually correspond to your time >> >axis >> > >(i.e. do not start before or go on after). >> > > >> > >If you want to use a different overlap, you need to calculate nwin >> > >slightly differently. >> > > >> > >Hope this helps more, >> > >Christian >> > > >> > > >> > > >> > >>Thanks for the suggestion but using the mtmfft which i have done >> >already >> > >>and it works, my interest now is that i would like to use the Time >> > >>frequency analysis 'mtmconvol' to estimate the power in the time >> > >>frequency scale, in which how to get the whole 30secs continous >> data >> >in >> > >>one time frequency plot(TFR). >> > >> >> > >>Thanking you >> > >> >> > >>with regards >> > >>M.Muthuraman. >> > >> >> > >>>From: Christian Hesse >> > >>>Reply-To: FieldTrip discussion list >> > >>>To: FIELDTRIP at NIC.SURFNET.NL >> > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 >> > >>> >> > >>>Hi Muthuraman, >> > >>> >> > >>>>One more question regarding the Time frequency Analysis, i >> have EMG >> > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 >> >seconds >> > >> > >>>>of continous data). I would like to do the Timefrequency >> analysis >> >for >> > >>>>this data and to see the power for the whole 30 seconds >> > >>> >> > >>>use preprocessing to get the EMG data into a single 30s trial >> (if you >> > >>>want to analyze the rectified EMG, then do the rectification in >> > >>>preprocessing), then use frequanalysis with >> > >>> >> > >>>cfg.method = 'mtmfft'; >> > >>>cfg.output = 'pow'; >> > >>> >> > >>>this should give you the power spectrum of your EMG data over the >> > >>>entire 30 second period. >> > >>> >> > >>>Regards, >> > >>>Christian >> > >>> >> > >>> >> > >> >>>--------------------------------------------------------------------- >> - >> > >>>Christian Hesse, PhD, MIEEE >> > >>> >> > >>>F.C. Donders Centre for Cognitive Neuroimaging >> > >>>P.O. Box 9101 >> > >>>NL-6500 HB Nijmegen >> > >>>The Netherlands >> > >>> >> > >>>Tel.: +31 (0)24 36 68293 >> > >>>Fax: +31 (0)24 36 10989 >> > >>> >> > >>>Email: c.hesse at fcdonders.ru.nl >> > >>>Web: www.fcdonders.ru.nl >> > >> >>>--------------------------------------------------------------------- >> - >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >>_________________________________________________________________ >> > >>Tried the new MSN Messenger? It's cool! Download now. http:// >> > >>messenger.msn.com/Download/Default.aspx?mkt=en-in >> > >> >> > > >> > >> >---------------------------------------------------------------------- >> > >Christian Hesse, PhD, MIEEE >> > > >> > >F.C. Donders Centre for Cognitive Neuroimaging >> > >P.O. Box 9101 >> > >NL-6500 HB Nijmegen >> > >The Netherlands >> > > >> > >Tel.: +31 (0)24 36 68293 >> > >Fax: +31 (0)24 36 10989 >> > > >> > >Email: c.hesse at fcdonders.ru.nl >> > >Web: www.fcdonders.ru.nl >> > >> >---------------------------------------------------------------------- >> > > >> > > >> > > >> > > >> > >> >_________________________________________________________________ >> >Get Married in 2007. Join Shaadi.com >> >http://www.shaadi.com/ptnr.php?ptnr=mhottag >> >> _________________________________________________________________ >> Crave for a healthier lifestyle? Ask an expert >> http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm > > _________________________________________________________________ > Spice up your IM conversations. New, colorful and animated emoticons. > Get chatting! http://server1.msn.co.in/SP05/emoticons/ > -- dr. Marcel C.M. Bastiaansen. Max Planck Institute for Psycholinguistics Visiting Adress: Wundtlaan 1, 6525 XD Nijmegen, the Netherlands Mailing adress: P.O. Box 310, 6500 AH Nijmegen, the Netherlands phone: +31 24 3521 347 fax: +31 24 3521 213 mail: marcel.bastiaansen at mpi.nl web: http://www.mpi.nl/Members/MarcelBastiaansen and FC Donders Centre for Cognitive Neuroimaging Visiting address: Kapittelweg 29, 6525 EN Nijmegen, the Netherlands Mailing address: PO Box 9101, 6500 HB Nijmegen, the Netherlands phone: + 31 24 3610 882 fax: + 31 24 3610 989 mail: marcel.bastiaansen at fcdonders.ru.nl web: http://www.ru.nl/aspx/get.aspx?xdl=/views/run/xdl/page&ItmIdt=20592&SitIdt=119&VarIdt=96 -- From r.oostenveld at FCDONDERS.RU.NL Wed Feb 21 15:32:51 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 21 Feb 2007 15:32:51 +0100 Subject: too many mails on list? -> use digest mode In-Reply-To: <45DC4D33.8040800@fcdonders.ru.nl> Message-ID: Dear FieldTrip list subscribers, It seems that the amount of traffic on the list recently has increased quite a bit. That is good, since it means that there are ideas to be shared, but not all emails will be equally interesting to everyone. I still suggest to keep the discussions on the list and not move them off the list, since quite some other people on the list can also learn from it. Futhermore, it helps to distribute the load of replying to questions over multiple people. Also it is good to build up an archive with email correspondence that is accessible to everyone (see https://listserv.surfnet.nl/archives/fieldtrip.html). For people who feel that the number of mails on the list is too high, I have two suggestions 1) you can use email filter rules in your email client (works in Outlook, but also in most other email clients). 2) you can switch your subscription to the discussion list to "digest mode". With a "digest" subscription, you receive larger messages (called "digests") at regular intervals, usually once per day or once per week. These "digests" are collections of individual list postings. Some lists are so active that they produce several digests per day. Digests are a good compromise between reading everything as it is posted and feeling like the list is clogging your mailbox with a multitude of individual postings. You can switch to digest mode on the listserv website, see https:// listserv.surfnet.nl/scripts/wa.cgi?SUBED1=fieldtrip&A=1 best regards, Robert PS note that I don't know at the moment how the digests are currently configured on the FT discussion list, daily or even less frequent On 21 Feb 2007, at 14:46, Marcel Bastiaansen wrote: > It is good to have an email discussion list for fieldtrip, so that > all users can benefit from each others problems, questions/answers > and experiences with the software. > > However, if an email correspondence between two persons only > involves highly user-specific details about scripts, properties of > the data of that specific user etc., I think it would be better to > switch to 'bilateral mode', that is, to continue the exchange of > information outside of the discussion list. This prevent people's > mailboxes of getting filled with lots of emails about details they > don't need to know. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 21 15:43:37 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 21 Feb 2007 15:43:37 +0100 Subject: Neuromag data processing In-Reply-To: <45DC41AA.2020509@salk.edu> Message-ID: Hi Arno On 21 Feb 2007, at 13:57, arno wrote: > Is it possible to do source localization of Neuromag data using > Fieldtrip? I looked at the documentation but did not find anything. > How can I read the BEM model within Fieldtrip and use it. Just a > few commands to start up would be useful. Yes, that is possible. You can either use headmodels (single sphere, multi-sphere, or realistic single-shell) that are constructed within FieldTrip, but you can also use the neuromag mex files in combination with headmodels that were constructed in the Neuromag software. Since I do not have the complete neuomag software, I cannot explain in detail how to follow the second "neuromag" path: I did write part of the code for it, and included other parts contributed by Joachim Gross and Lauri Parkkonen, but I cannot easily test it myself or make a demo script. The first path (i.e. using "pure fieldtrip") is of course fully accessible to anyone. Note that although we at the Donders sometimes use the CTF software to construct headmodels, that is not a requirement as you can do it completely within FieldTrip. An example for the different MEG headmodels is given on http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:make_leadfields_using_different_headmodels I suggest that you start with the simplest one, a manually specified single-sphere model cfg.vol.r = 12; % radius, here in cm cfg.vol.r = [0 0 4]; % origin, here in cm The preferred headmodel is a single-shell model (based on an algorithm and code from Guido Nolte) which is the las one on the example page, see the PREPARE_SINGLESHELL function for that. Note that the headmodel, the anatomical MRI (for plotting and headmodel construction), the sensors and the dipoles all should be expressed in the same (head-)coordinate system. best regards, Robert From sameer at ANDREW.CMU.EDU Wed Feb 21 16:13:10 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 21 Feb 2007 10:13:10 -0500 Subject: eog artifact rejection In-Reply-To: <001e01c75509$e6400390$902dae83@fcdonders.nl> Message-ID: Dear JM and Christian, On Tue, 20 Feb 2007, Jan Mathijs Schoffelen wrote: > Dear sameer, > > Ad problem 1: Please specify: > > cfg.vartrllength = 2, prior to doing the timelockanalysis This fixed the problem, thanks. > Ad problem 2: Please specify: > > cfg.channelcmb = {'all' 'EOG'}, prior to doing freqdescriptives. (instead of > {'all' 'ECG'} Actually, I was using EOG, forgot to change it in the notes. so it is still not working. But I think I'll follow Christian's suggestion. I did not think of trying that with Fieldtrip data structure. I am assuming if I find components with artifacts, in one set of trials, the same components will be blink artifacts in all trials as the ICAs = W * trialdata. sameer > > > JM > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Sameer Walawalkar > Sent: Tuesday, February 20, 2007 5:07 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] eog artifact rejection > > I am interested in removing blink artifacts. Unfortunately, with > fieldtrip component analysis, it is difficult to identify the independent > component corresponding to blinks by visual inspection due to the short > timecourse over which they are presented (trial length). > > There are essentially two errors: > 1> ??? Error using ==> timelockanalysis > data has variable trial lengths, you specified not to accept that ! > 2> fdcomp.cohspctrm does not exist. > > I tried to follow instructions under independent component analysis (ICA) > to remove ECG artifacts replacing eog for ecg. (I did not do any > resampling). (Is this a good idea?) > > So I did, > % go back to the raw data on disk and detect the peaks in the EOG channel, > cfg = same.old.cfg.used.for.component.analysis.of.data; > cfg.artfctdef.eog.pretim = 0.25; > cfg.artfctdef.eog.psttim = 0.50-1/1200; > > [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts) > > > % preprocess the data around the peaks, i.e. read the segments of raw data > containing the EOG artifact > cfg = []; > cfg.dataset = 'JD_012507_Beeps_One.fif'; > cfg.datatype = 'continuous'; > cfg.padding = 10; > cfg.dftfilter = 'yes'; > cfg.blc = 'yes'; > cfg.trl = [artifact zeros(size(artifact,1),1)]; > cfg.channel = {'MEG' 'EOG'}; > data_eog = preprocessing(cfg) > > % decompose the ECG-locked datasegments into components, using the > previously found (un)mixing matrix > cfg = []; > cfg.topo = compRR_orig.topo; > cfg.topolabel = compRR_orig.topolabel; > comp_eog = componentanalysis(cfg, data_eog); > selecting 307 channels > baseline correcting data > starting decomposition using predetermined mixing matrix > total time in componentanalysis 1.2 seconds > > > % compute a frequency decomposition of all components and the ECG > > cfg = []; > timelock = timelockanalysis(cfg, comp_eog); > applying preprocessing options > ??? Error using ==> timelockanalysis > data has variable trial lengths, you specified not to accept that ! > > % compute a frequency decomposition of all components and the ECG > > cfg = []; > cfg.method = 'mtmfft'; > cfg.output = 'fourier'; > cfg.foilim = [0 100]; > cfg.taper = 'hanning'; > cfg.pad = 'maxperlen'; > freq = freqanalysis(cfg, comp_ecg); > > > % compute coherence between all components and the ECG > cfg = []; > cfg.channelcmb = {'all' 'ECG'}; > cfg.jackknife = 'no'; > fdcomp = freqdescriptives(cfg, freq); > > Even though I get computing cross-spectral densities message, I do not get > .cohspctrm. > > fdcomp = > > dimord: 'chan_freq' > freq: [1x155 double] > label: {307x1 cell} > powspctrm: [307x155 double] > dof: [307x155 double] > cfg: [1x1 struct] > > > Sorry for the long email, and thanks for your help. > > sameer > > From sameer at ANDREW.CMU.EDU Wed Feb 21 16:51:42 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 21 Feb 2007 10:51:42 -0500 Subject: rejectcomponent Message-ID: While using rejectcomponent, dataRR_clean = rejectcomponent(cfg, compRR_orig); removing 2 components keeping 305 components But I tried dataRR_clean = rejectcomponent(cfg, compRR_orig, dataRR); ??? Error using ==> rejectcomponent Too many input arguments. The second manner of rejecting components will be necessary if ICAs are done using data reduction. sameer From sghosh at HSS.IITD.AC.IN Thu Feb 22 05:25:09 2007 From: sghosh at HSS.IITD.AC.IN (Shantanu Ghosh) Date: Thu, 22 Feb 2007 05:25:09 +0100 Subject: Estimating the power in EEG frequency bands Message-ID: Hello FT users, When I want to analyze the power in different eeg frequency bands (alpha, beta, etc), do I use a grand average for all subjects, or do i take only data trial by trial for all electrodes, estimate the powers, and then average them for all trials? Thanks, Shantanu From c.hesse at FCDONDERS.RU.NL Thu Feb 22 09:40:42 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Thu, 22 Feb 2007 09:40:42 +0100 Subject: Estimating the power in EEG frequency bands In-Reply-To: Message-ID: Hi Shantanu, > When I want to analyze the power in different eeg frequency bands > (alpha, > beta, etc), do I use a grand average for all subjects, or do i take > only > data trial by trial for all electrodes, estimate the powers, and then > average them for all trials? You use the the latter approach, averaging the power over trials (subject average) and then over subjects (grand average) if you wish to look at INDUCED activity, i.e. task or event related modulation in the amplitude time-course of ongoing oscillatory activity (this analysis is not sensitive to the phase differences of the oscillations on different trials). You can also average the signals first (in the time domain) and then compute the power spectrum, in which case you will see the spectral properties of EVOKED activity, i.e., activity that is phase or time locked to the event / stimulus / response. Both of these time frequency visualizations give information that is complementary to looking a the time course of your event-related or evoked potentials (for EEG) or fields (for MEG) which you get by doing a time-locked average of the raw signals. Hope this helps to clarify, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulla.rantakokko at TKK.FI Thu Feb 22 15:37:21 2007 From: ulla.rantakokko at TKK.FI (Ulla Rantakokko) Date: Thu, 22 Feb 2007 16:37:21 +0200 Subject: neuromag/definetrial Message-ID: Hi, I have also similar problems to 'too many trials' i.e. I get over 800 trials that last all fixed 300 ms when I expect to get 64 trials with varying lentghs. What is the eventvalue? From where it comes? I get ten (instead of seven) event values of order 0.00067.. I get no reference to STI channels, only channels marked 'trial'. What are the trials corresponding to the raw data channels? regards Ulla From thomas at UCSD.EDU Thu Feb 22 15:39:43 2007 From: thomas at UCSD.EDU (Thomas Thesen) Date: Thu, 22 Feb 2007 09:39:43 -0500 Subject: Estimating the power in EEG frequency bands In-Reply-To: <07ECB755-0FBB-454B-9E26-3C5A04F645D1@fcdonders.ru.nl> Message-ID: Hi FieldTrippers, Following up on this conversation. It seems that the 'induced activity' contains both phase-locked and non-phase-locked activity, whereby the 'evoked' activity contains only phase-locked activity. Is it then kosher to separate these components by linear subtraction? For example, if we first compute the 'induced' activity by averaging power over individual trials, and from that subtract the 'evoked activity' (calculated based on average response) to get the induced activity without any phase-locked activity? So if Induced = Phase + Non-Phase And Evoked = Phase Then Non-Phase = Induced - Evoked Or does the fact that this is a linear operations on data that have been constructed through a non-linear process render this somehow invalid? It has certainly been done before. Your comments would be much appreciated. Cheers, Thomas _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Christian Hesse Sent: Thursday, February 22, 2007 3:41 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Estimating the power in EEG frequency bands Hi Shantanu, When I want to analyze the power in different eeg frequency bands (alpha, beta, etc), do I use a grand average for all subjects, or do i take only data trial by trial for all electrodes, estimate the powers, and then average them for all trials? You use the the latter approach, averaging the power over trials (subject average) and then over subjects (grand average) if you wish to look at INDUCED activity, i.e. task or event related modulation in the amplitude time-course of ongoing oscillatory activity (this analysis is not sensitive to the phase differences of the oscillations on different trials). You can also average the signals first (in the time domain) and then compute the power spectrum, in which case you will see the spectral properties of EVOKED activity, i.e., activity that is phase or time locked to the event / stimulus / response. Both of these time frequency visualizations give information that is complementary to looking a the time course of your event-related or evoked potentials (for EEG) or fields (for MEG) which you get by doing a time-locked average of the raw signals. Hope this helps to clarify, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marcel.Bastiaansen at FCDONDERS.RU.NL Thu Feb 22 15:52:56 2007 From: Marcel.Bastiaansen at FCDONDERS.RU.NL (Marcel Bastiaansen) Date: Thu, 22 Feb 2007 15:52:56 +0100 Subject: Estimating the power in EEG frequency bands In-Reply-To: <001d01c7568f$4b0d1890$0202fea9@D3K61L91> Message-ID: An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Thu Feb 22 16:38:56 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 22 Feb 2007 10:38:56 -0500 Subject: No subject Message-ID: Do I have to install fmrlab to be able to use binica? (Look below). this is all in interest of trying to do ICA as quick as possible. Runica or varimax seem to take 3 hrs (without pca reduction). cfg.method = 'binica' cfg.binica.pca = 50; compRR_binica_pca = componentanalysis(cfg, dataRR); selecting 307 channels baseline correcting data concatenating data.............................. concatenated data matrix size 307x120030 starting decomposition using binica binica: using source file '/home/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/EEGLab/eeglab5.03/eeglab5.03/functions/binica.sc' binica(): ica binary '/data/common/matlab/fmrlab/ica_linux' is not in your Matlab path, check ??? One or more output arguments not assigned during call to '/home/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/EEGLab/eeglab5.03/eeglab5.03/functions/binica.m (binica)'. Error in ==> componentanalysis at 331 [weights, sphere] = binica(dat, optarg{:}); On a connected note, rejectcomponent.m for rejecting ICAs gives an error when we pass three arguments (cfg, components, data). you need to do this (correct me if I am wrong) if you have done pca reduction. thanks, sameer From muthuraman10 at HOTMAIL.COM Thu Feb 22 17:21:28 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Thu, 22 Feb 2007 16:21:28 +0000 Subject: leadfieldmatrix! Message-ID: Hello Fieldtrippers, I am using the DICS algorithm for the source analysis, in which i am successfull upto the freqanalysis calculating coherence the next step inorder to use the source analysis. I construct the leadfield matrix the parameters are vol = []; vol.r = 12 * [0.88 0.92 1.00]; vol.c = [1 1/80 1]; vol.o = [0 0 0]; cfg1 = []; cfg1.elec = elec; cfg1.vol = vol; cfg1.resolution = 1; grid = prepare_leadfield(cfg1,freqmtmfft); I am constructing a volume conduction model with the elec file[standard locations from the Sphere2 ] which is been constructed for the 55 electrodes which i use for the source analysis, i get these warnings is it because the locations which i use from the standard location files. using headmodel specified in the configuration using electrodes specified in the configuration selected 55 electrodes 8 dipoles inside, 0 dipoles outside brain making tight grid 8 dipoles inside, 0 dipoles outside brain computing leadfield computing leadfield 1/8 Warning: electrodes do not ly on sphere surface -> using projection >In fieldtrip-20070109\private\eeg_leadfield4 at 60 In fieldtrip-20070109\private\compute_leadfield at 435 In prepare_leadfield at 209 and when i go on further with the source analysis with this leadfield matrix has cfg.frequency=9; cfg.method='dics'; cfg.grid=grid; cfg.elec=elec; cfg.vol=vol; [source]=sourceanalysis(cfg,freqmtmfft); %PLOTTING SOURCE cfg.location='interactive'; cfg.funparameter='source'; cfg.maskparameter='source'; sourceplot(cfg,source); and when i use the source plot i get the errors updating homogenous coordinate transformation matrix ??? Error using ==> horzcat The following error occurred converting from char to cell: Error using ==> cell Conversion to cell from char is not possible. Error in ==> fieldtrip-20070109\private\parameterselection at 77 if ~issubfield(data, param{i}) && issubfield(data, ['avg.' param{i}]) Error in ==> volumedownsample at 139 cfg.parameter = parameterselection(cfg.parameter, source); Error in ==> sourceplot at 203 interp = volumedownsample(tmpcfg, interp); sorry for the long mail Thanking you with regards M.Muthuraman. _________________________________________________________________ News and updates from Indian diaspora http://content.msn.co.in/NRI/Default From r.oostenveld at FCDONDERS.RU.NL Thu Feb 22 18:12:13 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 22 Feb 2007 18:12:13 +0100 Subject: leadfieldmatrix! In-Reply-To: Message-ID: On 22 Feb 2007, at 17:21, Muthuraman Muthuraman wrote: > Warning: electrodes do not ly on sphere surface -> using projection >> In fieldtrip-20070109\private\eeg_leadfield4 at 60 > In fieldtrip-20070109\private\compute_leadfield at 435 > In prepare_leadfield at 209 Electrodes of course should ly on the skin surface, that is the case in the real world and it should also be the case in your model. Did you plot the electrodes in combination with the sphere on which they should ly? You can use headmodelplot for that. > %PLOTTING SOURCE > > cfg.location='interactive'; > cfg.funparameter='source'; > cfg.maskparameter='source'; > sourceplot(cfg,source); Please update to the latest version of fieldtrip, the sourceplot function has recently been improved. The documentation of sourceplot explains how to use the funparameter and maskparameter. See also the tutorial documentation. Your specification 'source' is certainly not going to work, sice 'source' is not a source parameter. regards, Robert From r.oostenveld at FCDONDERS.RU.NL Thu Feb 22 18:18:43 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 22 Feb 2007 18:18:43 +0100 Subject: No subject In-Reply-To: Message-ID: Hi Sameer On 22 Feb 2007, at 16:38, Sameer Walawalkar wrote: > Do I have to install fmrlab to be able to use binica? (Look below). > this is all in interest of trying to do ICA as quick as possible. > Runica or varimax seem to take 3 hrs (without pca reduction). .... > starting decomposition using binica > binica: using source file '/home/sameer/KarmaCond/ > DataNeuroMagCondor2/MegSoftwareCondor2/EEGLab/eeglab5.03/eeglab5.03/ > functions/binica.sc' > binica(): ica binary '/data/common/matlab/fmrlab/ica_linux' is not > in your Matlab path, check it seems to me that in the EEGLAB binica.m wrapper-function the path to the actual binica linux binary is incorrectly hardcoded. I expect the ica_linux binary to be included in the EEGLAB release version, if not then I suggest that you contact the EEGLAB developpers. Robert From sameer at ANDREW.CMU.EDU Thu Feb 22 18:29:06 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 22 Feb 2007 12:29:06 -0500 Subject: resampling Message-ID: Hello, How exactly does resampling work? If I resample data to 300 Hz from 1KHz, will the resulting data structure have encoded information for going back to 1KHz? This is so that I could resample down, do ICA, remove components, and then get back to 1KHz. (Clearly, I dont understnad the resampling algorithm). thanks, sameer From c.hesse at FCDONDERS.RU.NL Thu Feb 22 19:28:10 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Thu, 22 Feb 2007 19:28:10 +0100 Subject: resampling In-Reply-To: Message-ID: Hi Sameer, If you are resampling your data for the purposes of speeding up the ICA algorithm, then you just take the (de-)mixing matrix and apply to your original data. Although I would recommend the following normalization of the mixing matrix (in the following A is the mixing matrix and W = inv(A) is the de-mixing matrix): [nchan, nsrcs] = size(A); for i=1:nsrcs A(:,i) = A(:,i)./norm(A(:,i),2); end W = inv(A); this way you ensure that your mixing (and de-mixing) matrix do not contain information about the power of the components but merely about spatial projections (and the spatial correlations of these), so that when you apply W to your data (at the original sampling rate), you can treat the variance (power) of the components s = Wx as "correct". Some further comments to bear in mind: since in estimating the ICA on the downsampled data you in effect assume that the high-frequency content (above the Nyquist limit of your resampling frequency) is not relevant. Hence you might as well continue working with the downsampled data. However, if there IS stuff going on in the high- frequency bands that is important (e.g., part of a string artifact signal which has a broad band spectrum), then the ICA model estimated on the downsampled data will effectively be "wrong" and will not be able to successfully separate your data into independent components. This may be an unlikely scenario for very high frequencies, but the considerations should guide you in choosing a resampling rate that is not "too low". Regards, Christian On 22 Feb 2007, at 18:29, Sameer Walawalkar wrote: > Hello, > > How exactly does resampling work? If I resample data to 300 Hz from > 1KHz, will the resulting data structure have encoded information > for going back to 1KHz? > > This is so that I could resample down, do ICA, remove components, > and then get back to 1KHz. (Clearly, I dont understnad the > resampling algorithm). > > thanks, > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Fri Feb 23 00:40:12 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 00:40:12 +0100 Subject: Estimating the power in EEG frequency bands In-Reply-To: <001d01c7568f$4b0d1890$0202fea9@D3K61L91> Message-ID: Hi Thomas, > Following up on this conversation. It seems that the ‘induced > activity’ contains both phase-locked and non-phase-locked activity, > whereby the ‘evoked’ activity contains only phase-locked activity. > Is it then kosher to separate these components by linear > subtraction? For example, if we first compute the ‘induced’ > activity by averaging power over individual trials, and from that > subtract the ‘evoked activity’ (calculated based on average > response) to get the induced activity without any phase-locked > activity? It is not correct to subtract because computing the induced and evoked power spectra involves squaring signal amplitudes (a non- linear operation), and hence, taking your terminology to refer to the instantaneous amplitudes of the signal components (this applies to any time-frequency tile) > Induced = Phase + Non-Phase > > And > > Evoked = Phase > > Then > > Non-Phase = Induced – Evoked > > what you actually get from spectral or time-frequency analysis is the power of your MEASURED signal Induced^2 = (Phase + Non-Phase)^2 = Phase^2 + 2*Phase*Non-Phase + Non- Phase^2 Evoked^2 = Phase^2 Then Induced^2 - Evoked^2 = 2*Phase*Non-Phase + Non-Phase^2 AND NOT Non- Phase^2 This bit of high-school algebra shows quite clearly that even if you had a perfect estimate of Evoked and Induced power (which you of course in practice do not have due to a finite number of trials, amplitude non-stationarities, artifacts and noise) it is not possible to obtain an estimate of Non-Phase^2 using time-frequency analysis, averaging and subtraction. Cheers, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Fri Feb 23 01:44:59 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 01:44:59 +0100 Subject: Estimating the power in EEG frequency bands In-Reply-To: Message-ID: One further comment (please see below): > Hi Thomas, >> Following up on this conversation. It seems that the ‘induced >> activity’ contains both phase-locked and non-phase-locked >> activity, whereby the ‘evoked’ activity contains only phase-locked >> activity. Is it then kosher to separate these components by linear >> subtraction? For example, if we first compute the ‘induced’ >> activity by averaging power over individual trials, and from that >> subtract the ‘evoked activity’ (calculated based on average >> response) to get the induced activity without any phase-locked >> activity? > > It is not correct to subtract because computing the induced and > evoked power spectra involves squaring signal amplitudes (a non- > linear operation), and hence, taking your terminology to refer to > the instantaneous amplitudes of the signal components (this applies > to any time-frequency tile) >> Induced = Phase + Non-Phase >> >> And >> >> Evoked = Phase >> >> Then >> >> Non-Phase = Induced – Evoked >> >> > what you actually get from spectral or time-frequency analysis is > the power of your MEASURED signal > > Induced^2 = (Phase + Non-Phase)^2 = Phase^2 + 2*Phase*Non-Phase + > Non-Phase^2 > > Evoked^2 = Phase^2 > > Then > > Induced^2 - Evoked^2 = 2*Phase*Non-Phase + Non-Phase^2 AND NOT Non- > Phase^2 > Note that the other crucial thing to consider here is that you are in one case averaging power over trials over trials: E[ (Induced^2) ] = E[ (Phase + Non-Phase)^2 ] = E[ (Phase^2 + 2*Phase*Non-Phase + Non-Phase^2) ] = E[ (Phase^2) ] E[ (Non- Phase^2) ] + E[ 2*Phase*Non-Phase ] this is why taking the square root of sqrt(Induced^2) does not give (Phase + Non-Phase) but sqrt(E[ (Phase+Non-Phase)^2 ]). in the evoked case you are taking the power of the average amplitude Evoked^2 = E[ Phase ]^2 (---> note the ^2 on the outside of the sum) so in subtracting you are actually assuming that E[Phase]^2 = E [(Phase)^2] which is unlikely to be accurate the case in finite samples. Hope I have not confused others (or myself) here. Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From werkle at MPIB-BERLIN.MPG.DE Fri Feb 23 12:24:42 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Fri, 23 Feb 2007 12:24:42 +0100 Subject: ICA based artifact correction and phase-locking Message-ID: Dear all, in my studies, I'm investigating early preceptual binding (visual) across the lifespan (i.e., I have data form children, younger and older adults) with EEG measures. My main interest concerns changes in gamma-power and measures of phase-synchronization in the gamma frequency range(e.g., phase-locking index, n:m (theta:gamma) phase synchronization). Currently I use a 'semi-automatic' procedure for artifact rejection, i.e., I use thresholding in the time-domain (min/max in segment -/+ 100µV)to 'suggest' contaminated epochs. After that I visually inspect the data again for eye-blink and muscle activity, and completely reject the contaminated epochs. The problem with this procedure is that, especially in the older adults group, for many subjects only too few trials remain in the final sample. Therefore, I thought I could use ICA for artifact correction (instead of complete rejection). After identification of the components that reflect muscle activity (and also other artifacts), I thought to recombine the remaining ICs and perform my analyses (power, PLI, n:m synchronization) on the recombined (cleaned data). Now my question(s): Is there any experience whether removing certain ICs may change the phase spectrum, i.e. may this approach induce some systematic bias? If there is a systematic bias, are different frequency bands affected differentialy? Could anyone give me some references on these issues? Any comments are very much appreciated. Best regards, Markus -- ************************************************************** Markus Werkle-Bergner, Dipl. Psych. Predoctoral Research Fellow Center for Lifespan Psychology Max Planck Institute for Human Development Lentzeallee 94, Room 211, D-14195 Berlin, Germany. Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 ************************************************************** From c.hesse at FCDONDERS.RU.NL Fri Feb 23 13:18:18 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 13:18:18 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: <45DECEFA.5030200@mpib-berlin.mpg.de> Message-ID: Hi Markus, the short answer is: if (and only if, big if by the way) ICA correctly separates artifacts from brain activity, and you correctly identify the artifact components, removal of the artifact components from your data does not affect the time-frequency properties (including phase) of the other components (i.e. the rest of the data) if you project back to the sensor level. This is because ICA assumes a linear (instantaneous) mixing of statistically independent signals. I would just try it out for the time being - if you get funny results (or things too good to be true), please get back in touch as there is also a slightly longer answer. Hope this helps, Christian On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: > Dear all, > > in my studies, I'm investigating early preceptual binding (visual) > across the lifespan (i.e., I have data form children, younger and > older > adults) with EEG measures. My main interest concerns changes in > gamma-power and measures of phase-synchronization in the gamma > frequency range(e.g., phase-locking index, n:m (theta:gamma) phase > synchronization). > > Currently I use a 'semi-automatic' procedure for artifact > rejection, i.e., I use thresholding in the time-domain (min/max in > segment -/+ 100µV)to 'suggest' contaminated epochs. After that I > visually inspect the data again for eye-blink and muscle activity, > and completely reject the contaminated epochs. > > The problem with this procedure is that, especially in the older > adults group, for many subjects only too few trials remain in the > final sample. > > Therefore, I thought I could use ICA for artifact correction > (instead of complete rejection). After identification of the > components that reflect muscle activity (and also other artifacts), > I thought to recombine the remaining ICs and perform my analyses > (power, PLI, n:m synchronization) on the recombined (cleaned data). > > Now my question(s): Is there any experience whether removing > certain ICs > may change the phase spectrum, i.e. may this approach induce some > systematic bias? If there is a systematic bias, are different > frequency > bands affected differentialy? Could anyone give me some references on > these issues? > > Any comments are very much appreciated. > > Best regards, > Markus > > -- > ************************************************************** > Markus Werkle-Bergner, Dipl. Psych. > Predoctoral Research Fellow > > Center for Lifespan Psychology > Max Planck Institute for Human Development > Lentzeallee 94, Room 211, D-14195 Berlin, Germany. > Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 > ************************************************************** > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From werkle at MPIB-BERLIN.MPG.DE Fri Feb 23 13:39:31 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Fri, 23 Feb 2007 13:39:31 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: Message-ID: Hi Christian, thank you for your fast reply. Indeed, I had the same thought and tried it out at least for the power-measures (the analysis for the PLI is currently underway). The results look somewhat similar (i.e., I used the original data from one subject (artifacts rejected according to the semi-automatic procedure) and compared the results with the ICA-cleaned data), although there are some changes: From my current view, I see the same spots of increased TF-power (in gamma but also in lower frequency ranges) in both analyses. However the main spots appear somewhat deminished in the ICA-cleaned data. Additionally, for high gamma-power (> 55 Hz), I recognize a power increase in the main spots. Because I expected some changes (i.e., I assumed to get rid of some artifactual muscle activity), now I can not judge whether these results are 'good' or 'bad'. Therefore, I would be interested in the 'slightly longer answer'. Furthermore, currently I do the ICA decomposition on all available segments (minus those with really excessive artifacts, which I took out before running ICA). This means, my trials are a mixture of clearly contaminated as well as clearly uncontaminated trials. Because my main goal is to identify the eye and muscle artifacts, would it improve the detection of components reflecting artifacts if I do the ICA decomposition only on pre-identified artifactual trials? (My idea is that then the components reflecting artifacts would catch less 'true' brain activity. But perhaps I have a missconception here ...) Thank you very much for your help. Best regards, Markus Christian Hesse schrieb: > Hi Markus, > > the short answer is: if (and only if, big if by the way) ICA correctly > separates artifacts from brain activity, and you correctly identify > the artifact components, removal of the artifact components from your > data does not affect the time-frequency properties (including phase) > of the other components (i.e. the rest of the data) if you project > back to the sensor level. This is because ICA assumes a linear > (instantaneous) mixing of statistically independent signals. > > I would just try it out for the time being - if you get funny results > (or things too good to be true), please get back in touch as there is > also a slightly longer answer. > > Hope this helps, > Christian > > > On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: > >> Dear all, >> >> in my studies, I'm investigating early preceptual binding (visual) >> across the lifespan (i.e., I have data form children, younger and older >> adults) with EEG measures. My main interest concerns changes in >> gamma-power and measures of phase-synchronization in the gamma >> frequency range(e.g., phase-locking index, n:m (theta:gamma) phase >> synchronization). >> >> Currently I use a 'semi-automatic' procedure for artifact rejection, >> i.e., I use thresholding in the time-domain (min/max in segment -/+ >> 100µV)to 'suggest' contaminated epochs. After that I visually inspect >> the data again for eye-blink and muscle activity, and completely >> reject the contaminated epochs. >> >> The problem with this procedure is that, especially in the older >> adults group, for many subjects only too few trials remain in the >> final sample. >> >> Therefore, I thought I could use ICA for artifact correction (instead >> of complete rejection). After identification of the components that >> reflect muscle activity (and also other artifacts), I thought to >> recombine the remaining ICs and perform my analyses (power, PLI, n:m >> synchronization) on the recombined (cleaned data). >> >> Now my question(s): Is there any experience whether removing certain ICs >> may change the phase spectrum, i.e. may this approach induce some >> systematic bias? If there is a systematic bias, are different frequency >> bands affected differentialy? Could anyone give me some references on >> these issues? >> >> Any comments are very much appreciated. >> >> Best regards, >> Markus >> >> -- >> ************************************************************** >> Markus Werkle-Bergner, Dipl. Psych. >> Predoctoral Research Fellow >> >> Center for Lifespan Psychology >> Max Planck Institute for Human Development >> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >> ************************************************************** >> > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > -- ************************************************************** Markus Werkle-Bergner, Dipl. Psych. Predoctoral Research Fellow Center for Lifespan Psychology Max Planck Institute for Human Development Lentzeallee 94, Room 211, D-14195 Berlin, Germany. Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 ************************************************************** From c.hesse at FCDONDERS.RU.NL Fri Feb 23 14:11:41 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 14:11:41 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: <45DEE083.9030509@mpib-berlin.mpg.de> Message-ID: Hi Markus, > Because I expected some changes (i.e., I assumed to get rid of some > artifactual muscle activity), now I can not judge whether these > results are 'good' or 'bad'. Therefore, I would be interested in > the 'slightly longer answer'. When applying ICA to "real" data (i.e. where we do not really know everything about how the observed data are really generated) it is actually impossible to tell "objectively" whether removing components and then reconstructing the signal leads to "good" or "bad" results - it is basically a judgement call. Alternatively, you could use indirect arguments, e.g. related to improved ability to discriminate between two different conditions or something like that. The only way you can tell whether you successfully removed components from data is using synthetic data where you have a "ground truth". (Philosophical / Methodological Aside: the same arguments apply to ANY mathematical or statistical method which involves numerical estimation of some model (always based on some assumptions) from data. Believe it or not, this would include nummerical integration techniques. The best you can ever do with numerical techniques is to understand their applicability criteria recognize their behaviour when these are criteria are not met. In the case of "real" data you must judge whether the data to satisfy the applicability criteria (big judgement), then brace yourself and jump ... that's as good as it ever gets, I am afraid :-) > Furthermore, currently I do the ICA decomposition on all available > segments (minus those with really excessive artifacts, which I took > out before running ICA). Why do you remove these epochs? Do the signals saturate or is there excessive electrode(-cap) or subject movement in these? > This means, my trials are a mixture of clearly contaminated as well > as clearly uncontaminated trials. Because my main goal is to > identify the eye and muscle artifacts, would it improve the > detection of components reflecting artifacts if I do the ICA > decomposition only on pre-identified artifactual trials? (My idea > is that then the components reflecting artifacts would catch less > 'true' brain activity. But perhaps I have a missconception here ...) The accuracy of the ICA decomposition relies fundamentally on the accuracy of the mixing matrix estimate A from which you form the de- mixing matrix (or vice versa). So if only some columns of A (e.g. artifact source sensor projections) are accurately estimated while the sensor projection estimates of brain activity are inaccurate (individually or as a subspace), then the de-mixing the data using W = inv(A) will not be fully successful in removing artifact activity from components reflecting the brain activity (subspace). In order to accurately estimate the sensor projections of ALL sources, the data needs to comprise example activity from ALL sources, i.e. BOTH artifact activity and brain activity. So since you need to estimate your brain activity (subspace) as accurately as your artifact sources, you should use as much of the data, i.e. contaminated and clean segments, as possible. How many EEG channels do you have, by the way? I need to know in order to continue with the 'slightly longer answer' Regards, Christian > > Thank you very much for your help. > > Best regards, > Markus > > Christian Hesse schrieb: >> Hi Markus, >> >> the short answer is: if (and only if, big if by the way) ICA >> correctly separates artifacts from brain activity, and you >> correctly identify the artifact components, removal of the >> artifact components from your data does not affect the time- >> frequency properties (including phase) of the other components >> (i.e. the rest of the data) if you project back to the sensor >> level. This is because ICA assumes a linear (instantaneous) mixing >> of statistically independent signals. >> >> I would just try it out for the time being - if you get funny >> results (or things too good to be true), please get back in touch >> as there is also a slightly longer answer. >> >> Hope this helps, >> Christian >> >> >> On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: >> >>> Dear all, >>> >>> in my studies, I'm investigating early preceptual binding (visual) >>> across the lifespan (i.e., I have data form children, younger and >>> older >>> adults) with EEG measures. My main interest concerns changes in >>> gamma-power and measures of phase-synchronization in the gamma >>> frequency range(e.g., phase-locking index, n:m (theta:gamma) >>> phase synchronization). >>> >>> Currently I use a 'semi-automatic' procedure for artifact >>> rejection, i.e., I use thresholding in the time-domain (min/max >>> in segment -/+ 100µV)to 'suggest' contaminated epochs. After that >>> I visually inspect the data again for eye-blink and muscle >>> activity, and completely reject the contaminated epochs. >>> >>> The problem with this procedure is that, especially in the older >>> adults group, for many subjects only too few trials remain in the >>> final sample. >>> >>> Therefore, I thought I could use ICA for artifact correction >>> (instead of complete rejection). After identification of the >>> components that reflect muscle activity (and also other >>> artifacts), I thought to recombine the remaining ICs and perform >>> my analyses (power, PLI, n:m synchronization) on the recombined >>> (cleaned data). >>> >>> Now my question(s): Is there any experience whether removing >>> certain ICs >>> may change the phase spectrum, i.e. may this approach induce some >>> systematic bias? If there is a systematic bias, are different >>> frequency >>> bands affected differentialy? Could anyone give me some >>> references on >>> these issues? >>> >>> Any comments are very much appreciated. >>> >>> Best regards, >>> Markus >>> >>> -- >>> ************************************************************** >>> Markus Werkle-Bergner, Dipl. Psych. >>> Predoctoral Research Fellow >>> >>> Center for Lifespan Psychology >>> Max Planck Institute for Human Development >>> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >>> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >>> ************************************************************** >>> >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 >> NL-6500 HB Nijmegen The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> > > > -- > ************************************************************** > Markus Werkle-Bergner, Dipl. Psych. > Predoctoral Research Fellow > > Center for Lifespan Psychology > Max Planck Institute for Human Development > Lentzeallee 94, Room 211, D-14195 Berlin, Germany. > Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 > ************************************************************** > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From werkle at MPIB-BERLIN.MPG.DE Fri Feb 23 14:36:43 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Fri, 23 Feb 2007 14:36:43 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: <54CFEDE8-1B36-4A40-8100-318034AEE2C0@fcdonders.ru.nl> Message-ID: Dear Christian, > Why do you remove these epochs? Do the signals saturate or is there > excessive electrode(-cap) or subject movement in these? > Yes, that's correct. I remove epochs before any further analysis, if I find saturated channels or excessive subject movements. > >> This means, my trials are a mixture of clearly contaminated as well >> as clearly uncontaminated trials. Because my main goal is to identify >> the eye and muscle artifacts, would it improve the detection of >> components reflecting artifacts if I do the ICA decomposition only on >> pre-identified artifactual trials? (My idea is that then the >> components reflecting artifacts would catch less 'true' brain >> activity. But perhaps I have a missconception here ...) > > The accuracy of the ICA decomposition relies fundamentally on the > accuracy of the mixing matrix estimate A from which you form the > de-mixing matrix (or vice versa). So if only some columns of A (e.g. > artifact source sensor projections) are accurately estimated while the > sensor projection estimates of brain activity are inaccurate > (individually or as a subspace), then the de-mixing the data using W = > inv(A) will not be fully successful in removing artifact activity from > components reflecting the brain activity (subspace). In order to > accurately estimate the sensor projections of ALL sources, the data > needs to comprise example activity from ALL sources, i.e. BOTH > artifact activity and brain activity. > Thanks for this clarification. > So since you need to estimate your brain activity (subspace) as > accurately as your artifact sources, you should use as much of the > data, i.e. contaminated and clean segments, as possible. > > How many EEG channels do you have, by the way? I need to know in order > to continue with the 'slightly longer answer' > I recorded my data from 60 Ag/Ag-Cl electrodes embedded in an elastic cap (with BrainAmp amplifiers) positioned according to the extended 10/20 system. Additionally, I record EOG with two electrodes placed at the outher canthi and one electrode placed below the left eye. All channels are referenced to the right mastoid during recording, while the left mastoid electrode is recorded as an additional active channel (off-line re-refrenced to the mean of both mastoids). Best regards, Markus > Regards, > Christian > > > >> >> Thank you very much for your help. >> >> Best regards, >> Markus >> >> Christian Hesse schrieb: >>> Hi Markus, >>> >>> the short answer is: if (and only if, big if by the way) ICA >>> correctly separates artifacts from brain activity, and you correctly >>> identify the artifact components, removal of the artifact components >>> from your data does not affect the time-frequency properties >>> (including phase) of the other components (i.e. the rest of the >>> data) if you project back to the sensor level. This is because ICA >>> assumes a linear (instantaneous) mixing of statistically independent >>> signals. >>> >>> I would just try it out for the time being - if you get funny >>> results (or things too good to be true), please get back in touch as >>> there is also a slightly longer answer. >>> >>> Hope this helps, >>> Christian >>> >>> >>> On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: >>> >>>> Dear all, >>>> >>>> in my studies, I'm investigating early preceptual binding (visual) >>>> across the lifespan (i.e., I have data form children, younger and older >>>> adults) with EEG measures. My main interest concerns changes in >>>> gamma-power and measures of phase-synchronization in the gamma >>>> frequency range(e.g., phase-locking index, n:m (theta:gamma) phase >>>> synchronization). >>>> >>>> Currently I use a 'semi-automatic' procedure for artifact >>>> rejection, i.e., I use thresholding in the time-domain (min/max in >>>> segment -/+ 100µV)to 'suggest' contaminated epochs. After that I >>>> visually inspect the data again for eye-blink and muscle activity, >>>> and completely reject the contaminated epochs. >>>> >>>> The problem with this procedure is that, especially in the older >>>> adults group, for many subjects only too few trials remain in the >>>> final sample. >>>> >>>> Therefore, I thought I could use ICA for artifact correction >>>> (instead of complete rejection). After identification of the >>>> components that reflect muscle activity (and also other artifacts), >>>> I thought to recombine the remaining ICs and perform my analyses >>>> (power, PLI, n:m synchronization) on the recombined (cleaned data). >>>> >>>> Now my question(s): Is there any experience whether removing >>>> certain ICs >>>> may change the phase spectrum, i.e. may this approach induce some >>>> systematic bias? If there is a systematic bias, are different frequency >>>> bands affected differentialy? Could anyone give me some references on >>>> these issues? >>>> >>>> Any comments are very much appreciated. >>>> >>>> Best regards, >>>> Markus >>>> >>>> -- >>>> ************************************************************** >>>> Markus Werkle-Bergner, Dipl. Psych. >>>> Predoctoral Research Fellow >>>> >>>> Center for Lifespan Psychology >>>> Max Planck Institute for Human Development >>>> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >>>> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >>>> ************************************************************** >>>> >>> >>> ---------------------------------------------------------------------- >>> Christian Hesse, PhD, MIEEE >>> >>> F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 >>> HB Nijmegen The Netherlands >>> >>> Tel.: +31 (0)24 36 68293 >>> Fax: +31 (0)24 36 10989 >>> >>> Email: c.hesse at fcdonders.ru.nl >>> Web: www.fcdonders.ru.nl >>> ---------------------------------------------------------------------- >>> >>> >>> >>> >> >> >> -- >> ************************************************************** >> Markus Werkle-Bergner, Dipl. Psych. >> Predoctoral Research Fellow >> >> Center for Lifespan Psychology >> Max Planck Institute for Human Development >> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >> ************************************************************** >> > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > -- ************************************************************** Markus Werkle-Bergner, Dipl. Psych. Predoctoral Research Fellow Center for Lifespan Psychology Max Planck Institute for Human Development Lentzeallee 94, Room 211, D-14195 Berlin, Germany. Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 ************************************************************** From muthuraman10 at HOTMAIL.COM Fri Feb 23 15:13:40 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Fri, 23 Feb 2007 14:13:40 +0000 Subject: Sourceplot! In-Reply-To: Message-ID: Hello, Thanks for the reply, i have plotted the headmodel plot for the 55 electrodes and attached it with this mail The next step of using the source analysis with calculated grid works without any problem, i needed to adjust elec structure according to the radius of the volume conduction model How can i plot the source, i do not have any anatomical MRI at this moment? Is there a way to see the results from the source analysis using DICS in the structure of a normal topoplot Thanking you With regards M.Muthuraman. >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] leadfieldmatrix! >Date: Thu, 22 Feb 2007 18:12:13 +0100 > >On 22 Feb 2007, at 17:21, Muthuraman Muthuraman wrote: > >>Warning: electrodes do not ly on sphere surface -> using projection >>>In fieldtrip-20070109\private\eeg_leadfield4 at 60 >> In fieldtrip-20070109\private\compute_leadfield at 435 >> In prepare_leadfield at 209 > >Electrodes of course should ly on the skin surface, that is the case in >the real world and it should also be the case in your model. Did you plot >the electrodes in combination with the sphere on which they should ly? You >can use headmodelplot for that. > >>%PLOTTING SOURCE >> >>cfg.location='interactive'; >>cfg.funparameter='source'; >>cfg.maskparameter='source'; >>sourceplot(cfg,source); > >Please update to the latest version of fieldtrip, the sourceplot function >has recently been improved. The documentation of sourceplot explains how >to use the funparameter and maskparameter. See also the tutorial >documentation. Your specification 'source' is certainly not going to work, >sice 'source' is not a source parameter. > >regards, >Robert _________________________________________________________________ Tried the new MSN Messenger? It�s cool! Download now. http://messenger.msn.com/Download/Default.aspx?mkt=en-in From s.debener at UKE.UNI-HAMBURG.DE Fri Feb 23 15:25:44 2007 From: s.debener at UKE.UNI-HAMBURG.DE (Stefan Debener) Date: Fri, 23 Feb 2007 14:25:44 +0000 Subject: ICA based artifact correction and phase-locking In-Reply-To: <45DEEDEB.3030103@mpib-berlin.mpg.de> Message-ID: Dear Markus, While Christian is certainly correct, I do have a more optimistic interpretation of ICA for artefact removal. In order to tell with some scientific "objectivity" whether any artefact removal improves your data or not, you should, in my opinion, always look at the amount of artefact removal AND the change in signal quality at the same time. For both artefact and signal you should have some a priori assumptions in mind what actually your signals and artefacts look like (you implicitely have this in mind by excluding some epochs and keeping others, or, more generally, for every single EEG signal processing step). If you keep this in mind, you will find that ICA sometimes, even though reducing the amount of artefact, also reduces the SNR. For a nice demo that this can happen, you may look up Debener et al., 2007, Neuroimage, 34, 587-97. However, in my experience, this happens only if you massively violate ICA assumptions. If you compare ICA artefact removal with any other artefact processing techniques (Gratton & Coles, epoch rejection, etc.) or uncorrected data, you will very likely find that ICA, if applied correctly, returns substantially better results. For an example where we could analyse ALL(!) recorded single trials from EEG data recorded inside a 3T MRI see: J Neurosci, 25, 11730-37. Marcel Bastiaansen from the FCD and others used the same ICA approach but with different tasks and components, and were similarly successful...In sum, from a practical standpoint, ICA can massivley improve your SNR and this in turn allows you to do things with your EEG data that otherwise seem impossible. You wrote that you observed channel saturation in your data. GIGO? ICA is not very good in the very high and very low frequency domain (personal opinion) and won't deal well with DC recorded data. In fact, a few drifting channels can easily spoil a decompositon....this and further issues are (hopefully) discussed in the EEGLAB tutorial, which also explains how to pre-process your data in order to obtain reasonable decompositions. Best, Stefan Markus Werkle-Bergner wrote: > Dear Christian, > > >> Why do you remove these epochs? Do the signals saturate or is there >> excessive electrode(-cap) or subject movement in these? >> > Yes, that's correct. I remove epochs before any further analysis, if I > find saturated channels or excessive subject movements. > >> >>> This means, my trials are a mixture of clearly contaminated as well >>> as clearly uncontaminated trials. Because my main goal is to >>> identify the eye and muscle artifacts, would it improve the >>> detection of components reflecting artifacts if I do the ICA >>> decomposition only on pre-identified artifactual trials? (My idea is >>> that then the components reflecting artifacts would catch less >>> 'true' brain activity. But perhaps I have a missconception here ...) >> >> The accuracy of the ICA decomposition relies fundamentally on the >> accuracy of the mixing matrix estimate A from which you form the >> de-mixing matrix (or vice versa). So if only some columns of A (e.g. >> artifact source sensor projections) are accurately estimated while >> the sensor projection estimates of brain activity are inaccurate >> (individually or as a subspace), then the de-mixing the data using W >> = inv(A) will not be fully successful in removing artifact activity >> from components reflecting the brain activity (subspace). In order to >> accurately estimate the sensor projections of ALL sources, the data >> needs to comprise example activity from ALL sources, i.e. BOTH >> artifact activity and brain activity. >> > > > Thanks for this clarification. > > >> So since you need to estimate your brain activity (subspace) as >> accurately as your artifact sources, you should use as much of the >> data, i.e. contaminated and clean segments, as possible. >> >> How many EEG channels do you have, by the way? I need to know in >> order to continue with the 'slightly longer answer' >> > > I recorded my data from 60 Ag/Ag-Cl electrodes embedded in an elastic > cap (with BrainAmp amplifiers) positioned according to the extended > 10/20 system. Additionally, I record EOG with two electrodes placed at > the outher canthi and one electrode placed below the left eye. All > channels are referenced to the right mastoid during recording, while > the left mastoid electrode is recorded as an additional active channel > (off-line re-refrenced to the mean of both mastoids). > > > Best regards, > Markus > > > > > >> Regards, >> Christian >> >> >> >>> >>> Thank you very much for your help. >>> >>> Best regards, >>> Markus >>> >>> Christian Hesse schrieb: >>>> Hi Markus, >>>> >>>> the short answer is: if (and only if, big if by the way) ICA >>>> correctly separates artifacts from brain activity, and you >>>> correctly identify the artifact components, removal of the artifact >>>> components from your data does not affect the time-frequency >>>> properties (including phase) of the other components (i.e. the rest >>>> of the data) if you project back to the sensor level. This is >>>> because ICA assumes a linear (instantaneous) mixing of >>>> statistically independent signals. >>>> >>>> I would just try it out for the time being - if you get funny >>>> results (or things too good to be true), please get back in touch >>>> as there is also a slightly longer answer. >>>> >>>> Hope this helps, >>>> Christian >>>> >>>> >>>> On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: >>>> >>>>> Dear all, >>>>> >>>>> in my studies, I'm investigating early preceptual binding (visual) >>>>> across the lifespan (i.e., I have data form children, younger and >>>>> older >>>>> adults) with EEG measures. My main interest concerns changes in >>>>> gamma-power and measures of phase-synchronization in the gamma >>>>> frequency range(e.g., phase-locking index, n:m (theta:gamma) phase >>>>> synchronization). >>>>> >>>>> Currently I use a 'semi-automatic' procedure for artifact >>>>> rejection, i.e., I use thresholding in the time-domain (min/max in >>>>> segment -/+ 100µV)to 'suggest' contaminated epochs. After that I >>>>> visually inspect the data again for eye-blink and muscle activity, >>>>> and completely reject the contaminated epochs. >>>>> >>>>> The problem with this procedure is that, especially in the older >>>>> adults group, for many subjects only too few trials remain in the >>>>> final sample. >>>>> >>>>> Therefore, I thought I could use ICA for artifact correction >>>>> (instead of complete rejection). After identification of the >>>>> components that reflect muscle activity (and also other >>>>> artifacts), I thought to recombine the remaining ICs and perform >>>>> my analyses (power, PLI, n:m synchronization) on the recombined >>>>> (cleaned data). >>>>> >>>>> Now my question(s): Is there any experience whether removing >>>>> certain ICs >>>>> may change the phase spectrum, i.e. may this approach induce some >>>>> systematic bias? If there is a systematic bias, are different >>>>> frequency >>>>> bands affected differentialy? Could anyone give me some references on >>>>> these issues? >>>>> >>>>> Any comments are very much appreciated. >>>>> >>>>> Best regards, >>>>> Markus >>>>> >>>>> -- >>>>> ************************************************************** >>>>> Markus Werkle-Bergner, Dipl. Psych. >>>>> Predoctoral Research Fellow >>>>> >>>>> Center for Lifespan Psychology >>>>> Max Planck Institute for Human Development >>>>> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >>>>> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >>>>> ************************************************************** >>>>> >>>> >>>> ---------------------------------------------------------------------- >>>> Christian Hesse, PhD, MIEEE >>>> >>>> F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 >>>> NL-6500 HB Nijmegen The Netherlands >>>> >>>> Tel.: +31 (0)24 36 68293 >>>> Fax: +31 (0)24 36 10989 >>>> >>>> Email: c.hesse at fcdonders.ru.nl >>>> Web: www.fcdonders.ru.nl >>>> ---------------------------------------------------------------------- >>>> >>>> >>>> >>>> >>> >>> >>> -- >>> ************************************************************** >>> Markus Werkle-Bergner, Dipl. Psych. >>> Predoctoral Research Fellow >>> >>> Center for Lifespan Psychology >>> Max Planck Institute for Human Development >>> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >>> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >>> ************************************************************** >>> >> >> ---------------------------------------------------------------------- >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 >> HB Nijmegen The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> ---------------------------------------------------------------------- >> >> >> >> > > From c.hesse at FCDONDERS.RU.NL Fri Feb 23 15:41:03 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 15:41:03 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: <45DEEDEB.3030103@mpib-berlin.mpg.de> Message-ID: Hi Markus, >> Why do you remove these epochs? Do the signals saturate or is >> there excessive electrode(-cap) or subject movement in these? >> > Yes, that's correct. I remove epochs before any further analysis, > if I find saturated channels or excessive subject movements. Seems reasonable to me, then. >> How many EEG channels do you have, by the way? I need to know in >> order to continue with the 'slightly longer answer' > > I recorded my data from 60 Ag/Ag-Cl electrodes embedded in an > elastic cap (with BrainAmp amplifiers) positioned according to the > extended 10/20 system. Additionally, I record EOG with two > electrodes placed at the outher canthi and one electrode placed > below the left eye. All channels are referenced to the right > mastoid during recording, while the left mastoid electrode is > recorded as an additional active channel (off-line re-refrenced to > the mean of both mastoids). Ok, thanks for this extra info. 60 channels is (I think) a good number in that you are less likely to be affected by the problem of over-fitting in ICA: this can sometimes happen when there are fewer source signals which are identifiable by the ICA algorithm (i.e., statistically independent signals with non-gaussian marginal distributions) than sensors. Note that fewer sources than sensors does not necessarily mean that your data is rank-deficient (you can easily check this by looking at the singular spectrum of your data matrix or, equivalently, at the spectrum of eigenvalues of the data covariance matrix - the former is gives the square root of the latter) because there is always some form of either "sensor" or "ambient" noise, which will have a gaussian distribution. The point is that when ICA has found all the obvious components (non-gaussian ones) it then tries to decompose the gaussian part of the signal into non-gaussian parts, and this will lead to so-called "over-fitting", which also affects the accuracy of the estimates of the "true" components. Different ICA algorithms behave differently in this case, some will give you spurious solutions, others will simply not converge to a solution (because there is none in the ICA sense, and throw an error of the code is smart enough to spot this). But you should not really have to worry too much about that; although do watch out for it: warnings and error messages about mixing or de- mixing matrix being (close to) singular is a good indication of over- fitting, and PCA-based dimension reduction of your data as part of the ICA is then recommended (though not a "magic" solution, either). When there are fewer channels than sources, you can have the opposite problem, namely under-fitting. In this situation, there are not enough components to describe all of the data, and the solution is then likely to be some sort of compromise, where "true" sources that are "weak" are spread over several ICs, none of which individually describes a source. In this case the accuracy of your mixing matrix estimate will also be "off", but the estimates of the stronger components are usually pretty robust in this case. What can also affect the accuracy of the mixing matrix estimate is the violation of the assumption of statistical independence of the sources, and this is pretty likely in the case of networks of neuronal populations displaying oscillatory activity with greater or lesser coherence because coherent signals (i.e. with a constant phase relationship other than 90 degrees) are generally not statistically independent. This need not be a disaster provided that the total activity of these coherent networks (i.e. in the signal subspace of coherent sources) is statistically independent of all the artifact stuff you wish to remove. Then you can go ahead with ICA and remove artifacts, but you will not necessarily be able to identify/interpret individual oscillatory components of brain activity. But since you do your analysis at the sensor level, this does not matter. Another problem related to ICA and sources of oscillatory activity is that the amplitude time course of this activity is generally modulated over time, which in turn can make these sources have marginal distributions which "look" essentially Gaussian, in which case the ICA algorithm may again be unable to correctly (or uniquely) identify the sensor projections associated with such source signals, EVEN if they are statistically independent, since ICA ONLY works exactly if the sources are statistically independent AND non-gaussian. So in summary, I guess my advice to you would be to always use EXTREME CAUTION when working with ICA :-), but to go ahead with what you're doing and just make sure you are able to robustly identity all of your artifacts, and don't spend too much time worrying about which components reflect brain activity, as this is likely to live in a subspace so individial topographies give a limited story. I really don't mean to sound negative, but these problems and limitations regularly occur in real life ICA-usage, and you need to know that it is not a "cure" for "bad" data (from an ICA point of view). Hope this helps, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 23 17:09:44 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 23 Feb 2007 11:09:44 -0500 Subject: Various ICA warnings and failures Message-ID: Hi, This mail has 3 questions related to implementing ICA is fieldtrip. 1) I am now getting the following warnings from runica I am getting these messages while doing ICA on a datafile which contains sss MaxFiltered data (Elekta Neuromag). When I visually inspect the independent components, they seem fairly identical to me. Their basic time structure seems to be same, just the scale is different. Prior to this, I had run ICA on the same datafile but with no MaxFiltering (or SSP projection for that matter). Final training data range: -0.00443438 to 0.00355995 Computing the sphering matrix... Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.156998e-29. > In runica at 774 In componentanalysis at 331 Starting weights are the identity matrix ... Sphering the data ... Beginning ICA training ... Data has rank 286. Cannot compute 307 components. Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.155705e-29. > In componentanalysis at 437 total time in componentanalysis 160.6 seconds 2) binica on this datafile just hangs, after one learning, it sends nan and just hangs. 3) Fast ICA is giving me following errors >> compRR_One_fastica_sss = componentanalysis(cfg,dataRR_One); Warning: cannot determine whether the FASTICA toolbox is present > In fieldtrip/private/hastoolbox at 121 In componentanalysis at 176 Warning: adding FASTICA toolbox to your Matlab path > In fieldtrip/private/hastoolbox at 145 In componentanalysis at 176 Warning: Name is nonexistent or not a directory: fastica. > In path at 113 In addpath at 100 In fieldtrip/private/hastoolbox at 146 In componentanalysis at 176 selecting 307 channels baseline correcting data concatenating data.............................. concatenated data matrix size 307x120030 starting decomposition using fastica Number of signals: 307 Number of samples: 120030 Calculating covariance... ??? Error using ==> componentanalysis call to fastica failed But when I do >> which fastica /mnt/condor2/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/FastICA_2.5/FastICA_25/fastica.m >> exist('fastica','file') (as seen in hastoolbox) ans = 2 thanks, sameer p.s: I am currently running varimax on the sssed data and binica on the non sssed to see what happens. From arno at SALK.EDU Fri Feb 23 18:02:34 2007 From: arno at SALK.EDU (arno) Date: Fri, 23 Feb 2007 18:02:34 +0100 Subject: Various ICA warnings and failures In-Reply-To: Message-ID: The rank problem might be related to this issue on 64-bit machines http://sccn.ucsd.edu/pipermail/eeglablist/2007/001675.html Best, Arno Sameer Walawalkar wrote: > Hi, > > This mail has 3 questions related to implementing ICA is fieldtrip. > > 1) > I am now getting the following warnings from runica > I am getting these messages while doing ICA on a datafile which contains > sss MaxFiltered data (Elekta Neuromag). When I visually inspect the > independent components, they seem fairly identical to me. Their basic > time > structure seems to be same, just the scale is different. > > Prior to this, I had run ICA on the same datafile but with no > MaxFiltering > (or SSP projection for that matter). > > Final training data range: -0.00443438 to 0.00355995 > Computing the sphering matrix... > Warning: Matrix is close to singular or badly scaled. > Results may be inaccurate. RCOND = 2.156998e-29. >> In runica at 774 > In componentanalysis at 331 > Starting weights are the identity matrix ... > Sphering the data ... > Beginning ICA training ... > Data has rank 286. Cannot compute 307 components. > Warning: Matrix is close to singular or badly scaled. > Results may be inaccurate. RCOND = 2.155705e-29. >> In componentanalysis at 437 > total time in componentanalysis 160.6 seconds > > 2) > binica on this datafile just hangs, after one learning, it sends nan > and just hangs. > > > > 3) > Fast ICA is giving me following errors >>> compRR_One_fastica_sss = componentanalysis(cfg,dataRR_One); > Warning: cannot determine whether the FASTICA toolbox is present >> In fieldtrip/private/hastoolbox at 121 > In componentanalysis at 176 > Warning: adding FASTICA toolbox to your Matlab path >> In fieldtrip/private/hastoolbox at 145 > In componentanalysis at 176 > Warning: Name is nonexistent or not a directory: fastica. >> In path at 113 > In addpath at 100 > In fieldtrip/private/hastoolbox at 146 > In componentanalysis at 176 > selecting 307 channels > baseline correcting data > concatenating data.............................. > concatenated data matrix size 307x120030 > starting decomposition using fastica > Number of signals: 307 > Number of samples: 120030 > Calculating covariance... > ??? Error using ==> componentanalysis > call to fastica failed > > But when I do >>> which fastica > /mnt/condor2/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/FastICA_2.5/FastICA_25/fastica.m > > >>> exist('fastica','file') (as seen in hastoolbox) > > ans = > > 2 > > > thanks, > sameer > > p.s: I am currently running varimax on the sssed data and binica on > the non sssed to see what happens. > From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Feb 23 18:09:29 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 23 Feb 2007 18:09:29 +0100 Subject: Sourceplot! In-Reply-To: Message-ID: Hello Muthuraman, >How can i plot the source, i do not have any anatomical MRI at this >moment? Is there a way to see the results from the source analysis >using DICS in the structure of a normal topoplot You can also plot your results without an MRI. Since your source data is a volume (3 space dimensions and one functional dimension) you can not plot it "in the structure a normal topoplot" (2 space dimensions, one functional dimension). You can plot slices from your volume. See the documentation on the new sourceplot function at the fieldtrip webpage. http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu torial:plotting More info can also be found in the help of sourceplot.m You cfg could for instance be: Cfg.method = 'slice'; Cfg.funparameter = 'pow'; (or what ever it is that you want to plot in color) Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Friday, February 23, 2007 3:14 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Sourceplot! Hello, Thanks for the reply, i have plotted the headmodel plot for the 55 electrodes and attached it with this mail The next step of using the source analysis with calculated grid works without any problem, i needed to adjust elec structure according to the radius of the volume conduction model How can i plot the source, i do not have any anatomical MRI at this moment? Is there a way to see the results from the source analysis using DICS in the structure of a normal topoplot Thanking you With regards M.Muthuraman. >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] leadfieldmatrix! >Date: Thu, 22 Feb 2007 18:12:13 +0100 > >On 22 Feb 2007, at 17:21, Muthuraman Muthuraman wrote: > >>Warning: electrodes do not ly on sphere surface -> using projection >>>In fieldtrip-20070109\private\eeg_leadfield4 at 60 >> In fieldtrip-20070109\private\compute_leadfield at 435 >> In prepare_leadfield at 209 > >Electrodes of course should ly on the skin surface, that is the case in >the real world and it should also be the case in your model. Did you plot >the electrodes in combination with the sphere on which they should ly? You >can use headmodelplot for that. > >>%PLOTTING SOURCE >> >>cfg.location='interactive'; >>cfg.funparameter='source'; >>cfg.maskparameter='source'; >>sourceplot(cfg,source); > >Please update to the latest version of fieldtrip, the sourceplot function >has recently been improved. The documentation of sourceplot explains how >to use the funparameter and maskparameter. See also the tutorial >documentation. Your specification 'source' is certainly not going to work, >sice 'source' is not a source parameter. > >regards, >Robert _________________________________________________________________ Tried the new MSN Messenger? It's cool! Download now. http://messenger.msn.com/Download/Default.aspx?mkt=en-in From alotof_xd at YAHOO.COM Fri Feb 23 20:29:27 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Fri, 23 Feb 2007 11:29:27 -0800 Subject: A question on Baseline choosing In-Reply-To: <008001c7576d$611e3590$642dae83@fcdonders.nl> Message-ID: Hi, experts, Could I know for block design, which kind of baseline you choose for analysis? Use common baseline before a block of stimuli, or use separate baseline just before each stimulus? I suppose if the data is ideal, there is not difference between these two. However, there is different results for real data. And could you give me the theoric support for the baseline choosing? Thanks. Best, Eve --------------------------------- Have a burning question? Go to Yahoo! Answers and get answers from real people who know. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 23 20:36:31 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 23 Feb 2007 14:36:31 -0500 Subject: TFR: labels in data and labels in layout do not match Message-ID: Hi, I am listing the settings and command used to plot time frequency analysis results. The analysis was done by blindly copying the material on the online example script. cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.foi = 1:2:30; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = -0.5:0.05:1.5; cfg.pad = 'maxperlen'; TFRmult = freqanalysis(cfg,data); the analysis works well giving the TFRmult variable. But cfgTFR = output: 'pow' channel: 'MEG' method: 'mtmconvol' foi: [20 22 24 26 28 30] t_ftimwin: [0.2500 0.2273 0.2083 0.1923 0.1786 0.1667] tapsmofrq: [8 8.8000 9.6000 10.4000 11.2000 12] toi: [1x41 double] pad: 'maxperlen' multiplotTFR(cfgTFRout, TFRmult); multiplotTFR(cfgTFRout, TFRmult); reading layout from file NM306all.lay ??? Error using ==> multiplotTFR labels in data and labels in layout do not match The NM306all.lay file has worked for ICAs in the past (used as shown below). for i = 1 : 8 subplot(2,4,i); topoplot(cfg, lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,i)); % for all title(num2str(i)); end thanks, sameer From sameer at ANDREW.CMU.EDU Fri Feb 23 20:39:53 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 23 Feb 2007 14:39:53 -0500 Subject: Various ICA warnings and failures In-Reply-To: <45DF1E2A.50504@salk.edu> Message-ID: thanks, This fixed the rank problem. With the new pop_runica, runica worked very fast on the ICA but the ICAs don't seem to make sense at all. As I said in the earlier email, they all look the same except for overall scale issues. best, sameer On Fri, 23 Feb 2007, arno wrote: > The rank problem might be related to this issue on 64-bit machines > > http://sccn.ucsd.edu/pipermail/eeglablist/2007/001675.html > > Best, > > Arno > > Sameer Walawalkar wrote: >> Hi, >> >> This mail has 3 questions related to implementing ICA is fieldtrip. >> >> 1) >> I am now getting the following warnings from runica >> I am getting these messages while doing ICA on a datafile which contains >> sss MaxFiltered data (Elekta Neuromag). When I visually inspect the >> independent components, they seem fairly identical to me. Their basic time >> structure seems to be same, just the scale is different. >> >> Prior to this, I had run ICA on the same datafile but with no MaxFiltering >> (or SSP projection for that matter). >> >> Final training data range: -0.00443438 to 0.00355995 >> Computing the sphering matrix... >> Warning: Matrix is close to singular or badly scaled. >> Results may be inaccurate. RCOND = 2.156998e-29. >>> In runica at 774 >> In componentanalysis at 331 >> Starting weights are the identity matrix ... >> Sphering the data ... >> Beginning ICA training ... >> Data has rank 286. Cannot compute 307 components. >> Warning: Matrix is close to singular or badly scaled. >> Results may be inaccurate. RCOND = 2.155705e-29. >>> In componentanalysis at 437 >> total time in componentanalysis 160.6 seconds >> >> 2) >> binica on this datafile just hangs, after one learning, it sends nan and >> just hangs. >> >> >> >> 3) >> Fast ICA is giving me following errors >>>> compRR_One_fastica_sss = componentanalysis(cfg,dataRR_One); >> Warning: cannot determine whether the FASTICA toolbox is present >>> In fieldtrip/private/hastoolbox at 121 >> In componentanalysis at 176 >> Warning: adding FASTICA toolbox to your Matlab path >>> In fieldtrip/private/hastoolbox at 145 >> In componentanalysis at 176 >> Warning: Name is nonexistent or not a directory: fastica. >>> In path at 113 >> In addpath at 100 >> In fieldtrip/private/hastoolbox at 146 >> In componentanalysis at 176 >> selecting 307 channels >> baseline correcting data >> concatenating data.............................. >> concatenated data matrix size 307x120030 >> starting decomposition using fastica >> Number of signals: 307 >> Number of samples: 120030 >> Calculating covariance... >> ??? Error using ==> componentanalysis >> call to fastica failed >> >> But when I do >>>> which fastica >> /mnt/condor2/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/FastICA_2.5/FastICA_25/fastica.m >> >>>> exist('fastica','file') (as seen in hastoolbox) >> >> ans = >> >> 2 >> >> >> thanks, >> sameer >> >> p.s: I am currently running varimax on the sssed data and binica on the non >> sssed to see what happens. >> > > From sameer at ANDREW.CMU.EDU Fri Feb 23 21:01:10 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 23 Feb 2007 15:01:10 -0500 Subject: only two components! Message-ID: Hi, please add case 'FASTICA' status = exist('fastica','file'); to your hastoolbox file. but after I do that, I get only two components for 306 channel Neuromag data! It might be related to my crude adding shown above, but... cfg.method = 'fastica'; >> compRR_one_sss_fastica = componentanalysis(cfg,dataRR_One) selecting 307 channels baseline correcting data concatenating data.............................. concatenated data matrix size 307x120030 starting decomposition using fastica Number of signals: 307 Number of samples: 120030 Calculating covariance... Reducing dimension... Selected [ 2 ] dimensions. Smallest remaining (non-zero) eigenvalue [ 1.04859e+08 ] Largest remaining (non-zero) eigenvalue [ 2.68806e+09 ] Sum of removed eigenvalues [ 8.96883e-05 ] [ 100 ] % of (non-zero) eigenvalues retained. Whitening... Check: covariance differs from identity by [ 1.9984e-15 ]. Used approach [ defl ]. Used nonlinearity [ pow3 ]. Starting ICA calculation... IC 1 .....computed ( 5 steps ) IC 2 ..computed ( 2 steps ) Done. Adding the mean back to the data. total time in componentanalysis 46.9 seconds compRR_one_sss_fastica = fsample: 1000 time: {1x30 cell} trial: {1x30 cell} label: {307x1 cell} topolabel: {307x1 cell} topo: [307x2 double] cfg: [1x1 struct] best, sameer From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Feb 23 21:24:43 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 23 Feb 2007 21:24:43 +0100 Subject: TFR: labels in data and labels in layout do not match In-Reply-To: Message-ID: Hi Sameer, What is TFRmult.label? If everything did what it should, that should be a cell array with the labels of the 306 channels. The names of those channels should match the names in the NM306all.lay (5th column). That it worked for the ica plotting is because there you called topoplot.m directly, and now you use topoplotTFR.m, in the last function the labels are checked. Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Friday, February 23, 2007 8:37 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] TFR: labels in data and labels in layout do not match Hi, I am listing the settings and command used to plot time frequency analysis results. The analysis was done by blindly copying the material on the online example script. cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.foi = 1:2:30; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = -0.5:0.05:1.5; cfg.pad = 'maxperlen'; TFRmult = freqanalysis(cfg,data); the analysis works well giving the TFRmult variable. But cfgTFR = output: 'pow' channel: 'MEG' method: 'mtmconvol' foi: [20 22 24 26 28 30] t_ftimwin: [0.2500 0.2273 0.2083 0.1923 0.1786 0.1667] tapsmofrq: [8 8.8000 9.6000 10.4000 11.2000 12] toi: [1x41 double] pad: 'maxperlen' multiplotTFR(cfgTFRout, TFRmult); multiplotTFR(cfgTFRout, TFRmult); reading layout from file NM306all.lay ??? Error using ==> multiplotTFR labels in data and labels in layout do not match The NM306all.lay file has worked for ICAs in the past (used as shown below). for i = 1 : 8 subplot(2,4,i); topoplot(cfg, lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,i)); % for all title(num2str(i)); end thanks, sameer From arno at SALK.EDU Sat Feb 24 12:12:28 2007 From: arno at SALK.EDU (arno) Date: Sat, 24 Feb 2007 12:12:28 +0100 Subject: No subject In-Reply-To: <7836F6CC-746D-48A3-A359-B9B64384815D@fcdonders.ru.nl> Message-ID: Yes, ica_linux is included by you have to setup the correct path in the file icadefs.m This is described on the web page when you download binica usually. Hope this helps, Arno Robert Oostenveld wrote: > Hi Sameer > > On 22 Feb 2007, at 16:38, Sameer Walawalkar wrote: >> Do I have to install fmrlab to be able to use binica? (Look below). >> this is all in interest of trying to do ICA as quick as possible. >> Runica or varimax seem to take 3 hrs (without pca reduction). > > .... > >> starting decomposition using binica >> binica: using source file >> '/home/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/EEGLab/eeglab5.03/eeglab5.03/functions/binica.sc' >> >> binica(): ica binary '/data/common/matlab/fmrlab/ica_linux' is not in >> your Matlab path, check > > it seems to me that in the EEGLAB binica.m wrapper-function the path > to the actual binica linux binary is incorrectly hardcoded. I expect > the ica_linux binary to be included in the EEGLAB release version, if > not then I suggest that you contact the EEGLAB developpers. > > Robert > > > > From abastos at BERKELEY.EDU Sun Feb 25 04:12:36 2007 From: abastos at BERKELEY.EDU (Andre Bastos) Date: Sat, 24 Feb 2007 19:12:36 -0800 Subject: displaying 4d power and coherence data In-Reply-To: <45E01D9C.1050202@salk.edu> Message-ID: Hello, I am trying to display 4d coherence and power data (num trials x num time points x num electrodes or elec pairs x freq). Do the plotting functions in fieldtrip handle this case or do I have to reduce the dimensionality by averaging across num trials? Thanks Andre From ingrid.nieuwenhuis at FCDONDERS.RU.NL Sun Feb 25 16:35:55 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Sun, 25 Feb 2007 16:35:55 +0100 Subject: displaying 4d power and coherence data In-Reply-To: <61826.69.181.124.179.1172373156.squirrel@calmail.berkeley.edu> Message-ID: Hi Andre, Yes, the plotting functions do not handle multiple trials, so you have to average over trials first before plotting. Bests Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Andre Bastos Sent: Sunday, February 25, 2007 4:13 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] displaying 4d power and coherence data Hello, I am trying to display 4d coherence and power data (num trials x num time points x num electrodes or elec pairs x freq). Do the plotting functions in fieldtrip handle this case or do I have to reduce the dimensionality by averaging across num trials? Thanks Andre From muthuraman10 at HOTMAIL.COM Mon Feb 26 11:11:38 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 26 Feb 2007 10:11:38 +0000 Subject: Sourceplot! In-Reply-To: <008001c7576d$611e3590$642dae83@fcdonders.nl> Message-ID: Hello Ingrid, Thanks for the answer, i tried to plot using the source plot with this configuration and i get the error, in this case should i need to transform the data before i plot cfg.method='slice'; cfg.funparameter='coh'; cfg.nslices = 20; cfg.slicedim = 3; sourceplot(cfg,fdmtmfft); ??? Reference to non-existent field 'dim'. Error in ==> fieldtrip-20070222\private\grid2transform at 9 if ~isfield(volume, 'xgrid'), volume.xgrid=1:volume.dim(1); end Error in ==> sourceplot at 189 data = grid2transform(data); Thanking you With regards M.Muthuraman. >From: Ingrid Nieuwenhuis >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Sourceplot! >Date: Fri, 23 Feb 2007 18:09:29 +0100 > >Hello Muthuraman, > > >How can i plot the source, i do not have any anatomical MRI at this > >moment? Is there a way to see the results from the source analysis > >using DICS in the structure of a normal topoplot > >You can also plot your results without an MRI. >Since your source data is a volume (3 space dimensions and one functional >dimension) you can not plot it "in the structure a normal topoplot" (2 >space >dimensions, one functional dimension). You can plot slices from your >volume. > >See the documentation on the new sourceplot function at the fieldtrip >webpage. > >http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu >torial:plotting > >More info can also be found in the help of sourceplot.m > >You cfg could for instance be: > >Cfg.method = 'slice'; >Cfg.funparameter = 'pow'; (or what ever it is that you want to plot in >color) > >Good luck, > >Ingrid > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Friday, February 23, 2007 3:14 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Sourceplot! > >Hello, > >Thanks for the reply, i have plotted the headmodel plot for the 55 >electrodes and attached it with this mail > >The next step of using the source analysis with calculated grid works >without any problem, >i needed to adjust elec structure according to the radius of the volume >conduction model > >How can i plot the source, i do not have any anatomical MRI at this moment? >Is there a way to see the results from the source analysis using DICS in >the > >structure of a normal topoplot > >Thanking you > >With regards >M.Muthuraman. > > > > >From: Robert Oostenveld > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] leadfieldmatrix! > >Date: Thu, 22 Feb 2007 18:12:13 +0100 > > > >On 22 Feb 2007, at 17:21, Muthuraman Muthuraman wrote: > > > >>Warning: electrodes do not ly on sphere surface -> using projection > >>>In fieldtrip-20070109\private\eeg_leadfield4 at 60 > >> In fieldtrip-20070109\private\compute_leadfield at 435 > >> In prepare_leadfield at 209 > > > >Electrodes of course should ly on the skin surface, that is the case in > >the real world and it should also be the case in your model. Did you >plot > >the electrodes in combination with the sphere on which they should ly? >You > > >can use headmodelplot for that. > > > >>%PLOTTING SOURCE > >> > >>cfg.location='interactive'; > >>cfg.funparameter='source'; > >>cfg.maskparameter='source'; > >>sourceplot(cfg,source); > > > >Please update to the latest version of fieldtrip, the sourceplot >function > >has recently been improved. The documentation of sourceplot explains how > >to use the funparameter and maskparameter. See also the tutorial > >documentation. Your specification 'source' is certainly not going to >work, > > >sice 'source' is not a source parameter. > > > >regards, > >Robert > >_________________________________________________________________ >Tried the new MSN Messenger? It's cool! Download now. >http://messenger.msn.com/Download/Default.aspx?mkt=en-in _________________________________________________________________ "Airtel Song Catcher. Get your Hello Tunes instantly" http://www.airtel.in/songcatcher/SONG_CATCHER.html From werkle at MPIB-BERLIN.MPG.DE Mon Feb 26 11:49:18 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Mon, 26 Feb 2007 11:49:18 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: Message-ID: Hi Christian, hi Stefan, I thank both of you for your helpful comments. I now know better about the possible problems, but I also see that it may be worth a try. I will keep you posted about the progress via the discussion list as soon as new problems arise ;-) Thank you and best regards, Markus Christian Hesse schrieb: > Hi Markus, > >>> Why do you remove these epochs? Do the signals saturate or is there >>> excessive electrode(-cap) or subject movement in these? >>> >> Yes, that's correct. I remove epochs before any further analysis, if >> I find saturated channels or excessive subject movements. > > Seems reasonable to me, then. > > >>> How many EEG channels do you have, by the way? I need to know in >>> order to continue with the 'slightly longer answer' >> >> I recorded my data from 60 Ag/Ag-Cl electrodes embedded in an elastic >> cap (with BrainAmp amplifiers) positioned according to the extended >> 10/20 system. Additionally, I record EOG with two electrodes placed >> at the outher canthi and one electrode placed below the left eye. All >> channels are referenced to the right mastoid during recording, while >> the left mastoid electrode is recorded as an additional active >> channel (off-line re-refrenced to the mean of both mastoids). > > Ok, thanks for this extra info. 60 channels is (I think) a good number > in that you are less likely to be affected by the problem of > over-fitting in ICA: this can sometimes happen when there are fewer > source signals which are identifiable by the ICA algorithm (i.e., > statistically independent signals with non-gaussian marginal > distributions) than sensors. Note that fewer sources than sensors does > not necessarily mean that your data is rank-deficient (you can easily > check this by looking at the singular spectrum of your data matrix or, > equivalently, at the spectrum of eigenvalues of the data covariance > matrix - the former is gives the square root of the latter) because > there is always some form of either "sensor" or "ambient" noise, which > will have a gaussian distribution. The point is that when ICA has > found all the obvious components (non-gaussian ones) it then tries to > decompose the gaussian part of the signal into non-gaussian parts, and > this will lead to so-called "over-fitting", which also affects the > accuracy of the estimates of the "true" components. Different ICA > algorithms behave differently in this case, some will give you > spurious solutions, others will simply not converge to a solution > (because there is none in the ICA sense, and throw an error of the > code is smart enough to spot this). But you should not really have to > worry too much about that; although do watch out for it: warnings and > error messages about mixing or de-mixing matrix being (close to) > singular is a good indication of over-fitting, and PCA-based dimension > reduction of your data as part of the ICA is then recommended (though > not a "magic" solution, either). > > When there are fewer channels than sources, you can have the opposite > problem, namely under-fitting. In this situation, there are not enough > components to describe all of the data, and the solution is then > likely to be some sort of compromise, where "true" sources that are > "weak" are spread over several ICs, none of which individually > describes a source. In this case the accuracy of your mixing matrix > estimate will also be "off", but the estimates of the stronger > components are usually pretty robust in this case. > > What can also affect the accuracy of the mixing matrix estimate is the > violation of the assumption of statistical independence of the > sources, and this is pretty likely in the case of networks of neuronal > populations displaying oscillatory activity with greater or lesser > coherence because coherent signals (i.e. with a constant phase > relationship other than 90 degrees) are generally not statistically > independent. This need not be a disaster provided that the total > activity of these coherent networks (i.e. in the signal subspace of > coherent sources) is statistically independent of all the artifact > stuff you wish to remove. Then you can go ahead with ICA and remove > artifacts, but you will not necessarily be able to identify/interpret > individual oscillatory components of brain activity. But since you do > your analysis at the sensor level, this does not matter. > > Another problem related to ICA and sources of oscillatory activity is > that the amplitude time course of this activity is generally modulated > over time, which in turn can make these sources have marginal > distributions which "look" essentially Gaussian, in which case the ICA > algorithm may again be unable to correctly (or uniquely) identify the > sensor projections associated with such source signals, EVEN if they > are statistically independent, since ICA ONLY works exactly if the > sources are statistically independent AND non-gaussian. > > So in summary, I guess my advice to you would be to always use EXTREME > CAUTION when working with ICA :-), but to go ahead with what you're > doing and just make sure you are able to robustly identity all of your > artifacts, and don't spend too much time worrying about which > components reflect brain activity, as this is likely to live in a > subspace so individial topographies give a limited story. I really > don't mean to sound negative, but these problems and limitations > regularly occur in real life ICA-usage, and you need to know that it > is not a "cure" for "bad" data (from an ICA point of view). > > Hope this helps, > Christian > > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > -- ************************************************************** Markus Werkle-Bergner, Dipl. Psych. Predoctoral Research Fellow Center for Lifespan Psychology Max Planck Institute for Human Development Lentzeallee 94, Room 211, D-14195 Berlin, Germany. Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 ************************************************************** From r.oostenveld at FCDONDERS.RU.NL Mon Feb 26 14:39:28 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 26 Feb 2007 14:39:28 +0100 Subject: TFR: labels in data and labels in layout do not match In-Reply-To: Message-ID: Hi Sameer On 23 Feb 2007, at 20:36, Sameer Walawalkar wrote: > cfgTFR = > output: 'pow' > channel: 'MEG' > ... > > multiplotTFR(cfgTFRout, TFRmult); > > multiplotTFR(cfgTFRout, TFRmult); > reading layout from file NM306all.lay > ??? Error using ==> multiplotTFR > labels in data and labels in layout do not match I suspect the problem might be related to channel selection (do "help channelselection"). The indication cfg.channel = 'MEG' results in a selection of known MEG channels, but that selection was implemented for the CTF system (where MEG channels start with the letter "M") and might not work for your Neuromag data. please try cfg1.channel = 'MEG' % or something else cfg2.channel = channelselection(cfg1.channel, data.label) and you will see which channels are selected for subsequent processing (in this case plotting, but the same applies to all other analyses). best regards, Robert PS note that you can do dbstop if error on the matlab command line and you will automatically jump to the line where the error happens, which facilitates debugging. From sghosh at HSS.IITD.AC.IN Mon Feb 26 15:17:14 2007 From: sghosh at HSS.IITD.AC.IN (Shantanu Ghosh) Date: Mon, 26 Feb 2007 15:17:14 +0100 Subject: how to create data structure Message-ID: Hi FT users, This is a stupid question but I will ask it anyway. I have started to understand a lot of the FT program logics, but I still have to get a bearing on the data structure of the input. My data is 116384 datapoints long sampled at 115.34 Hz. I can load my data data structure not in FT list)from single subject in a single recording session( in matlab workspace and implement the following code as suggested: data = []; > data.fsample = 115.34 > data.label = {'Fz';'Fp1'; ... 'Oz'}; > data.trial = cell(Ntrial,1); > for i=1:Ntrial > data.trial{i} = 24 x 40 > end However, at the prompt it says: Data structure not compatible. Error in matrix location or matrix dimension. My question is, how do you create the Nchan (=24) X NTrialSamp (= 40 trials) matrix from continuous data? Thanks, Shantanu From c.hesse at FCDONDERS.RU.NL Mon Feb 26 18:47:58 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 26 Feb 2007 18:47:58 +0100 Subject: how to create data structure In-Reply-To: Message-ID: Hi Shantanu > My data is 116384 datapoints long sampled at 115.34 Hz. > I can load my data data structure not in FT list)from single > subject in a > single recording session( in matlab workspace and implement the > following > code as suggested: > > data = []; >> data.fsample = 115.34 >> data.label = {'Fz';'Fp1'; ... 'Oz'}; >> data.trial = cell(Ntrial,1); >> for i=1:Ntrial >> data.trial{i} = 24 x 40 >> end > > However, at the prompt it says: > > Data structure not compatible. Error in matrix location or matrix > dimension. comment 1: the data structure also needs a (local) time axis for each trial: data.time = cell(Ntrial,1) for i=1:Ntrial data.time{i} = [trial_start:dt:trial_stop]; % trial_start could be -1.5 seconds % trial_stop could be 3.0 seconds % dt = 1./data.fsample; end > My question is, how do you create the Nchan (=24) X NTrialSamp (= > 40 trials) > matrix from continuous data? comment 2: NTrialSamp is NOT the number of trials (NTrial = 40) but instead refers to the "Number_of_time_samples_per_trial" which is determined by the duration of the trial in seconds (TrialDuration) and your sampling frequency FSample: NTrialSamp = TrialDuration*FSample; % this can in principle be different for each trial % so you have data.trial = cell(Ntrial,1) for i=1:Ntrial data.trial{i} = X; % where X is a Nchan x NTrialSamp matrix containing the data from each trial end comment 3: Your question essentially is: How do youI get X from what you have read into Matlab? To answer this, you need to tell me what sort of variable your data are stored in once they have been read into Matlab. You can load your data in and then type "whos" at the command prompts and email me what is displayed on the screen after you press Kind Regards, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From marie at PSY.GLA.AC.UK Mon Feb 26 18:49:23 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Mon, 26 Feb 2007 17:49:23 +0000 Subject: Beamforming across trials not time In-Reply-To: Message-ID: Dear FIELDTRIP, In order to achieve a better temporal resolution with a beamformer analysis it has been suggested to use single trial data in place of single time point data. Eg. In an experiment with 1000trials, 400time points - rather than compute the covariance across the 400 time points (averaged over trials), compute it over 1000 points (for a very short fixed time interval e.g. 10ms). I have tried to implement this and would like some advice on whether or not the steps i have taken make sense in terms of fieldtrip functions and in general. Any advice would be welcome. Thanks, Marie Effectively what I am doing is: Step 1) Choose a time point of interest Step 2) Smooth the single trial data with a 30point moving average to increase SNR Step 3) Generate a fake "single trial" which is the concatenation of each of these points across all trials e.g. the matrix has dims (nchans, (ntrials*ntimes)); Step 4) Perform time-lock analysis on this "single trial" to compute the covariance - avg1 Step 5) Perform time-lock analysis on the actual data over the same short time range with keeptrials = 'yes' -avg2 Step 6) Perform lcmv sourceanalysis on avg1 (output of step 4) Step 7) Apply this filter to avg2 (output of step 5 and sourceanalysis) to estimate the single trial time courses at each grid location, across the short time interval. From sghosh at HSS.IITD.AC.IN Tue Feb 27 05:59:57 2007 From: sghosh at HSS.IITD.AC.IN (Shantanu Ghosh) Date: Tue, 27 Feb 2007 05:59:57 +0100 Subject: Read data structure-contd Message-ID: Hello Christian, Sorry to use this mail id, but the Listserv server was temporarily unavailable from my IP address. > Hi Shantanu > >> My data is 116384 datapoints long sampled at 115.34 Hz. >> I can load my data data structure not in FT list)from single >> subject in a >> single recording session( in matlab workspace and implement the >> following >> code as suggested: >> >> data = []; >>> data.fsample = 115.34 >>> data.label = {'Fz';'Fp1'; ... 'Oz'}; >>> data.trial = cell(Ntrial,1); >>> for i=1:Ntrial >>> data.trial{i} = 24 x 40 >>> end >> >> However, at the prompt it says: >> >> Data structure not compatible. Error in matrix location or matrix >> dimension. > > comment 1: > the data structure also needs a (local) time axis for each trial: > > data.time = cell(Ntrial,1) > for i=1:Ntrial > data.time{i} = [trial_start:dt:trial_stop]; > % trial_start could be -1.5 seconds > % trial_stop could be 3.0 seconds > % dt = 1./data.fsample; > end > > >> My question is, how do you create the Nchan (=24) X NTrialSamp (= >> 40 trials) >> matrix from continuous data? > > comment 2: > NTrialSamp is NOT the number of trials (NTrial = 40) but instead > refers to the "Number_of_time_samples_per_trial" which is determined > by the duration of the trial in seconds (TrialDuration) and your > sampling frequency FSample: > > NTrialSamp = TrialDuration*FSample; > % this can in principle be different for each trial > > % so you have > data.trial = cell(Ntrial,1) > for i=1:Ntrial > data.trial{i} = X; > % where X is a Nchan x NTrialSamp matrix containing the data from > each trial > end > > > comment 3: > Your question essentially is: How do youI get X from what you have > read into Matlab? > > > To answer this, you need to tell me what sort of variable your data > are stored in once they have been read into Matlab. You can load your > data in and then type "whos" at the command prompts and email me what > is displayed on the screen after you press > Reply to comment 3: This is what is displayed at 'whos' command after the data is loaded: >> y=dlmread('C:\\priyanka\\exp1\\SegmentedEEGData\\S1\\audi\\A1 \\1_E_1.txt'); >> whos Name Size Bytes Class y 347x1 2776 double array Grand total is 347 elements using 2776 bytes >> Additional comments: The file is a 3 sec EEG voltage record from our experiment on episodic memory encoding and recall in auditory mode ('Process'), for subject 'S1' for electrode 'A1'. '1_E_1' refers to 'BlockNum_Process_TrialNumber'. The experiment has the following design: After displaying a blank screen for 1 min, a 4 sec red spot in the centre of the screen alerts the subject that a CVC syllable is presented (trial). There are 6 trials, each of 3 sec duration, followed by another green spot in screen centre for 4 s to alert the subject that recall is to be effected, followed by 6 trials of CVC sequences each of 3 sec, but only half of them from the earlier encoding block. this [encoding-recall] sequence is repeated for 20 times. All CVC sequences in encoding and recall were randomised. EEG was acquired continuously. The continuous EEG was then segmented stored in separate .txt files using a Matlab routine (see attached file: 'mySegmentData.m'). One of these files is then loaded using 'dlmread'. I also have the continuous EEG as .txt files for each electrode, as separate files in a folder [say, called subject 'S1','S2',... ] (if you require that data to get X) Best and thanks, Shantanu -------------- next part -------------- % This codes segments the data of each subject for a specific mode % (Auditory or Visual) and a specific channel depending on the stimulus, % block and the process. % % Format of the Data File provided: Subject_Mode_eeg_Channel % Subject = S1, S2, S3, S4, S5, S6, S7, S8, S9, S10 % Mode = audi (for Auditory), visu (for Visual) % Channel = F3, F4, F7, F8, T3, T4, T5, T6, P3, P4, Pz, O1, O2, Oz, % FP1, FP2, Fz, C3, C4, Cz, A1, A2, EKG % % Format of the Data File Outputted: Block_Process_Stimulus % Block = 1, 2,..., 10 % Process = E (for Encoding), R (for Retrieval) % Stimulus = 1, 2, 3, 4, 5, 6 clc; close all; clear all; SamplingTime = 0.00867; % in secs InitialTime = 60; % in secs GapTime = 4; % in secs nBlocks = 10; % Number of Blocks BlockTime = 18; % in secs Process = {'E'; 'R'}; % Processes (E - Encoding; R - Retrieval) nStimuli = 6; % Number of Stimuli StimulusTime = 3; % in secs % Subjects_Modes = {'Subject','Mode'} % Subjects = S1, S2, S3, S4, S5, S6, S7, S8, S9, S10 % Modes = audi (for Auditory), visu (for Visual), both (for Both) % Subjects_Modes = {'S1','both'; 'S2','both'; 'S3','both'; 'S4','both';... % 'S5','both'; 'S6','both'; 'S7','both'; 'S8','both'; 'S9','both'; 'S10','both'}; Subjects_Modes = {'S1','both'; 'S2','both'; 'S3','both'; 'S4','both';... 'S5','both'; 'S6','both'; 'S7','visu'; 'S8','both'; 'S9','both';... 'S10','both'}; % Channels = {'F3'; 'F4'; 'F7'; 'F8'; 'T3'; 'T4'; 'T5'; 'T6';... % 'P3'; 'P4'; 'Pz'; 'O1'; 'O2'; 'Oz';... % 'FP1'; 'FP2'; 'Fz'; 'C3'; 'C4'; 'Cz'; 'A1'; 'A2'; 'EKG'}; Channels = {'F3'; 'F4'; 'F7'; 'F8'; 'T3'; 'T4'; 'T5'; 'T6';... 'P3'; 'P4'; 'Pz'; 'O1'; 'O2'; 'Oz';... 'FP1'; 'FP2'; 'Fz'; 'C3'; 'C4'; 'Cz'; 'A1'; 'A2'; 'EKG'}; for i = 1:size(Subjects_Modes,1) % Runs over all the Subjects Subject = Subjects_Modes{i,1}; if Subjects_Modes{i,2} == 'both' Mode = {'audi'; 'visu'}; else Mode = {Subjects_Modes{i,2}}; end for j = 1:length(Mode) % Runs over all the Modes for k = 1:length(Channels) % Runs over all the Channels filename = ['eegdata','\',Subject,'\',Subject,'_',Mode{j},'_eeg_',Channels{k},'.eeg']; fid = fopen(filename); % Open a file if fid == -1 break end entiredata = fscanf(fid,'%f'); % Read data from the file fclose(fid); directoryname = ['SegmentedEEGData','\',Subject,'\',Mode{j},'\',Channels{k}]; mkdir(directoryname); % Create a directory entiredata = entiredata(round(InitialTime/SamplingTime):end); % Eliminate the first 1 min of the data flag = -1; % Flag for determining the process (E or R) for a = 1:2*nBlocks % Runs over all the blocks (both E and R) flag = -1*flag; % Toggle the flag if flag == 1 c = 1; % E Process else c = 2; % R Process end for b = 1:nStimuli % Runs over all the Stimuli l = round((a*GapTime + (a-1)*BlockTime + (b-1)*StimulusTime)/SamplingTime); h = round((a*GapTime + (a-1)*BlockTime + b*StimulusTime)/SamplingTime); data = entiredata(l:h); filename = [directoryname,'\',num2str(a),'_',Process{c},'_',num2str(b),'.txt']; fid = fopen(filename,'w'); % Open a file if fid == -1 break end fprintf(fid,'%f\n',data); % Write data to a file fclose(fid); end end end end end display('Files successfully segmented!') From r.oostenveld at FCDONDERS.RU.NL Tue Feb 27 10:40:11 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 27 Feb 2007 10:40:11 +0100 Subject: Beamforming across trials not time In-Reply-To: Message-ID: Dear Marie, On 26 Feb 2007, at 18:49, Marie Smith wrote: > In order to achieve a better temporal resolution with a beamformer > analysis it has been suggested to use single trial data in place of > single time point data. Eg. In an experiment with 1000trials, > 400time points - rather than compute the covariance across the 400 > time points (averaged over trials), compute it over 1000 points > (for a very short fixed time interval e.g. 10ms). I have tried to > implement this and would like some advice on whether or not the > steps i have taken make sense in terms of fieldtrip functions and > in general. Any advice would be welcome. I suspect that what you have implemented is largely supported by the existing code (see below). Regardless of that, it would be interestnig if you would share your experiences on this with us. > Effectively what I am doing is: > > Step 1) Choose a time point of interest > Step 2) Smooth the single trial data with a 30point moving average > to increase SNR > Step 3) Generate a fake "single trial" which is the concatenation > of each of these points across all trials e.g. the matrix has dims > (nchans, (ntrials*ntimes)); > Step 4) Perform time-lock analysis on this "single trial" to > compute the covariance - avg1 > Step 5) Perform time-lock analysis on the actual data over the same > short time range with keeptrials = 'yes' -avg2 > Step 6) Perform lcmv sourceanalysis on avg1 (output of step 4) > Step 7) Apply this filter to avg2 (output of step 5 and > sourceanalysis) to estimate the single trial time courses at each > grid location, across the short time interval. The timelockanalysis function computes covariances (and also averages, but the averaging is more or less independent from the covariance computation. Timelockanalysis does the following: a- it filters the data in each trial (optional, see private/preproc), one of the options is also to apply a boxcar smoothing kernel b- it selects the timewindow for averaging the ERF and computing the single sample variance over trials c- it selects the timewindow for covariance computation d- for each trial, it selects the avg-timewindow and sums the data e- for each trial, it selects the cov-timewindow and computes the covariance within that timewindow f- in case of keeptrials=yes, the single trial covariance (and the data trials) are returned g- in case of keeptrials=no, the covariance matrices are averaged over trials When beaming the data in sourceanalysis, the single trial covariance matrices are averaged over trials. This is a bit messy in the documentation but also in the code (e.g. the sourceanalysis options keepfilters, rawtrial and singletrial interact with each other) Regarding your 2 -> that can be done with step "a". The smoothing can be done with a boxcar, and the selection of samples of interest is done in our step "e". Regarding your 3 and 4 -> averaging covariance matrixes (step "g" or alternatively in sourceanalysis) is the same as your steps: consider for i=1:40 a{i} = randn(151,1000); end for i=1:10 ca{i} = cov(a{i}); end % concatenate trials b = cat(2, a{:}); cb = cov(b); in this case the average over ca is the same as cb. However, I now realise what the main difference appears to be between your approach and the obvious use of the existing code: it relates to baseline correction. Covariance in general is computed like this a = randn(151, 1000); for i=1:151 a(i,:) = a(i,:) - mean(a(i,:)); % ensure zero mean end c = a * a'; % compute covariance c = c ./ 1000; % divide by number of samples That means that in the current implementation, the data within each trial is baseline subtracted (over the whole timewindow) prior to computing the covariance within that trial. It is possible to specify in timelockanalysis removemean=no, but that does not achieve exactly the same as your implementation, since your implementation removes the mean OVER trials and then computes the covariance by multiplying the matrix with its transpose. So part of your method should already be possible with the existing code (although admittedly not well documented). But your different approach in baseline correcting is not possible with existing code. Please have a look at the timelockanalysis code together with the suggestions above and let me know whether you concur. Of course we could extend timelockanalysis with your approach. best regards, Robert From jgross at UNI-DUESSELDORF.DE Tue Feb 27 11:35:00 2007 From: jgross at UNI-DUESSELDORF.DE (Joachim Gross) Date: Tue, 27 Feb 2007 10:35:00 +0000 Subject: Postdoctoral Research Assistant position in Glasgow Message-ID: Postdoctoral Research Assistant Centre for Cognitive Neuroimaging (CCNi) Department of Psychology £25,889 - £31,840 per annum REF: 13078/DPO/A3 A strategic priority of the University is the current creation within the Department of Psychology of a Centre for Cognitive Neuroimaging (CCNi), a major initiative to install an in-house platform of complementary, state-of-the-art brain imaging facilities dedicated to Cognitive Neuroscience research. Equipment will include a 3T fMRI scanner, a MEG system, a TMS system, and several EEG systems – including fMRI compatible systems. Applications are invited for a Postdoctoral Research Assistant to work with Professor Joachim Gross in the Magnetoencephalography (MEG) group in the newly established CCNi. The overall mission of the group is the non-invasive investigation of large-scale oscillatory neural interactions and their role in information processing by using advanced signal processing techniques. You will have the opportunity to: contribute to the design of MEG experiments; collect the data with a state of the art MEG system; develop, validate and apply cutting edge techniques to analyse brain signals in the time and frequency domain; solve the inverse problem in order to identify processing networks. You will be expected to contribute to the overall mission of the group, to ongoing MEG projects, and provide expertise and support for the research at CCNi. You will be qualified, with a PhD, or equivalent, in Psychology, Neuroscience, Medicine, Neuroinformatics, Physics or a related discipline. Advanced programming skills (preferably with MATLAB) are essential. Experience with MEG/EEG data acquisition and analysis is highly desirable. You should be familiar with principles of signal processing (also in the frequency domain), statistical methods and possibly the MEG inverse problem. Finally you should have a strong interest in developing your own scientific programme and pursuing a research career. This post is available from 1 May 2007 and funding is available for 24 months initially. Informal enquiries may be made to Professor J Gross, (+44 (0)141 330 3947; j.gross at psy.gla.ac.uk. For further details about the post and how to apply: see our web site at http://www.psy.gla.ac.uk/jobs.php or contact Clare Alexander, Department of Psychology, University of Glasgow, G12 8QQ (+44 (0)141 330 5090, e-mail c.alexander at psy.gla.ac.uk or the University web site at http://www.gla.ac.uk Closing date: 30 March 2007. From jgross at UNI-DUESSELDORF.DE Tue Feb 27 11:37:26 2007 From: jgross at UNI-DUESSELDORF.DE (Joachim Gross) Date: Tue, 27 Feb 2007 11:37:26 +0100 Subject: Postdoctoral Research Assistant position in Glasgow Message-ID: Postdoctoral Research Assistant Centre for Cognitive Neuroimaging (CCNi) Department of Psychology �25,889 - �31,840 per annum REF: 13078/DPO/A3 A strategic priority of the University of Glasgow is the current creation within the Department of Psychology of a Centre for Cognitive Neuroimaging (CCNi), a major initiative to install an in-house platform of complementary, state-of-the-art brain imaging facilities dedicated to Cognitive Neuroscience research. Equipment will include a 3T fMRI scanner, a MEG system, a TMS system, and several EEG systems – including fMRI compatible systems. Applications are invited for a Postdoctoral Research Assistant to work with Professor Joachim Gross in the Magnetoencephalography (MEG) group in the newly established CCNi. The overall mission of the group is the non-invasive investigation of large-scale oscillatory neural interactions and their role in information processing by using advanced signal processing techniques. You will have the opportunity to: contribute to the design of MEG experiments; collect the data with a state of the art MEG system; develop, validate and apply cutting edge techniques to analyse brain signals in the time and frequency domain; solve the inverse problem in order to identify processing networks. You will be expected to contribute to the overall mission of the group, to ongoing MEG projects, and provide expertise and support for the research at CCNi. You will be qualified, with a PhD, or equivalent, in Psychology, Neuroscience, Medicine, Neuroinformatics, Physics or a related discipline. Advanced programming skills (preferably with MATLAB) are essential. Experience with MEG/EEG data acquisition and analysis is highly desirable. You should be familiar with principles of signal processing (also in the frequency domain), statistical methods and possibly the MEG inverse problem. Finally you should have a strong interest in developing your own scientific programme and pursuing a research career. This post is available from 1 May 2007 and funding is available for 24 months initially. Informal enquiries may be made to Professor J Gross, (+44 (0)141 330 3947; j.gross at psy.gla.ac.uk. For further details about the post and how to apply: see our web site at http://www.psy.gla.ac.uk/jobs.php or contact Clare Alexander, Department of Psychology, University of Glasgow, G12 8QQ (+44 (0)141 330 5090, e-mail c.alexander at psy.gla.ac.uk or the University web site at http://www.gla.ac.uk Closing date: 30 March 2007. From muthuraman10 at HOTMAIL.COM Tue Feb 27 12:19:31 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Tue, 27 Feb 2007 11:19:31 +0000 Subject: Plotting using Slice! Message-ID: Hello Fieldtrippers, I am not sure whether this mail has reached the group ! I am sending it again ! Thanks for the answer, i tried to plot using the source plot with this configuration and i get the error, in this case should i need to transform the data before plotting using slice any comments on this cfg.method='slice'; cfg.funparameter='coh'; cfg.nslices = 20; cfg.slicedim = 3; sourceplot(cfg,freqmtmfft); ??? Reference to non-existent field 'dim'. Error in ==> fieldtrip-20070222\private\grid2transform at 9 if ~isfield(volume, 'xgrid'), volume.xgrid=1:volume.dim(1); end Error in ==> sourceplot at 189 data = grid2transform(data); Thanking you With regards M.Muthuraman. _________________________________________________________________ News and updates from Indian diaspora http://content.msn.co.in/NRI/Default From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Feb 27 12:34:44 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 27 Feb 2007 12:34:44 +0100 Subject: Plotting using Slice! In-Reply-To: Message-ID: Hi Muthuraman, What are you trying to plot? Could you send which fields are in your freqmtmfft? Bests Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Tuesday, February 27, 2007 12:20 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Plotting using Slice! Hello Fieldtrippers, I am not sure whether this mail has reached the group ! I am sending it again ! Thanks for the answer, i tried to plot using the source plot with this configuration and i get the error, in this case should i need to transform the data before plotting using slice any comments on this cfg.method='slice'; cfg.funparameter='coh'; cfg.nslices = 20; cfg.slicedim = 3; sourceplot(cfg,freqmtmfft); ??? Reference to non-existent field 'dim'. Error in ==> fieldtrip-20070222\private\grid2transform at 9 if ~isfield(volume, 'xgrid'), volume.xgrid=1:volume.dim(1); end Error in ==> sourceplot at 189 data = grid2transform(data); Thanking you With regards M.Muthuraman. _________________________________________________________________ News and updates from Indian diaspora http://content.msn.co.in/NRI/Default From marie at PSY.GLA.AC.UK Tue Feb 27 17:07:51 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 27 Feb 2007 16:07:51 +0000 Subject: Beamforming across trials not time In-Reply-To: <4A61AF16-04FE-4B68-AD39-763623D34A9B@fcdonders.ru.nl> Message-ID: Hi Robert, > The timelockanalysis function computes covariances (and also > averages, but the averaging is more or less independent from the > covariance computation. Timelockanalysis does the following: > > a- it filters the data in each trial (optional, see private/ > preproc), one of the options is also to apply a boxcar smoothing > kernel > b- it selects the timewindow for averaging the ERF and computing > the single sample variance over trials > c- it selects the timewindow for covariance computation > d- for each trial, it selects the avg-timewindow and sums the data > e- for each trial, it selects the cov-timewindow and computes the > covariance within that timewindow > f- in case of keeptrials=yes, the single trial covariance (and the > data trials) are returned > g- in case of keeptrials=no, the covariance matrices are averaged > over trials > When beaming the data in sourceanalysis, the single trial > covariance matrices are averaged over trials. This is a bit messy > in the documentation but also in the code (e.g. the sourceanalysis > options keepfilters, rawtrial and singletrial interact with each > other) Just to be clear, the covariance is always computed for single trials and then either averaged across trials (keeptrials = 'no') or kept separate (keeptrials = 'yes') to be averaged in the beamforming step? At no time is the data averaged and then the covariance computed on this one average trial? > Regarding your 2 -> that can be done with step "a". The smoothing > can be done with a boxcar, and the selection of samples of interest > is done in our step "e". I'm not sure that this is the same thing. I am smoothing the data across trials at each time point, where i think time lock analysis is smoothing the data in each trial across time points. > However, I now realise what the main difference appears to be > between your approach and the obvious use of the existing code: it > relates to baseline correction. Covariance in general is computed > like this > a = randn(151, 1000); > for i=1:151 > a(i,:) = a(i,:) - mean(a(i,:)); % ensure zero mean > end > c = a * a'; % compute covariance > c = c ./ 1000; % divide by number of samples > That means that in the current implementation, the data within each > trial is baseline subtracted (over the whole timewindow) prior to > computing the covariance within that trial. So, if I were to look at only one time point across trials, implementing things in fieldtrip would always result in a zero value (as the mean == the data value here)? > It is possible to specify in timelockanalysis removemean=no, but > that does not achieve exactly the same as your implementation, > since your implementation removes the mean OVER trials and then > computes the covariance by multiplying the matrix with its transpose. Yes, I agree that this is what I am doing - and i think is the "more correct" thing to do here. > So part of your method should already be possible with the existing > code (although admittedly not well documented). But your different > approach in baseline correcting is not possible with existing code. > Please have a look at the timelockanalysis code together with the > suggestions above and let me know whether you concur. Of course we > could extend timelockanalysis with your approach. Yes I concur with your comments (though please see the points above). From sameer at ANDREW.CMU.EDU Tue Feb 27 18:22:23 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 27 Feb 2007 12:22:23 -0500 Subject: topoplot after pca reduction Message-ID: Hello, Is it possible to plot the topological plot of independent components derived after pca reduction (using binica)? How would one go about doing this? thanks, sameer From r.oostenveld at FCDONDERS.RU.NL Tue Feb 27 20:52:41 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 27 Feb 2007 20:52:41 +0100 Subject: Beamforming across trials not time In-Reply-To: <4773D6EC-5FDB-4B95-B7BD-F594BB8D4E18@psy.gla.ac.uk> Message-ID: Hi Marie On 27 Feb 2007, at 17:07, Marie Smith wrote: > Just to be clear, the covariance is always computed for single > trials and then either averaged across trials (keeptrials = 'no') > or kept separate (keeptrials = 'yes') to be averaged in the > beamforming step? correct. The averaging in the beamforming step is optional, you can also beam single-trial (rawtrials=yes in sourceanalysis). Or you can beam the single trial ERF timecourses using a filter constructed from the average covariance (requires a first run of sourceanalysis with rawtrials=no and keepfilters=yes, and a second run with cfg.grid=previous_source and rawtrials=yes). > At no time is the data averaged and then the covariance computed on > this one average trial? correct. There is no averaging of the ERFs over trials prior to computing the covariance. It is possible to "average" over time within a single trial by boxcar smoothing. >> Regarding your 2 -> that can be done with step "a". The smoothing >> can be done with a boxcar, and the selection of samples of >> interest is done in our step "e". > > I'm not sure that this is the same thing. I am smoothing the data > across trials at each time point, where i think time lock analysis > is smoothing the data in each trial across time points. Oh, I thought you smoothed over time. Then indeed it is quite different. Averaging (smoothing) over a subset of M trials prior to computing the covariance in the most extreme case (M=Ntrials) corresponds to taking the covariance of the ERF, right? And in the other most extreme case (M=1) it resembles to the approach implemented in timelockanalysis. Am I correct? In the M=Ntrials case, the covariance matrix probably would be rather rank deficient (if the time window is short), and the data covariance would include little or no noise structure (data covariance = signal covariance + noise covariance). But the same applies to induced activity, i.e. that would also not be present in your covariance, so it stresses the effect of the evoked at the expense of the induced activity. I can't tell whether that is good or bad, that depends on your data and research question. >> That means that in the current implementation, the data within >> each trial is baseline subtracted (over the whole timewindow) >> prior to computing the covariance within that trial. > > So, if I were to look at only one time point across trials, > implementing things in fieldtrip would always result in a zero > value (as the mean == the data value here)? yes, that is correct. So I would phrase the approach that you suggest as a "resampling approach", in which you compute the covarioance over M subsets of trials, in which each subset is averaged (c.f. bootstraping). You mentioned in your previous mail that "it has been suggested". Could you give a reference? And how does it behave in your data? best regards, Robert PS we can discuss it in detail during my visit From litvak at TX.TECHNION.AC.IL Wed Feb 28 14:11:02 2007 From: litvak at TX.TECHNION.AC.IL (Vladimir Litvak) Date: Wed, 28 Feb 2007 13:11:02 -0000 Subject: Layout for planar gradient Message-ID: Dear all, I'm playing with MEGPLANAR function for CTF data. I'd like to plot the results with topoplotTFR but there is no layout file matching the planar gradient channels. What should I do? Thanks, Vladimir -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Wed Feb 28 14:24:24 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 28 Feb 2007 14:24:24 +0100 Subject: Layout for planar gradient In-Reply-To: <002101c75b39$e57349f0$f0463ec1@sobell.ion.ucl.ac.uk> Message-ID: Hi Vladimir, > I'm playing with MEGPLANAR function for CTF data. I'd like to plot > the results with topoplotTFR but there is no layout file matching > the planar gradient channels. What should I do? Options: (1) Use COMBINEPLANAR first, then TOPOPLOTTFR (2) You can try to create an appropriate layout using the function CREATELAYOUT in fieldtrip/private (I do not known if that will work tho ...) and use that Cheers, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Wed Feb 28 21:59:52 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 28 Feb 2007 15:59:52 -0500 Subject: No subject Message-ID: Hi, I am currently experimenting with beamformers and was playing with http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:use_your_own_forward_leadfield_model_in_an_inverse_beamformer_computation to generate the grid. I did the following vol = []; vol.r = 12 * [0.88 0.92 1.00]; % radii of spheres, the head radius is 12 cm vol.c = [1 1/80 1]; % conductivity vol.o = [0 0 0]; % center of sphere % compute the leadfields that can be used for the beamforming cfg = []; cfg.vol = vol; cfg.resolution = 2; % same unit as above, i.e. in cm grid = prepare_leadfield(cfg, dataPre); (I expect prepare_leadfield to pick up grad definitions from the data) ??? Error using ==> fieldtrip/private/compute_leadfield different number of spheres for the radius and origin Error in ==> prepare_leadfield at 209 grid.leadfield{dipindx} = compute_leadfield(grid.pos(dipindx,:), sens, vol, 'reducerank', cfg.reducerank, 'normalize', cfg.normalize); Error in ==> SomeMaster at 15 grid = prepare_leadfield(cfg, dataPre); To get around this error, I change vol to vol.o = [0 0 0 ; 0 0 0 ; 0 0 0 ]; ??? Error using ==> fieldtrip/private/compute_leadfield number of spheres is not equal to the number of coils Error in ==> prepare_leadfield at 209 grid.leadfield{dipindx} = compute_leadfield(grid.pos(dipindx,:), sens, vol, 'reducerank', cfg.reducerank, 'normalize', cfg.normalize); Error in ==> SomeMaster at 15 grid = prepare_leadfield(cfg, dataPre); I thought this might be due to the 4 HPI coils, so I changed vol to vol.r = 12 * [0.88 0.92 0.96 1.00]; vol.o = [0 0 0 ; 0 0 0 ; 0 0 0 ; 0 0 0 ]; but it was of no use. Any suggestions? Thanks, sameer From sameer at ANDREW.CMU.EDU Tue Feb 6 14:32:44 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 6 Feb 2007 08:32:44 -0500 Subject: too many trials/overlapping trials Message-ID: Hello, I am currently familiarizing myself with Fieldtrip by using the information gleaned from http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:examp$g_started_with_reading_raw_eeg_or_meg_data beginning with the most basic application which starts with defining the trials. http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:getting_started_with_reading_raw_eeg_or_meg_data I use the first three lines to set up cfg, and then issue the command definetrial(cfg); Note: the data is from Elekta Neuromag 306 channel MEG. It returns some thousand odd events and finds STI 101 and STI 301 as Stim channels. So next I do the following: >> cfg = [] ; >> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >> cfg.trialdef.eventtype = 'STI101' ; >> cfg.trialdef.eventvalue = 7 ; >> cfg.trialdef.prestim = 1.500; >> cfg.trialdef.poststim = 2.501; >> cfg = definetrial(cfg); evaluating trialfunction 'trialfun_general' found 61361 events created 60 trials My first problem is, I should have 30 trials for this event. The file contains a total of 60 trials, but the other 30 are for eventtype = 11 So it is clearly doing something wrong. Next, I decided to see what is in cfg.trl and I get the Nx3 matrix that I find the following problems with it 1> each trial should be 4000 milli seconds long. That happens here, however, there seem to be overlap between trials which does not make sense. This is what leads to the double counting. Thus I get 4000 msec long trials bunched in group of two where the second trial starts about 1000 to 1300 msecs after the beginning of the first trial. 2> If the first trial is at 8502, all subsequent trials should be in increments of integral multiples of 4000 ( plus or minus a few). But that does not seem to happen (and I am looking at on the leading trial of the pair and discounting the trials that follow 1000 msecs later.) Thanks for your help. sameer From r.oostenveld at FCDONDERS.RU.NL Wed Feb 7 16:47:43 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 7 Feb 2007 16:47:43 +0100 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Dear Sameer, On 6 Feb 2007, at 14:32, Sameer Walawalkar wrote: > I use the first three lines to set up cfg, and then issue the command > definetrial(cfg); > Note: the data is from Elekta Neuromag 306 channel MEG. > > It returns some thousand odd events and finds STI 101 and STI 301 > as Stim channels. > > So next I do the following: > >>> cfg = [] ; >>> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >>> cfg.trialdef.eventtype = 'STI101' ; >>> cfg.trialdef.eventvalue = 7 ; >>> cfg.trialdef.prestim = 1.500; >>> cfg.trialdef.poststim = 2.501; >>> cfg = definetrial(cfg); > evaluating trialfunction 'trialfun_general' > found 61361 events > created 60 trials Maybe you could try cfg = [] ; cfg.dataset = 'JD_012507_Beeps_One.fif' ; cfg.trialdef.eventtype = '?'; dum = definetrial(cfg); and look what is printed on screen. > My first problem is, I should have 30 trials for this event. The file > contains a total of 60 trials, but the other 30 are for eventtype = 11 > So it is clearly doing something wrong. > Next, I decided to see what is in cfg.trl and I get the Nx3 matrix > that I find the following problems with it > > 1> each trial should be 4000 milli seconds long. That happens here, > however, there seem to be overlap between trials which does not make > sense. This is what leads to the double counting. Thus I get 4000 > msec long trials bunched in group of two where the second trial > starts about 1000 to 1300 msecs after the beginning of the first > trial. Please have a look in cfg.event. > 2> If the first trial is at 8502, all subsequent trials should be in > increments of integral multiples of 4000 ( plus or minus a few). > But that does not seem to happen (and I am looking at on the > leading trial of the pair and discounting the trials that follow > 1000 msecs later.) That means that there are events detected that are not supposed to be there according to your knowledge of the dataset. Could it be that both the positive and the negative flank of the trigger are detected? Robert From sameer at ANDREW.CMU.EDU Wed Feb 7 17:30:26 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 7 Feb 2007 11:30:26 -0500 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Thanks for the reply Robert. here's some more info. > Dear Sameer, > > Maybe you could try > cfg = [] ; > cfg.dataset = 'JD_012507_Beeps_One.fif' ; > cfg.trialdef.eventtype = '?'; > dum = definetrial(cfg); > and look what is printed on screen. evaluating trialfunction 'trialfun_general' the following events were found in the datafile event type: 'STI101' with event values: 5 6 7 8 9 11 15 16388 16391 16392 16396 event type: 'STI301' with event values: 5.0003 5.0018 ...(many more...) event type: 'trial' with event values: no trials have been defined yet, see DEFINETRIAL for further help found 61361 events created 0 trials (I address another point at the bottom of the email. I have left the following paragraphs in for refrence) >> My first problem is, I should have 30 trials for this event. The file >> contains a total of 60 trials, but the other 30 are for eventtype = 11 >> So it is clearly doing something wrong. > >> Next, I decided to see what is in cfg.trl and I get the Nx3 matrix that I >> find the following problems with it >> >> 1> each trial should be 4000 milli seconds long. That happens here, >> however, there seem to be overlap between trials which does not make >> sense. This is what leads to the double counting. Thus I get 4000 msec long >> trials bunched in group of two where the second trial starts about 1000 to >> 1300 msecs after the beginning of the first trial. > > Please have a look in cfg.event. > >> 2> If the first trial is at 8502, all subsequent trials should be in >> increments of integral multiples of 4000 ( plus or minus a few). But that >> does not seem to happen (and I am looking at on the leading trial of the >> pair and discounting the trials that follow 1000 msecs later.) > > That means that there are events detected that are not supposed to be there > according to your knowledge of the dataset. Could it be that both the > positive and the negative flank of the trigger are detected? I have looked into this as it was the first thing I suspected. What has been confusing me is that it seems to be counting the rising flank of the correct trigger and the falling flank of the earlier trigger, even though the event type for the earlier trigger is different. I am looking for cfg.trialdef.eventtype = 'STI101' and cfg.trialdef.eventvalue = 7 or 11. The earlier falling trigger is 5,6 or 8.9 and so should not be considered at all. I never use STI301 sameer From r.oostenveld at FCDONDERS.RU.NL Wed Feb 7 21:43:37 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 7 Feb 2007 21:43:37 +0100 Subject: New statistics In-Reply-To: <000001c74495$5f6aa930$f0463ec1@sobell.ion.ucl.ac.uk> Message-ID: Hi Vladimir, On 30 Jan 2007, at 18:37, Vladimir Litvak wrote: > I'm trying to switch from clusterrandanalysis to the new statistics > routines. I made my best to configure the new routine in a way that > would yield results identical to the old routine, but the results I > get are very different. I put an example athttp:// > download.yousendit.com/7CE5F69B35B1C739 . Please check what's going > on. I looked in the script and data that you have sent and notice that >> cfg.design ans = 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 >> size(cfg.design) ans = 2 22 and furthermore >> size(freqavg{1}.powspctrm) ans = 22 1 50 965 >> size(freqavg{2}.powspctrm) ans = 22 1 50 965 So even though you seem to have 22+22=44 observations/subjects in the data, you are only using 22 in the design to compute your statistical contrast: You are actually computing the contast between the first 11 subjects in the first condition versus the second 11 subjects in the first condition. Your design probably should be cfg.design = [ 1:22 1:22 % subject index, runs from 1 to 22 (twice, since paired data) 1*ones(1,22) 2*ones(1,22) % condition number, is either 1 or 2 ]; best regards, Robert From Brian.Roach at YALE.EDU Thu Feb 8 18:25:21 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Thu, 8 Feb 2007 12:25:21 -0500 Subject: sourceanalysis.m on EEG data Message-ID: I am working through this tutorial on the web: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?%20id=fieldtrip:documentation:tutorial:beamformer#plot_the_result I am wondering, do you only need to use MRIviewer to construct a forward model for MEG data (and not for EEG data)? What kind of software do I need to use to construct an .hdm file for EEG data? thanks! Brian From sameer at ANDREW.CMU.EDU Thu Feb 8 18:52:11 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 8 Feb 2007 12:52:11 -0500 Subject: ??? Undefined command/function 'componentanalysis'. Message-ID: Hello, I am interested in doing independent component analysis (for removing blinks) on my data. But it seems my fieldtrip download did not include the file componentanalysis and I get the following error (visual inspection of folder with the fieldtrip installation confirms too). >> comp = componentanalysis(cfg, dataLL); ??? Undefined command/function 'componentanalysis'. I have downloaded the latest version available today. Is it available differently? thanks, sameer From sameer at ANDREW.CMU.EDU Thu Feb 8 18:59:06 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 8 Feb 2007 12:59:06 -0500 Subject: generating data structure for all trials Message-ID: Hello, My basic question is: Can definetrial be used in such a way as to create the data structure without breaking the data up into trials? or Is there some other way to generate the data structure with all its fields without breaking the data up into trials? What follows is a bit more information. The first twenty independent components of my data acquired by using EEGlab or fastICA contain blinks, heart beats and other extraneous signals which I can subtract. I can infact do all the preprocessing on my data that Fieldtrip can do. The problem is in order to now use Fieldtrip for further analysis (I want to eventually do DICS), I have to generate the data structure with all its fields as fieldtrip likes it, and that seems tedious. Hence I want to stick with Fieldtrip all the way. However, while using Fieldtrip, the first point where a MATLAB variable containing data is created is during trial definition at data = preprocessing(cfg); (from online tutorial) Trial rejections, and independent component analysis is done after this. Instead I would prefer to use independent component analysis first to remove blinks etc, then do channels and trial rejections, and then do the trial definitions based on event types etc. Central to this is having the structure data with all its fields defined before using componentanalysis.m. Can definetrial be used in such a way as to create the data structure without breaking the data up into trials? Is there some other way to generate this structure without breaking the data up into trials? thanks, sameer From tomh at KURAGE.NIMH.NIH.GOV Thu Feb 8 19:40:27 2007 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd (NIH/NIMH) [E]) Date: Thu, 8 Feb 2007 13:40:27 -0500 Subject: Reading in data from a new CTF system with ECC In-Reply-To: <06112915111720_2800013E@mpih-frankfurt.mpg.de> Message-ID: I usually do something like: T0 = -.3; T1 = .75; mark = 'beep'; cfg = []; cfg.dataset = 'BJVWOZGQ_pacing_20050712_01-f.ds'; cfg.trialdef.eventtype = mark; cfg.trialdef.prestim = -T0; cfg.trialdef.poststim = T1; cfg.channel = { 'MLC11' 'MLC22' }; cfg.blc = 'yes'; cfg.detrend = 'yes'; #cfg.hilbert = 'yes'; cfg.bpfilter = 'yes'; cfg.bpfreq = [1. 50.]; [data] = preprocessing(cfg); I have the same kind of system. Check my tools at http://kurage.nimh.nih.gov/, especially parsemarks, which is helpful for writing scripts that recode the UPPT001 data. -- Tom Holroyd, Ph.D. We experience the world not as it is, but as we expect it to be. From litvak at TX.TECHNION.AC.IL Thu Feb 8 20:24:32 2007 From: litvak at TX.TECHNION.AC.IL (Vladimir Litvak) Date: Thu, 8 Feb 2007 19:24:32 -0000 Subject: New statistics In-Reply-To: Message-ID: Hi Robert, Stupid mistake indeed, but even after fixing it the results are not the same. There is a very nice big positive cluster in the gamma range I get with clusterrandanalysis that is completely absent in the new result. Since the effect is pretty clear in the raw data I think there is still a problem. Please run the fixed version with and compare the old results with new. Thanks, Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Wednesday, February 07, 2007 8:44 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] New statistics Hi Vladimir, On 30 Jan 2007, at 18:37, Vladimir Litvak wrote: > I'm trying to switch from clusterrandanalysis to the new statistics > routines. I made my best to configure the new routine in a way that > would yield results identical to the old routine, but the results I > get are very different. I put an example athttp:// > download.yousendit.com/7CE5F69B35B1C739 . Please check what's going > on. I looked in the script and data that you have sent and notice that >> cfg.design ans = 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 10 11 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 >> size(cfg.design) ans = 2 22 and furthermore >> size(freqavg{1}.powspctrm) ans = 22 1 50 965 >> size(freqavg{2}.powspctrm) ans = 22 1 50 965 So even though you seem to have 22+22=44 observations/subjects in the data, you are only using 22 in the design to compute your statistical contrast: You are actually computing the contast between the first 11 subjects in the first condition versus the second 11 subjects in the first condition. Your design probably should be cfg.design = [ 1:22 1:22 % subject index, runs from 1 to 22 (twice, since paired data) 1*ones(1,22) 2*ones(1,22) % condition number, is either 1 or 2 ]; best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Thu Feb 8 21:52:24 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 8 Feb 2007 21:52:24 +0100 Subject: New statistics In-Reply-To: <002201c74bb6$c2fb2b00$f0463ec1@sobell.ion.ucl.ac.uk> Message-ID: Hi Vladimir On 8 Feb 2007, at 20:24, Vladimir Litvak wrote: > Stupid mistake indeed, but even after fixing it the results are not > the > same. There is a very nice big positive cluster in the gamma range > I get > with clusterrandanalysis that is completely absent in the new > result. Since > the effect is pretty clear in the raw data I think there is still a > problem. > > Please run the fixed version with and compare the old results with > new. I only compared the observed statistics in both cases, and they were the same with the proper design matrix. The gamma blob that I noticed was identical in both versions, and the clusters hence should be the same (assuming you use the same clusterthreshold). I have not run the two versions 1000 times each to compare the p-values of each cluster, but from what you now write, I understand that the p-values of this gamma cluster are different. Am I right? I will run the 1000 randomizations to see whether the p-values are different, but please do check the presense of the gabba-blob cluster and the threshold setting first. Robert From c.hesse at FCDONDERS.RU.NL Fri Feb 9 09:33:17 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 9 Feb 2007 09:33:17 +0100 Subject: generating data structure for all trials In-Reply-To: Message-ID: Hi Sameer, first of all (in reference to your other email): have you managed to get hold of the componentanalysis function yet? On 8 Feb 2007, at 18:59, Sameer Walawalkar wrote: > Hello, > > My basic question is: > > Can definetrial be used in such a way as to create the data > structure without breaking the data up into trials? or Is there > some other way to generate the data structure with all its fields > without breaking the data up into trials? In principle you could define a single trial that contains all of your data, but you don't really want to do that. > What follows is a bit more information. > > > The first twenty independent components of my data acquired by using > EEGlab or fastICA contain blinks, heart beats and other extraneous > signals which I can subtract. I can infact do all the preprocessing > on my data that Fieldtrip can do. The problem is in order to now > use Fieldtrip for further analysis (I want to eventually do DICS), > I have to generate the data structure with all its fields as > fieldtrip likes it, and that seems tedious. > > Hence I want to stick with Fieldtrip all the way. > > However, while using Fieldtrip, the first point where a MATLAB > variable > containing data is created is during trial definition at > data = preprocessing(cfg); (from online tutorial) > Trial rejections, and independent component analysis is done after > this. > > Instead I would prefer to use independent component analysis > first to > remove blinks etc, then do channels and trial rejections, and then > do the > trial definitions based on event types etc. > > Central to this is having the structure data with all its fields > defined > before using componentanalysis.m. Can definetrial be used in such > a way > as to create the data structure without breaking the data up into > trials? > > Is there some other way to generate this structure without breaking > the > data up into trials? > some of the low-level I/O functions can read the data into a matrix for you, but then the housekeeping becomes awkward if you later want to extract the trials (it is doable, but I really do not recommend it). The function componentanalysis actually concatenates all trials before estimating the ICA model, so the fact that pre-processed data is split into trials is not an obstacle to doing what you want to do. Sure, you might miss out a few bits of data between trials, but as such that does not matter in ICA (e.g., infomax, fastica) anyway, since it treats the data as a random variables and not time-series. I would just try doing the ICA on the trial-based data, remove the artifacts and then see if it sufficiently improves your analysis. You could always define your trials in such a way that they correspond to the "raw" signal when you concatenate them. One more thing: if you need (or want) to remove channels from your data then either do it as part of the ICA (if the bad channels don't make the ICA "fall over") or remove them first and then do ICA. Doing ICA first to remove only ocular artifacts, then recombining the signals and rejecting channels strikes me as a potentially problematic approach. Hope this helps. Christian p.s. another (and somewhat unorthodox from a FT perspective) solution might be to do ICA as you have been outside of Fieldtrip and simply apply the de-mixing (W) matrix to your trialbased data in Fieldtrip (need to keep track of the channel labels though!). That might be the solution closest to your wishes. You would have to rescale as follows though (assuming square W): A = inv(W), set columns of A to unit norm, W = inv(A). -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Fri Feb 9 09:45:42 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 9 Feb 2007 09:45:42 +0100 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Hi Sameer, as far as I can follow the discussion there appear to be quite a few triggers in your data whose values are not 7 or 11 ... I assume you know where they come from? What might be helpful is if you could provide a little more detail about your data collection and especially the triggers on each trial. Thanks, Christian On 7 Feb 2007, at 17:30, Sameer Walawalkar wrote: > Thanks for the reply Robert. here's some more info. > >> Dear Sameer, >> >> Maybe you could try >> cfg = [] ; >> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >> cfg.trialdef.eventtype = '?'; >> dum = definetrial(cfg); >> and look what is printed on screen. > > evaluating trialfunction 'trialfun_general' > the following events were found in the datafile > event type: 'STI101' with event values: 5 6 7 8 > 9 11 15 16388 16391 16392 16396 > event type: 'STI301' with event values: 5.0003 5.0018 ...(many > more...) > event type: 'trial' with event values: > no trials have been defined yet, see DEFINETRIAL for further help > found 61361 events > created 0 trials > > (I address another point at the bottom of the email. I have left > the following paragraphs in for refrence) > >>> My first problem is, I should have 30 trials for this event. The >>> file >>> contains a total of 60 trials, but the other 30 are for eventtype >>> = 11 >>> So it is clearly doing something wrong. >> >>> Next, I decided to see what is in cfg.trl and I get the Nx3 >>> matrix that I find the following problems with it >>> 1> each trial should be 4000 milli seconds long. That happens here, >>> however, there seem to be overlap between trials which does not make >>> sense. This is what leads to the double counting. Thus I get 4000 >>> msec long trials bunched in group of two where the second trial >>> starts about 1000 to 1300 msecs after the beginning of the first >>> trial. >> >> Please have a look in cfg.event. >> >>> 2> If the first trial is at 8502, all subsequent trials should be in >>> increments of integral multiples of 4000 ( plus or minus a few). >>> But that does not seem to happen (and I am looking at on the >>> leading trial of the pair and discounting the trials that follow >>> 1000 msecs later.) >> >> That means that there are events detected that are not supposed to >> be there according to your knowledge of the dataset. Could it be >> that both the positive and the negative flank of the trigger are >> detected? > > > I have looked into this as it was the first thing I suspected. What > has been confusing me is that it seems to be counting the rising > flank of the correct trigger and the falling flank of the earlier > trigger, even though the event type for the earlier trigger is > different. I am looking for > cfg.trialdef.eventtype = 'STI101' and > cfg.trialdef.eventvalue = 7 or 11. > The earlier falling trigger is 5,6 or 8.9 and so should not be > considered at all. I never use STI301 > > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak at TX.TECHNION.AC.IL Fri Feb 9 12:54:57 2007 From: litvak at TX.TECHNION.AC.IL (Vladimir Litvak) Date: Fri, 9 Feb 2007 11:54:57 -0000 Subject: New statistics In-Reply-To: <48BA8DBF-F4BC-45A2-A36C-ED93D2ED8828@fcdonders.ru.nl> Message-ID: Hi Robert, It was a graphics problem. I can see the cluster now. Thanks, Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Thursday, February 08, 2007 8:52 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] New statistics Hi Vladimir On 8 Feb 2007, at 20:24, Vladimir Litvak wrote: > Stupid mistake indeed, but even after fixing it the results are not > the > same. There is a very nice big positive cluster in the gamma range > I get > with clusterrandanalysis that is completely absent in the new > result. Since > the effect is pretty clear in the raw data I think there is still a > problem. > > Please run the fixed version with and compare the old results with > new. I only compared the observed statistics in both cases, and they were the same with the proper design matrix. The gamma blob that I noticed was identical in both versions, and the clusters hence should be the same (assuming you use the same clusterthreshold). I have not run the two versions 1000 times each to compare the p-values of each cluster, but from what you now write, I understand that the p-values of this gamma cluster are different. Am I right? I will run the 1000 randomizations to see whether the p-values are different, but please do check the presense of the gabba-blob cluster and the threshold setting first. Robert From muthuraman10 at HOTMAIL.COM Fri Feb 9 13:05:51 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Fri, 9 Feb 2007 12:05:51 +0000 Subject: Frequency Analysis! Message-ID: Hello , Thankyou JM, for the suggestions regarding the Time-Frequency Analysis, it works well now. I need the time information inorder to see what happens to the power at a specific time interval. >>From the previous discussion for the Freqanalysis_mtmwelch method as Prof.Robert as suggested i tried to change the frequency resolution to 1 Hz in the Mtmwelch method. Now i get all the values to be Nan's. cfg.foi = [2:1:30]; cfg.t_ftimwin = ones(1,length(cfg.foi)).*1; And also is there way to load the Laplacian transformed data to the Fieldtip analysis which is a .mat file and work on it for the coherence analysis. I do the laplacian transformation and the welch periodogram method with my own programs not any software. With regards M.Muthuraman. _________________________________________________________________ Catch all the cricketing action right here. Live score, match reports, photos et al. http://content.msn.co.in/Sports/Cricket/Default.aspx From c.hesse at FCDONDERS.RU.NL Fri Feb 9 16:21:15 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 9 Feb 2007 16:21:15 +0100 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Hi Sameer, thanks for the additional info and data from the STI101 channel you sent me. I think that the double counting of your triggers must be caused by the way that the function "trialfun_general.m" computes the (valid) flanks for your data format (e.g., line 467, and see all the comments in lines nearby). Using the content of your STI101 channel (referred to as x below) I was unable to reproduce the double counting using a slightly simpler approach: d = [0, diff(x)]; ii = find((d~=0) & (x==7)); % length(ii) gives 30 ii = find((d~=0) & (x==11)); % length(ii) gives 30 For the time being, the easiest solution (in my view, since you have the STI101 channel) is to construct the "trl" matrix from the content of the ii arrays above for each trigger, and copy this into the cfg structure used to call preprocessing.m: cfg.trl = trl; The more elegant solution in a Fieldtrip sense is to write your own trialfun, which would consist of wrapper code around the essential operations outlined above. I suggest you have a closer look at the code and documentation in preprocessing.m and definetrial.m if you decide to pursue this route. Hope this helps, Christian On 7 Feb 2007, at 17:30, Sameer Walawalkar wrote: > Thanks for the reply Robert. here's some more info. > >> Dear Sameer, >> >> Maybe you could try >> cfg = [] ; >> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >> cfg.trialdef.eventtype = '?'; >> dum = definetrial(cfg); >> and look what is printed on screen. > > evaluating trialfunction 'trialfun_general' > the following events were found in the datafile > event type: 'STI101' with event values: 5 6 7 8 > 9 11 15 16388 16391 16392 16396 > event type: 'STI301' with event values: 5.0003 5.0018 ...(many > more...) > event type: 'trial' with event values: > no trials have been defined yet, see DEFINETRIAL for further help > found 61361 events > created 0 trials > > (I address another point at the bottom of the email. I have left > the following paragraphs in for refrence) > >>> My first problem is, I should have 30 trials for this event. The >>> file >>> contains a total of 60 trials, but the other 30 are for eventtype >>> = 11 >>> So it is clearly doing something wrong. >> >>> Next, I decided to see what is in cfg.trl and I get the Nx3 >>> matrix that I find the following problems with it >>> 1> each trial should be 4000 milli seconds long. That happens here, >>> however, there seem to be overlap between trials which does not make >>> sense. This is what leads to the double counting. Thus I get 4000 >>> msec long trials bunched in group of two where the second trial >>> starts about 1000 to 1300 msecs after the beginning of the first >>> trial. >> >> Please have a look in cfg.event. >> >>> 2> If the first trial is at 8502, all subsequent trials should be in >>> increments of integral multiples of 4000 ( plus or minus a few). >>> But that does not seem to happen (and I am looking at on the >>> leading trial of the pair and discounting the trials that follow >>> 1000 msecs later.) >> >> That means that there are events detected that are not supposed to >> be there according to your knowledge of the dataset. Could it be >> that both the positive and the negative flank of the trigger are >> detected? > > > I have looked into this as it was the first thing I suspected. What > has been confusing me is that it seems to be counting the rising > flank of the correct trigger and the falling flank of the earlier > trigger, even though the event type for the earlier trigger is > different. I am looking for > cfg.trialdef.eventtype = 'STI101' and > cfg.trialdef.eventvalue = 7 or 11. > The earlier falling trigger is 5,6 or 8.9 and so should not be > considered at all. I never use STI301 > > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 9 20:35:36 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 9 Feb 2007 14:35:36 -0500 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Thanks for your email. I tried to look into trialfun_general.m file, but the one I have is only 286 lines long. I looked into preprocessing.m, just in case you meant it rather than trialfun_general.m and it is 432 lines long. sameer On Fri, 9 Feb 2007, Christian Hesse wrote: > Hi Sameer, > > thanks for the additional info and data from the STI101 channel you sent me. > > I think that the double counting of your triggers must be caused by the way > that the function "trialfun_general.m" computes the (valid) flanks for your > data format (e.g., line 467, and see all the comments in lines nearby). Using > the content of your STI101 channel (referred to as x below) I was unable to > reproduce the double counting using a slightly simpler approach: > > d = [0, diff(x)]; > ii = find((d~=0) & (x==7)); > % length(ii) gives 30 > ii = find((d~=0) & (x==11)); > % length(ii) gives 30 > > For the time being, the easiest solution (in my view, since you have the > STI101 channel) is to construct the "trl" matrix from the content of the ii > arrays above for each trigger, and copy this into the cfg structure used to > call preprocessing.m: > cfg.trl = trl; > > The more elegant solution in a Fieldtrip sense is to write your own trialfun, > which would consist of wrapper code around the essential operations outlined > above. I suggest you have a closer look at the code and documentation in > preprocessing.m and definetrial.m if you decide to pursue this route. > > Hope this helps, > Christian > > > > > > On 7 Feb 2007, at 17:30, Sameer Walawalkar wrote: > >> Thanks for the reply Robert. here's some more info. >> >>> Dear Sameer, >>> >>> Maybe you could try >>> cfg = [] ; >>> cfg.dataset = 'JD_012507_Beeps_One.fif' ; >>> cfg.trialdef.eventtype = '?'; >>> dum = definetrial(cfg); >>> and look what is printed on screen. >> >> evaluating trialfunction 'trialfun_general' >> the following events were found in the datafile >> event type: 'STI101' with event values: 5 6 7 8 9 11 >> 15 16388 16391 16392 16396 >> event type: 'STI301' with event values: 5.0003 5.0018 ...(many >> more...) >> event type: 'trial' with event values: >> no trials have been defined yet, see DEFINETRIAL for further help >> found 61361 events >> created 0 trials >> >> (I address another point at the bottom of the email. I have left the >> following paragraphs in for refrence) >> >>>> My first problem is, I should have 30 trials for this event. The file >>>> contains a total of 60 trials, but the other 30 are for eventtype = 11 >>>> So it is clearly doing something wrong. >>> >>>> Next, I decided to see what is in cfg.trl and I get the Nx3 matrix that I >>>> find the following problems with it >>>> 1> each trial should be 4000 milli seconds long. That happens here, >>>> however, there seem to be overlap between trials which does not make >>>> sense. This is what leads to the double counting. Thus I get 4000 msec >>>> long trials bunched in group of two where the second trial starts about >>>> 1000 to 1300 msecs after the beginning of the first trial. >>> >>> Please have a look in cfg.event. >>> >>>> 2> If the first trial is at 8502, all subsequent trials should be in >>>> increments of integral multiples of 4000 ( plus or minus a few). But that >>>> does not seem to happen (and I am looking at on the leading trial of the >>>> pair and discounting the trials that follow 1000 msecs later.) >>> >>> That means that there are events detected that are not supposed to be >>> there according to your knowledge of the dataset. Could it be that both >>> the positive and the negative flank of the trigger are detected? >> >> >> I have looked into this as it was the first thing I suspected. What has >> been confusing me is that it seems to be counting the rising flank of the >> correct trigger and the falling flank of the earlier trigger, even though >> the event type for the earlier trigger is different. I am looking for >> cfg.trialdef.eventtype = 'STI101' and >> cfg.trialdef.eventvalue = 7 or 11. >> The earlier falling trigger is 5,6 or 8.9 and so should not be considered >> at all. I never use STI301 >> >> sameer >> > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > > From sameer at ANDREW.CMU.EDU Fri Feb 9 23:28:04 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 9 Feb 2007 17:28:04 -0500 Subject: binica in fieldtrip Message-ID: Hello, I am running componentanalysis.m within fieldtrip to do ICA in order to remove blinks etc. I tried using cfg.method = 'fastICA' cfg.trials = 1:100 (data has 306 channels) but got failure to converge on 19th ica and analysis was aborted. Does anyone have any ideas about dealing with this? I also tried cfg.method = 'runica' cfg.trials = 1:100 but it takes a very looooong time. Any ways around it? I know that one can implement binica in EEGLAB. It is supposed to be 12 xs faster and can use smaller memory. Can I implement cfg.method = 'binica'? in fieldtrip? thanks, sameer From s.debener at UKE.UNI-HAMBURG.DE Fri Feb 9 22:46:41 2007 From: s.debener at UKE.UNI-HAMBURG.DE (Stefan Debener) Date: Fri, 9 Feb 2007 22:46:41 +0100 Subject: binica in fieldtrip In-Reply-To: Message-ID: Dear Sameer, Try running extended infomax ICA with the PCA option switched on and a reduction to about 50 components. This should speed up the decomposition substantially, and return nice eye blink components. If you do not get dipolar-like component maps, your data may suffer from substantial head movements. Temporal ICA expects that the sensors-to-source configuration remains unchanged during recording. I have not done systematic comparisons myself, but know from others that fastICA is not necessarily that. It can be even slower that other ICA algorithms... Hope this helps, Stefan Sameer Walawalkar wrote: > Hello, > > I am running componentanalysis.m within fieldtrip to do ICA in order > to remove blinks etc. I tried using > > cfg.method = 'fastICA' > cfg.trials = 1:100 (data has 306 channels) > but got failure to converge on 19th ica and analysis was aborted. > Does anyone have any ideas about dealing with this? > > I also tried > cfg.method = 'runica' cfg.trials = 1:100 > > but it takes a very looooong time. > > Any ways around it? I know that one can implement binica in EEGLAB. It > is supposed to be 12 xs faster and can use smaller memory. > > Can I implement cfg.method = 'binica'? in fieldtrip? > > thanks, > sameer > > From sameer at ANDREW.CMU.EDU Sun Feb 11 17:40:36 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 11 Feb 2007 11:40:36 -0500 Subject: No subject Message-ID: Hi, I am interested in removing blinks and other artifacts from my MEG data. Many of these artifacts can be visually identified. And from my experience with EEGLAB and fastICA, the first 19-20 independent components in my data seem to be artifacts. After doing (from http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:use_independent_component_analysis_ica_to_remove_ecg_artifacts) comp = componentanalysis(cfg, data); what command can I use in order to visually identify which components I should remove, In other words, how do I plot the components (like in EEGlab) before I can use the command to remove the components? Finally, while trying to see the spatial topography of the signals, using >> lay = createlayout('neuromag306.lay'); gives me error ??? Undefined command/function 'createlayout' even though the createlayout.m file exists in the private folder. (I am aware this might be a matlab problem and am looking into that too.) Thanks, sameer From Jan.Schoffelen at FCDONDERS.RU.NL Mon Feb 12 08:43:23 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 12 Feb 2007 08:43:23 +0100 Subject: No subject In-Reply-To: Message-ID: Hi Sameer, To start with your last question: >Finally, while trying to see the spatial topography of the signals, >using > >> lay = createlayout('neuromag306.lay'); >gives me error > ??? Undefined command/function 'createlayout' >even though the createlayout.m file exists in the private folder. (I am >aware this might be a matlab problem and am looking into that too.) The problem you mention is probably due to the fact, that createlayout is inside the private-folder. M-files which are located within the folder which contains the private-folder, have access to the functions which are private. However, private functions cannot be accessed from the command-line. You might try copying createlayout to a location which is on your matlab-path and retry the command. >After doing (from >http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:u >se_independent_component_analysis_ica_to_remove_ecg_artifacts) > > comp = componentanalysis(cfg, data); > >what command can I use in order to visually identify which >components I should remove, In other words, how do I plot the components >(like in EEGlab) before I can use the command to remove the components? Identifying the artifactual components can be done in a variety of ways: 1 you can plot the spatial topography, as specified in comp.comp. Artifacts often have a typical topography. 2 if you recorded an ECG-channel you can compute a QRS-complex triggered average, to identify those components being ECG-like. (Or similarly, you can compute coherence between the external ECG and your components). 3 eye-movements and muscle artifacts betray themselves by their spatial topography and time course. Yours, Jan-Mathijs From Jan.Schoffelen at FCDONDERS.RU.NL Mon Feb 12 08:47:43 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 12 Feb 2007 08:47:43 +0100 Subject: binica in fieldtrip In-Reply-To: Message-ID: Hi Sameer, Everyone is greatly encouraged to implement new features into fieldtrip. As a matter, that's the whole idea behind it. I don't know what the sampling rate of your data is, but what might help to reduce computation time, is to downsample the data before doing componentanalysis, using resampledata. Typically, artifacts of interest have a frequency < 100 Hz, so downsampling to 256 Hz doesn't hurt too much. Yours again, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Friday, February 09, 2007 11:28 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] binica in fieldtrip Hello, I am running componentanalysis.m within fieldtrip to do ICA in order to remove blinks etc. I tried using cfg.method = 'fastICA' cfg.trials = 1:100 (data has 306 channels) but got failure to converge on 19th ica and analysis was aborted. Does anyone have any ideas about dealing with this? I also tried cfg.method = 'runica' cfg.trials = 1:100 but it takes a very looooong time. Any ways around it? I know that one can implement binica in EEGLAB. It is supposed to be 12 xs faster and can use smaller memory. Can I implement cfg.method = 'binica'? in fieldtrip? thanks, sameer From Jan.Schoffelen at FCDONDERS.RU.NL Mon Feb 12 08:57:28 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Mon, 12 Feb 2007 08:57:28 +0100 Subject: Frequency Analysis! In-Reply-To: Message-ID: Dear Muthuraman, For the mtmwelch-method, the same caveats apply as to the mtmconvol-method. If you specify your window to be one second, and your data is also one second (perhaps even one sample less? Did you check this, a lonely sample is easily lost), then there is nothing to welch (because your data can be only split up in one overlapping segment of one second, or even cannot be split up at all, dependent on your data: see above). In the following link you find some info how to create fieldtrippish data-objects in matlab: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:da taformats You can read in your laplacian transformed data into matlab and create a data-structure (some hints are given in the link). Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Friday, February 09, 2007 1:06 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Frequency Analysis! Hello , Thankyou JM, for the suggestions regarding the Time-Frequency Analysis, it works well now. I need the time information inorder to see what happens to the power at a specific time interval. >>From the previous discussion for the Freqanalysis_mtmwelch method as Prof.Robert as suggested i tried to change the frequency resolution to 1 Hz in the Mtmwelch method. Now i get all the values to be Nan's. cfg.foi = [2:1:30]; cfg.t_ftimwin = ones(1,length(cfg.foi)).*1; And also is there way to load the Laplacian transformed data to the Fieldtip analysis which is a .mat file and work on it for the coherence analysis. I do the laplacian transformation and the welch periodogram method with my own programs not any software. With regards M.Muthuraman. _________________________________________________________________ Catch all the cricketing action right here. Live score, match reports, photos et al. http://content.msn.co.in/Sports/Cricket/Default.aspx From c.hesse at FCDONDERS.RU.NL Mon Feb 12 09:51:07 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 12 Feb 2007 09:51:07 +0100 Subject: binica in fieldtrip In-Reply-To: Message-ID: Hi Sameer, when using any ICA algorithm in Fiieldtrip, you must, of course, specify and pass the usual algorithm control parameters, since the componentanalysis funcntion is only a wrapper. As I mentioned in a previous email, you need to do model order selection (i.e. choose the number of ICs) and often reduce the dimension of your data (usually the same as the number of ICs). For FastICA you probably also want to specify the nonlinearity and whether the components are to be estimated one by one or all together. Please see the relevant documentation in the FastICA Matlab package. With the appropriate data dimension reduction, the performance of FastICA (tanh nonlinearity and symmetric approach) and Infomax should be essentially the same, so I suggest you pick whichever method you can get to work. You may also want to try the JADE algorithm (fine if you reduce data dimension). Hope that helps, Christian On 9 Feb 2007, at 23:28, Sameer Walawalkar wrote: > Hello, > > I am running componentanalysis.m within fieldtrip to do ICA in > order to remove blinks etc. I tried using > > cfg.method = 'fastICA' > cfg.trials = 1:100 (data has 306 channels) > but got failure to converge on 19th ica and analysis was aborted. > Does anyone have any ideas about dealing with this? > > I also tried > cfg.method = 'runica' cfg.trials = 1:100 > > but it takes a very looooong time. > > Any ways around it? I know that one can implement binica in EEGLAB. > It is supposed to be 12 xs faster and can use smaller memory. > > Can I implement cfg.method = 'binica'? in fieldtrip? > > thanks, > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Mon Feb 12 17:54:40 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 12 Feb 2007 11:54:40 -0500 Subject: No subject In-Reply-To: <001801c74e79$79498860$902dae83@fcdonders.nl> Message-ID: createlayout has new problems : ??? Error using ==> createlayout could not open electrode file: neuromag306 The field trip directory contains many layout files but not the ones useful for neuromag. How does one go about making one? sameer On Mon, 12 Feb 2007, Jan Mathijs Schoffelen wrote: > Hi Sameer, > > To start with your last question: > >> Finally, while trying to see the spatial topography of the signals, >> using >> >> lay = createlayout('neuromag306.lay'); >> gives me error >> ??? Undefined command/function 'createlayout' >> even though the createlayout.m file exists in the private folder. (I am >> aware this might be a matlab problem and am looking into that too.) > > The problem you mention is probably due to the fact, that createlayout is > inside the private-folder. M-files which are located within the folder which > contains the private-folder, have access to the functions which are private. > However, private functions cannot be accessed from the command-line. You > might try copying createlayout to a location which is on your matlab-path > and retry the command. > >> After doing (from >> http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:u >> se_independent_component_analysis_ica_to_remove_ecg_artifacts) >> >> comp = componentanalysis(cfg, data); >> >> what command can I use in order to visually identify which >> components I should remove, In other words, how do I plot the components >> (like in EEGlab) before I can use the command to remove the components? > > Identifying the artifactual components can be done in a variety of ways: > 1 you can plot the spatial topography, as specified in comp.comp. Artifacts > often have a typical topography. > 2 if you recorded an ECG-channel you can compute a QRS-complex triggered > average, to identify those components being ECG-like. (Or similarly, you can > compute coherence between the external ECG and your components). > 3 eye-movements and muscle artifacts betray themselves by their spatial > topography and time course. > > Yours, > > Jan-Mathijs > > From Brian.Roach at YALE.EDU Mon Feb 12 18:17:07 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Mon, 12 Feb 2007 12:17:07 -0500 Subject: sourceanalysis.m on EEG data In-Reply-To: <6.1.2.0.2.20070208122223.01e48d98@email.med.yale.edu> Message-ID: Sorry, I am a beginner in the source localization realm. I am still wondering what software to use with EEG data - we have a polhemus system, which creates a .hdm file - but is that the same type referred to in the tutorial below? Also, do this software: http://neuroimage.usc.edu/brainstorm/ interact with fieldTrip at all? Have any FieldTrip users had any experience with it? If not, where can I download the MRIviewer software mentioned in the tutorial (in the link below). thanks for any info, it is greatly appreciated! Brian At 12:25 PM 2/8/2007, Brian Roach wrote: >I am working through this tutorial on the web: > >http://www2.ru.nl/fcdonders/fieldtrip/doku.php?%20id=fieldtrip:documentation:tutorial:beamformer#plot_the_result > >I am wondering, do you only need to use MRIviewer to construct a forward >model for MEG data (and not for EEG data)? What kind of software do I >need to use to construct an .hdm file for EEG data? > >thanks! >Brian > From r.oostenveld at FCDONDERS.RU.NL Mon Feb 12 20:28:52 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 12 Feb 2007 20:28:52 +0100 Subject: generating data structure for all trials In-Reply-To: Message-ID: Hi Sameer, To add a few statements to Christians reply On 8 Feb 2007, at 18:59, Sameer Walawalkar wrote: > However, while using Fieldtrip, the first point where a MATLAB > variable > containing data is created is during trial definition at > data = preprocessing(cfg); (from online tutorial) > Trial rejections, and independent component analysis is done after > this. > > Instead I would prefer to use independent component analysis > first to > remove blinks etc, then do channels and trial rejections, and then > do the > trial definitions based on event types etc. If you do everything in FT, then you would do it like this definetrial -> preprocessing -> componentanalysis -> rejectcomponent -> freqananlysis -> sourceanalysis -> sourcestatistics and the datastructures would look like only cfg -> raw data (1) -> raw data (2) -> raw data (3) -> freq -> source -> source So the same datastructures are used multiple times, only the content slightly changes. Even if you decide not to do everything within FT, it is relevant to know that there are not that many data structures in FT and that raw data can be used in multiple fashions. Regarding the raw data above - the 1st raw data is the original. It is cut into segments, and could in principle be a single segment but that is probably not desirable for the freqanalysis later (and certainly not for statistics in the end). - the 2nd raw data consists of the component timecourses, and includes the ICA mixing matrix - the 3rd raw data is again mixed and contains channel data, but now without the artifacts Using the same raw data representation allows us to do freqanalysis or timelockanalysis on both channel-level "raw" data and on ICA-level "raw" data. I don't think that rejectcomponent is in the ftp version, please find it attached. I will also put it on the ftp server. Also have a look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:use_independent_component_analysis_ica_to_rem ove_ecg_artifacts best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: rejectcomponent.m Type: application/octet-stream Size: 3451 bytes Desc: not available URL: From werkle at MPIB-BERLIN.MPG.DE Mon Feb 12 20:39:40 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Mon, 12 Feb 2007 20:39:40 +0100 Subject: Question concerning statistics in fieldtrip Message-ID: Dear, in my PhD studies, I am working on lifespan differences on binding processes during visual perception. And for most parts of my ERP and TFR analyses, I use Fieldtrip - and it works fine. But currently, I'm a bit puzzled, how to set up appropriate statistical tests for my power and phase-locking analyses. Perhaps, I first describe my basic design: Subjects from three age-groups (factor AGE, 3 levels, between subject) performed a simple visual discrimination task, while I varied the 'amount' of visual input in three levels (factor SIZE, 3 levels, whithin subject). The data was recored from 64 electrodes. I am mainly interested in the question, whether the effect of visual stimulation changes across age-groups (AGE x SIZE interaction), and where this interaction effect is located topographically (on the scalp level). Is it in general possible, to use the statistical interface of Fieltrip (e.g. clusterrandanalysis) to estimate - in one model - mixed designs like the one decribed above (with more than three levels per factor)? If this is the case, could anyone please give me a hint how to implement it? Thank you very much for your suggestions. Best regards, Markus From r.oostenveld at FCDONDERS.RU.NL Mon Feb 12 21:01:07 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 12 Feb 2007 21:01:07 +0100 Subject: binica in fieldtrip In-Reply-To: <45CCEBC1.50708@uke.uni-hamburg.de> Message-ID: Hi Sameer On 9 Feb 2007, at 22:46, Stefan Debener wrote: > Try running extended infomax ICA with the PCA option switched on > and a reduction to about 50 components. This should speed up the > decomposition substantially, and return nice eye blink components. > If you do not get dipolar-like component maps, your data may suffer > from substantial head movements. Temporal ICA expects that the > sensors-to-source configuration remains unchanged during recording. Note that cfg.method='runica' also implements extended infomax ICA, see "help runica for details". Passing option (such as PCA- dimensionality reduction) to runica is done using the cfg.runica substructure in componentanalysis, e.g. cfg.runica.pca = 50. Since runica and binica have almost the same functionality, it was actually trivial to implement it in componentanalysis. I have just added it, you can download the latest FT version from the ftp server. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Mon Feb 12 21:10:59 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 12 Feb 2007 21:10:59 +0100 Subject: sourceanalysis.m on EEG data In-Reply-To: <6.1.2.0.2.20070212121453.01e2aa00@email.med.yale.edu> Message-ID: Hi Brian On 12 Feb 2007, at 18:17, Brian Roach wrote: > Sorry, I am a beginner in the source localization realm. I am > still wondering what software to use with EEG data - we have a > polhemus system, which creates a .hdm file - but is that the same > type referred to in the tutorial below? I am pretty sure that the hdm file from your Polhemus software is NOT the same as the hdm file generated by our CTF software. > Also, do this software: http://neuroimage.usc.edu/brainstorm/ > interact with fieldTrip at all? No, the two toolboxes do not share code. BrainStorm is probably better suited for making EEG head models (at the Donders we mainly use our MEG system if we plan to do source reconstruction). I suspect that it would not be very difficult to use a headmodel generated using BrainStorm in FT, but it will also not be trivial. > Have any FieldTrip users had any experience with it? If not, where > can I download the MRIviewer software mentioned in the tutorial (in > the link below). MRIviewer is a CTF/MEG specific software (it comes with the CTF software) and cannot be used for construction EEG head models. Instead have a look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:create_bem_headmodel_for_eeg. best regards Robert From sameer at ANDREW.CMU.EDU Mon Feb 12 21:17:58 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 12 Feb 2007 15:17:58 -0500 Subject: binica in fieldtrip In-Reply-To: <59383822-25C5-453B-A458-93FDD26135E6@fcdonders.ru.nl> Message-ID: thanks robert, and the info cfg.runica.pca = 50 was precisely what I was looking for. sameer On Mon, 12 Feb 2007, Robert Oostenveld wrote: > Hi Sameer > > On 9 Feb 2007, at 22:46, Stefan Debener wrote: >> Try running extended infomax ICA with the PCA option switched on and a >> reduction to about 50 components. This should speed up the decomposition >> substantially, and return nice eye blink components. If you do not get >> dipolar-like component maps, your data may suffer from substantial head >> movements. Temporal ICA expects that the sensors-to-source configuration >> remains unchanged during recording. > > Note that cfg.method='runica' also implements extended infomax ICA, see "help > runica for details". Passing option (such as PCA-dimensionality reduction) to > runica is done using the cfg.runica substructure in componentanalysis, e.g. > cfg.runica.pca = 50. > > Since runica and binica have almost the same functionality, it was actually > trivial to implement it in componentanalysis. I have just added it, you can > download the latest FT version from the ftp server. > > best regards, > Robert > > From maris at NICI.RU.NL Mon Feb 12 21:35:13 2007 From: maris at NICI.RU.NL (Eric Maris) Date: Mon, 12 Feb 2007 21:35:13 +0100 Subject: Question concerning statistics in fieldtrip In-Reply-To: <45D0C27C.5000601@mpib-berlin.mpg.de> Message-ID: Dear Markus, Good to hear that you like our statistics routines. However, I'm afraid that I have to disappoint you a little bit now. Permutation test are not well suited for testing interaction effects. This is because the null hypothesis (i.e., additive effects) is a constraint on the expected values of your dependent variable, observed in the different conditions. In contrast, the null hypotheses that can be tested with a permutation test all have to be phrased in terms of equality of probability distributions in the different conditions. The closest you can get with a permutation test, is testing the effect of one independent variable (say SIZE) within the different levels of AGE. Hopefully, you will get significant effects for some levels of AGE, but not for others. This result would be a sort of nonparametric interaction. Good luck, Eric Maris > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of > Markus Werkle-Bergner > Sent: Monday, February 12, 2007 8:40 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] Question concerning statistics in fieldtrip > > Dear, > > in my PhD studies, I am working on lifespan differences on binding > processes during visual perception. And for most parts of my ERP and TFR > analyses, I use Fieldtrip - and it works fine. > > But currently, I'm a bit puzzled, how to set up appropriate statistical > tests for my power and phase-locking analyses. Perhaps, I first describe > my basic design: > Subjects from three age-groups (factor AGE, 3 levels, between subject) > performed a simple visual discrimination task, while I varied the > 'amount' of visual input in three levels (factor SIZE, 3 levels, whithin > subject). The data was recored from 64 electrodes. I am mainly > interested in the question, whether the effect of visual stimulation > changes across age-groups (AGE x SIZE interaction), and where this > interaction effect is located topographically (on the scalp level). > > Is it in general possible, to use the statistical interface of Fieltrip > (e.g. clusterrandanalysis) to estimate - in one model - mixed designs > like the one decribed above (with more than three levels per factor)? If > this is the case, could anyone please give me a hint how to implement it? > > Thank you very much for your suggestions. > > Best regards, > Markus From Brian.Roach at YALE.EDU Mon Feb 12 22:32:18 2007 From: Brian.Roach at YALE.EDU (Brian Roach) Date: Mon, 12 Feb 2007 16:32:18 -0500 Subject: sourceanalysis.m on EEG data In-Reply-To: <2A3986A0-C8E5-40F1-8B4F-4655456BA4CA@fcdonders.ru.nl> Message-ID: Where can I find these functions listed below? % the prepare_bemmodel function is available upon request % the dipoli stand-alone executable is available upon request At 03:10 PM 2/12/2007, Robert Oostenveld wrote: >Hi Brian > >On 12 Feb 2007, at 18:17, Brian Roach wrote: >>Sorry, I am a beginner in the source localization realm. I am >>still wondering what software to use with EEG data - we have a >>polhemus system, which creates a .hdm file - but is that the same >>type referred to in the tutorial below? > >I am pretty sure that the hdm file from your Polhemus software is NOT >the same as the hdm file generated by our CTF software. > >>Also, do this software: http://neuroimage.usc.edu/brainstorm/ >>interact with fieldTrip at all? > >No, the two toolboxes do not share code. BrainStorm is probably >better suited for making EEG head models (at the Donders we mainly >use our MEG system if we plan to do source reconstruction). I suspect >that it would not be very difficult to use a headmodel generated >using BrainStorm in FT, but it will also not be trivial. > >>Have any FieldTrip users had any experience with it? If not, where >>can I download the MRIviewer software mentioned in the tutorial (in >>the link below). > >MRIviewer is a CTF/MEG specific software (it comes with the CTF >software) and cannot be used for construction EEG head models. >Instead have a look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? >id=fieldtrip:documentation:create_bem_headmodel_for_eeg. > >best regards >Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Tue Feb 13 15:09:18 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 13 Feb 2007 15:09:18 +0100 Subject: sourceanalysis.m on EEG data In-Reply-To: <6.1.2.0.2.20070212154706.04afcec0@email.med.yale.edu> Message-ID: The prepare_bemmodel function is in the zip file on the ftp server. The dipoli executable is attached to this mail. There exists only a linux i386 and an apple PPC version. You are not permitted to distribute the dipoli executable, it is not covered under the GPL license but made available courtesy of Thom Oostendorp. best regards, Robert On 12 Feb 2007, at 22:32, Brian Roach wrote: > Where can I find these functions listed below? > > % the prepare_bemmodel function is available upon request % the > dipoli stand-alone executable is available upon request -------------- next part -------------- A non-text attachment was scrubbed... Name: dipoli.zip Type: application/zip Size: 129801 bytes Desc: not available URL: -------------- next part -------------- From r.oostenveld at FCDONDERS.RU.NL Tue Feb 13 17:01:18 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 13 Feb 2007 17:01:18 +0100 Subject: bug in megrealign Message-ID: Dear FT-MEG users, I just noticed a bug in the MEGREALIGN function. I don't know how long it has been there, nor whether it affects all configurations or only whis particular one. The problem could be recognized from the output that MEGREALIGN prints on the screen: the buggy version shows original -> template RV 4128.84 % whereas the corrected version shows original -> template RV 10.32 % Also the scalp topography of the realigned ERF looked completely messy in the buggy version. The problem relates to the shift of the dipole layer on which the scalp data is projected: instead of shifting it inward with 2.5 cm, it was shifted outward and the dipoles bumped into the MEG helmet, causing weird interpolation effects. I noticed the problem when using a single-sphere headmodel fitted to the skin surface. It may be that the problem would not have as obvious for other head models, but am not sure. Maybe someone who recently used MEGREALIGN with singleshell headmodels could comment... I have made an attempt to fix it (per direct on fcdc/common, in this evening version on the ftp). Furthermore, I have now removed the default of 2.5 cm for cfg.inwardshift, since probably a lot of people are not using single-sphere headmodel fitted to the skin surface anymore. See the help of MEGREALIGN for more details. If you are unsure of wheteher it affects your results, I suggest that you rerun the megrealign part and also use the option cfg.feedback=yes (besides the default cfg.verify=yes). Note that from now on you must explicitely specify cfg.inwardshift. sorry for the inconvenience, Robert From t.schneider at UKE.UNI-HAMBURG.DE Tue Feb 13 17:26:18 2007 From: t.schneider at UKE.UNI-HAMBURG.DE (Till Schneider) Date: Tue, 13 Feb 2007 17:26:18 +0100 Subject: sourceanalysis.m on EEG data In-Reply-To: <60A04A24-9EC0-462D-893A-32B5E3F1563A@fcdonders.ru.nl> Message-ID: Dear Brian, I`ve worked with the prepare_bemmodel script for constructing a forward model for source localization of EEG data. Find attached a little tutorial with the steps I took for creating the BEM from an individual MRI. The plan is to put it also on the fieldtrip wiki (sooner or later). Please let me know if you have questions on this tutorial. Hope this helps, Till Robert Oostenveld schrieb: > The prepare_bemmodel function is in the zip file on the ftp server. > The dipoli executable is attached to this mail. There exists only a > linux i386 and an apple PPC version. You are not permitted to > distribute the dipoli executable, it is not covered under the GPL > license but made available courtesy of Thom Oostendorp. > > best regards, > Robert > > On 12 Feb 2007, at 22:32, Brian Roach wrote: > >> Where can I find these functions listed below? >> >> % the prepare_bemmodel function is available upon request % the >> dipoli stand-alone executable is available upon request > > -------------- next part -------------- A non-text attachment was scrubbed... Name: BEM Tutorial1.doc Type: application/msword Size: 390656 bytes Desc: not available URL: From ulla.rantakokko at TKK.FI Wed Feb 14 13:26:22 2007 From: ulla.rantakokko at TKK.FI (Ulla Rantakokko) Date: Wed, 14 Feb 2007 14:26:22 +0200 Subject: reading mat-files Message-ID: Hello all, I have tried to read in a mat-file or a fif-file. Fif-file is having problems with coilfile acceptance and also I get _________________________ ??? Invalid MEX-file 'D:\meg_pd_1.2\megmodel.dll': The specified module could not be found. ------------------------- even when the megmodel.dll exists. I would prefare to read in my preprocessed data in mat file and proceed with time-frequency analysis. However I get: ____________________ ??? Error using ==> fieldtrip-20061213\private\read_header unsupported data format Error in ==> read_fcdc_header at 37 [hdr] = read_header(varargin{:}); --------------------- even though mat files should be ok. How to give datafile and headerfile separately? Can datafile be in .mat or in .bin format ? I get "unsupported data format" from both options. in read_header.m : case 'fcdc_matbin' [path, file, ext] = fileparts(filename); headerfile = fullfile(path, [file '.mat']); datafile = fullfile(path, [file '.bin']); Thank you ulla From c.hesse at FCDONDERS.RU.NL Wed Feb 14 16:49:41 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 14 Feb 2007 16:49:41 +0100 Subject: reading mat-files In-Reply-To: <20070214142622.ghf59dugowk800oc@webmail1.tkk.fi> Message-ID: Hi Ulla, > I have tried to read in a mat-file or a fif-file. Fif-file is > having problems with coilfile acceptance and also I get > _________________________ > > ??? Invalid MEX-file 'D:\meg_pd_1.2\megmodel.dll': The specified > module could not be found. > ------------------------- > even when the megmodel.dll exists. have you added the location of the DLL to the matlab path? > I would prefare to read in my preprocessed data in mat file and > proceed with time-frequency analysis. Whether this will work, or not, depends on what software you use to preprocess your data and which format you subsequently save it in. At first glance, if you have stored your data in a mat file, then presumably it comprises various data structures, and it is unlikely that these will correspond to the data structures that Fieldtrip uses. So in this situation, you would have to convert whatever is in your mat file into FieldTrip data structures "by hand", which may or may not be possible. If you can provide more information on the content of your mat file, I may be able to say more. > However I get: > ____________________ > > ??? Error using ==> fieldtrip-20061213\private\read_header > unsupported data format > > Error in ==> read_fcdc_header at 37 > [hdr] = read_header(varargin{:}); > > --------------------- > even though mat files should be ok. > > How to give datafile and headerfile separately? > > Can datafile be in .mat or in .bin format ? > I get "unsupported data format" from both options. > > in read_header.m : > case 'fcdc_matbin' > [path, file, ext] = fileparts(filename); > headerfile = fullfile(path, [file '.mat']); > datafile = fullfile(path, [file '.bin']); > The 'fcdc_matbin" option assumes that the data header is stored in a mat file (in a suitable structure) and that the data itself is in a binary file. From your description above, I gather that this is not the format your data is in, right? You have the data in a mat file, and this is indeed not supported in FieldTrip. Depending on what kind of analysis you wish to do later on in FieldTrip, e.g. source analysis or beamforming on your time-frequency data, I would generally advise you to pre-process your data in FieldTrip as well, as this avoids all sorts of headaches and compatibility problems. I would therefore recommend focussing attention on solving the problem of reading in your raw data fif file in the first instance. Hope this helps, Christian -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Wed Feb 14 17:07:14 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 14 Feb 2007 17:07:14 +0100 Subject: too many trials/overlapping trials In-Reply-To: Message-ID: Hi Sameer, > Thanks for your email. I tried to look into trialfun_general.m > file, but the one I have is only 286 lines long. I looked into > preprocessing.m, just in case you meant it rather than > trialfun_general.m and it is 432 lines long. It turns out that I was actually referring to the function read_event (which is called by trialfun_general) that does all the flank detection which leads to the double counting. Sorry for the mixup! I gather from your other emails about component analysis that you have managed to successfully read in all of your data, yes? Christian From muthuraman10 at HOTMAIL.COM Wed Feb 14 18:06:14 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 14 Feb 2007 17:06:14 +0000 Subject: Frequency Analysis! In-Reply-To: <005901c74e7b$72472e80$902dae83@fcdonders.nl> Message-ID: Hello , Thankyou for the suggestions! I created my own data format and i able to read in Laplacian transformed data and the result are comparable now Is there a way to calculate the significance level in fieldtrip for the coherence calculated, last time i was referred to a Jacknife variance estimate does it still exist in the fieldtrip coherence analysis, or is there any other way to calculate the significance level in Fieldtrip One more question regarding the Time frequency Analysis, i have EMG data of 24000 data points with a sampling frequeny of 800Hz(30 seconds of data). I would like to do the Timefrequency analysis for this data and to see the power for the whole 30 seconds cfg.t_ftimwin(:)=0.5; If i go for 0.5 seconds then i can go only for the time interval of interest cfg.toi=0.25:0.05:0.725; all the other values are above and below this limit are Nan's I am interested mostly on the lower frequency range from 4 hz to 15 hz, what would be the right time window if i want to look for the whole 30 seconds of data. Thanking you with regards M.Muthuraman. >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Frequency Analysis! >Date: Mon, 12 Feb 2007 08:57:28 +0100 > >Dear Muthuraman, > >For the mtmwelch-method, the same caveats apply as to the mtmconvol-method. >If you specify your window to be one second, and your data is also one >second (perhaps even one sample less? Did you check this, a lonely sample >is >easily lost), then there is nothing to welch (because your data can be only >split up in one overlapping segment of one second, or even cannot be split >up at all, dependent on your data: see above). > >In the following link you find some info how to create fieldtrippish >data-objects in matlab: > >http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:da >taformats > >You can read in your laplacian transformed data into matlab and create a >data-structure (some hints are given in the link). > >Yours, > >Jan-Mathijs > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Friday, February 09, 2007 1:06 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: [FIELDTRIP] Frequency Analysis! > >Hello , > >Thankyou JM, for the suggestions regarding the Time-Frequency Analysis, it >works well now. I need the time information inorder to see what happens to >the power at a specific time interval. > >>From the previous discussion for the Freqanalysis_mtmwelch method as >Prof.Robert as suggested i tried to change the frequency resolution to 1 Hz >in the Mtmwelch method. Now i get all the values to be Nan's. > >cfg.foi = [2:1:30]; >cfg.t_ftimwin = ones(1,length(cfg.foi)).*1; > >And also is there way to load the Laplacian transformed data to the >Fieldtip > >analysis which is a .mat file and work on it for the coherence analysis. I >do the laplacian transformation and the welch periodogram method with my >own > >programs not any software. > >With regards >M.Muthuraman. > >_________________________________________________________________ >Catch all the cricketing action right here. Live score, match reports, >photos et al. http://content.msn.co.in/Sports/Cricket/Default.aspx _________________________________________________________________ Crave for a healthier lifestyle? Ask an expert http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm From sghosh at HSS.IITD.AC.IN Thu Feb 15 14:00:34 2007 From: sghosh at HSS.IITD.AC.IN (Shantanu Ghosh) Date: Thu, 15 Feb 2007 14:00:34 +0100 Subject: electrodes coordinates? Message-ID: Dear all: What do the columns in biosemi32.lay signify? I guess they are place coordinates for electrodes, except the first and last columns, but do not know which column is what. can anybody help? thanks. -Shantanu From ingrid.nieuwenhuis at FCDONDERS.RU.NL Thu Feb 15 14:25:26 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Thu, 15 Feb 2007 14:25:26 +0100 Subject: electrodes coordinates? In-Reply-To: Message-ID: Dear Shantanu, You can find this at the fieldtrip homepage, documentation -> frequently asked questions. See: http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:fr equently_asked_questions Ciao Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Shantanu Ghosh Sent: Thursday, February 15, 2007 2:01 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] electrodes coordinates? Dear all: What do the columns in biosemi32.lay signify? I guess they are place coordinates for electrodes, except the first and last columns, but do not know which column is what. can anybody help? thanks. -Shantanu From c.hesse at FCDONDERS.RU.NL Thu Feb 15 14:28:49 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Thu, 15 Feb 2007 14:28:49 +0100 Subject: electrodes coordinates? In-Reply-To: Message-ID: Hi Shantanu, The 1st column is the channel number in the layout file, it is not used any more. The 2nd and 3rd are the X-position and Y-position. The 4th and 5th column specify the with and height of the subplot that will be made in multiplotER and multiplotTFR. The 5th column is a string with the channel label. Cheers, Christian On 15 Feb 2007, at 14:00, Shantanu Ghosh wrote: > Dear all: > What do the columns in biosemi32.lay signify? I guess they are place > coordinates for electrodes, except the first and last columns, but > do not > know which column is what. can anybody help? > thanks. > -Shantanu > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at YAHOO.COM Thu Feb 15 17:32:17 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Thu, 15 Feb 2007 08:32:17 -0800 Subject: environment needed for meg-pd In-Reply-To: Message-ID: Hi, experts, I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment. The error showed as: Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. The specified module could not be found. The true is the .dll is in the same path as .m and the path has been add the Matlab. I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. Please help me. Thanks. Best, Eve --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Thu Feb 15 18:35:30 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 15 Feb 2007 12:35:30 -0500 Subject: environment needed for meg-pd In-Reply-To: <20070215163217.33486.qmail@web51409.mail.yahoo.com> Message-ID: use linux environment with 32 bit architecture. sameer On Thu, 15 Feb 2007, alotof eve wrote: > Hi, experts, > > I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment. > The error showed as: > Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. > The specified module could not be found. > > The true is the .dll is in the same path as .m and the path has been add the Matlab. > I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. > > Please help me. Thanks. > > Best, > Eve > > > --------------------------------- > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. From sameer at ANDREW.CMU.EDU Thu Feb 15 23:12:35 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 15 Feb 2007 17:12:35 -0500 Subject: too many trials/overlapping trials In-Reply-To: <4625E8A1-318C-4292-A901-6B2027508936@fcdonders.ru.nl> Message-ID: Hello Christian, Thanks for your email and sorry for the late reply. I was hoping to reply positively... But, no, I havn't been able to read all my dta properly into fieldtrip. I was asking about the other questions becasue I knew I would be facing them soon. I don't quite understand the whole pading issue in read_event. So I am trying to write my own code to generate cfg.trl. That I think will be much easier. sameer On Wed, 14 Feb 2007, Christian Hesse wrote: > Hi Sameer, > >> Thanks for your email. I tried to look into trialfun_general.m file, but >> the one I have is only 286 lines long. I looked into preprocessing.m, just >> in case you meant it rather than trialfun_general.m and it is 432 lines >> long. > > It turns out that I was actually referring to the function read_event (which > is called by trialfun_general) that does all the flank detection which leads > to the double counting. Sorry for the mixup! > > I gather from your other emails about component analysis that you have > managed to successfully read in all of your data, yes? > > Christian > > From c.hesse at FCDONDERS.RU.NL Fri Feb 16 17:59:00 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 16 Feb 2007 17:59:00 +0100 Subject: environment needed for meg-pd In-Reply-To: <20070215163217.33486.qmail@web51409.mail.yahoo.com> Message-ID: Hi Eve, you should be able to use the meg-pd toolbox (also from FieldTrip) in Matlab under Windows. I got the toolbox to work in Matlab7 under WindowsXP as follows: - extract the meg-pd-1.2-10.mswin.zip file to somewhere - then copy (or move) the meg_pd_1.2 directory wherever you want - in the README file in the meg-pd-1.2-10.mswin directory it specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin\lib \i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of Matlab on your system, in my case this was the directory "MATLAB71\bin \win32" - start up Matlab, add the fieldtrip and meg_pd_1.2 directories to your path and try to read your .fif file Let me know if this works on your Windows system Regards, Christian On 15 Feb 2007, at 17:32, alotof eve wrote: > Hi, experts, > > I am a new user of fieldtrip. I try to use meg-pd package to > import NeuroMag data but it seems there is something wrong with the > environment. > The error showed as: > Unable to load mex file: F:\MATLAB6p5\toolbox > \fieldtrip-20070213\meg_pd_1.2\loadfif.dll. > The specified module could not be found. > > The true is the .dll is in the same path as .m and the path > has been add the Matlab. > I use Latlab 6.5 under WindowXP. I don't know if it affects. > I saw the "lib" in the same meg-pd package included a .dll for pc- > cygwin. I wonder if I have to use Matlab under Linux/Unix > environment. Or if any other limits. > > Please help me. Thanks. > > Best, > Eve > > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 16 18:12:35 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 16 Feb 2007 12:12:35 -0500 Subject: too many trials Message-ID: Hello, I am close to fixing the problem with too many trials, principaly by writing another function which takes the cfg output from definetrial, discards the trial definitions in cfg.trl and replaces it with the correct set based on my reading the trigger channel. But I have left cfg.event untouched. My question is, for the proper working of DICS (and other processing) once the trials have been defined, do I have to make any changes to cfg.event at all or I could proceed. sameer From alotof_xd at YAHOO.COM Fri Feb 16 20:13:46 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Fri, 16 Feb 2007 11:13:46 -0800 Subject: environment needed for meg-pd In-Reply-To: Message-ID: Hi Christian, Yes it works. Thank you so much. But now I met a new problem. I got only a whole .fif data. When I tried the command "MEGMODEL", it said any argument can be left out. However, the error showed up again: >> MEGMODEL ??? Could not load the coil files Error in ==> F:\MATLAB6p5\bin\win32\megmodel.dll I couldn't find any .fif file like Neuromag-122 or coilfile.fif. How do you settle it? Thanks. Best, Eve Christian Hesse wrote: Hi Eve, you should be able to use the meg-pd toolbox (also from FieldTrip) in Matlab under Windows. I got the toolbox to work in Matlab7 under WindowsXP as follows: - extract the meg-pd-1.2-10.mswin.zip file to somewhere - then copy (or move) the meg_pd_1.2 directory wherever you want - in the README file in the meg-pd-1.2-10.mswin directory it specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin\lib\i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of Matlab on your system, in my case this was the directory "MATLAB71\bin\win32" - start up Matlab, add the fieldtrip and meg_pd_1.2 directories to your path and try to read your .fif file Let me know if this works on your Windows system Regards, Christian On 15 Feb 2007, at 17:32, alotof eve wrote: Hi, experts, I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment. The error showed as: Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. The specified module could not be found. The true is the .dll is in the same path as .m and the path has been add the Matlab. I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. Please help me. Thanks. Best, Eve --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 16 21:46:04 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 16 Feb 2007 15:46:04 -0500 Subject: .lay layout file for neuromag 306 channels Message-ID: Hi, As I had written some time ago, I could not find a .lay file which would be useful for neuromag 306 (there is a NM122.lay file there). Is there some way around this? sameer From alotof_xd at YAHOO.COM Sat Feb 17 21:03:31 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Sat, 17 Feb 2007 12:03:31 -0800 Subject: MEGMODEL Message-ID: Hi, experts, Maybe I misunderstood the command. My MEG data is from NeuroMag 306 channels. Does that mean I should use "Neuromag-306" as argument? Thanks for any suggestion. Best, Eve alotof eve wrote: Hi Christian, Yes it works. Thank you so much. But now I met a new problem. I got only a whole .fif data. When I tried the command "MEGMODEL", it said any argument can be left out. However, the error showed up again: >> MEGMODEL ??? Could not load the coil files Error in ==> F:\MATLAB6p5\bin\win32\megmodel.dll I couldn't find any .fif file like Neuromag-122 or coilfile.fif. How do you settle it? Thanks. Best, Eve Christian Hesse wrote: Hi Eve, you should be able to use the meg-pd toolbox (also from FieldTrip) in Matlab under Windows. I got the toolbox to work in Matlab7 under WindowsXP as follows: - extract the meg-pd-1.2-10.mswin.zip file to somewhere - then copy (or move) the meg_pd_1.2 directory wherever you want - in the README file in the meg-pd-1.2-10.mswin directory it specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin\lib\i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of Matlab on your system, in my case this was the directory "MATLAB71\bin\win32" - start up Matlab, add the fieldtrip and meg_pd_1.2 directories to your path and try to read your .fif file Let me know if this works on your Windows system Regards, Christian On 15 Feb 2007, at 17:32, alotof eve wrote: Hi, experts, I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment. The error showed as: Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. The specified module could not be found. The true is the .dll is in the same path as .m and the path has been add the Matlab. I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. Please help me. Thanks. Best, Eve --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. --------------------------------- No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Sun Feb 18 12:23:49 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Sun, 18 Feb 2007 12:23:49 +0100 Subject: too many trials In-Reply-To: Message-ID: Hi Sameer, On 16 Feb 2007, at 18:12, Sameer Walawalkar wrote: > I am close to fixing the problem with too many trials, principaly > by writing another function which takes the cfg output from > definetrial, discards the trial definitions in cfg.trl and replaces > it with the correct set based on my reading the trigger channel. What you have done is that you have created your own 'trialfun'. That is perfectly acceptable, and actually FT is explicitely designed to support that. See also http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:tutorial:preprocessing at the bottom for an example. Another example is at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:detect_the_muscle_activity_in_an_emg_channel_ and_use_that_as_trial_definition In custom trialfuns, people can use whatever they want to make the "trl" structure, and use read_fcdc_event of they wish or not. You can still use definetrial by cfg.trialfun = 'your_function' Actually the default is cfg.trialfun = 'trialfun_general' and trialfun_general is using the data-independent read_fcdc_event. Feel free to add your trialfun to the example matlab scripts section on the documentation wiki. > But I have left cfg.event untouched. > My question is, for the proper working of DICS (and other > processing) once the trials have been defined, do I have to make > any changes to cfg.event at all or I could proceed. cfg.event is only stored for later reference by yourself. Other FT functions (except for "recodeevent", which is not included in the ftp version sofar) do not use it. Robert From sameer at ANDREW.CMU.EDU Sun Feb 18 16:53:01 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Sun, 18 Feb 2007 10:53:01 -0500 Subject: too many trials In-Reply-To: <2B82FF0A-252E-4C21-B7F7-3C4AA31D5272@fcdonders.ru.nl> Message-ID: thanks Robert, I managed to do ICA for the data, but runica, fastica and jader gave errors. Varimax finally worked. jader: ??? Error using ==> zeros Product of dimensions is greater than maximum integer. Error in ==> jader at 90 CM = zeros(m,m*nbcm); % Storage for cumulant matrices Error in ==> componentanalysis at 323 weights = jader(dat); fastica: Calculating covariance... ??? Error using ==> componentanalysis call to fastica failed runica: step 60 - lrate 0.000000, wchange 69.06649297, angledelta 99.6 deg runica(): QUITTING - weight matrix may not be invertible! ??? Error using ==> mtimes Inner matrix dimensions must agree. Error in ==> componentanalysis at 394 comp.trial{trial} = weights * sphere * data.trial{trial}; Do these errors tell you anything about the data? Finally, I really need to know (do I) about the .lay file to be used for neuromag 306 data to see the independent components. I have asked about this two or three times in earlier emails. thanks, sameer On Sun, 18 Feb 2007, Robert Oostenveld wrote: > Hi Sameer, > > On 16 Feb 2007, at 18:12, Sameer Walawalkar wrote: >> I am close to fixing the problem with too many trials, principaly by >> writing another function which takes the cfg output from definetrial, >> discards the trial definitions in cfg.trl and replaces it with the correct >> set based on my reading the trigger channel. > > What you have done is that you have created your own 'trialfun'. That is > perfectly acceptable, and actually FT is explicitely designed to support > that. See also http://www2.ru.nl/fcdonders/fieldtrip/doku.php? > id=fieldtrip:documentation:tutorial:preprocessing at the bottom for an > example. Another example is at > http://www2.ru.nl/fcdonders/fieldtrip/doku.php? > id=fieldtrip:documentation:detect_the_muscle_activity_in_an_emg_channel_ > and_use_that_as_trial_definition > > In custom trialfuns, people can use whatever they want to make the "trl" > structure, and use read_fcdc_event of they wish or not. > > You can still use definetrial by > cfg.trialfun = 'your_function' > Actually the default is > cfg.trialfun = 'trialfun_general' > and trialfun_general is using the data-independent read_fcdc_event. Feel free > to add your trialfun to the example matlab scripts section on the > documentation wiki. > >> But I have left cfg.event untouched. >> My question is, for the proper working of DICS (and other processing) once >> the trials have been defined, do I have to make any changes to cfg.event at >> all or I could proceed. > > cfg.event is only stored for later reference by yourself. Other FT functions > (except for "recodeevent", which is not included in the ftp version sofar) do > not use it. > > Robert > > From c.hesse at FCDONDERS.RU.NL Mon Feb 19 09:18:00 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 19 Feb 2007 09:18:00 +0100 Subject: MEGMODEL In-Reply-To: <15180.61475.qm@web51411.mail.yahoo.com> Message-ID: Hi Eve, FieldTrip handles (pretty much) all function calls to the meg-pd toolbox for you (in particular which are the appropriate input arguments to use) so you don't have to deal with these issues yourself. See if you can extract the header information and some data from your .fif file using filename = "fullpath/name.fif" hdr = read_fcdc_header(filename); % hdr should be a structure dat = read_fcdc_data(filename); % dat should be a nchan x nsamp matrix see what you get. Regards, Christian On 17 Feb 2007, at 21:03, alotof eve wrote: > Hi, experts, > > Maybe I misunderstood the command. My MEG data is from NeuroMag > 306 channels. Does that mean I should use "Neuromag-306" as > argument? Thanks for any suggestion. > > Best, > Eve > > > alotof eve wrote: > Hi Christian, > > Yes it works. Thank you so much. > But now I met a new problem. I got only a whole .fif data. When > I tried the command "MEGMODEL", it said any argument can be left > out. However, the error showed up again: > >> MEGMODEL > ??? Could not load the coil files > > Error in ==> F:\MATLAB6p5\bin\win32\megmodel.dll > > I couldn't find any .fif file like Neuromag-122 or coilfile.fif. > How do you settle it? > Thanks. > > Best, > Eve > > Christian Hesse wrote: > Hi Eve, > > you should be able to use the meg-pd toolbox (also from FieldTrip) > in Matlab under Windows. I got the toolbox to work in Matlab7 under > WindowsXP as follows: > > - extract the meg-pd-1.2-10.mswin.zip file to somewhere > - then copy (or move) the meg_pd_1.2 directory wherever you want > - in the README file in the meg-pd-1.2-10.mswin directory it > specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin > \lib\i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of > Matlab on your system, in my case this was the directory "MATLAB71 > \bin\win32" > - start up Matlab, add the fieldtrip and meg_pd_1.2 directories to > your path and try to read your .fif file > > Let me know if this works on your Windows system > > Regards, > Christian > > > On 15 Feb 2007, at 17:32, alotof eve wrote: > >> Hi, experts, >> >> I am a new user of fieldtrip. I try to use meg-pd package to >> import NeuroMag data but it seems there is something wrong with >> the environment. >> The error showed as: >> Unable to load mex file: F:\MATLAB6p5\toolbox >> \fieldtrip-20070213\meg_pd_1.2\loadfif.dll. >> The specified module could not be found. >> >> The true is the .dll is in the same path as .m and the path >> has been add the Matlab. >> I use Latlab 6.5 under WindowXP. I don't know if it affects. >> I saw the "lib" in the same meg-pd package included a .dll for pc- >> cygwin. I wonder if I have to use Matlab under Linux/Unix >> environment. Or if any other limits. >> >> Please help me. Thanks. >> >> Best, >> Eve >> >> TV dinner still cooling? >> Check out "Tonight's Picks" on Yahoo! TV. > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > > > TV dinner still cooling? > Check out "Tonight's Picks" on Yahoo! TV. > > > No need to miss a message. Get email on-the-go > with Yahoo! Mail for Mobile. Get started. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Mon Feb 19 09:18:53 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 19 Feb 2007 09:18:53 +0100 Subject: .lay layout file for neuromag 306 channels In-Reply-To: Message-ID: Hi Sameer, please have a look at the FT (in fieldtrip/private) function "createlayout.m" (in the fieldtrip/private directory) which should be able to create a layout for your Neuromag306 data on the fly. The function takes a structure containing gradiometer information as input. If you read in your data using "preprocessing.m" then the gradiometer info will be contained in a field called data.grad. Hope this helps, Christian On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: > Hi, > > As I had written some time ago, I could not find a .lay file which > would be useful for neuromag 306 (there is a NM122.lay file there). > > Is there some way around this? > > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at HOTMAIL.COM Mon Feb 19 11:23:27 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 19 Feb 2007 10:23:27 +0000 Subject: Time Frequency Analysis! In-Reply-To: <005901c74e7b$72472e80$902dae83@fcdonders.nl> Message-ID: Hello Fieldtrippers, One more question regarding the Time frequency Analysis, i have EMG data of 24000 data points with a sampling frequeny of 800Hz(30 seconds of continous data). I would like to do the Timefrequency analysis for this data and to see the power for the whole 30 seconds cfg.t_ftimwin(:)=0.5; If i go for 0.5 seconds then i can go only for the time interval of interest cfg.toi=0.25:0.05:0.725; all the other values are above and below this limit are Nan's I am interested mostly on the lower frequency range from 4 hz to 15 hz, what would be the right time window if i want to look for the continous 30 seconds of data. Thanking you with regards M.Muthuraman _________________________________________________________________ Latest updates from the world of sports http://content.msn.co.in/Sports/Default From c.hesse at FCDONDERS.RU.NL Mon Feb 19 11:56:19 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 19 Feb 2007 11:56:19 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Hi Muthuraman, > One more question regarding the Time frequency Analysis, i have EMG > data of 24000 data points with a sampling frequeny of 800Hz(30 > seconds of continous data). I would like to do the Timefrequency > analysis for this data and to see the power for the whole 30 seconds use preprocessing to get the EMG data into a single 30s trial (if you want to analyze the rectified EMG, then do the rectification in preprocessing), then use frequanalysis with cfg.method = 'mtmfft'; cfg.output = 'pow'; this should give you the power spectrum of your EMG data over the entire 30 second period. Regards, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at HOTMAIL.COM Mon Feb 19 12:52:25 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 19 Feb 2007 11:52:25 +0000 Subject: Time Frequency Analysis! In-Reply-To: <25799ED0-47CF-4D9C-8852-D18E0BD0CDC1@fcdonders.ru.nl> Message-ID: Hello, Thanks for the suggestion but using the mtmfft which i have done already and it works, my interest now is that i would like to use the Time frequency analysis 'mtmconvol' to estimate the power in the time frequency scale, in which how to get the whole 30secs continous data in one time frequency plot(TFR). Thanking you with regards M.Muthuraman. >From: Christian Hesse >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Mon, 19 Feb 2007 11:56:19 +0100 > >Hi Muthuraman, > >>One more question regarding the Time frequency Analysis, i have EMG data >>of 24000 data points with a sampling frequeny of 800Hz(30 seconds of >>continous data). I would like to do the Timefrequency analysis for this >>data and to see the power for the whole 30 seconds > >use preprocessing to get the EMG data into a single 30s trial (if you want >to analyze the rectified EMG, then do the rectification in preprocessing), >then use frequanalysis with > >cfg.method = 'mtmfft'; >cfg.output = 'pow'; > >this should give you the power spectrum of your EMG data over the entire >30 second period. > >Regards, >Christian > > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > _________________________________________________________________ Tried the new MSN Messenger? It�s cool! Download now. http://messenger.msn.com/Download/Default.aspx?mkt=en-in From c.hesse at FCDONDERS.RU.NL Mon Feb 19 13:12:03 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 19 Feb 2007 13:12:03 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Hi Muthuraman, ok, in that case you can try the following (this assumes you have windows of length "winlen" which overlap by "halfwin = winlen/2") winlen = 0.5; % this is in seconds you can also use another time window halfwin = winlen/2; % the total number of windows covering the 30 second period nwin = 2.*(30./winlen) - 1; cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.t_ftimwin = ones(1,nwin).*winlen; cfg.toi = [0:halfwin:30-winlen]; The important things here to check are 1) that cfg.t_ftimwin and cfg.toi contain the same number of elements 2) the times you specify in cfg.toi actually correspond to your time axis (i.e. do not start before or go on after). If you want to use a different overlap, you need to calculate nwin slightly differently. Hope this helps more, Christian > Thanks for the suggestion but using the mtmfft which i have done > already and it works, my interest now is that i would like to use > the Time frequency analysis 'mtmconvol' to estimate the power in > the time frequency scale, in which how to get the whole 30secs > continous data in one time frequency plot(TFR). > > Thanking you > > with regards > M.Muthuraman. > >> From: Christian Hesse >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> Date: Mon, 19 Feb 2007 11:56:19 +0100 >> >> Hi Muthuraman, >> >>> One more question regarding the Time frequency Analysis, i have >>> EMG data of 24000 data points with a sampling frequeny of 800Hz >>> (30 seconds of continous data). I would like to do the >>> Timefrequency analysis for this data and to see the power for >>> the whole 30 seconds >> >> use preprocessing to get the EMG data into a single 30s trial (if >> you want to analyze the rectified EMG, then do the rectification >> in preprocessing), then use frequanalysis with >> >> cfg.method = 'mtmfft'; >> cfg.output = 'pow'; >> >> this should give you the power spectrum of your EMG data over the >> entire 30 second period. >> >> Regards, >> Christian >> >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> > > _________________________________________________________________ > Tried the new MSN Messenger? It’s cool! Download now. http:// > messenger.msn.com/Download/Default.aspx?mkt=en-in > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From Daria.Osipova at FCDONDERS.RU.NL Mon Feb 19 16:31:29 2007 From: Daria.Osipova at FCDONDERS.RU.NL (Daria Osipova) Date: Mon, 19 Feb 2007 16:31:29 +0100 Subject: .lay layout file for neuromag 306 channels In-Reply-To: Message-ID: Hi Attached are 306-channel Neuromag layout files (also for magnetometers and gradiometers separately). Cheers, Dasha _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Christian Hesse Sent: Monday, February 19, 2007 9:19 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels Hi Sameer, please have a look at the FT (in fieldtrip/private) function "createlayout.m" (in the fieldtrip/private directory) which should be able to create a layout for your Neuromag306 data on the fly. The function takes a structure containing gradiometer information as input. If you read in your data using "preprocessing.m" then the gradiometer info will be contained in a field called data.grad. Hope this helps, Christian On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: Hi, As I had written some time ago, I could not find a .lay file which would be useful for neuromag 306 (there is a NM122.lay file there). Is there some way around this? sameer ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306all.lay Type: application/octet-stream Size: 14476 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306mag.lay Type: application/octet-stream Size: 5027 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: NM306planar.lay Type: application/octet-stream Size: 9638 bytes Desc: not available URL: From sameer at ANDREW.CMU.EDU Mon Feb 19 18:23:48 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 19 Feb 2007 12:23:48 -0500 Subject: .lay layout file for neuromag 306 channels In-Reply-To: <004e01c7543b$06f4f930$032dae83@fcdonders.nl> Message-ID: Thanks Dasha for the files, though I learned from Christaian's email and further studying createlayout that if the appropriate layout files do not exist, createlayout can be used to create them. But now I am getting an error which I dont understand. topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) ??? Error using ==> topoplot Flag arguments must be strings While trying to understand this error, I realized that in the topoplot.m file function [handle] = topoplot(varargin) handle is never assigned a value.... best, sameer On Mon, 19 Feb 2007, Daria Osipova wrote: > Hi > > Attached are 306-channel Neuromag layout files (also for magnetometers and > gradiometers separately). > > Cheers, > > Dasha > > > > > > _____ > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Christian Hesse > Sent: Monday, February 19, 2007 9:19 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels > > > > Hi Sameer, > > > > please have a look at the FT (in fieldtrip/private) function > "createlayout.m" (in the fieldtrip/private directory) which should be able > to create a layout for your Neuromag306 data on the fly. The function takes > a structure containing gradiometer information as input. If you read in your > data using "preprocessing.m" then the gradiometer info will be contained in > a field called data.grad. > > > > Hope this helps, > > Christian > > > > > > > > On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: > > > > > > Hi, > > > > As I had written some time ago, I could not find a .lay file which would be > useful for neuromag 306 (there is a NM122.lay file there). > > > > Is there some way around this? > > > > sameer > > > > > > ---------------------------------------------------------------------- > > Christian Hesse, PhD, MIEEE > > > > F.C. Donders Centre for Cognitive Neuroimaging > > P.O. Box 9101 > > NL-6500 HB Nijmegen > > The Netherlands > > > > Tel.: +31 (0)24 36 68293 > > Fax: +31 (0)24 36 10989 > > > > Email: c.hesse at fcdonders.ru.nl > > Web: www.fcdonders.ru.nl > > ---------------------------------------------------------------------- > > > > > > > > > > > > From ingrid.nieuwenhuis at FCDONDERS.RU.NL Mon Feb 19 18:55:23 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 19 Feb 2007 18:55:23 +0100 Subject: .lay layout file for neuromag 306 channels In-Reply-To: Message-ID: Hi Sameer, I might be able to help, but could you specify a bit more what you did? So which topoplot did you call, and what was your cfg? And what are the fields in your data that you want to plot? Best, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Monday, February 19, 2007 6:24 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels Thanks Dasha for the files, though I learned from Christaian's email and further studying createlayout that if the appropriate layout files do not exist, createlayout can be used to create them. But now I am getting an error which I dont understand. topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) ??? Error using ==> topoplot Flag arguments must be strings While trying to understand this error, I realized that in the topoplot.m file function [handle] = topoplot(varargin) handle is never assigned a value.... best, sameer On Mon, 19 Feb 2007, Daria Osipova wrote: > Hi > > Attached are 306-channel Neuromag layout files (also for magnetometers and > gradiometers separately). > > Cheers, > > Dasha > > > > > > _____ > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Christian Hesse > Sent: Monday, February 19, 2007 9:19 AM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels > > > > Hi Sameer, > > > > please have a look at the FT (in fieldtrip/private) function > "createlayout.m" (in the fieldtrip/private directory) which should be able > to create a layout for your Neuromag306 data on the fly. The function takes > a structure containing gradiometer information as input. If you read in your > data using "preprocessing.m" then the gradiometer info will be contained in > a field called data.grad. > > > > Hope this helps, > > Christian > > > > > > > > On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: > > > > > > Hi, > > > > As I had written some time ago, I could not find a .lay file which would be > useful for neuromag 306 (there is a NM122.lay file there). > > > > Is there some way around this? > > > > sameer > > > > > > ---------------------------------------------------------------------- > > Christian Hesse, PhD, MIEEE > > > > F.C. Donders Centre for Cognitive Neuroimaging > > P.O. Box 9101 > > NL-6500 HB Nijmegen > > The Netherlands > > > > Tel.: +31 (0)24 36 68293 > > Fax: +31 (0)24 36 10989 > > > > Email: c.hesse at fcdonders.ru.nl > > Web: www.fcdonders.ru.nl > > ---------------------------------------------------------------------- > > > > > > > > > > > > From sameer at ANDREW.CMU.EDU Mon Feb 19 19:31:28 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 19 Feb 2007 13:31:28 -0500 Subject: .lay layout file for neuromag 306 channels In-Reply-To: <002701c7544f$20d49220$642dae83@fcdonders.nl> Message-ID: Hello Ingrid, Thanks for your email. Here is some info which might help you. lay = prj: [307x2 double] box: [307x2 double] label: {307x1 cell} compRR_orig = fsample: 1000 time: {1x30 cell} trial: {1x30 cell} label: {307x1 cell} topolabel: {307x1 cell} topo: [307x307 double] cfg: [1x1 struct] The command I used was topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) so my cfg was essentially cfg = []; I am not sure what you mean by which topoplot. The vector compRR_orig contains independent components calculated by componentanalysis.m; maybe this helps. thanks, sameer On Mon, 19 Feb 2007, Ingrid Nieuwenhuis wrote: > Hi Sameer, > > I might be able to help, but could you specify a bit more what you did? So > which topoplot did you call, and what was your cfg? And what are the fields > in your data that you want to plot? > > Best, > Ingrid > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Sameer Walawalkar > Sent: Monday, February 19, 2007 6:24 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels > > Thanks Dasha for the files, though I learned from Christaian's email and > further studying createlayout that if the appropriate layout files do not > exist, createlayout can be used to create them. > > But now I am getting an error which I dont understand. > > topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) > ??? Error using ==> topoplot > Flag arguments must be strings > > > While trying to understand this error, I realized that in the topoplot.m > file > > function [handle] = topoplot(varargin) > > handle is never assigned a value.... > > > best, > sameer > > > > > > > > > > > > On Mon, 19 Feb 2007, Daria Osipova wrote: > >> Hi >> >> Attached are 306-channel Neuromag layout files (also for magnetometers and >> gradiometers separately). >> >> Cheers, >> >> Dasha >> >> >> >> >> >> _____ >> >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf >> Of Christian Hesse >> Sent: Monday, February 19, 2007 9:19 AM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] .lay layout file for neuromag 306 channels >> >> >> >> Hi Sameer, >> >> >> >> please have a look at the FT (in fieldtrip/private) function >> "createlayout.m" (in the fieldtrip/private directory) which should be able >> to create a layout for your Neuromag306 data on the fly. The function > takes >> a structure containing gradiometer information as input. If you read in > your >> data using "preprocessing.m" then the gradiometer info will be contained > in >> a field called data.grad. >> >> >> >> Hope this helps, >> >> Christian >> >> >> >> >> >> >> >> On 16 Feb 2007, at 21:46, Sameer Walawalkar wrote: >> >> >> >> >> >> Hi, >> >> >> >> As I had written some time ago, I could not find a .lay file which would > be >> useful for neuromag 306 (there is a NM122.lay file there). >> >> >> >> Is there some way around this? >> >> >> >> sameer >> >> >> >> >> >> ---------------------------------------------------------------------- >> >> Christian Hesse, PhD, MIEEE >> >> >> >> F.C. Donders Centre for Cognitive Neuroimaging >> >> P.O. Box 9101 >> >> NL-6500 HB Nijmegen >> >> The Netherlands >> >> >> >> Tel.: +31 (0)24 36 68293 >> >> Fax: +31 (0)24 36 10989 >> >> >> >> Email: c.hesse at fcdonders.ru.nl >> >> Web: www.fcdonders.ru.nl >> >> ---------------------------------------------------------------------- >> >> >> >> >> >> >> >> >> >> >> >> > > From r.oostenveld at FCDONDERS.RU.NL Mon Feb 19 20:41:54 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 19 Feb 2007 20:41:54 +0100 Subject: .lay layout file for neuromag 306 channels In-Reply-To: Message-ID: On 19 Feb 2007, at 19:31, Sameer Walawalkar wrote: >> topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo >> (:,1)) >> ??? Error using ==> topoplot >> Flag arguments must be strings I suspect that you are mixing up EEGLAB and FieldTrip. >> cd ~/matlab/fieldtrip >> topoplot([], randn(100,1), randn(100,1), randn(100,1)) ??? Error using ==> topoplot When four input arguments are supplied, the following syntax should be used: topoplot(cfg,X,Y,datavector); >> cd ~/matlab/eeglab/functions >> topoplot([], randn(100,1), randn(100,1), randn(100,1)) ??? Error using ==> topoplot Flag arguments must be strings Your error corresponds with the EEGLAB one. Note that the FT version wants the first argument as a struct, so you cannot specify []. I will fix the empty input struct. For the moment you can do cfg.dummy= [] to make a structure of the cfg and the example above will work. Robert From sameer at ANDREW.CMU.EDU Mon Feb 19 21:01:19 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Mon, 19 Feb 2007 15:01:19 -0500 Subject: .lay layout file for neuromag 306 channels In-Reply-To: <6106EC24-4112-4648-937F-0FE91CC44DC1@fcdonders.ru.nl> Message-ID: thanks, It works. sameer On Mon, 19 Feb 2007, Robert Oostenveld wrote: > On 19 Feb 2007, at 19:31, Sameer Walawalkar wrote: >>> topoplot([], lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,1)) >>> ??? Error using ==> topoplot >>> Flag arguments must be strings > > I suspect that you are mixing up EEGLAB and FieldTrip. > >>> cd ~/matlab/fieldtrip >>> topoplot([], randn(100,1), randn(100,1), randn(100,1)) > ??? Error using ==> topoplot > When four input arguments are supplied, the following syntax should be used: > topoplot(cfg,X,Y,datavector); > >>> cd ~/matlab/eeglab/functions >>> topoplot([], randn(100,1), randn(100,1), randn(100,1)) > ??? Error using ==> topoplot > Flag arguments must be strings > > Your error corresponds with the EEGLAB one. Note that the FT version wants > the first argument as a struct, so you cannot specify []. I will fix the > empty input struct. For the moment you can do cfg.dummy=[] to make a > structure of the cfg and the example above will work. > > Robert > > From sameer at ANDREW.CMU.EDU Tue Feb 20 17:06:50 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 20 Feb 2007 11:06:50 -0500 Subject: eog artifact rejection Message-ID: I am interested in removing blink artifacts. Unfortunately, with fieldtrip component analysis, it is difficult to identify the independent component corresponding to blinks by visual inspection due to the short timecourse over which they are presented (trial length). There are essentially two errors: 1> ??? Error using ==> timelockanalysis data has variable trial lengths, you specified not to accept that ! 2> fdcomp.cohspctrm does not exist. I tried to follow instructions under independent component analysis (ICA) to remove ECG artifacts replacing eog for ecg. (I did not do any resampling). (Is this a good idea?) So I did, % go back to the raw data on disk and detect the peaks in the EOG channel, cfg = same.old.cfg.used.for.component.analysis.of.data; cfg.artfctdef.eog.pretim = 0.25; cfg.artfctdef.eog.psttim = 0.50-1/1200; [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts) % preprocess the data around the peaks, i.e. read the segments of raw data containing the EOG artifact cfg = []; cfg.dataset = 'JD_012507_Beeps_One.fif'; cfg.datatype = 'continuous'; cfg.padding = 10; cfg.dftfilter = 'yes'; cfg.blc = 'yes'; cfg.trl = [artifact zeros(size(artifact,1),1)]; cfg.channel = {'MEG' 'EOG'}; data_eog = preprocessing(cfg) % decompose the ECG-locked datasegments into components, using the previously found (un)mixing matrix cfg = []; cfg.topo = compRR_orig.topo; cfg.topolabel = compRR_orig.topolabel; comp_eog = componentanalysis(cfg, data_eog); selecting 307 channels baseline correcting data starting decomposition using predetermined mixing matrix total time in componentanalysis 1.2 seconds % compute a frequency decomposition of all components and the ECG cfg = []; timelock = timelockanalysis(cfg, comp_eog); applying preprocessing options ??? Error using ==> timelockanalysis data has variable trial lengths, you specified not to accept that ! % compute a frequency decomposition of all components and the ECG cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.foilim = [0 100]; cfg.taper = 'hanning'; cfg.pad = 'maxperlen'; freq = freqanalysis(cfg, comp_ecg); % compute coherence between all components and the ECG cfg = []; cfg.channelcmb = {'all' 'ECG'}; cfg.jackknife = 'no'; fdcomp = freqdescriptives(cfg, freq); Even though I get computing cross-spectral densities message, I do not get .cohspctrm. fdcomp = dimord: 'chan_freq' freq: [1x155 double] label: {307x1 cell} powspctrm: [307x155 double] dof: [307x155 double] cfg: [1x1 struct] Sorry for the long email, and thanks for your help. sameer From Jan.Schoffelen at FCDONDERS.RU.NL Tue Feb 20 17:12:20 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Tue, 20 Feb 2007 17:12:20 +0100 Subject: eog artifact rejection In-Reply-To: Message-ID: Dear sameer, Ad problem 1: Please specify: cfg.vartrllength = 2, prior to doing the timelockanalysis Ad problem 2: Please specify: cfg.channelcmb = {'all' 'EOG'}, prior to doing freqdescriptives. (instead of {'all' 'ECG'} JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Tuesday, February 20, 2007 5:07 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] eog artifact rejection I am interested in removing blink artifacts. Unfortunately, with fieldtrip component analysis, it is difficult to identify the independent component corresponding to blinks by visual inspection due to the short timecourse over which they are presented (trial length). There are essentially two errors: 1> ??? Error using ==> timelockanalysis data has variable trial lengths, you specified not to accept that ! 2> fdcomp.cohspctrm does not exist. I tried to follow instructions under independent component analysis (ICA) to remove ECG artifacts replacing eog for ecg. (I did not do any resampling). (Is this a good idea?) So I did, % go back to the raw data on disk and detect the peaks in the EOG channel, cfg = same.old.cfg.used.for.component.analysis.of.data; cfg.artfctdef.eog.pretim = 0.25; cfg.artfctdef.eog.psttim = 0.50-1/1200; [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts) % preprocess the data around the peaks, i.e. read the segments of raw data containing the EOG artifact cfg = []; cfg.dataset = 'JD_012507_Beeps_One.fif'; cfg.datatype = 'continuous'; cfg.padding = 10; cfg.dftfilter = 'yes'; cfg.blc = 'yes'; cfg.trl = [artifact zeros(size(artifact,1),1)]; cfg.channel = {'MEG' 'EOG'}; data_eog = preprocessing(cfg) % decompose the ECG-locked datasegments into components, using the previously found (un)mixing matrix cfg = []; cfg.topo = compRR_orig.topo; cfg.topolabel = compRR_orig.topolabel; comp_eog = componentanalysis(cfg, data_eog); selecting 307 channels baseline correcting data starting decomposition using predetermined mixing matrix total time in componentanalysis 1.2 seconds % compute a frequency decomposition of all components and the ECG cfg = []; timelock = timelockanalysis(cfg, comp_eog); applying preprocessing options ??? Error using ==> timelockanalysis data has variable trial lengths, you specified not to accept that ! % compute a frequency decomposition of all components and the ECG cfg = []; cfg.method = 'mtmfft'; cfg.output = 'fourier'; cfg.foilim = [0 100]; cfg.taper = 'hanning'; cfg.pad = 'maxperlen'; freq = freqanalysis(cfg, comp_ecg); % compute coherence between all components and the ECG cfg = []; cfg.channelcmb = {'all' 'ECG'}; cfg.jackknife = 'no'; fdcomp = freqdescriptives(cfg, freq); Even though I get computing cross-spectral densities message, I do not get .cohspctrm. fdcomp = dimord: 'chan_freq' freq: [1x155 double] label: {307x1 cell} powspctrm: [307x155 double] dof: [307x155 double] cfg: [1x1 struct] Sorry for the long email, and thanks for your help. sameer From c.hesse at FCDONDERS.RU.NL Tue Feb 20 17:13:02 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Tue, 20 Feb 2007 17:13:02 +0100 Subject: eog artifact rejection In-Reply-To: Message-ID: Hi Samer, try sorting your ICs by the (absolute) correlation of their waveforms with the EOG signal -> the one or two components with the highest correlation are those that should be removed. If you encounter problems in getting this to work, please let me know. Christian On 20 Feb 2007, at 17:06, Sameer Walawalkar wrote: > I am interested in removing blink artifacts. Unfortunately, with > fieldtrip component analysis, it is difficult to identify the > independent component corresponding to blinks by visual inspection > due to the short timecourse over which they are presented (trial > length). > > There are essentially two errors: > 1> ??? Error using ==> timelockanalysis > data has variable trial lengths, you specified not to accept that ! > 2> fdcomp.cohspctrm does not exist. > > I tried to follow instructions under independent component > analysis (ICA) to remove ECG artifacts replacing eog for ecg. (I > did not do any resampling). (Is this a good idea?) > > So I did, > % go back to the raw data on disk and detect the peaks in the EOG > channel, > cfg = same.old.cfg.used.for.component.analysis.of.data; > cfg.artfctdef.eog.pretim = 0.25; > cfg.artfctdef.eog.psttim = 0.50-1/1200; > > [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts) > > > % preprocess the data around the peaks, i.e. read the segments of > raw data containing the EOG artifact > cfg = []; > cfg.dataset = 'JD_012507_Beeps_One.fif'; > cfg.datatype = 'continuous'; > cfg.padding = 10; > cfg.dftfilter = 'yes'; > cfg.blc = 'yes'; > cfg.trl = [artifact zeros(size(artifact,1),1)]; > cfg.channel = {'MEG' 'EOG'}; > data_eog = preprocessing(cfg) > > % decompose the ECG-locked datasegments into components, using the > previously found (un)mixing matrix > cfg = []; > cfg.topo = compRR_orig.topo; > cfg.topolabel = compRR_orig.topolabel; > comp_eog = componentanalysis(cfg, data_eog); > selecting 307 channels > baseline correcting data > starting decomposition using predetermined mixing matrix > total time in componentanalysis 1.2 seconds > > > % compute a frequency decomposition of all components and the ECG > > cfg = []; > timelock = timelockanalysis(cfg, comp_eog); > applying preprocessing options > ??? Error using ==> timelockanalysis > data has variable trial lengths, you specified not to accept that ! > > % compute a frequency decomposition of all components and the ECG > > cfg = []; > cfg.method = 'mtmfft'; > cfg.output = 'fourier'; > cfg.foilim = [0 100]; > cfg.taper = 'hanning'; > cfg.pad = 'maxperlen'; > freq = freqanalysis(cfg, comp_ecg); > > > % compute coherence between all components and the ECG > cfg = []; > cfg.channelcmb = {'all' 'ECG'}; > cfg.jackknife = 'no'; > fdcomp = freqdescriptives(cfg, freq); > > Even though I get computing cross-spectral densities message, I do > not get .cohspctrm. > > fdcomp = > > dimord: 'chan_freq' > freq: [1x155 double] > label: {307x1 cell} > powspctrm: [307x155 double] > dof: [307x155 double] > cfg: [1x1 struct] > > > Sorry for the long email, and thanks for your help. > > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From alotof_xd at YAHOO.COM Wed Feb 21 08:09:26 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Tue, 20 Feb 2007 23:09:26 -0800 Subject: Neuromag data processing In-Reply-To: <8969EAA5-A62D-4141-AFA5-F94E3170C116@fcdonders.ru.nl> Message-ID: Thank you Christian. I can use meg-pd toolbox now. However, it seems all the functions in FieldTrip are for evoked data while my raw data is continuous data. I tried your suggestion. read_head works but read_data doesn't work. I don't know this error just due to memory or continuous data format. I remember previous discussion (2-feb-2006) in this emaillist mentioned that read_data couldn't deal with continuous data. The error shows as below: ??? Out of memory. Type HELP MEMORY for your options. Error in ==> F:\MATLAB6p5\toolbox\fieldtrip-20070213\private\read_data.m On line 529 ==> dat(:,((i-begepoch)*hdr.nSamples+1):((i-begepoch+1)*hdr.nSamples)) = buf(chanindx,:); Error in ==> F:\MATLAB6p5\toolbox\fieldtrip-20070213\read_fcdc_data.m On line 49 ==> [dat] = read_data(varargin{:}); Even the read_data has been improved as continuous data acceptable, I still wonder the following data processing. Is there tool to convert continuous data to "epoch mode" data? Thanks. Best, Eve Christian Hesse wrote: Hi Eve, FieldTrip handles (pretty much) all function calls to the meg-pd toolbox for you (in particular which are the appropriate input arguments to use) so you don't have to deal with these issues yourself. See if you can extract the header information and some data from your .fif file using?lt;/DIV> filename = "fullpath/name.fif" hdr = read_fcdc_header(filename); % hdr should be a structure dat = read_fcdc_data(filename); % dat should be a nchan x nsamp matrix see what you get. Regards, Christian On 17 Feb 2007, at 21:03, alotof eve wrote: Hi, experts, ?lt;/DIV>    Maybe I misunderstood the command. My MEG data is from NeuroMag 306 channels.  Does that mean I should use "Neuromag-306" as argument? Thanks for any suggestion. ?lt;/DIV> Best, Eve alotof eve wrote: Hi Christian,   ?Yes it works. Thank you so much.   ?But now I met a new problem. I got only a whole .fif data. When I tried the command "MEGMODEL", it said any argument can be left out. However, the error showed up again: >> MEGMODEL ??? Could not load the coil files Error in ==> F:\MATLAB6p5\bin\win32\megmodel.dll   ? I couldn't find any .fif file like Neuromag-122 or coilfile.fif. How do you settle it? Thanks. Best, Eve Christian Hesse wrote: Hi Eve, you should be able to use the meg-pd toolbox (also from FieldTrip) in Matlab under Windows. I got the toolbox to work in Matlab7 under WindowsXP as follows: ? extract the meg-pd-1.2-10.mswin.zip file to somewhere -?then copy (or move) the meg_pd_1.2 directory wherever you want -?in the README file in the meg-pd-1.2-10.mswin directory it specifies that you need to copy the DLL file "meg-pd-1.2-10.mswin\lib\i686-pc-cygwin\libmagnet_pd_1.2.dll" into the bin directory of Matlab on your system, in my case this was the directory "MATLAB71\bin\win32" -?start up Matlab, add the fieldtrip and meg_pd_1.2 directories to your path and try to read your .fif file Let me know if this works on your Windows system Regards, Christian On 15 Feb 2007, at 17:32, alotof eve wrote: Hi, experts, ?lt;/DIV>      I am a new user of fieldtrip. I try to use meg-pd package to import NeuroMag data but it seems there is something wrong with the environment.   ?The error?showed as:       ?Unable to load mex file: F:\MATLAB6p5\toolbox\fieldtrip-20070213\meg_pd_1.2\loadfif.dll. The specified module could not be found.          ?The true is the .dll is in the same path as .m and the path has been add the Matlab.     ?I use Latlab 6.5 under WindowXP. I don't know if it affects. I saw the "lib" in the same meg-pd package included a .dll for pc-cygwin. I wonder if I have to use Matlab under Linux/Unix environment. Or if any other limits. ?lt;/DIV>      Please help me. Thanks. ?lt;/DIV> Best, Eve --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging?lt;/DIV> P.O. Box 9101?lt;/DIV> NL-6500 HB Nijmegen?lt;/DIV> The Netherlands Tel.:?31 (0)24 36 68293 Fax: +31?0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- --------------------------------- TV dinner still cooling? Check out "Tonight's Picks" on Yahoo! TV. --------------------------------- No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging?lt;/DIV> P.O. Box 9101?lt;/DIV> NL-6500 HB Nijmegen?lt;/DIV> The Netherlands Tel.:?31 (0)24 36 68293 Fax: +31?0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- --------------------------------- Expecting? Get great news right away with email Auto-Check. Try the Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Wed Feb 21 09:02:31 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 21 Feb 2007 09:02:31 +0100 Subject: Neuromag data processing In-Reply-To: <596226.68250.qm@web51415.mail.yahoo.com> Message-ID: Hi Eve, > I can use meg-pd toolbox now. However, it seems all the functions > in FieldTrip are for evoked data while my raw data is continuous data. FieldTrip handles a variety of data, and the low level reading functions can deal with continuous or epoch based raw data. When you analyze your data in FT, you usually start by defining your trials, i.e. epochs in your continuous data that are of interest, w.r.t. to some sort of trigger or event. The function PREPROCESSING then scans through your raw data file and returns a data structure which contains all of the specified epochs (for a particular trial definition) in a field data.trial. Please note that this has nothing to do with evoked vs induced responses just yet. You can use the output of PREPROCESSING as input to either TIMELOCKANALYSIS or FREQUANALYSIS which look at evoked and induced phenomena, respectively. Afterwards you can call various statistical functions such as FREQDESCRIPTIVES, etc ... So the reason why I have been giving you the examples using read_header and read_data is because I needed to determine the nature of the error you were getting without really knowning anything about what sort of data is in your file. In your use of FT you do not actually use these functions yourself, but basically use functions like DEFINE_TRIAL and PREPROCESSING to start with. > I tried your suggestion. read_head works but read_data doesn't > work. I don't know this error just due to memory or continuous data > format. I remember previous discussion (2-feb-2006) in this > emaillist mentioned that read_data couldn't deal with continuous > data. The error shows as below: > > ??? Out of memory. Type HELP MEMORY for your options. > Error in ==> F:\MATLAB6p5\toolbox\fieldtrip-20070213\private > \read_data.m > On line 529 ==> dat(:,((i-begepoch)*hdr.nSamples+1):((i- > begepoch+1)*hdr.nSamples)) = buf(chanindx,:); > Error in ==> F:\MATLAB6p5\toolbox\fieldtrip-20070213\read_fcdc_data.m > On line 49 ==> [dat] = read_data(varargin{:}); > Just as one final double check, can you try the following to confirm that you can read a block of data from your .fif file: filename = 'fullpath/name.fif'; dat = read_fcdc_data(filename, 'begsample', 1, 'endsample', 100); size(dat) % this should be an nchan x 100 matrix Please let me know if this works, and then look at how to use the PREPROCESSING and DEFINE_TRIAL funcitons to extract relevant epochs from your raw data file (see http://www2.ru.nl/fcdonders/fieldtrip/ doku.php?id=fieldtrip:documentation:tutorial:preprocessing) Regards, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at HOTMAIL.COM Wed Feb 21 12:15:52 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 21 Feb 2007 11:15:52 +0000 Subject: Time Frequency Analysis! In-Reply-To: <19C4B8DD-20DF-433A-A3C8-90DF045A199E@fcdonders.ru.nl> Message-ID: Hello, A brief on how to do i get the data1, I have the data for 24000 data points with 800 Hz sampling rate (30 secs of data), i construct my own data format according to the data format specified in fieltrip with data.label,fsample,trial,time. I tried the way you have mentioned with the window length this is what i do cfg=[]; winlen=0.5; halfwin=winlen/2; nwin=2.*(30./winlen)-1; cfg.output='pow'; cfg.method='mtmconvol'; cfg.channel = channelselection({'all' 'all'}, data1.label); cfg.foi=2:1:30; cfg.t_ftimwin=zeros(1,nwin).*winlen; cfg.toi=[0:halfwin:30-winlen]; cfg.taper='hanning'; cfg.pad=2; cfg.keeptrials='no'; TFRmult=freqanalysis(cfg,data1); and it throws a error ??? Subscript indices must either be real positive integers or logicals. Error in ==> freqanalysis_mtmconvol at 424 autspctrmacttap(sgnlop,:) = dum(acttimboi); Error in ==> freqanalysis at 167 [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); Please let me know, why do i get this error Thanking you with regards M.Muthuraman. >From: Christian Hesse >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Mon, 19 Feb 2007 13:12:03 +0100 > >Hi Muthuraman, > >ok, in that case you can try the following (this assumes you have windows >of length "winlen" which overlap by "halfwin = winlen/2") > >winlen = 0.5; >% this is in seconds you can also use another time window >halfwin = winlen/2; > >% the total number of windows covering the 30 second period >nwin = 2.*(30./winlen) - 1; > >cfg.method = 'mtmconvol'; >cfg.output = 'pow'; >cfg.t_ftimwin = ones(1,nwin).*winlen; >cfg.toi = [0:halfwin:30-winlen]; > >The important things here to check are >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >2) the times you specify in cfg.toi actually correspond to your time axis >(i.e. do not start before or go on after). > >If you want to use a different overlap, you need to calculate nwin >slightly differently. > >Hope this helps more, >Christian > > > >>Thanks for the suggestion but using the mtmfft which i have done already >>and it works, my interest now is that i would like to use the Time >>frequency analysis 'mtmconvol' to estimate the power in the time >>frequency scale, in which how to get the whole 30secs continous data in >>one time frequency plot(TFR). >> >>Thanking you >> >>with regards >>M.Muthuraman. >> >>>From: Christian Hesse >>>Reply-To: FieldTrip discussion list >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 >>> >>>Hi Muthuraman, >>> >>>>One more question regarding the Time frequency Analysis, i have EMG >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 seconds >>>>of continous data). I would like to do the Timefrequency analysis for >>>>this data and to see the power for the whole 30 seconds >>> >>>use preprocessing to get the EMG data into a single 30s trial (if you >>>want to analyze the rectified EMG, then do the rectification in >>>preprocessing), then use frequanalysis with >>> >>>cfg.method = 'mtmfft'; >>>cfg.output = 'pow'; >>> >>>this should give you the power spectrum of your EMG data over the >>>entire 30 second period. >>> >>>Regards, >>>Christian >>> >>> >>>--------------------------------------------------------------------- - >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: c.hesse at fcdonders.ru.nl >>>Web: www.fcdonders.ru.nl >>>--------------------------------------------------------------------- - >>> >>> >>> >>> >> >>_________________________________________________________________ >>Tried the new MSN Messenger? It�s cool! Download now. http:// >>messenger.msn.com/Download/Default.aspx?mkt=en-in >> > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > _________________________________________________________________ Get Married in 2007. Join Shaadi.com http://www.shaadi.com/ptnr.php?ptnr=mhottag From Jan.Schoffelen at FCDONDERS.RU.NL Wed Feb 21 12:39:30 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 21 Feb 2007 12:39:30 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Please use this: cfg.channel = channelselection({'all'}, data1.label); instead of this: cfg.channel = channelselection({'all' 'all'}, data1.label); JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Wednesday, February 21, 2007 12:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Time Frequency Analysis! Hello, A brief on how to do i get the data1, I have the data for 24000 data points with 800 Hz sampling rate (30 secs of data), i construct my own data format according to the data format specified in fieltrip with data.label,fsample,trial,time. I tried the way you have mentioned with the window length this is what i do cfg=[]; winlen=0.5; halfwin=winlen/2; nwin=2.*(30./winlen)-1; cfg.output='pow'; cfg.method='mtmconvol'; cfg.channel = channelselection({'all' 'all'}, data1.label); cfg.foi=2:1:30; cfg.t_ftimwin=zeros(1,nwin).*winlen; cfg.toi=[0:halfwin:30-winlen]; cfg.taper='hanning'; cfg.pad=2; cfg.keeptrials='no'; TFRmult=freqanalysis(cfg,data1); and it throws a error ??? Subscript indices must either be real positive integers or logicals. Error in ==> freqanalysis_mtmconvol at 424 autspctrmacttap(sgnlop,:) = dum(acttimboi); Error in ==> freqanalysis at 167 [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); Please let me know, why do i get this error Thanking you with regards M.Muthuraman. >From: Christian Hesse >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Mon, 19 Feb 2007 13:12:03 +0100 > >Hi Muthuraman, > >ok, in that case you can try the following (this assumes you have windows >of length "winlen" which overlap by "halfwin = winlen/2") > >winlen = 0.5; >% this is in seconds you can also use another time window >halfwin = winlen/2; > >% the total number of windows covering the 30 second period >nwin = 2.*(30./winlen) - 1; > >cfg.method = 'mtmconvol'; >cfg.output = 'pow'; >cfg.t_ftimwin = ones(1,nwin).*winlen; >cfg.toi = [0:halfwin:30-winlen]; > >The important things here to check are >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >2) the times you specify in cfg.toi actually correspond to your time axis >(i.e. do not start before or go on after). > >If you want to use a different overlap, you need to calculate nwin >slightly differently. > >Hope this helps more, >Christian > > > >>Thanks for the suggestion but using the mtmfft which i have done already >>and it works, my interest now is that i would like to use the Time >>frequency analysis 'mtmconvol' to estimate the power in the time >>frequency scale, in which how to get the whole 30secs continous data in >>one time frequency plot(TFR). >> >>Thanking you >> >>with regards >>M.Muthuraman. >> >>>From: Christian Hesse >>>Reply-To: FieldTrip discussion list >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 >>> >>>Hi Muthuraman, >>> >>>>One more question regarding the Time frequency Analysis, i have EMG >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 seconds >>>>of continous data). I would like to do the Timefrequency analysis for >>>>this data and to see the power for the whole 30 seconds >>> >>>use preprocessing to get the EMG data into a single 30s trial (if you >>>want to analyze the rectified EMG, then do the rectification in >>>preprocessing), then use frequanalysis with >>> >>>cfg.method = 'mtmfft'; >>>cfg.output = 'pow'; >>> >>>this should give you the power spectrum of your EMG data over the >>>entire 30 second period. >>> >>>Regards, >>>Christian >>> >>> >>>--------------------------------------------------------------------- - >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: c.hesse at fcdonders.ru.nl >>>Web: www.fcdonders.ru.nl >>>--------------------------------------------------------------------- - >>> >>> >>> >>> >> >>_________________________________________________________________ >>Tried the new MSN Messenger? It's cool! Download now. http:// >>messenger.msn.com/Download/Default.aspx?mkt=en-in >> > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > _________________________________________________________________ Get Married in 2007. Join Shaadi.com http://www.shaadi.com/ptnr.php?ptnr=mhottag From Jan.Schoffelen at FCDONDERS.RU.NL Wed Feb 21 12:41:24 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 21 Feb 2007 12:41:24 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: What's the time-axis in your data? JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Wednesday, February 21, 2007 12:16 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Time Frequency Analysis! Hello, A brief on how to do i get the data1, I have the data for 24000 data points with 800 Hz sampling rate (30 secs of data), i construct my own data format according to the data format specified in fieltrip with data.label,fsample,trial,time. I tried the way you have mentioned with the window length this is what i do cfg=[]; winlen=0.5; halfwin=winlen/2; nwin=2.*(30./winlen)-1; cfg.output='pow'; cfg.method='mtmconvol'; cfg.channel = channelselection({'all' 'all'}, data1.label); cfg.foi=2:1:30; cfg.t_ftimwin=zeros(1,nwin).*winlen; cfg.toi=[0:halfwin:30-winlen]; cfg.taper='hanning'; cfg.pad=2; cfg.keeptrials='no'; TFRmult=freqanalysis(cfg,data1); and it throws a error ??? Subscript indices must either be real positive integers or logicals. Error in ==> freqanalysis_mtmconvol at 424 autspctrmacttap(sgnlop,:) = dum(acttimboi); Error in ==> freqanalysis at 167 [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); Please let me know, why do i get this error Thanking you with regards M.Muthuraman. >From: Christian Hesse >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Mon, 19 Feb 2007 13:12:03 +0100 > >Hi Muthuraman, > >ok, in that case you can try the following (this assumes you have windows >of length "winlen" which overlap by "halfwin = winlen/2") > >winlen = 0.5; >% this is in seconds you can also use another time window >halfwin = winlen/2; > >% the total number of windows covering the 30 second period >nwin = 2.*(30./winlen) - 1; > >cfg.method = 'mtmconvol'; >cfg.output = 'pow'; >cfg.t_ftimwin = ones(1,nwin).*winlen; >cfg.toi = [0:halfwin:30-winlen]; > >The important things here to check are >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >2) the times you specify in cfg.toi actually correspond to your time axis >(i.e. do not start before or go on after). > >If you want to use a different overlap, you need to calculate nwin >slightly differently. > >Hope this helps more, >Christian > > > >>Thanks for the suggestion but using the mtmfft which i have done already >>and it works, my interest now is that i would like to use the Time >>frequency analysis 'mtmconvol' to estimate the power in the time >>frequency scale, in which how to get the whole 30secs continous data in >>one time frequency plot(TFR). >> >>Thanking you >> >>with regards >>M.Muthuraman. >> >>>From: Christian Hesse >>>Reply-To: FieldTrip discussion list >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 >>> >>>Hi Muthuraman, >>> >>>>One more question regarding the Time frequency Analysis, i have EMG >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 seconds >>>>of continous data). I would like to do the Timefrequency analysis for >>>>this data and to see the power for the whole 30 seconds >>> >>>use preprocessing to get the EMG data into a single 30s trial (if you >>>want to analyze the rectified EMG, then do the rectification in >>>preprocessing), then use frequanalysis with >>> >>>cfg.method = 'mtmfft'; >>>cfg.output = 'pow'; >>> >>>this should give you the power spectrum of your EMG data over the >>>entire 30 second period. >>> >>>Regards, >>>Christian >>> >>> >>>--------------------------------------------------------------------- - >>>Christian Hesse, PhD, MIEEE >>> >>>F.C. Donders Centre for Cognitive Neuroimaging >>>P.O. Box 9101 >>>NL-6500 HB Nijmegen >>>The Netherlands >>> >>>Tel.: +31 (0)24 36 68293 >>>Fax: +31 (0)24 36 10989 >>> >>>Email: c.hesse at fcdonders.ru.nl >>>Web: www.fcdonders.ru.nl >>>--------------------------------------------------------------------- - >>> >>> >>> >>> >> >>_________________________________________________________________ >>Tried the new MSN Messenger? It's cool! Download now. http:// >>messenger.msn.com/Download/Default.aspx?mkt=en-in >> > >---------------------------------------------------------------------- >Christian Hesse, PhD, MIEEE > >F.C. Donders Centre for Cognitive Neuroimaging >P.O. Box 9101 >NL-6500 HB Nijmegen >The Netherlands > >Tel.: +31 (0)24 36 68293 >Fax: +31 (0)24 36 10989 > >Email: c.hesse at fcdonders.ru.nl >Web: www.fcdonders.ru.nl >---------------------------------------------------------------------- > > > > _________________________________________________________________ Get Married in 2007. Join Shaadi.com http://www.shaadi.com/ptnr.php?ptnr=mhottag From c.hesse at FCDONDERS.RU.NL Wed Feb 21 12:52:01 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 21 Feb 2007 12:52:01 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: > A brief on how to do i get the data1, I have the data for 24000 > data points with 800 Hz sampling rate (30 secs of data), i > construct my own data format according to the data format specified > in fieltrip with > data.label,fsample,trial,time. > I tried the way you have mentioned with the window length > this is what i do > > cfg=[]; > winlen=0.5; > halfwin=winlen/2; > nwin=2.*(30./winlen)-1; > cfg.output='pow'; > cfg.method='mtmconvol'; > cfg.channel = channelselection({'all' 'all'}, data1.label); > cfg.foi=2:1:30; > cfg.t_ftimwin=zeros(1,nwin).*winlen; this should be cfg.t_ftimwin=ones(1,nwin).*winlen; Christian > cfg.toi=[0:halfwin:30-winlen]; > cfg.taper='hanning'; > cfg.pad=2; > cfg.keeptrials='no'; > TFRmult=freqanalysis(cfg,data1); > > and it throws a error > ??? Subscript indices must either be real positive integers or > logicals. > > Error in ==> freqanalysis_mtmconvol at 424 > autspctrmacttap(sgnlop,:) = dum(acttimboi); > > Error in ==> freqanalysis at 167 > [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, > data); > > Please let me know, why do i get this error > > > Thanking you > > with regards > M.Muthuraman. > >> From: Christian Hesse >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> Date: Mon, 19 Feb 2007 13:12:03 +0100 >> >> Hi Muthuraman, >> >> ok, in that case you can try the following (this assumes you have >> windows of length "winlen" which overlap by "halfwin = winlen/2") >> >> winlen = 0.5; >> % this is in seconds you can also use another time window >> halfwin = winlen/2; >> >> % the total number of windows covering the 30 second period >> nwin = 2.*(30./winlen) - 1; >> >> cfg.method = 'mtmconvol'; >> cfg.output = 'pow'; >> cfg.t_ftimwin = ones(1,nwin).*winlen; >> cfg.toi = [0:halfwin:30-winlen]; >> >> The important things here to check are >> 1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >> 2) the times you specify in cfg.toi actually correspond to your >> time axis (i.e. do not start before or go on after). >> >> If you want to use a different overlap, you need to calculate >> nwin slightly differently. >> >> Hope this helps more, >> Christian >> >> >> >>> Thanks for the suggestion but using the mtmfft which i have done >>> already and it works, my interest now is that i would like to >>> use the Time frequency analysis 'mtmconvol' to estimate the >>> power in the time frequency scale, in which how to get the whole >>> 30secs continous data in one time frequency plot(TFR). >>> >>> Thanking you >>> >>> with regards >>> M.Muthuraman. >>> >>>> From: Christian Hesse >>>> Reply-To: FieldTrip discussion list >>>> To: FIELDTRIP at NIC.SURFNET.NL >>>> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >>>> Date: Mon, 19 Feb 2007 11:56:19 +0100 >>>> >>>> Hi Muthuraman, >>>> >>>>> One more question regarding the Time frequency Analysis, i >>>>> have EMG data of 24000 data points with a sampling frequeny >>>>> of 800Hz (30 seconds of continous data). I would like to do >>>>> the Timefrequency analysis for this data and to see the power >>>>> for the whole 30 seconds >>>> >>>> use preprocessing to get the EMG data into a single 30s trial >>>> (if you want to analyze the rectified EMG, then do the >>>> rectification in preprocessing), then use frequanalysis with >>>> >>>> cfg.method = 'mtmfft'; >>>> cfg.output = 'pow'; >>>> >>>> this should give you the power spectrum of your EMG data over >>>> the entire 30 second period. >>>> >>>> Regards, >>>> Christian >>>> >>>> >>>> ------------------------------------------------------------------- >>>> -- - >>>> Christian Hesse, PhD, MIEEE >>>> >>>> F.C. Donders Centre for Cognitive Neuroimaging >>>> P.O. Box 9101 >>>> NL-6500 HB Nijmegen >>>> The Netherlands >>>> >>>> Tel.: +31 (0)24 36 68293 >>>> Fax: +31 (0)24 36 10989 >>>> >>>> Email: c.hesse at fcdonders.ru.nl >>>> Web: www.fcdonders.ru.nl >>>> ------------------------------------------------------------------- >>>> -- - >>>> >>>> >>>> >>>> >>> >>> _________________________________________________________________ >>> Tried the new MSN Messenger? It’s cool! Download now. http:// >>> messenger.msn.com/Download/Default.aspx?mkt=en-in >>> >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging >> P.O. Box 9101 >> NL-6500 HB Nijmegen >> The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> > > _________________________________________________________________ > Get Married in 2007. Join Shaadi.com http://www.shaadi.com/ptnr.php? > ptnr=mhottag > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From muthuraman10 at HOTMAIL.COM Wed Feb 21 13:14:40 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 21 Feb 2007 12:14:40 +0000 Subject: Time Frequency Analysis! In-Reply-To: <002901c755ad$37635b70$902dae83@fcdonders.nl> Message-ID: Hello JM, The time axis in my data which i define from 0 to 30 secs data1.time{1,1}=0:0.0375:29.99875; after making the changes it works now but i get the only values from 0.125 to 0.625 and all the other values are Nan's thanking you with regards M.Muthuraman. >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Wed, 21 Feb 2007 12:41:24 +0100 > >What's the time-axis in your data? > >JM > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Wednesday, February 21, 2007 12:16 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Hello, > >A brief on how to do i get the data1, I have the data for 24000 data points >with 800 Hz sampling rate (30 secs of data), i construct my own data format >according to the data format specified in fieltrip with >data.label,fsample,trial,time. >I tried the way you have mentioned with the window length >this is what i do > >cfg=[]; >winlen=0.5; >halfwin=winlen/2; >nwin=2.*(30./winlen)-1; >cfg.output='pow'; >cfg.method='mtmconvol'; >cfg.channel = channelselection({'all' 'all'}, data1.label); >cfg.foi=2:1:30; >cfg.t_ftimwin=zeros(1,nwin).*winlen; >cfg.toi=[0:halfwin:30-winlen]; >cfg.taper='hanning'; >cfg.pad=2; >cfg.keeptrials='no'; >TFRmult=freqanalysis(cfg,data1); > >and it throws a error >??? Subscript indices must either be real positive integers or logicals. > >Error in ==> freqanalysis_mtmconvol at 424 > autspctrmacttap(sgnlop,:) = dum(acttimboi); > >Error in ==> freqanalysis at 167 >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); > >Please let me know, why do i get this error > > >Thanking you > >with regards >M.Muthuraman. > > >From: Christian Hesse > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Date: Mon, 19 Feb 2007 13:12:03 +0100 > > > >Hi Muthuraman, > > > >ok, in that case you can try the following (this assumes you have >windows > >of length "winlen" which overlap by "halfwin = winlen/2") > > > >winlen = 0.5; > >% this is in seconds you can also use another time window > >halfwin = winlen/2; > > > >% the total number of windows covering the 30 second period > >nwin = 2.*(30./winlen) - 1; > > > >cfg.method = 'mtmconvol'; > >cfg.output = 'pow'; > >cfg.t_ftimwin = ones(1,nwin).*winlen; > >cfg.toi = [0:halfwin:30-winlen]; > > > >The important things here to check are > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements > >2) the times you specify in cfg.toi actually correspond to your time >axis > >(i.e. do not start before or go on after). > > > >If you want to use a different overlap, you need to calculate nwin > >slightly differently. > > > >Hope this helps more, > >Christian > > > > > > > >>Thanks for the suggestion but using the mtmfft which i have done >already > >>and it works, my interest now is that i would like to use the Time > >>frequency analysis 'mtmconvol' to estimate the power in the time > >>frequency scale, in which how to get the whole 30secs continous data >in > >>one time frequency plot(TFR). > >> > >>Thanking you > >> > >>with regards > >>M.Muthuraman. > >> > >>>From: Christian Hesse > >>>Reply-To: FieldTrip discussion list > >>>To: FIELDTRIP at NIC.SURFNET.NL > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 > >>> > >>>Hi Muthuraman, > >>> > >>>>One more question regarding the Time frequency Analysis, i have EMG > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 >seconds > > >>>>of continous data). I would like to do the Timefrequency analysis >for > >>>>this data and to see the power for the whole 30 seconds > >>> > >>>use preprocessing to get the EMG data into a single 30s trial (if you > >>>want to analyze the rectified EMG, then do the rectification in > >>>preprocessing), then use frequanalysis with > >>> > >>>cfg.method = 'mtmfft'; > >>>cfg.output = 'pow'; > >>> > >>>this should give you the power spectrum of your EMG data over the > >>>entire 30 second period. > >>> > >>>Regards, > >>>Christian > >>> > >>> > >>>--------------------------------------------------------------------- - > >>>Christian Hesse, PhD, MIEEE > >>> > >>>F.C. Donders Centre for Cognitive Neuroimaging > >>>P.O. Box 9101 > >>>NL-6500 HB Nijmegen > >>>The Netherlands > >>> > >>>Tel.: +31 (0)24 36 68293 > >>>Fax: +31 (0)24 36 10989 > >>> > >>>Email: c.hesse at fcdonders.ru.nl > >>>Web: www.fcdonders.ru.nl > >>>--------------------------------------------------------------------- - > >>> > >>> > >>> > >>> > >> > >>_________________________________________________________________ > >>Tried the new MSN Messenger? It's cool! Download now. http:// > >>messenger.msn.com/Download/Default.aspx?mkt=en-in > >> > > > >---------------------------------------------------------------------- > >Christian Hesse, PhD, MIEEE > > > >F.C. Donders Centre for Cognitive Neuroimaging > >P.O. Box 9101 > >NL-6500 HB Nijmegen > >The Netherlands > > > >Tel.: +31 (0)24 36 68293 > >Fax: +31 (0)24 36 10989 > > > >Email: c.hesse at fcdonders.ru.nl > >Web: www.fcdonders.ru.nl > >---------------------------------------------------------------------- > > > > > > > > > >_________________________________________________________________ >Get Married in 2007. Join Shaadi.com >http://www.shaadi.com/ptnr.php?ptnr=mhottag _________________________________________________________________ Crave for a healthier lifestyle? Ask an expert http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm From Jan.Schoffelen at FCDONDERS.RU.NL Wed Feb 21 13:39:33 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 21 Feb 2007 13:39:33 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Hi Muthu, Please put cfg.pad at 30. As you can read in the frequency analysis tutorials, the cfg.pad is used to pad out your data with zeros until the specified length, to obtain the spectral interpolation required. I suspect that having your cfg.pad at only 2, while having a data length which is way longer, you run into problems. JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Wednesday, February 21, 2007 1:15 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Time Frequency Analysis! Hello JM, The time axis in my data which i define from 0 to 30 secs data1.time{1,1}=0:0.0375:29.99875; after making the changes it works now but i get the only values from 0.125 to 0.625 and all the other values are Nan's thanking you with regards M.Muthuraman. >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Wed, 21 Feb 2007 12:41:24 +0100 > >What's the time-axis in your data? > >JM > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Wednesday, February 21, 2007 12:16 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Hello, > >A brief on how to do i get the data1, I have the data for 24000 data points >with 800 Hz sampling rate (30 secs of data), i construct my own data format >according to the data format specified in fieltrip with >data.label,fsample,trial,time. >I tried the way you have mentioned with the window length >this is what i do > >cfg=[]; >winlen=0.5; >halfwin=winlen/2; >nwin=2.*(30./winlen)-1; >cfg.output='pow'; >cfg.method='mtmconvol'; >cfg.channel = channelselection({'all' 'all'}, data1.label); >cfg.foi=2:1:30; >cfg.t_ftimwin=zeros(1,nwin).*winlen; >cfg.toi=[0:halfwin:30-winlen]; >cfg.taper='hanning'; >cfg.pad=2; >cfg.keeptrials='no'; >TFRmult=freqanalysis(cfg,data1); > >and it throws a error >??? Subscript indices must either be real positive integers or logicals. > >Error in ==> freqanalysis_mtmconvol at 424 > autspctrmacttap(sgnlop,:) = dum(acttimboi); > >Error in ==> freqanalysis at 167 >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); > >Please let me know, why do i get this error > > >Thanking you > >with regards >M.Muthuraman. > > >From: Christian Hesse > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Date: Mon, 19 Feb 2007 13:12:03 +0100 > > > >Hi Muthuraman, > > > >ok, in that case you can try the following (this assumes you have >windows > >of length "winlen" which overlap by "halfwin = winlen/2") > > > >winlen = 0.5; > >% this is in seconds you can also use another time window > >halfwin = winlen/2; > > > >% the total number of windows covering the 30 second period > >nwin = 2.*(30./winlen) - 1; > > > >cfg.method = 'mtmconvol'; > >cfg.output = 'pow'; > >cfg.t_ftimwin = ones(1,nwin).*winlen; > >cfg.toi = [0:halfwin:30-winlen]; > > > >The important things here to check are > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements > >2) the times you specify in cfg.toi actually correspond to your time >axis > >(i.e. do not start before or go on after). > > > >If you want to use a different overlap, you need to calculate nwin > >slightly differently. > > > >Hope this helps more, > >Christian > > > > > > > >>Thanks for the suggestion but using the mtmfft which i have done >already > >>and it works, my interest now is that i would like to use the Time > >>frequency analysis 'mtmconvol' to estimate the power in the time > >>frequency scale, in which how to get the whole 30secs continous data >in > >>one time frequency plot(TFR). > >> > >>Thanking you > >> > >>with regards > >>M.Muthuraman. > >> > >>>From: Christian Hesse > >>>Reply-To: FieldTrip discussion list > >>>To: FIELDTRIP at NIC.SURFNET.NL > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 > >>> > >>>Hi Muthuraman, > >>> > >>>>One more question regarding the Time frequency Analysis, i have EMG > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 >seconds > > >>>>of continous data). I would like to do the Timefrequency analysis >for > >>>>this data and to see the power for the whole 30 seconds > >>> > >>>use preprocessing to get the EMG data into a single 30s trial (if you > >>>want to analyze the rectified EMG, then do the rectification in > >>>preprocessing), then use frequanalysis with > >>> > >>>cfg.method = 'mtmfft'; > >>>cfg.output = 'pow'; > >>> > >>>this should give you the power spectrum of your EMG data over the > >>>entire 30 second period. > >>> > >>>Regards, > >>>Christian > >>> > >>> > >>>--------------------------------------------------------------------- - > >>>Christian Hesse, PhD, MIEEE > >>> > >>>F.C. Donders Centre for Cognitive Neuroimaging > >>>P.O. Box 9101 > >>>NL-6500 HB Nijmegen > >>>The Netherlands > >>> > >>>Tel.: +31 (0)24 36 68293 > >>>Fax: +31 (0)24 36 10989 > >>> > >>>Email: c.hesse at fcdonders.ru.nl > >>>Web: www.fcdonders.ru.nl > >>>--------------------------------------------------------------------- - > >>> > >>> > >>> > >>> > >> > >>_________________________________________________________________ > >>Tried the new MSN Messenger? It's cool! Download now. http:// > >>messenger.msn.com/Download/Default.aspx?mkt=en-in > >> > > > >---------------------------------------------------------------------- > >Christian Hesse, PhD, MIEEE > > > >F.C. Donders Centre for Cognitive Neuroimaging > >P.O. Box 9101 > >NL-6500 HB Nijmegen > >The Netherlands > > > >Tel.: +31 (0)24 36 68293 > >Fax: +31 (0)24 36 10989 > > > >Email: c.hesse at fcdonders.ru.nl > >Web: www.fcdonders.ru.nl > >---------------------------------------------------------------------- > > > > > > > > > >_________________________________________________________________ >Get Married in 2007. Join Shaadi.com >http://www.shaadi.com/ptnr.php?ptnr=mhottag _________________________________________________________________ Crave for a healthier lifestyle? Ask an expert http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm From arno at SALK.EDU Wed Feb 21 13:57:14 2007 From: arno at SALK.EDU (arno) Date: Wed, 21 Feb 2007 13:57:14 +0100 Subject: Neuromag data processing In-Reply-To: Message-ID: Is it possible to do source localization of Neuromag data using Fieldtrip? I looked at the documentation but did not find anything. How can I read the BEM model within Fieldtrip and use it. Just a few commands to start up would be useful. The goal of this is to allow EEGLAB users to perform source localization of their independent components through the EEGLAB-Fieldtrip pipeline. Thanks a lot, Arno From muthuraman10 at HOTMAIL.COM Wed Feb 21 14:39:52 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Wed, 21 Feb 2007 13:39:52 +0000 Subject: Time Frequency Analysis! In-Reply-To: <002d01c755b5$56993070$902dae83@fcdonders.nl> Message-ID: Hi JM, After changing the padding to 30 still i get the values from 0.125 to 0.625 and all the other values are Nan's in the TFR. Thanking you With regards M.Muthuraman >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Wed, 21 Feb 2007 13:39:33 +0100 > >Hi Muthu, > >Please put cfg.pad at 30. >As you can read in the frequency analysis tutorials, the cfg.pad is used to >pad out your data with zeros until the specified length, to obtain the >spectral interpolation required. I suspect that having your cfg.pad at only >2, while having a data length which is way longer, you run into problems. > >JM > > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Wednesday, February 21, 2007 1:15 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Hello JM, > >The time axis in my data which i define from 0 to 30 secs > >data1.time{1,1}=0:0.0375:29.99875; > >after making the changes it works now but i get the only values from > >0.125 to 0.625 and all the other values are Nan's > >thanking you > >with regards >M.Muthuraman. > > >From: Jan Mathijs Schoffelen > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Date: Wed, 21 Feb 2007 12:41:24 +0100 > > > >What's the time-axis in your data? > > > >JM > > > >-----Original Message----- > >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >Behalf > >Of Muthuraman Muthuraman > >Sent: Wednesday, February 21, 2007 12:16 PM > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > > >Hello, > > > >A brief on how to do i get the data1, I have the data for 24000 data >points > >with 800 Hz sampling rate (30 secs of data), i construct my own data >format > >according to the data format specified in fieltrip with > >data.label,fsample,trial,time. > >I tried the way you have mentioned with the window length > >this is what i do > > > >cfg=[]; > >winlen=0.5; > >halfwin=winlen/2; > >nwin=2.*(30./winlen)-1; > >cfg.output='pow'; > >cfg.method='mtmconvol'; > >cfg.channel = channelselection({'all' 'all'}, data1.label); > >cfg.foi=2:1:30; > >cfg.t_ftimwin=zeros(1,nwin).*winlen; > >cfg.toi=[0:halfwin:30-winlen]; > >cfg.taper='hanning'; > >cfg.pad=2; > >cfg.keeptrials='no'; > >TFRmult=freqanalysis(cfg,data1); > > > >and it throws a error > >??? Subscript indices must either be real positive integers or logicals. > > > >Error in ==> freqanalysis_mtmconvol at 424 > > autspctrmacttap(sgnlop,:) = dum(acttimboi); > > > >Error in ==> freqanalysis at 167 > >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); > > > >Please let me know, why do i get this error > > > > > >Thanking you > > > >with regards > >M.Muthuraman. > > > > >From: Christian Hesse > > >Reply-To: FieldTrip discussion list > > >To: FIELDTRIP at NIC.SURFNET.NL > > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > >Date: Mon, 19 Feb 2007 13:12:03 +0100 > > > > > >Hi Muthuraman, > > > > > >ok, in that case you can try the following (this assumes you have > >windows > > >of length "winlen" which overlap by "halfwin = winlen/2") > > > > > >winlen = 0.5; > > >% this is in seconds you can also use another time window > > >halfwin = winlen/2; > > > > > >% the total number of windows covering the 30 second period > > >nwin = 2.*(30./winlen) - 1; > > > > > >cfg.method = 'mtmconvol'; > > >cfg.output = 'pow'; > > >cfg.t_ftimwin = ones(1,nwin).*winlen; > > >cfg.toi = [0:halfwin:30-winlen]; > > > > > >The important things here to check are > > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements > > >2) the times you specify in cfg.toi actually correspond to your time > >axis > > >(i.e. do not start before or go on after). > > > > > >If you want to use a different overlap, you need to calculate nwin > > >slightly differently. > > > > > >Hope this helps more, > > >Christian > > > > > > > > > > > >>Thanks for the suggestion but using the mtmfft which i have done > >already > > >>and it works, my interest now is that i would like to use the Time > > >>frequency analysis 'mtmconvol' to estimate the power in the time > > >>frequency scale, in which how to get the whole 30secs continous data > >in > > >>one time frequency plot(TFR). > > >> > > >>Thanking you > > >> > > >>with regards > > >>M.Muthuraman. > > >> > > >>>From: Christian Hesse > > >>>Reply-To: FieldTrip discussion list > > >>>To: FIELDTRIP at NIC.SURFNET.NL > > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 > > >>> > > >>>Hi Muthuraman, > > >>> > > >>>>One more question regarding the Time frequency Analysis, i have EMG > > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 > >seconds > > > > >>>>of continous data). I would like to do the Timefrequency analysis > >for > > >>>>this data and to see the power for the whole 30 seconds > > >>> > > >>>use preprocessing to get the EMG data into a single 30s trial (if >you > > >>>want to analyze the rectified EMG, then do the rectification in > > >>>preprocessing), then use frequanalysis with > > >>> > > >>>cfg.method = 'mtmfft'; > > >>>cfg.output = 'pow'; > > >>> > > >>>this should give you the power spectrum of your EMG data over the > > >>>entire 30 second period. > > >>> > > >>>Regards, > > >>>Christian > > >>> > > >>> > > >>>--------------------------------------------------------------------- >- > > >>>Christian Hesse, PhD, MIEEE > > >>> > > >>>F.C. Donders Centre for Cognitive Neuroimaging > > >>>P.O. Box 9101 > > >>>NL-6500 HB Nijmegen > > >>>The Netherlands > > >>> > > >>>Tel.: +31 (0)24 36 68293 > > >>>Fax: +31 (0)24 36 10989 > > >>> > > >>>Email: c.hesse at fcdonders.ru.nl > > >>>Web: www.fcdonders.ru.nl > > >>>--------------------------------------------------------------------- >- > > >>> > > >>> > > >>> > > >>> > > >> > > >>_________________________________________________________________ > > >>Tried the new MSN Messenger? It's cool! Download now. http:// > > >>messenger.msn.com/Download/Default.aspx?mkt=en-in > > >> > > > > > >---------------------------------------------------------------------- > > >Christian Hesse, PhD, MIEEE > > > > > >F.C. Donders Centre for Cognitive Neuroimaging > > >P.O. Box 9101 > > >NL-6500 HB Nijmegen > > >The Netherlands > > > > > >Tel.: +31 (0)24 36 68293 > > >Fax: +31 (0)24 36 10989 > > > > > >Email: c.hesse at fcdonders.ru.nl > > >Web: www.fcdonders.ru.nl > > >---------------------------------------------------------------------- > > > > > > > > > > > > > > > >_________________________________________________________________ > >Get Married in 2007. Join Shaadi.com > >http://www.shaadi.com/ptnr.php?ptnr=mhottag > >_________________________________________________________________ >Crave for a healthier lifestyle? Ask an expert >http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm _________________________________________________________________ Spice up your IM conversations. New, colorful and animated emoticons. Get chatting! http://server1.msn.co.in/SP05/emoticons/ From Jan.Schoffelen at FCDONDERS.RU.NL Wed Feb 21 14:46:14 2007 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 21 Feb 2007 14:46:14 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: What about specifying a correct time axis? I would say, that a sampling rate of 800 hertz has a sampling interval of 0.00125 seconds, so your data.time{1} = 0:0.00125:30-0.00125; instead of what you had. JM -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Wednesday, February 21, 2007 2:40 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Time Frequency Analysis! Hi JM, After changing the padding to 30 still i get the values from 0.125 to 0.625 and all the other values are Nan's in the TFR. Thanking you With regards M.Muthuraman >From: Jan Mathijs Schoffelen >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >Date: Wed, 21 Feb 2007 13:39:33 +0100 > >Hi Muthu, > >Please put cfg.pad at 30. >As you can read in the frequency analysis tutorials, the cfg.pad is used to >pad out your data with zeros until the specified length, to obtain the >spectral interpolation required. I suspect that having your cfg.pad at only >2, while having a data length which is way longer, you run into problems. > >JM > > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Wednesday, February 21, 2007 1:15 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Hello JM, > >The time axis in my data which i define from 0 to 30 secs > >data1.time{1,1}=0:0.0375:29.99875; > >after making the changes it works now but i get the only values from > >0.125 to 0.625 and all the other values are Nan's > >thanking you > >with regards >M.Muthuraman. > > >From: Jan Mathijs Schoffelen > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > >Date: Wed, 21 Feb 2007 12:41:24 +0100 > > > >What's the time-axis in your data? > > > >JM > > > >-----Original Message----- > >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >Behalf > >Of Muthuraman Muthuraman > >Sent: Wednesday, February 21, 2007 12:16 PM > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > > >Hello, > > > >A brief on how to do i get the data1, I have the data for 24000 data >points > >with 800 Hz sampling rate (30 secs of data), i construct my own data >format > >according to the data format specified in fieltrip with > >data.label,fsample,trial,time. > >I tried the way you have mentioned with the window length > >this is what i do > > > >cfg=[]; > >winlen=0.5; > >halfwin=winlen/2; > >nwin=2.*(30./winlen)-1; > >cfg.output='pow'; > >cfg.method='mtmconvol'; > >cfg.channel = channelselection({'all' 'all'}, data1.label); > >cfg.foi=2:1:30; > >cfg.t_ftimwin=zeros(1,nwin).*winlen; > >cfg.toi=[0:halfwin:30-winlen]; > >cfg.taper='hanning'; > >cfg.pad=2; > >cfg.keeptrials='no'; > >TFRmult=freqanalysis(cfg,data1); > > > >and it throws a error > >??? Subscript indices must either be real positive integers or logicals. > > > >Error in ==> freqanalysis_mtmconvol at 424 > > autspctrmacttap(sgnlop,:) = dum(acttimboi); > > > >Error in ==> freqanalysis at 167 > >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); > > > >Please let me know, why do i get this error > > > > > >Thanking you > > > >with regards > >M.Muthuraman. > > > > >From: Christian Hesse > > >Reply-To: FieldTrip discussion list > > >To: FIELDTRIP at NIC.SURFNET.NL > > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > >Date: Mon, 19 Feb 2007 13:12:03 +0100 > > > > > >Hi Muthuraman, > > > > > >ok, in that case you can try the following (this assumes you have > >windows > > >of length "winlen" which overlap by "halfwin = winlen/2") > > > > > >winlen = 0.5; > > >% this is in seconds you can also use another time window > > >halfwin = winlen/2; > > > > > >% the total number of windows covering the 30 second period > > >nwin = 2.*(30./winlen) - 1; > > > > > >cfg.method = 'mtmconvol'; > > >cfg.output = 'pow'; > > >cfg.t_ftimwin = ones(1,nwin).*winlen; > > >cfg.toi = [0:halfwin:30-winlen]; > > > > > >The important things here to check are > > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements > > >2) the times you specify in cfg.toi actually correspond to your time > >axis > > >(i.e. do not start before or go on after). > > > > > >If you want to use a different overlap, you need to calculate nwin > > >slightly differently. > > > > > >Hope this helps more, > > >Christian > > > > > > > > > > > >>Thanks for the suggestion but using the mtmfft which i have done > >already > > >>and it works, my interest now is that i would like to use the Time > > >>frequency analysis 'mtmconvol' to estimate the power in the time > > >>frequency scale, in which how to get the whole 30secs continous data > >in > > >>one time frequency plot(TFR). > > >> > > >>Thanking you > > >> > > >>with regards > > >>M.Muthuraman. > > >> > > >>>From: Christian Hesse > > >>>Reply-To: FieldTrip discussion list > > >>>To: FIELDTRIP at NIC.SURFNET.NL > > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! > > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 > > >>> > > >>>Hi Muthuraman, > > >>> > > >>>>One more question regarding the Time frequency Analysis, i have EMG > > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 > >seconds > > > > >>>>of continous data). I would like to do the Timefrequency analysis > >for > > >>>>this data and to see the power for the whole 30 seconds > > >>> > > >>>use preprocessing to get the EMG data into a single 30s trial (if >you > > >>>want to analyze the rectified EMG, then do the rectification in > > >>>preprocessing), then use frequanalysis with > > >>> > > >>>cfg.method = 'mtmfft'; > > >>>cfg.output = 'pow'; > > >>> > > >>>this should give you the power spectrum of your EMG data over the > > >>>entire 30 second period. > > >>> > > >>>Regards, > > >>>Christian > > >>> > > >>> > > >>>--------------------------------------------------------------------- >- > > >>>Christian Hesse, PhD, MIEEE > > >>> > > >>>F.C. Donders Centre for Cognitive Neuroimaging > > >>>P.O. Box 9101 > > >>>NL-6500 HB Nijmegen > > >>>The Netherlands > > >>> > > >>>Tel.: +31 (0)24 36 68293 > > >>>Fax: +31 (0)24 36 10989 > > >>> > > >>>Email: c.hesse at fcdonders.ru.nl > > >>>Web: www.fcdonders.ru.nl > > >>>--------------------------------------------------------------------- >- > > >>> > > >>> > > >>> > > >>> > > >> > > >>_________________________________________________________________ > > >>Tried the new MSN Messenger? It's cool! Download now. http:// > > >>messenger.msn.com/Download/Default.aspx?mkt=en-in > > >> > > > > > >---------------------------------------------------------------------- > > >Christian Hesse, PhD, MIEEE > > > > > >F.C. Donders Centre for Cognitive Neuroimaging > > >P.O. Box 9101 > > >NL-6500 HB Nijmegen > > >The Netherlands > > > > > >Tel.: +31 (0)24 36 68293 > > >Fax: +31 (0)24 36 10989 > > > > > >Email: c.hesse at fcdonders.ru.nl > > >Web: www.fcdonders.ru.nl > > >---------------------------------------------------------------------- > > > > > > > > > > > > > > > >_________________________________________________________________ > >Get Married in 2007. Join Shaadi.com > >http://www.shaadi.com/ptnr.php?ptnr=mhottag > >_________________________________________________________________ >Crave for a healthier lifestyle? Ask an expert >http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm _________________________________________________________________ Spice up your IM conversations. New, colorful and animated emoticons. Get chatting! http://server1.msn.co.in/SP05/emoticons/ From Marcel.Bastiaansen at FCDONDERS.RU.NL Wed Feb 21 14:46:27 2007 From: Marcel.Bastiaansen at FCDONDERS.RU.NL (Marcel Bastiaansen) Date: Wed, 21 Feb 2007 14:46:27 +0100 Subject: Time Frequency Analysis! In-Reply-To: Message-ID: Dear Muthuraman & Jan Matthijs, It is good to have an email discussion list for fieldtrip, so that all users can benefit from each others problems, questions/answers and experiences with the software. However, if an email correspondence between two persons only involves highly user-specific details about scripts, properties of the data of that specific user etc., I think it would be better to switch to 'bilateral mode', that is, to continue the exchange of information outside of the discussion list. This prevent people's mailboxes of getting filled with lots of emails about details they don't need to know. Thanks, Marcel Muthuraman Muthuraman wrote: > Hi JM, > > After changing the padding to 30 still i get the values from 0.125 to > 0.625 and all the other values are Nan's in the TFR. > > Thanking you > > With regards > M.Muthuraman > > > >> From: Jan Mathijs Schoffelen >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> Date: Wed, 21 Feb 2007 13:39:33 +0100 >> >> Hi Muthu, >> >> Please put cfg.pad at 30. >> As you can read in the frequency analysis tutorials, the cfg.pad is >> used to >> pad out your data with zeros until the specified length, to obtain the >> spectral interpolation required. I suspect that having your cfg.pad >> at only >> 2, while having a data length which is way longer, you run into >> problems. >> >> JM >> >> >> -----Original Message----- >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf >> Of Muthuraman Muthuraman >> Sent: Wednesday, February 21, 2007 1:15 PM >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> >> Hello JM, >> >> The time axis in my data which i define from 0 to 30 secs >> >> data1.time{1,1}=0:0.0375:29.99875; >> >> after making the changes it works now but i get the only values from >> >> 0.125 to 0.625 and all the other values are Nan's >> >> thanking you >> >> with regards >> M.Muthuraman. >> >> >From: Jan Mathijs Schoffelen >> >Reply-To: FieldTrip discussion list >> >To: FIELDTRIP at NIC.SURFNET.NL >> >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> >Date: Wed, 21 Feb 2007 12:41:24 +0100 >> > >> >What's the time-axis in your data? >> > >> >JM >> > >> >-----Original Message----- >> >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >> Behalf >> >Of Muthuraman Muthuraman >> >Sent: Wednesday, February 21, 2007 12:16 PM >> >To: FIELDTRIP at NIC.SURFNET.NL >> >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> > >> >Hello, >> > >> >A brief on how to do i get the data1, I have the data for 24000 data >> points >> >with 800 Hz sampling rate (30 secs of data), i construct my own data >> format >> >according to the data format specified in fieltrip with >> >data.label,fsample,trial,time. >> >I tried the way you have mentioned with the window length >> >this is what i do >> > >> >cfg=[]; >> >winlen=0.5; >> >halfwin=winlen/2; >> >nwin=2.*(30./winlen)-1; >> >cfg.output='pow'; >> >cfg.method='mtmconvol'; >> >cfg.channel = channelselection({'all' 'all'}, data1.label); >> >cfg.foi=2:1:30; >> >cfg.t_ftimwin=zeros(1,nwin).*winlen; >> >cfg.toi=[0:halfwin:30-winlen]; >> >cfg.taper='hanning'; >> >cfg.pad=2; >> >cfg.keeptrials='no'; >> >TFRmult=freqanalysis(cfg,data1); >> > >> >and it throws a error >> >??? Subscript indices must either be real positive integers or >> logicals. >> > >> >Error in ==> freqanalysis_mtmconvol at 424 >> > autspctrmacttap(sgnlop,:) = dum(acttimboi); >> > >> >Error in ==> freqanalysis at 167 >> >[freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, >> data); >> > >> >Please let me know, why do i get this error >> > >> > >> >Thanking you >> > >> >with regards >> >M.Muthuraman. >> > >> > >From: Christian Hesse >> > >Reply-To: FieldTrip discussion list >> > >To: FIELDTRIP at NIC.SURFNET.NL >> > >Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> > >Date: Mon, 19 Feb 2007 13:12:03 +0100 >> > > >> > >Hi Muthuraman, >> > > >> > >ok, in that case you can try the following (this assumes you have >> >windows >> > >of length "winlen" which overlap by "halfwin = winlen/2") >> > > >> > >winlen = 0.5; >> > >% this is in seconds you can also use another time window >> > >halfwin = winlen/2; >> > > >> > >% the total number of windows covering the 30 second period >> > >nwin = 2.*(30./winlen) - 1; >> > > >> > >cfg.method = 'mtmconvol'; >> > >cfg.output = 'pow'; >> > >cfg.t_ftimwin = ones(1,nwin).*winlen; >> > >cfg.toi = [0:halfwin:30-winlen]; >> > > >> > >The important things here to check are >> > >1) that cfg.t_ftimwin and cfg.toi contain the same number of elements >> > >2) the times you specify in cfg.toi actually correspond to your time >> >axis >> > >(i.e. do not start before or go on after). >> > > >> > >If you want to use a different overlap, you need to calculate nwin >> > >slightly differently. >> > > >> > >Hope this helps more, >> > >Christian >> > > >> > > >> > > >> > >>Thanks for the suggestion but using the mtmfft which i have done >> >already >> > >>and it works, my interest now is that i would like to use the Time >> > >>frequency analysis 'mtmconvol' to estimate the power in the time >> > >>frequency scale, in which how to get the whole 30secs continous >> data >> >in >> > >>one time frequency plot(TFR). >> > >> >> > >>Thanking you >> > >> >> > >>with regards >> > >>M.Muthuraman. >> > >> >> > >>>From: Christian Hesse >> > >>>Reply-To: FieldTrip discussion list >> > >>>To: FIELDTRIP at NIC.SURFNET.NL >> > >>>Subject: Re: [FIELDTRIP] Time Frequency Analysis! >> > >>>Date: Mon, 19 Feb 2007 11:56:19 +0100 >> > >>> >> > >>>Hi Muthuraman, >> > >>> >> > >>>>One more question regarding the Time frequency Analysis, i >> have EMG >> > >>>>data of 24000 data points with a sampling frequeny of 800Hz (30 >> >seconds >> > >> > >>>>of continous data). I would like to do the Timefrequency >> analysis >> >for >> > >>>>this data and to see the power for the whole 30 seconds >> > >>> >> > >>>use preprocessing to get the EMG data into a single 30s trial >> (if you >> > >>>want to analyze the rectified EMG, then do the rectification in >> > >>>preprocessing), then use frequanalysis with >> > >>> >> > >>>cfg.method = 'mtmfft'; >> > >>>cfg.output = 'pow'; >> > >>> >> > >>>this should give you the power spectrum of your EMG data over the >> > >>>entire 30 second period. >> > >>> >> > >>>Regards, >> > >>>Christian >> > >>> >> > >>> >> > >> >>>--------------------------------------------------------------------- >> - >> > >>>Christian Hesse, PhD, MIEEE >> > >>> >> > >>>F.C. Donders Centre for Cognitive Neuroimaging >> > >>>P.O. Box 9101 >> > >>>NL-6500 HB Nijmegen >> > >>>The Netherlands >> > >>> >> > >>>Tel.: +31 (0)24 36 68293 >> > >>>Fax: +31 (0)24 36 10989 >> > >>> >> > >>>Email: c.hesse at fcdonders.ru.nl >> > >>>Web: www.fcdonders.ru.nl >> > >> >>>--------------------------------------------------------------------- >> - >> > >>> >> > >>> >> > >>> >> > >>> >> > >> >> > >>_________________________________________________________________ >> > >>Tried the new MSN Messenger? It's cool! Download now. http:// >> > >>messenger.msn.com/Download/Default.aspx?mkt=en-in >> > >> >> > > >> > >> >---------------------------------------------------------------------- >> > >Christian Hesse, PhD, MIEEE >> > > >> > >F.C. Donders Centre for Cognitive Neuroimaging >> > >P.O. Box 9101 >> > >NL-6500 HB Nijmegen >> > >The Netherlands >> > > >> > >Tel.: +31 (0)24 36 68293 >> > >Fax: +31 (0)24 36 10989 >> > > >> > >Email: c.hesse at fcdonders.ru.nl >> > >Web: www.fcdonders.ru.nl >> > >> >---------------------------------------------------------------------- >> > > >> > > >> > > >> > > >> > >> >_________________________________________________________________ >> >Get Married in 2007. Join Shaadi.com >> >http://www.shaadi.com/ptnr.php?ptnr=mhottag >> >> _________________________________________________________________ >> Crave for a healthier lifestyle? Ask an expert >> http://content.msn.co.in/Lifestyle/AskExpert/Default07.htm > > _________________________________________________________________ > Spice up your IM conversations. New, colorful and animated emoticons. > Get chatting! http://server1.msn.co.in/SP05/emoticons/ > -- dr. Marcel C.M. Bastiaansen. Max Planck Institute for Psycholinguistics Visiting Adress: Wundtlaan 1, 6525 XD Nijmegen, the Netherlands Mailing adress: P.O. Box 310, 6500 AH Nijmegen, the Netherlands phone: +31 24 3521 347 fax: +31 24 3521 213 mail: marcel.bastiaansen at mpi.nl web: http://www.mpi.nl/Members/MarcelBastiaansen and FC Donders Centre for Cognitive Neuroimaging Visiting address: Kapittelweg 29, 6525 EN Nijmegen, the Netherlands Mailing address: PO Box 9101, 6500 HB Nijmegen, the Netherlands phone: + 31 24 3610 882 fax: + 31 24 3610 989 mail: marcel.bastiaansen at fcdonders.ru.nl web: http://www.ru.nl/aspx/get.aspx?xdl=/views/run/xdl/page&ItmIdt=20592&SitIdt=119&VarIdt=96 -- From r.oostenveld at FCDONDERS.RU.NL Wed Feb 21 15:32:51 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 21 Feb 2007 15:32:51 +0100 Subject: too many mails on list? -> use digest mode In-Reply-To: <45DC4D33.8040800@fcdonders.ru.nl> Message-ID: Dear FieldTrip list subscribers, It seems that the amount of traffic on the list recently has increased quite a bit. That is good, since it means that there are ideas to be shared, but not all emails will be equally interesting to everyone. I still suggest to keep the discussions on the list and not move them off the list, since quite some other people on the list can also learn from it. Futhermore, it helps to distribute the load of replying to questions over multiple people. Also it is good to build up an archive with email correspondence that is accessible to everyone (see https://listserv.surfnet.nl/archives/fieldtrip.html). For people who feel that the number of mails on the list is too high, I have two suggestions 1) you can use email filter rules in your email client (works in Outlook, but also in most other email clients). 2) you can switch your subscription to the discussion list to "digest mode". With a "digest" subscription, you receive larger messages (called "digests") at regular intervals, usually once per day or once per week. These "digests" are collections of individual list postings. Some lists are so active that they produce several digests per day. Digests are a good compromise between reading everything as it is posted and feeling like the list is clogging your mailbox with a multitude of individual postings. You can switch to digest mode on the listserv website, see https:// listserv.surfnet.nl/scripts/wa.cgi?SUBED1=fieldtrip&A=1 best regards, Robert PS note that I don't know at the moment how the digests are currently configured on the FT discussion list, daily or even less frequent On 21 Feb 2007, at 14:46, Marcel Bastiaansen wrote: > It is good to have an email discussion list for fieldtrip, so that > all users can benefit from each others problems, questions/answers > and experiences with the software. > > However, if an email correspondence between two persons only > involves highly user-specific details about scripts, properties of > the data of that specific user etc., I think it would be better to > switch to 'bilateral mode', that is, to continue the exchange of > information outside of the discussion list. This prevent people's > mailboxes of getting filled with lots of emails about details they > don't need to know. From r.oostenveld at FCDONDERS.RU.NL Wed Feb 21 15:43:37 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 21 Feb 2007 15:43:37 +0100 Subject: Neuromag data processing In-Reply-To: <45DC41AA.2020509@salk.edu> Message-ID: Hi Arno On 21 Feb 2007, at 13:57, arno wrote: > Is it possible to do source localization of Neuromag data using > Fieldtrip? I looked at the documentation but did not find anything. > How can I read the BEM model within Fieldtrip and use it. Just a > few commands to start up would be useful. Yes, that is possible. You can either use headmodels (single sphere, multi-sphere, or realistic single-shell) that are constructed within FieldTrip, but you can also use the neuromag mex files in combination with headmodels that were constructed in the Neuromag software. Since I do not have the complete neuomag software, I cannot explain in detail how to follow the second "neuromag" path: I did write part of the code for it, and included other parts contributed by Joachim Gross and Lauri Parkkonen, but I cannot easily test it myself or make a demo script. The first path (i.e. using "pure fieldtrip") is of course fully accessible to anyone. Note that although we at the Donders sometimes use the CTF software to construct headmodels, that is not a requirement as you can do it completely within FieldTrip. An example for the different MEG headmodels is given on http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:make_leadfields_using_different_headmodels I suggest that you start with the simplest one, a manually specified single-sphere model cfg.vol.r = 12; % radius, here in cm cfg.vol.r = [0 0 4]; % origin, here in cm The preferred headmodel is a single-shell model (based on an algorithm and code from Guido Nolte) which is the las one on the example page, see the PREPARE_SINGLESHELL function for that. Note that the headmodel, the anatomical MRI (for plotting and headmodel construction), the sensors and the dipoles all should be expressed in the same (head-)coordinate system. best regards, Robert From sameer at ANDREW.CMU.EDU Wed Feb 21 16:13:10 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 21 Feb 2007 10:13:10 -0500 Subject: eog artifact rejection In-Reply-To: <001e01c75509$e6400390$902dae83@fcdonders.nl> Message-ID: Dear JM and Christian, On Tue, 20 Feb 2007, Jan Mathijs Schoffelen wrote: > Dear sameer, > > Ad problem 1: Please specify: > > cfg.vartrllength = 2, prior to doing the timelockanalysis This fixed the problem, thanks. > Ad problem 2: Please specify: > > cfg.channelcmb = {'all' 'EOG'}, prior to doing freqdescriptives. (instead of > {'all' 'ECG'} Actually, I was using EOG, forgot to change it in the notes. so it is still not working. But I think I'll follow Christian's suggestion. I did not think of trying that with Fieldtrip data structure. I am assuming if I find components with artifacts, in one set of trials, the same components will be blink artifacts in all trials as the ICAs = W * trialdata. sameer > > > JM > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf > Of Sameer Walawalkar > Sent: Tuesday, February 20, 2007 5:07 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] eog artifact rejection > > I am interested in removing blink artifacts. Unfortunately, with > fieldtrip component analysis, it is difficult to identify the independent > component corresponding to blinks by visual inspection due to the short > timecourse over which they are presented (trial length). > > There are essentially two errors: > 1> ??? Error using ==> timelockanalysis > data has variable trial lengths, you specified not to accept that ! > 2> fdcomp.cohspctrm does not exist. > > I tried to follow instructions under independent component analysis (ICA) > to remove ECG artifacts replacing eog for ecg. (I did not do any > resampling). (Is this a good idea?) > > So I did, > % go back to the raw data on disk and detect the peaks in the EOG channel, > cfg = same.old.cfg.used.for.component.analysis.of.data; > cfg.artfctdef.eog.pretim = 0.25; > cfg.artfctdef.eog.psttim = 0.50-1/1200; > > [cfg, artifact] = artifact_eog(cfg); (found 11 artifacts) > > > % preprocess the data around the peaks, i.e. read the segments of raw data > containing the EOG artifact > cfg = []; > cfg.dataset = 'JD_012507_Beeps_One.fif'; > cfg.datatype = 'continuous'; > cfg.padding = 10; > cfg.dftfilter = 'yes'; > cfg.blc = 'yes'; > cfg.trl = [artifact zeros(size(artifact,1),1)]; > cfg.channel = {'MEG' 'EOG'}; > data_eog = preprocessing(cfg) > > % decompose the ECG-locked datasegments into components, using the > previously found (un)mixing matrix > cfg = []; > cfg.topo = compRR_orig.topo; > cfg.topolabel = compRR_orig.topolabel; > comp_eog = componentanalysis(cfg, data_eog); > selecting 307 channels > baseline correcting data > starting decomposition using predetermined mixing matrix > total time in componentanalysis 1.2 seconds > > > % compute a frequency decomposition of all components and the ECG > > cfg = []; > timelock = timelockanalysis(cfg, comp_eog); > applying preprocessing options > ??? Error using ==> timelockanalysis > data has variable trial lengths, you specified not to accept that ! > > % compute a frequency decomposition of all components and the ECG > > cfg = []; > cfg.method = 'mtmfft'; > cfg.output = 'fourier'; > cfg.foilim = [0 100]; > cfg.taper = 'hanning'; > cfg.pad = 'maxperlen'; > freq = freqanalysis(cfg, comp_ecg); > > > % compute coherence between all components and the ECG > cfg = []; > cfg.channelcmb = {'all' 'ECG'}; > cfg.jackknife = 'no'; > fdcomp = freqdescriptives(cfg, freq); > > Even though I get computing cross-spectral densities message, I do not get > .cohspctrm. > > fdcomp = > > dimord: 'chan_freq' > freq: [1x155 double] > label: {307x1 cell} > powspctrm: [307x155 double] > dof: [307x155 double] > cfg: [1x1 struct] > > > Sorry for the long email, and thanks for your help. > > sameer > > From sameer at ANDREW.CMU.EDU Wed Feb 21 16:51:42 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 21 Feb 2007 10:51:42 -0500 Subject: rejectcomponent Message-ID: While using rejectcomponent, dataRR_clean = rejectcomponent(cfg, compRR_orig); removing 2 components keeping 305 components But I tried dataRR_clean = rejectcomponent(cfg, compRR_orig, dataRR); ??? Error using ==> rejectcomponent Too many input arguments. The second manner of rejecting components will be necessary if ICAs are done using data reduction. sameer From sghosh at HSS.IITD.AC.IN Thu Feb 22 05:25:09 2007 From: sghosh at HSS.IITD.AC.IN (Shantanu Ghosh) Date: Thu, 22 Feb 2007 05:25:09 +0100 Subject: Estimating the power in EEG frequency bands Message-ID: Hello FT users, When I want to analyze the power in different eeg frequency bands (alpha, beta, etc), do I use a grand average for all subjects, or do i take only data trial by trial for all electrodes, estimate the powers, and then average them for all trials? Thanks, Shantanu From c.hesse at FCDONDERS.RU.NL Thu Feb 22 09:40:42 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Thu, 22 Feb 2007 09:40:42 +0100 Subject: Estimating the power in EEG frequency bands In-Reply-To: Message-ID: Hi Shantanu, > When I want to analyze the power in different eeg frequency bands > (alpha, > beta, etc), do I use a grand average for all subjects, or do i take > only > data trial by trial for all electrodes, estimate the powers, and then > average them for all trials? You use the the latter approach, averaging the power over trials (subject average) and then over subjects (grand average) if you wish to look at INDUCED activity, i.e. task or event related modulation in the amplitude time-course of ongoing oscillatory activity (this analysis is not sensitive to the phase differences of the oscillations on different trials). You can also average the signals first (in the time domain) and then compute the power spectrum, in which case you will see the spectral properties of EVOKED activity, i.e., activity that is phase or time locked to the event / stimulus / response. Both of these time frequency visualizations give information that is complementary to looking a the time course of your event-related or evoked potentials (for EEG) or fields (for MEG) which you get by doing a time-locked average of the raw signals. Hope this helps to clarify, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulla.rantakokko at TKK.FI Thu Feb 22 15:37:21 2007 From: ulla.rantakokko at TKK.FI (Ulla Rantakokko) Date: Thu, 22 Feb 2007 16:37:21 +0200 Subject: neuromag/definetrial Message-ID: Hi, I have also similar problems to 'too many trials' i.e. I get over 800 trials that last all fixed 300 ms when I expect to get 64 trials with varying lentghs. What is the eventvalue? From where it comes? I get ten (instead of seven) event values of order 0.00067.. I get no reference to STI channels, only channels marked 'trial'. What are the trials corresponding to the raw data channels? regards Ulla From thomas at UCSD.EDU Thu Feb 22 15:39:43 2007 From: thomas at UCSD.EDU (Thomas Thesen) Date: Thu, 22 Feb 2007 09:39:43 -0500 Subject: Estimating the power in EEG frequency bands In-Reply-To: <07ECB755-0FBB-454B-9E26-3C5A04F645D1@fcdonders.ru.nl> Message-ID: Hi FieldTrippers, Following up on this conversation. It seems that the 'induced activity' contains both phase-locked and non-phase-locked activity, whereby the 'evoked' activity contains only phase-locked activity. Is it then kosher to separate these components by linear subtraction? For example, if we first compute the 'induced' activity by averaging power over individual trials, and from that subtract the 'evoked activity' (calculated based on average response) to get the induced activity without any phase-locked activity? So if Induced = Phase + Non-Phase And Evoked = Phase Then Non-Phase = Induced - Evoked Or does the fact that this is a linear operations on data that have been constructed through a non-linear process render this somehow invalid? It has certainly been done before. Your comments would be much appreciated. Cheers, Thomas _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Christian Hesse Sent: Thursday, February 22, 2007 3:41 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Estimating the power in EEG frequency bands Hi Shantanu, When I want to analyze the power in different eeg frequency bands (alpha, beta, etc), do I use a grand average for all subjects, or do i take only data trial by trial for all electrodes, estimate the powers, and then average them for all trials? You use the the latter approach, averaging the power over trials (subject average) and then over subjects (grand average) if you wish to look at INDUCED activity, i.e. task or event related modulation in the amplitude time-course of ongoing oscillatory activity (this analysis is not sensitive to the phase differences of the oscillations on different trials). You can also average the signals first (in the time domain) and then compute the power spectrum, in which case you will see the spectral properties of EVOKED activity, i.e., activity that is phase or time locked to the event / stimulus / response. Both of these time frequency visualizations give information that is complementary to looking a the time course of your event-related or evoked potentials (for EEG) or fields (for MEG) which you get by doing a time-locked average of the raw signals. Hope this helps to clarify, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marcel.Bastiaansen at FCDONDERS.RU.NL Thu Feb 22 15:52:56 2007 From: Marcel.Bastiaansen at FCDONDERS.RU.NL (Marcel Bastiaansen) Date: Thu, 22 Feb 2007 15:52:56 +0100 Subject: Estimating the power in EEG frequency bands In-Reply-To: <001d01c7568f$4b0d1890$0202fea9@D3K61L91> Message-ID: An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Thu Feb 22 16:38:56 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 22 Feb 2007 10:38:56 -0500 Subject: No subject Message-ID: Do I have to install fmrlab to be able to use binica? (Look below). this is all in interest of trying to do ICA as quick as possible. Runica or varimax seem to take 3 hrs (without pca reduction). cfg.method = 'binica' cfg.binica.pca = 50; compRR_binica_pca = componentanalysis(cfg, dataRR); selecting 307 channels baseline correcting data concatenating data.............................. concatenated data matrix size 307x120030 starting decomposition using binica binica: using source file '/home/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/EEGLab/eeglab5.03/eeglab5.03/functions/binica.sc' binica(): ica binary '/data/common/matlab/fmrlab/ica_linux' is not in your Matlab path, check ??? One or more output arguments not assigned during call to '/home/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/EEGLab/eeglab5.03/eeglab5.03/functions/binica.m (binica)'. Error in ==> componentanalysis at 331 [weights, sphere] = binica(dat, optarg{:}); On a connected note, rejectcomponent.m for rejecting ICAs gives an error when we pass three arguments (cfg, components, data). you need to do this (correct me if I am wrong) if you have done pca reduction. thanks, sameer From muthuraman10 at HOTMAIL.COM Thu Feb 22 17:21:28 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Thu, 22 Feb 2007 16:21:28 +0000 Subject: leadfieldmatrix! Message-ID: Hello Fieldtrippers, I am using the DICS algorithm for the source analysis, in which i am successfull upto the freqanalysis calculating coherence the next step inorder to use the source analysis. I construct the leadfield matrix the parameters are vol = []; vol.r = 12 * [0.88 0.92 1.00]; vol.c = [1 1/80 1]; vol.o = [0 0 0]; cfg1 = []; cfg1.elec = elec; cfg1.vol = vol; cfg1.resolution = 1; grid = prepare_leadfield(cfg1,freqmtmfft); I am constructing a volume conduction model with the elec file[standard locations from the Sphere2 ] which is been constructed for the 55 electrodes which i use for the source analysis, i get these warnings is it because the locations which i use from the standard location files. using headmodel specified in the configuration using electrodes specified in the configuration selected 55 electrodes 8 dipoles inside, 0 dipoles outside brain making tight grid 8 dipoles inside, 0 dipoles outside brain computing leadfield computing leadfield 1/8 Warning: electrodes do not ly on sphere surface -> using projection >In fieldtrip-20070109\private\eeg_leadfield4 at 60 In fieldtrip-20070109\private\compute_leadfield at 435 In prepare_leadfield at 209 and when i go on further with the source analysis with this leadfield matrix has cfg.frequency=9; cfg.method='dics'; cfg.grid=grid; cfg.elec=elec; cfg.vol=vol; [source]=sourceanalysis(cfg,freqmtmfft); %PLOTTING SOURCE cfg.location='interactive'; cfg.funparameter='source'; cfg.maskparameter='source'; sourceplot(cfg,source); and when i use the source plot i get the errors updating homogenous coordinate transformation matrix ??? Error using ==> horzcat The following error occurred converting from char to cell: Error using ==> cell Conversion to cell from char is not possible. Error in ==> fieldtrip-20070109\private\parameterselection at 77 if ~issubfield(data, param{i}) && issubfield(data, ['avg.' param{i}]) Error in ==> volumedownsample at 139 cfg.parameter = parameterselection(cfg.parameter, source); Error in ==> sourceplot at 203 interp = volumedownsample(tmpcfg, interp); sorry for the long mail Thanking you with regards M.Muthuraman. _________________________________________________________________ News and updates from Indian diaspora http://content.msn.co.in/NRI/Default From r.oostenveld at FCDONDERS.RU.NL Thu Feb 22 18:12:13 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 22 Feb 2007 18:12:13 +0100 Subject: leadfieldmatrix! In-Reply-To: Message-ID: On 22 Feb 2007, at 17:21, Muthuraman Muthuraman wrote: > Warning: electrodes do not ly on sphere surface -> using projection >> In fieldtrip-20070109\private\eeg_leadfield4 at 60 > In fieldtrip-20070109\private\compute_leadfield at 435 > In prepare_leadfield at 209 Electrodes of course should ly on the skin surface, that is the case in the real world and it should also be the case in your model. Did you plot the electrodes in combination with the sphere on which they should ly? You can use headmodelplot for that. > %PLOTTING SOURCE > > cfg.location='interactive'; > cfg.funparameter='source'; > cfg.maskparameter='source'; > sourceplot(cfg,source); Please update to the latest version of fieldtrip, the sourceplot function has recently been improved. The documentation of sourceplot explains how to use the funparameter and maskparameter. See also the tutorial documentation. Your specification 'source' is certainly not going to work, sice 'source' is not a source parameter. regards, Robert From r.oostenveld at FCDONDERS.RU.NL Thu Feb 22 18:18:43 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 22 Feb 2007 18:18:43 +0100 Subject: No subject In-Reply-To: Message-ID: Hi Sameer On 22 Feb 2007, at 16:38, Sameer Walawalkar wrote: > Do I have to install fmrlab to be able to use binica? (Look below). > this is all in interest of trying to do ICA as quick as possible. > Runica or varimax seem to take 3 hrs (without pca reduction). .... > starting decomposition using binica > binica: using source file '/home/sameer/KarmaCond/ > DataNeuroMagCondor2/MegSoftwareCondor2/EEGLab/eeglab5.03/eeglab5.03/ > functions/binica.sc' > binica(): ica binary '/data/common/matlab/fmrlab/ica_linux' is not > in your Matlab path, check it seems to me that in the EEGLAB binica.m wrapper-function the path to the actual binica linux binary is incorrectly hardcoded. I expect the ica_linux binary to be included in the EEGLAB release version, if not then I suggest that you contact the EEGLAB developpers. Robert From sameer at ANDREW.CMU.EDU Thu Feb 22 18:29:06 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Thu, 22 Feb 2007 12:29:06 -0500 Subject: resampling Message-ID: Hello, How exactly does resampling work? If I resample data to 300 Hz from 1KHz, will the resulting data structure have encoded information for going back to 1KHz? This is so that I could resample down, do ICA, remove components, and then get back to 1KHz. (Clearly, I dont understnad the resampling algorithm). thanks, sameer From c.hesse at FCDONDERS.RU.NL Thu Feb 22 19:28:10 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Thu, 22 Feb 2007 19:28:10 +0100 Subject: resampling In-Reply-To: Message-ID: Hi Sameer, If you are resampling your data for the purposes of speeding up the ICA algorithm, then you just take the (de-)mixing matrix and apply to your original data. Although I would recommend the following normalization of the mixing matrix (in the following A is the mixing matrix and W = inv(A) is the de-mixing matrix): [nchan, nsrcs] = size(A); for i=1:nsrcs A(:,i) = A(:,i)./norm(A(:,i),2); end W = inv(A); this way you ensure that your mixing (and de-mixing) matrix do not contain information about the power of the components but merely about spatial projections (and the spatial correlations of these), so that when you apply W to your data (at the original sampling rate), you can treat the variance (power) of the components s = Wx as "correct". Some further comments to bear in mind: since in estimating the ICA on the downsampled data you in effect assume that the high-frequency content (above the Nyquist limit of your resampling frequency) is not relevant. Hence you might as well continue working with the downsampled data. However, if there IS stuff going on in the high- frequency bands that is important (e.g., part of a string artifact signal which has a broad band spectrum), then the ICA model estimated on the downsampled data will effectively be "wrong" and will not be able to successfully separate your data into independent components. This may be an unlikely scenario for very high frequencies, but the considerations should guide you in choosing a resampling rate that is not "too low". Regards, Christian On 22 Feb 2007, at 18:29, Sameer Walawalkar wrote: > Hello, > > How exactly does resampling work? If I resample data to 300 Hz from > 1KHz, will the resulting data structure have encoded information > for going back to 1KHz? > > This is so that I could resample down, do ICA, remove components, > and then get back to 1KHz. (Clearly, I dont understnad the > resampling algorithm). > > thanks, > sameer > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Fri Feb 23 00:40:12 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 00:40:12 +0100 Subject: Estimating the power in EEG frequency bands In-Reply-To: <001d01c7568f$4b0d1890$0202fea9@D3K61L91> Message-ID: Hi Thomas, > Following up on this conversation. It seems that the ‘induced > activity’ contains both phase-locked and non-phase-locked activity, > whereby the ‘evoked’ activity contains only phase-locked activity. > Is it then kosher to separate these components by linear > subtraction? For example, if we first compute the ‘induced’ > activity by averaging power over individual trials, and from that > subtract the ‘evoked activity’ (calculated based on average > response) to get the induced activity without any phase-locked > activity? It is not correct to subtract because computing the induced and evoked power spectra involves squaring signal amplitudes (a non- linear operation), and hence, taking your terminology to refer to the instantaneous amplitudes of the signal components (this applies to any time-frequency tile) > Induced = Phase + Non-Phase > > And > > Evoked = Phase > > Then > > Non-Phase = Induced – Evoked > > what you actually get from spectral or time-frequency analysis is the power of your MEASURED signal Induced^2 = (Phase + Non-Phase)^2 = Phase^2 + 2*Phase*Non-Phase + Non- Phase^2 Evoked^2 = Phase^2 Then Induced^2 - Evoked^2 = 2*Phase*Non-Phase + Non-Phase^2 AND NOT Non- Phase^2 This bit of high-school algebra shows quite clearly that even if you had a perfect estimate of Evoked and Induced power (which you of course in practice do not have due to a finite number of trials, amplitude non-stationarities, artifacts and noise) it is not possible to obtain an estimate of Non-Phase^2 using time-frequency analysis, averaging and subtraction. Cheers, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Fri Feb 23 01:44:59 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 01:44:59 +0100 Subject: Estimating the power in EEG frequency bands In-Reply-To: Message-ID: One further comment (please see below): > Hi Thomas, >> Following up on this conversation. It seems that the ‘induced >> activity’ contains both phase-locked and non-phase-locked >> activity, whereby the ‘evoked’ activity contains only phase-locked >> activity. Is it then kosher to separate these components by linear >> subtraction? For example, if we first compute the ‘induced’ >> activity by averaging power over individual trials, and from that >> subtract the ‘evoked activity’ (calculated based on average >> response) to get the induced activity without any phase-locked >> activity? > > It is not correct to subtract because computing the induced and > evoked power spectra involves squaring signal amplitudes (a non- > linear operation), and hence, taking your terminology to refer to > the instantaneous amplitudes of the signal components (this applies > to any time-frequency tile) >> Induced = Phase + Non-Phase >> >> And >> >> Evoked = Phase >> >> Then >> >> Non-Phase = Induced – Evoked >> >> > what you actually get from spectral or time-frequency analysis is > the power of your MEASURED signal > > Induced^2 = (Phase + Non-Phase)^2 = Phase^2 + 2*Phase*Non-Phase + > Non-Phase^2 > > Evoked^2 = Phase^2 > > Then > > Induced^2 - Evoked^2 = 2*Phase*Non-Phase + Non-Phase^2 AND NOT Non- > Phase^2 > Note that the other crucial thing to consider here is that you are in one case averaging power over trials over trials: E[ (Induced^2) ] = E[ (Phase + Non-Phase)^2 ] = E[ (Phase^2 + 2*Phase*Non-Phase + Non-Phase^2) ] = E[ (Phase^2) ] E[ (Non- Phase^2) ] + E[ 2*Phase*Non-Phase ] this is why taking the square root of sqrt(Induced^2) does not give (Phase + Non-Phase) but sqrt(E[ (Phase+Non-Phase)^2 ]). in the evoked case you are taking the power of the average amplitude Evoked^2 = E[ Phase ]^2 (---> note the ^2 on the outside of the sum) so in subtracting you are actually assuming that E[Phase]^2 = E [(Phase)^2] which is unlikely to be accurate the case in finite samples. Hope I have not confused others (or myself) here. Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From werkle at MPIB-BERLIN.MPG.DE Fri Feb 23 12:24:42 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Fri, 23 Feb 2007 12:24:42 +0100 Subject: ICA based artifact correction and phase-locking Message-ID: Dear all, in my studies, I'm investigating early preceptual binding (visual) across the lifespan (i.e., I have data form children, younger and older adults) with EEG measures. My main interest concerns changes in gamma-power and measures of phase-synchronization in the gamma frequency range(e.g., phase-locking index, n:m (theta:gamma) phase synchronization). Currently I use a 'semi-automatic' procedure for artifact rejection, i.e., I use thresholding in the time-domain (min/max in segment -/+ 100µV)to 'suggest' contaminated epochs. After that I visually inspect the data again for eye-blink and muscle activity, and completely reject the contaminated epochs. The problem with this procedure is that, especially in the older adults group, for many subjects only too few trials remain in the final sample. Therefore, I thought I could use ICA for artifact correction (instead of complete rejection). After identification of the components that reflect muscle activity (and also other artifacts), I thought to recombine the remaining ICs and perform my analyses (power, PLI, n:m synchronization) on the recombined (cleaned data). Now my question(s): Is there any experience whether removing certain ICs may change the phase spectrum, i.e. may this approach induce some systematic bias? If there is a systematic bias, are different frequency bands affected differentialy? Could anyone give me some references on these issues? Any comments are very much appreciated. Best regards, Markus -- ************************************************************** Markus Werkle-Bergner, Dipl. Psych. Predoctoral Research Fellow Center for Lifespan Psychology Max Planck Institute for Human Development Lentzeallee 94, Room 211, D-14195 Berlin, Germany. Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 ************************************************************** From c.hesse at FCDONDERS.RU.NL Fri Feb 23 13:18:18 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 13:18:18 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: <45DECEFA.5030200@mpib-berlin.mpg.de> Message-ID: Hi Markus, the short answer is: if (and only if, big if by the way) ICA correctly separates artifacts from brain activity, and you correctly identify the artifact components, removal of the artifact components from your data does not affect the time-frequency properties (including phase) of the other components (i.e. the rest of the data) if you project back to the sensor level. This is because ICA assumes a linear (instantaneous) mixing of statistically independent signals. I would just try it out for the time being - if you get funny results (or things too good to be true), please get back in touch as there is also a slightly longer answer. Hope this helps, Christian On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: > Dear all, > > in my studies, I'm investigating early preceptual binding (visual) > across the lifespan (i.e., I have data form children, younger and > older > adults) with EEG measures. My main interest concerns changes in > gamma-power and measures of phase-synchronization in the gamma > frequency range(e.g., phase-locking index, n:m (theta:gamma) phase > synchronization). > > Currently I use a 'semi-automatic' procedure for artifact > rejection, i.e., I use thresholding in the time-domain (min/max in > segment -/+ 100µV)to 'suggest' contaminated epochs. After that I > visually inspect the data again for eye-blink and muscle activity, > and completely reject the contaminated epochs. > > The problem with this procedure is that, especially in the older > adults group, for many subjects only too few trials remain in the > final sample. > > Therefore, I thought I could use ICA for artifact correction > (instead of complete rejection). After identification of the > components that reflect muscle activity (and also other artifacts), > I thought to recombine the remaining ICs and perform my analyses > (power, PLI, n:m synchronization) on the recombined (cleaned data). > > Now my question(s): Is there any experience whether removing > certain ICs > may change the phase spectrum, i.e. may this approach induce some > systematic bias? If there is a systematic bias, are different > frequency > bands affected differentialy? Could anyone give me some references on > these issues? > > Any comments are very much appreciated. > > Best regards, > Markus > > -- > ************************************************************** > Markus Werkle-Bergner, Dipl. Psych. > Predoctoral Research Fellow > > Center for Lifespan Psychology > Max Planck Institute for Human Development > Lentzeallee 94, Room 211, D-14195 Berlin, Germany. > Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 > ************************************************************** > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From werkle at MPIB-BERLIN.MPG.DE Fri Feb 23 13:39:31 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Fri, 23 Feb 2007 13:39:31 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: Message-ID: Hi Christian, thank you for your fast reply. Indeed, I had the same thought and tried it out at least for the power-measures (the analysis for the PLI is currently underway). The results look somewhat similar (i.e., I used the original data from one subject (artifacts rejected according to the semi-automatic procedure) and compared the results with the ICA-cleaned data), although there are some changes: From my current view, I see the same spots of increased TF-power (in gamma but also in lower frequency ranges) in both analyses. However the main spots appear somewhat deminished in the ICA-cleaned data. Additionally, for high gamma-power (> 55 Hz), I recognize a power increase in the main spots. Because I expected some changes (i.e., I assumed to get rid of some artifactual muscle activity), now I can not judge whether these results are 'good' or 'bad'. Therefore, I would be interested in the 'slightly longer answer'. Furthermore, currently I do the ICA decomposition on all available segments (minus those with really excessive artifacts, which I took out before running ICA). This means, my trials are a mixture of clearly contaminated as well as clearly uncontaminated trials. Because my main goal is to identify the eye and muscle artifacts, would it improve the detection of components reflecting artifacts if I do the ICA decomposition only on pre-identified artifactual trials? (My idea is that then the components reflecting artifacts would catch less 'true' brain activity. But perhaps I have a missconception here ...) Thank you very much for your help. Best regards, Markus Christian Hesse schrieb: > Hi Markus, > > the short answer is: if (and only if, big if by the way) ICA correctly > separates artifacts from brain activity, and you correctly identify > the artifact components, removal of the artifact components from your > data does not affect the time-frequency properties (including phase) > of the other components (i.e. the rest of the data) if you project > back to the sensor level. This is because ICA assumes a linear > (instantaneous) mixing of statistically independent signals. > > I would just try it out for the time being - if you get funny results > (or things too good to be true), please get back in touch as there is > also a slightly longer answer. > > Hope this helps, > Christian > > > On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: > >> Dear all, >> >> in my studies, I'm investigating early preceptual binding (visual) >> across the lifespan (i.e., I have data form children, younger and older >> adults) with EEG measures. My main interest concerns changes in >> gamma-power and measures of phase-synchronization in the gamma >> frequency range(e.g., phase-locking index, n:m (theta:gamma) phase >> synchronization). >> >> Currently I use a 'semi-automatic' procedure for artifact rejection, >> i.e., I use thresholding in the time-domain (min/max in segment -/+ >> 100µV)to 'suggest' contaminated epochs. After that I visually inspect >> the data again for eye-blink and muscle activity, and completely >> reject the contaminated epochs. >> >> The problem with this procedure is that, especially in the older >> adults group, for many subjects only too few trials remain in the >> final sample. >> >> Therefore, I thought I could use ICA for artifact correction (instead >> of complete rejection). After identification of the components that >> reflect muscle activity (and also other artifacts), I thought to >> recombine the remaining ICs and perform my analyses (power, PLI, n:m >> synchronization) on the recombined (cleaned data). >> >> Now my question(s): Is there any experience whether removing certain ICs >> may change the phase spectrum, i.e. may this approach induce some >> systematic bias? If there is a systematic bias, are different frequency >> bands affected differentialy? Could anyone give me some references on >> these issues? >> >> Any comments are very much appreciated. >> >> Best regards, >> Markus >> >> -- >> ************************************************************** >> Markus Werkle-Bergner, Dipl. Psych. >> Predoctoral Research Fellow >> >> Center for Lifespan Psychology >> Max Planck Institute for Human Development >> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >> ************************************************************** >> > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > -- ************************************************************** Markus Werkle-Bergner, Dipl. Psych. Predoctoral Research Fellow Center for Lifespan Psychology Max Planck Institute for Human Development Lentzeallee 94, Room 211, D-14195 Berlin, Germany. Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 ************************************************************** From c.hesse at FCDONDERS.RU.NL Fri Feb 23 14:11:41 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 14:11:41 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: <45DEE083.9030509@mpib-berlin.mpg.de> Message-ID: Hi Markus, > Because I expected some changes (i.e., I assumed to get rid of some > artifactual muscle activity), now I can not judge whether these > results are 'good' or 'bad'. Therefore, I would be interested in > the 'slightly longer answer'. When applying ICA to "real" data (i.e. where we do not really know everything about how the observed data are really generated) it is actually impossible to tell "objectively" whether removing components and then reconstructing the signal leads to "good" or "bad" results - it is basically a judgement call. Alternatively, you could use indirect arguments, e.g. related to improved ability to discriminate between two different conditions or something like that. The only way you can tell whether you successfully removed components from data is using synthetic data where you have a "ground truth". (Philosophical / Methodological Aside: the same arguments apply to ANY mathematical or statistical method which involves numerical estimation of some model (always based on some assumptions) from data. Believe it or not, this would include nummerical integration techniques. The best you can ever do with numerical techniques is to understand their applicability criteria recognize their behaviour when these are criteria are not met. In the case of "real" data you must judge whether the data to satisfy the applicability criteria (big judgement), then brace yourself and jump ... that's as good as it ever gets, I am afraid :-) > Furthermore, currently I do the ICA decomposition on all available > segments (minus those with really excessive artifacts, which I took > out before running ICA). Why do you remove these epochs? Do the signals saturate or is there excessive electrode(-cap) or subject movement in these? > This means, my trials are a mixture of clearly contaminated as well > as clearly uncontaminated trials. Because my main goal is to > identify the eye and muscle artifacts, would it improve the > detection of components reflecting artifacts if I do the ICA > decomposition only on pre-identified artifactual trials? (My idea > is that then the components reflecting artifacts would catch less > 'true' brain activity. But perhaps I have a missconception here ...) The accuracy of the ICA decomposition relies fundamentally on the accuracy of the mixing matrix estimate A from which you form the de- mixing matrix (or vice versa). So if only some columns of A (e.g. artifact source sensor projections) are accurately estimated while the sensor projection estimates of brain activity are inaccurate (individually or as a subspace), then the de-mixing the data using W = inv(A) will not be fully successful in removing artifact activity from components reflecting the brain activity (subspace). In order to accurately estimate the sensor projections of ALL sources, the data needs to comprise example activity from ALL sources, i.e. BOTH artifact activity and brain activity. So since you need to estimate your brain activity (subspace) as accurately as your artifact sources, you should use as much of the data, i.e. contaminated and clean segments, as possible. How many EEG channels do you have, by the way? I need to know in order to continue with the 'slightly longer answer' Regards, Christian > > Thank you very much for your help. > > Best regards, > Markus > > Christian Hesse schrieb: >> Hi Markus, >> >> the short answer is: if (and only if, big if by the way) ICA >> correctly separates artifacts from brain activity, and you >> correctly identify the artifact components, removal of the >> artifact components from your data does not affect the time- >> frequency properties (including phase) of the other components >> (i.e. the rest of the data) if you project back to the sensor >> level. This is because ICA assumes a linear (instantaneous) mixing >> of statistically independent signals. >> >> I would just try it out for the time being - if you get funny >> results (or things too good to be true), please get back in touch >> as there is also a slightly longer answer. >> >> Hope this helps, >> Christian >> >> >> On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: >> >>> Dear all, >>> >>> in my studies, I'm investigating early preceptual binding (visual) >>> across the lifespan (i.e., I have data form children, younger and >>> older >>> adults) with EEG measures. My main interest concerns changes in >>> gamma-power and measures of phase-synchronization in the gamma >>> frequency range(e.g., phase-locking index, n:m (theta:gamma) >>> phase synchronization). >>> >>> Currently I use a 'semi-automatic' procedure for artifact >>> rejection, i.e., I use thresholding in the time-domain (min/max >>> in segment -/+ 100µV)to 'suggest' contaminated epochs. After that >>> I visually inspect the data again for eye-blink and muscle >>> activity, and completely reject the contaminated epochs. >>> >>> The problem with this procedure is that, especially in the older >>> adults group, for many subjects only too few trials remain in the >>> final sample. >>> >>> Therefore, I thought I could use ICA for artifact correction >>> (instead of complete rejection). After identification of the >>> components that reflect muscle activity (and also other >>> artifacts), I thought to recombine the remaining ICs and perform >>> my analyses (power, PLI, n:m synchronization) on the recombined >>> (cleaned data). >>> >>> Now my question(s): Is there any experience whether removing >>> certain ICs >>> may change the phase spectrum, i.e. may this approach induce some >>> systematic bias? If there is a systematic bias, are different >>> frequency >>> bands affected differentialy? Could anyone give me some >>> references on >>> these issues? >>> >>> Any comments are very much appreciated. >>> >>> Best regards, >>> Markus >>> >>> -- >>> ************************************************************** >>> Markus Werkle-Bergner, Dipl. Psych. >>> Predoctoral Research Fellow >>> >>> Center for Lifespan Psychology >>> Max Planck Institute for Human Development >>> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >>> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >>> ************************************************************** >>> >> >> --------------------------------------------------------------------- >> - >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 >> NL-6500 HB Nijmegen The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> --------------------------------------------------------------------- >> - >> >> >> >> > > > -- > ************************************************************** > Markus Werkle-Bergner, Dipl. Psych. > Predoctoral Research Fellow > > Center for Lifespan Psychology > Max Planck Institute for Human Development > Lentzeallee 94, Room 211, D-14195 Berlin, Germany. > Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 > ************************************************************** > ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From werkle at MPIB-BERLIN.MPG.DE Fri Feb 23 14:36:43 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Fri, 23 Feb 2007 14:36:43 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: <54CFEDE8-1B36-4A40-8100-318034AEE2C0@fcdonders.ru.nl> Message-ID: Dear Christian, > Why do you remove these epochs? Do the signals saturate or is there > excessive electrode(-cap) or subject movement in these? > Yes, that's correct. I remove epochs before any further analysis, if I find saturated channels or excessive subject movements. > >> This means, my trials are a mixture of clearly contaminated as well >> as clearly uncontaminated trials. Because my main goal is to identify >> the eye and muscle artifacts, would it improve the detection of >> components reflecting artifacts if I do the ICA decomposition only on >> pre-identified artifactual trials? (My idea is that then the >> components reflecting artifacts would catch less 'true' brain >> activity. But perhaps I have a missconception here ...) > > The accuracy of the ICA decomposition relies fundamentally on the > accuracy of the mixing matrix estimate A from which you form the > de-mixing matrix (or vice versa). So if only some columns of A (e.g. > artifact source sensor projections) are accurately estimated while the > sensor projection estimates of brain activity are inaccurate > (individually or as a subspace), then the de-mixing the data using W = > inv(A) will not be fully successful in removing artifact activity from > components reflecting the brain activity (subspace). In order to > accurately estimate the sensor projections of ALL sources, the data > needs to comprise example activity from ALL sources, i.e. BOTH > artifact activity and brain activity. > Thanks for this clarification. > So since you need to estimate your brain activity (subspace) as > accurately as your artifact sources, you should use as much of the > data, i.e. contaminated and clean segments, as possible. > > How many EEG channels do you have, by the way? I need to know in order > to continue with the 'slightly longer answer' > I recorded my data from 60 Ag/Ag-Cl electrodes embedded in an elastic cap (with BrainAmp amplifiers) positioned according to the extended 10/20 system. Additionally, I record EOG with two electrodes placed at the outher canthi and one electrode placed below the left eye. All channels are referenced to the right mastoid during recording, while the left mastoid electrode is recorded as an additional active channel (off-line re-refrenced to the mean of both mastoids). Best regards, Markus > Regards, > Christian > > > >> >> Thank you very much for your help. >> >> Best regards, >> Markus >> >> Christian Hesse schrieb: >>> Hi Markus, >>> >>> the short answer is: if (and only if, big if by the way) ICA >>> correctly separates artifacts from brain activity, and you correctly >>> identify the artifact components, removal of the artifact components >>> from your data does not affect the time-frequency properties >>> (including phase) of the other components (i.e. the rest of the >>> data) if you project back to the sensor level. This is because ICA >>> assumes a linear (instantaneous) mixing of statistically independent >>> signals. >>> >>> I would just try it out for the time being - if you get funny >>> results (or things too good to be true), please get back in touch as >>> there is also a slightly longer answer. >>> >>> Hope this helps, >>> Christian >>> >>> >>> On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: >>> >>>> Dear all, >>>> >>>> in my studies, I'm investigating early preceptual binding (visual) >>>> across the lifespan (i.e., I have data form children, younger and older >>>> adults) with EEG measures. My main interest concerns changes in >>>> gamma-power and measures of phase-synchronization in the gamma >>>> frequency range(e.g., phase-locking index, n:m (theta:gamma) phase >>>> synchronization). >>>> >>>> Currently I use a 'semi-automatic' procedure for artifact >>>> rejection, i.e., I use thresholding in the time-domain (min/max in >>>> segment -/+ 100µV)to 'suggest' contaminated epochs. After that I >>>> visually inspect the data again for eye-blink and muscle activity, >>>> and completely reject the contaminated epochs. >>>> >>>> The problem with this procedure is that, especially in the older >>>> adults group, for many subjects only too few trials remain in the >>>> final sample. >>>> >>>> Therefore, I thought I could use ICA for artifact correction >>>> (instead of complete rejection). After identification of the >>>> components that reflect muscle activity (and also other artifacts), >>>> I thought to recombine the remaining ICs and perform my analyses >>>> (power, PLI, n:m synchronization) on the recombined (cleaned data). >>>> >>>> Now my question(s): Is there any experience whether removing >>>> certain ICs >>>> may change the phase spectrum, i.e. may this approach induce some >>>> systematic bias? If there is a systematic bias, are different frequency >>>> bands affected differentialy? Could anyone give me some references on >>>> these issues? >>>> >>>> Any comments are very much appreciated. >>>> >>>> Best regards, >>>> Markus >>>> >>>> -- >>>> ************************************************************** >>>> Markus Werkle-Bergner, Dipl. Psych. >>>> Predoctoral Research Fellow >>>> >>>> Center for Lifespan Psychology >>>> Max Planck Institute for Human Development >>>> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >>>> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >>>> ************************************************************** >>>> >>> >>> ---------------------------------------------------------------------- >>> Christian Hesse, PhD, MIEEE >>> >>> F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 >>> HB Nijmegen The Netherlands >>> >>> Tel.: +31 (0)24 36 68293 >>> Fax: +31 (0)24 36 10989 >>> >>> Email: c.hesse at fcdonders.ru.nl >>> Web: www.fcdonders.ru.nl >>> ---------------------------------------------------------------------- >>> >>> >>> >>> >> >> >> -- >> ************************************************************** >> Markus Werkle-Bergner, Dipl. Psych. >> Predoctoral Research Fellow >> >> Center for Lifespan Psychology >> Max Planck Institute for Human Development >> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >> ************************************************************** >> > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > -- ************************************************************** Markus Werkle-Bergner, Dipl. Psych. Predoctoral Research Fellow Center for Lifespan Psychology Max Planck Institute for Human Development Lentzeallee 94, Room 211, D-14195 Berlin, Germany. Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 ************************************************************** From muthuraman10 at HOTMAIL.COM Fri Feb 23 15:13:40 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Fri, 23 Feb 2007 14:13:40 +0000 Subject: Sourceplot! In-Reply-To: Message-ID: Hello, Thanks for the reply, i have plotted the headmodel plot for the 55 electrodes and attached it with this mail The next step of using the source analysis with calculated grid works without any problem, i needed to adjust elec structure according to the radius of the volume conduction model How can i plot the source, i do not have any anatomical MRI at this moment? Is there a way to see the results from the source analysis using DICS in the structure of a normal topoplot Thanking you With regards M.Muthuraman. >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] leadfieldmatrix! >Date: Thu, 22 Feb 2007 18:12:13 +0100 > >On 22 Feb 2007, at 17:21, Muthuraman Muthuraman wrote: > >>Warning: electrodes do not ly on sphere surface -> using projection >>>In fieldtrip-20070109\private\eeg_leadfield4 at 60 >> In fieldtrip-20070109\private\compute_leadfield at 435 >> In prepare_leadfield at 209 > >Electrodes of course should ly on the skin surface, that is the case in >the real world and it should also be the case in your model. Did you plot >the electrodes in combination with the sphere on which they should ly? You >can use headmodelplot for that. > >>%PLOTTING SOURCE >> >>cfg.location='interactive'; >>cfg.funparameter='source'; >>cfg.maskparameter='source'; >>sourceplot(cfg,source); > >Please update to the latest version of fieldtrip, the sourceplot function >has recently been improved. The documentation of sourceplot explains how >to use the funparameter and maskparameter. See also the tutorial >documentation. Your specification 'source' is certainly not going to work, >sice 'source' is not a source parameter. > >regards, >Robert _________________________________________________________________ Tried the new MSN Messenger? It�s cool! Download now. http://messenger.msn.com/Download/Default.aspx?mkt=en-in From s.debener at UKE.UNI-HAMBURG.DE Fri Feb 23 15:25:44 2007 From: s.debener at UKE.UNI-HAMBURG.DE (Stefan Debener) Date: Fri, 23 Feb 2007 14:25:44 +0000 Subject: ICA based artifact correction and phase-locking In-Reply-To: <45DEEDEB.3030103@mpib-berlin.mpg.de> Message-ID: Dear Markus, While Christian is certainly correct, I do have a more optimistic interpretation of ICA for artefact removal. In order to tell with some scientific "objectivity" whether any artefact removal improves your data or not, you should, in my opinion, always look at the amount of artefact removal AND the change in signal quality at the same time. For both artefact and signal you should have some a priori assumptions in mind what actually your signals and artefacts look like (you implicitely have this in mind by excluding some epochs and keeping others, or, more generally, for every single EEG signal processing step). If you keep this in mind, you will find that ICA sometimes, even though reducing the amount of artefact, also reduces the SNR. For a nice demo that this can happen, you may look up Debener et al., 2007, Neuroimage, 34, 587-97. However, in my experience, this happens only if you massively violate ICA assumptions. If you compare ICA artefact removal with any other artefact processing techniques (Gratton & Coles, epoch rejection, etc.) or uncorrected data, you will very likely find that ICA, if applied correctly, returns substantially better results. For an example where we could analyse ALL(!) recorded single trials from EEG data recorded inside a 3T MRI see: J Neurosci, 25, 11730-37. Marcel Bastiaansen from the FCD and others used the same ICA approach but with different tasks and components, and were similarly successful...In sum, from a practical standpoint, ICA can massivley improve your SNR and this in turn allows you to do things with your EEG data that otherwise seem impossible. You wrote that you observed channel saturation in your data. GIGO? ICA is not very good in the very high and very low frequency domain (personal opinion) and won't deal well with DC recorded data. In fact, a few drifting channels can easily spoil a decompositon....this and further issues are (hopefully) discussed in the EEGLAB tutorial, which also explains how to pre-process your data in order to obtain reasonable decompositions. Best, Stefan Markus Werkle-Bergner wrote: > Dear Christian, > > >> Why do you remove these epochs? Do the signals saturate or is there >> excessive electrode(-cap) or subject movement in these? >> > Yes, that's correct. I remove epochs before any further analysis, if I > find saturated channels or excessive subject movements. > >> >>> This means, my trials are a mixture of clearly contaminated as well >>> as clearly uncontaminated trials. Because my main goal is to >>> identify the eye and muscle artifacts, would it improve the >>> detection of components reflecting artifacts if I do the ICA >>> decomposition only on pre-identified artifactual trials? (My idea is >>> that then the components reflecting artifacts would catch less >>> 'true' brain activity. But perhaps I have a missconception here ...) >> >> The accuracy of the ICA decomposition relies fundamentally on the >> accuracy of the mixing matrix estimate A from which you form the >> de-mixing matrix (or vice versa). So if only some columns of A (e.g. >> artifact source sensor projections) are accurately estimated while >> the sensor projection estimates of brain activity are inaccurate >> (individually or as a subspace), then the de-mixing the data using W >> = inv(A) will not be fully successful in removing artifact activity >> from components reflecting the brain activity (subspace). In order to >> accurately estimate the sensor projections of ALL sources, the data >> needs to comprise example activity from ALL sources, i.e. BOTH >> artifact activity and brain activity. >> > > > Thanks for this clarification. > > >> So since you need to estimate your brain activity (subspace) as >> accurately as your artifact sources, you should use as much of the >> data, i.e. contaminated and clean segments, as possible. >> >> How many EEG channels do you have, by the way? I need to know in >> order to continue with the 'slightly longer answer' >> > > I recorded my data from 60 Ag/Ag-Cl electrodes embedded in an elastic > cap (with BrainAmp amplifiers) positioned according to the extended > 10/20 system. Additionally, I record EOG with two electrodes placed at > the outher canthi and one electrode placed below the left eye. All > channels are referenced to the right mastoid during recording, while > the left mastoid electrode is recorded as an additional active channel > (off-line re-refrenced to the mean of both mastoids). > > > Best regards, > Markus > > > > > >> Regards, >> Christian >> >> >> >>> >>> Thank you very much for your help. >>> >>> Best regards, >>> Markus >>> >>> Christian Hesse schrieb: >>>> Hi Markus, >>>> >>>> the short answer is: if (and only if, big if by the way) ICA >>>> correctly separates artifacts from brain activity, and you >>>> correctly identify the artifact components, removal of the artifact >>>> components from your data does not affect the time-frequency >>>> properties (including phase) of the other components (i.e. the rest >>>> of the data) if you project back to the sensor level. This is >>>> because ICA assumes a linear (instantaneous) mixing of >>>> statistically independent signals. >>>> >>>> I would just try it out for the time being - if you get funny >>>> results (or things too good to be true), please get back in touch >>>> as there is also a slightly longer answer. >>>> >>>> Hope this helps, >>>> Christian >>>> >>>> >>>> On 23 Feb 2007, at 12:24, Markus Werkle-Bergner wrote: >>>> >>>>> Dear all, >>>>> >>>>> in my studies, I'm investigating early preceptual binding (visual) >>>>> across the lifespan (i.e., I have data form children, younger and >>>>> older >>>>> adults) with EEG measures. My main interest concerns changes in >>>>> gamma-power and measures of phase-synchronization in the gamma >>>>> frequency range(e.g., phase-locking index, n:m (theta:gamma) phase >>>>> synchronization). >>>>> >>>>> Currently I use a 'semi-automatic' procedure for artifact >>>>> rejection, i.e., I use thresholding in the time-domain (min/max in >>>>> segment -/+ 100µV)to 'suggest' contaminated epochs. After that I >>>>> visually inspect the data again for eye-blink and muscle activity, >>>>> and completely reject the contaminated epochs. >>>>> >>>>> The problem with this procedure is that, especially in the older >>>>> adults group, for many subjects only too few trials remain in the >>>>> final sample. >>>>> >>>>> Therefore, I thought I could use ICA for artifact correction >>>>> (instead of complete rejection). After identification of the >>>>> components that reflect muscle activity (and also other >>>>> artifacts), I thought to recombine the remaining ICs and perform >>>>> my analyses (power, PLI, n:m synchronization) on the recombined >>>>> (cleaned data). >>>>> >>>>> Now my question(s): Is there any experience whether removing >>>>> certain ICs >>>>> may change the phase spectrum, i.e. may this approach induce some >>>>> systematic bias? If there is a systematic bias, are different >>>>> frequency >>>>> bands affected differentialy? Could anyone give me some references on >>>>> these issues? >>>>> >>>>> Any comments are very much appreciated. >>>>> >>>>> Best regards, >>>>> Markus >>>>> >>>>> -- >>>>> ************************************************************** >>>>> Markus Werkle-Bergner, Dipl. Psych. >>>>> Predoctoral Research Fellow >>>>> >>>>> Center for Lifespan Psychology >>>>> Max Planck Institute for Human Development >>>>> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >>>>> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >>>>> ************************************************************** >>>>> >>>> >>>> ---------------------------------------------------------------------- >>>> Christian Hesse, PhD, MIEEE >>>> >>>> F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 >>>> NL-6500 HB Nijmegen The Netherlands >>>> >>>> Tel.: +31 (0)24 36 68293 >>>> Fax: +31 (0)24 36 10989 >>>> >>>> Email: c.hesse at fcdonders.ru.nl >>>> Web: www.fcdonders.ru.nl >>>> ---------------------------------------------------------------------- >>>> >>>> >>>> >>>> >>> >>> >>> -- >>> ************************************************************** >>> Markus Werkle-Bergner, Dipl. Psych. >>> Predoctoral Research Fellow >>> >>> Center for Lifespan Psychology >>> Max Planck Institute for Human Development >>> Lentzeallee 94, Room 211, D-14195 Berlin, Germany. >>> Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 >>> ************************************************************** >>> >> >> ---------------------------------------------------------------------- >> Christian Hesse, PhD, MIEEE >> >> F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 >> HB Nijmegen The Netherlands >> >> Tel.: +31 (0)24 36 68293 >> Fax: +31 (0)24 36 10989 >> >> Email: c.hesse at fcdonders.ru.nl >> Web: www.fcdonders.ru.nl >> ---------------------------------------------------------------------- >> >> >> >> > > From c.hesse at FCDONDERS.RU.NL Fri Feb 23 15:41:03 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Fri, 23 Feb 2007 15:41:03 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: <45DEEDEB.3030103@mpib-berlin.mpg.de> Message-ID: Hi Markus, >> Why do you remove these epochs? Do the signals saturate or is >> there excessive electrode(-cap) or subject movement in these? >> > Yes, that's correct. I remove epochs before any further analysis, > if I find saturated channels or excessive subject movements. Seems reasonable to me, then. >> How many EEG channels do you have, by the way? I need to know in >> order to continue with the 'slightly longer answer' > > I recorded my data from 60 Ag/Ag-Cl electrodes embedded in an > elastic cap (with BrainAmp amplifiers) positioned according to the > extended 10/20 system. Additionally, I record EOG with two > electrodes placed at the outher canthi and one electrode placed > below the left eye. All channels are referenced to the right > mastoid during recording, while the left mastoid electrode is > recorded as an additional active channel (off-line re-refrenced to > the mean of both mastoids). Ok, thanks for this extra info. 60 channels is (I think) a good number in that you are less likely to be affected by the problem of over-fitting in ICA: this can sometimes happen when there are fewer source signals which are identifiable by the ICA algorithm (i.e., statistically independent signals with non-gaussian marginal distributions) than sensors. Note that fewer sources than sensors does not necessarily mean that your data is rank-deficient (you can easily check this by looking at the singular spectrum of your data matrix or, equivalently, at the spectrum of eigenvalues of the data covariance matrix - the former is gives the square root of the latter) because there is always some form of either "sensor" or "ambient" noise, which will have a gaussian distribution. The point is that when ICA has found all the obvious components (non-gaussian ones) it then tries to decompose the gaussian part of the signal into non-gaussian parts, and this will lead to so-called "over-fitting", which also affects the accuracy of the estimates of the "true" components. Different ICA algorithms behave differently in this case, some will give you spurious solutions, others will simply not converge to a solution (because there is none in the ICA sense, and throw an error of the code is smart enough to spot this). But you should not really have to worry too much about that; although do watch out for it: warnings and error messages about mixing or de- mixing matrix being (close to) singular is a good indication of over- fitting, and PCA-based dimension reduction of your data as part of the ICA is then recommended (though not a "magic" solution, either). When there are fewer channels than sources, you can have the opposite problem, namely under-fitting. In this situation, there are not enough components to describe all of the data, and the solution is then likely to be some sort of compromise, where "true" sources that are "weak" are spread over several ICs, none of which individually describes a source. In this case the accuracy of your mixing matrix estimate will also be "off", but the estimates of the stronger components are usually pretty robust in this case. What can also affect the accuracy of the mixing matrix estimate is the violation of the assumption of statistical independence of the sources, and this is pretty likely in the case of networks of neuronal populations displaying oscillatory activity with greater or lesser coherence because coherent signals (i.e. with a constant phase relationship other than 90 degrees) are generally not statistically independent. This need not be a disaster provided that the total activity of these coherent networks (i.e. in the signal subspace of coherent sources) is statistically independent of all the artifact stuff you wish to remove. Then you can go ahead with ICA and remove artifacts, but you will not necessarily be able to identify/interpret individual oscillatory components of brain activity. But since you do your analysis at the sensor level, this does not matter. Another problem related to ICA and sources of oscillatory activity is that the amplitude time course of this activity is generally modulated over time, which in turn can make these sources have marginal distributions which "look" essentially Gaussian, in which case the ICA algorithm may again be unable to correctly (or uniquely) identify the sensor projections associated with such source signals, EVEN if they are statistically independent, since ICA ONLY works exactly if the sources are statistically independent AND non-gaussian. So in summary, I guess my advice to you would be to always use EXTREME CAUTION when working with ICA :-), but to go ahead with what you're doing and just make sure you are able to robustly identity all of your artifacts, and don't spend too much time worrying about which components reflect brain activity, as this is likely to live in a subspace so individial topographies give a limited story. I really don't mean to sound negative, but these problems and limitations regularly occur in real life ICA-usage, and you need to know that it is not a "cure" for "bad" data (from an ICA point of view). Hope this helps, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 23 17:09:44 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 23 Feb 2007 11:09:44 -0500 Subject: Various ICA warnings and failures Message-ID: Hi, This mail has 3 questions related to implementing ICA is fieldtrip. 1) I am now getting the following warnings from runica I am getting these messages while doing ICA on a datafile which contains sss MaxFiltered data (Elekta Neuromag). When I visually inspect the independent components, they seem fairly identical to me. Their basic time structure seems to be same, just the scale is different. Prior to this, I had run ICA on the same datafile but with no MaxFiltering (or SSP projection for that matter). Final training data range: -0.00443438 to 0.00355995 Computing the sphering matrix... Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.156998e-29. > In runica at 774 In componentanalysis at 331 Starting weights are the identity matrix ... Sphering the data ... Beginning ICA training ... Data has rank 286. Cannot compute 307 components. Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.155705e-29. > In componentanalysis at 437 total time in componentanalysis 160.6 seconds 2) binica on this datafile just hangs, after one learning, it sends nan and just hangs. 3) Fast ICA is giving me following errors >> compRR_One_fastica_sss = componentanalysis(cfg,dataRR_One); Warning: cannot determine whether the FASTICA toolbox is present > In fieldtrip/private/hastoolbox at 121 In componentanalysis at 176 Warning: adding FASTICA toolbox to your Matlab path > In fieldtrip/private/hastoolbox at 145 In componentanalysis at 176 Warning: Name is nonexistent or not a directory: fastica. > In path at 113 In addpath at 100 In fieldtrip/private/hastoolbox at 146 In componentanalysis at 176 selecting 307 channels baseline correcting data concatenating data.............................. concatenated data matrix size 307x120030 starting decomposition using fastica Number of signals: 307 Number of samples: 120030 Calculating covariance... ??? Error using ==> componentanalysis call to fastica failed But when I do >> which fastica /mnt/condor2/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/FastICA_2.5/FastICA_25/fastica.m >> exist('fastica','file') (as seen in hastoolbox) ans = 2 thanks, sameer p.s: I am currently running varimax on the sssed data and binica on the non sssed to see what happens. From arno at SALK.EDU Fri Feb 23 18:02:34 2007 From: arno at SALK.EDU (arno) Date: Fri, 23 Feb 2007 18:02:34 +0100 Subject: Various ICA warnings and failures In-Reply-To: Message-ID: The rank problem might be related to this issue on 64-bit machines http://sccn.ucsd.edu/pipermail/eeglablist/2007/001675.html Best, Arno Sameer Walawalkar wrote: > Hi, > > This mail has 3 questions related to implementing ICA is fieldtrip. > > 1) > I am now getting the following warnings from runica > I am getting these messages while doing ICA on a datafile which contains > sss MaxFiltered data (Elekta Neuromag). When I visually inspect the > independent components, they seem fairly identical to me. Their basic > time > structure seems to be same, just the scale is different. > > Prior to this, I had run ICA on the same datafile but with no > MaxFiltering > (or SSP projection for that matter). > > Final training data range: -0.00443438 to 0.00355995 > Computing the sphering matrix... > Warning: Matrix is close to singular or badly scaled. > Results may be inaccurate. RCOND = 2.156998e-29. >> In runica at 774 > In componentanalysis at 331 > Starting weights are the identity matrix ... > Sphering the data ... > Beginning ICA training ... > Data has rank 286. Cannot compute 307 components. > Warning: Matrix is close to singular or badly scaled. > Results may be inaccurate. RCOND = 2.155705e-29. >> In componentanalysis at 437 > total time in componentanalysis 160.6 seconds > > 2) > binica on this datafile just hangs, after one learning, it sends nan > and just hangs. > > > > 3) > Fast ICA is giving me following errors >>> compRR_One_fastica_sss = componentanalysis(cfg,dataRR_One); > Warning: cannot determine whether the FASTICA toolbox is present >> In fieldtrip/private/hastoolbox at 121 > In componentanalysis at 176 > Warning: adding FASTICA toolbox to your Matlab path >> In fieldtrip/private/hastoolbox at 145 > In componentanalysis at 176 > Warning: Name is nonexistent or not a directory: fastica. >> In path at 113 > In addpath at 100 > In fieldtrip/private/hastoolbox at 146 > In componentanalysis at 176 > selecting 307 channels > baseline correcting data > concatenating data.............................. > concatenated data matrix size 307x120030 > starting decomposition using fastica > Number of signals: 307 > Number of samples: 120030 > Calculating covariance... > ??? Error using ==> componentanalysis > call to fastica failed > > But when I do >>> which fastica > /mnt/condor2/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/FastICA_2.5/FastICA_25/fastica.m > > >>> exist('fastica','file') (as seen in hastoolbox) > > ans = > > 2 > > > thanks, > sameer > > p.s: I am currently running varimax on the sssed data and binica on > the non sssed to see what happens. > From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Feb 23 18:09:29 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 23 Feb 2007 18:09:29 +0100 Subject: Sourceplot! In-Reply-To: Message-ID: Hello Muthuraman, >How can i plot the source, i do not have any anatomical MRI at this >moment? Is there a way to see the results from the source analysis >using DICS in the structure of a normal topoplot You can also plot your results without an MRI. Since your source data is a volume (3 space dimensions and one functional dimension) you can not plot it "in the structure a normal topoplot" (2 space dimensions, one functional dimension). You can plot slices from your volume. See the documentation on the new sourceplot function at the fieldtrip webpage. http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu torial:plotting More info can also be found in the help of sourceplot.m You cfg could for instance be: Cfg.method = 'slice'; Cfg.funparameter = 'pow'; (or what ever it is that you want to plot in color) Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Friday, February 23, 2007 3:14 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Sourceplot! Hello, Thanks for the reply, i have plotted the headmodel plot for the 55 electrodes and attached it with this mail The next step of using the source analysis with calculated grid works without any problem, i needed to adjust elec structure according to the radius of the volume conduction model How can i plot the source, i do not have any anatomical MRI at this moment? Is there a way to see the results from the source analysis using DICS in the structure of a normal topoplot Thanking you With regards M.Muthuraman. >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] leadfieldmatrix! >Date: Thu, 22 Feb 2007 18:12:13 +0100 > >On 22 Feb 2007, at 17:21, Muthuraman Muthuraman wrote: > >>Warning: electrodes do not ly on sphere surface -> using projection >>>In fieldtrip-20070109\private\eeg_leadfield4 at 60 >> In fieldtrip-20070109\private\compute_leadfield at 435 >> In prepare_leadfield at 209 > >Electrodes of course should ly on the skin surface, that is the case in >the real world and it should also be the case in your model. Did you plot >the electrodes in combination with the sphere on which they should ly? You >can use headmodelplot for that. > >>%PLOTTING SOURCE >> >>cfg.location='interactive'; >>cfg.funparameter='source'; >>cfg.maskparameter='source'; >>sourceplot(cfg,source); > >Please update to the latest version of fieldtrip, the sourceplot function >has recently been improved. The documentation of sourceplot explains how >to use the funparameter and maskparameter. See also the tutorial >documentation. Your specification 'source' is certainly not going to work, >sice 'source' is not a source parameter. > >regards, >Robert _________________________________________________________________ Tried the new MSN Messenger? It's cool! Download now. http://messenger.msn.com/Download/Default.aspx?mkt=en-in From alotof_xd at YAHOO.COM Fri Feb 23 20:29:27 2007 From: alotof_xd at YAHOO.COM (alotof eve) Date: Fri, 23 Feb 2007 11:29:27 -0800 Subject: A question on Baseline choosing In-Reply-To: <008001c7576d$611e3590$642dae83@fcdonders.nl> Message-ID: Hi, experts, Could I know for block design, which kind of baseline you choose for analysis? Use common baseline before a block of stimuli, or use separate baseline just before each stimulus? I suppose if the data is ideal, there is not difference between these two. However, there is different results for real data. And could you give me the theoric support for the baseline choosing? Thanks. Best, Eve --------------------------------- Have a burning question? Go to Yahoo! Answers and get answers from real people who know. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Fri Feb 23 20:36:31 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 23 Feb 2007 14:36:31 -0500 Subject: TFR: labels in data and labels in layout do not match Message-ID: Hi, I am listing the settings and command used to plot time frequency analysis results. The analysis was done by blindly copying the material on the online example script. cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.foi = 1:2:30; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = -0.5:0.05:1.5; cfg.pad = 'maxperlen'; TFRmult = freqanalysis(cfg,data); the analysis works well giving the TFRmult variable. But cfgTFR = output: 'pow' channel: 'MEG' method: 'mtmconvol' foi: [20 22 24 26 28 30] t_ftimwin: [0.2500 0.2273 0.2083 0.1923 0.1786 0.1667] tapsmofrq: [8 8.8000 9.6000 10.4000 11.2000 12] toi: [1x41 double] pad: 'maxperlen' multiplotTFR(cfgTFRout, TFRmult); multiplotTFR(cfgTFRout, TFRmult); reading layout from file NM306all.lay ??? Error using ==> multiplotTFR labels in data and labels in layout do not match The NM306all.lay file has worked for ICAs in the past (used as shown below). for i = 1 : 8 subplot(2,4,i); topoplot(cfg, lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,i)); % for all title(num2str(i)); end thanks, sameer From sameer at ANDREW.CMU.EDU Fri Feb 23 20:39:53 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 23 Feb 2007 14:39:53 -0500 Subject: Various ICA warnings and failures In-Reply-To: <45DF1E2A.50504@salk.edu> Message-ID: thanks, This fixed the rank problem. With the new pop_runica, runica worked very fast on the ICA but the ICAs don't seem to make sense at all. As I said in the earlier email, they all look the same except for overall scale issues. best, sameer On Fri, 23 Feb 2007, arno wrote: > The rank problem might be related to this issue on 64-bit machines > > http://sccn.ucsd.edu/pipermail/eeglablist/2007/001675.html > > Best, > > Arno > > Sameer Walawalkar wrote: >> Hi, >> >> This mail has 3 questions related to implementing ICA is fieldtrip. >> >> 1) >> I am now getting the following warnings from runica >> I am getting these messages while doing ICA on a datafile which contains >> sss MaxFiltered data (Elekta Neuromag). When I visually inspect the >> independent components, they seem fairly identical to me. Their basic time >> structure seems to be same, just the scale is different. >> >> Prior to this, I had run ICA on the same datafile but with no MaxFiltering >> (or SSP projection for that matter). >> >> Final training data range: -0.00443438 to 0.00355995 >> Computing the sphering matrix... >> Warning: Matrix is close to singular or badly scaled. >> Results may be inaccurate. RCOND = 2.156998e-29. >>> In runica at 774 >> In componentanalysis at 331 >> Starting weights are the identity matrix ... >> Sphering the data ... >> Beginning ICA training ... >> Data has rank 286. Cannot compute 307 components. >> Warning: Matrix is close to singular or badly scaled. >> Results may be inaccurate. RCOND = 2.155705e-29. >>> In componentanalysis at 437 >> total time in componentanalysis 160.6 seconds >> >> 2) >> binica on this datafile just hangs, after one learning, it sends nan and >> just hangs. >> >> >> >> 3) >> Fast ICA is giving me following errors >>>> compRR_One_fastica_sss = componentanalysis(cfg,dataRR_One); >> Warning: cannot determine whether the FASTICA toolbox is present >>> In fieldtrip/private/hastoolbox at 121 >> In componentanalysis at 176 >> Warning: adding FASTICA toolbox to your Matlab path >>> In fieldtrip/private/hastoolbox at 145 >> In componentanalysis at 176 >> Warning: Name is nonexistent or not a directory: fastica. >>> In path at 113 >> In addpath at 100 >> In fieldtrip/private/hastoolbox at 146 >> In componentanalysis at 176 >> selecting 307 channels >> baseline correcting data >> concatenating data.............................. >> concatenated data matrix size 307x120030 >> starting decomposition using fastica >> Number of signals: 307 >> Number of samples: 120030 >> Calculating covariance... >> ??? Error using ==> componentanalysis >> call to fastica failed >> >> But when I do >>>> which fastica >> /mnt/condor2/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/FastICA_2.5/FastICA_25/fastica.m >> >>>> exist('fastica','file') (as seen in hastoolbox) >> >> ans = >> >> 2 >> >> >> thanks, >> sameer >> >> p.s: I am currently running varimax on the sssed data and binica on the non >> sssed to see what happens. >> > > From sameer at ANDREW.CMU.EDU Fri Feb 23 21:01:10 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Fri, 23 Feb 2007 15:01:10 -0500 Subject: only two components! Message-ID: Hi, please add case 'FASTICA' status = exist('fastica','file'); to your hastoolbox file. but after I do that, I get only two components for 306 channel Neuromag data! It might be related to my crude adding shown above, but... cfg.method = 'fastica'; >> compRR_one_sss_fastica = componentanalysis(cfg,dataRR_One) selecting 307 channels baseline correcting data concatenating data.............................. concatenated data matrix size 307x120030 starting decomposition using fastica Number of signals: 307 Number of samples: 120030 Calculating covariance... Reducing dimension... Selected [ 2 ] dimensions. Smallest remaining (non-zero) eigenvalue [ 1.04859e+08 ] Largest remaining (non-zero) eigenvalue [ 2.68806e+09 ] Sum of removed eigenvalues [ 8.96883e-05 ] [ 100 ] % of (non-zero) eigenvalues retained. Whitening... Check: covariance differs from identity by [ 1.9984e-15 ]. Used approach [ defl ]. Used nonlinearity [ pow3 ]. Starting ICA calculation... IC 1 .....computed ( 5 steps ) IC 2 ..computed ( 2 steps ) Done. Adding the mean back to the data. total time in componentanalysis 46.9 seconds compRR_one_sss_fastica = fsample: 1000 time: {1x30 cell} trial: {1x30 cell} label: {307x1 cell} topolabel: {307x1 cell} topo: [307x2 double] cfg: [1x1 struct] best, sameer From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri Feb 23 21:24:43 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 23 Feb 2007 21:24:43 +0100 Subject: TFR: labels in data and labels in layout do not match In-Reply-To: Message-ID: Hi Sameer, What is TFRmult.label? If everything did what it should, that should be a cell array with the labels of the 306 channels. The names of those channels should match the names in the NM306all.lay (5th column). That it worked for the ica plotting is because there you called topoplot.m directly, and now you use topoplotTFR.m, in the last function the labels are checked. Hope this helps, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Sameer Walawalkar Sent: Friday, February 23, 2007 8:37 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] TFR: labels in data and labels in layout do not match Hi, I am listing the settings and command used to plot time frequency analysis results. The analysis was done by blindly copying the material on the online example script. cfg = []; cfg.output = 'pow'; cfg.channel = 'MEG'; cfg.method = 'mtmconvol'; cfg.foi = 1:2:30; cfg.t_ftimwin = 5./cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = -0.5:0.05:1.5; cfg.pad = 'maxperlen'; TFRmult = freqanalysis(cfg,data); the analysis works well giving the TFRmult variable. But cfgTFR = output: 'pow' channel: 'MEG' method: 'mtmconvol' foi: [20 22 24 26 28 30] t_ftimwin: [0.2500 0.2273 0.2083 0.1923 0.1786 0.1667] tapsmofrq: [8 8.8000 9.6000 10.4000 11.2000 12] toi: [1x41 double] pad: 'maxperlen' multiplotTFR(cfgTFRout, TFRmult); multiplotTFR(cfgTFRout, TFRmult); reading layout from file NM306all.lay ??? Error using ==> multiplotTFR labels in data and labels in layout do not match The NM306all.lay file has worked for ICAs in the past (used as shown below). for i = 1 : 8 subplot(2,4,i); topoplot(cfg, lay.prj(1:307,1), lay.prj(1:307,2), compRR_orig.topo(:,i)); % for all title(num2str(i)); end thanks, sameer From arno at SALK.EDU Sat Feb 24 12:12:28 2007 From: arno at SALK.EDU (arno) Date: Sat, 24 Feb 2007 12:12:28 +0100 Subject: No subject In-Reply-To: <7836F6CC-746D-48A3-A359-B9B64384815D@fcdonders.ru.nl> Message-ID: Yes, ica_linux is included by you have to setup the correct path in the file icadefs.m This is described on the web page when you download binica usually. Hope this helps, Arno Robert Oostenveld wrote: > Hi Sameer > > On 22 Feb 2007, at 16:38, Sameer Walawalkar wrote: >> Do I have to install fmrlab to be able to use binica? (Look below). >> this is all in interest of trying to do ICA as quick as possible. >> Runica or varimax seem to take 3 hrs (without pca reduction). > > .... > >> starting decomposition using binica >> binica: using source file >> '/home/sameer/KarmaCond/DataNeuroMagCondor2/MegSoftwareCondor2/EEGLab/eeglab5.03/eeglab5.03/functions/binica.sc' >> >> binica(): ica binary '/data/common/matlab/fmrlab/ica_linux' is not in >> your Matlab path, check > > it seems to me that in the EEGLAB binica.m wrapper-function the path > to the actual binica linux binary is incorrectly hardcoded. I expect > the ica_linux binary to be included in the EEGLAB release version, if > not then I suggest that you contact the EEGLAB developpers. > > Robert > > > > From abastos at BERKELEY.EDU Sun Feb 25 04:12:36 2007 From: abastos at BERKELEY.EDU (Andre Bastos) Date: Sat, 24 Feb 2007 19:12:36 -0800 Subject: displaying 4d power and coherence data In-Reply-To: <45E01D9C.1050202@salk.edu> Message-ID: Hello, I am trying to display 4d coherence and power data (num trials x num time points x num electrodes or elec pairs x freq). Do the plotting functions in fieldtrip handle this case or do I have to reduce the dimensionality by averaging across num trials? Thanks Andre From ingrid.nieuwenhuis at FCDONDERS.RU.NL Sun Feb 25 16:35:55 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Sun, 25 Feb 2007 16:35:55 +0100 Subject: displaying 4d power and coherence data In-Reply-To: <61826.69.181.124.179.1172373156.squirrel@calmail.berkeley.edu> Message-ID: Hi Andre, Yes, the plotting functions do not handle multiple trials, so you have to average over trials first before plotting. Bests Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Andre Bastos Sent: Sunday, February 25, 2007 4:13 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] displaying 4d power and coherence data Hello, I am trying to display 4d coherence and power data (num trials x num time points x num electrodes or elec pairs x freq). Do the plotting functions in fieldtrip handle this case or do I have to reduce the dimensionality by averaging across num trials? Thanks Andre From muthuraman10 at HOTMAIL.COM Mon Feb 26 11:11:38 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 26 Feb 2007 10:11:38 +0000 Subject: Sourceplot! In-Reply-To: <008001c7576d$611e3590$642dae83@fcdonders.nl> Message-ID: Hello Ingrid, Thanks for the answer, i tried to plot using the source plot with this configuration and i get the error, in this case should i need to transform the data before i plot cfg.method='slice'; cfg.funparameter='coh'; cfg.nslices = 20; cfg.slicedim = 3; sourceplot(cfg,fdmtmfft); ??? Reference to non-existent field 'dim'. Error in ==> fieldtrip-20070222\private\grid2transform at 9 if ~isfield(volume, 'xgrid'), volume.xgrid=1:volume.dim(1); end Error in ==> sourceplot at 189 data = grid2transform(data); Thanking you With regards M.Muthuraman. >From: Ingrid Nieuwenhuis >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Sourceplot! >Date: Fri, 23 Feb 2007 18:09:29 +0100 > >Hello Muthuraman, > > >How can i plot the source, i do not have any anatomical MRI at this > >moment? Is there a way to see the results from the source analysis > >using DICS in the structure of a normal topoplot > >You can also plot your results without an MRI. >Since your source data is a volume (3 space dimensions and one functional >dimension) you can not plot it "in the structure a normal topoplot" (2 >space >dimensions, one functional dimension). You can plot slices from your >volume. > >See the documentation on the new sourceplot function at the fieldtrip >webpage. > >http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:tu >torial:plotting > >More info can also be found in the help of sourceplot.m > >You cfg could for instance be: > >Cfg.method = 'slice'; >Cfg.funparameter = 'pow'; (or what ever it is that you want to plot in >color) > >Good luck, > >Ingrid > >-----Original Message----- >From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf >Of Muthuraman Muthuraman >Sent: Friday, February 23, 2007 3:14 PM >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] Sourceplot! > >Hello, > >Thanks for the reply, i have plotted the headmodel plot for the 55 >electrodes and attached it with this mail > >The next step of using the source analysis with calculated grid works >without any problem, >i needed to adjust elec structure according to the radius of the volume >conduction model > >How can i plot the source, i do not have any anatomical MRI at this moment? >Is there a way to see the results from the source analysis using DICS in >the > >structure of a normal topoplot > >Thanking you > >With regards >M.Muthuraman. > > > > >From: Robert Oostenveld > >Reply-To: FieldTrip discussion list > >To: FIELDTRIP at NIC.SURFNET.NL > >Subject: Re: [FIELDTRIP] leadfieldmatrix! > >Date: Thu, 22 Feb 2007 18:12:13 +0100 > > > >On 22 Feb 2007, at 17:21, Muthuraman Muthuraman wrote: > > > >>Warning: electrodes do not ly on sphere surface -> using projection > >>>In fieldtrip-20070109\private\eeg_leadfield4 at 60 > >> In fieldtrip-20070109\private\compute_leadfield at 435 > >> In prepare_leadfield at 209 > > > >Electrodes of course should ly on the skin surface, that is the case in > >the real world and it should also be the case in your model. Did you >plot > >the electrodes in combination with the sphere on which they should ly? >You > > >can use headmodelplot for that. > > > >>%PLOTTING SOURCE > >> > >>cfg.location='interactive'; > >>cfg.funparameter='source'; > >>cfg.maskparameter='source'; > >>sourceplot(cfg,source); > > > >Please update to the latest version of fieldtrip, the sourceplot >function > >has recently been improved. The documentation of sourceplot explains how > >to use the funparameter and maskparameter. See also the tutorial > >documentation. Your specification 'source' is certainly not going to >work, > > >sice 'source' is not a source parameter. > > > >regards, > >Robert > >_________________________________________________________________ >Tried the new MSN Messenger? It's cool! Download now. >http://messenger.msn.com/Download/Default.aspx?mkt=en-in _________________________________________________________________ "Airtel Song Catcher. Get your Hello Tunes instantly" http://www.airtel.in/songcatcher/SONG_CATCHER.html From werkle at MPIB-BERLIN.MPG.DE Mon Feb 26 11:49:18 2007 From: werkle at MPIB-BERLIN.MPG.DE (Markus Werkle-Bergner) Date: Mon, 26 Feb 2007 11:49:18 +0100 Subject: ICA based artifact correction and phase-locking In-Reply-To: Message-ID: Hi Christian, hi Stefan, I thank both of you for your helpful comments. I now know better about the possible problems, but I also see that it may be worth a try. I will keep you posted about the progress via the discussion list as soon as new problems arise ;-) Thank you and best regards, Markus Christian Hesse schrieb: > Hi Markus, > >>> Why do you remove these epochs? Do the signals saturate or is there >>> excessive electrode(-cap) or subject movement in these? >>> >> Yes, that's correct. I remove epochs before any further analysis, if >> I find saturated channels or excessive subject movements. > > Seems reasonable to me, then. > > >>> How many EEG channels do you have, by the way? I need to know in >>> order to continue with the 'slightly longer answer' >> >> I recorded my data from 60 Ag/Ag-Cl electrodes embedded in an elastic >> cap (with BrainAmp amplifiers) positioned according to the extended >> 10/20 system. Additionally, I record EOG with two electrodes placed >> at the outher canthi and one electrode placed below the left eye. All >> channels are referenced to the right mastoid during recording, while >> the left mastoid electrode is recorded as an additional active >> channel (off-line re-refrenced to the mean of both mastoids). > > Ok, thanks for this extra info. 60 channels is (I think) a good number > in that you are less likely to be affected by the problem of > over-fitting in ICA: this can sometimes happen when there are fewer > source signals which are identifiable by the ICA algorithm (i.e., > statistically independent signals with non-gaussian marginal > distributions) than sensors. Note that fewer sources than sensors does > not necessarily mean that your data is rank-deficient (you can easily > check this by looking at the singular spectrum of your data matrix or, > equivalently, at the spectrum of eigenvalues of the data covariance > matrix - the former is gives the square root of the latter) because > there is always some form of either "sensor" or "ambient" noise, which > will have a gaussian distribution. The point is that when ICA has > found all the obvious components (non-gaussian ones) it then tries to > decompose the gaussian part of the signal into non-gaussian parts, and > this will lead to so-called "over-fitting", which also affects the > accuracy of the estimates of the "true" components. Different ICA > algorithms behave differently in this case, some will give you > spurious solutions, others will simply not converge to a solution > (because there is none in the ICA sense, and throw an error of the > code is smart enough to spot this). But you should not really have to > worry too much about that; although do watch out for it: warnings and > error messages about mixing or de-mixing matrix being (close to) > singular is a good indication of over-fitting, and PCA-based dimension > reduction of your data as part of the ICA is then recommended (though > not a "magic" solution, either). > > When there are fewer channels than sources, you can have the opposite > problem, namely under-fitting. In this situation, there are not enough > components to describe all of the data, and the solution is then > likely to be some sort of compromise, where "true" sources that are > "weak" are spread over several ICs, none of which individually > describes a source. In this case the accuracy of your mixing matrix > estimate will also be "off", but the estimates of the stronger > components are usually pretty robust in this case. > > What can also affect the accuracy of the mixing matrix estimate is the > violation of the assumption of statistical independence of the > sources, and this is pretty likely in the case of networks of neuronal > populations displaying oscillatory activity with greater or lesser > coherence because coherent signals (i.e. with a constant phase > relationship other than 90 degrees) are generally not statistically > independent. This need not be a disaster provided that the total > activity of these coherent networks (i.e. in the signal subspace of > coherent sources) is statistically independent of all the artifact > stuff you wish to remove. Then you can go ahead with ICA and remove > artifacts, but you will not necessarily be able to identify/interpret > individual oscillatory components of brain activity. But since you do > your analysis at the sensor level, this does not matter. > > Another problem related to ICA and sources of oscillatory activity is > that the amplitude time course of this activity is generally modulated > over time, which in turn can make these sources have marginal > distributions which "look" essentially Gaussian, in which case the ICA > algorithm may again be unable to correctly (or uniquely) identify the > sensor projections associated with such source signals, EVEN if they > are statistically independent, since ICA ONLY works exactly if the > sources are statistically independent AND non-gaussian. > > So in summary, I guess my advice to you would be to always use EXTREME > CAUTION when working with ICA :-), but to go ahead with what you're > doing and just make sure you are able to robustly identity all of your > artifacts, and don't spend too much time worrying about which > components reflect brain activity, as this is likely to live in a > subspace so individial topographies give a limited story. I really > don't mean to sound negative, but these problems and limitations > regularly occur in real life ICA-usage, and you need to know that it > is not a "cure" for "bad" data (from an ICA point of view). > > Hope this helps, > Christian > > > ---------------------------------------------------------------------- > Christian Hesse, PhD, MIEEE > > F.C. Donders Centre for Cognitive Neuroimaging > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Tel.: +31 (0)24 36 68293 > Fax: +31 (0)24 36 10989 > > Email: c.hesse at fcdonders.ru.nl > Web: www.fcdonders.ru.nl > ---------------------------------------------------------------------- > > > > -- ************************************************************** Markus Werkle-Bergner, Dipl. Psych. Predoctoral Research Fellow Center for Lifespan Psychology Max Planck Institute for Human Development Lentzeallee 94, Room 211, D-14195 Berlin, Germany. Phone: +49(0)30-82406-447 Fax: +49(0)30-8249939 ************************************************************** From r.oostenveld at FCDONDERS.RU.NL Mon Feb 26 14:39:28 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 26 Feb 2007 14:39:28 +0100 Subject: TFR: labels in data and labels in layout do not match In-Reply-To: Message-ID: Hi Sameer On 23 Feb 2007, at 20:36, Sameer Walawalkar wrote: > cfgTFR = > output: 'pow' > channel: 'MEG' > ... > > multiplotTFR(cfgTFRout, TFRmult); > > multiplotTFR(cfgTFRout, TFRmult); > reading layout from file NM306all.lay > ??? Error using ==> multiplotTFR > labels in data and labels in layout do not match I suspect the problem might be related to channel selection (do "help channelselection"). The indication cfg.channel = 'MEG' results in a selection of known MEG channels, but that selection was implemented for the CTF system (where MEG channels start with the letter "M") and might not work for your Neuromag data. please try cfg1.channel = 'MEG' % or something else cfg2.channel = channelselection(cfg1.channel, data.label) and you will see which channels are selected for subsequent processing (in this case plotting, but the same applies to all other analyses). best regards, Robert PS note that you can do dbstop if error on the matlab command line and you will automatically jump to the line where the error happens, which facilitates debugging. From sghosh at HSS.IITD.AC.IN Mon Feb 26 15:17:14 2007 From: sghosh at HSS.IITD.AC.IN (Shantanu Ghosh) Date: Mon, 26 Feb 2007 15:17:14 +0100 Subject: how to create data structure Message-ID: Hi FT users, This is a stupid question but I will ask it anyway. I have started to understand a lot of the FT program logics, but I still have to get a bearing on the data structure of the input. My data is 116384 datapoints long sampled at 115.34 Hz. I can load my data data structure not in FT list)from single subject in a single recording session( in matlab workspace and implement the following code as suggested: data = []; > data.fsample = 115.34 > data.label = {'Fz';'Fp1'; ... 'Oz'}; > data.trial = cell(Ntrial,1); > for i=1:Ntrial > data.trial{i} = 24 x 40 > end However, at the prompt it says: Data structure not compatible. Error in matrix location or matrix dimension. My question is, how do you create the Nchan (=24) X NTrialSamp (= 40 trials) matrix from continuous data? Thanks, Shantanu From c.hesse at FCDONDERS.RU.NL Mon Feb 26 18:47:58 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Mon, 26 Feb 2007 18:47:58 +0100 Subject: how to create data structure In-Reply-To: Message-ID: Hi Shantanu > My data is 116384 datapoints long sampled at 115.34 Hz. > I can load my data data structure not in FT list)from single > subject in a > single recording session( in matlab workspace and implement the > following > code as suggested: > > data = []; >> data.fsample = 115.34 >> data.label = {'Fz';'Fp1'; ... 'Oz'}; >> data.trial = cell(Ntrial,1); >> for i=1:Ntrial >> data.trial{i} = 24 x 40 >> end > > However, at the prompt it says: > > Data structure not compatible. Error in matrix location or matrix > dimension. comment 1: the data structure also needs a (local) time axis for each trial: data.time = cell(Ntrial,1) for i=1:Ntrial data.time{i} = [trial_start:dt:trial_stop]; % trial_start could be -1.5 seconds % trial_stop could be 3.0 seconds % dt = 1./data.fsample; end > My question is, how do you create the Nchan (=24) X NTrialSamp (= > 40 trials) > matrix from continuous data? comment 2: NTrialSamp is NOT the number of trials (NTrial = 40) but instead refers to the "Number_of_time_samples_per_trial" which is determined by the duration of the trial in seconds (TrialDuration) and your sampling frequency FSample: NTrialSamp = TrialDuration*FSample; % this can in principle be different for each trial % so you have data.trial = cell(Ntrial,1) for i=1:Ntrial data.trial{i} = X; % where X is a Nchan x NTrialSamp matrix containing the data from each trial end comment 3: Your question essentially is: How do youI get X from what you have read into Matlab? To answer this, you need to tell me what sort of variable your data are stored in once they have been read into Matlab. You can load your data in and then type "whos" at the command prompts and email me what is displayed on the screen after you press Kind Regards, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From marie at PSY.GLA.AC.UK Mon Feb 26 18:49:23 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Mon, 26 Feb 2007 17:49:23 +0000 Subject: Beamforming across trials not time In-Reply-To: Message-ID: Dear FIELDTRIP, In order to achieve a better temporal resolution with a beamformer analysis it has been suggested to use single trial data in place of single time point data. Eg. In an experiment with 1000trials, 400time points - rather than compute the covariance across the 400 time points (averaged over trials), compute it over 1000 points (for a very short fixed time interval e.g. 10ms). I have tried to implement this and would like some advice on whether or not the steps i have taken make sense in terms of fieldtrip functions and in general. Any advice would be welcome. Thanks, Marie Effectively what I am doing is: Step 1) Choose a time point of interest Step 2) Smooth the single trial data with a 30point moving average to increase SNR Step 3) Generate a fake "single trial" which is the concatenation of each of these points across all trials e.g. the matrix has dims (nchans, (ntrials*ntimes)); Step 4) Perform time-lock analysis on this "single trial" to compute the covariance - avg1 Step 5) Perform time-lock analysis on the actual data over the same short time range with keeptrials = 'yes' -avg2 Step 6) Perform lcmv sourceanalysis on avg1 (output of step 4) Step 7) Apply this filter to avg2 (output of step 5 and sourceanalysis) to estimate the single trial time courses at each grid location, across the short time interval. From sghosh at HSS.IITD.AC.IN Tue Feb 27 05:59:57 2007 From: sghosh at HSS.IITD.AC.IN (Shantanu Ghosh) Date: Tue, 27 Feb 2007 05:59:57 +0100 Subject: Read data structure-contd Message-ID: Hello Christian, Sorry to use this mail id, but the Listserv server was temporarily unavailable from my IP address. > Hi Shantanu > >> My data is 116384 datapoints long sampled at 115.34 Hz. >> I can load my data data structure not in FT list)from single >> subject in a >> single recording session( in matlab workspace and implement the >> following >> code as suggested: >> >> data = []; >>> data.fsample = 115.34 >>> data.label = {'Fz';'Fp1'; ... 'Oz'}; >>> data.trial = cell(Ntrial,1); >>> for i=1:Ntrial >>> data.trial{i} = 24 x 40 >>> end >> >> However, at the prompt it says: >> >> Data structure not compatible. Error in matrix location or matrix >> dimension. > > comment 1: > the data structure also needs a (local) time axis for each trial: > > data.time = cell(Ntrial,1) > for i=1:Ntrial > data.time{i} = [trial_start:dt:trial_stop]; > % trial_start could be -1.5 seconds > % trial_stop could be 3.0 seconds > % dt = 1./data.fsample; > end > > >> My question is, how do you create the Nchan (=24) X NTrialSamp (= >> 40 trials) >> matrix from continuous data? > > comment 2: > NTrialSamp is NOT the number of trials (NTrial = 40) but instead > refers to the "Number_of_time_samples_per_trial" which is determined > by the duration of the trial in seconds (TrialDuration) and your > sampling frequency FSample: > > NTrialSamp = TrialDuration*FSample; > % this can in principle be different for each trial > > % so you have > data.trial = cell(Ntrial,1) > for i=1:Ntrial > data.trial{i} = X; > % where X is a Nchan x NTrialSamp matrix containing the data from > each trial > end > > > comment 3: > Your question essentially is: How do youI get X from what you have > read into Matlab? > > > To answer this, you need to tell me what sort of variable your data > are stored in once they have been read into Matlab. You can load your > data in and then type "whos" at the command prompts and email me what > is displayed on the screen after you press > Reply to comment 3: This is what is displayed at 'whos' command after the data is loaded: >> y=dlmread('C:\\priyanka\\exp1\\SegmentedEEGData\\S1\\audi\\A1 \\1_E_1.txt'); >> whos Name Size Bytes Class y 347x1 2776 double array Grand total is 347 elements using 2776 bytes >> Additional comments: The file is a 3 sec EEG voltage record from our experiment on episodic memory encoding and recall in auditory mode ('Process'), for subject 'S1' for electrode 'A1'. '1_E_1' refers to 'BlockNum_Process_TrialNumber'. The experiment has the following design: After displaying a blank screen for 1 min, a 4 sec red spot in the centre of the screen alerts the subject that a CVC syllable is presented (trial). There are 6 trials, each of 3 sec duration, followed by another green spot in screen centre for 4 s to alert the subject that recall is to be effected, followed by 6 trials of CVC sequences each of 3 sec, but only half of them from the earlier encoding block. this [encoding-recall] sequence is repeated for 20 times. All CVC sequences in encoding and recall were randomised. EEG was acquired continuously. The continuous EEG was then segmented stored in separate .txt files using a Matlab routine (see attached file: 'mySegmentData.m'). One of these files is then loaded using 'dlmread'. I also have the continuous EEG as .txt files for each electrode, as separate files in a folder [say, called subject 'S1','S2',... ] (if you require that data to get X) Best and thanks, Shantanu -------------- next part -------------- % This codes segments the data of each subject for a specific mode % (Auditory or Visual) and a specific channel depending on the stimulus, % block and the process. % % Format of the Data File provided: Subject_Mode_eeg_Channel % Subject = S1, S2, S3, S4, S5, S6, S7, S8, S9, S10 % Mode = audi (for Auditory), visu (for Visual) % Channel = F3, F4, F7, F8, T3, T4, T5, T6, P3, P4, Pz, O1, O2, Oz, % FP1, FP2, Fz, C3, C4, Cz, A1, A2, EKG % % Format of the Data File Outputted: Block_Process_Stimulus % Block = 1, 2,..., 10 % Process = E (for Encoding), R (for Retrieval) % Stimulus = 1, 2, 3, 4, 5, 6 clc; close all; clear all; SamplingTime = 0.00867; % in secs InitialTime = 60; % in secs GapTime = 4; % in secs nBlocks = 10; % Number of Blocks BlockTime = 18; % in secs Process = {'E'; 'R'}; % Processes (E - Encoding; R - Retrieval) nStimuli = 6; % Number of Stimuli StimulusTime = 3; % in secs % Subjects_Modes = {'Subject','Mode'} % Subjects = S1, S2, S3, S4, S5, S6, S7, S8, S9, S10 % Modes = audi (for Auditory), visu (for Visual), both (for Both) % Subjects_Modes = {'S1','both'; 'S2','both'; 'S3','both'; 'S4','both';... % 'S5','both'; 'S6','both'; 'S7','both'; 'S8','both'; 'S9','both'; 'S10','both'}; Subjects_Modes = {'S1','both'; 'S2','both'; 'S3','both'; 'S4','both';... 'S5','both'; 'S6','both'; 'S7','visu'; 'S8','both'; 'S9','both';... 'S10','both'}; % Channels = {'F3'; 'F4'; 'F7'; 'F8'; 'T3'; 'T4'; 'T5'; 'T6';... % 'P3'; 'P4'; 'Pz'; 'O1'; 'O2'; 'Oz';... % 'FP1'; 'FP2'; 'Fz'; 'C3'; 'C4'; 'Cz'; 'A1'; 'A2'; 'EKG'}; Channels = {'F3'; 'F4'; 'F7'; 'F8'; 'T3'; 'T4'; 'T5'; 'T6';... 'P3'; 'P4'; 'Pz'; 'O1'; 'O2'; 'Oz';... 'FP1'; 'FP2'; 'Fz'; 'C3'; 'C4'; 'Cz'; 'A1'; 'A2'; 'EKG'}; for i = 1:size(Subjects_Modes,1) % Runs over all the Subjects Subject = Subjects_Modes{i,1}; if Subjects_Modes{i,2} == 'both' Mode = {'audi'; 'visu'}; else Mode = {Subjects_Modes{i,2}}; end for j = 1:length(Mode) % Runs over all the Modes for k = 1:length(Channels) % Runs over all the Channels filename = ['eegdata','\',Subject,'\',Subject,'_',Mode{j},'_eeg_',Channels{k},'.eeg']; fid = fopen(filename); % Open a file if fid == -1 break end entiredata = fscanf(fid,'%f'); % Read data from the file fclose(fid); directoryname = ['SegmentedEEGData','\',Subject,'\',Mode{j},'\',Channels{k}]; mkdir(directoryname); % Create a directory entiredata = entiredata(round(InitialTime/SamplingTime):end); % Eliminate the first 1 min of the data flag = -1; % Flag for determining the process (E or R) for a = 1:2*nBlocks % Runs over all the blocks (both E and R) flag = -1*flag; % Toggle the flag if flag == 1 c = 1; % E Process else c = 2; % R Process end for b = 1:nStimuli % Runs over all the Stimuli l = round((a*GapTime + (a-1)*BlockTime + (b-1)*StimulusTime)/SamplingTime); h = round((a*GapTime + (a-1)*BlockTime + b*StimulusTime)/SamplingTime); data = entiredata(l:h); filename = [directoryname,'\',num2str(a),'_',Process{c},'_',num2str(b),'.txt']; fid = fopen(filename,'w'); % Open a file if fid == -1 break end fprintf(fid,'%f\n',data); % Write data to a file fclose(fid); end end end end end display('Files successfully segmented!') From r.oostenveld at FCDONDERS.RU.NL Tue Feb 27 10:40:11 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 27 Feb 2007 10:40:11 +0100 Subject: Beamforming across trials not time In-Reply-To: Message-ID: Dear Marie, On 26 Feb 2007, at 18:49, Marie Smith wrote: > In order to achieve a better temporal resolution with a beamformer > analysis it has been suggested to use single trial data in place of > single time point data. Eg. In an experiment with 1000trials, > 400time points - rather than compute the covariance across the 400 > time points (averaged over trials), compute it over 1000 points > (for a very short fixed time interval e.g. 10ms). I have tried to > implement this and would like some advice on whether or not the > steps i have taken make sense in terms of fieldtrip functions and > in general. Any advice would be welcome. I suspect that what you have implemented is largely supported by the existing code (see below). Regardless of that, it would be interestnig if you would share your experiences on this with us. > Effectively what I am doing is: > > Step 1) Choose a time point of interest > Step 2) Smooth the single trial data with a 30point moving average > to increase SNR > Step 3) Generate a fake "single trial" which is the concatenation > of each of these points across all trials e.g. the matrix has dims > (nchans, (ntrials*ntimes)); > Step 4) Perform time-lock analysis on this "single trial" to > compute the covariance - avg1 > Step 5) Perform time-lock analysis on the actual data over the same > short time range with keeptrials = 'yes' -avg2 > Step 6) Perform lcmv sourceanalysis on avg1 (output of step 4) > Step 7) Apply this filter to avg2 (output of step 5 and > sourceanalysis) to estimate the single trial time courses at each > grid location, across the short time interval. The timelockanalysis function computes covariances (and also averages, but the averaging is more or less independent from the covariance computation. Timelockanalysis does the following: a- it filters the data in each trial (optional, see private/preproc), one of the options is also to apply a boxcar smoothing kernel b- it selects the timewindow for averaging the ERF and computing the single sample variance over trials c- it selects the timewindow for covariance computation d- for each trial, it selects the avg-timewindow and sums the data e- for each trial, it selects the cov-timewindow and computes the covariance within that timewindow f- in case of keeptrials=yes, the single trial covariance (and the data trials) are returned g- in case of keeptrials=no, the covariance matrices are averaged over trials When beaming the data in sourceanalysis, the single trial covariance matrices are averaged over trials. This is a bit messy in the documentation but also in the code (e.g. the sourceanalysis options keepfilters, rawtrial and singletrial interact with each other) Regarding your 2 -> that can be done with step "a". The smoothing can be done with a boxcar, and the selection of samples of interest is done in our step "e". Regarding your 3 and 4 -> averaging covariance matrixes (step "g" or alternatively in sourceanalysis) is the same as your steps: consider for i=1:40 a{i} = randn(151,1000); end for i=1:10 ca{i} = cov(a{i}); end % concatenate trials b = cat(2, a{:}); cb = cov(b); in this case the average over ca is the same as cb. However, I now realise what the main difference appears to be between your approach and the obvious use of the existing code: it relates to baseline correction. Covariance in general is computed like this a = randn(151, 1000); for i=1:151 a(i,:) = a(i,:) - mean(a(i,:)); % ensure zero mean end c = a * a'; % compute covariance c = c ./ 1000; % divide by number of samples That means that in the current implementation, the data within each trial is baseline subtracted (over the whole timewindow) prior to computing the covariance within that trial. It is possible to specify in timelockanalysis removemean=no, but that does not achieve exactly the same as your implementation, since your implementation removes the mean OVER trials and then computes the covariance by multiplying the matrix with its transpose. So part of your method should already be possible with the existing code (although admittedly not well documented). But your different approach in baseline correcting is not possible with existing code. Please have a look at the timelockanalysis code together with the suggestions above and let me know whether you concur. Of course we could extend timelockanalysis with your approach. best regards, Robert From jgross at UNI-DUESSELDORF.DE Tue Feb 27 11:35:00 2007 From: jgross at UNI-DUESSELDORF.DE (Joachim Gross) Date: Tue, 27 Feb 2007 10:35:00 +0000 Subject: Postdoctoral Research Assistant position in Glasgow Message-ID: Postdoctoral Research Assistant Centre for Cognitive Neuroimaging (CCNi) Department of Psychology £25,889 - £31,840 per annum REF: 13078/DPO/A3 A strategic priority of the University is the current creation within the Department of Psychology of a Centre for Cognitive Neuroimaging (CCNi), a major initiative to install an in-house platform of complementary, state-of-the-art brain imaging facilities dedicated to Cognitive Neuroscience research. Equipment will include a 3T fMRI scanner, a MEG system, a TMS system, and several EEG systems – including fMRI compatible systems. Applications are invited for a Postdoctoral Research Assistant to work with Professor Joachim Gross in the Magnetoencephalography (MEG) group in the newly established CCNi. The overall mission of the group is the non-invasive investigation of large-scale oscillatory neural interactions and their role in information processing by using advanced signal processing techniques. You will have the opportunity to: contribute to the design of MEG experiments; collect the data with a state of the art MEG system; develop, validate and apply cutting edge techniques to analyse brain signals in the time and frequency domain; solve the inverse problem in order to identify processing networks. You will be expected to contribute to the overall mission of the group, to ongoing MEG projects, and provide expertise and support for the research at CCNi. You will be qualified, with a PhD, or equivalent, in Psychology, Neuroscience, Medicine, Neuroinformatics, Physics or a related discipline. Advanced programming skills (preferably with MATLAB) are essential. Experience with MEG/EEG data acquisition and analysis is highly desirable. You should be familiar with principles of signal processing (also in the frequency domain), statistical methods and possibly the MEG inverse problem. Finally you should have a strong interest in developing your own scientific programme and pursuing a research career. This post is available from 1 May 2007 and funding is available for 24 months initially. Informal enquiries may be made to Professor J Gross, (+44 (0)141 330 3947; j.gross at psy.gla.ac.uk. For further details about the post and how to apply: see our web site at http://www.psy.gla.ac.uk/jobs.php or contact Clare Alexander, Department of Psychology, University of Glasgow, G12 8QQ (+44 (0)141 330 5090, e-mail c.alexander at psy.gla.ac.uk or the University web site at http://www.gla.ac.uk Closing date: 30 March 2007. From jgross at UNI-DUESSELDORF.DE Tue Feb 27 11:37:26 2007 From: jgross at UNI-DUESSELDORF.DE (Joachim Gross) Date: Tue, 27 Feb 2007 11:37:26 +0100 Subject: Postdoctoral Research Assistant position in Glasgow Message-ID: Postdoctoral Research Assistant Centre for Cognitive Neuroimaging (CCNi) Department of Psychology �25,889 - �31,840 per annum REF: 13078/DPO/A3 A strategic priority of the University of Glasgow is the current creation within the Department of Psychology of a Centre for Cognitive Neuroimaging (CCNi), a major initiative to install an in-house platform of complementary, state-of-the-art brain imaging facilities dedicated to Cognitive Neuroscience research. Equipment will include a 3T fMRI scanner, a MEG system, a TMS system, and several EEG systems – including fMRI compatible systems. Applications are invited for a Postdoctoral Research Assistant to work with Professor Joachim Gross in the Magnetoencephalography (MEG) group in the newly established CCNi. The overall mission of the group is the non-invasive investigation of large-scale oscillatory neural interactions and their role in information processing by using advanced signal processing techniques. You will have the opportunity to: contribute to the design of MEG experiments; collect the data with a state of the art MEG system; develop, validate and apply cutting edge techniques to analyse brain signals in the time and frequency domain; solve the inverse problem in order to identify processing networks. You will be expected to contribute to the overall mission of the group, to ongoing MEG projects, and provide expertise and support for the research at CCNi. You will be qualified, with a PhD, or equivalent, in Psychology, Neuroscience, Medicine, Neuroinformatics, Physics or a related discipline. Advanced programming skills (preferably with MATLAB) are essential. Experience with MEG/EEG data acquisition and analysis is highly desirable. You should be familiar with principles of signal processing (also in the frequency domain), statistical methods and possibly the MEG inverse problem. Finally you should have a strong interest in developing your own scientific programme and pursuing a research career. This post is available from 1 May 2007 and funding is available for 24 months initially. Informal enquiries may be made to Professor J Gross, (+44 (0)141 330 3947; j.gross at psy.gla.ac.uk. For further details about the post and how to apply: see our web site at http://www.psy.gla.ac.uk/jobs.php or contact Clare Alexander, Department of Psychology, University of Glasgow, G12 8QQ (+44 (0)141 330 5090, e-mail c.alexander at psy.gla.ac.uk or the University web site at http://www.gla.ac.uk Closing date: 30 March 2007. From muthuraman10 at HOTMAIL.COM Tue Feb 27 12:19:31 2007 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Tue, 27 Feb 2007 11:19:31 +0000 Subject: Plotting using Slice! Message-ID: Hello Fieldtrippers, I am not sure whether this mail has reached the group ! I am sending it again ! Thanks for the answer, i tried to plot using the source plot with this configuration and i get the error, in this case should i need to transform the data before plotting using slice any comments on this cfg.method='slice'; cfg.funparameter='coh'; cfg.nslices = 20; cfg.slicedim = 3; sourceplot(cfg,freqmtmfft); ??? Reference to non-existent field 'dim'. Error in ==> fieldtrip-20070222\private\grid2transform at 9 if ~isfield(volume, 'xgrid'), volume.xgrid=1:volume.dim(1); end Error in ==> sourceplot at 189 data = grid2transform(data); Thanking you With regards M.Muthuraman. _________________________________________________________________ News and updates from Indian diaspora http://content.msn.co.in/NRI/Default From ingrid.nieuwenhuis at FCDONDERS.RU.NL Tue Feb 27 12:34:44 2007 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 27 Feb 2007 12:34:44 +0100 Subject: Plotting using Slice! In-Reply-To: Message-ID: Hi Muthuraman, What are you trying to plot? Could you send which fields are in your freqmtmfft? Bests Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Muthuraman Muthuraman Sent: Tuesday, February 27, 2007 12:20 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Plotting using Slice! Hello Fieldtrippers, I am not sure whether this mail has reached the group ! I am sending it again ! Thanks for the answer, i tried to plot using the source plot with this configuration and i get the error, in this case should i need to transform the data before plotting using slice any comments on this cfg.method='slice'; cfg.funparameter='coh'; cfg.nslices = 20; cfg.slicedim = 3; sourceplot(cfg,freqmtmfft); ??? Reference to non-existent field 'dim'. Error in ==> fieldtrip-20070222\private\grid2transform at 9 if ~isfield(volume, 'xgrid'), volume.xgrid=1:volume.dim(1); end Error in ==> sourceplot at 189 data = grid2transform(data); Thanking you With regards M.Muthuraman. _________________________________________________________________ News and updates from Indian diaspora http://content.msn.co.in/NRI/Default From marie at PSY.GLA.AC.UK Tue Feb 27 17:07:51 2007 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 27 Feb 2007 16:07:51 +0000 Subject: Beamforming across trials not time In-Reply-To: <4A61AF16-04FE-4B68-AD39-763623D34A9B@fcdonders.ru.nl> Message-ID: Hi Robert, > The timelockanalysis function computes covariances (and also > averages, but the averaging is more or less independent from the > covariance computation. Timelockanalysis does the following: > > a- it filters the data in each trial (optional, see private/ > preproc), one of the options is also to apply a boxcar smoothing > kernel > b- it selects the timewindow for averaging the ERF and computing > the single sample variance over trials > c- it selects the timewindow for covariance computation > d- for each trial, it selects the avg-timewindow and sums the data > e- for each trial, it selects the cov-timewindow and computes the > covariance within that timewindow > f- in case of keeptrials=yes, the single trial covariance (and the > data trials) are returned > g- in case of keeptrials=no, the covariance matrices are averaged > over trials > When beaming the data in sourceanalysis, the single trial > covariance matrices are averaged over trials. This is a bit messy > in the documentation but also in the code (e.g. the sourceanalysis > options keepfilters, rawtrial and singletrial interact with each > other) Just to be clear, the covariance is always computed for single trials and then either averaged across trials (keeptrials = 'no') or kept separate (keeptrials = 'yes') to be averaged in the beamforming step? At no time is the data averaged and then the covariance computed on this one average trial? > Regarding your 2 -> that can be done with step "a". The smoothing > can be done with a boxcar, and the selection of samples of interest > is done in our step "e". I'm not sure that this is the same thing. I am smoothing the data across trials at each time point, where i think time lock analysis is smoothing the data in each trial across time points. > However, I now realise what the main difference appears to be > between your approach and the obvious use of the existing code: it > relates to baseline correction. Covariance in general is computed > like this > a = randn(151, 1000); > for i=1:151 > a(i,:) = a(i,:) - mean(a(i,:)); % ensure zero mean > end > c = a * a'; % compute covariance > c = c ./ 1000; % divide by number of samples > That means that in the current implementation, the data within each > trial is baseline subtracted (over the whole timewindow) prior to > computing the covariance within that trial. So, if I were to look at only one time point across trials, implementing things in fieldtrip would always result in a zero value (as the mean == the data value here)? > It is possible to specify in timelockanalysis removemean=no, but > that does not achieve exactly the same as your implementation, > since your implementation removes the mean OVER trials and then > computes the covariance by multiplying the matrix with its transpose. Yes, I agree that this is what I am doing - and i think is the "more correct" thing to do here. > So part of your method should already be possible with the existing > code (although admittedly not well documented). But your different > approach in baseline correcting is not possible with existing code. > Please have a look at the timelockanalysis code together with the > suggestions above and let me know whether you concur. Of course we > could extend timelockanalysis with your approach. Yes I concur with your comments (though please see the points above). From sameer at ANDREW.CMU.EDU Tue Feb 27 18:22:23 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Tue, 27 Feb 2007 12:22:23 -0500 Subject: topoplot after pca reduction Message-ID: Hello, Is it possible to plot the topological plot of independent components derived after pca reduction (using binica)? How would one go about doing this? thanks, sameer From r.oostenveld at FCDONDERS.RU.NL Tue Feb 27 20:52:41 2007 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 27 Feb 2007 20:52:41 +0100 Subject: Beamforming across trials not time In-Reply-To: <4773D6EC-5FDB-4B95-B7BD-F594BB8D4E18@psy.gla.ac.uk> Message-ID: Hi Marie On 27 Feb 2007, at 17:07, Marie Smith wrote: > Just to be clear, the covariance is always computed for single > trials and then either averaged across trials (keeptrials = 'no') > or kept separate (keeptrials = 'yes') to be averaged in the > beamforming step? correct. The averaging in the beamforming step is optional, you can also beam single-trial (rawtrials=yes in sourceanalysis). Or you can beam the single trial ERF timecourses using a filter constructed from the average covariance (requires a first run of sourceanalysis with rawtrials=no and keepfilters=yes, and a second run with cfg.grid=previous_source and rawtrials=yes). > At no time is the data averaged and then the covariance computed on > this one average trial? correct. There is no averaging of the ERFs over trials prior to computing the covariance. It is possible to "average" over time within a single trial by boxcar smoothing. >> Regarding your 2 -> that can be done with step "a". The smoothing >> can be done with a boxcar, and the selection of samples of >> interest is done in our step "e". > > I'm not sure that this is the same thing. I am smoothing the data > across trials at each time point, where i think time lock analysis > is smoothing the data in each trial across time points. Oh, I thought you smoothed over time. Then indeed it is quite different. Averaging (smoothing) over a subset of M trials prior to computing the covariance in the most extreme case (M=Ntrials) corresponds to taking the covariance of the ERF, right? And in the other most extreme case (M=1) it resembles to the approach implemented in timelockanalysis. Am I correct? In the M=Ntrials case, the covariance matrix probably would be rather rank deficient (if the time window is short), and the data covariance would include little or no noise structure (data covariance = signal covariance + noise covariance). But the same applies to induced activity, i.e. that would also not be present in your covariance, so it stresses the effect of the evoked at the expense of the induced activity. I can't tell whether that is good or bad, that depends on your data and research question. >> That means that in the current implementation, the data within >> each trial is baseline subtracted (over the whole timewindow) >> prior to computing the covariance within that trial. > > So, if I were to look at only one time point across trials, > implementing things in fieldtrip would always result in a zero > value (as the mean == the data value here)? yes, that is correct. So I would phrase the approach that you suggest as a "resampling approach", in which you compute the covarioance over M subsets of trials, in which each subset is averaged (c.f. bootstraping). You mentioned in your previous mail that "it has been suggested". Could you give a reference? And how does it behave in your data? best regards, Robert PS we can discuss it in detail during my visit From litvak at TX.TECHNION.AC.IL Wed Feb 28 14:11:02 2007 From: litvak at TX.TECHNION.AC.IL (Vladimir Litvak) Date: Wed, 28 Feb 2007 13:11:02 -0000 Subject: Layout for planar gradient Message-ID: Dear all, I'm playing with MEGPLANAR function for CTF data. I'd like to plot the results with topoplotTFR but there is no layout file matching the planar gradient channels. What should I do? Thanks, Vladimir -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.hesse at FCDONDERS.RU.NL Wed Feb 28 14:24:24 2007 From: c.hesse at FCDONDERS.RU.NL (Christian Hesse) Date: Wed, 28 Feb 2007 14:24:24 +0100 Subject: Layout for planar gradient In-Reply-To: <002101c75b39$e57349f0$f0463ec1@sobell.ion.ucl.ac.uk> Message-ID: Hi Vladimir, > I'm playing with MEGPLANAR function for CTF data. I'd like to plot > the results with topoplotTFR but there is no layout file matching > the planar gradient channels. What should I do? Options: (1) Use COMBINEPLANAR first, then TOPOPLOTTFR (2) You can try to create an appropriate layout using the function CREATELAYOUT in fieldtrip/private (I do not known if that will work tho ...) and use that Cheers, Christian ---------------------------------------------------------------------- Christian Hesse, PhD, MIEEE F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Tel.: +31 (0)24 36 68293 Fax: +31 (0)24 36 10989 Email: c.hesse at fcdonders.ru.nl Web: www.fcdonders.ru.nl ---------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From sameer at ANDREW.CMU.EDU Wed Feb 28 21:59:52 2007 From: sameer at ANDREW.CMU.EDU (Sameer Walawalkar) Date: Wed, 28 Feb 2007 15:59:52 -0500 Subject: No subject Message-ID: Hi, I am currently experimenting with beamformers and was playing with http://www2.ru.nl/fcdonders/fieldtrip/doku.php?id=fieldtrip:documentation:use_your_own_forward_leadfield_model_in_an_inverse_beamformer_computation to generate the grid. I did the following vol = []; vol.r = 12 * [0.88 0.92 1.00]; % radii of spheres, the head radius is 12 cm vol.c = [1 1/80 1]; % conductivity vol.o = [0 0 0]; % center of sphere % compute the leadfields that can be used for the beamforming cfg = []; cfg.vol = vol; cfg.resolution = 2; % same unit as above, i.e. in cm grid = prepare_leadfield(cfg, dataPre); (I expect prepare_leadfield to pick up grad definitions from the data) ??? Error using ==> fieldtrip/private/compute_leadfield different number of spheres for the radius and origin Error in ==> prepare_leadfield at 209 grid.leadfield{dipindx} = compute_leadfield(grid.pos(dipindx,:), sens, vol, 'reducerank', cfg.reducerank, 'normalize', cfg.normalize); Error in ==> SomeMaster at 15 grid = prepare_leadfield(cfg, dataPre); To get around this error, I change vol to vol.o = [0 0 0 ; 0 0 0 ; 0 0 0 ]; ??? Error using ==> fieldtrip/private/compute_leadfield number of spheres is not equal to the number of coils Error in ==> prepare_leadfield at 209 grid.leadfield{dipindx} = compute_leadfield(grid.pos(dipindx,:), sens, vol, 'reducerank', cfg.reducerank, 'normalize', cfg.normalize); Error in ==> SomeMaster at 15 grid = prepare_leadfield(cfg, dataPre); I thought this might be due to the 4 HPI coils, so I changed vol to vol.r = 12 * [0.88 0.92 0.96 1.00]; vol.o = [0 0 0 ; 0 0 0 ; 0 0 0 ; 0 0 0 ]; but it was of no use. Any suggestions? Thanks, sameer