From stephan.bickel at ANATOM.UNIZH.CH Sat Apr 1 02:02:44 2006 From: stephan.bickel at ANATOM.UNIZH.CH (Stephan Bickel) Date: Sat, 1 Apr 2006 02:02:44 +0200 Subject: besa2fieldtrip problems Message-ID: Hi, I have problems importing tfc-files into fieldtrip. I exported time-frequency transformations from BESA (to tfc-files) and tried to import them into fieldtrip with the besa2fieldtrip function. I always get get an error-message. I am using the fieldtrip version 'fieldtrip-20060330'. this is what I did: cd ('G:\EEG_data\exports\'); % this is the list of BESA datafiles in one condition filename_A = { 'RS-ax_ERP_TSE_allA.tfc' 'MS-ax_ERP_TSE_allA.tfc' 'ED-ax_ERP_TSE_allA.tfc' }; % this is the list of BESA datafiles in the other condition filename_B = { 'RS-ax_ERP_TSE_allB.tfc' 'MS-ax_ERP_TSE_allB.tfc' 'ED-ax_ERP_TSE_allB.tfc' }; nsubj = length(filename_B); % collect all single subject data in a cell-array for i= 1:nsubj B{i} = besa2fieldtrip(filename_B{i}); A{i} = besa2fieldtrip(filename_A{i}); end and this is the error-message: >> for i= 1:nsubj B{i} = besa2fieldtrip(filename_B{i}); A{i} = besa2fieldtrip(filename_A{i}); end ??? Error using ==> colon First and last colon operands must be char. Error in ==> fieldtrip-20060330\private\read_besa_tfc at 73 Time = [TimeStartInMS:TimeIntervalInMS:(NumberTimeSamples-1)*TimeIntervalInMS+TimeStartInMS]; Error in ==> besa2fieldtrip at 81 [ChannelLabels, Time, Frequency, Data, Info] = read_besa_tfc(filename); I might have made some stupid mistake but can anyone see what went wrong? Thanks very much for your help, Stephan From muthuraman10 at HOTMAIL.COM Mon Apr 3 11:00:22 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 3 Apr 2006 09:00:22 +0000 Subject: query on coherence and layout In-Reply-To: Message-ID: hello I have used freqdescriptives to calculate the coherence between EEG and EMG the problem is i get a very less coherence value from 0.01 to 0.1 is there the range specified in the programs and what is the method you use to calculate the coherence can you give a brief explanation i have also a problem with the layout i would like to create my own layout if it is possible how it can be done because in the the previous mail you have mentioned about the elec1010 layout file but it does not match my requirements do i need the CTF software for this in all the layout files it is mentioned to be CTF 151 and so on. thanking you with regards muthu >From: Muthuraman Muthuraman >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on channel arrangement >Date: Thu, 23 Feb 2006 10:32:13 +0000 > >hello > >Thanks Jan > >We have the data for EEG taken with 64-channel(Neuroscan) arrangement >and i need to specify channel arrangement >when i want to calculate the coherence between EEG and EMG > >so for example : in real data > >FPZ- 45 -in the EEG channel arrangement >AF7-41 -in the EEG channel arrangement > >M1-29- EMG channel >M2-30-EMG channel >M3-63-EMG channel >M4-64-EMG channel > >but when i calculate the coherence i want them in the 64-channel layout >instead of 151 layout > >and to change the channels in the coherence plot as >for example- >FPZ-1 -in the coherence plot >AF7-2 -in the coherence plot > >M1-52-in the coherence plot >M2-53-in the coherence plot >M3-54-in the coherence plot >M4-55-in the coherence plot > >Like this i wanted to change the channel arrangement in the coherence plot >for all the channels >how can i change it, please can you give me some idea regarding this > >with regards >muthu > > >>From: Jan Mathijs Schoffelen >>Reply-To: FieldTrip discussion list >>To: FIELDTRIP at NIC.SURFNET.NL >>Subject: Re: [FIELDTRIP] query on loading CNT files >>Date: Tue, 21 Feb 2006 12:37:17 +0100 >> >>Dear Muthuraman, >> >>I guess that you should specify the files which the preprocessing-function >>is going to read in. So you should specify a >> >>cfg.headerfile (which causes your crash, since you left it empty) >> >>and a >> >>cfg.datafile >> >>In your case I would try: >> >>cfg.headerfile = headerfile; >>cfg.datafile = headerfile; (since as far as I know, these are one and >>the >>same). >> >>Good luck, >> >>Jan-Mathijs >> >>PS: Since you already manually defined your trials, you do not need to >>call >>Definetrial anymore (so the step: [cfg] = definetrial(cfg) can be omitted) >> >>-----Original Message----- >>From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >>Behalf >>Of Muthuraman Muthuraman >>Sent: Tuesday, February 21, 2006 11:27 AM >>To: FIELDTRIP at NIC.SURFNET.NL >>Subject: Re: [FIELDTRIP] query on loading CNT files >> >>hello >> >>I have tried what you have suggested me in the previous mail >>and i have attached the steps i have performed in matlab and the error >>also >> >>if i skip the preprocessing step >>and go for the calculation of coherence using freqanalysis >>how to specify data in that case for the function >>(freq=freqanalysis(cfg,data)); >>please give me suggestion on this >> >> >> >> >>headerfile='pd_mof_tr0_o_0307.cnt'; >> >>hdr = read_fcdc_header(headerfile); >>Loading file pd_mof_tr0_o_0307.cnt ... >> >>cfg.trl = []; >>for i=1:floor(hdr.nSamples/hdr.Fs) >> cfg.trl(i,1) = (i-1)*hdr.Fs + 1; >> cfg.trl(i,2) = (i )*hdr.Fs; >> cfg.trl(i,3) = 0; >>end >> >>cfg >> >>cfg = >> >> trl: [172x3 double] >> >>[cfg] = definetrial(cfg); >>retaining exist trial definition >>found 0 events >>created 172 trials >> >> >>data=preprocessing(cfg); >>??? Error using ==> read_fcdc_header >>file '' does not exist >> >>Error in ==> C:\muthu\work\fieldtrip-20060131\preprocessing.m >>On line 236 ==> hdr = read_fcdc_header(cfg.headerfile); >> >> >> >> >>with regards >>muthuraman >> >> >> >> >From: Robert Oostenveld >> >Reply-To: FieldTrip discussion list >> >To: FIELDTRIP at NIC.SURFNET.NL >> >Subject: Re: [FIELDTRIP] query on loading CNT files >> >Date: Tue, 24 Jan 2006 13:54:16 +0100 >> > >> >The relevant warning seems to be >> > >> >>Warning: no events found in pd_mof_tr0_o_0307.cnt >> > >> >That means that the low level code used to read the CNT file does not >>find >> >> >any triggers in your datafile. That either means that the low level >> >reading function (private/read_ns_cnt.m) has a bug, or that your data >>does >> >> >not contain any triggers. >> > >> >If it does not contain triggers (i.e. if there are no trials in the >>data), >> >> >you should make your own cfg.trl field prior to calling PREPROCESSING >>and >> >skip preprocessing. The documentation of DEFINETRIAL explains what >>cfg.trl >> >> >means. I suggest that you try something like >> > >> >hdr = read_fcdc_header(headerfile); >> >cfg.trl = []; >> >for i=1:floor(hdr.nSamples/hdr.Fs) >> > cfg.trl(i,1) = (i-1)*hdr.Fs + 1; % begin sample of each trial >> > cfg.trl(i,2) = (i )*hdr.Fs; % end sample >> > cfg.trl(i,3) = 0; % offset, i.e. relative location >>of >> >the time axis >> >end >> >data = preprocessing(cfg); >> > >> >This segments your continuous data in trials of one second length. >> > >> >best, >> >Robert >> > >> > >> > >> >On 24-jan-2006, at 11:46, Muthuraman Muthuraman wrote: >> > >> >>hello >> >> >> >>I am beginner with field trip >> >>as in the previous mail i have asked about the query on loading CNT >>files >> >>and according to the reply i need to call the function DEFINETRAIL >> >>in the function DEFINETRAIL i have to use the READ_FCDC_EVENT to find >>the >> >> >>events in the data >> >>which gave warnings >> >> >> >>i have attached in the mail what were exactly the steps carried out >>for >> >>the EEG analysis >> >> >> >>'pd_mof_tr0_o_0307.cnt' is the file which contains the data >> >> >> >> >> >> >>headerfile='pd_mof_tr0_o_0307.cnt'; >> >>>>[hdr] = read_fcdc_header(headerfile); >> >>Loading file pd_mof_tr0_o_0307.cnt ... >> >>>>hdr >> >> >> >>hdr = >> >> >> >> Fs: 1000 >> >> nChans: 64 >> >> nSamples: 172040 >> >> nSamplesPre: 0 >> >> nTrials: 1 >> >> label: {1x64 cell} >> >> >> >>>>datafile='pd_mof_tr0_o_0307.cnt';begsample=1;endsample=172;chanindx= >> >>>>64;continuous=1; >> >>>>[dat] = read_fcdc_data(datafile, hdr, begsample, endsample, >>chanindx, >> >>>>continuous); >> >>Loading file pd_mof_tr0_o_0307.cnt ... >> >>done >> >>>>filename='pd_mof_tr0_o_0307.cnt'; >> >>>>[event] = read_fcdc_event(filename) >> >>Warning: handling of event structure has not been fully tested for >> >>Neuroscan *.cnt files >> >>>In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 414 >> >>Loading file pd_mof_tr0_o_0307.cnt ... >> >>done >> >>Warning: no events found in pd_mof_tr0_o_0307.cnt >> >>>In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 620 >> >> >> >>event = >> >> >> >> [] >> >> >> >> >> >>Thanking you >> >>with regards >> >>muthuraman >> >> >> >>>From: Robert Oostenveld >> >>>Reply-To: FieldTrip discussion list >> >>>To: FIELDTRIP at NIC.SURFNET.NL >> >>>Subject: Re: [FIELDTRIP] query on loading CNT files >> >>>Date: Wed, 18 Jan 2006 21:20:37 +0100 >> >>> >> >>>Dear Muthuraman >> >>> >> >>>All analyses start by calling the PREPROCESSING function, which reads >> >>>the data segments of interest into memory. Prior to that, you should >> >>>call DEFINETRIAL to determine the data segments of interest (usually >> >>>based on the triggers present in the datafile). Please see the help >>of >> >>>those two functions (type "help function_name" on the matlab command >> >>>line) or look at http:// www2.ru.nl/fcdonders/fieldtrip/ >>reference.html >> >>> >> >>>best regards >> >>>Robert >> >>> >> >>> >> >>>On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote: >> >>> >> >>>>hello >> >>>> >> >>>>I would like to use fieldtrip to analyse EEG recordings >> >>>>how to load CNT files which contains the data >> >>>>how can i load the data and do the analysis >> >>>> >> >>>> >> >>>>with regards >> >>>>muthuraman >> >>>> >> >>> >> >>> >> >>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >>>Robert Oostenveld, PhD >> >>>F.C. Donders Centre for Cognitive Neuroimaging >> >>>Radboud University Nijmegen >> >>>phone: +31-24-3619695 >> >>>http://www.ru.nl/fcdonders/ >> >>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> From r.oostenveld at FCDONDERS.RU.NL Mon Apr 3 22:13:24 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 3 Apr 2006 22:13:24 +0200 Subject: besa2fieldtrip problems In-Reply-To: Message-ID: On 1 Apr 2006, at 2:02, Stephan Bickel wrote: > ??? Error using ==> colon > First and last colon operands must be char. > > Error in ==> fieldtrip-20060330\private\read_besa_tfc at 73 > Time = > [TimeStartInMS:TimeIntervalInMS:(NumberTimeSamples-1) > *TimeIntervalInMS+TimeStartInMS]; > > Error in ==> besa2fieldtrip at 81 > [ChannelLabels, Time, Frequency, Data, Info] = read_besa_tfc > (filename); There may be a difference in the version of your TFC file and the one that the importer was written for. I suggest that you use the Matlab debugger to put a breakpoint at line 81 in the code, and look at the value of TimeStartInMS. It seems not to be a regular number, which it is supposed to be. > I might have made some stupid mistake but can anyone see what went > wrong? If you cannot figure it out using the debugger, send me one of your tfc files (not through the mailing listm but direct). best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Mon Apr 3 22:22:02 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 3 Apr 2006 22:22:02 +0200 Subject: query on coherence and layout In-Reply-To: Message-ID: Hi Muthuraman On 3 Apr 2006, at 11:00, Muthuraman Muthuraman wrote: > I have used freqdescriptives to calculate the coherence between EEG > and EMG > the problem is i get a very less coherence value from 0.01 to 0.1 > is there the range specified in the programs Coherence in the range from 0.01 to 0.1 in itself is not uncommon. The values depend on the number of trials and tapers (since it is a biassed measure). You should look at its spectral distribution and on the scalp topography to see whether it makes sense. > and what is the method you use to calculate the coherence can you > give a brief explanation Coherence is explained in books on signal processing, or you can do a google for it. In Matlab you can also type "help CSD". > i have also a problem with the layout > i would like to create my own layout if it is possible > how it can be done > because in the the previous mail you have mentioned about the > elec1010 layout file > but it does not match my requirements > do i need the CTF software for this in all the layout files it is > mentioned to be CTF 151 and so on. You should open one of the layout files in a text editor as example. The columns are number, xpos, ypos, width, height, label You can manually make your own layout file in a text editor, or using some custom matlab code if you already know within Matlab what your electrode locations are. best regards, Robert From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed Apr 19 11:01:47 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 19 Apr 2006 11:01:47 +0200 Subject: subplots in topolotER and comment Message-ID: I'm trying to make a figure with 15 subplots with topoplotER. However, the comment is not placed in the right position (see ataached figure). For a subplot it would be nice if the comment would be printed above the plot. Also, is it possible to only plot my own comment, and not plot the following? xlim (time)=[0 0.05] ylim (freq)=[3 6] zlim (powspctrm)=[-2e-28 2e-28] Because so much comment is a bit to much in a subplot, only the time would be enough. Thanks a lot, Ingrid -------------- next part -------------- A non-text attachment was scrubbed... Name: toposubplots.png Type: image/x-png Size: 103892 bytes Desc: not available URL: From Daniel.Jokisch at FCDONDERS.RU.NL Wed Apr 19 16:42:28 2006 From: Daniel.Jokisch at FCDONDERS.RU.NL (Daniel Jokisch) Date: Wed, 19 Apr 2006 16:42:28 +0200 Subject: beamforming: length of data pieces Message-ID: Hi, I am localizing oscillatory sources using beamforming. When comparing the activation in the prestimulus to the activation in the poststimulus interval I was wondering if the data pieces must have the same length. A prerequisite is that the length of a data piece must have the length of a fix number of oscillatory cycles. Is it theoretically possible to compare activation in a prestimulus interval to activation in a poststimulus interval which is twice as long as the prestimulus interval? A second question concerns the averaging over the same subjects in different recording sessions (meaning that there are two sets of headlocalization parameters and two headmodels for the same subject). Is it necessary to normalize the data before using the function sourcegrandaverage or can I use directly the output of the function sourceanalysis as input for sourcegrandaverage? Best, Daniel -- Daniel Jokisch, PhD F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Phone: +31 24 36 68294 Fax : +31 24 36 10989 http://www.ru.nl/fcdonders/ From r.oostenveld at FCDONDERS.RU.NL Wed Apr 19 17:25:32 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 19 Apr 2006 17:25:32 +0200 Subject: beamforming: length of data pieces In-Reply-To: <44464C54.30904@fcdonders.ru.nl> Message-ID: Hi Daniel, On 19 Apr 2006, at 16:42, Daniel Jokisch wrote: > I am localizing oscillatory sources using beamforming. When > comparing the activation in the prestimulus to the activation in > the poststimulus interval I was wondering if the data pieces must > have the same length. > A prerequisite is that the length of a data piece must have the > length of a fix number of oscillatory cycles. Is it theoretically > possible to compare activation in a prestimulus interval to > activation in a poststimulus interval which is twice as long as the > prestimulus interval? It is possible to compare different lengths, but a direct comparison is not valid, or at least difficult: 1) the frequency resolution in the longer segment (either before or after the stimulus) is higher, resulting in a different amount of spectral bleeding/leakage. 2) the amount of data in the longer segment is higher, resulting in a better estimation of your signal compared to the noise. If you fit a sine wave to a twice-as-long segment, it will be less affected by noise. So if the direct comparison between the two shows a difference, that difference can be (trivially) explained by different frequency resolutions or amounts of noise. You can try to compensate for the amount of noise by comparing the neural activity index (beamed power divided by estimated beamed noise), but that does not solve the different frequency resolutions. You could compensate the difference in frequency resolution by splitting the long post-stimulus interval in two sections, and estimate the power on each of them and average (i.e. you would have twice as many trials), which is a simplified version of Welch power estimate with no overlap. So there are tricks available with which you can make the comparison less problematic, but they are not nice. Also a statistical comparison using a parametric or non-parametric (randomization) tests would be messy. So I suggest to sacrifice some of your post stimulus data to make the intervals equally long. Alternatively, a better idea is to use a time-frequency decomposition over the whole interval, and compare each post-stimulus TFR frame to the single pre-stimulus TFR frame. That could be done in a methodologically and statistically clean comparison. > A second question concerns the averaging over the same subjects in > different recording sessions (meaning that there are two sets of > headlocalization parameters and two headmodels for the same > subject). Is it necessary to normalize the data before using the > function sourcegrandaverage or can I use directly the output of the > function sourceanalysis as input for sourcegrandaverage? No, you want to spatially normalize your functional data before averaging. The averaging is done on the same voxel over subjects, therefore you want voxel (i,j,k) in subject 1 to correspond anatomically with voxel (i,j,k) in subject 2. See http://www2.ru.nl/ fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:analysis_protocols#source_reconstruction_for_ multiple_subjects best regards, Robert From nohnplusultra at GMX.DE Thu Apr 20 10:45:13 2006 From: nohnplusultra at GMX.DE (Claudia Nohn) Date: Thu, 20 Apr 2006 10:45:13 +0200 Subject: clusterrandanalysis Message-ID: dear all, i just began learning fieldtrip and am momentarilly busy with clusterrandanalysis. perhaps someone can answer some of my questions: which hypothesis is actually tested by the t-tests concerning the channel-time-frequency-triplets? and why are�nt all triplets included using an alphtresh-value of 1.0? does neighbourdist mean: MAXIMAL distance from neighbours? how do i know for which triplet one specific p-value/cluster-level-statistic etc. stands? are only significant effects plotted by topoplotTFR? for a two-sided test: which direction do the negative or the positive clusters have? is the power of the first ore the second data bigger or smaller? how are more than two conditions compared (i have two independent variables, each having two levels, and two groups who are sensitized at the left and right side of the body, repectively. so i�m comparing up to eight channel-time-frequency-arrays.) From maris at NICI.RU.NL Thu Apr 20 12:13:44 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 20 Apr 2006 12:13:44 +0200 Subject: clusterrandanalysis Message-ID: Dear Claudia, > i just began learning fieldtrip and am momentarilly busy with > clusterrandanalysis. perhaps someone can answer some of my questions: > which hypothesis is actually tested by the t-tests concerning the > channel-time-frequency-triplets? Clusterrandanalysis does not test hypothesis at the level of channel-time-frequency triplets (also called "samples"). Instead, it tests the null hypothesis that the data in the two (or more) experimental conditions come from the same probability distribution. The sample-specific t-statistics are used to construct clusters, namely by thresholding them, followed by clustering on the basis of spatial, temporal, and spectral adjacency. From a theoretical perspective, the t-statistic is not important at all. One can also use the Honolulu-statistic (which does not exist) if there is a sensible way of thresholding it. Clusterrandanalysis controls the false alarm rate by calculating a randomization p-value for the maximum cluster-level statistic. No parametric sampling distribution (such as the T-distribution) is required to control the false alarm rate. and why are´nt all triplets included using > an alphtresh-value of 1.0? If you set alphathresh at 1.0, you want all samples to be joined in a single cluster, regardless of the size of the effect at the sample-level. This does not make sense. Leave alphathresh at its default value 0.05. If you are just starting with clusterrandanalysis, you will not gain anything by playing with it. > does neighbourdist mean: MAXIMAL distance from neighbours? Yes, neighbourdist is the maximal distance between two sensors that are considered as neighbours. > how do i know for which triplet one specific > p-value/cluster-level-statistic > etc. stands? p-values are computed for clusters, not for samples (unless you specify cfg.makeclusters='no'). > are only significant effects plotted by topoplotTFR? The effects you plot by topoplotTFR depend on what you ask topoplotTFR to plot for you. This is specified by the cfg.zparam field. In the clusterrandanalysis tutorial on the Fieldtrip homepage, I used masking to select the significant clusters. > for a two-sided test: which direction do the negative or the positive > clusters have? is the power of the first ore the second data bigger or > smaller? A positive cluster means that the samples in this cluster have a larger value in condition 1 than in condition 2. For negative clusters, the reverse holds. > how are more than two conditions compared (i have two independent > variables, > each having two levels, and two groups who are sensitized at the left and > right side of the body, repectively. so i´m comparing up to eight > channel-time-frequency-arrays.) Clusterrandanalysis can only be used to test main effects. Clusterrandanalysis can perform sample-specific comparisons for more than two levels (eight, in your case) by means of an F-statistic. However, I strongly advise you to first analyze your data for every independent variable separately, each time ignoring the other two independent variables. This amounts to using an independent samples t-statistic (if the independent variable is between-subjects) or a paired samples t-statistic (if the independent variable is within-subjects). good luck, Eric Maris From NohnPlusUltra at GMX.DE Thu Apr 20 13:04:46 2006 From: NohnPlusUltra at GMX.DE (Claudia Nohn) Date: Thu, 20 Apr 2006 13:04:46 +0200 Subject: clusterrandanalysis Message-ID: thanks a lot. > --- Ursprüngliche Nachricht --- > Von: Eric Maris > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] clusterrandanalysis > Datum: Thu, 20 Apr 2006 12:13:44 +0200 > > Dear Claudia, > > > > i just began learning fieldtrip and am momentarilly busy with > > clusterrandanalysis. perhaps someone can answer some of my questions: > > which hypothesis is actually tested by the t-tests concerning the > > channel-time-frequency-triplets? > > Clusterrandanalysis does not test hypothesis at the level of > channel-time-frequency triplets (also called "samples"). Instead, it tests > the null hypothesis that the data in the two (or more) experimental > conditions come from the same probability distribution. The > sample-specific > t-statistics are used to construct clusters, namely by thresholding them, > followed by clustering on the basis of spatial, temporal, and spectral > adjacency. From a theoretical perspective, the t-statistic is not > important > at all. One can also use the Honolulu-statistic (which does not exist) if > there is a sensible way of thresholding it. Clusterrandanalysis controls > the > false alarm rate by calculating a randomization p-value for the maximum > cluster-level statistic. No parametric sampling distribution (such as the > T-distribution) is required to control the false alarm rate. > > and why are´nt all triplets included using > > an alphtresh-value of 1.0? > > If you set alphathresh at 1.0, you want all samples to be joined in a > single > cluster, regardless of the size of the effect at the sample-level. This > does > not make sense. Leave alphathresh at its default value 0.05. If you are > just > starting with clusterrandanalysis, you will not gain anything by playing > with it. > > > > does neighbourdist mean: MAXIMAL distance from neighbours? > > Yes, neighbourdist is the maximal distance between two sensors that are > considered as neighbours. > > > > how do i know for which triplet one specific > > p-value/cluster-level-statistic > > etc. stands? > > p-values are computed for clusters, not for samples (unless you specify > cfg.makeclusters='no'). > > > are only significant effects plotted by topoplotTFR? > > The effects you plot by topoplotTFR depend on what you ask topoplotTFR to > plot for you. This is specified by the cfg.zparam field. In the > clusterrandanalysis tutorial on the Fieldtrip homepage, I used masking to > select the significant clusters. > > > for a two-sided test: which direction do the negative or the positive > > clusters have? is the power of the first ore the second data bigger or > > smaller? > > A positive cluster means that the samples in this cluster have a larger > value in condition 1 than in condition 2. For negative clusters, the > reverse > holds. > > > how are more than two conditions compared (i have two independent > > variables, > > each having two levels, and two groups who are sensitized at the left > and > > right side of the body, repectively. so i´m comparing up to eight > > channel-time-frequency-arrays.) > > Clusterrandanalysis can only be used to test main effects. > Clusterrandanalysis can perform sample-specific comparisons for more than > two levels (eight, in your case) by means of an F-statistic. However, I > strongly advise you to first analyze your data for every independent > variable separately, each time ignoring the other two independent > variables. > This amounts to using an independent samples t-statistic (if the > independent > variable is between-subjects) or a paired samples t-statistic (if the > independent variable is within-subjects). > > > good luck, > > Eric Maris > -- Analog-/ISDN-Nutzer sparen mit GMX SmartSurfer bis zu 70%! Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer From ejackson at UNM.EDU Fri Apr 21 18:45:06 2006 From: ejackson at UNM.EDU (Eric Jackson) Date: Fri, 21 Apr 2006 18:45:06 +0200 Subject: Reading continuous data files - chanindx error Message-ID: I am trying to run "preprocessing" with a continuous data set from a 275- channel CTF machine, but I get an error in the function read_ctf_meg4 saying, "No channels were specified fr reading CTF data." The channel specification used in the cfg file is "cfg.channel = {'MEG' 'STIM']". Examining the function, it looks like nothing is being passed to "chanindx". Is the problem with my channel specification or elsewhere? Any assistance would be appeciated. Thank you. From tomh at KURAGE.NIMH.NIH.GOV Sat Apr 22 01:43:24 2006 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Fri, 21 Apr 2006 19:43:24 -0400 Subject: Reading continuous data files - chanindx error In-Reply-To: Message-ID: > I have triggers on UPPT002 according to DataEditor. Ah, that's the problem. If you look in fieldtrip/private/read_ctf_trigger.m you'll see that it only checks the 001 and STIM channels. You could just change the UPPT001 to UPPT002, and it'll work. There should be a better general solution to this, but I don't know what it is. Internally all the stim channels have a type code, and we could make an array that indexes all the stim channels that way, instead of the chain of ifs used at present. From r.oostenveld at FCDONDERS.RU.NL Sun Apr 23 22:33:01 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Sun, 23 Apr 2006 22:33:01 +0200 Subject: Reading continuous data files - chanindx error In-Reply-To: Message-ID: Hi Eric, hi Tom, Since we are not using the new electronics and the new trigger channels at the FCDC, this never has been a problem for us, luckily Tom has experience with it. We are currently in the process of rewriting the read_fcdc_header/data/event functions, and I am planning to make the different trigger types in the new CTF dataformat explicitely available under the name of the channel. So instead of a "backpanel trigger" and "frontpanel trigger", there will be a "STIM" event, a "UPPT001" event and similar events for all trigger channels (i.e. based on the type code). Robert On 22 Apr 2006, at 1:43, Tom Holroyd wrote: >> I have triggers on UPPT002 according to DataEditor. > > Ah, that's the problem. If you look in > fieldtrip/private/read_ctf_trigger.m > you'll see that it only checks the 001 and STIM channels. You > could just change the UPPT001 to UPPT002, and it'll work. > > There should be a better general solution to this, but I don't know > what it is. Internally all the stim channels have a type code, and > we could make an array that indexes all the stim channels that way, > instead of the chain of ifs used at present. > From floris.delange at FCDONDERS.RU.NL Mon Apr 24 13:49:55 2006 From: floris.delange at FCDONDERS.RU.NL (Floris de Lange) Date: Mon, 24 Apr 2006 13:49:55 +0200 Subject: topoplotTFR error? Message-ID: Dear fieldtrippers, When using topoplotTFR, since today I get the following error: ??? Input argument "Y" is undefined. Error in ==> fieldtrip/private/topoplot at 77 Xpos = -0.45+0.9*(Y - min(Y)) /(max(Y) - min(Y)); Error in ==> topoplotER at 268 topoplot(cfg,datavector); Error in ==> topoplotER at 170 topoplotER(cfg, data); Error in ==> topoplotTFR at 72 topoplotER(cfg, varargin{:}); As far as I can remember, this function worked fine for me last week, so I'm wondering if I'm doing something stupid or whether there is a bug in the function. Any ideas? Thanks, Cheers, Floris From jciveira at UNAV.ES Mon Apr 24 16:55:43 2006 From: jciveira at UNAV.ES (Juan Civeira) Date: Mon, 24 Apr 2006 16:55:43 +0200 Subject: Volume conduction models for EEG Message-ID: Hi, I am making my master thesis about coherent sources using data from EEG. I have done the tutorial of beamforming and I have done several analysis with my own data and the results are quite good but I know that they can be better. I have used the multiple spheres model and now I want to use a realistic model but I don�t have the software. I have looked for it on the internet but I only found commercial software. Does anyone know any freeware to create a realistic model for EEG? I have the data and I also have a MRI and I want to use them all for displaying the results. Moreover, Fieldtrip supports all forward models supported by the Neuromag meg-calc toolbox. Is there any way of making one of those models without using the commercial software? Thank you very much Juan Civeira Neurociencias - Lab. Neurofisiologia de Sistemas Fundacion para la Investigacion Medica Aplicada Edificio CIMA Pio XII, 55 31080 Pamplona (Spain) http://www.unav.es/cima From ejackson at UNM.EDU Mon Apr 24 21:21:47 2006 From: ejackson at UNM.EDU (Eric Jackson) Date: Mon, 24 Apr 2006 21:21:47 +0200 Subject: Reading continuous data files - chanindx error Message-ID: Thank you. Changing the read_CTF_trigger function did resolve that issue. Now, I have a new channel issue. When preprocessing reaches "evaluating artifact_eog", I get the following message: ??? Error useing ==> artifact_zvalue no channels selected Any further assistance would be appreciated. Thanks. From r.oostenveld at FCDONDERS.RU.NL Mon Apr 24 21:50:59 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 24 Apr 2006 21:50:59 +0200 Subject: Reading continuous data files - chanindx error In-Reply-To: Message-ID: type "help artifact_eog" and you will see % The configuration parameters that you can set are % cfg.artfctdef.eog.sgn = 'EOG' see CHANNELSELECTION This specifies the channels (signals) in which the routine searches for artifacts. See "help channelselection" for the syntax of specifying channels. best Robert On 24 Apr 2006, at 21:21, Eric Jackson wrote: > Thank you. Changing the read_CTF_trigger function did resolve that > issue. > > Now, I have a new channel issue. When preprocessing reaches > "evaluating > artifact_eog", I get the following message: > > ??? Error useing ==> artifact_zvalue > no channels selected > > Any further assistance would be appreciated. Thanks. > From r.oostenveld at FCDONDERS.RU.NL Mon Apr 24 21:59:33 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 24 Apr 2006 21:59:33 +0200 Subject: Volume conduction models for EEG In-Reply-To: Message-ID: Hi Juan On 24 Apr 2006, at 16:55, Juan Civeira wrote: > I am making my master thesis about coherent sources using data from > EEG. > > I have done the tutorial of beamforming and I have done several > analysis > with my own data and the results are quite good but I know that > they can be > better. You can use a standard realistic volume conductor model in Fieldtrip. Such a model is not yet available from the fieldtrip homepage or ftp server, but recently I did construct a standard BEM model for Fieldtrip bvased on the MNI/SPM brain. It is included in the beta version of the DIPFIT2 plugin for EEGLAB (the dipfit plugin uses a subset of Fieldtrip). See http://www.sccn.ucsd.edu/eeglab/ eeglab5.0b.html > I have used the multiple spheres model and now I want to use a > realistic > model but I don´t have the software. I have looked for it on the > internet > but I only found commercial software. I can think of Curry, EMSE, BESA, ASA as commercial software. You can try to get a try-out copy of one of those software products. > Does anyone know any freeware to create a realistic model for EEG? > I have > the data and I also have a MRI and I want to use them all for > displaying the > results. Brainstorm from Mosher and colleagues is open source and includes a complete implementation of BEM for EEG. See the external links page on the fieldtrip site. > Moreover, Fieldtrip supports all forward models supported by the > Neuromag > meg-calc toolbox. Is there any way of making one of those models > without > using the commercial software? No, the meg-calc toolbox is commercial, and relies on additional software from Neuromag. best regards, Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From jciveira at UNAV.ES Wed Apr 26 11:39:18 2006 From: jciveira at UNAV.ES (Juan Civeira) Date: Wed, 26 Apr 2006 11:39:18 +0200 Subject: Volume conduction models for EEG Message-ID: Thanks for the other help but now I have another question: I have used the model on EEGLAB and I have my electrodes alligned with the BEM but I do not know how to export both, the model and the electrodes, to Fieldtrip. I have tried to use directly the field on EEGLAB EEG.dipfit.hdmfile in Fieldtrip but the resulting grid is so huge that is useless. So, in summary, I have my electrodes alligned with the BEM model present in EEGLAB and I want to export both to Fieldtrip and apply a beamformer. Thanks again Juan Civeira Neurociencias - Lab. Neurofisiologia de Sistemas Fundacion para la Investigacion Medica Aplicada Edificio CIMA Pio XII, 55 31080 Pamplona (Spain) http://www.unav.es/cima From R.Oostenveld at FCDONDERS.RU.NL Wed Apr 26 14:14:15 2006 From: R.Oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 26 Apr 2006 14:14:15 +0200 Subject: Fieldtrip analysis of Yokogawa format In-Reply-To: <444DE802.3050707@apollo3.brl.ntt.co.jp> Message-ID: Dear Kaoru On 25 Apr 2006, at 11:12, Kaoru Amano wrote: > We are using MEG system of Yokogawa, and very much interested in > source > estimation of e.g. gamma band activity. According to the Wiki, > Yokogawa > format (*.sqe, *.ave, *.con, *.raw) seems to be supported. But the > following error message appeared and I couldn't load the data. > "Undefined command/function 'yokogawa2grad'." (Actually, I couldn't > find > the file "yokogawa2grad.m"). The file indeed is missing in the ftp version, please find it atatched. It will be automatically included in future releases on the ftp server. However, looking in the file I do notice that it is not yet complete. I suggest that you read http://www2.ru.nl/fcdonders/ fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#how_are_electrodes _magnetometers_or_gradiometers_described and that you complete the missing section of the yokogawa2grad function (indicated with "FIXME"). > Since I can load the data into Matlab, I reformatted the data into > your > datastructure (data.label, data.fsample, data.trial, data.time), as > explained in Wiki "How can I import my own dataformat?" But, of > course, > I have to load other data such as sensor position, for the source > estimation. > > Could you tell me which analysis is possible for Yokogawa's format? If > we want to do source estimation, how can I import necessary > information > to your format? Almost all analyses can be done on your MEG data. The missing information on gradiometer locations is (or should be) implemented in the yokogawa2grad function, see above. For inverse modelling, you would start with timelockanalysis or freqanalysys, followed by making topoplots of the resulting data to see whether the hypothesised effects are visible on the channel level. Subsequently you would do sourceanalysis. See http:// www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:analysis_protocols Sourceanalysis requires a head model, which can be read from various file formats (but not Yokagawa) or which can be made using the fieldtrip functions prepare_localspheres or the prepare_singleshell. Reading anatomical MRIs in yokagawa format is however not yet supported, so you would have to solve the alignment of the anatomical MRI and volume model and the sensors yourself. You could start with a simple single sphere headmodel, which can be specified in sourceanalysis as cfg.vol.r = [r] % radius cfg.vol.o = [x y z] % origin best regards, Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- A non-text attachment was scrubbed... Name: yokogawa2grad.m Type: application/octet-stream Size: 2719 bytes Desc: not available URL: -------------- next part -------------- From pchris at UNC.EDU Wed Apr 26 18:07:46 2006 From: pchris at UNC.EDU (Punita Christopher) Date: Wed, 26 Apr 2006 18:07:46 +0200 Subject: modeling - inverse methods Message-ID: Dr. Oostenveld, Thank you for your help previously in pointing me towards triplot.m for my plotting needs. It has worked very well for me. I do have some questions regarding dipole modeling.... I'm developed a simple multiple concentric shell head model based on Mosher et al.(1999) and Zhang et al.(1995). In my model, the orientation of the dipoles is not arbitrary. I also use some code from the brainstorm toolbox (berg.m and zhang_fit.m) to calculate and fit the berg parameters. I calculate the forward solution using my code but I was wondering if there is any inverse modeling code (perhaps using least squares method) in Fieldtrip that will help me to compare the modeled data and my measured data. My data consists of x,y,z, (coordinates) and v (single potential value). My data is not even EEG data, I am just using the EEG approach for my research. Thank you, Punita From yxu at CNBC.CMU.EDU Wed Apr 26 22:30:01 2006 From: yxu at CNBC.CMU.EDU (Yisheng Xu) Date: Wed, 26 Apr 2006 16:30:01 -0400 Subject: Neuromag 306 channel data import Message-ID: Any one can provide a "cookbook" reference for how to import the raw and averaged fif files into FieldTrip? The Neuromag fif files don't seem to have Channel labels and their spatial locations embedded. What other files do we need to do source analysis? Kimmo Uutela plublished a Windows version of MEG-PD (1.2.9). Is this version able to work with FieldTrip in Windows? Thanks, Yisheng Xu, PhD Center for the Neural Basis of Cognition 115 Mellon Institute 4400 Fifth Ave Pittsburgh, PA 15203 Tel: +1 (412) 268-7232 Fax: +1 (412) 281-2161 From lauri at NEURO.HUT.FI Thu Apr 27 09:43:10 2006 From: lauri at NEURO.HUT.FI (Lauri Parkkonen) Date: Thu, 27 Apr 2006 10:43:10 +0300 Subject: Neuromag 306 channel data import In-Reply-To: <003d01c66970$33fead60$6401a8c0@TIGER> Message-ID: Dear Yisheng, > Any one can provide a "cookbook" reference for how to import the raw > and averaged fif files into FieldTrip? Neuromag fif files should be directly accessible by the standard FieldTrip functions for opening/reading MEG/EEG data files. Try first with read_fcdc_header() to get the "meta information" and then with read_fcdc_data() to actually read some data from the file. These functions should work both with raw/continuous and averaged data. NB: I just downloaded the newest daily FieldTrip release and noticed that read_fcdc_data is unable to retrieve data when the requested span extends over a buffer boundary. I will look into this and try to fix it. > The Neuromag fif files don't seem to have Channel labels and their > spatial locations embedded. What other files do we need to do source > analysis? The fif files are self-contained, i.e., they do include all information necessary for the forward calculation (channel names, types, locations, orientations, calibrations, and the MEG-device <-> head coordinate transformation, etc.). Thus, you do not need any other files. FieldTrip knows the geometry of the sensor coils so if you do forward/inverse modelling in FieldTrip you should be all set. Alternatively, if you want to code your own forward calculation routine, you can find the coil geometries in Appendix B of the Source Modelling Software User's Guide (a.k.a xfit), available as part of the Neuromag analysis software distribution. > Kimmo Uutela published a Windows version of MEG-PD (1.2.9). Is this > version able to work with FieldTrip in Windows? The interface (API) is the same as that of the Linux/HPUX versions so it should work with FieldTrip, however, not all the functionality present in the Linux version has been implemented in the Windows version as of now. I unfortunately do not know whether FieldTrip needs the missing bits; it should be given a try. With the best regards, Lauri -- ----------------------------------------------- Lauri Parkkonen Brain Research Unit, Low Temperature Laboratory Helsinki University of Technology Otakaari 3 A, 02150 ESPOO, FINLAND tel: +358-9-4512965 fax: +358-9-4512969 mailto:lauri at neuro.hut.fi http://boojum.hut.fi From r.oostenveld at FCDONDERS.RU.NL Thu Apr 27 10:58:13 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 27 Apr 2006 10:58:13 +0200 Subject: modeling - inverse methods In-Reply-To: Message-ID: Dear Punita On 26 Apr 2006, at 18:07, Punita Christopher wrote: > I calculate the forward solution using my code but I was wondering if > there is any inverse modeling code (perhaps using least squares > method) in > Fieldtrip that will help me to compare the modeled data and my > measured > data. The usual approach to compare the modelled and measured data, in case of a model with a limited number of parameters, is by fitting the modelparameters to the data, based on some error measure. The usual error measure is the sum of squares (or residual variance) over all channels. This is implemented in the DIPOLEFITTING function. The usual model parameters are partially linearly related to the data (i.e. dipole moment, [qx qy qz]) and partially nonlinear (dipole position, [rx ry rz]). The optimization technique implemented in DIPOLEFITTING uses decoupling to estimate both linear and nonlinear part optimally. Is in your forward model the dipole moment (incorporating orientation and strength in a 3x1 vector [qx qy qz]) linear with the data? I think it is. Then you can use the standard implementation in DIPOLEFITTING. If it were non-linear, the implementation would have to be adjusted to prevent the decoupling of linear and nonlinear parameters, and you would have to fit all 6 parameters nonlinearly. > My data consists of x,y,z, (coordinates) and v (single potential > value). My data is not even EEG data, I am just using the EEG > approach > for my research. To make use of the dipole fitting function in Fieldtrip, you would have to add your forward model to the low-level "compute_leadfield" function, which is in the private directory. For each iteration of the non-linear fit, that function is called and it is supposed to return the model leadfield. It would be nice in general to have the Zhang 1995 model included in Fieldtrip. I think that the Mosher 1999 results in exactly the same leadfields as the 4-shell model that we already have, so that would not be too interesting to include (unless it is faster). Please contact me directly outside the mailing list if you have technical questions on how to add your code to compute_leadfield. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Thu Apr 27 11:04:16 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 27 Apr 2006 11:04:16 +0200 Subject: Neuromag 306 channel data import In-Reply-To: <4450760E.6010307@neuro.hut.fi> Message-ID: Hi Yisheng Some additional comments: >> Any one can provide a "cookbook" reference for how to import the >> raw and averaged fif files into FieldTrip? > Neuromag fif files should be directly accessible by the standard > FieldTrip functions for opening/reading MEG/EEG data files. Try > first with read_fcdc_header() to get the "meta information" and > then with read_fcdc_data() to actually read some data from the > file. These functions should work both with raw/continuous and > averaged data. The functions from the meg-pd are not included in Fieldtrip, you have to add them seperately to your matlab path. > NB: I just downloaded the newest daily FieldTrip release and > noticed that read_fcdc_data is unable to retrieve data when the > requested span extends over a buffer boundary. I will look into > this and try to fix it. I did not know whether the blocks in the data are trials (with a potential gap in between) or buffers. In case of continuous blocked data, you would set the last argment of dat = read_fcdc_data(datfile, hdr, begsample, endsample, chanindx, continuous) i.e. the continuous to 1. Then it will not perform the boundary check. To get this behaviour in fieldtrip prepropcessing, you should specify cfg.datatype='continuous'. best regards, Robert From lauri at NEURO.HUT.FI Thu Apr 27 12:21:53 2006 From: lauri at NEURO.HUT.FI (Lauri Parkkonen) Date: Thu, 27 Apr 2006 13:21:53 +0300 Subject: Neuromag 306 channel data import In-Reply-To: <6426DDCF-358C-4D67-BF6B-827C6CECB2AE@fcdonders.ru.nl> Message-ID: Hi Yisheng and Robert, >>> Any one can provide a "cookbook" reference for how to import the >>> raw and averaged fif files into FieldTrip? >> >> Neuromag fif files should be directly accessible by the standard >> FieldTrip functions for opening/reading MEG/EEG data files. Try >> first with read_fcdc_header() to get the "meta information" and then >> with read_fcdc_data() to actually read some data from the file. >> These functions should work both with raw/continuous and averaged data. > > The functions from the meg-pd are not included in Fieldtrip, you have > to add them seperately to your matlab path. Yes, sorry, I forgot to mention this. >> NB: I just downloaded the newest daily FieldTrip release and noticed >> that read_fcdc_data is unable to retrieve data when the requested >> span extends over a buffer boundary. I will look into this and try >> to fix it. > > > I did not know whether the blocks in the data are trials (with a > potential gap in between) or buffers. In case of continuous blocked > data, you would set the last argment of > dat = read_fcdc_data(datfile, hdr, begsample, endsample, chanindx, > continuous) > i.e. the continuous to 1. Then it will not perform the boundary > check. To get this behaviour in fieldtrip prepropcessing, you should > specify cfg.datatype='continuous'. The Neuromag fif files do not support the epoch/trial mode. Thus, the continuous flag should (always) be set to 1 when working with Neuromag raw data. However, the raw data files may still contain multiple segments if the recording was paused, for example, but these segments are usually much longer than one trial. I had modified my own version of the read routine in such a way that it assumes continuous files but does check for possible gaps within the requested span and returns with an error if there is one. Hence the difference w.r.t. the official version. To avoid spamming everybody on the list, I'll check with Robert directly if we can update the Neuromag import routines. Cheers, Lauri -- ----------------------------------------------- Lauri Parkkonen Brain Research Unit, Low Temperature Laboratory Helsinki University of Technology Otakaari 3 A, 02150 ESPOO, FINLAND tel: +358-9-4512965 fax: +358-9-4512969 mailto:lauri at neuro.hut.fi http://boojum.hut.fi From ejackson at UNM.EDU Thu Apr 27 20:12:08 2006 From: ejackson at UNM.EDU (Eric Jackson) Date: Thu, 27 Apr 2006 20:12:08 +0200 Subject: Reading continuous data files - chanindx error Message-ID: Thanks for your help. From stephan.bickel at ANATOM.UNIZH.CH Sat Apr 1 02:02:44 2006 From: stephan.bickel at ANATOM.UNIZH.CH (Stephan Bickel) Date: Sat, 1 Apr 2006 02:02:44 +0200 Subject: besa2fieldtrip problems Message-ID: Hi, I have problems importing tfc-files into fieldtrip. I exported time-frequency transformations from BESA (to tfc-files) and tried to import them into fieldtrip with the besa2fieldtrip function. I always get get an error-message. I am using the fieldtrip version 'fieldtrip-20060330'. this is what I did: cd ('G:\EEG_data\exports\'); % this is the list of BESA datafiles in one condition filename_A = { 'RS-ax_ERP_TSE_allA.tfc' 'MS-ax_ERP_TSE_allA.tfc' 'ED-ax_ERP_TSE_allA.tfc' }; % this is the list of BESA datafiles in the other condition filename_B = { 'RS-ax_ERP_TSE_allB.tfc' 'MS-ax_ERP_TSE_allB.tfc' 'ED-ax_ERP_TSE_allB.tfc' }; nsubj = length(filename_B); % collect all single subject data in a cell-array for i= 1:nsubj B{i} = besa2fieldtrip(filename_B{i}); A{i} = besa2fieldtrip(filename_A{i}); end and this is the error-message: >> for i= 1:nsubj B{i} = besa2fieldtrip(filename_B{i}); A{i} = besa2fieldtrip(filename_A{i}); end ??? Error using ==> colon First and last colon operands must be char. Error in ==> fieldtrip-20060330\private\read_besa_tfc at 73 Time = [TimeStartInMS:TimeIntervalInMS:(NumberTimeSamples-1)*TimeIntervalInMS+TimeStartInMS]; Error in ==> besa2fieldtrip at 81 [ChannelLabels, Time, Frequency, Data, Info] = read_besa_tfc(filename); I might have made some stupid mistake but can anyone see what went wrong? Thanks very much for your help, Stephan From muthuraman10 at HOTMAIL.COM Mon Apr 3 11:00:22 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 3 Apr 2006 09:00:22 +0000 Subject: query on coherence and layout In-Reply-To: Message-ID: hello I have used freqdescriptives to calculate the coherence between EEG and EMG the problem is i get a very less coherence value from 0.01 to 0.1 is there the range specified in the programs and what is the method you use to calculate the coherence can you give a brief explanation i have also a problem with the layout i would like to create my own layout if it is possible how it can be done because in the the previous mail you have mentioned about the elec1010 layout file but it does not match my requirements do i need the CTF software for this in all the layout files it is mentioned to be CTF 151 and so on. thanking you with regards muthu >From: Muthuraman Muthuraman >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on channel arrangement >Date: Thu, 23 Feb 2006 10:32:13 +0000 > >hello > >Thanks Jan > >We have the data for EEG taken with 64-channel(Neuroscan) arrangement >and i need to specify channel arrangement >when i want to calculate the coherence between EEG and EMG > >so for example : in real data > >FPZ- 45 -in the EEG channel arrangement >AF7-41 -in the EEG channel arrangement > >M1-29- EMG channel >M2-30-EMG channel >M3-63-EMG channel >M4-64-EMG channel > >but when i calculate the coherence i want them in the 64-channel layout >instead of 151 layout > >and to change the channels in the coherence plot as >for example- >FPZ-1 -in the coherence plot >AF7-2 -in the coherence plot > >M1-52-in the coherence plot >M2-53-in the coherence plot >M3-54-in the coherence plot >M4-55-in the coherence plot > >Like this i wanted to change the channel arrangement in the coherence plot >for all the channels >how can i change it, please can you give me some idea regarding this > >with regards >muthu > > >>From: Jan Mathijs Schoffelen >>Reply-To: FieldTrip discussion list >>To: FIELDTRIP at NIC.SURFNET.NL >>Subject: Re: [FIELDTRIP] query on loading CNT files >>Date: Tue, 21 Feb 2006 12:37:17 +0100 >> >>Dear Muthuraman, >> >>I guess that you should specify the files which the preprocessing-function >>is going to read in. So you should specify a >> >>cfg.headerfile (which causes your crash, since you left it empty) >> >>and a >> >>cfg.datafile >> >>In your case I would try: >> >>cfg.headerfile = headerfile; >>cfg.datafile = headerfile; (since as far as I know, these are one and >>the >>same). >> >>Good luck, >> >>Jan-Mathijs >> >>PS: Since you already manually defined your trials, you do not need to >>call >>Definetrial anymore (so the step: [cfg] = definetrial(cfg) can be omitted) >> >>-----Original Message----- >>From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >>Behalf >>Of Muthuraman Muthuraman >>Sent: Tuesday, February 21, 2006 11:27 AM >>To: FIELDTRIP at NIC.SURFNET.NL >>Subject: Re: [FIELDTRIP] query on loading CNT files >> >>hello >> >>I have tried what you have suggested me in the previous mail >>and i have attached the steps i have performed in matlab and the error >>also >> >>if i skip the preprocessing step >>and go for the calculation of coherence using freqanalysis >>how to specify data in that case for the function >>(freq=freqanalysis(cfg,data)); >>please give me suggestion on this >> >> >> >> >>headerfile='pd_mof_tr0_o_0307.cnt'; >> >>hdr = read_fcdc_header(headerfile); >>Loading file pd_mof_tr0_o_0307.cnt ... >> >>cfg.trl = []; >>for i=1:floor(hdr.nSamples/hdr.Fs) >> cfg.trl(i,1) = (i-1)*hdr.Fs + 1; >> cfg.trl(i,2) = (i )*hdr.Fs; >> cfg.trl(i,3) = 0; >>end >> >>cfg >> >>cfg = >> >> trl: [172x3 double] >> >>[cfg] = definetrial(cfg); >>retaining exist trial definition >>found 0 events >>created 172 trials >> >> >>data=preprocessing(cfg); >>??? Error using ==> read_fcdc_header >>file '' does not exist >> >>Error in ==> C:\muthu\work\fieldtrip-20060131\preprocessing.m >>On line 236 ==> hdr = read_fcdc_header(cfg.headerfile); >> >> >> >> >>with regards >>muthuraman >> >> >> >> >From: Robert Oostenveld >> >Reply-To: FieldTrip discussion list >> >To: FIELDTRIP at NIC.SURFNET.NL >> >Subject: Re: [FIELDTRIP] query on loading CNT files >> >Date: Tue, 24 Jan 2006 13:54:16 +0100 >> > >> >The relevant warning seems to be >> > >> >>Warning: no events found in pd_mof_tr0_o_0307.cnt >> > >> >That means that the low level code used to read the CNT file does not >>find >> >> >any triggers in your datafile. That either means that the low level >> >reading function (private/read_ns_cnt.m) has a bug, or that your data >>does >> >> >not contain any triggers. >> > >> >If it does not contain triggers (i.e. if there are no trials in the >>data), >> >> >you should make your own cfg.trl field prior to calling PREPROCESSING >>and >> >skip preprocessing. The documentation of DEFINETRIAL explains what >>cfg.trl >> >> >means. I suggest that you try something like >> > >> >hdr = read_fcdc_header(headerfile); >> >cfg.trl = []; >> >for i=1:floor(hdr.nSamples/hdr.Fs) >> > cfg.trl(i,1) = (i-1)*hdr.Fs + 1; % begin sample of each trial >> > cfg.trl(i,2) = (i )*hdr.Fs; % end sample >> > cfg.trl(i,3) = 0; % offset, i.e. relative location >>of >> >the time axis >> >end >> >data = preprocessing(cfg); >> > >> >This segments your continuous data in trials of one second length. >> > >> >best, >> >Robert >> > >> > >> > >> >On 24-jan-2006, at 11:46, Muthuraman Muthuraman wrote: >> > >> >>hello >> >> >> >>I am beginner with field trip >> >>as in the previous mail i have asked about the query on loading CNT >>files >> >>and according to the reply i need to call the function DEFINETRAIL >> >>in the function DEFINETRAIL i have to use the READ_FCDC_EVENT to find >>the >> >> >>events in the data >> >>which gave warnings >> >> >> >>i have attached in the mail what were exactly the steps carried out >>for >> >>the EEG analysis >> >> >> >>'pd_mof_tr0_o_0307.cnt' is the file which contains the data >> >> >> >> >> >> >>headerfile='pd_mof_tr0_o_0307.cnt'; >> >>>>[hdr] = read_fcdc_header(headerfile); >> >>Loading file pd_mof_tr0_o_0307.cnt ... >> >>>>hdr >> >> >> >>hdr = >> >> >> >> Fs: 1000 >> >> nChans: 64 >> >> nSamples: 172040 >> >> nSamplesPre: 0 >> >> nTrials: 1 >> >> label: {1x64 cell} >> >> >> >>>>datafile='pd_mof_tr0_o_0307.cnt';begsample=1;endsample=172;chanindx= >> >>>>64;continuous=1; >> >>>>[dat] = read_fcdc_data(datafile, hdr, begsample, endsample, >>chanindx, >> >>>>continuous); >> >>Loading file pd_mof_tr0_o_0307.cnt ... >> >>done >> >>>>filename='pd_mof_tr0_o_0307.cnt'; >> >>>>[event] = read_fcdc_event(filename) >> >>Warning: handling of event structure has not been fully tested for >> >>Neuroscan *.cnt files >> >>>In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 414 >> >>Loading file pd_mof_tr0_o_0307.cnt ... >> >>done >> >>Warning: no events found in pd_mof_tr0_o_0307.cnt >> >>>In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 620 >> >> >> >>event = >> >> >> >> [] >> >> >> >> >> >>Thanking you >> >>with regards >> >>muthuraman >> >> >> >>>From: Robert Oostenveld >> >>>Reply-To: FieldTrip discussion list >> >>>To: FIELDTRIP at NIC.SURFNET.NL >> >>>Subject: Re: [FIELDTRIP] query on loading CNT files >> >>>Date: Wed, 18 Jan 2006 21:20:37 +0100 >> >>> >> >>>Dear Muthuraman >> >>> >> >>>All analyses start by calling the PREPROCESSING function, which reads >> >>>the data segments of interest into memory. Prior to that, you should >> >>>call DEFINETRIAL to determine the data segments of interest (usually >> >>>based on the triggers present in the datafile). Please see the help >>of >> >>>those two functions (type "help function_name" on the matlab command >> >>>line) or look at http:// www2.ru.nl/fcdonders/fieldtrip/ >>reference.html >> >>> >> >>>best regards >> >>>Robert >> >>> >> >>> >> >>>On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote: >> >>> >> >>>>hello >> >>>> >> >>>>I would like to use fieldtrip to analyse EEG recordings >> >>>>how to load CNT files which contains the data >> >>>>how can i load the data and do the analysis >> >>>> >> >>>> >> >>>>with regards >> >>>>muthuraman >> >>>> >> >>> >> >>> >> >>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >>>Robert Oostenveld, PhD >> >>>F.C. Donders Centre for Cognitive Neuroimaging >> >>>Radboud University Nijmegen >> >>>phone: +31-24-3619695 >> >>>http://www.ru.nl/fcdonders/ >> >>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> From r.oostenveld at FCDONDERS.RU.NL Mon Apr 3 22:13:24 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 3 Apr 2006 22:13:24 +0200 Subject: besa2fieldtrip problems In-Reply-To: Message-ID: On 1 Apr 2006, at 2:02, Stephan Bickel wrote: > ??? Error using ==> colon > First and last colon operands must be char. > > Error in ==> fieldtrip-20060330\private\read_besa_tfc at 73 > Time = > [TimeStartInMS:TimeIntervalInMS:(NumberTimeSamples-1) > *TimeIntervalInMS+TimeStartInMS]; > > Error in ==> besa2fieldtrip at 81 > [ChannelLabels, Time, Frequency, Data, Info] = read_besa_tfc > (filename); There may be a difference in the version of your TFC file and the one that the importer was written for. I suggest that you use the Matlab debugger to put a breakpoint at line 81 in the code, and look at the value of TimeStartInMS. It seems not to be a regular number, which it is supposed to be. > I might have made some stupid mistake but can anyone see what went > wrong? If you cannot figure it out using the debugger, send me one of your tfc files (not through the mailing listm but direct). best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Mon Apr 3 22:22:02 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 3 Apr 2006 22:22:02 +0200 Subject: query on coherence and layout In-Reply-To: Message-ID: Hi Muthuraman On 3 Apr 2006, at 11:00, Muthuraman Muthuraman wrote: > I have used freqdescriptives to calculate the coherence between EEG > and EMG > the problem is i get a very less coherence value from 0.01 to 0.1 > is there the range specified in the programs Coherence in the range from 0.01 to 0.1 in itself is not uncommon. The values depend on the number of trials and tapers (since it is a biassed measure). You should look at its spectral distribution and on the scalp topography to see whether it makes sense. > and what is the method you use to calculate the coherence can you > give a brief explanation Coherence is explained in books on signal processing, or you can do a google for it. In Matlab you can also type "help CSD". > i have also a problem with the layout > i would like to create my own layout if it is possible > how it can be done > because in the the previous mail you have mentioned about the > elec1010 layout file > but it does not match my requirements > do i need the CTF software for this in all the layout files it is > mentioned to be CTF 151 and so on. You should open one of the layout files in a text editor as example. The columns are number, xpos, ypos, width, height, label You can manually make your own layout file in a text editor, or using some custom matlab code if you already know within Matlab what your electrode locations are. best regards, Robert From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed Apr 19 11:01:47 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 19 Apr 2006 11:01:47 +0200 Subject: subplots in topolotER and comment Message-ID: I'm trying to make a figure with 15 subplots with topoplotER. However, the comment is not placed in the right position (see ataached figure). For a subplot it would be nice if the comment would be printed above the plot. Also, is it possible to only plot my own comment, and not plot the following? xlim (time)=[0 0.05] ylim (freq)=[3 6] zlim (powspctrm)=[-2e-28 2e-28] Because so much comment is a bit to much in a subplot, only the time would be enough. Thanks a lot, Ingrid -------------- next part -------------- A non-text attachment was scrubbed... Name: toposubplots.png Type: image/x-png Size: 103892 bytes Desc: not available URL: From Daniel.Jokisch at FCDONDERS.RU.NL Wed Apr 19 16:42:28 2006 From: Daniel.Jokisch at FCDONDERS.RU.NL (Daniel Jokisch) Date: Wed, 19 Apr 2006 16:42:28 +0200 Subject: beamforming: length of data pieces Message-ID: Hi, I am localizing oscillatory sources using beamforming. When comparing the activation in the prestimulus to the activation in the poststimulus interval I was wondering if the data pieces must have the same length. A prerequisite is that the length of a data piece must have the length of a fix number of oscillatory cycles. Is it theoretically possible to compare activation in a prestimulus interval to activation in a poststimulus interval which is twice as long as the prestimulus interval? A second question concerns the averaging over the same subjects in different recording sessions (meaning that there are two sets of headlocalization parameters and two headmodels for the same subject). Is it necessary to normalize the data before using the function sourcegrandaverage or can I use directly the output of the function sourceanalysis as input for sourcegrandaverage? Best, Daniel -- Daniel Jokisch, PhD F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Phone: +31 24 36 68294 Fax : +31 24 36 10989 http://www.ru.nl/fcdonders/ From r.oostenveld at FCDONDERS.RU.NL Wed Apr 19 17:25:32 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 19 Apr 2006 17:25:32 +0200 Subject: beamforming: length of data pieces In-Reply-To: <44464C54.30904@fcdonders.ru.nl> Message-ID: Hi Daniel, On 19 Apr 2006, at 16:42, Daniel Jokisch wrote: > I am localizing oscillatory sources using beamforming. When > comparing the activation in the prestimulus to the activation in > the poststimulus interval I was wondering if the data pieces must > have the same length. > A prerequisite is that the length of a data piece must have the > length of a fix number of oscillatory cycles. Is it theoretically > possible to compare activation in a prestimulus interval to > activation in a poststimulus interval which is twice as long as the > prestimulus interval? It is possible to compare different lengths, but a direct comparison is not valid, or at least difficult: 1) the frequency resolution in the longer segment (either before or after the stimulus) is higher, resulting in a different amount of spectral bleeding/leakage. 2) the amount of data in the longer segment is higher, resulting in a better estimation of your signal compared to the noise. If you fit a sine wave to a twice-as-long segment, it will be less affected by noise. So if the direct comparison between the two shows a difference, that difference can be (trivially) explained by different frequency resolutions or amounts of noise. You can try to compensate for the amount of noise by comparing the neural activity index (beamed power divided by estimated beamed noise), but that does not solve the different frequency resolutions. You could compensate the difference in frequency resolution by splitting the long post-stimulus interval in two sections, and estimate the power on each of them and average (i.e. you would have twice as many trials), which is a simplified version of Welch power estimate with no overlap. So there are tricks available with which you can make the comparison less problematic, but they are not nice. Also a statistical comparison using a parametric or non-parametric (randomization) tests would be messy. So I suggest to sacrifice some of your post stimulus data to make the intervals equally long. Alternatively, a better idea is to use a time-frequency decomposition over the whole interval, and compare each post-stimulus TFR frame to the single pre-stimulus TFR frame. That could be done in a methodologically and statistically clean comparison. > A second question concerns the averaging over the same subjects in > different recording sessions (meaning that there are two sets of > headlocalization parameters and two headmodels for the same > subject). Is it necessary to normalize the data before using the > function sourcegrandaverage or can I use directly the output of the > function sourceanalysis as input for sourcegrandaverage? No, you want to spatially normalize your functional data before averaging. The averaging is done on the same voxel over subjects, therefore you want voxel (i,j,k) in subject 1 to correspond anatomically with voxel (i,j,k) in subject 2. See http://www2.ru.nl/ fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:analysis_protocols#source_reconstruction_for_ multiple_subjects best regards, Robert From nohnplusultra at GMX.DE Thu Apr 20 10:45:13 2006 From: nohnplusultra at GMX.DE (Claudia Nohn) Date: Thu, 20 Apr 2006 10:45:13 +0200 Subject: clusterrandanalysis Message-ID: dear all, i just began learning fieldtrip and am momentarilly busy with clusterrandanalysis. perhaps someone can answer some of my questions: which hypothesis is actually tested by the t-tests concerning the channel-time-frequency-triplets? and why are�nt all triplets included using an alphtresh-value of 1.0? does neighbourdist mean: MAXIMAL distance from neighbours? how do i know for which triplet one specific p-value/cluster-level-statistic etc. stands? are only significant effects plotted by topoplotTFR? for a two-sided test: which direction do the negative or the positive clusters have? is the power of the first ore the second data bigger or smaller? how are more than two conditions compared (i have two independent variables, each having two levels, and two groups who are sensitized at the left and right side of the body, repectively. so i�m comparing up to eight channel-time-frequency-arrays.) From maris at NICI.RU.NL Thu Apr 20 12:13:44 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 20 Apr 2006 12:13:44 +0200 Subject: clusterrandanalysis Message-ID: Dear Claudia, > i just began learning fieldtrip and am momentarilly busy with > clusterrandanalysis. perhaps someone can answer some of my questions: > which hypothesis is actually tested by the t-tests concerning the > channel-time-frequency-triplets? Clusterrandanalysis does not test hypothesis at the level of channel-time-frequency triplets (also called "samples"). Instead, it tests the null hypothesis that the data in the two (or more) experimental conditions come from the same probability distribution. The sample-specific t-statistics are used to construct clusters, namely by thresholding them, followed by clustering on the basis of spatial, temporal, and spectral adjacency. From a theoretical perspective, the t-statistic is not important at all. One can also use the Honolulu-statistic (which does not exist) if there is a sensible way of thresholding it. Clusterrandanalysis controls the false alarm rate by calculating a randomization p-value for the maximum cluster-level statistic. No parametric sampling distribution (such as the T-distribution) is required to control the false alarm rate. and why are´nt all triplets included using > an alphtresh-value of 1.0? If you set alphathresh at 1.0, you want all samples to be joined in a single cluster, regardless of the size of the effect at the sample-level. This does not make sense. Leave alphathresh at its default value 0.05. If you are just starting with clusterrandanalysis, you will not gain anything by playing with it. > does neighbourdist mean: MAXIMAL distance from neighbours? Yes, neighbourdist is the maximal distance between two sensors that are considered as neighbours. > how do i know for which triplet one specific > p-value/cluster-level-statistic > etc. stands? p-values are computed for clusters, not for samples (unless you specify cfg.makeclusters='no'). > are only significant effects plotted by topoplotTFR? The effects you plot by topoplotTFR depend on what you ask topoplotTFR to plot for you. This is specified by the cfg.zparam field. In the clusterrandanalysis tutorial on the Fieldtrip homepage, I used masking to select the significant clusters. > for a two-sided test: which direction do the negative or the positive > clusters have? is the power of the first ore the second data bigger or > smaller? A positive cluster means that the samples in this cluster have a larger value in condition 1 than in condition 2. For negative clusters, the reverse holds. > how are more than two conditions compared (i have two independent > variables, > each having two levels, and two groups who are sensitized at the left and > right side of the body, repectively. so i´m comparing up to eight > channel-time-frequency-arrays.) Clusterrandanalysis can only be used to test main effects. Clusterrandanalysis can perform sample-specific comparisons for more than two levels (eight, in your case) by means of an F-statistic. However, I strongly advise you to first analyze your data for every independent variable separately, each time ignoring the other two independent variables. This amounts to using an independent samples t-statistic (if the independent variable is between-subjects) or a paired samples t-statistic (if the independent variable is within-subjects). good luck, Eric Maris From NohnPlusUltra at GMX.DE Thu Apr 20 13:04:46 2006 From: NohnPlusUltra at GMX.DE (Claudia Nohn) Date: Thu, 20 Apr 2006 13:04:46 +0200 Subject: clusterrandanalysis Message-ID: thanks a lot. > --- Ursprüngliche Nachricht --- > Von: Eric Maris > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] clusterrandanalysis > Datum: Thu, 20 Apr 2006 12:13:44 +0200 > > Dear Claudia, > > > > i just began learning fieldtrip and am momentarilly busy with > > clusterrandanalysis. perhaps someone can answer some of my questions: > > which hypothesis is actually tested by the t-tests concerning the > > channel-time-frequency-triplets? > > Clusterrandanalysis does not test hypothesis at the level of > channel-time-frequency triplets (also called "samples"). Instead, it tests > the null hypothesis that the data in the two (or more) experimental > conditions come from the same probability distribution. The > sample-specific > t-statistics are used to construct clusters, namely by thresholding them, > followed by clustering on the basis of spatial, temporal, and spectral > adjacency. From a theoretical perspective, the t-statistic is not > important > at all. One can also use the Honolulu-statistic (which does not exist) if > there is a sensible way of thresholding it. Clusterrandanalysis controls > the > false alarm rate by calculating a randomization p-value for the maximum > cluster-level statistic. No parametric sampling distribution (such as the > T-distribution) is required to control the false alarm rate. > > and why are´nt all triplets included using > > an alphtresh-value of 1.0? > > If you set alphathresh at 1.0, you want all samples to be joined in a > single > cluster, regardless of the size of the effect at the sample-level. This > does > not make sense. Leave alphathresh at its default value 0.05. If you are > just > starting with clusterrandanalysis, you will not gain anything by playing > with it. > > > > does neighbourdist mean: MAXIMAL distance from neighbours? > > Yes, neighbourdist is the maximal distance between two sensors that are > considered as neighbours. > > > > how do i know for which triplet one specific > > p-value/cluster-level-statistic > > etc. stands? > > p-values are computed for clusters, not for samples (unless you specify > cfg.makeclusters='no'). > > > are only significant effects plotted by topoplotTFR? > > The effects you plot by topoplotTFR depend on what you ask topoplotTFR to > plot for you. This is specified by the cfg.zparam field. In the > clusterrandanalysis tutorial on the Fieldtrip homepage, I used masking to > select the significant clusters. > > > for a two-sided test: which direction do the negative or the positive > > clusters have? is the power of the first ore the second data bigger or > > smaller? > > A positive cluster means that the samples in this cluster have a larger > value in condition 1 than in condition 2. For negative clusters, the > reverse > holds. > > > how are more than two conditions compared (i have two independent > > variables, > > each having two levels, and two groups who are sensitized at the left > and > > right side of the body, repectively. so i´m comparing up to eight > > channel-time-frequency-arrays.) > > Clusterrandanalysis can only be used to test main effects. > Clusterrandanalysis can perform sample-specific comparisons for more than > two levels (eight, in your case) by means of an F-statistic. However, I > strongly advise you to first analyze your data for every independent > variable separately, each time ignoring the other two independent > variables. > This amounts to using an independent samples t-statistic (if the > independent > variable is between-subjects) or a paired samples t-statistic (if the > independent variable is within-subjects). > > > good luck, > > Eric Maris > -- Analog-/ISDN-Nutzer sparen mit GMX SmartSurfer bis zu 70%! Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer From ejackson at UNM.EDU Fri Apr 21 18:45:06 2006 From: ejackson at UNM.EDU (Eric Jackson) Date: Fri, 21 Apr 2006 18:45:06 +0200 Subject: Reading continuous data files - chanindx error Message-ID: I am trying to run "preprocessing" with a continuous data set from a 275- channel CTF machine, but I get an error in the function read_ctf_meg4 saying, "No channels were specified fr reading CTF data." The channel specification used in the cfg file is "cfg.channel = {'MEG' 'STIM']". Examining the function, it looks like nothing is being passed to "chanindx". Is the problem with my channel specification or elsewhere? Any assistance would be appeciated. Thank you. From tomh at KURAGE.NIMH.NIH.GOV Sat Apr 22 01:43:24 2006 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Fri, 21 Apr 2006 19:43:24 -0400 Subject: Reading continuous data files - chanindx error In-Reply-To: Message-ID: > I have triggers on UPPT002 according to DataEditor. Ah, that's the problem. If you look in fieldtrip/private/read_ctf_trigger.m you'll see that it only checks the 001 and STIM channels. You could just change the UPPT001 to UPPT002, and it'll work. There should be a better general solution to this, but I don't know what it is. Internally all the stim channels have a type code, and we could make an array that indexes all the stim channels that way, instead of the chain of ifs used at present. From r.oostenveld at FCDONDERS.RU.NL Sun Apr 23 22:33:01 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Sun, 23 Apr 2006 22:33:01 +0200 Subject: Reading continuous data files - chanindx error In-Reply-To: Message-ID: Hi Eric, hi Tom, Since we are not using the new electronics and the new trigger channels at the FCDC, this never has been a problem for us, luckily Tom has experience with it. We are currently in the process of rewriting the read_fcdc_header/data/event functions, and I am planning to make the different trigger types in the new CTF dataformat explicitely available under the name of the channel. So instead of a "backpanel trigger" and "frontpanel trigger", there will be a "STIM" event, a "UPPT001" event and similar events for all trigger channels (i.e. based on the type code). Robert On 22 Apr 2006, at 1:43, Tom Holroyd wrote: >> I have triggers on UPPT002 according to DataEditor. > > Ah, that's the problem. If you look in > fieldtrip/private/read_ctf_trigger.m > you'll see that it only checks the 001 and STIM channels. You > could just change the UPPT001 to UPPT002, and it'll work. > > There should be a better general solution to this, but I don't know > what it is. Internally all the stim channels have a type code, and > we could make an array that indexes all the stim channels that way, > instead of the chain of ifs used at present. > From floris.delange at FCDONDERS.RU.NL Mon Apr 24 13:49:55 2006 From: floris.delange at FCDONDERS.RU.NL (Floris de Lange) Date: Mon, 24 Apr 2006 13:49:55 +0200 Subject: topoplotTFR error? Message-ID: Dear fieldtrippers, When using topoplotTFR, since today I get the following error: ??? Input argument "Y" is undefined. Error in ==> fieldtrip/private/topoplot at 77 Xpos = -0.45+0.9*(Y - min(Y)) /(max(Y) - min(Y)); Error in ==> topoplotER at 268 topoplot(cfg,datavector); Error in ==> topoplotER at 170 topoplotER(cfg, data); Error in ==> topoplotTFR at 72 topoplotER(cfg, varargin{:}); As far as I can remember, this function worked fine for me last week, so I'm wondering if I'm doing something stupid or whether there is a bug in the function. Any ideas? Thanks, Cheers, Floris From jciveira at UNAV.ES Mon Apr 24 16:55:43 2006 From: jciveira at UNAV.ES (Juan Civeira) Date: Mon, 24 Apr 2006 16:55:43 +0200 Subject: Volume conduction models for EEG Message-ID: Hi, I am making my master thesis about coherent sources using data from EEG. I have done the tutorial of beamforming and I have done several analysis with my own data and the results are quite good but I know that they can be better. I have used the multiple spheres model and now I want to use a realistic model but I don�t have the software. I have looked for it on the internet but I only found commercial software. Does anyone know any freeware to create a realistic model for EEG? I have the data and I also have a MRI and I want to use them all for displaying the results. Moreover, Fieldtrip supports all forward models supported by the Neuromag meg-calc toolbox. Is there any way of making one of those models without using the commercial software? Thank you very much Juan Civeira Neurociencias - Lab. Neurofisiologia de Sistemas Fundacion para la Investigacion Medica Aplicada Edificio CIMA Pio XII, 55 31080 Pamplona (Spain) http://www.unav.es/cima From ejackson at UNM.EDU Mon Apr 24 21:21:47 2006 From: ejackson at UNM.EDU (Eric Jackson) Date: Mon, 24 Apr 2006 21:21:47 +0200 Subject: Reading continuous data files - chanindx error Message-ID: Thank you. Changing the read_CTF_trigger function did resolve that issue. Now, I have a new channel issue. When preprocessing reaches "evaluating artifact_eog", I get the following message: ??? Error useing ==> artifact_zvalue no channels selected Any further assistance would be appreciated. Thanks. From r.oostenveld at FCDONDERS.RU.NL Mon Apr 24 21:50:59 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 24 Apr 2006 21:50:59 +0200 Subject: Reading continuous data files - chanindx error In-Reply-To: Message-ID: type "help artifact_eog" and you will see % The configuration parameters that you can set are % cfg.artfctdef.eog.sgn = 'EOG' see CHANNELSELECTION This specifies the channels (signals) in which the routine searches for artifacts. See "help channelselection" for the syntax of specifying channels. best Robert On 24 Apr 2006, at 21:21, Eric Jackson wrote: > Thank you. Changing the read_CTF_trigger function did resolve that > issue. > > Now, I have a new channel issue. When preprocessing reaches > "evaluating > artifact_eog", I get the following message: > > ??? Error useing ==> artifact_zvalue > no channels selected > > Any further assistance would be appreciated. Thanks. > From r.oostenveld at FCDONDERS.RU.NL Mon Apr 24 21:59:33 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 24 Apr 2006 21:59:33 +0200 Subject: Volume conduction models for EEG In-Reply-To: Message-ID: Hi Juan On 24 Apr 2006, at 16:55, Juan Civeira wrote: > I am making my master thesis about coherent sources using data from > EEG. > > I have done the tutorial of beamforming and I have done several > analysis > with my own data and the results are quite good but I know that > they can be > better. You can use a standard realistic volume conductor model in Fieldtrip. Such a model is not yet available from the fieldtrip homepage or ftp server, but recently I did construct a standard BEM model for Fieldtrip bvased on the MNI/SPM brain. It is included in the beta version of the DIPFIT2 plugin for EEGLAB (the dipfit plugin uses a subset of Fieldtrip). See http://www.sccn.ucsd.edu/eeglab/ eeglab5.0b.html > I have used the multiple spheres model and now I want to use a > realistic > model but I don´t have the software. I have looked for it on the > internet > but I only found commercial software. I can think of Curry, EMSE, BESA, ASA as commercial software. You can try to get a try-out copy of one of those software products. > Does anyone know any freeware to create a realistic model for EEG? > I have > the data and I also have a MRI and I want to use them all for > displaying the > results. Brainstorm from Mosher and colleagues is open source and includes a complete implementation of BEM for EEG. See the external links page on the fieldtrip site. > Moreover, Fieldtrip supports all forward models supported by the > Neuromag > meg-calc toolbox. Is there any way of making one of those models > without > using the commercial software? No, the meg-calc toolbox is commercial, and relies on additional software from Neuromag. best regards, Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From jciveira at UNAV.ES Wed Apr 26 11:39:18 2006 From: jciveira at UNAV.ES (Juan Civeira) Date: Wed, 26 Apr 2006 11:39:18 +0200 Subject: Volume conduction models for EEG Message-ID: Thanks for the other help but now I have another question: I have used the model on EEGLAB and I have my electrodes alligned with the BEM but I do not know how to export both, the model and the electrodes, to Fieldtrip. I have tried to use directly the field on EEGLAB EEG.dipfit.hdmfile in Fieldtrip but the resulting grid is so huge that is useless. So, in summary, I have my electrodes alligned with the BEM model present in EEGLAB and I want to export both to Fieldtrip and apply a beamformer. Thanks again Juan Civeira Neurociencias - Lab. Neurofisiologia de Sistemas Fundacion para la Investigacion Medica Aplicada Edificio CIMA Pio XII, 55 31080 Pamplona (Spain) http://www.unav.es/cima From R.Oostenveld at FCDONDERS.RU.NL Wed Apr 26 14:14:15 2006 From: R.Oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 26 Apr 2006 14:14:15 +0200 Subject: Fieldtrip analysis of Yokogawa format In-Reply-To: <444DE802.3050707@apollo3.brl.ntt.co.jp> Message-ID: Dear Kaoru On 25 Apr 2006, at 11:12, Kaoru Amano wrote: > We are using MEG system of Yokogawa, and very much interested in > source > estimation of e.g. gamma band activity. According to the Wiki, > Yokogawa > format (*.sqe, *.ave, *.con, *.raw) seems to be supported. But the > following error message appeared and I couldn't load the data. > "Undefined command/function 'yokogawa2grad'." (Actually, I couldn't > find > the file "yokogawa2grad.m"). The file indeed is missing in the ftp version, please find it atatched. It will be automatically included in future releases on the ftp server. However, looking in the file I do notice that it is not yet complete. I suggest that you read http://www2.ru.nl/fcdonders/ fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#how_are_electrodes _magnetometers_or_gradiometers_described and that you complete the missing section of the yokogawa2grad function (indicated with "FIXME"). > Since I can load the data into Matlab, I reformatted the data into > your > datastructure (data.label, data.fsample, data.trial, data.time), as > explained in Wiki "How can I import my own dataformat?" But, of > course, > I have to load other data such as sensor position, for the source > estimation. > > Could you tell me which analysis is possible for Yokogawa's format? If > we want to do source estimation, how can I import necessary > information > to your format? Almost all analyses can be done on your MEG data. The missing information on gradiometer locations is (or should be) implemented in the yokogawa2grad function, see above. For inverse modelling, you would start with timelockanalysis or freqanalysys, followed by making topoplots of the resulting data to see whether the hypothesised effects are visible on the channel level. Subsequently you would do sourceanalysis. See http:// www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:analysis_protocols Sourceanalysis requires a head model, which can be read from various file formats (but not Yokagawa) or which can be made using the fieldtrip functions prepare_localspheres or the prepare_singleshell. Reading anatomical MRIs in yokagawa format is however not yet supported, so you would have to solve the alignment of the anatomical MRI and volume model and the sensors yourself. You could start with a simple single sphere headmodel, which can be specified in sourceanalysis as cfg.vol.r = [r] % radius cfg.vol.o = [x y z] % origin best regards, Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- A non-text attachment was scrubbed... Name: yokogawa2grad.m Type: application/octet-stream Size: 2719 bytes Desc: not available URL: -------------- next part -------------- From pchris at UNC.EDU Wed Apr 26 18:07:46 2006 From: pchris at UNC.EDU (Punita Christopher) Date: Wed, 26 Apr 2006 18:07:46 +0200 Subject: modeling - inverse methods Message-ID: Dr. Oostenveld, Thank you for your help previously in pointing me towards triplot.m for my plotting needs. It has worked very well for me. I do have some questions regarding dipole modeling.... I'm developed a simple multiple concentric shell head model based on Mosher et al.(1999) and Zhang et al.(1995). In my model, the orientation of the dipoles is not arbitrary. I also use some code from the brainstorm toolbox (berg.m and zhang_fit.m) to calculate and fit the berg parameters. I calculate the forward solution using my code but I was wondering if there is any inverse modeling code (perhaps using least squares method) in Fieldtrip that will help me to compare the modeled data and my measured data. My data consists of x,y,z, (coordinates) and v (single potential value). My data is not even EEG data, I am just using the EEG approach for my research. Thank you, Punita From yxu at CNBC.CMU.EDU Wed Apr 26 22:30:01 2006 From: yxu at CNBC.CMU.EDU (Yisheng Xu) Date: Wed, 26 Apr 2006 16:30:01 -0400 Subject: Neuromag 306 channel data import Message-ID: Any one can provide a "cookbook" reference for how to import the raw and averaged fif files into FieldTrip? The Neuromag fif files don't seem to have Channel labels and their spatial locations embedded. What other files do we need to do source analysis? Kimmo Uutela plublished a Windows version of MEG-PD (1.2.9). Is this version able to work with FieldTrip in Windows? Thanks, Yisheng Xu, PhD Center for the Neural Basis of Cognition 115 Mellon Institute 4400 Fifth Ave Pittsburgh, PA 15203 Tel: +1 (412) 268-7232 Fax: +1 (412) 281-2161 From lauri at NEURO.HUT.FI Thu Apr 27 09:43:10 2006 From: lauri at NEURO.HUT.FI (Lauri Parkkonen) Date: Thu, 27 Apr 2006 10:43:10 +0300 Subject: Neuromag 306 channel data import In-Reply-To: <003d01c66970$33fead60$6401a8c0@TIGER> Message-ID: Dear Yisheng, > Any one can provide a "cookbook" reference for how to import the raw > and averaged fif files into FieldTrip? Neuromag fif files should be directly accessible by the standard FieldTrip functions for opening/reading MEG/EEG data files. Try first with read_fcdc_header() to get the "meta information" and then with read_fcdc_data() to actually read some data from the file. These functions should work both with raw/continuous and averaged data. NB: I just downloaded the newest daily FieldTrip release and noticed that read_fcdc_data is unable to retrieve data when the requested span extends over a buffer boundary. I will look into this and try to fix it. > The Neuromag fif files don't seem to have Channel labels and their > spatial locations embedded. What other files do we need to do source > analysis? The fif files are self-contained, i.e., they do include all information necessary for the forward calculation (channel names, types, locations, orientations, calibrations, and the MEG-device <-> head coordinate transformation, etc.). Thus, you do not need any other files. FieldTrip knows the geometry of the sensor coils so if you do forward/inverse modelling in FieldTrip you should be all set. Alternatively, if you want to code your own forward calculation routine, you can find the coil geometries in Appendix B of the Source Modelling Software User's Guide (a.k.a xfit), available as part of the Neuromag analysis software distribution. > Kimmo Uutela published a Windows version of MEG-PD (1.2.9). Is this > version able to work with FieldTrip in Windows? The interface (API) is the same as that of the Linux/HPUX versions so it should work with FieldTrip, however, not all the functionality present in the Linux version has been implemented in the Windows version as of now. I unfortunately do not know whether FieldTrip needs the missing bits; it should be given a try. With the best regards, Lauri -- ----------------------------------------------- Lauri Parkkonen Brain Research Unit, Low Temperature Laboratory Helsinki University of Technology Otakaari 3 A, 02150 ESPOO, FINLAND tel: +358-9-4512965 fax: +358-9-4512969 mailto:lauri at neuro.hut.fi http://boojum.hut.fi From r.oostenveld at FCDONDERS.RU.NL Thu Apr 27 10:58:13 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 27 Apr 2006 10:58:13 +0200 Subject: modeling - inverse methods In-Reply-To: Message-ID: Dear Punita On 26 Apr 2006, at 18:07, Punita Christopher wrote: > I calculate the forward solution using my code but I was wondering if > there is any inverse modeling code (perhaps using least squares > method) in > Fieldtrip that will help me to compare the modeled data and my > measured > data. The usual approach to compare the modelled and measured data, in case of a model with a limited number of parameters, is by fitting the modelparameters to the data, based on some error measure. The usual error measure is the sum of squares (or residual variance) over all channels. This is implemented in the DIPOLEFITTING function. The usual model parameters are partially linearly related to the data (i.e. dipole moment, [qx qy qz]) and partially nonlinear (dipole position, [rx ry rz]). The optimization technique implemented in DIPOLEFITTING uses decoupling to estimate both linear and nonlinear part optimally. Is in your forward model the dipole moment (incorporating orientation and strength in a 3x1 vector [qx qy qz]) linear with the data? I think it is. Then you can use the standard implementation in DIPOLEFITTING. If it were non-linear, the implementation would have to be adjusted to prevent the decoupling of linear and nonlinear parameters, and you would have to fit all 6 parameters nonlinearly. > My data consists of x,y,z, (coordinates) and v (single potential > value). My data is not even EEG data, I am just using the EEG > approach > for my research. To make use of the dipole fitting function in Fieldtrip, you would have to add your forward model to the low-level "compute_leadfield" function, which is in the private directory. For each iteration of the non-linear fit, that function is called and it is supposed to return the model leadfield. It would be nice in general to have the Zhang 1995 model included in Fieldtrip. I think that the Mosher 1999 results in exactly the same leadfields as the 4-shell model that we already have, so that would not be too interesting to include (unless it is faster). Please contact me directly outside the mailing list if you have technical questions on how to add your code to compute_leadfield. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Thu Apr 27 11:04:16 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 27 Apr 2006 11:04:16 +0200 Subject: Neuromag 306 channel data import In-Reply-To: <4450760E.6010307@neuro.hut.fi> Message-ID: Hi Yisheng Some additional comments: >> Any one can provide a "cookbook" reference for how to import the >> raw and averaged fif files into FieldTrip? > Neuromag fif files should be directly accessible by the standard > FieldTrip functions for opening/reading MEG/EEG data files. Try > first with read_fcdc_header() to get the "meta information" and > then with read_fcdc_data() to actually read some data from the > file. These functions should work both with raw/continuous and > averaged data. The functions from the meg-pd are not included in Fieldtrip, you have to add them seperately to your matlab path. > NB: I just downloaded the newest daily FieldTrip release and > noticed that read_fcdc_data is unable to retrieve data when the > requested span extends over a buffer boundary. I will look into > this and try to fix it. I did not know whether the blocks in the data are trials (with a potential gap in between) or buffers. In case of continuous blocked data, you would set the last argment of dat = read_fcdc_data(datfile, hdr, begsample, endsample, chanindx, continuous) i.e. the continuous to 1. Then it will not perform the boundary check. To get this behaviour in fieldtrip prepropcessing, you should specify cfg.datatype='continuous'. best regards, Robert From lauri at NEURO.HUT.FI Thu Apr 27 12:21:53 2006 From: lauri at NEURO.HUT.FI (Lauri Parkkonen) Date: Thu, 27 Apr 2006 13:21:53 +0300 Subject: Neuromag 306 channel data import In-Reply-To: <6426DDCF-358C-4D67-BF6B-827C6CECB2AE@fcdonders.ru.nl> Message-ID: Hi Yisheng and Robert, >>> Any one can provide a "cookbook" reference for how to import the >>> raw and averaged fif files into FieldTrip? >> >> Neuromag fif files should be directly accessible by the standard >> FieldTrip functions for opening/reading MEG/EEG data files. Try >> first with read_fcdc_header() to get the "meta information" and then >> with read_fcdc_data() to actually read some data from the file. >> These functions should work both with raw/continuous and averaged data. > > The functions from the meg-pd are not included in Fieldtrip, you have > to add them seperately to your matlab path. Yes, sorry, I forgot to mention this. >> NB: I just downloaded the newest daily FieldTrip release and noticed >> that read_fcdc_data is unable to retrieve data when the requested >> span extends over a buffer boundary. I will look into this and try >> to fix it. > > > I did not know whether the blocks in the data are trials (with a > potential gap in between) or buffers. In case of continuous blocked > data, you would set the last argment of > dat = read_fcdc_data(datfile, hdr, begsample, endsample, chanindx, > continuous) > i.e. the continuous to 1. Then it will not perform the boundary > check. To get this behaviour in fieldtrip prepropcessing, you should > specify cfg.datatype='continuous'. The Neuromag fif files do not support the epoch/trial mode. Thus, the continuous flag should (always) be set to 1 when working with Neuromag raw data. However, the raw data files may still contain multiple segments if the recording was paused, for example, but these segments are usually much longer than one trial. I had modified my own version of the read routine in such a way that it assumes continuous files but does check for possible gaps within the requested span and returns with an error if there is one. Hence the difference w.r.t. the official version. To avoid spamming everybody on the list, I'll check with Robert directly if we can update the Neuromag import routines. Cheers, Lauri -- ----------------------------------------------- Lauri Parkkonen Brain Research Unit, Low Temperature Laboratory Helsinki University of Technology Otakaari 3 A, 02150 ESPOO, FINLAND tel: +358-9-4512965 fax: +358-9-4512969 mailto:lauri at neuro.hut.fi http://boojum.hut.fi From ejackson at UNM.EDU Thu Apr 27 20:12:08 2006 From: ejackson at UNM.EDU (Eric Jackson) Date: Thu, 27 Apr 2006 20:12:08 +0200 Subject: Reading continuous data files - chanindx error Message-ID: Thanks for your help. From stephan.bickel at ANATOM.UNIZH.CH Sat Apr 1 02:02:44 2006 From: stephan.bickel at ANATOM.UNIZH.CH (Stephan Bickel) Date: Sat, 1 Apr 2006 02:02:44 +0200 Subject: besa2fieldtrip problems Message-ID: Hi, I have problems importing tfc-files into fieldtrip. I exported time-frequency transformations from BESA (to tfc-files) and tried to import them into fieldtrip with the besa2fieldtrip function. I always get get an error-message. I am using the fieldtrip version 'fieldtrip-20060330'. this is what I did: cd ('G:\EEG_data\exports\'); % this is the list of BESA datafiles in one condition filename_A = { 'RS-ax_ERP_TSE_allA.tfc' 'MS-ax_ERP_TSE_allA.tfc' 'ED-ax_ERP_TSE_allA.tfc' }; % this is the list of BESA datafiles in the other condition filename_B = { 'RS-ax_ERP_TSE_allB.tfc' 'MS-ax_ERP_TSE_allB.tfc' 'ED-ax_ERP_TSE_allB.tfc' }; nsubj = length(filename_B); % collect all single subject data in a cell-array for i= 1:nsubj B{i} = besa2fieldtrip(filename_B{i}); A{i} = besa2fieldtrip(filename_A{i}); end and this is the error-message: >> for i= 1:nsubj B{i} = besa2fieldtrip(filename_B{i}); A{i} = besa2fieldtrip(filename_A{i}); end ??? Error using ==> colon First and last colon operands must be char. Error in ==> fieldtrip-20060330\private\read_besa_tfc at 73 Time = [TimeStartInMS:TimeIntervalInMS:(NumberTimeSamples-1)*TimeIntervalInMS+TimeStartInMS]; Error in ==> besa2fieldtrip at 81 [ChannelLabels, Time, Frequency, Data, Info] = read_besa_tfc(filename); I might have made some stupid mistake but can anyone see what went wrong? Thanks very much for your help, Stephan From muthuraman10 at HOTMAIL.COM Mon Apr 3 11:00:22 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 3 Apr 2006 09:00:22 +0000 Subject: query on coherence and layout In-Reply-To: Message-ID: hello I have used freqdescriptives to calculate the coherence between EEG and EMG the problem is i get a very less coherence value from 0.01 to 0.1 is there the range specified in the programs and what is the method you use to calculate the coherence can you give a brief explanation i have also a problem with the layout i would like to create my own layout if it is possible how it can be done because in the the previous mail you have mentioned about the elec1010 layout file but it does not match my requirements do i need the CTF software for this in all the layout files it is mentioned to be CTF 151 and so on. thanking you with regards muthu >From: Muthuraman Muthuraman >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on channel arrangement >Date: Thu, 23 Feb 2006 10:32:13 +0000 > >hello > >Thanks Jan > >We have the data for EEG taken with 64-channel(Neuroscan) arrangement >and i need to specify channel arrangement >when i want to calculate the coherence between EEG and EMG > >so for example : in real data > >FPZ- 45 -in the EEG channel arrangement >AF7-41 -in the EEG channel arrangement > >M1-29- EMG channel >M2-30-EMG channel >M3-63-EMG channel >M4-64-EMG channel > >but when i calculate the coherence i want them in the 64-channel layout >instead of 151 layout > >and to change the channels in the coherence plot as >for example- >FPZ-1 -in the coherence plot >AF7-2 -in the coherence plot > >M1-52-in the coherence plot >M2-53-in the coherence plot >M3-54-in the coherence plot >M4-55-in the coherence plot > >Like this i wanted to change the channel arrangement in the coherence plot >for all the channels >how can i change it, please can you give me some idea regarding this > >with regards >muthu > > >>From: Jan Mathijs Schoffelen >>Reply-To: FieldTrip discussion list >>To: FIELDTRIP at NIC.SURFNET.NL >>Subject: Re: [FIELDTRIP] query on loading CNT files >>Date: Tue, 21 Feb 2006 12:37:17 +0100 >> >>Dear Muthuraman, >> >>I guess that you should specify the files which the preprocessing-function >>is going to read in. So you should specify a >> >>cfg.headerfile (which causes your crash, since you left it empty) >> >>and a >> >>cfg.datafile >> >>In your case I would try: >> >>cfg.headerfile = headerfile; >>cfg.datafile = headerfile; (since as far as I know, these are one and >>the >>same). >> >>Good luck, >> >>Jan-Mathijs >> >>PS: Since you already manually defined your trials, you do not need to >>call >>Definetrial anymore (so the step: [cfg] = definetrial(cfg) can be omitted) >> >>-----Original Message----- >>From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On >>Behalf >>Of Muthuraman Muthuraman >>Sent: Tuesday, February 21, 2006 11:27 AM >>To: FIELDTRIP at NIC.SURFNET.NL >>Subject: Re: [FIELDTRIP] query on loading CNT files >> >>hello >> >>I have tried what you have suggested me in the previous mail >>and i have attached the steps i have performed in matlab and the error >>also >> >>if i skip the preprocessing step >>and go for the calculation of coherence using freqanalysis >>how to specify data in that case for the function >>(freq=freqanalysis(cfg,data)); >>please give me suggestion on this >> >> >> >> >>headerfile='pd_mof_tr0_o_0307.cnt'; >> >>hdr = read_fcdc_header(headerfile); >>Loading file pd_mof_tr0_o_0307.cnt ... >> >>cfg.trl = []; >>for i=1:floor(hdr.nSamples/hdr.Fs) >> cfg.trl(i,1) = (i-1)*hdr.Fs + 1; >> cfg.trl(i,2) = (i )*hdr.Fs; >> cfg.trl(i,3) = 0; >>end >> >>cfg >> >>cfg = >> >> trl: [172x3 double] >> >>[cfg] = definetrial(cfg); >>retaining exist trial definition >>found 0 events >>created 172 trials >> >> >>data=preprocessing(cfg); >>??? Error using ==> read_fcdc_header >>file '' does not exist >> >>Error in ==> C:\muthu\work\fieldtrip-20060131\preprocessing.m >>On line 236 ==> hdr = read_fcdc_header(cfg.headerfile); >> >> >> >> >>with regards >>muthuraman >> >> >> >> >From: Robert Oostenveld >> >Reply-To: FieldTrip discussion list >> >To: FIELDTRIP at NIC.SURFNET.NL >> >Subject: Re: [FIELDTRIP] query on loading CNT files >> >Date: Tue, 24 Jan 2006 13:54:16 +0100 >> > >> >The relevant warning seems to be >> > >> >>Warning: no events found in pd_mof_tr0_o_0307.cnt >> > >> >That means that the low level code used to read the CNT file does not >>find >> >> >any triggers in your datafile. That either means that the low level >> >reading function (private/read_ns_cnt.m) has a bug, or that your data >>does >> >> >not contain any triggers. >> > >> >If it does not contain triggers (i.e. if there are no trials in the >>data), >> >> >you should make your own cfg.trl field prior to calling PREPROCESSING >>and >> >skip preprocessing. The documentation of DEFINETRIAL explains what >>cfg.trl >> >> >means. I suggest that you try something like >> > >> >hdr = read_fcdc_header(headerfile); >> >cfg.trl = []; >> >for i=1:floor(hdr.nSamples/hdr.Fs) >> > cfg.trl(i,1) = (i-1)*hdr.Fs + 1; % begin sample of each trial >> > cfg.trl(i,2) = (i )*hdr.Fs; % end sample >> > cfg.trl(i,3) = 0; % offset, i.e. relative location >>of >> >the time axis >> >end >> >data = preprocessing(cfg); >> > >> >This segments your continuous data in trials of one second length. >> > >> >best, >> >Robert >> > >> > >> > >> >On 24-jan-2006, at 11:46, Muthuraman Muthuraman wrote: >> > >> >>hello >> >> >> >>I am beginner with field trip >> >>as in the previous mail i have asked about the query on loading CNT >>files >> >>and according to the reply i need to call the function DEFINETRAIL >> >>in the function DEFINETRAIL i have to use the READ_FCDC_EVENT to find >>the >> >> >>events in the data >> >>which gave warnings >> >> >> >>i have attached in the mail what were exactly the steps carried out >>for >> >>the EEG analysis >> >> >> >>'pd_mof_tr0_o_0307.cnt' is the file which contains the data >> >> >> >> >> >> >>headerfile='pd_mof_tr0_o_0307.cnt'; >> >>>>[hdr] = read_fcdc_header(headerfile); >> >>Loading file pd_mof_tr0_o_0307.cnt ... >> >>>>hdr >> >> >> >>hdr = >> >> >> >> Fs: 1000 >> >> nChans: 64 >> >> nSamples: 172040 >> >> nSamplesPre: 0 >> >> nTrials: 1 >> >> label: {1x64 cell} >> >> >> >>>>datafile='pd_mof_tr0_o_0307.cnt';begsample=1;endsample=172;chanindx= >> >>>>64;continuous=1; >> >>>>[dat] = read_fcdc_data(datafile, hdr, begsample, endsample, >>chanindx, >> >>>>continuous); >> >>Loading file pd_mof_tr0_o_0307.cnt ... >> >>done >> >>>>filename='pd_mof_tr0_o_0307.cnt'; >> >>>>[event] = read_fcdc_event(filename) >> >>Warning: handling of event structure has not been fully tested for >> >>Neuroscan *.cnt files >> >>>In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 414 >> >>Loading file pd_mof_tr0_o_0307.cnt ... >> >>done >> >>Warning: no events found in pd_mof_tr0_o_0307.cnt >> >>>In C:\muthu\work\fieldtrip-20060118\read_fcdc_event.m at line 620 >> >> >> >>event = >> >> >> >> [] >> >> >> >> >> >>Thanking you >> >>with regards >> >>muthuraman >> >> >> >>>From: Robert Oostenveld >> >>>Reply-To: FieldTrip discussion list >> >>>To: FIELDTRIP at NIC.SURFNET.NL >> >>>Subject: Re: [FIELDTRIP] query on loading CNT files >> >>>Date: Wed, 18 Jan 2006 21:20:37 +0100 >> >>> >> >>>Dear Muthuraman >> >>> >> >>>All analyses start by calling the PREPROCESSING function, which reads >> >>>the data segments of interest into memory. Prior to that, you should >> >>>call DEFINETRIAL to determine the data segments of interest (usually >> >>>based on the triggers present in the datafile). Please see the help >>of >> >>>those two functions (type "help function_name" on the matlab command >> >>>line) or look at http:// www2.ru.nl/fcdonders/fieldtrip/ >>reference.html >> >>> >> >>>best regards >> >>>Robert >> >>> >> >>> >> >>>On 18-jan-2006, at 11:44, Muthuraman Muthuraman wrote: >> >>> >> >>>>hello >> >>>> >> >>>>I would like to use fieldtrip to analyse EEG recordings >> >>>>how to load CNT files which contains the data >> >>>>how can i load the data and do the analysis >> >>>> >> >>>> >> >>>>with regards >> >>>>muthuraman >> >>>> >> >>> >> >>> >> >>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >>>Robert Oostenveld, PhD >> >>>F.C. Donders Centre for Cognitive Neuroimaging >> >>>Radboud University Nijmegen >> >>>phone: +31-24-3619695 >> >>>http://www.ru.nl/fcdonders/ >> >>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> From r.oostenveld at FCDONDERS.RU.NL Mon Apr 3 22:13:24 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 3 Apr 2006 22:13:24 +0200 Subject: besa2fieldtrip problems In-Reply-To: Message-ID: On 1 Apr 2006, at 2:02, Stephan Bickel wrote: > ??? Error using ==> colon > First and last colon operands must be char. > > Error in ==> fieldtrip-20060330\private\read_besa_tfc at 73 > Time = > [TimeStartInMS:TimeIntervalInMS:(NumberTimeSamples-1) > *TimeIntervalInMS+TimeStartInMS]; > > Error in ==> besa2fieldtrip at 81 > [ChannelLabels, Time, Frequency, Data, Info] = read_besa_tfc > (filename); There may be a difference in the version of your TFC file and the one that the importer was written for. I suggest that you use the Matlab debugger to put a breakpoint at line 81 in the code, and look at the value of TimeStartInMS. It seems not to be a regular number, which it is supposed to be. > I might have made some stupid mistake but can anyone see what went > wrong? If you cannot figure it out using the debugger, send me one of your tfc files (not through the mailing listm but direct). best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Mon Apr 3 22:22:02 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 3 Apr 2006 22:22:02 +0200 Subject: query on coherence and layout In-Reply-To: Message-ID: Hi Muthuraman On 3 Apr 2006, at 11:00, Muthuraman Muthuraman wrote: > I have used freqdescriptives to calculate the coherence between EEG > and EMG > the problem is i get a very less coherence value from 0.01 to 0.1 > is there the range specified in the programs Coherence in the range from 0.01 to 0.1 in itself is not uncommon. The values depend on the number of trials and tapers (since it is a biassed measure). You should look at its spectral distribution and on the scalp topography to see whether it makes sense. > and what is the method you use to calculate the coherence can you > give a brief explanation Coherence is explained in books on signal processing, or you can do a google for it. In Matlab you can also type "help CSD". > i have also a problem with the layout > i would like to create my own layout if it is possible > how it can be done > because in the the previous mail you have mentioned about the > elec1010 layout file > but it does not match my requirements > do i need the CTF software for this in all the layout files it is > mentioned to be CTF 151 and so on. You should open one of the layout files in a text editor as example. The columns are number, xpos, ypos, width, height, label You can manually make your own layout file in a text editor, or using some custom matlab code if you already know within Matlab what your electrode locations are. best regards, Robert From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed Apr 19 11:01:47 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 19 Apr 2006 11:01:47 +0200 Subject: subplots in topolotER and comment Message-ID: I'm trying to make a figure with 15 subplots with topoplotER. However, the comment is not placed in the right position (see ataached figure). For a subplot it would be nice if the comment would be printed above the plot. Also, is it possible to only plot my own comment, and not plot the following? xlim (time)=[0 0.05] ylim (freq)=[3 6] zlim (powspctrm)=[-2e-28 2e-28] Because so much comment is a bit to much in a subplot, only the time would be enough. Thanks a lot, Ingrid -------------- next part -------------- A non-text attachment was scrubbed... Name: toposubplots.png Type: image/x-png Size: 103892 bytes Desc: not available URL: From Daniel.Jokisch at FCDONDERS.RU.NL Wed Apr 19 16:42:28 2006 From: Daniel.Jokisch at FCDONDERS.RU.NL (Daniel Jokisch) Date: Wed, 19 Apr 2006 16:42:28 +0200 Subject: beamforming: length of data pieces Message-ID: Hi, I am localizing oscillatory sources using beamforming. When comparing the activation in the prestimulus to the activation in the poststimulus interval I was wondering if the data pieces must have the same length. A prerequisite is that the length of a data piece must have the length of a fix number of oscillatory cycles. Is it theoretically possible to compare activation in a prestimulus interval to activation in a poststimulus interval which is twice as long as the prestimulus interval? A second question concerns the averaging over the same subjects in different recording sessions (meaning that there are two sets of headlocalization parameters and two headmodels for the same subject). Is it necessary to normalize the data before using the function sourcegrandaverage or can I use directly the output of the function sourceanalysis as input for sourcegrandaverage? Best, Daniel -- Daniel Jokisch, PhD F.C. Donders Centre for Cognitive Neuroimaging P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Phone: +31 24 36 68294 Fax : +31 24 36 10989 http://www.ru.nl/fcdonders/ From r.oostenveld at FCDONDERS.RU.NL Wed Apr 19 17:25:32 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 19 Apr 2006 17:25:32 +0200 Subject: beamforming: length of data pieces In-Reply-To: <44464C54.30904@fcdonders.ru.nl> Message-ID: Hi Daniel, On 19 Apr 2006, at 16:42, Daniel Jokisch wrote: > I am localizing oscillatory sources using beamforming. When > comparing the activation in the prestimulus to the activation in > the poststimulus interval I was wondering if the data pieces must > have the same length. > A prerequisite is that the length of a data piece must have the > length of a fix number of oscillatory cycles. Is it theoretically > possible to compare activation in a prestimulus interval to > activation in a poststimulus interval which is twice as long as the > prestimulus interval? It is possible to compare different lengths, but a direct comparison is not valid, or at least difficult: 1) the frequency resolution in the longer segment (either before or after the stimulus) is higher, resulting in a different amount of spectral bleeding/leakage. 2) the amount of data in the longer segment is higher, resulting in a better estimation of your signal compared to the noise. If you fit a sine wave to a twice-as-long segment, it will be less affected by noise. So if the direct comparison between the two shows a difference, that difference can be (trivially) explained by different frequency resolutions or amounts of noise. You can try to compensate for the amount of noise by comparing the neural activity index (beamed power divided by estimated beamed noise), but that does not solve the different frequency resolutions. You could compensate the difference in frequency resolution by splitting the long post-stimulus interval in two sections, and estimate the power on each of them and average (i.e. you would have twice as many trials), which is a simplified version of Welch power estimate with no overlap. So there are tricks available with which you can make the comparison less problematic, but they are not nice. Also a statistical comparison using a parametric or non-parametric (randomization) tests would be messy. So I suggest to sacrifice some of your post stimulus data to make the intervals equally long. Alternatively, a better idea is to use a time-frequency decomposition over the whole interval, and compare each post-stimulus TFR frame to the single pre-stimulus TFR frame. That could be done in a methodologically and statistically clean comparison. > A second question concerns the averaging over the same subjects in > different recording sessions (meaning that there are two sets of > headlocalization parameters and two headmodels for the same > subject). Is it necessary to normalize the data before using the > function sourcegrandaverage or can I use directly the output of the > function sourceanalysis as input for sourcegrandaverage? No, you want to spatially normalize your functional data before averaging. The averaging is done on the same voxel over subjects, therefore you want voxel (i,j,k) in subject 1 to correspond anatomically with voxel (i,j,k) in subject 2. See http://www2.ru.nl/ fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:analysis_protocols#source_reconstruction_for_ multiple_subjects best regards, Robert From nohnplusultra at GMX.DE Thu Apr 20 10:45:13 2006 From: nohnplusultra at GMX.DE (Claudia Nohn) Date: Thu, 20 Apr 2006 10:45:13 +0200 Subject: clusterrandanalysis Message-ID: dear all, i just began learning fieldtrip and am momentarilly busy with clusterrandanalysis. perhaps someone can answer some of my questions: which hypothesis is actually tested by the t-tests concerning the channel-time-frequency-triplets? and why are�nt all triplets included using an alphtresh-value of 1.0? does neighbourdist mean: MAXIMAL distance from neighbours? how do i know for which triplet one specific p-value/cluster-level-statistic etc. stands? are only significant effects plotted by topoplotTFR? for a two-sided test: which direction do the negative or the positive clusters have? is the power of the first ore the second data bigger or smaller? how are more than two conditions compared (i have two independent variables, each having two levels, and two groups who are sensitized at the left and right side of the body, repectively. so i�m comparing up to eight channel-time-frequency-arrays.) From maris at NICI.RU.NL Thu Apr 20 12:13:44 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 20 Apr 2006 12:13:44 +0200 Subject: clusterrandanalysis Message-ID: Dear Claudia, > i just began learning fieldtrip and am momentarilly busy with > clusterrandanalysis. perhaps someone can answer some of my questions: > which hypothesis is actually tested by the t-tests concerning the > channel-time-frequency-triplets? Clusterrandanalysis does not test hypothesis at the level of channel-time-frequency triplets (also called "samples"). Instead, it tests the null hypothesis that the data in the two (or more) experimental conditions come from the same probability distribution. The sample-specific t-statistics are used to construct clusters, namely by thresholding them, followed by clustering on the basis of spatial, temporal, and spectral adjacency. From a theoretical perspective, the t-statistic is not important at all. One can also use the Honolulu-statistic (which does not exist) if there is a sensible way of thresholding it. Clusterrandanalysis controls the false alarm rate by calculating a randomization p-value for the maximum cluster-level statistic. No parametric sampling distribution (such as the T-distribution) is required to control the false alarm rate. and why are´nt all triplets included using > an alphtresh-value of 1.0? If you set alphathresh at 1.0, you want all samples to be joined in a single cluster, regardless of the size of the effect at the sample-level. This does not make sense. Leave alphathresh at its default value 0.05. If you are just starting with clusterrandanalysis, you will not gain anything by playing with it. > does neighbourdist mean: MAXIMAL distance from neighbours? Yes, neighbourdist is the maximal distance between two sensors that are considered as neighbours. > how do i know for which triplet one specific > p-value/cluster-level-statistic > etc. stands? p-values are computed for clusters, not for samples (unless you specify cfg.makeclusters='no'). > are only significant effects plotted by topoplotTFR? The effects you plot by topoplotTFR depend on what you ask topoplotTFR to plot for you. This is specified by the cfg.zparam field. In the clusterrandanalysis tutorial on the Fieldtrip homepage, I used masking to select the significant clusters. > for a two-sided test: which direction do the negative or the positive > clusters have? is the power of the first ore the second data bigger or > smaller? A positive cluster means that the samples in this cluster have a larger value in condition 1 than in condition 2. For negative clusters, the reverse holds. > how are more than two conditions compared (i have two independent > variables, > each having two levels, and two groups who are sensitized at the left and > right side of the body, repectively. so i´m comparing up to eight > channel-time-frequency-arrays.) Clusterrandanalysis can only be used to test main effects. Clusterrandanalysis can perform sample-specific comparisons for more than two levels (eight, in your case) by means of an F-statistic. However, I strongly advise you to first analyze your data for every independent variable separately, each time ignoring the other two independent variables. This amounts to using an independent samples t-statistic (if the independent variable is between-subjects) or a paired samples t-statistic (if the independent variable is within-subjects). good luck, Eric Maris From NohnPlusUltra at GMX.DE Thu Apr 20 13:04:46 2006 From: NohnPlusUltra at GMX.DE (Claudia Nohn) Date: Thu, 20 Apr 2006 13:04:46 +0200 Subject: clusterrandanalysis Message-ID: thanks a lot. > --- Ursprüngliche Nachricht --- > Von: Eric Maris > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] clusterrandanalysis > Datum: Thu, 20 Apr 2006 12:13:44 +0200 > > Dear Claudia, > > > > i just began learning fieldtrip and am momentarilly busy with > > clusterrandanalysis. perhaps someone can answer some of my questions: > > which hypothesis is actually tested by the t-tests concerning the > > channel-time-frequency-triplets? > > Clusterrandanalysis does not test hypothesis at the level of > channel-time-frequency triplets (also called "samples"). Instead, it tests > the null hypothesis that the data in the two (or more) experimental > conditions come from the same probability distribution. The > sample-specific > t-statistics are used to construct clusters, namely by thresholding them, > followed by clustering on the basis of spatial, temporal, and spectral > adjacency. From a theoretical perspective, the t-statistic is not > important > at all. One can also use the Honolulu-statistic (which does not exist) if > there is a sensible way of thresholding it. Clusterrandanalysis controls > the > false alarm rate by calculating a randomization p-value for the maximum > cluster-level statistic. No parametric sampling distribution (such as the > T-distribution) is required to control the false alarm rate. > > and why are´nt all triplets included using > > an alphtresh-value of 1.0? > > If you set alphathresh at 1.0, you want all samples to be joined in a > single > cluster, regardless of the size of the effect at the sample-level. This > does > not make sense. Leave alphathresh at its default value 0.05. If you are > just > starting with clusterrandanalysis, you will not gain anything by playing > with it. > > > > does neighbourdist mean: MAXIMAL distance from neighbours? > > Yes, neighbourdist is the maximal distance between two sensors that are > considered as neighbours. > > > > how do i know for which triplet one specific > > p-value/cluster-level-statistic > > etc. stands? > > p-values are computed for clusters, not for samples (unless you specify > cfg.makeclusters='no'). > > > are only significant effects plotted by topoplotTFR? > > The effects you plot by topoplotTFR depend on what you ask topoplotTFR to > plot for you. This is specified by the cfg.zparam field. In the > clusterrandanalysis tutorial on the Fieldtrip homepage, I used masking to > select the significant clusters. > > > for a two-sided test: which direction do the negative or the positive > > clusters have? is the power of the first ore the second data bigger or > > smaller? > > A positive cluster means that the samples in this cluster have a larger > value in condition 1 than in condition 2. For negative clusters, the > reverse > holds. > > > how are more than two conditions compared (i have two independent > > variables, > > each having two levels, and two groups who are sensitized at the left > and > > right side of the body, repectively. so i´m comparing up to eight > > channel-time-frequency-arrays.) > > Clusterrandanalysis can only be used to test main effects. > Clusterrandanalysis can perform sample-specific comparisons for more than > two levels (eight, in your case) by means of an F-statistic. However, I > strongly advise you to first analyze your data for every independent > variable separately, each time ignoring the other two independent > variables. > This amounts to using an independent samples t-statistic (if the > independent > variable is between-subjects) or a paired samples t-statistic (if the > independent variable is within-subjects). > > > good luck, > > Eric Maris > -- Analog-/ISDN-Nutzer sparen mit GMX SmartSurfer bis zu 70%! Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer From ejackson at UNM.EDU Fri Apr 21 18:45:06 2006 From: ejackson at UNM.EDU (Eric Jackson) Date: Fri, 21 Apr 2006 18:45:06 +0200 Subject: Reading continuous data files - chanindx error Message-ID: I am trying to run "preprocessing" with a continuous data set from a 275- channel CTF machine, but I get an error in the function read_ctf_meg4 saying, "No channels were specified fr reading CTF data." The channel specification used in the cfg file is "cfg.channel = {'MEG' 'STIM']". Examining the function, it looks like nothing is being passed to "chanindx". Is the problem with my channel specification or elsewhere? Any assistance would be appeciated. Thank you. From tomh at KURAGE.NIMH.NIH.GOV Sat Apr 22 01:43:24 2006 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd) Date: Fri, 21 Apr 2006 19:43:24 -0400 Subject: Reading continuous data files - chanindx error In-Reply-To: Message-ID: > I have triggers on UPPT002 according to DataEditor. Ah, that's the problem. If you look in fieldtrip/private/read_ctf_trigger.m you'll see that it only checks the 001 and STIM channels. You could just change the UPPT001 to UPPT002, and it'll work. There should be a better general solution to this, but I don't know what it is. Internally all the stim channels have a type code, and we could make an array that indexes all the stim channels that way, instead of the chain of ifs used at present. From r.oostenveld at FCDONDERS.RU.NL Sun Apr 23 22:33:01 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Sun, 23 Apr 2006 22:33:01 +0200 Subject: Reading continuous data files - chanindx error In-Reply-To: Message-ID: Hi Eric, hi Tom, Since we are not using the new electronics and the new trigger channels at the FCDC, this never has been a problem for us, luckily Tom has experience with it. We are currently in the process of rewriting the read_fcdc_header/data/event functions, and I am planning to make the different trigger types in the new CTF dataformat explicitely available under the name of the channel. So instead of a "backpanel trigger" and "frontpanel trigger", there will be a "STIM" event, a "UPPT001" event and similar events for all trigger channels (i.e. based on the type code). Robert On 22 Apr 2006, at 1:43, Tom Holroyd wrote: >> I have triggers on UPPT002 according to DataEditor. > > Ah, that's the problem. If you look in > fieldtrip/private/read_ctf_trigger.m > you'll see that it only checks the 001 and STIM channels. You > could just change the UPPT001 to UPPT002, and it'll work. > > There should be a better general solution to this, but I don't know > what it is. Internally all the stim channels have a type code, and > we could make an array that indexes all the stim channels that way, > instead of the chain of ifs used at present. > From floris.delange at FCDONDERS.RU.NL Mon Apr 24 13:49:55 2006 From: floris.delange at FCDONDERS.RU.NL (Floris de Lange) Date: Mon, 24 Apr 2006 13:49:55 +0200 Subject: topoplotTFR error? Message-ID: Dear fieldtrippers, When using topoplotTFR, since today I get the following error: ??? Input argument "Y" is undefined. Error in ==> fieldtrip/private/topoplot at 77 Xpos = -0.45+0.9*(Y - min(Y)) /(max(Y) - min(Y)); Error in ==> topoplotER at 268 topoplot(cfg,datavector); Error in ==> topoplotER at 170 topoplotER(cfg, data); Error in ==> topoplotTFR at 72 topoplotER(cfg, varargin{:}); As far as I can remember, this function worked fine for me last week, so I'm wondering if I'm doing something stupid or whether there is a bug in the function. Any ideas? Thanks, Cheers, Floris From jciveira at UNAV.ES Mon Apr 24 16:55:43 2006 From: jciveira at UNAV.ES (Juan Civeira) Date: Mon, 24 Apr 2006 16:55:43 +0200 Subject: Volume conduction models for EEG Message-ID: Hi, I am making my master thesis about coherent sources using data from EEG. I have done the tutorial of beamforming and I have done several analysis with my own data and the results are quite good but I know that they can be better. I have used the multiple spheres model and now I want to use a realistic model but I don�t have the software. I have looked for it on the internet but I only found commercial software. Does anyone know any freeware to create a realistic model for EEG? I have the data and I also have a MRI and I want to use them all for displaying the results. Moreover, Fieldtrip supports all forward models supported by the Neuromag meg-calc toolbox. Is there any way of making one of those models without using the commercial software? Thank you very much Juan Civeira Neurociencias - Lab. Neurofisiologia de Sistemas Fundacion para la Investigacion Medica Aplicada Edificio CIMA Pio XII, 55 31080 Pamplona (Spain) http://www.unav.es/cima From ejackson at UNM.EDU Mon Apr 24 21:21:47 2006 From: ejackson at UNM.EDU (Eric Jackson) Date: Mon, 24 Apr 2006 21:21:47 +0200 Subject: Reading continuous data files - chanindx error Message-ID: Thank you. Changing the read_CTF_trigger function did resolve that issue. Now, I have a new channel issue. When preprocessing reaches "evaluating artifact_eog", I get the following message: ??? Error useing ==> artifact_zvalue no channels selected Any further assistance would be appreciated. Thanks. From r.oostenveld at FCDONDERS.RU.NL Mon Apr 24 21:50:59 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 24 Apr 2006 21:50:59 +0200 Subject: Reading continuous data files - chanindx error In-Reply-To: Message-ID: type "help artifact_eog" and you will see % The configuration parameters that you can set are % cfg.artfctdef.eog.sgn = 'EOG' see CHANNELSELECTION This specifies the channels (signals) in which the routine searches for artifacts. See "help channelselection" for the syntax of specifying channels. best Robert On 24 Apr 2006, at 21:21, Eric Jackson wrote: > Thank you. Changing the read_CTF_trigger function did resolve that > issue. > > Now, I have a new channel issue. When preprocessing reaches > "evaluating > artifact_eog", I get the following message: > > ??? Error useing ==> artifact_zvalue > no channels selected > > Any further assistance would be appreciated. Thanks. > From r.oostenveld at FCDONDERS.RU.NL Mon Apr 24 21:59:33 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 24 Apr 2006 21:59:33 +0200 Subject: Volume conduction models for EEG In-Reply-To: Message-ID: Hi Juan On 24 Apr 2006, at 16:55, Juan Civeira wrote: > I am making my master thesis about coherent sources using data from > EEG. > > I have done the tutorial of beamforming and I have done several > analysis > with my own data and the results are quite good but I know that > they can be > better. You can use a standard realistic volume conductor model in Fieldtrip. Such a model is not yet available from the fieldtrip homepage or ftp server, but recently I did construct a standard BEM model for Fieldtrip bvased on the MNI/SPM brain. It is included in the beta version of the DIPFIT2 plugin for EEGLAB (the dipfit plugin uses a subset of Fieldtrip). See http://www.sccn.ucsd.edu/eeglab/ eeglab5.0b.html > I have used the multiple spheres model and now I want to use a > realistic > model but I don´t have the software. I have looked for it on the > internet > but I only found commercial software. I can think of Curry, EMSE, BESA, ASA as commercial software. You can try to get a try-out copy of one of those software products. > Does anyone know any freeware to create a realistic model for EEG? > I have > the data and I also have a MRI and I want to use them all for > displaying the > results. Brainstorm from Mosher and colleagues is open source and includes a complete implementation of BEM for EEG. See the external links page on the fieldtrip site. > Moreover, Fieldtrip supports all forward models supported by the > Neuromag > meg-calc toolbox. Is there any way of making one of those models > without > using the commercial software? No, the meg-calc toolbox is commercial, and relies on additional software from Neuromag. best regards, Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From jciveira at UNAV.ES Wed Apr 26 11:39:18 2006 From: jciveira at UNAV.ES (Juan Civeira) Date: Wed, 26 Apr 2006 11:39:18 +0200 Subject: Volume conduction models for EEG Message-ID: Thanks for the other help but now I have another question: I have used the model on EEGLAB and I have my electrodes alligned with the BEM but I do not know how to export both, the model and the electrodes, to Fieldtrip. I have tried to use directly the field on EEGLAB EEG.dipfit.hdmfile in Fieldtrip but the resulting grid is so huge that is useless. So, in summary, I have my electrodes alligned with the BEM model present in EEGLAB and I want to export both to Fieldtrip and apply a beamformer. Thanks again Juan Civeira Neurociencias - Lab. Neurofisiologia de Sistemas Fundacion para la Investigacion Medica Aplicada Edificio CIMA Pio XII, 55 31080 Pamplona (Spain) http://www.unav.es/cima From R.Oostenveld at FCDONDERS.RU.NL Wed Apr 26 14:14:15 2006 From: R.Oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 26 Apr 2006 14:14:15 +0200 Subject: Fieldtrip analysis of Yokogawa format In-Reply-To: <444DE802.3050707@apollo3.brl.ntt.co.jp> Message-ID: Dear Kaoru On 25 Apr 2006, at 11:12, Kaoru Amano wrote: > We are using MEG system of Yokogawa, and very much interested in > source > estimation of e.g. gamma band activity. According to the Wiki, > Yokogawa > format (*.sqe, *.ave, *.con, *.raw) seems to be supported. But the > following error message appeared and I couldn't load the data. > "Undefined command/function 'yokogawa2grad'." (Actually, I couldn't > find > the file "yokogawa2grad.m"). The file indeed is missing in the ftp version, please find it atatched. It will be automatically included in future releases on the ftp server. However, looking in the file I do notice that it is not yet complete. I suggest that you read http://www2.ru.nl/fcdonders/ fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#how_are_electrodes _magnetometers_or_gradiometers_described and that you complete the missing section of the yokogawa2grad function (indicated with "FIXME"). > Since I can load the data into Matlab, I reformatted the data into > your > datastructure (data.label, data.fsample, data.trial, data.time), as > explained in Wiki "How can I import my own dataformat?" But, of > course, > I have to load other data such as sensor position, for the source > estimation. > > Could you tell me which analysis is possible for Yokogawa's format? If > we want to do source estimation, how can I import necessary > information > to your format? Almost all analyses can be done on your MEG data. The missing information on gradiometer locations is (or should be) implemented in the yokogawa2grad function, see above. For inverse modelling, you would start with timelockanalysis or freqanalysys, followed by making topoplots of the resulting data to see whether the hypothesised effects are visible on the channel level. Subsequently you would do sourceanalysis. See http:// www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:analysis_protocols Sourceanalysis requires a head model, which can be read from various file formats (but not Yokagawa) or which can be made using the fieldtrip functions prepare_localspheres or the prepare_singleshell. Reading anatomical MRIs in yokagawa format is however not yet supported, so you would have to solve the alignment of the anatomical MRI and volume model and the sensors yourself. You could start with a simple single sphere headmodel, which can be specified in sourceanalysis as cfg.vol.r = [r] % radius cfg.vol.o = [x y z] % origin best regards, Robert ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Robert Oostenveld, PhD F.C. Donders Centre for Cognitive Neuroimaging Radboud University Nijmegen phone: +31-24-3619695 http://www.ru.nl/fcdonders/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -------------- next part -------------- A non-text attachment was scrubbed... Name: yokogawa2grad.m Type: application/octet-stream Size: 2719 bytes Desc: not available URL: -------------- next part -------------- From pchris at UNC.EDU Wed Apr 26 18:07:46 2006 From: pchris at UNC.EDU (Punita Christopher) Date: Wed, 26 Apr 2006 18:07:46 +0200 Subject: modeling - inverse methods Message-ID: Dr. Oostenveld, Thank you for your help previously in pointing me towards triplot.m for my plotting needs. It has worked very well for me. I do have some questions regarding dipole modeling.... I'm developed a simple multiple concentric shell head model based on Mosher et al.(1999) and Zhang et al.(1995). In my model, the orientation of the dipoles is not arbitrary. I also use some code from the brainstorm toolbox (berg.m and zhang_fit.m) to calculate and fit the berg parameters. I calculate the forward solution using my code but I was wondering if there is any inverse modeling code (perhaps using least squares method) in Fieldtrip that will help me to compare the modeled data and my measured data. My data consists of x,y,z, (coordinates) and v (single potential value). My data is not even EEG data, I am just using the EEG approach for my research. Thank you, Punita From yxu at CNBC.CMU.EDU Wed Apr 26 22:30:01 2006 From: yxu at CNBC.CMU.EDU (Yisheng Xu) Date: Wed, 26 Apr 2006 16:30:01 -0400 Subject: Neuromag 306 channel data import Message-ID: Any one can provide a "cookbook" reference for how to import the raw and averaged fif files into FieldTrip? The Neuromag fif files don't seem to have Channel labels and their spatial locations embedded. What other files do we need to do source analysis? Kimmo Uutela plublished a Windows version of MEG-PD (1.2.9). Is this version able to work with FieldTrip in Windows? Thanks, Yisheng Xu, PhD Center for the Neural Basis of Cognition 115 Mellon Institute 4400 Fifth Ave Pittsburgh, PA 15203 Tel: +1 (412) 268-7232 Fax: +1 (412) 281-2161 From lauri at NEURO.HUT.FI Thu Apr 27 09:43:10 2006 From: lauri at NEURO.HUT.FI (Lauri Parkkonen) Date: Thu, 27 Apr 2006 10:43:10 +0300 Subject: Neuromag 306 channel data import In-Reply-To: <003d01c66970$33fead60$6401a8c0@TIGER> Message-ID: Dear Yisheng, > Any one can provide a "cookbook" reference for how to import the raw > and averaged fif files into FieldTrip? Neuromag fif files should be directly accessible by the standard FieldTrip functions for opening/reading MEG/EEG data files. Try first with read_fcdc_header() to get the "meta information" and then with read_fcdc_data() to actually read some data from the file. These functions should work both with raw/continuous and averaged data. NB: I just downloaded the newest daily FieldTrip release and noticed that read_fcdc_data is unable to retrieve data when the requested span extends over a buffer boundary. I will look into this and try to fix it. > The Neuromag fif files don't seem to have Channel labels and their > spatial locations embedded. What other files do we need to do source > analysis? The fif files are self-contained, i.e., they do include all information necessary for the forward calculation (channel names, types, locations, orientations, calibrations, and the MEG-device <-> head coordinate transformation, etc.). Thus, you do not need any other files. FieldTrip knows the geometry of the sensor coils so if you do forward/inverse modelling in FieldTrip you should be all set. Alternatively, if you want to code your own forward calculation routine, you can find the coil geometries in Appendix B of the Source Modelling Software User's Guide (a.k.a xfit), available as part of the Neuromag analysis software distribution. > Kimmo Uutela published a Windows version of MEG-PD (1.2.9). Is this > version able to work with FieldTrip in Windows? The interface (API) is the same as that of the Linux/HPUX versions so it should work with FieldTrip, however, not all the functionality present in the Linux version has been implemented in the Windows version as of now. I unfortunately do not know whether FieldTrip needs the missing bits; it should be given a try. With the best regards, Lauri -- ----------------------------------------------- Lauri Parkkonen Brain Research Unit, Low Temperature Laboratory Helsinki University of Technology Otakaari 3 A, 02150 ESPOO, FINLAND tel: +358-9-4512965 fax: +358-9-4512969 mailto:lauri at neuro.hut.fi http://boojum.hut.fi From r.oostenveld at FCDONDERS.RU.NL Thu Apr 27 10:58:13 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 27 Apr 2006 10:58:13 +0200 Subject: modeling - inverse methods In-Reply-To: Message-ID: Dear Punita On 26 Apr 2006, at 18:07, Punita Christopher wrote: > I calculate the forward solution using my code but I was wondering if > there is any inverse modeling code (perhaps using least squares > method) in > Fieldtrip that will help me to compare the modeled data and my > measured > data. The usual approach to compare the modelled and measured data, in case of a model with a limited number of parameters, is by fitting the modelparameters to the data, based on some error measure. The usual error measure is the sum of squares (or residual variance) over all channels. This is implemented in the DIPOLEFITTING function. The usual model parameters are partially linearly related to the data (i.e. dipole moment, [qx qy qz]) and partially nonlinear (dipole position, [rx ry rz]). The optimization technique implemented in DIPOLEFITTING uses decoupling to estimate both linear and nonlinear part optimally. Is in your forward model the dipole moment (incorporating orientation and strength in a 3x1 vector [qx qy qz]) linear with the data? I think it is. Then you can use the standard implementation in DIPOLEFITTING. If it were non-linear, the implementation would have to be adjusted to prevent the decoupling of linear and nonlinear parameters, and you would have to fit all 6 parameters nonlinearly. > My data consists of x,y,z, (coordinates) and v (single potential > value). My data is not even EEG data, I am just using the EEG > approach > for my research. To make use of the dipole fitting function in Fieldtrip, you would have to add your forward model to the low-level "compute_leadfield" function, which is in the private directory. For each iteration of the non-linear fit, that function is called and it is supposed to return the model leadfield. It would be nice in general to have the Zhang 1995 model included in Fieldtrip. I think that the Mosher 1999 results in exactly the same leadfields as the 4-shell model that we already have, so that would not be too interesting to include (unless it is faster). Please contact me directly outside the mailing list if you have technical questions on how to add your code to compute_leadfield. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Thu Apr 27 11:04:16 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 27 Apr 2006 11:04:16 +0200 Subject: Neuromag 306 channel data import In-Reply-To: <4450760E.6010307@neuro.hut.fi> Message-ID: Hi Yisheng Some additional comments: >> Any one can provide a "cookbook" reference for how to import the >> raw and averaged fif files into FieldTrip? > Neuromag fif files should be directly accessible by the standard > FieldTrip functions for opening/reading MEG/EEG data files. Try > first with read_fcdc_header() to get the "meta information" and > then with read_fcdc_data() to actually read some data from the > file. These functions should work both with raw/continuous and > averaged data. The functions from the meg-pd are not included in Fieldtrip, you have to add them seperately to your matlab path. > NB: I just downloaded the newest daily FieldTrip release and > noticed that read_fcdc_data is unable to retrieve data when the > requested span extends over a buffer boundary. I will look into > this and try to fix it. I did not know whether the blocks in the data are trials (with a potential gap in between) or buffers. In case of continuous blocked data, you would set the last argment of dat = read_fcdc_data(datfile, hdr, begsample, endsample, chanindx, continuous) i.e. the continuous to 1. Then it will not perform the boundary check. To get this behaviour in fieldtrip prepropcessing, you should specify cfg.datatype='continuous'. best regards, Robert From lauri at NEURO.HUT.FI Thu Apr 27 12:21:53 2006 From: lauri at NEURO.HUT.FI (Lauri Parkkonen) Date: Thu, 27 Apr 2006 13:21:53 +0300 Subject: Neuromag 306 channel data import In-Reply-To: <6426DDCF-358C-4D67-BF6B-827C6CECB2AE@fcdonders.ru.nl> Message-ID: Hi Yisheng and Robert, >>> Any one can provide a "cookbook" reference for how to import the >>> raw and averaged fif files into FieldTrip? >> >> Neuromag fif files should be directly accessible by the standard >> FieldTrip functions for opening/reading MEG/EEG data files. Try >> first with read_fcdc_header() to get the "meta information" and then >> with read_fcdc_data() to actually read some data from the file. >> These functions should work both with raw/continuous and averaged data. > > The functions from the meg-pd are not included in Fieldtrip, you have > to add them seperately to your matlab path. Yes, sorry, I forgot to mention this. >> NB: I just downloaded the newest daily FieldTrip release and noticed >> that read_fcdc_data is unable to retrieve data when the requested >> span extends over a buffer boundary. I will look into this and try >> to fix it. > > > I did not know whether the blocks in the data are trials (with a > potential gap in between) or buffers. In case of continuous blocked > data, you would set the last argment of > dat = read_fcdc_data(datfile, hdr, begsample, endsample, chanindx, > continuous) > i.e. the continuous to 1. Then it will not perform the boundary > check. To get this behaviour in fieldtrip prepropcessing, you should > specify cfg.datatype='continuous'. The Neuromag fif files do not support the epoch/trial mode. Thus, the continuous flag should (always) be set to 1 when working with Neuromag raw data. However, the raw data files may still contain multiple segments if the recording was paused, for example, but these segments are usually much longer than one trial. I had modified my own version of the read routine in such a way that it assumes continuous files but does check for possible gaps within the requested span and returns with an error if there is one. Hence the difference w.r.t. the official version. To avoid spamming everybody on the list, I'll check with Robert directly if we can update the Neuromag import routines. Cheers, Lauri -- ----------------------------------------------- Lauri Parkkonen Brain Research Unit, Low Temperature Laboratory Helsinki University of Technology Otakaari 3 A, 02150 ESPOO, FINLAND tel: +358-9-4512965 fax: +358-9-4512969 mailto:lauri at neuro.hut.fi http://boojum.hut.fi From ejackson at UNM.EDU Thu Apr 27 20:12:08 2006 From: ejackson at UNM.EDU (Eric Jackson) Date: Thu, 27 Apr 2006 20:12:08 +0200 Subject: Reading continuous data files - chanindx error Message-ID: Thanks for your help.