From muthuraman10 at HOTMAIL.COM Tue May 2 11:02:06 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Tue, 2 May 2006 09:02:06 +0000 Subject: query on coherence source analysis In-Reply-To: <38A0AAB7-4D1B-4457-827B-3F388AE7EEE1@fcdonders.ru.nl> Message-ID: Hello Thanks for the Previous suggestions i would like to know whether there is prescribed algorithm in Fieldtrip to calculate the coherent source analysis between the EEG and EMG data with regards muthuraman >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on coherence and layout >Date: Mon, 3 Apr 2006 22:22:02 +0200 > >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 r.oostenveld at FCDONDERS.RU.NL Tue May 2 14:57:56 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 2 May 2006 14:57:56 +0200 Subject: query on coherence source analysis In-Reply-To: Message-ID: Dear Muthuraman Fieldtrip implements DICS in the SOURCEANALYSIS function. You can find the literature reference to the DICS algorith on the page http:// www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:references_to_implemented_methods best regards, Robert On 2 May 2006, at 11:02, Muthuraman Muthuraman wrote: > Hello > > Thanks for the Previous suggestions > > i would like to know whether there is prescribed algorithm in > Fieldtrip > to calculate the coherent source analysis between the EEG and EMG > data > > with regards > muthuraman > From olga at GRAPHICMIND.INFO Thu May 4 16:53:15 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 4 May 2006 18:53:15 +0400 Subject: conversion problem, layout Message-ID: Dear list member, I've tried to follow your discussion for quit a long time and I really sympathize implementing in Fieldtrip analyzing methods. Unfortunately, every my previous attempts to use these methods on my own data broke at the very beginning by the conversion data problem. Now I have another try :-). This time I want to convert averaged ERP files, made in BESA. I exported them as multiplex files from BESA and convert to fieldtrip with besa2fieldtrip function. It seems to work well. I also read my .sfp file (data.elec = read_fcdc_elec('GNS64sag1.sfp');). It goes without problems but when I wanted to plot the scalp potentials (topoplotER (cfg, data) the error appeared "reference to non-existent field 'chanX', line 302 topoplot and 268 topoplotER. I had the same problem with converting my data from eeglab, too. Probably, it is safer to create my our layout file, but I need to know the structure of it. Could you help me? Best regards, Olga. ---------------------------------------------------------------------------------------------------------------------------------Olga Sysoeva, PhD Institute of Higher Nervous Activity and Neurophysiology Russian Academy of Sciences 5a Butlerova str. Moscow 117485 RUSSIA tel.: (7-495)-3347011, fax:(7-495)-338-85-00. From r.oostenveld at FCDONDERS.RU.NL Thu May 4 17:58:37 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 4 May 2006 17:58:37 +0200 Subject: conversion problem, layout In-Reply-To: <00aa01c66f8a$79172dd0$51210ad9@olga> Message-ID: Dear Olga, On 4 May 2006, at 16:53, Olga Sysoeva wrote: > This time I want to convert averaged ERP files, made in BESA. I > exported them as multiplex files from BESA and convert to > fieldtrip with besa2fieldtrip function. It seems to work well. I > also read my .sfp file (data.elec = read_fcdc_elec > ('GNS64sag1.sfp');). It goes without problems but when I wanted to > plot the scalp potentials (topoplotER (cfg, > data) the error appeared "reference to non-existent field 'chanX', > line 302 > topoplot and 268 topoplotER. I know that this problem seems to happen since the topoplot and multiplot functions were extended with interactive options. My colleague Ingrid (see CC) has been working on the problem, and I recall that she already fixed the problem (and some other problems). It might be that the ftp version of fieldtrip does not yet contain the updated function. I suggest that you download the latest daily version of fieldtrip from the ftp, and try once more. If the problem then still persists, please send a matlab file containing the erf and electrodes (and possibly also the two original besa files) to Ingrid, so that she can try to reproduce the bug. > I had the same problem with converting my data from eeglab, too. > Probably, it is safer to create my our layout file, but I need to > know the structure of it. The layout file format is explained in the FAQ at http://www2.ru.nl/ fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting. best regards, Robert From olga at GRAPHICMIND.INFO Fri May 5 11:20:44 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Fri, 5 May 2006 13:20:44 +0400 Subject: conversion problem, layout Message-ID: Dear Robert, Yes, my problem appeared to be fixed in the last updated version of Fieldtrip. Now I can topoplot the data, but it seems to work wrong to me. All my electrodes appeared to be in the middle of the plotted head (shrinked compared to the head size). What can it be? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Thursday, May 04, 2006 7:58 PM Subject: Re: [FIELDTRIP] conversion problem, layout > Dear Olga, > > On 4 May 2006, at 16:53, Olga Sysoeva wrote: >> This time I want to convert averaged ERP files, made in BESA. I exported >> them as multiplex files from BESA and convert to fieldtrip with >> besa2fieldtrip function. It seems to work well. I also read my .sfp >> file (data.elec = read_fcdc_elec ('GNS64sag1.sfp');). It goes without >> problems but when I wanted to plot the scalp potentials (topoplotER >> (cfg, >> data) the error appeared "reference to non-existent field 'chanX', line >> 302 >> topoplot and 268 topoplotER. > > I know that this problem seems to happen since the topoplot and multiplot > functions were extended with interactive options. My colleague Ingrid > (see CC) has been working on the problem, and I recall that she already > fixed the problem (and some other problems). It might be that the ftp > version of fieldtrip does not yet contain the updated function. I suggest > that you download the latest daily version of fieldtrip from the ftp, and > try once more. If the problem then still persists, please send a matlab > file containing the erf and electrodes (and possibly also the two > original besa files) to Ingrid, so that she can try to reproduce the bug. > >> I had the same problem with converting my data from eeglab, too. >> Probably, it is safer to create my our layout file, but I need to know >> the structure of it. > > The layout file format is explained in the FAQ at http://www2.ru.nl/ > fcdonders/fieldtrip/doku.php? > id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format > _of_the_layout_file_which_is_used_for_plotting. > > best regards, > Robert From olga at GRAPHICMIND.INFO Sun May 7 16:54:15 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Sun, 7 May 2006 18:54:15 +0400 Subject: first success!!! Message-ID: Dear list members, I want to share my first success in using Filedtrip. Although I could still not properly load my current 64 electrodes data, I succeeded in importing my old 19 channel data. Moreover, I succeded in conducting the between-trial clasterrandomization analysis! But I still have problems with within-subject cluster-randomization. The error "did not find the gradiometer or electrode information" appears, line 461. What could it be? Best Regards, Olga --------------------------------------------------------------------------------------------------------------------------------------------------------- Olga Sysoeva, PhD Institute of Higher Nervous Activity and Neurophysiology Russian Academy of Sciences 5a Butlerova str. Moscow 117485 RUSSIA tel.: (7-495)-3347011, fax:(7-495)-338-85-00. From r.oostenveld at FCDONDERS.RU.NL Mon May 8 09:16:26 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 8 May 2006 09:16:26 +0200 Subject: first success!!! In-Reply-To: <002b01c671e6$1dda4b60$51210ad9@olga> Message-ID: > I want to share my first success in using Filedtrip. Although I > could still not properly load my current 64 electrodes data, I > succeeded in importing my old 19 channel data. Moreover, I succeded > in conducting the between-trial clasterrandomization analysis! It might be that the automatic projection of the 3D electrodes to the 2D surface for plotting is not optimal for your 64 channel set, perhaps due to a few very low electrodes. I suggest that you construct a layout file, see my previous mail. You can also look into the code in private/createlayout, where at the bottom you will find some code that helps you to visualise the layout. > But I still have problems with within-subject cluster- > randomization. The error "did not find the gradiometer or electrode > information" appears, line 461. What could it be? Cluster randomization requires that the neighbourhood geomerty in the data is known, i.e. the neighbouring electrodes. You can specify them with cfg.neighbours. It is documented in "help clusterrandanalysis". One method to automatically specify the neighbourhood is by having electrode information in the dataset, i.e. an elec structure and to specify the cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF gradiometers). I do not know the units of your electrodes (could be m, cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should be specified in the same units. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Mon May 8 09:51:17 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 8 May 2006 09:51:17 +0200 Subject: PhD position available at Donders Centre, the Netherlands Message-ID: PhD-position on a Collaborative Project at the NICI (Nijmegen Institute of Cognition and Information) and the FCDC (F.C. Donders Center for Cognitive Neuroimaging) We are seeking a candidate for the PhD project Beamforming for Cognitive Applications. This project is supervised by Eric Maris (NICI/Biological Psychology), Robert Oostenveld (FCDC), and Ole Jensen (FCDC). Project Description: The golden standard in cognitive neuroscience are measurements of electromagnetic signals at locations in the brain from where they originate physiologically. Unfortunately, in human cognitive neuroscience, we can only measure electromagnetic signals at some distance from their physiological origin, via the EEG or the MEG. Source reconstruction techniques, such as the beamformer, are then used to infer a signal at the source level (the brain’s grey matter) from an observed signal at the sensor level. The beamformer has several distinct advantages over other source reconstruction techniques (applicable to evoked responses and induced oscillations, unique solutions, no assumptions about the source model, excellent spatial resolution). Unfortunately, it has several disadvantages when applied to the data of cognitive experiments (only applicable to single experimental conditions, requires a high SNR, no quantification of spatial uncertainty). In this project, three methodological innovations are proposed that extend the beamformer such that it becomes suitable for cognitive experiments. These innovations will be implemented in the Matlab toolbox Fieldtrip (http://www.ru.nl/fcdonders/fieldtrip/) and tested on MEG-data from existing cognitive neuroscience experiments. Requirements: * A master degree in engineering, neuroscience, cognitive science, biology, applied statistics, or a related field. * Experience with programming, preferably in Matlab. * A scientific interest in how the brain works. More information can be obtained from: Eric Maris NICI/Biological Psychology and FCDC T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) E: maris at nici.ru.nl Applications: Candidates who want to apply to this position can send an application letter and a CV to maris at nici.ru.nl. From rongf at NIDCD.NIH.GOV Tue May 9 01:24:22 2006 From: rongf at NIDCD.NIH.GOV (Rong, Feng (NIH/NIDCD) [V]) Date: Mon, 8 May 2006 19:24:22 -0400 Subject: The coordinates Message-ID: Hi, I have a question about the grid coordinates calculated with prepare-leadfield.m -- how to interpret the .pos value? For example, I run the script [grid]=prepare_leadfield(cfg,freq), with the xgrid, ygrid, and zgrid value of cfg being set as 'auto', then how can I interpret the grid.pos value? They have the value like [-9 2 2], which coordinates is it? Best, Feng Rong Graduate Student NACS Program / Kinesiology Dept UMCP From r.oostenveld at FCDONDERS.RU.NL Tue May 9 08:40:58 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 9 May 2006 08:40:58 +0200 Subject: The coordinates In-Reply-To: <52C93A9A6058924E92A69CDF43966F1B13F797@NIHCESMLBX8.nih.gov> Message-ID: Hi Feng, Fieldtrip does not have it's own coordinate system but uses the coordinate system that is implicit in the data: the gradiometer positions and head model are (usually) obtained from the data files generated using the software of the MEG system. For CTF, the coordinates are expressed in cm, except for anatomical MRIs, which are expressed in mm. The various coordinate systems (including the description of how the axes are linked to the head) are explained in more detail on http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#how_are_the_differ ent_head_and_mri_coordinate_systems_defined best Robert On 9 May 2006, at 1:24, Rong, Feng (NIH/NIDCD) [V] wrote: > Hi, > I have a question about the grid coordinates calculated with > prepare-leadfield.m -- how to interpret the .pos value? > For example, I run the script [grid]=prepare_leadfield(cfg,freq), > with the xgrid, ygrid, and zgrid value of cfg being set as 'auto', > then how can I interpret the grid.pos value? They have the value > like [-9 2 2], which coordinates is it? > > Best, > Feng Rong > Graduate Student > NACS Program / Kinesiology Dept > UMCP > From mvelde at ANT-NEURO.COM Tue May 9 12:43:45 2006 From: mvelde at ANT-NEURO.COM (Maarten van de Velde) Date: Tue, 9 May 2006 12:43:45 +0200 Subject: ANT Young Scientist Award Message-ID: Announcement It is now ten years ago that ANT was established as a spin-off company at the campus of Twente University in Enschede, Netherlands. Starting with the 'Advanced Source Analysis' (ASA) software for magnetoencephalography as an outcome of four years of PhD work, ANT has in the decade of its existence become a major supplier for neurodiagnostics and cognitive neuroscience. It has communications with hundreds of users world-wide and is involved in numerous research/development and collaboration projects. We are perfectly aware of the fact that our success is for a great deal based on people who believe in our strength and competence (our customers). We therefore have taken this anniversary as an opportunity to announce the *ANT Young Scientist Award for exceptional advances in EEG/MEG research* We hope that with this award we can stimulate young scientists in the cognitive neuroscience field and want to show our commitment to innovation in neuroscience and clinical brain research. We strongly encourage you to apply - the first prize is 10,000 EURO! An international, independent committee is going to evaluate your work in a most objective way. You will find more related information on our web site: http://www.ant-neuro.com/youngscientistaward The ANT Young Scientist Award is open to every researcher below 37 years of age. Please feel free to circulate this mail to any researcher who you think is eligible . We will most probably extended the submission period with one month (currently until May 31, 2006). Best regards, Maarten van de Velde -------------- next part -------------- A non-text attachment was scrubbed... Name: mvelde.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From marie at PSY.GLA.AC.UK Wed May 10 16:31:23 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Wed, 10 May 2006 15:31:23 +0100 Subject: Beamformer time course Message-ID: Hi I have a question about the solution of a beam-former analysis and would appreciate any suggestions. Having used the beam-former technique to localize a region of interest for a specific time- frequency range, is there some function that can be implemented to compute the time course of activation for this roi? Thanks, Marie Smith From litvak at TECHUNIX.TECHNION.AC.IL Wed May 10 20:42:30 2006 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Wed, 10 May 2006 20:42:30 +0200 Subject: Phase of spontaneous activity In-Reply-To: Message-ID: Dear all, I have several subjects, each with two sets of trials with ongoing EEG (i.e. not containing response to a stimulus). What I would like to know is whether there is a difference between these sets in terms of spectra. I'd like to test all the electrodes and frequencies. There is no problem to do this for power using Fieldtrip and clusterrandanalysis. But now I would like to find out whether for any electrode/frequency there is the systematic difference in phase between the two sets. I would even settle for testing whether in one of the sets the phase at some electrode/frequency is not random. How does one do it in Fieldtrip? Any ideas and code samples would be appreciated. Best, Vladimir From maris at NICI.RU.NL Thu May 11 12:20:03 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 11 May 2006 12:20:03 +0200 Subject: Phase of spontaneous activity Message-ID: Dear Vladimir, > I have several subjects, each with two sets of trials with ongoing EEG > (i.e. > not containing response to a stimulus). What I would like to know is > whether > there is a difference between these sets in terms of spectra. I'd like to > test all the electrodes and frequencies. There is no problem to do this > for > power using Fieldtrip and clusterrandanalysis. But now I would like to > find > out whether for any electrode/frequency there is the systematic difference > in phase between the two sets. I would even settle for testing whether in > one of the sets the phase at some electrode/frequency is not random. > > How does one do it in Fieldtrip? Any ideas and code samples would be > appreciated. At this moment, this is not possible in Fieldtrip. However, it is straightforward to implement it. As you know, we are in the process of restructuring the nonparametric statistics functions in Fieldtrip. I will put your request in our ToDo-list. greetings, Eric Maris From rbg26471 at YAHOO.COM Thu May 11 14:00:31 2006 From: rbg26471 at YAHOO.COM (rathinaswamy bavanandan govindan) Date: Thu, 11 May 2006 05:00:31 -0700 Subject: No subject In-Reply-To: <001001c674e4$77abef80$d62cae83@fcdc195> Message-ID: Dear Eric and Co. I am a novice to Fieldtrip. I have computed a measure for data from each sensor recorded using ctf software. I want to project my results on the sensor layout and create a contour plot. Is there an option in Fieldtrip for this purpose! Please write to me! Thank you very much! Sincerely Govindan --------------------------------- Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Thu May 11 14:55:17 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Thu, 11 May 2006 14:55:17 +0200 Subject: No subject In-Reply-To: <20060511120031.94420.qmail@web51403.mail.yahoo.com> Message-ID: Dear Govindan, There are several plotting function implemented in FieldTrip. If I understand correctly, you need topoplotER or topoplotTFR (I don't understand exactly what you mean by contour plot). You can find information on the FieldTrip webpage under: fieldtrip > documentation > reference documentation. Good luck, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of rathinaswamy bavanandan govindan Sent: Thursday, May 11, 2006 2:01 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Dear Eric and Co. I am a novice to Fieldtrip. I have computed a measure for data from each sensor recorded using ctf software. I want to project my results on the sensor layout and create a contour plot. Is there an option in Fieldtrip for this purpose! Please write to me! Thank you very much! Sincerely Govindan _____ Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga at GRAPHICMIND.INFO Thu May 11 18:29:44 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 11 May 2006 20:29:44 +0400 Subject: clusterrandomization Message-ID: Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From litvak at TECHUNIX.TECHNION.AC.IL Thu May 11 19:38:24 2006 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Thu, 11 May 2006 19:38:24 +0200 Subject: clusterrandomization In-Reply-To: <006e01c67518$1cb7f2c0$51210ad9@olga> Message-ID: clusrand.posclusters and clusrand.negclusters contain all the clusters found, not just the significant ones. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From olga at GRAPHICMIND.INFO Thu May 11 18:47:38 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 11 May 2006 20:47:38 +0400 Subject: clusterrandomization Message-ID: But why than to plot them if they are not significant? ----- Original Message ----- From: "Vladimir Litvak" To: Sent: Thursday, May 11, 2006 9:38 PM Subject: Re: [FIELDTRIP] clusterrandomization clusrand.posclusters and clusrand.negclusters contain all the clusters found, not just the significant ones. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From litvak at TECHUNIX.TECHNION.AC.IL Thu May 11 19:52:17 2006 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Thu, 11 May 2006 19:52:17 +0200 Subject: clusterrandomization In-Reply-To: <007301c6751a$9cc2cf10$51210ad9@olga> Message-ID: Sometimes you want to know what's happening in your data. The significance threshold is arbitrary and also there are parameters that can be modified to make the procedure more sensitive to particular kinds of effects (though one should not get carried away with that). So it can be useful to know that there is an effect close to significance somewhere or conversely all the clusters are small. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:48 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization But why than to plot them if they are not significant? ----- Original Message ----- From: "Vladimir Litvak" To: Sent: Thursday, May 11, 2006 9:38 PM Subject: Re: [FIELDTRIP] clusterrandomization clusrand.posclusters and clusrand.negclusters contain all the clusters found, not just the significant ones. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From olga at GRAPHICMIND.INFO Thu May 11 19:02:13 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 11 May 2006 21:02:13 +0400 Subject: clusterrandomization Message-ID: OK. I think my negcluster is not close to significance (p=0.5), therefore I do not want to plot it. How can I choose to plot Only significant clusters (I have 3 posclusters only 1 of which is significant)? I guess I need to change something in mask option, but I do not know how to use the squeeze option. Can you help me with this? Best Regards, Olga ----- Original Message ----- From: "Vladimir Litvak" To: Sent: Thursday, May 11, 2006 9:52 PM Subject: Re: [FIELDTRIP] clusterrandomization Sometimes you want to know what's happening in your data. The significance threshold is arbitrary and also there are parameters that can be modified to make the procedure more sensitive to particular kinds of effects (though one should not get carried away with that). So it can be useful to know that there is an effect close to significance somewhere or conversely all the clusters are small. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:48 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization But why than to plot them if they are not significant? ----- Original Message ----- From: "Vladimir Litvak" To: Sent: Thursday, May 11, 2006 9:38 PM Subject: Re: [FIELDTRIP] clusterrandomization clusrand.posclusters and clusrand.negclusters contain all the clusters found, not just the significant ones. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From olga at GRAPHICMIND.INFO Thu May 11 19:55:57 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 11 May 2006 21:55:57 +0400 Subject: clusterrandomization Message-ID: Please disregard my previous post. Now I know how to do this. Sorry... ----- Original Message ----- From: "Olga Sysoeva" To: Sent: Thursday, May 11, 2006 9:02 PM Subject: Re: [FIELDTRIP] clusterrandomization > OK. I think my negcluster is not close to significance (p=0.5), therefore > I do not want to plot it. > How can I choose to plot Only significant clusters (I have 3 posclusters > only 1 of which is significant)? > I guess I need to change something in mask option, but I do not know how > to use the squeeze option. Can you help me with this? > > Best Regards, > Olga > > ----- Original Message ----- > From: "Vladimir Litvak" > To: > Sent: Thursday, May 11, 2006 9:52 PM > Subject: Re: [FIELDTRIP] clusterrandomization > > > Sometimes you want to know what's happening in your data. The significance > threshold is arbitrary and also there are parameters that can be modified > to > make the procedure more sensitive to particular kinds of effects (though > one > should not get carried away with that). So it can be useful to know that > there is an effect close to significance somewhere or conversely all the > clusters are small. > > Vladimir > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf > Of Olga Sysoeva > Sent: Thursday, May 11, 2006 6:48 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandomization > > But why than to plot them if they are not significant? > > ----- Original Message ----- > From: "Vladimir Litvak" > To: > Sent: Thursday, May 11, 2006 9:38 PM > Subject: Re: [FIELDTRIP] clusterrandomization > > > clusrand.posclusters and clusrand.negclusters contain all the clusters > found, not just the significant ones. > > Vladimir > > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf > Of Olga Sysoeva > Sent: Thursday, May 11, 2006 6:30 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] clusterrandomization > > Thank you very much for the help. > > I continue my succes with Clasterrandomization analysis on within-subject > disign. > I applied clasterrandomization to compare two condition. I mostly use the > settings > from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got > positive and negative clusters > (both clusrand.posclusters and clusrand.negclusters not empty). But when I > look for the pval for neg cluster > (which is only one, size 8) it appeared to be 0.51. It is bigger than our > threshold (0.05). Why it is mark as > significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? > Could somebody comment on it? > > Best Regards, > Olga. > > ----- Original Message ----- > From: "Robert Oostenveld" > To: > Sent: Monday, May 08, 2006 11:16 AM > Subject: Re: [FIELDTRIP] first success!!! > > >>> I want to share my first success in using Filedtrip. Although I could >>> still not properly load my current 64 electrodes data, I succeeded in >>> importing my old 19 channel data. Moreover, I succeded in conducting >>> the > >>> between-trial clasterrandomization analysis! >> >> It might be that the automatic projection of the 3D electrodes to the 2D >> surface for plotting is not optimal for your 64 channel set, perhaps due >> to a few very low electrodes. I suggest that you construct a layout >> file, > >> see my previous mail. You can also look into the code in >> private/createlayout, where at the bottom you will find some code that >> helps you to visualise the layout. >> >>> But I still have problems with within-subject cluster- randomization. >>> The > >>> error "did not find the gradiometer or electrode information" appears, >>> line 461. What could it be? >> >> Cluster randomization requires that the neighbourhood geomerty in the >> data is known, i.e. the neighbouring electrodes. You can specify them >> with cfg.neighbours. It is documented in "help clusterrandanalysis". One >> method to automatically specify the neighbourhood is by having electrode >> information in the dataset, i.e. an elec structure and to specify the >> cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF >> gradiometers). I do not know the units of your electrodes (could be m, >> cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should >> be specified in the same units. >> >> best regards, >> Robert From jciveira at UNAV.ES Fri May 12 12:26:29 2006 From: jciveira at UNAV.ES (Juan Civeira) Date: Fri, 12 May 2006 12:26:29 +0200 Subject: Source reconstruction Message-ID: Hello, I have already localize an activation in the brain and now I want to calculate time course of the selected sources. I have thought about chosing the sources by hand and then programming the time reconstruction but I would like to ask if there is any code to make it. Thank you 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 Jan.Schoffelen at FCDONDERS.RU.NL Fri May 12 12:56:40 2006 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Fri, 12 May 2006 12:56:40 +0200 Subject: Source reconstruction In-Reply-To: Message-ID: Dear Juan, You can create time-courses of your sources by using the lcmv-method of sourceanalysis. The input to sourceanalysis should be a timelock-structure which has been obtained with cfg.keeptrials = 'yes' The easiest way to reconstruct your single-trial source time-courses would be to specify cfg.keepfilter = 'yes' in your sourceanalysis-configuration. In the output of sourceanalysis you will find the field avg.filter, which contains the filter weights of your locations of interest. You can obtain a single-trial estimate of your source activation at a particular location by multiplying your data with the filter-weights as follows: source.avg.filter{i}*squeeze(timelock.trial(j,:,:)) This will give you the reconstructed source activity in trial j at location i. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Juan Civeira Sent: Friday, May 12, 2006 12:26 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Source reconstruction Hello, I have already localize an activation in the brain and now I want to calculate time course of the selected sources. I have thought about chosing the sources by hand and then programming the time reconstruction but I would like to ask if there is any code to make it. Thank you 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 Fri May 12 19:22:19 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 12 May 2006 19:22:19 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: Dear Marie, On 10 May 2006, at 16:31, Marie Smith wrote: > I have a question about the solution of a beam-former analysis and > would appreciate any suggestions. Having used the beam-former > technique to localize a region of interest for a specific time- > frequency range, is there some function that can be implemented to > compute the time course of activation for this roi? For that you would use a time-domain beamformer, i.e. the lcmv beamformer (cfg.method='lcmv' in sourceanalysis). That requires time- domain data as input, so you should use timelockanalysis to compute the covariance and the average. The covariance is used to construct the beamformer filter and the average is projected through the filter. If you want to project single-trial data through the filter, you should keep the trials in timelockanalysis and use the option cfg.singletrials='yes' in sourceanalysis (see its help). If you are interested in a specific frequency band, you can use a band-pass filter in timelockanalysis (the options for that are hidden in the documentation, but they are the same as in preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It could also be that you want to use a filter based on a narrow frequency band and use it to beam the broad-band data. That is also possible, but not smoothly: you have to do timelockanalysis twice (broadband and narrowband) and replace the broadband covariance with the filtered narrowband covariance. I hope this short explanation is enough. Robert From olga at GRAPHICMIND.INFO Sat May 13 09:27:44 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Sat, 13 May 2006 11:27:44 +0400 Subject: clusterrandomization on 3D-data within-subject Message-ID: Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lilla.Magyari at FCDONDERS.RU.NL Sat May 13 13:11:03 2006 From: Lilla.Magyari at FCDONDERS.RU.NL (Lilla Magyari) Date: Sat, 13 May 2006 13:11:03 +0200 Subject: clusterrandomization on 3D-data within-subject In-Reply-To: <001201c6765e$baa53370$51210ad9@olga> Message-ID: Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga at GRAPHICMIND.INFO Sat May 13 14:34:07 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Sat, 13 May 2006 16:34:07 +0400 Subject: clusterrandomization on 3D-data within-subject Message-ID: Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari ------------------------------------------------------------------------------ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga at GRAPHICMIND.INFO Mon May 15 06:46:35 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Mon, 15 May 2006 08:46:35 +0400 Subject: cluster randomization Message-ID: Dear list members, Am I right, that after cluster randomization I will everytime get smaller amount of significant results, than after traditional t-test? I mean if set cfg.alphathreshold = 0.05, and choose dependent t-test my clusters can only include the channels and time-points that is significant (p<0,05) when I just use dependent t-test to compare the two condition time by time on every channel. And only after this first step analysis the cluster is formed based on this t-test. Probably I am missing something, but after clusterrandomization analysis I've got a cluster (even significant, but it should not matter) with differential activation at posterior left site, although t-test (made in eeglab) on this paticular channel does not show any significant points. Can somebody comment on it? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marie at PSY.GLA.AC.UK Tue May 16 18:21:24 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 16 May 2006 17:21:24 +0100 Subject: Beamformer time course In-Reply-To: <071C4BBD-5D11-46E2-A606-704CCBE1ED9F@fcdonders.ru.nl> Message-ID: Hi Thanks a lot for your response, your explanations seem clear to me. I have also talked with Klaus Kessler about this. He has in the past used DICS to generate the filter for a specific time/freq box, and then applied this filter to the time locked data in order to compute synchronization between regions etc. I realise this would also not be possible smoothly, but does it make sense to generate a filter using the cross spectral density matrix for a given time/freq range (cf DICS) - and then applying this filter to the covariance of the time averaged data? Marie On 12 May 2006, at 18:22, Robert Oostenveld wrote: > Dear Marie, > > On 10 May 2006, at 16:31, Marie Smith wrote: >> I have a question about the solution of a beam-former analysis and >> would appreciate any suggestions. Having used the beam-former >> technique to localize a region of interest for a specific time- >> frequency range, is there some function that can be implemented to >> compute the time course of activation for this roi? > > For that you would use a time-domain beamformer, i.e. the lcmv > beamformer (cfg.method='lcmv' in sourceanalysis). That requires > time-domain data as input, so you should use timelockanalysis to > compute the covariance and the average. The covariance is used to > construct the beamformer filter and the average is projected > through the filter. If you want to project single-trial data > through the filter, you should keep the trials in timelockanalysis > and use the option cfg.singletrials='yes' in sourceanalysis (see > its help). > > If you are interested in a specific frequency band, you can use a > band-pass filter in timelockanalysis (the options for that are > hidden in the documentation, but they are the same as in > preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It could > also be that you want to use a filter based on a narrow frequency > band and use it to beam the broad-band data. That is also possible, > but not smoothly: you have to do timelockanalysis twice (broadband > and narrowband) and replace the broadband covariance with the > filtered narrowband covariance. I hope this short explanation is > enough. > > Robert From r.oostenveld at FCDONDERS.RU.NL Wed May 17 10:55:33 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 17 May 2006 10:55:33 +0200 Subject: Beamformer time course In-Reply-To: <53E2B50A-F60B-4DBB-81D7-59C799C46423@psy.gla.ac.uk> Message-ID: Hi Marie, It is possible to use the cfg.keepfilter='yes' option both with lcmv and with dics, and also both techniques are implemented such that they will re-use the previously computed filters. So you can first do dics with keepfilter, and then use those filters in the subsequent lcmv analysis. That would look like this: cfg = [] cfg.method = dics cfg.dics.realfilter = yes <=== see below cfg.keepfilter = yes ... source_d = sourceanalysis(cfg, freq) cfg = [] cfg.method = lcmv cfg.keepfilter = no cfg.grid = grid <=== see below ... source_l = sourceanalysis(cfg, timelock) The cfg.grid option allows to specify precomputed leadfields (i.e. the output of prepare_leadfield), but also precomputed filters, which is done here. The easiest is then to do grid=source2grid(source_d) after the dics and before the lcmv analysis. The source2grid helper function strips all irrelevant elements from the source_d structure and will only retain the information that is relevant for the sourceanalysis on the second dataset. It assumes that you use exactly the same channels in both analyses. A conceptual problem that you will run into is that, according to the original description of dics (gross 2001), the filters are complex- valued. Multiplying these complex filters with real data will result in complex valued source projections, which is weird to say the least. I consider that to be an error in the DICS algorithm. The solution for that is that our implementation, which by default will return complex filters in accordance with the original DICS description, can also use and return real-valued filters. That is enabled by the (undocumented) option cfg.dics.realfilter='yes'. Please download the latest (i..e. yesterdays) version of fieldtrip from the FTP, and replace fieldtrip/source2grid.m and fieldtrip/ private/beamformer.m with the attached updated functions (I just tested the procedure described above, and there were a few details in the code that had to be changed). best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: beamformer.m Type: application/octet-stream Size: 26935 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source2grid.m Type: application/octet-stream Size: 1300 bytes Desc: not available URL: -------------- next part -------------- On 16 May 2006, at 18:21, Marie Smith wrote: > Hi > > Thanks a lot for your response, your explanations seem clear to me. > > I have also talked with Klaus Kessler about this. He has in the > past used DICS to generate the filter for a specific time/freq box, > and then applied this filter to the time locked data in order to > compute synchronization between regions etc. > I realise this would also not be possible smoothly, but does it > make sense to generate a filter using the cross spectral density > matrix for a given time/freq range (cf DICS) - and then applying > this filter to the covariance of the time averaged data? > > Marie > > > > > On 12 May 2006, at 18:22, Robert Oostenveld wrote: > >> Dear Marie, >> >> On 10 May 2006, at 16:31, Marie Smith wrote: >>> I have a question about the solution of a beam-former analysis >>> and would appreciate any suggestions. Having used the beam-former >>> technique to localize a region of interest for a specific time- >>> frequency range, is there some function that can be implemented >>> to compute the time course of activation for this roi? >> >> For that you would use a time-domain beamformer, i.e. the lcmv >> beamformer (cfg.method='lcmv' in sourceanalysis). That requires >> time-domain data as input, so you should use timelockanalysis to >> compute the covariance and the average. The covariance is used to >> construct the beamformer filter and the average is projected >> through the filter. If you want to project single-trial data >> through the filter, you should keep the trials in timelockanalysis >> and use the option cfg.singletrials='yes' in sourceanalysis (see >> its help). >> >> If you are interested in a specific frequency band, you can use a >> band-pass filter in timelockanalysis (the options for that are >> hidden in the documentation, but they are the same as in >> preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It >> could also be that you want to use a filter based on a narrow >> frequency band and use it to beam the broad-band data. That is >> also possible, but not smoothly: you have to do timelockanalysis >> twice (broadband and narrowband) and replace the broadband >> covariance with the filtered narrowband covariance. I hope this >> short explanation is enough. >> >> Robert > From R.Oostenveld at FCDONDERS.RU.NL Wed May 17 12:09:21 2006 From: R.Oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 17 May 2006 12:09:21 +0200 Subject: fieldtrip artifact-rejection In-Reply-To: <446A12C6.90006@gmail.com> Message-ID: Hi Markus, I hope that you don't mind moving this thread over to the discussion list, since other people also might be interested and/or want to contribute. On 16 May 2006, at 19:58, Markus Bauer wrote: > I have started working on some EEG data today. I found the artifact > rejection tools not totally satisfying for EEG data. > In case you're interested I would be happy working on it, then we > could discuss how to best do it. > If you want to keep it like it is, I'll just make my own solution. The artifact stuff is also not completely to my likings, so I am open for suggestions (especially if you are willing to aid in implementing the suggestions). > Here are the major shortcomings, I have encountered: > Particularly the lack of a (partial) rejection-tool for fixed > amplitude thresholds makes life difficult and partial artifact > rejection for EEG non-usable. artifact_threshold already does this, but not for partial rejection. It would be trivial to adapt it for partial artifacts. > Often after muscle and EOG correction big spikes are remaining in > the data, these cannot be taken care of, without doing total > rejection of trial. I do not fully understand why such a function > should be incompatible with partial rejection - didn't understand > your comment in the header (with min max) either. which comment in which header? If you refer to artifact_threshold, then see my previous comment that it could easily be enhanced for partial rejection support. > The artifact-markers in the EOG-routine are very often phase > shifted with respect to the blink - such that the initial part of > the blink is taken well care of (plus additional unaffected data), > the later part is often not covered, even when specifying 0.15s or > more. I have never seen the opposite case so far. Could well be. > I guess it has to do with the hilbert transform. I don't think that that is the reason, I more expect it to be due to a fast rising flank of the EOG followed by a slower falling flank. But have not looked at enough experimental data myself to be sure. > Since only a symmetric "artefact-padding" is allowed, data are > often wasted/artefacts not taken well care of. It would be fine with me to support both cfg.artfctdef.zvalue.artpadding = val and cfg.artfctdef.zvalue.artpadding = [preval, postval] This is also something that Marcel Bastiaansen suggested to me some time ago. > Also for EOG and muscle, the option for using absolute thresholds > on the specially treated data could be helpful (with partial > rejection), it has been taken out - is there a concrete reason ?? The old code for jump/eog/muscle was a mixture of combined z-values over channels on one hand and plain thresholding of preprocessed data on the other hand. Since the plain thresholding is also available in artifact_threshold, I saw no reason to reimplement it in the new functions. I want to prevent replicating functionality. > I know that everybody can write their own custom functions, but I'm > sure others will make same experiences. Yes, I do prefer to improve the existing functions instead of everyone writing their own. > Another thing - I think it would be ideal to do the artifact > rejection on all the conditions simultaneously to make sure that > the same criteria are applied to the data of all conditions > (particularly when only relative thresholds - zvalues - are used). > Practically this would mean that one would use the artefact > rejected cfg-structure - i.e. the result of rejectartifact - to > later extract the conditions from those and then do preprocessing. That is already possible in two ways, e.g. with two conditions one could do this: cfg1 = ... cfg1 = definetrial(cfg1) cfg2 = ... cfg2 = definetrial(cfg1) cfgall = ... cfgall.trl = cat(2,cfg1.trl, cfg2.trl) % combine all data segments of interest cfgall.artifact.eog = ... cfgall = artifact_eog(cfgall) % detect EOG artifacts in the data segments of both conditions cfgall.artifact.muscle = ... cfgall = artifact_msucle(cfgall) % detect Muscle artifacts in the data segments of both conditions cfg1.artifact = cfgall.artifact % copy the detected artifacts cfg1 = rejectartifact(cfg1) % and reject the data segments that overlap with an artifact raw1 = preprocessing(cfg1); cfg2.artifact = cfgall.artifact % copy the detected artifacts cfg2 = rejectartifact(cfg2) % and reject the data segments that overlap with an artifact raw2 = preprocessing(cfg2); The other way of realising this is by using recodeevent, which is even more flexible. It might look like this cfg1 = ... cfg1 = definetrial(cfg1) cfg2 = ... cfg2 = definetrial(cfg1) cfgall = ... cfgall.trl = cat(2,cfg1.trl, cfg2.trl) % alternatively you could use only one trialfun for both cfgall.artifact.eog = ... cfgall = artifact_eog(cfgall) % detect EOG artifacts in the data segments of both conditions cfgall.artifact.muscle = ... cfgall = artifact_msucle(cfgall) % detect Muscle artifacts in the data segments of both conditions cfgall = rejectartifact(cfgall) rawall = preprocessing(cfgall) cfg = ... cfg.keeptrial = 'yes' freqall = freqanalysis(cfg, rawall) cfg = ... cfg.output = 'eventvalue' trigger = recodeevent(cfg, rawall) sel1 = find(trigger==1); sel2 = find(trigger==2); freq1 = freqall; freq1.powspctrm = freq1.powspctrm(sel1,:,:) freq2 = freqall; freq2.powspctrm = freq2.powspctrm(sel2,:,:) Retrieving the match between the implicit events and the trial segments could be done at various stages of the analysis, i.e. you could even beam with singletrials and common filters for both conditions, and sort the single trial estimates of power at the source level after that. > I have my own function that is capable of doing that, but since > this may in principle be the appropriate way to do artefact > rejection - I wonder whether you're interested in a more standard > solution ?? I think that the desired functionality that you mention can be achieved with only small modifications to fieldtrip. Please think about it, and if you agree, then you could modify the artifact_threshold function. Please also have a look at the attached rejectvisual function (not yet released): it allows to reject trials after they have been preprocessed, like in the BESA way that you once suggested. best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: rejectvisual.m Type: application/octet-stream Size: 6826 bytes Desc: not available URL: -------------- next part -------------- From r.oostenveld at FCDONDERS.RU.NL Wed May 17 17:00:58 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 17 May 2006 17:00:58 +0200 Subject: fieldtrip artifact-rejection In-Reply-To: <000e01c679c2$cc72f4e0$90514484@dellgx240> Message-ID: Dear all There was a subfunction missing that is required for rejectvisual, please find it attached. Furthermore, from tomorrow on the rejectvisual function will be included in the daily release on the Donders ftp server. best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: select2d.m Type: application/octet-stream Size: 750 bytes Desc: not available URL: -------------- next part -------------- On 17 May 2006, at 17:01, Vladimir Litvak wrote: > Hi Robert, > > I wanted to look at the rejectvisual function but it requires > something > called select2d. Please check the dependencies and send them to the > list. > I'll try to test it on some of my data that I already processed > with BESA. > > Best, > > Vladimir From olga at GRAPHICMIND.INFO Thu May 18 16:56:25 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 18 May 2006 18:56:25 +0400 Subject: Fw: [FIELDTRIP] cluster randomization Message-ID: Sorry for repeating my post, but I just want to be sure that I understand everything correct. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Monday, May 15, 2006 8:46 AM Subject: [FIELDTRIP] cluster randomization Dear list members, Am I right, that after cluster randomization I will everytime get smaller amount of significant results, than after traditional t-test? I mean if set cfg.alphathreshold = 0.05, and choose dependent t-test my clusters can only include the channels and time-points that is significant (p<0,05) when I just use dependent t-test to compare the two condition time by time on every channel. And only after this first step analysis the cluster is formed based on this t-test. Probably I am missing something, but after clusterrandomization analysis I've got a cluster (even significant, but it should not matter) with differential activation at posterior left site, although t-test (made in eeglab) on this paticular channel does not show any significant points. Can somebody comment on it? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Thu May 18 21:56:52 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 18 May 2006 21:56:52 +0200 Subject: Fw: [FIELDTRIP] cluster randomization Message-ID: Dear Olga, Am I right, that after cluster randomization I will everytime get smaller amount of significant results, than after traditional t-test? I mean if set cfg.alphathreshold = 0.05, and choose dependent t-test my clusters can only include the channels and time-points that is significant (p<0,05) when I just use dependent t-test to compare the two condition time by time on every channel. And only after this first step analysis the cluster is formed based on this t-test. Probably I am missing something, but after clusterrandomization analysis I've got a cluster (even significant, but it should not matter) with differential activation at posterior left site, although t-test (made in eeglab) on this paticular channel does not show any significant points. Your reasoning is completely correct. As I see it now, either Clusterrandanalysis or EEGlab performs its dependent samples t-tests incorrectly. Without having your data, it is not possible for me to check this numerically. However, you can do this very easily yourself: take the data of the (channel,time)-pair of interest, and calculate the dependent samples t-statistic on it using Matlab's statistics toolbox or by means of the formula in an elementary statistics book. Compare the result with the statistic for this (channel,time)-pair that is given in the output of clusterrandanalysis (in the .stats-field). Let me what you have found. Kind regards, Eric Maris From muthuraman10 at HOTMAIL.COM Mon May 22 14:15:13 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 22 May 2006 12:15:13 +0000 Subject: query on coherence source analysis In-Reply-To: <3756B6D4-A15F-44B7-9241-BD9E4429A276@fcdonders.ru.nl> Message-ID: hello Thankyou for the previous suggestion I have gone through the article, in which for the 'DICS' algorthim it is mentioned that they use welch method to calculate the cross spectral density, for the freqanalysis program is there a cfg.method with welch to use it for the 'DICS'. I do not find the freqanalysis_mtmwelch I have the 20060131 version of fieltrip is it updated in the latest versions with regards muthu >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on coherence source analysis >Date: Tue, 2 May 2006 14:57:56 +0200 > >Dear Muthuraman > >Fieldtrip implements DICS in the SOURCEANALYSIS function. You can find the >literature reference to the DICS algorith on the page http:// >www2.ru.nl/fcdonders/fieldtrip/doku.php? >id=fieldtrip:documentation:references_to_implemented_methods > >best regards, >Robert > >On 2 May 2006, at 11:02, Muthuraman Muthuraman wrote: > >>Hello >> >>Thanks for the Previous suggestions >> >>i would like to know whether there is prescribed algorithm in Fieldtrip >>to calculate the coherent source analysis between the EEG and EMG data >> >>with regards >>muthuraman >> From marie at PSY.GLA.AC.UK Mon May 22 17:18:55 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Mon, 22 May 2006 16:18:55 +0100 Subject: Beamformer time course In-Reply-To: <071C4BBD-5D11-46E2-A606-704CCBE1ED9F@fcdonders.ru.nl> Message-ID: Hi I have been trying out the various methods as discussed and have come across a problem. When I select cfg.singletrials = 'yes' I get a number of error messages saying error('this option contains a bug, and is therefore not supported at the moment'); I am using the toolbox fieldtrip-20060516. I noticed however, if I select cfg.rawtrials = 'yes' the function will run. Can you help. Marie On 12 May 2006, at 18:22, Robert Oostenveld wrote: > Dear Marie, > > On 10 May 2006, at 16:31, Marie Smith wrote: >> I have a question about the solution of a beam-former analysis and >> would appreciate any suggestions. Having used the beam-former >> technique to localize a region of interest for a specific time- >> frequency range, is there some function that can be implemented to >> compute the time course of activation for this roi? > > For that you would use a time-domain beamformer, i.e. the lcmv > beamformer (cfg.method='lcmv' in sourceanalysis). That requires > time-domain data as input, so you should use timelockanalysis to > compute the covariance and the average. The covariance is used to > construct the beamformer filter and the average is projected > through the filter. If you want to project single-trial data > through the filter, you should keep the trials in timelockanalysis > and use the option cfg.singletrials='yes' in sourceanalysis (see > its help). > > If you are interested in a specific frequency band, you can use a > band-pass filter in timelockanalysis (the options for that are > hidden in the documentation, but they are the same as in > preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It could > also be that you want to use a filter based on a narrow frequency > band and use it to beam the broad-band data. That is also possible, > but not smoothly: you have to do timelockanalysis twice (broadband > and narrowband) and replace the broadband covariance with the > filtered narrowband covariance. I hope this short explanation is > enough. > > Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Tue May 23 12:12:48 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 23 May 2006 12:12:48 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: Hi Marie, On 22 May 2006, at 17:18, Marie Smith wrote: > I have been trying out the various methods as discussed and have > come across a problem. > > When I select cfg.singletrials = 'yes' I get a number of error > messages saying > error('this option contains a bug, and is therefore not supported > at the moment'); > > I am using the toolbox fieldtrip-20060516. > > I noticed however, if I select cfg.rawtrials = 'yes' the function > will run. I recall disabling this functionality, since it was rarely used and since I was concerned that it would not be correct. I now had a more detailled look at the code. If you do rawtrial=yes, beamformer uses the single-trial covariance to construct the filter and also applies it to the single trial covariance/csd. That results in a very poorly estimated filter in each trial, hence projecting large amounts of noise and a lot of variance over trials. Therefore we found it not to be very usefull on real data, although conceptually and in the code it is correct. The idea behind singletrial=yes is that beamformer uses the average covariance to construct the filter and applies it to the single trial covariance/csd. The problem in the code however is that beamformer would use the averaged covariance/csd to estimate the power and not the single trial covariance/csd. The estimated single-trial timecourse would be correct, but the power would not be correct. Therefore I disabled that option in the code. The solution is something that you can do yourself in two subsequent runs of sourceanalysis: you can do sourceanalysis on the average (i.e. do not specify any of singletrial/rawtrial options) and specify keepfilter=yes. That will give you the filter, computed on the average covariance. Subsequently do cfg.grid=source2grid(source), and use the resulting grid (including the filters) in the second run of sourceanalysis, in which you specify cfg.rawtrial=yes. In the second run, the previous (based on average covariance) filters will be applied to the unaveraged data, resulting in the desired single-trial power and dipole moment. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Tue May 23 12:33:24 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 23 May 2006 12:33:24 +0200 Subject: query on coherence source analysis In-Reply-To: Message-ID: Dear Muthuraman At the Donders we usually use the multitaper method for computing the cross spectral density, in freqanalysis that is cfg.method='mtmfft' or 'mtmconvol'. If you would use the mtmconvol method, you will get a frequency decomposition for multiple sliding time windows (that can be overlapping or not). If you then would average these frequency decompositions over time, you have performed Welch's method. We already implemented that in a function, see attached freqanalysis_mtmwelch (i.e. it even allows you to combine multitapering and Welch). Add it to your fieldtrip directory and specify cfg.method='mtmwelch' for freqanalysis. This new function is still rather poorly documented, and it does not have default settings for most of the cfg options. Probably you will want cfg.taper=hanning (i.e. no multitapering), in which case you do not have to specify cfg.tapsmofrq. The function will use maximally overlapping windows for Welch method (which takes a lot of memory). You should specify the frequencies of interest (cfg.foi) and window length per frequency (cfg.t_ftimwin). best Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: freqanalysis_mtmwelch.m Type: application/octet-stream Size: 3262 bytes Desc: not available URL: -------------- next part -------------- On 22 May 2006, at 14:15, Muthuraman Muthuraman wrote: > hello > > Thankyou for the previous suggestion > > I have gone through the article, in which for the 'DICS' algorthim > it is mentioned that they use welch method to calculate the cross > spectral density, for the freqanalysis program is there a > cfg.method with welch to use it for the 'DICS'. > > I do not find the freqanalysis_mtmwelch > I have the 20060131 version of fieltrip is it updated in the latest > versions > > with regards > muthu > > >> From: Robert Oostenveld >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] query on coherence source analysis >> Date: Tue, 2 May 2006 14:57:56 +0200 >> >> Dear Muthuraman >> >> Fieldtrip implements DICS in the SOURCEANALYSIS function. You can >> find the literature reference to the DICS algorith on the page >> http:// www2.ru.nl/fcdonders/fieldtrip/doku.php? >> id=fieldtrip:documentation:references_to_implemented_methods >> >> best regards, >> Robert >> >> On 2 May 2006, at 11:02, Muthuraman Muthuraman wrote: >> >>> Hello >>> >>> Thanks for the Previous suggestions >>> >>> i would like to know whether there is prescribed algorithm in >>> Fieldtrip >>> to calculate the coherent source analysis between the EEG and >>> EMG data >>> >>> with regards >>> muthuraman >>> > From marie at PSY.GLA.AC.UK Tue May 23 17:09:47 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 23 May 2006 16:09:47 +0100 Subject: Beamformer time course In-Reply-To: <78E05DBA-BC4C-469B-A508-5653CF799233@fcdonders.ru.nl> Message-ID: Hi I have tried the analysis as you suggest and although the analysis appears to run I cannot find the single trial time courses in the outcome of the second run of sourceanalysis. In fact, it seems to output for each dipole location one value for each of the power, the moment and the noise. Should I enable the option singletrial = yes to determine the time courses, and use the final two run method to obtain the correct power estimates? Also, for information I am having some problems using the compiled mex files with matlab 7 under unix. Thanks Marie On 23 May 2006, at 11:12, Robert Oostenveld wrote: > Hi Marie, > > On 22 May 2006, at 17:18, Marie Smith wrote: >> I have been trying out the various methods as discussed and have >> come across a problem. >> >> When I select cfg.singletrials = 'yes' I get a number of error >> messages saying >> error('this option contains a bug, and is therefore not supported >> at the moment'); >> >> I am using the toolbox fieldtrip-20060516. >> >> I noticed however, if I select cfg.rawtrials = 'yes' the function >> will run. > > I recall disabling this functionality, since it was rarely used and > since I was concerned that it would not be correct. I now had a > more detailled look at the code. > > If you do rawtrial=yes, beamformer uses the single-trial covariance > to construct the filter and also applies it to the single trial > covariance/csd. That results in a very poorly estimated filter in > each trial, hence projecting large amounts of noise and a lot of > variance over trials. Therefore we found it not to be very usefull > on real data, although conceptually and in the code it is correct. > > The idea behind singletrial=yes is that beamformer uses the average > covariance to construct the filter and applies it to the single > trial covariance/csd. The problem in the code however is that > beamformer would use the averaged covariance/csd to estimate the > power and not the single trial covariance/csd. The estimated single- > trial timecourse would be correct, but the power would not be > correct. Therefore I disabled that option in the code. > > The solution is something that you can do yourself in two > subsequent runs of sourceanalysis: you can do sourceanalysis on the > average (i.e. do not specify any of singletrial/rawtrial options) > and specify keepfilter=yes. That will give you the filter, computed > on the average covariance. Subsequently do cfg.grid=source2grid > (source), and use the resulting grid (including the filters) in the > second run of sourceanalysis, in which you specify > cfg.rawtrial=yes. In the second run, the previous (based on average > covariance) filters will be applied to the unaveraged data, > resulting in the desired single-trial power and dipole moment. > > best regards, > Robert From marie at PSY.GLA.AC.UK Tue May 23 19:46:47 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 23 May 2006 18:46:47 +0100 Subject: Beamformer time course In-Reply-To: <78E05DBA-BC4C-469B-A508-5653CF799233@fcdonders.ru.nl> Message-ID: Hi, Thanks again for all your help with my questions so far, it has been very useful. As an alternative method to determining the time course of activation, I planned to use the filter as output from sourceanalysis directly with the time locked data set. However I am unsure what the three dimensions of the filter are. Could you please clarify this for me. Thanks Marie On 23 May 2006, at 11:12, Robert Oostenveld wrote: > Hi Marie, > > On 22 May 2006, at 17:18, Marie Smith wrote: >> I have been trying out the various methods as discussed and have >> come across a problem. >> >> When I select cfg.singletrials = 'yes' I get a number of error >> messages saying >> error('this option contains a bug, and is therefore not supported >> at the moment'); >> >> I am using the toolbox fieldtrip-20060516. >> >> I noticed however, if I select cfg.rawtrials = 'yes' the function >> will run. > > I recall disabling this functionality, since it was rarely used and > since I was concerned that it would not be correct. I now had a > more detailled look at the code. > > If you do rawtrial=yes, beamformer uses the single-trial covariance > to construct the filter and also applies it to the single trial > covariance/csd. That results in a very poorly estimated filter in > each trial, hence projecting large amounts of noise and a lot of > variance over trials. Therefore we found it not to be very usefull > on real data, although conceptually and in the code it is correct. > > The idea behind singletrial=yes is that beamformer uses the average > covariance to construct the filter and applies it to the single > trial covariance/csd. The problem in the code however is that > beamformer would use the averaged covariance/csd to estimate the > power and not the single trial covariance/csd. The estimated single- > trial timecourse would be correct, but the power would not be > correct. Therefore I disabled that option in the code. > > The solution is something that you can do yourself in two > subsequent runs of sourceanalysis: you can do sourceanalysis on the > average (i.e. do not specify any of singletrial/rawtrial options) > and specify keepfilter=yes. That will give you the filter, computed > on the average covariance. Subsequently do cfg.grid=source2grid > (source), and use the resulting grid (including the filters) in the > second run of sourceanalysis, in which you specify > cfg.rawtrial=yes. In the second run, the previous (based on average > covariance) filters will be applied to the unaveraged data, > resulting in the desired single-trial power and dipole moment. > > best regards, > Robert From Jan.Schoffelen at FCDONDERS.RU.NL Wed May 24 09:25:04 2006 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 24 May 2006 09:25:04 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: Dear Marie, Please have a look in the discussion's list archive. A question very similar to yours has been answered: see the archive of May 2006, and follow the link "source reconstruction". The discussion's list archive can be reached from the website. Yours, Jan-Mathijs The dimensionality of the filter is a 3xN-matrix, with N the number of sensors. The "3" corresponds with the x,y,z direction in space. In other words: multiplying your data with the filter results in a 3xT (number of time points) matrix, which represents a dipole's activity in 3-D space. -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Marie Smith Sent: Tuesday, May 23, 2006 7:47 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Beamformer time course Hi, Thanks again for all your help with my questions so far, it has been very useful. As an alternative method to determining the time course of activation, I planned to use the filter as output from sourceanalysis directly with the time locked data set. However I am unsure what the three dimensions of the filter are. Could you please clarify this for me. Thanks Marie On 23 May 2006, at 11:12, Robert Oostenveld wrote: > Hi Marie, > > On 22 May 2006, at 17:18, Marie Smith wrote: >> I have been trying out the various methods as discussed and have >> come across a problem. >> >> When I select cfg.singletrials = 'yes' I get a number of error >> messages saying >> error('this option contains a bug, and is therefore not supported >> at the moment'); >> >> I am using the toolbox fieldtrip-20060516. >> >> I noticed however, if I select cfg.rawtrials = 'yes' the function >> will run. > > I recall disabling this functionality, since it was rarely used and > since I was concerned that it would not be correct. I now had a > more detailled look at the code. > > If you do rawtrial=yes, beamformer uses the single-trial covariance > to construct the filter and also applies it to the single trial > covariance/csd. That results in a very poorly estimated filter in > each trial, hence projecting large amounts of noise and a lot of > variance over trials. Therefore we found it not to be very usefull > on real data, although conceptually and in the code it is correct. > > The idea behind singletrial=yes is that beamformer uses the average > covariance to construct the filter and applies it to the single > trial covariance/csd. The problem in the code however is that > beamformer would use the averaged covariance/csd to estimate the > power and not the single trial covariance/csd. The estimated single- > trial timecourse would be correct, but the power would not be > correct. Therefore I disabled that option in the code. > > The solution is something that you can do yourself in two > subsequent runs of sourceanalysis: you can do sourceanalysis on the > average (i.e. do not specify any of singletrial/rawtrial options) > and specify keepfilter=yes. That will give you the filter, computed > on the average covariance. Subsequently do cfg.grid=source2grid > (source), and use the resulting grid (including the filters) in the > second run of sourceanalysis, in which you specify > cfg.rawtrial=yes. In the second run, the previous (based on average > covariance) filters will be applied to the unaveraged data, > resulting in the desired single-trial power and dipole moment. > > best regards, > Robert From cgra05 at HST.AUC.DK Wed May 24 12:29:44 2006 From: cgra05 at HST.AUC.DK (Carina Graversen) Date: Wed, 24 May 2006 12:29:44 +0200 Subject: multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: <000001c67f03$2d3ab750$902dae83@fcdonders.nl> Message-ID: Hi. I'm trying to use the Fieldtrip program to create a wavelet plot of my EEG data. I have used it previously for 64 channel recordings, but now I'm working with 128 channels of data, which is causing me some problems. The only thing I have changed is the command: cfg8.layout = 'biosemi128.lay'; But now the figure only outputs a grey page with no Time-Frequency distributions at all. Can anyone tell me what I'm doing wrong - below is a complete list of all the commands I use :o). Best Regards, Carina Graversen % ************************************************************************* % EVENTRELATEDAVERAGING % ************************************************************************* cfg1 = []; % empty configuration cfg1.datafile = 'test128.eeg'; % 128 channel Neuroscan eeg file cfg1.headerfile = 'test128.eeg'; cfg1.channel = 'all'; dataFIC = preprocessing(cfg1); % Preprocess! cfg2 = []; % empty configuration avgFIC = timelockanalysis(cfg2, dataFIC); % % ************************************************************************* % % WAVELET % % ************************************************************************* cfg7 = []; cfg7.output = 'pow'; cfg7.method = 'wltconvol' cfg7.foi = 1:2:30; cfg7.t_ftimwin = 5./cfg7.foi; cfg7.tapsmofrq = 0.4 *cfg7.foi; cfg7.toi = 0:0.01:0.5; TFRmult = freqanalysis(cfg7, avgFIC); cfg8 = []; cfg8.baseline = [-0.5 0.5]; cfg8.xlim = [0 0.5] cfg8.zlim = [-3e-27 0.2]; cfg8.showlabels = 'yes'; cfg8.layout = 'biosemi128.lay'; multiplotTFR(cfg8, TFRmult); From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed May 24 13:26:35 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 24 May 2006 13:26:35 +0200 Subject: multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: Message-ID: Hi Carina, I think it could be caused by your baseline Your trials are from 0 to 0.5 seconds cfg7.toi = 0:0.01:0.5; And your baseline is from -0.5 to 0.5 seconds cfg8.baseline = [-0.5 0.5]; The baseline shouldn't be the whole trial. But I'm not totally sure that this is the problem, since you describe that the output is only a grey page. Does matlab give an error message? Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Carina Graversen Sent: Wednesday, May 24, 2006 12:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi. I'm trying to use the Fieldtrip program to create a wavelet plot of my EEG data. I have used it previously for 64 channel recordings, but now I'm working with 128 channels of data, which is causing me some problems. The only thing I have changed is the command: cfg8.layout = 'biosemi128.lay'; But now the figure only outputs a grey page with no Time-Frequency distributions at all. Can anyone tell me what I'm doing wrong - below is a complete list of all the commands I use :o). Best Regards, Carina Graversen % ************************************************************************* % EVENTRELATEDAVERAGING % ************************************************************************* cfg1 = []; % empty configuration cfg1.datafile = 'test128.eeg'; % 128 channel Neuroscan eeg file cfg1.headerfile = 'test128.eeg'; cfg1.channel = 'all'; dataFIC = preprocessing(cfg1); % Preprocess! cfg2 = []; % empty configuration avgFIC = timelockanalysis(cfg2, dataFIC); % % ************************************************************************* % % WAVELET % % ************************************************************************* cfg7 = []; cfg7.output = 'pow'; cfg7.method = 'wltconvol' cfg7.foi = 1:2:30; cfg7.t_ftimwin = 5./cfg7.foi; cfg7.tapsmofrq = 0.4 *cfg7.foi; cfg7.toi = 0:0.01:0.5; TFRmult = freqanalysis(cfg7, avgFIC); cfg8 = []; cfg8.baseline = [-0.5 0.5]; cfg8.xlim = [0 0.5] cfg8.zlim = [-3e-27 0.2]; cfg8.showlabels = 'yes'; cfg8.layout = 'biosemi128.lay'; multiplotTFR(cfg8, TFRmult); From olga at GRAPHICMIND.INFO Wed May 24 17:44:29 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Wed, 24 May 2006 19:44:29 +0400 Subject: clusterrandomization on 3D-data within-subject Message-ID: Dear List member, Sorry for such dull questions but, I am again facing the new problems with Fieldtrip, although did not solve some previous one (still can not singleplot and multiplot anything 'cause of "unknown zparam field". OK, about new one :-) It seems that I did not use write the timelockgranaveraging. The problem must be here, when I made grand averaging of all my 11 subject data cfg =[]; cfg.keepindividual = 'yes' C_vc11 = timelockgrandaverage(cfg,vc_c_avg1,vc_c_avg2,vc_c_avg3,vc_c_avg4,vc_c_avg5, vc_c_avg6,vc_c_avg7,vc_c_avg8,vc_c_avg9,vc_c_avg10,vc_c_avg11 ); As I understand the vc_c_avg11.avg([9],[43]) should be similar with C_vc11.individual ([11], [9], [43]) But it is not. What can it be? Best Regards, Olga. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 4:34 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari ---------------------------------------------------------------------------- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed May 24 18:45:49 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 24 May 2006 18:45:49 +0200 Subject: clusterrandomization on 3D-data within-subject In-Reply-To: <001501c67f48$f1f18cf0$51210ad9@olga> Message-ID: Hi Olga, About the z-param: This is the field that contains the data to be plotted; for instance 'avg', 'powspctrm' or 'cohspctrm'. Normally the function looks in your data.dimord to find out which z-param to use. To make the function work you could give cfg.zparam = 'avg' (for instance if you want to plot an ERF/ERP). But if you could send me what the dimord field of the data that you want to plot is, I could look why the plot functions don't extract the correct zparam themselves. About the timelockgranaveraging: I also think it should be the same. I have no idea what it could be. Good luck, Ingrid Nieuwenhuis _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Wednesday, May 24, 2006 5:44 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear List member, Sorry for such dull questions but, I am again facing the new problems with Fieldtrip, although did not solve some previous one (still can not singleplot and multiplot anything 'cause of "unknown zparam field". OK, about new one :-) It seems that I did not use write the timelockgranaveraging. The problem must be here, when I made grand averaging of all my 11 subject data cfg =[]; cfg.keepindividual = 'yes' C_vc11 = timelockgrandaverage(cfg,vc_c_avg1,vc_c_avg2,vc_c_avg3,vc_c_avg4,vc_c_avg5, vc_c_avg6,vc_c_avg7,vc_c_avg8,vc_c_avg9,vc_c_avg10,vc_c_avg11 ); As I understand the vc_c_avg11.avg([9],[43]) should be similar with C_vc11.individual ([11], [9], [43]) But it is not. What can it be? Best Regards, Olga. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 4:34 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marie at PSY.GLA.AC.UK Wed May 24 19:27:06 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Wed, 24 May 2006 18:27:06 +0100 Subject: Beamformer time course In-Reply-To: <000001c67f03$2d3ab750$902dae83@fcdonders.nl> Message-ID: Hi, Thanks for the pointer to the earlier discussion, unfortunately it does not answer my question. I had assumed that the dics filters were output for a fixed dipole orientation (that which maximizes filter output) - hence i was expecting to have a 1 dimensional set of filter weights with which to compute a time series (cf. a virtual channel). I am unsure how to interpret the three time series resulting from multiplying the 3D filter with the time series. Does this mean the orientation could change trial per trial and time point per time point? Does this mean that for calculations involving the time course (e.g. synchrony) that you only use the amplitude, disregarding the orientation? Thanks, Marie On 24 May 2006, at 08:25, Jan Mathijs Schoffelen wrote: > Dear Marie, > > Please have a look in the discussion's list archive. A question > very similar > to yours has been answered: see the archive of May 2006, and follow > the link > "source reconstruction". The discussion's list archive can be > reached from > the website. > > > Yours, > > Jan-Mathijs > > The dimensionality of the filter is a 3xN-matrix, with N the number of > sensors. The "3" corresponds with the x,y,z direction in space. In > other > words: multiplying your data with the filter results in a 3xT > (number of > time points) matrix, which represents a dipole's activity in 3-D > space. > > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > On Behalf > Of Marie Smith > Sent: Tuesday, May 23, 2006 7:47 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] Beamformer time course > > Hi, > > Thanks again for all your help with my questions so far, it has been > very useful. > > As an alternative method to determining the time course of > activation, I planned to use the filter as output from sourceanalysis > directly with the time locked data set. > However I am unsure what the three dimensions of the filter are. > Could you please clarify this for me. > > Thanks > > Marie > > > > > On 23 May 2006, at 11:12, Robert Oostenveld wrote: > >> Hi Marie, >> >> On 22 May 2006, at 17:18, Marie Smith wrote: >>> I have been trying out the various methods as discussed and have >>> come across a problem. >>> >>> When I select cfg.singletrials = 'yes' I get a number of error >>> messages saying >>> error('this option contains a bug, and is therefore not supported >>> at the moment'); >>> >>> I am using the toolbox fieldtrip-20060516. >>> >>> I noticed however, if I select cfg.rawtrials = 'yes' the function >>> will run. >> >> I recall disabling this functionality, since it was rarely used and >> since I was concerned that it would not be correct. I now had a >> more detailled look at the code. >> >> If you do rawtrial=yes, beamformer uses the single-trial covariance >> to construct the filter and also applies it to the single trial >> covariance/csd. That results in a very poorly estimated filter in >> each trial, hence projecting large amounts of noise and a lot of >> variance over trials. Therefore we found it not to be very usefull >> on real data, although conceptually and in the code it is correct. >> >> The idea behind singletrial=yes is that beamformer uses the average >> covariance to construct the filter and applies it to the single >> trial covariance/csd. The problem in the code however is that >> beamformer would use the averaged covariance/csd to estimate the >> power and not the single trial covariance/csd. The estimated single- >> trial timecourse would be correct, but the power would not be >> correct. Therefore I disabled that option in the code. >> >> The solution is something that you can do yourself in two >> subsequent runs of sourceanalysis: you can do sourceanalysis on the >> average (i.e. do not specify any of singletrial/rawtrial options) >> and specify keepfilter=yes. That will give you the filter, computed >> on the average covariance. Subsequently do cfg.grid=source2grid >> (source), and use the resulting grid (including the filters) in the >> second run of sourceanalysis, in which you specify >> cfg.rawtrial=yes. In the second run, the previous (based on average >> covariance) filters will be applied to the unaveraged data, >> resulting in the desired single-trial power and dipole moment. >> >> best regards, >> Robert From r.oostenveld at FCDONDERS.RU.NL Wed May 24 20:26:43 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 May 2006 20:26:43 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: On 23 May 2006, at 17:09, Marie Smith wrote: > I have tried the analysis as you suggest and although the analysis > appears to run I cannot find the single trial time courses in the > outcome of the second run of sourceanalysis. Hi Marie, Please try following demo, in which you have to replace the res4 and hdm file with some that you have on your disk. % read some data that is required to simulate MEG data, i.e. volume model, % sensor positions and MRI (optional, only for plotting) vol = read_ctf_hdm('test_RO_005/Subject01.hdm'); hdr = read_fcdc_header('test_RO_005/Subject01.ds/Subject01.res4'); grad = hdr.grad; % construct the simulated MEG data cfg = []; cfg.vol = vol; cfg.grad = grad; cfg.fsample = 300; cfg.ntrials = 30; cfg.triallength = 1; cfg.dip.pos = [0 7 8]; cfg.dip.mom = [1 0 0]; cfg.dip.signal = sin(2*pi*10*(1:cfg.fsample)./cfg.fsample); cfg.absnoise = 1e-8; rawA = dipolesimulation(cfg); % compute ERF and covariance cfg = []; cfg.keeptrials = 'yes'; cfg.covariance = 'yes'; avgA = timelockanalysis(cfg, rawA); % test each of the resampling strategies for LCMV cfg = []; cfg.method = 'lcmv'; cfg.lambda = 0; cfg.resolution = 4; cfg.hdmfile = 'test_RO_005/Subject01.hdm'; cfg.feedback = 'no'; cfg.keepfilter = 'yes'; source1 = sourceanalysis(cfg, avgA); cfg.grid = source2grid(source1); cfg.rawtrial = 'yes'; source2 = sourceanalysis(cfg, avgA); If you look in source2, you will see >> source2.trial ans = 1x30 struct array with fields: pow mom noise filter Each source2.trial(i).mom contain the virtual channel outputs in trial i for each of the grid locations, i.e. plot(source2.trial(2).mom{source2.inside(1)}') will plot the x, y, and z components of the dipole moment in the first trial and on the first dipole location of the grid inside the brain. > Also, for information I am having some problems using the compiled > mex files with matlab 7 under unix. which unix? best Robert From r.oostenveld at FCDONDERS.RU.NL Wed May 24 20:52:26 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 May 2006 20:52:26 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: On 24 May 2006, at 19:27, Marie Smith wrote: > Thanks for the pointer to the earlier discussion, unfortunately it > does not answer my question. > I had assumed that the dics filters were output for a fixed dipole > orientation (that which maximizes filter output) - hence i was > expecting to have a 1 dimensional set of filter weights with which > to compute a time series (cf. a virtual channel). > I am unsure how to interpret the three time series resulting from > multiplying the 3D filter with the time series. Does this mean the > orientation could change trial per trial and time point per time > point? yes, for each trial you could estimate a different maximal orientation from the 3xNtime matrix. See beow. > Does this mean that for calculations involving the time course > (e.g. synchrony) that you only use the amplitude, disregarding the > orientation? The CTF-SAM algorithm internally optimizes the orientation with a non- linear fit, while in the LCMV algorithm you can optimize the orientation afterwards using the linear PCA approach described below. The results will be slighly different. The published DICS algorithm does not specify how to operate in single trial mode, but basically the DICS corresponds to a complex version of LCMV without timecourses (since frequency domain). If you are only interested in the dipole moment along the most dominant direction (i.e the direction with the largest power, you can do a PCA with [u,s,v] = svd(source2.trial(1).mom{source2.inside(1)}); and use the first column of v multiplied by s(1,1), which gives the timecourse of the orthogonal component with the most variance, i.e. power. The orientation itself is in u(:,1). If you want to determine the orientation with the maximal power over all trials, you would have to concatenate all single trial dipole moments into one large 3x (Ntrials*Ntime) matrix and do the pca/svd on that. Regarding dipole orientations: note that we typically find better results if we restrict the MEG forward model to contain only the two tangential dipole components, which is achieved by precomputing the leadfields (prepare_leadfield) with the option cfg.reducerank=2. The dipole model is still represented in three carthesian directions, but the leadfield (and the filter and projected data) have rank 2, i.e. there is one orientation in which the dipole is silent. Reducing the rank of the forward model to two removes the most silent dipole orientation (i.e. the radial orientation), which is also the orientation along which the beamformer is most sensitive for picking up noise. Note that if you use a single-sphere mode, the radial component is already completely zero, for a multisphere model it is not zero, but small (there will always be a sphere in which the orientation is not radial). best Robert From r.oostenveld at FCDONDERS.RU.NL Wed May 24 20:57:21 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 May 2006 20:57:21 +0200 Subject: multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: Message-ID: Hi Carina Are you sure that the biosemi 128ch layout corresponds with your electrode layout? Open the layout file in a tetx editor and look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting I suggest that you try the elec1010.lay or elec1005.lay, or even better, that you construct your own layout file corresponding with your own electrode locations. Robert On 24 May 2006, at 12:29, Carina Graversen wrote: > Hi. > > I'm trying to use the Fieldtrip program to create a wavelet plot of > my EEG > data. > > I have used it previously for 64 channel recordings, but now I'm > working > with 128 channels of data, which is causing me some problems. The > only thing > I have changed is the command: > cfg8.layout = 'biosemi128.lay'; > > But now the figure only outputs a grey page with no Time-Frequency > distributions at all. > > Can anyone tell me what I'm doing wrong - below is a complete list > of all > the commands I use :o). > > Best Regards, > Carina Graversen > > > > > % > ********************************************************************** > *** > % EVENTRELATEDAVERAGING > % > ********************************************************************** > *** > cfg1 = []; % empty > configuration > cfg1.datafile = 'test128.eeg'; % > 128 channel > Neuroscan eeg file > cfg1.headerfile = 'test128.eeg'; > cfg1.channel = 'all'; > > dataFIC = preprocessing(cfg1); % > Preprocess! > > cfg2 = []; % empty > configuration > > avgFIC = timelockanalysis(cfg2, dataFIC); > > > % % > ********************************************************************** > *** > % % WAVELET > % % > ********************************************************************** > *** > cfg7 = []; > cfg7.output = 'pow'; > cfg7.method = 'wltconvol' > cfg7.foi = 1:2:30; > cfg7.t_ftimwin = 5./cfg7.foi; > cfg7.tapsmofrq = 0.4 *cfg7.foi; > cfg7.toi = 0:0.01:0.5; > > TFRmult = freqanalysis(cfg7, avgFIC); > > cfg8 = []; > cfg8.baseline = [-0.5 0.5]; > cfg8.xlim = [0 0.5] > cfg8.zlim = [-3e-27 0.2]; > cfg8.showlabels = 'yes'; > cfg8.layout = 'biosemi128.lay'; > > multiplotTFR(cfg8, TFRmult); > From stephan.bickel at ANATOM.UNIZH.CH Thu May 25 20:30:50 2006 From: stephan.bickel at ANATOM.UNIZH.CH (Stephan Bickel) Date: Thu, 25 May 2006 20:30:50 +0200 Subject: clusterrand electrode neighbours Message-ID: Hi, I try to apply clusterrandanalysis to time-frequency data I exported from BESA.But I seem to have a problem with the specifications of neighbouring electrodes. After applying clusterrandanalysis I get several significant clusters in the same time-frequency range in neighbouring electrodes, i.e. one cluster for each electrode in that range. I assumed that they should be collected to one one cluster if the effect is in the same range and region? Here is what I tried: elec = read_fcdc_elec('27mtg.sfp'); % the exported BESA coordinates cfg=[]; cfg.statistic = 'depsamplesT'; cfg.alphathresh = 0.05; cfg.makeclusters = 'yes'; cfg.clusterteststat = 'maxsum'; cfg.onetwo = 'twosided'; cfg.alpha = 0.05; cfg.nranddraws = 1000; cfg.channel = 'all'; cfg.neighbourdist = 0.04; % I also tried 0.05 with the same result cfg.latency = 'all'; cfg.elec = elec; [stat] = clusterrandanalysis(cfg,fileB,fileA); I also tried the analysis with manually defined neighbours, but received the same result. I attached the elec variable with the coordinates. Thank you very much for your help, Stephan From maris at NICI.RU.NL Thu May 25 21:09:11 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 25 May 2006 21:09:11 +0200 Subject: clusterrand electrode neighbours Message-ID: Hi Stephan, > After applying clusterrandanalysis I get several significant clusters in > the > same time-frequency range in neighbouring electrodes, i.e. one cluster for > each electrode in that range. I assumed that they should be collected to > one > one cluster if the effect is in the same range and region? Two (channel,time,frequency)-triplets with the same time and frequency values and neighbouring electrodes must belong to the same cluster (if their T-statistics exceed cfg.alphathresh, of course). > > Here is what I tried: > > elec = read_fcdc_elec('27mtg.sfp'); % the exported BESA coordinates > > cfg=[]; > cfg.statistic = 'depsamplesT'; > cfg.alphathresh = 0.05; > cfg.makeclusters = 'yes'; > cfg.clusterteststat = 'maxsum'; > cfg.onetwo = 'twosided'; > cfg.alpha = 0.05; > cfg.nranddraws = 1000; > cfg.channel = 'all'; > cfg.neighbourdist = 0.04; % I also tried 0.05 with the same > result > cfg.latency = 'all'; > cfg.elec = elec; > [stat] = clusterrandanalysis(cfg,fileB,fileA); > > I also tried the analysis with manually defined neighbours, but received > the > same result. > I attached the elec variable with the coordinates. I did not find the elec variable in the attachment. What is the dimension of the BESA coordinates? Is it centimeters? In that case, cfg.neighbourdist=0.04 is so small that no electrode will be selected as a neighbour. You could calculate the inter-electrode distances on the basis of their coordinates and use that information to determine cfg.neighbourdist. If that doesn´t help, you can send your cfg and data to maris at nici.ru.nl. I will have a look at it. greetings, Eric Maris From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri May 26 14:28:44 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 26 May 2006 14:28:44 +0200 Subject: multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: <81CAC428-2DEF-4066-B850-733FA9A1BC28@fcdonders.ru.nl> Message-ID: Hi Carina, Thanks for sending me the data. Indeed the biosemi 128ch layout doesn't correspond to your layout. You have 128 channels labeled from 1 to 128. If you open biosemi128.lay in a text-editor you can see that this layout file has 150 channels labeled from A1 to P7. The labels in your data (TFRmult.label) and the labels in the layout file don't match, that's why you got an empty figure (I'll add an error in the plot function, so that when no labels match you'll get an error message in the future). So what you have to do now is to make your own layout file that matches the data; with the correct x and y coordinates of the 128 channels and the same label names as in your data. Just as an illustration I attached an adapted version of the biosemi128.lay file, with only the first 128 channels, and labels 1 to 128, just as in your data. With the following configuration: cfg8 = []; cfg8.baseline = [0 0.1]; cfg8.xlim = [0 0.3] cfg8.ylim = [15 29]; cfg8.zlim = [-100 100]; cfg8.showlabels = 'yes'; cfg8.layout = 'testlay128.lay'; I got the attached figure from your data. Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Wednesday, May 24, 2006 8:57 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina Are you sure that the biosemi 128ch layout corresponds with your electrode layout? Open the layout file in a tetx editor and look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting I suggest that you try the elec1010.lay or elec1005.lay, or even better, that you construct your own layout file corresponding with your own electrode locations. Robert On 24 May 2006, at 12:29, Carina Graversen wrote: > Hi. > > I'm trying to use the Fieldtrip program to create a wavelet plot of > my EEG > data. > > I have used it previously for 64 channel recordings, but now I'm > working > with 128 channels of data, which is causing me some problems. The > only thing > I have changed is the command: > cfg8.layout = 'biosemi128.lay'; > > But now the figure only outputs a grey page with no Time-Frequency > distributions at all. > > Can anyone tell me what I'm doing wrong - below is a complete list > of all > the commands I use :o). > > Best Regards, > Carina Graversen > > > > > % > ********************************************************************** > *** > % EVENTRELATEDAVERAGING > % > ********************************************************************** > *** > cfg1 = []; % empty > configuration > cfg1.datafile = 'test128.eeg'; % > 128 channel > Neuroscan eeg file > cfg1.headerfile = 'test128.eeg'; > cfg1.channel = 'all'; > > dataFIC = preprocessing(cfg1); % > Preprocess! > > cfg2 = []; % empty > configuration > > avgFIC = timelockanalysis(cfg2, dataFIC); > > > % % > ********************************************************************** > *** > % % WAVELET > % % > ********************************************************************** > *** > cfg7 = []; > cfg7.output = 'pow'; > cfg7.method = 'wltconvol' > cfg7.foi = 1:2:30; > cfg7.t_ftimwin = 5./cfg7.foi; > cfg7.tapsmofrq = 0.4 *cfg7.foi; > cfg7.toi = 0:0.01:0.5; > > TFRmult = freqanalysis(cfg7, avgFIC); > > cfg8 = []; > cfg8.baseline = [-0.5 0.5]; > cfg8.xlim = [0 0.5] > cfg8.zlim = [-3e-27 0.2]; > cfg8.showlabels = 'yes'; > cfg8.layout = 'biosemi128.lay'; > > multiplotTFR(cfg8, TFRmult); > -------------- next part -------------- A non-text attachment was scrubbed... Name: figure.png Type: image/png Size: 20378 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testlay128.lay Type: application/octet-stream Size: 5308 bytes Desc: not available URL: From olga at GRAPHICMIND.INFO Fri May 26 14:56:35 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Fri, 26 May 2006 16:56:35 +0400 Subject: and clusterrandomization Message-ID: Thank you very much Ingrid! I found the mistake and, moreover, I plot whotever I want :-) The problem was that when grandaveraging it changes the order of the electrode and the 9th channel it my original file no more corresponds with the 9th channel of the grand-average file! But if I add the link to my layout file there no problems with correct plotting of the results. But the problems is still in my clusterrandomization. Could the fact that the order of the channel in the file (C_vc11.label) is not the same as in the C_vc11.elec.label influences the result of clusterrandomization (I do not have my neigbouring channel file)? Best Regards, Olga. ----- Original Message ----- From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Wednesday, May 24, 2006 8:45 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Hi Olga, About the z-param: This is the field that contains the data to be plotted; for instance 'avg', 'powspctrm' or 'cohspctrm'. Normally the function looks in your data.dimord to find out which z-param to use. To make the function work you could give cfg.zparam = 'avg' (for instance if you want to plot an ERF/ERP). But if you could send me what the dimord field of the data that you want to plot is, I could look why the plot functions don't extract the correct zparam themselves. About the timelockgranaveraging: I also think it should be the same. I have no idea what it could be. Good luck, Ingrid Nieuwenhuis ------------------------------------------------------------------------------ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Wednesday, May 24, 2006 5:44 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear List member, Sorry for such dull questions but, I am again facing the new problems with Fieldtrip, although did not solve some previous one (still can not singleplot and multiplot anything 'cause of "unknown zparam field". OK, about new one :-) It seems that I did not use write the timelockgranaveraging. The problem must be here, when I made grand averaging of all my 11 subject data cfg =[]; cfg.keepindividual = 'yes' C_vc11 = timelockgrandaverage(cfg,vc_c_avg1,vc_c_avg2,vc_c_avg3,vc_c_avg4,vc_c_avg5, vc_c_avg6,vc_c_avg7,vc_c_avg8,vc_c_avg9,vc_c_avg10,vc_c_avg11 ); As I understand the vc_c_avg11.avg([9],[43]) should be similar with C_vc11.individual ([11], [9], [43]) But it is not. What can it be? Best Regards, Olga. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 4:34 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari -------------------------------------------------------------------------- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Fri May 26 15:35:45 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Fri, 26 May 2006 15:35:45 +0200 Subject: and clusterrandomization Message-ID: Dear Olga, But the problems is still in my clusterrandomization. Could the fact that the order of the channel in the file (C_vc11.label) is not the same as in the C_vc11.elec.label influences the result of clusterrandomization (I do not have my neigbouring channel file)? That should not matter. However, the labels in your data structure (.label in the output of timelockgrandaverage) should exactly match the labels in the elec-structure. If that is OK, then something might have gone wrong with the combination of the data of the different subjects. Do they all have the same elec-structure? If the same physical channel has different labels for different subjects, then this may create inconsistencies between EEGlab and Fieldtrip. For Fieldtrip, channels that have the same label are assumed to be physically identical, even if they are in different positions in the data structure. This is only a guess, of course. kind regards, Eric Maris Best Regards, Olga. ----- Original Message ----- From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Wednesday, May 24, 2006 8:45 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Hi Olga, About the z-param: This is the field that contains the data to be plotted; for instance 'avg', 'powspctrm' or 'cohspctrm'. Normally the function looks in your data.dimord to find out which z-param to use. To make the function work you could give cfg.zparam = 'avg' (for instance if you want to plot an ERF/ERP). But if you could send me what the dimord field of the data that you want to plot is, I could look why the plot functions don't extract the correct zparam themselves. About the timelockgranaveraging: I also think it should be the same. I have no idea what it could be. Good luck, Ingrid Nieuwenhuis ------------------------------------------------------------------------------ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Wednesday, May 24, 2006 5:44 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear List member, Sorry for such dull questions but, I am again facing the new problems with Fieldtrip, although did not solve some previous one (still can not singleplot and multiplot anything 'cause of "unknown zparam field". OK, about new one :-) It seems that I did not use write the timelockgranaveraging. The problem must be here, when I made grand averaging of all my 11 subject data cfg =[]; cfg.keepindividual = 'yes' C_vc11 = timelockgrandaverage(cfg,vc_c_avg1,vc_c_avg2,vc_c_avg3,vc_c_avg4,vc_c_avg5, vc_c_avg6,vc_c_avg7,vc_c_avg8,vc_c_avg9,vc_c_avg10,vc_c_avg11 ); As I understand the vc_c_avg11.avg([9],[43]) should be similar with C_vc11.individual ([11], [9], [43]) But it is not. What can it be? Best Regards, Olga. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 4:34 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari -------------------------------------------------------------------------- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. From giosue.baggio at FCDONDERS.RU.NL Sun May 28 19:31:22 2006 From: giosue.baggio at FCDONDERS.RU.NL (Giosue Baggio) Date: Sun, 28 May 2006 19:31:22 +0200 Subject: eeg reref Message-ID: Hi all, I am working on some EEG data recorded using a left mastoid reference. I need to compute a linked mastoid reference using the additional TP10 channel. So I have added in my preprocessing settings file the following: cfg.reref = 'yes'; cfg.refchannel = 'TP10'; Does this really compute a linked mastoid reference? My doubts derive from the fact that in the final multiplots TP10 looks suspiciously flat or better empty. I wonder whether the above cfg settings just replaced my original TP10 with zeroes instead of computing the linkedm reference... Thanks. Giosue'. From giosue.baggio at FCDONDERS.RU.NL Sun May 28 20:49:06 2006 From: giosue.baggio at FCDONDERS.RU.NL (Giosue Baggio) Date: Sun, 28 May 2006 20:49:06 +0200 Subject: eeg reref Message-ID: After some thinking, another (perhaps more likely) possibility is that TP10 was also included in set of channels which now use TP10 as reference. This would explain why it looks flat. If so, is there a way to exclude it from reref? Thanks, g. From t.montez at VUMC.NL Mon May 29 01:16:58 2006 From: t.montez at VUMC.NL (Montez, T.) Date: Mon, 29 May 2006 01:16:58 +0200 Subject: eeglab2fieldtrip and planar Message-ID: Dear Fieldtrip experts, I am using EEGLAB to do artifact rejection with ICA. I export the file to fieldtrip with eeglab2fieldtrip, but I had to make some changes to be able to compute the planar transformation that you might want to include by default in the function: - transform to single trial - add the .grad - change data.label to column - change data.trial to double Best regards, Teresa Montez CODE: [ALLEEG EEG CURRENTSET ALLCOM] = eeglab; EEG = pop_loadset( 'filename', 'A004_ICA.set', 'filepath', 'E:\AD_Project\Results\'); [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG, 0 ); eeglab redraw; data = eeglab2fieldtrip( EEG, 'preprocessing' ); clear ALL* CURRENT* EEG LASTCOM STUDY cfg=[]; cfg.resamplefs = 125; data_125 = resampledata (cfg, data); clear data % transform to single trial data_125.trial2=[]; for i=1:37 data_125.trial2=[data_125.trial2 data_125.trial{i}]; end data_125.trial={data_125.trial2}; clear data_125.trial2 data_125.time={[0:1/125:30339*(1/125)]}; data_125.offset=[1]; % import .grad from another dataset cd E:\AD_Project\mca\Matlab\Controls\C002 load data_3_7 data_125.grad=data_3_7.grad; clear data_3_7 % data.label must be column data_125.label=data_125.label'; % data.trial must be double data_125.trial{1}=double(data_125.trial{1}); cfg=[]; cfg.repair = 'yes' cfg.badchannel = {'MLT22'}; data_rp=megrepair(cfg,data_125) clear data_125 cfg=[]; cfg.planar = 'yes' cfg.planarmethod = 'sincos'; data_p=megplanar(cfg,data_rp); clear data_rp save data_p data_p -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Mon May 29 09:39:02 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 29 May 2006 09:39:02 +0200 Subject: eeg reref In-Reply-To: <9dcbc65482b9.447a0cc2@ru.nl> Message-ID: Hi Giosue, With cfg.reref = 'yes'; cfg.refchannel = 'TP10'; you re-reference the data to TP10 only, i.e. TP10 will be the new reference channel by itself and therefore it is flat (all zeros). Assuming that TP9 is the other channel that you want to use, you should do cfg.reref = 'yes'; cfg.refchannel = {'TP9' 'TP10'}; to obtain the data referenced to linked mastoids. If TP9 is the actual reference channel that was used in the recording, and if you did not include TP9 in the recorded datafile, you should also specify cfg.implicitref = 'TP9' This will first add the channel TP9 to the data (which is all zeros, since it is referenced against itself) and subsequently it will use TP9+TP10 as the new reference. You can check afterwards: the sum of the potential in TP9 and TP10 should be zero. best Robert On 28 May 2006, at 20:49, Giosue Baggio wrote: > After some thinking, another (perhaps more likely) possibility is > that TP10 was also included in set of channels which now use TP10 > as reference. This would explain why it looks flat. If so, is there > a way to exclude it from reref? > > Thanks, > > g. > From r.oostenveld at FCDONDERS.RU.NL Mon May 29 09:49:50 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 29 May 2006 09:49:50 +0200 Subject: eeglab2fieldtrip and planar In-Reply-To: <28FF6B8D22C94B44A55E4E1325A94AF2348037@vumc-mb02.vumc.nl> Message-ID: Hi Theresa, thanks for your suggestions. Let me comment on them > - transform to single trial That should not be neccessary. MEGPLANAR should be able to work on preprocessed data and on timelocked data (i.e. ERFs). If I am wrong, please let me know since it would indicate a bug. > - add the .grad The grad (complete gradiometer information) is not available in EEGLAB, therefore it cannot be added in EEGLAB2FIELDTRIP > - change data.label to column I will ensure that that is consistently done (throughout the FT code). > - change data.trial to double I think that whether that is neccessary depends on the Matlab version that you use, from version 7.0 onwards it should be possible to work with single precision, and the conversion would not be needed. What Matlab are you using? I can add the conversion in combination with a check for the matlab version (i.e. convert to double if version 6, not convert if version 7). best Robert From muthuraman10 at HOTMAIL.COM Mon May 29 16:00:52 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 29 May 2006 14:00:52 +0000 Subject: query on coherence source analysis In-Reply-To: <5BAC967A-983F-42B4-ABFB-9298FA6B9737@fcdonders.ru.nl> Message-ID: Hello Thanks for the suggestions i have been trying to use the freqanalysis_mtmwelch which you have send to me in the previous mail i get a error when using this program i have attached all the statements in this mail please go through and tell me is there a problem in the specifications cfg=[]; cfg.output='powandcsd'; cfg.method='mtmwelch'; cfg.foi=1:2:30; numfoi = length(cfg.foi); cfg.taper='hanning'; cfg.t_ftimwin=zeros(1,numfoi); cfg.t_ftimwin(:)=0.5; cfg.channel=channelselection({'EEG' 'EMG2'},data.label); cfg.channelcmb={'EEG' 'EMG2'}; freq=freqanalysis(cfg,data); ??? Error using ==> freqanalysis_mtmwelch unexpected dimord Error in ==> freqanalysis at 187 [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on coherence source analysis >Date: Tue, 23 May 2006 12:33:24 +0200 > >Dear Muthuraman > >At the Donders we usually use the multitaper method for computing the >cross spectral density, in freqanalysis that is cfg.method='mtmfft' or >'mtmconvol'. If you would use the mtmconvol method, you will get a >frequency decomposition for multiple sliding time windows (that can be >overlapping or not). If you then would average these frequency >decompositions over time, you have performed Welch's method. We already >implemented that in a function, see attached freqanalysis_mtmwelch (i.e. >it even allows you to combine multitapering and Welch). Add it to your >fieldtrip directory and specify cfg.method='mtmwelch' for freqanalysis. > >This new function is still rather poorly documented, and it does not have >default settings for most of the cfg options. Probably you will want >cfg.taper=hanning (i.e. no multitapering), in which case you do not have >to specify cfg.tapsmofrq. The function will use maximally overlapping >windows for Welch method (which takes a lot of memory). You should specify >the frequencies of interest (cfg.foi) and window length per frequency >(cfg.t_ftimwin). > >best >Robert > ><< freqanalysis_mtmwelch.m >> > > >On 22 May 2006, at 14:15, Muthuraman Muthuraman wrote: >>hello >> >>Thankyou for the previous suggestion >> >>I have gone through the article, in which for the 'DICS' algorthim it is >>mentioned that they use welch method to calculate the cross spectral >>density, for the freqanalysis program is there a cfg.method with welch to >>use it for the 'DICS'. >> >>I do not find the freqanalysis_mtmwelch >>I have the 20060131 version of fieltrip is it updated in the latest >>versions >> >>with regards >>muthu >> >> >>>From: Robert Oostenveld >>>Reply-To: FieldTrip discussion list >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: Re: [FIELDTRIP] query on coherence source analysis >>>Date: Tue, 2 May 2006 14:57:56 +0200 >>> >>>Dear Muthuraman >>> >>>Fieldtrip implements DICS in the SOURCEANALYSIS function. You can find >>>the literature reference to the DICS algorith on the page http:// >>>www2.ru.nl/fcdonders/fieldtrip/doku.php? >>>id=fieldtrip:documentation:references_to_implemented_methods >>> >>>best regards, >>>Robert >>> >>>On 2 May 2006, at 11:02, Muthuraman Muthuraman wrote: >>> >>>>Hello >>>> >>>>Thanks for the Previous suggestions >>>> >>>>i would like to know whether there is prescribed algorithm in >>>>Fieldtrip >>>>to calculate the coherent source analysis between the EEG and EMG >>>>data >>>> >>>>with regards >>>>muthuraman >>>> >> > From cgra05 at HST.AUC.DK Wed May 31 10:57:33 2006 From: cgra05 at HST.AUC.DK (Carina Graversen) Date: Wed, 31 May 2006 10:57:33 +0200 Subject: SV: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: <005f01c680bf$edb1a8f0$642dae83@fcdonders.nl> Message-ID: Hi Ingrid. Thanks a lot. I have tried to generate my own layout file in Neuroscan, but unfortunately it doesn't work. So I was wondering if you can tell me the format of the layout-file, because when I look at your file, 2 of the columns contain the same value for all channels. I have tried to generate for both cartesian and polor, but none of them matches. In the generated file I get the format: Can I change my input configuration to either use this format, or how should I change the format of the layout file ??? Thanks in advance :o) /Carina -----Oprindelig meddelelse----- Fra: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL]Pa vegne af Ingrid Nieuwenhuis Sendt: 26. maj 2006 13:29 Til: FIELDTRIP at NIC.SURFNET.NL Emne: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina, Thanks for sending me the data. Indeed the biosemi 128ch layout doesn't correspond to your layout. You have 128 channels labeled from 1 to 128. If you open biosemi128.lay in a text-editor you can see that this layout file has 150 channels labeled from A1 to P7. The labels in your data (TFRmult.label) and the labels in the layout file don't match, that's why you got an empty figure (I'll add an error in the plot function, so that when no labels match you'll get an error message in the future). So what you have to do now is to make your own layout file that matches the data; with the correct x and y coordinates of the 128 channels and the same label names as in your data. Just as an illustration I attached an adapted version of the biosemi128.lay file, with only the first 128 channels, and labels 1 to 128, just as in your data. With the following configuration: cfg8 = []; cfg8.baseline = [0 0.1]; cfg8.xlim = [0 0.3] cfg8.ylim = [15 29]; cfg8.zlim = [-100 100]; cfg8.showlabels = 'yes'; cfg8.layout = 'testlay128.lay'; I got the attached figure from your data. Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Wednesday, May 24, 2006 8:57 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina Are you sure that the biosemi 128ch layout corresponds with your electrode layout? Open the layout file in a tetx editor and look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting I suggest that you try the elec1010.lay or elec1005.lay, or even better, that you construct your own layout file corresponding with your own electrode locations. Robert On 24 May 2006, at 12:29, Carina Graversen wrote: > Hi. > > I'm trying to use the Fieldtrip program to create a wavelet plot of > my EEG > data. > > I have used it previously for 64 channel recordings, but now I'm > working > with 128 channels of data, which is causing me some problems. The > only thing > I have changed is the command: > cfg8.layout = 'biosemi128.lay'; > > But now the figure only outputs a grey page with no Time-Frequency > distributions at all. > > Can anyone tell me what I'm doing wrong - below is a complete list > of all > the commands I use :o). > > Best Regards, > Carina Graversen > > > > > % > ********************************************************************** > *** > % EVENTRELATEDAVERAGING > % > ********************************************************************** > *** > cfg1 = []; % empty > configuration > cfg1.datafile = 'test128.eeg'; % > 128 channel > Neuroscan eeg file > cfg1.headerfile = 'test128.eeg'; > cfg1.channel = 'all'; > > dataFIC = preprocessing(cfg1); % > Preprocess! > > cfg2 = []; % empty > configuration > > avgFIC = timelockanalysis(cfg2, dataFIC); > > > % % > ********************************************************************** > *** > % % WAVELET > % % > ********************************************************************** > *** > cfg7 = []; > cfg7.output = 'pow'; > cfg7.method = 'wltconvol' > cfg7.foi = 1:2:30; > cfg7.t_ftimwin = 5./cfg7.foi; > cfg7.tapsmofrq = 0.4 *cfg7.foi; > cfg7.toi = 0:0.01:0.5; > > TFRmult = freqanalysis(cfg7, avgFIC); > > cfg8 = []; > cfg8.baseline = [-0.5 0.5]; > cfg8.xlim = [0 0.5] > cfg8.zlim = [-3e-27 0.2]; > cfg8.showlabels = 'yes'; > cfg8.layout = 'biosemi128.lay'; > > multiplotTFR(cfg8, TFRmult); > From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed May 31 11:22:37 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 31 May 2006 11:22:37 +0200 Subject: SV: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: Message-ID: Hi Carina, If you look at the FieldTrip page -> documentation -> frequently asked questions you can find the question (and answer): What is the format of the layout file, which is used for plotting? ...The 4th and 5th column specify the with and height of the subplot that will be made in multiplotER and multiplotTFR.... So the two columns with the same value for all channels are those columns. Bests, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Carina Graversen Sent: Wednesday, May 31, 2006 10:58 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] SV: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Ingrid. Thanks a lot. I have tried to generate my own layout file in Neuroscan, but unfortunately it doesn't work. So I was wondering if you can tell me the format of the layout-file, because when I look at your file, 2 of the columns contain the same value for all channels. I have tried to generate for both cartesian and polor, but none of them matches. In the generated file I get the format: Can I change my input configuration to either use this format, or how should I change the format of the layout file ??? Thanks in advance :o) /Carina -----Oprindelig meddelelse----- Fra: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL]Pa vegne af Ingrid Nieuwenhuis Sendt: 26. maj 2006 13:29 Til: FIELDTRIP at NIC.SURFNET.NL Emne: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina, Thanks for sending me the data. Indeed the biosemi 128ch layout doesn't correspond to your layout. You have 128 channels labeled from 1 to 128. If you open biosemi128.lay in a text-editor you can see that this layout file has 150 channels labeled from A1 to P7. The labels in your data (TFRmult.label) and the labels in the layout file don't match, that's why you got an empty figure (I'll add an error in the plot function, so that when no labels match you'll get an error message in the future). So what you have to do now is to make your own layout file that matches the data; with the correct x and y coordinates of the 128 channels and the same label names as in your data. Just as an illustration I attached an adapted version of the biosemi128.lay file, with only the first 128 channels, and labels 1 to 128, just as in your data. With the following configuration: cfg8 = []; cfg8.baseline = [0 0.1]; cfg8.xlim = [0 0.3] cfg8.ylim = [15 29]; cfg8.zlim = [-100 100]; cfg8.showlabels = 'yes'; cfg8.layout = 'testlay128.lay'; I got the attached figure from your data. Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Wednesday, May 24, 2006 8:57 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina Are you sure that the biosemi 128ch layout corresponds with your electrode layout? Open the layout file in a tetx editor and look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting I suggest that you try the elec1010.lay or elec1005.lay, or even better, that you construct your own layout file corresponding with your own electrode locations. Robert On 24 May 2006, at 12:29, Carina Graversen wrote: > Hi. > > I'm trying to use the Fieldtrip program to create a wavelet plot of > my EEG > data. > > I have used it previously for 64 channel recordings, but now I'm > working > with 128 channels of data, which is causing me some problems. The > only thing > I have changed is the command: > cfg8.layout = 'biosemi128.lay'; > > But now the figure only outputs a grey page with no Time-Frequency > distributions at all. > > Can anyone tell me what I'm doing wrong - below is a complete list > of all > the commands I use :o). > > Best Regards, > Carina Graversen > > > > > % > ********************************************************************** > *** > % EVENTRELATEDAVERAGING > % > ********************************************************************** > *** > cfg1 = []; % empty > configuration > cfg1.datafile = 'test128.eeg'; % > 128 channel > Neuroscan eeg file > cfg1.headerfile = 'test128.eeg'; > cfg1.channel = 'all'; > > dataFIC = preprocessing(cfg1); % > Preprocess! > > cfg2 = []; % empty > configuration > > avgFIC = timelockanalysis(cfg2, dataFIC); > > > % % > ********************************************************************** > *** > % % WAVELET > % % > ********************************************************************** > *** > cfg7 = []; > cfg7.output = 'pow'; > cfg7.method = 'wltconvol' > cfg7.foi = 1:2:30; > cfg7.t_ftimwin = 5./cfg7.foi; > cfg7.tapsmofrq = 0.4 *cfg7.foi; > cfg7.toi = 0:0.01:0.5; > > TFRmult = freqanalysis(cfg7, avgFIC); > > cfg8 = []; > cfg8.baseline = [-0.5 0.5]; > cfg8.xlim = [0 0.5] > cfg8.zlim = [-3e-27 0.2]; > cfg8.showlabels = 'yes'; > cfg8.layout = 'biosemi128.lay'; > > multiplotTFR(cfg8, TFRmult); > From muthuraman10 at HOTMAIL.COM Tue May 2 11:02:06 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Tue, 2 May 2006 09:02:06 +0000 Subject: query on coherence source analysis In-Reply-To: <38A0AAB7-4D1B-4457-827B-3F388AE7EEE1@fcdonders.ru.nl> Message-ID: Hello Thanks for the Previous suggestions i would like to know whether there is prescribed algorithm in Fieldtrip to calculate the coherent source analysis between the EEG and EMG data with regards muthuraman >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on coherence and layout >Date: Mon, 3 Apr 2006 22:22:02 +0200 > >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 r.oostenveld at FCDONDERS.RU.NL Tue May 2 14:57:56 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 2 May 2006 14:57:56 +0200 Subject: query on coherence source analysis In-Reply-To: Message-ID: Dear Muthuraman Fieldtrip implements DICS in the SOURCEANALYSIS function. You can find the literature reference to the DICS algorith on the page http:// www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:references_to_implemented_methods best regards, Robert On 2 May 2006, at 11:02, Muthuraman Muthuraman wrote: > Hello > > Thanks for the Previous suggestions > > i would like to know whether there is prescribed algorithm in > Fieldtrip > to calculate the coherent source analysis between the EEG and EMG > data > > with regards > muthuraman > From olga at GRAPHICMIND.INFO Thu May 4 16:53:15 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 4 May 2006 18:53:15 +0400 Subject: conversion problem, layout Message-ID: Dear list member, I've tried to follow your discussion for quit a long time and I really sympathize implementing in Fieldtrip analyzing methods. Unfortunately, every my previous attempts to use these methods on my own data broke at the very beginning by the conversion data problem. Now I have another try :-). This time I want to convert averaged ERP files, made in BESA. I exported them as multiplex files from BESA and convert to fieldtrip with besa2fieldtrip function. It seems to work well. I also read my .sfp file (data.elec = read_fcdc_elec('GNS64sag1.sfp');). It goes without problems but when I wanted to plot the scalp potentials (topoplotER (cfg, data) the error appeared "reference to non-existent field 'chanX', line 302 topoplot and 268 topoplotER. I had the same problem with converting my data from eeglab, too. Probably, it is safer to create my our layout file, but I need to know the structure of it. Could you help me? Best regards, Olga. ---------------------------------------------------------------------------------------------------------------------------------Olga Sysoeva, PhD Institute of Higher Nervous Activity and Neurophysiology Russian Academy of Sciences 5a Butlerova str. Moscow 117485 RUSSIA tel.: (7-495)-3347011, fax:(7-495)-338-85-00. From r.oostenveld at FCDONDERS.RU.NL Thu May 4 17:58:37 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 4 May 2006 17:58:37 +0200 Subject: conversion problem, layout In-Reply-To: <00aa01c66f8a$79172dd0$51210ad9@olga> Message-ID: Dear Olga, On 4 May 2006, at 16:53, Olga Sysoeva wrote: > This time I want to convert averaged ERP files, made in BESA. I > exported them as multiplex files from BESA and convert to > fieldtrip with besa2fieldtrip function. It seems to work well. I > also read my .sfp file (data.elec = read_fcdc_elec > ('GNS64sag1.sfp');). It goes without problems but when I wanted to > plot the scalp potentials (topoplotER (cfg, > data) the error appeared "reference to non-existent field 'chanX', > line 302 > topoplot and 268 topoplotER. I know that this problem seems to happen since the topoplot and multiplot functions were extended with interactive options. My colleague Ingrid (see CC) has been working on the problem, and I recall that she already fixed the problem (and some other problems). It might be that the ftp version of fieldtrip does not yet contain the updated function. I suggest that you download the latest daily version of fieldtrip from the ftp, and try once more. If the problem then still persists, please send a matlab file containing the erf and electrodes (and possibly also the two original besa files) to Ingrid, so that she can try to reproduce the bug. > I had the same problem with converting my data from eeglab, too. > Probably, it is safer to create my our layout file, but I need to > know the structure of it. The layout file format is explained in the FAQ at http://www2.ru.nl/ fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting. best regards, Robert From olga at GRAPHICMIND.INFO Fri May 5 11:20:44 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Fri, 5 May 2006 13:20:44 +0400 Subject: conversion problem, layout Message-ID: Dear Robert, Yes, my problem appeared to be fixed in the last updated version of Fieldtrip. Now I can topoplot the data, but it seems to work wrong to me. All my electrodes appeared to be in the middle of the plotted head (shrinked compared to the head size). What can it be? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Thursday, May 04, 2006 7:58 PM Subject: Re: [FIELDTRIP] conversion problem, layout > Dear Olga, > > On 4 May 2006, at 16:53, Olga Sysoeva wrote: >> This time I want to convert averaged ERP files, made in BESA. I exported >> them as multiplex files from BESA and convert to fieldtrip with >> besa2fieldtrip function. It seems to work well. I also read my .sfp >> file (data.elec = read_fcdc_elec ('GNS64sag1.sfp');). It goes without >> problems but when I wanted to plot the scalp potentials (topoplotER >> (cfg, >> data) the error appeared "reference to non-existent field 'chanX', line >> 302 >> topoplot and 268 topoplotER. > > I know that this problem seems to happen since the topoplot and multiplot > functions were extended with interactive options. My colleague Ingrid > (see CC) has been working on the problem, and I recall that she already > fixed the problem (and some other problems). It might be that the ftp > version of fieldtrip does not yet contain the updated function. I suggest > that you download the latest daily version of fieldtrip from the ftp, and > try once more. If the problem then still persists, please send a matlab > file containing the erf and electrodes (and possibly also the two > original besa files) to Ingrid, so that she can try to reproduce the bug. > >> I had the same problem with converting my data from eeglab, too. >> Probably, it is safer to create my our layout file, but I need to know >> the structure of it. > > The layout file format is explained in the FAQ at http://www2.ru.nl/ > fcdonders/fieldtrip/doku.php? > id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format > _of_the_layout_file_which_is_used_for_plotting. > > best regards, > Robert From olga at GRAPHICMIND.INFO Sun May 7 16:54:15 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Sun, 7 May 2006 18:54:15 +0400 Subject: first success!!! Message-ID: Dear list members, I want to share my first success in using Filedtrip. Although I could still not properly load my current 64 electrodes data, I succeeded in importing my old 19 channel data. Moreover, I succeded in conducting the between-trial clasterrandomization analysis! But I still have problems with within-subject cluster-randomization. The error "did not find the gradiometer or electrode information" appears, line 461. What could it be? Best Regards, Olga --------------------------------------------------------------------------------------------------------------------------------------------------------- Olga Sysoeva, PhD Institute of Higher Nervous Activity and Neurophysiology Russian Academy of Sciences 5a Butlerova str. Moscow 117485 RUSSIA tel.: (7-495)-3347011, fax:(7-495)-338-85-00. From r.oostenveld at FCDONDERS.RU.NL Mon May 8 09:16:26 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 8 May 2006 09:16:26 +0200 Subject: first success!!! In-Reply-To: <002b01c671e6$1dda4b60$51210ad9@olga> Message-ID: > I want to share my first success in using Filedtrip. Although I > could still not properly load my current 64 electrodes data, I > succeeded in importing my old 19 channel data. Moreover, I succeded > in conducting the between-trial clasterrandomization analysis! It might be that the automatic projection of the 3D electrodes to the 2D surface for plotting is not optimal for your 64 channel set, perhaps due to a few very low electrodes. I suggest that you construct a layout file, see my previous mail. You can also look into the code in private/createlayout, where at the bottom you will find some code that helps you to visualise the layout. > But I still have problems with within-subject cluster- > randomization. The error "did not find the gradiometer or electrode > information" appears, line 461. What could it be? Cluster randomization requires that the neighbourhood geomerty in the data is known, i.e. the neighbouring electrodes. You can specify them with cfg.neighbours. It is documented in "help clusterrandanalysis". One method to automatically specify the neighbourhood is by having electrode information in the dataset, i.e. an elec structure and to specify the cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF gradiometers). I do not know the units of your electrodes (could be m, cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should be specified in the same units. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Mon May 8 09:51:17 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 8 May 2006 09:51:17 +0200 Subject: PhD position available at Donders Centre, the Netherlands Message-ID: PhD-position on a Collaborative Project at the NICI (Nijmegen Institute of Cognition and Information) and the FCDC (F.C. Donders Center for Cognitive Neuroimaging) We are seeking a candidate for the PhD project Beamforming for Cognitive Applications. This project is supervised by Eric Maris (NICI/Biological Psychology), Robert Oostenveld (FCDC), and Ole Jensen (FCDC). Project Description: The golden standard in cognitive neuroscience are measurements of electromagnetic signals at locations in the brain from where they originate physiologically. Unfortunately, in human cognitive neuroscience, we can only measure electromagnetic signals at some distance from their physiological origin, via the EEG or the MEG. Source reconstruction techniques, such as the beamformer, are then used to infer a signal at the source level (the brain’s grey matter) from an observed signal at the sensor level. The beamformer has several distinct advantages over other source reconstruction techniques (applicable to evoked responses and induced oscillations, unique solutions, no assumptions about the source model, excellent spatial resolution). Unfortunately, it has several disadvantages when applied to the data of cognitive experiments (only applicable to single experimental conditions, requires a high SNR, no quantification of spatial uncertainty). In this project, three methodological innovations are proposed that extend the beamformer such that it becomes suitable for cognitive experiments. These innovations will be implemented in the Matlab toolbox Fieldtrip (http://www.ru.nl/fcdonders/fieldtrip/) and tested on MEG-data from existing cognitive neuroscience experiments. Requirements: * A master degree in engineering, neuroscience, cognitive science, biology, applied statistics, or a related field. * Experience with programming, preferably in Matlab. * A scientific interest in how the brain works. More information can be obtained from: Eric Maris NICI/Biological Psychology and FCDC T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) E: maris at nici.ru.nl Applications: Candidates who want to apply to this position can send an application letter and a CV to maris at nici.ru.nl. From rongf at NIDCD.NIH.GOV Tue May 9 01:24:22 2006 From: rongf at NIDCD.NIH.GOV (Rong, Feng (NIH/NIDCD) [V]) Date: Mon, 8 May 2006 19:24:22 -0400 Subject: The coordinates Message-ID: Hi, I have a question about the grid coordinates calculated with prepare-leadfield.m -- how to interpret the .pos value? For example, I run the script [grid]=prepare_leadfield(cfg,freq), with the xgrid, ygrid, and zgrid value of cfg being set as 'auto', then how can I interpret the grid.pos value? They have the value like [-9 2 2], which coordinates is it? Best, Feng Rong Graduate Student NACS Program / Kinesiology Dept UMCP From r.oostenveld at FCDONDERS.RU.NL Tue May 9 08:40:58 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 9 May 2006 08:40:58 +0200 Subject: The coordinates In-Reply-To: <52C93A9A6058924E92A69CDF43966F1B13F797@NIHCESMLBX8.nih.gov> Message-ID: Hi Feng, Fieldtrip does not have it's own coordinate system but uses the coordinate system that is implicit in the data: the gradiometer positions and head model are (usually) obtained from the data files generated using the software of the MEG system. For CTF, the coordinates are expressed in cm, except for anatomical MRIs, which are expressed in mm. The various coordinate systems (including the description of how the axes are linked to the head) are explained in more detail on http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#how_are_the_differ ent_head_and_mri_coordinate_systems_defined best Robert On 9 May 2006, at 1:24, Rong, Feng (NIH/NIDCD) [V] wrote: > Hi, > I have a question about the grid coordinates calculated with > prepare-leadfield.m -- how to interpret the .pos value? > For example, I run the script [grid]=prepare_leadfield(cfg,freq), > with the xgrid, ygrid, and zgrid value of cfg being set as 'auto', > then how can I interpret the grid.pos value? They have the value > like [-9 2 2], which coordinates is it? > > Best, > Feng Rong > Graduate Student > NACS Program / Kinesiology Dept > UMCP > From mvelde at ANT-NEURO.COM Tue May 9 12:43:45 2006 From: mvelde at ANT-NEURO.COM (Maarten van de Velde) Date: Tue, 9 May 2006 12:43:45 +0200 Subject: ANT Young Scientist Award Message-ID: Announcement It is now ten years ago that ANT was established as a spin-off company at the campus of Twente University in Enschede, Netherlands. Starting with the 'Advanced Source Analysis' (ASA) software for magnetoencephalography as an outcome of four years of PhD work, ANT has in the decade of its existence become a major supplier for neurodiagnostics and cognitive neuroscience. It has communications with hundreds of users world-wide and is involved in numerous research/development and collaboration projects. We are perfectly aware of the fact that our success is for a great deal based on people who believe in our strength and competence (our customers). We therefore have taken this anniversary as an opportunity to announce the *ANT Young Scientist Award for exceptional advances in EEG/MEG research* We hope that with this award we can stimulate young scientists in the cognitive neuroscience field and want to show our commitment to innovation in neuroscience and clinical brain research. We strongly encourage you to apply - the first prize is 10,000 EURO! An international, independent committee is going to evaluate your work in a most objective way. You will find more related information on our web site: http://www.ant-neuro.com/youngscientistaward The ANT Young Scientist Award is open to every researcher below 37 years of age. Please feel free to circulate this mail to any researcher who you think is eligible . We will most probably extended the submission period with one month (currently until May 31, 2006). Best regards, Maarten van de Velde -------------- next part -------------- A non-text attachment was scrubbed... Name: mvelde.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From marie at PSY.GLA.AC.UK Wed May 10 16:31:23 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Wed, 10 May 2006 15:31:23 +0100 Subject: Beamformer time course Message-ID: Hi I have a question about the solution of a beam-former analysis and would appreciate any suggestions. Having used the beam-former technique to localize a region of interest for a specific time- frequency range, is there some function that can be implemented to compute the time course of activation for this roi? Thanks, Marie Smith From litvak at TECHUNIX.TECHNION.AC.IL Wed May 10 20:42:30 2006 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Wed, 10 May 2006 20:42:30 +0200 Subject: Phase of spontaneous activity In-Reply-To: Message-ID: Dear all, I have several subjects, each with two sets of trials with ongoing EEG (i.e. not containing response to a stimulus). What I would like to know is whether there is a difference between these sets in terms of spectra. I'd like to test all the electrodes and frequencies. There is no problem to do this for power using Fieldtrip and clusterrandanalysis. But now I would like to find out whether for any electrode/frequency there is the systematic difference in phase between the two sets. I would even settle for testing whether in one of the sets the phase at some electrode/frequency is not random. How does one do it in Fieldtrip? Any ideas and code samples would be appreciated. Best, Vladimir From maris at NICI.RU.NL Thu May 11 12:20:03 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 11 May 2006 12:20:03 +0200 Subject: Phase of spontaneous activity Message-ID: Dear Vladimir, > I have several subjects, each with two sets of trials with ongoing EEG > (i.e. > not containing response to a stimulus). What I would like to know is > whether > there is a difference between these sets in terms of spectra. I'd like to > test all the electrodes and frequencies. There is no problem to do this > for > power using Fieldtrip and clusterrandanalysis. But now I would like to > find > out whether for any electrode/frequency there is the systematic difference > in phase between the two sets. I would even settle for testing whether in > one of the sets the phase at some electrode/frequency is not random. > > How does one do it in Fieldtrip? Any ideas and code samples would be > appreciated. At this moment, this is not possible in Fieldtrip. However, it is straightforward to implement it. As you know, we are in the process of restructuring the nonparametric statistics functions in Fieldtrip. I will put your request in our ToDo-list. greetings, Eric Maris From rbg26471 at YAHOO.COM Thu May 11 14:00:31 2006 From: rbg26471 at YAHOO.COM (rathinaswamy bavanandan govindan) Date: Thu, 11 May 2006 05:00:31 -0700 Subject: No subject In-Reply-To: <001001c674e4$77abef80$d62cae83@fcdc195> Message-ID: Dear Eric and Co. I am a novice to Fieldtrip. I have computed a measure for data from each sensor recorded using ctf software. I want to project my results on the sensor layout and create a contour plot. Is there an option in Fieldtrip for this purpose! Please write to me! Thank you very much! Sincerely Govindan --------------------------------- Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Thu May 11 14:55:17 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Thu, 11 May 2006 14:55:17 +0200 Subject: No subject In-Reply-To: <20060511120031.94420.qmail@web51403.mail.yahoo.com> Message-ID: Dear Govindan, There are several plotting function implemented in FieldTrip. If I understand correctly, you need topoplotER or topoplotTFR (I don't understand exactly what you mean by contour plot). You can find information on the FieldTrip webpage under: fieldtrip > documentation > reference documentation. Good luck, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of rathinaswamy bavanandan govindan Sent: Thursday, May 11, 2006 2:01 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Dear Eric and Co. I am a novice to Fieldtrip. I have computed a measure for data from each sensor recorded using ctf software. I want to project my results on the sensor layout and create a contour plot. Is there an option in Fieldtrip for this purpose! Please write to me! Thank you very much! Sincerely Govindan _____ Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga at GRAPHICMIND.INFO Thu May 11 18:29:44 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 11 May 2006 20:29:44 +0400 Subject: clusterrandomization Message-ID: Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From litvak at TECHUNIX.TECHNION.AC.IL Thu May 11 19:38:24 2006 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Thu, 11 May 2006 19:38:24 +0200 Subject: clusterrandomization In-Reply-To: <006e01c67518$1cb7f2c0$51210ad9@olga> Message-ID: clusrand.posclusters and clusrand.negclusters contain all the clusters found, not just the significant ones. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From olga at GRAPHICMIND.INFO Thu May 11 18:47:38 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 11 May 2006 20:47:38 +0400 Subject: clusterrandomization Message-ID: But why than to plot them if they are not significant? ----- Original Message ----- From: "Vladimir Litvak" To: Sent: Thursday, May 11, 2006 9:38 PM Subject: Re: [FIELDTRIP] clusterrandomization clusrand.posclusters and clusrand.negclusters contain all the clusters found, not just the significant ones. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From litvak at TECHUNIX.TECHNION.AC.IL Thu May 11 19:52:17 2006 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Thu, 11 May 2006 19:52:17 +0200 Subject: clusterrandomization In-Reply-To: <007301c6751a$9cc2cf10$51210ad9@olga> Message-ID: Sometimes you want to know what's happening in your data. The significance threshold is arbitrary and also there are parameters that can be modified to make the procedure more sensitive to particular kinds of effects (though one should not get carried away with that). So it can be useful to know that there is an effect close to significance somewhere or conversely all the clusters are small. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:48 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization But why than to plot them if they are not significant? ----- Original Message ----- From: "Vladimir Litvak" To: Sent: Thursday, May 11, 2006 9:38 PM Subject: Re: [FIELDTRIP] clusterrandomization clusrand.posclusters and clusrand.negclusters contain all the clusters found, not just the significant ones. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From olga at GRAPHICMIND.INFO Thu May 11 19:02:13 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 11 May 2006 21:02:13 +0400 Subject: clusterrandomization Message-ID: OK. I think my negcluster is not close to significance (p=0.5), therefore I do not want to plot it. How can I choose to plot Only significant clusters (I have 3 posclusters only 1 of which is significant)? I guess I need to change something in mask option, but I do not know how to use the squeeze option. Can you help me with this? Best Regards, Olga ----- Original Message ----- From: "Vladimir Litvak" To: Sent: Thursday, May 11, 2006 9:52 PM Subject: Re: [FIELDTRIP] clusterrandomization Sometimes you want to know what's happening in your data. The significance threshold is arbitrary and also there are parameters that can be modified to make the procedure more sensitive to particular kinds of effects (though one should not get carried away with that). So it can be useful to know that there is an effect close to significance somewhere or conversely all the clusters are small. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:48 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization But why than to plot them if they are not significant? ----- Original Message ----- From: "Vladimir Litvak" To: Sent: Thursday, May 11, 2006 9:38 PM Subject: Re: [FIELDTRIP] clusterrandomization clusrand.posclusters and clusrand.negclusters contain all the clusters found, not just the significant ones. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From olga at GRAPHICMIND.INFO Thu May 11 19:55:57 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 11 May 2006 21:55:57 +0400 Subject: clusterrandomization Message-ID: Please disregard my previous post. Now I know how to do this. Sorry... ----- Original Message ----- From: "Olga Sysoeva" To: Sent: Thursday, May 11, 2006 9:02 PM Subject: Re: [FIELDTRIP] clusterrandomization > OK. I think my negcluster is not close to significance (p=0.5), therefore > I do not want to plot it. > How can I choose to plot Only significant clusters (I have 3 posclusters > only 1 of which is significant)? > I guess I need to change something in mask option, but I do not know how > to use the squeeze option. Can you help me with this? > > Best Regards, > Olga > > ----- Original Message ----- > From: "Vladimir Litvak" > To: > Sent: Thursday, May 11, 2006 9:52 PM > Subject: Re: [FIELDTRIP] clusterrandomization > > > Sometimes you want to know what's happening in your data. The significance > threshold is arbitrary and also there are parameters that can be modified > to > make the procedure more sensitive to particular kinds of effects (though > one > should not get carried away with that). So it can be useful to know that > there is an effect close to significance somewhere or conversely all the > clusters are small. > > Vladimir > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf > Of Olga Sysoeva > Sent: Thursday, May 11, 2006 6:48 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandomization > > But why than to plot them if they are not significant? > > ----- Original Message ----- > From: "Vladimir Litvak" > To: > Sent: Thursday, May 11, 2006 9:38 PM > Subject: Re: [FIELDTRIP] clusterrandomization > > > clusrand.posclusters and clusrand.negclusters contain all the clusters > found, not just the significant ones. > > Vladimir > > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf > Of Olga Sysoeva > Sent: Thursday, May 11, 2006 6:30 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] clusterrandomization > > Thank you very much for the help. > > I continue my succes with Clasterrandomization analysis on within-subject > disign. > I applied clasterrandomization to compare two condition. I mostly use the > settings > from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got > positive and negative clusters > (both clusrand.posclusters and clusrand.negclusters not empty). But when I > look for the pval for neg cluster > (which is only one, size 8) it appeared to be 0.51. It is bigger than our > threshold (0.05). Why it is mark as > significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? > Could somebody comment on it? > > Best Regards, > Olga. > > ----- Original Message ----- > From: "Robert Oostenveld" > To: > Sent: Monday, May 08, 2006 11:16 AM > Subject: Re: [FIELDTRIP] first success!!! > > >>> I want to share my first success in using Filedtrip. Although I could >>> still not properly load my current 64 electrodes data, I succeeded in >>> importing my old 19 channel data. Moreover, I succeded in conducting >>> the > >>> between-trial clasterrandomization analysis! >> >> It might be that the automatic projection of the 3D electrodes to the 2D >> surface for plotting is not optimal for your 64 channel set, perhaps due >> to a few very low electrodes. I suggest that you construct a layout >> file, > >> see my previous mail. You can also look into the code in >> private/createlayout, where at the bottom you will find some code that >> helps you to visualise the layout. >> >>> But I still have problems with within-subject cluster- randomization. >>> The > >>> error "did not find the gradiometer or electrode information" appears, >>> line 461. What could it be? >> >> Cluster randomization requires that the neighbourhood geomerty in the >> data is known, i.e. the neighbouring electrodes. You can specify them >> with cfg.neighbours. It is documented in "help clusterrandanalysis". One >> method to automatically specify the neighbourhood is by having electrode >> information in the dataset, i.e. an elec structure and to specify the >> cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF >> gradiometers). I do not know the units of your electrodes (could be m, >> cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should >> be specified in the same units. >> >> best regards, >> Robert From jciveira at UNAV.ES Fri May 12 12:26:29 2006 From: jciveira at UNAV.ES (Juan Civeira) Date: Fri, 12 May 2006 12:26:29 +0200 Subject: Source reconstruction Message-ID: Hello, I have already localize an activation in the brain and now I want to calculate time course of the selected sources. I have thought about chosing the sources by hand and then programming the time reconstruction but I would like to ask if there is any code to make it. Thank you 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 Jan.Schoffelen at FCDONDERS.RU.NL Fri May 12 12:56:40 2006 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Fri, 12 May 2006 12:56:40 +0200 Subject: Source reconstruction In-Reply-To: Message-ID: Dear Juan, You can create time-courses of your sources by using the lcmv-method of sourceanalysis. The input to sourceanalysis should be a timelock-structure which has been obtained with cfg.keeptrials = 'yes' The easiest way to reconstruct your single-trial source time-courses would be to specify cfg.keepfilter = 'yes' in your sourceanalysis-configuration. In the output of sourceanalysis you will find the field avg.filter, which contains the filter weights of your locations of interest. You can obtain a single-trial estimate of your source activation at a particular location by multiplying your data with the filter-weights as follows: source.avg.filter{i}*squeeze(timelock.trial(j,:,:)) This will give you the reconstructed source activity in trial j at location i. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Juan Civeira Sent: Friday, May 12, 2006 12:26 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Source reconstruction Hello, I have already localize an activation in the brain and now I want to calculate time course of the selected sources. I have thought about chosing the sources by hand and then programming the time reconstruction but I would like to ask if there is any code to make it. Thank you 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 Fri May 12 19:22:19 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 12 May 2006 19:22:19 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: Dear Marie, On 10 May 2006, at 16:31, Marie Smith wrote: > I have a question about the solution of a beam-former analysis and > would appreciate any suggestions. Having used the beam-former > technique to localize a region of interest for a specific time- > frequency range, is there some function that can be implemented to > compute the time course of activation for this roi? For that you would use a time-domain beamformer, i.e. the lcmv beamformer (cfg.method='lcmv' in sourceanalysis). That requires time- domain data as input, so you should use timelockanalysis to compute the covariance and the average. The covariance is used to construct the beamformer filter and the average is projected through the filter. If you want to project single-trial data through the filter, you should keep the trials in timelockanalysis and use the option cfg.singletrials='yes' in sourceanalysis (see its help). If you are interested in a specific frequency band, you can use a band-pass filter in timelockanalysis (the options for that are hidden in the documentation, but they are the same as in preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It could also be that you want to use a filter based on a narrow frequency band and use it to beam the broad-band data. That is also possible, but not smoothly: you have to do timelockanalysis twice (broadband and narrowband) and replace the broadband covariance with the filtered narrowband covariance. I hope this short explanation is enough. Robert From olga at GRAPHICMIND.INFO Sat May 13 09:27:44 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Sat, 13 May 2006 11:27:44 +0400 Subject: clusterrandomization on 3D-data within-subject Message-ID: Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lilla.Magyari at FCDONDERS.RU.NL Sat May 13 13:11:03 2006 From: Lilla.Magyari at FCDONDERS.RU.NL (Lilla Magyari) Date: Sat, 13 May 2006 13:11:03 +0200 Subject: clusterrandomization on 3D-data within-subject In-Reply-To: <001201c6765e$baa53370$51210ad9@olga> Message-ID: Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga at GRAPHICMIND.INFO Sat May 13 14:34:07 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Sat, 13 May 2006 16:34:07 +0400 Subject: clusterrandomization on 3D-data within-subject Message-ID: Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari ------------------------------------------------------------------------------ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga at GRAPHICMIND.INFO Mon May 15 06:46:35 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Mon, 15 May 2006 08:46:35 +0400 Subject: cluster randomization Message-ID: Dear list members, Am I right, that after cluster randomization I will everytime get smaller amount of significant results, than after traditional t-test? I mean if set cfg.alphathreshold = 0.05, and choose dependent t-test my clusters can only include the channels and time-points that is significant (p<0,05) when I just use dependent t-test to compare the two condition time by time on every channel. And only after this first step analysis the cluster is formed based on this t-test. Probably I am missing something, but after clusterrandomization analysis I've got a cluster (even significant, but it should not matter) with differential activation at posterior left site, although t-test (made in eeglab) on this paticular channel does not show any significant points. Can somebody comment on it? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marie at PSY.GLA.AC.UK Tue May 16 18:21:24 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 16 May 2006 17:21:24 +0100 Subject: Beamformer time course In-Reply-To: <071C4BBD-5D11-46E2-A606-704CCBE1ED9F@fcdonders.ru.nl> Message-ID: Hi Thanks a lot for your response, your explanations seem clear to me. I have also talked with Klaus Kessler about this. He has in the past used DICS to generate the filter for a specific time/freq box, and then applied this filter to the time locked data in order to compute synchronization between regions etc. I realise this would also not be possible smoothly, but does it make sense to generate a filter using the cross spectral density matrix for a given time/freq range (cf DICS) - and then applying this filter to the covariance of the time averaged data? Marie On 12 May 2006, at 18:22, Robert Oostenveld wrote: > Dear Marie, > > On 10 May 2006, at 16:31, Marie Smith wrote: >> I have a question about the solution of a beam-former analysis and >> would appreciate any suggestions. Having used the beam-former >> technique to localize a region of interest for a specific time- >> frequency range, is there some function that can be implemented to >> compute the time course of activation for this roi? > > For that you would use a time-domain beamformer, i.e. the lcmv > beamformer (cfg.method='lcmv' in sourceanalysis). That requires > time-domain data as input, so you should use timelockanalysis to > compute the covariance and the average. The covariance is used to > construct the beamformer filter and the average is projected > through the filter. If you want to project single-trial data > through the filter, you should keep the trials in timelockanalysis > and use the option cfg.singletrials='yes' in sourceanalysis (see > its help). > > If you are interested in a specific frequency band, you can use a > band-pass filter in timelockanalysis (the options for that are > hidden in the documentation, but they are the same as in > preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It could > also be that you want to use a filter based on a narrow frequency > band and use it to beam the broad-band data. That is also possible, > but not smoothly: you have to do timelockanalysis twice (broadband > and narrowband) and replace the broadband covariance with the > filtered narrowband covariance. I hope this short explanation is > enough. > > Robert From r.oostenveld at FCDONDERS.RU.NL Wed May 17 10:55:33 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 17 May 2006 10:55:33 +0200 Subject: Beamformer time course In-Reply-To: <53E2B50A-F60B-4DBB-81D7-59C799C46423@psy.gla.ac.uk> Message-ID: Hi Marie, It is possible to use the cfg.keepfilter='yes' option both with lcmv and with dics, and also both techniques are implemented such that they will re-use the previously computed filters. So you can first do dics with keepfilter, and then use those filters in the subsequent lcmv analysis. That would look like this: cfg = [] cfg.method = dics cfg.dics.realfilter = yes <=== see below cfg.keepfilter = yes ... source_d = sourceanalysis(cfg, freq) cfg = [] cfg.method = lcmv cfg.keepfilter = no cfg.grid = grid <=== see below ... source_l = sourceanalysis(cfg, timelock) The cfg.grid option allows to specify precomputed leadfields (i.e. the output of prepare_leadfield), but also precomputed filters, which is done here. The easiest is then to do grid=source2grid(source_d) after the dics and before the lcmv analysis. The source2grid helper function strips all irrelevant elements from the source_d structure and will only retain the information that is relevant for the sourceanalysis on the second dataset. It assumes that you use exactly the same channels in both analyses. A conceptual problem that you will run into is that, according to the original description of dics (gross 2001), the filters are complex- valued. Multiplying these complex filters with real data will result in complex valued source projections, which is weird to say the least. I consider that to be an error in the DICS algorithm. The solution for that is that our implementation, which by default will return complex filters in accordance with the original DICS description, can also use and return real-valued filters. That is enabled by the (undocumented) option cfg.dics.realfilter='yes'. Please download the latest (i..e. yesterdays) version of fieldtrip from the FTP, and replace fieldtrip/source2grid.m and fieldtrip/ private/beamformer.m with the attached updated functions (I just tested the procedure described above, and there were a few details in the code that had to be changed). best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: beamformer.m Type: application/octet-stream Size: 26935 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source2grid.m Type: application/octet-stream Size: 1300 bytes Desc: not available URL: -------------- next part -------------- On 16 May 2006, at 18:21, Marie Smith wrote: > Hi > > Thanks a lot for your response, your explanations seem clear to me. > > I have also talked with Klaus Kessler about this. He has in the > past used DICS to generate the filter for a specific time/freq box, > and then applied this filter to the time locked data in order to > compute synchronization between regions etc. > I realise this would also not be possible smoothly, but does it > make sense to generate a filter using the cross spectral density > matrix for a given time/freq range (cf DICS) - and then applying > this filter to the covariance of the time averaged data? > > Marie > > > > > On 12 May 2006, at 18:22, Robert Oostenveld wrote: > >> Dear Marie, >> >> On 10 May 2006, at 16:31, Marie Smith wrote: >>> I have a question about the solution of a beam-former analysis >>> and would appreciate any suggestions. Having used the beam-former >>> technique to localize a region of interest for a specific time- >>> frequency range, is there some function that can be implemented >>> to compute the time course of activation for this roi? >> >> For that you would use a time-domain beamformer, i.e. the lcmv >> beamformer (cfg.method='lcmv' in sourceanalysis). That requires >> time-domain data as input, so you should use timelockanalysis to >> compute the covariance and the average. The covariance is used to >> construct the beamformer filter and the average is projected >> through the filter. If you want to project single-trial data >> through the filter, you should keep the trials in timelockanalysis >> and use the option cfg.singletrials='yes' in sourceanalysis (see >> its help). >> >> If you are interested in a specific frequency band, you can use a >> band-pass filter in timelockanalysis (the options for that are >> hidden in the documentation, but they are the same as in >> preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It >> could also be that you want to use a filter based on a narrow >> frequency band and use it to beam the broad-band data. That is >> also possible, but not smoothly: you have to do timelockanalysis >> twice (broadband and narrowband) and replace the broadband >> covariance with the filtered narrowband covariance. I hope this >> short explanation is enough. >> >> Robert > From R.Oostenveld at FCDONDERS.RU.NL Wed May 17 12:09:21 2006 From: R.Oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 17 May 2006 12:09:21 +0200 Subject: fieldtrip artifact-rejection In-Reply-To: <446A12C6.90006@gmail.com> Message-ID: Hi Markus, I hope that you don't mind moving this thread over to the discussion list, since other people also might be interested and/or want to contribute. On 16 May 2006, at 19:58, Markus Bauer wrote: > I have started working on some EEG data today. I found the artifact > rejection tools not totally satisfying for EEG data. > In case you're interested I would be happy working on it, then we > could discuss how to best do it. > If you want to keep it like it is, I'll just make my own solution. The artifact stuff is also not completely to my likings, so I am open for suggestions (especially if you are willing to aid in implementing the suggestions). > Here are the major shortcomings, I have encountered: > Particularly the lack of a (partial) rejection-tool for fixed > amplitude thresholds makes life difficult and partial artifact > rejection for EEG non-usable. artifact_threshold already does this, but not for partial rejection. It would be trivial to adapt it for partial artifacts. > Often after muscle and EOG correction big spikes are remaining in > the data, these cannot be taken care of, without doing total > rejection of trial. I do not fully understand why such a function > should be incompatible with partial rejection - didn't understand > your comment in the header (with min max) either. which comment in which header? If you refer to artifact_threshold, then see my previous comment that it could easily be enhanced for partial rejection support. > The artifact-markers in the EOG-routine are very often phase > shifted with respect to the blink - such that the initial part of > the blink is taken well care of (plus additional unaffected data), > the later part is often not covered, even when specifying 0.15s or > more. I have never seen the opposite case so far. Could well be. > I guess it has to do with the hilbert transform. I don't think that that is the reason, I more expect it to be due to a fast rising flank of the EOG followed by a slower falling flank. But have not looked at enough experimental data myself to be sure. > Since only a symmetric "artefact-padding" is allowed, data are > often wasted/artefacts not taken well care of. It would be fine with me to support both cfg.artfctdef.zvalue.artpadding = val and cfg.artfctdef.zvalue.artpadding = [preval, postval] This is also something that Marcel Bastiaansen suggested to me some time ago. > Also for EOG and muscle, the option for using absolute thresholds > on the specially treated data could be helpful (with partial > rejection), it has been taken out - is there a concrete reason ?? The old code for jump/eog/muscle was a mixture of combined z-values over channels on one hand and plain thresholding of preprocessed data on the other hand. Since the plain thresholding is also available in artifact_threshold, I saw no reason to reimplement it in the new functions. I want to prevent replicating functionality. > I know that everybody can write their own custom functions, but I'm > sure others will make same experiences. Yes, I do prefer to improve the existing functions instead of everyone writing their own. > Another thing - I think it would be ideal to do the artifact > rejection on all the conditions simultaneously to make sure that > the same criteria are applied to the data of all conditions > (particularly when only relative thresholds - zvalues - are used). > Practically this would mean that one would use the artefact > rejected cfg-structure - i.e. the result of rejectartifact - to > later extract the conditions from those and then do preprocessing. That is already possible in two ways, e.g. with two conditions one could do this: cfg1 = ... cfg1 = definetrial(cfg1) cfg2 = ... cfg2 = definetrial(cfg1) cfgall = ... cfgall.trl = cat(2,cfg1.trl, cfg2.trl) % combine all data segments of interest cfgall.artifact.eog = ... cfgall = artifact_eog(cfgall) % detect EOG artifacts in the data segments of both conditions cfgall.artifact.muscle = ... cfgall = artifact_msucle(cfgall) % detect Muscle artifacts in the data segments of both conditions cfg1.artifact = cfgall.artifact % copy the detected artifacts cfg1 = rejectartifact(cfg1) % and reject the data segments that overlap with an artifact raw1 = preprocessing(cfg1); cfg2.artifact = cfgall.artifact % copy the detected artifacts cfg2 = rejectartifact(cfg2) % and reject the data segments that overlap with an artifact raw2 = preprocessing(cfg2); The other way of realising this is by using recodeevent, which is even more flexible. It might look like this cfg1 = ... cfg1 = definetrial(cfg1) cfg2 = ... cfg2 = definetrial(cfg1) cfgall = ... cfgall.trl = cat(2,cfg1.trl, cfg2.trl) % alternatively you could use only one trialfun for both cfgall.artifact.eog = ... cfgall = artifact_eog(cfgall) % detect EOG artifacts in the data segments of both conditions cfgall.artifact.muscle = ... cfgall = artifact_msucle(cfgall) % detect Muscle artifacts in the data segments of both conditions cfgall = rejectartifact(cfgall) rawall = preprocessing(cfgall) cfg = ... cfg.keeptrial = 'yes' freqall = freqanalysis(cfg, rawall) cfg = ... cfg.output = 'eventvalue' trigger = recodeevent(cfg, rawall) sel1 = find(trigger==1); sel2 = find(trigger==2); freq1 = freqall; freq1.powspctrm = freq1.powspctrm(sel1,:,:) freq2 = freqall; freq2.powspctrm = freq2.powspctrm(sel2,:,:) Retrieving the match between the implicit events and the trial segments could be done at various stages of the analysis, i.e. you could even beam with singletrials and common filters for both conditions, and sort the single trial estimates of power at the source level after that. > I have my own function that is capable of doing that, but since > this may in principle be the appropriate way to do artefact > rejection - I wonder whether you're interested in a more standard > solution ?? I think that the desired functionality that you mention can be achieved with only small modifications to fieldtrip. Please think about it, and if you agree, then you could modify the artifact_threshold function. Please also have a look at the attached rejectvisual function (not yet released): it allows to reject trials after they have been preprocessed, like in the BESA way that you once suggested. best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: rejectvisual.m Type: application/octet-stream Size: 6826 bytes Desc: not available URL: -------------- next part -------------- From r.oostenveld at FCDONDERS.RU.NL Wed May 17 17:00:58 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 17 May 2006 17:00:58 +0200 Subject: fieldtrip artifact-rejection In-Reply-To: <000e01c679c2$cc72f4e0$90514484@dellgx240> Message-ID: Dear all There was a subfunction missing that is required for rejectvisual, please find it attached. Furthermore, from tomorrow on the rejectvisual function will be included in the daily release on the Donders ftp server. best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: select2d.m Type: application/octet-stream Size: 750 bytes Desc: not available URL: -------------- next part -------------- On 17 May 2006, at 17:01, Vladimir Litvak wrote: > Hi Robert, > > I wanted to look at the rejectvisual function but it requires > something > called select2d. Please check the dependencies and send them to the > list. > I'll try to test it on some of my data that I already processed > with BESA. > > Best, > > Vladimir From olga at GRAPHICMIND.INFO Thu May 18 16:56:25 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 18 May 2006 18:56:25 +0400 Subject: Fw: [FIELDTRIP] cluster randomization Message-ID: Sorry for repeating my post, but I just want to be sure that I understand everything correct. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Monday, May 15, 2006 8:46 AM Subject: [FIELDTRIP] cluster randomization Dear list members, Am I right, that after cluster randomization I will everytime get smaller amount of significant results, than after traditional t-test? I mean if set cfg.alphathreshold = 0.05, and choose dependent t-test my clusters can only include the channels and time-points that is significant (p<0,05) when I just use dependent t-test to compare the two condition time by time on every channel. And only after this first step analysis the cluster is formed based on this t-test. Probably I am missing something, but after clusterrandomization analysis I've got a cluster (even significant, but it should not matter) with differential activation at posterior left site, although t-test (made in eeglab) on this paticular channel does not show any significant points. Can somebody comment on it? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Thu May 18 21:56:52 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 18 May 2006 21:56:52 +0200 Subject: Fw: [FIELDTRIP] cluster randomization Message-ID: Dear Olga, Am I right, that after cluster randomization I will everytime get smaller amount of significant results, than after traditional t-test? I mean if set cfg.alphathreshold = 0.05, and choose dependent t-test my clusters can only include the channels and time-points that is significant (p<0,05) when I just use dependent t-test to compare the two condition time by time on every channel. And only after this first step analysis the cluster is formed based on this t-test. Probably I am missing something, but after clusterrandomization analysis I've got a cluster (even significant, but it should not matter) with differential activation at posterior left site, although t-test (made in eeglab) on this paticular channel does not show any significant points. Your reasoning is completely correct. As I see it now, either Clusterrandanalysis or EEGlab performs its dependent samples t-tests incorrectly. Without having your data, it is not possible for me to check this numerically. However, you can do this very easily yourself: take the data of the (channel,time)-pair of interest, and calculate the dependent samples t-statistic on it using Matlab's statistics toolbox or by means of the formula in an elementary statistics book. Compare the result with the statistic for this (channel,time)-pair that is given in the output of clusterrandanalysis (in the .stats-field). Let me what you have found. Kind regards, Eric Maris From muthuraman10 at HOTMAIL.COM Mon May 22 14:15:13 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 22 May 2006 12:15:13 +0000 Subject: query on coherence source analysis In-Reply-To: <3756B6D4-A15F-44B7-9241-BD9E4429A276@fcdonders.ru.nl> Message-ID: hello Thankyou for the previous suggestion I have gone through the article, in which for the 'DICS' algorthim it is mentioned that they use welch method to calculate the cross spectral density, for the freqanalysis program is there a cfg.method with welch to use it for the 'DICS'. I do not find the freqanalysis_mtmwelch I have the 20060131 version of fieltrip is it updated in the latest versions with regards muthu >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on coherence source analysis >Date: Tue, 2 May 2006 14:57:56 +0200 > >Dear Muthuraman > >Fieldtrip implements DICS in the SOURCEANALYSIS function. You can find the >literature reference to the DICS algorith on the page http:// >www2.ru.nl/fcdonders/fieldtrip/doku.php? >id=fieldtrip:documentation:references_to_implemented_methods > >best regards, >Robert > >On 2 May 2006, at 11:02, Muthuraman Muthuraman wrote: > >>Hello >> >>Thanks for the Previous suggestions >> >>i would like to know whether there is prescribed algorithm in Fieldtrip >>to calculate the coherent source analysis between the EEG and EMG data >> >>with regards >>muthuraman >> From marie at PSY.GLA.AC.UK Mon May 22 17:18:55 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Mon, 22 May 2006 16:18:55 +0100 Subject: Beamformer time course In-Reply-To: <071C4BBD-5D11-46E2-A606-704CCBE1ED9F@fcdonders.ru.nl> Message-ID: Hi I have been trying out the various methods as discussed and have come across a problem. When I select cfg.singletrials = 'yes' I get a number of error messages saying error('this option contains a bug, and is therefore not supported at the moment'); I am using the toolbox fieldtrip-20060516. I noticed however, if I select cfg.rawtrials = 'yes' the function will run. Can you help. Marie On 12 May 2006, at 18:22, Robert Oostenveld wrote: > Dear Marie, > > On 10 May 2006, at 16:31, Marie Smith wrote: >> I have a question about the solution of a beam-former analysis and >> would appreciate any suggestions. Having used the beam-former >> technique to localize a region of interest for a specific time- >> frequency range, is there some function that can be implemented to >> compute the time course of activation for this roi? > > For that you would use a time-domain beamformer, i.e. the lcmv > beamformer (cfg.method='lcmv' in sourceanalysis). That requires > time-domain data as input, so you should use timelockanalysis to > compute the covariance and the average. The covariance is used to > construct the beamformer filter and the average is projected > through the filter. If you want to project single-trial data > through the filter, you should keep the trials in timelockanalysis > and use the option cfg.singletrials='yes' in sourceanalysis (see > its help). > > If you are interested in a specific frequency band, you can use a > band-pass filter in timelockanalysis (the options for that are > hidden in the documentation, but they are the same as in > preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It could > also be that you want to use a filter based on a narrow frequency > band and use it to beam the broad-band data. That is also possible, > but not smoothly: you have to do timelockanalysis twice (broadband > and narrowband) and replace the broadband covariance with the > filtered narrowband covariance. I hope this short explanation is > enough. > > Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Tue May 23 12:12:48 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 23 May 2006 12:12:48 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: Hi Marie, On 22 May 2006, at 17:18, Marie Smith wrote: > I have been trying out the various methods as discussed and have > come across a problem. > > When I select cfg.singletrials = 'yes' I get a number of error > messages saying > error('this option contains a bug, and is therefore not supported > at the moment'); > > I am using the toolbox fieldtrip-20060516. > > I noticed however, if I select cfg.rawtrials = 'yes' the function > will run. I recall disabling this functionality, since it was rarely used and since I was concerned that it would not be correct. I now had a more detailled look at the code. If you do rawtrial=yes, beamformer uses the single-trial covariance to construct the filter and also applies it to the single trial covariance/csd. That results in a very poorly estimated filter in each trial, hence projecting large amounts of noise and a lot of variance over trials. Therefore we found it not to be very usefull on real data, although conceptually and in the code it is correct. The idea behind singletrial=yes is that beamformer uses the average covariance to construct the filter and applies it to the single trial covariance/csd. The problem in the code however is that beamformer would use the averaged covariance/csd to estimate the power and not the single trial covariance/csd. The estimated single-trial timecourse would be correct, but the power would not be correct. Therefore I disabled that option in the code. The solution is something that you can do yourself in two subsequent runs of sourceanalysis: you can do sourceanalysis on the average (i.e. do not specify any of singletrial/rawtrial options) and specify keepfilter=yes. That will give you the filter, computed on the average covariance. Subsequently do cfg.grid=source2grid(source), and use the resulting grid (including the filters) in the second run of sourceanalysis, in which you specify cfg.rawtrial=yes. In the second run, the previous (based on average covariance) filters will be applied to the unaveraged data, resulting in the desired single-trial power and dipole moment. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Tue May 23 12:33:24 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 23 May 2006 12:33:24 +0200 Subject: query on coherence source analysis In-Reply-To: Message-ID: Dear Muthuraman At the Donders we usually use the multitaper method for computing the cross spectral density, in freqanalysis that is cfg.method='mtmfft' or 'mtmconvol'. If you would use the mtmconvol method, you will get a frequency decomposition for multiple sliding time windows (that can be overlapping or not). If you then would average these frequency decompositions over time, you have performed Welch's method. We already implemented that in a function, see attached freqanalysis_mtmwelch (i.e. it even allows you to combine multitapering and Welch). Add it to your fieldtrip directory and specify cfg.method='mtmwelch' for freqanalysis. This new function is still rather poorly documented, and it does not have default settings for most of the cfg options. Probably you will want cfg.taper=hanning (i.e. no multitapering), in which case you do not have to specify cfg.tapsmofrq. The function will use maximally overlapping windows for Welch method (which takes a lot of memory). You should specify the frequencies of interest (cfg.foi) and window length per frequency (cfg.t_ftimwin). best Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: freqanalysis_mtmwelch.m Type: application/octet-stream Size: 3262 bytes Desc: not available URL: -------------- next part -------------- On 22 May 2006, at 14:15, Muthuraman Muthuraman wrote: > hello > > Thankyou for the previous suggestion > > I have gone through the article, in which for the 'DICS' algorthim > it is mentioned that they use welch method to calculate the cross > spectral density, for the freqanalysis program is there a > cfg.method with welch to use it for the 'DICS'. > > I do not find the freqanalysis_mtmwelch > I have the 20060131 version of fieltrip is it updated in the latest > versions > > with regards > muthu > > >> From: Robert Oostenveld >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] query on coherence source analysis >> Date: Tue, 2 May 2006 14:57:56 +0200 >> >> Dear Muthuraman >> >> Fieldtrip implements DICS in the SOURCEANALYSIS function. You can >> find the literature reference to the DICS algorith on the page >> http:// www2.ru.nl/fcdonders/fieldtrip/doku.php? >> id=fieldtrip:documentation:references_to_implemented_methods >> >> best regards, >> Robert >> >> On 2 May 2006, at 11:02, Muthuraman Muthuraman wrote: >> >>> Hello >>> >>> Thanks for the Previous suggestions >>> >>> i would like to know whether there is prescribed algorithm in >>> Fieldtrip >>> to calculate the coherent source analysis between the EEG and >>> EMG data >>> >>> with regards >>> muthuraman >>> > From marie at PSY.GLA.AC.UK Tue May 23 17:09:47 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 23 May 2006 16:09:47 +0100 Subject: Beamformer time course In-Reply-To: <78E05DBA-BC4C-469B-A508-5653CF799233@fcdonders.ru.nl> Message-ID: Hi I have tried the analysis as you suggest and although the analysis appears to run I cannot find the single trial time courses in the outcome of the second run of sourceanalysis. In fact, it seems to output for each dipole location one value for each of the power, the moment and the noise. Should I enable the option singletrial = yes to determine the time courses, and use the final two run method to obtain the correct power estimates? Also, for information I am having some problems using the compiled mex files with matlab 7 under unix. Thanks Marie On 23 May 2006, at 11:12, Robert Oostenveld wrote: > Hi Marie, > > On 22 May 2006, at 17:18, Marie Smith wrote: >> I have been trying out the various methods as discussed and have >> come across a problem. >> >> When I select cfg.singletrials = 'yes' I get a number of error >> messages saying >> error('this option contains a bug, and is therefore not supported >> at the moment'); >> >> I am using the toolbox fieldtrip-20060516. >> >> I noticed however, if I select cfg.rawtrials = 'yes' the function >> will run. > > I recall disabling this functionality, since it was rarely used and > since I was concerned that it would not be correct. I now had a > more detailled look at the code. > > If you do rawtrial=yes, beamformer uses the single-trial covariance > to construct the filter and also applies it to the single trial > covariance/csd. That results in a very poorly estimated filter in > each trial, hence projecting large amounts of noise and a lot of > variance over trials. Therefore we found it not to be very usefull > on real data, although conceptually and in the code it is correct. > > The idea behind singletrial=yes is that beamformer uses the average > covariance to construct the filter and applies it to the single > trial covariance/csd. The problem in the code however is that > beamformer would use the averaged covariance/csd to estimate the > power and not the single trial covariance/csd. The estimated single- > trial timecourse would be correct, but the power would not be > correct. Therefore I disabled that option in the code. > > The solution is something that you can do yourself in two > subsequent runs of sourceanalysis: you can do sourceanalysis on the > average (i.e. do not specify any of singletrial/rawtrial options) > and specify keepfilter=yes. That will give you the filter, computed > on the average covariance. Subsequently do cfg.grid=source2grid > (source), and use the resulting grid (including the filters) in the > second run of sourceanalysis, in which you specify > cfg.rawtrial=yes. In the second run, the previous (based on average > covariance) filters will be applied to the unaveraged data, > resulting in the desired single-trial power and dipole moment. > > best regards, > Robert From marie at PSY.GLA.AC.UK Tue May 23 19:46:47 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 23 May 2006 18:46:47 +0100 Subject: Beamformer time course In-Reply-To: <78E05DBA-BC4C-469B-A508-5653CF799233@fcdonders.ru.nl> Message-ID: Hi, Thanks again for all your help with my questions so far, it has been very useful. As an alternative method to determining the time course of activation, I planned to use the filter as output from sourceanalysis directly with the time locked data set. However I am unsure what the three dimensions of the filter are. Could you please clarify this for me. Thanks Marie On 23 May 2006, at 11:12, Robert Oostenveld wrote: > Hi Marie, > > On 22 May 2006, at 17:18, Marie Smith wrote: >> I have been trying out the various methods as discussed and have >> come across a problem. >> >> When I select cfg.singletrials = 'yes' I get a number of error >> messages saying >> error('this option contains a bug, and is therefore not supported >> at the moment'); >> >> I am using the toolbox fieldtrip-20060516. >> >> I noticed however, if I select cfg.rawtrials = 'yes' the function >> will run. > > I recall disabling this functionality, since it was rarely used and > since I was concerned that it would not be correct. I now had a > more detailled look at the code. > > If you do rawtrial=yes, beamformer uses the single-trial covariance > to construct the filter and also applies it to the single trial > covariance/csd. That results in a very poorly estimated filter in > each trial, hence projecting large amounts of noise and a lot of > variance over trials. Therefore we found it not to be very usefull > on real data, although conceptually and in the code it is correct. > > The idea behind singletrial=yes is that beamformer uses the average > covariance to construct the filter and applies it to the single > trial covariance/csd. The problem in the code however is that > beamformer would use the averaged covariance/csd to estimate the > power and not the single trial covariance/csd. The estimated single- > trial timecourse would be correct, but the power would not be > correct. Therefore I disabled that option in the code. > > The solution is something that you can do yourself in two > subsequent runs of sourceanalysis: you can do sourceanalysis on the > average (i.e. do not specify any of singletrial/rawtrial options) > and specify keepfilter=yes. That will give you the filter, computed > on the average covariance. Subsequently do cfg.grid=source2grid > (source), and use the resulting grid (including the filters) in the > second run of sourceanalysis, in which you specify > cfg.rawtrial=yes. In the second run, the previous (based on average > covariance) filters will be applied to the unaveraged data, > resulting in the desired single-trial power and dipole moment. > > best regards, > Robert From Jan.Schoffelen at FCDONDERS.RU.NL Wed May 24 09:25:04 2006 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 24 May 2006 09:25:04 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: Dear Marie, Please have a look in the discussion's list archive. A question very similar to yours has been answered: see the archive of May 2006, and follow the link "source reconstruction". The discussion's list archive can be reached from the website. Yours, Jan-Mathijs The dimensionality of the filter is a 3xN-matrix, with N the number of sensors. The "3" corresponds with the x,y,z direction in space. In other words: multiplying your data with the filter results in a 3xT (number of time points) matrix, which represents a dipole's activity in 3-D space. -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Marie Smith Sent: Tuesday, May 23, 2006 7:47 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Beamformer time course Hi, Thanks again for all your help with my questions so far, it has been very useful. As an alternative method to determining the time course of activation, I planned to use the filter as output from sourceanalysis directly with the time locked data set. However I am unsure what the three dimensions of the filter are. Could you please clarify this for me. Thanks Marie On 23 May 2006, at 11:12, Robert Oostenveld wrote: > Hi Marie, > > On 22 May 2006, at 17:18, Marie Smith wrote: >> I have been trying out the various methods as discussed and have >> come across a problem. >> >> When I select cfg.singletrials = 'yes' I get a number of error >> messages saying >> error('this option contains a bug, and is therefore not supported >> at the moment'); >> >> I am using the toolbox fieldtrip-20060516. >> >> I noticed however, if I select cfg.rawtrials = 'yes' the function >> will run. > > I recall disabling this functionality, since it was rarely used and > since I was concerned that it would not be correct. I now had a > more detailled look at the code. > > If you do rawtrial=yes, beamformer uses the single-trial covariance > to construct the filter and also applies it to the single trial > covariance/csd. That results in a very poorly estimated filter in > each trial, hence projecting large amounts of noise and a lot of > variance over trials. Therefore we found it not to be very usefull > on real data, although conceptually and in the code it is correct. > > The idea behind singletrial=yes is that beamformer uses the average > covariance to construct the filter and applies it to the single > trial covariance/csd. The problem in the code however is that > beamformer would use the averaged covariance/csd to estimate the > power and not the single trial covariance/csd. The estimated single- > trial timecourse would be correct, but the power would not be > correct. Therefore I disabled that option in the code. > > The solution is something that you can do yourself in two > subsequent runs of sourceanalysis: you can do sourceanalysis on the > average (i.e. do not specify any of singletrial/rawtrial options) > and specify keepfilter=yes. That will give you the filter, computed > on the average covariance. Subsequently do cfg.grid=source2grid > (source), and use the resulting grid (including the filters) in the > second run of sourceanalysis, in which you specify > cfg.rawtrial=yes. In the second run, the previous (based on average > covariance) filters will be applied to the unaveraged data, > resulting in the desired single-trial power and dipole moment. > > best regards, > Robert From cgra05 at HST.AUC.DK Wed May 24 12:29:44 2006 From: cgra05 at HST.AUC.DK (Carina Graversen) Date: Wed, 24 May 2006 12:29:44 +0200 Subject: multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: <000001c67f03$2d3ab750$902dae83@fcdonders.nl> Message-ID: Hi. I'm trying to use the Fieldtrip program to create a wavelet plot of my EEG data. I have used it previously for 64 channel recordings, but now I'm working with 128 channels of data, which is causing me some problems. The only thing I have changed is the command: cfg8.layout = 'biosemi128.lay'; But now the figure only outputs a grey page with no Time-Frequency distributions at all. Can anyone tell me what I'm doing wrong - below is a complete list of all the commands I use :o). Best Regards, Carina Graversen % ************************************************************************* % EVENTRELATEDAVERAGING % ************************************************************************* cfg1 = []; % empty configuration cfg1.datafile = 'test128.eeg'; % 128 channel Neuroscan eeg file cfg1.headerfile = 'test128.eeg'; cfg1.channel = 'all'; dataFIC = preprocessing(cfg1); % Preprocess! cfg2 = []; % empty configuration avgFIC = timelockanalysis(cfg2, dataFIC); % % ************************************************************************* % % WAVELET % % ************************************************************************* cfg7 = []; cfg7.output = 'pow'; cfg7.method = 'wltconvol' cfg7.foi = 1:2:30; cfg7.t_ftimwin = 5./cfg7.foi; cfg7.tapsmofrq = 0.4 *cfg7.foi; cfg7.toi = 0:0.01:0.5; TFRmult = freqanalysis(cfg7, avgFIC); cfg8 = []; cfg8.baseline = [-0.5 0.5]; cfg8.xlim = [0 0.5] cfg8.zlim = [-3e-27 0.2]; cfg8.showlabels = 'yes'; cfg8.layout = 'biosemi128.lay'; multiplotTFR(cfg8, TFRmult); From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed May 24 13:26:35 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 24 May 2006 13:26:35 +0200 Subject: multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: Message-ID: Hi Carina, I think it could be caused by your baseline Your trials are from 0 to 0.5 seconds cfg7.toi = 0:0.01:0.5; And your baseline is from -0.5 to 0.5 seconds cfg8.baseline = [-0.5 0.5]; The baseline shouldn't be the whole trial. But I'm not totally sure that this is the problem, since you describe that the output is only a grey page. Does matlab give an error message? Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Carina Graversen Sent: Wednesday, May 24, 2006 12:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi. I'm trying to use the Fieldtrip program to create a wavelet plot of my EEG data. I have used it previously for 64 channel recordings, but now I'm working with 128 channels of data, which is causing me some problems. The only thing I have changed is the command: cfg8.layout = 'biosemi128.lay'; But now the figure only outputs a grey page with no Time-Frequency distributions at all. Can anyone tell me what I'm doing wrong - below is a complete list of all the commands I use :o). Best Regards, Carina Graversen % ************************************************************************* % EVENTRELATEDAVERAGING % ************************************************************************* cfg1 = []; % empty configuration cfg1.datafile = 'test128.eeg'; % 128 channel Neuroscan eeg file cfg1.headerfile = 'test128.eeg'; cfg1.channel = 'all'; dataFIC = preprocessing(cfg1); % Preprocess! cfg2 = []; % empty configuration avgFIC = timelockanalysis(cfg2, dataFIC); % % ************************************************************************* % % WAVELET % % ************************************************************************* cfg7 = []; cfg7.output = 'pow'; cfg7.method = 'wltconvol' cfg7.foi = 1:2:30; cfg7.t_ftimwin = 5./cfg7.foi; cfg7.tapsmofrq = 0.4 *cfg7.foi; cfg7.toi = 0:0.01:0.5; TFRmult = freqanalysis(cfg7, avgFIC); cfg8 = []; cfg8.baseline = [-0.5 0.5]; cfg8.xlim = [0 0.5] cfg8.zlim = [-3e-27 0.2]; cfg8.showlabels = 'yes'; cfg8.layout = 'biosemi128.lay'; multiplotTFR(cfg8, TFRmult); From olga at GRAPHICMIND.INFO Wed May 24 17:44:29 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Wed, 24 May 2006 19:44:29 +0400 Subject: clusterrandomization on 3D-data within-subject Message-ID: Dear List member, Sorry for such dull questions but, I am again facing the new problems with Fieldtrip, although did not solve some previous one (still can not singleplot and multiplot anything 'cause of "unknown zparam field". OK, about new one :-) It seems that I did not use write the timelockgranaveraging. The problem must be here, when I made grand averaging of all my 11 subject data cfg =[]; cfg.keepindividual = 'yes' C_vc11 = timelockgrandaverage(cfg,vc_c_avg1,vc_c_avg2,vc_c_avg3,vc_c_avg4,vc_c_avg5, vc_c_avg6,vc_c_avg7,vc_c_avg8,vc_c_avg9,vc_c_avg10,vc_c_avg11 ); As I understand the vc_c_avg11.avg([9],[43]) should be similar with C_vc11.individual ([11], [9], [43]) But it is not. What can it be? Best Regards, Olga. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 4:34 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari ---------------------------------------------------------------------------- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed May 24 18:45:49 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 24 May 2006 18:45:49 +0200 Subject: clusterrandomization on 3D-data within-subject In-Reply-To: <001501c67f48$f1f18cf0$51210ad9@olga> Message-ID: Hi Olga, About the z-param: This is the field that contains the data to be plotted; for instance 'avg', 'powspctrm' or 'cohspctrm'. Normally the function looks in your data.dimord to find out which z-param to use. To make the function work you could give cfg.zparam = 'avg' (for instance if you want to plot an ERF/ERP). But if you could send me what the dimord field of the data that you want to plot is, I could look why the plot functions don't extract the correct zparam themselves. About the timelockgranaveraging: I also think it should be the same. I have no idea what it could be. Good luck, Ingrid Nieuwenhuis _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Wednesday, May 24, 2006 5:44 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear List member, Sorry for such dull questions but, I am again facing the new problems with Fieldtrip, although did not solve some previous one (still can not singleplot and multiplot anything 'cause of "unknown zparam field". OK, about new one :-) It seems that I did not use write the timelockgranaveraging. The problem must be here, when I made grand averaging of all my 11 subject data cfg =[]; cfg.keepindividual = 'yes' C_vc11 = timelockgrandaverage(cfg,vc_c_avg1,vc_c_avg2,vc_c_avg3,vc_c_avg4,vc_c_avg5, vc_c_avg6,vc_c_avg7,vc_c_avg8,vc_c_avg9,vc_c_avg10,vc_c_avg11 ); As I understand the vc_c_avg11.avg([9],[43]) should be similar with C_vc11.individual ([11], [9], [43]) But it is not. What can it be? Best Regards, Olga. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 4:34 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marie at PSY.GLA.AC.UK Wed May 24 19:27:06 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Wed, 24 May 2006 18:27:06 +0100 Subject: Beamformer time course In-Reply-To: <000001c67f03$2d3ab750$902dae83@fcdonders.nl> Message-ID: Hi, Thanks for the pointer to the earlier discussion, unfortunately it does not answer my question. I had assumed that the dics filters were output for a fixed dipole orientation (that which maximizes filter output) - hence i was expecting to have a 1 dimensional set of filter weights with which to compute a time series (cf. a virtual channel). I am unsure how to interpret the three time series resulting from multiplying the 3D filter with the time series. Does this mean the orientation could change trial per trial and time point per time point? Does this mean that for calculations involving the time course (e.g. synchrony) that you only use the amplitude, disregarding the orientation? Thanks, Marie On 24 May 2006, at 08:25, Jan Mathijs Schoffelen wrote: > Dear Marie, > > Please have a look in the discussion's list archive. A question > very similar > to yours has been answered: see the archive of May 2006, and follow > the link > "source reconstruction". The discussion's list archive can be > reached from > the website. > > > Yours, > > Jan-Mathijs > > The dimensionality of the filter is a 3xN-matrix, with N the number of > sensors. The "3" corresponds with the x,y,z direction in space. In > other > words: multiplying your data with the filter results in a 3xT > (number of > time points) matrix, which represents a dipole's activity in 3-D > space. > > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > On Behalf > Of Marie Smith > Sent: Tuesday, May 23, 2006 7:47 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] Beamformer time course > > Hi, > > Thanks again for all your help with my questions so far, it has been > very useful. > > As an alternative method to determining the time course of > activation, I planned to use the filter as output from sourceanalysis > directly with the time locked data set. > However I am unsure what the three dimensions of the filter are. > Could you please clarify this for me. > > Thanks > > Marie > > > > > On 23 May 2006, at 11:12, Robert Oostenveld wrote: > >> Hi Marie, >> >> On 22 May 2006, at 17:18, Marie Smith wrote: >>> I have been trying out the various methods as discussed and have >>> come across a problem. >>> >>> When I select cfg.singletrials = 'yes' I get a number of error >>> messages saying >>> error('this option contains a bug, and is therefore not supported >>> at the moment'); >>> >>> I am using the toolbox fieldtrip-20060516. >>> >>> I noticed however, if I select cfg.rawtrials = 'yes' the function >>> will run. >> >> I recall disabling this functionality, since it was rarely used and >> since I was concerned that it would not be correct. I now had a >> more detailled look at the code. >> >> If you do rawtrial=yes, beamformer uses the single-trial covariance >> to construct the filter and also applies it to the single trial >> covariance/csd. That results in a very poorly estimated filter in >> each trial, hence projecting large amounts of noise and a lot of >> variance over trials. Therefore we found it not to be very usefull >> on real data, although conceptually and in the code it is correct. >> >> The idea behind singletrial=yes is that beamformer uses the average >> covariance to construct the filter and applies it to the single >> trial covariance/csd. The problem in the code however is that >> beamformer would use the averaged covariance/csd to estimate the >> power and not the single trial covariance/csd. The estimated single- >> trial timecourse would be correct, but the power would not be >> correct. Therefore I disabled that option in the code. >> >> The solution is something that you can do yourself in two >> subsequent runs of sourceanalysis: you can do sourceanalysis on the >> average (i.e. do not specify any of singletrial/rawtrial options) >> and specify keepfilter=yes. That will give you the filter, computed >> on the average covariance. Subsequently do cfg.grid=source2grid >> (source), and use the resulting grid (including the filters) in the >> second run of sourceanalysis, in which you specify >> cfg.rawtrial=yes. In the second run, the previous (based on average >> covariance) filters will be applied to the unaveraged data, >> resulting in the desired single-trial power and dipole moment. >> >> best regards, >> Robert From r.oostenveld at FCDONDERS.RU.NL Wed May 24 20:26:43 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 May 2006 20:26:43 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: On 23 May 2006, at 17:09, Marie Smith wrote: > I have tried the analysis as you suggest and although the analysis > appears to run I cannot find the single trial time courses in the > outcome of the second run of sourceanalysis. Hi Marie, Please try following demo, in which you have to replace the res4 and hdm file with some that you have on your disk. % read some data that is required to simulate MEG data, i.e. volume model, % sensor positions and MRI (optional, only for plotting) vol = read_ctf_hdm('test_RO_005/Subject01.hdm'); hdr = read_fcdc_header('test_RO_005/Subject01.ds/Subject01.res4'); grad = hdr.grad; % construct the simulated MEG data cfg = []; cfg.vol = vol; cfg.grad = grad; cfg.fsample = 300; cfg.ntrials = 30; cfg.triallength = 1; cfg.dip.pos = [0 7 8]; cfg.dip.mom = [1 0 0]; cfg.dip.signal = sin(2*pi*10*(1:cfg.fsample)./cfg.fsample); cfg.absnoise = 1e-8; rawA = dipolesimulation(cfg); % compute ERF and covariance cfg = []; cfg.keeptrials = 'yes'; cfg.covariance = 'yes'; avgA = timelockanalysis(cfg, rawA); % test each of the resampling strategies for LCMV cfg = []; cfg.method = 'lcmv'; cfg.lambda = 0; cfg.resolution = 4; cfg.hdmfile = 'test_RO_005/Subject01.hdm'; cfg.feedback = 'no'; cfg.keepfilter = 'yes'; source1 = sourceanalysis(cfg, avgA); cfg.grid = source2grid(source1); cfg.rawtrial = 'yes'; source2 = sourceanalysis(cfg, avgA); If you look in source2, you will see >> source2.trial ans = 1x30 struct array with fields: pow mom noise filter Each source2.trial(i).mom contain the virtual channel outputs in trial i for each of the grid locations, i.e. plot(source2.trial(2).mom{source2.inside(1)}') will plot the x, y, and z components of the dipole moment in the first trial and on the first dipole location of the grid inside the brain. > Also, for information I am having some problems using the compiled > mex files with matlab 7 under unix. which unix? best Robert From r.oostenveld at FCDONDERS.RU.NL Wed May 24 20:52:26 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 May 2006 20:52:26 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: On 24 May 2006, at 19:27, Marie Smith wrote: > Thanks for the pointer to the earlier discussion, unfortunately it > does not answer my question. > I had assumed that the dics filters were output for a fixed dipole > orientation (that which maximizes filter output) - hence i was > expecting to have a 1 dimensional set of filter weights with which > to compute a time series (cf. a virtual channel). > I am unsure how to interpret the three time series resulting from > multiplying the 3D filter with the time series. Does this mean the > orientation could change trial per trial and time point per time > point? yes, for each trial you could estimate a different maximal orientation from the 3xNtime matrix. See beow. > Does this mean that for calculations involving the time course > (e.g. synchrony) that you only use the amplitude, disregarding the > orientation? The CTF-SAM algorithm internally optimizes the orientation with a non- linear fit, while in the LCMV algorithm you can optimize the orientation afterwards using the linear PCA approach described below. The results will be slighly different. The published DICS algorithm does not specify how to operate in single trial mode, but basically the DICS corresponds to a complex version of LCMV without timecourses (since frequency domain). If you are only interested in the dipole moment along the most dominant direction (i.e the direction with the largest power, you can do a PCA with [u,s,v] = svd(source2.trial(1).mom{source2.inside(1)}); and use the first column of v multiplied by s(1,1), which gives the timecourse of the orthogonal component with the most variance, i.e. power. The orientation itself is in u(:,1). If you want to determine the orientation with the maximal power over all trials, you would have to concatenate all single trial dipole moments into one large 3x (Ntrials*Ntime) matrix and do the pca/svd on that. Regarding dipole orientations: note that we typically find better results if we restrict the MEG forward model to contain only the two tangential dipole components, which is achieved by precomputing the leadfields (prepare_leadfield) with the option cfg.reducerank=2. The dipole model is still represented in three carthesian directions, but the leadfield (and the filter and projected data) have rank 2, i.e. there is one orientation in which the dipole is silent. Reducing the rank of the forward model to two removes the most silent dipole orientation (i.e. the radial orientation), which is also the orientation along which the beamformer is most sensitive for picking up noise. Note that if you use a single-sphere mode, the radial component is already completely zero, for a multisphere model it is not zero, but small (there will always be a sphere in which the orientation is not radial). best Robert From r.oostenveld at FCDONDERS.RU.NL Wed May 24 20:57:21 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 May 2006 20:57:21 +0200 Subject: multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: Message-ID: Hi Carina Are you sure that the biosemi 128ch layout corresponds with your electrode layout? Open the layout file in a tetx editor and look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting I suggest that you try the elec1010.lay or elec1005.lay, or even better, that you construct your own layout file corresponding with your own electrode locations. Robert On 24 May 2006, at 12:29, Carina Graversen wrote: > Hi. > > I'm trying to use the Fieldtrip program to create a wavelet plot of > my EEG > data. > > I have used it previously for 64 channel recordings, but now I'm > working > with 128 channels of data, which is causing me some problems. The > only thing > I have changed is the command: > cfg8.layout = 'biosemi128.lay'; > > But now the figure only outputs a grey page with no Time-Frequency > distributions at all. > > Can anyone tell me what I'm doing wrong - below is a complete list > of all > the commands I use :o). > > Best Regards, > Carina Graversen > > > > > % > ********************************************************************** > *** > % EVENTRELATEDAVERAGING > % > ********************************************************************** > *** > cfg1 = []; % empty > configuration > cfg1.datafile = 'test128.eeg'; % > 128 channel > Neuroscan eeg file > cfg1.headerfile = 'test128.eeg'; > cfg1.channel = 'all'; > > dataFIC = preprocessing(cfg1); % > Preprocess! > > cfg2 = []; % empty > configuration > > avgFIC = timelockanalysis(cfg2, dataFIC); > > > % % > ********************************************************************** > *** > % % WAVELET > % % > ********************************************************************** > *** > cfg7 = []; > cfg7.output = 'pow'; > cfg7.method = 'wltconvol' > cfg7.foi = 1:2:30; > cfg7.t_ftimwin = 5./cfg7.foi; > cfg7.tapsmofrq = 0.4 *cfg7.foi; > cfg7.toi = 0:0.01:0.5; > > TFRmult = freqanalysis(cfg7, avgFIC); > > cfg8 = []; > cfg8.baseline = [-0.5 0.5]; > cfg8.xlim = [0 0.5] > cfg8.zlim = [-3e-27 0.2]; > cfg8.showlabels = 'yes'; > cfg8.layout = 'biosemi128.lay'; > > multiplotTFR(cfg8, TFRmult); > From stephan.bickel at ANATOM.UNIZH.CH Thu May 25 20:30:50 2006 From: stephan.bickel at ANATOM.UNIZH.CH (Stephan Bickel) Date: Thu, 25 May 2006 20:30:50 +0200 Subject: clusterrand electrode neighbours Message-ID: Hi, I try to apply clusterrandanalysis to time-frequency data I exported from BESA.But I seem to have a problem with the specifications of neighbouring electrodes. After applying clusterrandanalysis I get several significant clusters in the same time-frequency range in neighbouring electrodes, i.e. one cluster for each electrode in that range. I assumed that they should be collected to one one cluster if the effect is in the same range and region? Here is what I tried: elec = read_fcdc_elec('27mtg.sfp'); % the exported BESA coordinates cfg=[]; cfg.statistic = 'depsamplesT'; cfg.alphathresh = 0.05; cfg.makeclusters = 'yes'; cfg.clusterteststat = 'maxsum'; cfg.onetwo = 'twosided'; cfg.alpha = 0.05; cfg.nranddraws = 1000; cfg.channel = 'all'; cfg.neighbourdist = 0.04; % I also tried 0.05 with the same result cfg.latency = 'all'; cfg.elec = elec; [stat] = clusterrandanalysis(cfg,fileB,fileA); I also tried the analysis with manually defined neighbours, but received the same result. I attached the elec variable with the coordinates. Thank you very much for your help, Stephan From maris at NICI.RU.NL Thu May 25 21:09:11 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 25 May 2006 21:09:11 +0200 Subject: clusterrand electrode neighbours Message-ID: Hi Stephan, > After applying clusterrandanalysis I get several significant clusters in > the > same time-frequency range in neighbouring electrodes, i.e. one cluster for > each electrode in that range. I assumed that they should be collected to > one > one cluster if the effect is in the same range and region? Two (channel,time,frequency)-triplets with the same time and frequency values and neighbouring electrodes must belong to the same cluster (if their T-statistics exceed cfg.alphathresh, of course). > > Here is what I tried: > > elec = read_fcdc_elec('27mtg.sfp'); % the exported BESA coordinates > > cfg=[]; > cfg.statistic = 'depsamplesT'; > cfg.alphathresh = 0.05; > cfg.makeclusters = 'yes'; > cfg.clusterteststat = 'maxsum'; > cfg.onetwo = 'twosided'; > cfg.alpha = 0.05; > cfg.nranddraws = 1000; > cfg.channel = 'all'; > cfg.neighbourdist = 0.04; % I also tried 0.05 with the same > result > cfg.latency = 'all'; > cfg.elec = elec; > [stat] = clusterrandanalysis(cfg,fileB,fileA); > > I also tried the analysis with manually defined neighbours, but received > the > same result. > I attached the elec variable with the coordinates. I did not find the elec variable in the attachment. What is the dimension of the BESA coordinates? Is it centimeters? In that case, cfg.neighbourdist=0.04 is so small that no electrode will be selected as a neighbour. You could calculate the inter-electrode distances on the basis of their coordinates and use that information to determine cfg.neighbourdist. If that doesn´t help, you can send your cfg and data to maris at nici.ru.nl. I will have a look at it. greetings, Eric Maris From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri May 26 14:28:44 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 26 May 2006 14:28:44 +0200 Subject: multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: <81CAC428-2DEF-4066-B850-733FA9A1BC28@fcdonders.ru.nl> Message-ID: Hi Carina, Thanks for sending me the data. Indeed the biosemi 128ch layout doesn't correspond to your layout. You have 128 channels labeled from 1 to 128. If you open biosemi128.lay in a text-editor you can see that this layout file has 150 channels labeled from A1 to P7. The labels in your data (TFRmult.label) and the labels in the layout file don't match, that's why you got an empty figure (I'll add an error in the plot function, so that when no labels match you'll get an error message in the future). So what you have to do now is to make your own layout file that matches the data; with the correct x and y coordinates of the 128 channels and the same label names as in your data. Just as an illustration I attached an adapted version of the biosemi128.lay file, with only the first 128 channels, and labels 1 to 128, just as in your data. With the following configuration: cfg8 = []; cfg8.baseline = [0 0.1]; cfg8.xlim = [0 0.3] cfg8.ylim = [15 29]; cfg8.zlim = [-100 100]; cfg8.showlabels = 'yes'; cfg8.layout = 'testlay128.lay'; I got the attached figure from your data. Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Wednesday, May 24, 2006 8:57 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina Are you sure that the biosemi 128ch layout corresponds with your electrode layout? Open the layout file in a tetx editor and look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting I suggest that you try the elec1010.lay or elec1005.lay, or even better, that you construct your own layout file corresponding with your own electrode locations. Robert On 24 May 2006, at 12:29, Carina Graversen wrote: > Hi. > > I'm trying to use the Fieldtrip program to create a wavelet plot of > my EEG > data. > > I have used it previously for 64 channel recordings, but now I'm > working > with 128 channels of data, which is causing me some problems. The > only thing > I have changed is the command: > cfg8.layout = 'biosemi128.lay'; > > But now the figure only outputs a grey page with no Time-Frequency > distributions at all. > > Can anyone tell me what I'm doing wrong - below is a complete list > of all > the commands I use :o). > > Best Regards, > Carina Graversen > > > > > % > ********************************************************************** > *** > % EVENTRELATEDAVERAGING > % > ********************************************************************** > *** > cfg1 = []; % empty > configuration > cfg1.datafile = 'test128.eeg'; % > 128 channel > Neuroscan eeg file > cfg1.headerfile = 'test128.eeg'; > cfg1.channel = 'all'; > > dataFIC = preprocessing(cfg1); % > Preprocess! > > cfg2 = []; % empty > configuration > > avgFIC = timelockanalysis(cfg2, dataFIC); > > > % % > ********************************************************************** > *** > % % WAVELET > % % > ********************************************************************** > *** > cfg7 = []; > cfg7.output = 'pow'; > cfg7.method = 'wltconvol' > cfg7.foi = 1:2:30; > cfg7.t_ftimwin = 5./cfg7.foi; > cfg7.tapsmofrq = 0.4 *cfg7.foi; > cfg7.toi = 0:0.01:0.5; > > TFRmult = freqanalysis(cfg7, avgFIC); > > cfg8 = []; > cfg8.baseline = [-0.5 0.5]; > cfg8.xlim = [0 0.5] > cfg8.zlim = [-3e-27 0.2]; > cfg8.showlabels = 'yes'; > cfg8.layout = 'biosemi128.lay'; > > multiplotTFR(cfg8, TFRmult); > -------------- next part -------------- A non-text attachment was scrubbed... Name: figure.png Type: image/png Size: 20378 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testlay128.lay Type: application/octet-stream Size: 5308 bytes Desc: not available URL: From olga at GRAPHICMIND.INFO Fri May 26 14:56:35 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Fri, 26 May 2006 16:56:35 +0400 Subject: and clusterrandomization Message-ID: Thank you very much Ingrid! I found the mistake and, moreover, I plot whotever I want :-) The problem was that when grandaveraging it changes the order of the electrode and the 9th channel it my original file no more corresponds with the 9th channel of the grand-average file! But if I add the link to my layout file there no problems with correct plotting of the results. But the problems is still in my clusterrandomization. Could the fact that the order of the channel in the file (C_vc11.label) is not the same as in the C_vc11.elec.label influences the result of clusterrandomization (I do not have my neigbouring channel file)? Best Regards, Olga. ----- Original Message ----- From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Wednesday, May 24, 2006 8:45 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Hi Olga, About the z-param: This is the field that contains the data to be plotted; for instance 'avg', 'powspctrm' or 'cohspctrm'. Normally the function looks in your data.dimord to find out which z-param to use. To make the function work you could give cfg.zparam = 'avg' (for instance if you want to plot an ERF/ERP). But if you could send me what the dimord field of the data that you want to plot is, I could look why the plot functions don't extract the correct zparam themselves. About the timelockgranaveraging: I also think it should be the same. I have no idea what it could be. Good luck, Ingrid Nieuwenhuis ------------------------------------------------------------------------------ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Wednesday, May 24, 2006 5:44 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear List member, Sorry for such dull questions but, I am again facing the new problems with Fieldtrip, although did not solve some previous one (still can not singleplot and multiplot anything 'cause of "unknown zparam field". OK, about new one :-) It seems that I did not use write the timelockgranaveraging. The problem must be here, when I made grand averaging of all my 11 subject data cfg =[]; cfg.keepindividual = 'yes' C_vc11 = timelockgrandaverage(cfg,vc_c_avg1,vc_c_avg2,vc_c_avg3,vc_c_avg4,vc_c_avg5, vc_c_avg6,vc_c_avg7,vc_c_avg8,vc_c_avg9,vc_c_avg10,vc_c_avg11 ); As I understand the vc_c_avg11.avg([9],[43]) should be similar with C_vc11.individual ([11], [9], [43]) But it is not. What can it be? Best Regards, Olga. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 4:34 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari -------------------------------------------------------------------------- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Fri May 26 15:35:45 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Fri, 26 May 2006 15:35:45 +0200 Subject: and clusterrandomization Message-ID: Dear Olga, But the problems is still in my clusterrandomization. Could the fact that the order of the channel in the file (C_vc11.label) is not the same as in the C_vc11.elec.label influences the result of clusterrandomization (I do not have my neigbouring channel file)? That should not matter. However, the labels in your data structure (.label in the output of timelockgrandaverage) should exactly match the labels in the elec-structure. If that is OK, then something might have gone wrong with the combination of the data of the different subjects. Do they all have the same elec-structure? If the same physical channel has different labels for different subjects, then this may create inconsistencies between EEGlab and Fieldtrip. For Fieldtrip, channels that have the same label are assumed to be physically identical, even if they are in different positions in the data structure. This is only a guess, of course. kind regards, Eric Maris Best Regards, Olga. ----- Original Message ----- From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Wednesday, May 24, 2006 8:45 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Hi Olga, About the z-param: This is the field that contains the data to be plotted; for instance 'avg', 'powspctrm' or 'cohspctrm'. Normally the function looks in your data.dimord to find out which z-param to use. To make the function work you could give cfg.zparam = 'avg' (for instance if you want to plot an ERF/ERP). But if you could send me what the dimord field of the data that you want to plot is, I could look why the plot functions don't extract the correct zparam themselves. About the timelockgranaveraging: I also think it should be the same. I have no idea what it could be. Good luck, Ingrid Nieuwenhuis ------------------------------------------------------------------------------ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Wednesday, May 24, 2006 5:44 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear List member, Sorry for such dull questions but, I am again facing the new problems with Fieldtrip, although did not solve some previous one (still can not singleplot and multiplot anything 'cause of "unknown zparam field". OK, about new one :-) It seems that I did not use write the timelockgranaveraging. The problem must be here, when I made grand averaging of all my 11 subject data cfg =[]; cfg.keepindividual = 'yes' C_vc11 = timelockgrandaverage(cfg,vc_c_avg1,vc_c_avg2,vc_c_avg3,vc_c_avg4,vc_c_avg5, vc_c_avg6,vc_c_avg7,vc_c_avg8,vc_c_avg9,vc_c_avg10,vc_c_avg11 ); As I understand the vc_c_avg11.avg([9],[43]) should be similar with C_vc11.individual ([11], [9], [43]) But it is not. What can it be? Best Regards, Olga. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 4:34 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari -------------------------------------------------------------------------- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. From giosue.baggio at FCDONDERS.RU.NL Sun May 28 19:31:22 2006 From: giosue.baggio at FCDONDERS.RU.NL (Giosue Baggio) Date: Sun, 28 May 2006 19:31:22 +0200 Subject: eeg reref Message-ID: Hi all, I am working on some EEG data recorded using a left mastoid reference. I need to compute a linked mastoid reference using the additional TP10 channel. So I have added in my preprocessing settings file the following: cfg.reref = 'yes'; cfg.refchannel = 'TP10'; Does this really compute a linked mastoid reference? My doubts derive from the fact that in the final multiplots TP10 looks suspiciously flat or better empty. I wonder whether the above cfg settings just replaced my original TP10 with zeroes instead of computing the linkedm reference... Thanks. Giosue'. From giosue.baggio at FCDONDERS.RU.NL Sun May 28 20:49:06 2006 From: giosue.baggio at FCDONDERS.RU.NL (Giosue Baggio) Date: Sun, 28 May 2006 20:49:06 +0200 Subject: eeg reref Message-ID: After some thinking, another (perhaps more likely) possibility is that TP10 was also included in set of channels which now use TP10 as reference. This would explain why it looks flat. If so, is there a way to exclude it from reref? Thanks, g. From t.montez at VUMC.NL Mon May 29 01:16:58 2006 From: t.montez at VUMC.NL (Montez, T.) Date: Mon, 29 May 2006 01:16:58 +0200 Subject: eeglab2fieldtrip and planar Message-ID: Dear Fieldtrip experts, I am using EEGLAB to do artifact rejection with ICA. I export the file to fieldtrip with eeglab2fieldtrip, but I had to make some changes to be able to compute the planar transformation that you might want to include by default in the function: - transform to single trial - add the .grad - change data.label to column - change data.trial to double Best regards, Teresa Montez CODE: [ALLEEG EEG CURRENTSET ALLCOM] = eeglab; EEG = pop_loadset( 'filename', 'A004_ICA.set', 'filepath', 'E:\AD_Project\Results\'); [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG, 0 ); eeglab redraw; data = eeglab2fieldtrip( EEG, 'preprocessing' ); clear ALL* CURRENT* EEG LASTCOM STUDY cfg=[]; cfg.resamplefs = 125; data_125 = resampledata (cfg, data); clear data % transform to single trial data_125.trial2=[]; for i=1:37 data_125.trial2=[data_125.trial2 data_125.trial{i}]; end data_125.trial={data_125.trial2}; clear data_125.trial2 data_125.time={[0:1/125:30339*(1/125)]}; data_125.offset=[1]; % import .grad from another dataset cd E:\AD_Project\mca\Matlab\Controls\C002 load data_3_7 data_125.grad=data_3_7.grad; clear data_3_7 % data.label must be column data_125.label=data_125.label'; % data.trial must be double data_125.trial{1}=double(data_125.trial{1}); cfg=[]; cfg.repair = 'yes' cfg.badchannel = {'MLT22'}; data_rp=megrepair(cfg,data_125) clear data_125 cfg=[]; cfg.planar = 'yes' cfg.planarmethod = 'sincos'; data_p=megplanar(cfg,data_rp); clear data_rp save data_p data_p -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Mon May 29 09:39:02 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 29 May 2006 09:39:02 +0200 Subject: eeg reref In-Reply-To: <9dcbc65482b9.447a0cc2@ru.nl> Message-ID: Hi Giosue, With cfg.reref = 'yes'; cfg.refchannel = 'TP10'; you re-reference the data to TP10 only, i.e. TP10 will be the new reference channel by itself and therefore it is flat (all zeros). Assuming that TP9 is the other channel that you want to use, you should do cfg.reref = 'yes'; cfg.refchannel = {'TP9' 'TP10'}; to obtain the data referenced to linked mastoids. If TP9 is the actual reference channel that was used in the recording, and if you did not include TP9 in the recorded datafile, you should also specify cfg.implicitref = 'TP9' This will first add the channel TP9 to the data (which is all zeros, since it is referenced against itself) and subsequently it will use TP9+TP10 as the new reference. You can check afterwards: the sum of the potential in TP9 and TP10 should be zero. best Robert On 28 May 2006, at 20:49, Giosue Baggio wrote: > After some thinking, another (perhaps more likely) possibility is > that TP10 was also included in set of channels which now use TP10 > as reference. This would explain why it looks flat. If so, is there > a way to exclude it from reref? > > Thanks, > > g. > From r.oostenveld at FCDONDERS.RU.NL Mon May 29 09:49:50 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 29 May 2006 09:49:50 +0200 Subject: eeglab2fieldtrip and planar In-Reply-To: <28FF6B8D22C94B44A55E4E1325A94AF2348037@vumc-mb02.vumc.nl> Message-ID: Hi Theresa, thanks for your suggestions. Let me comment on them > - transform to single trial That should not be neccessary. MEGPLANAR should be able to work on preprocessed data and on timelocked data (i.e. ERFs). If I am wrong, please let me know since it would indicate a bug. > - add the .grad The grad (complete gradiometer information) is not available in EEGLAB, therefore it cannot be added in EEGLAB2FIELDTRIP > - change data.label to column I will ensure that that is consistently done (throughout the FT code). > - change data.trial to double I think that whether that is neccessary depends on the Matlab version that you use, from version 7.0 onwards it should be possible to work with single precision, and the conversion would not be needed. What Matlab are you using? I can add the conversion in combination with a check for the matlab version (i.e. convert to double if version 6, not convert if version 7). best Robert From muthuraman10 at HOTMAIL.COM Mon May 29 16:00:52 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 29 May 2006 14:00:52 +0000 Subject: query on coherence source analysis In-Reply-To: <5BAC967A-983F-42B4-ABFB-9298FA6B9737@fcdonders.ru.nl> Message-ID: Hello Thanks for the suggestions i have been trying to use the freqanalysis_mtmwelch which you have send to me in the previous mail i get a error when using this program i have attached all the statements in this mail please go through and tell me is there a problem in the specifications cfg=[]; cfg.output='powandcsd'; cfg.method='mtmwelch'; cfg.foi=1:2:30; numfoi = length(cfg.foi); cfg.taper='hanning'; cfg.t_ftimwin=zeros(1,numfoi); cfg.t_ftimwin(:)=0.5; cfg.channel=channelselection({'EEG' 'EMG2'},data.label); cfg.channelcmb={'EEG' 'EMG2'}; freq=freqanalysis(cfg,data); ??? Error using ==> freqanalysis_mtmwelch unexpected dimord Error in ==> freqanalysis at 187 [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on coherence source analysis >Date: Tue, 23 May 2006 12:33:24 +0200 > >Dear Muthuraman > >At the Donders we usually use the multitaper method for computing the >cross spectral density, in freqanalysis that is cfg.method='mtmfft' or >'mtmconvol'. If you would use the mtmconvol method, you will get a >frequency decomposition for multiple sliding time windows (that can be >overlapping or not). If you then would average these frequency >decompositions over time, you have performed Welch's method. We already >implemented that in a function, see attached freqanalysis_mtmwelch (i.e. >it even allows you to combine multitapering and Welch). Add it to your >fieldtrip directory and specify cfg.method='mtmwelch' for freqanalysis. > >This new function is still rather poorly documented, and it does not have >default settings for most of the cfg options. Probably you will want >cfg.taper=hanning (i.e. no multitapering), in which case you do not have >to specify cfg.tapsmofrq. The function will use maximally overlapping >windows for Welch method (which takes a lot of memory). You should specify >the frequencies of interest (cfg.foi) and window length per frequency >(cfg.t_ftimwin). > >best >Robert > ><< freqanalysis_mtmwelch.m >> > > >On 22 May 2006, at 14:15, Muthuraman Muthuraman wrote: >>hello >> >>Thankyou for the previous suggestion >> >>I have gone through the article, in which for the 'DICS' algorthim it is >>mentioned that they use welch method to calculate the cross spectral >>density, for the freqanalysis program is there a cfg.method with welch to >>use it for the 'DICS'. >> >>I do not find the freqanalysis_mtmwelch >>I have the 20060131 version of fieltrip is it updated in the latest >>versions >> >>with regards >>muthu >> >> >>>From: Robert Oostenveld >>>Reply-To: FieldTrip discussion list >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: Re: [FIELDTRIP] query on coherence source analysis >>>Date: Tue, 2 May 2006 14:57:56 +0200 >>> >>>Dear Muthuraman >>> >>>Fieldtrip implements DICS in the SOURCEANALYSIS function. You can find >>>the literature reference to the DICS algorith on the page http:// >>>www2.ru.nl/fcdonders/fieldtrip/doku.php? >>>id=fieldtrip:documentation:references_to_implemented_methods >>> >>>best regards, >>>Robert >>> >>>On 2 May 2006, at 11:02, Muthuraman Muthuraman wrote: >>> >>>>Hello >>>> >>>>Thanks for the Previous suggestions >>>> >>>>i would like to know whether there is prescribed algorithm in >>>>Fieldtrip >>>>to calculate the coherent source analysis between the EEG and EMG >>>>data >>>> >>>>with regards >>>>muthuraman >>>> >> > From cgra05 at HST.AUC.DK Wed May 31 10:57:33 2006 From: cgra05 at HST.AUC.DK (Carina Graversen) Date: Wed, 31 May 2006 10:57:33 +0200 Subject: SV: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: <005f01c680bf$edb1a8f0$642dae83@fcdonders.nl> Message-ID: Hi Ingrid. Thanks a lot. I have tried to generate my own layout file in Neuroscan, but unfortunately it doesn't work. So I was wondering if you can tell me the format of the layout-file, because when I look at your file, 2 of the columns contain the same value for all channels. I have tried to generate for both cartesian and polor, but none of them matches. In the generated file I get the format: Can I change my input configuration to either use this format, or how should I change the format of the layout file ??? Thanks in advance :o) /Carina -----Oprindelig meddelelse----- Fra: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL]Pa vegne af Ingrid Nieuwenhuis Sendt: 26. maj 2006 13:29 Til: FIELDTRIP at NIC.SURFNET.NL Emne: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina, Thanks for sending me the data. Indeed the biosemi 128ch layout doesn't correspond to your layout. You have 128 channels labeled from 1 to 128. If you open biosemi128.lay in a text-editor you can see that this layout file has 150 channels labeled from A1 to P7. The labels in your data (TFRmult.label) and the labels in the layout file don't match, that's why you got an empty figure (I'll add an error in the plot function, so that when no labels match you'll get an error message in the future). So what you have to do now is to make your own layout file that matches the data; with the correct x and y coordinates of the 128 channels and the same label names as in your data. Just as an illustration I attached an adapted version of the biosemi128.lay file, with only the first 128 channels, and labels 1 to 128, just as in your data. With the following configuration: cfg8 = []; cfg8.baseline = [0 0.1]; cfg8.xlim = [0 0.3] cfg8.ylim = [15 29]; cfg8.zlim = [-100 100]; cfg8.showlabels = 'yes'; cfg8.layout = 'testlay128.lay'; I got the attached figure from your data. Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Wednesday, May 24, 2006 8:57 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina Are you sure that the biosemi 128ch layout corresponds with your electrode layout? Open the layout file in a tetx editor and look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting I suggest that you try the elec1010.lay or elec1005.lay, or even better, that you construct your own layout file corresponding with your own electrode locations. Robert On 24 May 2006, at 12:29, Carina Graversen wrote: > Hi. > > I'm trying to use the Fieldtrip program to create a wavelet plot of > my EEG > data. > > I have used it previously for 64 channel recordings, but now I'm > working > with 128 channels of data, which is causing me some problems. The > only thing > I have changed is the command: > cfg8.layout = 'biosemi128.lay'; > > But now the figure only outputs a grey page with no Time-Frequency > distributions at all. > > Can anyone tell me what I'm doing wrong - below is a complete list > of all > the commands I use :o). > > Best Regards, > Carina Graversen > > > > > % > ********************************************************************** > *** > % EVENTRELATEDAVERAGING > % > ********************************************************************** > *** > cfg1 = []; % empty > configuration > cfg1.datafile = 'test128.eeg'; % > 128 channel > Neuroscan eeg file > cfg1.headerfile = 'test128.eeg'; > cfg1.channel = 'all'; > > dataFIC = preprocessing(cfg1); % > Preprocess! > > cfg2 = []; % empty > configuration > > avgFIC = timelockanalysis(cfg2, dataFIC); > > > % % > ********************************************************************** > *** > % % WAVELET > % % > ********************************************************************** > *** > cfg7 = []; > cfg7.output = 'pow'; > cfg7.method = 'wltconvol' > cfg7.foi = 1:2:30; > cfg7.t_ftimwin = 5./cfg7.foi; > cfg7.tapsmofrq = 0.4 *cfg7.foi; > cfg7.toi = 0:0.01:0.5; > > TFRmult = freqanalysis(cfg7, avgFIC); > > cfg8 = []; > cfg8.baseline = [-0.5 0.5]; > cfg8.xlim = [0 0.5] > cfg8.zlim = [-3e-27 0.2]; > cfg8.showlabels = 'yes'; > cfg8.layout = 'biosemi128.lay'; > > multiplotTFR(cfg8, TFRmult); > From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed May 31 11:22:37 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 31 May 2006 11:22:37 +0200 Subject: SV: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: Message-ID: Hi Carina, If you look at the FieldTrip page -> documentation -> frequently asked questions you can find the question (and answer): What is the format of the layout file, which is used for plotting? ...The 4th and 5th column specify the with and height of the subplot that will be made in multiplotER and multiplotTFR.... So the two columns with the same value for all channels are those columns. Bests, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Carina Graversen Sent: Wednesday, May 31, 2006 10:58 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] SV: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Ingrid. Thanks a lot. I have tried to generate my own layout file in Neuroscan, but unfortunately it doesn't work. So I was wondering if you can tell me the format of the layout-file, because when I look at your file, 2 of the columns contain the same value for all channels. I have tried to generate for both cartesian and polor, but none of them matches. In the generated file I get the format: Can I change my input configuration to either use this format, or how should I change the format of the layout file ??? Thanks in advance :o) /Carina -----Oprindelig meddelelse----- Fra: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL]Pa vegne af Ingrid Nieuwenhuis Sendt: 26. maj 2006 13:29 Til: FIELDTRIP at NIC.SURFNET.NL Emne: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina, Thanks for sending me the data. Indeed the biosemi 128ch layout doesn't correspond to your layout. You have 128 channels labeled from 1 to 128. If you open biosemi128.lay in a text-editor you can see that this layout file has 150 channels labeled from A1 to P7. The labels in your data (TFRmult.label) and the labels in the layout file don't match, that's why you got an empty figure (I'll add an error in the plot function, so that when no labels match you'll get an error message in the future). So what you have to do now is to make your own layout file that matches the data; with the correct x and y coordinates of the 128 channels and the same label names as in your data. Just as an illustration I attached an adapted version of the biosemi128.lay file, with only the first 128 channels, and labels 1 to 128, just as in your data. With the following configuration: cfg8 = []; cfg8.baseline = [0 0.1]; cfg8.xlim = [0 0.3] cfg8.ylim = [15 29]; cfg8.zlim = [-100 100]; cfg8.showlabels = 'yes'; cfg8.layout = 'testlay128.lay'; I got the attached figure from your data. Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Wednesday, May 24, 2006 8:57 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina Are you sure that the biosemi 128ch layout corresponds with your electrode layout? Open the layout file in a tetx editor and look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting I suggest that you try the elec1010.lay or elec1005.lay, or even better, that you construct your own layout file corresponding with your own electrode locations. Robert On 24 May 2006, at 12:29, Carina Graversen wrote: > Hi. > > I'm trying to use the Fieldtrip program to create a wavelet plot of > my EEG > data. > > I have used it previously for 64 channel recordings, but now I'm > working > with 128 channels of data, which is causing me some problems. The > only thing > I have changed is the command: > cfg8.layout = 'biosemi128.lay'; > > But now the figure only outputs a grey page with no Time-Frequency > distributions at all. > > Can anyone tell me what I'm doing wrong - below is a complete list > of all > the commands I use :o). > > Best Regards, > Carina Graversen > > > > > % > ********************************************************************** > *** > % EVENTRELATEDAVERAGING > % > ********************************************************************** > *** > cfg1 = []; % empty > configuration > cfg1.datafile = 'test128.eeg'; % > 128 channel > Neuroscan eeg file > cfg1.headerfile = 'test128.eeg'; > cfg1.channel = 'all'; > > dataFIC = preprocessing(cfg1); % > Preprocess! > > cfg2 = []; % empty > configuration > > avgFIC = timelockanalysis(cfg2, dataFIC); > > > % % > ********************************************************************** > *** > % % WAVELET > % % > ********************************************************************** > *** > cfg7 = []; > cfg7.output = 'pow'; > cfg7.method = 'wltconvol' > cfg7.foi = 1:2:30; > cfg7.t_ftimwin = 5./cfg7.foi; > cfg7.tapsmofrq = 0.4 *cfg7.foi; > cfg7.toi = 0:0.01:0.5; > > TFRmult = freqanalysis(cfg7, avgFIC); > > cfg8 = []; > cfg8.baseline = [-0.5 0.5]; > cfg8.xlim = [0 0.5] > cfg8.zlim = [-3e-27 0.2]; > cfg8.showlabels = 'yes'; > cfg8.layout = 'biosemi128.lay'; > > multiplotTFR(cfg8, TFRmult); > From muthuraman10 at HOTMAIL.COM Tue May 2 11:02:06 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Tue, 2 May 2006 09:02:06 +0000 Subject: query on coherence source analysis In-Reply-To: <38A0AAB7-4D1B-4457-827B-3F388AE7EEE1@fcdonders.ru.nl> Message-ID: Hello Thanks for the Previous suggestions i would like to know whether there is prescribed algorithm in Fieldtrip to calculate the coherent source analysis between the EEG and EMG data with regards muthuraman >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on coherence and layout >Date: Mon, 3 Apr 2006 22:22:02 +0200 > >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 r.oostenveld at FCDONDERS.RU.NL Tue May 2 14:57:56 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 2 May 2006 14:57:56 +0200 Subject: query on coherence source analysis In-Reply-To: Message-ID: Dear Muthuraman Fieldtrip implements DICS in the SOURCEANALYSIS function. You can find the literature reference to the DICS algorith on the page http:// www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:references_to_implemented_methods best regards, Robert On 2 May 2006, at 11:02, Muthuraman Muthuraman wrote: > Hello > > Thanks for the Previous suggestions > > i would like to know whether there is prescribed algorithm in > Fieldtrip > to calculate the coherent source analysis between the EEG and EMG > data > > with regards > muthuraman > From olga at GRAPHICMIND.INFO Thu May 4 16:53:15 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 4 May 2006 18:53:15 +0400 Subject: conversion problem, layout Message-ID: Dear list member, I've tried to follow your discussion for quit a long time and I really sympathize implementing in Fieldtrip analyzing methods. Unfortunately, every my previous attempts to use these methods on my own data broke at the very beginning by the conversion data problem. Now I have another try :-). This time I want to convert averaged ERP files, made in BESA. I exported them as multiplex files from BESA and convert to fieldtrip with besa2fieldtrip function. It seems to work well. I also read my .sfp file (data.elec = read_fcdc_elec('GNS64sag1.sfp');). It goes without problems but when I wanted to plot the scalp potentials (topoplotER (cfg, data) the error appeared "reference to non-existent field 'chanX', line 302 topoplot and 268 topoplotER. I had the same problem with converting my data from eeglab, too. Probably, it is safer to create my our layout file, but I need to know the structure of it. Could you help me? Best regards, Olga. ---------------------------------------------------------------------------------------------------------------------------------Olga Sysoeva, PhD Institute of Higher Nervous Activity and Neurophysiology Russian Academy of Sciences 5a Butlerova str. Moscow 117485 RUSSIA tel.: (7-495)-3347011, fax:(7-495)-338-85-00. From r.oostenveld at FCDONDERS.RU.NL Thu May 4 17:58:37 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Thu, 4 May 2006 17:58:37 +0200 Subject: conversion problem, layout In-Reply-To: <00aa01c66f8a$79172dd0$51210ad9@olga> Message-ID: Dear Olga, On 4 May 2006, at 16:53, Olga Sysoeva wrote: > This time I want to convert averaged ERP files, made in BESA. I > exported them as multiplex files from BESA and convert to > fieldtrip with besa2fieldtrip function. It seems to work well. I > also read my .sfp file (data.elec = read_fcdc_elec > ('GNS64sag1.sfp');). It goes without problems but when I wanted to > plot the scalp potentials (topoplotER (cfg, > data) the error appeared "reference to non-existent field 'chanX', > line 302 > topoplot and 268 topoplotER. I know that this problem seems to happen since the topoplot and multiplot functions were extended with interactive options. My colleague Ingrid (see CC) has been working on the problem, and I recall that she already fixed the problem (and some other problems). It might be that the ftp version of fieldtrip does not yet contain the updated function. I suggest that you download the latest daily version of fieldtrip from the ftp, and try once more. If the problem then still persists, please send a matlab file containing the erf and electrodes (and possibly also the two original besa files) to Ingrid, so that she can try to reproduce the bug. > I had the same problem with converting my data from eeglab, too. > Probably, it is safer to create my our layout file, but I need to > know the structure of it. The layout file format is explained in the FAQ at http://www2.ru.nl/ fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting. best regards, Robert From olga at GRAPHICMIND.INFO Fri May 5 11:20:44 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Fri, 5 May 2006 13:20:44 +0400 Subject: conversion problem, layout Message-ID: Dear Robert, Yes, my problem appeared to be fixed in the last updated version of Fieldtrip. Now I can topoplot the data, but it seems to work wrong to me. All my electrodes appeared to be in the middle of the plotted head (shrinked compared to the head size). What can it be? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Thursday, May 04, 2006 7:58 PM Subject: Re: [FIELDTRIP] conversion problem, layout > Dear Olga, > > On 4 May 2006, at 16:53, Olga Sysoeva wrote: >> This time I want to convert averaged ERP files, made in BESA. I exported >> them as multiplex files from BESA and convert to fieldtrip with >> besa2fieldtrip function. It seems to work well. I also read my .sfp >> file (data.elec = read_fcdc_elec ('GNS64sag1.sfp');). It goes without >> problems but when I wanted to plot the scalp potentials (topoplotER >> (cfg, >> data) the error appeared "reference to non-existent field 'chanX', line >> 302 >> topoplot and 268 topoplotER. > > I know that this problem seems to happen since the topoplot and multiplot > functions were extended with interactive options. My colleague Ingrid > (see CC) has been working on the problem, and I recall that she already > fixed the problem (and some other problems). It might be that the ftp > version of fieldtrip does not yet contain the updated function. I suggest > that you download the latest daily version of fieldtrip from the ftp, and > try once more. If the problem then still persists, please send a matlab > file containing the erf and electrodes (and possibly also the two > original besa files) to Ingrid, so that she can try to reproduce the bug. > >> I had the same problem with converting my data from eeglab, too. >> Probably, it is safer to create my our layout file, but I need to know >> the structure of it. > > The layout file format is explained in the FAQ at http://www2.ru.nl/ > fcdonders/fieldtrip/doku.php? > id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format > _of_the_layout_file_which_is_used_for_plotting. > > best regards, > Robert From olga at GRAPHICMIND.INFO Sun May 7 16:54:15 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Sun, 7 May 2006 18:54:15 +0400 Subject: first success!!! Message-ID: Dear list members, I want to share my first success in using Filedtrip. Although I could still not properly load my current 64 electrodes data, I succeeded in importing my old 19 channel data. Moreover, I succeded in conducting the between-trial clasterrandomization analysis! But I still have problems with within-subject cluster-randomization. The error "did not find the gradiometer or electrode information" appears, line 461. What could it be? Best Regards, Olga --------------------------------------------------------------------------------------------------------------------------------------------------------- Olga Sysoeva, PhD Institute of Higher Nervous Activity and Neurophysiology Russian Academy of Sciences 5a Butlerova str. Moscow 117485 RUSSIA tel.: (7-495)-3347011, fax:(7-495)-338-85-00. From r.oostenveld at FCDONDERS.RU.NL Mon May 8 09:16:26 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 8 May 2006 09:16:26 +0200 Subject: first success!!! In-Reply-To: <002b01c671e6$1dda4b60$51210ad9@olga> Message-ID: > I want to share my first success in using Filedtrip. Although I > could still not properly load my current 64 electrodes data, I > succeeded in importing my old 19 channel data. Moreover, I succeded > in conducting the between-trial clasterrandomization analysis! It might be that the automatic projection of the 3D electrodes to the 2D surface for plotting is not optimal for your 64 channel set, perhaps due to a few very low electrodes. I suggest that you construct a layout file, see my previous mail. You can also look into the code in private/createlayout, where at the bottom you will find some code that helps you to visualise the layout. > But I still have problems with within-subject cluster- > randomization. The error "did not find the gradiometer or electrode > information" appears, line 461. What could it be? Cluster randomization requires that the neighbourhood geomerty in the data is known, i.e. the neighbouring electrodes. You can specify them with cfg.neighbours. It is documented in "help clusterrandanalysis". One method to automatically specify the neighbourhood is by having electrode information in the dataset, i.e. an elec structure and to specify the cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF gradiometers). I do not know the units of your electrodes (could be m, cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should be specified in the same units. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Mon May 8 09:51:17 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 8 May 2006 09:51:17 +0200 Subject: PhD position available at Donders Centre, the Netherlands Message-ID: PhD-position on a Collaborative Project at the NICI (Nijmegen Institute of Cognition and Information) and the FCDC (F.C. Donders Center for Cognitive Neuroimaging) We are seeking a candidate for the PhD project Beamforming for Cognitive Applications. This project is supervised by Eric Maris (NICI/Biological Psychology), Robert Oostenveld (FCDC), and Ole Jensen (FCDC). Project Description: The golden standard in cognitive neuroscience are measurements of electromagnetic signals at locations in the brain from where they originate physiologically. Unfortunately, in human cognitive neuroscience, we can only measure electromagnetic signals at some distance from their physiological origin, via the EEG or the MEG. Source reconstruction techniques, such as the beamformer, are then used to infer a signal at the source level (the brain’s grey matter) from an observed signal at the sensor level. The beamformer has several distinct advantages over other source reconstruction techniques (applicable to evoked responses and induced oscillations, unique solutions, no assumptions about the source model, excellent spatial resolution). Unfortunately, it has several disadvantages when applied to the data of cognitive experiments (only applicable to single experimental conditions, requires a high SNR, no quantification of spatial uncertainty). In this project, three methodological innovations are proposed that extend the beamformer such that it becomes suitable for cognitive experiments. These innovations will be implemented in the Matlab toolbox Fieldtrip (http://www.ru.nl/fcdonders/fieldtrip/) and tested on MEG-data from existing cognitive neuroscience experiments. Requirements: * A master degree in engineering, neuroscience, cognitive science, biology, applied statistics, or a related field. * Experience with programming, preferably in Matlab. * A scientific interest in how the brain works. More information can be obtained from: Eric Maris NICI/Biological Psychology and FCDC T:+31 24 3612651 (NICI) T:+31 24 3610754 (FCDC) E: maris at nici.ru.nl Applications: Candidates who want to apply to this position can send an application letter and a CV to maris at nici.ru.nl. From rongf at NIDCD.NIH.GOV Tue May 9 01:24:22 2006 From: rongf at NIDCD.NIH.GOV (Rong, Feng (NIH/NIDCD) [V]) Date: Mon, 8 May 2006 19:24:22 -0400 Subject: The coordinates Message-ID: Hi, I have a question about the grid coordinates calculated with prepare-leadfield.m -- how to interpret the .pos value? For example, I run the script [grid]=prepare_leadfield(cfg,freq), with the xgrid, ygrid, and zgrid value of cfg being set as 'auto', then how can I interpret the grid.pos value? They have the value like [-9 2 2], which coordinates is it? Best, Feng Rong Graduate Student NACS Program / Kinesiology Dept UMCP From r.oostenveld at FCDONDERS.RU.NL Tue May 9 08:40:58 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 9 May 2006 08:40:58 +0200 Subject: The coordinates In-Reply-To: <52C93A9A6058924E92A69CDF43966F1B13F797@NIHCESMLBX8.nih.gov> Message-ID: Hi Feng, Fieldtrip does not have it's own coordinate system but uses the coordinate system that is implicit in the data: the gradiometer positions and head model are (usually) obtained from the data files generated using the software of the MEG system. For CTF, the coordinates are expressed in cm, except for anatomical MRIs, which are expressed in mm. The various coordinate systems (including the description of how the axes are linked to the head) are explained in more detail on http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#how_are_the_differ ent_head_and_mri_coordinate_systems_defined best Robert On 9 May 2006, at 1:24, Rong, Feng (NIH/NIDCD) [V] wrote: > Hi, > I have a question about the grid coordinates calculated with > prepare-leadfield.m -- how to interpret the .pos value? > For example, I run the script [grid]=prepare_leadfield(cfg,freq), > with the xgrid, ygrid, and zgrid value of cfg being set as 'auto', > then how can I interpret the grid.pos value? They have the value > like [-9 2 2], which coordinates is it? > > Best, > Feng Rong > Graduate Student > NACS Program / Kinesiology Dept > UMCP > From mvelde at ANT-NEURO.COM Tue May 9 12:43:45 2006 From: mvelde at ANT-NEURO.COM (Maarten van de Velde) Date: Tue, 9 May 2006 12:43:45 +0200 Subject: ANT Young Scientist Award Message-ID: Announcement It is now ten years ago that ANT was established as a spin-off company at the campus of Twente University in Enschede, Netherlands. Starting with the 'Advanced Source Analysis' (ASA) software for magnetoencephalography as an outcome of four years of PhD work, ANT has in the decade of its existence become a major supplier for neurodiagnostics and cognitive neuroscience. It has communications with hundreds of users world-wide and is involved in numerous research/development and collaboration projects. We are perfectly aware of the fact that our success is for a great deal based on people who believe in our strength and competence (our customers). We therefore have taken this anniversary as an opportunity to announce the *ANT Young Scientist Award for exceptional advances in EEG/MEG research* We hope that with this award we can stimulate young scientists in the cognitive neuroscience field and want to show our commitment to innovation in neuroscience and clinical brain research. We strongly encourage you to apply - the first prize is 10,000 EURO! An international, independent committee is going to evaluate your work in a most objective way. You will find more related information on our web site: http://www.ant-neuro.com/youngscientistaward The ANT Young Scientist Award is open to every researcher below 37 years of age. Please feel free to circulate this mail to any researcher who you think is eligible . We will most probably extended the submission period with one month (currently until May 31, 2006). Best regards, Maarten van de Velde -------------- next part -------------- A non-text attachment was scrubbed... Name: mvelde.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From marie at PSY.GLA.AC.UK Wed May 10 16:31:23 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Wed, 10 May 2006 15:31:23 +0100 Subject: Beamformer time course Message-ID: Hi I have a question about the solution of a beam-former analysis and would appreciate any suggestions. Having used the beam-former technique to localize a region of interest for a specific time- frequency range, is there some function that can be implemented to compute the time course of activation for this roi? Thanks, Marie Smith From litvak at TECHUNIX.TECHNION.AC.IL Wed May 10 20:42:30 2006 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Wed, 10 May 2006 20:42:30 +0200 Subject: Phase of spontaneous activity In-Reply-To: Message-ID: Dear all, I have several subjects, each with two sets of trials with ongoing EEG (i.e. not containing response to a stimulus). What I would like to know is whether there is a difference between these sets in terms of spectra. I'd like to test all the electrodes and frequencies. There is no problem to do this for power using Fieldtrip and clusterrandanalysis. But now I would like to find out whether for any electrode/frequency there is the systematic difference in phase between the two sets. I would even settle for testing whether in one of the sets the phase at some electrode/frequency is not random. How does one do it in Fieldtrip? Any ideas and code samples would be appreciated. Best, Vladimir From maris at NICI.RU.NL Thu May 11 12:20:03 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 11 May 2006 12:20:03 +0200 Subject: Phase of spontaneous activity Message-ID: Dear Vladimir, > I have several subjects, each with two sets of trials with ongoing EEG > (i.e. > not containing response to a stimulus). What I would like to know is > whether > there is a difference between these sets in terms of spectra. I'd like to > test all the electrodes and frequencies. There is no problem to do this > for > power using Fieldtrip and clusterrandanalysis. But now I would like to > find > out whether for any electrode/frequency there is the systematic difference > in phase between the two sets. I would even settle for testing whether in > one of the sets the phase at some electrode/frequency is not random. > > How does one do it in Fieldtrip? Any ideas and code samples would be > appreciated. At this moment, this is not possible in Fieldtrip. However, it is straightforward to implement it. As you know, we are in the process of restructuring the nonparametric statistics functions in Fieldtrip. I will put your request in our ToDo-list. greetings, Eric Maris From rbg26471 at YAHOO.COM Thu May 11 14:00:31 2006 From: rbg26471 at YAHOO.COM (rathinaswamy bavanandan govindan) Date: Thu, 11 May 2006 05:00:31 -0700 Subject: No subject In-Reply-To: <001001c674e4$77abef80$d62cae83@fcdc195> Message-ID: Dear Eric and Co. I am a novice to Fieldtrip. I have computed a measure for data from each sensor recorded using ctf software. I want to project my results on the sensor layout and create a contour plot. Is there an option in Fieldtrip for this purpose! Please write to me! Thank you very much! Sincerely Govindan --------------------------------- Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Thu May 11 14:55:17 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Thu, 11 May 2006 14:55:17 +0200 Subject: No subject In-Reply-To: <20060511120031.94420.qmail@web51403.mail.yahoo.com> Message-ID: Dear Govindan, There are several plotting function implemented in FieldTrip. If I understand correctly, you need topoplotER or topoplotTFR (I don't understand exactly what you mean by contour plot). You can find information on the FieldTrip webpage under: fieldtrip > documentation > reference documentation. Good luck, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of rathinaswamy bavanandan govindan Sent: Thursday, May 11, 2006 2:01 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Dear Eric and Co. I am a novice to Fieldtrip. I have computed a measure for data from each sensor recorded using ctf software. I want to project my results on the sensor layout and create a contour plot. Is there an option in Fieldtrip for this purpose! Please write to me! Thank you very much! Sincerely Govindan _____ Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga at GRAPHICMIND.INFO Thu May 11 18:29:44 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 11 May 2006 20:29:44 +0400 Subject: clusterrandomization Message-ID: Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From litvak at TECHUNIX.TECHNION.AC.IL Thu May 11 19:38:24 2006 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Thu, 11 May 2006 19:38:24 +0200 Subject: clusterrandomization In-Reply-To: <006e01c67518$1cb7f2c0$51210ad9@olga> Message-ID: clusrand.posclusters and clusrand.negclusters contain all the clusters found, not just the significant ones. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From olga at GRAPHICMIND.INFO Thu May 11 18:47:38 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 11 May 2006 20:47:38 +0400 Subject: clusterrandomization Message-ID: But why than to plot them if they are not significant? ----- Original Message ----- From: "Vladimir Litvak" To: Sent: Thursday, May 11, 2006 9:38 PM Subject: Re: [FIELDTRIP] clusterrandomization clusrand.posclusters and clusrand.negclusters contain all the clusters found, not just the significant ones. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From litvak at TECHUNIX.TECHNION.AC.IL Thu May 11 19:52:17 2006 From: litvak at TECHUNIX.TECHNION.AC.IL (Vladimir Litvak) Date: Thu, 11 May 2006 19:52:17 +0200 Subject: clusterrandomization In-Reply-To: <007301c6751a$9cc2cf10$51210ad9@olga> Message-ID: Sometimes you want to know what's happening in your data. The significance threshold is arbitrary and also there are parameters that can be modified to make the procedure more sensitive to particular kinds of effects (though one should not get carried away with that). So it can be useful to know that there is an effect close to significance somewhere or conversely all the clusters are small. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:48 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization But why than to plot them if they are not significant? ----- Original Message ----- From: "Vladimir Litvak" To: Sent: Thursday, May 11, 2006 9:38 PM Subject: Re: [FIELDTRIP] clusterrandomization clusrand.posclusters and clusrand.negclusters contain all the clusters found, not just the significant ones. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From olga at GRAPHICMIND.INFO Thu May 11 19:02:13 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 11 May 2006 21:02:13 +0400 Subject: clusterrandomization Message-ID: OK. I think my negcluster is not close to significance (p=0.5), therefore I do not want to plot it. How can I choose to plot Only significant clusters (I have 3 posclusters only 1 of which is significant)? I guess I need to change something in mask option, but I do not know how to use the squeeze option. Can you help me with this? Best Regards, Olga ----- Original Message ----- From: "Vladimir Litvak" To: Sent: Thursday, May 11, 2006 9:52 PM Subject: Re: [FIELDTRIP] clusterrandomization Sometimes you want to know what's happening in your data. The significance threshold is arbitrary and also there are parameters that can be modified to make the procedure more sensitive to particular kinds of effects (though one should not get carried away with that). So it can be useful to know that there is an effect close to significance somewhere or conversely all the clusters are small. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:48 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization But why than to plot them if they are not significant? ----- Original Message ----- From: "Vladimir Litvak" To: Sent: Thursday, May 11, 2006 9:38 PM Subject: Re: [FIELDTRIP] clusterrandomization clusrand.posclusters and clusrand.negclusters contain all the clusters found, not just the significant ones. Vladimir -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Thursday, May 11, 2006 6:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization Thank you very much for the help. I continue my succes with Clasterrandomization analysis on within-subject disign. I applied clasterrandomization to compare two condition. I mostly use the settings from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got positive and negative clusters (both clusrand.posclusters and clusrand.negclusters not empty). But when I look for the pval for neg cluster (which is only one, size 8) it appeared to be 0.51. It is bigger than our threshold (0.05). Why it is mark as significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? Could somebody comment on it? Best Regards, Olga. ----- Original Message ----- From: "Robert Oostenveld" To: Sent: Monday, May 08, 2006 11:16 AM Subject: Re: [FIELDTRIP] first success!!! >> I want to share my first success in using Filedtrip. Although I could >> still not properly load my current 64 electrodes data, I succeeded in >> importing my old 19 channel data. Moreover, I succeded in conducting the >> between-trial clasterrandomization analysis! > > It might be that the automatic projection of the 3D electrodes to the 2D > surface for plotting is not optimal for your 64 channel set, perhaps due > to a few very low electrodes. I suggest that you construct a layout file, > see my previous mail. You can also look into the code in > private/createlayout, where at the bottom you will find some code that > helps you to visualise the layout. > >> But I still have problems with within-subject cluster- randomization. The >> error "did not find the gradiometer or electrode information" appears, >> line 461. What could it be? > > Cluster randomization requires that the neighbourhood geomerty in the > data is known, i.e. the neighbouring electrodes. You can specify them > with cfg.neighbours. It is documented in "help clusterrandanalysis". One > method to automatically specify the neighbourhood is by having electrode > information in the dataset, i.e. an elec structure and to specify the > cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF > gradiometers). I do not know the units of your electrodes (could be m, > cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should > be specified in the same units. > > best regards, > Robert From olga at GRAPHICMIND.INFO Thu May 11 19:55:57 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 11 May 2006 21:55:57 +0400 Subject: clusterrandomization Message-ID: Please disregard my previous post. Now I know how to do this. Sorry... ----- Original Message ----- From: "Olga Sysoeva" To: Sent: Thursday, May 11, 2006 9:02 PM Subject: Re: [FIELDTRIP] clusterrandomization > OK. I think my negcluster is not close to significance (p=0.5), therefore > I do not want to plot it. > How can I choose to plot Only significant clusters (I have 3 posclusters > only 1 of which is significant)? > I guess I need to change something in mask option, but I do not know how > to use the squeeze option. Can you help me with this? > > Best Regards, > Olga > > ----- Original Message ----- > From: "Vladimir Litvak" > To: > Sent: Thursday, May 11, 2006 9:52 PM > Subject: Re: [FIELDTRIP] clusterrandomization > > > Sometimes you want to know what's happening in your data. The significance > threshold is arbitrary and also there are parameters that can be modified > to > make the procedure more sensitive to particular kinds of effects (though > one > should not get carried away with that). So it can be useful to know that > there is an effect close to significance somewhere or conversely all the > clusters are small. > > Vladimir > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf > Of Olga Sysoeva > Sent: Thursday, May 11, 2006 6:48 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] clusterrandomization > > But why than to plot them if they are not significant? > > ----- Original Message ----- > From: "Vladimir Litvak" > To: > Sent: Thursday, May 11, 2006 9:38 PM > Subject: Re: [FIELDTRIP] clusterrandomization > > > clusrand.posclusters and clusrand.negclusters contain all the clusters > found, not just the significant ones. > > Vladimir > > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf > Of Olga Sysoeva > Sent: Thursday, May 11, 2006 6:30 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] clusterrandomization > > Thank you very much for the help. > > I continue my succes with Clasterrandomization analysis on within-subject > disign. > I applied clasterrandomization to compare two condition. I mostly use the > settings > from the tutorial (both cfg.alphathres =0.05 and cfg.alpha=0.05) and got > positive and negative clusters > (both clusrand.posclusters and clusrand.negclusters not empty). But when I > look for the pval for neg cluster > (which is only one, size 8) it appeared to be 0.51. It is bigger than our > threshold (0.05). Why it is mark as > significant cluster than (clusrand.negclusterlabelmat =1 for 8 elements)? > Could somebody comment on it? > > Best Regards, > Olga. > > ----- Original Message ----- > From: "Robert Oostenveld" > To: > Sent: Monday, May 08, 2006 11:16 AM > Subject: Re: [FIELDTRIP] first success!!! > > >>> I want to share my first success in using Filedtrip. Although I could >>> still not properly load my current 64 electrodes data, I succeeded in >>> importing my old 19 channel data. Moreover, I succeded in conducting >>> the > >>> between-trial clasterrandomization analysis! >> >> It might be that the automatic projection of the 3D electrodes to the 2D >> surface for plotting is not optimal for your 64 channel set, perhaps due >> to a few very low electrodes. I suggest that you construct a layout >> file, > >> see my previous mail. You can also look into the code in >> private/createlayout, where at the bottom you will find some code that >> helps you to visualise the layout. >> >>> But I still have problems with within-subject cluster- randomization. >>> The > >>> error "did not find the gradiometer or electrode information" appears, >>> line 461. What could it be? >> >> Cluster randomization requires that the neighbourhood geomerty in the >> data is known, i.e. the neighbouring electrodes. You can specify them >> with cfg.neighbours. It is documented in "help clusterrandanalysis". One >> method to automatically specify the neighbourhood is by having electrode >> information in the dataset, i.e. an elec structure and to specify the >> cfg.neighbourdist option (default is 4 cm, which is suitable for the CTF >> gradiometers). I do not know the units of your electrodes (could be m, >> cm, mm, or unit-scaled dimensionless), but the cfg.neighbourdist should >> be specified in the same units. >> >> best regards, >> Robert From jciveira at UNAV.ES Fri May 12 12:26:29 2006 From: jciveira at UNAV.ES (Juan Civeira) Date: Fri, 12 May 2006 12:26:29 +0200 Subject: Source reconstruction Message-ID: Hello, I have already localize an activation in the brain and now I want to calculate time course of the selected sources. I have thought about chosing the sources by hand and then programming the time reconstruction but I would like to ask if there is any code to make it. Thank you 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 Jan.Schoffelen at FCDONDERS.RU.NL Fri May 12 12:56:40 2006 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Fri, 12 May 2006 12:56:40 +0200 Subject: Source reconstruction In-Reply-To: Message-ID: Dear Juan, You can create time-courses of your sources by using the lcmv-method of sourceanalysis. The input to sourceanalysis should be a timelock-structure which has been obtained with cfg.keeptrials = 'yes' The easiest way to reconstruct your single-trial source time-courses would be to specify cfg.keepfilter = 'yes' in your sourceanalysis-configuration. In the output of sourceanalysis you will find the field avg.filter, which contains the filter weights of your locations of interest. You can obtain a single-trial estimate of your source activation at a particular location by multiplying your data with the filter-weights as follows: source.avg.filter{i}*squeeze(timelock.trial(j,:,:)) This will give you the reconstructed source activity in trial j at location i. Yours, Jan-Mathijs -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Juan Civeira Sent: Friday, May 12, 2006 12:26 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Source reconstruction Hello, I have already localize an activation in the brain and now I want to calculate time course of the selected sources. I have thought about chosing the sources by hand and then programming the time reconstruction but I would like to ask if there is any code to make it. Thank you 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 Fri May 12 19:22:19 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Fri, 12 May 2006 19:22:19 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: Dear Marie, On 10 May 2006, at 16:31, Marie Smith wrote: > I have a question about the solution of a beam-former analysis and > would appreciate any suggestions. Having used the beam-former > technique to localize a region of interest for a specific time- > frequency range, is there some function that can be implemented to > compute the time course of activation for this roi? For that you would use a time-domain beamformer, i.e. the lcmv beamformer (cfg.method='lcmv' in sourceanalysis). That requires time- domain data as input, so you should use timelockanalysis to compute the covariance and the average. The covariance is used to construct the beamformer filter and the average is projected through the filter. If you want to project single-trial data through the filter, you should keep the trials in timelockanalysis and use the option cfg.singletrials='yes' in sourceanalysis (see its help). If you are interested in a specific frequency band, you can use a band-pass filter in timelockanalysis (the options for that are hidden in the documentation, but they are the same as in preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It could also be that you want to use a filter based on a narrow frequency band and use it to beam the broad-band data. That is also possible, but not smoothly: you have to do timelockanalysis twice (broadband and narrowband) and replace the broadband covariance with the filtered narrowband covariance. I hope this short explanation is enough. Robert From olga at GRAPHICMIND.INFO Sat May 13 09:27:44 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Sat, 13 May 2006 11:27:44 +0400 Subject: clusterrandomization on 3D-data within-subject Message-ID: Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lilla.Magyari at FCDONDERS.RU.NL Sat May 13 13:11:03 2006 From: Lilla.Magyari at FCDONDERS.RU.NL (Lilla Magyari) Date: Sat, 13 May 2006 13:11:03 +0200 Subject: clusterrandomization on 3D-data within-subject In-Reply-To: <001201c6765e$baa53370$51210ad9@olga> Message-ID: Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga at GRAPHICMIND.INFO Sat May 13 14:34:07 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Sat, 13 May 2006 16:34:07 +0400 Subject: clusterrandomization on 3D-data within-subject Message-ID: Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari ------------------------------------------------------------------------------ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From olga at GRAPHICMIND.INFO Mon May 15 06:46:35 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Mon, 15 May 2006 08:46:35 +0400 Subject: cluster randomization Message-ID: Dear list members, Am I right, that after cluster randomization I will everytime get smaller amount of significant results, than after traditional t-test? I mean if set cfg.alphathreshold = 0.05, and choose dependent t-test my clusters can only include the channels and time-points that is significant (p<0,05) when I just use dependent t-test to compare the two condition time by time on every channel. And only after this first step analysis the cluster is formed based on this t-test. Probably I am missing something, but after clusterrandomization analysis I've got a cluster (even significant, but it should not matter) with differential activation at posterior left site, although t-test (made in eeglab) on this paticular channel does not show any significant points. Can somebody comment on it? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marie at PSY.GLA.AC.UK Tue May 16 18:21:24 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 16 May 2006 17:21:24 +0100 Subject: Beamformer time course In-Reply-To: <071C4BBD-5D11-46E2-A606-704CCBE1ED9F@fcdonders.ru.nl> Message-ID: Hi Thanks a lot for your response, your explanations seem clear to me. I have also talked with Klaus Kessler about this. He has in the past used DICS to generate the filter for a specific time/freq box, and then applied this filter to the time locked data in order to compute synchronization between regions etc. I realise this would also not be possible smoothly, but does it make sense to generate a filter using the cross spectral density matrix for a given time/freq range (cf DICS) - and then applying this filter to the covariance of the time averaged data? Marie On 12 May 2006, at 18:22, Robert Oostenveld wrote: > Dear Marie, > > On 10 May 2006, at 16:31, Marie Smith wrote: >> I have a question about the solution of a beam-former analysis and >> would appreciate any suggestions. Having used the beam-former >> technique to localize a region of interest for a specific time- >> frequency range, is there some function that can be implemented to >> compute the time course of activation for this roi? > > For that you would use a time-domain beamformer, i.e. the lcmv > beamformer (cfg.method='lcmv' in sourceanalysis). That requires > time-domain data as input, so you should use timelockanalysis to > compute the covariance and the average. The covariance is used to > construct the beamformer filter and the average is projected > through the filter. If you want to project single-trial data > through the filter, you should keep the trials in timelockanalysis > and use the option cfg.singletrials='yes' in sourceanalysis (see > its help). > > If you are interested in a specific frequency band, you can use a > band-pass filter in timelockanalysis (the options for that are > hidden in the documentation, but they are the same as in > preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It could > also be that you want to use a filter based on a narrow frequency > band and use it to beam the broad-band data. That is also possible, > but not smoothly: you have to do timelockanalysis twice (broadband > and narrowband) and replace the broadband covariance with the > filtered narrowband covariance. I hope this short explanation is > enough. > > Robert From r.oostenveld at FCDONDERS.RU.NL Wed May 17 10:55:33 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 17 May 2006 10:55:33 +0200 Subject: Beamformer time course In-Reply-To: <53E2B50A-F60B-4DBB-81D7-59C799C46423@psy.gla.ac.uk> Message-ID: Hi Marie, It is possible to use the cfg.keepfilter='yes' option both with lcmv and with dics, and also both techniques are implemented such that they will re-use the previously computed filters. So you can first do dics with keepfilter, and then use those filters in the subsequent lcmv analysis. That would look like this: cfg = [] cfg.method = dics cfg.dics.realfilter = yes <=== see below cfg.keepfilter = yes ... source_d = sourceanalysis(cfg, freq) cfg = [] cfg.method = lcmv cfg.keepfilter = no cfg.grid = grid <=== see below ... source_l = sourceanalysis(cfg, timelock) The cfg.grid option allows to specify precomputed leadfields (i.e. the output of prepare_leadfield), but also precomputed filters, which is done here. The easiest is then to do grid=source2grid(source_d) after the dics and before the lcmv analysis. The source2grid helper function strips all irrelevant elements from the source_d structure and will only retain the information that is relevant for the sourceanalysis on the second dataset. It assumes that you use exactly the same channels in both analyses. A conceptual problem that you will run into is that, according to the original description of dics (gross 2001), the filters are complex- valued. Multiplying these complex filters with real data will result in complex valued source projections, which is weird to say the least. I consider that to be an error in the DICS algorithm. The solution for that is that our implementation, which by default will return complex filters in accordance with the original DICS description, can also use and return real-valued filters. That is enabled by the (undocumented) option cfg.dics.realfilter='yes'. Please download the latest (i..e. yesterdays) version of fieldtrip from the FTP, and replace fieldtrip/source2grid.m and fieldtrip/ private/beamformer.m with the attached updated functions (I just tested the procedure described above, and there were a few details in the code that had to be changed). best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: beamformer.m Type: application/octet-stream Size: 26935 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: source2grid.m Type: application/octet-stream Size: 1300 bytes Desc: not available URL: -------------- next part -------------- On 16 May 2006, at 18:21, Marie Smith wrote: > Hi > > Thanks a lot for your response, your explanations seem clear to me. > > I have also talked with Klaus Kessler about this. He has in the > past used DICS to generate the filter for a specific time/freq box, > and then applied this filter to the time locked data in order to > compute synchronization between regions etc. > I realise this would also not be possible smoothly, but does it > make sense to generate a filter using the cross spectral density > matrix for a given time/freq range (cf DICS) - and then applying > this filter to the covariance of the time averaged data? > > Marie > > > > > On 12 May 2006, at 18:22, Robert Oostenveld wrote: > >> Dear Marie, >> >> On 10 May 2006, at 16:31, Marie Smith wrote: >>> I have a question about the solution of a beam-former analysis >>> and would appreciate any suggestions. Having used the beam-former >>> technique to localize a region of interest for a specific time- >>> frequency range, is there some function that can be implemented >>> to compute the time course of activation for this roi? >> >> For that you would use a time-domain beamformer, i.e. the lcmv >> beamformer (cfg.method='lcmv' in sourceanalysis). That requires >> time-domain data as input, so you should use timelockanalysis to >> compute the covariance and the average. The covariance is used to >> construct the beamformer filter and the average is projected >> through the filter. If you want to project single-trial data >> through the filter, you should keep the trials in timelockanalysis >> and use the option cfg.singletrials='yes' in sourceanalysis (see >> its help). >> >> If you are interested in a specific frequency band, you can use a >> band-pass filter in timelockanalysis (the options for that are >> hidden in the documentation, but they are the same as in >> preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It >> could also be that you want to use a filter based on a narrow >> frequency band and use it to beam the broad-band data. That is >> also possible, but not smoothly: you have to do timelockanalysis >> twice (broadband and narrowband) and replace the broadband >> covariance with the filtered narrowband covariance. I hope this >> short explanation is enough. >> >> Robert > From R.Oostenveld at FCDONDERS.RU.NL Wed May 17 12:09:21 2006 From: R.Oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 17 May 2006 12:09:21 +0200 Subject: fieldtrip artifact-rejection In-Reply-To: <446A12C6.90006@gmail.com> Message-ID: Hi Markus, I hope that you don't mind moving this thread over to the discussion list, since other people also might be interested and/or want to contribute. On 16 May 2006, at 19:58, Markus Bauer wrote: > I have started working on some EEG data today. I found the artifact > rejection tools not totally satisfying for EEG data. > In case you're interested I would be happy working on it, then we > could discuss how to best do it. > If you want to keep it like it is, I'll just make my own solution. The artifact stuff is also not completely to my likings, so I am open for suggestions (especially if you are willing to aid in implementing the suggestions). > Here are the major shortcomings, I have encountered: > Particularly the lack of a (partial) rejection-tool for fixed > amplitude thresholds makes life difficult and partial artifact > rejection for EEG non-usable. artifact_threshold already does this, but not for partial rejection. It would be trivial to adapt it for partial artifacts. > Often after muscle and EOG correction big spikes are remaining in > the data, these cannot be taken care of, without doing total > rejection of trial. I do not fully understand why such a function > should be incompatible with partial rejection - didn't understand > your comment in the header (with min max) either. which comment in which header? If you refer to artifact_threshold, then see my previous comment that it could easily be enhanced for partial rejection support. > The artifact-markers in the EOG-routine are very often phase > shifted with respect to the blink - such that the initial part of > the blink is taken well care of (plus additional unaffected data), > the later part is often not covered, even when specifying 0.15s or > more. I have never seen the opposite case so far. Could well be. > I guess it has to do with the hilbert transform. I don't think that that is the reason, I more expect it to be due to a fast rising flank of the EOG followed by a slower falling flank. But have not looked at enough experimental data myself to be sure. > Since only a symmetric "artefact-padding" is allowed, data are > often wasted/artefacts not taken well care of. It would be fine with me to support both cfg.artfctdef.zvalue.artpadding = val and cfg.artfctdef.zvalue.artpadding = [preval, postval] This is also something that Marcel Bastiaansen suggested to me some time ago. > Also for EOG and muscle, the option for using absolute thresholds > on the specially treated data could be helpful (with partial > rejection), it has been taken out - is there a concrete reason ?? The old code for jump/eog/muscle was a mixture of combined z-values over channels on one hand and plain thresholding of preprocessed data on the other hand. Since the plain thresholding is also available in artifact_threshold, I saw no reason to reimplement it in the new functions. I want to prevent replicating functionality. > I know that everybody can write their own custom functions, but I'm > sure others will make same experiences. Yes, I do prefer to improve the existing functions instead of everyone writing their own. > Another thing - I think it would be ideal to do the artifact > rejection on all the conditions simultaneously to make sure that > the same criteria are applied to the data of all conditions > (particularly when only relative thresholds - zvalues - are used). > Practically this would mean that one would use the artefact > rejected cfg-structure - i.e. the result of rejectartifact - to > later extract the conditions from those and then do preprocessing. That is already possible in two ways, e.g. with two conditions one could do this: cfg1 = ... cfg1 = definetrial(cfg1) cfg2 = ... cfg2 = definetrial(cfg1) cfgall = ... cfgall.trl = cat(2,cfg1.trl, cfg2.trl) % combine all data segments of interest cfgall.artifact.eog = ... cfgall = artifact_eog(cfgall) % detect EOG artifacts in the data segments of both conditions cfgall.artifact.muscle = ... cfgall = artifact_msucle(cfgall) % detect Muscle artifacts in the data segments of both conditions cfg1.artifact = cfgall.artifact % copy the detected artifacts cfg1 = rejectartifact(cfg1) % and reject the data segments that overlap with an artifact raw1 = preprocessing(cfg1); cfg2.artifact = cfgall.artifact % copy the detected artifacts cfg2 = rejectartifact(cfg2) % and reject the data segments that overlap with an artifact raw2 = preprocessing(cfg2); The other way of realising this is by using recodeevent, which is even more flexible. It might look like this cfg1 = ... cfg1 = definetrial(cfg1) cfg2 = ... cfg2 = definetrial(cfg1) cfgall = ... cfgall.trl = cat(2,cfg1.trl, cfg2.trl) % alternatively you could use only one trialfun for both cfgall.artifact.eog = ... cfgall = artifact_eog(cfgall) % detect EOG artifacts in the data segments of both conditions cfgall.artifact.muscle = ... cfgall = artifact_msucle(cfgall) % detect Muscle artifacts in the data segments of both conditions cfgall = rejectartifact(cfgall) rawall = preprocessing(cfgall) cfg = ... cfg.keeptrial = 'yes' freqall = freqanalysis(cfg, rawall) cfg = ... cfg.output = 'eventvalue' trigger = recodeevent(cfg, rawall) sel1 = find(trigger==1); sel2 = find(trigger==2); freq1 = freqall; freq1.powspctrm = freq1.powspctrm(sel1,:,:) freq2 = freqall; freq2.powspctrm = freq2.powspctrm(sel2,:,:) Retrieving the match between the implicit events and the trial segments could be done at various stages of the analysis, i.e. you could even beam with singletrials and common filters for both conditions, and sort the single trial estimates of power at the source level after that. > I have my own function that is capable of doing that, but since > this may in principle be the appropriate way to do artefact > rejection - I wonder whether you're interested in a more standard > solution ?? I think that the desired functionality that you mention can be achieved with only small modifications to fieldtrip. Please think about it, and if you agree, then you could modify the artifact_threshold function. Please also have a look at the attached rejectvisual function (not yet released): it allows to reject trials after they have been preprocessed, like in the BESA way that you once suggested. best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: rejectvisual.m Type: application/octet-stream Size: 6826 bytes Desc: not available URL: -------------- next part -------------- From r.oostenveld at FCDONDERS.RU.NL Wed May 17 17:00:58 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 17 May 2006 17:00:58 +0200 Subject: fieldtrip artifact-rejection In-Reply-To: <000e01c679c2$cc72f4e0$90514484@dellgx240> Message-ID: Dear all There was a subfunction missing that is required for rejectvisual, please find it attached. Furthermore, from tomorrow on the rejectvisual function will be included in the daily release on the Donders ftp server. best regards, Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: select2d.m Type: application/octet-stream Size: 750 bytes Desc: not available URL: -------------- next part -------------- On 17 May 2006, at 17:01, Vladimir Litvak wrote: > Hi Robert, > > I wanted to look at the rejectvisual function but it requires > something > called select2d. Please check the dependencies and send them to the > list. > I'll try to test it on some of my data that I already processed > with BESA. > > Best, > > Vladimir From olga at GRAPHICMIND.INFO Thu May 18 16:56:25 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Thu, 18 May 2006 18:56:25 +0400 Subject: Fw: [FIELDTRIP] cluster randomization Message-ID: Sorry for repeating my post, but I just want to be sure that I understand everything correct. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Monday, May 15, 2006 8:46 AM Subject: [FIELDTRIP] cluster randomization Dear list members, Am I right, that after cluster randomization I will everytime get smaller amount of significant results, than after traditional t-test? I mean if set cfg.alphathreshold = 0.05, and choose dependent t-test my clusters can only include the channels and time-points that is significant (p<0,05) when I just use dependent t-test to compare the two condition time by time on every channel. And only after this first step analysis the cluster is formed based on this t-test. Probably I am missing something, but after clusterrandomization analysis I've got a cluster (even significant, but it should not matter) with differential activation at posterior left site, although t-test (made in eeglab) on this paticular channel does not show any significant points. Can somebody comment on it? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Thu May 18 21:56:52 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 18 May 2006 21:56:52 +0200 Subject: Fw: [FIELDTRIP] cluster randomization Message-ID: Dear Olga, Am I right, that after cluster randomization I will everytime get smaller amount of significant results, than after traditional t-test? I mean if set cfg.alphathreshold = 0.05, and choose dependent t-test my clusters can only include the channels and time-points that is significant (p<0,05) when I just use dependent t-test to compare the two condition time by time on every channel. And only after this first step analysis the cluster is formed based on this t-test. Probably I am missing something, but after clusterrandomization analysis I've got a cluster (even significant, but it should not matter) with differential activation at posterior left site, although t-test (made in eeglab) on this paticular channel does not show any significant points. Your reasoning is completely correct. As I see it now, either Clusterrandanalysis or EEGlab performs its dependent samples t-tests incorrectly. Without having your data, it is not possible for me to check this numerically. However, you can do this very easily yourself: take the data of the (channel,time)-pair of interest, and calculate the dependent samples t-statistic on it using Matlab's statistics toolbox or by means of the formula in an elementary statistics book. Compare the result with the statistic for this (channel,time)-pair that is given in the output of clusterrandanalysis (in the .stats-field). Let me what you have found. Kind regards, Eric Maris From muthuraman10 at HOTMAIL.COM Mon May 22 14:15:13 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 22 May 2006 12:15:13 +0000 Subject: query on coherence source analysis In-Reply-To: <3756B6D4-A15F-44B7-9241-BD9E4429A276@fcdonders.ru.nl> Message-ID: hello Thankyou for the previous suggestion I have gone through the article, in which for the 'DICS' algorthim it is mentioned that they use welch method to calculate the cross spectral density, for the freqanalysis program is there a cfg.method with welch to use it for the 'DICS'. I do not find the freqanalysis_mtmwelch I have the 20060131 version of fieltrip is it updated in the latest versions with regards muthu >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on coherence source analysis >Date: Tue, 2 May 2006 14:57:56 +0200 > >Dear Muthuraman > >Fieldtrip implements DICS in the SOURCEANALYSIS function. You can find the >literature reference to the DICS algorith on the page http:// >www2.ru.nl/fcdonders/fieldtrip/doku.php? >id=fieldtrip:documentation:references_to_implemented_methods > >best regards, >Robert > >On 2 May 2006, at 11:02, Muthuraman Muthuraman wrote: > >>Hello >> >>Thanks for the Previous suggestions >> >>i would like to know whether there is prescribed algorithm in Fieldtrip >>to calculate the coherent source analysis between the EEG and EMG data >> >>with regards >>muthuraman >> From marie at PSY.GLA.AC.UK Mon May 22 17:18:55 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Mon, 22 May 2006 16:18:55 +0100 Subject: Beamformer time course In-Reply-To: <071C4BBD-5D11-46E2-A606-704CCBE1ED9F@fcdonders.ru.nl> Message-ID: Hi I have been trying out the various methods as discussed and have come across a problem. When I select cfg.singletrials = 'yes' I get a number of error messages saying error('this option contains a bug, and is therefore not supported at the moment'); I am using the toolbox fieldtrip-20060516. I noticed however, if I select cfg.rawtrials = 'yes' the function will run. Can you help. Marie On 12 May 2006, at 18:22, Robert Oostenveld wrote: > Dear Marie, > > On 10 May 2006, at 16:31, Marie Smith wrote: >> I have a question about the solution of a beam-former analysis and >> would appreciate any suggestions. Having used the beam-former >> technique to localize a region of interest for a specific time- >> frequency range, is there some function that can be implemented to >> compute the time course of activation for this roi? > > For that you would use a time-domain beamformer, i.e. the lcmv > beamformer (cfg.method='lcmv' in sourceanalysis). That requires > time-domain data as input, so you should use timelockanalysis to > compute the covariance and the average. The covariance is used to > construct the beamformer filter and the average is projected > through the filter. If you want to project single-trial data > through the filter, you should keep the trials in timelockanalysis > and use the option cfg.singletrials='yes' in sourceanalysis (see > its help). > > If you are interested in a specific frequency band, you can use a > band-pass filter in timelockanalysis (the options for that are > hidden in the documentation, but they are the same as in > preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It could > also be that you want to use a filter based on a narrow frequency > band and use it to beam the broad-band data. That is also possible, > but not smoothly: you have to do timelockanalysis twice (broadband > and narrowband) and replace the broadband covariance with the > filtered narrowband covariance. I hope this short explanation is > enough. > > Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Tue May 23 12:12:48 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 23 May 2006 12:12:48 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: Hi Marie, On 22 May 2006, at 17:18, Marie Smith wrote: > I have been trying out the various methods as discussed and have > come across a problem. > > When I select cfg.singletrials = 'yes' I get a number of error > messages saying > error('this option contains a bug, and is therefore not supported > at the moment'); > > I am using the toolbox fieldtrip-20060516. > > I noticed however, if I select cfg.rawtrials = 'yes' the function > will run. I recall disabling this functionality, since it was rarely used and since I was concerned that it would not be correct. I now had a more detailled look at the code. If you do rawtrial=yes, beamformer uses the single-trial covariance to construct the filter and also applies it to the single trial covariance/csd. That results in a very poorly estimated filter in each trial, hence projecting large amounts of noise and a lot of variance over trials. Therefore we found it not to be very usefull on real data, although conceptually and in the code it is correct. The idea behind singletrial=yes is that beamformer uses the average covariance to construct the filter and applies it to the single trial covariance/csd. The problem in the code however is that beamformer would use the averaged covariance/csd to estimate the power and not the single trial covariance/csd. The estimated single-trial timecourse would be correct, but the power would not be correct. Therefore I disabled that option in the code. The solution is something that you can do yourself in two subsequent runs of sourceanalysis: you can do sourceanalysis on the average (i.e. do not specify any of singletrial/rawtrial options) and specify keepfilter=yes. That will give you the filter, computed on the average covariance. Subsequently do cfg.grid=source2grid(source), and use the resulting grid (including the filters) in the second run of sourceanalysis, in which you specify cfg.rawtrial=yes. In the second run, the previous (based on average covariance) filters will be applied to the unaveraged data, resulting in the desired single-trial power and dipole moment. best regards, Robert From r.oostenveld at FCDONDERS.RU.NL Tue May 23 12:33:24 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Tue, 23 May 2006 12:33:24 +0200 Subject: query on coherence source analysis In-Reply-To: Message-ID: Dear Muthuraman At the Donders we usually use the multitaper method for computing the cross spectral density, in freqanalysis that is cfg.method='mtmfft' or 'mtmconvol'. If you would use the mtmconvol method, you will get a frequency decomposition for multiple sliding time windows (that can be overlapping or not). If you then would average these frequency decompositions over time, you have performed Welch's method. We already implemented that in a function, see attached freqanalysis_mtmwelch (i.e. it even allows you to combine multitapering and Welch). Add it to your fieldtrip directory and specify cfg.method='mtmwelch' for freqanalysis. This new function is still rather poorly documented, and it does not have default settings for most of the cfg options. Probably you will want cfg.taper=hanning (i.e. no multitapering), in which case you do not have to specify cfg.tapsmofrq. The function will use maximally overlapping windows for Welch method (which takes a lot of memory). You should specify the frequencies of interest (cfg.foi) and window length per frequency (cfg.t_ftimwin). best Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: freqanalysis_mtmwelch.m Type: application/octet-stream Size: 3262 bytes Desc: not available URL: -------------- next part -------------- On 22 May 2006, at 14:15, Muthuraman Muthuraman wrote: > hello > > Thankyou for the previous suggestion > > I have gone through the article, in which for the 'DICS' algorthim > it is mentioned that they use welch method to calculate the cross > spectral density, for the freqanalysis program is there a > cfg.method with welch to use it for the 'DICS'. > > I do not find the freqanalysis_mtmwelch > I have the 20060131 version of fieltrip is it updated in the latest > versions > > with regards > muthu > > >> From: Robert Oostenveld >> Reply-To: FieldTrip discussion list >> To: FIELDTRIP at NIC.SURFNET.NL >> Subject: Re: [FIELDTRIP] query on coherence source analysis >> Date: Tue, 2 May 2006 14:57:56 +0200 >> >> Dear Muthuraman >> >> Fieldtrip implements DICS in the SOURCEANALYSIS function. You can >> find the literature reference to the DICS algorith on the page >> http:// www2.ru.nl/fcdonders/fieldtrip/doku.php? >> id=fieldtrip:documentation:references_to_implemented_methods >> >> best regards, >> Robert >> >> On 2 May 2006, at 11:02, Muthuraman Muthuraman wrote: >> >>> Hello >>> >>> Thanks for the Previous suggestions >>> >>> i would like to know whether there is prescribed algorithm in >>> Fieldtrip >>> to calculate the coherent source analysis between the EEG and >>> EMG data >>> >>> with regards >>> muthuraman >>> > From marie at PSY.GLA.AC.UK Tue May 23 17:09:47 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 23 May 2006 16:09:47 +0100 Subject: Beamformer time course In-Reply-To: <78E05DBA-BC4C-469B-A508-5653CF799233@fcdonders.ru.nl> Message-ID: Hi I have tried the analysis as you suggest and although the analysis appears to run I cannot find the single trial time courses in the outcome of the second run of sourceanalysis. In fact, it seems to output for each dipole location one value for each of the power, the moment and the noise. Should I enable the option singletrial = yes to determine the time courses, and use the final two run method to obtain the correct power estimates? Also, for information I am having some problems using the compiled mex files with matlab 7 under unix. Thanks Marie On 23 May 2006, at 11:12, Robert Oostenveld wrote: > Hi Marie, > > On 22 May 2006, at 17:18, Marie Smith wrote: >> I have been trying out the various methods as discussed and have >> come across a problem. >> >> When I select cfg.singletrials = 'yes' I get a number of error >> messages saying >> error('this option contains a bug, and is therefore not supported >> at the moment'); >> >> I am using the toolbox fieldtrip-20060516. >> >> I noticed however, if I select cfg.rawtrials = 'yes' the function >> will run. > > I recall disabling this functionality, since it was rarely used and > since I was concerned that it would not be correct. I now had a > more detailled look at the code. > > If you do rawtrial=yes, beamformer uses the single-trial covariance > to construct the filter and also applies it to the single trial > covariance/csd. That results in a very poorly estimated filter in > each trial, hence projecting large amounts of noise and a lot of > variance over trials. Therefore we found it not to be very usefull > on real data, although conceptually and in the code it is correct. > > The idea behind singletrial=yes is that beamformer uses the average > covariance to construct the filter and applies it to the single > trial covariance/csd. The problem in the code however is that > beamformer would use the averaged covariance/csd to estimate the > power and not the single trial covariance/csd. The estimated single- > trial timecourse would be correct, but the power would not be > correct. Therefore I disabled that option in the code. > > The solution is something that you can do yourself in two > subsequent runs of sourceanalysis: you can do sourceanalysis on the > average (i.e. do not specify any of singletrial/rawtrial options) > and specify keepfilter=yes. That will give you the filter, computed > on the average covariance. Subsequently do cfg.grid=source2grid > (source), and use the resulting grid (including the filters) in the > second run of sourceanalysis, in which you specify > cfg.rawtrial=yes. In the second run, the previous (based on average > covariance) filters will be applied to the unaveraged data, > resulting in the desired single-trial power and dipole moment. > > best regards, > Robert From marie at PSY.GLA.AC.UK Tue May 23 19:46:47 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Tue, 23 May 2006 18:46:47 +0100 Subject: Beamformer time course In-Reply-To: <78E05DBA-BC4C-469B-A508-5653CF799233@fcdonders.ru.nl> Message-ID: Hi, Thanks again for all your help with my questions so far, it has been very useful. As an alternative method to determining the time course of activation, I planned to use the filter as output from sourceanalysis directly with the time locked data set. However I am unsure what the three dimensions of the filter are. Could you please clarify this for me. Thanks Marie On 23 May 2006, at 11:12, Robert Oostenveld wrote: > Hi Marie, > > On 22 May 2006, at 17:18, Marie Smith wrote: >> I have been trying out the various methods as discussed and have >> come across a problem. >> >> When I select cfg.singletrials = 'yes' I get a number of error >> messages saying >> error('this option contains a bug, and is therefore not supported >> at the moment'); >> >> I am using the toolbox fieldtrip-20060516. >> >> I noticed however, if I select cfg.rawtrials = 'yes' the function >> will run. > > I recall disabling this functionality, since it was rarely used and > since I was concerned that it would not be correct. I now had a > more detailled look at the code. > > If you do rawtrial=yes, beamformer uses the single-trial covariance > to construct the filter and also applies it to the single trial > covariance/csd. That results in a very poorly estimated filter in > each trial, hence projecting large amounts of noise and a lot of > variance over trials. Therefore we found it not to be very usefull > on real data, although conceptually and in the code it is correct. > > The idea behind singletrial=yes is that beamformer uses the average > covariance to construct the filter and applies it to the single > trial covariance/csd. The problem in the code however is that > beamformer would use the averaged covariance/csd to estimate the > power and not the single trial covariance/csd. The estimated single- > trial timecourse would be correct, but the power would not be > correct. Therefore I disabled that option in the code. > > The solution is something that you can do yourself in two > subsequent runs of sourceanalysis: you can do sourceanalysis on the > average (i.e. do not specify any of singletrial/rawtrial options) > and specify keepfilter=yes. That will give you the filter, computed > on the average covariance. Subsequently do cfg.grid=source2grid > (source), and use the resulting grid (including the filters) in the > second run of sourceanalysis, in which you specify > cfg.rawtrial=yes. In the second run, the previous (based on average > covariance) filters will be applied to the unaveraged data, > resulting in the desired single-trial power and dipole moment. > > best regards, > Robert From Jan.Schoffelen at FCDONDERS.RU.NL Wed May 24 09:25:04 2006 From: Jan.Schoffelen at FCDONDERS.RU.NL (Jan Mathijs Schoffelen) Date: Wed, 24 May 2006 09:25:04 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: Dear Marie, Please have a look in the discussion's list archive. A question very similar to yours has been answered: see the archive of May 2006, and follow the link "source reconstruction". The discussion's list archive can be reached from the website. Yours, Jan-Mathijs The dimensionality of the filter is a 3xN-matrix, with N the number of sensors. The "3" corresponds with the x,y,z direction in space. In other words: multiplying your data with the filter results in a 3xT (number of time points) matrix, which represents a dipole's activity in 3-D space. -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Marie Smith Sent: Tuesday, May 23, 2006 7:47 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] Beamformer time course Hi, Thanks again for all your help with my questions so far, it has been very useful. As an alternative method to determining the time course of activation, I planned to use the filter as output from sourceanalysis directly with the time locked data set. However I am unsure what the three dimensions of the filter are. Could you please clarify this for me. Thanks Marie On 23 May 2006, at 11:12, Robert Oostenveld wrote: > Hi Marie, > > On 22 May 2006, at 17:18, Marie Smith wrote: >> I have been trying out the various methods as discussed and have >> come across a problem. >> >> When I select cfg.singletrials = 'yes' I get a number of error >> messages saying >> error('this option contains a bug, and is therefore not supported >> at the moment'); >> >> I am using the toolbox fieldtrip-20060516. >> >> I noticed however, if I select cfg.rawtrials = 'yes' the function >> will run. > > I recall disabling this functionality, since it was rarely used and > since I was concerned that it would not be correct. I now had a > more detailled look at the code. > > If you do rawtrial=yes, beamformer uses the single-trial covariance > to construct the filter and also applies it to the single trial > covariance/csd. That results in a very poorly estimated filter in > each trial, hence projecting large amounts of noise and a lot of > variance over trials. Therefore we found it not to be very usefull > on real data, although conceptually and in the code it is correct. > > The idea behind singletrial=yes is that beamformer uses the average > covariance to construct the filter and applies it to the single > trial covariance/csd. The problem in the code however is that > beamformer would use the averaged covariance/csd to estimate the > power and not the single trial covariance/csd. The estimated single- > trial timecourse would be correct, but the power would not be > correct. Therefore I disabled that option in the code. > > The solution is something that you can do yourself in two > subsequent runs of sourceanalysis: you can do sourceanalysis on the > average (i.e. do not specify any of singletrial/rawtrial options) > and specify keepfilter=yes. That will give you the filter, computed > on the average covariance. Subsequently do cfg.grid=source2grid > (source), and use the resulting grid (including the filters) in the > second run of sourceanalysis, in which you specify > cfg.rawtrial=yes. In the second run, the previous (based on average > covariance) filters will be applied to the unaveraged data, > resulting in the desired single-trial power and dipole moment. > > best regards, > Robert From cgra05 at HST.AUC.DK Wed May 24 12:29:44 2006 From: cgra05 at HST.AUC.DK (Carina Graversen) Date: Wed, 24 May 2006 12:29:44 +0200 Subject: multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: <000001c67f03$2d3ab750$902dae83@fcdonders.nl> Message-ID: Hi. I'm trying to use the Fieldtrip program to create a wavelet plot of my EEG data. I have used it previously for 64 channel recordings, but now I'm working with 128 channels of data, which is causing me some problems. The only thing I have changed is the command: cfg8.layout = 'biosemi128.lay'; But now the figure only outputs a grey page with no Time-Frequency distributions at all. Can anyone tell me what I'm doing wrong - below is a complete list of all the commands I use :o). Best Regards, Carina Graversen % ************************************************************************* % EVENTRELATEDAVERAGING % ************************************************************************* cfg1 = []; % empty configuration cfg1.datafile = 'test128.eeg'; % 128 channel Neuroscan eeg file cfg1.headerfile = 'test128.eeg'; cfg1.channel = 'all'; dataFIC = preprocessing(cfg1); % Preprocess! cfg2 = []; % empty configuration avgFIC = timelockanalysis(cfg2, dataFIC); % % ************************************************************************* % % WAVELET % % ************************************************************************* cfg7 = []; cfg7.output = 'pow'; cfg7.method = 'wltconvol' cfg7.foi = 1:2:30; cfg7.t_ftimwin = 5./cfg7.foi; cfg7.tapsmofrq = 0.4 *cfg7.foi; cfg7.toi = 0:0.01:0.5; TFRmult = freqanalysis(cfg7, avgFIC); cfg8 = []; cfg8.baseline = [-0.5 0.5]; cfg8.xlim = [0 0.5] cfg8.zlim = [-3e-27 0.2]; cfg8.showlabels = 'yes'; cfg8.layout = 'biosemi128.lay'; multiplotTFR(cfg8, TFRmult); From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed May 24 13:26:35 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 24 May 2006 13:26:35 +0200 Subject: multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: Message-ID: Hi Carina, I think it could be caused by your baseline Your trials are from 0 to 0.5 seconds cfg7.toi = 0:0.01:0.5; And your baseline is from -0.5 to 0.5 seconds cfg8.baseline = [-0.5 0.5]; The baseline shouldn't be the whole trial. But I'm not totally sure that this is the problem, since you describe that the output is only a grey page. Does matlab give an error message? Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Carina Graversen Sent: Wednesday, May 24, 2006 12:30 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi. I'm trying to use the Fieldtrip program to create a wavelet plot of my EEG data. I have used it previously for 64 channel recordings, but now I'm working with 128 channels of data, which is causing me some problems. The only thing I have changed is the command: cfg8.layout = 'biosemi128.lay'; But now the figure only outputs a grey page with no Time-Frequency distributions at all. Can anyone tell me what I'm doing wrong - below is a complete list of all the commands I use :o). Best Regards, Carina Graversen % ************************************************************************* % EVENTRELATEDAVERAGING % ************************************************************************* cfg1 = []; % empty configuration cfg1.datafile = 'test128.eeg'; % 128 channel Neuroscan eeg file cfg1.headerfile = 'test128.eeg'; cfg1.channel = 'all'; dataFIC = preprocessing(cfg1); % Preprocess! cfg2 = []; % empty configuration avgFIC = timelockanalysis(cfg2, dataFIC); % % ************************************************************************* % % WAVELET % % ************************************************************************* cfg7 = []; cfg7.output = 'pow'; cfg7.method = 'wltconvol' cfg7.foi = 1:2:30; cfg7.t_ftimwin = 5./cfg7.foi; cfg7.tapsmofrq = 0.4 *cfg7.foi; cfg7.toi = 0:0.01:0.5; TFRmult = freqanalysis(cfg7, avgFIC); cfg8 = []; cfg8.baseline = [-0.5 0.5]; cfg8.xlim = [0 0.5] cfg8.zlim = [-3e-27 0.2]; cfg8.showlabels = 'yes'; cfg8.layout = 'biosemi128.lay'; multiplotTFR(cfg8, TFRmult); From olga at GRAPHICMIND.INFO Wed May 24 17:44:29 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Wed, 24 May 2006 19:44:29 +0400 Subject: clusterrandomization on 3D-data within-subject Message-ID: Dear List member, Sorry for such dull questions but, I am again facing the new problems with Fieldtrip, although did not solve some previous one (still can not singleplot and multiplot anything 'cause of "unknown zparam field". OK, about new one :-) It seems that I did not use write the timelockgranaveraging. The problem must be here, when I made grand averaging of all my 11 subject data cfg =[]; cfg.keepindividual = 'yes' C_vc11 = timelockgrandaverage(cfg,vc_c_avg1,vc_c_avg2,vc_c_avg3,vc_c_avg4,vc_c_avg5, vc_c_avg6,vc_c_avg7,vc_c_avg8,vc_c_avg9,vc_c_avg10,vc_c_avg11 ); As I understand the vc_c_avg11.avg([9],[43]) should be similar with C_vc11.individual ([11], [9], [43]) But it is not. What can it be? Best Regards, Olga. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 4:34 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari ---------------------------------------------------------------------------- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed May 24 18:45:49 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 24 May 2006 18:45:49 +0200 Subject: clusterrandomization on 3D-data within-subject In-Reply-To: <001501c67f48$f1f18cf0$51210ad9@olga> Message-ID: Hi Olga, About the z-param: This is the field that contains the data to be plotted; for instance 'avg', 'powspctrm' or 'cohspctrm'. Normally the function looks in your data.dimord to find out which z-param to use. To make the function work you could give cfg.zparam = 'avg' (for instance if you want to plot an ERF/ERP). But if you could send me what the dimord field of the data that you want to plot is, I could look why the plot functions don't extract the correct zparam themselves. About the timelockgranaveraging: I also think it should be the same. I have no idea what it could be. Good luck, Ingrid Nieuwenhuis _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Wednesday, May 24, 2006 5:44 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear List member, Sorry for such dull questions but, I am again facing the new problems with Fieldtrip, although did not solve some previous one (still can not singleplot and multiplot anything 'cause of "unknown zparam field". OK, about new one :-) It seems that I did not use write the timelockgranaveraging. The problem must be here, when I made grand averaging of all my 11 subject data cfg =[]; cfg.keepindividual = 'yes' C_vc11 = timelockgrandaverage(cfg,vc_c_avg1,vc_c_avg2,vc_c_avg3,vc_c_avg4,vc_c_avg5, vc_c_avg6,vc_c_avg7,vc_c_avg8,vc_c_avg9,vc_c_avg10,vc_c_avg11 ); As I understand the vc_c_avg11.avg([9],[43]) should be similar with C_vc11.individual ([11], [9], [43]) But it is not. What can it be? Best Regards, Olga. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 4:34 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marie at PSY.GLA.AC.UK Wed May 24 19:27:06 2006 From: marie at PSY.GLA.AC.UK (Marie Smith) Date: Wed, 24 May 2006 18:27:06 +0100 Subject: Beamformer time course In-Reply-To: <000001c67f03$2d3ab750$902dae83@fcdonders.nl> Message-ID: Hi, Thanks for the pointer to the earlier discussion, unfortunately it does not answer my question. I had assumed that the dics filters were output for a fixed dipole orientation (that which maximizes filter output) - hence i was expecting to have a 1 dimensional set of filter weights with which to compute a time series (cf. a virtual channel). I am unsure how to interpret the three time series resulting from multiplying the 3D filter with the time series. Does this mean the orientation could change trial per trial and time point per time point? Does this mean that for calculations involving the time course (e.g. synchrony) that you only use the amplitude, disregarding the orientation? Thanks, Marie On 24 May 2006, at 08:25, Jan Mathijs Schoffelen wrote: > Dear Marie, > > Please have a look in the discussion's list archive. A question > very similar > to yours has been answered: see the archive of May 2006, and follow > the link > "source reconstruction". The discussion's list archive can be > reached from > the website. > > > Yours, > > Jan-Mathijs > > The dimensionality of the filter is a 3xN-matrix, with N the number of > sensors. The "3" corresponds with the x,y,z direction in space. In > other > words: multiplying your data with the filter results in a 3xT > (number of > time points) matrix, which represents a dipole's activity in 3-D > space. > > > > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] > On Behalf > Of Marie Smith > Sent: Tuesday, May 23, 2006 7:47 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] Beamformer time course > > Hi, > > Thanks again for all your help with my questions so far, it has been > very useful. > > As an alternative method to determining the time course of > activation, I planned to use the filter as output from sourceanalysis > directly with the time locked data set. > However I am unsure what the three dimensions of the filter are. > Could you please clarify this for me. > > Thanks > > Marie > > > > > On 23 May 2006, at 11:12, Robert Oostenveld wrote: > >> Hi Marie, >> >> On 22 May 2006, at 17:18, Marie Smith wrote: >>> I have been trying out the various methods as discussed and have >>> come across a problem. >>> >>> When I select cfg.singletrials = 'yes' I get a number of error >>> messages saying >>> error('this option contains a bug, and is therefore not supported >>> at the moment'); >>> >>> I am using the toolbox fieldtrip-20060516. >>> >>> I noticed however, if I select cfg.rawtrials = 'yes' the function >>> will run. >> >> I recall disabling this functionality, since it was rarely used and >> since I was concerned that it would not be correct. I now had a >> more detailled look at the code. >> >> If you do rawtrial=yes, beamformer uses the single-trial covariance >> to construct the filter and also applies it to the single trial >> covariance/csd. That results in a very poorly estimated filter in >> each trial, hence projecting large amounts of noise and a lot of >> variance over trials. Therefore we found it not to be very usefull >> on real data, although conceptually and in the code it is correct. >> >> The idea behind singletrial=yes is that beamformer uses the average >> covariance to construct the filter and applies it to the single >> trial covariance/csd. The problem in the code however is that >> beamformer would use the averaged covariance/csd to estimate the >> power and not the single trial covariance/csd. The estimated single- >> trial timecourse would be correct, but the power would not be >> correct. Therefore I disabled that option in the code. >> >> The solution is something that you can do yourself in two >> subsequent runs of sourceanalysis: you can do sourceanalysis on the >> average (i.e. do not specify any of singletrial/rawtrial options) >> and specify keepfilter=yes. That will give you the filter, computed >> on the average covariance. Subsequently do cfg.grid=source2grid >> (source), and use the resulting grid (including the filters) in the >> second run of sourceanalysis, in which you specify >> cfg.rawtrial=yes. In the second run, the previous (based on average >> covariance) filters will be applied to the unaveraged data, >> resulting in the desired single-trial power and dipole moment. >> >> best regards, >> Robert From r.oostenveld at FCDONDERS.RU.NL Wed May 24 20:26:43 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 May 2006 20:26:43 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: On 23 May 2006, at 17:09, Marie Smith wrote: > I have tried the analysis as you suggest and although the analysis > appears to run I cannot find the single trial time courses in the > outcome of the second run of sourceanalysis. Hi Marie, Please try following demo, in which you have to replace the res4 and hdm file with some that you have on your disk. % read some data that is required to simulate MEG data, i.e. volume model, % sensor positions and MRI (optional, only for plotting) vol = read_ctf_hdm('test_RO_005/Subject01.hdm'); hdr = read_fcdc_header('test_RO_005/Subject01.ds/Subject01.res4'); grad = hdr.grad; % construct the simulated MEG data cfg = []; cfg.vol = vol; cfg.grad = grad; cfg.fsample = 300; cfg.ntrials = 30; cfg.triallength = 1; cfg.dip.pos = [0 7 8]; cfg.dip.mom = [1 0 0]; cfg.dip.signal = sin(2*pi*10*(1:cfg.fsample)./cfg.fsample); cfg.absnoise = 1e-8; rawA = dipolesimulation(cfg); % compute ERF and covariance cfg = []; cfg.keeptrials = 'yes'; cfg.covariance = 'yes'; avgA = timelockanalysis(cfg, rawA); % test each of the resampling strategies for LCMV cfg = []; cfg.method = 'lcmv'; cfg.lambda = 0; cfg.resolution = 4; cfg.hdmfile = 'test_RO_005/Subject01.hdm'; cfg.feedback = 'no'; cfg.keepfilter = 'yes'; source1 = sourceanalysis(cfg, avgA); cfg.grid = source2grid(source1); cfg.rawtrial = 'yes'; source2 = sourceanalysis(cfg, avgA); If you look in source2, you will see >> source2.trial ans = 1x30 struct array with fields: pow mom noise filter Each source2.trial(i).mom contain the virtual channel outputs in trial i for each of the grid locations, i.e. plot(source2.trial(2).mom{source2.inside(1)}') will plot the x, y, and z components of the dipole moment in the first trial and on the first dipole location of the grid inside the brain. > Also, for information I am having some problems using the compiled > mex files with matlab 7 under unix. which unix? best Robert From r.oostenveld at FCDONDERS.RU.NL Wed May 24 20:52:26 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 May 2006 20:52:26 +0200 Subject: Beamformer time course In-Reply-To: Message-ID: On 24 May 2006, at 19:27, Marie Smith wrote: > Thanks for the pointer to the earlier discussion, unfortunately it > does not answer my question. > I had assumed that the dics filters were output for a fixed dipole > orientation (that which maximizes filter output) - hence i was > expecting to have a 1 dimensional set of filter weights with which > to compute a time series (cf. a virtual channel). > I am unsure how to interpret the three time series resulting from > multiplying the 3D filter with the time series. Does this mean the > orientation could change trial per trial and time point per time > point? yes, for each trial you could estimate a different maximal orientation from the 3xNtime matrix. See beow. > Does this mean that for calculations involving the time course > (e.g. synchrony) that you only use the amplitude, disregarding the > orientation? The CTF-SAM algorithm internally optimizes the orientation with a non- linear fit, while in the LCMV algorithm you can optimize the orientation afterwards using the linear PCA approach described below. The results will be slighly different. The published DICS algorithm does not specify how to operate in single trial mode, but basically the DICS corresponds to a complex version of LCMV without timecourses (since frequency domain). If you are only interested in the dipole moment along the most dominant direction (i.e the direction with the largest power, you can do a PCA with [u,s,v] = svd(source2.trial(1).mom{source2.inside(1)}); and use the first column of v multiplied by s(1,1), which gives the timecourse of the orthogonal component with the most variance, i.e. power. The orientation itself is in u(:,1). If you want to determine the orientation with the maximal power over all trials, you would have to concatenate all single trial dipole moments into one large 3x (Ntrials*Ntime) matrix and do the pca/svd on that. Regarding dipole orientations: note that we typically find better results if we restrict the MEG forward model to contain only the two tangential dipole components, which is achieved by precomputing the leadfields (prepare_leadfield) with the option cfg.reducerank=2. The dipole model is still represented in three carthesian directions, but the leadfield (and the filter and projected data) have rank 2, i.e. there is one orientation in which the dipole is silent. Reducing the rank of the forward model to two removes the most silent dipole orientation (i.e. the radial orientation), which is also the orientation along which the beamformer is most sensitive for picking up noise. Note that if you use a single-sphere mode, the radial component is already completely zero, for a multisphere model it is not zero, but small (there will always be a sphere in which the orientation is not radial). best Robert From r.oostenveld at FCDONDERS.RU.NL Wed May 24 20:57:21 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Wed, 24 May 2006 20:57:21 +0200 Subject: multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: Message-ID: Hi Carina Are you sure that the biosemi 128ch layout corresponds with your electrode layout? Open the layout file in a tetx editor and look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting I suggest that you try the elec1010.lay or elec1005.lay, or even better, that you construct your own layout file corresponding with your own electrode locations. Robert On 24 May 2006, at 12:29, Carina Graversen wrote: > Hi. > > I'm trying to use the Fieldtrip program to create a wavelet plot of > my EEG > data. > > I have used it previously for 64 channel recordings, but now I'm > working > with 128 channels of data, which is causing me some problems. The > only thing > I have changed is the command: > cfg8.layout = 'biosemi128.lay'; > > But now the figure only outputs a grey page with no Time-Frequency > distributions at all. > > Can anyone tell me what I'm doing wrong - below is a complete list > of all > the commands I use :o). > > Best Regards, > Carina Graversen > > > > > % > ********************************************************************** > *** > % EVENTRELATEDAVERAGING > % > ********************************************************************** > *** > cfg1 = []; % empty > configuration > cfg1.datafile = 'test128.eeg'; % > 128 channel > Neuroscan eeg file > cfg1.headerfile = 'test128.eeg'; > cfg1.channel = 'all'; > > dataFIC = preprocessing(cfg1); % > Preprocess! > > cfg2 = []; % empty > configuration > > avgFIC = timelockanalysis(cfg2, dataFIC); > > > % % > ********************************************************************** > *** > % % WAVELET > % % > ********************************************************************** > *** > cfg7 = []; > cfg7.output = 'pow'; > cfg7.method = 'wltconvol' > cfg7.foi = 1:2:30; > cfg7.t_ftimwin = 5./cfg7.foi; > cfg7.tapsmofrq = 0.4 *cfg7.foi; > cfg7.toi = 0:0.01:0.5; > > TFRmult = freqanalysis(cfg7, avgFIC); > > cfg8 = []; > cfg8.baseline = [-0.5 0.5]; > cfg8.xlim = [0 0.5] > cfg8.zlim = [-3e-27 0.2]; > cfg8.showlabels = 'yes'; > cfg8.layout = 'biosemi128.lay'; > > multiplotTFR(cfg8, TFRmult); > From stephan.bickel at ANATOM.UNIZH.CH Thu May 25 20:30:50 2006 From: stephan.bickel at ANATOM.UNIZH.CH (Stephan Bickel) Date: Thu, 25 May 2006 20:30:50 +0200 Subject: clusterrand electrode neighbours Message-ID: Hi, I try to apply clusterrandanalysis to time-frequency data I exported from BESA.But I seem to have a problem with the specifications of neighbouring electrodes. After applying clusterrandanalysis I get several significant clusters in the same time-frequency range in neighbouring electrodes, i.e. one cluster for each electrode in that range. I assumed that they should be collected to one one cluster if the effect is in the same range and region? Here is what I tried: elec = read_fcdc_elec('27mtg.sfp'); % the exported BESA coordinates cfg=[]; cfg.statistic = 'depsamplesT'; cfg.alphathresh = 0.05; cfg.makeclusters = 'yes'; cfg.clusterteststat = 'maxsum'; cfg.onetwo = 'twosided'; cfg.alpha = 0.05; cfg.nranddraws = 1000; cfg.channel = 'all'; cfg.neighbourdist = 0.04; % I also tried 0.05 with the same result cfg.latency = 'all'; cfg.elec = elec; [stat] = clusterrandanalysis(cfg,fileB,fileA); I also tried the analysis with manually defined neighbours, but received the same result. I attached the elec variable with the coordinates. Thank you very much for your help, Stephan From maris at NICI.RU.NL Thu May 25 21:09:11 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Thu, 25 May 2006 21:09:11 +0200 Subject: clusterrand electrode neighbours Message-ID: Hi Stephan, > After applying clusterrandanalysis I get several significant clusters in > the > same time-frequency range in neighbouring electrodes, i.e. one cluster for > each electrode in that range. I assumed that they should be collected to > one > one cluster if the effect is in the same range and region? Two (channel,time,frequency)-triplets with the same time and frequency values and neighbouring electrodes must belong to the same cluster (if their T-statistics exceed cfg.alphathresh, of course). > > Here is what I tried: > > elec = read_fcdc_elec('27mtg.sfp'); % the exported BESA coordinates > > cfg=[]; > cfg.statistic = 'depsamplesT'; > cfg.alphathresh = 0.05; > cfg.makeclusters = 'yes'; > cfg.clusterteststat = 'maxsum'; > cfg.onetwo = 'twosided'; > cfg.alpha = 0.05; > cfg.nranddraws = 1000; > cfg.channel = 'all'; > cfg.neighbourdist = 0.04; % I also tried 0.05 with the same > result > cfg.latency = 'all'; > cfg.elec = elec; > [stat] = clusterrandanalysis(cfg,fileB,fileA); > > I also tried the analysis with manually defined neighbours, but received > the > same result. > I attached the elec variable with the coordinates. I did not find the elec variable in the attachment. What is the dimension of the BESA coordinates? Is it centimeters? In that case, cfg.neighbourdist=0.04 is so small that no electrode will be selected as a neighbour. You could calculate the inter-electrode distances on the basis of their coordinates and use that information to determine cfg.neighbourdist. If that doesn´t help, you can send your cfg and data to maris at nici.ru.nl. I will have a look at it. greetings, Eric Maris From ingrid.nieuwenhuis at FCDONDERS.RU.NL Fri May 26 14:28:44 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 26 May 2006 14:28:44 +0200 Subject: multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: <81CAC428-2DEF-4066-B850-733FA9A1BC28@fcdonders.ru.nl> Message-ID: Hi Carina, Thanks for sending me the data. Indeed the biosemi 128ch layout doesn't correspond to your layout. You have 128 channels labeled from 1 to 128. If you open biosemi128.lay in a text-editor you can see that this layout file has 150 channels labeled from A1 to P7. The labels in your data (TFRmult.label) and the labels in the layout file don't match, that's why you got an empty figure (I'll add an error in the plot function, so that when no labels match you'll get an error message in the future). So what you have to do now is to make your own layout file that matches the data; with the correct x and y coordinates of the 128 channels and the same label names as in your data. Just as an illustration I attached an adapted version of the biosemi128.lay file, with only the first 128 channels, and labels 1 to 128, just as in your data. With the following configuration: cfg8 = []; cfg8.baseline = [0 0.1]; cfg8.xlim = [0 0.3] cfg8.ylim = [15 29]; cfg8.zlim = [-100 100]; cfg8.showlabels = 'yes'; cfg8.layout = 'testlay128.lay'; I got the attached figure from your data. Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Wednesday, May 24, 2006 8:57 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina Are you sure that the biosemi 128ch layout corresponds with your electrode layout? Open the layout file in a tetx editor and look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting I suggest that you try the elec1010.lay or elec1005.lay, or even better, that you construct your own layout file corresponding with your own electrode locations. Robert On 24 May 2006, at 12:29, Carina Graversen wrote: > Hi. > > I'm trying to use the Fieldtrip program to create a wavelet plot of > my EEG > data. > > I have used it previously for 64 channel recordings, but now I'm > working > with 128 channels of data, which is causing me some problems. The > only thing > I have changed is the command: > cfg8.layout = 'biosemi128.lay'; > > But now the figure only outputs a grey page with no Time-Frequency > distributions at all. > > Can anyone tell me what I'm doing wrong - below is a complete list > of all > the commands I use :o). > > Best Regards, > Carina Graversen > > > > > % > ********************************************************************** > *** > % EVENTRELATEDAVERAGING > % > ********************************************************************** > *** > cfg1 = []; % empty > configuration > cfg1.datafile = 'test128.eeg'; % > 128 channel > Neuroscan eeg file > cfg1.headerfile = 'test128.eeg'; > cfg1.channel = 'all'; > > dataFIC = preprocessing(cfg1); % > Preprocess! > > cfg2 = []; % empty > configuration > > avgFIC = timelockanalysis(cfg2, dataFIC); > > > % % > ********************************************************************** > *** > % % WAVELET > % % > ********************************************************************** > *** > cfg7 = []; > cfg7.output = 'pow'; > cfg7.method = 'wltconvol' > cfg7.foi = 1:2:30; > cfg7.t_ftimwin = 5./cfg7.foi; > cfg7.tapsmofrq = 0.4 *cfg7.foi; > cfg7.toi = 0:0.01:0.5; > > TFRmult = freqanalysis(cfg7, avgFIC); > > cfg8 = []; > cfg8.baseline = [-0.5 0.5]; > cfg8.xlim = [0 0.5] > cfg8.zlim = [-3e-27 0.2]; > cfg8.showlabels = 'yes'; > cfg8.layout = 'biosemi128.lay'; > > multiplotTFR(cfg8, TFRmult); > -------------- next part -------------- A non-text attachment was scrubbed... Name: figure.png Type: image/png Size: 20378 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: testlay128.lay Type: application/octet-stream Size: 5308 bytes Desc: not available URL: From olga at GRAPHICMIND.INFO Fri May 26 14:56:35 2006 From: olga at GRAPHICMIND.INFO (Olga Sysoeva) Date: Fri, 26 May 2006 16:56:35 +0400 Subject: and clusterrandomization Message-ID: Thank you very much Ingrid! I found the mistake and, moreover, I plot whotever I want :-) The problem was that when grandaveraging it changes the order of the electrode and the 9th channel it my original file no more corresponds with the 9th channel of the grand-average file! But if I add the link to my layout file there no problems with correct plotting of the results. But the problems is still in my clusterrandomization. Could the fact that the order of the channel in the file (C_vc11.label) is not the same as in the C_vc11.elec.label influences the result of clusterrandomization (I do not have my neigbouring channel file)? Best Regards, Olga. ----- Original Message ----- From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Wednesday, May 24, 2006 8:45 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Hi Olga, About the z-param: This is the field that contains the data to be plotted; for instance 'avg', 'powspctrm' or 'cohspctrm'. Normally the function looks in your data.dimord to find out which z-param to use. To make the function work you could give cfg.zparam = 'avg' (for instance if you want to plot an ERF/ERP). But if you could send me what the dimord field of the data that you want to plot is, I could look why the plot functions don't extract the correct zparam themselves. About the timelockgranaveraging: I also think it should be the same. I have no idea what it could be. Good luck, Ingrid Nieuwenhuis ------------------------------------------------------------------------------ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Wednesday, May 24, 2006 5:44 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear List member, Sorry for such dull questions but, I am again facing the new problems with Fieldtrip, although did not solve some previous one (still can not singleplot and multiplot anything 'cause of "unknown zparam field". OK, about new one :-) It seems that I did not use write the timelockgranaveraging. The problem must be here, when I made grand averaging of all my 11 subject data cfg =[]; cfg.keepindividual = 'yes' C_vc11 = timelockgrandaverage(cfg,vc_c_avg1,vc_c_avg2,vc_c_avg3,vc_c_avg4,vc_c_avg5, vc_c_avg6,vc_c_avg7,vc_c_avg8,vc_c_avg9,vc_c_avg10,vc_c_avg11 ); As I understand the vc_c_avg11.avg([9],[43]) should be similar with C_vc11.individual ([11], [9], [43]) But it is not. What can it be? Best Regards, Olga. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 4:34 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari -------------------------------------------------------------------------- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. -------------- next part -------------- An HTML attachment was scrubbed... URL: From maris at NICI.RU.NL Fri May 26 15:35:45 2006 From: maris at NICI.RU.NL (Eric Maris) Date: Fri, 26 May 2006 15:35:45 +0200 Subject: and clusterrandomization Message-ID: Dear Olga, But the problems is still in my clusterrandomization. Could the fact that the order of the channel in the file (C_vc11.label) is not the same as in the C_vc11.elec.label influences the result of clusterrandomization (I do not have my neigbouring channel file)? That should not matter. However, the labels in your data structure (.label in the output of timelockgrandaverage) should exactly match the labels in the elec-structure. If that is OK, then something might have gone wrong with the combination of the data of the different subjects. Do they all have the same elec-structure? If the same physical channel has different labels for different subjects, then this may create inconsistencies between EEGlab and Fieldtrip. For Fieldtrip, channels that have the same label are assumed to be physically identical, even if they are in different positions in the data structure. This is only a guess, of course. kind regards, Eric Maris Best Regards, Olga. ----- Original Message ----- From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Wednesday, May 24, 2006 8:45 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Hi Olga, About the z-param: This is the field that contains the data to be plotted; for instance 'avg', 'powspctrm' or 'cohspctrm'. Normally the function looks in your data.dimord to find out which z-param to use. To make the function work you could give cfg.zparam = 'avg' (for instance if you want to plot an ERF/ERP). But if you could send me what the dimord field of the data that you want to plot is, I could look why the plot functions don't extract the correct zparam themselves. About the timelockgranaveraging: I also think it should be the same. I have no idea what it could be. Good luck, Ingrid Nieuwenhuis ------------------------------------------------------------------------------ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Wednesday, May 24, 2006 5:44 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear List member, Sorry for such dull questions but, I am again facing the new problems with Fieldtrip, although did not solve some previous one (still can not singleplot and multiplot anything 'cause of "unknown zparam field". OK, about new one :-) It seems that I did not use write the timelockgranaveraging. The problem must be here, when I made grand averaging of all my 11 subject data cfg =[]; cfg.keepindividual = 'yes' C_vc11 = timelockgrandaverage(cfg,vc_c_avg1,vc_c_avg2,vc_c_avg3,vc_c_avg4,vc_c_avg5, vc_c_avg6,vc_c_avg7,vc_c_avg8,vc_c_avg9,vc_c_avg10,vc_c_avg11 ); As I understand the vc_c_avg11.avg([9],[43]) should be similar with C_vc11.individual ([11], [9], [43]) But it is not. What can it be? Best Regards, Olga. ----- Original Message ----- From: Olga Sysoeva To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 4:34 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Thank you very much, Lilla! Now I knwo what to do but faced the problem with " unknown zparam field" when ploting the results. Unfortunatly cfg.zparam does not discribed in help file... Best Regards, Olga ----- Original Message ----- From: Lilla Magyari To: FIELDTRIP at NIC.SURFNET.NL Sent: Saturday, May 13, 2006 3:11 PM Subject: Re: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear Olga, I am just studying time-frequency analysis but I have done already on my data, so perhaps I can help you. First, yes, you have to do freqanalysis on the preprocessed data of the individual subjects for all conditions that you want to compare (i.e. the input for this function contains all trials from one subject in one condition.) And it is also important that the other input for this function is the cfg where for example, in the cfg.method you have to specify what kind of time-frequency analysis you want to use. (You have to write 'wltconvol' for wavelet transformation and 'mltconvol' for multitaper analysis.) When you use freqanalysis as output you can get TFR for one subject in one condition (but it is also possible to keep the information for the individual trials of the condition by specifying cfg.keeptrials = 'yes'). When you have the TFRs for each subject you can grandaverage them with freqgrandaverage where the input is the TFRs of all subjects (and before averaging you can use also freqbaseline for giving a baseline for your TFRs). I hope it helps. Best regards, Lilla Magyari -------------------------------------------------------------------------- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Olga Sysoeva Sent: Saturday, May 13, 2006 9:28 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] clusterrandomization on 3D-data within-subject Dear list members, Thank you everybody for your help! I've already got interesting results using clusterrandomization on my data! Thanks a lot! Now I have a question about using the clusterrandomization on 3-D data (channel-time-frequency) in within-subject analysis. As I understand it is possible with Fieldtrip, but I really newby in time-frequency anlysis, therefore wanted your comments, as far as I didn't find the example of the application of clusteranalysis on this set of the data in tuturial. I successfully conduct the within-subject clusterrandomization on my grand-average data, which does not have the third, frequency demintion. Now I want to add it. But I could not apply freqanalyisis on grandavarage data, could I? Should I made the TFR of individual data and than grand-avarage the result? Which function should I use? Best Regards, Olga. From giosue.baggio at FCDONDERS.RU.NL Sun May 28 19:31:22 2006 From: giosue.baggio at FCDONDERS.RU.NL (Giosue Baggio) Date: Sun, 28 May 2006 19:31:22 +0200 Subject: eeg reref Message-ID: Hi all, I am working on some EEG data recorded using a left mastoid reference. I need to compute a linked mastoid reference using the additional TP10 channel. So I have added in my preprocessing settings file the following: cfg.reref = 'yes'; cfg.refchannel = 'TP10'; Does this really compute a linked mastoid reference? My doubts derive from the fact that in the final multiplots TP10 looks suspiciously flat or better empty. I wonder whether the above cfg settings just replaced my original TP10 with zeroes instead of computing the linkedm reference... Thanks. Giosue'. From giosue.baggio at FCDONDERS.RU.NL Sun May 28 20:49:06 2006 From: giosue.baggio at FCDONDERS.RU.NL (Giosue Baggio) Date: Sun, 28 May 2006 20:49:06 +0200 Subject: eeg reref Message-ID: After some thinking, another (perhaps more likely) possibility is that TP10 was also included in set of channels which now use TP10 as reference. This would explain why it looks flat. If so, is there a way to exclude it from reref? Thanks, g. From t.montez at VUMC.NL Mon May 29 01:16:58 2006 From: t.montez at VUMC.NL (Montez, T.) Date: Mon, 29 May 2006 01:16:58 +0200 Subject: eeglab2fieldtrip and planar Message-ID: Dear Fieldtrip experts, I am using EEGLAB to do artifact rejection with ICA. I export the file to fieldtrip with eeglab2fieldtrip, but I had to make some changes to be able to compute the planar transformation that you might want to include by default in the function: - transform to single trial - add the .grad - change data.label to column - change data.trial to double Best regards, Teresa Montez CODE: [ALLEEG EEG CURRENTSET ALLCOM] = eeglab; EEG = pop_loadset( 'filename', 'A004_ICA.set', 'filepath', 'E:\AD_Project\Results\'); [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG, 0 ); eeglab redraw; data = eeglab2fieldtrip( EEG, 'preprocessing' ); clear ALL* CURRENT* EEG LASTCOM STUDY cfg=[]; cfg.resamplefs = 125; data_125 = resampledata (cfg, data); clear data % transform to single trial data_125.trial2=[]; for i=1:37 data_125.trial2=[data_125.trial2 data_125.trial{i}]; end data_125.trial={data_125.trial2}; clear data_125.trial2 data_125.time={[0:1/125:30339*(1/125)]}; data_125.offset=[1]; % import .grad from another dataset cd E:\AD_Project\mca\Matlab\Controls\C002 load data_3_7 data_125.grad=data_3_7.grad; clear data_3_7 % data.label must be column data_125.label=data_125.label'; % data.trial must be double data_125.trial{1}=double(data_125.trial{1}); cfg=[]; cfg.repair = 'yes' cfg.badchannel = {'MLT22'}; data_rp=megrepair(cfg,data_125) clear data_125 cfg=[]; cfg.planar = 'yes' cfg.planarmethod = 'sincos'; data_p=megplanar(cfg,data_rp); clear data_rp save data_p data_p -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at FCDONDERS.RU.NL Mon May 29 09:39:02 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 29 May 2006 09:39:02 +0200 Subject: eeg reref In-Reply-To: <9dcbc65482b9.447a0cc2@ru.nl> Message-ID: Hi Giosue, With cfg.reref = 'yes'; cfg.refchannel = 'TP10'; you re-reference the data to TP10 only, i.e. TP10 will be the new reference channel by itself and therefore it is flat (all zeros). Assuming that TP9 is the other channel that you want to use, you should do cfg.reref = 'yes'; cfg.refchannel = {'TP9' 'TP10'}; to obtain the data referenced to linked mastoids. If TP9 is the actual reference channel that was used in the recording, and if you did not include TP9 in the recorded datafile, you should also specify cfg.implicitref = 'TP9' This will first add the channel TP9 to the data (which is all zeros, since it is referenced against itself) and subsequently it will use TP9+TP10 as the new reference. You can check afterwards: the sum of the potential in TP9 and TP10 should be zero. best Robert On 28 May 2006, at 20:49, Giosue Baggio wrote: > After some thinking, another (perhaps more likely) possibility is > that TP10 was also included in set of channels which now use TP10 > as reference. This would explain why it looks flat. If so, is there > a way to exclude it from reref? > > Thanks, > > g. > From r.oostenveld at FCDONDERS.RU.NL Mon May 29 09:49:50 2006 From: r.oostenveld at FCDONDERS.RU.NL (Robert Oostenveld) Date: Mon, 29 May 2006 09:49:50 +0200 Subject: eeglab2fieldtrip and planar In-Reply-To: <28FF6B8D22C94B44A55E4E1325A94AF2348037@vumc-mb02.vumc.nl> Message-ID: Hi Theresa, thanks for your suggestions. Let me comment on them > - transform to single trial That should not be neccessary. MEGPLANAR should be able to work on preprocessed data and on timelocked data (i.e. ERFs). If I am wrong, please let me know since it would indicate a bug. > - add the .grad The grad (complete gradiometer information) is not available in EEGLAB, therefore it cannot be added in EEGLAB2FIELDTRIP > - change data.label to column I will ensure that that is consistently done (throughout the FT code). > - change data.trial to double I think that whether that is neccessary depends on the Matlab version that you use, from version 7.0 onwards it should be possible to work with single precision, and the conversion would not be needed. What Matlab are you using? I can add the conversion in combination with a check for the matlab version (i.e. convert to double if version 6, not convert if version 7). best Robert From muthuraman10 at HOTMAIL.COM Mon May 29 16:00:52 2006 From: muthuraman10 at HOTMAIL.COM (Muthuraman Muthuraman) Date: Mon, 29 May 2006 14:00:52 +0000 Subject: query on coherence source analysis In-Reply-To: <5BAC967A-983F-42B4-ABFB-9298FA6B9737@fcdonders.ru.nl> Message-ID: Hello Thanks for the suggestions i have been trying to use the freqanalysis_mtmwelch which you have send to me in the previous mail i get a error when using this program i have attached all the statements in this mail please go through and tell me is there a problem in the specifications cfg=[]; cfg.output='powandcsd'; cfg.method='mtmwelch'; cfg.foi=1:2:30; numfoi = length(cfg.foi); cfg.taper='hanning'; cfg.t_ftimwin=zeros(1,numfoi); cfg.t_ftimwin(:)=0.5; cfg.channel=channelselection({'EEG' 'EMG2'},data.label); cfg.channelcmb={'EEG' 'EMG2'}; freq=freqanalysis(cfg,data); ??? Error using ==> freqanalysis_mtmwelch unexpected dimord Error in ==> freqanalysis at 187 [freq] = feval(sprintf('freqanalysis_%s',lower(cfg.method)), cfg, data); >From: Robert Oostenveld >Reply-To: FieldTrip discussion list >To: FIELDTRIP at NIC.SURFNET.NL >Subject: Re: [FIELDTRIP] query on coherence source analysis >Date: Tue, 23 May 2006 12:33:24 +0200 > >Dear Muthuraman > >At the Donders we usually use the multitaper method for computing the >cross spectral density, in freqanalysis that is cfg.method='mtmfft' or >'mtmconvol'. If you would use the mtmconvol method, you will get a >frequency decomposition for multiple sliding time windows (that can be >overlapping or not). If you then would average these frequency >decompositions over time, you have performed Welch's method. We already >implemented that in a function, see attached freqanalysis_mtmwelch (i.e. >it even allows you to combine multitapering and Welch). Add it to your >fieldtrip directory and specify cfg.method='mtmwelch' for freqanalysis. > >This new function is still rather poorly documented, and it does not have >default settings for most of the cfg options. Probably you will want >cfg.taper=hanning (i.e. no multitapering), in which case you do not have >to specify cfg.tapsmofrq. The function will use maximally overlapping >windows for Welch method (which takes a lot of memory). You should specify >the frequencies of interest (cfg.foi) and window length per frequency >(cfg.t_ftimwin). > >best >Robert > ><< freqanalysis_mtmwelch.m >> > > >On 22 May 2006, at 14:15, Muthuraman Muthuraman wrote: >>hello >> >>Thankyou for the previous suggestion >> >>I have gone through the article, in which for the 'DICS' algorthim it is >>mentioned that they use welch method to calculate the cross spectral >>density, for the freqanalysis program is there a cfg.method with welch to >>use it for the 'DICS'. >> >>I do not find the freqanalysis_mtmwelch >>I have the 20060131 version of fieltrip is it updated in the latest >>versions >> >>with regards >>muthu >> >> >>>From: Robert Oostenveld >>>Reply-To: FieldTrip discussion list >>>To: FIELDTRIP at NIC.SURFNET.NL >>>Subject: Re: [FIELDTRIP] query on coherence source analysis >>>Date: Tue, 2 May 2006 14:57:56 +0200 >>> >>>Dear Muthuraman >>> >>>Fieldtrip implements DICS in the SOURCEANALYSIS function. You can find >>>the literature reference to the DICS algorith on the page http:// >>>www2.ru.nl/fcdonders/fieldtrip/doku.php? >>>id=fieldtrip:documentation:references_to_implemented_methods >>> >>>best regards, >>>Robert >>> >>>On 2 May 2006, at 11:02, Muthuraman Muthuraman wrote: >>> >>>>Hello >>>> >>>>Thanks for the Previous suggestions >>>> >>>>i would like to know whether there is prescribed algorithm in >>>>Fieldtrip >>>>to calculate the coherent source analysis between the EEG and EMG >>>>data >>>> >>>>with regards >>>>muthuraman >>>> >> > From cgra05 at HST.AUC.DK Wed May 31 10:57:33 2006 From: cgra05 at HST.AUC.DK (Carina Graversen) Date: Wed, 31 May 2006 10:57:33 +0200 Subject: SV: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: <005f01c680bf$edb1a8f0$642dae83@fcdonders.nl> Message-ID: Hi Ingrid. Thanks a lot. I have tried to generate my own layout file in Neuroscan, but unfortunately it doesn't work. So I was wondering if you can tell me the format of the layout-file, because when I look at your file, 2 of the columns contain the same value for all channels. I have tried to generate for both cartesian and polor, but none of them matches. In the generated file I get the format: Can I change my input configuration to either use this format, or how should I change the format of the layout file ??? Thanks in advance :o) /Carina -----Oprindelig meddelelse----- Fra: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL]Pa vegne af Ingrid Nieuwenhuis Sendt: 26. maj 2006 13:29 Til: FIELDTRIP at NIC.SURFNET.NL Emne: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina, Thanks for sending me the data. Indeed the biosemi 128ch layout doesn't correspond to your layout. You have 128 channels labeled from 1 to 128. If you open biosemi128.lay in a text-editor you can see that this layout file has 150 channels labeled from A1 to P7. The labels in your data (TFRmult.label) and the labels in the layout file don't match, that's why you got an empty figure (I'll add an error in the plot function, so that when no labels match you'll get an error message in the future). So what you have to do now is to make your own layout file that matches the data; with the correct x and y coordinates of the 128 channels and the same label names as in your data. Just as an illustration I attached an adapted version of the biosemi128.lay file, with only the first 128 channels, and labels 1 to 128, just as in your data. With the following configuration: cfg8 = []; cfg8.baseline = [0 0.1]; cfg8.xlim = [0 0.3] cfg8.ylim = [15 29]; cfg8.zlim = [-100 100]; cfg8.showlabels = 'yes'; cfg8.layout = 'testlay128.lay'; I got the attached figure from your data. Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Wednesday, May 24, 2006 8:57 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina Are you sure that the biosemi 128ch layout corresponds with your electrode layout? Open the layout file in a tetx editor and look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting I suggest that you try the elec1010.lay or elec1005.lay, or even better, that you construct your own layout file corresponding with your own electrode locations. Robert On 24 May 2006, at 12:29, Carina Graversen wrote: > Hi. > > I'm trying to use the Fieldtrip program to create a wavelet plot of > my EEG > data. > > I have used it previously for 64 channel recordings, but now I'm > working > with 128 channels of data, which is causing me some problems. The > only thing > I have changed is the command: > cfg8.layout = 'biosemi128.lay'; > > But now the figure only outputs a grey page with no Time-Frequency > distributions at all. > > Can anyone tell me what I'm doing wrong - below is a complete list > of all > the commands I use :o). > > Best Regards, > Carina Graversen > > > > > % > ********************************************************************** > *** > % EVENTRELATEDAVERAGING > % > ********************************************************************** > *** > cfg1 = []; % empty > configuration > cfg1.datafile = 'test128.eeg'; % > 128 channel > Neuroscan eeg file > cfg1.headerfile = 'test128.eeg'; > cfg1.channel = 'all'; > > dataFIC = preprocessing(cfg1); % > Preprocess! > > cfg2 = []; % empty > configuration > > avgFIC = timelockanalysis(cfg2, dataFIC); > > > % % > ********************************************************************** > *** > % % WAVELET > % % > ********************************************************************** > *** > cfg7 = []; > cfg7.output = 'pow'; > cfg7.method = 'wltconvol' > cfg7.foi = 1:2:30; > cfg7.t_ftimwin = 5./cfg7.foi; > cfg7.tapsmofrq = 0.4 *cfg7.foi; > cfg7.toi = 0:0.01:0.5; > > TFRmult = freqanalysis(cfg7, avgFIC); > > cfg8 = []; > cfg8.baseline = [-0.5 0.5]; > cfg8.xlim = [0 0.5] > cfg8.zlim = [-3e-27 0.2]; > cfg8.showlabels = 'yes'; > cfg8.layout = 'biosemi128.lay'; > > multiplotTFR(cfg8, TFRmult); > From ingrid.nieuwenhuis at FCDONDERS.RU.NL Wed May 31 11:22:37 2006 From: ingrid.nieuwenhuis at FCDONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Wed, 31 May 2006 11:22:37 +0200 Subject: SV: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? In-Reply-To: Message-ID: Hi Carina, If you look at the FieldTrip page -> documentation -> frequently asked questions you can find the question (and answer): What is the format of the layout file, which is used for plotting? ...The 4th and 5th column specify the with and height of the subplot that will be made in multiplotER and multiplotTFR.... So the two columns with the same value for all channels are those columns. Bests, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Carina Graversen Sent: Wednesday, May 31, 2006 10:58 AM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] SV: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Ingrid. Thanks a lot. I have tried to generate my own layout file in Neuroscan, but unfortunately it doesn't work. So I was wondering if you can tell me the format of the layout-file, because when I look at your file, 2 of the columns contain the same value for all channels. I have tried to generate for both cartesian and polor, but none of them matches. In the generated file I get the format: Can I change my input configuration to either use this format, or how should I change the format of the layout file ??? Thanks in advance :o) /Carina -----Oprindelig meddelelse----- Fra: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL]Pa vegne af Ingrid Nieuwenhuis Sendt: 26. maj 2006 13:29 Til: FIELDTRIP at NIC.SURFNET.NL Emne: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina, Thanks for sending me the data. Indeed the biosemi 128ch layout doesn't correspond to your layout. You have 128 channels labeled from 1 to 128. If you open biosemi128.lay in a text-editor you can see that this layout file has 150 channels labeled from A1 to P7. The labels in your data (TFRmult.label) and the labels in the layout file don't match, that's why you got an empty figure (I'll add an error in the plot function, so that when no labels match you'll get an error message in the future). So what you have to do now is to make your own layout file that matches the data; with the correct x and y coordinates of the 128 channels and the same label names as in your data. Just as an illustration I attached an adapted version of the biosemi128.lay file, with only the first 128 channels, and labels 1 to 128, just as in your data. With the following configuration: cfg8 = []; cfg8.baseline = [0 0.1]; cfg8.xlim = [0 0.3] cfg8.ylim = [15 29]; cfg8.zlim = [-100 100]; cfg8.showlabels = 'yes'; cfg8.layout = 'testlay128.lay'; I got the attached figure from your data. Good luck, Ingrid -----Original Message----- From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Robert Oostenveld Sent: Wednesday, May 24, 2006 8:57 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: Re: [FIELDTRIP] multiplotTFR for 128 channel Neuroscan EEG data ??? Hi Carina Are you sure that the biosemi 128ch layout corresponds with your electrode layout? Open the layout file in a tetx editor and look at http://www2.ru.nl/fcdonders/fieldtrip/doku.php? id=fieldtrip:documentation:frequently_asked_questions#what_is_the_format _of_the_layout_file_which_is_used_for_plotting I suggest that you try the elec1010.lay or elec1005.lay, or even better, that you construct your own layout file corresponding with your own electrode locations. Robert On 24 May 2006, at 12:29, Carina Graversen wrote: > Hi. > > I'm trying to use the Fieldtrip program to create a wavelet plot of > my EEG > data. > > I have used it previously for 64 channel recordings, but now I'm > working > with 128 channels of data, which is causing me some problems. The > only thing > I have changed is the command: > cfg8.layout = 'biosemi128.lay'; > > But now the figure only outputs a grey page with no Time-Frequency > distributions at all. > > Can anyone tell me what I'm doing wrong - below is a complete list > of all > the commands I use :o). > > Best Regards, > Carina Graversen > > > > > % > ********************************************************************** > *** > % EVENTRELATEDAVERAGING > % > ********************************************************************** > *** > cfg1 = []; % empty > configuration > cfg1.datafile = 'test128.eeg'; % > 128 channel > Neuroscan eeg file > cfg1.headerfile = 'test128.eeg'; > cfg1.channel = 'all'; > > dataFIC = preprocessing(cfg1); % > Preprocess! > > cfg2 = []; % empty > configuration > > avgFIC = timelockanalysis(cfg2, dataFIC); > > > % % > ********************************************************************** > *** > % % WAVELET > % % > ********************************************************************** > *** > cfg7 = []; > cfg7.output = 'pow'; > cfg7.method = 'wltconvol' > cfg7.foi = 1:2:30; > cfg7.t_ftimwin = 5./cfg7.foi; > cfg7.tapsmofrq = 0.4 *cfg7.foi; > cfg7.toi = 0:0.01:0.5; > > TFRmult = freqanalysis(cfg7, avgFIC); > > cfg8 = []; > cfg8.baseline = [-0.5 0.5]; > cfg8.xlim = [0 0.5] > cfg8.zlim = [-3e-27 0.2]; > cfg8.showlabels = 'yes'; > cfg8.layout = 'biosemi128.lay'; > > multiplotTFR(cfg8, TFRmult); >