From omoniyi_s at yahoo.com Mon Oct 3 16:49:27 2011 From: omoniyi_s at yahoo.com (Omoniyi Segun) Date: Mon, 3 Oct 2011 07:49:27 -0700 (PDT) Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file In-Reply-To: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> References: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> Message-ID: <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> Hi, I am new to fieldtrip and have been struggling with it for the past four weeks. I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data. Secondly when i click on stop I get the error pasted below. ??? Reference to non-existent field 'dimord'. Error in ==> dimlength at 74       elseif strcmp(data.(fld), 'rpt_pos') Error in ==> fixsampleinfo at 31   ntrial = dimlength(data, 'rpt'); Error in ==> ft_checkdata at 579   data = fixsampleinfo(data); Error in ==> ft_rejectartifact at 203   data = ft_checkdata(data, 'hassampleinfo', 'yes'); Error in ==> do_reject_artifacts at 70 data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); Error in ==> do_preprocess at 45                 do_reject_artifacts(subject); I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data. Thanks Omoniyi Segun -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Oct 4 13:51:14 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 4 Oct 2011 06:51:14 -0500 Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file Message-ID: Omoniyi, I've never tried automatic artifact detection in FieldTrip but I remember when I tried visual artifact rejection on Neuroscan data, I had to change the Y scale of the plot to make the data show up (the scale that was necessary for my data was much different than the scale used in the tutorial, for whatever reason). Do you need to do artifact detection in FieldTrip rather than Neuroscan? To be honest, I found it more efficient to do the artifact rejection in Neuroscan and then import the data into FieldTrip for the more advanced processing. (But I don't have much experience with using FieldTrip for artifact rejection, so maybe someone else on the list will have more suggestions; also, I was only doing visual artifact rejection, so I don't know if there are differences between doing automatic rejection in Neuroscan versus FieldTrip.) Best, Steve Politzer-Ahles Message: 1 > Date: Mon, 3 Oct 2011 07:49:27 -0700 (PDT) > From: Omoniyi Segun > To: "fieldtrip at donders.ru.nl" > Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG > file > Message-ID: > <1317653367.73347.YahooMailNeo at web65905.mail.ac4.yahoo.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > > I am new to fieldtrip and have been struggling with it for the past four > weeks. > > > I am trying to do artifact detection using the Automatic Artifact detection > tutorial on the Site. The first issue I am having is when i set % make the > process interactive cfg.artfctdef.zvalue.interactive = 'yes'; > I see nothing in the figure that is plotted. I see the data plotted when i > use the sample data provided but not when i use my Neuroscan EEG data. > > Secondly when i click on stop I get the error pasted below. > > > > ??? Reference to non-existent field 'dimord'. > > Error in ==> dimlength at 74 > ????? elseif strcmp(data.(fld), 'rpt_pos') > > Error in ==> fixsampleinfo at 31 > ? ntrial = dimlength(data, 'rpt'); > > Error in ==> ft_checkdata at 579 > ? data = fixsampleinfo(data); > > Error in ==> ft_rejectartifact at 203 > ? data = ft_checkdata(data, 'hassampleinfo', 'yes'); > > Error in ==> do_reject_artifacts at 70 > data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); > > Error in ==> do_preprocess at 45 > ??????????????? do_reject_artifacts(subject); > > I am comfortable making changes to the code and would like some pointers in > the right direction. I am not sure if this is an issue with Neuroscan data. > > Thanks > > Omoniyi Segun > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111003/92cac66d/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 11, Issue 2 > **************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Oct 4 14:15:23 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 4 Oct 2011 14:15:23 +0200 Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file In-Reply-To: <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> References: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> Message-ID: Hi Omoniyi, What kind of data are you passing to the function? BW, JM On Oct 3, 2011, at 4:49 PM, Omoniyi Segun wrote: > Hi, > > I am new to fieldtrip and have been struggling with it for the past four weeks. > > I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data. > > Secondly when i click on stop I get the error pasted below. > > > > ??? Reference to non-existent field 'dimord'. > > Error in ==> dimlength at 74 > elseif strcmp(data.(fld), 'rpt_pos') > > Error in ==> fixsampleinfo at 31 > ntrial = dimlength(data, 'rpt'); > > Error in ==> ft_checkdata at 579 > data = fixsampleinfo(data); > > Error in ==> ft_rejectartifact at 203 > data = ft_checkdata(data, 'hassampleinfo', 'yes'); > > Error in ==> do_reject_artifacts at 70 > data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); > > Error in ==> do_preprocess at 45 > do_reject_artifacts(subject); > > I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data. > > Thanks > > Omoniyi Segun > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Lam at donders.ru.nl Tue Oct 4 14:51:29 2011 From: K.Lam at donders.ru.nl (Kevin Lam) Date: Tue, 04 Oct 2011 14:51:29 +0200 Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or gradiometers specified Message-ID: <4E8B0151.4060109@donders.ru.nl> Hi all, I recorded EEG using BrainVision Recorder and have analyzed the data (ERP and TFR). Now, I would like to determine the source of the TFR effects. (I've been following, more or less, this procedure: http://fieldtrip.fcdonders.nl/tutorial/beamformer) I'm having trouble executing ft_prepare_leadfield. Here's what I've done in the preceding steps, per participant: - ft_redefinetrial to specify the time of interest for each of the two conditions - ft_freqanalysis to calculate CSD matrix per the freq of interest for each condition - ft_volumesegment using 'spm' for coordsys - ft_prepare_headmodel using 'singlesphere' for method Now, when I attempt ft_prepare_leadfield, I get an error saying 'no electrodes or gradiometers specified'. I understand what the function needs, but I don't have the input file it's asking for. It's not the .lay file - I gave this a try. Please advise. Thanks in advance! Regards, Kevin From drivolta81 at gmail.com Tue Oct 4 15:05:10 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 4 Oct 2011 15:05:10 +0200 Subject: [FieldTrip] power line filter Message-ID: Dear all, I am trying to get rid of the power line noise. I use the dftfilter as indicated on the website. This works very well for most of the subjects. However, for some of them, I still get the noise. My trials have a different lenght: between 500 ms until 3 seconds. This is the script I used. filterfreqs = [49:1:51 99:1:101 149:1:151]; cfg.dftfilter = 'yes'; cfg.dftfreq = filterfreqs; cfg.padding = 10; dataprepro_syn = ft_preprocessing(cfg); The pad of 10 is the same as another already published study that used the same task. Attached is a picture of the problem (blu is baseline, red is stimulus). This is the result of multitepering (dpss). Thanks for your help, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: FMA14_power_spectra1.png Type: image/png Size: 12809 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Tue Oct 4 15:18:53 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 4 Oct 2011 15:18:53 +0200 Subject: [FieldTrip] power line filter In-Reply-To: References: Message-ID: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> Hi Davide, If you pad up to 10 seconds, you may change the filterfreqs into: filterfreqs = [49:0.1:51 99:0.1:101 149:0.1:151]. Notice the 0.1, rather than the 1. This is because a 10-second segment of data has an intrinsic frequency resolution of 0.1 Hz. Note that this may make the code rather slow to run. Wouldn't it more sensible then to use a bsfilter? Best, JM On Oct 4, 2011, at 3:05 PM, Davide Rivolta wrote: > > Dear all, > > I am trying to get rid of the power line noise. I use the dftfilter as indicated on the website. > > This works very well for most of the subjects. However, for some of them, I still get the noise. > > My trials have a different lenght: between 500 ms until 3 seconds. > > This is the script I used. > > > filterfreqs = [49:1:51 99:1:101 149:1:151]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = filterfreqs; > cfg.padding = 10; > > dataprepro_syn = ft_preprocessing(cfg); > > > The pad of 10 is the same as another already published study that used the same task. > > > Attached is a picture of the problem (blu is baseline, red is stimulus). This is the result of multitepering (dpss). > > > Thanks for your help, > > Davide > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Tue Oct 4 15:24:16 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 4 Oct 2011 15:24:16 +0200 Subject: [FieldTrip] power line filter In-Reply-To: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> References: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> Message-ID: Dear Jan-Mathijs, Thank you for your prompt reply. I will try out what you said. I could even try the bsfilter. I guess it makes sense. Thanks a lot for your help, Davide On Tue, Oct 4, 2011 at 3:18 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Davide, > > If you pad up to 10 seconds, you may change the filterfreqs into: > > filterfreqs = [49:0.1:51 99:0.1:101 149:0.1:151]. > > Notice the 0.1, rather than the 1. This is because a 10-second segment of > data has an intrinsic frequency resolution of 0.1 Hz. > > Note that this may make the code rather slow to run. Wouldn't it more > sensible then to use a bsfilter? > > Best, > > JM > > On Oct 4, 2011, at 3:05 PM, Davide Rivolta wrote: > > > Dear all, > > I am trying to get rid of the power line noise. I use the dftfilter as > indicated on the website. > > This works very well for most of the subjects. However, for some of them, I > still get the noise. > > My trials have a different lenght: between 500 ms until 3 seconds. > > This is the script I used. > > > filterfreqs = [49:1:51 99:1:101 149:1:151]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = filterfreqs; > cfg.padding = 10; > > dataprepro_syn = ft_preprocessing(cfg); > > > The pad of 10 is the same as another already published study that used the > same task. > > > Attached is a picture of the problem (blu is baseline, red is stimulus). > This is the result of multitepering (dpss). > > > Thanks for your help, > > Davide > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Oct 4 15:55:14 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 4 Oct 2011 08:55:14 -0500 Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or gradiometers specified Message-ID: Kevin, I'm not familiar with ft_prepare_leadfield, but in the past when I had similar electrode-related error messages I was able to resolve it by first running elec = ft_read_sens(filename, ...) and then adding elec to the data structure. I believe the file I used for ft_read_sens was a layout file I exported from EEGLAB. Best, Steve Politzer-Ahles Message: 3 > Date: Tue, 04 Oct 2011 14:51:29 +0200 > From: Kevin Lam > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or > gradiometers specified > Message-ID: <4E8B0151.4060109 at donders.ru.nl> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi all, > > I recorded EEG using BrainVision Recorder and have analyzed the data > (ERP and TFR). Now, I would like to determine the source of the TFR > effects. (I've been following, more or less, this procedure: > http://fieldtrip.fcdonders.nl/tutorial/beamformer) > > I'm having trouble executing ft_prepare_leadfield. Here's what I've done > in the preceding steps, per participant: > - ft_redefinetrial to specify the time of interest for each of the two > conditions > - ft_freqanalysis to calculate CSD matrix per the freq of interest for > each condition > - ft_volumesegment using 'spm' for coordsys > - ft_prepare_headmodel using 'singlesphere' for method > > Now, when I attempt ft_prepare_leadfield, I get an error saying 'no > electrodes or gradiometers specified'. I understand what the function > needs, but I don't have the input file it's asking for. It's not the > .lay file - I gave this a try. > > Please advise. Thanks in advance! > > Regards, > Kevin > > > ------------------------------ > > Message: 4 > Date: Tue, 4 Oct 2011 15:05:10 +0200 > From: Davide Rivolta > To: Email discussion list for the FieldTrip project > > Subject: [FieldTrip] power line filter > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear all, > > I am trying to get rid of the power line noise. I use the dftfilter as > indicated on the website. > > This works very well for most of the subjects. However, for some of them, I > still get the noise. > > My trials have a different lenght: between 500 ms until 3 seconds. > > This is the script I used. > > > filterfreqs = [49:1:51 99:1:101 149:1:151]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = filterfreqs; > cfg.padding = 10; > > dataprepro_syn = ft_preprocessing(cfg); > > > The pad of 10 is the same as another already published study that used the > same task. > > > Attached is a picture of the problem (blu is baseline, red is stimulus). > This is the result of multitepering (dpss). > > > Thanks for your help, > > Davide > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111004/1904c787/attachment.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: FMA14_power_spectra1.png > Type: image/png > Size: 12809 bytes > Desc: not available > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111004/1904c787/attachment.png > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 11, Issue 3 > **************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Oct 4 16:10:56 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 4 Oct 2011 16:10:56 +0200 Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or gradiometers specified In-Reply-To: References: Message-ID: Hi Kevin, Your data structure (the original one, the result from a call to ft_preprocessing) should have a .elec field already in it; I think you should be able to just copy that .elec field to whatever it is you are giving as input to ft_prepare_leadfield (e.g. freq.elec = data.elec;). (Disclaimer: I do not have any experience with ft_prepare_leadfield myself, but have heard of stuff related to this, so if I'm mistaken please correct me :) ) Best, Eelke 2011/10/4 Stephen Politzer-Ahles : > Kevin, > > I'm not familiar with ft_prepare_leadfield, but in the past when I had > similar electrode-related error messages I was able to resolve it by first > running > > elec = ft_read_sens(filename, ...) > > and then adding elec to the data structure. I believe the file I used for > ft_read_sens was a layout file I exported from EEGLAB. > > Best, > Steve Politzer-Ahles > >> Message: 3 >> Date: Tue, 04 Oct 2011 14:51:29 +0200 >> From: Kevin Lam >> To: fieldtrip at donders.ru.nl >> Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or >>        gradiometers    specified >> Message-ID: <4E8B0151.4060109 at donders.ru.nl> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> Hi all, >> >> I recorded EEG using BrainVision Recorder and have analyzed the data >> (ERP and TFR). Now, I would like to determine the source of the TFR >> effects. (I've been following, more or less, this procedure: >> http://fieldtrip.fcdonders.nl/tutorial/beamformer) >> >> I'm having trouble executing ft_prepare_leadfield. Here's what I've done >> in the preceding steps, per participant: >>  - ft_redefinetrial to specify the time of interest for each of the two >> conditions >>  - ft_freqanalysis to calculate CSD matrix per the freq of interest for >> each condition >>  - ft_volumesegment using 'spm' for coordsys >>  - ft_prepare_headmodel using 'singlesphere' for method >> >> Now, when I attempt ft_prepare_leadfield, I get an error saying 'no >> electrodes or gradiometers specified'. I understand what the function >> needs, but I don't have the input file it's asking for. It's not the >> .lay file - I gave this a try. >> >> Please advise. Thanks in advance! >> >> Regards, >> Kevin >> >> >> ------------------------------ >> >> Message: 4 >> Date: Tue, 4 Oct 2011 15:05:10 +0200 >> From: Davide Rivolta >> To: Email discussion list for the FieldTrip project >>         >> Subject: [FieldTrip] power line filter >> Message-ID: >> >>   >> Content-Type: text/plain; charset="iso-8859-1" >> >> Dear all, >> >> I am trying to get rid of the power line noise. I use the dftfilter as >> indicated on the website. >> >> This works very well for most of the subjects. However, for some of them, >> I >> still get the noise. >> >> My trials have a different lenght: between 500 ms until 3 seconds. >> >> This is the script I used. >> >> >>  filterfreqs = [49:1:51 99:1:101 149:1:151]; >> >>    cfg.dftfilter      =  'yes'; >>    cfg.dftfreq      = filterfreqs; >>    cfg.padding    = 10; >> >>    dataprepro_syn = ft_preprocessing(cfg); >> >> >> The pad of 10 is the same as another already published study that used the >> same task. >> >> >> Attached is a picture of the problem (blu is baseline, red is stimulus). >> This is the result of multitepering (dpss). >> >> >> Thanks for your help, >> >> Davide >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: >> >> -------------- next part -------------- >> A non-text attachment was scrubbed... >> Name: FMA14_power_spectra1.png >> Type: image/png >> Size: 12809 bytes >> Desc: not available >> URL: >> >> >> ------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 11, Issue 3 >> **************************************** > > > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From luoj at mail.nih.gov Tue Oct 4 19:57:56 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Tue, 4 Oct 2011 13:57:56 -0400 Subject: [FieldTrip] delete triggers/event markers Message-ID: Thanks guys for your input below. I was able to do the deletion in 4D. Another thing emerging is: is it possible to delete an event marker or trigger? I assume I still need to do this in 4D. Do you happen to know what commands to use? Thanks, Jessie ________________________________________ From: Rojas, Don [Don.Rojas at ucdenver.edu] Sent: Monday, September 26, 2011 10:59 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] creating new dataset Hi Jessie, If you wish to take a FieldTrip dataset back to the native 4D format, then it will not be trivial, but if you have the original data in 4D format, there is a potential solution in Eugene Kronberg's pdf4D matlab object code: http://biomag.wikidot.com/msi-matlab If you do not have the native 4D data, this will not work. Look at the duplicate and write_data_block methods. However, note that if you do duplicate the dataset, it will expect there to be as many channels in the new dataset as in the original. You would then have to delete those channels in the 4D MSI software using the deleter command. Or, alternatively, if you have a working copy of the MSI software, you can delete the channels in the original dataset within 4D, then use the duplicate method on that file, then write your data back to it using the write_data_block method. Feel free to contact me off list if you have questions. Best, Don On Sep 26, 2011, at 8:26 AM, jan-mathijs schoffelen wrote: Hi Jessie, FieldTrip is not able to write back into the native 4D neuroimaging format. If you want to create a new dataset, you need to have a look at the software which is provided by the 4D neuroimaging company. Your requested functionality may either be a feature of one of the applications, or may be implemented in one of the command line utilities. You may want to look in the software documentation for this. Best wishes, Jan-Mathijs On Sep 26, 2011, at 4:11 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Thanks for your answer Jörn . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... Jessie ________________________________________ From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] Sent: Sunday, September 25, 2011 4:09 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] creating new dataset Hi Jessie, not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: You can also exclude channels or channel groups using the following syntax {'all', '-POz', '-Fp1', -EOG'} >From ft_preprocessing: If you are calling FT_PREPROCESSING with also the second input argument "data", then that should contain data that was already read from file in a previous call to FT_PREPROCESSING. In that case only the configuration options below apply. The channels that will be read and/or preprocessed are specified with cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), see FT_CHANNELSELECTION for details You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. Hope this all helps to what you are up to! Best, Jörn On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Hi, If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). Thanks, Jessie _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 From drivolta81 at gmail.com Wed Oct 5 10:03:37 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Wed, 5 Oct 2011 10:03:37 +0200 Subject: [FieldTrip] power line filter In-Reply-To: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> References: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> Message-ID: Dear Jan-Mathijs, Attached is the picture of a subject where I applied you advice. As you can see the problem is still there. Maybe I can solve it by changing the filter order (I am using defaults values). However I am thinking to use a band stop filter. Thanks, Davide On Tue, Oct 4, 2011 at 3:18 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Davide, > > If you pad up to 10 seconds, you may change the filterfreqs into: > > filterfreqs = [49:0.1:51 99:0.1:101 149:0.1:151]. > > Notice the 0.1, rather than the 1. This is because a 10-second segment of > data has an intrinsic frequency resolution of 0.1 Hz. > > Note that this may make the code rather slow to run. Wouldn't it more > sensible then to use a bsfilter? > > Best, > > JM > > On Oct 4, 2011, at 3:05 PM, Davide Rivolta wrote: > > > Dear all, > > I am trying to get rid of the power line noise. I use the dftfilter as > indicated on the website. > > This works very well for most of the subjects. However, for some of them, I > still get the noise. > > My trials have a different lenght: between 500 ms until 3 seconds. > > This is the script I used. > > > filterfreqs = [49:1:51 99:1:101 149:1:151]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = filterfreqs; > cfg.padding = 10; > > dataprepro_syn = ft_preprocessing(cfg); > > > The pad of 10 is the same as another already published study that used the > same task. > > > Attached is a picture of the problem (blu is baseline, red is stimulus). > This is the result of multitepering (dpss). > > > Thanks for your help, > > Davide > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: power_spectra1.png Type: image/png Size: 13305 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Wed Oct 5 15:23:04 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 5 Oct 2011 15:23:04 +0200 Subject: [FieldTrip] Fwd: ft_databrowser References: <4E8C5808.2090807@psych.ru.nl> Message-ID: <5709C371-9CC8-40D2-BD0F-D6BE8BE7F611@donders.ru.nl> Hi Vitória, What's exactly the error you obtain, and perhaps more importantly: which FieldTrip version are you using? There have been some changes in the past days which broke my earlier updates (which I tested rather extensively). By now, I ironed out some of these issues by reverting the most recent changes. The last fix was done yesterday, so I would like to hear back from you if the problem persists if you use an absolutely fresh version of the code. Then we can take it from there. Best wishes, Jan-Mathijs Begin forwarded message: > From: Vitória Magalhães Piai > Date: October 5, 2011 3:13:44 PM GMT+02:00 > To: jan.schoffelen at donders.ru.nl > Subject: Fwd: Re: ft_databrowser > > Beste Jan-Matthijs, > > Ik gebruik ft_databrowser om de componenten van ICA te bekijken. Sinds een recente wijziging > krijg ik een error erbij met > ft_prepare_layout at 263 > [data.grad] = fixsens(data.grad) > > als gevolg een error in ft_databrowser at 163 > cfg.layout... > > Wat moet ik nu anders doen zodat ik ft_databrowser op mijn normale manier kan gebruiken? > > Alvast bedankt, > vriendelijke groet, Vitória > > -------- Original Message -------- > Subject: Re: ft_databrowser > Date: Wed, 5 Oct 2011 14:54:29 +0200 > From: Eelke Spaak > To: r.vandermeij at donders.ru.nl > CC: Vitória Magalhães Piai > > Ha Vitoria, > > Inderdaad zijn er wat wijzigingen gedaan, maar ik weet er ook het > fijne niet van helaas. Volgens mij was Jan-Mathijs (Schoffelen) degene > die hiervoor verantwoordelijk was, maar dat weet ik niet zeker. > > Het is (ook voor eventuele toekomstige problemen) denk ik het > verstandigst als je even een mailtje naar de algemene FieldTrip-lijst > stuurt, fieldtrip at donders.ru.nl. Daar moet je wel eerst voor > registreren, instructies daarvoor staan op > http://fieldtrip.fcdonders.nl/discussion_list . > > Groeten, > Eelke > > 2011/10/5 Roemer van der Meij : > > Hey Vit, > > > > Er zijn recent wat wijzigingen gedaan in het de grad en elec structuur, > > Eelke, weet jij daar meer van? Ik heb het niet helemaal gevolgd. > > > > Groetjes, > > Roemer > > > > > > > > On 05-10-11 12:56, Vitória Magalhães Piai wrote: > > > > Hoi Roemer, Eelke, > > > > Ik gebruik ft_databrowser om de componenten van ICA te bekijken. Sinds een > > week krijg ik een error erbij met > > > > ft_prepare_layout at 263 > > [data.grad] = fixsens(data.grad) > > > > als gevolg een error in ft_databrowser at 163 > > cfg.layout... > > > > Ik zag dat jullie twee de laatste wijzigingen gedaan hebben aan die twee > > scripts. Wat is er nu anders waardoor ik ft_databrowser niet meer op mijn > > normale manier kan gebruiken? > > > > Ook voor volgende keer: bij wie moet ik eigenlijk met zulke vragen naar toe > > (of is het de bedoeling dat ik jullie daarmee kom vervelen)? :) > > > > Alvast bedankt, Vitória > > > > > > -- > > Roemer van der Meij M.Sc. > > PhD student > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognition > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > Tel: +31(0)24 3655932 > > E-mail: r.vandermeij at donders.ru.nl > > > Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Oct 5 16:21:44 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 5 Oct 2011 16:21:44 +0200 Subject: [FieldTrip] Fwd: ft_databrowser References: <4E8C5D32.6020709@psych.ru.nl> Message-ID: Hi Vitória, There was a typo in ft_prepare_layout. However, it still didn't work after fixing it. Using a specified layout in cfg.layout actually works fine for me. Best, Jan-Mathijs PS: it may be an idea to sign up for the discussion list Begin forwarded message: > From: Vitória Magalhães Piai > Date: October 5, 2011 3:35:46 PM GMT+02:00 > To: jan-mathijs schoffelen > Subject: Re: Fwd: ft_databrowser > > Hi Jan-Mathijs, > > I'm running my analyses on a mentat node, from /home/common/matlab/fieldtrip/ so probably the freshest version. > > I call ft_databrowser for an object obtained with ft_componentanalysis > My cfg has > viewmode 'component'; > continuous 'no'; > > The error > Attempt to reference field of non-struct array > > in ft_prepare_layout at 263 > in ft_databrowser at 163 > > The problem still persists. > Is this enough info for you to sort out what the problem is? > > Thanx, Vitória > > On 5-10-2011 15:23, jan-mathijs schoffelen wrote: >> >> Hi Vitória, >> >> What's exactly the error you obtain, and perhaps more importantly: which FieldTrip version are you using? There have been some changes in the past days which broke my earlier updates (which I tested rather extensively). By now, I ironed out some of these issues by reverting the most recent changes. The last fix was done yesterday, so I would like to hear back from you if the problem persists if you use an absolutely fresh version of the code. Then we can take it from there. >> >> Best wishes, >> >> Jan-Mathijs >> >> Begin forwarded message: >> >>> From: Vitória Magalhães Piai >>> Date: October 5, 2011 3:13:44 PM GMT+02:00 >>> To: jan.schoffelen at donders.ru.nl >>> Subject: Fwd: Re: ft_databrowser >>> >>> Beste Jan-Matthijs, >>> >>> Ik gebruik ft_databrowser om de componenten van ICA te bekijken. Sinds een recente wijziging >>> krijg ik een error erbij met >>> ft_prepare_layout at 263 >>> [data.grad] = fixsens(data.grad) >>> >>> als gevolg een error in ft_databrowser at 163 >>> cfg.layout... >>> >>> Wat moet ik nu anders doen zodat ik ft_databrowser op mijn normale manier kan gebruiken? >>> >>> Alvast bedankt, >>> vriendelijke groet, Vitória >>> >>> -------- Original Message -------- >>> Subject: Re: ft_databrowser >>> Date: Wed, 5 Oct 2011 14:54:29 +0200 >>> From: Eelke Spaak >>> To: r.vandermeij at donders.ru.nl >>> CC: Vitória Magalhães Piai >>> >>> Ha Vitoria, >>> >>> Inderdaad zijn er wat wijzigingen gedaan, maar ik weet er ook het >>> fijne niet van helaas. Volgens mij was Jan-Mathijs (Schoffelen) degene >>> die hiervoor verantwoordelijk was, maar dat weet ik niet zeker. >>> >>> Het is (ook voor eventuele toekomstige problemen) denk ik het >>> verstandigst als je even een mailtje naar de algemene FieldTrip-lijst >>> stuurt, fieldtrip at donders.ru.nl. Daar moet je wel eerst voor >>> registreren, instructies daarvoor staan op >>> http://fieldtrip.fcdonders.nl/discussion_list . >>> >>> Groeten, >>> Eelke >>> >>> 2011/10/5 Roemer van der Meij : >>> > Hey Vit, >>> > >>> > Er zijn recent wat wijzigingen gedaan in het de grad en elec structuur, >>> > Eelke, weet jij daar meer van? Ik heb het niet helemaal gevolgd. >>> > >>> > Groetjes, >>> > Roemer >>> > >>> > >>> > >>> > On 05-10-11 12:56, Vitória Magalhães Piai wrote: >>> > >>> > Hoi Roemer, Eelke, >>> > >>> > Ik gebruik ft_databrowser om de componenten van ICA te bekijken. Sinds een >>> > week krijg ik een error erbij met >>> > >>> > ft_prepare_layout at 263 >>> > [data.grad] = fixsens(data.grad) >>> > >>> > als gevolg een error in ft_databrowser at 163 >>> > cfg.layout... >>> > >>> > Ik zag dat jullie twee de laatste wijzigingen gedaan hebben aan die twee >>> > scripts. Wat is er nu anders waardoor ik ft_databrowser niet meer op mijn >>> > normale manier kan gebruiken? >>> > >>> > Ook voor volgende keer: bij wie moet ik eigenlijk met zulke vragen naar toe >>> > (of is het de bedoeling dat ik jullie daarmee kom vervelen)? :) >>> > >>> > Alvast bedankt, Vitória >>> > >>> > >>> > -- >>> > Roemer van der Meij M.Sc. >>> > PhD student >>> > Donders Institute for Brain, Cognition and Behaviour >>> > Centre for Cognition >>> > P.O. Box 9104 >>> > 6500 HE Nijmegen >>> > The Netherlands >>> > Tel: +31(0)24 3655932 >>> > E-mail: r.vandermeij at donders.ru.nl >>> > >>> >> >> Jan-Mathijs Schoffelen, MD PhD >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> > > -- > Vitória Piai > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognition > Radboud University Nijmegen > Montessorilaan 3 > 6525 HR Nijmegen > The Netherlands > > Email : V.piai at donders.ru.nl > Phone : +31 24 3612635 > Room : Spinoza building B.01.05 > www.vitoriapiai.com > > ** Please consider the environment - do you really need to print? ** Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From omoniyi_s at yahoo.com Wed Oct 5 16:46:42 2011 From: omoniyi_s at yahoo.com (Omoniyi Segun) Date: Wed, 5 Oct 2011 07:46:42 -0700 (PDT) Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file In-Reply-To: References: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> Message-ID: <1317826002.17170.YahooMailNeo@web65917.mail.ac4.yahoo.com> Thanks for your response. I am passing a 'subject' structure which contains the file location and file name to the do_reject_artifacts function which i wrote. Inside the function i have inserted the code I got from the tutorial. The structure is created in a do_preprocess function, i read all the files in a directory structure and create the subject stucture in this function. The files are Neuroscan .cnt files Thanks for your help Omoniyi Segun snippet from : do_preprocess         clear subject;         if ( reply == 'Y' || reply == 'y')             %token = strtok(subjectdata.filename{i}, '.');             token = strtok(files(i).name, '.');             subject.datafile = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir filesep files(i).name];             subject.datafilename = token;             subject.datafiledir = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir];             subject.artifactdir = subjectdata.artifactdir; snippet from : do_reject_artifacts cfg.dataset            = 'subject.datafile;       % name of EEG dataset  cfg.trialdef.eventtype      = 'trigger'; cfg.trialdef.prestim        = 1; cfg.trialdef.poststim       = 2; cfg.trialdef.eventvalue     = [1 2];                                    cfg = ft_definetrial(cfg);            data= ft_preprocessing(cfg) trl = cfg.trl; % jump cfg                    = []; cfg.trl = trl; cfg.padding = 0; cfg.datafile   = subject.datafile; cfg.headerfile = subject.datafile; cfg.continuous = 'yes'; cfg.memory = 'low'; % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel    = 'EEG'; cfg.artfctdef.zvalue.cutoff     = 20; cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.fltpadding = 0;   % algorithmic parameters cfg.artfctdef.zvalue.cumulative    = 'yes'; cfg.artfctdef.zvalue.medianfilter  = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff       = 'yes';   % make the process interactive cfg.artfctdef.zvalue.interactive   = 'yes';   [cfg, artifact_jump] = ft_artifact_zvalue(cfg,data); ________________________________ From: jan-mathijs schoffelen To: Omoniyi Segun ; Email discussion list for the FieldTrip project Sent: Tuesday, October 4, 2011 8:15 AM Subject: Re: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file Hi Omoniyi, What kind of data are you passing to the function?  BW, JM On Oct 3, 2011, at 4:49 PM, Omoniyi Segun wrote: Hi, > > >I am new to fieldtrip and have been struggling with it for the past four weeks. > > > >I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; >I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data. > > >Secondly when i click on stop I get the error pasted below. > > > > > >??? Reference to non-existent field 'dimord'. > >Error in ==> dimlength at 74 >      elseif strcmp(data.(fld), 'rpt_pos') > >Error in ==> fixsampleinfo at 31 >  ntrial = dimlength(data, 'rpt'); > >Error in ==> ft_checkdata at 579 >  data = fixsampleinfo(data); > >Error in ==> ft_rejectartifact at 203 >  data = ft_checkdata(data, 'hassampleinfo', 'yes'); > >Error in ==> do_reject_artifacts at 70 >data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); > >Error in ==> do_preprocess at 45 >                do_reject_artifacts(subject); > > >I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data. > > >Thanks > > >Omoniyi Segun > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD  Donders Institute for Brain, Cognition and Behaviour,  Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Thu Oct 6 00:50:01 2011 From: karl.doron at gmail.com (Karl Doron) Date: Wed, 5 Oct 2011 15:50:01 -0700 Subject: [FieldTrip] Clusterplot with F-test Message-ID: Hello, I've run a statistical analysis with cfg.statistic=depsamplesF. The tail of the F distribution is a one-sided test, so no negative cluster distributions are output as part of the processing. The clusterplot function seems to want negative clusters however. Is there any way around this? Best, karl From tommy.ng at mq.edu.au Thu Oct 6 07:54:43 2011 From: tommy.ng at mq.edu.au (Tommy Ng) Date: Thu, 6 Oct 2011 16:54:43 +1100 Subject: [FieldTrip] Units for Y axis Message-ID: Dear FT Experts I am very new to FT and would like to ask a simple question. Using FT beamformer source extraction module implemented in SPM8, I obtained time series of virtual sensors in source space. However, I do not know what is the unit for the Y axis. Can someone please advise? Thank you in advance. Tommy Ng PhD Student Macquarie University Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Thu Oct 6 10:13:41 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 6 Oct 2011 10:13:41 +0200 Subject: [FieldTrip] Problems using .elp files Message-ID: Dear Fieldtrippers, I am using .avr files for source modelling on ERP data. From the ERP components, I have calculated the differencewaves in a .mat file. Until this it all went fine. However I get stuck at using .elp files. I can succesfully create the headmodel with ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model developed by Nolte (2003) However when using ft_prepare_leadfield(cfg) I get problems. My code is like this: % discretize brainvolume in grid cfg=[] cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01' [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) % reading in .elp files %renaming lbl.textdata to lbl.label, else it gives an error at ft_channelselection, because it is unable to read sens.label oldField = 'textdata'; newField = 'label'; [lbl.(newField)] = lbl.(oldField); lbl = rmfield(lbl,oldField); cfg.elec= lbl cfg.vol = vol; cfg.reducerank = 3; cfg.channel = 'Fz' cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution save cfg [grid] = ft_prepare_leadfield(cfg); When executing this I get the following commandscreen: .... ..... using headmodel specified in the configuration using electrodes specified in the configuration ??? Error using ==> ft_prepare_vol_sens at 110 the input does not look like EEG, nor like MEG Error in ==> prepare_headmodel at 114 [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ==> ft_prepare_leadfield at 159 [vol, sens, cfg] = prepare_headmodel(cfg, data); I think this is because I use .elp files? The .elp files contain N rows and 3 columns representing xyz or spherical coordinates I assume. However this is the only information I have about the electrodes, so I have to do with it. Any ideas? Kind regards, Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Thu Oct 6 13:33:05 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 6 Oct 2011 06:33:05 -0500 Subject: [FieldTrip] Clusterplot with F-test Message-ID: Karl, I believe you can accomplish the same thing as ft_clusterplot using the code sample at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results1, which also gives you the option to plot negative or positive clusters (or both, if you fiddle with that code; there is a sample higher up on the page that plots both). Best, Steve Politzer-Ahles Message: 2 > Date: Wed, 5 Oct 2011 15:50:01 -0700 > From: Karl Doron > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Clusterplot with F-test > Message-ID: > Content-Type: text/plain; charset=us-ascii > > Hello, > > I've run a statistical analysis with cfg.statistic=depsamplesF. The tail of > the F distribution is a one-sided test, so no negative cluster distributions > are output as part of the processing. The clusterplot function seems to want > negative clusters however. Is there any way around this? > > Best, > > karl > > > > > > ------------------------------ > > Message: 3 > Date: Thu, 6 Oct 2011 16:54:43 +1100 > From: Tommy Ng > To: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] Units for Y axis > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear FT Experts > > I am very new to FT and would like to ask a simple question. > > Using FT beamformer source extraction module implemented in SPM8, I > obtained > time series of virtual sensors in source space. However, I do not know what > is the unit for the Y axis. > > Can someone please advise? > > Thank you in advance. > > Tommy Ng > PhD Student > Macquarie University > Australia > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111006/2b4d2da3/attachment-0001.html > > > > ------------------------------ > > Message: 4 > Date: Thu, 6 Oct 2011 10:13:41 +0200 > From: > To: > Subject: [FieldTrip] Problems using .elp files > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Dear Fieldtrippers, > > I am using .avr files for source modelling on ERP data. From the ERP > components, I have calculated the differencewaves in a .mat file. Until this > it all went fine. However I get stuck at using .elp files. > I can succesfully create the headmodel with > ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model > developed by Nolte (2003) > However when using ft_prepare_leadfield(cfg) I get problems. > > My code is like this: > > % discretize brainvolume in grid > cfg=[] > cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01' > [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) > % reading in .elp files > > %renaming lbl.textdata to lbl.label, else it gives an error at > ft_channelselection, because it is unable to read sens.label > oldField = 'textdata'; > newField = 'label'; > [lbl.(newField)] = lbl.(oldField); > lbl = rmfield(lbl,oldField); > cfg.elec= lbl > cfg.vol = vol; > cfg.reducerank = 3; > cfg.channel = 'Fz' > cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution > save cfg > [grid] = ft_prepare_leadfield(cfg); > > When executing this I get the following commandscreen: > .... > ..... > using headmodel specified in the configuration > using electrodes specified in the configuration > ??? Error using ==> ft_prepare_vol_sens at 110 > the input does not look like EEG, nor like MEG > > Error in ==> prepare_headmodel at 114 > [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, > 'order', cfg.order); > > Error in ==> ft_prepare_leadfield at 159 > [vol, sens, cfg] = prepare_headmodel(cfg, data); > > I think this is because I use .elp files? The .elp files contain N rows and > 3 columns representing xyz or spherical coordinates I assume. However this > is the only information I have about the electrodes, so I have to do with > it. > > Any ideas? > > Kind regards, > > Brian > > > > > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het > handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial > Register of the Chamber of Commerce under file number 41055629. > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111006/1e3275df/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 11, Issue 7 > **************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.noordenbos at gmail.com Thu Oct 6 15:32:20 2011 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Thu, 6 Oct 2011 15:32:20 +0200 Subject: [FieldTrip] Problem with nanmean.mexw64 Message-ID: Hi all, There seems to be a problem with nanmean.mexw64. I received the following error using fieldtrip-20111005 (same for 20111004). An older version fieldtrip-20110601 works fine (no nanmean.mexw64). ??? Invalid MEX-file 'C:\Users\BSI\Documents\MATLAB\fieldtrip-20111005\private\nanmean.mexw64': The specified module could not be found. Error in ==> ft_topoplotER at 632 dat = nanmean(dat, 2); Best, Mark -- Mark Noordenbos, MSc Radboud University Nijmegen Behavioural Science Institute P.O. Box 9104, Room A05.36 6500 HE Nijmegen The Netherlands Email: m.noordenbos at bsi.ru.nl Telephone: +31 24 3612070 Fax: +31 24 3616211 http://www.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.craddock at uni-leipzig.de Thu Oct 6 16:14:06 2011 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Thu, 06 Oct 2011 16:14:06 +0200 Subject: [FieldTrip] Problem with nanmean.mexw64 In-Reply-To: References: Message-ID: <4E8DB7AE.7090108@uni-leipzig.de> On 06/10/2011 15:32, Mark Noordenbos wrote: > Hi all, > > There seems to be a problem with nanmean.mexw64. I received the > following error using fieldtrip-20111005 (same for 20111004). > An older version fieldtrip-20110601 works fine (no nanmean.mexw64). > > ??? Invalid MEX-file > 'C:\Users\BSI\Documents\MATLAB\fieldtrip-20111005\private\nanmean.mexw64': > The specified > module could not be found. > > Error in ==> ft_topoplotER at 632 > dat = nanmean(dat, 2); > > Best, > Mark Hi Mark, I also ran into this problem yesterday after updating to a recent version from a version from June. The problem disappeared when I installed a new Visual C++ redistributable from Microsoft. From looking at the changelog, nanmean.mexw64 was introduced on the 21st of September, so versions of FieldTrip from before then won't have this problem. Cheers, Matt From jm.horschig at donders.ru.nl Fri Oct 7 10:56:18 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 07 Oct 2011 10:56:18 +0200 Subject: [FieldTrip] Problem with nanmean.mexw64 In-Reply-To: <4E8DB7AE.7090108@uni-leipzig.de> References: <4E8DB7AE.7090108@uni-leipzig.de> Message-ID: <4E8EBEB2.9070108@donders.ru.nl> Heya, I just re-mexed all nan functions for win64 with a different compiler, which is supported by Win7 by default. So, from tomorrow onwards there should be no problem with these files anymore. If you or anyone encounters a similar error for another mex-file, let us know and we can re-mex ;) Best, Jörn On 10/6/2011 4:14 PM, Matt Craddock wrote: > On 06/10/2011 15:32, Mark Noordenbos wrote: >> Hi all, >> >> There seems to be a problem with nanmean.mexw64. I received the >> following error using fieldtrip-20111005 (same for 20111004). >> An older version fieldtrip-20110601 works fine (no nanmean.mexw64). >> >> ??? Invalid MEX-file >> 'C:\Users\BSI\Documents\MATLAB\fieldtrip-20111005\private\nanmean.mexw64': >> >> The specified >> module could not be found. >> >> Error in ==> ft_topoplotER at 632 >> dat = nanmean(dat, 2); >> >> Best, >> Mark > > Hi Mark, > > I also ran into this problem yesterday after updating to a recent > version from a version from June. The problem disappeared when I > installed a new Visual C++ redistributable from Microsoft. From > looking at the changelog, nanmean.mexw64 was introduced on the 21st of > September, so versions of FieldTrip from before then won't have this > problem. > > Cheers, > Matt > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From eva.patai at psy.ox.ac.uk Fri Oct 7 11:18:01 2011 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Fri, 7 Oct 2011 10:18:01 +0100 Subject: [FieldTrip] cluster>nothing to plot Message-ID: Dear All I am running the Cluster-based permutation tests on event related fields, and for the same dataset, with all settings identical, when i run: 0-200ms: i get one significant cluster but: 0-500ms: no significant clusters why does my significant cluster disappear depending on the time window i use? thank you! z -- Zita Patai DPhil Candidate, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ eva.patai at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Fri Oct 7 14:31:37 2011 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Fri, 7 Oct 2011 13:31:37 +0100 Subject: [FieldTrip] cluster>nothing to plot In-Reply-To: References: Message-ID: Sorry, I know the answer now, but I have another , similar problem: When i get the clusterplot figure (after i run the cluster analysis), it has the timebins every 4ms (bc i have a 250Hz sampling rate) with the significant clusters plotted. For a simplified plotting, i was trying to use the bit of script where i can specify the timesteps i want the clusters to be shown in (ex: every 50ms) But, depending on what timestep i use, sometimes it does not display the clusters that are significant, almost like if the period is not long enough, it will not show the clusters... Any ideas ? Thank you! On Fri, Oct 7, 2011 at 10:18 AM, Zita Eva Patai wrote: > Dear All > > I am running the Cluster-based permutation tests on event related fields, > and for the same dataset, with all settings identical, when i run: > 0-200ms: i get one significant cluster > but: > 0-500ms: no significant clusters > > why does my significant cluster disappear depending on the time window i > use? > > thank you! > z > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > eva.patai at psy.ox.ac.uk > > > -- Zita Patai DPhil Candidate, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ eva.patai at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Fri Oct 7 14:55:25 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 7 Oct 2011 07:55:25 -0500 Subject: [FieldTrip] cluster>nothing to plot Message-ID: Zita, The sensitivity of the cluster test varies depending on the time window you analyze. Specifically, the sensitivity is greater when testing a small time window; see the discussion of cfg.latency at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#the_configuration_settings. But to properly control the type I error rate, it seems the time window of analysis should be chosen based on a priori predictions about where the effect should appear (i.e., not chosen based on your own data after you've looked at it). Best, Steve Politzer-Ahles Message: 5 > Date: Fri, 7 Oct 2011 10:18:01 +0100 > From: Zita Eva Patai > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] cluster>nothing to plot > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear All > > I am running the Cluster-based permutation tests on event related fields, > and for the same dataset, with all settings identical, when i run: > 0-200ms: i get one significant cluster > but: > 0-500ms: no significant clusters > > why does my significant cluster disappear depending on the time window i > use? > > thank you! > z > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > eva.patai at psy.ox.ac.uk > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lilla.Magyari at mpi.nl Fri Oct 7 15:08:11 2011 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Fri, 07 Oct 2011 15:08:11 +0200 Subject: [FieldTrip] cluster>nothing to plot In-Reply-To: References: Message-ID: <4E8EF9BB.90405@mpi.nl> hi Zita, I do not know what kind of script you wrote, therefore, it is difficult to figure out what the problem is exactly. But your problems reminds me to the following: if you followed the FT tutorial for plotting the clusters, you must be aware that it will plot only those channels in each time-bin that are part of the cluster during the entire time-bin. So, if you use a 50 ms bin, and a channel is part of the significant cluster only for 10 ms, you won't see that channel on the plot. I hope this helps. Best, Lilla Zita Eva Patai wrote: > Sorry, I know the answer now, but I have another , similar problem: > > When i get the clusterplot figure (after i run the cluster analysis), it > has the timebins every 4ms (bc i have a 250Hz sampling rate) with the > significant clusters plotted. > For a simplified plotting, i was trying to use the bit of script where i > can specify the timesteps i want the clusters to be shown in (ex: every > 50ms) > But, depending on what timestep i use, sometimes it does not display the > clusters that are significant, almost like if the period is not long > enough, it will not show the clusters... > > Any ideas ? > > Thank you! > > On Fri, Oct 7, 2011 at 10:18 AM, Zita Eva Patai > wrote: > > Dear All > > I am running the Cluster-based permutation tests on event related > fields, and for the same dataset, with all settings identical, when > i run: > 0-200ms: i get one significant cluster > but: > 0-500ms: no significant clusters > > why does my significant cluster disappear depending on the time > window i use? > > thank you! > z > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > eva.patai at psy.ox.ac.uk > > > > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > eva.patai at psy.ox.ac.uk > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD student Language and Cognition Group research assistant Neurobiology of Language Group Max Planck Institute for Psycholinguistics Nijmegen, P.O. Box 310, 6500AH, the Netherlands Phone: 0031 24 3521561 From eva.patai at psy.ox.ac.uk Fri Oct 7 15:26:39 2011 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Fri, 7 Oct 2011 14:26:39 +0100 Subject: [FieldTrip] cluster>nothing to plot In-Reply-To: <4E8EF9BB.90405@mpi.nl> References: <4E8EF9BB.90405@mpi.nl> Message-ID: Thank you Stephen & Lilla! I think I am just a bit overwhelmed with my data...and I was hoping to get straightforward results for my epoch... On Fri, Oct 7, 2011 at 2:08 PM, Magyari, Lilla wrote: > hi Zita, > > I do not know what kind of script you wrote, therefore, it is difficult to > figure out what the problem is exactly. But your problems reminds me to the > following: > if you followed the FT tutorial for plotting the clusters, you must be > aware that it will plot only those channels in each time-bin that are part > of the cluster during the entire time-bin. So, if you use a 50 ms bin, and a > channel is part of the significant cluster only for 10 ms, you won't see > that channel on the plot. I hope this helps. > > Best, > Lilla > > > Zita Eva Patai wrote: > >> Sorry, I know the answer now, but I have another , similar problem: >> >> When i get the clusterplot figure (after i run the cluster analysis), it >> has the timebins every 4ms (bc i have a 250Hz sampling rate) with the >> significant clusters plotted. For a simplified plotting, i was trying to use >> the bit of script where i can specify the timesteps i want the clusters to >> be shown in (ex: every 50ms) >> But, depending on what timestep i use, sometimes it does not display the >> clusters that are significant, almost like if the period is not long enough, >> it will not show the clusters... >> >> Any ideas ? >> >> Thank you! >> >> On Fri, Oct 7, 2011 at 10:18 AM, Zita Eva Patai > eva.patai at psy.ox.ac.uk**>> wrote: >> >> Dear All >> >> I am running the Cluster-based permutation tests on event related >> fields, and for the same dataset, with all settings identical, when >> i run: >> 0-200ms: i get one significant cluster >> but: >> 0-500ms: no significant clusters >> >> why does my significant cluster disappear depending on the time >> window i use? >> >> thank you! >> z >> >> >> -- >> Zita Patai >> DPhil Candidate, Experimental Psychology >> University of Oxford >> bcl.psy.ox.ac.uk/people/zita-**eva-patai/ >> >> > >> eva.patai at psy.ox.ac.uk >> >> >> >> >> >> >> -- >> >> Zita Patai >> DPhil Candidate, Experimental Psychology >> University of Oxford >> bcl.psy.ox.ac.uk/people/zita-**eva-patai/< >> http://bcl.psy.ox.ac.uk/**people/zita-eva-patai/ >> > >> eva.patai at psy.ox.ac.uk >> >> >> >> ------------------------------**------------------------------** >> ------------ >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > -- > PhD student > Language and Cognition Group > research assistant > Neurobiology of Language Group > > Max Planck Institute for Psycholinguistics > Nijmegen, P.O. Box 310, 6500AH, the Netherlands > Phone: 0031 24 3521561 > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -- Zita Patai DPhil Candidate, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ eva.patai at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Fri Oct 7 15:37:11 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Fri, 7 Oct 2011 15:37:11 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp Message-ID: Dear Fieldtrippers, I am using .avr files for source modelling on ERP data. From the ERP components, I have calculated the differencewaves in a .mat file. Until this it all went fine. However I get stuck at using .elp files. I can succesfully create the headmodel with ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model developed by Nolte (2003) However when using ft_prepare_leadfield(cfg) I get problems. My code is like this: % discretize brainvolume in grid cfg=[] cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01' [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) % reading in .elp files %renaming lbl.textdata to lbl.label, else it gives an error at ft_channelselection, because it is unable to read sens.label oldField = 'textdata'; newField = 'label'; [lbl.(newField)] = lbl.(oldField); lbl = rmfield(lbl,oldField); cfg.elec= lbl cfg.vol = vol; cfg.reducerank = 3; cfg.channel = 'Fz' cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution save cfg [grid] = ft_prepare_leadfield(cfg); When executing this I get the following commandscreen: .... ..... using headmodel specified in the configuration using electrodes specified in the configuration ??? Error using ==> ft_prepare_vol_sens at 110 the input does not look like EEG, nor like MEG Error in ==> prepare_headmodel at 114 [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ==> ft_prepare_leadfield at 159 [vol, sens, cfg] = prepare_headmodel(cfg, data); I think this is because I use .elp files? The .elp files contain N rows and 3 columns representing xyz or spherical coordinates I assume. However this is the only information I have about the electrodes, so I have to do with it. Any ideas? Kind regards, Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Oct 7 16:41:50 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 7 Oct 2011 16:41:50 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp In-Reply-To: References: Message-ID: <8D53B7F2-4C62-4D6A-97D5-74E2C98A1CF5@donders.ru.nl> Hi Brian, What does your cfg.elec look like? Best, JM On Oct 7, 2011, at 3:37 PM, wrote: > Dear Fieldtrippers, > > I am using .avr files for source modelling on ERP data. From the ERP components, I have calculated the differencewaves in a .mat file. Until this it all went fine. However I get stuck at using .elp files. > I can succesfully create the headmodel with ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model developed by Nolte (2003) > However when using ft_prepare_leadfield(cfg) I get problems. > > My code is like this: > > % discretize brainvolume in grid > cfg=[] > cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01' > [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) % reading in .elp files > > %renaming lbl.textdata to lbl.label, else it gives an error at ft_channelselection, because it is unable to read sens.label > oldField = 'textdata'; > newField = 'label'; > [lbl.(newField)] = lbl.(oldField); > lbl = rmfield(lbl,oldField); > cfg.elec= lbl > cfg.vol = vol; > cfg.reducerank = 3; > cfg.channel = 'Fz' > cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution > save cfg > [grid] = ft_prepare_leadfield(cfg); > > When executing this I get the following commandscreen: > .... > ..... > using headmodel specified in the configuration > using electrodes specified in the configuration > ??? Error using ==> ft_prepare_vol_sens at 110 > the input does not look like EEG, nor like MEG > > Error in ==> prepare_headmodel at 114 > [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); > > Error in ==> ft_prepare_leadfield at 159 > [vol, sens, cfg] = prepare_headmodel(cfg, data); > > I think this is because I use .elp files? The .elp files contain N rows and 3 columns representing xyz or spherical coordinates I assume. However this is the only information I have about the electrodes, so I have to do with it. > > Any ideas? > > Kind regards, > > Brian > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Fri Oct 7 17:07:18 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 7 Oct 2011 10:07:18 -0500 Subject: [FieldTrip] cluster>nothing to plot Message-ID: Hi Zita, I think Lilla's explanation for why your clusters are not showing up in the plot is right. If you're using the sample script from the cluster tutorial on the wiki, you can probably resolve this problem by just plotting smaller time windows; for example, to divide your epoch into 40 time windows instead of 20, make the "timestep" half as big, make the loop run from k=1:40 instead of k=1:20, and edit the adjust the number of subplots accordingly. Or, to get a more specific idea of the topography and time course of your significant cluster(s), you can look in the variables stat.posclusterslabelmat and stat.negclusterslabelmat, which tell you which (time, channel) samples belong to significant clusters. (I find it easiest to do this by writing those variables into Excel files and using Excel functions to find where the significant clusters are, but it can be done in Matlab as well.) This is a more exact way to see when and where significant clusters appear, without worrying about what time windows to select for plotting. Best, Steve Message: 4 > Date: Fri, 7 Oct 2011 14:26:39 +0100 > From: Zita Eva Patai > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] cluster>nothing to plot > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Thank you Stephen & Lilla! > > I think I am just a bit overwhelmed with my data...and I was hoping to get > straightforward results for my epoch... > > > On Fri, Oct 7, 2011 at 2:08 PM, Magyari, Lilla > wrote: > > > hi Zita, > > > > I do not know what kind of script you wrote, therefore, it is difficult > to > > figure out what the problem is exactly. But your problems reminds me to > the > > following: > > if you followed the FT tutorial for plotting the clusters, you must be > > aware that it will plot only those channels in each time-bin that are > part > > of the cluster during the entire time-bin. So, if you use a 50 ms bin, > and a > > channel is part of the significant cluster only for 10 ms, you won't see > > that channel on the plot. I hope this helps. > > > > Best, > > Lilla > > > > > > Zita Eva Patai wrote: > > > >> Sorry, I know the answer now, but I have another , similar problem: > >> > >> When i get the clusterplot figure (after i run the cluster analysis), it > >> has the timebins every 4ms (bc i have a 250Hz sampling rate) with the > >> significant clusters plotted. For a simplified plotting, i was trying to > use > >> the bit of script where i can specify the timesteps i want the clusters > to > >> be shown in (ex: every 50ms) > >> But, depending on what timestep i use, sometimes it does not display the > >> clusters that are significant, almost like if the period is not long > enough, > >> it will not show the clusters... > >> > >> Any ideas ? > >> > >> Thank you! > >> > >> On Fri, Oct 7, 2011 at 10:18 AM, Zita Eva Patai >> eva.patai at psy.ox.ac.uk**>> wrote: > >> > >> Dear All > >> > >> I am running the Cluster-based permutation tests on event related > >> fields, and for the same dataset, with all settings identical, when > >> i run: > >> 0-200ms: i get one significant cluster > >> but: > >> 0-500ms: no significant clusters > >> > >> why does my significant cluster disappear depending on the time > >> window i use? > >> > >> thank you! > >> z > >> > >> > >> -- > >> Zita Patai > >> DPhil Candidate, Experimental Psychology > >> University of Oxford > >> bcl.psy.ox.ac.uk/people/zita-**eva-patai/< > http://bcl.psy.ox.ac.uk/people/zita-eva-patai/> > >> http://bcl.psy.ox.ac.uk/people/zita-eva-patai/> > >> > > >> eva.patai at psy.ox.ac.uk > >> > >> > >> > >> > >> > >> > >> -- > >> > >> Zita Patai > >> DPhil Candidate, Experimental Psychology > >> University of Oxford > >> bcl.psy.ox.ac.uk/people/zita-**eva-patai/< > http://bcl.psy.ox.ac.uk/people/zita-eva-patai/>< > >> http://bcl.psy.ox.ac.uk/**people/zita-eva-patai/< > http://bcl.psy.ox.ac.uk/people/zita-eva-patai/> > >> > > >> eva.patai at psy.ox.ac.uk > >> > >> > >> > >> ------------------------------**------------------------------** > >> ------------ > >> > >> ______________________________**_________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip< > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip> > >> > > > > -- > > PhD student > > Language and Cognition Group > > research assistant > > Neurobiology of Language Group > > > > Max Planck Institute for Psycholinguistics > > Nijmegen, P.O. Box 310, 6500AH, the Netherlands > > Phone: 0031 24 3521561 > > > > ______________________________**_________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip< > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip> > > > > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > eva.patai at psy.ox.ac.uk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From BelluscB at ninds.nih.gov Fri Oct 7 17:40:11 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Fri, 7 Oct 2011 11:40:11 -0400 Subject: [FieldTrip] Using "virtual sensors" for data analysis Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CD33@NIHMLBX10.nih.gov> Dear Fieldtrippers- In my process of learning about different methods of analyzing MEG data, I have found the different Fieldtrip tutorials extremely useful. One method that is frequently quoted in the literature is using "virtual sensors" to determine, for example, the frequency response associated with an event within a specific brain region. In trying to learn about the processing steps necessary for this method, it has been difficult for me to translate the methods quoted in the literature into specific steps within Fieldtrip. I wonder what people think about trying to construct a tutorial that would act as a guide to the procedures (and pitfalls) associated with analyzing data within source space. Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Sun Oct 9 21:53:13 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Sun, 9 Oct 2011 21:53:13 +0200 Subject: [FieldTrip] problem exiting ft_databrowser Message-ID: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> Hi, I am very happy with the ft_databrowser, and looking at artifacts works fine. I can also use the keys to switch between artifact types, move between trials etc. However, when I press "q" to exit, nothing happens. If I then close the window manually, no artifacts are added to my data or cfg structures (even though when I select them, it says: "there is no overlap with the active artifact (visual), mark this as a new artifact"). What should I do? Is there a way to exit and still save the marked artifacts? I am using fieldtrip on MacOSX, matlab 2011a). Thanks so much! Marieke ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Sun Oct 9 23:08:52 2011 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Sun, 09 Oct 2011 14:08:52 -0700 Subject: [FieldTrip] problem exiting ft_databrowser In-Reply-To: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> References: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> Message-ID: <4E920D64.4030603@berkeley.edu> Hi Marieke, The "q" key not working is a known bug. When the mouse has been used, for some reason the "q" does not work anymore. However, this is not the cause of the artifacts not being saved. Both pressing the "q" and closing the window manually has the exact same effect as programmed in the code. The artifacts should be present as an artifact structure (2 columns for each artifact, 1st column beginsample, 2nd endsample), which should be added to the output cfg.artfctdef..artifact. Is this not the case for you? Hope this helps, Ingrid On 10/9/2011 12:53 PM, Marieke van Vugt wrote: > Hi, > I am very happy with the ft_databrowser, and looking at artifacts > works fine. I can also use the keys to switch between artifact types, > move between trials etc. However, when I press "q" to exit, nothing > happens. If I then close the window manually, no artifacts are added > to my data or cfg structures (even though when I select them, it says: > "there is no overlap with the active artifact (visual), mark this as a > new artifact"). > What should I do? Is there a way to exit and still save the marked > artifacts? I am using fieldtrip on MacOSX, matlab 2011a). > Thanks so much! > Marieke > ---------------------------------------------------------------------------- > Marieke van Vugt, PhD > Assistant Professor, Cognitive Modeling Group > Bernoulliborg, room 326 > Nijenborgh 9 > 9747 AG Groningen > The Netherlands > phone: +31-6-51954984 (cell) > +31-50-363-9487 (office) > http://www.ai.rug.nl/~mkvanvugt > m.k.van.vugt at rug.nl > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Mon Oct 10 06:22:03 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Mon, 10 Oct 2011 06:22:03 +0200 Subject: [FieldTrip] problem exiting ft_databrowser In-Reply-To: <4E920D64.4030603@berkeley.edu> References: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> <4E920D64.4030603@berkeley.edu> Message-ID: <4FEB753B-A6E7-4FBD-B8F7-2358B0289D37@rug.nl> Hi Ingrid, I figured out the problem: I did not realize the ft_databrowser was a function, and hence I just called ft_databrowser(cfg,data) without output argument. Using instead cfg=ft_databrowser(cfg,data) made both the "q" key work and gave cfg and artfctdef field. Problem solved! Thank you! (as you can tell, I just started using fieldtrip...) Warm regards, Marieke On Oct 9, 2011, at 11:08 , Ingrid Nieuwenhuis wrote: > Hi Marieke, > > The "q" key not working is a known bug. When the mouse has been used, for some reason the "q" does not work anymore. However, this is not the cause of the artifacts not being saved. Both pressing the "q" and closing the window manually has the exact same effect as programmed in the code. The artifacts should be present as an artifact structure (2 columns for each artifact, 1st column beginsample, 2nd endsample), which should be added to the output cfg.artfctdef..artifact. Is this not the case for you? > > Hope this helps, > Ingrid > > On 10/9/2011 12:53 PM, Marieke van Vugt wrote: >> >> Hi, >> I am very happy with the ft_databrowser, and looking at artifacts works fine. I can also use the keys to switch between artifact types, move between trials etc. However, when I press "q" to exit, nothing happens. If I then close the window manually, no artifacts are added to my data or cfg structures (even though when I select them, it says: "there is no overlap with the active artifact (visual), mark this as a new artifact"). >> What should I do? Is there a way to exit and still save the marked artifacts? I am using fieldtrip on MacOSX, matlab 2011a). >> Thanks so much! >> Marieke >> ---------------------------------------------------------------------------- >> Marieke van Vugt, PhD >> Assistant Professor, Cognitive Modeling Group >> Bernoulliborg, room 326 >> Nijenborgh 9 >> 9747 AG Groningen >> The Netherlands >> phone: +31-6-51954984 (cell) >> +31-50-363-9487 (office) >> http://www.ai.rug.nl/~mkvanvugt >> m.k.van.vugt at rug.nl >> >> >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Ingrid Nieuwenhuis PhD > Postdoctoral Fellow > Sleep and Neuroimaging Laboratory > Department of Psychology > University of California, Berkeley > California 94720-1650 > Tolman Hall, room 5305 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Oct 10 09:28:43 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 10 Oct 2011 09:28:43 +0200 Subject: [FieldTrip] problem exiting ft_databrowser In-Reply-To: <4E920D64.4030603@berkeley.edu> References: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> <4E920D64.4030603@berkeley.edu> Message-ID: <4E929EAB.7020003@donders.ru.nl> Hi Ingrid, just as a small addition: the 'q' key, as well as all other keys, should always work in the newer version also after pressing a button. Best, Jörn On 10/9/2011 11:08 PM, Ingrid Nieuwenhuis wrote: > Hi Marieke, > > The "q" key not working is a known bug. When the mouse has been used, > for some reason the "q" does not work anymore. However, this is not > the cause of the artifacts not being saved. Both pressing the "q" and > closing the window manually has the exact same effect as programmed in > the code. The artifacts should be present as an artifact structure (2 > columns for each artifact, 1st column beginsample, 2nd endsample), > which should be added to the output cfg.artfctdef. visual>.artifact. Is this not the case for you? > > Hope this helps, > Ingrid > > On 10/9/2011 12:53 PM, Marieke van Vugt wrote: >> Hi, >> I am very happy with the ft_databrowser, and looking at artifacts >> works fine. I can also use the keys to switch between artifact types, >> move between trials etc. However, when I press "q" to exit, nothing >> happens. If I then close the window manually, no artifacts are added >> to my data or cfg structures (even though when I select them, it >> says: "there is no overlap with the active artifact (visual), mark >> this as a new artifact"). >> What should I do? Is there a way to exit and still save the marked >> artifacts? I am using fieldtrip on MacOSX, matlab 2011a). >> Thanks so much! >> Marieke >> ---------------------------------------------------------------------------- >> Marieke van Vugt, PhD >> Assistant Professor, Cognitive Modeling Group >> Bernoulliborg, room 326 >> Nijenborgh 9 >> 9747 AG Groningen >> The Netherlands >> phone: +31-6-51954984 (cell) >> +31-50-363-9487 (office) >> http://www.ai.rug.nl/~mkvanvugt >> m.k.van.vugt at rug.nl >> >> >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Ingrid Nieuwenhuis PhD > Postdoctoral Fellow > Sleep and Neuroimaging Laboratory > Department of Psychology > University of California, Berkeley > California 94720-1650 > Tolman Hall, room 5305 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Mon Oct 10 11:45:00 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Mon, 10 Oct 2011 11:45:00 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp (jan-mathijs schoffelen) References: Message-ID: Hello Jan-Mathijs, My elec file is a struct, containing a 32x3 double called 'label'. I think these contain the coordinates. Also it contains two 32x1 cells. Called 'textdata' and 'rowheaders'. They contain the same info (names of the 31 channels + average): 'CP2' 'CP5' 'CP6' 'Cz' 'F3' 'F4' 'F7' 'F8' 'FC1' 'FC2' 'FC5' 'FC6' 'Fp1' 'Fp2' 'FT10' 'FT9' 'Fz' 'O1' 'O2' 'P3' 'P4' 'P7' 'P8' 'PO3' 'PO4' 'Pz' 'T7' 'T8' 'Avg' I hope this is enough info for you, to help me with the solution Best, Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3041 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Mon Oct 10 13:11:51 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 10 Oct 2011 13:11:51 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp (jan-mathijs schoffelen) In-Reply-To: References: Message-ID: <082AE8BF-F2B5-4B88-BA32-46F9D455373F@donders.ru.nl> Hi Brian, In order to be able to create a leadfield matrix for forward and inverse modelling, you need to have position information of the electrodes. In the ideal case, these should be measured for each individual subject. If you don't have this information and used standard electrode caps, you can also try and use a set of template electrode positions. Best wishes, Jan-Mathijs On Oct 10, 2011, at 11:45 AM, wrote: > Hello Jan-Mathijs, > > My elec file is a struct, containing a 32x3 double called 'label'. I think these contain the coordinates. Also it contains two 32x1 cells. Called 'textdata' and 'rowheaders'. They contain the same info (names of the 31 channels + average): > > 'CP2' > 'CP5' > 'CP6' > 'Cz' > 'F3' > 'F4' > 'F7' > 'F8' > 'FC1' > 'FC2' > 'FC5' > 'FC6' > 'Fp1' > 'Fp2' > 'FT10' > 'FT9' > 'Fz' > 'O1' > 'O2' > 'P3' > 'P4' > 'P7' > 'P8' > 'PO3' > 'PO4' > 'Pz' > 'T7' > 'T8' > 'Avg' > > I hope this is enough info for you, to help me with the solution > > Best, > > Brian > > > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Mon Oct 10 20:07:37 2011 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Mon, 10 Oct 2011 11:07:37 -0700 Subject: [FieldTrip] problem exiting ft_databrowser In-Reply-To: <4E929EAB.7020003@donders.ru.nl> References: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> <4E920D64.4030603@berkeley.edu> <4E929EAB.7020003@donders.ru.nl> Message-ID: <4E933469.9080103@berkeley.edu> Hi Jörn, Great that that's fixed! Ingrid On 10/10/2011 12:28 AM, "Jörn M. Horschig" wrote: > Hi Ingrid, > > just as a small addition: the 'q' key, as well as all other keys, > should always work in the newer version also after pressing a button. > > Best, > Jörn > > > On 10/9/2011 11:08 PM, Ingrid Nieuwenhuis wrote: >> Hi Marieke, >> >> The "q" key not working is a known bug. When the mouse has been used, >> for some reason the "q" does not work anymore. However, this is not >> the cause of the artifacts not being saved. Both pressing the "q" and >> closing the window manually has the exact same effect as programmed >> in the code. The artifacts should be present as an artifact >> structure (2 columns for each artifact, 1st column beginsample, 2nd >> endsample), which should be added to the output >> cfg.artfctdef..artifact. Is this not the >> case for you? >> >> Hope this helps, >> Ingrid >> >> On 10/9/2011 12:53 PM, Marieke van Vugt wrote: >>> Hi, >>> I am very happy with the ft_databrowser, and looking at artifacts >>> works fine. I can also use the keys to switch between artifact >>> types, move between trials etc. However, when I press "q" to exit, >>> nothing happens. If I then close the window manually, no artifacts >>> are added to my data or cfg structures (even though when I select >>> them, it says: "there is no overlap with the active artifact >>> (visual), mark this as a new artifact"). >>> What should I do? Is there a way to exit and still save the marked >>> artifacts? I am using fieldtrip on MacOSX, matlab 2011a). >>> Thanks so much! >>> Marieke >>> ---------------------------------------------------------------------------- >>> Marieke van Vugt, PhD >>> Assistant Professor, Cognitive Modeling Group >>> Bernoulliborg, room 326 >>> Nijenborgh 9 >>> 9747 AG Groningen >>> The Netherlands >>> phone: +31-6-51954984 (cell) >>> +31-50-363-9487 (office) >>> http://www.ai.rug.nl/~mkvanvugt >>> m.k.van.vugt at rug.nl >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Ingrid Nieuwenhuis PhD >> Postdoctoral Fellow >> Sleep and Neuroimaging Laboratory >> Department of Psychology >> University of California, Berkeley >> California 94720-1650 >> Tolman Hall, room 5305 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Oct 11 12:34:07 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 11 Oct 2011 12:34:07 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp (jan-mathijs schoffelen) In-Reply-To: References: Message-ID: Dear Brian I suggest you look at http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described to convert your electrode positions to fieldtrip format and http://fieldtrip.fcdonders.nl/faq/is_it_important_to_have_accurate_measurements_of_electrode_locations_for_eeg_source_reconstruction and the other faqs for more background information. Furthermore, you can use the standard BEM volume conduction model that is available from the FTP server and spatially coresister your electrodes with the standard BEM geometry using ft_electroderealign or another method of your choise. Following that, I suggest you do some forward simulations (ft_dipolesimulation) and visualise the scalp topographies to check that they make sense prior to moving to the inverse source estimatione (ft_sourceanalysis or ft_dipolefitting). best regards, Robert On 10 Oct 2011, at 11:45, wrote: > Hello Jan-Mathijs, > > My elec file is a struct, containing a 32x3 double called 'label'. I think these contain the coordinates. Also it contains two 32x1 cells. Called 'textdata' and 'rowheaders'. They contain the same info (names of the 31 channels + average): > > 'CP2' > 'CP5' > 'CP6' > 'Cz' > 'F3' > 'F4' > 'F7' > 'F8' > 'FC1' > 'FC2' > 'FC5' > 'FC6' > 'Fp1' > 'Fp2' > 'FT10' > 'FT9' > 'Fz' > 'O1' > 'O2' > 'P3' > 'P4' > 'P7' > 'P8' > 'PO3' > 'PO4' > 'Pz' > 'T7' > 'T8' > 'Avg' > > I hope this is enough info for you, to help me with the solution > > Best, > > Brian > > > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From batrod at gmail.com Tue Oct 11 18:43:47 2011 From: batrod at gmail.com (Rodolphe Nenert) Date: Tue, 11 Oct 2011 11:43:47 -0500 Subject: [FieldTrip] Clustering error Message-ID: Dear Fieldtripers, i tried to modify one of my script that was doing a permutation test in order to do the same test but within trials. I had the following error and couldnt find where it could comes from: using "statfun_depsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 79 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 2 over 51 levels number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ==> statfun_depsamplesT at 69 Invalid specification of the design array. ??? Error using ==> statistics_montecarlo at 215 could not determine the parametric critical value for clustering Error in ==> ft_freqstatistics at 279 [stat, cfg] = statmethod(cfg, dat, cfg.design); Any ideas ? ( im using the very last fieltrip version : 20111010) Rodolphe N. PhD University of Alabama at Birmingham. -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Wed Oct 12 11:40:57 2011 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 12 Oct 2011 11:40:57 +0200 Subject: [FieldTrip] DPSS and montage Message-ID: Dear fieldtrippers, I've been using Fieldtrip as an Intern for two months now, and have repeatedly run into a problem when using DPSS. When using the below settings, the computer locks up within seconds (although it does seem to do 'something'), stays that way for up to ten minutes (which is my personal cutoff, where I force a reboot), and then reports an 'out of memory'. cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'dpss'; cfg.foilim = [20 200]; cfg.tapsmofrq = 1; The data fed to ft_freqanalysis is the result of roughly 30 seconds continuous data of a single (originally bipolar) channel processed by ft_preprocessing. When using 'hanning' it completes without a hitch, but DPSS doesn't. I've tried the same thing using a different, more powerful computer, which succesfully completed 30 seconds using the above settings, but when setting the tapsmofrq to 3 the RAM was filled up in a period of a few seconds, and the computer choked. The 'normal' computer has 2GB of ram, and a dual-core intel running at 2GHz, and the more powerful computer has 8GB ram with an quad-core AMD at 3.4GHz. What am I doing wrong? Secondly, I was wondering about the 'montage' funcionality, since I'll be making use of bipolar arrangements, but the parameters of the montage-structure as defined on http://fieldtrip.fcdonders.nl/reference/ft_apply_montage don't help me much in making one of my own. Would it be possible to take a look at an existing montage structure, such as the one referred to on http://fieldtrip.fcdonders.nl/getting_started/neuralynx_fcdc? Sincerely, Casper van Heck -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Wed Oct 12 12:22:03 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Wed, 12 Oct 2011 12:22:03 +0200 Subject: [FieldTrip] DPSS and montage In-Reply-To: References: Message-ID: <4E956A4B.5070600@donders.ru.nl> Hi Casper, On the memory issues, using DPSS tapers on very large segments of data, while at the same time using cfg.foilim (instead of the more selective cfg.foi), results in a huge explosion of required memory. This is so because the amount of tapers for a specified smoothing increases with the length of the trials, and the same holds for the amount of estimable frequencies. In your case, it might be easiest to specify a cfg.foi, instead of cfg.foilim, e.g. cfg.foi = 20:1:200 should already greatly reduce the amount of memory needed. Increasing the amount of smoothing also greatly increases the amount of tapers needed. If you are looking for a higher smoothing, and you still don't have enough memory, you can try to cut your trials in smaller pieces, or use downsampling (the amount of tapers depends on the amount of samples used). Best, Roemer On 12/10/2011 11:40, Casper van Heck wrote: > Dear fieldtrippers, > > I've been using Fieldtrip as an Intern for two months now, and have > repeatedly run into a problem when using DPSS. When using the below > settings, the computer locks up within seconds (although it does seem > to do 'something'), stays that way for up to ten minutes (which is my > personal cutoff, where I force a reboot), and then reports an 'out of > memory'. > > cfg.method = 'mtmfft'; > cfg.output = 'pow'; > cfg.taper = 'dpss'; > cfg.foilim = [20 200]; > cfg.tapsmofrq = 1; > > The data fed to ft_freqanalysis is the result of roughly 30 seconds > continuous data of a single (originally bipolar) channel processed by > ft_preprocessing. > When using 'hanning' it completes without a hitch, but DPSS doesn't. > I've tried the same thing using a different, more powerful computer, > which succesfully completed 30 seconds using the above settings, but > when setting the tapsmofrq to 3 the RAM was filled up in a period of a > few seconds, and the computer choked. The 'normal' computer has 2GB of > ram, and a dual-core intel running at 2GHz, and the more powerful > computer has 8GB ram with an quad-core AMD at 3.4GHz. What am I doing > wrong? > > Secondly, I was wondering about the 'montage' funcionality, since I'll > be making use of bipolar arrangements, but the parameters of the > montage-structure as defined on > http://fieldtrip.fcdonders.nl/reference/ft_apply_montage don't help me > much in making one of my own. Would it be possible to take a look at > an existing montage structure, such as the one referred to on > http://fieldtrip.fcdonders.nl/getting_started/neuralynx_fcdc? > > Sincerely, > > Casper van Heck > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Wed Oct 12 17:05:50 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 12 Oct 2011 17:05:50 +0200 Subject: [FieldTrip] DPSS and montage In-Reply-To: References: Message-ID: <6C6F09A3-D7AB-45D6-A3D5-7198A23E0E46@donders.ru.nl> Dear Casper Let me give an example montage, which assumes that you start with a monopolar dataset with 4 channels that you want to convert to a 3-channel bipolar dataset. bipolar.labelorg = {'1', '2', '3', '4'} bipolar.labelnew = {'1-2', '2-3', '3-4'} bipolar.tra = [ +1 -1 0 0 0 +1 -1 0 0 0 +1 -1 ]; The FT_APPLY_MONTAGE function can be used on a variety of FT data structures, such as prepocessed raw data, electrode and gradiometer definitions, freqanalyzed data (in fourier representation). If you imagine having a plain NxM data matrix with the N=4 original channels and M is the number of timepoints, you'll see that applying the montage is equivalent to multiplying the data with "bipolar.tra" The reason for having the FT_APPLY_MONTAGE function is to deal with the bookkeeping, e.g. reordering channels and checking that all channels are present. best Robert PS I'll add this example to the reference docs. On 12 Oct 2011, at 11:40, Casper van Heck wrote: > Dear fieldtrippers, > > I've been using Fieldtrip as an Intern for two months now, and have repeatedly run into a problem when using DPSS. When using the below settings, the computer locks up within seconds (although it does seem to do 'something'), stays that way for up to ten minutes (which is my personal cutoff, where I force a reboot), and then reports an 'out of memory'. > > cfg.method = 'mtmfft'; > cfg.output = 'pow'; > cfg.taper = 'dpss'; > cfg.foilim = [20 200]; > cfg.tapsmofrq = 1; > > The data fed to ft_freqanalysis is the result of roughly 30 seconds continuous data of a single (originally bipolar) channel processed by ft_preprocessing. > When using 'hanning' it completes without a hitch, but DPSS doesn't. I've tried the same thing using a different, more powerful computer, which succesfully completed 30 seconds using the above settings, but when setting the tapsmofrq to 3 the RAM was filled up in a period of a few seconds, and the computer choked. The 'normal' computer has 2GB of ram, and a dual-core intel running at 2GHz, and the more powerful computer has 8GB ram with an quad-core AMD at 3.4GHz. What am I doing wrong? > > Secondly, I was wondering about the 'montage' funcionality, since I'll be making use of bipolar arrangements, but the parameters of the montage-structure as defined on http://fieldtrip.fcdonders.nl/reference/ft_apply_montage don't help me much in making one of my own. Would it be possible to take a look at an existing montage structure, such as the one referred to on http://fieldtrip.fcdonders.nl/getting_started/neuralynx_fcdc? > > Sincerely, > > Casper van Heck > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From t.navarroschroder at fcdonders.ru.nl Wed Oct 12 18:52:05 2011 From: t.navarroschroder at fcdonders.ru.nl (=?utf-8?Q?Navarro_Schr=C3=B6der=2C_T=2E?=) Date: Wed, 12 Oct 2011 18:52:05 +0200 (CEST) Subject: [FieldTrip] FWD: Postdoctoral Position in Cognitive Neuroscience of Learning and Memory (1, 0 fte) Donders Institute, Centre for Cognitive Neuroimaging In-Reply-To: <2014767137.412717.1318438313892.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <100987555.412720.1318438325650.JavaMail.root@sculptor.zimbra.ru.nl> Dear all, there is a postdoctoral position in Cognitive Neuroscience available at the Donders Institute, Centre for Cognitive Neuroimaging: See: http://www.ru.nl/vacatures/details/details_vacature_0?recid=505393 or attachment. With kind regards, Tobias Navarro Schroeder -- Tobias Navarro Schroeder PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: t.navarroschroder at fcdonders.ru.nl Phone: +31(0)616958350 -------------- next part -------------- A non-text attachment was scrubbed... Name: vacature.rtf Type: application/rtf Size: 287828 bytes Desc: not available URL: From omoniyi_s at yahoo.com Wed Oct 12 19:11:35 2011 From: omoniyi_s at yahoo.com (Omoniyi Segun) Date: Wed, 12 Oct 2011 10:11:35 -0700 (PDT) Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan CNT file In-Reply-To: <1317826002.17170.YahooMailNeo@web65917.mail.ac4.yahoo.com> References: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> <1317826002.17170.YahooMailNeo@web65917.mail.ac4.yahoo.com> Message-ID: <1318439495.10726.YahooMailNeo@web65907.mail.ac4.yahoo.com> Hi Jan-mathijs, Did you get a chance to look at the problem described about neuroscan CNT file. Thanks Omoniyi Segun  ________________________________ From: Omoniyi Segun To: jan-mathijs schoffelen ; Email discussion list for the FieldTrip project Sent: Wednesday, October 5, 2011 10:46 AM Subject: Re: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file Thanks for your response. I am passing a 'subject' structure which contains the file location and file name to the do_reject_artifacts function which i wrote. Inside the function i have inserted the code I got from the tutorial. The structure is created in a do_preprocess function, i read all the files in a directory structure and create the subject stucture in this function. The files are Neuroscan .cnt files Thanks for your help Omoniyi Segun snippet from : do_preprocess         clear subject;         if ( reply == 'Y' || reply == 'y')             %token = strtok(subjectdata.filename{i}, '.');             token = strtok(files(i).name, '.');             subject.datafile = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir filesep files(i).name];             subject.datafilename = token;             subject.datafiledir = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir];             subject.artifactdir = subjectdata.artifactdir; snippet from : do_reject_artifacts cfg.dataset            = 'subject.datafile;       % name of EEG dataset  cfg.trialdef.eventtype      = 'trigger'; cfg.trialdef.prestim        = 1; cfg.trialdef.poststim       = 2; cfg.trialdef.eventvalue     = [1 2];                                    cfg = ft_definetrial(cfg);            data= ft_preprocessing(cfg) trl = cfg.trl; % jump cfg                    = []; cfg.trl = trl; cfg.padding = 0; cfg.datafile   = subject.datafile; cfg.headerfile = subject.datafile; cfg.continuous = 'yes'; cfg.memory = 'low'; % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel    = 'EEG'; cfg.artfctdef.zvalue.cutoff     = 20; cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.fltpadding = 0;   % algorithmic parameters cfg.artfctdef.zvalue.cumulative    = 'yes'; cfg.artfctdef.zvalue.medianfilter  = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff       = 'yes';   % make the process interactive cfg.artfctdef.zvalue.interactive   = 'yes';   [cfg, artifact_jump] = ft_artifact_zvalue(cfg,data); ________________________________ From: jan-mathijs schoffelen To: Omoniyi Segun ; Email discussion list for the FieldTrip project Sent: Tuesday, October 4, 2011 8:15 AM Subject: Re: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file Hi Omoniyi, What kind of data are you passing to the function?  BW, JM On Oct 3, 2011, at 4:49 PM, Omoniyi Segun wrote: Hi, > > >I am new to fieldtrip and have been struggling with it for the past four weeks. > > > >I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; >I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data. > > >Secondly when i click on stop I get the error pasted below. > > > > > >??? Reference to non-existent field 'dimord'. > >Error in ==> dimlength at 74 >      elseif strcmp(data.(fld), 'rpt_pos') > >Error in ==> fixsampleinfo at 31 >  ntrial = dimlength(data, 'rpt'); > >Error in ==> ft_checkdata at 579 >  data = fixsampleinfo(data); > >Error in ==> ft_rejectartifact at 203 >  data = ft_checkdata(data, 'hassampleinfo', 'yes'); > >Error in ==> do_reject_artifacts at 70 >data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); > >Error in ==> do_preprocess at 45 >                do_reject_artifacts(subject); > > >I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data. > > >Thanks > > >Omoniyi Segun > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD  Donders Institute for Brain, Cognition and Behaviour,  Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.todorovic at fcdonders.ru.nl Mon Oct 17 10:55:22 2011 From: a.todorovic at fcdonders.ru.nl (Todorovic, A.) Date: Mon, 17 Oct 2011 10:55:22 +0200 (CEST) Subject: [FieldTrip] fieldtrip application of depsamplesT Message-ID: <138307306.568035.1318841722776.JavaMail.root@monoceros.zimbra.ru.nl> Hello ft_list, I am wondering if any changes have recently been made to the t-test scripts in FieldTrip. I re-did an analysis I previously ran in August and am getting somewhat more conservative estimates for my clusters. This could of course be due to random fluctuations in the output, but my feeling is that something is different in the settings with respect to how cluster tails are implemented. Are there new changes to these scripts, and if yes, could you please let me/us know what they are? Regards, Ana From vitoria.piai at gmail.com Wed Oct 19 05:30:25 2011 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Wed, 19 Oct 2011 05:30:25 +0200 Subject: [FieldTrip] problem with ft_prepare_neighbours / ft_neighbourselection In-Reply-To: <4E9E4331.20200@donders.ru.nl> References: <4E9E4331.20200@donders.ru.nl> Message-ID: <4E9E4451.1080308@gmail.com> Hi, Since a latest change from yesterday (Oct 18th), I'm getting an error when running either ft_prepare_neighbours / ft_neighbourselection on channelposition at line 71 because of a reference to non-existent field 'tra'. I'm working with planar gradients. Hopefully this is a temporary bug, but otherwise what would be the right way to configure the parameters? Thank you, Vitoria From jan.schoffelen at donders.ru.nl Wed Oct 19 11:18:31 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 19 Oct 2011 11:18:31 +0200 Subject: [FieldTrip] problem with ft_prepare_neighbours / ft_neighbourselection In-Reply-To: <4E9E4451.1080308@gmail.com> References: <4E9E4331.20200@donders.ru.nl> <4E9E4451.1080308@gmail.com> Message-ID: Dear Vitória, At the moment, the part of the FieldTrip code dealing with channel positions is not so stable. This has high priority for us and we will discuss the issue in today's FieldTrip team meeting. Hopefully we will be able to provide a stable version very soon. For now, I'd advice not to use the latest version if that is causing you trouble. Best wishes, Jan-Mathijs On Oct 19, 2011, at 5:30 AM, Vitória Magalhães Piai wrote: > > > Hi, > > Since a latest change from yesterday (Oct 18th), I'm getting an error > when running either ft_prepare_neighbours / ft_neighbourselection on > channelposition at line 71 because of a reference to non-existent field > 'tra'. > I'm working with planar gradients. > > Hopefully this is a temporary bug, but otherwise what would be the right > way to configure the parameters? > > Thank you, Vitoria > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Wed Oct 19 15:54:37 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Wed, 19 Oct 2011 15:54:37 +0200 Subject: [FieldTrip] beamforming - normilise issue Message-ID: Dear all, I am trying to use beamforming for some MEG data. I have 1 condition, and I wish to compare it against the baseline. Ideally I wish to have the average of all group and statistically compare stimulus agains baseline.. As such, for each subject I calculate the source for the baseline and the source for the stimulus (using a common filter as indicated on the website). I then call ft_sourceinterpolate and, since I wish to have a group analysis, ft_volumenormalise. In order to compute the average, I call ft_sourcegrandaverage. Even though the help tells me that it is fine, the grandaverage does not work if the input is from the ft_volumenormalise. It is because there is not the ".pos" field! Am I doing something wrong? Any advice would be great. Thanks a lot, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at web.de Wed Oct 19 17:44:24 2011 From: michael.wibral at web.de (Michael Wibral) Date: Wed, 19 Oct 2011 17:44:24 +0200 (CEST) Subject: [FieldTrip] beamforming - normilise issue Message-ID: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Wed Oct 19 18:12:10 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Wed, 19 Oct 2011 18:12:10 +0200 Subject: [FieldTrip] beamforming - normilise issue In-Reply-To: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> References: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> Message-ID: Hi Michael, I am using the single shell (Nolte). The grid has 2340 positions, but I am not still using mni. Thanks, Davide On Wed, Oct 19, 2011 at 5:44 PM, Michael Wibral wrote: > Hi davide, > > what headmodel and grid are you using? > > Michael > > > ------------------------------ > *Von:* "Davide Rivolta" > *Gesendet:* Oct 19, 2011 3:54:37 PM > *An:* "Email discussion list for the FieldTrip project" < > fieldtrip at donders.ru.nl> > *Betreff:* [FieldTrip] beamforming - normilise issue > > > Dear all, > > I am trying to use beamforming for some MEG data. > > I have 1 condition, and I wish to compare it against the baseline. Ideally > I wish to have the average of all group and statistically compare stimulus > agains baseline.. > > As such, for each subject I calculate the source for the baseline and the > source for the stimulus (using a common filter as indicated on the website). > > I then call ft_sourceinterpolate and, since I wish to have a group > analysis, ft_volumenormalise. > In order to compute the average, I call ft_sourcegrandaverage. > > Even though the help tells me that it is fine, the grandaverage does not > work if the input is from the ft_volumenormalise. It is because there is not > the ".pos" field! > > Am I doing something wrong? > > Any advice would be great. > > Thanks a lot, > > Davide > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From dgroppe at cogsci.ucsd.edu Thu Oct 20 04:01:29 2011 From: dgroppe at cogsci.ucsd.edu (David Groppe) Date: Wed, 19 Oct 2011 19:01:29 -0700 (PDT) Subject: [FieldTrip] removing EEG 1/f spectral power Message-ID: Hi FieldTrippers, I am interested in studying the spectral peaks in resting EEG. Identifying these peaks is complicated by the 1/f distribution of EEG power. Do any of you have suggestions for removing the 1/f distribution to better reveal peaks? I've seen people suggest autoregressive modelling or applying high pass filters but in the couple of attempts I've seen the results look fair. much appreciated, -David From t.schneider at uke.uni-hamburg.de Thu Oct 20 12:33:40 2011 From: t.schneider at uke.uni-hamburg.de (Till Schneider) Date: Thu, 20 Oct 2011 12:33:40 +0200 Subject: [FieldTrip] PhD and post-doctoral positions - University Medical Center Hamburg-Eppendorf Message-ID: <4E9FF904.6050700@uke.uni-hamburg.de> Dear all, please find attached two job advertisements for PhD and post-doctoral positions at the Dept. of Neurophysiology and Pathophysiology, University Medical Center Hamburg-Eppendorf, Hamburg, Germany. These positions are funded through the Collaborative Research Centre SFB 936 „Multi-Site Communication in the Brain“ (www.sfb936.net) (offer #1) and the ERC Advanced Investigators Grant MULTISENSE “The merging of the senses: understanding multisensory experience” (offer #2) respectively. Best regards, Till Schneider -- Till Schneider, PhD Cognitive and Clinical Neurophysiology Group Dept. of Neurophysiology and Pathophysiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg Germany phone +49-40-7410-53188 fax +49-40-7410-57126 t.schneider at uke.de -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus -------------- next part -------------- A non-text attachment was scrubbed... Name: Job_advertisement_Hamburg1.pdf Type: application/pdf Size: 22836 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Job_advertisement_Hamburg2.pdf Type: application/pdf Size: 22922 bytes Desc: not available URL: From grion at sissa.it Fri Oct 21 01:43:32 2011 From: grion at sissa.it (Natalia Grion) Date: Fri, 21 Oct 2011 01:43:32 +0200 Subject: [FieldTrip] Between-Trial Stats on Coherence Message-ID: <20111021014332.Horde.2VPvCx8V4mxOoLIkv4KGG8A@webmail.sissa.it> Dear All, when computing the statistical test for difference in coherence between condition 1 and condition 2 (for single subject) I get NaNs for stat. The setting code is quite simple and I did some checking for silly errors(ex. I dowloaded the very last version), so either I'm doing sth wrong or there is a bug somwhere. Maybe you can help me. I do the following: having computed the 'fourier' for both conditions (diff amount of trials), I run the code for the second step (whithout MC correction for the moment). I have 2 channel on which Im computing the coherence. The data for both conditions have the same length. The design is a betweenTrial so: #trls c1 + #trls c2. and 1 independent variable. AmI missing something on the design or like reshaping the data? Any help is welcome! Natalia cfg = []; cfg.channel ={'lfp';'Whisk'}; cfg.channelcmb ={'lfp' 'Whisk'}; cfg.frequency ='all'; cfg.method = 'montecarlo'; cfg.parameter ='fourierspctrm'; cfg.statistic = 'indepsamplesZcoh'; cfg.alpha = 0.05; cfg.tail = 0; cfg.numrandomization = 10; %500 cfg.neighbours = []; %cfg.correctm = 'cluster'; %cfg.clusterthreshold = 'nonparametric_common'; %cfg.clusterstatistic = 'maxsum'; %cfg.clusteralpha = 0.05; %cfg.clustertail = 0; %cfg.correcttail ='prob'; cfg.computestat = 'yes'; cfg.computecritval = 'yes'; cfg.computeprob = 'yes' ; %Design of matrix design = zeros(1,size(freqoutdisc.fourierspctrm,1) + size(freqoutwalk.fourierspctrm,1)); design(1,1:size(freqoutdisc.fourierspctrm,1)) = 1; design(1,(size(freqoutdisc.fourierspctrm,1)+1):(size(freqoutdisc.fourierspctrm,1) + size(freqoutwalk.fourierspctrm,1)))= 2; cfg.design = design; cfg.ivar = 1; [stat1] = freqstatistics(cfg,freqoutdisc,freqoutwalk); From ali.gm88 at gmail.com Fri Oct 21 08:34:23 2011 From: ali.gm88 at gmail.com (=?ISO-8859-1?Q?Alicia_Gonz=E1lez?=) Date: Fri, 21 Oct 2011 08:34:23 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: Hi, I'm trying to do automatic artifact rejection using the tutorial on the site. It seems that everything runs ok but, when I try to see the z-score figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears (and no errors are found). I'm just using the code from the tutorial without changes. thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Oct 21 08:53:03 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 21 Oct 2011 08:53:03 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: Hi Alicia, In order to be able to address your problem we need some additional feedback of course. What kind of data are you using, etc? BW, JM On Oct 21, 2011, at 8:34 AM, Alicia González wrote: > > > Hi, > > I'm trying to do automatic artifact rejection using the tutorial on the site. It seems that everything runs ok but, when I try to see the z-score figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears (and no errors are found). I'm just using the code from the tutorial without changes. > > thanks in advance. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.gm88 at gmail.com Fri Oct 21 11:08:21 2011 From: ali.gm88 at gmail.com (=?ISO-8859-1?Q?Alicia_Gonz=E1lez?=) Date: Fri, 21 Oct 2011 11:08:21 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: I'm using the data provided in the tutorial: ArtifactMEG.ds (This dataset was acquired continuously with trials of 10 seconds, and during the recording the experimenter instructed the subject to make artifacts and wrote down the trial number in which the artifacts were made) And I running the code below: cfg = []; cfg.dataset = 'ArtifactMEG.ds'; cfg.headerformat = 'ctf_ds'; ctf.dataformat = 'ctf_ds'; cfg.trialdef.eventtype = 'trial'; cfg = ft_definetrial(cfg); trl = cfg.trl(1:50,:); % just use the first 50 trials for the time being % jump cfg = []; cfg.trl = trl; cfg.padding = 0; cfg.datafile = 'ArtifactMEG.ds'; cfg.headerfile = 'ArtifactMEG.ds'; cfg.continuous = 'yes'; % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel = 'MEG'; cfg.artfctdef.zvalue.cutoff = 20; cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.fltpadding = 0; % algorithmic parameters cfg.artfctdef.zvalue.cumulative = 'yes'; cfg.artfctdef.zvalue.medianfilter = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff = 'yes'; % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; [cfg, artifact_jump] = ft_artifact_zvalue(cfg); 2011/10/21 jan-mathijs schoffelen > Hi Alicia, > > In order to be able to address your problem we need some additional > feedback of course. What kind of data are you using, etc? > > BW, > > JM > > On Oct 21, 2011, at 8:34 AM, Alicia González wrote: > > > > Hi, > > I'm trying to do automatic artifact rejection using the tutorial on the > site. It seems that everything runs ok but, when I try to see the z-score > figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears > (and no errors are found). I'm just using the code from the tutorial without > changes. > > thanks in advance. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Fri Oct 21 11:49:05 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 21 Oct 2011 11:49:05 +0200 Subject: [FieldTrip] removing EEG 1/f spectral power In-Reply-To: References: Message-ID: Dear David, Often we look at the contrast between two experimental conditions, in which then the 1/f disappears in the contrast, so we don't have to bother. But there are indeed valid cases where you want it out, such as detecting peaks that sit on a 1/f flank. A simple trick that you can use is based on the following idea: say f(t) = sin(w*t), then df/dt = w*cos(w*t) So taking the derivative of a sine multiplies the output with "w" , which is the frequency in radians per second. This applies to each frequency. Taking the derivative is a linear operation, so if your data consists of the sum of many sine-waves (which is the premise for Fourier analysis), taking the derivative of the data is equivalent to taking the derivative of all seperate sine-wave contributions to your data. The consequence hence is that the derivative in time results in the Fourier spectrum at frequency f being multiplied by f (for any frequency). So the 1/f effect in the spectrum is counteracted by a 1*f effect of the time-domain derivative. In ft_preprocessing you can use cfg.derivative=yes to get the desired result. best regards Robert PS this can be considered as estimating and removing a 1-st order AR model from the data, except that we already know what the AR model parameters are. It can also be considered as a high-pass FIR filter with a filter kernel that is [-1 1]. On 20 Oct 2011, at 4:01, David Groppe wrote: > > Hi FieldTrippers, > I am interested in studying the spectral peaks in resting EEG. > Identifying these peaks is complicated by the 1/f distribution of EEG > power. Do any of you have suggestions for removing the 1/f > distribution to better reveal peaks? I've seen people suggest > autoregressive modelling or applying high pass filters but in the > couple of attempts I've seen the results look fair. > much appreciated, > -David > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Fri Oct 21 12:13:08 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 21 Oct 2011 12:13:08 +0200 Subject: [FieldTrip] beamforming - normilise issue In-Reply-To: References: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> Message-ID: <4EA145B4.3060509@donders.ru.nl> Dear Davide, I was hesitant to answer, because I thought others know more than me. But since none responded, I can try to help with my limited knowledge. From my knowledge of source reconstruction, I can just say that if all your source reconstructions are in the same space (say, MNI), you can use the .pos from your template to overcome this problem. I am not using ft_volumenormalise, so I have no experience what is exactly going on there. I would assume, however, that volumenormalise will transofmr your source structures to a common space. However, I stick to normalizing the following way: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space Hope it helps at least a little bit. Best, Jörn On 10/19/2011 6:12 PM, Davide Rivolta wrote: > Hi Michael, > I am using the single shell (Nolte). > The grid has 2340 positions, but I am not still using mni. > Thanks, > Davide > > On Wed, Oct 19, 2011 at 5:44 PM, Michael Wibral > wrote: > > Hi davide, > > what headmodel and grid are you using? > > Michael > > > ------------------------------------------------------------------------ > *Von:* "Davide Rivolta" > > *Gesendet:* Oct 19, 2011 3:54:37 PM > *An:* "Email discussion list for the FieldTrip project" > > > *Betreff:* [FieldTrip] beamforming - normilise issue > > > Dear all, > I am trying to use beamforming for some MEG data. > I have 1 condition, and I wish to compare it against the > baseline. Ideally I wish to have the average of all group and > statistically compare stimulus agains baseline.. > As such, for each subject I calculate the source for the > baseline and the source for the stimulus (using a common > filter as indicated on the website). > I then call ft_sourceinterpolate and, since I wish to have a > group analysis, ft_volumenormalise. > In order to compute the average, I call ft_sourcegrandaverage. > Even though the help tells me that it is fine, the > grandaverage does not work if the input is from the > ft_volumenormalise. It is because there is not the ".pos" field! > Am I doing something wrong? > Any advice would be great. > Thanks a lot, > Davide > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Davide Rivolta, PhD > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Mon Oct 24 11:35:21 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Mon, 24 Oct 2011 11:35:21 +0200 Subject: [FieldTrip] problem with clusterplot Message-ID: <2B510BFE-967F-47C2-A920-AA78590FF0DA@rug.nl> Hi everyone, I am trying to use ft_clusterplot after having done ft_timelockstatistics. I get the following error: >>cfg = []; >>cfg.alpha = 0.1; >>cfg.parameter = 'prob'; >>cfg.elec = timelockLow.elec; >> ft_clusterplot(cfg,stat); creating layout from cfg.elec creating layout for ext1020 system There are 1 clusters smaller than alpha (0.1) Positive cluster: 1, pvalue: 0.065 (+), t = 0.712 to 0.836 ??? Reference to non-existent field 'parameter'. Error in ==> ft_topoplotER at 610 dat = data.(cfg.parameter); Error in ==> ft_clusterplot at 339 ft_topoplotER(cfgtopo, stat); 610 dat = data.(cfg.parameter); K>> dbquit In general the stat output looks fine. You can find the 'stat' and 'cfg' variables that I use in my dropbox: http://dl.dropbox.com/u/13997261/clusterProblem.mat Does anyone know what's going on here? I could not figure out what the field 'parameter' should be and why it was not existing in the first place. Thanks a lot in advance for your help, Marieke ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Oct 24 12:23:18 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 24 Oct 2011 12:23:18 +0200 Subject: [FieldTrip] beamforming - normilise issue In-Reply-To: <4EA145B4.3060509@donders.ru.nl> References: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> <4EA145B4.3060509@donders.ru.nl> Message-ID: Dear Jörn, Thanks you very much for you tip. I try to play with it. Davide On Fri, Oct 21, 2011 at 12:13 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Davide, > > I was hesitant to answer, because I thought others know more than me. But > since none responded, I can try to help with my limited knowledge. > > From my knowledge of source reconstruction, I can just say that if all your > source reconstructions are in the same space (say, MNI), you can use the > .pos from your template to overcome this problem. I am not using > ft_volumenormalise, so I have no experience what is exactly going on there. > I would assume, however, that volumenormalise will transofmr your source > structures to a common space. > However, I stick to normalizing the following way: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > Hope it helps at least a little bit. > Best, > Jörn > > > On 10/19/2011 6:12 PM, Davide Rivolta wrote: > > Hi Michael, > > I am using the single shell (Nolte). > > The grid has 2340 positions, but I am not still using mni. > > Thanks, > > Davide > > On Wed, Oct 19, 2011 at 5:44 PM, Michael Wibral wrote: > >> Hi davide, >> >> what headmodel and grid are you using? >> >> Michael >> >> >> ------------------------------ >> *Von:* "Davide Rivolta" >> *Gesendet:* Oct 19, 2011 3:54:37 PM >> *An:* "Email discussion list for the FieldTrip project" < >> fieldtrip at donders.ru.nl> >> *Betreff:* [FieldTrip] beamforming - normilise issue >> >> >> Dear all, >> >> I am trying to use beamforming for some MEG data. >> >> I have 1 condition, and I wish to compare it against the baseline. Ideally >> I wish to have the average of all group and statistically compare stimulus >> agains baseline.. >> >> As such, for each subject I calculate the source for the baseline and the >> source for the stimulus (using a common filter as indicated on the website). >> >> I then call ft_sourceinterpolate and, since I wish to have a group >> analysis, ft_volumenormalise. >> In order to compute the average, I call ft_sourcegrandaverage. >> >> Even though the help tells me that it is fine, the grandaverage does not >> work if the input is from the ft_volumenormalise. It is because there is not >> the ".pos" field! >> >> Am I doing something wrong? >> >> Any advice would be great. >> >> Thanks a lot, >> >> Davide >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Davide Rivolta, PhD > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.gm88 at gmail.com Mon Oct 24 13:13:20 2011 From: ali.gm88 at gmail.com (=?ISO-8859-1?Q?Alicia_Gonz=E1lez?=) Date: Mon, 24 Oct 2011 13:13:20 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: Hi, I solved the problem adding: cfg.artfctdef.zvalue.feedback = 'yes'; Now I can see the figures of the z-score of the processed data. El 21 de octubre de 2011 11:08, Alicia González escribió: > I'm using the data provided in the tutorial: ArtifactMEG.ds (This dataset > was acquired continuously with trials of 10 seconds, and during the > recording the experimenter instructed the subject to make artifacts and > wrote down the trial number in which the artifacts were made) > And I running the code below: > > cfg = []; > cfg.dataset = 'ArtifactMEG.ds'; > cfg.headerformat = 'ctf_ds'; > ctf.dataformat = 'ctf_ds'; > cfg.trialdef.eventtype = 'trial'; > cfg = ft_definetrial(cfg); > > trl = cfg.trl(1:50,:); % just use the first 50 trials > for the time being > > % jump > cfg = []; > cfg.trl = trl; > cfg.padding = 0; > cfg.datafile = 'ArtifactMEG.ds'; > cfg.headerfile = 'ArtifactMEG.ds'; > cfg.continuous = 'yes'; > > % channel selection, cutoff and padding > cfg.artfctdef.zvalue.channel = 'MEG'; > cfg.artfctdef.zvalue.cutoff = 20; > cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; > cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; > cfg.artfctdef.zvalue.fltpadding = 0; > > % algorithmic parameters > cfg.artfctdef.zvalue.cumulative = 'yes'; > cfg.artfctdef.zvalue.medianfilter = 'yes'; > cfg.artfctdef.zvalue.medianfiltord = 9; > cfg.artfctdef.zvalue.absdiff = 'yes'; > > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > > [cfg, artifact_jump] = ft_artifact_zvalue(cfg); > > 2011/10/21 jan-mathijs schoffelen > >> Hi Alicia, >> >> In order to be able to address your problem we need some additional >> feedback of course. What kind of data are you using, etc? >> >> BW, >> >> JM >> >> On Oct 21, 2011, at 8:34 AM, Alicia González wrote: >> >> >> >> Hi, >> >> I'm trying to do automatic artifact rejection using the tutorial on the >> site. It seems that everything runs ok but, when I try to see the z-score >> figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears >> (and no errors are found). I'm just using the code from the tutorial without >> changes. >> >> thanks in advance. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> Jan-Mathijs Schoffelen, MD PhD >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Oct 24 13:29:02 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 24 Oct 2011 13:29:02 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: <521F4477-3985-42CD-82D1-044F6AEE4995@donders.ru.nl> Hi Alicia, OK. Good that you found the solution. This indicates to me that you have been using an older version of FieldTrip, where the option indeed was called 'feedback'. In the newer FieldTrip version, this option has been renamed into 'interactive'. We try to provide backward compatibility support, so in general a newer version still works (for a while at least) with old options. The other way around is of course not possible to achieve in general. In this case the documentation was up-to-date, but your code was not. I would expect the problem to go away if you download a recent version of FieldTrip. Best wishes, Jan-Mathijs On Oct 24, 2011, at 1:13 PM, Alicia González wrote: > Hi, > > I solved the problem adding: > cfg.artfctdef.zvalue.feedback = 'yes'; > Now I can see the figures of the z-score of the processed data. > > El 21 de octubre de 2011 11:08, Alicia González escribió: > I'm using the data provided in the tutorial: ArtifactMEG.ds (This dataset was acquired continuously with trials of 10 seconds, and during the recording the experimenter instructed the subject to make artifacts and wrote down the trial number in which the artifacts were made) > And I running the code below: > > cfg = []; > cfg.dataset = 'ArtifactMEG.ds'; > cfg.headerformat = 'ctf_ds'; > ctf.dataformat = 'ctf_ds'; > cfg.trialdef.eventtype = 'trial'; > cfg = ft_definetrial(cfg); > > trl = cfg.trl(1:50,:); % just use the first 50 trials for the time being > > % jump > cfg = []; > cfg.trl = trl; > cfg.padding = 0; > cfg.datafile = 'ArtifactMEG.ds'; > cfg.headerfile = 'ArtifactMEG.ds'; > cfg.continuous = 'yes'; > > % channel selection, cutoff and padding > cfg.artfctdef.zvalue.channel = 'MEG'; > cfg.artfctdef.zvalue.cutoff = 20; > cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; > cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; > cfg.artfctdef.zvalue.fltpadding = 0; > > % algorithmic parameters > cfg.artfctdef.zvalue.cumulative = 'yes'; > cfg.artfctdef.zvalue.medianfilter = 'yes'; > cfg.artfctdef.zvalue.medianfiltord = 9; > cfg.artfctdef.zvalue.absdiff = 'yes'; > > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > > [cfg, artifact_jump] = ft_artifact_zvalue(cfg); > > 2011/10/21 jan-mathijs schoffelen > Hi Alicia, > > In order to be able to address your problem we need some additional feedback of course. What kind of data are you using, etc? > > BW, > > JM > > On Oct 21, 2011, at 8:34 AM, Alicia González wrote: > >> >> >> Hi, >> >> I'm trying to do automatic artifact rejection using the tutorial on the site. It seems that everything runs ok but, when I try to see the z-score figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears (and no errors are found). I'm just using the code from the tutorial without changes. >> >> thanks in advance. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Margit.Schoenherr at uk-erlangen.de Mon Oct 24 14:41:53 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Mon, 24 Oct 2011 14:41:53 +0200 Subject: [FieldTrip] questions about forward calculations Message-ID: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE32@XMAIL1.medads.uk-erlangen.de> Hello, I have some questions regarding forward computations. 1) How is the definition of the EEG leadfield - does the dipole point from red to blue or from blue to red? I obtain different results when I compute the leadfield of the same dipole either with a 3-concentric-spheres volume conductor or with BEM (openmeeg). 2) In which units are the leadfields given? For the 3-concentric-spheres volume conductor, the magnitude of the field is 70, for BEM 2e-5. 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the single sphere. For the single sphere model, the field strength is 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the BEM forward field of the same dipole has strength 1e-11. What is the unit here? Thanks! Margit From jm.horschig at donders.ru.nl Mon Oct 24 16:20:39 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 24 Oct 2011 16:20:39 +0200 Subject: [FieldTrip] problem with clusterplot In-Reply-To: <2B510BFE-967F-47C2-A920-AA78590FF0DA@rug.nl> References: <2B510BFE-967F-47C2-A920-AA78590FF0DA@rug.nl> Message-ID: <4EA57437.9080908@donders.ru.nl> Hey Marieke, I just checked your workspace, and realized that in your cfg there is no field parameter. Maybe something went wrong or you made a typo somewhere. Just setting cfg.parameter='prob' solved the problem for me and ft_clusterplot works nicely (nice cluster, btw). /the call to "ft_clusterplot" took 20 seconds and an estimated NaN MB >> cfg cfg = alpha: 0.1000 elec: [1x1 struct] zlim: [-2 2] parameter: 'prob'/ Best, Jörn On 10/24/2011 11:35 AM, Marieke van Vugt wrote: > Hi everyone, > I am trying to use ft_clusterplot after having done > ft_timelockstatistics. I get the following error: > >>cfg = []; > >>cfg.alpha = 0.1; > >>cfg.parameter = 'prob'; > >>cfg.elec = timelockLow.elec; > > >> ft_clusterplot(cfg,stat); > creating layout from cfg.elec > creating layout for ext1020 system > There are 1 clusters smaller than alpha (0.1) > Positive cluster: 1, pvalue: 0.065 (+), t = 0.712 to 0.836 > *??? Reference to non-existent field 'parameter'.* > > Error in ==> ft_topoplotER at 610 > dat = data.(cfg.parameter); > > Error in ==> ft_clusterplot at 339 > ft_topoplotER(cfgtopo, stat); > 610 dat = data.(cfg.parameter); > K>> dbquit > > In general the stat output looks fine. > You can find the 'stat' and 'cfg' variables that I use in my dropbox: > http://dl.dropbox.com/u/13997261/clusterProblem.mat > > Does anyone know what's going on here? I could not figure out what the > field 'parameter' should be and why it was not existing in the first > place. > Thanks a lot in advance for your help, > Marieke > ---------------------------------------------------------------------------- > Marieke van Vugt, PhD > Assistant Professor, Cognitive Modeling Group > Bernoulliborg, room 326 > Nijenborgh 9 > 9747 AG Groningen > The Netherlands > phone: +31-6-51954984 (cell) > +31-50-363-9487 (office) > http://www.ai.rug.nl/~mkvanvugt > m.k.van.vugt at rug.nl > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Mon Oct 24 16:57:18 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Mon, 24 Oct 2011 16:57:18 +0200 Subject: [FieldTrip] problem with clusterplot In-Reply-To: <4EA57437.9080908@donders.ru.nl> References: <2B510BFE-967F-47C2-A920-AA78590FF0DA@rug.nl> <4EA57437.9080908@donders.ru.nl> Message-ID: Hi Jörn, yes, that totally fixes it! I just did not find that in the tutorial I used: http://fieldtrip.fcdonders.nl/tutorial/eventrelatedstatistics Thanks a lot for the help, Marieke On Oct 24, 2011, at 4:20 , Jörn M. Horschig wrote: > Hey Marieke, > > I just checked your workspace, and realized that in your cfg there is no field parameter. Maybe something went wrong or you made a typo somewhere. Just setting cfg.parameter='prob' solved the problem for me and ft_clusterplot works nicely (nice cluster, btw). > > the call to "ft_clusterplot" took 20 seconds and an estimated NaN MB > >> cfg > > cfg = > > alpha: 0.1000 > elec: [1x1 struct] > zlim: [-2 2] > parameter: 'prob' > > > Best, > Jörn > > > > > On 10/24/2011 11:35 AM, Marieke van Vugt wrote: >> >> Hi everyone, >> I am trying to use ft_clusterplot after having done ft_timelockstatistics. I get the following error: >> >>cfg = []; >> >>cfg.alpha = 0.1; >> >>cfg.parameter = 'prob'; >> >>cfg.elec = timelockLow.elec; >> >> >> ft_clusterplot(cfg,stat); >> creating layout from cfg.elec >> creating layout for ext1020 system >> There are 1 clusters smaller than alpha (0.1) >> Positive cluster: 1, pvalue: 0.065 (+), t = 0.712 to 0.836 >> ??? Reference to non-existent field 'parameter'. >> >> Error in ==> ft_topoplotER at 610 >> dat = data.(cfg.parameter); >> >> Error in ==> ft_clusterplot at 339 >> ft_topoplotER(cfgtopo, stat); >> >> 610 dat = data.(cfg.parameter); >> K>> dbquit >> >> In general the stat output looks fine. >> You can find the 'stat' and 'cfg' variables that I use in my dropbox: http://dl.dropbox.com/u/13997261/clusterProblem.mat >> >> Does anyone know what's going on here? I could not figure out what the field 'parameter' should be and why it was not existing in the first place. >> Thanks a lot in advance for your help, >> Marieke >> ---------------------------------------------------------------------------- >> Marieke van Vugt, PhD >> Assistant Professor, Cognitive Modeling Group >> Bernoulliborg, room 326 >> Nijenborgh 9 >> 9747 AG Groningen >> The Netherlands >> phone: +31-6-51954984 (cell) >> +31-50-363-9487 (office) >> http://www.ai.rug.nl/~mkvanvugt >> m.k.van.vugt at rug.nl >> >> >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Tue Oct 25 15:16:35 2011 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Tue, 25 Oct 2011 15:16:35 +0200 (CEST) Subject: [FieldTrip] beamforming tutorial problem In-Reply-To: <62238448.683628.1319548183818.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <1507509658.683740.1319548595236.JavaMail.root@monoceros.zimbra.ru.nl> Hi 'trippers, I've been making my way through the tutorial on the fieldtrip website in an effort to teach myself about source localisation using beamforming. I tried - unsuccessfully - to adapt the code to my own MEG data, and have now resorted to copypasting my way through the tutorial and seeing what each function does to the sample data, in an attempt to build my own analysis pipeline. I get as far as creating the head model from the segmented brain surface and then I get the following error. (Note that I've just been copypasting the tutorial commands without altering them, so I've not specified anything else in my workspace. It should be clear what's there.) %%% (I input) cfg = []; vol = ft_prepare_singleshell(cfg, segmentedmri); (fieldtrip's response) not downsampling csf not downsampling gray not downsampling white the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB using the segmentation approach using the segmented MRI including gray matter in segmentation for brain compartment including white matter in segmentation for brain compartment including CSF in segmentation for brain compartment smoothing the segmentation with a 5-pixel FWHM kernel triangulating the boundary of compartment 1 (nasty red matlab response) ??? Attempted to access cfg.numvertices(1); index out of bounds because numel(cfg.numvertices)=0. Error in ==> prepare_mesh_segmentation at 75 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); %%% Now, matlab is right about one thing: numel(cfg.numvertices) is indeed zero, as the tutorial doesn't specify *anything* in the cfg structure to pass to ft_prepare_singleshell. However, the documentation for ft_prepare_singleshell states that when no value is given for numvertices, a default value of 3000 is used. So, what's going on here? Update: I also tried specifying cfg.numvertices=3000 and passing that to ft_prepare_singleshell, since that's supposed to be the default value. This was the result: %%% ??? Error using ==> cgprechecks at 35 Data points containing Inf or NaN are not supported. Error in ==> convhulln at 42 cgprechecks(x, nargin, cg_opt); Error in ==> ksphere at 49 tri = convhulln(pnt); Error in ==> triangulate_seg at 44 [pnt, tri] = ksphere(npnt); Error in ==> prepare_mesh_segmentation at 75 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); %%% I don't know where to begin with this. Can somebody advise? Best, Tom -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands From alexandre.gramfort at inria.fr Tue Oct 25 15:41:10 2011 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Tue, 25 Oct 2011 09:41:10 -0400 Subject: [FieldTrip] questions about forward calculations In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE32@XMAIL1.medads.uk-erlangen.de> References: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE32@XMAIL1.medads.uk-erlangen.de> Message-ID: Hello Margit, > I have some questions regarding forward computations. > > 1) How is the definition of the EEG leadfield - does the dipole point from red to blue or from blue to red? I obtain different results when I compute the leadfield of the same dipole either with a 3-concentric-spheres volume conductor or with BEM (openmeeg). do you say that you get different polarity for sphere and OpenMEEG? if it's the case my only guess it that the triangles of the boundary meshes are not properly oriented. Maybe Cristiano who looked at this recently can comment. does the toy example behave properly? In external/openmeeg/openmeeg_eeg_leadfield_example.m > 2) In which units are the leadfields given? For the 3-concentric-spheres volume conductor, the magnitude of the field is 70, for BEM 2e-5. If the input meshes passed to OpenMEEG are in meters and dipole currents in Am then the leadfield should give EEG potentials in V. > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the single sphere. For the single sphere model, the field strength is 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the BEM forward field of the same dipole has strength 1e-11. What is the unit here? Make sure your BEM surfaces are expressed in meters and not millimeters like it is often the case in MRI coordinates, and tell me if you still see some inconsistent results. Best, Alex -- Alexandre Gramfort, PhD gramfort at nmr.mgh.harvard.edu Dept. of Radiology MGH Martinos Center / Harvard Medical School http://www-sop.inria.fr/members/Alexandre.Gramfort/ From sangita.dandekar at gmail.com Tue Oct 25 19:55:39 2011 From: sangita.dandekar at gmail.com (Sangita Dandekar) Date: Tue, 25 Oct 2011 13:55:39 -0400 Subject: [FieldTrip] [FIELDTRIP] Independent channels stats question In-Reply-To: References: <5D04F2D6-F2EE-43CB-9A86-678035373E7B@donders.ru.nl> Message-ID: Hi Fieldtrippers, I have questions similar to the ones asked a while back in the discussion archive. (See discussion pasted below my email if you're interested) We have ~200 intracranial EEG electrodes, which we assume are independent, and the question is how to apply cluster statistics to time frequency data while accounting for the multiple comparisons problem. In the archived discussion below, it was suggested that cluster statistics be applied to each channel separately, and then, to account for MCP, apply Bonferroni correction on the resulting p-values. However, as was pointed out in the discussion below, with ~200 electrodes Bonferroni correction is overly conservative. Another possibility suggested in the archived discussion was FDR correction on the results of cluster statistics, but it isn't clear to me how this would be done. If anyone can explain how FDR can be applied to the results of cluster statistics, please let me know. I think a third possible solution to the problem is to get a 'global' null distribution as follows: Repeatedly: 1. Randomly partition data 2. Find time frequency clusters and the associated sum of t-statistics for each TFR cluster (do this WITHOUT clustering over electrodes/space, thereby treating each channel independently) 3. Record maximum t-statistic sum in a 'global' null distribution on each iteration. (Search over all electrodes for this maximum) Then one could compare the clusters as observed in the actual data (as determined independently at each electrode) to the global null distribution to get the false alarm rate associated with any cluster. I think the above should account for the MCP. Is there anyway to implement the above procedure in Fieldtrip without modifying the underlying functions? I know how to do a for loop around freqstatistics to treat each channel separately and then get the null distribution of tstat maxima and cluster statistics for each channel separately, but I am not sure if it is possible to treat each channel independently as I have outlined above and also get a global null distribution over all channels (without making some changes to the underlying FT functions, that is). Thanks in advance for any help! Sangi On Tue, Jul 6, 2010 at 12:47 PM, Matthew Davidson wrote: > Jan-Mathis, thanks for the response. > > Unfortunately, we tend to have a lot of channels (~120-200), and once > we start using microelectrodes in the patients, it'll only get worse. > > If we were to divide our alpha by 120-200, wouldn't we have to run > 120-200 times as many permutations in order to get p-values low enough > to survive Bonferroni correction? That's a large jump; we might have > to run 100,000 permutations! > > What do you think about something like FDR correction instead? > > Matthew > > On Tue, Jul 6, 2010 at 7:21 AM, jan-mathijs schoffelen > wrote: > > Dear Matthew, > > > > Your sensitivity problem is a known issue when using cluster-based test > > statistics, in which it is difficult to get small clusters significant in > > the presence of large clusters. This could also occur within a single > > channel (for example with a time-frequency decomposition, in which the > > summed spectro-temporal extent of an alpha-band effect could be much > bigger > > than a gamma-band effect). > > In your case I think it would be statistically valid to do the > cluster-based > > permutation test on each channel separately (which will involve a for > loop > > around ft_freqstatistics, because it is not implemented in the fieldtrip > > code) and doing a post-hoc Bonferroni correction on the resulting > p-values. > > If the number of channels is not too big, this might work. > > > > Good luck, > > > > Jan-Mathijs > > > > > > On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: > > > >> Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG > >> Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using > >> Fieldtrip more directly. > >> > >> My question pertains to cluster-based correction when channels are > >> independent. My data is primarily intracranial EEG, and due to the > >> 1/f^2 power drop-off, electrodes directly on the brain reflect local > >> activity much more strongly than sensors further away. As a result, we > >> treat them as independent. Now, I can force the Fieldtrip clustering > >> algorithm to not cluster across channels by setting: > >> > >> cfg.neighbours = []; > >> cfg.minnbchan = 0; > >> > >> but it still computes the maximum cluster size for a particular > >> permutation based on *all* the data. This seems... less sensitive > >> somehow, as if large clusters in one channel negatively impact the > >> significance of clusters in another channel. > >> > >> Is there a better way to do this and still solve the MCP? E.g., > >> compute the maxsum on each channel separately, and then use something > >> like FDR or Bonferroni correction on the maxsums across channels? > >> > >> Thanks for any advice you may have, and thanks for producing fieldtrip! > >> Matthew > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users of > the > >> FieldTrip toolbox, to share experiences and to discuss new ideas for > MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > >> > > > > Dr. J.M. (Jan-Mathijs) Schoffelen > > Donders Institute for Brain, Cognition and Behaviour, > > Centre for Cognitive Neuroimaging, > > Radboud University Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > > Telephone: 0031-24-3668063 > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > > and EEG analysis. See also > > http://listserv.surfnet.nl/archives/fieldtrip.html and > > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Tue Oct 25 20:43:22 2011 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Tue, 25 Oct 2011 19:43:22 +0100 Subject: [FieldTrip] [FIELDTRIP] Independent channels stats question In-Reply-To: References: <5D04F2D6-F2EE-43CB-9A86-678035373E7B@donders.ru.nl> Message-ID: Dear Sangi, Eric might correct me if I'm wrong but when you do cluster-based stats and your cfg.neighbors structure is empty what happens is exactly what you described. You are still effectively correcting for 200 channels just not for all the pixels so it should be quite close to Bonferoni across channels. Best, Vladimir On Tue, Oct 25, 2011 at 6:55 PM, Sangita Dandekar wrote: > Hi Fieldtrippers, > > I have questions similar to the ones asked a while back in the discussion > archive. (See discussion pasted below my email if you're interested) > > We have ~200  intracranial EEG electrodes, which we assume are independent, > and the question is how to apply > cluster statistics to time frequency data while accounting for the multiple > comparisons problem. > > In the archived discussion below, it was suggested that cluster statistics > be applied to each  channel separately, and then, to account for MCP, apply > Bonferroni correction on the resulting p-values.  However, as was pointed > out in the discussion below, with ~200 electrodes Bonferroni > correction is overly conservative.  Another possibility suggested in the > archived discussion was  FDR correction on the results of cluster > statistics, but it isn't clear to me > how this would be done.  If anyone can explain how FDR can be applied to the > results of cluster statistics, please let me know. > > I think a third possible solution to the problem is to get a 'global' null > distribution as follows: > > Repeatedly: > 1.  Randomly partition data > 2.  Find time frequency clusters and the associated sum of t-statistics for > each TFR cluster (do this WITHOUT clustering over electrodes/space, thereby > treating each channel independently) > 3.  Record maximum t-statistic sum in a 'global' null distribution on each > iteration.   (Search over all electrodes for this maximum) > > Then one could compare the clusters as observed in the actual data (as > determined independently at each electrode) to the global null distribution > to get the false alarm rate > associated with any cluster.  I think the above should account for the MCP. > > Is there anyway to implement the above procedure in Fieldtrip without > modifying the underlying functions?  I know how to do a for loop around > freqstatistics to treat each channel separately and then get the null > distribution of tstat maxima and cluster statistics for each channel > separately, but I am not sure > if it is possible to treat each channel independently as I have outlined > above and also get a global null distribution over all channels  (without > making some > changes to the underlying FT functions, that is). > > Thanks in advance for any help! > Sangi > > > > > > > > > > > > > > On Tue, Jul 6, 2010 at 12:47 PM, Matthew Davidson wrote: >> >> Jan-Mathis, thanks for the response. >> >> Unfortunately, we tend to have a lot of channels (~120-200), and once >> we start using microelectrodes in the patients, it'll only get worse. >> >> If we were to divide our alpha by 120-200, wouldn't we have to run >> 120-200 times as many permutations in order to get p-values low enough >> to survive Bonferroni correction? That's a large jump; we might have >> to run 100,000 permutations! >> >> What do you think about something like FDR correction instead? >> >> Matthew >> >> On Tue, Jul 6, 2010 at 7:21 AM, jan-mathijs schoffelen >> wrote: >> > Dear Matthew, >> > >> > Your sensitivity problem is a known issue when using cluster-based test >> > statistics, in which it is difficult to get small clusters significant >> > in >> > the presence of large clusters. This could also occur within a single >> > channel (for example with a time-frequency decomposition, in which the >> > summed spectro-temporal extent of an alpha-band effect could be much >> > bigger >> > than a gamma-band effect). >> > In your case I think it would be statistically valid to do the >> > cluster-based >> > permutation test on each channel separately (which will involve a for >> > loop >> > around ft_freqstatistics, because it is not implemented in the fieldtrip >> > code) and doing a post-hoc Bonferroni correction on the resulting >> > p-values. >> > If the number of channels is not too big, this might work. >> > >> > Good luck, >> > >> > Jan-Mathijs >> > >> > >> > On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: >> > >> >> Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG >> >> Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using >> >> Fieldtrip more directly. >> >> >> >> My question pertains to cluster-based correction when channels are >> >> independent. My data is primarily intracranial EEG, and due to the >> >> 1/f^2 power drop-off, electrodes directly on the brain reflect local >> >> activity much more strongly than sensors further away. As a result, we >> >> treat them as independent. Now, I can force the Fieldtrip clustering >> >> algorithm to not cluster across channels by setting: >> >> >> >> cfg.neighbours = []; >> >> cfg.minnbchan = 0; >> >> >> >> but it still computes the maximum cluster size for a particular >> >> permutation based on *all* the data. This seems... less sensitive >> >> somehow, as if large clusters in one channel negatively impact the >> >> significance of clusters in another channel. >> >> >> >> Is there a better way to do this and still solve the MCP? E.g., >> >> compute the maxsum on each channel separately, and then use something >> >> like FDR or Bonferroni correction on the maxsums across channels? >> >> >> >> Thanks for any advice you may have, and thanks for producing fieldtrip! >> >> Matthew >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of >> >> the >> >> FieldTrip  toolbox, to share experiences and to discuss new ideas for >> >> MEG >> >> and EEG analysis. See also >> >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> >> http://www.ru.nl/neuroimaging/fieldtrip. >> >> >> > >> > Dr. J.M. (Jan-Mathijs) Schoffelen >> > Donders Institute for Brain, Cognition and Behaviour, >> > Centre for Cognitive Neuroimaging, >> > Radboud University Nijmegen, The Netherlands >> > J.Schoffelen at donders.ru.nl >> > Telephone: 0031-24-3668063 >> > >> > ---------------------------------- >> > The aim of this list is to facilitate the discussion between users of >> > the >> > FieldTrip  toolbox, to share experiences and to discuss new ideas for >> > MEG >> > and EEG analysis. See also >> > http://listserv.surfnet.nl/archives/fieldtrip.html and >> > http://www.ru.nl/neuroimaging/fieldtrip. >> > >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From Lilla.Magyari at mpi.nl Wed Oct 26 11:21:16 2011 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Wed, 26 Oct 2011 11:21:16 +0200 Subject: [FieldTrip] beamforming tutorial problem In-Reply-To: <1507509658.683740.1319548595236.JavaMail.root@monoceros.zimbra.ru.nl> References: <1507509658.683740.1319548595236.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <4EA7D10C.7050605@mpi.nl> hi Tom, I've just got the same error on my own data, I filed it as a bug. But I could do the same with cfg=[]; cfg.method = 'singleshell'; vol = ft_prepare_headmodel(cfg,seg); Best, Lilla Marshall, T.R. (Tom) wrote: > Hi 'trippers, > > I've been making my way through the tutorial on the fieldtrip website in an effort to teach myself about source localisation using beamforming. I tried - unsuccessfully - to adapt the code to my own MEG data, and have now resorted to copypasting my way through the tutorial and seeing what each function does to the sample data, in an attempt to build my own analysis pipeline. > > I get as far as creating the head model from the segmented brain surface and then I get the following error. > > (Note that I've just been copypasting the tutorial commands without altering them, so I've not specified anything else in my workspace. It should be clear what's there.) > > %%% > > (I input) > > cfg = []; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > > (fieldtrip's response) > > not downsampling csf > not downsampling gray > not downsampling white > the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB > using the segmentation approach > using the segmented MRI > including gray matter in segmentation for brain compartment > including white matter in segmentation for brain compartment > including CSF in segmentation for brain compartment > smoothing the segmentation with a 5-pixel FWHM kernel > triangulating the boundary of compartment 1 > > > (nasty red matlab response) > > ??? Attempted to access cfg.numvertices(1); index out of bounds because > numel(cfg.numvertices)=0. > > Error in ==> prepare_mesh_segmentation at 75 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > %%% > > Now, matlab is right about one thing: numel(cfg.numvertices) is indeed zero, as the tutorial doesn't specify *anything* in the cfg structure to pass to ft_prepare_singleshell. However, the documentation for ft_prepare_singleshell states that when no value is given for numvertices, a default value of 3000 is used. So, what's going on here? > > Update: I also tried specifying cfg.numvertices=3000 and passing that to ft_prepare_singleshell, since that's supposed to be the default value. This was the result: > > %%% > > ??? Error using ==> cgprechecks at 35 > Data points containing Inf or NaN are not supported. > > Error in ==> convhulln at 42 > cgprechecks(x, nargin, cg_opt); > > Error in ==> ksphere at 49 > tri = convhulln(pnt); > > Error in ==> triangulate_seg at 44 > [pnt, tri] = ksphere(npnt); > > Error in ==> prepare_mesh_segmentation at 75 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > %%% > > I don't know where to begin with this. Can somebody advise? > > Best, > Tom > -- PhD student Language and Cognition Group research assistant Neurobiology of Language Group Max Planck Institute for Psycholinguistics Nijmegen, P.O. Box 310, 6500AH, the Netherlands Phone: 0031 24 3521561 From c.micheli at fcdonders.ru.nl Wed Oct 26 11:24:46 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Wed, 26 Oct 2011 11:24:46 +0200 (CEST) Subject: [FieldTrip] questions about forward calculations In-Reply-To: <2084749132.107220.1319620059098.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <424401516.107777.1319621086957.JavaMail.root@draco.zimbra.ru.nl> Hi Margit I could replicate the behavior that you described in point 1) the last email and at the moment we are checking that all required options within FieldFrip and OpenMEEG are set correctly. For your points 2) and 3) I could not replicate the problem. Everything should work fine if the units of the sensors and the volume conductor are consistent. However, we are working to make units management more handy for the users, so that ambiguities like this can be solved. Please, keep posted on the mailing list to track the changes in the near future. Could you maybe paste your source code here in the mailing list? Cheers, Cristiano ----- "Alexandre Gramfort" schreef: > Van: "Alexandre Gramfort" > Aan: "Email discussion list for the FieldTrip project" , "c micheli" > , "Margit Schoenherr" > Verzonden: Dinsdag 25 oktober 2011 15:41:10 > Onderwerp: Re: [FieldTrip] questions about forward calculations > > Hello Margit, > > > I have some questions regarding forward computations. > > > > 1) How is the definition of the EEG leadfield - does the dipole > point from red to blue or from blue to red? I obtain different results > when I compute the leadfield of the same dipole either with a > 3-concentric-spheres volume conductor or with BEM (openmeeg). > > do you say that you get different polarity for sphere and OpenMEEG? > if > it's the case my only > guess it that the triangles of the boundary meshes are not properly > oriented. Maybe Cristiano > who looked at this recently can comment. > > does the toy example behave properly? In > external/openmeeg/openmeeg_eeg_leadfield_example.m > > > 2) In which units are the leadfields given? For the > 3-concentric-spheres volume conductor, the magnitude of the field is > 70, for BEM 2e-5. > > If the input meshes passed to OpenMEEG are in meters and dipole > currents in Am then the leadfield should give EEG potentials in V. > > > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the > single sphere. For the single sphere model, the field strength is > 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the > BEM forward field of the same dipole has strength 1e-11. What is the > unit here? > > Make sure your BEM surfaces are expressed in meters and not > millimeters like it is often the > case in MRI coordinates, and tell me if you still see some > inconsistent results. > > Best, > Alex > -- > Alexandre Gramfort, PhD > gramfort at nmr.mgh.harvard.edu > Dept. of Radiology MGH Martinos Center / Harvard Medical School > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From B.Mouthaan at neuro.umcn.nl Wed Oct 26 12:08:55 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 26 Oct 2011 12:08:55 +0200 Subject: [FieldTrip] Creating Leadfield using BEM Message-ID: Dear Fieldtrippers, I am trying to compute a beamform localisation using a BEM-model of the head. When I call ft_sourceanalysis i receive to following error. ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_lcmv>pinv at 367 [U,S,V] = svd(A,0); Error in ==> beamformer_lcmv at 255 filt = pinv(lf' * invCy * lf) * lf' * invCy; % van Veen eqn. 23, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 818 dip(i) = beamformer_lcmv(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); I noticed that my leadfieldgrid containend NaN values. I think this could be the cause, but I don't know how to fix this problem. Does anyone have an idea? My script is as follows vol=ft_read_vol('standard_vol.mat') elec=ft_read_sens('standard_1005.elc') % reading the 1005 systeem because the experiment used of 32 electrodes cfg=[] cfg.showlabels= 'yes' cfg.layout='EEG1010.lay' cfg.interactive= 'yes' % Reref load (['C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave0' Subject]) cfg=[] cfg.reref='yes' % referring the cfg.refchannel= 'all' % commonaverage reference diff=ft_preprocessing(cfg,diffwav) %% Creating LEADFIELD cfg = []; cfg.elec = elec; cfg.vol = vol; cfg.reducerank = 3; cfg.channel = 'all'; cfg.grid.resolution = 10; % use a 3-D grid with a 10 mm resolution [grid] = ft_prepare_leadfield(cfg); save('AnalysisM\Grid_10mm', 'grid') %% cfg = []; cfg.covariance = 'yes'; cfg.covariancewindow = [0 .75]; cfg.removemean = 'no'; tlckavgpst = ft_timelockanalysis(cfg, diff); cfg.covariancewindow = [-0.25 0]; tlckavgpre = ft_timelockanalysis(cfg, diff); %% cfg = []; cfg.method = 'lcmv'; cfg.vol = vol; cfg.elec = elec cfg.lambda = '5%'; sourcepst = ft_sourceanalysis(cfg, tlckavgpst); sourcepre = ft_sourceanalysis(cfg, tlckavgpre); sourcepst.avg.nai = sourcepst.avg.pow./sourcepre.avg.pow; Thanks in advance! Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Wed Oct 26 12:54:41 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Wed, 26 Oct 2011 12:54:41 +0200 (CEST) Subject: [FieldTrip] beamforming tutorial problem In-Reply-To: <1379565708.109728.1319626401710.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <865168068.109744.1319626481917.JavaMail.root@draco.zimbra.ru.nl> Dear Tom It seems there was an error in the call to one of the low level functions. Thanks for reporting. The bug has been fixed and now your instructions (with some modifications - see below) should run. The forward module is undergoing heavy restructuring in these days and some of the functionality could be affected. To summarize how to derive a volumetric description of your head surface, let's say that if you start from a volumetric image (anatomy of the subjects) you have to perform a series of steps on the images (realign/segment) before creating the headmodel. For this please refer to the following tutorial: http://fieldtrip.fcdonders.nl/tutorial/headmodel Once you have your segmented mri correctly in place you can call cfg = []; cfg.method = 'singleshell'; cfg.tissue = { 'skull' }; % or whatever you want to create a boundary for vol = ft_prepare_headmodel(cfg, segmentedmri); I hope it helps, Cristiano ----- "T.R. Marshall (Tom)" schreef: > Van: "T.R. Marshall (Tom)" > Aan: "fieldtrip" > Verzonden: Dinsdag 25 oktober 2011 15:16:35 > Onderwerp: [FieldTrip] beamforming tutorial problem > > Hi 'trippers, > > I've been making my way through the tutorial on the fieldtrip website > in an effort to teach myself about source localisation using > beamforming. I tried - unsuccessfully - to adapt the code to my own > MEG data, and have now resorted to copypasting my way through the > tutorial and seeing what each function does to the sample data, in an > attempt to build my own analysis pipeline. > > I get as far as creating the head model from the segmented brain > surface and then I get the following error. > > (Note that I've just been copypasting the tutorial commands without > altering them, so I've not specified anything else in my workspace. It > should be clear what's there.) > > %%% > > (I input) > > cfg = []; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > > (fieldtrip's response) > > not downsampling csf > not downsampling gray > not downsampling white > the call to "ft_volumedownsample" took 0 seconds and an estimated 0 > MB > using the segmentation approach > using the segmented MRI > including gray matter in segmentation for brain compartment > including white matter in segmentation for brain compartment > including CSF in segmentation for brain compartment > smoothing the segmentation with a 5-pixel FWHM kernel > triangulating the boundary of compartment 1 > > > (nasty red matlab response) > > ??? Attempted to access cfg.numvertices(1); index out of bounds > because > numel(cfg.numvertices)=0. > > Error in ==> prepare_mesh_segmentation at 75 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > %%% > > Now, matlab is right about one thing: numel(cfg.numvertices) is indeed > zero, as the tutorial doesn't specify *anything* in the cfg structure > to pass to ft_prepare_singleshell. However, the documentation for > ft_prepare_singleshell states that when no value is given for > numvertices, a default value of 3000 is used. So, what's going on > here? > > Update: I also tried specifying cfg.numvertices=3000 and passing that > to ft_prepare_singleshell, since that's supposed to be the default > value. This was the result: > > %%% > > ??? Error using ==> cgprechecks at 35 > Data points containing Inf or NaN are not supported. > > Error in ==> convhulln at 42 > cgprechecks(x, nargin, cg_opt); > > Error in ==> ksphere at 49 > tri = convhulln(pnt); > > Error in ==> triangulate_seg at 44 > [pnt, tri] = ksphere(npnt); > > Error in ==> prepare_mesh_segmentation at 75 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > %%% > > I don't know where to begin with this. Can somebody advise? > > Best, > Tom > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive > Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Wed Oct 26 13:04:53 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 26 Oct 2011 13:04:53 +0200 Subject: [FieldTrip] Creating Leadfield using BEM In-Reply-To: References: Message-ID: <4EA7E955.7040608@donders.ru.nl> Dear Brian, I got the same error a while ago, which was caused by a wrong segementation/triangulation of the volume (it was a bug in FieldTrip). Are you using the newest version of FieldTrip? It should be solved there. In any case, it would be wise to check your segmentation and triangulation. You can do so with ft_plot_vol and ft_plot_mesh, e.g.: / figure;hold on; ft_plot_vol(hdm, 'edgecolor', 'none');alpha 0.5;camlight ft_plot_mesh(hdm.bnd); / Hope it helps! Best, Jörn On 10/26/2011 12:08 PM, B.Mouthaan at neuro.umcn.nl wrote: > > Dear Fieldtrippers, > > I am trying to compute a beamform localisation using a BEM-model of > the head. When I call ft_sourceanalysis i receive to following error. > > ??? Error using ==> svd > Input to SVD must not contain NaN or Inf. > > Error in ==> beamformer_lcmv>pinv at 367 > [U,S,V] = svd(A,0); > > Error in ==> beamformer_lcmv at 255 > filt = pinv(lf' * invCy * lf) * lf' * invCy; % van > Veen eqn. 23, use PINV/SVD to cover rank deficient leadfield > > Error in ==> ft_sourceanalysis at 818 > dip(i) = beamformer_lcmv(grid, sens, vol, squeeze(avg(i,:,:)), > squeeze(Cy(i,:,:)), optarg{:}); > > > I noticed that my leadfieldgrid containend NaN values. I think this > could be the cause, but I don't know how to fix this problem. Does > anyone have an idea? > > My script is as follows > > vol=ft_read_vol('standard_vol.mat') > elec=ft_read_sens('standard_1005.elc') % reading the 1005 systeem > because the experiment used of 32 electrodes > > cfg=[] > cfg.showlabels= 'yes' > cfg.layout='EEG1010.lay' > cfg.interactive= 'yes' > > > % Reref > load (['C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave0' > Subject]) > > cfg=[] > cfg.reref='yes' % referring the > cfg.refchannel= 'all' % commonaverage reference > diff=ft_preprocessing(cfg,diffwav) > > %% Creating LEADFIELD > cfg = []; > cfg.elec = elec; > cfg.vol = vol; > cfg.reducerank = 3; > cfg.channel = 'all'; > cfg.grid.resolution = 10; % use a 3-D grid with a 10 mm resolution > [grid] = ft_prepare_leadfield(cfg); > > save('AnalysisM\Grid_10mm', 'grid') > > %% > cfg = []; > cfg.covariance = 'yes'; > cfg.covariancewindow = [0 .75]; > cfg.removemean = 'no'; > tlckavgpst = ft_timelockanalysis(cfg, diff); > cfg.covariancewindow = [-0.25 0]; > tlckavgpre = ft_timelockanalysis(cfg, diff); > > > %% > cfg = []; > cfg.method = 'lcmv'; > cfg.vol = vol; > cfg.elec = elec > cfg.lambda = '5%'; > sourcepst = ft_sourceanalysis(cfg, tlckavgpst); > sourcepre = ft_sourceanalysis(cfg, tlckavgpre); > > sourcepst.avg.nai = sourcepst.avg.pow./sourcepre.avg.pow; > > > Thanks in advance! > > Brian > > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in > het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the > Commercial Register of the Chamber of Commerce under file number 41055629. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Wed Oct 26 14:49:07 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 26 Oct 2011 14:49:07 +0200 Subject: [FieldTrip] Creating Leadfield using BEM Message-ID: Dear Jorn, I have update my Fieldtrip but I still receive the same error. And my leadfield still contains NaN values. However i get the additional error: ans = covariance matrix is rank deficient ??? Error using ==> mtimes Inner matrix dimensions must agree. + the old error I previously reported. So maybe some other problem? Thanks! Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Wed Oct 26 15:06:28 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 26 Oct 2011 15:06:28 +0200 Subject: [FieldTrip] Creating Leadfield using BEM Message-ID: Dear all, I also received the following information on my command screen the input is timelock data with 31 channels and 500 timebins using headmodel specified in the configuration using electrodes specified in the configuration Warning: Duplicate data points have been detected and removed. Some point indices will not be referenced by the triangulation. > In ft_prepare_vol_sens at 309 In fieldtrip-20111025\private\prepare_headmodel at 114 In ft_sourceanalysis at 332 determining source compartment (3) projecting electrodes on skin surface combining electrode transfer and system matrix creating dipole grid based on inward-shifted brain surface from volume conductor model 642 dipoles inside, 0 dipoles outside brain scanning repetition 1 Warning: covariance matrix is rank deficient > In beamformer_lcmv at 132 In ft_sourceanalysis at 818 scanning grid Warning: The input units are mm for points and S/mm for conductivity > In forward\private\warning_once at 75 In ft_compute_leadfield at 510 In beamformer_lcmv at 214 In ft_sourceanalysis at 818 Maybe this brings us more to the solution. Regards, Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Wed Oct 26 15:31:32 2011 From: fredericroux at hotmail.de (Frederic Roux) Date: Wed, 26 Oct 2011 15:31:32 +0200 Subject: [FieldTrip] zero-padding at beginning of file does not work Message-ID: Dear all, I want to pad out my signal before applying some filters while reading the data from the original ds-file. at line 578 of the preprocessing.m function it says: begsample = cfg.trl(i,1) - begpadding; Now because my signal starts at sample 1, begsample will have a negative value of course which results in the warning message warning('cannot apply enough paddig at begin of file'); Does that mean, that fieldtrip cannot pad out the signal at the beginning without throwing away the equivalent of the signal in itself? if cfg.trl(i,1) = 2400 and if begpadding = 1200 this should work, because begsample = 1200, right? But that would also mean that for padding I would loose 1200 samples. Now let's assume I would like to pad the signal to -25 sec and + 25 sec at the beginning and end. Why does the padding at the beginning require I throw away 25 sec, while the padding at the end doesn't? Any clarification on this issue would be greatly appreciated. Have a nice day. Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From chan at med.uni-frankfurt.de Wed Oct 26 16:38:59 2011 From: chan at med.uni-frankfurt.de (Jason Chan) Date: Wed, 26 Oct 2011 16:38:59 +0200 Subject: [FieldTrip] ICA and plotting Message-ID: <002001cc93ec$ff8d0a60$fea71f20$@med.uni-frankfurt.de> Hi Everyone, I am currently using Fieldtrip version 20111009. I am trying to use ICA to reject EOG artifacts. I ran a correlation between my EOG electrodes and MEG components to find the components that should be rejected. This variable I called "toreject", then used the following function: cfg = []; cfg.component = toreject; data_reject = ft_rejectcomponent(cfg, comp); When I try to plot my data using ft_topoplotER, the brain activity looks 'spotty'. However, when I add the cfg.component back into the cfg structure the activity looks correct. I have also noticed that adding this cfg.component will change the plots after I use MEGplanar and CombinePlanar. What am I doing wrong? Thank you in advance Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at mac.com Wed Oct 26 16:54:53 2011 From: nathanweisz at mac.com (Nathan Weisz) Date: Wed, 26 Oct 2011 16:54:53 +0200 Subject: [FieldTrip] ICA and plotting In-Reply-To: <002001cc93ec$ff8d0a60$fea71f20$@med.uni-frankfurt.de> References: <002001cc93ec$ff8d0a60$fea71f20$@med.uni-frankfurt.de> Message-ID: <4876264A-DFF4-4D1F-A38F-C364B800D637@mac.com> hi jason, it may be that you are rejecting too much, i.e. removing too much relevant brain activity. in general with regards to blinks and horizontal eye movements (your main sources of ocular artifacts) you should reject ~2, not (significantly) more. have you confirmed that your method is not too liberal in detecting "artefact components"? since the time-course and topography of these artefacts are so clear, "visual inspection" may be your best friend. good luck! nathan On 26.10.2011, at 16:38, Jason Chan wrote: > Hi Everyone, > > I am currently using Fieldtrip version 20111009. > > I am trying to use ICA to reject EOG artifacts. I ran a correlation between my EOG electrodes and MEG components to find the components that should be rejected. This variable I called “toreject”, then used the following function: > > cfg = []; > cfg.component = toreject; > data_reject = ft_rejectcomponent(cfg, comp); > > When I try to plot my data using ft_topoplotER, the brain activity looks ‘spotty’. However, when I add the cfg.component back into the cfg structure the activity looks correct. I have also noticed that adding this cfg.component will change the plots after I use MEGplanar and CombinePlanar. What am I doing wrong? > > Thank you in advance > Jason > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From alejosalles at gmail.com Thu Oct 27 05:12:03 2011 From: alejosalles at gmail.com (Alejo Salles) Date: Thu, 27 Oct 2011 00:12:03 -0300 Subject: [FieldTrip] saving events to file in realtime processing Message-ID: hi, I'm looking into doing EEG realtime processing using biosemi active two hardware. I use the biosemi2ft program to acquire data and create the buffer, from which I read from matlab. as the processing I need to do is not very intensive, while it's important to keep a low time lag, I'm running matlab on the same computer that does the acquisition. I would like to know how to go about sending events to be recorded in the gdf file. firstly, I'd like to know whether this is the right way to go, or if I should instead have the buffer spawned by the matlab code... can I write to the buffer from matlab even if it was spawned by biosemi2ft? supposing this is ok, how should I send the events? I understand that I should set event.sample, but I'm not sure what to put here, should I use the one after the one just read? how can I make sure this will get recorded to file? should I use a fixed delay instead? if I spawn the buffer from matlab instead, how can I then tell biosemi2ft to write the events to file? is any of these the way to do this or I should resort to send signals through the parallel port into the biosemi box? on a different note, is there a way to downsample the rate for saving the file in biosemi2ft? I gather the setting is only for streaming, but then I'm limited by the biosemi hardware to sample rates >= 2kHz, is this right? many thanks, alejo -------------- next part -------------- An HTML attachment was scrubbed... URL: From Margit.Schoenherr at uk-erlangen.de Thu Oct 27 13:16:24 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Thu, 27 Oct 2011 13:16:24 +0200 Subject: [FieldTrip] questions about forward calculations In-Reply-To: <424401516.107777.1319621086957.JavaMail.root@draco.zimbra.ru.nl> References: <2084749132.107220.1319620059098.JavaMail.root@draco.zimbra.ru.nl>, <424401516.107777.1319621086957.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE35@XMAIL1.medads.uk-erlangen.de> Hello Alex and Cristiano, thanks for your reply. I have used the code below to compute the BEM volume conductor, and with this I get the units I described in my mail. mri_segment.seg = mri_segment.scalp + mri_segment.skull + 2*mri_segment.brain; cfg_vol = []; cfg_vol.tissue = [1 2 3]; cfg_vol.numvertices = [800 1000 2000]; cfg_vol.conductivity = [1 1/80 1]; cfg_vol.isolatedsource = true; cfg_vol.method = 'openmeeg'; cfg_vol.sourceunits = 'mm'; cfg_vol.mriunits = 'mm'; vol = ft_prepare_bemmodel(cfg_vol, mri_segment); How can I ensure that my BEM surfaces are expressed in m? I have tried 2 possibilities which ended with an error and I had to quit openmeeg. The first, I changed the translation vector of mri_segment.transform (division by 1000) and set mri_segment.unit = 'm' and tried the same code as above. Second, I tried this: cfg = []; cfg.method = 'segmentation'; cfg.tissue = [1 2 3]; cfg.numvertices = [2000 1000 800]; cfg.sourceunits = 'mm'; cfg.mriunits = 'mm'; bnd = ft_prepare_mesh(cfg, mri_segment); bnd(1,1).pnt = bnd(1,1).pnt / 1000; bnd(1,2).pnt = bnd(1,2).pnt / 1000; bnd(1,3).pnt = bnd(1,3).pnt / 1000; vol = []; vol.bnd = bnd; vol.cond = [1 1/80 1]; cfg.method = 'openmeeg'; vol = ft_prepare_bemmodel(cfg, vol); Both attempts produced this error: | ------ om_minverser | ./tpf724544e_8af4_4678_aa5c_b9dc37660560.bin | ./tpd041303a_5fee_44ad_8d5d_8e7d4578f0d3.bin | ----------------------- Exception: Unable to open the file ./tpf724544e_8af4_4678_aa5c_b9dc37660560.bin for reading Doing my best.... This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Warning: an error ocurred while running OpenMEEG > In openmeeg at 121 In ft_prepare_bemmodel at 232 Error using ==> fread Invalid file identifier. Use fopen to generate a valid file identifier. Warning: File 'tp2fef7d04_3155_4852_ab97_121fa2fc7892.bin' not found. > In openmeeg>cleaner at 136 In openmeeg at 123 In ft_prepare_bemmodel at 232 Warning: File 'tp645538cf_3b4a_4e28_8a13_c061c7fca25a.bin' not found. > In openmeeg>cleaner at 137 In openmeeg at 123 In ft_prepare_bemmodel at 232 Thanks for your help! Best, Margit ________________________________________ Von: Micheli, C. [c.micheli at fcdonders.ru.nl] Gesendet: Mittwoch, 26. Oktober 2011 11:24 An: Email discussion list for the FieldTrip project Cc: Schönherr, Margit Betreff: Re: [FieldTrip] questions about forward calculations Hi Margit I could replicate the behavior that you described in point 1) the last email and at the moment we are checking that all required options within FieldFrip and OpenMEEG are set correctly. For your points 2) and 3) I could not replicate the problem. Everything should work fine if the units of the sensors and the volume conductor are consistent. However, we are working to make units management more handy for the users, so that ambiguities like this can be solved. Please, keep posted on the mailing list to track the changes in the near future. Could you maybe paste your source code here in the mailing list? Cheers, Cristiano ----- "Alexandre Gramfort" schreef: > Van: "Alexandre Gramfort" > Aan: "Email discussion list for the FieldTrip project" , "c micheli" > , "Margit Schoenherr" > Verzonden: Dinsdag 25 oktober 2011 15:41:10 > Onderwerp: Re: [FieldTrip] questions about forward calculations > > Hello Margit, > > > I have some questions regarding forward computations. > > > > 1) How is the definition of the EEG leadfield - does the dipole > point from red to blue or from blue to red? I obtain different results > when I compute the leadfield of the same dipole either with a > 3-concentric-spheres volume conductor or with BEM (openmeeg). > > do you say that you get different polarity for sphere and OpenMEEG? > if > it's the case my only > guess it that the triangles of the boundary meshes are not properly > oriented. Maybe Cristiano > who looked at this recently can comment. > > does the toy example behave properly? In > external/openmeeg/openmeeg_eeg_leadfield_example.m > > > 2) In which units are the leadfields given? For the > 3-concentric-spheres volume conductor, the magnitude of the field is > 70, for BEM 2e-5. > > If the input meshes passed to OpenMEEG are in meters and dipole > currents in Am then the leadfield should give EEG potentials in V. > > > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the > single sphere. For the single sphere model, the field strength is > 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the > BEM forward field of the same dipole has strength 1e-11. What is the > unit here? > > Make sure your BEM surfaces are expressed in meters and not > millimeters like it is often the > case in MRI coordinates, and tell me if you still see some > inconsistent results. > > Best, > Alex > -- > Alexandre Gramfort, PhD > gramfort at nmr.mgh.harvard.edu > Dept. of Radiology MGH Martinos Center / Harvard Medical School > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From B.Mouthaan at neuro.umcn.nl Thu Oct 27 14:33:44 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 27 Oct 2011 14:33:44 +0200 Subject: [FieldTrip] Dipole fitting Message-ID: Dear Fieldtrippers, I wrote a script for dipolefitting, though it doesn't work anymore since I updated Fieldtrip I receive the following error: ??? Error using ==> minus Matrix dimensions must agree. Error in ==> ft_dipolefitting at 375 grid.error(indx,1) = sum(sum(((eye(nchans)-lf*pinv(lf))*Vdata).^2)); Any ideas? Thanks! Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.wang at ucl.ac.uk Thu Oct 27 16:34:23 2011 From: julian.wang at ucl.ac.uk (Julian Wang) Date: Thu, 27 Oct 2011 15:34:23 +0100 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing Message-ID: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> Hi all, I'm trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I'm not sure if I've got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it's only expecting one row in the design matrix. If it's run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I'm not sure if it is. Is what I've done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I'm uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I'm using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian -------------- next part -------------- An HTML attachment was scrubbed... URL: From miellet at psy.gla.ac.uk Thu Oct 27 19:35:48 2011 From: miellet at psy.gla.ac.uk (miellet at psy.gla.ac.uk) Date: Thu, 27 Oct 2011 18:35:48 +0100 Subject: [FieldTrip] (no subject) Message-ID: <20111027183548.975573lhb8sj3ywk@horde.psy.gla.ac.uk> Hello, I'm trying to use ft_sourceanalysis with pcc. I specify the volume conductor model, the sensor information and a grid with pre-computed leadfields. I tried to compute the statistics over the source parameters between two conditions as indicated in the documentation (ft_sourceanalysis(cfg, freqA, freqB) with randomization). I get an error linked to the condition: if nargin>2 && strcmp(cfg.prewhiten,'no') I couldn't find any information about this cfg.prewhiten parameter. this part of the code if commented by % HACK: requires some extra defaults % HACK: use some experimental code Does anyone know if this part is functional yet please? Thanks, Sebastien ---------------------------------------------------------------- This message was sent using the Web mail system for The University of Glasgow School of Psychology ------------------------------------------------------------------ From tolgacan1 at yahoo.com Thu Oct 27 19:59:47 2011 From: tolgacan1 at yahoo.com (=?iso-8859-1?Q?Tolga_=D6zkurt?=) Date: Thu, 27 Oct 2011 10:59:47 -0700 (PDT) Subject: [FieldTrip] "time-frequency analysis" tutorial ? In-Reply-To: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> Message-ID: <1319738387.11992.YahooMailNeo@web111510.mail.gq1.yahoo.com> I apologize if I am misleading, but since yesterday night, for some reason, Fieldtrip documentation on "time-frequency analysis" is missing, i.e., there seems nothing on the page: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis I say since yesterday night, because a few hours before, I was able to see the page. Tolga -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Thu Oct 27 19:58:54 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Thu, 27 Oct 2011 11:58:54 -0600 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing In-Reply-To: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> Message-ID: <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> Julian, Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like: [1:16 1:16; ones(1,16) ones(1,16)*2] You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA On Oct 27, 2011, at 8:34 AM, Julian Wang wrote: Hi all, I’m trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I’m not sure if I’ve got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it’s only expecting one row in the design matrix. If it’s run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I’m not sure if it is. Is what I’ve done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I’m uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I’m using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Oct 27 20:03:18 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 27 Oct 2011 20:03:18 +0200 Subject: [FieldTrip] (no subject) In-Reply-To: <20111027183548.975573lhb8sj3ywk@horde.psy.gla.ac.uk> References: <20111027183548.975573lhb8sj3ywk@horde.psy.gla.ac.uk> Message-ID: Dear Seb, A few comments to your question: -I don't really remember why 'pcc' as a method shouldn't work, but I believe that a straightforward explanation why it is disabled is that once-upon-a-time the functionality you are trying to apply was designed for 'dics' as method (and as such originates from the pre-pcc era. I wonder whether it will work for cfg.method = 'dics'. -Even if it would work, it is a very computationally heavy method: data are shuffled across the conditions at the channel level and spatial filters are computed (for both conditions) for each randomization. When we implemented this method, back in the old days, we quickly abandoned it again because of the discrepancy between the computation time and the computational resources. -The functionality still being present (I still assume that it kind of works) is the consequence of us being quite devoted to backward compatibility, although I don't want to bet my money on it to work (for dics). -Nowadays, I would advise to do the randomisation testing at the source level, i.e. computing a single set of spatial filters common to both conditions (the so-called common filter approach), and then use ft_sourcestatistics for the randomization testing. To get started, you could have a look at: http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming?s[]=common&s[]=filter, although I notice that the final step (calling ft_sourcestatistics is not explained there). Cheers, JM On Oct 27, 2011, at 7:35 PM, miellet at psy.gla.ac.uk wrote: > Hello, > I'm trying to use ft_sourceanalysis with pcc. I specify the volume conductor model, the sensor information and a grid with pre-computed leadfields. > I tried to compute the statistics over the source parameters between two conditions as indicated in the documentation (ft_sourceanalysis(cfg, freqA, freqB) with randomization). > I get an error linked to the condition: > if nargin>2 && strcmp(cfg.prewhiten,'no') > I couldn't find any information about this cfg.prewhiten parameter. > this part of the code if commented by > % HACK: requires some extra defaults > % HACK: use some experimental code > Does anyone know if this part is functional yet please? > Thanks, > Sebastien > > ---------------------------------------------------------------- > This message was sent using the Web mail system for > The University of Glasgow School of Psychology > ------------------------------------------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Oct 27 20:05:12 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 27 Oct 2011 20:05:12 +0200 Subject: [FieldTrip] "time-frequency analysis" tutorial ? In-Reply-To: <1319738387.11992.YahooMailNeo@web111510.mail.gq1.yahoo.com> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> <1319738387.11992.YahooMailNeo@web111510.mail.gq1.yahoo.com> Message-ID: <88FD0AC4-F63A-4AF0-8281-74E03AB54405@donders.ru.nl> Hi Tolga, You are right. We will fix it as soon as possible. Best wishes, Jan-Mathijs On Oct 27, 2011, at 7:59 PM, Tolga Özkurt wrote: > I apologize if I am misleading, but since yesterday night, for some reason, Fieldtrip documentation on "time-frequency analysis" is missing, i.e., there seems nothing on the page: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis > > I say since yesterday night, because a few hours before, I was able to see the page. > > Tolga > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Thu Oct 27 22:09:46 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Thu, 27 Oct 2011 14:09:46 -0600 Subject: [FieldTrip] Question about ft_sourcestatistics and ft_sourcegrandaverage Message-ID: To all: I am wondering if there is a way to use ft_sourcegrandaverage and ft_sourcestatistics on cortically constrained mne source output. I have sources from ft_sourceanalysis, where the method was 'mne' and the source space was the mni cortical surface, which the MEG data were coregistered to, so all results are in the same anatomical space. However, these functions seem to require volume, or grid, type input, rather than surface input. Can someone confirm if that is correct or not and if so, would there be a way to work around this limitation? Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA From f.dipompeo at unich.it Fri Oct 28 10:21:24 2011 From: f.dipompeo at unich.it (Francesco Di Pompeo) Date: Fri, 28 Oct 2011 10:21:24 +0200 Subject: [FieldTrip] 60 Hz notch using preprocessing Message-ID: Dear all, I need a 60 Hz notch filter before the ICA of continuous 4D data. I did it using ft_preprocessing but the 60 Hz line is still there.. Something wrong in my script? cfg = []; cfg.dataset = '0'; cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; cfg.bpfilter = 'yes'; cfg.bpfreq = [1 150]; cfg.dftfilter = 'yes'; cfg.dftfreq = [60 120 180]; data_meg = ft_preprocessing(cfg); ----------------------------------------------------------------- Francesco Di Pompeo, PhD Institute of Advanced Biomedical Technologies and Department of Neuroscience and Imaging University of Chieti "G. d'Annunzio" Via dei Vestini - Campus Universitario 66013 Chieti - ITALY ph: +39-0871-3556907 fax:+39-0871-3556930 From two.frank at gmail.com Fri Oct 28 10:29:31 2011 From: two.frank at gmail.com (two frank) Date: Fri, 28 Oct 2011 01:29:31 -0700 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: References: Message-ID: Based on my experience, it seems that this can only be done in the epoched data but not in the continuous EEG data. Thoughts or comments from other fieldtrippers?? On Fri, Oct 28, 2011 at 1:21 AM, Francesco Di Pompeo wrote: > Dear all, > > I need a 60 Hz notch filter before the ICA of continuous 4D data. > I did it using ft_preprocessing but the 60 Hz line is still there.. > > Something wrong in my script? > > > cfg = []; > cfg.dataset = '0'; > cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; > > cfg.bpfilter = 'yes'; > cfg.bpfreq = [1 150]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = [60 120 180]; > > data_meg = ft_preprocessing(cfg); > > > > > ----------------------------------------------------------------- > Francesco Di Pompeo, PhD > Institute of Advanced Biomedical Technologies and > Department of Neuroscience and Imaging > University of Chieti "G. d'Annunzio" > Via dei Vestini - Campus Universitario > 66013 Chieti - ITALY > ph: +39-0871-3556907 > fax:+39-0871-3556930 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Frank -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Oct 28 10:33:55 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 28 Oct 2011 10:33:55 +0200 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: References: Message-ID: <5CFB10C2-03DB-4CEF-A86E-11AFA7C790E9@donders.ru.nl> Hi Francesco, I suspect that the 60 Hz line noise is not of constant amplitude throughout the length of your trial (it seems you read in a whole session at once). Having, say, a 5-minute recording, notching out the 60 Hz with a dftfilter leads to a 1/300 Hz wide notch. This is probably too narrow given some slight 60 Hz amplitdue modulations. You could use a bandstop filter in this case. Best, Jan-Mathijs On Oct 28, 2011, at 10:21 AM, Francesco Di Pompeo wrote: > Dear all, > > I need a 60 Hz notch filter before the ICA of continuous 4D data. > I did it using ft_preprocessing but the 60 Hz line is still there.. > > Something wrong in my script? > > > cfg = []; > cfg.dataset = '0'; > cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; > > cfg.bpfilter = 'yes'; > cfg.bpfreq = [1 150]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = [60 120 180]; > > data_meg = ft_preprocessing(cfg); > > > > > ----------------------------------------------------------------- > Francesco Di Pompeo, PhD > Institute of Advanced Biomedical Technologies and > Department of Neuroscience and Imaging > University of Chieti "G. d'Annunzio" > Via dei Vestini - Campus Universitario > 66013 Chieti - ITALY > ph: +39-0871-3556907 > fax:+39-0871-3556930 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Oct 28 10:36:45 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 28 Oct 2011 10:36:45 +0200 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: References: Message-ID: Dear Francesco, A notch filter is referred to as a band-stop filter in ft_preprocessing's documentation, and is different from the (regression-based) DFT filter. To use a notch filter, specify: cfg.bsfilter = 'yes'; cfg.bsfreq = [58 62]; % or whatever you deem appropriate Note that you will have to apply ft_preprocessing repeatedly if you explicitly want to filter out the harmonics of the line noise as well. Best, Eelke 2011/10/28 Francesco Di Pompeo : > Dear all, > > I need a 60 Hz notch filter before the ICA of continuous 4D data. > I did it using ft_preprocessing but the 60 Hz line is still there.. > > Something wrong in my script? > > > cfg = []; > cfg.dataset = '0'; > cfg.channel    = {'MEG', '-A246', '-A170', '-A110', '-A19'}; > > cfg.bpfilter      = 'yes'; > cfg.bpfreq        = [1 150]; > > cfg.dftfilter     = 'yes'; > cfg.dftfreq       = [60 120 180]; > > data_meg                 = ft_preprocessing(cfg); > > > > > ----------------------------------------------------------------- > Francesco Di Pompeo, PhD > Institute of Advanced Biomedical Technologies and > Department of Neuroscience and Imaging > University of Chieti "G. d'Annunzio" > Via dei Vestini - Campus Universitario > 66013 Chieti - ITALY > ph: +39-0871-3556907 > fax:+39-0871-3556930 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From e.maris at psych.ru.nl Fri Oct 28 11:52:22 2011 From: e.maris at psych.ru.nl (Maris, E. (Eric)) Date: Fri, 28 Oct 2011 11:52:22 +0200 (CEST) Subject: [FieldTrip] Between-Trial Stats on Coherence In-Reply-To: <014701cc9355$ed10b4a0$c7321de0$@maris@psych.ru.nl> Message-ID: <678193359.130526.1319795542871.JavaMail.root@draco.zimbra.ru.nl> Hi Natalia, > when computing the statistical test for difference in coherence > between condition 1 and condition 2 (for single subject) I get NaNs > for stat. The setting code is quite simple and I did some checking for > > silly errors(ex. I dowloaded the very last version), so either I'm > doing sth wrong or there is a bug somwhere. Maybe you can help me. > I do the following: having computed the 'fourier' for both conditions > > (diff amount of trials), I run the code for the second step (whithout > > MC correction for the moment). I have 2 channel on which Im computing > > the coherence. The data for both conditions have the same length. The > > design is a betweenTrial so: #trls c1 + #trls c2. and 1 independent > variable. AmI missing something on the design or like reshaping the > data? Just as a check, can you produce coherence values with your ft_freqanalysis output using ft_connectivityanalysis? Best, Eric Maris > Any help is welcome! > Natalia > > cfg = []; > cfg.channel ={'lfp';'Whisk'}; > cfg.channelcmb ={'lfp' 'Whisk'}; > > cfg.frequency ='all'; > cfg.method = 'montecarlo'; > cfg.parameter ='fourierspctrm'; > cfg.statistic = 'indepsamplesZcoh'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.numrandomization = 10; %500 > cfg.neighbours = []; > %cfg.correctm = 'cluster'; > %cfg.clusterthreshold = 'nonparametric_common'; > %cfg.clusterstatistic = 'maxsum'; > %cfg.clusteralpha = 0.05; > %cfg.clustertail = 0; > %cfg.correcttail ='prob'; > cfg.computestat = 'yes'; > cfg.computecritval = 'yes'; > cfg.computeprob = 'yes' ; > %Design of matrix > design = zeros(1,size(freqoutdisc.fourierspctrm,1) + > size(freqoutwalk.fourierspctrm,1)); > design(1,1:size(freqoutdisc.fourierspctrm,1)) = 1; > design(1,(size(freqoutdisc.fourierspctrm,1)+1):(size(freqoutdisc.fourierspctrm,1) > + size(freqoutwalk.fourierspctrm,1)))= > 2; > cfg.design = design; > cfg.ivar = 1; > [stat1] = freqstatistics(cfg,freqoutdisc,freqoutwalk); > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From e.maris at psych.ru.nl Fri Oct 28 11:53:36 2011 From: e.maris at psych.ru.nl (Maris, E. (Eric)) Date: Fri, 28 Oct 2011 11:53:36 +0200 (CEST) Subject: [FieldTrip] Fwd: [FIELDTRIP] Independent channels stats question In-Reply-To: <1000339553.103700.1319574502768.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <298427253.130531.1319795616661.JavaMail.root@draco.zimbra.ru.nl> Dear Sangi & Vladimir, > Eric might correct me if I'm wrong but when you do cluster-based > stats > and your cfg.neighbors structure is empty what happens is exactly > what > you described. This is correct. You are still effectively correcting for 200 channels > just not for all the pixels so it should be quite close to Bonferoni > across channels. The permutation test should be me sensitive because it takes into account the spatial correlation in the data. Sangi, it will not hurt if you would try clustering along the spatial dimensions. In my experience, ECoG sometimes shows spatially distributed effects. best, Eric Maris > > Best, > > Vladimir > > On Tue, Oct 25, 2011 at 6:55 PM, Sangita Dandekar > wrote: > > Hi Fieldtrippers, > > > > I have questions similar to the ones asked a while back in the > discussion > > archive. (See discussion pasted below my email if you're > interested) > > > > We have ~200  intracranial EEG electrodes, which we assume are > independent, > > and the question is how to apply > > cluster statistics to time frequency data while accounting for the > multiple > > comparisons problem. > > > > In the archived discussion below, it was suggested that cluster > statistics > > be applied to each  channel separately, and then, to account for > MCP, apply > > Bonferroni correction on the resulting p-values.  However, as was > pointed > > out in the discussion below, with ~200 electrodes Bonferroni > > correction is overly conservative.  Another possibility suggested in > the > > archived discussion was  FDR correction on the results of cluster > > statistics, but it isn't clear to me > > how this would be done.  If anyone can explain how FDR can be > applied to the > > results of cluster statistics, please let me know. > > > > I think a third possible solution to the problem is to get a > 'global' null > > distribution as follows: > > > > Repeatedly: > > 1.  Randomly partition data > > 2.  Find time frequency clusters and the associated sum of > t-statistics for > > each TFR cluster (do this WITHOUT clustering over electrodes/space, > thereby > > treating each channel independently) > > 3.  Record maximum t-statistic sum in a 'global' null distribution > on each > > iteration.   (Search over all electrodes for this maximum) > > > > Then one could compare the clusters as observed in the actual data > (as > > determined independently at each electrode) to the global null > distribution > > to get the false alarm rate > > associated with any cluster.  I think the above should account for > the MCP. > > > > Is there anyway to implement the above procedure in Fieldtrip > without > > modifying the underlying functions?  I know how to do a for loop > around > > freqstatistics to treat each channel separately and then get the > null > > distribution of tstat maxima and cluster statistics for each > channel > > separately, but I am not sure > > if it is possible to treat each channel independently as I have > outlined > > above and also get a global null distribution over all channels  > (without > > making some > > changes to the underlying FT functions, that is). > > > > Thanks in advance for any help! > > Sangi > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Jul 6, 2010 at 12:47 PM, Matthew Davidson > wrote: > >> > >> Jan-Mathis, thanks for the response. > >> > >> Unfortunately, we tend to have a lot of channels (~120-200), and > once > >> we start using microelectrodes in the patients, it'll only get > worse. > >> > >> If we were to divide our alpha by 120-200, wouldn't we have to run > >> 120-200 times as many permutations in order to get p-values low > enough > >> to survive Bonferroni correction? That's a large jump; we might > have > >> to run 100,000 permutations! > >> > >> What do you think about something like FDR correction instead? > >> > >> Matthew > >> > >> On Tue, Jul 6, 2010 at 7:21 AM, jan-mathijs schoffelen > >> wrote: > >> > Dear Matthew, > >> > > >> > Your sensitivity problem is a known issue when using > cluster-based test > >> > statistics, in which it is difficult to get small clusters > significant > >> > in > >> > the presence of large clusters. This could also occur within a > single > >> > channel (for example with a time-frequency decomposition, in > which the > >> > summed spectro-temporal extent of an alpha-band effect could be > much > >> > bigger > >> > than a gamma-band effect). > >> > In your case I think it would be statistically valid to do the > >> > cluster-based > >> > permutation test on each channel separately (which will involve a > for > >> > loop > >> > around ft_freqstatistics, because it is not implemented in the > fieldtrip > >> > code) and doing a post-hoc Bonferroni correction on the > resulting > >> > p-values. > >> > If the number of channels is not too big, this might work. > >> > > >> > Good luck, > >> > > >> > Jan-Mathijs > >> > > >> > > >> > On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: > >> > > >> >> Hi, this is Matthew Davidson. I recently took the Fieldtrip > EEG/MEG > >> >> Toolkit (Hi Robert and Jan-Mathis!), and have been diving into > using > >> >> Fieldtrip more directly. > >> >> > >> >> My question pertains to cluster-based correction when channels > are > >> >> independent. My data is primarily intracranial EEG, and due to > the > >> >> 1/f^2 power drop-off, electrodes directly on the brain reflect > local > >> >> activity much more strongly than sensors further away. As a > result, we > >> >> treat them as independent. Now, I can force the Fieldtrip > clustering > >> >> algorithm to not cluster across channels by setting: > >> >> > >> >> cfg.neighbours = []; > >> >> cfg.minnbchan = 0; > >> >> > >> >> but it still computes the maximum cluster size for a particular > >> >> permutation based on *all* the data. This seems... less > sensitive > >> >> somehow, as if large clusters in one channel negatively impact > the > >> >> significance of clusters in another channel. > >> >> > >> >> Is there a better way to do this and still solve the MCP? E.g., > >> >> compute the maxsum on each channel separately, and then use > something > >> >> like FDR or Bonferroni correction on the maxsums across > channels? > >> >> > >> >> Thanks for any advice you may have, and thanks for producing > fieldtrip! > >> >> Matthew > >> >> > >> >> ---------------------------------- > >> >> The aim of this list is to facilitate the discussion between > users of > >> >> the > >> >> FieldTrip  toolbox, to share experiences and to discuss new > ideas for > >> >> MEG > >> >> and EEG analysis. See also > >> >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> >> http://www.ru.nl/neuroimaging/fieldtrip. > >> >> > >> > > >> > Dr. J.M. (Jan-Mathijs) Schoffelen > >> > Donders Institute for Brain, Cognition and Behaviour, > >> > Centre for Cognitive Neuroimaging, > >> > Radboud University Nijmegen, The Netherlands > >> > J.Schoffelen at donders.ru.nl > >> > Telephone: 0031-24-3668063 > >> > > >> > ---------------------------------- > >> > The aim of this list is to facilitate the discussion between > users of > >> > the > >> > FieldTrip  toolbox, to share experiences and to discuss new ideas > for > >> > MEG > >> > and EEG analysis. See also > >> > http://listserv.surfnet.nl/archives/fieldtrip.html and > >> > http://www.ru.nl/neuroimaging/fieldtrip. > >> > > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > of the > >> FieldTrip  toolbox, to share experiences and to discuss new ideas > for MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.vandermeij at donders.ru.nl Fri Oct 28 12:15:09 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Fri, 28 Oct 2011 12:15:09 +0200 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: References: Message-ID: <4EAA80AD.50700@donders.ru.nl> Hi Francesco, Just as a small add to Eelke's reply, you can specify a bs-filter for several ranges at once by doing it in a matrix, e.g.: cfg.bsfreq = [58 62; 118 122]; Note though, these filters (at least the standard butterworth) get increasingly inaccurate (less sharp filter-response, more 'filter-rolling'/edge-artifacts) when going to higher frequencies, if you are using the same frequency-range-width. Best, Roemer On 28-10-11 10:36, Eelke Spaak wrote: > Dear Francesco, > > A notch filter is referred to as a band-stop filter in > ft_preprocessing's documentation, and is different from the > (regression-based) DFT filter. To use a notch filter, specify: > > cfg.bsfilter = 'yes'; > cfg.bsfreq = [58 62]; % or whatever you deem appropriate > > Note that you will have to apply ft_preprocessing repeatedly if you > explicitly want to filter out the harmonics of the line noise as well. > > Best, > Eelke > > 2011/10/28 Francesco Di Pompeo: >> Dear all, >> >> I need a 60 Hz notch filter before the ICA of continuous 4D data. >> I did it using ft_preprocessing but the 60 Hz line is still there.. >> >> Something wrong in my script? >> >> >> cfg = []; >> cfg.dataset = '0'; >> cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; >> >> cfg.bpfilter = 'yes'; >> cfg.bpfreq = [1 150]; >> >> cfg.dftfilter = 'yes'; >> cfg.dftfreq = [60 120 180]; >> >> data_meg = ft_preprocessing(cfg); >> >> >> >> >> ----------------------------------------------------------------- >> Francesco Di Pompeo, PhD >> Institute of Advanced Biomedical Technologies and >> Department of Neuroscience and Imaging >> University of Chieti "G. d'Annunzio" >> Via dei Vestini - Campus Universitario >> 66013 Chieti - ITALY >> ph: +39-0871-3556907 >> fax:+39-0871-3556930 >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From dualitystan at gmail.com Fri Oct 28 17:04:56 2011 From: dualitystan at gmail.com (Stanley Klein) Date: Fri, 28 Oct 2011 08:04:56 -0700 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: <4EAA80AD.50700@donders.ru.nl> References: <4EAA80AD.50700@donders.ru.nl> Message-ID: Francesco, Have you actually looked at the FFT of the raw data? That will tell you what needs to be removed. You might have line noise at one frequency and monitor noise at a neighboring frequency. Stan On Fri, Oct 28, 2011 at 3:15 AM, Roemer van der Meij < r.vandermeij at donders.ru.nl> wrote: > Hi Francesco, > > Just as a small add to Eelke's reply, you can specify a bs-filter for > several ranges at once by doing it in a matrix, e.g.: > cfg.bsfreq = [58 62; 118 122]; > Note though, these filters (at least the standard butterworth) get > increasingly inaccurate (less sharp filter-response, more > 'filter-rolling'/edge-artifacts) when going to higher frequencies, if you > are using the same frequency-range-width. > > Best, > Roemer > > > > On 28-10-11 10:36, Eelke Spaak wrote: > > Dear Francesco, > > A notch filter is referred to as a band-stop filter in > ft_preprocessing's documentation, and is different from the > (regression-based) DFT filter. To use a notch filter, specify: > > cfg.bsfilter = 'yes'; > cfg.bsfreq = [58 62]; % or whatever you deem appropriate > > Note that you will have to apply ft_preprocessing repeatedly if you > explicitly want to filter out the harmonics of the line noise as well. > > Best, > Eelke > > 2011/10/28 Francesco Di Pompeo : > > Dear all, > > I need a 60 Hz notch filter before the ICA of continuous 4D data. > I did it using ft_preprocessing but the 60 Hz line is still there.. > > Something wrong in my script? > > > cfg = []; > cfg.dataset = '0'; > cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; > > cfg.bpfilter = 'yes'; > cfg.bpfreq = [1 150]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = [60 120 180]; > > data_meg = ft_preprocessing(cfg); > > > > > ----------------------------------------------------------------- > Francesco Di Pompeo, PhD > Institute of Advanced Biomedical Technologies and > Department of Neuroscience and Imaging > University of Chieti "G. d'Annunzio" > Via dei Vestini - Campus Universitario > 66013 Chieti - ITALY > ph: +39-0871-3556907 > fax:+39-0871-3556930 > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Roemer van der Meij M.Sc. > PhD student > > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognition > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > Tel: +31(0)24 3655932 > E-mail: r.vandermeij at donders.ru.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lilla.Magyari at mpi.nl Sat Oct 29 23:19:35 2011 From: Lilla.Magyari at mpi.nl (Lilla.Magyari at mpi.nl) Date: Sat, 29 Oct 2011 23:19:35 +0200 (CEST) Subject: [FieldTrip] source statistics In-Reply-To: References: <20111027183548.975573lhb8sj3ywk@horde.psy.gla.ac.uk> Message-ID: <1834.188.36.50.42.1319923175.squirrel@188.36.50.42> Dear Seb, I just would like to add to Jan-Mathijs's reply that there is an example code for how to use ft_sourcestatistics here: http://fieldtrip.fcdonders.nl/example/source_statistics?s[]=source&s[]=statistics Best, Lilla > Dear Seb, > > A few comments to your question: > -I don't really remember why 'pcc' as a method shouldn't work, but I > believe that a straightforward explanation why it is disabled is that > once-upon-a-time the functionality you are trying to apply was designed > for 'dics' as method (and as such originates from the pre-pcc era. I > wonder whether it will work for cfg.method = 'dics'. > -Even if it would work, it is a very computationally heavy method: data > are shuffled across the conditions at the channel level and spatial > filters are computed (for both conditions) for each randomization. When we > implemented this method, back in the old days, we quickly abandoned it > again because of the discrepancy between the computation time and the > computational resources. > -The functionality still being present (I still assume that it kind of > works) is the consequence of us being quite devoted to backward > compatibility, although I don't want to bet my money on it to work (for > dics). > -Nowadays, I would advise to do the randomisation testing at the source > level, i.e. computing a single set of spatial filters common to both > conditions (the so-called common filter approach), and then use > ft_sourcestatistics for the randomization testing. To get started, you > could have a look at: > http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming?s[]=common&s[]=filter, > although I notice that the final step (calling ft_sourcestatistics is not > explained there). > > > Cheers, > > JM > > On Oct 27, 2011, at 7:35 PM, miellet at psy.gla.ac.uk wrote: > >> Hello, >> I'm trying to use ft_sourceanalysis with pcc. I specify the volume >> conductor model, the sensor information and a grid with pre-computed >> leadfields. >> I tried to compute the statistics over the source parameters between two >> conditions as indicated in the documentation (ft_sourceanalysis(cfg, >> freqA, freqB) with randomization). >> I get an error linked to the condition: >> if nargin>2 && strcmp(cfg.prewhiten,'no') >> I couldn't find any information about this cfg.prewhiten parameter. >> this part of the code if commented by >> % HACK: requires some extra defaults >> % HACK: use some experimental code >> Does anyone know if this part is functional yet please? >> Thanks, >> Sebastien >> >> ---------------------------------------------------------------- >> This message was sent using the Web mail system for >> The University of Glasgow School of Psychology >> ------------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From drivolta81 at gmail.com Mon Oct 31 11:42:23 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 31 Oct 2011 11:42:23 +0100 Subject: [FieldTrip] flipdim: still need to do it? Message-ID: Dear all, I am using the 9th october 2011 version of fieldtrip. I just wish to know whether I still need to flipdim or wether it is not necessary anymore. Thanks a lot, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Oct 31 13:03:29 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 31 Oct 2011 13:03:29 +0100 Subject: [FieldTrip] flipdim: still need to do it? In-Reply-To: References: Message-ID: <69048721-B203-434B-A056-BA50B5E89B05@donders.ru.nl> Dear Davide, I guess that you refer to the flipdimming after segmentation. No, this is not necessary anymore. Still, the best way to find out whether this is true for your own data is to try it out ;-) Best, Jan-Mathijs On Oct 31, 2011, at 11:42 AM, Davide Rivolta wrote: > Dear all, > > I am using the 9th october 2011 version of fieldtrip. > > I just wish to know whether I still need to flipdim or wether it is not necessary anymore. > > Thanks a lot, > > Davide > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Oct 31 13:10:06 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 31 Oct 2011 13:10:06 +0100 Subject: [FieldTrip] flipdim: still need to do it? In-Reply-To: <69048721-B203-434B-A056-BA50B5E89B05@donders.ru.nl> References: <69048721-B203-434B-A056-BA50B5E89B05@donders.ru.nl> Message-ID: Ok, Thank you very much. Davide On Mon, Oct 31, 2011 at 1:03 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear Davide, > > I guess that you refer to the flipdimming after segmentation. No, this is > not necessary anymore. Still, the best way to find out whether this is true > for your own data is to try it out ;-) > > Best, > > Jan-Mathijs > > On Oct 31, 2011, at 11:42 AM, Davide Rivolta wrote: > > Dear all, > > I am using the 9th october 2011 version of fieldtrip. > > I just wish to know whether I still need to flipdim or wether it is not > necessary anymore. > > Thanks a lot, > > Davide > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwn_07 at yahoo.com.cn Mon Oct 31 14:15:36 2011 From: lwn_07 at yahoo.com.cn (=?utf-8?B?5p2O5Y2r5aic?=) Date: Mon, 31 Oct 2011 21:15:36 +0800 (CST) Subject: [FieldTrip] Is there a function for testing time series stationary or not? Message-ID: <1320066936.69942.YahooMailClassic@web15603.mail.cnb.yahoo.com> Dear all,   Is anybody knows wether there is a function in fieldtrip for testing the data epochs' stationeriness, since estimating AR models in causality connectivity analysis requiered that data should be stationary.   Best regards.     Weina   -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Mon Oct 31 15:21:43 2011 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Mon, 31 Oct 2011 15:21:43 +0100 Subject: [FieldTrip] Is there a function for testing time series stationary or not? In-Reply-To: <1320066936.69942.YahooMailClassic@web15603.mail.cnb.yahoo.com> References: <1320066936.69942.YahooMailClassic@web15603.mail.cnb.yahoo.com> Message-ID: <1E8C4628-FC2B-497E-82B6-CDE4D4482CE6@psi.ucm.es> Dear Weina, Try this toolbox: http://www.informatics.sussex.ac.uk/users/anils/aks_code.htm There several easy to use tests for covariance stationarity. Best, Stephan El 31/10/2011, a las 14:15, 李卫娜 escribió: > Dear all, > > Is anybody knows wether there is a function in fieldtrip for testing the data epochs' stationeriness, since estimating AR models in causality connectivity analysis requiered that data should be stationary. > > Best regards. > > > Weina > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Oct 31 17:05:51 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 31 Oct 2011 17:05:51 +0100 Subject: [FieldTrip] beamforming - normilise issue In-Reply-To: <4EA145B4.3060509@donders.ru.nl> References: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> <4EA145B4.3060509@donders.ru.nl> Message-ID: Dear Jörn, I tried to use the script you indicated me. It seems ok. I go further and I calculate the common filter for baseline and stimulus and then I run ft_sourceanalysis for baseline and stimulus (considering the common filter). After that (ft_sourceanalysis), that seems ok, I try to plot it. Like in the tutoial I calculate the relative change in power. I use ft_sourceplot. I got an error I do not understand really. It says: "the function requires volume data as input". In the structure sourceDiff, there is a volume field. It is in .cfg.vol This is my script. Am I missing something? cfg = []; cfg.method = 'slice'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.anaparameter = 0.5; cfg.units = 'mm'; cfg.vol = hdm; %I tried even: sourceDiff.cfg.vol; but it does not work figure ft_sourceplot(cfg,sourceDiff); If someone has some idea, it would be really appreciated. Thanks again, Davide On Fri, Oct 21, 2011 at 12:13 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Davide, > > I was hesitant to answer, because I thought others know more than me. But > since none responded, I can try to help with my limited knowledge. > > From my knowledge of source reconstruction, I can just say that if all > your source reconstructions are in the same space (say, MNI), you can use > the .pos from your template to overcome this problem. I am not using > ft_volumenormalise, so I have no experience what is exactly going on there. > I would assume, however, that volumenormalise will transofmr your source > structures to a common space. > However, I stick to normalizing the following way: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > Hope it helps at least a little bit. > Best, > Jörn > > > On 10/19/2011 6:12 PM, Davide Rivolta wrote: > > Hi Michael, > > I am using the single shell (Nolte). > > The grid has 2340 positions, but I am not still using mni. > > Thanks, > > Davide > > On Wed, Oct 19, 2011 at 5:44 PM, Michael Wibral wrote: > >> Hi davide, >> >> what headmodel and grid are you using? >> >> Michael >> >> >> ------------------------------ >> *Von:* "Davide Rivolta" >> *Gesendet:* Oct 19, 2011 3:54:37 PM >> *An:* "Email discussion list for the FieldTrip project" < >> fieldtrip at donders.ru.nl> >> *Betreff:* [FieldTrip] beamforming - normilise issue >> >> >> Dear all, >> >> I am trying to use beamforming for some MEG data. >> >> I have 1 condition, and I wish to compare it against the baseline. >> Ideally I wish to have the average of all group and statistically compare >> stimulus agains baseline.. >> >> As such, for each subject I calculate the source for the baseline and the >> source for the stimulus (using a common filter as indicated on the website). >> >> I then call ft_sourceinterpolate and, since I wish to have a group >> analysis, ft_volumenormalise. >> In order to compute the average, I call ft_sourcegrandaverage. >> >> Even though the help tells me that it is fine, the grandaverage does not >> work if the input is from the ft_volumenormalise. It is because there is >> not the ".pos" field! >> >> Am I doing something wrong? >> >> Any advice would be great. >> >> Thanks a lot, >> >> Davide >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Davide Rivolta, PhD > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Mon Oct 31 17:41:10 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Mon, 31 Oct 2011 17:41:10 +0100 (CET) Subject: [FieldTrip] questions about forward calculations In-Reply-To: <1977413113.159969.1320079140888.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <529875879.160006.1320079270297.JavaMail.root@draco.zimbra.ru.nl> Dear Margit, the bug with the sign of the FT call to OpenMEEG leadfield is now fixed. Please try again to generate one and let me know if it is consistent to the 3 concentric spherical solution, as you tried before. I am looking into the units issue in these days. Cristiano ----- "C. Micheli" schreef: > Van: "C. Micheli" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Woensdag 26 oktober 2011 11:24:46 > Onderwerp: Re: [FieldTrip] questions about forward calculations > > Hi Margit > I could replicate the behavior that you described in point 1) the last > email and at the moment we are checking that all required options > within FieldFrip and OpenMEEG are set correctly. > For your points 2) and 3) I could not replicate the problem. > Everything should work fine if the units of the sensors and the volume > conductor are consistent. > However, we are working to make units management more handy for the > users, so that ambiguities like this can be solved. Please, keep > posted on the mailing list to track the changes in the near future. > > Could you maybe paste your source code here in the mailing list? > > Cheers, > Cristiano > > > > > ----- "Alexandre Gramfort" schreef: > > > Van: "Alexandre Gramfort" > > Aan: "Email discussion list for the FieldTrip project" > , "c micheli" > > , "Margit Schoenherr" > > > Verzonden: Dinsdag 25 oktober 2011 15:41:10 > > Onderwerp: Re: [FieldTrip] questions about forward calculations > > > > Hello Margit, > > > > > I have some questions regarding forward computations. > > > > > > 1) How is the definition of the EEG leadfield - does the dipole > > point from red to blue or from blue to red? I obtain different > results > > when I compute the leadfield of the same dipole either with a > > 3-concentric-spheres volume conductor or with BEM (openmeeg). > > > > do you say that you get different polarity for sphere and OpenMEEG? > > if > > it's the case my only > > guess it that the triangles of the boundary meshes are not properly > > oriented. Maybe Cristiano > > who looked at this recently can comment. > > > > does the toy example behave properly? In > > external/openmeeg/openmeeg_eeg_leadfield_example.m > > > > > 2) In which units are the leadfields given? For the > > 3-concentric-spheres volume conductor, the magnitude of the field > is > > 70, for BEM 2e-5. > > > > If the input meshes passed to OpenMEEG are in meters and dipole > > currents in Am then the leadfield should give EEG potentials in V. > > > > > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the > > single sphere. For the single sphere model, the field strength is > > 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But > the > > BEM forward field of the same dipole has strength 1e-11. What is > the > > unit here? > > > > Make sure your BEM surfaces are expressed in meters and not > > millimeters like it is often the > > case in MRI coordinates, and tell me if you still see some > > inconsistent results. > > > > Best, > > Alex > > -- > > Alexandre Gramfort, PhD > > gramfort at nmr.mgh.harvard.edu > > Dept. of Radiology MGH Martinos Center / Harvard Medical School > > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From omoniyi_s at yahoo.com Mon Oct 3 16:49:27 2011 From: omoniyi_s at yahoo.com (Omoniyi Segun) Date: Mon, 3 Oct 2011 07:49:27 -0700 (PDT) Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file In-Reply-To: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> References: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> Message-ID: <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> Hi, I am new to fieldtrip and have been struggling with it for the past four weeks. I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data. Secondly when i click on stop I get the error pasted below. ??? Reference to non-existent field 'dimord'. Error in ==> dimlength at 74       elseif strcmp(data.(fld), 'rpt_pos') Error in ==> fixsampleinfo at 31   ntrial = dimlength(data, 'rpt'); Error in ==> ft_checkdata at 579   data = fixsampleinfo(data); Error in ==> ft_rejectartifact at 203   data = ft_checkdata(data, 'hassampleinfo', 'yes'); Error in ==> do_reject_artifacts at 70 data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); Error in ==> do_preprocess at 45                 do_reject_artifacts(subject); I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data. Thanks Omoniyi Segun -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Oct 4 13:51:14 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 4 Oct 2011 06:51:14 -0500 Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file Message-ID: Omoniyi, I've never tried automatic artifact detection in FieldTrip but I remember when I tried visual artifact rejection on Neuroscan data, I had to change the Y scale of the plot to make the data show up (the scale that was necessary for my data was much different than the scale used in the tutorial, for whatever reason). Do you need to do artifact detection in FieldTrip rather than Neuroscan? To be honest, I found it more efficient to do the artifact rejection in Neuroscan and then import the data into FieldTrip for the more advanced processing. (But I don't have much experience with using FieldTrip for artifact rejection, so maybe someone else on the list will have more suggestions; also, I was only doing visual artifact rejection, so I don't know if there are differences between doing automatic rejection in Neuroscan versus FieldTrip.) Best, Steve Politzer-Ahles Message: 1 > Date: Mon, 3 Oct 2011 07:49:27 -0700 (PDT) > From: Omoniyi Segun > To: "fieldtrip at donders.ru.nl" > Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG > file > Message-ID: > <1317653367.73347.YahooMailNeo at web65905.mail.ac4.yahoo.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > > I am new to fieldtrip and have been struggling with it for the past four > weeks. > > > I am trying to do artifact detection using the Automatic Artifact detection > tutorial on the Site. The first issue I am having is when i set % make the > process interactive cfg.artfctdef.zvalue.interactive = 'yes'; > I see nothing in the figure that is plotted. I see the data plotted when i > use the sample data provided but not when i use my Neuroscan EEG data. > > Secondly when i click on stop I get the error pasted below. > > > > ??? Reference to non-existent field 'dimord'. > > Error in ==> dimlength at 74 > ????? elseif strcmp(data.(fld), 'rpt_pos') > > Error in ==> fixsampleinfo at 31 > ? ntrial = dimlength(data, 'rpt'); > > Error in ==> ft_checkdata at 579 > ? data = fixsampleinfo(data); > > Error in ==> ft_rejectartifact at 203 > ? data = ft_checkdata(data, 'hassampleinfo', 'yes'); > > Error in ==> do_reject_artifacts at 70 > data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); > > Error in ==> do_preprocess at 45 > ??????????????? do_reject_artifacts(subject); > > I am comfortable making changes to the code and would like some pointers in > the right direction. I am not sure if this is an issue with Neuroscan data. > > Thanks > > Omoniyi Segun > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111003/92cac66d/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 11, Issue 2 > **************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Oct 4 14:15:23 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 4 Oct 2011 14:15:23 +0200 Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file In-Reply-To: <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> References: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> Message-ID: Hi Omoniyi, What kind of data are you passing to the function? BW, JM On Oct 3, 2011, at 4:49 PM, Omoniyi Segun wrote: > Hi, > > I am new to fieldtrip and have been struggling with it for the past four weeks. > > I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data. > > Secondly when i click on stop I get the error pasted below. > > > > ??? Reference to non-existent field 'dimord'. > > Error in ==> dimlength at 74 > elseif strcmp(data.(fld), 'rpt_pos') > > Error in ==> fixsampleinfo at 31 > ntrial = dimlength(data, 'rpt'); > > Error in ==> ft_checkdata at 579 > data = fixsampleinfo(data); > > Error in ==> ft_rejectartifact at 203 > data = ft_checkdata(data, 'hassampleinfo', 'yes'); > > Error in ==> do_reject_artifacts at 70 > data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); > > Error in ==> do_preprocess at 45 > do_reject_artifacts(subject); > > I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data. > > Thanks > > Omoniyi Segun > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Lam at donders.ru.nl Tue Oct 4 14:51:29 2011 From: K.Lam at donders.ru.nl (Kevin Lam) Date: Tue, 04 Oct 2011 14:51:29 +0200 Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or gradiometers specified Message-ID: <4E8B0151.4060109@donders.ru.nl> Hi all, I recorded EEG using BrainVision Recorder and have analyzed the data (ERP and TFR). Now, I would like to determine the source of the TFR effects. (I've been following, more or less, this procedure: http://fieldtrip.fcdonders.nl/tutorial/beamformer) I'm having trouble executing ft_prepare_leadfield. Here's what I've done in the preceding steps, per participant: - ft_redefinetrial to specify the time of interest for each of the two conditions - ft_freqanalysis to calculate CSD matrix per the freq of interest for each condition - ft_volumesegment using 'spm' for coordsys - ft_prepare_headmodel using 'singlesphere' for method Now, when I attempt ft_prepare_leadfield, I get an error saying 'no electrodes or gradiometers specified'. I understand what the function needs, but I don't have the input file it's asking for. It's not the .lay file - I gave this a try. Please advise. Thanks in advance! Regards, Kevin From drivolta81 at gmail.com Tue Oct 4 15:05:10 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 4 Oct 2011 15:05:10 +0200 Subject: [FieldTrip] power line filter Message-ID: Dear all, I am trying to get rid of the power line noise. I use the dftfilter as indicated on the website. This works very well for most of the subjects. However, for some of them, I still get the noise. My trials have a different lenght: between 500 ms until 3 seconds. This is the script I used. filterfreqs = [49:1:51 99:1:101 149:1:151]; cfg.dftfilter = 'yes'; cfg.dftfreq = filterfreqs; cfg.padding = 10; dataprepro_syn = ft_preprocessing(cfg); The pad of 10 is the same as another already published study that used the same task. Attached is a picture of the problem (blu is baseline, red is stimulus). This is the result of multitepering (dpss). Thanks for your help, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: FMA14_power_spectra1.png Type: image/png Size: 12809 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Tue Oct 4 15:18:53 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 4 Oct 2011 15:18:53 +0200 Subject: [FieldTrip] power line filter In-Reply-To: References: Message-ID: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> Hi Davide, If you pad up to 10 seconds, you may change the filterfreqs into: filterfreqs = [49:0.1:51 99:0.1:101 149:0.1:151]. Notice the 0.1, rather than the 1. This is because a 10-second segment of data has an intrinsic frequency resolution of 0.1 Hz. Note that this may make the code rather slow to run. Wouldn't it more sensible then to use a bsfilter? Best, JM On Oct 4, 2011, at 3:05 PM, Davide Rivolta wrote: > > Dear all, > > I am trying to get rid of the power line noise. I use the dftfilter as indicated on the website. > > This works very well for most of the subjects. However, for some of them, I still get the noise. > > My trials have a different lenght: between 500 ms until 3 seconds. > > This is the script I used. > > > filterfreqs = [49:1:51 99:1:101 149:1:151]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = filterfreqs; > cfg.padding = 10; > > dataprepro_syn = ft_preprocessing(cfg); > > > The pad of 10 is the same as another already published study that used the same task. > > > Attached is a picture of the problem (blu is baseline, red is stimulus). This is the result of multitepering (dpss). > > > Thanks for your help, > > Davide > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Tue Oct 4 15:24:16 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 4 Oct 2011 15:24:16 +0200 Subject: [FieldTrip] power line filter In-Reply-To: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> References: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> Message-ID: Dear Jan-Mathijs, Thank you for your prompt reply. I will try out what you said. I could even try the bsfilter. I guess it makes sense. Thanks a lot for your help, Davide On Tue, Oct 4, 2011 at 3:18 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Davide, > > If you pad up to 10 seconds, you may change the filterfreqs into: > > filterfreqs = [49:0.1:51 99:0.1:101 149:0.1:151]. > > Notice the 0.1, rather than the 1. This is because a 10-second segment of > data has an intrinsic frequency resolution of 0.1 Hz. > > Note that this may make the code rather slow to run. Wouldn't it more > sensible then to use a bsfilter? > > Best, > > JM > > On Oct 4, 2011, at 3:05 PM, Davide Rivolta wrote: > > > Dear all, > > I am trying to get rid of the power line noise. I use the dftfilter as > indicated on the website. > > This works very well for most of the subjects. However, for some of them, I > still get the noise. > > My trials have a different lenght: between 500 ms until 3 seconds. > > This is the script I used. > > > filterfreqs = [49:1:51 99:1:101 149:1:151]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = filterfreqs; > cfg.padding = 10; > > dataprepro_syn = ft_preprocessing(cfg); > > > The pad of 10 is the same as another already published study that used the > same task. > > > Attached is a picture of the problem (blu is baseline, red is stimulus). > This is the result of multitepering (dpss). > > > Thanks for your help, > > Davide > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Oct 4 15:55:14 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 4 Oct 2011 08:55:14 -0500 Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or gradiometers specified Message-ID: Kevin, I'm not familiar with ft_prepare_leadfield, but in the past when I had similar electrode-related error messages I was able to resolve it by first running elec = ft_read_sens(filename, ...) and then adding elec to the data structure. I believe the file I used for ft_read_sens was a layout file I exported from EEGLAB. Best, Steve Politzer-Ahles Message: 3 > Date: Tue, 04 Oct 2011 14:51:29 +0200 > From: Kevin Lam > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or > gradiometers specified > Message-ID: <4E8B0151.4060109 at donders.ru.nl> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi all, > > I recorded EEG using BrainVision Recorder and have analyzed the data > (ERP and TFR). Now, I would like to determine the source of the TFR > effects. (I've been following, more or less, this procedure: > http://fieldtrip.fcdonders.nl/tutorial/beamformer) > > I'm having trouble executing ft_prepare_leadfield. Here's what I've done > in the preceding steps, per participant: > - ft_redefinetrial to specify the time of interest for each of the two > conditions > - ft_freqanalysis to calculate CSD matrix per the freq of interest for > each condition > - ft_volumesegment using 'spm' for coordsys > - ft_prepare_headmodel using 'singlesphere' for method > > Now, when I attempt ft_prepare_leadfield, I get an error saying 'no > electrodes or gradiometers specified'. I understand what the function > needs, but I don't have the input file it's asking for. It's not the > .lay file - I gave this a try. > > Please advise. Thanks in advance! > > Regards, > Kevin > > > ------------------------------ > > Message: 4 > Date: Tue, 4 Oct 2011 15:05:10 +0200 > From: Davide Rivolta > To: Email discussion list for the FieldTrip project > > Subject: [FieldTrip] power line filter > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear all, > > I am trying to get rid of the power line noise. I use the dftfilter as > indicated on the website. > > This works very well for most of the subjects. However, for some of them, I > still get the noise. > > My trials have a different lenght: between 500 ms until 3 seconds. > > This is the script I used. > > > filterfreqs = [49:1:51 99:1:101 149:1:151]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = filterfreqs; > cfg.padding = 10; > > dataprepro_syn = ft_preprocessing(cfg); > > > The pad of 10 is the same as another already published study that used the > same task. > > > Attached is a picture of the problem (blu is baseline, red is stimulus). > This is the result of multitepering (dpss). > > > Thanks for your help, > > Davide > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111004/1904c787/attachment.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: FMA14_power_spectra1.png > Type: image/png > Size: 12809 bytes > Desc: not available > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111004/1904c787/attachment.png > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 11, Issue 3 > **************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Oct 4 16:10:56 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 4 Oct 2011 16:10:56 +0200 Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or gradiometers specified In-Reply-To: References: Message-ID: Hi Kevin, Your data structure (the original one, the result from a call to ft_preprocessing) should have a .elec field already in it; I think you should be able to just copy that .elec field to whatever it is you are giving as input to ft_prepare_leadfield (e.g. freq.elec = data.elec;). (Disclaimer: I do not have any experience with ft_prepare_leadfield myself, but have heard of stuff related to this, so if I'm mistaken please correct me :) ) Best, Eelke 2011/10/4 Stephen Politzer-Ahles : > Kevin, > > I'm not familiar with ft_prepare_leadfield, but in the past when I had > similar electrode-related error messages I was able to resolve it by first > running > > elec = ft_read_sens(filename, ...) > > and then adding elec to the data structure. I believe the file I used for > ft_read_sens was a layout file I exported from EEGLAB. > > Best, > Steve Politzer-Ahles > >> Message: 3 >> Date: Tue, 04 Oct 2011 14:51:29 +0200 >> From: Kevin Lam >> To: fieldtrip at donders.ru.nl >> Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or >>        gradiometers    specified >> Message-ID: <4E8B0151.4060109 at donders.ru.nl> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> Hi all, >> >> I recorded EEG using BrainVision Recorder and have analyzed the data >> (ERP and TFR). Now, I would like to determine the source of the TFR >> effects. (I've been following, more or less, this procedure: >> http://fieldtrip.fcdonders.nl/tutorial/beamformer) >> >> I'm having trouble executing ft_prepare_leadfield. Here's what I've done >> in the preceding steps, per participant: >>  - ft_redefinetrial to specify the time of interest for each of the two >> conditions >>  - ft_freqanalysis to calculate CSD matrix per the freq of interest for >> each condition >>  - ft_volumesegment using 'spm' for coordsys >>  - ft_prepare_headmodel using 'singlesphere' for method >> >> Now, when I attempt ft_prepare_leadfield, I get an error saying 'no >> electrodes or gradiometers specified'. I understand what the function >> needs, but I don't have the input file it's asking for. It's not the >> .lay file - I gave this a try. >> >> Please advise. Thanks in advance! >> >> Regards, >> Kevin >> >> >> ------------------------------ >> >> Message: 4 >> Date: Tue, 4 Oct 2011 15:05:10 +0200 >> From: Davide Rivolta >> To: Email discussion list for the FieldTrip project >>         >> Subject: [FieldTrip] power line filter >> Message-ID: >> >>   >> Content-Type: text/plain; charset="iso-8859-1" >> >> Dear all, >> >> I am trying to get rid of the power line noise. I use the dftfilter as >> indicated on the website. >> >> This works very well for most of the subjects. However, for some of them, >> I >> still get the noise. >> >> My trials have a different lenght: between 500 ms until 3 seconds. >> >> This is the script I used. >> >> >>  filterfreqs = [49:1:51 99:1:101 149:1:151]; >> >>    cfg.dftfilter      =  'yes'; >>    cfg.dftfreq      = filterfreqs; >>    cfg.padding    = 10; >> >>    dataprepro_syn = ft_preprocessing(cfg); >> >> >> The pad of 10 is the same as another already published study that used the >> same task. >> >> >> Attached is a picture of the problem (blu is baseline, red is stimulus). >> This is the result of multitepering (dpss). >> >> >> Thanks for your help, >> >> Davide >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: >> >> -------------- next part -------------- >> A non-text attachment was scrubbed... >> Name: FMA14_power_spectra1.png >> Type: image/png >> Size: 12809 bytes >> Desc: not available >> URL: >> >> >> ------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 11, Issue 3 >> **************************************** > > > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From luoj at mail.nih.gov Tue Oct 4 19:57:56 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Tue, 4 Oct 2011 13:57:56 -0400 Subject: [FieldTrip] delete triggers/event markers Message-ID: Thanks guys for your input below. I was able to do the deletion in 4D. Another thing emerging is: is it possible to delete an event marker or trigger? I assume I still need to do this in 4D. Do you happen to know what commands to use? Thanks, Jessie ________________________________________ From: Rojas, Don [Don.Rojas at ucdenver.edu] Sent: Monday, September 26, 2011 10:59 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] creating new dataset Hi Jessie, If you wish to take a FieldTrip dataset back to the native 4D format, then it will not be trivial, but if you have the original data in 4D format, there is a potential solution in Eugene Kronberg's pdf4D matlab object code: http://biomag.wikidot.com/msi-matlab If you do not have the native 4D data, this will not work. Look at the duplicate and write_data_block methods. However, note that if you do duplicate the dataset, it will expect there to be as many channels in the new dataset as in the original. You would then have to delete those channels in the 4D MSI software using the deleter command. Or, alternatively, if you have a working copy of the MSI software, you can delete the channels in the original dataset within 4D, then use the duplicate method on that file, then write your data back to it using the write_data_block method. Feel free to contact me off list if you have questions. Best, Don On Sep 26, 2011, at 8:26 AM, jan-mathijs schoffelen wrote: Hi Jessie, FieldTrip is not able to write back into the native 4D neuroimaging format. If you want to create a new dataset, you need to have a look at the software which is provided by the 4D neuroimaging company. Your requested functionality may either be a feature of one of the applications, or may be implemented in one of the command line utilities. You may want to look in the software documentation for this. Best wishes, Jan-Mathijs On Sep 26, 2011, at 4:11 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Thanks for your answer Jörn . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... Jessie ________________________________________ From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] Sent: Sunday, September 25, 2011 4:09 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] creating new dataset Hi Jessie, not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: You can also exclude channels or channel groups using the following syntax {'all', '-POz', '-Fp1', -EOG'} >From ft_preprocessing: If you are calling FT_PREPROCESSING with also the second input argument "data", then that should contain data that was already read from file in a previous call to FT_PREPROCESSING. In that case only the configuration options below apply. The channels that will be read and/or preprocessed are specified with cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), see FT_CHANNELSELECTION for details You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. Hope this all helps to what you are up to! Best, Jörn On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Hi, If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). Thanks, Jessie _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 From drivolta81 at gmail.com Wed Oct 5 10:03:37 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Wed, 5 Oct 2011 10:03:37 +0200 Subject: [FieldTrip] power line filter In-Reply-To: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> References: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> Message-ID: Dear Jan-Mathijs, Attached is the picture of a subject where I applied you advice. As you can see the problem is still there. Maybe I can solve it by changing the filter order (I am using defaults values). However I am thinking to use a band stop filter. Thanks, Davide On Tue, Oct 4, 2011 at 3:18 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Davide, > > If you pad up to 10 seconds, you may change the filterfreqs into: > > filterfreqs = [49:0.1:51 99:0.1:101 149:0.1:151]. > > Notice the 0.1, rather than the 1. This is because a 10-second segment of > data has an intrinsic frequency resolution of 0.1 Hz. > > Note that this may make the code rather slow to run. Wouldn't it more > sensible then to use a bsfilter? > > Best, > > JM > > On Oct 4, 2011, at 3:05 PM, Davide Rivolta wrote: > > > Dear all, > > I am trying to get rid of the power line noise. I use the dftfilter as > indicated on the website. > > This works very well for most of the subjects. However, for some of them, I > still get the noise. > > My trials have a different lenght: between 500 ms until 3 seconds. > > This is the script I used. > > > filterfreqs = [49:1:51 99:1:101 149:1:151]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = filterfreqs; > cfg.padding = 10; > > dataprepro_syn = ft_preprocessing(cfg); > > > The pad of 10 is the same as another already published study that used the > same task. > > > Attached is a picture of the problem (blu is baseline, red is stimulus). > This is the result of multitepering (dpss). > > > Thanks for your help, > > Davide > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: power_spectra1.png Type: image/png Size: 13305 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Wed Oct 5 15:23:04 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 5 Oct 2011 15:23:04 +0200 Subject: [FieldTrip] Fwd: ft_databrowser References: <4E8C5808.2090807@psych.ru.nl> Message-ID: <5709C371-9CC8-40D2-BD0F-D6BE8BE7F611@donders.ru.nl> Hi Vitória, What's exactly the error you obtain, and perhaps more importantly: which FieldTrip version are you using? There have been some changes in the past days which broke my earlier updates (which I tested rather extensively). By now, I ironed out some of these issues by reverting the most recent changes. The last fix was done yesterday, so I would like to hear back from you if the problem persists if you use an absolutely fresh version of the code. Then we can take it from there. Best wishes, Jan-Mathijs Begin forwarded message: > From: Vitória Magalhães Piai > Date: October 5, 2011 3:13:44 PM GMT+02:00 > To: jan.schoffelen at donders.ru.nl > Subject: Fwd: Re: ft_databrowser > > Beste Jan-Matthijs, > > Ik gebruik ft_databrowser om de componenten van ICA te bekijken. Sinds een recente wijziging > krijg ik een error erbij met > ft_prepare_layout at 263 > [data.grad] = fixsens(data.grad) > > als gevolg een error in ft_databrowser at 163 > cfg.layout... > > Wat moet ik nu anders doen zodat ik ft_databrowser op mijn normale manier kan gebruiken? > > Alvast bedankt, > vriendelijke groet, Vitória > > -------- Original Message -------- > Subject: Re: ft_databrowser > Date: Wed, 5 Oct 2011 14:54:29 +0200 > From: Eelke Spaak > To: r.vandermeij at donders.ru.nl > CC: Vitória Magalhães Piai > > Ha Vitoria, > > Inderdaad zijn er wat wijzigingen gedaan, maar ik weet er ook het > fijne niet van helaas. Volgens mij was Jan-Mathijs (Schoffelen) degene > die hiervoor verantwoordelijk was, maar dat weet ik niet zeker. > > Het is (ook voor eventuele toekomstige problemen) denk ik het > verstandigst als je even een mailtje naar de algemene FieldTrip-lijst > stuurt, fieldtrip at donders.ru.nl. Daar moet je wel eerst voor > registreren, instructies daarvoor staan op > http://fieldtrip.fcdonders.nl/discussion_list . > > Groeten, > Eelke > > 2011/10/5 Roemer van der Meij : > > Hey Vit, > > > > Er zijn recent wat wijzigingen gedaan in het de grad en elec structuur, > > Eelke, weet jij daar meer van? Ik heb het niet helemaal gevolgd. > > > > Groetjes, > > Roemer > > > > > > > > On 05-10-11 12:56, Vitória Magalhães Piai wrote: > > > > Hoi Roemer, Eelke, > > > > Ik gebruik ft_databrowser om de componenten van ICA te bekijken. Sinds een > > week krijg ik een error erbij met > > > > ft_prepare_layout at 263 > > [data.grad] = fixsens(data.grad) > > > > als gevolg een error in ft_databrowser at 163 > > cfg.layout... > > > > Ik zag dat jullie twee de laatste wijzigingen gedaan hebben aan die twee > > scripts. Wat is er nu anders waardoor ik ft_databrowser niet meer op mijn > > normale manier kan gebruiken? > > > > Ook voor volgende keer: bij wie moet ik eigenlijk met zulke vragen naar toe > > (of is het de bedoeling dat ik jullie daarmee kom vervelen)? :) > > > > Alvast bedankt, Vitória > > > > > > -- > > Roemer van der Meij M.Sc. > > PhD student > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognition > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > Tel: +31(0)24 3655932 > > E-mail: r.vandermeij at donders.ru.nl > > > Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Oct 5 16:21:44 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 5 Oct 2011 16:21:44 +0200 Subject: [FieldTrip] Fwd: ft_databrowser References: <4E8C5D32.6020709@psych.ru.nl> Message-ID: Hi Vitória, There was a typo in ft_prepare_layout. However, it still didn't work after fixing it. Using a specified layout in cfg.layout actually works fine for me. Best, Jan-Mathijs PS: it may be an idea to sign up for the discussion list Begin forwarded message: > From: Vitória Magalhães Piai > Date: October 5, 2011 3:35:46 PM GMT+02:00 > To: jan-mathijs schoffelen > Subject: Re: Fwd: ft_databrowser > > Hi Jan-Mathijs, > > I'm running my analyses on a mentat node, from /home/common/matlab/fieldtrip/ so probably the freshest version. > > I call ft_databrowser for an object obtained with ft_componentanalysis > My cfg has > viewmode 'component'; > continuous 'no'; > > The error > Attempt to reference field of non-struct array > > in ft_prepare_layout at 263 > in ft_databrowser at 163 > > The problem still persists. > Is this enough info for you to sort out what the problem is? > > Thanx, Vitória > > On 5-10-2011 15:23, jan-mathijs schoffelen wrote: >> >> Hi Vitória, >> >> What's exactly the error you obtain, and perhaps more importantly: which FieldTrip version are you using? There have been some changes in the past days which broke my earlier updates (which I tested rather extensively). By now, I ironed out some of these issues by reverting the most recent changes. The last fix was done yesterday, so I would like to hear back from you if the problem persists if you use an absolutely fresh version of the code. Then we can take it from there. >> >> Best wishes, >> >> Jan-Mathijs >> >> Begin forwarded message: >> >>> From: Vitória Magalhães Piai >>> Date: October 5, 2011 3:13:44 PM GMT+02:00 >>> To: jan.schoffelen at donders.ru.nl >>> Subject: Fwd: Re: ft_databrowser >>> >>> Beste Jan-Matthijs, >>> >>> Ik gebruik ft_databrowser om de componenten van ICA te bekijken. Sinds een recente wijziging >>> krijg ik een error erbij met >>> ft_prepare_layout at 263 >>> [data.grad] = fixsens(data.grad) >>> >>> als gevolg een error in ft_databrowser at 163 >>> cfg.layout... >>> >>> Wat moet ik nu anders doen zodat ik ft_databrowser op mijn normale manier kan gebruiken? >>> >>> Alvast bedankt, >>> vriendelijke groet, Vitória >>> >>> -------- Original Message -------- >>> Subject: Re: ft_databrowser >>> Date: Wed, 5 Oct 2011 14:54:29 +0200 >>> From: Eelke Spaak >>> To: r.vandermeij at donders.ru.nl >>> CC: Vitória Magalhães Piai >>> >>> Ha Vitoria, >>> >>> Inderdaad zijn er wat wijzigingen gedaan, maar ik weet er ook het >>> fijne niet van helaas. Volgens mij was Jan-Mathijs (Schoffelen) degene >>> die hiervoor verantwoordelijk was, maar dat weet ik niet zeker. >>> >>> Het is (ook voor eventuele toekomstige problemen) denk ik het >>> verstandigst als je even een mailtje naar de algemene FieldTrip-lijst >>> stuurt, fieldtrip at donders.ru.nl. Daar moet je wel eerst voor >>> registreren, instructies daarvoor staan op >>> http://fieldtrip.fcdonders.nl/discussion_list . >>> >>> Groeten, >>> Eelke >>> >>> 2011/10/5 Roemer van der Meij : >>> > Hey Vit, >>> > >>> > Er zijn recent wat wijzigingen gedaan in het de grad en elec structuur, >>> > Eelke, weet jij daar meer van? Ik heb het niet helemaal gevolgd. >>> > >>> > Groetjes, >>> > Roemer >>> > >>> > >>> > >>> > On 05-10-11 12:56, Vitória Magalhães Piai wrote: >>> > >>> > Hoi Roemer, Eelke, >>> > >>> > Ik gebruik ft_databrowser om de componenten van ICA te bekijken. Sinds een >>> > week krijg ik een error erbij met >>> > >>> > ft_prepare_layout at 263 >>> > [data.grad] = fixsens(data.grad) >>> > >>> > als gevolg een error in ft_databrowser at 163 >>> > cfg.layout... >>> > >>> > Ik zag dat jullie twee de laatste wijzigingen gedaan hebben aan die twee >>> > scripts. Wat is er nu anders waardoor ik ft_databrowser niet meer op mijn >>> > normale manier kan gebruiken? >>> > >>> > Ook voor volgende keer: bij wie moet ik eigenlijk met zulke vragen naar toe >>> > (of is het de bedoeling dat ik jullie daarmee kom vervelen)? :) >>> > >>> > Alvast bedankt, Vitória >>> > >>> > >>> > -- >>> > Roemer van der Meij M.Sc. >>> > PhD student >>> > Donders Institute for Brain, Cognition and Behaviour >>> > Centre for Cognition >>> > P.O. Box 9104 >>> > 6500 HE Nijmegen >>> > The Netherlands >>> > Tel: +31(0)24 3655932 >>> > E-mail: r.vandermeij at donders.ru.nl >>> > >>> >> >> Jan-Mathijs Schoffelen, MD PhD >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> > > -- > Vitória Piai > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognition > Radboud University Nijmegen > Montessorilaan 3 > 6525 HR Nijmegen > The Netherlands > > Email : V.piai at donders.ru.nl > Phone : +31 24 3612635 > Room : Spinoza building B.01.05 > www.vitoriapiai.com > > ** Please consider the environment - do you really need to print? ** Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From omoniyi_s at yahoo.com Wed Oct 5 16:46:42 2011 From: omoniyi_s at yahoo.com (Omoniyi Segun) Date: Wed, 5 Oct 2011 07:46:42 -0700 (PDT) Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file In-Reply-To: References: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> Message-ID: <1317826002.17170.YahooMailNeo@web65917.mail.ac4.yahoo.com> Thanks for your response. I am passing a 'subject' structure which contains the file location and file name to the do_reject_artifacts function which i wrote. Inside the function i have inserted the code I got from the tutorial. The structure is created in a do_preprocess function, i read all the files in a directory structure and create the subject stucture in this function. The files are Neuroscan .cnt files Thanks for your help Omoniyi Segun snippet from : do_preprocess         clear subject;         if ( reply == 'Y' || reply == 'y')             %token = strtok(subjectdata.filename{i}, '.');             token = strtok(files(i).name, '.');             subject.datafile = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir filesep files(i).name];             subject.datafilename = token;             subject.datafiledir = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir];             subject.artifactdir = subjectdata.artifactdir; snippet from : do_reject_artifacts cfg.dataset            = 'subject.datafile;       % name of EEG dataset  cfg.trialdef.eventtype      = 'trigger'; cfg.trialdef.prestim        = 1; cfg.trialdef.poststim       = 2; cfg.trialdef.eventvalue     = [1 2];                                    cfg = ft_definetrial(cfg);            data= ft_preprocessing(cfg) trl = cfg.trl; % jump cfg                    = []; cfg.trl = trl; cfg.padding = 0; cfg.datafile   = subject.datafile; cfg.headerfile = subject.datafile; cfg.continuous = 'yes'; cfg.memory = 'low'; % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel    = 'EEG'; cfg.artfctdef.zvalue.cutoff     = 20; cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.fltpadding = 0;   % algorithmic parameters cfg.artfctdef.zvalue.cumulative    = 'yes'; cfg.artfctdef.zvalue.medianfilter  = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff       = 'yes';   % make the process interactive cfg.artfctdef.zvalue.interactive   = 'yes';   [cfg, artifact_jump] = ft_artifact_zvalue(cfg,data); ________________________________ From: jan-mathijs schoffelen To: Omoniyi Segun ; Email discussion list for the FieldTrip project Sent: Tuesday, October 4, 2011 8:15 AM Subject: Re: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file Hi Omoniyi, What kind of data are you passing to the function?  BW, JM On Oct 3, 2011, at 4:49 PM, Omoniyi Segun wrote: Hi, > > >I am new to fieldtrip and have been struggling with it for the past four weeks. > > > >I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; >I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data. > > >Secondly when i click on stop I get the error pasted below. > > > > > >??? Reference to non-existent field 'dimord'. > >Error in ==> dimlength at 74 >      elseif strcmp(data.(fld), 'rpt_pos') > >Error in ==> fixsampleinfo at 31 >  ntrial = dimlength(data, 'rpt'); > >Error in ==> ft_checkdata at 579 >  data = fixsampleinfo(data); > >Error in ==> ft_rejectartifact at 203 >  data = ft_checkdata(data, 'hassampleinfo', 'yes'); > >Error in ==> do_reject_artifacts at 70 >data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); > >Error in ==> do_preprocess at 45 >                do_reject_artifacts(subject); > > >I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data. > > >Thanks > > >Omoniyi Segun > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD  Donders Institute for Brain, Cognition and Behaviour,  Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Thu Oct 6 00:50:01 2011 From: karl.doron at gmail.com (Karl Doron) Date: Wed, 5 Oct 2011 15:50:01 -0700 Subject: [FieldTrip] Clusterplot with F-test Message-ID: Hello, I've run a statistical analysis with cfg.statistic=depsamplesF. The tail of the F distribution is a one-sided test, so no negative cluster distributions are output as part of the processing. The clusterplot function seems to want negative clusters however. Is there any way around this? Best, karl From tommy.ng at mq.edu.au Thu Oct 6 07:54:43 2011 From: tommy.ng at mq.edu.au (Tommy Ng) Date: Thu, 6 Oct 2011 16:54:43 +1100 Subject: [FieldTrip] Units for Y axis Message-ID: Dear FT Experts I am very new to FT and would like to ask a simple question. Using FT beamformer source extraction module implemented in SPM8, I obtained time series of virtual sensors in source space. However, I do not know what is the unit for the Y axis. Can someone please advise? Thank you in advance. Tommy Ng PhD Student Macquarie University Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Thu Oct 6 10:13:41 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 6 Oct 2011 10:13:41 +0200 Subject: [FieldTrip] Problems using .elp files Message-ID: Dear Fieldtrippers, I am using .avr files for source modelling on ERP data. From the ERP components, I have calculated the differencewaves in a .mat file. Until this it all went fine. However I get stuck at using .elp files. I can succesfully create the headmodel with ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model developed by Nolte (2003) However when using ft_prepare_leadfield(cfg) I get problems. My code is like this: % discretize brainvolume in grid cfg=[] cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01' [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) % reading in .elp files %renaming lbl.textdata to lbl.label, else it gives an error at ft_channelselection, because it is unable to read sens.label oldField = 'textdata'; newField = 'label'; [lbl.(newField)] = lbl.(oldField); lbl = rmfield(lbl,oldField); cfg.elec= lbl cfg.vol = vol; cfg.reducerank = 3; cfg.channel = 'Fz' cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution save cfg [grid] = ft_prepare_leadfield(cfg); When executing this I get the following commandscreen: .... ..... using headmodel specified in the configuration using electrodes specified in the configuration ??? Error using ==> ft_prepare_vol_sens at 110 the input does not look like EEG, nor like MEG Error in ==> prepare_headmodel at 114 [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ==> ft_prepare_leadfield at 159 [vol, sens, cfg] = prepare_headmodel(cfg, data); I think this is because I use .elp files? The .elp files contain N rows and 3 columns representing xyz or spherical coordinates I assume. However this is the only information I have about the electrodes, so I have to do with it. Any ideas? Kind regards, Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Thu Oct 6 13:33:05 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 6 Oct 2011 06:33:05 -0500 Subject: [FieldTrip] Clusterplot with F-test Message-ID: Karl, I believe you can accomplish the same thing as ft_clusterplot using the code sample at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results1, which also gives you the option to plot negative or positive clusters (or both, if you fiddle with that code; there is a sample higher up on the page that plots both). Best, Steve Politzer-Ahles Message: 2 > Date: Wed, 5 Oct 2011 15:50:01 -0700 > From: Karl Doron > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Clusterplot with F-test > Message-ID: > Content-Type: text/plain; charset=us-ascii > > Hello, > > I've run a statistical analysis with cfg.statistic=depsamplesF. The tail of > the F distribution is a one-sided test, so no negative cluster distributions > are output as part of the processing. The clusterplot function seems to want > negative clusters however. Is there any way around this? > > Best, > > karl > > > > > > ------------------------------ > > Message: 3 > Date: Thu, 6 Oct 2011 16:54:43 +1100 > From: Tommy Ng > To: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] Units for Y axis > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear FT Experts > > I am very new to FT and would like to ask a simple question. > > Using FT beamformer source extraction module implemented in SPM8, I > obtained > time series of virtual sensors in source space. However, I do not know what > is the unit for the Y axis. > > Can someone please advise? > > Thank you in advance. > > Tommy Ng > PhD Student > Macquarie University > Australia > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111006/2b4d2da3/attachment-0001.html > > > > ------------------------------ > > Message: 4 > Date: Thu, 6 Oct 2011 10:13:41 +0200 > From: > To: > Subject: [FieldTrip] Problems using .elp files > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Dear Fieldtrippers, > > I am using .avr files for source modelling on ERP data. From the ERP > components, I have calculated the differencewaves in a .mat file. Until this > it all went fine. However I get stuck at using .elp files. > I can succesfully create the headmodel with > ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model > developed by Nolte (2003) > However when using ft_prepare_leadfield(cfg) I get problems. > > My code is like this: > > % discretize brainvolume in grid > cfg=[] > cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01' > [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) > % reading in .elp files > > %renaming lbl.textdata to lbl.label, else it gives an error at > ft_channelselection, because it is unable to read sens.label > oldField = 'textdata'; > newField = 'label'; > [lbl.(newField)] = lbl.(oldField); > lbl = rmfield(lbl,oldField); > cfg.elec= lbl > cfg.vol = vol; > cfg.reducerank = 3; > cfg.channel = 'Fz' > cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution > save cfg > [grid] = ft_prepare_leadfield(cfg); > > When executing this I get the following commandscreen: > .... > ..... > using headmodel specified in the configuration > using electrodes specified in the configuration > ??? Error using ==> ft_prepare_vol_sens at 110 > the input does not look like EEG, nor like MEG > > Error in ==> prepare_headmodel at 114 > [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, > 'order', cfg.order); > > Error in ==> ft_prepare_leadfield at 159 > [vol, sens, cfg] = prepare_headmodel(cfg, data); > > I think this is because I use .elp files? The .elp files contain N rows and > 3 columns representing xyz or spherical coordinates I assume. However this > is the only information I have about the electrodes, so I have to do with > it. > > Any ideas? > > Kind regards, > > Brian > > > > > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het > handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial > Register of the Chamber of Commerce under file number 41055629. > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111006/1e3275df/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 11, Issue 7 > **************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.noordenbos at gmail.com Thu Oct 6 15:32:20 2011 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Thu, 6 Oct 2011 15:32:20 +0200 Subject: [FieldTrip] Problem with nanmean.mexw64 Message-ID: Hi all, There seems to be a problem with nanmean.mexw64. I received the following error using fieldtrip-20111005 (same for 20111004). An older version fieldtrip-20110601 works fine (no nanmean.mexw64). ??? Invalid MEX-file 'C:\Users\BSI\Documents\MATLAB\fieldtrip-20111005\private\nanmean.mexw64': The specified module could not be found. Error in ==> ft_topoplotER at 632 dat = nanmean(dat, 2); Best, Mark -- Mark Noordenbos, MSc Radboud University Nijmegen Behavioural Science Institute P.O. Box 9104, Room A05.36 6500 HE Nijmegen The Netherlands Email: m.noordenbos at bsi.ru.nl Telephone: +31 24 3612070 Fax: +31 24 3616211 http://www.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.craddock at uni-leipzig.de Thu Oct 6 16:14:06 2011 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Thu, 06 Oct 2011 16:14:06 +0200 Subject: [FieldTrip] Problem with nanmean.mexw64 In-Reply-To: References: Message-ID: <4E8DB7AE.7090108@uni-leipzig.de> On 06/10/2011 15:32, Mark Noordenbos wrote: > Hi all, > > There seems to be a problem with nanmean.mexw64. I received the > following error using fieldtrip-20111005 (same for 20111004). > An older version fieldtrip-20110601 works fine (no nanmean.mexw64). > > ??? Invalid MEX-file > 'C:\Users\BSI\Documents\MATLAB\fieldtrip-20111005\private\nanmean.mexw64': > The specified > module could not be found. > > Error in ==> ft_topoplotER at 632 > dat = nanmean(dat, 2); > > Best, > Mark Hi Mark, I also ran into this problem yesterday after updating to a recent version from a version from June. The problem disappeared when I installed a new Visual C++ redistributable from Microsoft. From looking at the changelog, nanmean.mexw64 was introduced on the 21st of September, so versions of FieldTrip from before then won't have this problem. Cheers, Matt From jm.horschig at donders.ru.nl Fri Oct 7 10:56:18 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 07 Oct 2011 10:56:18 +0200 Subject: [FieldTrip] Problem with nanmean.mexw64 In-Reply-To: <4E8DB7AE.7090108@uni-leipzig.de> References: <4E8DB7AE.7090108@uni-leipzig.de> Message-ID: <4E8EBEB2.9070108@donders.ru.nl> Heya, I just re-mexed all nan functions for win64 with a different compiler, which is supported by Win7 by default. So, from tomorrow onwards there should be no problem with these files anymore. If you or anyone encounters a similar error for another mex-file, let us know and we can re-mex ;) Best, Jörn On 10/6/2011 4:14 PM, Matt Craddock wrote: > On 06/10/2011 15:32, Mark Noordenbos wrote: >> Hi all, >> >> There seems to be a problem with nanmean.mexw64. I received the >> following error using fieldtrip-20111005 (same for 20111004). >> An older version fieldtrip-20110601 works fine (no nanmean.mexw64). >> >> ??? Invalid MEX-file >> 'C:\Users\BSI\Documents\MATLAB\fieldtrip-20111005\private\nanmean.mexw64': >> >> The specified >> module could not be found. >> >> Error in ==> ft_topoplotER at 632 >> dat = nanmean(dat, 2); >> >> Best, >> Mark > > Hi Mark, > > I also ran into this problem yesterday after updating to a recent > version from a version from June. The problem disappeared when I > installed a new Visual C++ redistributable from Microsoft. From > looking at the changelog, nanmean.mexw64 was introduced on the 21st of > September, so versions of FieldTrip from before then won't have this > problem. > > Cheers, > Matt > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From eva.patai at psy.ox.ac.uk Fri Oct 7 11:18:01 2011 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Fri, 7 Oct 2011 10:18:01 +0100 Subject: [FieldTrip] cluster>nothing to plot Message-ID: Dear All I am running the Cluster-based permutation tests on event related fields, and for the same dataset, with all settings identical, when i run: 0-200ms: i get one significant cluster but: 0-500ms: no significant clusters why does my significant cluster disappear depending on the time window i use? thank you! z -- Zita Patai DPhil Candidate, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ eva.patai at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Fri Oct 7 14:31:37 2011 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Fri, 7 Oct 2011 13:31:37 +0100 Subject: [FieldTrip] cluster>nothing to plot In-Reply-To: References: Message-ID: Sorry, I know the answer now, but I have another , similar problem: When i get the clusterplot figure (after i run the cluster analysis), it has the timebins every 4ms (bc i have a 250Hz sampling rate) with the significant clusters plotted. For a simplified plotting, i was trying to use the bit of script where i can specify the timesteps i want the clusters to be shown in (ex: every 50ms) But, depending on what timestep i use, sometimes it does not display the clusters that are significant, almost like if the period is not long enough, it will not show the clusters... Any ideas ? Thank you! On Fri, Oct 7, 2011 at 10:18 AM, Zita Eva Patai wrote: > Dear All > > I am running the Cluster-based permutation tests on event related fields, > and for the same dataset, with all settings identical, when i run: > 0-200ms: i get one significant cluster > but: > 0-500ms: no significant clusters > > why does my significant cluster disappear depending on the time window i > use? > > thank you! > z > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > eva.patai at psy.ox.ac.uk > > > -- Zita Patai DPhil Candidate, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ eva.patai at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Fri Oct 7 14:55:25 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 7 Oct 2011 07:55:25 -0500 Subject: [FieldTrip] cluster>nothing to plot Message-ID: Zita, The sensitivity of the cluster test varies depending on the time window you analyze. Specifically, the sensitivity is greater when testing a small time window; see the discussion of cfg.latency at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#the_configuration_settings. But to properly control the type I error rate, it seems the time window of analysis should be chosen based on a priori predictions about where the effect should appear (i.e., not chosen based on your own data after you've looked at it). Best, Steve Politzer-Ahles Message: 5 > Date: Fri, 7 Oct 2011 10:18:01 +0100 > From: Zita Eva Patai > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] cluster>nothing to plot > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear All > > I am running the Cluster-based permutation tests on event related fields, > and for the same dataset, with all settings identical, when i run: > 0-200ms: i get one significant cluster > but: > 0-500ms: no significant clusters > > why does my significant cluster disappear depending on the time window i > use? > > thank you! > z > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > eva.patai at psy.ox.ac.uk > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lilla.Magyari at mpi.nl Fri Oct 7 15:08:11 2011 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Fri, 07 Oct 2011 15:08:11 +0200 Subject: [FieldTrip] cluster>nothing to plot In-Reply-To: References: Message-ID: <4E8EF9BB.90405@mpi.nl> hi Zita, I do not know what kind of script you wrote, therefore, it is difficult to figure out what the problem is exactly. But your problems reminds me to the following: if you followed the FT tutorial for plotting the clusters, you must be aware that it will plot only those channels in each time-bin that are part of the cluster during the entire time-bin. So, if you use a 50 ms bin, and a channel is part of the significant cluster only for 10 ms, you won't see that channel on the plot. I hope this helps. Best, Lilla Zita Eva Patai wrote: > Sorry, I know the answer now, but I have another , similar problem: > > When i get the clusterplot figure (after i run the cluster analysis), it > has the timebins every 4ms (bc i have a 250Hz sampling rate) with the > significant clusters plotted. > For a simplified plotting, i was trying to use the bit of script where i > can specify the timesteps i want the clusters to be shown in (ex: every > 50ms) > But, depending on what timestep i use, sometimes it does not display the > clusters that are significant, almost like if the period is not long > enough, it will not show the clusters... > > Any ideas ? > > Thank you! > > On Fri, Oct 7, 2011 at 10:18 AM, Zita Eva Patai > wrote: > > Dear All > > I am running the Cluster-based permutation tests on event related > fields, and for the same dataset, with all settings identical, when > i run: > 0-200ms: i get one significant cluster > but: > 0-500ms: no significant clusters > > why does my significant cluster disappear depending on the time > window i use? > > thank you! > z > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > eva.patai at psy.ox.ac.uk > > > > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > eva.patai at psy.ox.ac.uk > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD student Language and Cognition Group research assistant Neurobiology of Language Group Max Planck Institute for Psycholinguistics Nijmegen, P.O. Box 310, 6500AH, the Netherlands Phone: 0031 24 3521561 From eva.patai at psy.ox.ac.uk Fri Oct 7 15:26:39 2011 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Fri, 7 Oct 2011 14:26:39 +0100 Subject: [FieldTrip] cluster>nothing to plot In-Reply-To: <4E8EF9BB.90405@mpi.nl> References: <4E8EF9BB.90405@mpi.nl> Message-ID: Thank you Stephen & Lilla! I think I am just a bit overwhelmed with my data...and I was hoping to get straightforward results for my epoch... On Fri, Oct 7, 2011 at 2:08 PM, Magyari, Lilla wrote: > hi Zita, > > I do not know what kind of script you wrote, therefore, it is difficult to > figure out what the problem is exactly. But your problems reminds me to the > following: > if you followed the FT tutorial for plotting the clusters, you must be > aware that it will plot only those channels in each time-bin that are part > of the cluster during the entire time-bin. So, if you use a 50 ms bin, and a > channel is part of the significant cluster only for 10 ms, you won't see > that channel on the plot. I hope this helps. > > Best, > Lilla > > > Zita Eva Patai wrote: > >> Sorry, I know the answer now, but I have another , similar problem: >> >> When i get the clusterplot figure (after i run the cluster analysis), it >> has the timebins every 4ms (bc i have a 250Hz sampling rate) with the >> significant clusters plotted. For a simplified plotting, i was trying to use >> the bit of script where i can specify the timesteps i want the clusters to >> be shown in (ex: every 50ms) >> But, depending on what timestep i use, sometimes it does not display the >> clusters that are significant, almost like if the period is not long enough, >> it will not show the clusters... >> >> Any ideas ? >> >> Thank you! >> >> On Fri, Oct 7, 2011 at 10:18 AM, Zita Eva Patai > eva.patai at psy.ox.ac.uk**>> wrote: >> >> Dear All >> >> I am running the Cluster-based permutation tests on event related >> fields, and for the same dataset, with all settings identical, when >> i run: >> 0-200ms: i get one significant cluster >> but: >> 0-500ms: no significant clusters >> >> why does my significant cluster disappear depending on the time >> window i use? >> >> thank you! >> z >> >> >> -- >> Zita Patai >> DPhil Candidate, Experimental Psychology >> University of Oxford >> bcl.psy.ox.ac.uk/people/zita-**eva-patai/ >> >> > >> eva.patai at psy.ox.ac.uk >> >> >> >> >> >> >> -- >> >> Zita Patai >> DPhil Candidate, Experimental Psychology >> University of Oxford >> bcl.psy.ox.ac.uk/people/zita-**eva-patai/< >> http://bcl.psy.ox.ac.uk/**people/zita-eva-patai/ >> > >> eva.patai at psy.ox.ac.uk >> >> >> >> ------------------------------**------------------------------** >> ------------ >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > -- > PhD student > Language and Cognition Group > research assistant > Neurobiology of Language Group > > Max Planck Institute for Psycholinguistics > Nijmegen, P.O. Box 310, 6500AH, the Netherlands > Phone: 0031 24 3521561 > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -- Zita Patai DPhil Candidate, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ eva.patai at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Fri Oct 7 15:37:11 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Fri, 7 Oct 2011 15:37:11 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp Message-ID: Dear Fieldtrippers, I am using .avr files for source modelling on ERP data. From the ERP components, I have calculated the differencewaves in a .mat file. Until this it all went fine. However I get stuck at using .elp files. I can succesfully create the headmodel with ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model developed by Nolte (2003) However when using ft_prepare_leadfield(cfg) I get problems. My code is like this: % discretize brainvolume in grid cfg=[] cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01' [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) % reading in .elp files %renaming lbl.textdata to lbl.label, else it gives an error at ft_channelselection, because it is unable to read sens.label oldField = 'textdata'; newField = 'label'; [lbl.(newField)] = lbl.(oldField); lbl = rmfield(lbl,oldField); cfg.elec= lbl cfg.vol = vol; cfg.reducerank = 3; cfg.channel = 'Fz' cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution save cfg [grid] = ft_prepare_leadfield(cfg); When executing this I get the following commandscreen: .... ..... using headmodel specified in the configuration using electrodes specified in the configuration ??? Error using ==> ft_prepare_vol_sens at 110 the input does not look like EEG, nor like MEG Error in ==> prepare_headmodel at 114 [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ==> ft_prepare_leadfield at 159 [vol, sens, cfg] = prepare_headmodel(cfg, data); I think this is because I use .elp files? The .elp files contain N rows and 3 columns representing xyz or spherical coordinates I assume. However this is the only information I have about the electrodes, so I have to do with it. Any ideas? Kind regards, Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Oct 7 16:41:50 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 7 Oct 2011 16:41:50 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp In-Reply-To: References: Message-ID: <8D53B7F2-4C62-4D6A-97D5-74E2C98A1CF5@donders.ru.nl> Hi Brian, What does your cfg.elec look like? Best, JM On Oct 7, 2011, at 3:37 PM, wrote: > Dear Fieldtrippers, > > I am using .avr files for source modelling on ERP data. From the ERP components, I have calculated the differencewaves in a .mat file. Until this it all went fine. However I get stuck at using .elp files. > I can succesfully create the headmodel with ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model developed by Nolte (2003) > However when using ft_prepare_leadfield(cfg) I get problems. > > My code is like this: > > % discretize brainvolume in grid > cfg=[] > cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01' > [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) % reading in .elp files > > %renaming lbl.textdata to lbl.label, else it gives an error at ft_channelselection, because it is unable to read sens.label > oldField = 'textdata'; > newField = 'label'; > [lbl.(newField)] = lbl.(oldField); > lbl = rmfield(lbl,oldField); > cfg.elec= lbl > cfg.vol = vol; > cfg.reducerank = 3; > cfg.channel = 'Fz' > cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution > save cfg > [grid] = ft_prepare_leadfield(cfg); > > When executing this I get the following commandscreen: > .... > ..... > using headmodel specified in the configuration > using electrodes specified in the configuration > ??? Error using ==> ft_prepare_vol_sens at 110 > the input does not look like EEG, nor like MEG > > Error in ==> prepare_headmodel at 114 > [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); > > Error in ==> ft_prepare_leadfield at 159 > [vol, sens, cfg] = prepare_headmodel(cfg, data); > > I think this is because I use .elp files? The .elp files contain N rows and 3 columns representing xyz or spherical coordinates I assume. However this is the only information I have about the electrodes, so I have to do with it. > > Any ideas? > > Kind regards, > > Brian > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Fri Oct 7 17:07:18 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 7 Oct 2011 10:07:18 -0500 Subject: [FieldTrip] cluster>nothing to plot Message-ID: Hi Zita, I think Lilla's explanation for why your clusters are not showing up in the plot is right. If you're using the sample script from the cluster tutorial on the wiki, you can probably resolve this problem by just plotting smaller time windows; for example, to divide your epoch into 40 time windows instead of 20, make the "timestep" half as big, make the loop run from k=1:40 instead of k=1:20, and edit the adjust the number of subplots accordingly. Or, to get a more specific idea of the topography and time course of your significant cluster(s), you can look in the variables stat.posclusterslabelmat and stat.negclusterslabelmat, which tell you which (time, channel) samples belong to significant clusters. (I find it easiest to do this by writing those variables into Excel files and using Excel functions to find where the significant clusters are, but it can be done in Matlab as well.) This is a more exact way to see when and where significant clusters appear, without worrying about what time windows to select for plotting. Best, Steve Message: 4 > Date: Fri, 7 Oct 2011 14:26:39 +0100 > From: Zita Eva Patai > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] cluster>nothing to plot > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Thank you Stephen & Lilla! > > I think I am just a bit overwhelmed with my data...and I was hoping to get > straightforward results for my epoch... > > > On Fri, Oct 7, 2011 at 2:08 PM, Magyari, Lilla > wrote: > > > hi Zita, > > > > I do not know what kind of script you wrote, therefore, it is difficult > to > > figure out what the problem is exactly. But your problems reminds me to > the > > following: > > if you followed the FT tutorial for plotting the clusters, you must be > > aware that it will plot only those channels in each time-bin that are > part > > of the cluster during the entire time-bin. So, if you use a 50 ms bin, > and a > > channel is part of the significant cluster only for 10 ms, you won't see > > that channel on the plot. I hope this helps. > > > > Best, > > Lilla > > > > > > Zita Eva Patai wrote: > > > >> Sorry, I know the answer now, but I have another , similar problem: > >> > >> When i get the clusterplot figure (after i run the cluster analysis), it > >> has the timebins every 4ms (bc i have a 250Hz sampling rate) with the > >> significant clusters plotted. For a simplified plotting, i was trying to > use > >> the bit of script where i can specify the timesteps i want the clusters > to > >> be shown in (ex: every 50ms) > >> But, depending on what timestep i use, sometimes it does not display the > >> clusters that are significant, almost like if the period is not long > enough, > >> it will not show the clusters... > >> > >> Any ideas ? > >> > >> Thank you! > >> > >> On Fri, Oct 7, 2011 at 10:18 AM, Zita Eva Patai >> eva.patai at psy.ox.ac.uk**>> wrote: > >> > >> Dear All > >> > >> I am running the Cluster-based permutation tests on event related > >> fields, and for the same dataset, with all settings identical, when > >> i run: > >> 0-200ms: i get one significant cluster > >> but: > >> 0-500ms: no significant clusters > >> > >> why does my significant cluster disappear depending on the time > >> window i use? > >> > >> thank you! > >> z > >> > >> > >> -- > >> Zita Patai > >> DPhil Candidate, Experimental Psychology > >> University of Oxford > >> bcl.psy.ox.ac.uk/people/zita-**eva-patai/< > http://bcl.psy.ox.ac.uk/people/zita-eva-patai/> > >> http://bcl.psy.ox.ac.uk/people/zita-eva-patai/> > >> > > >> eva.patai at psy.ox.ac.uk > >> > >> > >> > >> > >> > >> > >> -- > >> > >> Zita Patai > >> DPhil Candidate, Experimental Psychology > >> University of Oxford > >> bcl.psy.ox.ac.uk/people/zita-**eva-patai/< > http://bcl.psy.ox.ac.uk/people/zita-eva-patai/>< > >> http://bcl.psy.ox.ac.uk/**people/zita-eva-patai/< > http://bcl.psy.ox.ac.uk/people/zita-eva-patai/> > >> > > >> eva.patai at psy.ox.ac.uk > >> > >> > >> > >> ------------------------------**------------------------------** > >> ------------ > >> > >> ______________________________**_________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip< > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip> > >> > > > > -- > > PhD student > > Language and Cognition Group > > research assistant > > Neurobiology of Language Group > > > > Max Planck Institute for Psycholinguistics > > Nijmegen, P.O. Box 310, 6500AH, the Netherlands > > Phone: 0031 24 3521561 > > > > ______________________________**_________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip< > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip> > > > > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > eva.patai at psy.ox.ac.uk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From BelluscB at ninds.nih.gov Fri Oct 7 17:40:11 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Fri, 7 Oct 2011 11:40:11 -0400 Subject: [FieldTrip] Using "virtual sensors" for data analysis Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CD33@NIHMLBX10.nih.gov> Dear Fieldtrippers- In my process of learning about different methods of analyzing MEG data, I have found the different Fieldtrip tutorials extremely useful. One method that is frequently quoted in the literature is using "virtual sensors" to determine, for example, the frequency response associated with an event within a specific brain region. In trying to learn about the processing steps necessary for this method, it has been difficult for me to translate the methods quoted in the literature into specific steps within Fieldtrip. I wonder what people think about trying to construct a tutorial that would act as a guide to the procedures (and pitfalls) associated with analyzing data within source space. Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Sun Oct 9 21:53:13 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Sun, 9 Oct 2011 21:53:13 +0200 Subject: [FieldTrip] problem exiting ft_databrowser Message-ID: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> Hi, I am very happy with the ft_databrowser, and looking at artifacts works fine. I can also use the keys to switch between artifact types, move between trials etc. However, when I press "q" to exit, nothing happens. If I then close the window manually, no artifacts are added to my data or cfg structures (even though when I select them, it says: "there is no overlap with the active artifact (visual), mark this as a new artifact"). What should I do? Is there a way to exit and still save the marked artifacts? I am using fieldtrip on MacOSX, matlab 2011a). Thanks so much! Marieke ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Sun Oct 9 23:08:52 2011 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Sun, 09 Oct 2011 14:08:52 -0700 Subject: [FieldTrip] problem exiting ft_databrowser In-Reply-To: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> References: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> Message-ID: <4E920D64.4030603@berkeley.edu> Hi Marieke, The "q" key not working is a known bug. When the mouse has been used, for some reason the "q" does not work anymore. However, this is not the cause of the artifacts not being saved. Both pressing the "q" and closing the window manually has the exact same effect as programmed in the code. The artifacts should be present as an artifact structure (2 columns for each artifact, 1st column beginsample, 2nd endsample), which should be added to the output cfg.artfctdef..artifact. Is this not the case for you? Hope this helps, Ingrid On 10/9/2011 12:53 PM, Marieke van Vugt wrote: > Hi, > I am very happy with the ft_databrowser, and looking at artifacts > works fine. I can also use the keys to switch between artifact types, > move between trials etc. However, when I press "q" to exit, nothing > happens. If I then close the window manually, no artifacts are added > to my data or cfg structures (even though when I select them, it says: > "there is no overlap with the active artifact (visual), mark this as a > new artifact"). > What should I do? Is there a way to exit and still save the marked > artifacts? I am using fieldtrip on MacOSX, matlab 2011a). > Thanks so much! > Marieke > ---------------------------------------------------------------------------- > Marieke van Vugt, PhD > Assistant Professor, Cognitive Modeling Group > Bernoulliborg, room 326 > Nijenborgh 9 > 9747 AG Groningen > The Netherlands > phone: +31-6-51954984 (cell) > +31-50-363-9487 (office) > http://www.ai.rug.nl/~mkvanvugt > m.k.van.vugt at rug.nl > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Mon Oct 10 06:22:03 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Mon, 10 Oct 2011 06:22:03 +0200 Subject: [FieldTrip] problem exiting ft_databrowser In-Reply-To: <4E920D64.4030603@berkeley.edu> References: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> <4E920D64.4030603@berkeley.edu> Message-ID: <4FEB753B-A6E7-4FBD-B8F7-2358B0289D37@rug.nl> Hi Ingrid, I figured out the problem: I did not realize the ft_databrowser was a function, and hence I just called ft_databrowser(cfg,data) without output argument. Using instead cfg=ft_databrowser(cfg,data) made both the "q" key work and gave cfg and artfctdef field. Problem solved! Thank you! (as you can tell, I just started using fieldtrip...) Warm regards, Marieke On Oct 9, 2011, at 11:08 , Ingrid Nieuwenhuis wrote: > Hi Marieke, > > The "q" key not working is a known bug. When the mouse has been used, for some reason the "q" does not work anymore. However, this is not the cause of the artifacts not being saved. Both pressing the "q" and closing the window manually has the exact same effect as programmed in the code. The artifacts should be present as an artifact structure (2 columns for each artifact, 1st column beginsample, 2nd endsample), which should be added to the output cfg.artfctdef..artifact. Is this not the case for you? > > Hope this helps, > Ingrid > > On 10/9/2011 12:53 PM, Marieke van Vugt wrote: >> >> Hi, >> I am very happy with the ft_databrowser, and looking at artifacts works fine. I can also use the keys to switch between artifact types, move between trials etc. However, when I press "q" to exit, nothing happens. If I then close the window manually, no artifacts are added to my data or cfg structures (even though when I select them, it says: "there is no overlap with the active artifact (visual), mark this as a new artifact"). >> What should I do? Is there a way to exit and still save the marked artifacts? I am using fieldtrip on MacOSX, matlab 2011a). >> Thanks so much! >> Marieke >> ---------------------------------------------------------------------------- >> Marieke van Vugt, PhD >> Assistant Professor, Cognitive Modeling Group >> Bernoulliborg, room 326 >> Nijenborgh 9 >> 9747 AG Groningen >> The Netherlands >> phone: +31-6-51954984 (cell) >> +31-50-363-9487 (office) >> http://www.ai.rug.nl/~mkvanvugt >> m.k.van.vugt at rug.nl >> >> >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Ingrid Nieuwenhuis PhD > Postdoctoral Fellow > Sleep and Neuroimaging Laboratory > Department of Psychology > University of California, Berkeley > California 94720-1650 > Tolman Hall, room 5305 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Oct 10 09:28:43 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 10 Oct 2011 09:28:43 +0200 Subject: [FieldTrip] problem exiting ft_databrowser In-Reply-To: <4E920D64.4030603@berkeley.edu> References: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> <4E920D64.4030603@berkeley.edu> Message-ID: <4E929EAB.7020003@donders.ru.nl> Hi Ingrid, just as a small addition: the 'q' key, as well as all other keys, should always work in the newer version also after pressing a button. Best, Jörn On 10/9/2011 11:08 PM, Ingrid Nieuwenhuis wrote: > Hi Marieke, > > The "q" key not working is a known bug. When the mouse has been used, > for some reason the "q" does not work anymore. However, this is not > the cause of the artifacts not being saved. Both pressing the "q" and > closing the window manually has the exact same effect as programmed in > the code. The artifacts should be present as an artifact structure (2 > columns for each artifact, 1st column beginsample, 2nd endsample), > which should be added to the output cfg.artfctdef. visual>.artifact. Is this not the case for you? > > Hope this helps, > Ingrid > > On 10/9/2011 12:53 PM, Marieke van Vugt wrote: >> Hi, >> I am very happy with the ft_databrowser, and looking at artifacts >> works fine. I can also use the keys to switch between artifact types, >> move between trials etc. However, when I press "q" to exit, nothing >> happens. If I then close the window manually, no artifacts are added >> to my data or cfg structures (even though when I select them, it >> says: "there is no overlap with the active artifact (visual), mark >> this as a new artifact"). >> What should I do? Is there a way to exit and still save the marked >> artifacts? I am using fieldtrip on MacOSX, matlab 2011a). >> Thanks so much! >> Marieke >> ---------------------------------------------------------------------------- >> Marieke van Vugt, PhD >> Assistant Professor, Cognitive Modeling Group >> Bernoulliborg, room 326 >> Nijenborgh 9 >> 9747 AG Groningen >> The Netherlands >> phone: +31-6-51954984 (cell) >> +31-50-363-9487 (office) >> http://www.ai.rug.nl/~mkvanvugt >> m.k.van.vugt at rug.nl >> >> >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Ingrid Nieuwenhuis PhD > Postdoctoral Fellow > Sleep and Neuroimaging Laboratory > Department of Psychology > University of California, Berkeley > California 94720-1650 > Tolman Hall, room 5305 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Mon Oct 10 11:45:00 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Mon, 10 Oct 2011 11:45:00 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp (jan-mathijs schoffelen) References: Message-ID: Hello Jan-Mathijs, My elec file is a struct, containing a 32x3 double called 'label'. I think these contain the coordinates. Also it contains two 32x1 cells. Called 'textdata' and 'rowheaders'. They contain the same info (names of the 31 channels + average): 'CP2' 'CP5' 'CP6' 'Cz' 'F3' 'F4' 'F7' 'F8' 'FC1' 'FC2' 'FC5' 'FC6' 'Fp1' 'Fp2' 'FT10' 'FT9' 'Fz' 'O1' 'O2' 'P3' 'P4' 'P7' 'P8' 'PO3' 'PO4' 'Pz' 'T7' 'T8' 'Avg' I hope this is enough info for you, to help me with the solution Best, Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3041 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Mon Oct 10 13:11:51 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 10 Oct 2011 13:11:51 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp (jan-mathijs schoffelen) In-Reply-To: References: Message-ID: <082AE8BF-F2B5-4B88-BA32-46F9D455373F@donders.ru.nl> Hi Brian, In order to be able to create a leadfield matrix for forward and inverse modelling, you need to have position information of the electrodes. In the ideal case, these should be measured for each individual subject. If you don't have this information and used standard electrode caps, you can also try and use a set of template electrode positions. Best wishes, Jan-Mathijs On Oct 10, 2011, at 11:45 AM, wrote: > Hello Jan-Mathijs, > > My elec file is a struct, containing a 32x3 double called 'label'. I think these contain the coordinates. Also it contains two 32x1 cells. Called 'textdata' and 'rowheaders'. They contain the same info (names of the 31 channels + average): > > 'CP2' > 'CP5' > 'CP6' > 'Cz' > 'F3' > 'F4' > 'F7' > 'F8' > 'FC1' > 'FC2' > 'FC5' > 'FC6' > 'Fp1' > 'Fp2' > 'FT10' > 'FT9' > 'Fz' > 'O1' > 'O2' > 'P3' > 'P4' > 'P7' > 'P8' > 'PO3' > 'PO4' > 'Pz' > 'T7' > 'T8' > 'Avg' > > I hope this is enough info for you, to help me with the solution > > Best, > > Brian > > > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Mon Oct 10 20:07:37 2011 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Mon, 10 Oct 2011 11:07:37 -0700 Subject: [FieldTrip] problem exiting ft_databrowser In-Reply-To: <4E929EAB.7020003@donders.ru.nl> References: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> <4E920D64.4030603@berkeley.edu> <4E929EAB.7020003@donders.ru.nl> Message-ID: <4E933469.9080103@berkeley.edu> Hi Jörn, Great that that's fixed! Ingrid On 10/10/2011 12:28 AM, "Jörn M. Horschig" wrote: > Hi Ingrid, > > just as a small addition: the 'q' key, as well as all other keys, > should always work in the newer version also after pressing a button. > > Best, > Jörn > > > On 10/9/2011 11:08 PM, Ingrid Nieuwenhuis wrote: >> Hi Marieke, >> >> The "q" key not working is a known bug. When the mouse has been used, >> for some reason the "q" does not work anymore. However, this is not >> the cause of the artifacts not being saved. Both pressing the "q" and >> closing the window manually has the exact same effect as programmed >> in the code. The artifacts should be present as an artifact >> structure (2 columns for each artifact, 1st column beginsample, 2nd >> endsample), which should be added to the output >> cfg.artfctdef..artifact. Is this not the >> case for you? >> >> Hope this helps, >> Ingrid >> >> On 10/9/2011 12:53 PM, Marieke van Vugt wrote: >>> Hi, >>> I am very happy with the ft_databrowser, and looking at artifacts >>> works fine. I can also use the keys to switch between artifact >>> types, move between trials etc. However, when I press "q" to exit, >>> nothing happens. If I then close the window manually, no artifacts >>> are added to my data or cfg structures (even though when I select >>> them, it says: "there is no overlap with the active artifact >>> (visual), mark this as a new artifact"). >>> What should I do? Is there a way to exit and still save the marked >>> artifacts? I am using fieldtrip on MacOSX, matlab 2011a). >>> Thanks so much! >>> Marieke >>> ---------------------------------------------------------------------------- >>> Marieke van Vugt, PhD >>> Assistant Professor, Cognitive Modeling Group >>> Bernoulliborg, room 326 >>> Nijenborgh 9 >>> 9747 AG Groningen >>> The Netherlands >>> phone: +31-6-51954984 (cell) >>> +31-50-363-9487 (office) >>> http://www.ai.rug.nl/~mkvanvugt >>> m.k.van.vugt at rug.nl >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Ingrid Nieuwenhuis PhD >> Postdoctoral Fellow >> Sleep and Neuroimaging Laboratory >> Department of Psychology >> University of California, Berkeley >> California 94720-1650 >> Tolman Hall, room 5305 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Oct 11 12:34:07 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 11 Oct 2011 12:34:07 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp (jan-mathijs schoffelen) In-Reply-To: References: Message-ID: Dear Brian I suggest you look at http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described to convert your electrode positions to fieldtrip format and http://fieldtrip.fcdonders.nl/faq/is_it_important_to_have_accurate_measurements_of_electrode_locations_for_eeg_source_reconstruction and the other faqs for more background information. Furthermore, you can use the standard BEM volume conduction model that is available from the FTP server and spatially coresister your electrodes with the standard BEM geometry using ft_electroderealign or another method of your choise. Following that, I suggest you do some forward simulations (ft_dipolesimulation) and visualise the scalp topographies to check that they make sense prior to moving to the inverse source estimatione (ft_sourceanalysis or ft_dipolefitting). best regards, Robert On 10 Oct 2011, at 11:45, wrote: > Hello Jan-Mathijs, > > My elec file is a struct, containing a 32x3 double called 'label'. I think these contain the coordinates. Also it contains two 32x1 cells. Called 'textdata' and 'rowheaders'. They contain the same info (names of the 31 channels + average): > > 'CP2' > 'CP5' > 'CP6' > 'Cz' > 'F3' > 'F4' > 'F7' > 'F8' > 'FC1' > 'FC2' > 'FC5' > 'FC6' > 'Fp1' > 'Fp2' > 'FT10' > 'FT9' > 'Fz' > 'O1' > 'O2' > 'P3' > 'P4' > 'P7' > 'P8' > 'PO3' > 'PO4' > 'Pz' > 'T7' > 'T8' > 'Avg' > > I hope this is enough info for you, to help me with the solution > > Best, > > Brian > > > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From batrod at gmail.com Tue Oct 11 18:43:47 2011 From: batrod at gmail.com (Rodolphe Nenert) Date: Tue, 11 Oct 2011 11:43:47 -0500 Subject: [FieldTrip] Clustering error Message-ID: Dear Fieldtripers, i tried to modify one of my script that was doing a permutation test in order to do the same test but within trials. I had the following error and couldnt find where it could comes from: using "statfun_depsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 79 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 2 over 51 levels number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ==> statfun_depsamplesT at 69 Invalid specification of the design array. ??? Error using ==> statistics_montecarlo at 215 could not determine the parametric critical value for clustering Error in ==> ft_freqstatistics at 279 [stat, cfg] = statmethod(cfg, dat, cfg.design); Any ideas ? ( im using the very last fieltrip version : 20111010) Rodolphe N. PhD University of Alabama at Birmingham. -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Wed Oct 12 11:40:57 2011 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 12 Oct 2011 11:40:57 +0200 Subject: [FieldTrip] DPSS and montage Message-ID: Dear fieldtrippers, I've been using Fieldtrip as an Intern for two months now, and have repeatedly run into a problem when using DPSS. When using the below settings, the computer locks up within seconds (although it does seem to do 'something'), stays that way for up to ten minutes (which is my personal cutoff, where I force a reboot), and then reports an 'out of memory'. cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'dpss'; cfg.foilim = [20 200]; cfg.tapsmofrq = 1; The data fed to ft_freqanalysis is the result of roughly 30 seconds continuous data of a single (originally bipolar) channel processed by ft_preprocessing. When using 'hanning' it completes without a hitch, but DPSS doesn't. I've tried the same thing using a different, more powerful computer, which succesfully completed 30 seconds using the above settings, but when setting the tapsmofrq to 3 the RAM was filled up in a period of a few seconds, and the computer choked. The 'normal' computer has 2GB of ram, and a dual-core intel running at 2GHz, and the more powerful computer has 8GB ram with an quad-core AMD at 3.4GHz. What am I doing wrong? Secondly, I was wondering about the 'montage' funcionality, since I'll be making use of bipolar arrangements, but the parameters of the montage-structure as defined on http://fieldtrip.fcdonders.nl/reference/ft_apply_montage don't help me much in making one of my own. Would it be possible to take a look at an existing montage structure, such as the one referred to on http://fieldtrip.fcdonders.nl/getting_started/neuralynx_fcdc? Sincerely, Casper van Heck -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Wed Oct 12 12:22:03 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Wed, 12 Oct 2011 12:22:03 +0200 Subject: [FieldTrip] DPSS and montage In-Reply-To: References: Message-ID: <4E956A4B.5070600@donders.ru.nl> Hi Casper, On the memory issues, using DPSS tapers on very large segments of data, while at the same time using cfg.foilim (instead of the more selective cfg.foi), results in a huge explosion of required memory. This is so because the amount of tapers for a specified smoothing increases with the length of the trials, and the same holds for the amount of estimable frequencies. In your case, it might be easiest to specify a cfg.foi, instead of cfg.foilim, e.g. cfg.foi = 20:1:200 should already greatly reduce the amount of memory needed. Increasing the amount of smoothing also greatly increases the amount of tapers needed. If you are looking for a higher smoothing, and you still don't have enough memory, you can try to cut your trials in smaller pieces, or use downsampling (the amount of tapers depends on the amount of samples used). Best, Roemer On 12/10/2011 11:40, Casper van Heck wrote: > Dear fieldtrippers, > > I've been using Fieldtrip as an Intern for two months now, and have > repeatedly run into a problem when using DPSS. When using the below > settings, the computer locks up within seconds (although it does seem > to do 'something'), stays that way for up to ten minutes (which is my > personal cutoff, where I force a reboot), and then reports an 'out of > memory'. > > cfg.method = 'mtmfft'; > cfg.output = 'pow'; > cfg.taper = 'dpss'; > cfg.foilim = [20 200]; > cfg.tapsmofrq = 1; > > The data fed to ft_freqanalysis is the result of roughly 30 seconds > continuous data of a single (originally bipolar) channel processed by > ft_preprocessing. > When using 'hanning' it completes without a hitch, but DPSS doesn't. > I've tried the same thing using a different, more powerful computer, > which succesfully completed 30 seconds using the above settings, but > when setting the tapsmofrq to 3 the RAM was filled up in a period of a > few seconds, and the computer choked. The 'normal' computer has 2GB of > ram, and a dual-core intel running at 2GHz, and the more powerful > computer has 8GB ram with an quad-core AMD at 3.4GHz. What am I doing > wrong? > > Secondly, I was wondering about the 'montage' funcionality, since I'll > be making use of bipolar arrangements, but the parameters of the > montage-structure as defined on > http://fieldtrip.fcdonders.nl/reference/ft_apply_montage don't help me > much in making one of my own. Would it be possible to take a look at > an existing montage structure, such as the one referred to on > http://fieldtrip.fcdonders.nl/getting_started/neuralynx_fcdc? > > Sincerely, > > Casper van Heck > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Wed Oct 12 17:05:50 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 12 Oct 2011 17:05:50 +0200 Subject: [FieldTrip] DPSS and montage In-Reply-To: References: Message-ID: <6C6F09A3-D7AB-45D6-A3D5-7198A23E0E46@donders.ru.nl> Dear Casper Let me give an example montage, which assumes that you start with a monopolar dataset with 4 channels that you want to convert to a 3-channel bipolar dataset. bipolar.labelorg = {'1', '2', '3', '4'} bipolar.labelnew = {'1-2', '2-3', '3-4'} bipolar.tra = [ +1 -1 0 0 0 +1 -1 0 0 0 +1 -1 ]; The FT_APPLY_MONTAGE function can be used on a variety of FT data structures, such as prepocessed raw data, electrode and gradiometer definitions, freqanalyzed data (in fourier representation). If you imagine having a plain NxM data matrix with the N=4 original channels and M is the number of timepoints, you'll see that applying the montage is equivalent to multiplying the data with "bipolar.tra" The reason for having the FT_APPLY_MONTAGE function is to deal with the bookkeeping, e.g. reordering channels and checking that all channels are present. best Robert PS I'll add this example to the reference docs. On 12 Oct 2011, at 11:40, Casper van Heck wrote: > Dear fieldtrippers, > > I've been using Fieldtrip as an Intern for two months now, and have repeatedly run into a problem when using DPSS. When using the below settings, the computer locks up within seconds (although it does seem to do 'something'), stays that way for up to ten minutes (which is my personal cutoff, where I force a reboot), and then reports an 'out of memory'. > > cfg.method = 'mtmfft'; > cfg.output = 'pow'; > cfg.taper = 'dpss'; > cfg.foilim = [20 200]; > cfg.tapsmofrq = 1; > > The data fed to ft_freqanalysis is the result of roughly 30 seconds continuous data of a single (originally bipolar) channel processed by ft_preprocessing. > When using 'hanning' it completes without a hitch, but DPSS doesn't. I've tried the same thing using a different, more powerful computer, which succesfully completed 30 seconds using the above settings, but when setting the tapsmofrq to 3 the RAM was filled up in a period of a few seconds, and the computer choked. The 'normal' computer has 2GB of ram, and a dual-core intel running at 2GHz, and the more powerful computer has 8GB ram with an quad-core AMD at 3.4GHz. What am I doing wrong? > > Secondly, I was wondering about the 'montage' funcionality, since I'll be making use of bipolar arrangements, but the parameters of the montage-structure as defined on http://fieldtrip.fcdonders.nl/reference/ft_apply_montage don't help me much in making one of my own. Would it be possible to take a look at an existing montage structure, such as the one referred to on http://fieldtrip.fcdonders.nl/getting_started/neuralynx_fcdc? > > Sincerely, > > Casper van Heck > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From t.navarroschroder at fcdonders.ru.nl Wed Oct 12 18:52:05 2011 From: t.navarroschroder at fcdonders.ru.nl (=?utf-8?Q?Navarro_Schr=C3=B6der=2C_T=2E?=) Date: Wed, 12 Oct 2011 18:52:05 +0200 (CEST) Subject: [FieldTrip] FWD: Postdoctoral Position in Cognitive Neuroscience of Learning and Memory (1, 0 fte) Donders Institute, Centre for Cognitive Neuroimaging In-Reply-To: <2014767137.412717.1318438313892.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <100987555.412720.1318438325650.JavaMail.root@sculptor.zimbra.ru.nl> Dear all, there is a postdoctoral position in Cognitive Neuroscience available at the Donders Institute, Centre for Cognitive Neuroimaging: See: http://www.ru.nl/vacatures/details/details_vacature_0?recid=505393 or attachment. With kind regards, Tobias Navarro Schroeder -- Tobias Navarro Schroeder PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: t.navarroschroder at fcdonders.ru.nl Phone: +31(0)616958350 -------------- next part -------------- A non-text attachment was scrubbed... Name: vacature.rtf Type: application/rtf Size: 287828 bytes Desc: not available URL: From omoniyi_s at yahoo.com Wed Oct 12 19:11:35 2011 From: omoniyi_s at yahoo.com (Omoniyi Segun) Date: Wed, 12 Oct 2011 10:11:35 -0700 (PDT) Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan CNT file In-Reply-To: <1317826002.17170.YahooMailNeo@web65917.mail.ac4.yahoo.com> References: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> <1317826002.17170.YahooMailNeo@web65917.mail.ac4.yahoo.com> Message-ID: <1318439495.10726.YahooMailNeo@web65907.mail.ac4.yahoo.com> Hi Jan-mathijs, Did you get a chance to look at the problem described about neuroscan CNT file. Thanks Omoniyi Segun  ________________________________ From: Omoniyi Segun To: jan-mathijs schoffelen ; Email discussion list for the FieldTrip project Sent: Wednesday, October 5, 2011 10:46 AM Subject: Re: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file Thanks for your response. I am passing a 'subject' structure which contains the file location and file name to the do_reject_artifacts function which i wrote. Inside the function i have inserted the code I got from the tutorial. The structure is created in a do_preprocess function, i read all the files in a directory structure and create the subject stucture in this function. The files are Neuroscan .cnt files Thanks for your help Omoniyi Segun snippet from : do_preprocess         clear subject;         if ( reply == 'Y' || reply == 'y')             %token = strtok(subjectdata.filename{i}, '.');             token = strtok(files(i).name, '.');             subject.datafile = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir filesep files(i).name];             subject.datafilename = token;             subject.datafiledir = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir];             subject.artifactdir = subjectdata.artifactdir; snippet from : do_reject_artifacts cfg.dataset            = 'subject.datafile;       % name of EEG dataset  cfg.trialdef.eventtype      = 'trigger'; cfg.trialdef.prestim        = 1; cfg.trialdef.poststim       = 2; cfg.trialdef.eventvalue     = [1 2];                                    cfg = ft_definetrial(cfg);            data= ft_preprocessing(cfg) trl = cfg.trl; % jump cfg                    = []; cfg.trl = trl; cfg.padding = 0; cfg.datafile   = subject.datafile; cfg.headerfile = subject.datafile; cfg.continuous = 'yes'; cfg.memory = 'low'; % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel    = 'EEG'; cfg.artfctdef.zvalue.cutoff     = 20; cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.fltpadding = 0;   % algorithmic parameters cfg.artfctdef.zvalue.cumulative    = 'yes'; cfg.artfctdef.zvalue.medianfilter  = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff       = 'yes';   % make the process interactive cfg.artfctdef.zvalue.interactive   = 'yes';   [cfg, artifact_jump] = ft_artifact_zvalue(cfg,data); ________________________________ From: jan-mathijs schoffelen To: Omoniyi Segun ; Email discussion list for the FieldTrip project Sent: Tuesday, October 4, 2011 8:15 AM Subject: Re: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file Hi Omoniyi, What kind of data are you passing to the function?  BW, JM On Oct 3, 2011, at 4:49 PM, Omoniyi Segun wrote: Hi, > > >I am new to fieldtrip and have been struggling with it for the past four weeks. > > > >I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; >I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data. > > >Secondly when i click on stop I get the error pasted below. > > > > > >??? Reference to non-existent field 'dimord'. > >Error in ==> dimlength at 74 >      elseif strcmp(data.(fld), 'rpt_pos') > >Error in ==> fixsampleinfo at 31 >  ntrial = dimlength(data, 'rpt'); > >Error in ==> ft_checkdata at 579 >  data = fixsampleinfo(data); > >Error in ==> ft_rejectartifact at 203 >  data = ft_checkdata(data, 'hassampleinfo', 'yes'); > >Error in ==> do_reject_artifacts at 70 >data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); > >Error in ==> do_preprocess at 45 >                do_reject_artifacts(subject); > > >I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data. > > >Thanks > > >Omoniyi Segun > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD  Donders Institute for Brain, Cognition and Behaviour,  Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.todorovic at fcdonders.ru.nl Mon Oct 17 10:55:22 2011 From: a.todorovic at fcdonders.ru.nl (Todorovic, A.) Date: Mon, 17 Oct 2011 10:55:22 +0200 (CEST) Subject: [FieldTrip] fieldtrip application of depsamplesT Message-ID: <138307306.568035.1318841722776.JavaMail.root@monoceros.zimbra.ru.nl> Hello ft_list, I am wondering if any changes have recently been made to the t-test scripts in FieldTrip. I re-did an analysis I previously ran in August and am getting somewhat more conservative estimates for my clusters. This could of course be due to random fluctuations in the output, but my feeling is that something is different in the settings with respect to how cluster tails are implemented. Are there new changes to these scripts, and if yes, could you please let me/us know what they are? Regards, Ana From vitoria.piai at gmail.com Wed Oct 19 05:30:25 2011 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Wed, 19 Oct 2011 05:30:25 +0200 Subject: [FieldTrip] problem with ft_prepare_neighbours / ft_neighbourselection In-Reply-To: <4E9E4331.20200@donders.ru.nl> References: <4E9E4331.20200@donders.ru.nl> Message-ID: <4E9E4451.1080308@gmail.com> Hi, Since a latest change from yesterday (Oct 18th), I'm getting an error when running either ft_prepare_neighbours / ft_neighbourselection on channelposition at line 71 because of a reference to non-existent field 'tra'. I'm working with planar gradients. Hopefully this is a temporary bug, but otherwise what would be the right way to configure the parameters? Thank you, Vitoria From jan.schoffelen at donders.ru.nl Wed Oct 19 11:18:31 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 19 Oct 2011 11:18:31 +0200 Subject: [FieldTrip] problem with ft_prepare_neighbours / ft_neighbourselection In-Reply-To: <4E9E4451.1080308@gmail.com> References: <4E9E4331.20200@donders.ru.nl> <4E9E4451.1080308@gmail.com> Message-ID: Dear Vitória, At the moment, the part of the FieldTrip code dealing with channel positions is not so stable. This has high priority for us and we will discuss the issue in today's FieldTrip team meeting. Hopefully we will be able to provide a stable version very soon. For now, I'd advice not to use the latest version if that is causing you trouble. Best wishes, Jan-Mathijs On Oct 19, 2011, at 5:30 AM, Vitória Magalhães Piai wrote: > > > Hi, > > Since a latest change from yesterday (Oct 18th), I'm getting an error > when running either ft_prepare_neighbours / ft_neighbourselection on > channelposition at line 71 because of a reference to non-existent field > 'tra'. > I'm working with planar gradients. > > Hopefully this is a temporary bug, but otherwise what would be the right > way to configure the parameters? > > Thank you, Vitoria > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Wed Oct 19 15:54:37 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Wed, 19 Oct 2011 15:54:37 +0200 Subject: [FieldTrip] beamforming - normilise issue Message-ID: Dear all, I am trying to use beamforming for some MEG data. I have 1 condition, and I wish to compare it against the baseline. Ideally I wish to have the average of all group and statistically compare stimulus agains baseline.. As such, for each subject I calculate the source for the baseline and the source for the stimulus (using a common filter as indicated on the website). I then call ft_sourceinterpolate and, since I wish to have a group analysis, ft_volumenormalise. In order to compute the average, I call ft_sourcegrandaverage. Even though the help tells me that it is fine, the grandaverage does not work if the input is from the ft_volumenormalise. It is because there is not the ".pos" field! Am I doing something wrong? Any advice would be great. Thanks a lot, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at web.de Wed Oct 19 17:44:24 2011 From: michael.wibral at web.de (Michael Wibral) Date: Wed, 19 Oct 2011 17:44:24 +0200 (CEST) Subject: [FieldTrip] beamforming - normilise issue Message-ID: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Wed Oct 19 18:12:10 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Wed, 19 Oct 2011 18:12:10 +0200 Subject: [FieldTrip] beamforming - normilise issue In-Reply-To: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> References: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> Message-ID: Hi Michael, I am using the single shell (Nolte). The grid has 2340 positions, but I am not still using mni. Thanks, Davide On Wed, Oct 19, 2011 at 5:44 PM, Michael Wibral wrote: > Hi davide, > > what headmodel and grid are you using? > > Michael > > > ------------------------------ > *Von:* "Davide Rivolta" > *Gesendet:* Oct 19, 2011 3:54:37 PM > *An:* "Email discussion list for the FieldTrip project" < > fieldtrip at donders.ru.nl> > *Betreff:* [FieldTrip] beamforming - normilise issue > > > Dear all, > > I am trying to use beamforming for some MEG data. > > I have 1 condition, and I wish to compare it against the baseline. Ideally > I wish to have the average of all group and statistically compare stimulus > agains baseline.. > > As such, for each subject I calculate the source for the baseline and the > source for the stimulus (using a common filter as indicated on the website). > > I then call ft_sourceinterpolate and, since I wish to have a group > analysis, ft_volumenormalise. > In order to compute the average, I call ft_sourcegrandaverage. > > Even though the help tells me that it is fine, the grandaverage does not > work if the input is from the ft_volumenormalise. It is because there is not > the ".pos" field! > > Am I doing something wrong? > > Any advice would be great. > > Thanks a lot, > > Davide > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From dgroppe at cogsci.ucsd.edu Thu Oct 20 04:01:29 2011 From: dgroppe at cogsci.ucsd.edu (David Groppe) Date: Wed, 19 Oct 2011 19:01:29 -0700 (PDT) Subject: [FieldTrip] removing EEG 1/f spectral power Message-ID: Hi FieldTrippers, I am interested in studying the spectral peaks in resting EEG. Identifying these peaks is complicated by the 1/f distribution of EEG power. Do any of you have suggestions for removing the 1/f distribution to better reveal peaks? I've seen people suggest autoregressive modelling or applying high pass filters but in the couple of attempts I've seen the results look fair. much appreciated, -David From t.schneider at uke.uni-hamburg.de Thu Oct 20 12:33:40 2011 From: t.schneider at uke.uni-hamburg.de (Till Schneider) Date: Thu, 20 Oct 2011 12:33:40 +0200 Subject: [FieldTrip] PhD and post-doctoral positions - University Medical Center Hamburg-Eppendorf Message-ID: <4E9FF904.6050700@uke.uni-hamburg.de> Dear all, please find attached two job advertisements for PhD and post-doctoral positions at the Dept. of Neurophysiology and Pathophysiology, University Medical Center Hamburg-Eppendorf, Hamburg, Germany. These positions are funded through the Collaborative Research Centre SFB 936 „Multi-Site Communication in the Brain“ (www.sfb936.net) (offer #1) and the ERC Advanced Investigators Grant MULTISENSE “The merging of the senses: understanding multisensory experience” (offer #2) respectively. Best regards, Till Schneider -- Till Schneider, PhD Cognitive and Clinical Neurophysiology Group Dept. of Neurophysiology and Pathophysiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg Germany phone +49-40-7410-53188 fax +49-40-7410-57126 t.schneider at uke.de -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus -------------- next part -------------- A non-text attachment was scrubbed... Name: Job_advertisement_Hamburg1.pdf Type: application/pdf Size: 22836 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Job_advertisement_Hamburg2.pdf Type: application/pdf Size: 22922 bytes Desc: not available URL: From grion at sissa.it Fri Oct 21 01:43:32 2011 From: grion at sissa.it (Natalia Grion) Date: Fri, 21 Oct 2011 01:43:32 +0200 Subject: [FieldTrip] Between-Trial Stats on Coherence Message-ID: <20111021014332.Horde.2VPvCx8V4mxOoLIkv4KGG8A@webmail.sissa.it> Dear All, when computing the statistical test for difference in coherence between condition 1 and condition 2 (for single subject) I get NaNs for stat. The setting code is quite simple and I did some checking for silly errors(ex. I dowloaded the very last version), so either I'm doing sth wrong or there is a bug somwhere. Maybe you can help me. I do the following: having computed the 'fourier' for both conditions (diff amount of trials), I run the code for the second step (whithout MC correction for the moment). I have 2 channel on which Im computing the coherence. The data for both conditions have the same length. The design is a betweenTrial so: #trls c1 + #trls c2. and 1 independent variable. AmI missing something on the design or like reshaping the data? Any help is welcome! Natalia cfg = []; cfg.channel ={'lfp';'Whisk'}; cfg.channelcmb ={'lfp' 'Whisk'}; cfg.frequency ='all'; cfg.method = 'montecarlo'; cfg.parameter ='fourierspctrm'; cfg.statistic = 'indepsamplesZcoh'; cfg.alpha = 0.05; cfg.tail = 0; cfg.numrandomization = 10; %500 cfg.neighbours = []; %cfg.correctm = 'cluster'; %cfg.clusterthreshold = 'nonparametric_common'; %cfg.clusterstatistic = 'maxsum'; %cfg.clusteralpha = 0.05; %cfg.clustertail = 0; %cfg.correcttail ='prob'; cfg.computestat = 'yes'; cfg.computecritval = 'yes'; cfg.computeprob = 'yes' ; %Design of matrix design = zeros(1,size(freqoutdisc.fourierspctrm,1) + size(freqoutwalk.fourierspctrm,1)); design(1,1:size(freqoutdisc.fourierspctrm,1)) = 1; design(1,(size(freqoutdisc.fourierspctrm,1)+1):(size(freqoutdisc.fourierspctrm,1) + size(freqoutwalk.fourierspctrm,1)))= 2; cfg.design = design; cfg.ivar = 1; [stat1] = freqstatistics(cfg,freqoutdisc,freqoutwalk); From ali.gm88 at gmail.com Fri Oct 21 08:34:23 2011 From: ali.gm88 at gmail.com (=?ISO-8859-1?Q?Alicia_Gonz=E1lez?=) Date: Fri, 21 Oct 2011 08:34:23 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: Hi, I'm trying to do automatic artifact rejection using the tutorial on the site. It seems that everything runs ok but, when I try to see the z-score figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears (and no errors are found). I'm just using the code from the tutorial without changes. thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Oct 21 08:53:03 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 21 Oct 2011 08:53:03 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: Hi Alicia, In order to be able to address your problem we need some additional feedback of course. What kind of data are you using, etc? BW, JM On Oct 21, 2011, at 8:34 AM, Alicia González wrote: > > > Hi, > > I'm trying to do automatic artifact rejection using the tutorial on the site. It seems that everything runs ok but, when I try to see the z-score figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears (and no errors are found). I'm just using the code from the tutorial without changes. > > thanks in advance. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.gm88 at gmail.com Fri Oct 21 11:08:21 2011 From: ali.gm88 at gmail.com (=?ISO-8859-1?Q?Alicia_Gonz=E1lez?=) Date: Fri, 21 Oct 2011 11:08:21 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: I'm using the data provided in the tutorial: ArtifactMEG.ds (This dataset was acquired continuously with trials of 10 seconds, and during the recording the experimenter instructed the subject to make artifacts and wrote down the trial number in which the artifacts were made) And I running the code below: cfg = []; cfg.dataset = 'ArtifactMEG.ds'; cfg.headerformat = 'ctf_ds'; ctf.dataformat = 'ctf_ds'; cfg.trialdef.eventtype = 'trial'; cfg = ft_definetrial(cfg); trl = cfg.trl(1:50,:); % just use the first 50 trials for the time being % jump cfg = []; cfg.trl = trl; cfg.padding = 0; cfg.datafile = 'ArtifactMEG.ds'; cfg.headerfile = 'ArtifactMEG.ds'; cfg.continuous = 'yes'; % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel = 'MEG'; cfg.artfctdef.zvalue.cutoff = 20; cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.fltpadding = 0; % algorithmic parameters cfg.artfctdef.zvalue.cumulative = 'yes'; cfg.artfctdef.zvalue.medianfilter = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff = 'yes'; % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; [cfg, artifact_jump] = ft_artifact_zvalue(cfg); 2011/10/21 jan-mathijs schoffelen > Hi Alicia, > > In order to be able to address your problem we need some additional > feedback of course. What kind of data are you using, etc? > > BW, > > JM > > On Oct 21, 2011, at 8:34 AM, Alicia González wrote: > > > > Hi, > > I'm trying to do automatic artifact rejection using the tutorial on the > site. It seems that everything runs ok but, when I try to see the z-score > figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears > (and no errors are found). I'm just using the code from the tutorial without > changes. > > thanks in advance. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Fri Oct 21 11:49:05 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 21 Oct 2011 11:49:05 +0200 Subject: [FieldTrip] removing EEG 1/f spectral power In-Reply-To: References: Message-ID: Dear David, Often we look at the contrast between two experimental conditions, in which then the 1/f disappears in the contrast, so we don't have to bother. But there are indeed valid cases where you want it out, such as detecting peaks that sit on a 1/f flank. A simple trick that you can use is based on the following idea: say f(t) = sin(w*t), then df/dt = w*cos(w*t) So taking the derivative of a sine multiplies the output with "w" , which is the frequency in radians per second. This applies to each frequency. Taking the derivative is a linear operation, so if your data consists of the sum of many sine-waves (which is the premise for Fourier analysis), taking the derivative of the data is equivalent to taking the derivative of all seperate sine-wave contributions to your data. The consequence hence is that the derivative in time results in the Fourier spectrum at frequency f being multiplied by f (for any frequency). So the 1/f effect in the spectrum is counteracted by a 1*f effect of the time-domain derivative. In ft_preprocessing you can use cfg.derivative=yes to get the desired result. best regards Robert PS this can be considered as estimating and removing a 1-st order AR model from the data, except that we already know what the AR model parameters are. It can also be considered as a high-pass FIR filter with a filter kernel that is [-1 1]. On 20 Oct 2011, at 4:01, David Groppe wrote: > > Hi FieldTrippers, > I am interested in studying the spectral peaks in resting EEG. > Identifying these peaks is complicated by the 1/f distribution of EEG > power. Do any of you have suggestions for removing the 1/f > distribution to better reveal peaks? I've seen people suggest > autoregressive modelling or applying high pass filters but in the > couple of attempts I've seen the results look fair. > much appreciated, > -David > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Fri Oct 21 12:13:08 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 21 Oct 2011 12:13:08 +0200 Subject: [FieldTrip] beamforming - normilise issue In-Reply-To: References: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> Message-ID: <4EA145B4.3060509@donders.ru.nl> Dear Davide, I was hesitant to answer, because I thought others know more than me. But since none responded, I can try to help with my limited knowledge. From my knowledge of source reconstruction, I can just say that if all your source reconstructions are in the same space (say, MNI), you can use the .pos from your template to overcome this problem. I am not using ft_volumenormalise, so I have no experience what is exactly going on there. I would assume, however, that volumenormalise will transofmr your source structures to a common space. However, I stick to normalizing the following way: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space Hope it helps at least a little bit. Best, Jörn On 10/19/2011 6:12 PM, Davide Rivolta wrote: > Hi Michael, > I am using the single shell (Nolte). > The grid has 2340 positions, but I am not still using mni. > Thanks, > Davide > > On Wed, Oct 19, 2011 at 5:44 PM, Michael Wibral > wrote: > > Hi davide, > > what headmodel and grid are you using? > > Michael > > > ------------------------------------------------------------------------ > *Von:* "Davide Rivolta" > > *Gesendet:* Oct 19, 2011 3:54:37 PM > *An:* "Email discussion list for the FieldTrip project" > > > *Betreff:* [FieldTrip] beamforming - normilise issue > > > Dear all, > I am trying to use beamforming for some MEG data. > I have 1 condition, and I wish to compare it against the > baseline. Ideally I wish to have the average of all group and > statistically compare stimulus agains baseline.. > As such, for each subject I calculate the source for the > baseline and the source for the stimulus (using a common > filter as indicated on the website). > I then call ft_sourceinterpolate and, since I wish to have a > group analysis, ft_volumenormalise. > In order to compute the average, I call ft_sourcegrandaverage. > Even though the help tells me that it is fine, the > grandaverage does not work if the input is from the > ft_volumenormalise. It is because there is not the ".pos" field! > Am I doing something wrong? > Any advice would be great. > Thanks a lot, > Davide > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Davide Rivolta, PhD > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Mon Oct 24 11:35:21 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Mon, 24 Oct 2011 11:35:21 +0200 Subject: [FieldTrip] problem with clusterplot Message-ID: <2B510BFE-967F-47C2-A920-AA78590FF0DA@rug.nl> Hi everyone, I am trying to use ft_clusterplot after having done ft_timelockstatistics. I get the following error: >>cfg = []; >>cfg.alpha = 0.1; >>cfg.parameter = 'prob'; >>cfg.elec = timelockLow.elec; >> ft_clusterplot(cfg,stat); creating layout from cfg.elec creating layout for ext1020 system There are 1 clusters smaller than alpha (0.1) Positive cluster: 1, pvalue: 0.065 (+), t = 0.712 to 0.836 ??? Reference to non-existent field 'parameter'. Error in ==> ft_topoplotER at 610 dat = data.(cfg.parameter); Error in ==> ft_clusterplot at 339 ft_topoplotER(cfgtopo, stat); 610 dat = data.(cfg.parameter); K>> dbquit In general the stat output looks fine. You can find the 'stat' and 'cfg' variables that I use in my dropbox: http://dl.dropbox.com/u/13997261/clusterProblem.mat Does anyone know what's going on here? I could not figure out what the field 'parameter' should be and why it was not existing in the first place. Thanks a lot in advance for your help, Marieke ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Oct 24 12:23:18 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 24 Oct 2011 12:23:18 +0200 Subject: [FieldTrip] beamforming - normilise issue In-Reply-To: <4EA145B4.3060509@donders.ru.nl> References: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> <4EA145B4.3060509@donders.ru.nl> Message-ID: Dear Jörn, Thanks you very much for you tip. I try to play with it. Davide On Fri, Oct 21, 2011 at 12:13 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Davide, > > I was hesitant to answer, because I thought others know more than me. But > since none responded, I can try to help with my limited knowledge. > > From my knowledge of source reconstruction, I can just say that if all your > source reconstructions are in the same space (say, MNI), you can use the > .pos from your template to overcome this problem. I am not using > ft_volumenormalise, so I have no experience what is exactly going on there. > I would assume, however, that volumenormalise will transofmr your source > structures to a common space. > However, I stick to normalizing the following way: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > Hope it helps at least a little bit. > Best, > Jörn > > > On 10/19/2011 6:12 PM, Davide Rivolta wrote: > > Hi Michael, > > I am using the single shell (Nolte). > > The grid has 2340 positions, but I am not still using mni. > > Thanks, > > Davide > > On Wed, Oct 19, 2011 at 5:44 PM, Michael Wibral wrote: > >> Hi davide, >> >> what headmodel and grid are you using? >> >> Michael >> >> >> ------------------------------ >> *Von:* "Davide Rivolta" >> *Gesendet:* Oct 19, 2011 3:54:37 PM >> *An:* "Email discussion list for the FieldTrip project" < >> fieldtrip at donders.ru.nl> >> *Betreff:* [FieldTrip] beamforming - normilise issue >> >> >> Dear all, >> >> I am trying to use beamforming for some MEG data. >> >> I have 1 condition, and I wish to compare it against the baseline. Ideally >> I wish to have the average of all group and statistically compare stimulus >> agains baseline.. >> >> As such, for each subject I calculate the source for the baseline and the >> source for the stimulus (using a common filter as indicated on the website). >> >> I then call ft_sourceinterpolate and, since I wish to have a group >> analysis, ft_volumenormalise. >> In order to compute the average, I call ft_sourcegrandaverage. >> >> Even though the help tells me that it is fine, the grandaverage does not >> work if the input is from the ft_volumenormalise. It is because there is not >> the ".pos" field! >> >> Am I doing something wrong? >> >> Any advice would be great. >> >> Thanks a lot, >> >> Davide >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Davide Rivolta, PhD > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.gm88 at gmail.com Mon Oct 24 13:13:20 2011 From: ali.gm88 at gmail.com (=?ISO-8859-1?Q?Alicia_Gonz=E1lez?=) Date: Mon, 24 Oct 2011 13:13:20 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: Hi, I solved the problem adding: cfg.artfctdef.zvalue.feedback = 'yes'; Now I can see the figures of the z-score of the processed data. El 21 de octubre de 2011 11:08, Alicia González escribió: > I'm using the data provided in the tutorial: ArtifactMEG.ds (This dataset > was acquired continuously with trials of 10 seconds, and during the > recording the experimenter instructed the subject to make artifacts and > wrote down the trial number in which the artifacts were made) > And I running the code below: > > cfg = []; > cfg.dataset = 'ArtifactMEG.ds'; > cfg.headerformat = 'ctf_ds'; > ctf.dataformat = 'ctf_ds'; > cfg.trialdef.eventtype = 'trial'; > cfg = ft_definetrial(cfg); > > trl = cfg.trl(1:50,:); % just use the first 50 trials > for the time being > > % jump > cfg = []; > cfg.trl = trl; > cfg.padding = 0; > cfg.datafile = 'ArtifactMEG.ds'; > cfg.headerfile = 'ArtifactMEG.ds'; > cfg.continuous = 'yes'; > > % channel selection, cutoff and padding > cfg.artfctdef.zvalue.channel = 'MEG'; > cfg.artfctdef.zvalue.cutoff = 20; > cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; > cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; > cfg.artfctdef.zvalue.fltpadding = 0; > > % algorithmic parameters > cfg.artfctdef.zvalue.cumulative = 'yes'; > cfg.artfctdef.zvalue.medianfilter = 'yes'; > cfg.artfctdef.zvalue.medianfiltord = 9; > cfg.artfctdef.zvalue.absdiff = 'yes'; > > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > > [cfg, artifact_jump] = ft_artifact_zvalue(cfg); > > 2011/10/21 jan-mathijs schoffelen > >> Hi Alicia, >> >> In order to be able to address your problem we need some additional >> feedback of course. What kind of data are you using, etc? >> >> BW, >> >> JM >> >> On Oct 21, 2011, at 8:34 AM, Alicia González wrote: >> >> >> >> Hi, >> >> I'm trying to do automatic artifact rejection using the tutorial on the >> site. It seems that everything runs ok but, when I try to see the z-score >> figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears >> (and no errors are found). I'm just using the code from the tutorial without >> changes. >> >> thanks in advance. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> Jan-Mathijs Schoffelen, MD PhD >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Oct 24 13:29:02 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 24 Oct 2011 13:29:02 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: <521F4477-3985-42CD-82D1-044F6AEE4995@donders.ru.nl> Hi Alicia, OK. Good that you found the solution. This indicates to me that you have been using an older version of FieldTrip, where the option indeed was called 'feedback'. In the newer FieldTrip version, this option has been renamed into 'interactive'. We try to provide backward compatibility support, so in general a newer version still works (for a while at least) with old options. The other way around is of course not possible to achieve in general. In this case the documentation was up-to-date, but your code was not. I would expect the problem to go away if you download a recent version of FieldTrip. Best wishes, Jan-Mathijs On Oct 24, 2011, at 1:13 PM, Alicia González wrote: > Hi, > > I solved the problem adding: > cfg.artfctdef.zvalue.feedback = 'yes'; > Now I can see the figures of the z-score of the processed data. > > El 21 de octubre de 2011 11:08, Alicia González escribió: > I'm using the data provided in the tutorial: ArtifactMEG.ds (This dataset was acquired continuously with trials of 10 seconds, and during the recording the experimenter instructed the subject to make artifacts and wrote down the trial number in which the artifacts were made) > And I running the code below: > > cfg = []; > cfg.dataset = 'ArtifactMEG.ds'; > cfg.headerformat = 'ctf_ds'; > ctf.dataformat = 'ctf_ds'; > cfg.trialdef.eventtype = 'trial'; > cfg = ft_definetrial(cfg); > > trl = cfg.trl(1:50,:); % just use the first 50 trials for the time being > > % jump > cfg = []; > cfg.trl = trl; > cfg.padding = 0; > cfg.datafile = 'ArtifactMEG.ds'; > cfg.headerfile = 'ArtifactMEG.ds'; > cfg.continuous = 'yes'; > > % channel selection, cutoff and padding > cfg.artfctdef.zvalue.channel = 'MEG'; > cfg.artfctdef.zvalue.cutoff = 20; > cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; > cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; > cfg.artfctdef.zvalue.fltpadding = 0; > > % algorithmic parameters > cfg.artfctdef.zvalue.cumulative = 'yes'; > cfg.artfctdef.zvalue.medianfilter = 'yes'; > cfg.artfctdef.zvalue.medianfiltord = 9; > cfg.artfctdef.zvalue.absdiff = 'yes'; > > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > > [cfg, artifact_jump] = ft_artifact_zvalue(cfg); > > 2011/10/21 jan-mathijs schoffelen > Hi Alicia, > > In order to be able to address your problem we need some additional feedback of course. What kind of data are you using, etc? > > BW, > > JM > > On Oct 21, 2011, at 8:34 AM, Alicia González wrote: > >> >> >> Hi, >> >> I'm trying to do automatic artifact rejection using the tutorial on the site. It seems that everything runs ok but, when I try to see the z-score figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears (and no errors are found). I'm just using the code from the tutorial without changes. >> >> thanks in advance. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Margit.Schoenherr at uk-erlangen.de Mon Oct 24 14:41:53 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Mon, 24 Oct 2011 14:41:53 +0200 Subject: [FieldTrip] questions about forward calculations Message-ID: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE32@XMAIL1.medads.uk-erlangen.de> Hello, I have some questions regarding forward computations. 1) How is the definition of the EEG leadfield - does the dipole point from red to blue or from blue to red? I obtain different results when I compute the leadfield of the same dipole either with a 3-concentric-spheres volume conductor or with BEM (openmeeg). 2) In which units are the leadfields given? For the 3-concentric-spheres volume conductor, the magnitude of the field is 70, for BEM 2e-5. 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the single sphere. For the single sphere model, the field strength is 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the BEM forward field of the same dipole has strength 1e-11. What is the unit here? Thanks! Margit From jm.horschig at donders.ru.nl Mon Oct 24 16:20:39 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 24 Oct 2011 16:20:39 +0200 Subject: [FieldTrip] problem with clusterplot In-Reply-To: <2B510BFE-967F-47C2-A920-AA78590FF0DA@rug.nl> References: <2B510BFE-967F-47C2-A920-AA78590FF0DA@rug.nl> Message-ID: <4EA57437.9080908@donders.ru.nl> Hey Marieke, I just checked your workspace, and realized that in your cfg there is no field parameter. Maybe something went wrong or you made a typo somewhere. Just setting cfg.parameter='prob' solved the problem for me and ft_clusterplot works nicely (nice cluster, btw). /the call to "ft_clusterplot" took 20 seconds and an estimated NaN MB >> cfg cfg = alpha: 0.1000 elec: [1x1 struct] zlim: [-2 2] parameter: 'prob'/ Best, Jörn On 10/24/2011 11:35 AM, Marieke van Vugt wrote: > Hi everyone, > I am trying to use ft_clusterplot after having done > ft_timelockstatistics. I get the following error: > >>cfg = []; > >>cfg.alpha = 0.1; > >>cfg.parameter = 'prob'; > >>cfg.elec = timelockLow.elec; > > >> ft_clusterplot(cfg,stat); > creating layout from cfg.elec > creating layout for ext1020 system > There are 1 clusters smaller than alpha (0.1) > Positive cluster: 1, pvalue: 0.065 (+), t = 0.712 to 0.836 > *??? Reference to non-existent field 'parameter'.* > > Error in ==> ft_topoplotER at 610 > dat = data.(cfg.parameter); > > Error in ==> ft_clusterplot at 339 > ft_topoplotER(cfgtopo, stat); > 610 dat = data.(cfg.parameter); > K>> dbquit > > In general the stat output looks fine. > You can find the 'stat' and 'cfg' variables that I use in my dropbox: > http://dl.dropbox.com/u/13997261/clusterProblem.mat > > Does anyone know what's going on here? I could not figure out what the > field 'parameter' should be and why it was not existing in the first > place. > Thanks a lot in advance for your help, > Marieke > ---------------------------------------------------------------------------- > Marieke van Vugt, PhD > Assistant Professor, Cognitive Modeling Group > Bernoulliborg, room 326 > Nijenborgh 9 > 9747 AG Groningen > The Netherlands > phone: +31-6-51954984 (cell) > +31-50-363-9487 (office) > http://www.ai.rug.nl/~mkvanvugt > m.k.van.vugt at rug.nl > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Mon Oct 24 16:57:18 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Mon, 24 Oct 2011 16:57:18 +0200 Subject: [FieldTrip] problem with clusterplot In-Reply-To: <4EA57437.9080908@donders.ru.nl> References: <2B510BFE-967F-47C2-A920-AA78590FF0DA@rug.nl> <4EA57437.9080908@donders.ru.nl> Message-ID: Hi Jörn, yes, that totally fixes it! I just did not find that in the tutorial I used: http://fieldtrip.fcdonders.nl/tutorial/eventrelatedstatistics Thanks a lot for the help, Marieke On Oct 24, 2011, at 4:20 , Jörn M. Horschig wrote: > Hey Marieke, > > I just checked your workspace, and realized that in your cfg there is no field parameter. Maybe something went wrong or you made a typo somewhere. Just setting cfg.parameter='prob' solved the problem for me and ft_clusterplot works nicely (nice cluster, btw). > > the call to "ft_clusterplot" took 20 seconds and an estimated NaN MB > >> cfg > > cfg = > > alpha: 0.1000 > elec: [1x1 struct] > zlim: [-2 2] > parameter: 'prob' > > > Best, > Jörn > > > > > On 10/24/2011 11:35 AM, Marieke van Vugt wrote: >> >> Hi everyone, >> I am trying to use ft_clusterplot after having done ft_timelockstatistics. I get the following error: >> >>cfg = []; >> >>cfg.alpha = 0.1; >> >>cfg.parameter = 'prob'; >> >>cfg.elec = timelockLow.elec; >> >> >> ft_clusterplot(cfg,stat); >> creating layout from cfg.elec >> creating layout for ext1020 system >> There are 1 clusters smaller than alpha (0.1) >> Positive cluster: 1, pvalue: 0.065 (+), t = 0.712 to 0.836 >> ??? Reference to non-existent field 'parameter'. >> >> Error in ==> ft_topoplotER at 610 >> dat = data.(cfg.parameter); >> >> Error in ==> ft_clusterplot at 339 >> ft_topoplotER(cfgtopo, stat); >> >> 610 dat = data.(cfg.parameter); >> K>> dbquit >> >> In general the stat output looks fine. >> You can find the 'stat' and 'cfg' variables that I use in my dropbox: http://dl.dropbox.com/u/13997261/clusterProblem.mat >> >> Does anyone know what's going on here? I could not figure out what the field 'parameter' should be and why it was not existing in the first place. >> Thanks a lot in advance for your help, >> Marieke >> ---------------------------------------------------------------------------- >> Marieke van Vugt, PhD >> Assistant Professor, Cognitive Modeling Group >> Bernoulliborg, room 326 >> Nijenborgh 9 >> 9747 AG Groningen >> The Netherlands >> phone: +31-6-51954984 (cell) >> +31-50-363-9487 (office) >> http://www.ai.rug.nl/~mkvanvugt >> m.k.van.vugt at rug.nl >> >> >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Tue Oct 25 15:16:35 2011 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Tue, 25 Oct 2011 15:16:35 +0200 (CEST) Subject: [FieldTrip] beamforming tutorial problem In-Reply-To: <62238448.683628.1319548183818.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <1507509658.683740.1319548595236.JavaMail.root@monoceros.zimbra.ru.nl> Hi 'trippers, I've been making my way through the tutorial on the fieldtrip website in an effort to teach myself about source localisation using beamforming. I tried - unsuccessfully - to adapt the code to my own MEG data, and have now resorted to copypasting my way through the tutorial and seeing what each function does to the sample data, in an attempt to build my own analysis pipeline. I get as far as creating the head model from the segmented brain surface and then I get the following error. (Note that I've just been copypasting the tutorial commands without altering them, so I've not specified anything else in my workspace. It should be clear what's there.) %%% (I input) cfg = []; vol = ft_prepare_singleshell(cfg, segmentedmri); (fieldtrip's response) not downsampling csf not downsampling gray not downsampling white the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB using the segmentation approach using the segmented MRI including gray matter in segmentation for brain compartment including white matter in segmentation for brain compartment including CSF in segmentation for brain compartment smoothing the segmentation with a 5-pixel FWHM kernel triangulating the boundary of compartment 1 (nasty red matlab response) ??? Attempted to access cfg.numvertices(1); index out of bounds because numel(cfg.numvertices)=0. Error in ==> prepare_mesh_segmentation at 75 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); %%% Now, matlab is right about one thing: numel(cfg.numvertices) is indeed zero, as the tutorial doesn't specify *anything* in the cfg structure to pass to ft_prepare_singleshell. However, the documentation for ft_prepare_singleshell states that when no value is given for numvertices, a default value of 3000 is used. So, what's going on here? Update: I also tried specifying cfg.numvertices=3000 and passing that to ft_prepare_singleshell, since that's supposed to be the default value. This was the result: %%% ??? Error using ==> cgprechecks at 35 Data points containing Inf or NaN are not supported. Error in ==> convhulln at 42 cgprechecks(x, nargin, cg_opt); Error in ==> ksphere at 49 tri = convhulln(pnt); Error in ==> triangulate_seg at 44 [pnt, tri] = ksphere(npnt); Error in ==> prepare_mesh_segmentation at 75 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); %%% I don't know where to begin with this. Can somebody advise? Best, Tom -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands From alexandre.gramfort at inria.fr Tue Oct 25 15:41:10 2011 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Tue, 25 Oct 2011 09:41:10 -0400 Subject: [FieldTrip] questions about forward calculations In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE32@XMAIL1.medads.uk-erlangen.de> References: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE32@XMAIL1.medads.uk-erlangen.de> Message-ID: Hello Margit, > I have some questions regarding forward computations. > > 1) How is the definition of the EEG leadfield - does the dipole point from red to blue or from blue to red? I obtain different results when I compute the leadfield of the same dipole either with a 3-concentric-spheres volume conductor or with BEM (openmeeg). do you say that you get different polarity for sphere and OpenMEEG? if it's the case my only guess it that the triangles of the boundary meshes are not properly oriented. Maybe Cristiano who looked at this recently can comment. does the toy example behave properly? In external/openmeeg/openmeeg_eeg_leadfield_example.m > 2) In which units are the leadfields given? For the 3-concentric-spheres volume conductor, the magnitude of the field is 70, for BEM 2e-5. If the input meshes passed to OpenMEEG are in meters and dipole currents in Am then the leadfield should give EEG potentials in V. > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the single sphere. For the single sphere model, the field strength is 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the BEM forward field of the same dipole has strength 1e-11. What is the unit here? Make sure your BEM surfaces are expressed in meters and not millimeters like it is often the case in MRI coordinates, and tell me if you still see some inconsistent results. Best, Alex -- Alexandre Gramfort, PhD gramfort at nmr.mgh.harvard.edu Dept. of Radiology MGH Martinos Center / Harvard Medical School http://www-sop.inria.fr/members/Alexandre.Gramfort/ From sangita.dandekar at gmail.com Tue Oct 25 19:55:39 2011 From: sangita.dandekar at gmail.com (Sangita Dandekar) Date: Tue, 25 Oct 2011 13:55:39 -0400 Subject: [FieldTrip] [FIELDTRIP] Independent channels stats question In-Reply-To: References: <5D04F2D6-F2EE-43CB-9A86-678035373E7B@donders.ru.nl> Message-ID: Hi Fieldtrippers, I have questions similar to the ones asked a while back in the discussion archive. (See discussion pasted below my email if you're interested) We have ~200 intracranial EEG electrodes, which we assume are independent, and the question is how to apply cluster statistics to time frequency data while accounting for the multiple comparisons problem. In the archived discussion below, it was suggested that cluster statistics be applied to each channel separately, and then, to account for MCP, apply Bonferroni correction on the resulting p-values. However, as was pointed out in the discussion below, with ~200 electrodes Bonferroni correction is overly conservative. Another possibility suggested in the archived discussion was FDR correction on the results of cluster statistics, but it isn't clear to me how this would be done. If anyone can explain how FDR can be applied to the results of cluster statistics, please let me know. I think a third possible solution to the problem is to get a 'global' null distribution as follows: Repeatedly: 1. Randomly partition data 2. Find time frequency clusters and the associated sum of t-statistics for each TFR cluster (do this WITHOUT clustering over electrodes/space, thereby treating each channel independently) 3. Record maximum t-statistic sum in a 'global' null distribution on each iteration. (Search over all electrodes for this maximum) Then one could compare the clusters as observed in the actual data (as determined independently at each electrode) to the global null distribution to get the false alarm rate associated with any cluster. I think the above should account for the MCP. Is there anyway to implement the above procedure in Fieldtrip without modifying the underlying functions? I know how to do a for loop around freqstatistics to treat each channel separately and then get the null distribution of tstat maxima and cluster statistics for each channel separately, but I am not sure if it is possible to treat each channel independently as I have outlined above and also get a global null distribution over all channels (without making some changes to the underlying FT functions, that is). Thanks in advance for any help! Sangi On Tue, Jul 6, 2010 at 12:47 PM, Matthew Davidson wrote: > Jan-Mathis, thanks for the response. > > Unfortunately, we tend to have a lot of channels (~120-200), and once > we start using microelectrodes in the patients, it'll only get worse. > > If we were to divide our alpha by 120-200, wouldn't we have to run > 120-200 times as many permutations in order to get p-values low enough > to survive Bonferroni correction? That's a large jump; we might have > to run 100,000 permutations! > > What do you think about something like FDR correction instead? > > Matthew > > On Tue, Jul 6, 2010 at 7:21 AM, jan-mathijs schoffelen > wrote: > > Dear Matthew, > > > > Your sensitivity problem is a known issue when using cluster-based test > > statistics, in which it is difficult to get small clusters significant in > > the presence of large clusters. This could also occur within a single > > channel (for example with a time-frequency decomposition, in which the > > summed spectro-temporal extent of an alpha-band effect could be much > bigger > > than a gamma-band effect). > > In your case I think it would be statistically valid to do the > cluster-based > > permutation test on each channel separately (which will involve a for > loop > > around ft_freqstatistics, because it is not implemented in the fieldtrip > > code) and doing a post-hoc Bonferroni correction on the resulting > p-values. > > If the number of channels is not too big, this might work. > > > > Good luck, > > > > Jan-Mathijs > > > > > > On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: > > > >> Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG > >> Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using > >> Fieldtrip more directly. > >> > >> My question pertains to cluster-based correction when channels are > >> independent. My data is primarily intracranial EEG, and due to the > >> 1/f^2 power drop-off, electrodes directly on the brain reflect local > >> activity much more strongly than sensors further away. As a result, we > >> treat them as independent. Now, I can force the Fieldtrip clustering > >> algorithm to not cluster across channels by setting: > >> > >> cfg.neighbours = []; > >> cfg.minnbchan = 0; > >> > >> but it still computes the maximum cluster size for a particular > >> permutation based on *all* the data. This seems... less sensitive > >> somehow, as if large clusters in one channel negatively impact the > >> significance of clusters in another channel. > >> > >> Is there a better way to do this and still solve the MCP? E.g., > >> compute the maxsum on each channel separately, and then use something > >> like FDR or Bonferroni correction on the maxsums across channels? > >> > >> Thanks for any advice you may have, and thanks for producing fieldtrip! > >> Matthew > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users of > the > >> FieldTrip toolbox, to share experiences and to discuss new ideas for > MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > >> > > > > Dr. J.M. (Jan-Mathijs) Schoffelen > > Donders Institute for Brain, Cognition and Behaviour, > > Centre for Cognitive Neuroimaging, > > Radboud University Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > > Telephone: 0031-24-3668063 > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > > and EEG analysis. See also > > http://listserv.surfnet.nl/archives/fieldtrip.html and > > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Tue Oct 25 20:43:22 2011 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Tue, 25 Oct 2011 19:43:22 +0100 Subject: [FieldTrip] [FIELDTRIP] Independent channels stats question In-Reply-To: References: <5D04F2D6-F2EE-43CB-9A86-678035373E7B@donders.ru.nl> Message-ID: Dear Sangi, Eric might correct me if I'm wrong but when you do cluster-based stats and your cfg.neighbors structure is empty what happens is exactly what you described. You are still effectively correcting for 200 channels just not for all the pixels so it should be quite close to Bonferoni across channels. Best, Vladimir On Tue, Oct 25, 2011 at 6:55 PM, Sangita Dandekar wrote: > Hi Fieldtrippers, > > I have questions similar to the ones asked a while back in the discussion > archive. (See discussion pasted below my email if you're interested) > > We have ~200  intracranial EEG electrodes, which we assume are independent, > and the question is how to apply > cluster statistics to time frequency data while accounting for the multiple > comparisons problem. > > In the archived discussion below, it was suggested that cluster statistics > be applied to each  channel separately, and then, to account for MCP, apply > Bonferroni correction on the resulting p-values.  However, as was pointed > out in the discussion below, with ~200 electrodes Bonferroni > correction is overly conservative.  Another possibility suggested in the > archived discussion was  FDR correction on the results of cluster > statistics, but it isn't clear to me > how this would be done.  If anyone can explain how FDR can be applied to the > results of cluster statistics, please let me know. > > I think a third possible solution to the problem is to get a 'global' null > distribution as follows: > > Repeatedly: > 1.  Randomly partition data > 2.  Find time frequency clusters and the associated sum of t-statistics for > each TFR cluster (do this WITHOUT clustering over electrodes/space, thereby > treating each channel independently) > 3.  Record maximum t-statistic sum in a 'global' null distribution on each > iteration.   (Search over all electrodes for this maximum) > > Then one could compare the clusters as observed in the actual data (as > determined independently at each electrode) to the global null distribution > to get the false alarm rate > associated with any cluster.  I think the above should account for the MCP. > > Is there anyway to implement the above procedure in Fieldtrip without > modifying the underlying functions?  I know how to do a for loop around > freqstatistics to treat each channel separately and then get the null > distribution of tstat maxima and cluster statistics for each channel > separately, but I am not sure > if it is possible to treat each channel independently as I have outlined > above and also get a global null distribution over all channels  (without > making some > changes to the underlying FT functions, that is). > > Thanks in advance for any help! > Sangi > > > > > > > > > > > > > > On Tue, Jul 6, 2010 at 12:47 PM, Matthew Davidson wrote: >> >> Jan-Mathis, thanks for the response. >> >> Unfortunately, we tend to have a lot of channels (~120-200), and once >> we start using microelectrodes in the patients, it'll only get worse. >> >> If we were to divide our alpha by 120-200, wouldn't we have to run >> 120-200 times as many permutations in order to get p-values low enough >> to survive Bonferroni correction? That's a large jump; we might have >> to run 100,000 permutations! >> >> What do you think about something like FDR correction instead? >> >> Matthew >> >> On Tue, Jul 6, 2010 at 7:21 AM, jan-mathijs schoffelen >> wrote: >> > Dear Matthew, >> > >> > Your sensitivity problem is a known issue when using cluster-based test >> > statistics, in which it is difficult to get small clusters significant >> > in >> > the presence of large clusters. This could also occur within a single >> > channel (for example with a time-frequency decomposition, in which the >> > summed spectro-temporal extent of an alpha-band effect could be much >> > bigger >> > than a gamma-band effect). >> > In your case I think it would be statistically valid to do the >> > cluster-based >> > permutation test on each channel separately (which will involve a for >> > loop >> > around ft_freqstatistics, because it is not implemented in the fieldtrip >> > code) and doing a post-hoc Bonferroni correction on the resulting >> > p-values. >> > If the number of channels is not too big, this might work. >> > >> > Good luck, >> > >> > Jan-Mathijs >> > >> > >> > On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: >> > >> >> Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG >> >> Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using >> >> Fieldtrip more directly. >> >> >> >> My question pertains to cluster-based correction when channels are >> >> independent. My data is primarily intracranial EEG, and due to the >> >> 1/f^2 power drop-off, electrodes directly on the brain reflect local >> >> activity much more strongly than sensors further away. As a result, we >> >> treat them as independent. Now, I can force the Fieldtrip clustering >> >> algorithm to not cluster across channels by setting: >> >> >> >> cfg.neighbours = []; >> >> cfg.minnbchan = 0; >> >> >> >> but it still computes the maximum cluster size for a particular >> >> permutation based on *all* the data. This seems... less sensitive >> >> somehow, as if large clusters in one channel negatively impact the >> >> significance of clusters in another channel. >> >> >> >> Is there a better way to do this and still solve the MCP? E.g., >> >> compute the maxsum on each channel separately, and then use something >> >> like FDR or Bonferroni correction on the maxsums across channels? >> >> >> >> Thanks for any advice you may have, and thanks for producing fieldtrip! >> >> Matthew >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of >> >> the >> >> FieldTrip  toolbox, to share experiences and to discuss new ideas for >> >> MEG >> >> and EEG analysis. See also >> >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> >> http://www.ru.nl/neuroimaging/fieldtrip. >> >> >> > >> > Dr. J.M. (Jan-Mathijs) Schoffelen >> > Donders Institute for Brain, Cognition and Behaviour, >> > Centre for Cognitive Neuroimaging, >> > Radboud University Nijmegen, The Netherlands >> > J.Schoffelen at donders.ru.nl >> > Telephone: 0031-24-3668063 >> > >> > ---------------------------------- >> > The aim of this list is to facilitate the discussion between users of >> > the >> > FieldTrip  toolbox, to share experiences and to discuss new ideas for >> > MEG >> > and EEG analysis. See also >> > http://listserv.surfnet.nl/archives/fieldtrip.html and >> > http://www.ru.nl/neuroimaging/fieldtrip. >> > >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From Lilla.Magyari at mpi.nl Wed Oct 26 11:21:16 2011 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Wed, 26 Oct 2011 11:21:16 +0200 Subject: [FieldTrip] beamforming tutorial problem In-Reply-To: <1507509658.683740.1319548595236.JavaMail.root@monoceros.zimbra.ru.nl> References: <1507509658.683740.1319548595236.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <4EA7D10C.7050605@mpi.nl> hi Tom, I've just got the same error on my own data, I filed it as a bug. But I could do the same with cfg=[]; cfg.method = 'singleshell'; vol = ft_prepare_headmodel(cfg,seg); Best, Lilla Marshall, T.R. (Tom) wrote: > Hi 'trippers, > > I've been making my way through the tutorial on the fieldtrip website in an effort to teach myself about source localisation using beamforming. I tried - unsuccessfully - to adapt the code to my own MEG data, and have now resorted to copypasting my way through the tutorial and seeing what each function does to the sample data, in an attempt to build my own analysis pipeline. > > I get as far as creating the head model from the segmented brain surface and then I get the following error. > > (Note that I've just been copypasting the tutorial commands without altering them, so I've not specified anything else in my workspace. It should be clear what's there.) > > %%% > > (I input) > > cfg = []; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > > (fieldtrip's response) > > not downsampling csf > not downsampling gray > not downsampling white > the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB > using the segmentation approach > using the segmented MRI > including gray matter in segmentation for brain compartment > including white matter in segmentation for brain compartment > including CSF in segmentation for brain compartment > smoothing the segmentation with a 5-pixel FWHM kernel > triangulating the boundary of compartment 1 > > > (nasty red matlab response) > > ??? Attempted to access cfg.numvertices(1); index out of bounds because > numel(cfg.numvertices)=0. > > Error in ==> prepare_mesh_segmentation at 75 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > %%% > > Now, matlab is right about one thing: numel(cfg.numvertices) is indeed zero, as the tutorial doesn't specify *anything* in the cfg structure to pass to ft_prepare_singleshell. However, the documentation for ft_prepare_singleshell states that when no value is given for numvertices, a default value of 3000 is used. So, what's going on here? > > Update: I also tried specifying cfg.numvertices=3000 and passing that to ft_prepare_singleshell, since that's supposed to be the default value. This was the result: > > %%% > > ??? Error using ==> cgprechecks at 35 > Data points containing Inf or NaN are not supported. > > Error in ==> convhulln at 42 > cgprechecks(x, nargin, cg_opt); > > Error in ==> ksphere at 49 > tri = convhulln(pnt); > > Error in ==> triangulate_seg at 44 > [pnt, tri] = ksphere(npnt); > > Error in ==> prepare_mesh_segmentation at 75 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > %%% > > I don't know where to begin with this. Can somebody advise? > > Best, > Tom > -- PhD student Language and Cognition Group research assistant Neurobiology of Language Group Max Planck Institute for Psycholinguistics Nijmegen, P.O. Box 310, 6500AH, the Netherlands Phone: 0031 24 3521561 From c.micheli at fcdonders.ru.nl Wed Oct 26 11:24:46 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Wed, 26 Oct 2011 11:24:46 +0200 (CEST) Subject: [FieldTrip] questions about forward calculations In-Reply-To: <2084749132.107220.1319620059098.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <424401516.107777.1319621086957.JavaMail.root@draco.zimbra.ru.nl> Hi Margit I could replicate the behavior that you described in point 1) the last email and at the moment we are checking that all required options within FieldFrip and OpenMEEG are set correctly. For your points 2) and 3) I could not replicate the problem. Everything should work fine if the units of the sensors and the volume conductor are consistent. However, we are working to make units management more handy for the users, so that ambiguities like this can be solved. Please, keep posted on the mailing list to track the changes in the near future. Could you maybe paste your source code here in the mailing list? Cheers, Cristiano ----- "Alexandre Gramfort" schreef: > Van: "Alexandre Gramfort" > Aan: "Email discussion list for the FieldTrip project" , "c micheli" > , "Margit Schoenherr" > Verzonden: Dinsdag 25 oktober 2011 15:41:10 > Onderwerp: Re: [FieldTrip] questions about forward calculations > > Hello Margit, > > > I have some questions regarding forward computations. > > > > 1) How is the definition of the EEG leadfield - does the dipole > point from red to blue or from blue to red? I obtain different results > when I compute the leadfield of the same dipole either with a > 3-concentric-spheres volume conductor or with BEM (openmeeg). > > do you say that you get different polarity for sphere and OpenMEEG? > if > it's the case my only > guess it that the triangles of the boundary meshes are not properly > oriented. Maybe Cristiano > who looked at this recently can comment. > > does the toy example behave properly? In > external/openmeeg/openmeeg_eeg_leadfield_example.m > > > 2) In which units are the leadfields given? For the > 3-concentric-spheres volume conductor, the magnitude of the field is > 70, for BEM 2e-5. > > If the input meshes passed to OpenMEEG are in meters and dipole > currents in Am then the leadfield should give EEG potentials in V. > > > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the > single sphere. For the single sphere model, the field strength is > 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the > BEM forward field of the same dipole has strength 1e-11. What is the > unit here? > > Make sure your BEM surfaces are expressed in meters and not > millimeters like it is often the > case in MRI coordinates, and tell me if you still see some > inconsistent results. > > Best, > Alex > -- > Alexandre Gramfort, PhD > gramfort at nmr.mgh.harvard.edu > Dept. of Radiology MGH Martinos Center / Harvard Medical School > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From B.Mouthaan at neuro.umcn.nl Wed Oct 26 12:08:55 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 26 Oct 2011 12:08:55 +0200 Subject: [FieldTrip] Creating Leadfield using BEM Message-ID: Dear Fieldtrippers, I am trying to compute a beamform localisation using a BEM-model of the head. When I call ft_sourceanalysis i receive to following error. ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_lcmv>pinv at 367 [U,S,V] = svd(A,0); Error in ==> beamformer_lcmv at 255 filt = pinv(lf' * invCy * lf) * lf' * invCy; % van Veen eqn. 23, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 818 dip(i) = beamformer_lcmv(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); I noticed that my leadfieldgrid containend NaN values. I think this could be the cause, but I don't know how to fix this problem. Does anyone have an idea? My script is as follows vol=ft_read_vol('standard_vol.mat') elec=ft_read_sens('standard_1005.elc') % reading the 1005 systeem because the experiment used of 32 electrodes cfg=[] cfg.showlabels= 'yes' cfg.layout='EEG1010.lay' cfg.interactive= 'yes' % Reref load (['C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave0' Subject]) cfg=[] cfg.reref='yes' % referring the cfg.refchannel= 'all' % commonaverage reference diff=ft_preprocessing(cfg,diffwav) %% Creating LEADFIELD cfg = []; cfg.elec = elec; cfg.vol = vol; cfg.reducerank = 3; cfg.channel = 'all'; cfg.grid.resolution = 10; % use a 3-D grid with a 10 mm resolution [grid] = ft_prepare_leadfield(cfg); save('AnalysisM\Grid_10mm', 'grid') %% cfg = []; cfg.covariance = 'yes'; cfg.covariancewindow = [0 .75]; cfg.removemean = 'no'; tlckavgpst = ft_timelockanalysis(cfg, diff); cfg.covariancewindow = [-0.25 0]; tlckavgpre = ft_timelockanalysis(cfg, diff); %% cfg = []; cfg.method = 'lcmv'; cfg.vol = vol; cfg.elec = elec cfg.lambda = '5%'; sourcepst = ft_sourceanalysis(cfg, tlckavgpst); sourcepre = ft_sourceanalysis(cfg, tlckavgpre); sourcepst.avg.nai = sourcepst.avg.pow./sourcepre.avg.pow; Thanks in advance! Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Wed Oct 26 12:54:41 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Wed, 26 Oct 2011 12:54:41 +0200 (CEST) Subject: [FieldTrip] beamforming tutorial problem In-Reply-To: <1379565708.109728.1319626401710.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <865168068.109744.1319626481917.JavaMail.root@draco.zimbra.ru.nl> Dear Tom It seems there was an error in the call to one of the low level functions. Thanks for reporting. The bug has been fixed and now your instructions (with some modifications - see below) should run. The forward module is undergoing heavy restructuring in these days and some of the functionality could be affected. To summarize how to derive a volumetric description of your head surface, let's say that if you start from a volumetric image (anatomy of the subjects) you have to perform a series of steps on the images (realign/segment) before creating the headmodel. For this please refer to the following tutorial: http://fieldtrip.fcdonders.nl/tutorial/headmodel Once you have your segmented mri correctly in place you can call cfg = []; cfg.method = 'singleshell'; cfg.tissue = { 'skull' }; % or whatever you want to create a boundary for vol = ft_prepare_headmodel(cfg, segmentedmri); I hope it helps, Cristiano ----- "T.R. Marshall (Tom)" schreef: > Van: "T.R. Marshall (Tom)" > Aan: "fieldtrip" > Verzonden: Dinsdag 25 oktober 2011 15:16:35 > Onderwerp: [FieldTrip] beamforming tutorial problem > > Hi 'trippers, > > I've been making my way through the tutorial on the fieldtrip website > in an effort to teach myself about source localisation using > beamforming. I tried - unsuccessfully - to adapt the code to my own > MEG data, and have now resorted to copypasting my way through the > tutorial and seeing what each function does to the sample data, in an > attempt to build my own analysis pipeline. > > I get as far as creating the head model from the segmented brain > surface and then I get the following error. > > (Note that I've just been copypasting the tutorial commands without > altering them, so I've not specified anything else in my workspace. It > should be clear what's there.) > > %%% > > (I input) > > cfg = []; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > > (fieldtrip's response) > > not downsampling csf > not downsampling gray > not downsampling white > the call to "ft_volumedownsample" took 0 seconds and an estimated 0 > MB > using the segmentation approach > using the segmented MRI > including gray matter in segmentation for brain compartment > including white matter in segmentation for brain compartment > including CSF in segmentation for brain compartment > smoothing the segmentation with a 5-pixel FWHM kernel > triangulating the boundary of compartment 1 > > > (nasty red matlab response) > > ??? Attempted to access cfg.numvertices(1); index out of bounds > because > numel(cfg.numvertices)=0. > > Error in ==> prepare_mesh_segmentation at 75 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > %%% > > Now, matlab is right about one thing: numel(cfg.numvertices) is indeed > zero, as the tutorial doesn't specify *anything* in the cfg structure > to pass to ft_prepare_singleshell. However, the documentation for > ft_prepare_singleshell states that when no value is given for > numvertices, a default value of 3000 is used. So, what's going on > here? > > Update: I also tried specifying cfg.numvertices=3000 and passing that > to ft_prepare_singleshell, since that's supposed to be the default > value. This was the result: > > %%% > > ??? Error using ==> cgprechecks at 35 > Data points containing Inf or NaN are not supported. > > Error in ==> convhulln at 42 > cgprechecks(x, nargin, cg_opt); > > Error in ==> ksphere at 49 > tri = convhulln(pnt); > > Error in ==> triangulate_seg at 44 > [pnt, tri] = ksphere(npnt); > > Error in ==> prepare_mesh_segmentation at 75 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > %%% > > I don't know where to begin with this. Can somebody advise? > > Best, > Tom > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive > Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Wed Oct 26 13:04:53 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 26 Oct 2011 13:04:53 +0200 Subject: [FieldTrip] Creating Leadfield using BEM In-Reply-To: References: Message-ID: <4EA7E955.7040608@donders.ru.nl> Dear Brian, I got the same error a while ago, which was caused by a wrong segementation/triangulation of the volume (it was a bug in FieldTrip). Are you using the newest version of FieldTrip? It should be solved there. In any case, it would be wise to check your segmentation and triangulation. You can do so with ft_plot_vol and ft_plot_mesh, e.g.: / figure;hold on; ft_plot_vol(hdm, 'edgecolor', 'none');alpha 0.5;camlight ft_plot_mesh(hdm.bnd); / Hope it helps! Best, Jörn On 10/26/2011 12:08 PM, B.Mouthaan at neuro.umcn.nl wrote: > > Dear Fieldtrippers, > > I am trying to compute a beamform localisation using a BEM-model of > the head. When I call ft_sourceanalysis i receive to following error. > > ??? Error using ==> svd > Input to SVD must not contain NaN or Inf. > > Error in ==> beamformer_lcmv>pinv at 367 > [U,S,V] = svd(A,0); > > Error in ==> beamformer_lcmv at 255 > filt = pinv(lf' * invCy * lf) * lf' * invCy; % van > Veen eqn. 23, use PINV/SVD to cover rank deficient leadfield > > Error in ==> ft_sourceanalysis at 818 > dip(i) = beamformer_lcmv(grid, sens, vol, squeeze(avg(i,:,:)), > squeeze(Cy(i,:,:)), optarg{:}); > > > I noticed that my leadfieldgrid containend NaN values. I think this > could be the cause, but I don't know how to fix this problem. Does > anyone have an idea? > > My script is as follows > > vol=ft_read_vol('standard_vol.mat') > elec=ft_read_sens('standard_1005.elc') % reading the 1005 systeem > because the experiment used of 32 electrodes > > cfg=[] > cfg.showlabels= 'yes' > cfg.layout='EEG1010.lay' > cfg.interactive= 'yes' > > > % Reref > load (['C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave0' > Subject]) > > cfg=[] > cfg.reref='yes' % referring the > cfg.refchannel= 'all' % commonaverage reference > diff=ft_preprocessing(cfg,diffwav) > > %% Creating LEADFIELD > cfg = []; > cfg.elec = elec; > cfg.vol = vol; > cfg.reducerank = 3; > cfg.channel = 'all'; > cfg.grid.resolution = 10; % use a 3-D grid with a 10 mm resolution > [grid] = ft_prepare_leadfield(cfg); > > save('AnalysisM\Grid_10mm', 'grid') > > %% > cfg = []; > cfg.covariance = 'yes'; > cfg.covariancewindow = [0 .75]; > cfg.removemean = 'no'; > tlckavgpst = ft_timelockanalysis(cfg, diff); > cfg.covariancewindow = [-0.25 0]; > tlckavgpre = ft_timelockanalysis(cfg, diff); > > > %% > cfg = []; > cfg.method = 'lcmv'; > cfg.vol = vol; > cfg.elec = elec > cfg.lambda = '5%'; > sourcepst = ft_sourceanalysis(cfg, tlckavgpst); > sourcepre = ft_sourceanalysis(cfg, tlckavgpre); > > sourcepst.avg.nai = sourcepst.avg.pow./sourcepre.avg.pow; > > > Thanks in advance! > > Brian > > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in > het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the > Commercial Register of the Chamber of Commerce under file number 41055629. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Wed Oct 26 14:49:07 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 26 Oct 2011 14:49:07 +0200 Subject: [FieldTrip] Creating Leadfield using BEM Message-ID: Dear Jorn, I have update my Fieldtrip but I still receive the same error. And my leadfield still contains NaN values. However i get the additional error: ans = covariance matrix is rank deficient ??? Error using ==> mtimes Inner matrix dimensions must agree. + the old error I previously reported. So maybe some other problem? Thanks! Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Wed Oct 26 15:06:28 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 26 Oct 2011 15:06:28 +0200 Subject: [FieldTrip] Creating Leadfield using BEM Message-ID: Dear all, I also received the following information on my command screen the input is timelock data with 31 channels and 500 timebins using headmodel specified in the configuration using electrodes specified in the configuration Warning: Duplicate data points have been detected and removed. Some point indices will not be referenced by the triangulation. > In ft_prepare_vol_sens at 309 In fieldtrip-20111025\private\prepare_headmodel at 114 In ft_sourceanalysis at 332 determining source compartment (3) projecting electrodes on skin surface combining electrode transfer and system matrix creating dipole grid based on inward-shifted brain surface from volume conductor model 642 dipoles inside, 0 dipoles outside brain scanning repetition 1 Warning: covariance matrix is rank deficient > In beamformer_lcmv at 132 In ft_sourceanalysis at 818 scanning grid Warning: The input units are mm for points and S/mm for conductivity > In forward\private\warning_once at 75 In ft_compute_leadfield at 510 In beamformer_lcmv at 214 In ft_sourceanalysis at 818 Maybe this brings us more to the solution. Regards, Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Wed Oct 26 15:31:32 2011 From: fredericroux at hotmail.de (Frederic Roux) Date: Wed, 26 Oct 2011 15:31:32 +0200 Subject: [FieldTrip] zero-padding at beginning of file does not work Message-ID: Dear all, I want to pad out my signal before applying some filters while reading the data from the original ds-file. at line 578 of the preprocessing.m function it says: begsample = cfg.trl(i,1) - begpadding; Now because my signal starts at sample 1, begsample will have a negative value of course which results in the warning message warning('cannot apply enough paddig at begin of file'); Does that mean, that fieldtrip cannot pad out the signal at the beginning without throwing away the equivalent of the signal in itself? if cfg.trl(i,1) = 2400 and if begpadding = 1200 this should work, because begsample = 1200, right? But that would also mean that for padding I would loose 1200 samples. Now let's assume I would like to pad the signal to -25 sec and + 25 sec at the beginning and end. Why does the padding at the beginning require I throw away 25 sec, while the padding at the end doesn't? Any clarification on this issue would be greatly appreciated. Have a nice day. Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From chan at med.uni-frankfurt.de Wed Oct 26 16:38:59 2011 From: chan at med.uni-frankfurt.de (Jason Chan) Date: Wed, 26 Oct 2011 16:38:59 +0200 Subject: [FieldTrip] ICA and plotting Message-ID: <002001cc93ec$ff8d0a60$fea71f20$@med.uni-frankfurt.de> Hi Everyone, I am currently using Fieldtrip version 20111009. I am trying to use ICA to reject EOG artifacts. I ran a correlation between my EOG electrodes and MEG components to find the components that should be rejected. This variable I called "toreject", then used the following function: cfg = []; cfg.component = toreject; data_reject = ft_rejectcomponent(cfg, comp); When I try to plot my data using ft_topoplotER, the brain activity looks 'spotty'. However, when I add the cfg.component back into the cfg structure the activity looks correct. I have also noticed that adding this cfg.component will change the plots after I use MEGplanar and CombinePlanar. What am I doing wrong? Thank you in advance Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at mac.com Wed Oct 26 16:54:53 2011 From: nathanweisz at mac.com (Nathan Weisz) Date: Wed, 26 Oct 2011 16:54:53 +0200 Subject: [FieldTrip] ICA and plotting In-Reply-To: <002001cc93ec$ff8d0a60$fea71f20$@med.uni-frankfurt.de> References: <002001cc93ec$ff8d0a60$fea71f20$@med.uni-frankfurt.de> Message-ID: <4876264A-DFF4-4D1F-A38F-C364B800D637@mac.com> hi jason, it may be that you are rejecting too much, i.e. removing too much relevant brain activity. in general with regards to blinks and horizontal eye movements (your main sources of ocular artifacts) you should reject ~2, not (significantly) more. have you confirmed that your method is not too liberal in detecting "artefact components"? since the time-course and topography of these artefacts are so clear, "visual inspection" may be your best friend. good luck! nathan On 26.10.2011, at 16:38, Jason Chan wrote: > Hi Everyone, > > I am currently using Fieldtrip version 20111009. > > I am trying to use ICA to reject EOG artifacts. I ran a correlation between my EOG electrodes and MEG components to find the components that should be rejected. This variable I called “toreject”, then used the following function: > > cfg = []; > cfg.component = toreject; > data_reject = ft_rejectcomponent(cfg, comp); > > When I try to plot my data using ft_topoplotER, the brain activity looks ‘spotty’. However, when I add the cfg.component back into the cfg structure the activity looks correct. I have also noticed that adding this cfg.component will change the plots after I use MEGplanar and CombinePlanar. What am I doing wrong? > > Thank you in advance > Jason > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From alejosalles at gmail.com Thu Oct 27 05:12:03 2011 From: alejosalles at gmail.com (Alejo Salles) Date: Thu, 27 Oct 2011 00:12:03 -0300 Subject: [FieldTrip] saving events to file in realtime processing Message-ID: hi, I'm looking into doing EEG realtime processing using biosemi active two hardware. I use the biosemi2ft program to acquire data and create the buffer, from which I read from matlab. as the processing I need to do is not very intensive, while it's important to keep a low time lag, I'm running matlab on the same computer that does the acquisition. I would like to know how to go about sending events to be recorded in the gdf file. firstly, I'd like to know whether this is the right way to go, or if I should instead have the buffer spawned by the matlab code... can I write to the buffer from matlab even if it was spawned by biosemi2ft? supposing this is ok, how should I send the events? I understand that I should set event.sample, but I'm not sure what to put here, should I use the one after the one just read? how can I make sure this will get recorded to file? should I use a fixed delay instead? if I spawn the buffer from matlab instead, how can I then tell biosemi2ft to write the events to file? is any of these the way to do this or I should resort to send signals through the parallel port into the biosemi box? on a different note, is there a way to downsample the rate for saving the file in biosemi2ft? I gather the setting is only for streaming, but then I'm limited by the biosemi hardware to sample rates >= 2kHz, is this right? many thanks, alejo -------------- next part -------------- An HTML attachment was scrubbed... URL: From Margit.Schoenherr at uk-erlangen.de Thu Oct 27 13:16:24 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Thu, 27 Oct 2011 13:16:24 +0200 Subject: [FieldTrip] questions about forward calculations In-Reply-To: <424401516.107777.1319621086957.JavaMail.root@draco.zimbra.ru.nl> References: <2084749132.107220.1319620059098.JavaMail.root@draco.zimbra.ru.nl>, <424401516.107777.1319621086957.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE35@XMAIL1.medads.uk-erlangen.de> Hello Alex and Cristiano, thanks for your reply. I have used the code below to compute the BEM volume conductor, and with this I get the units I described in my mail. mri_segment.seg = mri_segment.scalp + mri_segment.skull + 2*mri_segment.brain; cfg_vol = []; cfg_vol.tissue = [1 2 3]; cfg_vol.numvertices = [800 1000 2000]; cfg_vol.conductivity = [1 1/80 1]; cfg_vol.isolatedsource = true; cfg_vol.method = 'openmeeg'; cfg_vol.sourceunits = 'mm'; cfg_vol.mriunits = 'mm'; vol = ft_prepare_bemmodel(cfg_vol, mri_segment); How can I ensure that my BEM surfaces are expressed in m? I have tried 2 possibilities which ended with an error and I had to quit openmeeg. The first, I changed the translation vector of mri_segment.transform (division by 1000) and set mri_segment.unit = 'm' and tried the same code as above. Second, I tried this: cfg = []; cfg.method = 'segmentation'; cfg.tissue = [1 2 3]; cfg.numvertices = [2000 1000 800]; cfg.sourceunits = 'mm'; cfg.mriunits = 'mm'; bnd = ft_prepare_mesh(cfg, mri_segment); bnd(1,1).pnt = bnd(1,1).pnt / 1000; bnd(1,2).pnt = bnd(1,2).pnt / 1000; bnd(1,3).pnt = bnd(1,3).pnt / 1000; vol = []; vol.bnd = bnd; vol.cond = [1 1/80 1]; cfg.method = 'openmeeg'; vol = ft_prepare_bemmodel(cfg, vol); Both attempts produced this error: | ------ om_minverser | ./tpf724544e_8af4_4678_aa5c_b9dc37660560.bin | ./tpd041303a_5fee_44ad_8d5d_8e7d4578f0d3.bin | ----------------------- Exception: Unable to open the file ./tpf724544e_8af4_4678_aa5c_b9dc37660560.bin for reading Doing my best.... This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Warning: an error ocurred while running OpenMEEG > In openmeeg at 121 In ft_prepare_bemmodel at 232 Error using ==> fread Invalid file identifier. Use fopen to generate a valid file identifier. Warning: File 'tp2fef7d04_3155_4852_ab97_121fa2fc7892.bin' not found. > In openmeeg>cleaner at 136 In openmeeg at 123 In ft_prepare_bemmodel at 232 Warning: File 'tp645538cf_3b4a_4e28_8a13_c061c7fca25a.bin' not found. > In openmeeg>cleaner at 137 In openmeeg at 123 In ft_prepare_bemmodel at 232 Thanks for your help! Best, Margit ________________________________________ Von: Micheli, C. [c.micheli at fcdonders.ru.nl] Gesendet: Mittwoch, 26. Oktober 2011 11:24 An: Email discussion list for the FieldTrip project Cc: Schönherr, Margit Betreff: Re: [FieldTrip] questions about forward calculations Hi Margit I could replicate the behavior that you described in point 1) the last email and at the moment we are checking that all required options within FieldFrip and OpenMEEG are set correctly. For your points 2) and 3) I could not replicate the problem. Everything should work fine if the units of the sensors and the volume conductor are consistent. However, we are working to make units management more handy for the users, so that ambiguities like this can be solved. Please, keep posted on the mailing list to track the changes in the near future. Could you maybe paste your source code here in the mailing list? Cheers, Cristiano ----- "Alexandre Gramfort" schreef: > Van: "Alexandre Gramfort" > Aan: "Email discussion list for the FieldTrip project" , "c micheli" > , "Margit Schoenherr" > Verzonden: Dinsdag 25 oktober 2011 15:41:10 > Onderwerp: Re: [FieldTrip] questions about forward calculations > > Hello Margit, > > > I have some questions regarding forward computations. > > > > 1) How is the definition of the EEG leadfield - does the dipole > point from red to blue or from blue to red? I obtain different results > when I compute the leadfield of the same dipole either with a > 3-concentric-spheres volume conductor or with BEM (openmeeg). > > do you say that you get different polarity for sphere and OpenMEEG? > if > it's the case my only > guess it that the triangles of the boundary meshes are not properly > oriented. Maybe Cristiano > who looked at this recently can comment. > > does the toy example behave properly? In > external/openmeeg/openmeeg_eeg_leadfield_example.m > > > 2) In which units are the leadfields given? For the > 3-concentric-spheres volume conductor, the magnitude of the field is > 70, for BEM 2e-5. > > If the input meshes passed to OpenMEEG are in meters and dipole > currents in Am then the leadfield should give EEG potentials in V. > > > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the > single sphere. For the single sphere model, the field strength is > 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the > BEM forward field of the same dipole has strength 1e-11. What is the > unit here? > > Make sure your BEM surfaces are expressed in meters and not > millimeters like it is often the > case in MRI coordinates, and tell me if you still see some > inconsistent results. > > Best, > Alex > -- > Alexandre Gramfort, PhD > gramfort at nmr.mgh.harvard.edu > Dept. of Radiology MGH Martinos Center / Harvard Medical School > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From B.Mouthaan at neuro.umcn.nl Thu Oct 27 14:33:44 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 27 Oct 2011 14:33:44 +0200 Subject: [FieldTrip] Dipole fitting Message-ID: Dear Fieldtrippers, I wrote a script for dipolefitting, though it doesn't work anymore since I updated Fieldtrip I receive the following error: ??? Error using ==> minus Matrix dimensions must agree. Error in ==> ft_dipolefitting at 375 grid.error(indx,1) = sum(sum(((eye(nchans)-lf*pinv(lf))*Vdata).^2)); Any ideas? Thanks! Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.wang at ucl.ac.uk Thu Oct 27 16:34:23 2011 From: julian.wang at ucl.ac.uk (Julian Wang) Date: Thu, 27 Oct 2011 15:34:23 +0100 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing Message-ID: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> Hi all, I'm trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I'm not sure if I've got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it's only expecting one row in the design matrix. If it's run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I'm not sure if it is. Is what I've done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I'm uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I'm using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian -------------- next part -------------- An HTML attachment was scrubbed... URL: From miellet at psy.gla.ac.uk Thu Oct 27 19:35:48 2011 From: miellet at psy.gla.ac.uk (miellet at psy.gla.ac.uk) Date: Thu, 27 Oct 2011 18:35:48 +0100 Subject: [FieldTrip] (no subject) Message-ID: <20111027183548.975573lhb8sj3ywk@horde.psy.gla.ac.uk> Hello, I'm trying to use ft_sourceanalysis with pcc. I specify the volume conductor model, the sensor information and a grid with pre-computed leadfields. I tried to compute the statistics over the source parameters between two conditions as indicated in the documentation (ft_sourceanalysis(cfg, freqA, freqB) with randomization). I get an error linked to the condition: if nargin>2 && strcmp(cfg.prewhiten,'no') I couldn't find any information about this cfg.prewhiten parameter. this part of the code if commented by % HACK: requires some extra defaults % HACK: use some experimental code Does anyone know if this part is functional yet please? Thanks, Sebastien ---------------------------------------------------------------- This message was sent using the Web mail system for The University of Glasgow School of Psychology ------------------------------------------------------------------ From tolgacan1 at yahoo.com Thu Oct 27 19:59:47 2011 From: tolgacan1 at yahoo.com (=?iso-8859-1?Q?Tolga_=D6zkurt?=) Date: Thu, 27 Oct 2011 10:59:47 -0700 (PDT) Subject: [FieldTrip] "time-frequency analysis" tutorial ? In-Reply-To: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> Message-ID: <1319738387.11992.YahooMailNeo@web111510.mail.gq1.yahoo.com> I apologize if I am misleading, but since yesterday night, for some reason, Fieldtrip documentation on "time-frequency analysis" is missing, i.e., there seems nothing on the page: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis I say since yesterday night, because a few hours before, I was able to see the page. Tolga -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Thu Oct 27 19:58:54 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Thu, 27 Oct 2011 11:58:54 -0600 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing In-Reply-To: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> Message-ID: <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> Julian, Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like: [1:16 1:16; ones(1,16) ones(1,16)*2] You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA On Oct 27, 2011, at 8:34 AM, Julian Wang wrote: Hi all, I’m trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I’m not sure if I’ve got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it’s only expecting one row in the design matrix. If it’s run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I’m not sure if it is. Is what I’ve done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I’m uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I’m using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Oct 27 20:03:18 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 27 Oct 2011 20:03:18 +0200 Subject: [FieldTrip] (no subject) In-Reply-To: <20111027183548.975573lhb8sj3ywk@horde.psy.gla.ac.uk> References: <20111027183548.975573lhb8sj3ywk@horde.psy.gla.ac.uk> Message-ID: Dear Seb, A few comments to your question: -I don't really remember why 'pcc' as a method shouldn't work, but I believe that a straightforward explanation why it is disabled is that once-upon-a-time the functionality you are trying to apply was designed for 'dics' as method (and as such originates from the pre-pcc era. I wonder whether it will work for cfg.method = 'dics'. -Even if it would work, it is a very computationally heavy method: data are shuffled across the conditions at the channel level and spatial filters are computed (for both conditions) for each randomization. When we implemented this method, back in the old days, we quickly abandoned it again because of the discrepancy between the computation time and the computational resources. -The functionality still being present (I still assume that it kind of works) is the consequence of us being quite devoted to backward compatibility, although I don't want to bet my money on it to work (for dics). -Nowadays, I would advise to do the randomisation testing at the source level, i.e. computing a single set of spatial filters common to both conditions (the so-called common filter approach), and then use ft_sourcestatistics for the randomization testing. To get started, you could have a look at: http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming?s[]=common&s[]=filter, although I notice that the final step (calling ft_sourcestatistics is not explained there). Cheers, JM On Oct 27, 2011, at 7:35 PM, miellet at psy.gla.ac.uk wrote: > Hello, > I'm trying to use ft_sourceanalysis with pcc. I specify the volume conductor model, the sensor information and a grid with pre-computed leadfields. > I tried to compute the statistics over the source parameters between two conditions as indicated in the documentation (ft_sourceanalysis(cfg, freqA, freqB) with randomization). > I get an error linked to the condition: > if nargin>2 && strcmp(cfg.prewhiten,'no') > I couldn't find any information about this cfg.prewhiten parameter. > this part of the code if commented by > % HACK: requires some extra defaults > % HACK: use some experimental code > Does anyone know if this part is functional yet please? > Thanks, > Sebastien > > ---------------------------------------------------------------- > This message was sent using the Web mail system for > The University of Glasgow School of Psychology > ------------------------------------------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Oct 27 20:05:12 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 27 Oct 2011 20:05:12 +0200 Subject: [FieldTrip] "time-frequency analysis" tutorial ? In-Reply-To: <1319738387.11992.YahooMailNeo@web111510.mail.gq1.yahoo.com> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> <1319738387.11992.YahooMailNeo@web111510.mail.gq1.yahoo.com> Message-ID: <88FD0AC4-F63A-4AF0-8281-74E03AB54405@donders.ru.nl> Hi Tolga, You are right. We will fix it as soon as possible. Best wishes, Jan-Mathijs On Oct 27, 2011, at 7:59 PM, Tolga Özkurt wrote: > I apologize if I am misleading, but since yesterday night, for some reason, Fieldtrip documentation on "time-frequency analysis" is missing, i.e., there seems nothing on the page: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis > > I say since yesterday night, because a few hours before, I was able to see the page. > > Tolga > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Thu Oct 27 22:09:46 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Thu, 27 Oct 2011 14:09:46 -0600 Subject: [FieldTrip] Question about ft_sourcestatistics and ft_sourcegrandaverage Message-ID: To all: I am wondering if there is a way to use ft_sourcegrandaverage and ft_sourcestatistics on cortically constrained mne source output. I have sources from ft_sourceanalysis, where the method was 'mne' and the source space was the mni cortical surface, which the MEG data were coregistered to, so all results are in the same anatomical space. However, these functions seem to require volume, or grid, type input, rather than surface input. Can someone confirm if that is correct or not and if so, would there be a way to work around this limitation? Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA From f.dipompeo at unich.it Fri Oct 28 10:21:24 2011 From: f.dipompeo at unich.it (Francesco Di Pompeo) Date: Fri, 28 Oct 2011 10:21:24 +0200 Subject: [FieldTrip] 60 Hz notch using preprocessing Message-ID: Dear all, I need a 60 Hz notch filter before the ICA of continuous 4D data. I did it using ft_preprocessing but the 60 Hz line is still there.. Something wrong in my script? cfg = []; cfg.dataset = '0'; cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; cfg.bpfilter = 'yes'; cfg.bpfreq = [1 150]; cfg.dftfilter = 'yes'; cfg.dftfreq = [60 120 180]; data_meg = ft_preprocessing(cfg); ----------------------------------------------------------------- Francesco Di Pompeo, PhD Institute of Advanced Biomedical Technologies and Department of Neuroscience and Imaging University of Chieti "G. d'Annunzio" Via dei Vestini - Campus Universitario 66013 Chieti - ITALY ph: +39-0871-3556907 fax:+39-0871-3556930 From two.frank at gmail.com Fri Oct 28 10:29:31 2011 From: two.frank at gmail.com (two frank) Date: Fri, 28 Oct 2011 01:29:31 -0700 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: References: Message-ID: Based on my experience, it seems that this can only be done in the epoched data but not in the continuous EEG data. Thoughts or comments from other fieldtrippers?? On Fri, Oct 28, 2011 at 1:21 AM, Francesco Di Pompeo wrote: > Dear all, > > I need a 60 Hz notch filter before the ICA of continuous 4D data. > I did it using ft_preprocessing but the 60 Hz line is still there.. > > Something wrong in my script? > > > cfg = []; > cfg.dataset = '0'; > cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; > > cfg.bpfilter = 'yes'; > cfg.bpfreq = [1 150]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = [60 120 180]; > > data_meg = ft_preprocessing(cfg); > > > > > ----------------------------------------------------------------- > Francesco Di Pompeo, PhD > Institute of Advanced Biomedical Technologies and > Department of Neuroscience and Imaging > University of Chieti "G. d'Annunzio" > Via dei Vestini - Campus Universitario > 66013 Chieti - ITALY > ph: +39-0871-3556907 > fax:+39-0871-3556930 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Frank -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Oct 28 10:33:55 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 28 Oct 2011 10:33:55 +0200 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: References: Message-ID: <5CFB10C2-03DB-4CEF-A86E-11AFA7C790E9@donders.ru.nl> Hi Francesco, I suspect that the 60 Hz line noise is not of constant amplitude throughout the length of your trial (it seems you read in a whole session at once). Having, say, a 5-minute recording, notching out the 60 Hz with a dftfilter leads to a 1/300 Hz wide notch. This is probably too narrow given some slight 60 Hz amplitdue modulations. You could use a bandstop filter in this case. Best, Jan-Mathijs On Oct 28, 2011, at 10:21 AM, Francesco Di Pompeo wrote: > Dear all, > > I need a 60 Hz notch filter before the ICA of continuous 4D data. > I did it using ft_preprocessing but the 60 Hz line is still there.. > > Something wrong in my script? > > > cfg = []; > cfg.dataset = '0'; > cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; > > cfg.bpfilter = 'yes'; > cfg.bpfreq = [1 150]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = [60 120 180]; > > data_meg = ft_preprocessing(cfg); > > > > > ----------------------------------------------------------------- > Francesco Di Pompeo, PhD > Institute of Advanced Biomedical Technologies and > Department of Neuroscience and Imaging > University of Chieti "G. d'Annunzio" > Via dei Vestini - Campus Universitario > 66013 Chieti - ITALY > ph: +39-0871-3556907 > fax:+39-0871-3556930 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Oct 28 10:36:45 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 28 Oct 2011 10:36:45 +0200 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: References: Message-ID: Dear Francesco, A notch filter is referred to as a band-stop filter in ft_preprocessing's documentation, and is different from the (regression-based) DFT filter. To use a notch filter, specify: cfg.bsfilter = 'yes'; cfg.bsfreq = [58 62]; % or whatever you deem appropriate Note that you will have to apply ft_preprocessing repeatedly if you explicitly want to filter out the harmonics of the line noise as well. Best, Eelke 2011/10/28 Francesco Di Pompeo : > Dear all, > > I need a 60 Hz notch filter before the ICA of continuous 4D data. > I did it using ft_preprocessing but the 60 Hz line is still there.. > > Something wrong in my script? > > > cfg = []; > cfg.dataset = '0'; > cfg.channel    = {'MEG', '-A246', '-A170', '-A110', '-A19'}; > > cfg.bpfilter      = 'yes'; > cfg.bpfreq        = [1 150]; > > cfg.dftfilter     = 'yes'; > cfg.dftfreq       = [60 120 180]; > > data_meg                 = ft_preprocessing(cfg); > > > > > ----------------------------------------------------------------- > Francesco Di Pompeo, PhD > Institute of Advanced Biomedical Technologies and > Department of Neuroscience and Imaging > University of Chieti "G. d'Annunzio" > Via dei Vestini - Campus Universitario > 66013 Chieti - ITALY > ph: +39-0871-3556907 > fax:+39-0871-3556930 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From e.maris at psych.ru.nl Fri Oct 28 11:52:22 2011 From: e.maris at psych.ru.nl (Maris, E. (Eric)) Date: Fri, 28 Oct 2011 11:52:22 +0200 (CEST) Subject: [FieldTrip] Between-Trial Stats on Coherence In-Reply-To: <014701cc9355$ed10b4a0$c7321de0$@maris@psych.ru.nl> Message-ID: <678193359.130526.1319795542871.JavaMail.root@draco.zimbra.ru.nl> Hi Natalia, > when computing the statistical test for difference in coherence > between condition 1 and condition 2 (for single subject) I get NaNs > for stat. The setting code is quite simple and I did some checking for > > silly errors(ex. I dowloaded the very last version), so either I'm > doing sth wrong or there is a bug somwhere. Maybe you can help me. > I do the following: having computed the 'fourier' for both conditions > > (diff amount of trials), I run the code for the second step (whithout > > MC correction for the moment). I have 2 channel on which Im computing > > the coherence. The data for both conditions have the same length. The > > design is a betweenTrial so: #trls c1 + #trls c2. and 1 independent > variable. AmI missing something on the design or like reshaping the > data? Just as a check, can you produce coherence values with your ft_freqanalysis output using ft_connectivityanalysis? Best, Eric Maris > Any help is welcome! > Natalia > > cfg = []; > cfg.channel ={'lfp';'Whisk'}; > cfg.channelcmb ={'lfp' 'Whisk'}; > > cfg.frequency ='all'; > cfg.method = 'montecarlo'; > cfg.parameter ='fourierspctrm'; > cfg.statistic = 'indepsamplesZcoh'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.numrandomization = 10; %500 > cfg.neighbours = []; > %cfg.correctm = 'cluster'; > %cfg.clusterthreshold = 'nonparametric_common'; > %cfg.clusterstatistic = 'maxsum'; > %cfg.clusteralpha = 0.05; > %cfg.clustertail = 0; > %cfg.correcttail ='prob'; > cfg.computestat = 'yes'; > cfg.computecritval = 'yes'; > cfg.computeprob = 'yes' ; > %Design of matrix > design = zeros(1,size(freqoutdisc.fourierspctrm,1) + > size(freqoutwalk.fourierspctrm,1)); > design(1,1:size(freqoutdisc.fourierspctrm,1)) = 1; > design(1,(size(freqoutdisc.fourierspctrm,1)+1):(size(freqoutdisc.fourierspctrm,1) > + size(freqoutwalk.fourierspctrm,1)))= > 2; > cfg.design = design; > cfg.ivar = 1; > [stat1] = freqstatistics(cfg,freqoutdisc,freqoutwalk); > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From e.maris at psych.ru.nl Fri Oct 28 11:53:36 2011 From: e.maris at psych.ru.nl (Maris, E. (Eric)) Date: Fri, 28 Oct 2011 11:53:36 +0200 (CEST) Subject: [FieldTrip] Fwd: [FIELDTRIP] Independent channels stats question In-Reply-To: <1000339553.103700.1319574502768.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <298427253.130531.1319795616661.JavaMail.root@draco.zimbra.ru.nl> Dear Sangi & Vladimir, > Eric might correct me if I'm wrong but when you do cluster-based > stats > and your cfg.neighbors structure is empty what happens is exactly > what > you described. This is correct. You are still effectively correcting for 200 channels > just not for all the pixels so it should be quite close to Bonferoni > across channels. The permutation test should be me sensitive because it takes into account the spatial correlation in the data. Sangi, it will not hurt if you would try clustering along the spatial dimensions. In my experience, ECoG sometimes shows spatially distributed effects. best, Eric Maris > > Best, > > Vladimir > > On Tue, Oct 25, 2011 at 6:55 PM, Sangita Dandekar > wrote: > > Hi Fieldtrippers, > > > > I have questions similar to the ones asked a while back in the > discussion > > archive. (See discussion pasted below my email if you're > interested) > > > > We have ~200  intracranial EEG electrodes, which we assume are > independent, > > and the question is how to apply > > cluster statistics to time frequency data while accounting for the > multiple > > comparisons problem. > > > > In the archived discussion below, it was suggested that cluster > statistics > > be applied to each  channel separately, and then, to account for > MCP, apply > > Bonferroni correction on the resulting p-values.  However, as was > pointed > > out in the discussion below, with ~200 electrodes Bonferroni > > correction is overly conservative.  Another possibility suggested in > the > > archived discussion was  FDR correction on the results of cluster > > statistics, but it isn't clear to me > > how this would be done.  If anyone can explain how FDR can be > applied to the > > results of cluster statistics, please let me know. > > > > I think a third possible solution to the problem is to get a > 'global' null > > distribution as follows: > > > > Repeatedly: > > 1.  Randomly partition data > > 2.  Find time frequency clusters and the associated sum of > t-statistics for > > each TFR cluster (do this WITHOUT clustering over electrodes/space, > thereby > > treating each channel independently) > > 3.  Record maximum t-statistic sum in a 'global' null distribution > on each > > iteration.   (Search over all electrodes for this maximum) > > > > Then one could compare the clusters as observed in the actual data > (as > > determined independently at each electrode) to the global null > distribution > > to get the false alarm rate > > associated with any cluster.  I think the above should account for > the MCP. > > > > Is there anyway to implement the above procedure in Fieldtrip > without > > modifying the underlying functions?  I know how to do a for loop > around > > freqstatistics to treat each channel separately and then get the > null > > distribution of tstat maxima and cluster statistics for each > channel > > separately, but I am not sure > > if it is possible to treat each channel independently as I have > outlined > > above and also get a global null distribution over all channels  > (without > > making some > > changes to the underlying FT functions, that is). > > > > Thanks in advance for any help! > > Sangi > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Jul 6, 2010 at 12:47 PM, Matthew Davidson > wrote: > >> > >> Jan-Mathis, thanks for the response. > >> > >> Unfortunately, we tend to have a lot of channels (~120-200), and > once > >> we start using microelectrodes in the patients, it'll only get > worse. > >> > >> If we were to divide our alpha by 120-200, wouldn't we have to run > >> 120-200 times as many permutations in order to get p-values low > enough > >> to survive Bonferroni correction? That's a large jump; we might > have > >> to run 100,000 permutations! > >> > >> What do you think about something like FDR correction instead? > >> > >> Matthew > >> > >> On Tue, Jul 6, 2010 at 7:21 AM, jan-mathijs schoffelen > >> wrote: > >> > Dear Matthew, > >> > > >> > Your sensitivity problem is a known issue when using > cluster-based test > >> > statistics, in which it is difficult to get small clusters > significant > >> > in > >> > the presence of large clusters. This could also occur within a > single > >> > channel (for example with a time-frequency decomposition, in > which the > >> > summed spectro-temporal extent of an alpha-band effect could be > much > >> > bigger > >> > than a gamma-band effect). > >> > In your case I think it would be statistically valid to do the > >> > cluster-based > >> > permutation test on each channel separately (which will involve a > for > >> > loop > >> > around ft_freqstatistics, because it is not implemented in the > fieldtrip > >> > code) and doing a post-hoc Bonferroni correction on the > resulting > >> > p-values. > >> > If the number of channels is not too big, this might work. > >> > > >> > Good luck, > >> > > >> > Jan-Mathijs > >> > > >> > > >> > On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: > >> > > >> >> Hi, this is Matthew Davidson. I recently took the Fieldtrip > EEG/MEG > >> >> Toolkit (Hi Robert and Jan-Mathis!), and have been diving into > using > >> >> Fieldtrip more directly. > >> >> > >> >> My question pertains to cluster-based correction when channels > are > >> >> independent. My data is primarily intracranial EEG, and due to > the > >> >> 1/f^2 power drop-off, electrodes directly on the brain reflect > local > >> >> activity much more strongly than sensors further away. As a > result, we > >> >> treat them as independent. Now, I can force the Fieldtrip > clustering > >> >> algorithm to not cluster across channels by setting: > >> >> > >> >> cfg.neighbours = []; > >> >> cfg.minnbchan = 0; > >> >> > >> >> but it still computes the maximum cluster size for a particular > >> >> permutation based on *all* the data. This seems... less > sensitive > >> >> somehow, as if large clusters in one channel negatively impact > the > >> >> significance of clusters in another channel. > >> >> > >> >> Is there a better way to do this and still solve the MCP? E.g., > >> >> compute the maxsum on each channel separately, and then use > something > >> >> like FDR or Bonferroni correction on the maxsums across > channels? > >> >> > >> >> Thanks for any advice you may have, and thanks for producing > fieldtrip! > >> >> Matthew > >> >> > >> >> ---------------------------------- > >> >> The aim of this list is to facilitate the discussion between > users of > >> >> the > >> >> FieldTrip  toolbox, to share experiences and to discuss new > ideas for > >> >> MEG > >> >> and EEG analysis. See also > >> >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> >> http://www.ru.nl/neuroimaging/fieldtrip. > >> >> > >> > > >> > Dr. J.M. (Jan-Mathijs) Schoffelen > >> > Donders Institute for Brain, Cognition and Behaviour, > >> > Centre for Cognitive Neuroimaging, > >> > Radboud University Nijmegen, The Netherlands > >> > J.Schoffelen at donders.ru.nl > >> > Telephone: 0031-24-3668063 > >> > > >> > ---------------------------------- > >> > The aim of this list is to facilitate the discussion between > users of > >> > the > >> > FieldTrip  toolbox, to share experiences and to discuss new ideas > for > >> > MEG > >> > and EEG analysis. See also > >> > http://listserv.surfnet.nl/archives/fieldtrip.html and > >> > http://www.ru.nl/neuroimaging/fieldtrip. > >> > > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > of the > >> FieldTrip  toolbox, to share experiences and to discuss new ideas > for MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.vandermeij at donders.ru.nl Fri Oct 28 12:15:09 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Fri, 28 Oct 2011 12:15:09 +0200 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: References: Message-ID: <4EAA80AD.50700@donders.ru.nl> Hi Francesco, Just as a small add to Eelke's reply, you can specify a bs-filter for several ranges at once by doing it in a matrix, e.g.: cfg.bsfreq = [58 62; 118 122]; Note though, these filters (at least the standard butterworth) get increasingly inaccurate (less sharp filter-response, more 'filter-rolling'/edge-artifacts) when going to higher frequencies, if you are using the same frequency-range-width. Best, Roemer On 28-10-11 10:36, Eelke Spaak wrote: > Dear Francesco, > > A notch filter is referred to as a band-stop filter in > ft_preprocessing's documentation, and is different from the > (regression-based) DFT filter. To use a notch filter, specify: > > cfg.bsfilter = 'yes'; > cfg.bsfreq = [58 62]; % or whatever you deem appropriate > > Note that you will have to apply ft_preprocessing repeatedly if you > explicitly want to filter out the harmonics of the line noise as well. > > Best, > Eelke > > 2011/10/28 Francesco Di Pompeo: >> Dear all, >> >> I need a 60 Hz notch filter before the ICA of continuous 4D data. >> I did it using ft_preprocessing but the 60 Hz line is still there.. >> >> Something wrong in my script? >> >> >> cfg = []; >> cfg.dataset = '0'; >> cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; >> >> cfg.bpfilter = 'yes'; >> cfg.bpfreq = [1 150]; >> >> cfg.dftfilter = 'yes'; >> cfg.dftfreq = [60 120 180]; >> >> data_meg = ft_preprocessing(cfg); >> >> >> >> >> ----------------------------------------------------------------- >> Francesco Di Pompeo, PhD >> Institute of Advanced Biomedical Technologies and >> Department of Neuroscience and Imaging >> University of Chieti "G. d'Annunzio" >> Via dei Vestini - Campus Universitario >> 66013 Chieti - ITALY >> ph: +39-0871-3556907 >> fax:+39-0871-3556930 >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From dualitystan at gmail.com Fri Oct 28 17:04:56 2011 From: dualitystan at gmail.com (Stanley Klein) Date: Fri, 28 Oct 2011 08:04:56 -0700 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: <4EAA80AD.50700@donders.ru.nl> References: <4EAA80AD.50700@donders.ru.nl> Message-ID: Francesco, Have you actually looked at the FFT of the raw data? That will tell you what needs to be removed. You might have line noise at one frequency and monitor noise at a neighboring frequency. Stan On Fri, Oct 28, 2011 at 3:15 AM, Roemer van der Meij < r.vandermeij at donders.ru.nl> wrote: > Hi Francesco, > > Just as a small add to Eelke's reply, you can specify a bs-filter for > several ranges at once by doing it in a matrix, e.g.: > cfg.bsfreq = [58 62; 118 122]; > Note though, these filters (at least the standard butterworth) get > increasingly inaccurate (less sharp filter-response, more > 'filter-rolling'/edge-artifacts) when going to higher frequencies, if you > are using the same frequency-range-width. > > Best, > Roemer > > > > On 28-10-11 10:36, Eelke Spaak wrote: > > Dear Francesco, > > A notch filter is referred to as a band-stop filter in > ft_preprocessing's documentation, and is different from the > (regression-based) DFT filter. To use a notch filter, specify: > > cfg.bsfilter = 'yes'; > cfg.bsfreq = [58 62]; % or whatever you deem appropriate > > Note that you will have to apply ft_preprocessing repeatedly if you > explicitly want to filter out the harmonics of the line noise as well. > > Best, > Eelke > > 2011/10/28 Francesco Di Pompeo : > > Dear all, > > I need a 60 Hz notch filter before the ICA of continuous 4D data. > I did it using ft_preprocessing but the 60 Hz line is still there.. > > Something wrong in my script? > > > cfg = []; > cfg.dataset = '0'; > cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; > > cfg.bpfilter = 'yes'; > cfg.bpfreq = [1 150]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = [60 120 180]; > > data_meg = ft_preprocessing(cfg); > > > > > ----------------------------------------------------------------- > Francesco Di Pompeo, PhD > Institute of Advanced Biomedical Technologies and > Department of Neuroscience and Imaging > University of Chieti "G. d'Annunzio" > Via dei Vestini - Campus Universitario > 66013 Chieti - ITALY > ph: +39-0871-3556907 > fax:+39-0871-3556930 > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Roemer van der Meij M.Sc. > PhD student > > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognition > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > Tel: +31(0)24 3655932 > E-mail: r.vandermeij at donders.ru.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lilla.Magyari at mpi.nl Sat Oct 29 23:19:35 2011 From: Lilla.Magyari at mpi.nl (Lilla.Magyari at mpi.nl) Date: Sat, 29 Oct 2011 23:19:35 +0200 (CEST) Subject: [FieldTrip] source statistics In-Reply-To: References: <20111027183548.975573lhb8sj3ywk@horde.psy.gla.ac.uk> Message-ID: <1834.188.36.50.42.1319923175.squirrel@188.36.50.42> Dear Seb, I just would like to add to Jan-Mathijs's reply that there is an example code for how to use ft_sourcestatistics here: http://fieldtrip.fcdonders.nl/example/source_statistics?s[]=source&s[]=statistics Best, Lilla > Dear Seb, > > A few comments to your question: > -I don't really remember why 'pcc' as a method shouldn't work, but I > believe that a straightforward explanation why it is disabled is that > once-upon-a-time the functionality you are trying to apply was designed > for 'dics' as method (and as such originates from the pre-pcc era. I > wonder whether it will work for cfg.method = 'dics'. > -Even if it would work, it is a very computationally heavy method: data > are shuffled across the conditions at the channel level and spatial > filters are computed (for both conditions) for each randomization. When we > implemented this method, back in the old days, we quickly abandoned it > again because of the discrepancy between the computation time and the > computational resources. > -The functionality still being present (I still assume that it kind of > works) is the consequence of us being quite devoted to backward > compatibility, although I don't want to bet my money on it to work (for > dics). > -Nowadays, I would advise to do the randomisation testing at the source > level, i.e. computing a single set of spatial filters common to both > conditions (the so-called common filter approach), and then use > ft_sourcestatistics for the randomization testing. To get started, you > could have a look at: > http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming?s[]=common&s[]=filter, > although I notice that the final step (calling ft_sourcestatistics is not > explained there). > > > Cheers, > > JM > > On Oct 27, 2011, at 7:35 PM, miellet at psy.gla.ac.uk wrote: > >> Hello, >> I'm trying to use ft_sourceanalysis with pcc. I specify the volume >> conductor model, the sensor information and a grid with pre-computed >> leadfields. >> I tried to compute the statistics over the source parameters between two >> conditions as indicated in the documentation (ft_sourceanalysis(cfg, >> freqA, freqB) with randomization). >> I get an error linked to the condition: >> if nargin>2 && strcmp(cfg.prewhiten,'no') >> I couldn't find any information about this cfg.prewhiten parameter. >> this part of the code if commented by >> % HACK: requires some extra defaults >> % HACK: use some experimental code >> Does anyone know if this part is functional yet please? >> Thanks, >> Sebastien >> >> ---------------------------------------------------------------- >> This message was sent using the Web mail system for >> The University of Glasgow School of Psychology >> ------------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From drivolta81 at gmail.com Mon Oct 31 11:42:23 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 31 Oct 2011 11:42:23 +0100 Subject: [FieldTrip] flipdim: still need to do it? Message-ID: Dear all, I am using the 9th october 2011 version of fieldtrip. I just wish to know whether I still need to flipdim or wether it is not necessary anymore. Thanks a lot, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Oct 31 13:03:29 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 31 Oct 2011 13:03:29 +0100 Subject: [FieldTrip] flipdim: still need to do it? In-Reply-To: References: Message-ID: <69048721-B203-434B-A056-BA50B5E89B05@donders.ru.nl> Dear Davide, I guess that you refer to the flipdimming after segmentation. No, this is not necessary anymore. Still, the best way to find out whether this is true for your own data is to try it out ;-) Best, Jan-Mathijs On Oct 31, 2011, at 11:42 AM, Davide Rivolta wrote: > Dear all, > > I am using the 9th october 2011 version of fieldtrip. > > I just wish to know whether I still need to flipdim or wether it is not necessary anymore. > > Thanks a lot, > > Davide > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Oct 31 13:10:06 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 31 Oct 2011 13:10:06 +0100 Subject: [FieldTrip] flipdim: still need to do it? In-Reply-To: <69048721-B203-434B-A056-BA50B5E89B05@donders.ru.nl> References: <69048721-B203-434B-A056-BA50B5E89B05@donders.ru.nl> Message-ID: Ok, Thank you very much. Davide On Mon, Oct 31, 2011 at 1:03 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear Davide, > > I guess that you refer to the flipdimming after segmentation. No, this is > not necessary anymore. Still, the best way to find out whether this is true > for your own data is to try it out ;-) > > Best, > > Jan-Mathijs > > On Oct 31, 2011, at 11:42 AM, Davide Rivolta wrote: > > Dear all, > > I am using the 9th october 2011 version of fieldtrip. > > I just wish to know whether I still need to flipdim or wether it is not > necessary anymore. > > Thanks a lot, > > Davide > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwn_07 at yahoo.com.cn Mon Oct 31 14:15:36 2011 From: lwn_07 at yahoo.com.cn (=?utf-8?B?5p2O5Y2r5aic?=) Date: Mon, 31 Oct 2011 21:15:36 +0800 (CST) Subject: [FieldTrip] Is there a function for testing time series stationary or not? Message-ID: <1320066936.69942.YahooMailClassic@web15603.mail.cnb.yahoo.com> Dear all,   Is anybody knows wether there is a function in fieldtrip for testing the data epochs' stationeriness, since estimating AR models in causality connectivity analysis requiered that data should be stationary.   Best regards.     Weina   -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Mon Oct 31 15:21:43 2011 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Mon, 31 Oct 2011 15:21:43 +0100 Subject: [FieldTrip] Is there a function for testing time series stationary or not? In-Reply-To: <1320066936.69942.YahooMailClassic@web15603.mail.cnb.yahoo.com> References: <1320066936.69942.YahooMailClassic@web15603.mail.cnb.yahoo.com> Message-ID: <1E8C4628-FC2B-497E-82B6-CDE4D4482CE6@psi.ucm.es> Dear Weina, Try this toolbox: http://www.informatics.sussex.ac.uk/users/anils/aks_code.htm There several easy to use tests for covariance stationarity. Best, Stephan El 31/10/2011, a las 14:15, 李卫娜 escribió: > Dear all, > > Is anybody knows wether there is a function in fieldtrip for testing the data epochs' stationeriness, since estimating AR models in causality connectivity analysis requiered that data should be stationary. > > Best regards. > > > Weina > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Oct 31 17:05:51 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 31 Oct 2011 17:05:51 +0100 Subject: [FieldTrip] beamforming - normilise issue In-Reply-To: <4EA145B4.3060509@donders.ru.nl> References: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> <4EA145B4.3060509@donders.ru.nl> Message-ID: Dear Jörn, I tried to use the script you indicated me. It seems ok. I go further and I calculate the common filter for baseline and stimulus and then I run ft_sourceanalysis for baseline and stimulus (considering the common filter). After that (ft_sourceanalysis), that seems ok, I try to plot it. Like in the tutoial I calculate the relative change in power. I use ft_sourceplot. I got an error I do not understand really. It says: "the function requires volume data as input". In the structure sourceDiff, there is a volume field. It is in .cfg.vol This is my script. Am I missing something? cfg = []; cfg.method = 'slice'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.anaparameter = 0.5; cfg.units = 'mm'; cfg.vol = hdm; %I tried even: sourceDiff.cfg.vol; but it does not work figure ft_sourceplot(cfg,sourceDiff); If someone has some idea, it would be really appreciated. Thanks again, Davide On Fri, Oct 21, 2011 at 12:13 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Davide, > > I was hesitant to answer, because I thought others know more than me. But > since none responded, I can try to help with my limited knowledge. > > From my knowledge of source reconstruction, I can just say that if all > your source reconstructions are in the same space (say, MNI), you can use > the .pos from your template to overcome this problem. I am not using > ft_volumenormalise, so I have no experience what is exactly going on there. > I would assume, however, that volumenormalise will transofmr your source > structures to a common space. > However, I stick to normalizing the following way: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > Hope it helps at least a little bit. > Best, > Jörn > > > On 10/19/2011 6:12 PM, Davide Rivolta wrote: > > Hi Michael, > > I am using the single shell (Nolte). > > The grid has 2340 positions, but I am not still using mni. > > Thanks, > > Davide > > On Wed, Oct 19, 2011 at 5:44 PM, Michael Wibral wrote: > >> Hi davide, >> >> what headmodel and grid are you using? >> >> Michael >> >> >> ------------------------------ >> *Von:* "Davide Rivolta" >> *Gesendet:* Oct 19, 2011 3:54:37 PM >> *An:* "Email discussion list for the FieldTrip project" < >> fieldtrip at donders.ru.nl> >> *Betreff:* [FieldTrip] beamforming - normilise issue >> >> >> Dear all, >> >> I am trying to use beamforming for some MEG data. >> >> I have 1 condition, and I wish to compare it against the baseline. >> Ideally I wish to have the average of all group and statistically compare >> stimulus agains baseline.. >> >> As such, for each subject I calculate the source for the baseline and the >> source for the stimulus (using a common filter as indicated on the website). >> >> I then call ft_sourceinterpolate and, since I wish to have a group >> analysis, ft_volumenormalise. >> In order to compute the average, I call ft_sourcegrandaverage. >> >> Even though the help tells me that it is fine, the grandaverage does not >> work if the input is from the ft_volumenormalise. It is because there is >> not the ".pos" field! >> >> Am I doing something wrong? >> >> Any advice would be great. >> >> Thanks a lot, >> >> Davide >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Davide Rivolta, PhD > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Mon Oct 31 17:41:10 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Mon, 31 Oct 2011 17:41:10 +0100 (CET) Subject: [FieldTrip] questions about forward calculations In-Reply-To: <1977413113.159969.1320079140888.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <529875879.160006.1320079270297.JavaMail.root@draco.zimbra.ru.nl> Dear Margit, the bug with the sign of the FT call to OpenMEEG leadfield is now fixed. Please try again to generate one and let me know if it is consistent to the 3 concentric spherical solution, as you tried before. I am looking into the units issue in these days. Cristiano ----- "C. Micheli" schreef: > Van: "C. Micheli" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Woensdag 26 oktober 2011 11:24:46 > Onderwerp: Re: [FieldTrip] questions about forward calculations > > Hi Margit > I could replicate the behavior that you described in point 1) the last > email and at the moment we are checking that all required options > within FieldFrip and OpenMEEG are set correctly. > For your points 2) and 3) I could not replicate the problem. > Everything should work fine if the units of the sensors and the volume > conductor are consistent. > However, we are working to make units management more handy for the > users, so that ambiguities like this can be solved. Please, keep > posted on the mailing list to track the changes in the near future. > > Could you maybe paste your source code here in the mailing list? > > Cheers, > Cristiano > > > > > ----- "Alexandre Gramfort" schreef: > > > Van: "Alexandre Gramfort" > > Aan: "Email discussion list for the FieldTrip project" > , "c micheli" > > , "Margit Schoenherr" > > > Verzonden: Dinsdag 25 oktober 2011 15:41:10 > > Onderwerp: Re: [FieldTrip] questions about forward calculations > > > > Hello Margit, > > > > > I have some questions regarding forward computations. > > > > > > 1) How is the definition of the EEG leadfield - does the dipole > > point from red to blue or from blue to red? I obtain different > results > > when I compute the leadfield of the same dipole either with a > > 3-concentric-spheres volume conductor or with BEM (openmeeg). > > > > do you say that you get different polarity for sphere and OpenMEEG? > > if > > it's the case my only > > guess it that the triangles of the boundary meshes are not properly > > oriented. Maybe Cristiano > > who looked at this recently can comment. > > > > does the toy example behave properly? In > > external/openmeeg/openmeeg_eeg_leadfield_example.m > > > > > 2) In which units are the leadfields given? For the > > 3-concentric-spheres volume conductor, the magnitude of the field > is > > 70, for BEM 2e-5. > > > > If the input meshes passed to OpenMEEG are in meters and dipole > > currents in Am then the leadfield should give EEG potentials in V. > > > > > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the > > single sphere. For the single sphere model, the field strength is > > 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But > the > > BEM forward field of the same dipole has strength 1e-11. What is > the > > unit here? > > > > Make sure your BEM surfaces are expressed in meters and not > > millimeters like it is often the > > case in MRI coordinates, and tell me if you still see some > > inconsistent results. > > > > Best, > > Alex > > -- > > Alexandre Gramfort, PhD > > gramfort at nmr.mgh.harvard.edu > > Dept. of Radiology MGH Martinos Center / Harvard Medical School > > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From omoniyi_s at yahoo.com Mon Oct 3 16:49:27 2011 From: omoniyi_s at yahoo.com (Omoniyi Segun) Date: Mon, 3 Oct 2011 07:49:27 -0700 (PDT) Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file In-Reply-To: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> References: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> Message-ID: <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> Hi, I am new to fieldtrip and have been struggling with it for the past four weeks. I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data. Secondly when i click on stop I get the error pasted below. ??? Reference to non-existent field 'dimord'. Error in ==> dimlength at 74       elseif strcmp(data.(fld), 'rpt_pos') Error in ==> fixsampleinfo at 31   ntrial = dimlength(data, 'rpt'); Error in ==> ft_checkdata at 579   data = fixsampleinfo(data); Error in ==> ft_rejectartifact at 203   data = ft_checkdata(data, 'hassampleinfo', 'yes'); Error in ==> do_reject_artifacts at 70 data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); Error in ==> do_preprocess at 45                 do_reject_artifacts(subject); I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data. Thanks Omoniyi Segun -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Oct 4 13:51:14 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 4 Oct 2011 06:51:14 -0500 Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file Message-ID: Omoniyi, I've never tried automatic artifact detection in FieldTrip but I remember when I tried visual artifact rejection on Neuroscan data, I had to change the Y scale of the plot to make the data show up (the scale that was necessary for my data was much different than the scale used in the tutorial, for whatever reason). Do you need to do artifact detection in FieldTrip rather than Neuroscan? To be honest, I found it more efficient to do the artifact rejection in Neuroscan and then import the data into FieldTrip for the more advanced processing. (But I don't have much experience with using FieldTrip for artifact rejection, so maybe someone else on the list will have more suggestions; also, I was only doing visual artifact rejection, so I don't know if there are differences between doing automatic rejection in Neuroscan versus FieldTrip.) Best, Steve Politzer-Ahles Message: 1 > Date: Mon, 3 Oct 2011 07:49:27 -0700 (PDT) > From: Omoniyi Segun > To: "fieldtrip at donders.ru.nl" > Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG > file > Message-ID: > <1317653367.73347.YahooMailNeo at web65905.mail.ac4.yahoo.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > > I am new to fieldtrip and have been struggling with it for the past four > weeks. > > > I am trying to do artifact detection using the Automatic Artifact detection > tutorial on the Site. The first issue I am having is when i set % make the > process interactive cfg.artfctdef.zvalue.interactive = 'yes'; > I see nothing in the figure that is plotted. I see the data plotted when i > use the sample data provided but not when i use my Neuroscan EEG data. > > Secondly when i click on stop I get the error pasted below. > > > > ??? Reference to non-existent field 'dimord'. > > Error in ==> dimlength at 74 > ????? elseif strcmp(data.(fld), 'rpt_pos') > > Error in ==> fixsampleinfo at 31 > ? ntrial = dimlength(data, 'rpt'); > > Error in ==> ft_checkdata at 579 > ? data = fixsampleinfo(data); > > Error in ==> ft_rejectartifact at 203 > ? data = ft_checkdata(data, 'hassampleinfo', 'yes'); > > Error in ==> do_reject_artifacts at 70 > data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); > > Error in ==> do_preprocess at 45 > ??????????????? do_reject_artifacts(subject); > > I am comfortable making changes to the code and would like some pointers in > the right direction. I am not sure if this is an issue with Neuroscan data. > > Thanks > > Omoniyi Segun > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111003/92cac66d/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 11, Issue 2 > **************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Oct 4 14:15:23 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 4 Oct 2011 14:15:23 +0200 Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file In-Reply-To: <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> References: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> Message-ID: Hi Omoniyi, What kind of data are you passing to the function? BW, JM On Oct 3, 2011, at 4:49 PM, Omoniyi Segun wrote: > Hi, > > I am new to fieldtrip and have been struggling with it for the past four weeks. > > I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data. > > Secondly when i click on stop I get the error pasted below. > > > > ??? Reference to non-existent field 'dimord'. > > Error in ==> dimlength at 74 > elseif strcmp(data.(fld), 'rpt_pos') > > Error in ==> fixsampleinfo at 31 > ntrial = dimlength(data, 'rpt'); > > Error in ==> ft_checkdata at 579 > data = fixsampleinfo(data); > > Error in ==> ft_rejectartifact at 203 > data = ft_checkdata(data, 'hassampleinfo', 'yes'); > > Error in ==> do_reject_artifacts at 70 > data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); > > Error in ==> do_preprocess at 45 > do_reject_artifacts(subject); > > I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data. > > Thanks > > Omoniyi Segun > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From K.Lam at donders.ru.nl Tue Oct 4 14:51:29 2011 From: K.Lam at donders.ru.nl (Kevin Lam) Date: Tue, 04 Oct 2011 14:51:29 +0200 Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or gradiometers specified Message-ID: <4E8B0151.4060109@donders.ru.nl> Hi all, I recorded EEG using BrainVision Recorder and have analyzed the data (ERP and TFR). Now, I would like to determine the source of the TFR effects. (I've been following, more or less, this procedure: http://fieldtrip.fcdonders.nl/tutorial/beamformer) I'm having trouble executing ft_prepare_leadfield. Here's what I've done in the preceding steps, per participant: - ft_redefinetrial to specify the time of interest for each of the two conditions - ft_freqanalysis to calculate CSD matrix per the freq of interest for each condition - ft_volumesegment using 'spm' for coordsys - ft_prepare_headmodel using 'singlesphere' for method Now, when I attempt ft_prepare_leadfield, I get an error saying 'no electrodes or gradiometers specified'. I understand what the function needs, but I don't have the input file it's asking for. It's not the .lay file - I gave this a try. Please advise. Thanks in advance! Regards, Kevin From drivolta81 at gmail.com Tue Oct 4 15:05:10 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 4 Oct 2011 15:05:10 +0200 Subject: [FieldTrip] power line filter Message-ID: Dear all, I am trying to get rid of the power line noise. I use the dftfilter as indicated on the website. This works very well for most of the subjects. However, for some of them, I still get the noise. My trials have a different lenght: between 500 ms until 3 seconds. This is the script I used. filterfreqs = [49:1:51 99:1:101 149:1:151]; cfg.dftfilter = 'yes'; cfg.dftfreq = filterfreqs; cfg.padding = 10; dataprepro_syn = ft_preprocessing(cfg); The pad of 10 is the same as another already published study that used the same task. Attached is a picture of the problem (blu is baseline, red is stimulus). This is the result of multitepering (dpss). Thanks for your help, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: FMA14_power_spectra1.png Type: image/png Size: 12809 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Tue Oct 4 15:18:53 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Tue, 4 Oct 2011 15:18:53 +0200 Subject: [FieldTrip] power line filter In-Reply-To: References: Message-ID: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> Hi Davide, If you pad up to 10 seconds, you may change the filterfreqs into: filterfreqs = [49:0.1:51 99:0.1:101 149:0.1:151]. Notice the 0.1, rather than the 1. This is because a 10-second segment of data has an intrinsic frequency resolution of 0.1 Hz. Note that this may make the code rather slow to run. Wouldn't it more sensible then to use a bsfilter? Best, JM On Oct 4, 2011, at 3:05 PM, Davide Rivolta wrote: > > Dear all, > > I am trying to get rid of the power line noise. I use the dftfilter as indicated on the website. > > This works very well for most of the subjects. However, for some of them, I still get the noise. > > My trials have a different lenght: between 500 ms until 3 seconds. > > This is the script I used. > > > filterfreqs = [49:1:51 99:1:101 149:1:151]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = filterfreqs; > cfg.padding = 10; > > dataprepro_syn = ft_preprocessing(cfg); > > > The pad of 10 is the same as another already published study that used the same task. > > > Attached is a picture of the problem (blu is baseline, red is stimulus). This is the result of multitepering (dpss). > > > Thanks for your help, > > Davide > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Tue Oct 4 15:24:16 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 4 Oct 2011 15:24:16 +0200 Subject: [FieldTrip] power line filter In-Reply-To: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> References: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> Message-ID: Dear Jan-Mathijs, Thank you for your prompt reply. I will try out what you said. I could even try the bsfilter. I guess it makes sense. Thanks a lot for your help, Davide On Tue, Oct 4, 2011 at 3:18 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Davide, > > If you pad up to 10 seconds, you may change the filterfreqs into: > > filterfreqs = [49:0.1:51 99:0.1:101 149:0.1:151]. > > Notice the 0.1, rather than the 1. This is because a 10-second segment of > data has an intrinsic frequency resolution of 0.1 Hz. > > Note that this may make the code rather slow to run. Wouldn't it more > sensible then to use a bsfilter? > > Best, > > JM > > On Oct 4, 2011, at 3:05 PM, Davide Rivolta wrote: > > > Dear all, > > I am trying to get rid of the power line noise. I use the dftfilter as > indicated on the website. > > This works very well for most of the subjects. However, for some of them, I > still get the noise. > > My trials have a different lenght: between 500 ms until 3 seconds. > > This is the script I used. > > > filterfreqs = [49:1:51 99:1:101 149:1:151]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = filterfreqs; > cfg.padding = 10; > > dataprepro_syn = ft_preprocessing(cfg); > > > The pad of 10 is the same as another already published study that used the > same task. > > > Attached is a picture of the problem (blu is baseline, red is stimulus). > This is the result of multitepering (dpss). > > > Thanks for your help, > > Davide > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Tue Oct 4 15:55:14 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Tue, 4 Oct 2011 08:55:14 -0500 Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or gradiometers specified Message-ID: Kevin, I'm not familiar with ft_prepare_leadfield, but in the past when I had similar electrode-related error messages I was able to resolve it by first running elec = ft_read_sens(filename, ...) and then adding elec to the data structure. I believe the file I used for ft_read_sens was a layout file I exported from EEGLAB. Best, Steve Politzer-Ahles Message: 3 > Date: Tue, 04 Oct 2011 14:51:29 +0200 > From: Kevin Lam > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or > gradiometers specified > Message-ID: <4E8B0151.4060109 at donders.ru.nl> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi all, > > I recorded EEG using BrainVision Recorder and have analyzed the data > (ERP and TFR). Now, I would like to determine the source of the TFR > effects. (I've been following, more or less, this procedure: > http://fieldtrip.fcdonders.nl/tutorial/beamformer) > > I'm having trouble executing ft_prepare_leadfield. Here's what I've done > in the preceding steps, per participant: > - ft_redefinetrial to specify the time of interest for each of the two > conditions > - ft_freqanalysis to calculate CSD matrix per the freq of interest for > each condition > - ft_volumesegment using 'spm' for coordsys > - ft_prepare_headmodel using 'singlesphere' for method > > Now, when I attempt ft_prepare_leadfield, I get an error saying 'no > electrodes or gradiometers specified'. I understand what the function > needs, but I don't have the input file it's asking for. It's not the > .lay file - I gave this a try. > > Please advise. Thanks in advance! > > Regards, > Kevin > > > ------------------------------ > > Message: 4 > Date: Tue, 4 Oct 2011 15:05:10 +0200 > From: Davide Rivolta > To: Email discussion list for the FieldTrip project > > Subject: [FieldTrip] power line filter > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear all, > > I am trying to get rid of the power line noise. I use the dftfilter as > indicated on the website. > > This works very well for most of the subjects. However, for some of them, I > still get the noise. > > My trials have a different lenght: between 500 ms until 3 seconds. > > This is the script I used. > > > filterfreqs = [49:1:51 99:1:101 149:1:151]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = filterfreqs; > cfg.padding = 10; > > dataprepro_syn = ft_preprocessing(cfg); > > > The pad of 10 is the same as another already published study that used the > same task. > > > Attached is a picture of the problem (blu is baseline, red is stimulus). > This is the result of multitepering (dpss). > > > Thanks for your help, > > Davide > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111004/1904c787/attachment.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: FMA14_power_spectra1.png > Type: image/png > Size: 12809 bytes > Desc: not available > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111004/1904c787/attachment.png > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 11, Issue 3 > **************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Tue Oct 4 16:10:56 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 4 Oct 2011 16:10:56 +0200 Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or gradiometers specified In-Reply-To: References: Message-ID: Hi Kevin, Your data structure (the original one, the result from a call to ft_preprocessing) should have a .elec field already in it; I think you should be able to just copy that .elec field to whatever it is you are giving as input to ft_prepare_leadfield (e.g. freq.elec = data.elec;). (Disclaimer: I do not have any experience with ft_prepare_leadfield myself, but have heard of stuff related to this, so if I'm mistaken please correct me :) ) Best, Eelke 2011/10/4 Stephen Politzer-Ahles : > Kevin, > > I'm not familiar with ft_prepare_leadfield, but in the past when I had > similar electrode-related error messages I was able to resolve it by first > running > > elec = ft_read_sens(filename, ...) > > and then adding elec to the data structure. I believe the file I used for > ft_read_sens was a layout file I exported from EEGLAB. > > Best, > Steve Politzer-Ahles > >> Message: 3 >> Date: Tue, 04 Oct 2011 14:51:29 +0200 >> From: Kevin Lam >> To: fieldtrip at donders.ru.nl >> Subject: [FieldTrip] ft_prepare_leadfield: no electrodes or >>        gradiometers    specified >> Message-ID: <4E8B0151.4060109 at donders.ru.nl> >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> Hi all, >> >> I recorded EEG using BrainVision Recorder and have analyzed the data >> (ERP and TFR). Now, I would like to determine the source of the TFR >> effects. (I've been following, more or less, this procedure: >> http://fieldtrip.fcdonders.nl/tutorial/beamformer) >> >> I'm having trouble executing ft_prepare_leadfield. Here's what I've done >> in the preceding steps, per participant: >>  - ft_redefinetrial to specify the time of interest for each of the two >> conditions >>  - ft_freqanalysis to calculate CSD matrix per the freq of interest for >> each condition >>  - ft_volumesegment using 'spm' for coordsys >>  - ft_prepare_headmodel using 'singlesphere' for method >> >> Now, when I attempt ft_prepare_leadfield, I get an error saying 'no >> electrodes or gradiometers specified'. I understand what the function >> needs, but I don't have the input file it's asking for. It's not the >> .lay file - I gave this a try. >> >> Please advise. Thanks in advance! >> >> Regards, >> Kevin >> >> >> ------------------------------ >> >> Message: 4 >> Date: Tue, 4 Oct 2011 15:05:10 +0200 >> From: Davide Rivolta >> To: Email discussion list for the FieldTrip project >>         >> Subject: [FieldTrip] power line filter >> Message-ID: >> >>   >> Content-Type: text/plain; charset="iso-8859-1" >> >> Dear all, >> >> I am trying to get rid of the power line noise. I use the dftfilter as >> indicated on the website. >> >> This works very well for most of the subjects. However, for some of them, >> I >> still get the noise. >> >> My trials have a different lenght: between 500 ms until 3 seconds. >> >> This is the script I used. >> >> >>  filterfreqs = [49:1:51 99:1:101 149:1:151]; >> >>    cfg.dftfilter      =  'yes'; >>    cfg.dftfreq      = filterfreqs; >>    cfg.padding    = 10; >> >>    dataprepro_syn = ft_preprocessing(cfg); >> >> >> The pad of 10 is the same as another already published study that used the >> same task. >> >> >> Attached is a picture of the problem (blu is baseline, red is stimulus). >> This is the result of multitepering (dpss). >> >> >> Thanks for your help, >> >> Davide >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: >> >> -------------- next part -------------- >> A non-text attachment was scrubbed... >> Name: FMA14_power_spectra1.png >> Type: image/png >> Size: 12809 bytes >> Desc: not available >> URL: >> >> >> ------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 11, Issue 3 >> **************************************** > > > > -- > Stephen Politzer-Ahles > University of Kansas > Linguistics Department > http://www.linguistics.ku.edu/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From luoj at mail.nih.gov Tue Oct 4 19:57:56 2011 From: luoj at mail.nih.gov (Luo, Jessie (NIH/NIMH) [V]) Date: Tue, 4 Oct 2011 13:57:56 -0400 Subject: [FieldTrip] delete triggers/event markers Message-ID: Thanks guys for your input below. I was able to do the deletion in 4D. Another thing emerging is: is it possible to delete an event marker or trigger? I assume I still need to do this in 4D. Do you happen to know what commands to use? Thanks, Jessie ________________________________________ From: Rojas, Don [Don.Rojas at ucdenver.edu] Sent: Monday, September 26, 2011 10:59 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] creating new dataset Hi Jessie, If you wish to take a FieldTrip dataset back to the native 4D format, then it will not be trivial, but if you have the original data in 4D format, there is a potential solution in Eugene Kronberg's pdf4D matlab object code: http://biomag.wikidot.com/msi-matlab If you do not have the native 4D data, this will not work. Look at the duplicate and write_data_block methods. However, note that if you do duplicate the dataset, it will expect there to be as many channels in the new dataset as in the original. You would then have to delete those channels in the 4D MSI software using the deleter command. Or, alternatively, if you have a working copy of the MSI software, you can delete the channels in the original dataset within 4D, then use the duplicate method on that file, then write your data back to it using the write_data_block method. Feel free to contact me off list if you have questions. Best, Don On Sep 26, 2011, at 8:26 AM, jan-mathijs schoffelen wrote: Hi Jessie, FieldTrip is not able to write back into the native 4D neuroimaging format. If you want to create a new dataset, you need to have a look at the software which is provided by the 4D neuroimaging company. Your requested functionality may either be a feature of one of the applications, or may be implemented in one of the command line utilities. You may want to look in the software documentation for this. Best wishes, Jan-Mathijs On Sep 26, 2011, at 4:11 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Thanks for your answer Jörn . Yes I can use those functions to 'exlucde', but these definitions cannot be read by other software. What is why I intended to create a new dataset. Looks like fieldtrip does not allow that... Jessie ________________________________________ From: "Jörn M. Horschig" [jm.horschig at donders.ru.nl] Sent: Sunday, September 25, 2011 4:09 AM To: Email discussion list for the FieldTrip project Subject: Re: [FieldTrip] creating new dataset Hi Jessie, not quite sure what you are up to by saying that you do not want to use ft_ functions for that (maybe I misunderstood that part). Of course you could write your own loop, but the easier option would be to call ft_channelselection on your data and then call ft_preprocessing (this will return a new data-structure). See the help of these ft_channelselection: You can also exclude channels or channel groups using the following syntax {'all', '-POz', '-Fp1', -EOG'} >From ft_preprocessing: If you are calling FT_PREPROCESSING with also the second input argument "data", then that should contain data that was already read from file in a previous call to FT_PREPROCESSING. In that case only the configuration options below apply. The channels that will be read and/or preprocessed are specified with cfg.channel = Nx1 cell-array with selection of channels (default = 'all'), see FT_CHANNELSELECTION for details You could also use ft_selectdata instead of ft_preprocessing in case you are handling already processed data (e.g. tfr-data ). Alternatively, you can check ft_channelrepair for interpolating the bad channels. Hope this all helps to what you are up to! Best, Jörn On 9/24/2011 10:12 PM, Luo, Jessie (NIH/NIMH) [V] wrote: Hi, If there are bad channels (e.g. for a 4D system) in a dataset, Is it possible to create a new dataset by excluding them? I meant creating a NEW dataset without those channels (not by defining them using the ft_... in fieldtrip). Thanks, Jessie _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 303-724-4994 From drivolta81 at gmail.com Wed Oct 5 10:03:37 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Wed, 5 Oct 2011 10:03:37 +0200 Subject: [FieldTrip] power line filter In-Reply-To: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> References: <4C2E20B1-DBF6-409A-94AF-9903AF72EEFE@donders.ru.nl> Message-ID: Dear Jan-Mathijs, Attached is the picture of a subject where I applied you advice. As you can see the problem is still there. Maybe I can solve it by changing the filter order (I am using defaults values). However I am thinking to use a band stop filter. Thanks, Davide On Tue, Oct 4, 2011 at 3:18 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Hi Davide, > > If you pad up to 10 seconds, you may change the filterfreqs into: > > filterfreqs = [49:0.1:51 99:0.1:101 149:0.1:151]. > > Notice the 0.1, rather than the 1. This is because a 10-second segment of > data has an intrinsic frequency resolution of 0.1 Hz. > > Note that this may make the code rather slow to run. Wouldn't it more > sensible then to use a bsfilter? > > Best, > > JM > > On Oct 4, 2011, at 3:05 PM, Davide Rivolta wrote: > > > Dear all, > > I am trying to get rid of the power line noise. I use the dftfilter as > indicated on the website. > > This works very well for most of the subjects. However, for some of them, I > still get the noise. > > My trials have a different lenght: between 500 ms until 3 seconds. > > This is the script I used. > > > filterfreqs = [49:1:51 99:1:101 149:1:151]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = filterfreqs; > cfg.padding = 10; > > dataprepro_syn = ft_preprocessing(cfg); > > > The pad of 10 is the same as another already published study that used the > same task. > > > Attached is a picture of the problem (blu is baseline, red is stimulus). > This is the result of multitepering (dpss). > > > Thanks for your help, > > Davide > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: power_spectra1.png Type: image/png Size: 13305 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Wed Oct 5 15:23:04 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 5 Oct 2011 15:23:04 +0200 Subject: [FieldTrip] Fwd: ft_databrowser References: <4E8C5808.2090807@psych.ru.nl> Message-ID: <5709C371-9CC8-40D2-BD0F-D6BE8BE7F611@donders.ru.nl> Hi Vitória, What's exactly the error you obtain, and perhaps more importantly: which FieldTrip version are you using? There have been some changes in the past days which broke my earlier updates (which I tested rather extensively). By now, I ironed out some of these issues by reverting the most recent changes. The last fix was done yesterday, so I would like to hear back from you if the problem persists if you use an absolutely fresh version of the code. Then we can take it from there. Best wishes, Jan-Mathijs Begin forwarded message: > From: Vitória Magalhães Piai > Date: October 5, 2011 3:13:44 PM GMT+02:00 > To: jan.schoffelen at donders.ru.nl > Subject: Fwd: Re: ft_databrowser > > Beste Jan-Matthijs, > > Ik gebruik ft_databrowser om de componenten van ICA te bekijken. Sinds een recente wijziging > krijg ik een error erbij met > ft_prepare_layout at 263 > [data.grad] = fixsens(data.grad) > > als gevolg een error in ft_databrowser at 163 > cfg.layout... > > Wat moet ik nu anders doen zodat ik ft_databrowser op mijn normale manier kan gebruiken? > > Alvast bedankt, > vriendelijke groet, Vitória > > -------- Original Message -------- > Subject: Re: ft_databrowser > Date: Wed, 5 Oct 2011 14:54:29 +0200 > From: Eelke Spaak > To: r.vandermeij at donders.ru.nl > CC: Vitória Magalhães Piai > > Ha Vitoria, > > Inderdaad zijn er wat wijzigingen gedaan, maar ik weet er ook het > fijne niet van helaas. Volgens mij was Jan-Mathijs (Schoffelen) degene > die hiervoor verantwoordelijk was, maar dat weet ik niet zeker. > > Het is (ook voor eventuele toekomstige problemen) denk ik het > verstandigst als je even een mailtje naar de algemene FieldTrip-lijst > stuurt, fieldtrip at donders.ru.nl. Daar moet je wel eerst voor > registreren, instructies daarvoor staan op > http://fieldtrip.fcdonders.nl/discussion_list . > > Groeten, > Eelke > > 2011/10/5 Roemer van der Meij : > > Hey Vit, > > > > Er zijn recent wat wijzigingen gedaan in het de grad en elec structuur, > > Eelke, weet jij daar meer van? Ik heb het niet helemaal gevolgd. > > > > Groetjes, > > Roemer > > > > > > > > On 05-10-11 12:56, Vitória Magalhães Piai wrote: > > > > Hoi Roemer, Eelke, > > > > Ik gebruik ft_databrowser om de componenten van ICA te bekijken. Sinds een > > week krijg ik een error erbij met > > > > ft_prepare_layout at 263 > > [data.grad] = fixsens(data.grad) > > > > als gevolg een error in ft_databrowser at 163 > > cfg.layout... > > > > Ik zag dat jullie twee de laatste wijzigingen gedaan hebben aan die twee > > scripts. Wat is er nu anders waardoor ik ft_databrowser niet meer op mijn > > normale manier kan gebruiken? > > > > Ook voor volgende keer: bij wie moet ik eigenlijk met zulke vragen naar toe > > (of is het de bedoeling dat ik jullie daarmee kom vervelen)? :) > > > > Alvast bedankt, Vitória > > > > > > -- > > Roemer van der Meij M.Sc. > > PhD student > > Donders Institute for Brain, Cognition and Behaviour > > Centre for Cognition > > P.O. Box 9104 > > 6500 HE Nijmegen > > The Netherlands > > Tel: +31(0)24 3655932 > > E-mail: r.vandermeij at donders.ru.nl > > > Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Oct 5 16:21:44 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 5 Oct 2011 16:21:44 +0200 Subject: [FieldTrip] Fwd: ft_databrowser References: <4E8C5D32.6020709@psych.ru.nl> Message-ID: Hi Vitória, There was a typo in ft_prepare_layout. However, it still didn't work after fixing it. Using a specified layout in cfg.layout actually works fine for me. Best, Jan-Mathijs PS: it may be an idea to sign up for the discussion list Begin forwarded message: > From: Vitória Magalhães Piai > Date: October 5, 2011 3:35:46 PM GMT+02:00 > To: jan-mathijs schoffelen > Subject: Re: Fwd: ft_databrowser > > Hi Jan-Mathijs, > > I'm running my analyses on a mentat node, from /home/common/matlab/fieldtrip/ so probably the freshest version. > > I call ft_databrowser for an object obtained with ft_componentanalysis > My cfg has > viewmode 'component'; > continuous 'no'; > > The error > Attempt to reference field of non-struct array > > in ft_prepare_layout at 263 > in ft_databrowser at 163 > > The problem still persists. > Is this enough info for you to sort out what the problem is? > > Thanx, Vitória > > On 5-10-2011 15:23, jan-mathijs schoffelen wrote: >> >> Hi Vitória, >> >> What's exactly the error you obtain, and perhaps more importantly: which FieldTrip version are you using? There have been some changes in the past days which broke my earlier updates (which I tested rather extensively). By now, I ironed out some of these issues by reverting the most recent changes. The last fix was done yesterday, so I would like to hear back from you if the problem persists if you use an absolutely fresh version of the code. Then we can take it from there. >> >> Best wishes, >> >> Jan-Mathijs >> >> Begin forwarded message: >> >>> From: Vitória Magalhães Piai >>> Date: October 5, 2011 3:13:44 PM GMT+02:00 >>> To: jan.schoffelen at donders.ru.nl >>> Subject: Fwd: Re: ft_databrowser >>> >>> Beste Jan-Matthijs, >>> >>> Ik gebruik ft_databrowser om de componenten van ICA te bekijken. Sinds een recente wijziging >>> krijg ik een error erbij met >>> ft_prepare_layout at 263 >>> [data.grad] = fixsens(data.grad) >>> >>> als gevolg een error in ft_databrowser at 163 >>> cfg.layout... >>> >>> Wat moet ik nu anders doen zodat ik ft_databrowser op mijn normale manier kan gebruiken? >>> >>> Alvast bedankt, >>> vriendelijke groet, Vitória >>> >>> -------- Original Message -------- >>> Subject: Re: ft_databrowser >>> Date: Wed, 5 Oct 2011 14:54:29 +0200 >>> From: Eelke Spaak >>> To: r.vandermeij at donders.ru.nl >>> CC: Vitória Magalhães Piai >>> >>> Ha Vitoria, >>> >>> Inderdaad zijn er wat wijzigingen gedaan, maar ik weet er ook het >>> fijne niet van helaas. Volgens mij was Jan-Mathijs (Schoffelen) degene >>> die hiervoor verantwoordelijk was, maar dat weet ik niet zeker. >>> >>> Het is (ook voor eventuele toekomstige problemen) denk ik het >>> verstandigst als je even een mailtje naar de algemene FieldTrip-lijst >>> stuurt, fieldtrip at donders.ru.nl. Daar moet je wel eerst voor >>> registreren, instructies daarvoor staan op >>> http://fieldtrip.fcdonders.nl/discussion_list . >>> >>> Groeten, >>> Eelke >>> >>> 2011/10/5 Roemer van der Meij : >>> > Hey Vit, >>> > >>> > Er zijn recent wat wijzigingen gedaan in het de grad en elec structuur, >>> > Eelke, weet jij daar meer van? Ik heb het niet helemaal gevolgd. >>> > >>> > Groetjes, >>> > Roemer >>> > >>> > >>> > >>> > On 05-10-11 12:56, Vitória Magalhães Piai wrote: >>> > >>> > Hoi Roemer, Eelke, >>> > >>> > Ik gebruik ft_databrowser om de componenten van ICA te bekijken. Sinds een >>> > week krijg ik een error erbij met >>> > >>> > ft_prepare_layout at 263 >>> > [data.grad] = fixsens(data.grad) >>> > >>> > als gevolg een error in ft_databrowser at 163 >>> > cfg.layout... >>> > >>> > Ik zag dat jullie twee de laatste wijzigingen gedaan hebben aan die twee >>> > scripts. Wat is er nu anders waardoor ik ft_databrowser niet meer op mijn >>> > normale manier kan gebruiken? >>> > >>> > Ook voor volgende keer: bij wie moet ik eigenlijk met zulke vragen naar toe >>> > (of is het de bedoeling dat ik jullie daarmee kom vervelen)? :) >>> > >>> > Alvast bedankt, Vitória >>> > >>> > >>> > -- >>> > Roemer van der Meij M.Sc. >>> > PhD student >>> > Donders Institute for Brain, Cognition and Behaviour >>> > Centre for Cognition >>> > P.O. Box 9104 >>> > 6500 HE Nijmegen >>> > The Netherlands >>> > Tel: +31(0)24 3655932 >>> > E-mail: r.vandermeij at donders.ru.nl >>> > >>> >> >> Jan-Mathijs Schoffelen, MD PhD >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> > > -- > Vitória Piai > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognition > Radboud University Nijmegen > Montessorilaan 3 > 6525 HR Nijmegen > The Netherlands > > Email : V.piai at donders.ru.nl > Phone : +31 24 3612635 > Room : Spinoza building B.01.05 > www.vitoriapiai.com > > ** Please consider the environment - do you really need to print? ** Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From omoniyi_s at yahoo.com Wed Oct 5 16:46:42 2011 From: omoniyi_s at yahoo.com (Omoniyi Segun) Date: Wed, 5 Oct 2011 07:46:42 -0700 (PDT) Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file In-Reply-To: References: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> Message-ID: <1317826002.17170.YahooMailNeo@web65917.mail.ac4.yahoo.com> Thanks for your response. I am passing a 'subject' structure which contains the file location and file name to the do_reject_artifacts function which i wrote. Inside the function i have inserted the code I got from the tutorial. The structure is created in a do_preprocess function, i read all the files in a directory structure and create the subject stucture in this function. The files are Neuroscan .cnt files Thanks for your help Omoniyi Segun snippet from : do_preprocess         clear subject;         if ( reply == 'Y' || reply == 'y')             %token = strtok(subjectdata.filename{i}, '.');             token = strtok(files(i).name, '.');             subject.datafile = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir filesep files(i).name];             subject.datafilename = token;             subject.datafiledir = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir];             subject.artifactdir = subjectdata.artifactdir; snippet from : do_reject_artifacts cfg.dataset            = 'subject.datafile;       % name of EEG dataset  cfg.trialdef.eventtype      = 'trigger'; cfg.trialdef.prestim        = 1; cfg.trialdef.poststim       = 2; cfg.trialdef.eventvalue     = [1 2];                                    cfg = ft_definetrial(cfg);            data= ft_preprocessing(cfg) trl = cfg.trl; % jump cfg                    = []; cfg.trl = trl; cfg.padding = 0; cfg.datafile   = subject.datafile; cfg.headerfile = subject.datafile; cfg.continuous = 'yes'; cfg.memory = 'low'; % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel    = 'EEG'; cfg.artfctdef.zvalue.cutoff     = 20; cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.fltpadding = 0;   % algorithmic parameters cfg.artfctdef.zvalue.cumulative    = 'yes'; cfg.artfctdef.zvalue.medianfilter  = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff       = 'yes';   % make the process interactive cfg.artfctdef.zvalue.interactive   = 'yes';   [cfg, artifact_jump] = ft_artifact_zvalue(cfg,data); ________________________________ From: jan-mathijs schoffelen To: Omoniyi Segun ; Email discussion list for the FieldTrip project Sent: Tuesday, October 4, 2011 8:15 AM Subject: Re: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file Hi Omoniyi, What kind of data are you passing to the function?  BW, JM On Oct 3, 2011, at 4:49 PM, Omoniyi Segun wrote: Hi, > > >I am new to fieldtrip and have been struggling with it for the past four weeks. > > > >I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; >I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data. > > >Secondly when i click on stop I get the error pasted below. > > > > > >??? Reference to non-existent field 'dimord'. > >Error in ==> dimlength at 74 >      elseif strcmp(data.(fld), 'rpt_pos') > >Error in ==> fixsampleinfo at 31 >  ntrial = dimlength(data, 'rpt'); > >Error in ==> ft_checkdata at 579 >  data = fixsampleinfo(data); > >Error in ==> ft_rejectartifact at 203 >  data = ft_checkdata(data, 'hassampleinfo', 'yes'); > >Error in ==> do_reject_artifacts at 70 >data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); > >Error in ==> do_preprocess at 45 >                do_reject_artifacts(subject); > > >I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data. > > >Thanks > > >Omoniyi Segun > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD  Donders Institute for Brain, Cognition and Behaviour,  Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From karl.doron at gmail.com Thu Oct 6 00:50:01 2011 From: karl.doron at gmail.com (Karl Doron) Date: Wed, 5 Oct 2011 15:50:01 -0700 Subject: [FieldTrip] Clusterplot with F-test Message-ID: Hello, I've run a statistical analysis with cfg.statistic=depsamplesF. The tail of the F distribution is a one-sided test, so no negative cluster distributions are output as part of the processing. The clusterplot function seems to want negative clusters however. Is there any way around this? Best, karl From tommy.ng at mq.edu.au Thu Oct 6 07:54:43 2011 From: tommy.ng at mq.edu.au (Tommy Ng) Date: Thu, 6 Oct 2011 16:54:43 +1100 Subject: [FieldTrip] Units for Y axis Message-ID: Dear FT Experts I am very new to FT and would like to ask a simple question. Using FT beamformer source extraction module implemented in SPM8, I obtained time series of virtual sensors in source space. However, I do not know what is the unit for the Y axis. Can someone please advise? Thank you in advance. Tommy Ng PhD Student Macquarie University Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Thu Oct 6 10:13:41 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 6 Oct 2011 10:13:41 +0200 Subject: [FieldTrip] Problems using .elp files Message-ID: Dear Fieldtrippers, I am using .avr files for source modelling on ERP data. From the ERP components, I have calculated the differencewaves in a .mat file. Until this it all went fine. However I get stuck at using .elp files. I can succesfully create the headmodel with ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model developed by Nolte (2003) However when using ft_prepare_leadfield(cfg) I get problems. My code is like this: % discretize brainvolume in grid cfg=[] cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01' [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) % reading in .elp files %renaming lbl.textdata to lbl.label, else it gives an error at ft_channelselection, because it is unable to read sens.label oldField = 'textdata'; newField = 'label'; [lbl.(newField)] = lbl.(oldField); lbl = rmfield(lbl,oldField); cfg.elec= lbl cfg.vol = vol; cfg.reducerank = 3; cfg.channel = 'Fz' cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution save cfg [grid] = ft_prepare_leadfield(cfg); When executing this I get the following commandscreen: .... ..... using headmodel specified in the configuration using electrodes specified in the configuration ??? Error using ==> ft_prepare_vol_sens at 110 the input does not look like EEG, nor like MEG Error in ==> prepare_headmodel at 114 [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ==> ft_prepare_leadfield at 159 [vol, sens, cfg] = prepare_headmodel(cfg, data); I think this is because I use .elp files? The .elp files contain N rows and 3 columns representing xyz or spherical coordinates I assume. However this is the only information I have about the electrodes, so I have to do with it. Any ideas? Kind regards, Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Thu Oct 6 13:33:05 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Thu, 6 Oct 2011 06:33:05 -0500 Subject: [FieldTrip] Clusterplot with F-test Message-ID: Karl, I believe you can accomplish the same thing as ft_clusterplot using the code sample at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#plotting_the_results1, which also gives you the option to plot negative or positive clusters (or both, if you fiddle with that code; there is a sample higher up on the page that plots both). Best, Steve Politzer-Ahles Message: 2 > Date: Wed, 5 Oct 2011 15:50:01 -0700 > From: Karl Doron > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] Clusterplot with F-test > Message-ID: > Content-Type: text/plain; charset=us-ascii > > Hello, > > I've run a statistical analysis with cfg.statistic=depsamplesF. The tail of > the F distribution is a one-sided test, so no negative cluster distributions > are output as part of the processing. The clusterplot function seems to want > negative clusters however. Is there any way around this? > > Best, > > karl > > > > > > ------------------------------ > > Message: 3 > Date: Thu, 6 Oct 2011 16:54:43 +1100 > From: Tommy Ng > To: fieldtrip at donders.ru.nl > Subject: Re: [FieldTrip] Units for Y axis > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear FT Experts > > I am very new to FT and would like to ask a simple question. > > Using FT beamformer source extraction module implemented in SPM8, I > obtained > time series of virtual sensors in source space. However, I do not know what > is the unit for the Y axis. > > Can someone please advise? > > Thank you in advance. > > Tommy Ng > PhD Student > Macquarie University > Australia > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111006/2b4d2da3/attachment-0001.html > > > > ------------------------------ > > Message: 4 > Date: Thu, 6 Oct 2011 10:13:41 +0200 > From: > To: > Subject: [FieldTrip] Problems using .elp files > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Dear Fieldtrippers, > > I am using .avr files for source modelling on ERP data. From the ERP > components, I have calculated the differencewaves in a .mat file. Until this > it all went fine. However I get stuck at using .elp files. > I can succesfully create the headmodel with > ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model > developed by Nolte (2003) > However when using ft_prepare_leadfield(cfg) I get problems. > > My code is like this: > > % discretize brainvolume in grid > cfg=[] > cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01' > [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) > % reading in .elp files > > %renaming lbl.textdata to lbl.label, else it gives an error at > ft_channelselection, because it is unable to read sens.label > oldField = 'textdata'; > newField = 'label'; > [lbl.(newField)] = lbl.(oldField); > lbl = rmfield(lbl,oldField); > cfg.elec= lbl > cfg.vol = vol; > cfg.reducerank = 3; > cfg.channel = 'Fz' > cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution > save cfg > [grid] = ft_prepare_leadfield(cfg); > > When executing this I get the following commandscreen: > .... > ..... > using headmodel specified in the configuration > using electrodes specified in the configuration > ??? Error using ==> ft_prepare_vol_sens at 110 > the input does not look like EEG, nor like MEG > > Error in ==> prepare_headmodel at 114 > [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, > 'order', cfg.order); > > Error in ==> ft_prepare_leadfield at 159 > [vol, sens, cfg] = prepare_headmodel(cfg, data); > > I think this is because I use .elp files? The .elp files contain N rows and > 3 columns representing xyz or spherical coordinates I assume. However this > is the only information I have about the electrodes, so I have to do with > it. > > Any ideas? > > Kind regards, > > Brian > > > > > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het > handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial > Register of the Chamber of Commerce under file number 41055629. > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20111006/1e3275df/attachment.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 11, Issue 7 > **************************************** > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.noordenbos at gmail.com Thu Oct 6 15:32:20 2011 From: mark.noordenbos at gmail.com (Mark Noordenbos) Date: Thu, 6 Oct 2011 15:32:20 +0200 Subject: [FieldTrip] Problem with nanmean.mexw64 Message-ID: Hi all, There seems to be a problem with nanmean.mexw64. I received the following error using fieldtrip-20111005 (same for 20111004). An older version fieldtrip-20110601 works fine (no nanmean.mexw64). ??? Invalid MEX-file 'C:\Users\BSI\Documents\MATLAB\fieldtrip-20111005\private\nanmean.mexw64': The specified module could not be found. Error in ==> ft_topoplotER at 632 dat = nanmean(dat, 2); Best, Mark -- Mark Noordenbos, MSc Radboud University Nijmegen Behavioural Science Institute P.O. Box 9104, Room A05.36 6500 HE Nijmegen The Netherlands Email: m.noordenbos at bsi.ru.nl Telephone: +31 24 3612070 Fax: +31 24 3616211 http://www.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.craddock at uni-leipzig.de Thu Oct 6 16:14:06 2011 From: matt.craddock at uni-leipzig.de (Matt Craddock) Date: Thu, 06 Oct 2011 16:14:06 +0200 Subject: [FieldTrip] Problem with nanmean.mexw64 In-Reply-To: References: Message-ID: <4E8DB7AE.7090108@uni-leipzig.de> On 06/10/2011 15:32, Mark Noordenbos wrote: > Hi all, > > There seems to be a problem with nanmean.mexw64. I received the > following error using fieldtrip-20111005 (same for 20111004). > An older version fieldtrip-20110601 works fine (no nanmean.mexw64). > > ??? Invalid MEX-file > 'C:\Users\BSI\Documents\MATLAB\fieldtrip-20111005\private\nanmean.mexw64': > The specified > module could not be found. > > Error in ==> ft_topoplotER at 632 > dat = nanmean(dat, 2); > > Best, > Mark Hi Mark, I also ran into this problem yesterday after updating to a recent version from a version from June. The problem disappeared when I installed a new Visual C++ redistributable from Microsoft. From looking at the changelog, nanmean.mexw64 was introduced on the 21st of September, so versions of FieldTrip from before then won't have this problem. Cheers, Matt From jm.horschig at donders.ru.nl Fri Oct 7 10:56:18 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 07 Oct 2011 10:56:18 +0200 Subject: [FieldTrip] Problem with nanmean.mexw64 In-Reply-To: <4E8DB7AE.7090108@uni-leipzig.de> References: <4E8DB7AE.7090108@uni-leipzig.de> Message-ID: <4E8EBEB2.9070108@donders.ru.nl> Heya, I just re-mexed all nan functions for win64 with a different compiler, which is supported by Win7 by default. So, from tomorrow onwards there should be no problem with these files anymore. If you or anyone encounters a similar error for another mex-file, let us know and we can re-mex ;) Best, Jörn On 10/6/2011 4:14 PM, Matt Craddock wrote: > On 06/10/2011 15:32, Mark Noordenbos wrote: >> Hi all, >> >> There seems to be a problem with nanmean.mexw64. I received the >> following error using fieldtrip-20111005 (same for 20111004). >> An older version fieldtrip-20110601 works fine (no nanmean.mexw64). >> >> ??? Invalid MEX-file >> 'C:\Users\BSI\Documents\MATLAB\fieldtrip-20111005\private\nanmean.mexw64': >> >> The specified >> module could not be found. >> >> Error in ==> ft_topoplotER at 632 >> dat = nanmean(dat, 2); >> >> Best, >> Mark > > Hi Mark, > > I also ran into this problem yesterday after updating to a recent > version from a version from June. The problem disappeared when I > installed a new Visual C++ redistributable from Microsoft. From > looking at the changelog, nanmean.mexw64 was introduced on the 21st of > September, so versions of FieldTrip from before then won't have this > problem. > > Cheers, > Matt > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands From eva.patai at psy.ox.ac.uk Fri Oct 7 11:18:01 2011 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Fri, 7 Oct 2011 10:18:01 +0100 Subject: [FieldTrip] cluster>nothing to plot Message-ID: Dear All I am running the Cluster-based permutation tests on event related fields, and for the same dataset, with all settings identical, when i run: 0-200ms: i get one significant cluster but: 0-500ms: no significant clusters why does my significant cluster disappear depending on the time window i use? thank you! z -- Zita Patai DPhil Candidate, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ eva.patai at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From eva.patai at psy.ox.ac.uk Fri Oct 7 14:31:37 2011 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Fri, 7 Oct 2011 13:31:37 +0100 Subject: [FieldTrip] cluster>nothing to plot In-Reply-To: References: Message-ID: Sorry, I know the answer now, but I have another , similar problem: When i get the clusterplot figure (after i run the cluster analysis), it has the timebins every 4ms (bc i have a 250Hz sampling rate) with the significant clusters plotted. For a simplified plotting, i was trying to use the bit of script where i can specify the timesteps i want the clusters to be shown in (ex: every 50ms) But, depending on what timestep i use, sometimes it does not display the clusters that are significant, almost like if the period is not long enough, it will not show the clusters... Any ideas ? Thank you! On Fri, Oct 7, 2011 at 10:18 AM, Zita Eva Patai wrote: > Dear All > > I am running the Cluster-based permutation tests on event related fields, > and for the same dataset, with all settings identical, when i run: > 0-200ms: i get one significant cluster > but: > 0-500ms: no significant clusters > > why does my significant cluster disappear depending on the time window i > use? > > thank you! > z > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > eva.patai at psy.ox.ac.uk > > > -- Zita Patai DPhil Candidate, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ eva.patai at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Fri Oct 7 14:55:25 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 7 Oct 2011 07:55:25 -0500 Subject: [FieldTrip] cluster>nothing to plot Message-ID: Zita, The sensitivity of the cluster test varies depending on the time window you analyze. Specifically, the sensitivity is greater when testing a small time window; see the discussion of cfg.latency at http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock#the_configuration_settings. But to properly control the type I error rate, it seems the time window of analysis should be chosen based on a priori predictions about where the effect should appear (i.e., not chosen based on your own data after you've looked at it). Best, Steve Politzer-Ahles Message: 5 > Date: Fri, 7 Oct 2011 10:18:01 +0100 > From: Zita Eva Patai > To: fieldtrip at donders.ru.nl > Subject: [FieldTrip] cluster>nothing to plot > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Dear All > > I am running the Cluster-based permutation tests on event related fields, > and for the same dataset, with all settings identical, when i run: > 0-200ms: i get one significant cluster > but: > 0-500ms: no significant clusters > > why does my significant cluster disappear depending on the time window i > use? > > thank you! > z > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > eva.patai at psy.ox.ac.uk > -- Stephen Politzer-Ahles University of Kansas Linguistics Department http://www.linguistics.ku.edu/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lilla.Magyari at mpi.nl Fri Oct 7 15:08:11 2011 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Fri, 07 Oct 2011 15:08:11 +0200 Subject: [FieldTrip] cluster>nothing to plot In-Reply-To: References: Message-ID: <4E8EF9BB.90405@mpi.nl> hi Zita, I do not know what kind of script you wrote, therefore, it is difficult to figure out what the problem is exactly. But your problems reminds me to the following: if you followed the FT tutorial for plotting the clusters, you must be aware that it will plot only those channels in each time-bin that are part of the cluster during the entire time-bin. So, if you use a 50 ms bin, and a channel is part of the significant cluster only for 10 ms, you won't see that channel on the plot. I hope this helps. Best, Lilla Zita Eva Patai wrote: > Sorry, I know the answer now, but I have another , similar problem: > > When i get the clusterplot figure (after i run the cluster analysis), it > has the timebins every 4ms (bc i have a 250Hz sampling rate) with the > significant clusters plotted. > For a simplified plotting, i was trying to use the bit of script where i > can specify the timesteps i want the clusters to be shown in (ex: every > 50ms) > But, depending on what timestep i use, sometimes it does not display the > clusters that are significant, almost like if the period is not long > enough, it will not show the clusters... > > Any ideas ? > > Thank you! > > On Fri, Oct 7, 2011 at 10:18 AM, Zita Eva Patai > wrote: > > Dear All > > I am running the Cluster-based permutation tests on event related > fields, and for the same dataset, with all settings identical, when > i run: > 0-200ms: i get one significant cluster > but: > 0-500ms: no significant clusters > > why does my significant cluster disappear depending on the time > window i use? > > thank you! > z > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > eva.patai at psy.ox.ac.uk > > > > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > > eva.patai at psy.ox.ac.uk > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- PhD student Language and Cognition Group research assistant Neurobiology of Language Group Max Planck Institute for Psycholinguistics Nijmegen, P.O. Box 310, 6500AH, the Netherlands Phone: 0031 24 3521561 From eva.patai at psy.ox.ac.uk Fri Oct 7 15:26:39 2011 From: eva.patai at psy.ox.ac.uk (Zita Eva Patai) Date: Fri, 7 Oct 2011 14:26:39 +0100 Subject: [FieldTrip] cluster>nothing to plot In-Reply-To: <4E8EF9BB.90405@mpi.nl> References: <4E8EF9BB.90405@mpi.nl> Message-ID: Thank you Stephen & Lilla! I think I am just a bit overwhelmed with my data...and I was hoping to get straightforward results for my epoch... On Fri, Oct 7, 2011 at 2:08 PM, Magyari, Lilla wrote: > hi Zita, > > I do not know what kind of script you wrote, therefore, it is difficult to > figure out what the problem is exactly. But your problems reminds me to the > following: > if you followed the FT tutorial for plotting the clusters, you must be > aware that it will plot only those channels in each time-bin that are part > of the cluster during the entire time-bin. So, if you use a 50 ms bin, and a > channel is part of the significant cluster only for 10 ms, you won't see > that channel on the plot. I hope this helps. > > Best, > Lilla > > > Zita Eva Patai wrote: > >> Sorry, I know the answer now, but I have another , similar problem: >> >> When i get the clusterplot figure (after i run the cluster analysis), it >> has the timebins every 4ms (bc i have a 250Hz sampling rate) with the >> significant clusters plotted. For a simplified plotting, i was trying to use >> the bit of script where i can specify the timesteps i want the clusters to >> be shown in (ex: every 50ms) >> But, depending on what timestep i use, sometimes it does not display the >> clusters that are significant, almost like if the period is not long enough, >> it will not show the clusters... >> >> Any ideas ? >> >> Thank you! >> >> On Fri, Oct 7, 2011 at 10:18 AM, Zita Eva Patai > eva.patai at psy.ox.ac.uk**>> wrote: >> >> Dear All >> >> I am running the Cluster-based permutation tests on event related >> fields, and for the same dataset, with all settings identical, when >> i run: >> 0-200ms: i get one significant cluster >> but: >> 0-500ms: no significant clusters >> >> why does my significant cluster disappear depending on the time >> window i use? >> >> thank you! >> z >> >> >> -- >> Zita Patai >> DPhil Candidate, Experimental Psychology >> University of Oxford >> bcl.psy.ox.ac.uk/people/zita-**eva-patai/ >> >> > >> eva.patai at psy.ox.ac.uk >> >> >> >> >> >> >> -- >> >> Zita Patai >> DPhil Candidate, Experimental Psychology >> University of Oxford >> bcl.psy.ox.ac.uk/people/zita-**eva-patai/< >> http://bcl.psy.ox.ac.uk/**people/zita-eva-patai/ >> > >> eva.patai at psy.ox.ac.uk >> >> >> >> ------------------------------**------------------------------** >> ------------ >> >> ______________________________**_________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip >> > > -- > PhD student > Language and Cognition Group > research assistant > Neurobiology of Language Group > > Max Planck Institute for Psycholinguistics > Nijmegen, P.O. Box 310, 6500AH, the Netherlands > Phone: 0031 24 3521561 > > ______________________________**_________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip > -- Zita Patai DPhil Candidate, Experimental Psychology University of Oxford bcl.psy.ox.ac.uk/people/zita-eva-patai/ eva.patai at psy.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Fri Oct 7 15:37:11 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Fri, 7 Oct 2011 15:37:11 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp Message-ID: Dear Fieldtrippers, I am using .avr files for source modelling on ERP data. From the ERP components, I have calculated the differencewaves in a .mat file. Until this it all went fine. However I get stuck at using .elp files. I can succesfully create the headmodel with ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model developed by Nolte (2003) However when using ft_prepare_leadfield(cfg) I get problems. My code is like this: % discretize brainvolume in grid cfg=[] cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01' [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) % reading in .elp files %renaming lbl.textdata to lbl.label, else it gives an error at ft_channelselection, because it is unable to read sens.label oldField = 'textdata'; newField = 'label'; [lbl.(newField)] = lbl.(oldField); lbl = rmfield(lbl,oldField); cfg.elec= lbl cfg.vol = vol; cfg.reducerank = 3; cfg.channel = 'Fz' cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution save cfg [grid] = ft_prepare_leadfield(cfg); When executing this I get the following commandscreen: .... ..... using headmodel specified in the configuration using electrodes specified in the configuration ??? Error using ==> ft_prepare_vol_sens at 110 the input does not look like EEG, nor like MEG Error in ==> prepare_headmodel at 114 [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); Error in ==> ft_prepare_leadfield at 159 [vol, sens, cfg] = prepare_headmodel(cfg, data); I think this is because I use .elp files? The .elp files contain N rows and 3 columns representing xyz or spherical coordinates I assume. However this is the only information I have about the electrodes, so I have to do with it. Any ideas? Kind regards, Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Oct 7 16:41:50 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 7 Oct 2011 16:41:50 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp In-Reply-To: References: Message-ID: <8D53B7F2-4C62-4D6A-97D5-74E2C98A1CF5@donders.ru.nl> Hi Brian, What does your cfg.elec look like? Best, JM On Oct 7, 2011, at 3:37 PM, wrote: > Dear Fieldtrippers, > > I am using .avr files for source modelling on ERP data. From the ERP components, I have calculated the differencewaves in a .mat file. Until this it all went fine. However I get stuck at using .elp files. > I can succesfully create the headmodel with ft_prepare_singleshell(cfg,segementedmri) with the semi-realistic head model developed by Nolte (2003) > However when using ft_prepare_leadfield(cfg) I get problems. > > My code is like this: > > % discretize brainvolume in grid > cfg=[] > cfg.inputfile= 'C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave01' > [lbl] = importdata([subjectdata.subjectdir filesep subjectdata.electrodes]) % reading in .elp files > > %renaming lbl.textdata to lbl.label, else it gives an error at ft_channelselection, because it is unable to read sens.label > oldField = 'textdata'; > newField = 'label'; > [lbl.(newField)] = lbl.(oldField); > lbl = rmfield(lbl,oldField); > cfg.elec= lbl > cfg.vol = vol; > cfg.reducerank = 3; > cfg.channel = 'Fz' > cfg.grid.resolution = 1; % use a 3-D grid with a 1 cm resolution > save cfg > [grid] = ft_prepare_leadfield(cfg); > > When executing this I get the following commandscreen: > .... > ..... > using headmodel specified in the configuration > using electrodes specified in the configuration > ??? Error using ==> ft_prepare_vol_sens at 110 > the input does not look like EEG, nor like MEG > > Error in ==> prepare_headmodel at 114 > [vol, sens] = ft_prepare_vol_sens(vol, sens, 'channel', cfg.channel, 'order', cfg.order); > > Error in ==> ft_prepare_leadfield at 159 > [vol, sens, cfg] = prepare_headmodel(cfg, data); > > I think this is because I use .elp files? The .elp files contain N rows and 3 columns representing xyz or spherical coordinates I assume. However this is the only information I have about the electrodes, so I have to do with it. > > Any ideas? > > Kind regards, > > Brian > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Fri Oct 7 17:07:18 2011 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Fri, 7 Oct 2011 10:07:18 -0500 Subject: [FieldTrip] cluster>nothing to plot Message-ID: Hi Zita, I think Lilla's explanation for why your clusters are not showing up in the plot is right. If you're using the sample script from the cluster tutorial on the wiki, you can probably resolve this problem by just plotting smaller time windows; for example, to divide your epoch into 40 time windows instead of 20, make the "timestep" half as big, make the loop run from k=1:40 instead of k=1:20, and edit the adjust the number of subplots accordingly. Or, to get a more specific idea of the topography and time course of your significant cluster(s), you can look in the variables stat.posclusterslabelmat and stat.negclusterslabelmat, which tell you which (time, channel) samples belong to significant clusters. (I find it easiest to do this by writing those variables into Excel files and using Excel functions to find where the significant clusters are, but it can be done in Matlab as well.) This is a more exact way to see when and where significant clusters appear, without worrying about what time windows to select for plotting. Best, Steve Message: 4 > Date: Fri, 7 Oct 2011 14:26:39 +0100 > From: Zita Eva Patai > To: Email discussion list for the FieldTrip project > > Subject: Re: [FieldTrip] cluster>nothing to plot > Message-ID: > > > Content-Type: text/plain; charset="iso-8859-1" > > Thank you Stephen & Lilla! > > I think I am just a bit overwhelmed with my data...and I was hoping to get > straightforward results for my epoch... > > > On Fri, Oct 7, 2011 at 2:08 PM, Magyari, Lilla > wrote: > > > hi Zita, > > > > I do not know what kind of script you wrote, therefore, it is difficult > to > > figure out what the problem is exactly. But your problems reminds me to > the > > following: > > if you followed the FT tutorial for plotting the clusters, you must be > > aware that it will plot only those channels in each time-bin that are > part > > of the cluster during the entire time-bin. So, if you use a 50 ms bin, > and a > > channel is part of the significant cluster only for 10 ms, you won't see > > that channel on the plot. I hope this helps. > > > > Best, > > Lilla > > > > > > Zita Eva Patai wrote: > > > >> Sorry, I know the answer now, but I have another , similar problem: > >> > >> When i get the clusterplot figure (after i run the cluster analysis), it > >> has the timebins every 4ms (bc i have a 250Hz sampling rate) with the > >> significant clusters plotted. For a simplified plotting, i was trying to > use > >> the bit of script where i can specify the timesteps i want the clusters > to > >> be shown in (ex: every 50ms) > >> But, depending on what timestep i use, sometimes it does not display the > >> clusters that are significant, almost like if the period is not long > enough, > >> it will not show the clusters... > >> > >> Any ideas ? > >> > >> Thank you! > >> > >> On Fri, Oct 7, 2011 at 10:18 AM, Zita Eva Patai >> eva.patai at psy.ox.ac.uk**>> wrote: > >> > >> Dear All > >> > >> I am running the Cluster-based permutation tests on event related > >> fields, and for the same dataset, with all settings identical, when > >> i run: > >> 0-200ms: i get one significant cluster > >> but: > >> 0-500ms: no significant clusters > >> > >> why does my significant cluster disappear depending on the time > >> window i use? > >> > >> thank you! > >> z > >> > >> > >> -- > >> Zita Patai > >> DPhil Candidate, Experimental Psychology > >> University of Oxford > >> bcl.psy.ox.ac.uk/people/zita-**eva-patai/< > http://bcl.psy.ox.ac.uk/people/zita-eva-patai/> > >> http://bcl.psy.ox.ac.uk/people/zita-eva-patai/> > >> > > >> eva.patai at psy.ox.ac.uk > >> > >> > >> > >> > >> > >> > >> -- > >> > >> Zita Patai > >> DPhil Candidate, Experimental Psychology > >> University of Oxford > >> bcl.psy.ox.ac.uk/people/zita-**eva-patai/< > http://bcl.psy.ox.ac.uk/people/zita-eva-patai/>< > >> http://bcl.psy.ox.ac.uk/**people/zita-eva-patai/< > http://bcl.psy.ox.ac.uk/people/zita-eva-patai/> > >> > > >> eva.patai at psy.ox.ac.uk > >> > >> > >> > >> ------------------------------**------------------------------** > >> ------------ > >> > >> ______________________________**_________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip< > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip> > >> > > > > -- > > PhD student > > Language and Cognition Group > > research assistant > > Neurobiology of Language Group > > > > Max Planck Institute for Psycholinguistics > > Nijmegen, P.O. Box 310, 6500AH, the Netherlands > > Phone: 0031 24 3521561 > > > > ______________________________**_________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/**mailman/listinfo/fieldtrip< > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip> > > > > > > -- > > Zita Patai > DPhil Candidate, Experimental Psychology > University of Oxford > bcl.psy.ox.ac.uk/people/zita-eva-patai/ > eva.patai at psy.ox.ac.uk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From BelluscB at ninds.nih.gov Fri Oct 7 17:40:11 2011 From: BelluscB at ninds.nih.gov (Belluscio, Beth (NIH/NINDS) [E]) Date: Fri, 7 Oct 2011 11:40:11 -0400 Subject: [FieldTrip] Using "virtual sensors" for data analysis Message-ID: <794DFDD3C128EF44AC49ADC58FD0090C059826CD33@NIHMLBX10.nih.gov> Dear Fieldtrippers- In my process of learning about different methods of analyzing MEG data, I have found the different Fieldtrip tutorials extremely useful. One method that is frequently quoted in the literature is using "virtual sensors" to determine, for example, the frequency response associated with an event within a specific brain region. In trying to learn about the processing steps necessary for this method, it has been difficult for me to translate the methods quoted in the literature into specific steps within Fieldtrip. I wonder what people think about trying to construct a tutorial that would act as a guide to the procedures (and pitfalls) associated with analyzing data within source space. Beth. Beth Belluscio MD-PhD Clinical Fellow Human Motor Control Section NINDS, NIH 301-402-3495 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Sun Oct 9 21:53:13 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Sun, 9 Oct 2011 21:53:13 +0200 Subject: [FieldTrip] problem exiting ft_databrowser Message-ID: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> Hi, I am very happy with the ft_databrowser, and looking at artifacts works fine. I can also use the keys to switch between artifact types, move between trials etc. However, when I press "q" to exit, nothing happens. If I then close the window manually, no artifacts are added to my data or cfg structures (even though when I select them, it says: "there is no overlap with the active artifact (visual), mark this as a new artifact"). What should I do? Is there a way to exit and still save the marked artifacts? I am using fieldtrip on MacOSX, matlab 2011a). Thanks so much! Marieke ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Sun Oct 9 23:08:52 2011 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Sun, 09 Oct 2011 14:08:52 -0700 Subject: [FieldTrip] problem exiting ft_databrowser In-Reply-To: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> References: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> Message-ID: <4E920D64.4030603@berkeley.edu> Hi Marieke, The "q" key not working is a known bug. When the mouse has been used, for some reason the "q" does not work anymore. However, this is not the cause of the artifacts not being saved. Both pressing the "q" and closing the window manually has the exact same effect as programmed in the code. The artifacts should be present as an artifact structure (2 columns for each artifact, 1st column beginsample, 2nd endsample), which should be added to the output cfg.artfctdef..artifact. Is this not the case for you? Hope this helps, Ingrid On 10/9/2011 12:53 PM, Marieke van Vugt wrote: > Hi, > I am very happy with the ft_databrowser, and looking at artifacts > works fine. I can also use the keys to switch between artifact types, > move between trials etc. However, when I press "q" to exit, nothing > happens. If I then close the window manually, no artifacts are added > to my data or cfg structures (even though when I select them, it says: > "there is no overlap with the active artifact (visual), mark this as a > new artifact"). > What should I do? Is there a way to exit and still save the marked > artifacts? I am using fieldtrip on MacOSX, matlab 2011a). > Thanks so much! > Marieke > ---------------------------------------------------------------------------- > Marieke van Vugt, PhD > Assistant Professor, Cognitive Modeling Group > Bernoulliborg, room 326 > Nijenborgh 9 > 9747 AG Groningen > The Netherlands > phone: +31-6-51954984 (cell) > +31-50-363-9487 (office) > http://www.ai.rug.nl/~mkvanvugt > m.k.van.vugt at rug.nl > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Mon Oct 10 06:22:03 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Mon, 10 Oct 2011 06:22:03 +0200 Subject: [FieldTrip] problem exiting ft_databrowser In-Reply-To: <4E920D64.4030603@berkeley.edu> References: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> <4E920D64.4030603@berkeley.edu> Message-ID: <4FEB753B-A6E7-4FBD-B8F7-2358B0289D37@rug.nl> Hi Ingrid, I figured out the problem: I did not realize the ft_databrowser was a function, and hence I just called ft_databrowser(cfg,data) without output argument. Using instead cfg=ft_databrowser(cfg,data) made both the "q" key work and gave cfg and artfctdef field. Problem solved! Thank you! (as you can tell, I just started using fieldtrip...) Warm regards, Marieke On Oct 9, 2011, at 11:08 , Ingrid Nieuwenhuis wrote: > Hi Marieke, > > The "q" key not working is a known bug. When the mouse has been used, for some reason the "q" does not work anymore. However, this is not the cause of the artifacts not being saved. Both pressing the "q" and closing the window manually has the exact same effect as programmed in the code. The artifacts should be present as an artifact structure (2 columns for each artifact, 1st column beginsample, 2nd endsample), which should be added to the output cfg.artfctdef..artifact. Is this not the case for you? > > Hope this helps, > Ingrid > > On 10/9/2011 12:53 PM, Marieke van Vugt wrote: >> >> Hi, >> I am very happy with the ft_databrowser, and looking at artifacts works fine. I can also use the keys to switch between artifact types, move between trials etc. However, when I press "q" to exit, nothing happens. If I then close the window manually, no artifacts are added to my data or cfg structures (even though when I select them, it says: "there is no overlap with the active artifact (visual), mark this as a new artifact"). >> What should I do? Is there a way to exit and still save the marked artifacts? I am using fieldtrip on MacOSX, matlab 2011a). >> Thanks so much! >> Marieke >> ---------------------------------------------------------------------------- >> Marieke van Vugt, PhD >> Assistant Professor, Cognitive Modeling Group >> Bernoulliborg, room 326 >> Nijenborgh 9 >> 9747 AG Groningen >> The Netherlands >> phone: +31-6-51954984 (cell) >> +31-50-363-9487 (office) >> http://www.ai.rug.nl/~mkvanvugt >> m.k.van.vugt at rug.nl >> >> >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Ingrid Nieuwenhuis PhD > Postdoctoral Fellow > Sleep and Neuroimaging Laboratory > Department of Psychology > University of California, Berkeley > California 94720-1650 > Tolman Hall, room 5305 > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From jm.horschig at donders.ru.nl Mon Oct 10 09:28:43 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 10 Oct 2011 09:28:43 +0200 Subject: [FieldTrip] problem exiting ft_databrowser In-Reply-To: <4E920D64.4030603@berkeley.edu> References: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> <4E920D64.4030603@berkeley.edu> Message-ID: <4E929EAB.7020003@donders.ru.nl> Hi Ingrid, just as a small addition: the 'q' key, as well as all other keys, should always work in the newer version also after pressing a button. Best, Jörn On 10/9/2011 11:08 PM, Ingrid Nieuwenhuis wrote: > Hi Marieke, > > The "q" key not working is a known bug. When the mouse has been used, > for some reason the "q" does not work anymore. However, this is not > the cause of the artifacts not being saved. Both pressing the "q" and > closing the window manually has the exact same effect as programmed in > the code. The artifacts should be present as an artifact structure (2 > columns for each artifact, 1st column beginsample, 2nd endsample), > which should be added to the output cfg.artfctdef. visual>.artifact. Is this not the case for you? > > Hope this helps, > Ingrid > > On 10/9/2011 12:53 PM, Marieke van Vugt wrote: >> Hi, >> I am very happy with the ft_databrowser, and looking at artifacts >> works fine. I can also use the keys to switch between artifact types, >> move between trials etc. However, when I press "q" to exit, nothing >> happens. If I then close the window manually, no artifacts are added >> to my data or cfg structures (even though when I select them, it >> says: "there is no overlap with the active artifact (visual), mark >> this as a new artifact"). >> What should I do? Is there a way to exit and still save the marked >> artifacts? I am using fieldtrip on MacOSX, matlab 2011a). >> Thanks so much! >> Marieke >> ---------------------------------------------------------------------------- >> Marieke van Vugt, PhD >> Assistant Professor, Cognitive Modeling Group >> Bernoulliborg, room 326 >> Nijenborgh 9 >> 9747 AG Groningen >> The Netherlands >> phone: +31-6-51954984 (cell) >> +31-50-363-9487 (office) >> http://www.ai.rug.nl/~mkvanvugt >> m.k.van.vugt at rug.nl >> >> >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -- > Ingrid Nieuwenhuis PhD > Postdoctoral Fellow > Sleep and Neuroimaging Laboratory > Department of Psychology > University of California, Berkeley > California 94720-1650 > Tolman Hall, room 5305 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Mon Oct 10 11:45:00 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Mon, 10 Oct 2011 11:45:00 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp (jan-mathijs schoffelen) References: Message-ID: Hello Jan-Mathijs, My elec file is a struct, containing a 32x3 double called 'label'. I think these contain the coordinates. Also it contains two 32x1 cells. Called 'textdata' and 'rowheaders'. They contain the same info (names of the 31 channels + average): 'CP2' 'CP5' 'CP6' 'Cz' 'F3' 'F4' 'F7' 'F8' 'FC1' 'FC2' 'FC5' 'FC6' 'Fp1' 'Fp2' 'FT10' 'FT9' 'Fz' 'O1' 'O2' 'P3' 'P4' 'P7' 'P8' 'PO3' 'PO4' 'Pz' 'T7' 'T8' 'Avg' I hope this is enough info for you, to help me with the solution Best, Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- A non-text attachment was scrubbed... Name: winmail.dat Type: application/ms-tnef Size: 3041 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Mon Oct 10 13:11:51 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 10 Oct 2011 13:11:51 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp (jan-mathijs schoffelen) In-Reply-To: References: Message-ID: <082AE8BF-F2B5-4B88-BA32-46F9D455373F@donders.ru.nl> Hi Brian, In order to be able to create a leadfield matrix for forward and inverse modelling, you need to have position information of the electrodes. In the ideal case, these should be measured for each individual subject. If you don't have this information and used standard electrode caps, you can also try and use a set of template electrode positions. Best wishes, Jan-Mathijs On Oct 10, 2011, at 11:45 AM, wrote: > Hello Jan-Mathijs, > > My elec file is a struct, containing a 32x3 double called 'label'. I think these contain the coordinates. Also it contains two 32x1 cells. Called 'textdata' and 'rowheaders'. They contain the same info (names of the 31 channels + average): > > 'CP2' > 'CP5' > 'CP6' > 'Cz' > 'F3' > 'F4' > 'F7' > 'F8' > 'FC1' > 'FC2' > 'FC5' > 'FC6' > 'Fp1' > 'Fp2' > 'FT10' > 'FT9' > 'Fz' > 'O1' > 'O2' > 'P3' > 'P4' > 'P7' > 'P8' > 'PO3' > 'PO4' > 'Pz' > 'T7' > 'T8' > 'Avg' > > I hope this is enough info for you, to help me with the solution > > Best, > > Brian > > > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From inieuwenhuis at berkeley.edu Mon Oct 10 20:07:37 2011 From: inieuwenhuis at berkeley.edu (Ingrid Nieuwenhuis) Date: Mon, 10 Oct 2011 11:07:37 -0700 Subject: [FieldTrip] problem exiting ft_databrowser In-Reply-To: <4E929EAB.7020003@donders.ru.nl> References: <9D2C1B2D-5461-4EA5-8924-661E19E7D5FE@rug.nl> <4E920D64.4030603@berkeley.edu> <4E929EAB.7020003@donders.ru.nl> Message-ID: <4E933469.9080103@berkeley.edu> Hi Jörn, Great that that's fixed! Ingrid On 10/10/2011 12:28 AM, "Jörn M. Horschig" wrote: > Hi Ingrid, > > just as a small addition: the 'q' key, as well as all other keys, > should always work in the newer version also after pressing a button. > > Best, > Jörn > > > On 10/9/2011 11:08 PM, Ingrid Nieuwenhuis wrote: >> Hi Marieke, >> >> The "q" key not working is a known bug. When the mouse has been used, >> for some reason the "q" does not work anymore. However, this is not >> the cause of the artifacts not being saved. Both pressing the "q" and >> closing the window manually has the exact same effect as programmed >> in the code. The artifacts should be present as an artifact >> structure (2 columns for each artifact, 1st column beginsample, 2nd >> endsample), which should be added to the output >> cfg.artfctdef..artifact. Is this not the >> case for you? >> >> Hope this helps, >> Ingrid >> >> On 10/9/2011 12:53 PM, Marieke van Vugt wrote: >>> Hi, >>> I am very happy with the ft_databrowser, and looking at artifacts >>> works fine. I can also use the keys to switch between artifact >>> types, move between trials etc. However, when I press "q" to exit, >>> nothing happens. If I then close the window manually, no artifacts >>> are added to my data or cfg structures (even though when I select >>> them, it says: "there is no overlap with the active artifact >>> (visual), mark this as a new artifact"). >>> What should I do? Is there a way to exit and still save the marked >>> artifacts? I am using fieldtrip on MacOSX, matlab 2011a). >>> Thanks so much! >>> Marieke >>> ---------------------------------------------------------------------------- >>> Marieke van Vugt, PhD >>> Assistant Professor, Cognitive Modeling Group >>> Bernoulliborg, room 326 >>> Nijenborgh 9 >>> 9747 AG Groningen >>> The Netherlands >>> phone: +31-6-51954984 (cell) >>> +31-50-363-9487 (office) >>> http://www.ai.rug.nl/~mkvanvugt >>> m.k.van.vugt at rug.nl >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> -- >> Ingrid Nieuwenhuis PhD >> Postdoctoral Fellow >> Sleep and Neuroimaging Laboratory >> Department of Psychology >> University of California, Berkeley >> California 94720-1650 >> Tolman Hall, room 5305 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail:jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web:http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Ingrid Nieuwenhuis PhD Postdoctoral Fellow Sleep and Neuroimaging Laboratory Department of Psychology University of California, Berkeley California 94720-1650 Tolman Hall, room 5305 -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Oct 11 12:34:07 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 11 Oct 2011 12:34:07 +0200 Subject: [FieldTrip] Creating volume conduction model and leadfieldmatrix using .elp (jan-mathijs schoffelen) In-Reply-To: References: Message-ID: Dear Brian I suggest you look at http://fieldtrip.fcdonders.nl/faq/how_are_electrodes_magnetometers_or_gradiometers_described to convert your electrode positions to fieldtrip format and http://fieldtrip.fcdonders.nl/faq/is_it_important_to_have_accurate_measurements_of_electrode_locations_for_eeg_source_reconstruction and the other faqs for more background information. Furthermore, you can use the standard BEM volume conduction model that is available from the FTP server and spatially coresister your electrodes with the standard BEM geometry using ft_electroderealign or another method of your choise. Following that, I suggest you do some forward simulations (ft_dipolesimulation) and visualise the scalp topographies to check that they make sense prior to moving to the inverse source estimatione (ft_sourceanalysis or ft_dipolefitting). best regards, Robert On 10 Oct 2011, at 11:45, wrote: > Hello Jan-Mathijs, > > My elec file is a struct, containing a 32x3 double called 'label'. I think these contain the coordinates. Also it contains two 32x1 cells. Called 'textdata' and 'rowheaders'. They contain the same info (names of the 31 channels + average): > > 'CP2' > 'CP5' > 'CP6' > 'Cz' > 'F3' > 'F4' > 'F7' > 'F8' > 'FC1' > 'FC2' > 'FC5' > 'FC6' > 'Fp1' > 'Fp2' > 'FT10' > 'FT9' > 'Fz' > 'O1' > 'O2' > 'P3' > 'P4' > 'P7' > 'P8' > 'PO3' > 'PO4' > 'Pz' > 'T7' > 'T8' > 'Avg' > > I hope this is enough info for you, to help me with the solution > > Best, > > Brian > > > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From batrod at gmail.com Tue Oct 11 18:43:47 2011 From: batrod at gmail.com (Rodolphe Nenert) Date: Tue, 11 Oct 2011 11:43:47 -0500 Subject: [FieldTrip] Clustering error Message-ID: Dear Fieldtripers, i tried to modify one of my script that was doing a permutation test in order to do the same test but within trials. I had the following error and couldnt find where it could comes from: using "statfun_depsamplesT" for the single-sample statistics constructing randomized design total number of measurements = 79 total number of variables = 2 number of independent variables = 1 number of unit variables = 1 number of within-cell variables = 0 number of control variables = 0 using a permutation resampling approach repeated measurement in variable 2 over 51 levels number of repeated measurements in each level is 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 computing a parametric threshold for clustering Error using ==> statfun_depsamplesT at 69 Invalid specification of the design array. ??? Error using ==> statistics_montecarlo at 215 could not determine the parametric critical value for clustering Error in ==> ft_freqstatistics at 279 [stat, cfg] = statmethod(cfg, dat, cfg.design); Any ideas ? ( im using the very last fieltrip version : 20111010) Rodolphe N. PhD University of Alabama at Birmingham. -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Wed Oct 12 11:40:57 2011 From: caspervanheck at gmail.com (Casper van Heck) Date: Wed, 12 Oct 2011 11:40:57 +0200 Subject: [FieldTrip] DPSS and montage Message-ID: Dear fieldtrippers, I've been using Fieldtrip as an Intern for two months now, and have repeatedly run into a problem when using DPSS. When using the below settings, the computer locks up within seconds (although it does seem to do 'something'), stays that way for up to ten minutes (which is my personal cutoff, where I force a reboot), and then reports an 'out of memory'. cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'dpss'; cfg.foilim = [20 200]; cfg.tapsmofrq = 1; The data fed to ft_freqanalysis is the result of roughly 30 seconds continuous data of a single (originally bipolar) channel processed by ft_preprocessing. When using 'hanning' it completes without a hitch, but DPSS doesn't. I've tried the same thing using a different, more powerful computer, which succesfully completed 30 seconds using the above settings, but when setting the tapsmofrq to 3 the RAM was filled up in a period of a few seconds, and the computer choked. The 'normal' computer has 2GB of ram, and a dual-core intel running at 2GHz, and the more powerful computer has 8GB ram with an quad-core AMD at 3.4GHz. What am I doing wrong? Secondly, I was wondering about the 'montage' funcionality, since I'll be making use of bipolar arrangements, but the parameters of the montage-structure as defined on http://fieldtrip.fcdonders.nl/reference/ft_apply_montage don't help me much in making one of my own. Would it be possible to take a look at an existing montage structure, such as the one referred to on http://fieldtrip.fcdonders.nl/getting_started/neuralynx_fcdc? Sincerely, Casper van Heck -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.vandermeij at donders.ru.nl Wed Oct 12 12:22:03 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Wed, 12 Oct 2011 12:22:03 +0200 Subject: [FieldTrip] DPSS and montage In-Reply-To: References: Message-ID: <4E956A4B.5070600@donders.ru.nl> Hi Casper, On the memory issues, using DPSS tapers on very large segments of data, while at the same time using cfg.foilim (instead of the more selective cfg.foi), results in a huge explosion of required memory. This is so because the amount of tapers for a specified smoothing increases with the length of the trials, and the same holds for the amount of estimable frequencies. In your case, it might be easiest to specify a cfg.foi, instead of cfg.foilim, e.g. cfg.foi = 20:1:200 should already greatly reduce the amount of memory needed. Increasing the amount of smoothing also greatly increases the amount of tapers needed. If you are looking for a higher smoothing, and you still don't have enough memory, you can try to cut your trials in smaller pieces, or use downsampling (the amount of tapers depends on the amount of samples used). Best, Roemer On 12/10/2011 11:40, Casper van Heck wrote: > Dear fieldtrippers, > > I've been using Fieldtrip as an Intern for two months now, and have > repeatedly run into a problem when using DPSS. When using the below > settings, the computer locks up within seconds (although it does seem > to do 'something'), stays that way for up to ten minutes (which is my > personal cutoff, where I force a reboot), and then reports an 'out of > memory'. > > cfg.method = 'mtmfft'; > cfg.output = 'pow'; > cfg.taper = 'dpss'; > cfg.foilim = [20 200]; > cfg.tapsmofrq = 1; > > The data fed to ft_freqanalysis is the result of roughly 30 seconds > continuous data of a single (originally bipolar) channel processed by > ft_preprocessing. > When using 'hanning' it completes without a hitch, but DPSS doesn't. > I've tried the same thing using a different, more powerful computer, > which succesfully completed 30 seconds using the above settings, but > when setting the tapsmofrq to 3 the RAM was filled up in a period of a > few seconds, and the computer choked. The 'normal' computer has 2GB of > ram, and a dual-core intel running at 2GHz, and the more powerful > computer has 8GB ram with an quad-core AMD at 3.4GHz. What am I doing > wrong? > > Secondly, I was wondering about the 'montage' funcionality, since I'll > be making use of bipolar arrangements, but the parameters of the > montage-structure as defined on > http://fieldtrip.fcdonders.nl/reference/ft_apply_montage don't help me > much in making one of my own. Would it be possible to take a look at > an existing montage structure, such as the one referred to on > http://fieldtrip.fcdonders.nl/getting_started/neuralynx_fcdc? > > Sincerely, > > Casper van Heck > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Wed Oct 12 17:05:50 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Wed, 12 Oct 2011 17:05:50 +0200 Subject: [FieldTrip] DPSS and montage In-Reply-To: References: Message-ID: <6C6F09A3-D7AB-45D6-A3D5-7198A23E0E46@donders.ru.nl> Dear Casper Let me give an example montage, which assumes that you start with a monopolar dataset with 4 channels that you want to convert to a 3-channel bipolar dataset. bipolar.labelorg = {'1', '2', '3', '4'} bipolar.labelnew = {'1-2', '2-3', '3-4'} bipolar.tra = [ +1 -1 0 0 0 +1 -1 0 0 0 +1 -1 ]; The FT_APPLY_MONTAGE function can be used on a variety of FT data structures, such as prepocessed raw data, electrode and gradiometer definitions, freqanalyzed data (in fourier representation). If you imagine having a plain NxM data matrix with the N=4 original channels and M is the number of timepoints, you'll see that applying the montage is equivalent to multiplying the data with "bipolar.tra" The reason for having the FT_APPLY_MONTAGE function is to deal with the bookkeeping, e.g. reordering channels and checking that all channels are present. best Robert PS I'll add this example to the reference docs. On 12 Oct 2011, at 11:40, Casper van Heck wrote: > Dear fieldtrippers, > > I've been using Fieldtrip as an Intern for two months now, and have repeatedly run into a problem when using DPSS. When using the below settings, the computer locks up within seconds (although it does seem to do 'something'), stays that way for up to ten minutes (which is my personal cutoff, where I force a reboot), and then reports an 'out of memory'. > > cfg.method = 'mtmfft'; > cfg.output = 'pow'; > cfg.taper = 'dpss'; > cfg.foilim = [20 200]; > cfg.tapsmofrq = 1; > > The data fed to ft_freqanalysis is the result of roughly 30 seconds continuous data of a single (originally bipolar) channel processed by ft_preprocessing. > When using 'hanning' it completes without a hitch, but DPSS doesn't. I've tried the same thing using a different, more powerful computer, which succesfully completed 30 seconds using the above settings, but when setting the tapsmofrq to 3 the RAM was filled up in a period of a few seconds, and the computer choked. The 'normal' computer has 2GB of ram, and a dual-core intel running at 2GHz, and the more powerful computer has 8GB ram with an quad-core AMD at 3.4GHz. What am I doing wrong? > > Secondly, I was wondering about the 'montage' funcionality, since I'll be making use of bipolar arrangements, but the parameters of the montage-structure as defined on http://fieldtrip.fcdonders.nl/reference/ft_apply_montage don't help me much in making one of my own. Would it be possible to take a look at an existing montage structure, such as the one referred to on http://fieldtrip.fcdonders.nl/getting_started/neuralynx_fcdc? > > Sincerely, > > Casper van Heck > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From t.navarroschroder at fcdonders.ru.nl Wed Oct 12 18:52:05 2011 From: t.navarroschroder at fcdonders.ru.nl (=?utf-8?Q?Navarro_Schr=C3=B6der=2C_T=2E?=) Date: Wed, 12 Oct 2011 18:52:05 +0200 (CEST) Subject: [FieldTrip] FWD: Postdoctoral Position in Cognitive Neuroscience of Learning and Memory (1, 0 fte) Donders Institute, Centre for Cognitive Neuroimaging In-Reply-To: <2014767137.412717.1318438313892.JavaMail.root@sculptor.zimbra.ru.nl> Message-ID: <100987555.412720.1318438325650.JavaMail.root@sculptor.zimbra.ru.nl> Dear all, there is a postdoctoral position in Cognitive Neuroscience available at the Donders Institute, Centre for Cognitive Neuroimaging: See: http://www.ru.nl/vacatures/details/details_vacature_0?recid=505393 or attachment. With kind regards, Tobias Navarro Schroeder -- Tobias Navarro Schroeder PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: t.navarroschroder at fcdonders.ru.nl Phone: +31(0)616958350 -------------- next part -------------- A non-text attachment was scrubbed... Name: vacature.rtf Type: application/rtf Size: 287828 bytes Desc: not available URL: From omoniyi_s at yahoo.com Wed Oct 12 19:11:35 2011 From: omoniyi_s at yahoo.com (Omoniyi Segun) Date: Wed, 12 Oct 2011 10:11:35 -0700 (PDT) Subject: [FieldTrip] Problems detecting Artifacts in Neuroscan CNT file In-Reply-To: <1317826002.17170.YahooMailNeo@web65917.mail.ac4.yahoo.com> References: <1317601024.39140.YahooMailNeo@web65914.mail.ac4.yahoo.com> <1317653367.73347.YahooMailNeo@web65905.mail.ac4.yahoo.com> <1317826002.17170.YahooMailNeo@web65917.mail.ac4.yahoo.com> Message-ID: <1318439495.10726.YahooMailNeo@web65907.mail.ac4.yahoo.com> Hi Jan-mathijs, Did you get a chance to look at the problem described about neuroscan CNT file. Thanks Omoniyi Segun  ________________________________ From: Omoniyi Segun To: jan-mathijs schoffelen ; Email discussion list for the FieldTrip project Sent: Wednesday, October 5, 2011 10:46 AM Subject: Re: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file Thanks for your response. I am passing a 'subject' structure which contains the file location and file name to the do_reject_artifacts function which i wrote. Inside the function i have inserted the code I got from the tutorial. The structure is created in a do_preprocess function, i read all the files in a directory structure and create the subject stucture in this function. The files are Neuroscan .cnt files Thanks for your help Omoniyi Segun snippet from : do_preprocess         clear subject;         if ( reply == 'Y' || reply == 'y')             %token = strtok(subjectdata.filename{i}, '.');             token = strtok(files(i).name, '.');             subject.datafile = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir filesep files(i).name];             subject.datafilename = token;             subject.datafiledir = [subjectdata.datadir filesep subjectdata.taskdir filesep subjectdata.subjectdir];             subject.artifactdir = subjectdata.artifactdir; snippet from : do_reject_artifacts cfg.dataset            = 'subject.datafile;       % name of EEG dataset  cfg.trialdef.eventtype      = 'trigger'; cfg.trialdef.prestim        = 1; cfg.trialdef.poststim       = 2; cfg.trialdef.eventvalue     = [1 2];                                    cfg = ft_definetrial(cfg);            data= ft_preprocessing(cfg) trl = cfg.trl; % jump cfg                    = []; cfg.trl = trl; cfg.padding = 0; cfg.datafile   = subject.datafile; cfg.headerfile = subject.datafile; cfg.continuous = 'yes'; cfg.memory = 'low'; % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel    = 'EEG'; cfg.artfctdef.zvalue.cutoff     = 20; cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.fltpadding = 0;   % algorithmic parameters cfg.artfctdef.zvalue.cumulative    = 'yes'; cfg.artfctdef.zvalue.medianfilter  = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff       = 'yes';   % make the process interactive cfg.artfctdef.zvalue.interactive   = 'yes';   [cfg, artifact_jump] = ft_artifact_zvalue(cfg,data); ________________________________ From: jan-mathijs schoffelen To: Omoniyi Segun ; Email discussion list for the FieldTrip project Sent: Tuesday, October 4, 2011 8:15 AM Subject: Re: [FieldTrip] Problems detecting Artifacts in Neuroscan EEG file Hi Omoniyi, What kind of data are you passing to the function?  BW, JM On Oct 3, 2011, at 4:49 PM, Omoniyi Segun wrote: Hi, > > >I am new to fieldtrip and have been struggling with it for the past four weeks. > > > >I am trying to do artifact detection using the Automatic Artifact detection tutorial on the Site. The first issue I am having is when i set % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; >I see nothing in the figure that is plotted. I see the data plotted when i use the sample data provided but not when i use my Neuroscan EEG data. > > >Secondly when i click on stop I get the error pasted below. > > > > > >??? Reference to non-existent field 'dimord'. > >Error in ==> dimlength at 74 >      elseif strcmp(data.(fld), 'rpt_pos') > >Error in ==> fixsampleinfo at 31 >  ntrial = dimlength(data, 'rpt'); > >Error in ==> ft_checkdata at 579 >  data = fixsampleinfo(data); > >Error in ==> ft_rejectartifact at 203 >  data = ft_checkdata(data, 'hassampleinfo', 'yes'); > >Error in ==> do_reject_artifacts at 70 >data_no_artifact_jump = ft_rejectartifact(cfg,artifact_jump); > >Error in ==> do_preprocess at 45 >                do_reject_artifacts(subject); > > >I am comfortable making changes to the code and would like some pointers in the right direction. I am not sure if this is an issue with Neuroscan data. > > >Thanks > > >Omoniyi Segun > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD  Donders Institute for Brain, Cognition and Behaviour,  Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.todorovic at fcdonders.ru.nl Mon Oct 17 10:55:22 2011 From: a.todorovic at fcdonders.ru.nl (Todorovic, A.) Date: Mon, 17 Oct 2011 10:55:22 +0200 (CEST) Subject: [FieldTrip] fieldtrip application of depsamplesT Message-ID: <138307306.568035.1318841722776.JavaMail.root@monoceros.zimbra.ru.nl> Hello ft_list, I am wondering if any changes have recently been made to the t-test scripts in FieldTrip. I re-did an analysis I previously ran in August and am getting somewhat more conservative estimates for my clusters. This could of course be due to random fluctuations in the output, but my feeling is that something is different in the settings with respect to how cluster tails are implemented. Are there new changes to these scripts, and if yes, could you please let me/us know what they are? Regards, Ana From vitoria.piai at gmail.com Wed Oct 19 05:30:25 2011 From: vitoria.piai at gmail.com (=?ISO-8859-1?Q?Vit=F3ria_Magalh=E3es_Piai?=) Date: Wed, 19 Oct 2011 05:30:25 +0200 Subject: [FieldTrip] problem with ft_prepare_neighbours / ft_neighbourselection In-Reply-To: <4E9E4331.20200@donders.ru.nl> References: <4E9E4331.20200@donders.ru.nl> Message-ID: <4E9E4451.1080308@gmail.com> Hi, Since a latest change from yesterday (Oct 18th), I'm getting an error when running either ft_prepare_neighbours / ft_neighbourselection on channelposition at line 71 because of a reference to non-existent field 'tra'. I'm working with planar gradients. Hopefully this is a temporary bug, but otherwise what would be the right way to configure the parameters? Thank you, Vitoria From jan.schoffelen at donders.ru.nl Wed Oct 19 11:18:31 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Wed, 19 Oct 2011 11:18:31 +0200 Subject: [FieldTrip] problem with ft_prepare_neighbours / ft_neighbourselection In-Reply-To: <4E9E4451.1080308@gmail.com> References: <4E9E4331.20200@donders.ru.nl> <4E9E4451.1080308@gmail.com> Message-ID: Dear Vitória, At the moment, the part of the FieldTrip code dealing with channel positions is not so stable. This has high priority for us and we will discuss the issue in today's FieldTrip team meeting. Hopefully we will be able to provide a stable version very soon. For now, I'd advice not to use the latest version if that is causing you trouble. Best wishes, Jan-Mathijs On Oct 19, 2011, at 5:30 AM, Vitória Magalhães Piai wrote: > > > Hi, > > Since a latest change from yesterday (Oct 18th), I'm getting an error > when running either ft_prepare_neighbours / ft_neighbourselection on > channelposition at line 71 because of a reference to non-existent field > 'tra'. > I'm working with planar gradients. > > Hopefully this is a temporary bug, but otherwise what would be the right > way to configure the parameters? > > Thank you, Vitoria > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Wed Oct 19 15:54:37 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Wed, 19 Oct 2011 15:54:37 +0200 Subject: [FieldTrip] beamforming - normilise issue Message-ID: Dear all, I am trying to use beamforming for some MEG data. I have 1 condition, and I wish to compare it against the baseline. Ideally I wish to have the average of all group and statistically compare stimulus agains baseline.. As such, for each subject I calculate the source for the baseline and the source for the stimulus (using a common filter as indicated on the website). I then call ft_sourceinterpolate and, since I wish to have a group analysis, ft_volumenormalise. In order to compute the average, I call ft_sourcegrandaverage. Even though the help tells me that it is fine, the grandaverage does not work if the input is from the ft_volumenormalise. It is because there is not the ".pos" field! Am I doing something wrong? Any advice would be great. Thanks a lot, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.wibral at web.de Wed Oct 19 17:44:24 2011 From: michael.wibral at web.de (Michael Wibral) Date: Wed, 19 Oct 2011 17:44:24 +0200 (CEST) Subject: [FieldTrip] beamforming - normilise issue Message-ID: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Wed Oct 19 18:12:10 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Wed, 19 Oct 2011 18:12:10 +0200 Subject: [FieldTrip] beamforming - normilise issue In-Reply-To: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> References: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> Message-ID: Hi Michael, I am using the single shell (Nolte). The grid has 2340 positions, but I am not still using mni. Thanks, Davide On Wed, Oct 19, 2011 at 5:44 PM, Michael Wibral wrote: > Hi davide, > > what headmodel and grid are you using? > > Michael > > > ------------------------------ > *Von:* "Davide Rivolta" > *Gesendet:* Oct 19, 2011 3:54:37 PM > *An:* "Email discussion list for the FieldTrip project" < > fieldtrip at donders.ru.nl> > *Betreff:* [FieldTrip] beamforming - normilise issue > > > Dear all, > > I am trying to use beamforming for some MEG data. > > I have 1 condition, and I wish to compare it against the baseline. Ideally > I wish to have the average of all group and statistically compare stimulus > agains baseline.. > > As such, for each subject I calculate the source for the baseline and the > source for the stimulus (using a common filter as indicated on the website). > > I then call ft_sourceinterpolate and, since I wish to have a group > analysis, ft_volumenormalise. > In order to compute the average, I call ft_sourcegrandaverage. > > Even though the help tells me that it is fine, the grandaverage does not > work if the input is from the ft_volumenormalise. It is because there is not > the ".pos" field! > > Am I doing something wrong? > > Any advice would be great. > > Thanks a lot, > > Davide > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From dgroppe at cogsci.ucsd.edu Thu Oct 20 04:01:29 2011 From: dgroppe at cogsci.ucsd.edu (David Groppe) Date: Wed, 19 Oct 2011 19:01:29 -0700 (PDT) Subject: [FieldTrip] removing EEG 1/f spectral power Message-ID: Hi FieldTrippers, I am interested in studying the spectral peaks in resting EEG. Identifying these peaks is complicated by the 1/f distribution of EEG power. Do any of you have suggestions for removing the 1/f distribution to better reveal peaks? I've seen people suggest autoregressive modelling or applying high pass filters but in the couple of attempts I've seen the results look fair. much appreciated, -David From t.schneider at uke.uni-hamburg.de Thu Oct 20 12:33:40 2011 From: t.schneider at uke.uni-hamburg.de (Till Schneider) Date: Thu, 20 Oct 2011 12:33:40 +0200 Subject: [FieldTrip] PhD and post-doctoral positions - University Medical Center Hamburg-Eppendorf Message-ID: <4E9FF904.6050700@uke.uni-hamburg.de> Dear all, please find attached two job advertisements for PhD and post-doctoral positions at the Dept. of Neurophysiology and Pathophysiology, University Medical Center Hamburg-Eppendorf, Hamburg, Germany. These positions are funded through the Collaborative Research Centre SFB 936 „Multi-Site Communication in the Brain“ (www.sfb936.net) (offer #1) and the ERC Advanced Investigators Grant MULTISENSE “The merging of the senses: understanding multisensory experience” (offer #2) respectively. Best regards, Till Schneider -- Till Schneider, PhD Cognitive and Clinical Neurophysiology Group Dept. of Neurophysiology and Pathophysiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg Germany phone +49-40-7410-53188 fax +49-40-7410-57126 t.schneider at uke.de -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus -------------- next part -------------- A non-text attachment was scrubbed... Name: Job_advertisement_Hamburg1.pdf Type: application/pdf Size: 22836 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Job_advertisement_Hamburg2.pdf Type: application/pdf Size: 22922 bytes Desc: not available URL: From grion at sissa.it Fri Oct 21 01:43:32 2011 From: grion at sissa.it (Natalia Grion) Date: Fri, 21 Oct 2011 01:43:32 +0200 Subject: [FieldTrip] Between-Trial Stats on Coherence Message-ID: <20111021014332.Horde.2VPvCx8V4mxOoLIkv4KGG8A@webmail.sissa.it> Dear All, when computing the statistical test for difference in coherence between condition 1 and condition 2 (for single subject) I get NaNs for stat. The setting code is quite simple and I did some checking for silly errors(ex. I dowloaded the very last version), so either I'm doing sth wrong or there is a bug somwhere. Maybe you can help me. I do the following: having computed the 'fourier' for both conditions (diff amount of trials), I run the code for the second step (whithout MC correction for the moment). I have 2 channel on which Im computing the coherence. The data for both conditions have the same length. The design is a betweenTrial so: #trls c1 + #trls c2. and 1 independent variable. AmI missing something on the design or like reshaping the data? Any help is welcome! Natalia cfg = []; cfg.channel ={'lfp';'Whisk'}; cfg.channelcmb ={'lfp' 'Whisk'}; cfg.frequency ='all'; cfg.method = 'montecarlo'; cfg.parameter ='fourierspctrm'; cfg.statistic = 'indepsamplesZcoh'; cfg.alpha = 0.05; cfg.tail = 0; cfg.numrandomization = 10; %500 cfg.neighbours = []; %cfg.correctm = 'cluster'; %cfg.clusterthreshold = 'nonparametric_common'; %cfg.clusterstatistic = 'maxsum'; %cfg.clusteralpha = 0.05; %cfg.clustertail = 0; %cfg.correcttail ='prob'; cfg.computestat = 'yes'; cfg.computecritval = 'yes'; cfg.computeprob = 'yes' ; %Design of matrix design = zeros(1,size(freqoutdisc.fourierspctrm,1) + size(freqoutwalk.fourierspctrm,1)); design(1,1:size(freqoutdisc.fourierspctrm,1)) = 1; design(1,(size(freqoutdisc.fourierspctrm,1)+1):(size(freqoutdisc.fourierspctrm,1) + size(freqoutwalk.fourierspctrm,1)))= 2; cfg.design = design; cfg.ivar = 1; [stat1] = freqstatistics(cfg,freqoutdisc,freqoutwalk); From ali.gm88 at gmail.com Fri Oct 21 08:34:23 2011 From: ali.gm88 at gmail.com (=?ISO-8859-1?Q?Alicia_Gonz=E1lez?=) Date: Fri, 21 Oct 2011 08:34:23 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: Hi, I'm trying to do automatic artifact rejection using the tutorial on the site. It seems that everything runs ok but, when I try to see the z-score figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears (and no errors are found). I'm just using the code from the tutorial without changes. thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Oct 21 08:53:03 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 21 Oct 2011 08:53:03 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: Hi Alicia, In order to be able to address your problem we need some additional feedback of course. What kind of data are you using, etc? BW, JM On Oct 21, 2011, at 8:34 AM, Alicia González wrote: > > > Hi, > > I'm trying to do automatic artifact rejection using the tutorial on the site. It seems that everything runs ok but, when I try to see the z-score figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears (and no errors are found). I'm just using the code from the tutorial without changes. > > thanks in advance. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.gm88 at gmail.com Fri Oct 21 11:08:21 2011 From: ali.gm88 at gmail.com (=?ISO-8859-1?Q?Alicia_Gonz=E1lez?=) Date: Fri, 21 Oct 2011 11:08:21 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: I'm using the data provided in the tutorial: ArtifactMEG.ds (This dataset was acquired continuously with trials of 10 seconds, and during the recording the experimenter instructed the subject to make artifacts and wrote down the trial number in which the artifacts were made) And I running the code below: cfg = []; cfg.dataset = 'ArtifactMEG.ds'; cfg.headerformat = 'ctf_ds'; ctf.dataformat = 'ctf_ds'; cfg.trialdef.eventtype = 'trial'; cfg = ft_definetrial(cfg); trl = cfg.trl(1:50,:); % just use the first 50 trials for the time being % jump cfg = []; cfg.trl = trl; cfg.padding = 0; cfg.datafile = 'ArtifactMEG.ds'; cfg.headerfile = 'ArtifactMEG.ds'; cfg.continuous = 'yes'; % channel selection, cutoff and padding cfg.artfctdef.zvalue.channel = 'MEG'; cfg.artfctdef.zvalue.cutoff = 20; cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; cfg.artfctdef.zvalue.fltpadding = 0; % algorithmic parameters cfg.artfctdef.zvalue.cumulative = 'yes'; cfg.artfctdef.zvalue.medianfilter = 'yes'; cfg.artfctdef.zvalue.medianfiltord = 9; cfg.artfctdef.zvalue.absdiff = 'yes'; % make the process interactive cfg.artfctdef.zvalue.interactive = 'yes'; [cfg, artifact_jump] = ft_artifact_zvalue(cfg); 2011/10/21 jan-mathijs schoffelen > Hi Alicia, > > In order to be able to address your problem we need some additional > feedback of course. What kind of data are you using, etc? > > BW, > > JM > > On Oct 21, 2011, at 8:34 AM, Alicia González wrote: > > > > Hi, > > I'm trying to do automatic artifact rejection using the tutorial on the > site. It seems that everything runs ok but, when I try to see the z-score > figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears > (and no errors are found). I'm just using the code from the tutorial without > changes. > > thanks in advance. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Fri Oct 21 11:49:05 2011 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 21 Oct 2011 11:49:05 +0200 Subject: [FieldTrip] removing EEG 1/f spectral power In-Reply-To: References: Message-ID: Dear David, Often we look at the contrast between two experimental conditions, in which then the 1/f disappears in the contrast, so we don't have to bother. But there are indeed valid cases where you want it out, such as detecting peaks that sit on a 1/f flank. A simple trick that you can use is based on the following idea: say f(t) = sin(w*t), then df/dt = w*cos(w*t) So taking the derivative of a sine multiplies the output with "w" , which is the frequency in radians per second. This applies to each frequency. Taking the derivative is a linear operation, so if your data consists of the sum of many sine-waves (which is the premise for Fourier analysis), taking the derivative of the data is equivalent to taking the derivative of all seperate sine-wave contributions to your data. The consequence hence is that the derivative in time results in the Fourier spectrum at frequency f being multiplied by f (for any frequency). So the 1/f effect in the spectrum is counteracted by a 1*f effect of the time-domain derivative. In ft_preprocessing you can use cfg.derivative=yes to get the desired result. best regards Robert PS this can be considered as estimating and removing a 1-st order AR model from the data, except that we already know what the AR model parameters are. It can also be considered as a high-pass FIR filter with a filter kernel that is [-1 1]. On 20 Oct 2011, at 4:01, David Groppe wrote: > > Hi FieldTrippers, > I am interested in studying the spectral peaks in resting EEG. > Identifying these peaks is complicated by the 1/f distribution of EEG > power. Do any of you have suggestions for removing the 1/f > distribution to better reveal peaks? I've seen people suggest > autoregressive modelling or applying high pass filters but in the > couple of attempts I've seen the results look fair. > much appreciated, > -David > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Fri Oct 21 12:13:08 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Fri, 21 Oct 2011 12:13:08 +0200 Subject: [FieldTrip] beamforming - normilise issue In-Reply-To: References: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> Message-ID: <4EA145B4.3060509@donders.ru.nl> Dear Davide, I was hesitant to answer, because I thought others know more than me. But since none responded, I can try to help with my limited knowledge. From my knowledge of source reconstruction, I can just say that if all your source reconstructions are in the same space (say, MNI), you can use the .pos from your template to overcome this problem. I am not using ft_volumenormalise, so I have no experience what is exactly going on there. I would assume, however, that volumenormalise will transofmr your source structures to a common space. However, I stick to normalizing the following way: http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space Hope it helps at least a little bit. Best, Jörn On 10/19/2011 6:12 PM, Davide Rivolta wrote: > Hi Michael, > I am using the single shell (Nolte). > The grid has 2340 positions, but I am not still using mni. > Thanks, > Davide > > On Wed, Oct 19, 2011 at 5:44 PM, Michael Wibral > wrote: > > Hi davide, > > what headmodel and grid are you using? > > Michael > > > ------------------------------------------------------------------------ > *Von:* "Davide Rivolta" > > *Gesendet:* Oct 19, 2011 3:54:37 PM > *An:* "Email discussion list for the FieldTrip project" > > > *Betreff:* [FieldTrip] beamforming - normilise issue > > > Dear all, > I am trying to use beamforming for some MEG data. > I have 1 condition, and I wish to compare it against the > baseline. Ideally I wish to have the average of all group and > statistically compare stimulus agains baseline.. > As such, for each subject I calculate the source for the > baseline and the source for the stimulus (using a common > filter as indicated on the website). > I then call ft_sourceinterpolate and, since I wish to have a > group analysis, ft_volumenormalise. > In order to compute the average, I call ft_sourcegrandaverage. > Even though the help tells me that it is fine, the > grandaverage does not work if the input is from the > ft_volumenormalise. It is because there is not the ".pos" field! > Am I doing something wrong? > Any advice would be great. > Thanks a lot, > Davide > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Davide Rivolta, PhD > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Mon Oct 24 11:35:21 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Mon, 24 Oct 2011 11:35:21 +0200 Subject: [FieldTrip] problem with clusterplot Message-ID: <2B510BFE-967F-47C2-A920-AA78590FF0DA@rug.nl> Hi everyone, I am trying to use ft_clusterplot after having done ft_timelockstatistics. I get the following error: >>cfg = []; >>cfg.alpha = 0.1; >>cfg.parameter = 'prob'; >>cfg.elec = timelockLow.elec; >> ft_clusterplot(cfg,stat); creating layout from cfg.elec creating layout for ext1020 system There are 1 clusters smaller than alpha (0.1) Positive cluster: 1, pvalue: 0.065 (+), t = 0.712 to 0.836 ??? Reference to non-existent field 'parameter'. Error in ==> ft_topoplotER at 610 dat = data.(cfg.parameter); Error in ==> ft_clusterplot at 339 ft_topoplotER(cfgtopo, stat); 610 dat = data.(cfg.parameter); K>> dbquit In general the stat output looks fine. You can find the 'stat' and 'cfg' variables that I use in my dropbox: http://dl.dropbox.com/u/13997261/clusterProblem.mat Does anyone know what's going on here? I could not figure out what the field 'parameter' should be and why it was not existing in the first place. Thanks a lot in advance for your help, Marieke ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Oct 24 12:23:18 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 24 Oct 2011 12:23:18 +0200 Subject: [FieldTrip] beamforming - normilise issue In-Reply-To: <4EA145B4.3060509@donders.ru.nl> References: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> <4EA145B4.3060509@donders.ru.nl> Message-ID: Dear Jörn, Thanks you very much for you tip. I try to play with it. Davide On Fri, Oct 21, 2011 at 12:13 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Davide, > > I was hesitant to answer, because I thought others know more than me. But > since none responded, I can try to help with my limited knowledge. > > From my knowledge of source reconstruction, I can just say that if all your > source reconstructions are in the same space (say, MNI), you can use the > .pos from your template to overcome this problem. I am not using > ft_volumenormalise, so I have no experience what is exactly going on there. > I would assume, however, that volumenormalise will transofmr your source > structures to a common space. > However, I stick to normalizing the following way: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > Hope it helps at least a little bit. > Best, > Jörn > > > On 10/19/2011 6:12 PM, Davide Rivolta wrote: > > Hi Michael, > > I am using the single shell (Nolte). > > The grid has 2340 positions, but I am not still using mni. > > Thanks, > > Davide > > On Wed, Oct 19, 2011 at 5:44 PM, Michael Wibral wrote: > >> Hi davide, >> >> what headmodel and grid are you using? >> >> Michael >> >> >> ------------------------------ >> *Von:* "Davide Rivolta" >> *Gesendet:* Oct 19, 2011 3:54:37 PM >> *An:* "Email discussion list for the FieldTrip project" < >> fieldtrip at donders.ru.nl> >> *Betreff:* [FieldTrip] beamforming - normilise issue >> >> >> Dear all, >> >> I am trying to use beamforming for some MEG data. >> >> I have 1 condition, and I wish to compare it against the baseline. Ideally >> I wish to have the average of all group and statistically compare stimulus >> agains baseline.. >> >> As such, for each subject I calculate the source for the baseline and the >> source for the stimulus (using a common filter as indicated on the website). >> >> I then call ft_sourceinterpolate and, since I wish to have a group >> analysis, ft_volumenormalise. >> In order to compute the average, I call ft_sourcegrandaverage. >> >> Even though the help tells me that it is fine, the grandaverage does not >> work if the input is from the ft_volumenormalise. It is because there is not >> the ".pos" field! >> >> Am I doing something wrong? >> >> Any advice would be great. >> >> Thanks a lot, >> >> Davide >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Davide Rivolta, PhD > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.gm88 at gmail.com Mon Oct 24 13:13:20 2011 From: ali.gm88 at gmail.com (=?ISO-8859-1?Q?Alicia_Gonz=E1lez?=) Date: Mon, 24 Oct 2011 13:13:20 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: Hi, I solved the problem adding: cfg.artfctdef.zvalue.feedback = 'yes'; Now I can see the figures of the z-score of the processed data. El 21 de octubre de 2011 11:08, Alicia González escribió: > I'm using the data provided in the tutorial: ArtifactMEG.ds (This dataset > was acquired continuously with trials of 10 seconds, and during the > recording the experimenter instructed the subject to make artifacts and > wrote down the trial number in which the artifacts were made) > And I running the code below: > > cfg = []; > cfg.dataset = 'ArtifactMEG.ds'; > cfg.headerformat = 'ctf_ds'; > ctf.dataformat = 'ctf_ds'; > cfg.trialdef.eventtype = 'trial'; > cfg = ft_definetrial(cfg); > > trl = cfg.trl(1:50,:); % just use the first 50 trials > for the time being > > % jump > cfg = []; > cfg.trl = trl; > cfg.padding = 0; > cfg.datafile = 'ArtifactMEG.ds'; > cfg.headerfile = 'ArtifactMEG.ds'; > cfg.continuous = 'yes'; > > % channel selection, cutoff and padding > cfg.artfctdef.zvalue.channel = 'MEG'; > cfg.artfctdef.zvalue.cutoff = 20; > cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; > cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; > cfg.artfctdef.zvalue.fltpadding = 0; > > % algorithmic parameters > cfg.artfctdef.zvalue.cumulative = 'yes'; > cfg.artfctdef.zvalue.medianfilter = 'yes'; > cfg.artfctdef.zvalue.medianfiltord = 9; > cfg.artfctdef.zvalue.absdiff = 'yes'; > > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > > [cfg, artifact_jump] = ft_artifact_zvalue(cfg); > > 2011/10/21 jan-mathijs schoffelen > >> Hi Alicia, >> >> In order to be able to address your problem we need some additional >> feedback of course. What kind of data are you using, etc? >> >> BW, >> >> JM >> >> On Oct 21, 2011, at 8:34 AM, Alicia González wrote: >> >> >> >> Hi, >> >> I'm trying to do automatic artifact rejection using the tutorial on the >> site. It seems that everything runs ok but, when I try to see the z-score >> figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears >> (and no errors are found). I'm just using the code from the tutorial without >> changes. >> >> thanks in advance. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> Jan-Mathijs Schoffelen, MD PhD >> Donders Institute for Brain, Cognition and Behaviour, >> Centre for Cognitive Neuroimaging, >> Radboud University Nijmegen, The Netherlands >> J.Schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Oct 24 13:29:02 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 24 Oct 2011 13:29:02 +0200 Subject: [FieldTrip] Problems with automatic artifact rejection In-Reply-To: References: Message-ID: <521F4477-3985-42CD-82D1-044F6AEE4995@donders.ru.nl> Hi Alicia, OK. Good that you found the solution. This indicates to me that you have been using an older version of FieldTrip, where the option indeed was called 'feedback'. In the newer FieldTrip version, this option has been renamed into 'interactive'. We try to provide backward compatibility support, so in general a newer version still works (for a while at least) with old options. The other way around is of course not possible to achieve in general. In this case the documentation was up-to-date, but your code was not. I would expect the problem to go away if you download a recent version of FieldTrip. Best wishes, Jan-Mathijs On Oct 24, 2011, at 1:13 PM, Alicia González wrote: > Hi, > > I solved the problem adding: > cfg.artfctdef.zvalue.feedback = 'yes'; > Now I can see the figures of the z-score of the processed data. > > El 21 de octubre de 2011 11:08, Alicia González escribió: > I'm using the data provided in the tutorial: ArtifactMEG.ds (This dataset was acquired continuously with trials of 10 seconds, and during the recording the experimenter instructed the subject to make artifacts and wrote down the trial number in which the artifacts were made) > And I running the code below: > > cfg = []; > cfg.dataset = 'ArtifactMEG.ds'; > cfg.headerformat = 'ctf_ds'; > ctf.dataformat = 'ctf_ds'; > cfg.trialdef.eventtype = 'trial'; > cfg = ft_definetrial(cfg); > > trl = cfg.trl(1:50,:); % just use the first 50 trials for the time being > > % jump > cfg = []; > cfg.trl = trl; > cfg.padding = 0; > cfg.datafile = 'ArtifactMEG.ds'; > cfg.headerfile = 'ArtifactMEG.ds'; > cfg.continuous = 'yes'; > > % channel selection, cutoff and padding > cfg.artfctdef.zvalue.channel = 'MEG'; > cfg.artfctdef.zvalue.cutoff = 20; > cfg.artfctdef.zvalue.trlpadding = 0.5*cfg.padding; > cfg.artfctdef.zvalue.artpadding = 0.5*cfg.padding; > cfg.artfctdef.zvalue.fltpadding = 0; > > % algorithmic parameters > cfg.artfctdef.zvalue.cumulative = 'yes'; > cfg.artfctdef.zvalue.medianfilter = 'yes'; > cfg.artfctdef.zvalue.medianfiltord = 9; > cfg.artfctdef.zvalue.absdiff = 'yes'; > > % make the process interactive > cfg.artfctdef.zvalue.interactive = 'yes'; > > [cfg, artifact_jump] = ft_artifact_zvalue(cfg); > > 2011/10/21 jan-mathijs schoffelen > Hi Alicia, > > In order to be able to address your problem we need some additional feedback of course. What kind of data are you using, etc? > > BW, > > JM > > On Oct 21, 2011, at 8:34 AM, Alicia González wrote: > >> >> >> Hi, >> >> I'm trying to do automatic artifact rejection using the tutorial on the site. It seems that everything runs ok but, when I try to see the z-score figure setting cfg.artfctdef.zvalue.interactive = 'yes', nothing appears (and no errors are found). I'm just using the code from the tutorial without changes. >> >> thanks in advance. >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Margit.Schoenherr at uk-erlangen.de Mon Oct 24 14:41:53 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Mon, 24 Oct 2011 14:41:53 +0200 Subject: [FieldTrip] questions about forward calculations Message-ID: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE32@XMAIL1.medads.uk-erlangen.de> Hello, I have some questions regarding forward computations. 1) How is the definition of the EEG leadfield - does the dipole point from red to blue or from blue to red? I obtain different results when I compute the leadfield of the same dipole either with a 3-concentric-spheres volume conductor or with BEM (openmeeg). 2) In which units are the leadfields given? For the 3-concentric-spheres volume conductor, the magnitude of the field is 70, for BEM 2e-5. 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the single sphere. For the single sphere model, the field strength is 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the BEM forward field of the same dipole has strength 1e-11. What is the unit here? Thanks! Margit From jm.horschig at donders.ru.nl Mon Oct 24 16:20:39 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Mon, 24 Oct 2011 16:20:39 +0200 Subject: [FieldTrip] problem with clusterplot In-Reply-To: <2B510BFE-967F-47C2-A920-AA78590FF0DA@rug.nl> References: <2B510BFE-967F-47C2-A920-AA78590FF0DA@rug.nl> Message-ID: <4EA57437.9080908@donders.ru.nl> Hey Marieke, I just checked your workspace, and realized that in your cfg there is no field parameter. Maybe something went wrong or you made a typo somewhere. Just setting cfg.parameter='prob' solved the problem for me and ft_clusterplot works nicely (nice cluster, btw). /the call to "ft_clusterplot" took 20 seconds and an estimated NaN MB >> cfg cfg = alpha: 0.1000 elec: [1x1 struct] zlim: [-2 2] parameter: 'prob'/ Best, Jörn On 10/24/2011 11:35 AM, Marieke van Vugt wrote: > Hi everyone, > I am trying to use ft_clusterplot after having done > ft_timelockstatistics. I get the following error: > >>cfg = []; > >>cfg.alpha = 0.1; > >>cfg.parameter = 'prob'; > >>cfg.elec = timelockLow.elec; > > >> ft_clusterplot(cfg,stat); > creating layout from cfg.elec > creating layout for ext1020 system > There are 1 clusters smaller than alpha (0.1) > Positive cluster: 1, pvalue: 0.065 (+), t = 0.712 to 0.836 > *??? Reference to non-existent field 'parameter'.* > > Error in ==> ft_topoplotER at 610 > dat = data.(cfg.parameter); > > Error in ==> ft_clusterplot at 339 > ft_topoplotER(cfgtopo, stat); > 610 dat = data.(cfg.parameter); > K>> dbquit > > In general the stat output looks fine. > You can find the 'stat' and 'cfg' variables that I use in my dropbox: > http://dl.dropbox.com/u/13997261/clusterProblem.mat > > Does anyone know what's going on here? I could not figure out what the > field 'parameter' should be and why it was not existing in the first > place. > Thanks a lot in advance for your help, > Marieke > ---------------------------------------------------------------------------- > Marieke van Vugt, PhD > Assistant Professor, Cognitive Modeling Group > Bernoulliborg, room 326 > Nijenborgh 9 > 9747 AG Groningen > The Netherlands > phone: +31-6-51954984 (cell) > +31-50-363-9487 (office) > http://www.ai.rug.nl/~mkvanvugt > m.k.van.vugt at rug.nl > > > > > > > > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.k.van.vugt at rug.nl Mon Oct 24 16:57:18 2011 From: m.k.van.vugt at rug.nl (Marieke van Vugt) Date: Mon, 24 Oct 2011 16:57:18 +0200 Subject: [FieldTrip] problem with clusterplot In-Reply-To: <4EA57437.9080908@donders.ru.nl> References: <2B510BFE-967F-47C2-A920-AA78590FF0DA@rug.nl> <4EA57437.9080908@donders.ru.nl> Message-ID: Hi Jörn, yes, that totally fixes it! I just did not find that in the tutorial I used: http://fieldtrip.fcdonders.nl/tutorial/eventrelatedstatistics Thanks a lot for the help, Marieke On Oct 24, 2011, at 4:20 , Jörn M. Horschig wrote: > Hey Marieke, > > I just checked your workspace, and realized that in your cfg there is no field parameter. Maybe something went wrong or you made a typo somewhere. Just setting cfg.parameter='prob' solved the problem for me and ft_clusterplot works nicely (nice cluster, btw). > > the call to "ft_clusterplot" took 20 seconds and an estimated NaN MB > >> cfg > > cfg = > > alpha: 0.1000 > elec: [1x1 struct] > zlim: [-2 2] > parameter: 'prob' > > > Best, > Jörn > > > > > On 10/24/2011 11:35 AM, Marieke van Vugt wrote: >> >> Hi everyone, >> I am trying to use ft_clusterplot after having done ft_timelockstatistics. I get the following error: >> >>cfg = []; >> >>cfg.alpha = 0.1; >> >>cfg.parameter = 'prob'; >> >>cfg.elec = timelockLow.elec; >> >> >> ft_clusterplot(cfg,stat); >> creating layout from cfg.elec >> creating layout for ext1020 system >> There are 1 clusters smaller than alpha (0.1) >> Positive cluster: 1, pvalue: 0.065 (+), t = 0.712 to 0.836 >> ??? Reference to non-existent field 'parameter'. >> >> Error in ==> ft_topoplotER at 610 >> dat = data.(cfg.parameter); >> >> Error in ==> ft_clusterplot at 339 >> ft_topoplotER(cfgtopo, stat); >> >> 610 dat = data.(cfg.parameter); >> K>> dbquit >> >> In general the stat output looks fine. >> You can find the 'stat' and 'cfg' variables that I use in my dropbox: http://dl.dropbox.com/u/13997261/clusterProblem.mat >> >> Does anyone know what's going on here? I could not figure out what the field 'parameter' should be and why it was not existing in the first place. >> Thanks a lot in advance for your help, >> Marieke >> ---------------------------------------------------------------------------- >> Marieke van Vugt, PhD >> Assistant Professor, Cognitive Modeling Group >> Bernoulliborg, room 326 >> Nijenborgh 9 >> 9747 AG Groningen >> The Netherlands >> phone: +31-6-51954984 (cell) >> +31-50-363-9487 (office) >> http://www.ai.rug.nl/~mkvanvugt >> m.k.van.vugt at rug.nl >> >> >> >> >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ---------------------------------------------------------------------------- Marieke van Vugt, PhD Assistant Professor, Cognitive Modeling Group Bernoulliborg, room 326 Nijenborgh 9 9747 AG Groningen The Netherlands phone: +31-6-51954984 (cell) +31-50-363-9487 (office) http://www.ai.rug.nl/~mkvanvugt m.k.van.vugt at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Tue Oct 25 15:16:35 2011 From: t.marshall at fcdonders.ru.nl (Marshall, T.R. (Tom)) Date: Tue, 25 Oct 2011 15:16:35 +0200 (CEST) Subject: [FieldTrip] beamforming tutorial problem In-Reply-To: <62238448.683628.1319548183818.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <1507509658.683740.1319548595236.JavaMail.root@monoceros.zimbra.ru.nl> Hi 'trippers, I've been making my way through the tutorial on the fieldtrip website in an effort to teach myself about source localisation using beamforming. I tried - unsuccessfully - to adapt the code to my own MEG data, and have now resorted to copypasting my way through the tutorial and seeing what each function does to the sample data, in an attempt to build my own analysis pipeline. I get as far as creating the head model from the segmented brain surface and then I get the following error. (Note that I've just been copypasting the tutorial commands without altering them, so I've not specified anything else in my workspace. It should be clear what's there.) %%% (I input) cfg = []; vol = ft_prepare_singleshell(cfg, segmentedmri); (fieldtrip's response) not downsampling csf not downsampling gray not downsampling white the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB using the segmentation approach using the segmented MRI including gray matter in segmentation for brain compartment including white matter in segmentation for brain compartment including CSF in segmentation for brain compartment smoothing the segmentation with a 5-pixel FWHM kernel triangulating the boundary of compartment 1 (nasty red matlab response) ??? Attempted to access cfg.numvertices(1); index out of bounds because numel(cfg.numvertices)=0. Error in ==> prepare_mesh_segmentation at 75 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); %%% Now, matlab is right about one thing: numel(cfg.numvertices) is indeed zero, as the tutorial doesn't specify *anything* in the cfg structure to pass to ft_prepare_singleshell. However, the documentation for ft_prepare_singleshell states that when no value is given for numvertices, a default value of 3000 is used. So, what's going on here? Update: I also tried specifying cfg.numvertices=3000 and passing that to ft_prepare_singleshell, since that's supposed to be the default value. This was the result: %%% ??? Error using ==> cgprechecks at 35 Data points containing Inf or NaN are not supported. Error in ==> convhulln at 42 cgprechecks(x, nargin, cg_opt); Error in ==> ksphere at 49 tri = convhulln(pnt); Error in ==> triangulate_seg at 44 [pnt, tri] = ksphere(npnt); Error in ==> prepare_mesh_segmentation at 75 [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); Error in ==> ft_prepare_mesh at 124 bnd = prepare_mesh_segmentation(cfg, mri); Error in ==> ft_prepare_singleshell at 89 vol.bnd = ft_prepare_mesh(cfg, mri); %%% I don't know where to begin with this. Can somebody advise? Best, Tom -- Tom Marshall, MSc. Neuronal Oscillations Group, Donders Centre for Cognitive Neuroimaging tel: +31(0)243668487 email: t.marshall at fcdonders.ru.nl postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands From alexandre.gramfort at inria.fr Tue Oct 25 15:41:10 2011 From: alexandre.gramfort at inria.fr (Alexandre Gramfort) Date: Tue, 25 Oct 2011 09:41:10 -0400 Subject: [FieldTrip] questions about forward calculations In-Reply-To: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE32@XMAIL1.medads.uk-erlangen.de> References: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE32@XMAIL1.medads.uk-erlangen.de> Message-ID: Hello Margit, > I have some questions regarding forward computations. > > 1) How is the definition of the EEG leadfield - does the dipole point from red to blue or from blue to red? I obtain different results when I compute the leadfield of the same dipole either with a 3-concentric-spheres volume conductor or with BEM (openmeeg). do you say that you get different polarity for sphere and OpenMEEG? if it's the case my only guess it that the triangles of the boundary meshes are not properly oriented. Maybe Cristiano who looked at this recently can comment. does the toy example behave properly? In external/openmeeg/openmeeg_eeg_leadfield_example.m > 2) In which units are the leadfields given? For the 3-concentric-spheres volume conductor, the magnitude of the field is 70, for BEM 2e-5. If the input meshes passed to OpenMEEG are in meters and dipole currents in Am then the leadfield should give EEG potentials in V. > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the single sphere. For the single sphere model, the field strength is 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the BEM forward field of the same dipole has strength 1e-11. What is the unit here? Make sure your BEM surfaces are expressed in meters and not millimeters like it is often the case in MRI coordinates, and tell me if you still see some inconsistent results. Best, Alex -- Alexandre Gramfort, PhD gramfort at nmr.mgh.harvard.edu Dept. of Radiology MGH Martinos Center / Harvard Medical School http://www-sop.inria.fr/members/Alexandre.Gramfort/ From sangita.dandekar at gmail.com Tue Oct 25 19:55:39 2011 From: sangita.dandekar at gmail.com (Sangita Dandekar) Date: Tue, 25 Oct 2011 13:55:39 -0400 Subject: [FieldTrip] [FIELDTRIP] Independent channels stats question In-Reply-To: References: <5D04F2D6-F2EE-43CB-9A86-678035373E7B@donders.ru.nl> Message-ID: Hi Fieldtrippers, I have questions similar to the ones asked a while back in the discussion archive. (See discussion pasted below my email if you're interested) We have ~200 intracranial EEG electrodes, which we assume are independent, and the question is how to apply cluster statistics to time frequency data while accounting for the multiple comparisons problem. In the archived discussion below, it was suggested that cluster statistics be applied to each channel separately, and then, to account for MCP, apply Bonferroni correction on the resulting p-values. However, as was pointed out in the discussion below, with ~200 electrodes Bonferroni correction is overly conservative. Another possibility suggested in the archived discussion was FDR correction on the results of cluster statistics, but it isn't clear to me how this would be done. If anyone can explain how FDR can be applied to the results of cluster statistics, please let me know. I think a third possible solution to the problem is to get a 'global' null distribution as follows: Repeatedly: 1. Randomly partition data 2. Find time frequency clusters and the associated sum of t-statistics for each TFR cluster (do this WITHOUT clustering over electrodes/space, thereby treating each channel independently) 3. Record maximum t-statistic sum in a 'global' null distribution on each iteration. (Search over all electrodes for this maximum) Then one could compare the clusters as observed in the actual data (as determined independently at each electrode) to the global null distribution to get the false alarm rate associated with any cluster. I think the above should account for the MCP. Is there anyway to implement the above procedure in Fieldtrip without modifying the underlying functions? I know how to do a for loop around freqstatistics to treat each channel separately and then get the null distribution of tstat maxima and cluster statistics for each channel separately, but I am not sure if it is possible to treat each channel independently as I have outlined above and also get a global null distribution over all channels (without making some changes to the underlying FT functions, that is). Thanks in advance for any help! Sangi On Tue, Jul 6, 2010 at 12:47 PM, Matthew Davidson wrote: > Jan-Mathis, thanks for the response. > > Unfortunately, we tend to have a lot of channels (~120-200), and once > we start using microelectrodes in the patients, it'll only get worse. > > If we were to divide our alpha by 120-200, wouldn't we have to run > 120-200 times as many permutations in order to get p-values low enough > to survive Bonferroni correction? That's a large jump; we might have > to run 100,000 permutations! > > What do you think about something like FDR correction instead? > > Matthew > > On Tue, Jul 6, 2010 at 7:21 AM, jan-mathijs schoffelen > wrote: > > Dear Matthew, > > > > Your sensitivity problem is a known issue when using cluster-based test > > statistics, in which it is difficult to get small clusters significant in > > the presence of large clusters. This could also occur within a single > > channel (for example with a time-frequency decomposition, in which the > > summed spectro-temporal extent of an alpha-band effect could be much > bigger > > than a gamma-band effect). > > In your case I think it would be statistically valid to do the > cluster-based > > permutation test on each channel separately (which will involve a for > loop > > around ft_freqstatistics, because it is not implemented in the fieldtrip > > code) and doing a post-hoc Bonferroni correction on the resulting > p-values. > > If the number of channels is not too big, this might work. > > > > Good luck, > > > > Jan-Mathijs > > > > > > On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: > > > >> Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG > >> Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using > >> Fieldtrip more directly. > >> > >> My question pertains to cluster-based correction when channels are > >> independent. My data is primarily intracranial EEG, and due to the > >> 1/f^2 power drop-off, electrodes directly on the brain reflect local > >> activity much more strongly than sensors further away. As a result, we > >> treat them as independent. Now, I can force the Fieldtrip clustering > >> algorithm to not cluster across channels by setting: > >> > >> cfg.neighbours = []; > >> cfg.minnbchan = 0; > >> > >> but it still computes the maximum cluster size for a particular > >> permutation based on *all* the data. This seems... less sensitive > >> somehow, as if large clusters in one channel negatively impact the > >> significance of clusters in another channel. > >> > >> Is there a better way to do this and still solve the MCP? E.g., > >> compute the maxsum on each channel separately, and then use something > >> like FDR or Bonferroni correction on the maxsums across channels? > >> > >> Thanks for any advice you may have, and thanks for producing fieldtrip! > >> Matthew > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users of > the > >> FieldTrip toolbox, to share experiences and to discuss new ideas for > MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > >> > > > > Dr. J.M. (Jan-Mathijs) Schoffelen > > Donders Institute for Brain, Cognition and Behaviour, > > Centre for Cognitive Neuroimaging, > > Radboud University Nijmegen, The Netherlands > > J.Schoffelen at donders.ru.nl > > Telephone: 0031-24-3668063 > > > > ---------------------------------- > > The aim of this list is to facilitate the discussion between users of the > > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > > and EEG analysis. See also > > http://listserv.surfnet.nl/archives/fieldtrip.html and > > http://www.ru.nl/neuroimaging/fieldtrip. > > > > ---------------------------------- > The aim of this list is to facilitate the discussion between users of the > FieldTrip toolbox, to share experiences and to discuss new ideas for MEG > and EEG analysis. See also > http://listserv.surfnet.nl/archives/fieldtrip.html and > http://www.ru.nl/neuroimaging/fieldtrip. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Tue Oct 25 20:43:22 2011 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Tue, 25 Oct 2011 19:43:22 +0100 Subject: [FieldTrip] [FIELDTRIP] Independent channels stats question In-Reply-To: References: <5D04F2D6-F2EE-43CB-9A86-678035373E7B@donders.ru.nl> Message-ID: Dear Sangi, Eric might correct me if I'm wrong but when you do cluster-based stats and your cfg.neighbors structure is empty what happens is exactly what you described. You are still effectively correcting for 200 channels just not for all the pixels so it should be quite close to Bonferoni across channels. Best, Vladimir On Tue, Oct 25, 2011 at 6:55 PM, Sangita Dandekar wrote: > Hi Fieldtrippers, > > I have questions similar to the ones asked a while back in the discussion > archive. (See discussion pasted below my email if you're interested) > > We have ~200  intracranial EEG electrodes, which we assume are independent, > and the question is how to apply > cluster statistics to time frequency data while accounting for the multiple > comparisons problem. > > In the archived discussion below, it was suggested that cluster statistics > be applied to each  channel separately, and then, to account for MCP, apply > Bonferroni correction on the resulting p-values.  However, as was pointed > out in the discussion below, with ~200 electrodes Bonferroni > correction is overly conservative.  Another possibility suggested in the > archived discussion was  FDR correction on the results of cluster > statistics, but it isn't clear to me > how this would be done.  If anyone can explain how FDR can be applied to the > results of cluster statistics, please let me know. > > I think a third possible solution to the problem is to get a 'global' null > distribution as follows: > > Repeatedly: > 1.  Randomly partition data > 2.  Find time frequency clusters and the associated sum of t-statistics for > each TFR cluster (do this WITHOUT clustering over electrodes/space, thereby > treating each channel independently) > 3.  Record maximum t-statistic sum in a 'global' null distribution on each > iteration.   (Search over all electrodes for this maximum) > > Then one could compare the clusters as observed in the actual data (as > determined independently at each electrode) to the global null distribution > to get the false alarm rate > associated with any cluster.  I think the above should account for the MCP. > > Is there anyway to implement the above procedure in Fieldtrip without > modifying the underlying functions?  I know how to do a for loop around > freqstatistics to treat each channel separately and then get the null > distribution of tstat maxima and cluster statistics for each channel > separately, but I am not sure > if it is possible to treat each channel independently as I have outlined > above and also get a global null distribution over all channels  (without > making some > changes to the underlying FT functions, that is). > > Thanks in advance for any help! > Sangi > > > > > > > > > > > > > > On Tue, Jul 6, 2010 at 12:47 PM, Matthew Davidson wrote: >> >> Jan-Mathis, thanks for the response. >> >> Unfortunately, we tend to have a lot of channels (~120-200), and once >> we start using microelectrodes in the patients, it'll only get worse. >> >> If we were to divide our alpha by 120-200, wouldn't we have to run >> 120-200 times as many permutations in order to get p-values low enough >> to survive Bonferroni correction? That's a large jump; we might have >> to run 100,000 permutations! >> >> What do you think about something like FDR correction instead? >> >> Matthew >> >> On Tue, Jul 6, 2010 at 7:21 AM, jan-mathijs schoffelen >> wrote: >> > Dear Matthew, >> > >> > Your sensitivity problem is a known issue when using cluster-based test >> > statistics, in which it is difficult to get small clusters significant >> > in >> > the presence of large clusters. This could also occur within a single >> > channel (for example with a time-frequency decomposition, in which the >> > summed spectro-temporal extent of an alpha-band effect could be much >> > bigger >> > than a gamma-band effect). >> > In your case I think it would be statistically valid to do the >> > cluster-based >> > permutation test on each channel separately (which will involve a for >> > loop >> > around ft_freqstatistics, because it is not implemented in the fieldtrip >> > code) and doing a post-hoc Bonferroni correction on the resulting >> > p-values. >> > If the number of channels is not too big, this might work. >> > >> > Good luck, >> > >> > Jan-Mathijs >> > >> > >> > On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: >> > >> >> Hi, this is Matthew Davidson. I recently took the Fieldtrip EEG/MEG >> >> Toolkit (Hi Robert and Jan-Mathis!), and have been diving into using >> >> Fieldtrip more directly. >> >> >> >> My question pertains to cluster-based correction when channels are >> >> independent. My data is primarily intracranial EEG, and due to the >> >> 1/f^2 power drop-off, electrodes directly on the brain reflect local >> >> activity much more strongly than sensors further away. As a result, we >> >> treat them as independent. Now, I can force the Fieldtrip clustering >> >> algorithm to not cluster across channels by setting: >> >> >> >> cfg.neighbours = []; >> >> cfg.minnbchan = 0; >> >> >> >> but it still computes the maximum cluster size for a particular >> >> permutation based on *all* the data. This seems... less sensitive >> >> somehow, as if large clusters in one channel negatively impact the >> >> significance of clusters in another channel. >> >> >> >> Is there a better way to do this and still solve the MCP? E.g., >> >> compute the maxsum on each channel separately, and then use something >> >> like FDR or Bonferroni correction on the maxsums across channels? >> >> >> >> Thanks for any advice you may have, and thanks for producing fieldtrip! >> >> Matthew >> >> >> >> ---------------------------------- >> >> The aim of this list is to facilitate the discussion between users of >> >> the >> >> FieldTrip  toolbox, to share experiences and to discuss new ideas for >> >> MEG >> >> and EEG analysis. See also >> >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> >> http://www.ru.nl/neuroimaging/fieldtrip. >> >> >> > >> > Dr. J.M. (Jan-Mathijs) Schoffelen >> > Donders Institute for Brain, Cognition and Behaviour, >> > Centre for Cognitive Neuroimaging, >> > Radboud University Nijmegen, The Netherlands >> > J.Schoffelen at donders.ru.nl >> > Telephone: 0031-24-3668063 >> > >> > ---------------------------------- >> > The aim of this list is to facilitate the discussion between users of >> > the >> > FieldTrip  toolbox, to share experiences and to discuss new ideas for >> > MEG >> > and EEG analysis. See also >> > http://listserv.surfnet.nl/archives/fieldtrip.html and >> > http://www.ru.nl/neuroimaging/fieldtrip. >> > >> >> ---------------------------------- >> The aim of this list is to facilitate the discussion between users of the >> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG >> and EEG analysis. See also >> http://listserv.surfnet.nl/archives/fieldtrip.html and >> http://www.ru.nl/neuroimaging/fieldtrip. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From Lilla.Magyari at mpi.nl Wed Oct 26 11:21:16 2011 From: Lilla.Magyari at mpi.nl (Magyari, Lilla) Date: Wed, 26 Oct 2011 11:21:16 +0200 Subject: [FieldTrip] beamforming tutorial problem In-Reply-To: <1507509658.683740.1319548595236.JavaMail.root@monoceros.zimbra.ru.nl> References: <1507509658.683740.1319548595236.JavaMail.root@monoceros.zimbra.ru.nl> Message-ID: <4EA7D10C.7050605@mpi.nl> hi Tom, I've just got the same error on my own data, I filed it as a bug. But I could do the same with cfg=[]; cfg.method = 'singleshell'; vol = ft_prepare_headmodel(cfg,seg); Best, Lilla Marshall, T.R. (Tom) wrote: > Hi 'trippers, > > I've been making my way through the tutorial on the fieldtrip website in an effort to teach myself about source localisation using beamforming. I tried - unsuccessfully - to adapt the code to my own MEG data, and have now resorted to copypasting my way through the tutorial and seeing what each function does to the sample data, in an attempt to build my own analysis pipeline. > > I get as far as creating the head model from the segmented brain surface and then I get the following error. > > (Note that I've just been copypasting the tutorial commands without altering them, so I've not specified anything else in my workspace. It should be clear what's there.) > > %%% > > (I input) > > cfg = []; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > > (fieldtrip's response) > > not downsampling csf > not downsampling gray > not downsampling white > the call to "ft_volumedownsample" took 0 seconds and an estimated 0 MB > using the segmentation approach > using the segmented MRI > including gray matter in segmentation for brain compartment > including white matter in segmentation for brain compartment > including CSF in segmentation for brain compartment > smoothing the segmentation with a 5-pixel FWHM kernel > triangulating the boundary of compartment 1 > > > (nasty red matlab response) > > ??? Attempted to access cfg.numvertices(1); index out of bounds because > numel(cfg.numvertices)=0. > > Error in ==> prepare_mesh_segmentation at 75 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > %%% > > Now, matlab is right about one thing: numel(cfg.numvertices) is indeed zero, as the tutorial doesn't specify *anything* in the cfg structure to pass to ft_prepare_singleshell. However, the documentation for ft_prepare_singleshell states that when no value is given for numvertices, a default value of 3000 is used. So, what's going on here? > > Update: I also tried specifying cfg.numvertices=3000 and passing that to ft_prepare_singleshell, since that's supposed to be the default value. This was the result: > > %%% > > ??? Error using ==> cgprechecks at 35 > Data points containing Inf or NaN are not supported. > > Error in ==> convhulln at 42 > cgprechecks(x, nargin, cg_opt); > > Error in ==> ksphere at 49 > tri = convhulln(pnt); > > Error in ==> triangulate_seg at 44 > [pnt, tri] = ksphere(npnt); > > Error in ==> prepare_mesh_segmentation at 75 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > %%% > > I don't know where to begin with this. Can somebody advise? > > Best, > Tom > -- PhD student Language and Cognition Group research assistant Neurobiology of Language Group Max Planck Institute for Psycholinguistics Nijmegen, P.O. Box 310, 6500AH, the Netherlands Phone: 0031 24 3521561 From c.micheli at fcdonders.ru.nl Wed Oct 26 11:24:46 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Wed, 26 Oct 2011 11:24:46 +0200 (CEST) Subject: [FieldTrip] questions about forward calculations In-Reply-To: <2084749132.107220.1319620059098.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <424401516.107777.1319621086957.JavaMail.root@draco.zimbra.ru.nl> Hi Margit I could replicate the behavior that you described in point 1) the last email and at the moment we are checking that all required options within FieldFrip and OpenMEEG are set correctly. For your points 2) and 3) I could not replicate the problem. Everything should work fine if the units of the sensors and the volume conductor are consistent. However, we are working to make units management more handy for the users, so that ambiguities like this can be solved. Please, keep posted on the mailing list to track the changes in the near future. Could you maybe paste your source code here in the mailing list? Cheers, Cristiano ----- "Alexandre Gramfort" schreef: > Van: "Alexandre Gramfort" > Aan: "Email discussion list for the FieldTrip project" , "c micheli" > , "Margit Schoenherr" > Verzonden: Dinsdag 25 oktober 2011 15:41:10 > Onderwerp: Re: [FieldTrip] questions about forward calculations > > Hello Margit, > > > I have some questions regarding forward computations. > > > > 1) How is the definition of the EEG leadfield - does the dipole > point from red to blue or from blue to red? I obtain different results > when I compute the leadfield of the same dipole either with a > 3-concentric-spheres volume conductor or with BEM (openmeeg). > > do you say that you get different polarity for sphere and OpenMEEG? > if > it's the case my only > guess it that the triangles of the boundary meshes are not properly > oriented. Maybe Cristiano > who looked at this recently can comment. > > does the toy example behave properly? In > external/openmeeg/openmeeg_eeg_leadfield_example.m > > > 2) In which units are the leadfields given? For the > 3-concentric-spheres volume conductor, the magnitude of the field is > 70, for BEM 2e-5. > > If the input meshes passed to OpenMEEG are in meters and dipole > currents in Am then the leadfield should give EEG potentials in V. > > > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the > single sphere. For the single sphere model, the field strength is > 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the > BEM forward field of the same dipole has strength 1e-11. What is the > unit here? > > Make sure your BEM surfaces are expressed in meters and not > millimeters like it is often the > case in MRI coordinates, and tell me if you still see some > inconsistent results. > > Best, > Alex > -- > Alexandre Gramfort, PhD > gramfort at nmr.mgh.harvard.edu > Dept. of Radiology MGH Martinos Center / Harvard Medical School > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From B.Mouthaan at neuro.umcn.nl Wed Oct 26 12:08:55 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 26 Oct 2011 12:08:55 +0200 Subject: [FieldTrip] Creating Leadfield using BEM Message-ID: Dear Fieldtrippers, I am trying to compute a beamform localisation using a BEM-model of the head. When I call ft_sourceanalysis i receive to following error. ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> beamformer_lcmv>pinv at 367 [U,S,V] = svd(A,0); Error in ==> beamformer_lcmv at 255 filt = pinv(lf' * invCy * lf) * lf' * invCy; % van Veen eqn. 23, use PINV/SVD to cover rank deficient leadfield Error in ==> ft_sourceanalysis at 818 dip(i) = beamformer_lcmv(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); I noticed that my leadfieldgrid containend NaN values. I think this could be the cause, but I don't know how to fix this problem. Does anyone have an idea? My script is as follows vol=ft_read_vol('standard_vol.mat') elec=ft_read_sens('standard_1005.elc') % reading the 1005 systeem because the experiment used of 32 electrodes cfg=[] cfg.showlabels= 'yes' cfg.layout='EEG1010.lay' cfg.interactive= 'yes' % Reref load (['C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave0' Subject]) cfg=[] cfg.reref='yes' % referring the cfg.refchannel= 'all' % commonaverage reference diff=ft_preprocessing(cfg,diffwav) %% Creating LEADFIELD cfg = []; cfg.elec = elec; cfg.vol = vol; cfg.reducerank = 3; cfg.channel = 'all'; cfg.grid.resolution = 10; % use a 3-D grid with a 10 mm resolution [grid] = ft_prepare_leadfield(cfg); save('AnalysisM\Grid_10mm', 'grid') %% cfg = []; cfg.covariance = 'yes'; cfg.covariancewindow = [0 .75]; cfg.removemean = 'no'; tlckavgpst = ft_timelockanalysis(cfg, diff); cfg.covariancewindow = [-0.25 0]; tlckavgpre = ft_timelockanalysis(cfg, diff); %% cfg = []; cfg.method = 'lcmv'; cfg.vol = vol; cfg.elec = elec cfg.lambda = '5%'; sourcepst = ft_sourceanalysis(cfg, tlckavgpst); sourcepre = ft_sourceanalysis(cfg, tlckavgpre); sourcepst.avg.nai = sourcepst.avg.pow./sourcepre.avg.pow; Thanks in advance! Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Wed Oct 26 12:54:41 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Wed, 26 Oct 2011 12:54:41 +0200 (CEST) Subject: [FieldTrip] beamforming tutorial problem In-Reply-To: <1379565708.109728.1319626401710.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <865168068.109744.1319626481917.JavaMail.root@draco.zimbra.ru.nl> Dear Tom It seems there was an error in the call to one of the low level functions. Thanks for reporting. The bug has been fixed and now your instructions (with some modifications - see below) should run. The forward module is undergoing heavy restructuring in these days and some of the functionality could be affected. To summarize how to derive a volumetric description of your head surface, let's say that if you start from a volumetric image (anatomy of the subjects) you have to perform a series of steps on the images (realign/segment) before creating the headmodel. For this please refer to the following tutorial: http://fieldtrip.fcdonders.nl/tutorial/headmodel Once you have your segmented mri correctly in place you can call cfg = []; cfg.method = 'singleshell'; cfg.tissue = { 'skull' }; % or whatever you want to create a boundary for vol = ft_prepare_headmodel(cfg, segmentedmri); I hope it helps, Cristiano ----- "T.R. Marshall (Tom)" schreef: > Van: "T.R. Marshall (Tom)" > Aan: "fieldtrip" > Verzonden: Dinsdag 25 oktober 2011 15:16:35 > Onderwerp: [FieldTrip] beamforming tutorial problem > > Hi 'trippers, > > I've been making my way through the tutorial on the fieldtrip website > in an effort to teach myself about source localisation using > beamforming. I tried - unsuccessfully - to adapt the code to my own > MEG data, and have now resorted to copypasting my way through the > tutorial and seeing what each function does to the sample data, in an > attempt to build my own analysis pipeline. > > I get as far as creating the head model from the segmented brain > surface and then I get the following error. > > (Note that I've just been copypasting the tutorial commands without > altering them, so I've not specified anything else in my workspace. It > should be clear what's there.) > > %%% > > (I input) > > cfg = []; > vol = ft_prepare_singleshell(cfg, segmentedmri); > > > (fieldtrip's response) > > not downsampling csf > not downsampling gray > not downsampling white > the call to "ft_volumedownsample" took 0 seconds and an estimated 0 > MB > using the segmentation approach > using the segmented MRI > including gray matter in segmentation for brain compartment > including white matter in segmentation for brain compartment > including CSF in segmentation for brain compartment > smoothing the segmentation with a 5-pixel FWHM kernel > triangulating the boundary of compartment 1 > > > (nasty red matlab response) > > ??? Attempted to access cfg.numvertices(1); index out of bounds > because > numel(cfg.numvertices)=0. > > Error in ==> prepare_mesh_segmentation at 75 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > %%% > > Now, matlab is right about one thing: numel(cfg.numvertices) is indeed > zero, as the tutorial doesn't specify *anything* in the cfg structure > to pass to ft_prepare_singleshell. However, the documentation for > ft_prepare_singleshell states that when no value is given for > numvertices, a default value of 3000 is used. So, what's going on > here? > > Update: I also tried specifying cfg.numvertices=3000 and passing that > to ft_prepare_singleshell, since that's supposed to be the default > value. This was the result: > > %%% > > ??? Error using ==> cgprechecks at 35 > Data points containing Inf or NaN are not supported. > > Error in ==> convhulln at 42 > cgprechecks(x, nargin, cg_opt); > > Error in ==> ksphere at 49 > tri = convhulln(pnt); > > Error in ==> triangulate_seg at 44 > [pnt, tri] = ksphere(npnt); > > Error in ==> prepare_mesh_segmentation at 75 > [pnt, tri] = triangulate_seg(seg, cfg.numvertices(i), ori); > > Error in ==> ft_prepare_mesh at 124 > bnd = prepare_mesh_segmentation(cfg, mri); > > Error in ==> ft_prepare_singleshell at 89 > vol.bnd = ft_prepare_mesh(cfg, mri); > > %%% > > I don't know where to begin with this. Can somebody advise? > > Best, > Tom > > -- > Tom Marshall, MSc. > Neuronal Oscillations Group, Donders Centre for Cognitive > Neuroimaging > tel: +31(0)243668487 > email: t.marshall at fcdonders.ru.nl > postal: PO Box 9101, 6500HB, Nijmegen, The Netherlands > visiting: Kapittelweg 29, 6525EN, Nijmegen, The Netherlands > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jm.horschig at donders.ru.nl Wed Oct 26 13:04:53 2011 From: jm.horschig at donders.ru.nl (=?ISO-8859-1?Q?=22J=F6rn_M=2E_Horschig=22?=) Date: Wed, 26 Oct 2011 13:04:53 +0200 Subject: [FieldTrip] Creating Leadfield using BEM In-Reply-To: References: Message-ID: <4EA7E955.7040608@donders.ru.nl> Dear Brian, I got the same error a while ago, which was caused by a wrong segementation/triangulation of the volume (it was a bug in FieldTrip). Are you using the newest version of FieldTrip? It should be solved there. In any case, it would be wise to check your segmentation and triangulation. You can do so with ft_plot_vol and ft_plot_mesh, e.g.: / figure;hold on; ft_plot_vol(hdm, 'edgecolor', 'none');alpha 0.5;camlight ft_plot_mesh(hdm.bnd); / Hope it helps! Best, Jörn On 10/26/2011 12:08 PM, B.Mouthaan at neuro.umcn.nl wrote: > > Dear Fieldtrippers, > > I am trying to compute a beamform localisation using a BEM-model of > the head. When I call ft_sourceanalysis i receive to following error. > > ??? Error using ==> svd > Input to SVD must not contain NaN or Inf. > > Error in ==> beamformer_lcmv>pinv at 367 > [U,S,V] = svd(A,0); > > Error in ==> beamformer_lcmv at 255 > filt = pinv(lf' * invCy * lf) * lf' * invCy; % van > Veen eqn. 23, use PINV/SVD to cover rank deficient leadfield > > Error in ==> ft_sourceanalysis at 818 > dip(i) = beamformer_lcmv(grid, sens, vol, squeeze(avg(i,:,:)), > squeeze(Cy(i,:,:)), optarg{:}); > > > I noticed that my leadfieldgrid containend NaN values. I think this > could be the cause, but I don't know how to fix this problem. Does > anyone have an idea? > > My script is as follows > > vol=ft_read_vol('standard_vol.mat') > elec=ft_read_sens('standard_1005.elc') % reading the 1005 systeem > because the experiment used of 32 electrodes > > cfg=[] > cfg.showlabels= 'yes' > cfg.layout='EEG1010.lay' > cfg.interactive= 'yes' > > > % Reref > load (['C:\Users\Brian\Documents\MATLAB\AnalysisM\differencewave0' > Subject]) > > cfg=[] > cfg.reref='yes' % referring the > cfg.refchannel= 'all' % commonaverage reference > diff=ft_preprocessing(cfg,diffwav) > > %% Creating LEADFIELD > cfg = []; > cfg.elec = elec; > cfg.vol = vol; > cfg.reducerank = 3; > cfg.channel = 'all'; > cfg.grid.resolution = 10; % use a 3-D grid with a 10 mm resolution > [grid] = ft_prepare_leadfield(cfg); > > save('AnalysisM\Grid_10mm', 'grid') > > %% > cfg = []; > cfg.covariance = 'yes'; > cfg.covariancewindow = [0 .75]; > cfg.removemean = 'no'; > tlckavgpst = ft_timelockanalysis(cfg, diff); > cfg.covariancewindow = [-0.25 0]; > tlckavgpre = ft_timelockanalysis(cfg, diff); > > > %% > cfg = []; > cfg.method = 'lcmv'; > cfg.vol = vol; > cfg.elec = elec > cfg.lambda = '5%'; > sourcepst = ft_sourceanalysis(cfg, tlckavgpst); > sourcepre = ft_sourceanalysis(cfg, tlckavgpre); > > sourcepst.avg.nai = sourcepst.avg.pow./sourcepre.avg.pow; > > > Thanks in advance! > > Brian > > > > Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in > het handelsregister onder nummer 41055629. > The Radboud University Nijmegen Medical Centre is listed in the > Commercial Register of the Chamber of Commerce under file number 41055629. > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Jörn M. Horschig PhD Student Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Neuronal Oscillations Group P.O. Box 9101 NL-6500 HB Nijmegen The Netherlands Contact: E-Mail: jm.horschig at donders.ru.nl Tel: +31-(0)24-36-68493 Web: http://www.ru.nl/donders Visiting address: Trigon, room 2.30 Kapittelweg 29 NL-6525 EN Nijmegen The Netherlands -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Wed Oct 26 14:49:07 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 26 Oct 2011 14:49:07 +0200 Subject: [FieldTrip] Creating Leadfield using BEM Message-ID: Dear Jorn, I have update my Fieldtrip but I still receive the same error. And my leadfield still contains NaN values. However i get the additional error: ans = covariance matrix is rank deficient ??? Error using ==> mtimes Inner matrix dimensions must agree. + the old error I previously reported. So maybe some other problem? Thanks! Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From B.Mouthaan at neuro.umcn.nl Wed Oct 26 15:06:28 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Wed, 26 Oct 2011 15:06:28 +0200 Subject: [FieldTrip] Creating Leadfield using BEM Message-ID: Dear all, I also received the following information on my command screen the input is timelock data with 31 channels and 500 timebins using headmodel specified in the configuration using electrodes specified in the configuration Warning: Duplicate data points have been detected and removed. Some point indices will not be referenced by the triangulation. > In ft_prepare_vol_sens at 309 In fieldtrip-20111025\private\prepare_headmodel at 114 In ft_sourceanalysis at 332 determining source compartment (3) projecting electrodes on skin surface combining electrode transfer and system matrix creating dipole grid based on inward-shifted brain surface from volume conductor model 642 dipoles inside, 0 dipoles outside brain scanning repetition 1 Warning: covariance matrix is rank deficient > In beamformer_lcmv at 132 In ft_sourceanalysis at 818 scanning grid Warning: The input units are mm for points and S/mm for conductivity > In forward\private\warning_once at 75 In ft_compute_leadfield at 510 In beamformer_lcmv at 214 In ft_sourceanalysis at 818 Maybe this brings us more to the solution. Regards, Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From fredericroux at hotmail.de Wed Oct 26 15:31:32 2011 From: fredericroux at hotmail.de (Frederic Roux) Date: Wed, 26 Oct 2011 15:31:32 +0200 Subject: [FieldTrip] zero-padding at beginning of file does not work Message-ID: Dear all, I want to pad out my signal before applying some filters while reading the data from the original ds-file. at line 578 of the preprocessing.m function it says: begsample = cfg.trl(i,1) - begpadding; Now because my signal starts at sample 1, begsample will have a negative value of course which results in the warning message warning('cannot apply enough paddig at begin of file'); Does that mean, that fieldtrip cannot pad out the signal at the beginning without throwing away the equivalent of the signal in itself? if cfg.trl(i,1) = 2400 and if begpadding = 1200 this should work, because begsample = 1200, right? But that would also mean that for padding I would loose 1200 samples. Now let's assume I would like to pad the signal to -25 sec and + 25 sec at the beginning and end. Why does the padding at the beginning require I throw away 25 sec, while the padding at the end doesn't? Any clarification on this issue would be greatly appreciated. Have a nice day. Fred -- Frédéric Roux, PhD student Department of Neurophysiology Max Planck Institute for Brain Research D-60529 Frankfurt am Main Frederic.Roux at brain.mpg.de +49(0)69630183225 -------------- next part -------------- An HTML attachment was scrubbed... URL: From chan at med.uni-frankfurt.de Wed Oct 26 16:38:59 2011 From: chan at med.uni-frankfurt.de (Jason Chan) Date: Wed, 26 Oct 2011 16:38:59 +0200 Subject: [FieldTrip] ICA and plotting Message-ID: <002001cc93ec$ff8d0a60$fea71f20$@med.uni-frankfurt.de> Hi Everyone, I am currently using Fieldtrip version 20111009. I am trying to use ICA to reject EOG artifacts. I ran a correlation between my EOG electrodes and MEG components to find the components that should be rejected. This variable I called "toreject", then used the following function: cfg = []; cfg.component = toreject; data_reject = ft_rejectcomponent(cfg, comp); When I try to plot my data using ft_topoplotER, the brain activity looks 'spotty'. However, when I add the cfg.component back into the cfg structure the activity looks correct. I have also noticed that adding this cfg.component will change the plots after I use MEGplanar and CombinePlanar. What am I doing wrong? Thank you in advance Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanweisz at mac.com Wed Oct 26 16:54:53 2011 From: nathanweisz at mac.com (Nathan Weisz) Date: Wed, 26 Oct 2011 16:54:53 +0200 Subject: [FieldTrip] ICA and plotting In-Reply-To: <002001cc93ec$ff8d0a60$fea71f20$@med.uni-frankfurt.de> References: <002001cc93ec$ff8d0a60$fea71f20$@med.uni-frankfurt.de> Message-ID: <4876264A-DFF4-4D1F-A38F-C364B800D637@mac.com> hi jason, it may be that you are rejecting too much, i.e. removing too much relevant brain activity. in general with regards to blinks and horizontal eye movements (your main sources of ocular artifacts) you should reject ~2, not (significantly) more. have you confirmed that your method is not too liberal in detecting "artefact components"? since the time-course and topography of these artefacts are so clear, "visual inspection" may be your best friend. good luck! nathan On 26.10.2011, at 16:38, Jason Chan wrote: > Hi Everyone, > > I am currently using Fieldtrip version 20111009. > > I am trying to use ICA to reject EOG artifacts. I ran a correlation between my EOG electrodes and MEG components to find the components that should be rejected. This variable I called “toreject”, then used the following function: > > cfg = []; > cfg.component = toreject; > data_reject = ft_rejectcomponent(cfg, comp); > > When I try to plot my data using ft_topoplotER, the brain activity looks ‘spotty’. However, when I add the cfg.component back into the cfg structure the activity looks correct. I have also noticed that adding this cfg.component will change the plots after I use MEGplanar and CombinePlanar. What am I doing wrong? > > Thank you in advance > Jason > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From alejosalles at gmail.com Thu Oct 27 05:12:03 2011 From: alejosalles at gmail.com (Alejo Salles) Date: Thu, 27 Oct 2011 00:12:03 -0300 Subject: [FieldTrip] saving events to file in realtime processing Message-ID: hi, I'm looking into doing EEG realtime processing using biosemi active two hardware. I use the biosemi2ft program to acquire data and create the buffer, from which I read from matlab. as the processing I need to do is not very intensive, while it's important to keep a low time lag, I'm running matlab on the same computer that does the acquisition. I would like to know how to go about sending events to be recorded in the gdf file. firstly, I'd like to know whether this is the right way to go, or if I should instead have the buffer spawned by the matlab code... can I write to the buffer from matlab even if it was spawned by biosemi2ft? supposing this is ok, how should I send the events? I understand that I should set event.sample, but I'm not sure what to put here, should I use the one after the one just read? how can I make sure this will get recorded to file? should I use a fixed delay instead? if I spawn the buffer from matlab instead, how can I then tell biosemi2ft to write the events to file? is any of these the way to do this or I should resort to send signals through the parallel port into the biosemi box? on a different note, is there a way to downsample the rate for saving the file in biosemi2ft? I gather the setting is only for streaming, but then I'm limited by the biosemi hardware to sample rates >= 2kHz, is this right? many thanks, alejo -------------- next part -------------- An HTML attachment was scrubbed... URL: From Margit.Schoenherr at uk-erlangen.de Thu Oct 27 13:16:24 2011 From: Margit.Schoenherr at uk-erlangen.de (=?iso-8859-1?Q?Sch=F6nherr=2C_Margit?=) Date: Thu, 27 Oct 2011 13:16:24 +0200 Subject: [FieldTrip] questions about forward calculations In-Reply-To: <424401516.107777.1319621086957.JavaMail.root@draco.zimbra.ru.nl> References: <2084749132.107220.1319620059098.JavaMail.root@draco.zimbra.ru.nl>, <424401516.107777.1319621086957.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <71D8F8A56F37A947912FC86D4D9F00F4633F43AE35@XMAIL1.medads.uk-erlangen.de> Hello Alex and Cristiano, thanks for your reply. I have used the code below to compute the BEM volume conductor, and with this I get the units I described in my mail. mri_segment.seg = mri_segment.scalp + mri_segment.skull + 2*mri_segment.brain; cfg_vol = []; cfg_vol.tissue = [1 2 3]; cfg_vol.numvertices = [800 1000 2000]; cfg_vol.conductivity = [1 1/80 1]; cfg_vol.isolatedsource = true; cfg_vol.method = 'openmeeg'; cfg_vol.sourceunits = 'mm'; cfg_vol.mriunits = 'mm'; vol = ft_prepare_bemmodel(cfg_vol, mri_segment); How can I ensure that my BEM surfaces are expressed in m? I have tried 2 possibilities which ended with an error and I had to quit openmeeg. The first, I changed the translation vector of mri_segment.transform (division by 1000) and set mri_segment.unit = 'm' and tried the same code as above. Second, I tried this: cfg = []; cfg.method = 'segmentation'; cfg.tissue = [1 2 3]; cfg.numvertices = [2000 1000 800]; cfg.sourceunits = 'mm'; cfg.mriunits = 'mm'; bnd = ft_prepare_mesh(cfg, mri_segment); bnd(1,1).pnt = bnd(1,1).pnt / 1000; bnd(1,2).pnt = bnd(1,2).pnt / 1000; bnd(1,3).pnt = bnd(1,3).pnt / 1000; vol = []; vol.bnd = bnd; vol.cond = [1 1/80 1]; cfg.method = 'openmeeg'; vol = ft_prepare_bemmodel(cfg, vol); Both attempts produced this error: | ------ om_minverser | ./tpf724544e_8af4_4678_aa5c_b9dc37660560.bin | ./tpd041303a_5fee_44ad_8d5d_8e7d4578f0d3.bin | ----------------------- Exception: Unable to open the file ./tpf724544e_8af4_4678_aa5c_b9dc37660560.bin for reading Doing my best.... This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Warning: an error ocurred while running OpenMEEG > In openmeeg at 121 In ft_prepare_bemmodel at 232 Error using ==> fread Invalid file identifier. Use fopen to generate a valid file identifier. Warning: File 'tp2fef7d04_3155_4852_ab97_121fa2fc7892.bin' not found. > In openmeeg>cleaner at 136 In openmeeg at 123 In ft_prepare_bemmodel at 232 Warning: File 'tp645538cf_3b4a_4e28_8a13_c061c7fca25a.bin' not found. > In openmeeg>cleaner at 137 In openmeeg at 123 In ft_prepare_bemmodel at 232 Thanks for your help! Best, Margit ________________________________________ Von: Micheli, C. [c.micheli at fcdonders.ru.nl] Gesendet: Mittwoch, 26. Oktober 2011 11:24 An: Email discussion list for the FieldTrip project Cc: Schönherr, Margit Betreff: Re: [FieldTrip] questions about forward calculations Hi Margit I could replicate the behavior that you described in point 1) the last email and at the moment we are checking that all required options within FieldFrip and OpenMEEG are set correctly. For your points 2) and 3) I could not replicate the problem. Everything should work fine if the units of the sensors and the volume conductor are consistent. However, we are working to make units management more handy for the users, so that ambiguities like this can be solved. Please, keep posted on the mailing list to track the changes in the near future. Could you maybe paste your source code here in the mailing list? Cheers, Cristiano ----- "Alexandre Gramfort" schreef: > Van: "Alexandre Gramfort" > Aan: "Email discussion list for the FieldTrip project" , "c micheli" > , "Margit Schoenherr" > Verzonden: Dinsdag 25 oktober 2011 15:41:10 > Onderwerp: Re: [FieldTrip] questions about forward calculations > > Hello Margit, > > > I have some questions regarding forward computations. > > > > 1) How is the definition of the EEG leadfield - does the dipole > point from red to blue or from blue to red? I obtain different results > when I compute the leadfield of the same dipole either with a > 3-concentric-spheres volume conductor or with BEM (openmeeg). > > do you say that you get different polarity for sphere and OpenMEEG? > if > it's the case my only > guess it that the triangles of the boundary meshes are not properly > oriented. Maybe Cristiano > who looked at this recently can comment. > > does the toy example behave properly? In > external/openmeeg/openmeeg_eeg_leadfield_example.m > > > 2) In which units are the leadfields given? For the > 3-concentric-spheres volume conductor, the magnitude of the field is > 70, for BEM 2e-5. > > If the input meshes passed to OpenMEEG are in meters and dipole > currents in Am then the leadfield should give EEG potentials in V. > > > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the > single sphere. For the single sphere model, the field strength is > 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But the > BEM forward field of the same dipole has strength 1e-11. What is the > unit here? > > Make sure your BEM surfaces are expressed in meters and not > millimeters like it is often the > case in MRI coordinates, and tell me if you still see some > inconsistent results. > > Best, > Alex > -- > Alexandre Gramfort, PhD > gramfort at nmr.mgh.harvard.edu > Dept. of Radiology MGH Martinos Center / Harvard Medical School > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From B.Mouthaan at neuro.umcn.nl Thu Oct 27 14:33:44 2011 From: B.Mouthaan at neuro.umcn.nl (B.Mouthaan at neuro.umcn.nl) Date: Thu, 27 Oct 2011 14:33:44 +0200 Subject: [FieldTrip] Dipole fitting Message-ID: Dear Fieldtrippers, I wrote a script for dipolefitting, though it doesn't work anymore since I updated Fieldtrip I receive the following error: ??? Error using ==> minus Matrix dimensions must agree. Error in ==> ft_dipolefitting at 375 grid.error(indx,1) = sum(sum(((eye(nchans)-lf*pinv(lf))*Vdata).^2)); Any ideas? Thanks! Brian Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.wang at ucl.ac.uk Thu Oct 27 16:34:23 2011 From: julian.wang at ucl.ac.uk (Julian Wang) Date: Thu, 27 Oct 2011 15:34:23 +0100 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing Message-ID: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> Hi all, I'm trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I'm not sure if I've got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it's only expecting one row in the design matrix. If it's run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I'm not sure if it is. Is what I've done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I'm uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I'm using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian -------------- next part -------------- An HTML attachment was scrubbed... URL: From miellet at psy.gla.ac.uk Thu Oct 27 19:35:48 2011 From: miellet at psy.gla.ac.uk (miellet at psy.gla.ac.uk) Date: Thu, 27 Oct 2011 18:35:48 +0100 Subject: [FieldTrip] (no subject) Message-ID: <20111027183548.975573lhb8sj3ywk@horde.psy.gla.ac.uk> Hello, I'm trying to use ft_sourceanalysis with pcc. I specify the volume conductor model, the sensor information and a grid with pre-computed leadfields. I tried to compute the statistics over the source parameters between two conditions as indicated in the documentation (ft_sourceanalysis(cfg, freqA, freqB) with randomization). I get an error linked to the condition: if nargin>2 && strcmp(cfg.prewhiten,'no') I couldn't find any information about this cfg.prewhiten parameter. this part of the code if commented by % HACK: requires some extra defaults % HACK: use some experimental code Does anyone know if this part is functional yet please? Thanks, Sebastien ---------------------------------------------------------------- This message was sent using the Web mail system for The University of Glasgow School of Psychology ------------------------------------------------------------------ From tolgacan1 at yahoo.com Thu Oct 27 19:59:47 2011 From: tolgacan1 at yahoo.com (=?iso-8859-1?Q?Tolga_=D6zkurt?=) Date: Thu, 27 Oct 2011 10:59:47 -0700 (PDT) Subject: [FieldTrip] "time-frequency analysis" tutorial ? In-Reply-To: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> Message-ID: <1319738387.11992.YahooMailNeo@web111510.mail.gq1.yahoo.com> I apologize if I am misleading, but since yesterday night, for some reason, Fieldtrip documentation on "time-frequency analysis" is missing, i.e., there seems nothing on the page: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis I say since yesterday night, because a few hours before, I was able to see the page. Tolga -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Thu Oct 27 19:58:54 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Thu, 27 Oct 2011 11:58:54 -0600 Subject: [FieldTrip] cfgs for paired t-test and monte carlo testing In-Reply-To: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> Message-ID: <1E1977C6-4E7C-47AF-914E-F4867CB70CB2@ucdenver.edu> Julian, Others can correct me if I'm wrong, but yes, I think you only need 1 row for a paired t-test in your design using the ttest2 function. So, if you have 2 conditions and 16 subjects, then your design specification is fine. For the same type of analysis, using method= 'montecarlo', your design should be something like: [1:16 1:16; ones(1,16) ones(1,16)*2] You'd need to specify ivar = 2 (i.e., row 1 in your design) and uvar = 1 for that design and a cfg.statistic = 'depsamplesT'. Wvar and Cvar don't need to be specified. Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA On Oct 27, 2011, at 8:34 AM, Julian Wang wrote: Hi all, I’m trying to run a paired t-test on a set of data that have been converted from SPM format using the function fttimelock, but I’m not sure if I’ve got the settings correct for it. The data consists of 16 subjects in a within-subject design with 2 conditions, from the help manual, I assumed that cfg.design should be: [ones(1,16),ones(1,16)*2; 1:16, 1:16] With the rest of the code being: cfg.method = 'stats'; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'ttest2'; cfg.ivar = 1; cfg.uvar = 2; stats = ft_timelockstatistics(cfg,Subjects(1).timelockIllusory, Subjects(2).timelockIllusory,... Subjects(3).timelockIllusory, Subjects(4).timelockIllusory,... Subjects(5).timelockIllusory, Subjects(6).timelockIllusory,... Subjects(7).timelockIllusory, Subjects(8).timelockIllusory,... Subjects(9).timelockIllusory, Subjects(10).timelockIllusory,... Subjects(11).timelockIllusory, Subjects(12).timelockIllusory,... Subjects(13).timelockIllusory, Subjects(14).timelockIllusory,... Subjects(15).timelockIllusory, Subjects(16).timelockIllusory,... Subjects(1).timelockControl, Subjects(2).timelockControl,... Subjects(3).timelockControl, Subjects(4).timelockControl,... Subjects(5).timelockControl, Subjects(6).timelockControl,... Subjects(7).timelockControl, Subjects(8).timelockControl,... Subjects(9).timelockControl, Subjects(10).timelockControl,... Subjects(11).timelockControl, Subjects(12).timelockControl,... Subjects(13).timelockControl, Subjects(14).timelockControl,... Subjects(15).timelockControl, Subjects(16).timelockControl); But if I run it, it comes up with an error saying that it’s only expecting one row in the design matrix. If it’s run with the design matrix just being [ones(1,16),ones(1,16)*2] Then it runs fine and the result does look correct, but I’m not sure if it is. Is what I’ve done a paired t-test? Or is it running an unpaired t-test? Also when running it through using the monte carlo method, I’m uncertain as to what values cfg.ivar, cfg.uvar, cfg.wvar and cfg.cvar should be, at the moment I’m using: cfg.method = 'montecarlo'; cfg.design = [ones(1,16),ones(1,16)*2]; cfg.alpha = 0.05; cfg.tail = 0; cfg.feedback = 'gui'; cfg.statistic = 'depsamplesT'; cfg.ivar = 1; cfg.uvar = 2; cfg.wvar = 2; cfg.numrandomization = 'all'; but it keeps coming up with the following error: ??? Index exceeds matrix dimensions. Error in ==> resampledesign at 103 blkmeas = unique(design(cfg.wvar,:)', 'rows')'; Error in ==> statistics_montecarlo at 187 resample = resampledesign(cfg, design); Error in ==> statistics_wrapper at 290 [stat, cfg] = statmethod(cfg, dat, design, 'issource',issource); Error in ==> ft_timelockstatistics at 124 [stat, cfg] = statistics_wrapper(cfg, varargin{:}); What am I doing wrong here? Any help would be greatly appreciated. Kind regards, Julian _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Oct 27 20:03:18 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 27 Oct 2011 20:03:18 +0200 Subject: [FieldTrip] (no subject) In-Reply-To: <20111027183548.975573lhb8sj3ywk@horde.psy.gla.ac.uk> References: <20111027183548.975573lhb8sj3ywk@horde.psy.gla.ac.uk> Message-ID: Dear Seb, A few comments to your question: -I don't really remember why 'pcc' as a method shouldn't work, but I believe that a straightforward explanation why it is disabled is that once-upon-a-time the functionality you are trying to apply was designed for 'dics' as method (and as such originates from the pre-pcc era. I wonder whether it will work for cfg.method = 'dics'. -Even if it would work, it is a very computationally heavy method: data are shuffled across the conditions at the channel level and spatial filters are computed (for both conditions) for each randomization. When we implemented this method, back in the old days, we quickly abandoned it again because of the discrepancy between the computation time and the computational resources. -The functionality still being present (I still assume that it kind of works) is the consequence of us being quite devoted to backward compatibility, although I don't want to bet my money on it to work (for dics). -Nowadays, I would advise to do the randomisation testing at the source level, i.e. computing a single set of spatial filters common to both conditions (the so-called common filter approach), and then use ft_sourcestatistics for the randomization testing. To get started, you could have a look at: http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming?s[]=common&s[]=filter, although I notice that the final step (calling ft_sourcestatistics is not explained there). Cheers, JM On Oct 27, 2011, at 7:35 PM, miellet at psy.gla.ac.uk wrote: > Hello, > I'm trying to use ft_sourceanalysis with pcc. I specify the volume conductor model, the sensor information and a grid with pre-computed leadfields. > I tried to compute the statistics over the source parameters between two conditions as indicated in the documentation (ft_sourceanalysis(cfg, freqA, freqB) with randomization). > I get an error linked to the condition: > if nargin>2 && strcmp(cfg.prewhiten,'no') > I couldn't find any information about this cfg.prewhiten parameter. > this part of the code if commented by > % HACK: requires some extra defaults > % HACK: use some experimental code > Does anyone know if this part is functional yet please? > Thanks, > Sebastien > > ---------------------------------------------------------------- > This message was sent using the Web mail system for > The University of Glasgow School of Psychology > ------------------------------------------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Oct 27 20:05:12 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Thu, 27 Oct 2011 20:05:12 +0200 Subject: [FieldTrip] "time-frequency analysis" tutorial ? In-Reply-To: <1319738387.11992.YahooMailNeo@web111510.mail.gq1.yahoo.com> References: <004601cc94b5$85dfcd50$919f67f0$@ucl.ac.uk> <1319738387.11992.YahooMailNeo@web111510.mail.gq1.yahoo.com> Message-ID: <88FD0AC4-F63A-4AF0-8281-74E03AB54405@donders.ru.nl> Hi Tolga, You are right. We will fix it as soon as possible. Best wishes, Jan-Mathijs On Oct 27, 2011, at 7:59 PM, Tolga Özkurt wrote: > I apologize if I am misleading, but since yesterday night, for some reason, Fieldtrip documentation on "time-frequency analysis" is missing, i.e., there seems nothing on the page: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis > > I say since yesterday night, because a few hours before, I was able to see the page. > > Tolga > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Don.Rojas at ucdenver.edu Thu Oct 27 22:09:46 2011 From: Don.Rojas at ucdenver.edu (Rojas, Don) Date: Thu, 27 Oct 2011 14:09:46 -0600 Subject: [FieldTrip] Question about ft_sourcestatistics and ft_sourcegrandaverage Message-ID: To all: I am wondering if there is a way to use ft_sourcegrandaverage and ft_sourcestatistics on cortically constrained mne source output. I have sources from ft_sourceanalysis, where the method was 'mne' and the source space was the mni cortical surface, which the MEG data were coregistered to, so all results are in the same anatomical space. However, these functions seem to require volume, or grid, type input, rather than surface input. Can someone confirm if that is correct or not and if so, would there be a way to work around this limitation? Best, Don ----------------------- Don Rojas, Ph.D. Associate Professor of Psychiatry U. of Colorado Denver Anschutz Medical Campus Director, UCD Magnetoencephalography Lab 13001 E. 17th Pl F546 Aurora, CO 80045 USA From f.dipompeo at unich.it Fri Oct 28 10:21:24 2011 From: f.dipompeo at unich.it (Francesco Di Pompeo) Date: Fri, 28 Oct 2011 10:21:24 +0200 Subject: [FieldTrip] 60 Hz notch using preprocessing Message-ID: Dear all, I need a 60 Hz notch filter before the ICA of continuous 4D data. I did it using ft_preprocessing but the 60 Hz line is still there.. Something wrong in my script? cfg = []; cfg.dataset = '0'; cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; cfg.bpfilter = 'yes'; cfg.bpfreq = [1 150]; cfg.dftfilter = 'yes'; cfg.dftfreq = [60 120 180]; data_meg = ft_preprocessing(cfg); ----------------------------------------------------------------- Francesco Di Pompeo, PhD Institute of Advanced Biomedical Technologies and Department of Neuroscience and Imaging University of Chieti "G. d'Annunzio" Via dei Vestini - Campus Universitario 66013 Chieti - ITALY ph: +39-0871-3556907 fax:+39-0871-3556930 From two.frank at gmail.com Fri Oct 28 10:29:31 2011 From: two.frank at gmail.com (two frank) Date: Fri, 28 Oct 2011 01:29:31 -0700 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: References: Message-ID: Based on my experience, it seems that this can only be done in the epoched data but not in the continuous EEG data. Thoughts or comments from other fieldtrippers?? On Fri, Oct 28, 2011 at 1:21 AM, Francesco Di Pompeo wrote: > Dear all, > > I need a 60 Hz notch filter before the ICA of continuous 4D data. > I did it using ft_preprocessing but the 60 Hz line is still there.. > > Something wrong in my script? > > > cfg = []; > cfg.dataset = '0'; > cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; > > cfg.bpfilter = 'yes'; > cfg.bpfreq = [1 150]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = [60 120 180]; > > data_meg = ft_preprocessing(cfg); > > > > > ----------------------------------------------------------------- > Francesco Di Pompeo, PhD > Institute of Advanced Biomedical Technologies and > Department of Neuroscience and Imaging > University of Chieti "G. d'Annunzio" > Via dei Vestini - Campus Universitario > 66013 Chieti - ITALY > ph: +39-0871-3556907 > fax:+39-0871-3556930 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Frank -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Oct 28 10:33:55 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Fri, 28 Oct 2011 10:33:55 +0200 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: References: Message-ID: <5CFB10C2-03DB-4CEF-A86E-11AFA7C790E9@donders.ru.nl> Hi Francesco, I suspect that the 60 Hz line noise is not of constant amplitude throughout the length of your trial (it seems you read in a whole session at once). Having, say, a 5-minute recording, notching out the 60 Hz with a dftfilter leads to a 1/300 Hz wide notch. This is probably too narrow given some slight 60 Hz amplitdue modulations. You could use a bandstop filter in this case. Best, Jan-Mathijs On Oct 28, 2011, at 10:21 AM, Francesco Di Pompeo wrote: > Dear all, > > I need a 60 Hz notch filter before the ICA of continuous 4D data. > I did it using ft_preprocessing but the 60 Hz line is still there.. > > Something wrong in my script? > > > cfg = []; > cfg.dataset = '0'; > cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; > > cfg.bpfilter = 'yes'; > cfg.bpfreq = [1 150]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = [60 120 180]; > > data_meg = ft_preprocessing(cfg); > > > > > ----------------------------------------------------------------- > Francesco Di Pompeo, PhD > Institute of Advanced Biomedical Technologies and > Department of Neuroscience and Imaging > University of Chieti "G. d'Annunzio" > Via dei Vestini - Campus Universitario > 66013 Chieti - ITALY > ph: +39-0871-3556907 > fax:+39-0871-3556930 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Fri Oct 28 10:36:45 2011 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 28 Oct 2011 10:36:45 +0200 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: References: Message-ID: Dear Francesco, A notch filter is referred to as a band-stop filter in ft_preprocessing's documentation, and is different from the (regression-based) DFT filter. To use a notch filter, specify: cfg.bsfilter = 'yes'; cfg.bsfreq = [58 62]; % or whatever you deem appropriate Note that you will have to apply ft_preprocessing repeatedly if you explicitly want to filter out the harmonics of the line noise as well. Best, Eelke 2011/10/28 Francesco Di Pompeo : > Dear all, > > I need a 60 Hz notch filter before the ICA of continuous 4D data. > I did it using ft_preprocessing but the 60 Hz line is still there.. > > Something wrong in my script? > > > cfg = []; > cfg.dataset = '0'; > cfg.channel    = {'MEG', '-A246', '-A170', '-A110', '-A19'}; > > cfg.bpfilter      = 'yes'; > cfg.bpfreq        = [1 150]; > > cfg.dftfilter     = 'yes'; > cfg.dftfreq       = [60 120 180]; > > data_meg                 = ft_preprocessing(cfg); > > > > > ----------------------------------------------------------------- > Francesco Di Pompeo, PhD > Institute of Advanced Biomedical Technologies and > Department of Neuroscience and Imaging > University of Chieti "G. d'Annunzio" > Via dei Vestini - Campus Universitario > 66013 Chieti - ITALY > ph: +39-0871-3556907 > fax:+39-0871-3556930 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From e.maris at psych.ru.nl Fri Oct 28 11:52:22 2011 From: e.maris at psych.ru.nl (Maris, E. (Eric)) Date: Fri, 28 Oct 2011 11:52:22 +0200 (CEST) Subject: [FieldTrip] Between-Trial Stats on Coherence In-Reply-To: <014701cc9355$ed10b4a0$c7321de0$@maris@psych.ru.nl> Message-ID: <678193359.130526.1319795542871.JavaMail.root@draco.zimbra.ru.nl> Hi Natalia, > when computing the statistical test for difference in coherence > between condition 1 and condition 2 (for single subject) I get NaNs > for stat. The setting code is quite simple and I did some checking for > > silly errors(ex. I dowloaded the very last version), so either I'm > doing sth wrong or there is a bug somwhere. Maybe you can help me. > I do the following: having computed the 'fourier' for both conditions > > (diff amount of trials), I run the code for the second step (whithout > > MC correction for the moment). I have 2 channel on which Im computing > > the coherence. The data for both conditions have the same length. The > > design is a betweenTrial so: #trls c1 + #trls c2. and 1 independent > variable. AmI missing something on the design or like reshaping the > data? Just as a check, can you produce coherence values with your ft_freqanalysis output using ft_connectivityanalysis? Best, Eric Maris > Any help is welcome! > Natalia > > cfg = []; > cfg.channel ={'lfp';'Whisk'}; > cfg.channelcmb ={'lfp' 'Whisk'}; > > cfg.frequency ='all'; > cfg.method = 'montecarlo'; > cfg.parameter ='fourierspctrm'; > cfg.statistic = 'indepsamplesZcoh'; > cfg.alpha = 0.05; > cfg.tail = 0; > cfg.numrandomization = 10; %500 > cfg.neighbours = []; > %cfg.correctm = 'cluster'; > %cfg.clusterthreshold = 'nonparametric_common'; > %cfg.clusterstatistic = 'maxsum'; > %cfg.clusteralpha = 0.05; > %cfg.clustertail = 0; > %cfg.correcttail ='prob'; > cfg.computestat = 'yes'; > cfg.computecritval = 'yes'; > cfg.computeprob = 'yes' ; > %Design of matrix > design = zeros(1,size(freqoutdisc.fourierspctrm,1) + > size(freqoutwalk.fourierspctrm,1)); > design(1,1:size(freqoutdisc.fourierspctrm,1)) = 1; > design(1,(size(freqoutdisc.fourierspctrm,1)+1):(size(freqoutdisc.fourierspctrm,1) > + size(freqoutwalk.fourierspctrm,1)))= > 2; > cfg.design = design; > cfg.ivar = 1; > [stat1] = freqstatistics(cfg,freqoutdisc,freqoutwalk); > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From e.maris at psych.ru.nl Fri Oct 28 11:53:36 2011 From: e.maris at psych.ru.nl (Maris, E. (Eric)) Date: Fri, 28 Oct 2011 11:53:36 +0200 (CEST) Subject: [FieldTrip] Fwd: [FIELDTRIP] Independent channels stats question In-Reply-To: <1000339553.103700.1319574502768.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <298427253.130531.1319795616661.JavaMail.root@draco.zimbra.ru.nl> Dear Sangi & Vladimir, > Eric might correct me if I'm wrong but when you do cluster-based > stats > and your cfg.neighbors structure is empty what happens is exactly > what > you described. This is correct. You are still effectively correcting for 200 channels > just not for all the pixels so it should be quite close to Bonferoni > across channels. The permutation test should be me sensitive because it takes into account the spatial correlation in the data. Sangi, it will not hurt if you would try clustering along the spatial dimensions. In my experience, ECoG sometimes shows spatially distributed effects. best, Eric Maris > > Best, > > Vladimir > > On Tue, Oct 25, 2011 at 6:55 PM, Sangita Dandekar > wrote: > > Hi Fieldtrippers, > > > > I have questions similar to the ones asked a while back in the > discussion > > archive. (See discussion pasted below my email if you're > interested) > > > > We have ~200  intracranial EEG electrodes, which we assume are > independent, > > and the question is how to apply > > cluster statistics to time frequency data while accounting for the > multiple > > comparisons problem. > > > > In the archived discussion below, it was suggested that cluster > statistics > > be applied to each  channel separately, and then, to account for > MCP, apply > > Bonferroni correction on the resulting p-values.  However, as was > pointed > > out in the discussion below, with ~200 electrodes Bonferroni > > correction is overly conservative.  Another possibility suggested in > the > > archived discussion was  FDR correction on the results of cluster > > statistics, but it isn't clear to me > > how this would be done.  If anyone can explain how FDR can be > applied to the > > results of cluster statistics, please let me know. > > > > I think a third possible solution to the problem is to get a > 'global' null > > distribution as follows: > > > > Repeatedly: > > 1.  Randomly partition data > > 2.  Find time frequency clusters and the associated sum of > t-statistics for > > each TFR cluster (do this WITHOUT clustering over electrodes/space, > thereby > > treating each channel independently) > > 3.  Record maximum t-statistic sum in a 'global' null distribution > on each > > iteration.   (Search over all electrodes for this maximum) > > > > Then one could compare the clusters as observed in the actual data > (as > > determined independently at each electrode) to the global null > distribution > > to get the false alarm rate > > associated with any cluster.  I think the above should account for > the MCP. > > > > Is there anyway to implement the above procedure in Fieldtrip > without > > modifying the underlying functions?  I know how to do a for loop > around > > freqstatistics to treat each channel separately and then get the > null > > distribution of tstat maxima and cluster statistics for each > channel > > separately, but I am not sure > > if it is possible to treat each channel independently as I have > outlined > > above and also get a global null distribution over all channels  > (without > > making some > > changes to the underlying FT functions, that is). > > > > Thanks in advance for any help! > > Sangi > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Jul 6, 2010 at 12:47 PM, Matthew Davidson > wrote: > >> > >> Jan-Mathis, thanks for the response. > >> > >> Unfortunately, we tend to have a lot of channels (~120-200), and > once > >> we start using microelectrodes in the patients, it'll only get > worse. > >> > >> If we were to divide our alpha by 120-200, wouldn't we have to run > >> 120-200 times as many permutations in order to get p-values low > enough > >> to survive Bonferroni correction? That's a large jump; we might > have > >> to run 100,000 permutations! > >> > >> What do you think about something like FDR correction instead? > >> > >> Matthew > >> > >> On Tue, Jul 6, 2010 at 7:21 AM, jan-mathijs schoffelen > >> wrote: > >> > Dear Matthew, > >> > > >> > Your sensitivity problem is a known issue when using > cluster-based test > >> > statistics, in which it is difficult to get small clusters > significant > >> > in > >> > the presence of large clusters. This could also occur within a > single > >> > channel (for example with a time-frequency decomposition, in > which the > >> > summed spectro-temporal extent of an alpha-band effect could be > much > >> > bigger > >> > than a gamma-band effect). > >> > In your case I think it would be statistically valid to do the > >> > cluster-based > >> > permutation test on each channel separately (which will involve a > for > >> > loop > >> > around ft_freqstatistics, because it is not implemented in the > fieldtrip > >> > code) and doing a post-hoc Bonferroni correction on the > resulting > >> > p-values. > >> > If the number of channels is not too big, this might work. > >> > > >> > Good luck, > >> > > >> > Jan-Mathijs > >> > > >> > > >> > On Jul 6, 2010, at 3:26 AM, Matthew Davidson wrote: > >> > > >> >> Hi, this is Matthew Davidson. I recently took the Fieldtrip > EEG/MEG > >> >> Toolkit (Hi Robert and Jan-Mathis!), and have been diving into > using > >> >> Fieldtrip more directly. > >> >> > >> >> My question pertains to cluster-based correction when channels > are > >> >> independent. My data is primarily intracranial EEG, and due to > the > >> >> 1/f^2 power drop-off, electrodes directly on the brain reflect > local > >> >> activity much more strongly than sensors further away. As a > result, we > >> >> treat them as independent. Now, I can force the Fieldtrip > clustering > >> >> algorithm to not cluster across channels by setting: > >> >> > >> >> cfg.neighbours = []; > >> >> cfg.minnbchan = 0; > >> >> > >> >> but it still computes the maximum cluster size for a particular > >> >> permutation based on *all* the data. This seems... less > sensitive > >> >> somehow, as if large clusters in one channel negatively impact > the > >> >> significance of clusters in another channel. > >> >> > >> >> Is there a better way to do this and still solve the MCP? E.g., > >> >> compute the maxsum on each channel separately, and then use > something > >> >> like FDR or Bonferroni correction on the maxsums across > channels? > >> >> > >> >> Thanks for any advice you may have, and thanks for producing > fieldtrip! > >> >> Matthew > >> >> > >> >> ---------------------------------- > >> >> The aim of this list is to facilitate the discussion between > users of > >> >> the > >> >> FieldTrip  toolbox, to share experiences and to discuss new > ideas for > >> >> MEG > >> >> and EEG analysis. See also > >> >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> >> http://www.ru.nl/neuroimaging/fieldtrip. > >> >> > >> > > >> > Dr. J.M. (Jan-Mathijs) Schoffelen > >> > Donders Institute for Brain, Cognition and Behaviour, > >> > Centre for Cognitive Neuroimaging, > >> > Radboud University Nijmegen, The Netherlands > >> > J.Schoffelen at donders.ru.nl > >> > Telephone: 0031-24-3668063 > >> > > >> > ---------------------------------- > >> > The aim of this list is to facilitate the discussion between > users of > >> > the > >> > FieldTrip  toolbox, to share experiences and to discuss new ideas > for > >> > MEG > >> > and EEG analysis. See also > >> > http://listserv.surfnet.nl/archives/fieldtrip.html and > >> > http://www.ru.nl/neuroimaging/fieldtrip. > >> > > >> > >> ---------------------------------- > >> The aim of this list is to facilitate the discussion between users > of the > >> FieldTrip  toolbox, to share experiences and to discuss new ideas > for MEG > >> and EEG analysis. See also > >> http://listserv.surfnet.nl/archives/fieldtrip.html and > >> http://www.ru.nl/neuroimaging/fieldtrip. > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.vandermeij at donders.ru.nl Fri Oct 28 12:15:09 2011 From: r.vandermeij at donders.ru.nl (Roemer van der Meij) Date: Fri, 28 Oct 2011 12:15:09 +0200 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: References: Message-ID: <4EAA80AD.50700@donders.ru.nl> Hi Francesco, Just as a small add to Eelke's reply, you can specify a bs-filter for several ranges at once by doing it in a matrix, e.g.: cfg.bsfreq = [58 62; 118 122]; Note though, these filters (at least the standard butterworth) get increasingly inaccurate (less sharp filter-response, more 'filter-rolling'/edge-artifacts) when going to higher frequencies, if you are using the same frequency-range-width. Best, Roemer On 28-10-11 10:36, Eelke Spaak wrote: > Dear Francesco, > > A notch filter is referred to as a band-stop filter in > ft_preprocessing's documentation, and is different from the > (regression-based) DFT filter. To use a notch filter, specify: > > cfg.bsfilter = 'yes'; > cfg.bsfreq = [58 62]; % or whatever you deem appropriate > > Note that you will have to apply ft_preprocessing repeatedly if you > explicitly want to filter out the harmonics of the line noise as well. > > Best, > Eelke > > 2011/10/28 Francesco Di Pompeo: >> Dear all, >> >> I need a 60 Hz notch filter before the ICA of continuous 4D data. >> I did it using ft_preprocessing but the 60 Hz line is still there.. >> >> Something wrong in my script? >> >> >> cfg = []; >> cfg.dataset = '0'; >> cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; >> >> cfg.bpfilter = 'yes'; >> cfg.bpfreq = [1 150]; >> >> cfg.dftfilter = 'yes'; >> cfg.dftfreq = [60 120 180]; >> >> data_meg = ft_preprocessing(cfg); >> >> >> >> >> ----------------------------------------------------------------- >> Francesco Di Pompeo, PhD >> Institute of Advanced Biomedical Technologies and >> Department of Neuroscience and Imaging >> University of Chieti "G. d'Annunzio" >> Via dei Vestini - Campus Universitario >> 66013 Chieti - ITALY >> ph: +39-0871-3556907 >> fax:+39-0871-3556930 >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Roemer van der Meij M.Sc. PhD student Donders Institute for Brain, Cognition and Behaviour Centre for Cognition P.O. Box 9104 6500 HE Nijmegen The Netherlands Tel: +31(0)24 3655932 E-mail: r.vandermeij at donders.ru.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From dualitystan at gmail.com Fri Oct 28 17:04:56 2011 From: dualitystan at gmail.com (Stanley Klein) Date: Fri, 28 Oct 2011 08:04:56 -0700 Subject: [FieldTrip] 60 Hz notch using preprocessing In-Reply-To: <4EAA80AD.50700@donders.ru.nl> References: <4EAA80AD.50700@donders.ru.nl> Message-ID: Francesco, Have you actually looked at the FFT of the raw data? That will tell you what needs to be removed. You might have line noise at one frequency and monitor noise at a neighboring frequency. Stan On Fri, Oct 28, 2011 at 3:15 AM, Roemer van der Meij < r.vandermeij at donders.ru.nl> wrote: > Hi Francesco, > > Just as a small add to Eelke's reply, you can specify a bs-filter for > several ranges at once by doing it in a matrix, e.g.: > cfg.bsfreq = [58 62; 118 122]; > Note though, these filters (at least the standard butterworth) get > increasingly inaccurate (less sharp filter-response, more > 'filter-rolling'/edge-artifacts) when going to higher frequencies, if you > are using the same frequency-range-width. > > Best, > Roemer > > > > On 28-10-11 10:36, Eelke Spaak wrote: > > Dear Francesco, > > A notch filter is referred to as a band-stop filter in > ft_preprocessing's documentation, and is different from the > (regression-based) DFT filter. To use a notch filter, specify: > > cfg.bsfilter = 'yes'; > cfg.bsfreq = [58 62]; % or whatever you deem appropriate > > Note that you will have to apply ft_preprocessing repeatedly if you > explicitly want to filter out the harmonics of the line noise as well. > > Best, > Eelke > > 2011/10/28 Francesco Di Pompeo : > > Dear all, > > I need a 60 Hz notch filter before the ICA of continuous 4D data. > I did it using ft_preprocessing but the 60 Hz line is still there.. > > Something wrong in my script? > > > cfg = []; > cfg.dataset = '0'; > cfg.channel = {'MEG', '-A246', '-A170', '-A110', '-A19'}; > > cfg.bpfilter = 'yes'; > cfg.bpfreq = [1 150]; > > cfg.dftfilter = 'yes'; > cfg.dftfreq = [60 120 180]; > > data_meg = ft_preprocessing(cfg); > > > > > ----------------------------------------------------------------- > Francesco Di Pompeo, PhD > Institute of Advanced Biomedical Technologies and > Department of Neuroscience and Imaging > University of Chieti "G. d'Annunzio" > Via dei Vestini - Campus Universitario > 66013 Chieti - ITALY > ph: +39-0871-3556907 > fax:+39-0871-3556930 > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -- > Roemer van der Meij M.Sc. > PhD student > > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognition > P.O. Box 9104 > 6500 HE Nijmegen > The Netherlands > Tel: +31(0)24 3655932 > E-mail: r.vandermeij at donders.ru.nl > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Lilla.Magyari at mpi.nl Sat Oct 29 23:19:35 2011 From: Lilla.Magyari at mpi.nl (Lilla.Magyari at mpi.nl) Date: Sat, 29 Oct 2011 23:19:35 +0200 (CEST) Subject: [FieldTrip] source statistics In-Reply-To: References: <20111027183548.975573lhb8sj3ywk@horde.psy.gla.ac.uk> Message-ID: <1834.188.36.50.42.1319923175.squirrel@188.36.50.42> Dear Seb, I just would like to add to Jan-Mathijs's reply that there is an example code for how to use ft_sourcestatistics here: http://fieldtrip.fcdonders.nl/example/source_statistics?s[]=source&s[]=statistics Best, Lilla > Dear Seb, > > A few comments to your question: > -I don't really remember why 'pcc' as a method shouldn't work, but I > believe that a straightforward explanation why it is disabled is that > once-upon-a-time the functionality you are trying to apply was designed > for 'dics' as method (and as such originates from the pre-pcc era. I > wonder whether it will work for cfg.method = 'dics'. > -Even if it would work, it is a very computationally heavy method: data > are shuffled across the conditions at the channel level and spatial > filters are computed (for both conditions) for each randomization. When we > implemented this method, back in the old days, we quickly abandoned it > again because of the discrepancy between the computation time and the > computational resources. > -The functionality still being present (I still assume that it kind of > works) is the consequence of us being quite devoted to backward > compatibility, although I don't want to bet my money on it to work (for > dics). > -Nowadays, I would advise to do the randomisation testing at the source > level, i.e. computing a single set of spatial filters common to both > conditions (the so-called common filter approach), and then use > ft_sourcestatistics for the randomization testing. To get started, you > could have a look at: > http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming?s[]=common&s[]=filter, > although I notice that the final step (calling ft_sourcestatistics is not > explained there). > > > Cheers, > > JM > > On Oct 27, 2011, at 7:35 PM, miellet at psy.gla.ac.uk wrote: > >> Hello, >> I'm trying to use ft_sourceanalysis with pcc. I specify the volume >> conductor model, the sensor information and a grid with pre-computed >> leadfields. >> I tried to compute the statistics over the source parameters between two >> conditions as indicated in the documentation (ft_sourceanalysis(cfg, >> freqA, freqB) with randomization). >> I get an error linked to the condition: >> if nargin>2 && strcmp(cfg.prewhiten,'no') >> I couldn't find any information about this cfg.prewhiten parameter. >> this part of the code if commented by >> % HACK: requires some extra defaults >> % HACK: use some experimental code >> Does anyone know if this part is functional yet please? >> Thanks, >> Sebastien >> >> ---------------------------------------------------------------- >> This message was sent using the Web mail system for >> The University of Glasgow School of Psychology >> ------------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From drivolta81 at gmail.com Mon Oct 31 11:42:23 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 31 Oct 2011 11:42:23 +0100 Subject: [FieldTrip] flipdim: still need to do it? Message-ID: Dear all, I am using the 9th october 2011 version of fieldtrip. I just wish to know whether I still need to flipdim or wether it is not necessary anymore. Thanks a lot, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Oct 31 13:03:29 2011 From: jan.schoffelen at donders.ru.nl (jan-mathijs schoffelen) Date: Mon, 31 Oct 2011 13:03:29 +0100 Subject: [FieldTrip] flipdim: still need to do it? In-Reply-To: References: Message-ID: <69048721-B203-434B-A056-BA50B5E89B05@donders.ru.nl> Dear Davide, I guess that you refer to the flipdimming after segmentation. No, this is not necessary anymore. Still, the best way to find out whether this is true for your own data is to try it out ;-) Best, Jan-Mathijs On Oct 31, 2011, at 11:42 AM, Davide Rivolta wrote: > Dear all, > > I am using the 9th october 2011 version of fieldtrip. > > I just wish to know whether I still need to flipdim or wether it is not necessary anymore. > > Thanks a lot, > > Davide > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip Jan-Mathijs Schoffelen, MD PhD Donders Institute for Brain, Cognition and Behaviour, Centre for Cognitive Neuroimaging, Radboud University Nijmegen, The Netherlands J.Schoffelen at donders.ru.nl Telephone: +31-24-3614793 -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Oct 31 13:10:06 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 31 Oct 2011 13:10:06 +0100 Subject: [FieldTrip] flipdim: still need to do it? In-Reply-To: <69048721-B203-434B-A056-BA50B5E89B05@donders.ru.nl> References: <69048721-B203-434B-A056-BA50B5E89B05@donders.ru.nl> Message-ID: Ok, Thank you very much. Davide On Mon, Oct 31, 2011 at 1:03 PM, jan-mathijs schoffelen < jan.schoffelen at donders.ru.nl> wrote: > Dear Davide, > > I guess that you refer to the flipdimming after segmentation. No, this is > not necessary anymore. Still, the best way to find out whether this is true > for your own data is to try it out ;-) > > Best, > > Jan-Mathijs > > On Oct 31, 2011, at 11:42 AM, Davide Rivolta wrote: > > Dear all, > > I am using the 9th october 2011 version of fieldtrip. > > I just wish to know whether I still need to flipdim or wether it is not > necessary anymore. > > Thanks a lot, > > Davide > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > Jan-Mathijs Schoffelen, MD PhD > Donders Institute for Brain, Cognition and Behaviour, > Centre for Cognitive Neuroimaging, > Radboud University Nijmegen, The Netherlands > J.Schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From lwn_07 at yahoo.com.cn Mon Oct 31 14:15:36 2011 From: lwn_07 at yahoo.com.cn (=?utf-8?B?5p2O5Y2r5aic?=) Date: Mon, 31 Oct 2011 21:15:36 +0800 (CST) Subject: [FieldTrip] Is there a function for testing time series stationary or not? Message-ID: <1320066936.69942.YahooMailClassic@web15603.mail.cnb.yahoo.com> Dear all,   Is anybody knows wether there is a function in fieldtrip for testing the data epochs' stationeriness, since estimating AR models in causality connectivity analysis requiered that data should be stationary.   Best regards.     Weina   -------------- next part -------------- An HTML attachment was scrubbed... URL: From smoratti at psi.ucm.es Mon Oct 31 15:21:43 2011 From: smoratti at psi.ucm.es (smoratti at psi.ucm.es) Date: Mon, 31 Oct 2011 15:21:43 +0100 Subject: [FieldTrip] Is there a function for testing time series stationary or not? In-Reply-To: <1320066936.69942.YahooMailClassic@web15603.mail.cnb.yahoo.com> References: <1320066936.69942.YahooMailClassic@web15603.mail.cnb.yahoo.com> Message-ID: <1E8C4628-FC2B-497E-82B6-CDE4D4482CE6@psi.ucm.es> Dear Weina, Try this toolbox: http://www.informatics.sussex.ac.uk/users/anils/aks_code.htm There several easy to use tests for covariance stationarity. Best, Stephan El 31/10/2011, a las 14:15, 李卫娜 escribió: > Dear all, > > Is anybody knows wether there is a function in fieldtrip for testing the data epochs' stationeriness, since estimating AR models in causality connectivity analysis requiered that data should be stationary. > > Best regards. > > > Weina > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Oct 31 17:05:51 2011 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 31 Oct 2011 17:05:51 +0100 Subject: [FieldTrip] beamforming - normilise issue In-Reply-To: <4EA145B4.3060509@donders.ru.nl> References: <1520510740.141606.1319039064648.JavaMail.fmail@mwmweb070> <4EA145B4.3060509@donders.ru.nl> Message-ID: Dear Jörn, I tried to use the script you indicated me. It seems ok. I go further and I calculate the common filter for baseline and stimulus and then I run ft_sourceanalysis for baseline and stimulus (considering the common filter). After that (ft_sourceanalysis), that seems ok, I try to plot it. Like in the tutoial I calculate the relative change in power. I use ft_sourceplot. I got an error I do not understand really. It says: "the function requires volume data as input". In the structure sourceDiff, there is a volume field. It is in .cfg.vol This is my script. Am I missing something? cfg = []; cfg.method = 'slice'; cfg.funparameter = 'avg.pow'; cfg.maskparameter = cfg.funparameter; cfg.anaparameter = 0.5; cfg.units = 'mm'; cfg.vol = hdm; %I tried even: sourceDiff.cfg.vol; but it does not work figure ft_sourceplot(cfg,sourceDiff); If someone has some idea, it would be really appreciated. Thanks again, Davide On Fri, Oct 21, 2011 at 12:13 PM, "Jörn M. Horschig" < jm.horschig at donders.ru.nl> wrote: > Dear Davide, > > I was hesitant to answer, because I thought others know more than me. But > since none responded, I can try to help with my limited knowledge. > > From my knowledge of source reconstruction, I can just say that if all > your source reconstructions are in the same space (say, MNI), you can use > the .pos from your template to overcome this problem. I am not using > ft_volumenormalise, so I have no experience what is exactly going on there. > I would assume, however, that volumenormalise will transofmr your source > structures to a common space. > However, I stick to normalizing the following way: > > http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space > > Hope it helps at least a little bit. > Best, > Jörn > > > On 10/19/2011 6:12 PM, Davide Rivolta wrote: > > Hi Michael, > > I am using the single shell (Nolte). > > The grid has 2340 positions, but I am not still using mni. > > Thanks, > > Davide > > On Wed, Oct 19, 2011 at 5:44 PM, Michael Wibral wrote: > >> Hi davide, >> >> what headmodel and grid are you using? >> >> Michael >> >> >> ------------------------------ >> *Von:* "Davide Rivolta" >> *Gesendet:* Oct 19, 2011 3:54:37 PM >> *An:* "Email discussion list for the FieldTrip project" < >> fieldtrip at donders.ru.nl> >> *Betreff:* [FieldTrip] beamforming - normilise issue >> >> >> Dear all, >> >> I am trying to use beamforming for some MEG data. >> >> I have 1 condition, and I wish to compare it against the baseline. >> Ideally I wish to have the average of all group and statistically compare >> stimulus agains baseline.. >> >> As such, for each subject I calculate the source for the baseline and the >> source for the stimulus (using a common filter as indicated on the website). >> >> I then call ft_sourceinterpolate and, since I wish to have a group >> analysis, ft_volumenormalise. >> In order to compute the average, I call ft_sourcegrandaverage. >> >> Even though the help tells me that it is fine, the grandaverage does not >> work if the input is from the ft_volumenormalise. It is because there is >> not the ".pos" field! >> >> Am I doing something wrong? >> >> Any advice would be great. >> >> Thanks a lot, >> >> Davide >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Davide Rivolta, PhD > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > -- > Jörn M. Horschig > PhD Student > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > Neuronal Oscillations Group > > P.O. Box 9101 > NL-6500 HB Nijmegen > The Netherlands > > Contact: > E-Mail: jm.horschig at donders.ru.nl > Tel: +31-(0)24-36-68493 > Web: http://www.ru.nl/donders > > Visiting address: > Trigon, room 2.30 > Kapittelweg 29 > NL-6525 EN Nijmegen > The Netherlands > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From c.micheli at fcdonders.ru.nl Mon Oct 31 17:41:10 2011 From: c.micheli at fcdonders.ru.nl (Micheli, C.) Date: Mon, 31 Oct 2011 17:41:10 +0100 (CET) Subject: [FieldTrip] questions about forward calculations In-Reply-To: <1977413113.159969.1320079140888.JavaMail.root@draco.zimbra.ru.nl> Message-ID: <529875879.160006.1320079270297.JavaMail.root@draco.zimbra.ru.nl> Dear Margit, the bug with the sign of the FT call to OpenMEEG leadfield is now fixed. Please try again to generate one and let me know if it is consistent to the 3 concentric spherical solution, as you tried before. I am looking into the units issue in these days. Cristiano ----- "C. Micheli" schreef: > Van: "C. Micheli" > Aan: "Email discussion list for the FieldTrip project" > Verzonden: Woensdag 26 oktober 2011 11:24:46 > Onderwerp: Re: [FieldTrip] questions about forward calculations > > Hi Margit > I could replicate the behavior that you described in point 1) the last > email and at the moment we are checking that all required options > within FieldFrip and OpenMEEG are set correctly. > For your points 2) and 3) I could not replicate the problem. > Everything should work fine if the units of the sensors and the volume > conductor are consistent. > However, we are working to make units management more handy for the > users, so that ambiguities like this can be solved. Please, keep > posted on the mailing list to track the changes in the near future. > > Could you maybe paste your source code here in the mailing list? > > Cheers, > Cristiano > > > > > ----- "Alexandre Gramfort" schreef: > > > Van: "Alexandre Gramfort" > > Aan: "Email discussion list for the FieldTrip project" > , "c micheli" > > , "Margit Schoenherr" > > > Verzonden: Dinsdag 25 oktober 2011 15:41:10 > > Onderwerp: Re: [FieldTrip] questions about forward calculations > > > > Hello Margit, > > > > > I have some questions regarding forward computations. > > > > > > 1) How is the definition of the EEG leadfield - does the dipole > > point from red to blue or from blue to red? I obtain different > results > > when I compute the leadfield of the same dipole either with a > > 3-concentric-spheres volume conductor or with BEM (openmeeg). > > > > do you say that you get different polarity for sphere and OpenMEEG? > > if > > it's the case my only > > guess it that the triangles of the boundary meshes are not properly > > oriented. Maybe Cristiano > > who looked at this recently can comment. > > > > does the toy example behave properly? In > > external/openmeeg/openmeeg_eeg_leadfield_example.m > > > > > 2) In which units are the leadfields given? For the > > 3-concentric-spheres volume conductor, the magnitude of the field > is > > 70, for BEM 2e-5. > > > > If the input meshes passed to OpenMEEG are in meters and dipole > > currents in Am then the leadfield should give EEG potentials in V. > > > > > 3) Also for MEG, the BEM leadfield is 1e-6 times smaller than the > > single sphere. For the single sphere model, the field strength is > > 1e-5. I think, this is Tesla and corresponds to a 1 Am dipole. But > the > > BEM forward field of the same dipole has strength 1e-11. What is > the > > unit here? > > > > Make sure your BEM surfaces are expressed in meters and not > > millimeters like it is often the > > case in MRI coordinates, and tell me if you still see some > > inconsistent results. > > > > Best, > > Alex > > -- > > Alexandre Gramfort, PhD > > gramfort at nmr.mgh.harvard.edu > > Dept. of Radiology MGH Martinos Center / Harvard Medical School > > http://www-sop.inria.fr/members/Alexandre.Gramfort/ > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip