From amrgermany at YAHOO.COM Mon Aug 3 13:33:11 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Mon, 3 Aug 2009 11:33:11 +0000 Subject: Significance plot of TFR-Morlet Message-ID: Hi everyone, How do I produce a significance plot of the "Time Frequency Representations of power calculated using Morlet wavelets"? Best regards, Amr Ayoub ---------------------------------- 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 ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 3 14:09:41 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 3 Aug 2009 14:09:41 +0200 Subject: Significance plot of TFR-Morlet In-Reply-To: <428227.44019.qm@web23608.mail.ird.yahoo.com> Message-ID: Dear Amr, >>From your question I can not make up what you already tried and where you run into problems, so I'll give you some basic handles to info at the FieldTrip wiki (and also see the help of the functions below). A nice overview on plotting functions in to be found in the plotting Tutorial: http://fieldtrip.fcdonders.nl/tutorial/plotting Did you try singleplotTFR, multiplotTFR or topoplotTFR with cfg.maskparameter options? There is also clusterplot but see the mailinglist posts that have been about that recently for limitations of clusterplot (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0907 &L=fieldtrip&T=0&F=&S=&P=4160) Hope this helps you further, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Monday, August 03, 2009 1:33 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Significance plot of TFR-Morlet Hi everyone, How do I produce a significance plot of the "Time Frequency Representations of power calculated using Morlet wavelets"? Best regards, Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 3 16:25:16 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 3 Aug 2009 16:25:16 +0200 Subject: FW: [FIELDTRIP] Significance plot of TFR-Morlet Message-ID: Please always send replies to the list and not only to the person that responded, so everyone can benefit and answer. _____ From: Amr Ayoub [mailto:amrgermany at yahoo.com] Sent: Monday, August 03, 2009 4:13 PM To: ingrid.nieuwenhuis at donders.ru.nl Subject: Re: [FIELDTRIP] Significance plot of TFR-Morlet Dear Ingrid, Thanks for your fast reply. Maybe I should rephrase my question. I have used singleplotTFR with cfg.basleine = [-1.8 1.8] cfg.basleinetype='relative' cfg.xlim=[-.5 .5] cfg.ylim=[10 106] cfg.zlim=[-1.8 1.8] I see red spots corresponding to high gamma activity but I don't know if they are significant or not. These red spots are scattered on different channels, time points and frequencies. Do you think taking 200 surrogate time points of the power spectrum assuming a normal distribution of the surrogate power values, a significance threshold can be calculated by two tailed test? threshold = norminv([(1-alpha/2)],M,SD), where alpha=0.01, M=mean and SD = standard deviation Then subtract this threshold from the powerspctrm and last but not least use singleplotTFR? Thanks for your help. Best regards, Amr Ps. To double check, is normalization applied to each frequency band in the singleplotTFR? Note: cf.maskparameter is a new option in singleplotTFR. _____ From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Monday, August 3, 2009 2:09:41 PM Subject: Re: [FIELDTRIP] Significance plot of TFR-Morlet Dear Amr, >>From your question I can not make up what you already tried and where you run into problems, so I'll give you some basic handles to info at the FieldTrip wiki (and also see the help of the functions below). A nice overview on plotting functions in to be found in the plotting Tutorial: http://fieldtrip.fcdonders.nl/tutorial/plotting Did you try singleplotTFR, multiplotTFR or topoplotTFR with cfg.maskparameter options? There is also clusterplot but see the mailinglist posts that have been about that recently for limitations of clusterplot (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0907 &L=fieldtrip&T=0&F=&S=&P=4160) Hope this helps you further, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Monday, August 03, 2009 1:33 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Significance plot of TFR-Morlet Hi everyone, How do I produce a significance plot of the "Time Frequency Representations of power calculated using Morlet wavelets"? Best regards, Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 amrgermany at YAHOO.COM Mon Aug 3 13:33:11 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Mon, 3 Aug 2009 11:33:11 +0000 Subject: Significance plot of TFR-Morlet Message-ID: From ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 3 14:09:41 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 3 Aug 2009 14:09:41 +0200 Subject: Significance plot of TFR-Morlet In-Reply-To: <428227.44019.qm@web23608.mail.ird.yahoo.com> Message-ID: From jrkerlin at UCDAVIS.EDU Tue Aug 4 02:57:00 2009 From: jrkerlin at UCDAVIS.EDU (Jess R. Kerlin) Date: Mon, 3 Aug 2009 17:57:00 -0700 Subject: bdf files Message-ID: FTers, While trying to preprocess data *.bdf data in a recent version of FT (July 11th, 09). I get spikes in a significant subset of trials (sudden, unpredicatable jumps to ~8000 uV). I know these spikes are not present in the BDF files (no problems loading in BESA). FT does not detect an error, although one is clearly present. I've had different issues with previous versions of FT when loading in BDF's before using the biosig toolbox, but it looks like the newer code was largely ported from EEGLAB. Anyone know what's up? Thanks, Jess ---------------------------------- 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. From j.poort at NIN.KNAW.NL Wed Aug 5 10:43:29 2009 From: j.poort at NIN.KNAW.NL (Jasper Poort) Date: Wed, 5 Aug 2009 10:43:29 +0200 Subject: fourierspectra and freqstatistics Message-ID: Dear all, I have the following question I want to compare the powerspectra in two conditions for individual channels. When I first run freqanalyis with cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; this results in a power spectrum for two conditions: size(A.powspctrm): 943 1 19 48 ntrials x nchannels x nfrequency x ntime size(A.cumtapcnt): 943 19 I can then compare the powerspectra in two conditions by running freqstatistics with: cfg = []; cfg.method = 'analytic'; cfg.statistic = 'indepsamplesT'; ntrl1 = size(A.powspctrm,1); ntrl2 = size(B.powspctrm,1); design = zeros(1,ntrl1 + ntrl2); design(1,1:ntrl1) = 1; design(1,(ntrl1+1):(ntrl1+ntrl2)) = 2; cfg.design = design; cfg.ivar = 1; % independent variable stat = freqstatistics(cfg,A, B); differencepowspctrm = stat.stat; However, when I use freqanalyis with cfg.output = 'fourier'; this results in a fourier spectrum for two conditions: size(A.fourierspctrm): 4715 1 19 48 (ntapers (in my case 5) x ntrials) x nchannels x nfrequency x ntime size(A.cumtapcnt) : 943 1 Can I input these fourier spectra directly to freqstatistics or should I convert the fourierspectrum first to a powerspectrum (I assume this could be done by taking abs(fourierspectrum).^2 and then averaging over tapers for every trial ) ? Alternatively, is it at all possible to first run freqdescriptives and then input the averages and variance into freqstatistics (since this is the only thing necessary for the independent t-test)? Many thanks in advance, best, Jasper ---------------------------------- 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 j.schoffelen at PSY.GLA.AC.UK Wed Aug 5 10:50:18 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Aug 2009 09:50:18 +0100 Subject: fourierspectra and freqstatistics In-Reply-To: <000001ca15a8$ce549860$6afdc920$@poort@nin.knaw.nl> Message-ID: Dear Jasper, > Can I input these fourier spectra directly to freqstatistics or > should I convert the fourierspectrum first to a powerspectrum (I > assume this could be done by taking abs(fourierspectrum).^2 and > then averaging over tapers for every trial ) ? I suspect that you cannot directly put fourierspectra into freqstatistics when you want to perform a T-test on the power. I always throw the frequency data at freqdescriptives (with cfg.keeptrials = 'yes'); this should give you single trial power spectra. Then you can use the 'montecarlo' or 'analytic' method for statistical inference. You can indeed also compute the variance in freqdescriptives, but I am not sure how to get to a T-value using fieldtrip there. At least you won't get there using the 'statfuns'. Best, JM ---------------------------------- 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 rion_raman at REDIFFMAIL.COM Wed Aug 5 21:52:49 2009 From: rion_raman at REDIFFMAIL.COM (rion) Date: Wed, 5 Aug 2009 19:52:49 -0000 Subject: Multitaper analysis Message-ID: Dear Fieldtrippers, I am new comer to Fieldtrip. I have a question on the Multitaper method (mtmconvol) when used on EMG signal analysis. If i am right the method works in this way, the tapers are multipied with the data in the time domain and then the tapered data is fourier transformed and the auto and cross spectra are calculated followed by the averaging of the tapers. The EMG in my case is rectified and then it has only positive values now the multiplication of the tapers with the rectified EMG gives out some negative values due to the dpss tapers (For ex: 7 Tapers) in the time domain. These negative values are not relevant to the EMG signal. How are these values used in the latter analysis. I am missing something here any hint will be helpfull. With regards, rion. ---------------------------------- 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 amrgermany at YAHOO.COM Thu Aug 6 13:56:00 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Thu, 6 Aug 2009 11:56:00 +0000 Subject: freqanalysis_wltconvol variance In-Reply-To: <428227.44019.qm@web23608.mail.ird.yahoo.com> Message-ID: Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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 ingrid.nieuwenhuis at DONDERS.RU.NL Thu Aug 6 14:26:28 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Thu, 6 Aug 2009 14:26:28 +0200 Subject: freqanalysis_wltconvol variance In-Reply-To: <124221.38146.qm@web23607.mail.ird.yahoo.com> Message-ID: Dear Amr, If you do freqanalysis with cfg.keeptrials = 'yes', you get the power per trial. If you subsequently use freqdescriptives (see help for detailed options) you can compute the variance over trials. Best Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Thursday, August 06, 2009 1:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_wltconvol variance Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 amrgermany at YAHOO.COM Thu Aug 6 16:21:14 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Thu, 6 Aug 2009 14:21:14 +0000 Subject: freqanalysis_wltconvol variance In-Reply-To: <010a01ca1691$1f28b170$642dae83@fcdonders.nl> Message-ID: Dear Ingrid, Thanks for your speedy reply. Best regards, Amr Ayoub ________________________________ From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, August 6, 2009 2:26:28 PM Subject: Re: [FIELDTRIP] freqanalysis_wltconvol variance Dear Amr, If you do freqanalysis with cfg.keeptrials = ‘yes’, you get the power per trial. If you subsequently use freqdescriptives (see help for detailed options) you can compute the variance over trials. Best Ingrid ________________________________ From:FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Thursday, August 06, 2009 1:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_wltconvol variance Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 manish.saggar at GMAIL.COM Fri Aug 7 06:24:50 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Thu, 6 Aug 2009 23:24:50 -0500 Subject: non-parametric statistics across condition, time and groups Message-ID: Dear All, I am analyzing spatio-spectral differences longitudinally in EEG data. We have two groups of subjects. Thus I want to do non-parametric analysis of spatio-spectral data across condition, time and groups. I am wondering if that is possible via design parameter in freqstatistics function. Or should I take some values out of freqstats function and put them in SPSS or something for finding interactions between time and condition or time and group. Any help is appreciated. Regards, Manish ---------------------------------- 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. From lmeyer at CBS.MPG.DE Fri Aug 7 14:22:46 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 14:22:46 +0200 Subject: automatic EOG rejection In-Reply-To: <24840676.977201249647542774.JavaMail.root@zimbra> Message-ID: dear all, (newest fieldtrip, newest matlab) trying automatic EOG artifact rejection, i get the following error: In fetch_data at 111 In artifact_zvalue at 213 In artifact_eog at 179 Warning: data contains NaNs, no filtering applied workflow was (these all worked): - reading continous data to memory - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) - appending EOG channels - re-refercing - filtering - epoching according to triggers while trying automatic rejection comes the error; visual rejection just works fine. in the olf fieldtrip version, the error message said "not all samples are present in the data". i checked the data structure; the merged EOG channels have been correctly appended and labelled. attached is my code, thanks a lot in advance! all best, lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ---------------------------------- 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. From lmeyer at CBS.MPG.DE Fri Aug 7 14:47:21 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 14:47:21 +0200 Subject: automatic EOG rejection In-Reply-To: <21424912.980871249649239496.JavaMail.root@zimbra> Message-ID: (the code) Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ---------------------------------- 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 embedded and charset-unspecified text was scrubbed... Name: ft_schimi.txt URL: From ingrid.nieuwenhuis at DONDERS.RU.NL Fri Aug 7 15:08:06 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 7 Aug 2009 15:08:06 +0200 Subject: automatic EOG rejection In-Reply-To: <14776683.977331249647766825.JavaMail.root@zimbra> Message-ID: Dear Lars, The error message means that fetch_data tries to fetch data outside of your trials where there is no data supplied in the input data file. Fetch_data was recently changed and now puts NaNs where there is no data. But filtering data with NaNs is not a good idea, therefore the warning. What happens is in artifact_eog is that the data is padded, or better said, there is an attempt to pad the data. This is done to avoid filter artifact at the edges, and for optimal artifact detections at/just over the border (which can influence filtering). This padding doesn't work because in the input data you supplied there is no extra data which can be used for padding. Therefore the NaN's or the error that not all samples are present in the data. Would you can do is epoch the data into trials after artifact detection. So first detect and reject artifacts, and then use redefinetrial (give the trl you have now) to epoch the data. Hope this helps, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 2:23 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] automatic EOG rejection > > dear all, > > (newest fieldtrip, newest matlab) > > trying automatic EOG artifact rejection, i get the following error: > > In fetch_data at 111 > In artifact_zvalue at 213 > In artifact_eog at 179 > Warning: data contains NaNs, no filtering applied > > > workflow was (these all worked): > > - reading continous data to memory > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > - appending EOG channels > - re-refercing > - filtering > - epoching according to triggers > > > while trying automatic rejection comes the error; visual rejection just > works fine. in the olf fieldtrip version, the error message said "not all > samples are present in the data". i checked the data structure; the merged > EOG channels have been correctly appended and labelled. attached is my > code, thanks a lot in advance! > > > all best, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ---------------------------------- > 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. From lmeyer at CBS.MPG.DE Fri Aug 7 15:59:37 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 15:59:37 +0200 Subject: automatic EOG rejection In-Reply-To: <32069397.985751249653328816.JavaMail.root@zimbra> Message-ID: dear ingrid, thanks a lot, I greatly appreciate your immediate response! what you suggest was what I was trying next :-). I already had suspected the padding to be my problem. however, 'artifact_eog' always tries to fetch 'trl' >> error: ??? Reference to non-existent field 'trl'. Error in ==> artifact_eog at 165 tmpcfg.trl = cfg.trl; as soon as i declare cfg.trl = data_org.cfg.trl i.e. get 'trl' from the original, continuous data structure in memory (data_org), matlab errors Input must be a row vector of characters thanks a lot in advance, and have a good weekend, lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ----- Ursprüngliche Mail ----- Von: "Ingrid Nieuwenhuis" An: FIELDTRIP at NIC.SURFNET.NL Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: [FIELDTRIP] automatic EOG rejection Dear Lars, The error message means that fetch_data tries to fetch data outside of your trials where there is no data supplied in the input data file. Fetch_data was recently changed and now puts NaNs where there is no data. But filtering data with NaNs is not a good idea, therefore the warning. What happens is in artifact_eog is that the data is padded, or better said, there is an attempt to pad the data. This is done to avoid filter artifact at the edges, and for optimal artifact detections at/just over the border (which can influence filtering). This padding doesn't work because in the input data you supplied there is no extra data which can be used for padding. Therefore the NaN's or the error that not all samples are present in the data. Would you can do is epoch the data into trials after artifact detection. So first detect and reject artifacts, and then use redefinetrial (give the trl you have now) to epoch the data. Hope this helps, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 2:23 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] automatic EOG rejection > > dear all, > > (newest fieldtrip, newest matlab) > > trying automatic EOG artifact rejection, i get the following error: > > In fetch_data at 111 > In artifact_zvalue at 213 > In artifact_eog at 179 > Warning: data contains NaNs, no filtering applied > > > workflow was (these all worked): > > - reading continous data to memory > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > - appending EOG channels > - re-refercing > - filtering > - epoching according to triggers > > > while trying automatic rejection comes the error; visual rejection just > works fine. in the olf fieldtrip version, the error message said "not all > samples are present in the data". i checked the data structure; the merged > EOG channels have been correctly appended and labelled. attached is my > code, thanks a lot in advance! > > > all best, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ---------------------------------- > 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. ---------------------------------- 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. From ingrid.nieuwenhuis at DONDERS.RU.NL Fri Aug 7 16:20:18 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 7 Aug 2009 16:20:18 +0200 Subject: automatic EOG rejection In-Reply-To: <17239275.985841249653577276.JavaMail.root@zimbra> Message-ID: Dear Lars, Don't understand what is wrong with your data_org trial. The trl definition has 3 columns per trial: first sample of trial, last sample of trial and offset, did your data_org.cfg.trl have that? Anyways you can "epoch" your data to one long single trial trl = [1 last_sample 0] or use trialfun_general in definetrial with cfg.ntrials = 1; and cfg.triallength = inf; Then do artifact detection/rejection and then redefine trial to real epochs based on triggers. Would that work? Have a nice weekend too, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 4:00 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > dear ingrid, > > thanks a lot, I greatly appreciate your immediate response! > what you suggest was what I was trying next :-). I already had suspected > the padding to be my problem. > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > ??? Reference to non-existent field 'trl'. > Error in ==> artifact_eog at 165 > tmpcfg.trl = cfg.trl; > > > as soon as i declare > > cfg.trl = data_org.cfg.trl > > > i.e. get 'trl' from the original, continuous data structure in memory > (data_org), matlab errors > > Input must be a row vector of characters > > > thanks a lot in advance, and have a good weekend, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > The error message means that fetch_data tries to fetch data outside of > your > trials where there is no data supplied in the input data file. Fetch_data > was recently changed and now puts NaNs where there is no data. But > filtering > data with NaNs is not a good idea, therefore the warning. > > What happens is in artifact_eog is that the data is padded, or better > said, > there is an attempt to pad the data. This is done to avoid filter artifact > at the edges, and for optimal artifact detections at/just over the border > (which can influence filtering). This padding doesn't work because in the > input data you supplied there is no extra data which can be used for > padding. Therefore the NaN's or the error that not all samples are present > in the data. > > Would you can do is epoch the data into trials after artifact detection. > So > first detect and reject artifacts, and then use redefinetrial (give the > trl > you have now) to epoch the data. > > Hope this helps, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 2:23 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] automatic EOG rejection > > > > dear all, > > > > (newest fieldtrip, newest matlab) > > > > trying automatic EOG artifact rejection, i get the following error: > > > > In fetch_data at 111 > > In artifact_zvalue at 213 > > In artifact_eog at 179 > > Warning: data contains NaNs, no filtering applied > > > > > > workflow was (these all worked): > > > > - reading continous data to memory > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > - appending EOG channels > > - re-refercing > > - filtering > > - epoching according to triggers > > > > > > while trying automatic rejection comes the error; visual rejection just > > works fine. in the olf fieldtrip version, the error message said "not > all > > samples are present in the data". i checked the data structure; the > merged > > EOG channels have been correctly appended and labelled. attached is my > > code, thanks a lot in advance! > > > > > > all best, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. From lmeyer at CBS.MPG.DE Fri Aug 7 17:21:52 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 17:21:52 +0200 Subject: automatic EOG rejection In-Reply-To: <014501ca176a$30d9c1f0$642dae83@fcdonders.nl> Message-ID: Dear Ingrid, thank you so much for your help today, you rescued my weekend: Padding the onset and offset (in samples) of the initial single trial did the trick! All best, Lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ----- Ursprüngliche Mail ----- Von: "Ingrid Nieuwenhuis" An: FIELDTRIP at NIC.SURFNET.NL Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: [FIELDTRIP] automatic EOG rejection Dear Lars, Don't understand what is wrong with your data_org trial. The trl definition has 3 columns per trial: first sample of trial, last sample of trial and offset, did your data_org.cfg.trl have that? Anyways you can "epoch" your data to one long single trial trl = [1 last_sample 0] or use trialfun_general in definetrial with cfg.ntrials = 1; and cfg.triallength = inf; Then do artifact detection/rejection and then redefine trial to real epochs based on triggers. Would that work? Have a nice weekend too, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 4:00 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > dear ingrid, > > thanks a lot, I greatly appreciate your immediate response! > what you suggest was what I was trying next :-). I already had suspected > the padding to be my problem. > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > ??? Reference to non-existent field 'trl'. > Error in ==> artifact_eog at 165 > tmpcfg.trl = cfg.trl; > > > as soon as i declare > > cfg.trl = data_org.cfg.trl > > > i.e. get 'trl' from the original, continuous data structure in memory > (data_org), matlab errors > > Input must be a row vector of characters > > > thanks a lot in advance, and have a good weekend, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > The error message means that fetch_data tries to fetch data outside of > your > trials where there is no data supplied in the input data file. Fetch_data > was recently changed and now puts NaNs where there is no data. But > filtering > data with NaNs is not a good idea, therefore the warning. > > What happens is in artifact_eog is that the data is padded, or better > said, > there is an attempt to pad the data. This is done to avoid filter artifact > at the edges, and for optimal artifact detections at/just over the border > (which can influence filtering). This padding doesn't work because in the > input data you supplied there is no extra data which can be used for > padding. Therefore the NaN's or the error that not all samples are present > in the data. > > Would you can do is epoch the data into trials after artifact detection. > So > first detect and reject artifacts, and then use redefinetrial (give the > trl > you have now) to epoch the data. > > Hope this helps, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 2:23 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] automatic EOG rejection > > > > dear all, > > > > (newest fieldtrip, newest matlab) > > > > trying automatic EOG artifact rejection, i get the following error: > > > > In fetch_data at 111 > > In artifact_zvalue at 213 > > In artifact_eog at 179 > > Warning: data contains NaNs, no filtering applied > > > > > > workflow was (these all worked): > > > > - reading continous data to memory > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > - appending EOG channels > > - re-refercing > > - filtering > > - epoching according to triggers > > > > > > while trying automatic rejection comes the error; visual rejection just > > works fine. in the olf fieldtrip version, the error message said "not > all > > samples are present in the data". i checked the data structure; the > merged > > EOG channels have been correctly appended and labelled. attached is my > > code, thanks a lot in advance! > > > > > > all best, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. ---------------------------------- 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. From ingrid.nieuwenhuis at DONDERS.RU.NL Fri Aug 7 17:46:41 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 7 Aug 2009 17:46:41 +0200 Subject: automatic EOG rejection In-Reply-To: <19054670.989111249658512414.JavaMail.root@zimbra> Message-ID: My pleasure :) Did you have to do this padding manually? And did you pad the long trial with zeros or something extending the specified trial? I can imagine that also with one long trial you still get in trouble at the edges. Would be nice to have a final reply and describe exactly what you did (also useful for the archive) I'll also see if I can find a simple way to deal with it in the code... Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 5:22 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > Dear Ingrid, > > thank you so much for your help today, you rescued my weekend: Padding the > onset and offset (in samples) of the initial single trial did the trick! > > > All best, > Lars > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > Don't understand what is wrong with your data_org trial. The trl > definition > has 3 columns per trial: first sample of trial, last sample of trial and > offset, did your data_org.cfg.trl have that? > > Anyways you can "epoch" your data to one long single trial > > trl = [1 last_sample 0] > or use trialfun_general in definetrial with cfg.ntrials = 1; and > cfg.triallength = inf; > > Then do artifact detection/rejection and then redefine trial to real > epochs > based on triggers. Would that work? > > Have a nice weekend too, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 4:00 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] automatic EOG rejection > > > > dear ingrid, > > > > thanks a lot, I greatly appreciate your immediate response! > > what you suggest was what I was trying next :-). I already had suspected > > the padding to be my problem. > > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > > > ??? Reference to non-existent field 'trl'. > > Error in ==> artifact_eog at 165 > > tmpcfg.trl = cfg.trl; > > > > > > as soon as i declare > > > > cfg.trl = data_org.cfg.trl > > > > > > i.e. get 'trl' from the original, continuous data structure in memory > > (data_org), matlab errors > > > > Input must be a row vector of characters > > > > > > thanks a lot in advance, and have a good weekend, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ----- Ursprüngliche Mail ----- > > Von: "Ingrid Nieuwenhuis" > > An: FIELDTRIP at NIC.SURFNET.NL > > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > > > Dear Lars, > > > > The error message means that fetch_data tries to fetch data outside of > > your > > trials where there is no data supplied in the input data file. > Fetch_data > > was recently changed and now puts NaNs where there is no data. But > > filtering > > data with NaNs is not a good idea, therefore the warning. > > > > What happens is in artifact_eog is that the data is padded, or better > > said, > > there is an attempt to pad the data. This is done to avoid filter > artifact > > at the edges, and for optimal artifact detections at/just over the > border > > (which can influence filtering). This padding doesn't work because in > the > > input data you supplied there is no extra data which can be used for > > padding. Therefore the NaN's or the error that not all samples are > present > > in the data. > > > > Would you can do is epoch the data into trials after artifact detection. > > So > > first detect and reject artifacts, and then use redefinetrial (give the > > trl > > you have now) to epoch the data. > > > > Hope this helps, > > Best Ingrid > > > > > -----Original Message----- > > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > > Behalf Of Lars Meyer > > > Sent: Friday, August 07, 2009 2:23 PM > > > To: FIELDTRIP at NIC.SURFNET.NL > > > Subject: [FIELDTRIP] automatic EOG rejection > > > > > > dear all, > > > > > > (newest fieldtrip, newest matlab) > > > > > > trying automatic EOG artifact rejection, i get the following error: > > > > > > In fetch_data at 111 > > > In artifact_zvalue at 213 > > > In artifact_eog at 179 > > > Warning: data contains NaNs, no filtering applied > > > > > > > > > workflow was (these all worked): > > > > > > - reading continous data to memory > > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > > - appending EOG channels > > > - re-refercing > > > - filtering > > > - epoching according to triggers > > > > > > > > > while trying automatic rejection comes the error; visual rejection > just > > > works fine. in the olf fieldtrip version, the error message said "not > > all > > > samples are present in the data". i checked the data structure; the > > merged > > > EOG channels have been correctly appended and labelled. attached is my > > > code, thanks a lot in advance! > > > > > > > > > all best, > > > lars > > > > > > > > > Lars Meyer | MSc > > > Max Planck Institute for Human Cognitive & Brain Sciences > > > Department of Neuropsychology > > > Stephanstraße 1a > > > 04103 Leipzig | Germany > > > > > > Office | +49 (0)341 99 40 22 66 > > > Fax | +49 (0)341 99 40 22 60 > > > Mobile | +49 (0)175 113 76 65 > > > Home | +49 (0)341 974 26 49 > > > Mail | lmeyer at cbs.mpg.de > > > Web | www.cbs.mpg.de/~lmeyer > > > > > > ---------------------------------- > > > 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. > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. From lmeyer at CBS.MPG.DE Fri Aug 7 19:25:26 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 19:25:26 +0200 Subject: automatic EOG rejection In-Reply-To: <015901ca1776$41f1dcf0$642dae83@fcdonders.nl> Message-ID: Hey, I think, there was just an artifact right at the edge of the long trial (amplifier start, something like that), so artifact_eog tried to pad into a time before the trial (?). I basically added 100 to the (1,1) and substracted 100 from (1,2) of the original .trl. I know it would be better to ADD something to the original data (append some empty samples) so even these artifacts can be automatically removed, but I had to do it quick and dirty today :-)... and I know anyway that there are no real trials involved 100 samples near the edges. Best, Lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ----- Ursprüngliche Mail ----- Von: "Ingrid Nieuwenhuis" An: FIELDTRIP at NIC.SURFNET.NL Gesendet: Freitag, 7. August 2009 17:46:41 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: [FIELDTRIP] automatic EOG rejection My pleasure :) Did you have to do this padding manually? And did you pad the long trial with zeros or something extending the specified trial? I can imagine that also with one long trial you still get in trouble at the edges. Would be nice to have a final reply and describe exactly what you did (also useful for the archive) I'll also see if I can find a simple way to deal with it in the code... Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 5:22 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > Dear Ingrid, > > thank you so much for your help today, you rescued my weekend: Padding the > onset and offset (in samples) of the initial single trial did the trick! > > > All best, > Lars > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > Don't understand what is wrong with your data_org trial. The trl > definition > has 3 columns per trial: first sample of trial, last sample of trial and > offset, did your data_org.cfg.trl have that? > > Anyways you can "epoch" your data to one long single trial > > trl = [1 last_sample 0] > or use trialfun_general in definetrial with cfg.ntrials = 1; and > cfg.triallength = inf; > > Then do artifact detection/rejection and then redefine trial to real > epochs > based on triggers. Would that work? > > Have a nice weekend too, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 4:00 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] automatic EOG rejection > > > > dear ingrid, > > > > thanks a lot, I greatly appreciate your immediate response! > > what you suggest was what I was trying next :-). I already had suspected > > the padding to be my problem. > > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > > > ??? Reference to non-existent field 'trl'. > > Error in ==> artifact_eog at 165 > > tmpcfg.trl = cfg.trl; > > > > > > as soon as i declare > > > > cfg.trl = data_org.cfg.trl > > > > > > i.e. get 'trl' from the original, continuous data structure in memory > > (data_org), matlab errors > > > > Input must be a row vector of characters > > > > > > thanks a lot in advance, and have a good weekend, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ----- Ursprüngliche Mail ----- > > Von: "Ingrid Nieuwenhuis" > > An: FIELDTRIP at NIC.SURFNET.NL > > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > > > Dear Lars, > > > > The error message means that fetch_data tries to fetch data outside of > > your > > trials where there is no data supplied in the input data file. > Fetch_data > > was recently changed and now puts NaNs where there is no data. But > > filtering > > data with NaNs is not a good idea, therefore the warning. > > > > What happens is in artifact_eog is that the data is padded, or better > > said, > > there is an attempt to pad the data. This is done to avoid filter > artifact > > at the edges, and for optimal artifact detections at/just over the > border > > (which can influence filtering). This padding doesn't work because in > the > > input data you supplied there is no extra data which can be used for > > padding. Therefore the NaN's or the error that not all samples are > present > > in the data. > > > > Would you can do is epoch the data into trials after artifact detection. > > So > > first detect and reject artifacts, and then use redefinetrial (give the > > trl > > you have now) to epoch the data. > > > > Hope this helps, > > Best Ingrid > > > > > -----Original Message----- > > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > > Behalf Of Lars Meyer > > > Sent: Friday, August 07, 2009 2:23 PM > > > To: FIELDTRIP at NIC.SURFNET.NL > > > Subject: [FIELDTRIP] automatic EOG rejection > > > > > > dear all, > > > > > > (newest fieldtrip, newest matlab) > > > > > > trying automatic EOG artifact rejection, i get the following error: > > > > > > In fetch_data at 111 > > > In artifact_zvalue at 213 > > > In artifact_eog at 179 > > > Warning: data contains NaNs, no filtering applied > > > > > > > > > workflow was (these all worked): > > > > > > - reading continous data to memory > > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > > - appending EOG channels > > > - re-refercing > > > - filtering > > > - epoching according to triggers > > > > > > > > > while trying automatic rejection comes the error; visual rejection > just > > > works fine. in the olf fieldtrip version, the error message said "not > > all > > > samples are present in the data". i checked the data structure; the > > merged > > > EOG channels have been correctly appended and labelled. attached is my > > > code, thanks a lot in advance! > > > > > > > > > all best, > > > lars > > > > > > > > > Lars Meyer | MSc > > > Max Planck Institute for Human Cognitive & Brain Sciences > > > Department of Neuropsychology > > > Stephanstraße 1a > > > 04103 Leipzig | Germany > > > > > > Office | +49 (0)341 99 40 22 66 > > > Fax | +49 (0)341 99 40 22 60 > > > Mobile | +49 (0)175 113 76 65 > > > Home | +49 (0)341 974 26 49 > > > Mail | lmeyer at cbs.mpg.de > > > Web | www.cbs.mpg.de/~lmeyer > > > > > > ---------------------------------- > > > 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. > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. ---------------------------------- 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. From awalther at UNI-MAINZ.DE Sun Aug 9 17:34:35 2009 From: awalther at UNI-MAINZ.DE (Walther Alexander) Date: Sun, 9 Aug 2009 17:34:35 +0200 Subject: topoplotTFR on planar gradients Message-ID: Dear Fieldtrip Users, I'd like to apply the multiplotTFR function on freqstatistic results. The MEG raw data were converted to planar gradient scores and passed freqanalysis. Using fieltrip version 2008-12-08, the error message 'unsupported MEG sensor type' occurres which goes back to prepare_layout.m, line 880. Apparently, though senstype.m gets me the right information (ctf275_planar) that should be used to create an appropriate layout, prepare_layout ignores this and directly heads for the error message. Planar gradient settings seem to struggle somehow with grad2lay.m (line 259). If I switch to Fieltrip-20090803, it will create the plot thats attached. My configuration settings read as follows: cfg.maskparameter = 'mask'; cfg.zparam = 'stat'; cfg.interactive = 'yes'; cfg.zlim = [-4 4]; figure, multiplotTFR(cfg,data) Given unconverted raw data, everything works out well. Any advice? Cheers Alex -- Alexander Walther Johannes-Gutenberg-University Mainz ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: multiplotTFR_planargradient_fieldtrip20090803.png Type: image/png Size: 8158 bytes Desc: not available URL: From lmeyer at CBS.MPG.DE Mon Aug 10 15:58:16 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Mon, 10 Aug 2009 15:58:16 +0200 Subject: automatic EOG rejection In-Reply-To: <014501ca176a$30d9c1f0$642dae83@fcdonders.nl> Message-ID: dear ingrid, i tried this now, works fine for the rejection (success!). but now, i'd have to find a way to: - get the events from the raw data (definetrial, okay) - keep only those in which there is no artifact (i have the list as output from the rejection, so far, so good) but, in the way you suggest, would fieldtrip not get the rejected trials again from the raw data, according to the triggers? right now i don't see how redefinetrial can both: - get real triggers from raw data and define trials (write a trl according to triggers) - only search those segments of the raw data that result from the rejection process (write a trl according to clean segments) i.e. what needs to be done is to check entries in the 'trigger-trial trl' for identity or overlap with entries in the 'rejection-trial trl'. can redefinetrial solve my problem? how? thank you so much, again! lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ----- Ursprüngliche Mail ----- Von: "Ingrid Nieuwenhuis" An: FIELDTRIP at NIC.SURFNET.NL Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: [FIELDTRIP] automatic EOG rejection Dear Lars, Don't understand what is wrong with your data_org trial. The trl definition has 3 columns per trial: first sample of trial, last sample of trial and offset, did your data_org.cfg.trl have that? Anyways you can "epoch" your data to one long single trial trl = [1 last_sample 0] or use trialfun_general in definetrial with cfg.ntrials = 1; and cfg.triallength = inf; Then do artifact detection/rejection and then redefine trial to real epochs based on triggers. Would that work? Have a nice weekend too, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 4:00 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > dear ingrid, > > thanks a lot, I greatly appreciate your immediate response! > what you suggest was what I was trying next :-). I already had suspected > the padding to be my problem. > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > ??? Reference to non-existent field 'trl'. > Error in ==> artifact_eog at 165 > tmpcfg.trl = cfg.trl; > > > as soon as i declare > > cfg.trl = data_org.cfg.trl > > > i.e. get 'trl' from the original, continuous data structure in memory > (data_org), matlab errors > > Input must be a row vector of characters > > > thanks a lot in advance, and have a good weekend, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > The error message means that fetch_data tries to fetch data outside of > your > trials where there is no data supplied in the input data file. Fetch_data > was recently changed and now puts NaNs where there is no data. But > filtering > data with NaNs is not a good idea, therefore the warning. > > What happens is in artifact_eog is that the data is padded, or better > said, > there is an attempt to pad the data. This is done to avoid filter artifact > at the edges, and for optimal artifact detections at/just over the border > (which can influence filtering). This padding doesn't work because in the > input data you supplied there is no extra data which can be used for > padding. Therefore the NaN's or the error that not all samples are present > in the data. > > Would you can do is epoch the data into trials after artifact detection. > So > first detect and reject artifacts, and then use redefinetrial (give the > trl > you have now) to epoch the data. > > Hope this helps, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 2:23 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] automatic EOG rejection > > > > dear all, > > > > (newest fieldtrip, newest matlab) > > > > trying automatic EOG artifact rejection, i get the following error: > > > > In fetch_data at 111 > > In artifact_zvalue at 213 > > In artifact_eog at 179 > > Warning: data contains NaNs, no filtering applied > > > > > > workflow was (these all worked): > > > > - reading continous data to memory > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > - appending EOG channels > > - re-refercing > > - filtering > > - epoching according to triggers > > > > > > while trying automatic rejection comes the error; visual rejection just > > works fine. in the olf fieldtrip version, the error message said "not > all > > samples are present in the data". i checked the data structure; the > merged > > EOG channels have been correctly appended and labelled. attached is my > > code, thanks a lot in advance! > > > > > > all best, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. ---------------------------------- 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. From ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 10 16:24:30 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 10 Aug 2009 16:24:30 +0200 Subject: automatic EOG rejection In-Reply-To: <29716492.1033511249912696701.JavaMail.root@zimbra> Message-ID: Hi Lars, What you can do is: 1- read in whole data as one trial with define trial -> you get a trl (Ntrx3) with one row 2- detect artifacts with artifact_eog -> you get an artifact (Nartx2) stating first and last sample of each artifact (you managed this if I'm correctly, but fiddled a bit with samples for padding, so make sure the artifact samples match the data!! 3- Then you can use redefinetrial to go from a trl with 1 row to a trl with all epochs based on the triggers (Ntrx3) 4- Finally you use rejectartifact which modifies your trl to not include the artifacts anymore. (see help for options, you can cut out only the artifacts leaving you with most data, but trials with "holes" or reject all trials completely when contaminated). Robert and I have worked recently on a databrowser which is also included in the more recent versions of FieldTrip. Although it still might be a little buggy/unstable (work in progress :) ) it might be quite useful for you to check stage 2, (if the artifacts match the data correctly) since it allows you to browse through the data and see which segments are marked as artifact. So if you read in the unfiddled data (with trl from stage 1) with the artifact field (you got after stage 2) in the browser you can see if your padding did not shift the artifacts with regard to the sample numbers. (Hope I'm clear enough in what I mean here). Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Monday, August 10, 2009 3:58 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > dear ingrid, > > i tried this now, works fine for the rejection (success!). but now, i'd > have to find a way to: > > - get the events from the raw data (definetrial, okay) > - keep only those in which there is no artifact (i have the list as output > from the rejection, so far, so good) > > but, in the way you suggest, would fieldtrip not get the rejected trials > again from the raw data, according to the triggers? right now i don't see > how redefinetrial can both: > > - get real triggers from raw data and define trials (write a trl according > to triggers) > - only search those segments of the raw data that result from the > rejection process (write a trl according to clean segments) > > i.e. what needs to be done is to check entries in the 'trigger-trial trl' > for identity or overlap with entries in the 'rejection-trial trl'. > > > can redefinetrial solve my problem? how? thank you so much, again! > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > Don't understand what is wrong with your data_org trial. The trl > definition > has 3 columns per trial: first sample of trial, last sample of trial and > offset, did your data_org.cfg.trl have that? > > Anyways you can "epoch" your data to one long single trial > > trl = [1 last_sample 0] > or use trialfun_general in definetrial with cfg.ntrials = 1; and > cfg.triallength = inf; > > Then do artifact detection/rejection and then redefine trial to real > epochs > based on triggers. Would that work? > > Have a nice weekend too, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 4:00 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] automatic EOG rejection > > > > dear ingrid, > > > > thanks a lot, I greatly appreciate your immediate response! > > what you suggest was what I was trying next :-). I already had suspected > > the padding to be my problem. > > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > > > ??? Reference to non-existent field 'trl'. > > Error in ==> artifact_eog at 165 > > tmpcfg.trl = cfg.trl; > > > > > > as soon as i declare > > > > cfg.trl = data_org.cfg.trl > > > > > > i.e. get 'trl' from the original, continuous data structure in memory > > (data_org), matlab errors > > > > Input must be a row vector of characters > > > > > > thanks a lot in advance, and have a good weekend, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ----- Ursprüngliche Mail ----- > > Von: "Ingrid Nieuwenhuis" > > An: FIELDTRIP at NIC.SURFNET.NL > > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > > > Dear Lars, > > > > The error message means that fetch_data tries to fetch data outside of > > your > > trials where there is no data supplied in the input data file. > Fetch_data > > was recently changed and now puts NaNs where there is no data. But > > filtering > > data with NaNs is not a good idea, therefore the warning. > > > > What happens is in artifact_eog is that the data is padded, or better > > said, > > there is an attempt to pad the data. This is done to avoid filter > artifact > > at the edges, and for optimal artifact detections at/just over the > border > > (which can influence filtering). This padding doesn't work because in > the > > input data you supplied there is no extra data which can be used for > > padding. Therefore the NaN's or the error that not all samples are > present > > in the data. > > > > Would you can do is epoch the data into trials after artifact detection. > > So > > first detect and reject artifacts, and then use redefinetrial (give the > > trl > > you have now) to epoch the data. > > > > Hope this helps, > > Best Ingrid > > > > > -----Original Message----- > > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > > Behalf Of Lars Meyer > > > Sent: Friday, August 07, 2009 2:23 PM > > > To: FIELDTRIP at NIC.SURFNET.NL > > > Subject: [FIELDTRIP] automatic EOG rejection > > > > > > dear all, > > > > > > (newest fieldtrip, newest matlab) > > > > > > trying automatic EOG artifact rejection, i get the following error: > > > > > > In fetch_data at 111 > > > In artifact_zvalue at 213 > > > In artifact_eog at 179 > > > Warning: data contains NaNs, no filtering applied > > > > > > > > > workflow was (these all worked): > > > > > > - reading continous data to memory > > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > > - appending EOG channels > > > - re-refercing > > > - filtering > > > - epoching according to triggers > > > > > > > > > while trying automatic rejection comes the error; visual rejection > just > > > works fine. in the olf fieldtrip version, the error message said "not > > all > > > samples are present in the data". i checked the data structure; the > > merged > > > EOG channels have been correctly appended and labelled. attached is my > > > code, thanks a lot in advance! > > > > > > > > > all best, > > > lars > > > > > > > > > Lars Meyer | MSc > > > Max Planck Institute for Human Cognitive & Brain Sciences > > > Department of Neuropsychology > > > Stephanstraße 1a > > > 04103 Leipzig | Germany > > > > > > Office | +49 (0)341 99 40 22 66 > > > Fax | +49 (0)341 99 40 22 60 > > > Mobile | +49 (0)175 113 76 65 > > > Home | +49 (0)341 974 26 49 > > > Mail | lmeyer at cbs.mpg.de > > > Web | www.cbs.mpg.de/~lmeyer > > > > > > ---------------------------------- > > > 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. > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. From ingrid.nieuwenhuis at DONDERS.RU.NL Tue Aug 11 13:53:18 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 11 Aug 2009 13:53:18 +0200 Subject: topoplotTFR on planar gradients In-Reply-To: <4A7EEC8B.5050800@uni-mainz.de> Message-ID: Dear Alex, It looks as if you forgot to do combineplanar after freqanalysis, since senstype is ctf275_planar. See http://fieldtrip.fcdonders.nl/tutorial/eventrelatedaveraging#calculate_the_p lanar_gradient for more info Important to get planar gradient power data you should first calculate planar gradient, then do freqanalysis and finally combine planar. (NOT first combine and then freqanalysis, since the combined planar gradient is always positive, and all frequencies will be messed up then) Hope this helps, Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Walther Alexander > Sent: Sunday, August 09, 2009 5:35 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] topoplotTFR on planar gradients > > Dear Fieldtrip Users, > > I'd like to apply the multiplotTFR function on freqstatistic results. > The MEG raw data were converted to planar gradient scores and passed > freqanalysis. Using fieltrip version 2008-12-08, the error message > 'unsupported MEG sensor type' occurres which goes back to > prepare_layout.m, line 880. Apparently, though senstype.m gets me the > right information (ctf275_planar) that should be used to create an > appropriate layout, prepare_layout ignores this and directly heads for > the error message. Planar gradient settings seem to struggle somehow > with grad2lay.m (line 259). If I switch to Fieltrip-20090803, it will > create the plot thats attached. My configuration settings read as follows: > > cfg.maskparameter = 'mask'; > cfg.zparam = 'stat'; > cfg.interactive = 'yes'; > cfg.zlim = [-4 4]; > figure, multiplotTFR(cfg,data) > > > Given unconverted raw data, everything works out well. Any advice? > > Cheers > > Alex > > -- > Alexander Walther > Johannes-Gutenberg-University Mainz > > > ---------------------------------- > 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. From thomas.hartmann at UNI-KONSTANZ.DE Wed Aug 12 11:15:18 2009 From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann) Date: Wed, 12 Aug 2009 11:15:18 +0200 Subject: correlation between biological and behavioral data Message-ID: hi, is it possible to perform a correlation between biological data and behavioral / questionaire data using fieldtrip? i have one dataset per subject with frequency-data. i want to correlate this data with data from a questionaire (one score per subject). thanx in advance, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) ---------------------------------- 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. From dsenkows at UKE.UNI-HAMBURG.DE Wed Aug 12 15:41:55 2009 From: dsenkows at UKE.UNI-HAMBURG.DE (Daniel Senkowski) Date: Wed, 12 Aug 2009 15:41:55 +0200 Subject: Volumesegment - GLNX86 IEEE floating point Message-ID: Hi everyone, I received the following error message when calling the volumesegment function. ??? Error using ==> spm_platform at 86 I don't think that "GLNX86" uses IEEE floating point ops. Does anyone has an idea how to fix this? Thank you, Daniel >> cfg = []; cfg.downsample = 2; cfg.coordinates = 'ctf'; seg = volumesegment(cfg, mri); the input is volume data with dimensions [256 256 256] assuming CTF coordinates for input, i.e. positive X-axis towards nasion and Y-axis through ears Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 32 In spm_create_vol at 14 In volumewrite_spm at 61 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 168 In spm_create_vol at 14 In volumewrite_spm at 61 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 196 In spm_create_vol at 14 In volumewrite_spm at 61 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 32 In spm_create_vol at 14 In spm_write_vol at 76 In volumewrite_spm at 62 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 168 In spm_create_vol at 14 In spm_write_vol at 76 In volumewrite_spm at 62 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 186 In spm_create_vol at 14 In spm_write_vol at 76 In volumewrite_spm at 62 In volumesegment at 222 performing the segmentation on the specified volume ??? Error using ==> spm_platform at 86 I don't think that "GLNX86" uses IEEE floating point ops. Error in ==> spm_vol_minc at 80 if ~spm_platform('bigend') & datatype~=2 & datatype~=2+128, datatype = datatype*256; end; Error in ==> spm_vol>subfunc at 99 if isempty(n), V=spm_vol_minc(p); Error in ==> spm_vol>subfunc1 at 62 v = subfunc(P(i,:)); Error in ==> spm_vol>subfunc2 at 51 V = subfunc1(P); Error in ==> spm_vol at 37 V = subfunc2(P); Error in ==> spm_segment>init_sp at 567 SP.VB = spm_vol(flags.priors); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 246 spm_segment(Va,cfg.template,flags); -- 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. J�rg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Ricarda Klein Prof. Dr. Dr. Uwe Koch-Gromus ---------------------------------- 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. From wibral at BIC.UNI-FRANKFURT.DE Thu Aug 13 13:43:00 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 13 Aug 2009 13:43:00 +0200 Subject: Open Positions at the Brain Imaging Center Frankfurt Message-ID: Dear Fieldtrip list users, Dr. Peter Uhlhaas from the Max Planck Institute for Brain Research, Dept. Neurophysiology asked me to post these positions related to MEG research at the Brain Imaging Center Frankfurt. Please note that prior experience with MEG is not required. Michael Wibral _______________________________ Postdoctoral Position in Brain Imaging _______________________________ A postdoctoral position in brain imaging is available at the Max Planck Institute for Brain Research, Department of Neurophysiology (Director: Professor W. Singer) in the group of Dr. Peter J. Uhlhaas. The successful applicant will work on projects examining neural oscillations in schizophrenia with magnetoencephalography (MEG) with advanced signal-processing analyses (Beamforming, Transfer Entropy). The position is in collaboration with Dr. Michael Wibral (Head: MEG-Unit, Brain Imaging Center Frankfurt). The ideal candidate should have a PhD in neuroimaging and expertise with a neuroimaging technique (EEG, MEG, fMRI/MRI). Prior experience with MEG is not a prerequisite. Excellent research opportunities are available at the nearby Brain Imaging Center. Applications from a physics or engineering background are welcome as well. Expertise in Matlab or another programming language is desirable. The position will run for two years. The successful applicant will receive a stipend, depending on qualification and years of working experience. The position will start on the 1st of January 2010. Informal inquiries can be directed to Peter Uhlhaas (uhlhaas at mpih-frankfurt.mpg.de). To apply, please send curriculum vitae, letter of interest, names and contact information of two references to: Peter Uhlhaas Max Planck Institute for Brain Research Department of Neurophysiology Deutschordenstr. 46 60528 Frankfurt am Main GERMANY ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From nela.cicmil at DPAG.OX.AC.UK Mon Aug 17 10:53:43 2009 From: nela.cicmil at DPAG.OX.AC.UK (Nela Cicmil) Date: Mon, 17 Aug 2009 09:53:43 +0100 Subject: beamformer tutorial - sourceplot/sourceinterpolate? Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From j.schoffelen at PSY.GLA.AC.UK Mon Aug 17 12:24:35 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Mon, 17 Aug 2009 11:24:35 +0100 Subject: beamformer tutorial - sourceplot/sourceinterpolate? In-Reply-To: <20090817085343.D383D58007@webmail223.herald.ox.ac.uk> Message-ID: Dear Nela, Are you using the tutorial data, or data of your own? Best, JM On 17 Aug 2009, at 09:53, Nela Cicmil wrote: > Dear all, > > I'm a new user of fieldtrip, and encounter a problem with sourceplot > and > sourceinterploate functions in the beamformer source analysis > tutorial. > > In the tutorial, when using the function sourceplot to plot the > source-interpolated data (that is produced by the function > sourceinterpolate), > my image created is completely different from the example in the > tutorial. > > Specifically, the functional brain activity seems extremely > magnified and is not > contained within the boundaries of the mri anatomy (the slices of > which are > plotted in a different order from the tutorial example image). This > image > problem occurs even when the instructions are followed (as far as I > am aware) > exactly, using the latest possible downloaded tutorial data. > Sourceplot works > fine when plotting mri segmented data. > > My guess is that this is related to the warning I receive from > sourceinterpolate > in the step before sourceplot: > > Warning: assuming that the units are "mm" >> In fieldtrip-20090808/private/estimate_units at 29 > In fieldtrip-20090808/private/convert_units at 128 > In sourceinterpolate at 208 > converting functional data from cm into mm > converting units from 'cm' to 'mm' > > - because making the units of the anatomical data 1000x smaller > *could* account > for the problem with my plotted image. But when > I try to fix these parameters, the warning appears: > > Warning: The option cfg.sourceunits is deprecated, support is no > longer guaranteed > The option cfg.mriunits is deprecated, support is no longer guaranteed > > - and it does not seem possible to change anything. I wonder if > anyone can help > me to work out a solution to this problem? > > Sorry to bother you with a query about a tutorial; it is just that I > would like > to have confidence that I can get the functions to work properly > before > attempting to analyze more complex data! > > Thanks in advance, > Nela > > ps. I am using fieldtrip 20090808 on a Mac 10.5.8 with matlab 7.8.0 > (R2009a), > and I have spm2 on my machine, working as far as I can tell. > > -- > Nela Cicmil > D.Phil Candidate, Neurophysiology > DPAG > University of Oxford > > > ---------------------------------- > 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. From nela.cicmil at DPAG.OX.AC.UK Mon Aug 17 12:07:11 2009 From: nela.cicmil at DPAG.OX.AC.UK (Nela Cicmil) Date: Mon, 17 Aug 2009 11:07:11 +0100 Subject: beamformer tutorial - sourceplot/sourceinterpolate? In-Reply-To: <101C51FD-D910-4F6C-BBE5-EFEEDB8415AB@psy.gla.ac.uk> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From amrgermany at YAHOO.COM Mon Aug 17 13:37:36 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Mon, 17 Aug 2009 11:37:36 +0000 Subject: Re2: [FIELDTRIP] freqanalysis_wltconvol variance In-Reply-To: <010a01ca1691$1f28b170$642dae83@fcdonders.nl> Message-ID: Dear Ingrid, The analysis is painfully slow; it would need weeks to finish. Is there a MEX implementation of the time freq. analysis? Which is faster wltconvol or mtmconvol? Below is the configuration of the time freq. analysis. cfg.sgn = 'MEG'; cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.foi = 40:2:100 ; cfg.toi = -1.4:0.01:1.4; cfg.keeptrials='yes'; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 0.5 sec cfg.taper = 'hanning'; TFR = freqanalysis(cfg, TFA_slo_fz); vs cfg.sgn = 'MEG'; cfg.method = 'wltconvol '; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 40:2:100 ; cfg.toi = -1.4:0.01:1.4; cfg.keeptrials='yes'; TFR = freqanalysis(cfg, TFA_slo_fz); Data configuration: Number of channels:151 Sampling rate:250 Number of trials:391 PC configuration: Windows Vista Business SP1 64 bit - Intel Core 2 CPU 6320 @ 1.86Ghz 1.86Ghz - RAM 4GB Best regards, Amr ________________________________ From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, August 6, 2009 2:26:28 PM Subject: Re: [FIELDTRIP] freqanalysis_wltconvol variance Dear Amr, If you do freqanalysis with cfg.keeptrials = ‘yes’, you get the power per trial. If you subsequently use freqdescriptives (see help for detailed options) you can compute the variance over trials. Best Ingrid ________________________________ From:FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Thursday, August 06, 2009 1:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_wltconvol variance Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 17 14:16:48 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 17 Aug 2009 14:16:48 +0200 Subject: Re2: [FIELDTRIP] freqanalysis_wltconvol variance In-Reply-To: <241368.52789.qm@web23602.mail.ird.yahoo.com> Message-ID: Dear Amr There is no MEX implementation. I'm quite sure (not 100% though, you could test with tic toc to be sure) that mtmconvol is faster than wltconvol. I do have some tips to speed up the analysis though: 1) make the timesteps smaller, for instance 0.05 sec in stead of 0.01 sec. You have a time window of 0.5 second, so your actual time resolution is quite limited anyway. 2) Do you really need a frequency resolution of 2 Hz? You could start with 5 Hz frequency steps and increase the resolution if needed later. Hope this helps a bit, Ingrid PS please don't put my name above the question so also others can feel free to answer the question. I don't mind answering questions (if they are well phrased and I happen to know the answer such as in your case :-)), but I also don't mind if others do ;-) _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Monday, August 17, 2009 1:38 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Re2: [FIELDTRIP] freqanalysis_wltconvol variance Dear Ingrid, The analysis is painfully slow; it would need weeks to finish. Is there a MEX implementation of the time freq. analysis? Which is faster wltconvol or mtmconvol? Below is the configuration of the time freq. analysis. cfg.sgn = 'MEG'; cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.foi = 40:2:100 ; cfg.toi = -1.4:0.01:1.4; cfg.keeptrials='yes'; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 0.5 sec cfg.taper = 'hanning'; TFR = freqanalysis(cfg, TFA_slo_fz); vs cfg.sgn = 'MEG'; cfg.method = 'wltconvol '; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 40:2:100 ; cfg.toi = -1.4:0.01:1.4; cfg.keeptrials='yes'; TFR = freqanalysis(cfg, TFA_slo_fz); Data configuration: Number of channels:151 Sampling rate:250 Number of trials:391 PC configuration: Windows Vista Business SP1 64 bit - Intel Core 2 CPU 6320 @ 1.86Ghz 1.86Ghz - RAM 4GB Best regards, Amr _____ From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, August 6, 2009 2:26:28 PM Subject: Re: [FIELDTRIP] freqanalysis_wltconvol variance Dear Amr, If you do freqanalysis with cfg.keeptrials = 'yes', you get the power per trial. If you subsequently use freqdescriptives (see help for detailed options) you can compute the variance over trials. Best Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Thursday, August 06, 2009 1:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_wltconvol variance Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 Roman.Freunberger at SBG.AC.AT Mon Aug 17 15:31:04 2009 From: Roman.Freunberger at SBG.AC.AT (Roman Freunberger) Date: Mon, 17 Aug 2009 15:31:04 +0200 Subject: Reading brainvision dat files Message-ID: Hello, I am a new fieldtrip user and would like to know how to read brainvision files that were exported as .dat into matlab with fieldtrip. It would be great to read segmented and/ or continous data into matlab that was preprocessed (artifact correction, ...) in brainvision analyzer. I tried read_data in combination with the read_header function and I always get this message: ??? Error using ==> zeros NaN and Inf not allowed. Error in ==> read_brainvision_eeg at 89 dat = zeros(endsample-begsample+1, hdr.NumberOfChannels); Error in ==> read_data at 686 dat = read_brainvision_eeg(filename, hdr.orig, begsample, endsample); Error in ==> ReadAnalyzerSegments at 7 data = read_data(filename); Thank you in advance and best wishes, Roman ********************************************************** Dr. Roman Freunberger Department of Psychology University of Salzburg Hellbrunnerstrasse 34 5020 Salzburg, Austria ---------------------------------- 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 j.schoffelen at PSY.GLA.AC.UK Mon Aug 17 17:41:28 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Mon, 17 Aug 2009 16:41:28 +0100 Subject: Reading brainvision dat files In-Reply-To: Message-ID: Dear Roman, I don't have a lot of experience dealing with brainvision files in fieldtrip, but it looks as though there's something going wrong with the allocation of the data matrix. Apparently, one of the input arguments into the function zeros(), is either not a number, or infinite. This means, that either the quantity endsample-begsmaple+1 is behaving strangely, or that the hdr.NumberOfChannels is faulty, which would point to a problem reading in the header information from your datafile. Best, jan-Mathijs On 17 Aug 2009, at 14:31, Roman Freunberger wrote: > Hello, > > I am a new fieldtrip user and would like to know how to read > brainvision files that were exported as .dat into matlab with > fieldtrip. It would be great to read segmented and/ or continous > data into matlab that was preprocessed (artifact correction, …) in > brainvision analyzer. I tried read_data in combination with the > read_header function and I always get this message: > > ??? Error using ==> zeros > NaN and Inf not allowed. > > Error in ==> read_brainvision_eeg at 89 > dat = zeros(endsample-begsample+1, hdr.NumberOfChannels); > > Error in ==> read_data at 686 > dat = read_brainvision_eeg(filename, hdr.orig, begsample, > endsample); > > Error in ==> ReadAnalyzerSegments at 7 > data = read_data(filename); > > Thank you in advance and best wishes, > Roman > > ********************************************************** > Dr. Roman Freunberger > Department of Psychology > University of Salzburg > Hellbrunnerstrasse 34 > 5020 Salzburg, Austria > > > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/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 nathanweisz at MAC.COM Wed Aug 19 10:46:00 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 19 Aug 2009 10:46:00 +0200 Subject: job offer at the University of Konstanz Message-ID: i'm looking for 1 postdoc to joing my lab. details can be found in the attachment. in principle the postdoc position can be divided into 2 PhD positions, so applications from excellent PhD candidates are encouraged as well. please forward this mail to anyone who may be interested. best wishes, nathan -------------------------------------------- Dr. Nathan Weisz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 Email: nathan.weisz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "Nothing shocks me. I'm a scientist." (Indiana Jones) ---------------------------------- 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Postdoc_EmmyNoether.pdf Type: application/pdf Size: 51179 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From wibral at BIC.UNI-FRANKFURT.DE Wed Aug 19 12:35:28 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Wed, 19 Aug 2009 12:35:28 +0200 Subject: ctf data / 3rd gradients and megplanar/combineplanar Message-ID: Dear Listusers, we have stumbled over a little thing in relation to ctf MEG data and the new preprocessing tools for 3rd gradients. This is not an error in the code, but something that the users can easily do wrong: Combineplanar gives strange results if the ctf reference channels are still in the data, but doesn't really throw an error (in FT20081210, FT ??). Note that - to my limited knowledge - you need the ctf reference channels (P,Q,R,B,G, etc.) in preprocessing if you want to use the ctf tools and synthetic 3rd gradient formation (or want to backtransform from 3rd gradients to magnetometers). Therefore you have to take care to finally get rid of these channels at some point before you compute megplanar or combineplaner. A typical point in your code to do this would be after 3rd gradient preprocessing and before filtering or any other preprocessing. Simply set cfg.channel={'MEG'} for this next step. Hope this helps, Michael ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From tomh at KURAGE.NIMH.NIH.GOV Thu Aug 20 21:16:19 2009 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd (NIH/NIMH) [E]) Date: Thu, 20 Aug 2009 15:16:19 -0400 Subject: [biomag] paper announcement In-Reply-To: <4A869AED020000FE0002F817@markab.hcuge.ch> Message-ID: Rolando GRAVE wrote: > Dear Colleagues, > > We would like to call your attention to the recent publication: > http://www.hindawi.com/journals/cin/2009/656092.html > > EEG/MEG Source Imaging: Methods, Challenges, and Open Issues > > by: > Katrina Wendel, Outi Väisänen, Jaakko Malmivuo, Nevzat G. Gencer, Bart > Vanrumste, Piotr Durka, Ratko Magjarević, Selma Supek, Mihail Lucian > Pascu, Hugues Fontenelle and Rolando Grave de Peralta Menendez > >>From the paper: 2.2. Things to Avoid ... (1) Baseline correction. Varying the values of individual electrodes either by “arbitrary” baseline shifting or by scaling factors changes the surface maps and thus the estimated sources. Although linear inverse solutions are rather stable (continuity with respect to the data), the application of base line correction to two conditions (that will be compared on the basis of their sources) can produce artificial differences induced by the correction and not by the real sources. I disagree. Radial gradiometers, as used in CTF MEG systems, have an arbitrary baseline that MUST be removed. (3) The use of very high density of sensors might also jeopardize the source analysis due to different kinds of noise at different sensors. Moreover, no significant information is added after approximately 128 electrodes due to the noise levels. Lastly, some sensors might measure more artifacts than others due to their location near active muscles. You're talking EEG only again. Stop saying EEG/MEG when you only know about EEG. Adding sensors to an MEG system _increases_ spatial resolution. -- Dr. Tom --- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow ---------------------------------- 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. From Sara.GonzalezAndino at HCUGE.CH Fri Aug 21 10:14:45 2009 From: Sara.GonzalezAndino at HCUGE.CH (Sara GONZALEZ ANDINO) Date: Fri, 21 Aug 2009 10:14:45 +0200 Subject: [biomag] paper announcement In-Reply-To: <4A8DA103.1090502@kurage.nimh.nih.gov> Message-ID: Dear Dr. Tom, thanks for your interest in our paper "EEG/MEG Source Imaging: Methods, Challenges, and Open Issues" http://www.hindawi.com/journals/cin/2009/656092.html and for bringing to discussion such important topics. I do not know if all the authors of the manuscript receive mailings from these two lists. Thus, although not necessarily on behalf of all the authors, I would like to make some comments about your points. > I disagree. Radial gradiometers, as used in CTF MEG systems, have an arbitrary baseline that MUST be removed. We thought it was obvious that an arbitrary baseline need to be removed from measurements. Now, if your system really has an arbitrary (i.e. unknown and independent for each sensor) base lines, then such system cannot yield true magnetic field distributions. I guess this is not the case. Our comment was actually a warning about the facts that 1) modifying the base line does change the map (i.e the field distribution) and therefore the estimated source for both EEG or MEG. 2) Significant physiological effects (e.g. pre attentive states) are also part of the "baseline" and will be removed by this procedure. > You're talking EEG only again. Stop saying EEG/MEG when you only know about EEG. Adding sensors to an MEG system _increases_ spatial resolution. Hopefully the mathematics and physics behind EEG and MEG are the same, then: 1) If measurement M(r) ( for EEG and MEG !) are to be continuos then it is mathematically necessary that closeness between two sensors placed at r1 and r2 implies closeness of the measurements M(r1) and M(r2). From this derives that adding sensors cannot indefinitely increase spatial resolution, and that numerical ill-conditioning emerge as a consequence of the linear dependence of measurements (i.e. lead field rows). Since noise also grows with the amount of sensors, there is a limit beyond which no new information is added in the measurements but just noise. 2) If you prefer the physics to the mathematics you can look at Geselowitz equation describing the connection (In a realistic head model) between the magnetic field at/ near the scalp and the electrical potential at the interfaces. While this is not a demonstration it might help you to understand "de que va la cosa" i.e how things work. 3) You might be also interested in reading Malmivuo's papers (quoted in the manuscript you refer)) comparing spatial resolution for both EEG and MEG. In agreement with previous point (2) no significant differences in spatial resolution seems to exist between these two modalities. 4) Similar conclusions were obtained using different analysis procedures in "Spatial resolution of neuronal generators based on EEG and MEG measurements". International Journal of Neuroscience 68: 93-105, 1993 (by Pascual Marqui and Biscay Lirio). In summary I think that our comments are valid for both EEG and MEG. regards rolando www.electrical-neuroimaging.ch -- Dr. Tom --- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow >>> "Tom Holroyd (NIH/NIMH) [E]" 20.08.2009 21:16 >>> Rolando GRAVE wrote: > Dear Colleagues, > > We would like to call your attention to the recent publication: > http://www.hindawi.com/journals/cin/2009/656092.html > > EEG/MEG Source Imaging: Methods, Challenges, and Open Issues > > by: > Katrina Wendel, Outi Väisänen, Jaakko Malmivuo, Nevzat G. Gencer, Bart > Vanrumste, Piotr Durka, Ratko Magjarević, Selma Supek, Mihail Lucian > Pascu, Hugues Fontenelle and Rolando Grave de Peralta Menendez > >>From the paper: 2.2. Things to Avoid ... (1) Baseline correction. Varying the values of individual electrodes either by “arbitrary” baseline shifting or by scaling factors changes the surface maps and thus the estimated sources. Although linear inverse solutions are rather stable (continuity with respect to the data), the application of base line correction to two conditions (that will be compared on the basis of their sources) can produce artificial differences induced by the correction and not by the real sources. I disagree. Radial gradiometers, as used in CTF MEG systems, have an arbitrary baseline that MUST be removed. (3) The use of very high density of sensors might also jeopardize the source analysis due to different kinds of noise at different sensors. Moreover, no significant information is added after approximately 128 electrodes due to the noise levels. Lastly, some sensors might measure more artifacts than others due to their location near active muscles. You're talking EEG only again. Stop saying EEG/MEG when you only know about EEG. Adding sensors to an MEG system _increases_ spatial resolution. -- Dr. Tom --- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow ---------------------------------- 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. From wibral at BIC.UNI-FRANKFURT.DE Fri Aug 21 10:46:38 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Fri, 21 Aug 2009 10:46:38 +0200 Subject: [biomag] paper announcement Message-ID: Dear Tom, dear Sara, I think there is possibly a slight misunderstanding between the two of you with respect to the 'arbitrary baseline' of the axial gradiometers. As far as I understand the issue, this baseline is arbitrary and individual per sensor, but relatively stable and can be removed by 'calibration' before the measurement (i.e. in a null measurement without brain-derived magnetic fields), i.e. in a setup step of the machine. All brain-derived magnetic fields are a difference to this null-state and should be correct in their field distribution as they were added after the calibration step. So there is no need to subtract the experimental pre-stimulus baseline while measuring and thereby to sacrifice information about brain status in the experimental baseline. Tom, would you please correct me by a response to the list if I am wrong on the machine related/technical issues here. Thanks, Michael > -----Ursprüngliche Nachricht----- > Von: "Sara GONZALEZ ANDINO" > Gesendet: 21.08.09 10:20:22 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] [biomag] paper announcement > Dear Dr. Tom, > thanks for your interest in our paper > > "EEG/MEG Source Imaging: Methods, Challenges, and Open Issues" > http://www.hindawi.com/journals/cin/2009/656092.html > and for bringing to discussion such important topics. > > I do not know if all the authors of the manuscript receive mailings > from these two lists. Thus, although not necessarily on behalf of all > the authors, I would like to make some comments about your points. > > > I disagree. Radial gradiometers, as used in CTF MEG systems, > have an arbitrary baseline that MUST be removed. > > We thought it was obvious that an arbitrary baseline need to be removed > from measurements. Now, if your system really has an arbitrary (i.e. > unknown and independent for each sensor) base lines, then such system > cannot yield true magnetic field distributions. I guess this is not the > case. Our comment was actually a warning about the facts that 1) > modifying the base line does change the map (i.e the field distribution) > and therefore the estimated source for both EEG or MEG. 2) Significant > physiological effects (e.g. pre attentive states) are also part of the > "baseline" and will be removed by this procedure. > > > > You're talking EEG only again. Stop saying EEG/MEG when you only > know about EEG. Adding sensors to an MEG system _increases_ spatial > resolution. > > Hopefully the mathematics and physics behind EEG and MEG are the same, > then: > > 1) If measurement M(r) ( for EEG and MEG !) are to be continuos then it > is mathematically necessary that closeness between two sensors placed at > r1 and r2 implies closeness of the measurements M(r1) and M(r2). From > this derives that adding sensors cannot indefinitely increase spatial > resolution, and that numerical ill-conditioning emerge as a consequence > of the linear dependence of measurements (i.e. lead field rows). Since > noise also grows with the amount of sensors, there is a limit beyond > which no new information is added in the measurements but just noise. > > 2) If you prefer the physics to the mathematics you can look at > Geselowitz equation describing the connection (In a realistic head > model) between the magnetic field at/ near the scalp and the electrical > potential at the interfaces. While this is not a demonstration it might > help you to understand "de que va la cosa" i.e how things work. > > 3) You might be also interested in reading Malmivuo's papers (quoted in > the manuscript you refer)) comparing spatial resolution for both EEG and > MEG. In agreement with previous point (2) no significant differences in > spatial resolution seems to exist between these two modalities. > > 4) Similar conclusions were obtained using different analysis > procedures in "Spatial resolution of neuronal generators based on EEG > and MEG measurements". International Journal of Neuroscience 68: 93-105, > 1993 (by Pascual Marqui and Biscay Lirio). > > In summary I think that our comments are valid for both EEG and MEG. > > regards > > rolando > www.electrical-neuroimaging.ch > > > > -- > Dr. Tom > --- > I would dance and be merry, > Life would be a ding-a-derry, > If I only had a brain. > -- The Scarecrow > > > >>> "Tom Holroyd (NIH/NIMH) [E]" 20.08.2009 > 21:16 >>> > Rolando GRAVE wrote: > > Dear Colleagues, > > > > We would like to call your attention to the recent publication: > > http://www.hindawi.com/journals/cin/2009/656092.html > > > > EEG/MEG Source Imaging: Methods, Challenges, and Open Issues > > > > by: > > Katrina Wendel, Outi Väisänen, Jaakko Malmivuo, Nevzat G. Gencer, > Bart > > Vanrumste, Piotr Durka, Ratko Magjarević, Selma Supek, Mihail Lucian > > Pascu, Hugues Fontenelle and Rolando Grave de Peralta Menendez > > > > From the paper: > > 2.2. Things to Avoid > > ... > > (1) Baseline correction. Varying the values of individual electrodes > either by “arbitrary” baseline shifting or by scaling factors > changes the surface maps and thus the estimated sources. Although linear > inverse solutions are rather stable (continuity with respect to the > data), the application of base line correction to two conditions (that > will be compared on the basis of their sources) can produce artificial > differences induced by the correction and not by the real sources. > > I disagree. Radial gradiometers, as used in CTF MEG systems, > have an arbitrary baseline that MUST be removed. > > (3) The use of very high density of sensors might also jeopardize the > source analysis due to different kinds of noise at different sensors. > Moreover, no significant information is added after approximately 128 > electrodes due to the noise levels. Lastly, some sensors might measure > more artifacts than others due to their location near active muscles. > > You're talking EEG only again. Stop saying EEG/MEG when you only > know about EEG. Adding sensors to an > MEG system _increases_ spatial resolution. > > -- > Dr. Tom > --- > I would dance and be merry, > Life would be a ding-a-derry, > If I only had a brain. > -- The Scarecrow > > ---------------------------------- > 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. > ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From P.Toffanin at RUG.NL Thu Aug 27 11:53:07 2009 From: P.Toffanin at RUG.NL (Paolo Toffanin) Date: Thu, 27 Aug 2009 11:53:07 +0200 Subject: problem with brain vision data import? In-Reply-To: <4A8DA103.1090502@kurage.nimh.nih.gov> Message-ID: Dear fieldtrippers, I tried to search the list archive to see if somebody has encountered previously this problem but I was not successful, so if this issue has been already treated please address me to the solution. The problem is this. I'm loading into fieldtrip data recorded with brain vision recorder (BVR). However, I've noticed that the scales are different (see the attached pdf file), the one observed when exported from brain vision analyzer (BVA) seems 'smaller' than the one imported directly from BVR. Why is that? Is this a problem? My hope is that I won't have to use BVA anymore, even if just to export the data from there to matlab. Is this possible? The code I've used to import the data is also attached. (Data were exported from BVA as binary float 32) I hope I'm just missing a preprocessing step, but I'm not sure, could you please give me some indications? Thank you very much, Paolo ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: BVAplot.pdf Type: application/pdf Size: 8542 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ExampleImportBVA.m Type: text/x-tex Size: 574 bytes Desc: not available URL: From wibral at BIC.UNI-FRANKFURT.DE Thu Aug 27 12:32:35 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 27 Aug 2009 12:32:35 +0200 Subject: problem with brain vision data import? Message-ID: Dear Paolo, as far as I recall there should be functions to read brain vision recorder files directly into fieldtrip, i.e. you can read the .egg/.vhdr, etc. files with fieldtrip functions like definetrial.m, read_fcdc_data.m and preprocessing.m . There is no need to export to matlab first. As another workaround you could use the bvaimport functions of eeglab, cut things into trials, perhaps clean the data there and then save an eeglab .set file and read this into fieldtrip using the eeglab2fieldtrip.m function. Michael > -----Ursprüngliche Nachricht----- > Von: "Paolo Toffanin" > Gesendet: 27.08.09 12:04:32 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] problem with brain vision data import? > Dear fieldtrippers, > > I tried to search the list archive to see if somebody has encountered > previously this problem but I was not successful, so if this issue has been > already treated please address me to the solution. > > The problem is this. I'm loading into fieldtrip data recorded with brain vision > recorder (BVR). However, I've noticed that the scales are different (see the > attached pdf file), the one observed when exported from brain vision analyzer > (BVA) seems 'smaller' than the one imported directly from BVR. Why is that? Is > this a problem? > > My hope is that I won't have to use BVA anymore, even if just to export the > data from there to matlab. Is this possible? > > The code I've used to import the data is also attached. (Data were exported > from BVA as binary float 32) > > I hope I'm just missing a preprocessing step, but I'm not sure, could you > please give me some indications? > > Thank you very much, > Paolo > > ---------------------------------- > 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 -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From bleichner.martin at GMAIL.COM Thu Aug 27 14:36:05 2009 From: bleichner.martin at GMAIL.COM (Martin Bleichner) Date: Thu, 27 Aug 2009 14:36:05 +0200 Subject: Afni for Beamforming Message-ID: Hi there, I want to do some beamforming on my MEG data. The mri data with the anatomy is in afni format. Can fieldtrip read afni? I guess I have to add something to fieldtrip/external. Can someone tell me what I would have to add? Thanks Martin ---------------------------------- 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 j.schoffelen at PSY.GLA.AC.UK Thu Aug 27 16:31:39 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Thu, 27 Aug 2009 14:31:39 +0000 Subject: Afni for Beamforming In-Reply-To: Message-ID: Hi Martin, Yes, with some help fieldtrip can read afni format. You have to download the matlab toolbox from the afni-site: afni.nimh.nih.gov, and install it somewhere on your matlab-path. It is not necessary to put it into fieldtrip/external, as long as the directory is in your path it should work. Best, Jan-Mathijs On 27 Aug 2009, at 12:36, Martin Bleichner wrote: > Hi there, > > I want to do some beamforming on my MEG data. The mri data with the > anatomy is in afni format. > Can fieldtrip read afni? I guess I have to add something to > fieldtrip/external. > Can someone tell me what I would have to add? > > Thanks > Martin > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/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. From masaki.maruyama at CEA.FR Thu Aug 27 16:29:34 2009 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Thu, 27 Aug 2009 16:29:34 +0200 Subject: Coordinate of volume segmentation Message-ID: Hello, Would someone please give me suggestions or advices on the coordinate of volume segmentation? I have struggled with it in these weeks with referring the examples on the FieldTrip web pages and the previous discussions on the mailing list. However, my result still seems to be incorrect. I realigned a DICOM image file using "volumerealine", and then I segmented the volume based on the CTF coordinate. Following the examples on the FieldTrip web pages (e.g, http://fieldtrip.fcdonders.nl/example/read_neuromag_mri_and_create_singl e-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_spa ce), I examined permutations and flips of the images of segmented volumes. However, the segmented brain area was partially outside the head at the best flip (Please see the attached file). The segmented brain seems to be shifted upward than the real brain position. As far as I examined, any permutations and flips could not align appropriately. Do I need a transformation after the volume segmentation in order to comensate the difference in the origin between CTF and MNI coordinates? I'm also wondering if my original MRI image might need to be permuted/flipped before the volumerealine, since the permutation ([2 3 1]) and the best flip (only x & z axes) in my case are different from the examples on the web pages. I would appreciate any responses. With best regards, Masaki Maruyama The following is the script I used. mri_file = '/neurospin/MRI/DICOM/sbh080102633-0002-00001-000160-01.img'; mri_org = read_mri(mri_file); cfg = []; mri = volumerealign(cfg, mri_org); cfg = []; cfg.coordinates = 'ctf'; cfg.template = '/i2bm/platform/spm2/templates/T1.mnc'; [segmentedmri] = volumesegment(cfg, mri); test = segmentedmri; test.anatomy = mri.anatomy; test.transform = mri.transform; test.gray = permute(segmentedmri.gray, [2 3 1]); test.white = permute(segmentedmri.white, [2 3 1]); test.csf = permute(segmentedmri.csf, [2 3 1]); test.dim = mri.dim; for t = [1 3] test.gray = flipdim(test.gray,t); test.white = flipdim(test.white,t); test.csf = flipdim(test.csf,t); end test.avg.pow = test.gray + test.white + test.csf; cfg = []; cfg.funparameter = 'avg.pow'; cfg.interactive = 'no'; cfg.method = 'slice'; figure(2);clf sourceplot(cfg,test) ---------------------------------- 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: SegmentationResult.jpg Type: image/jpeg Size: 89257 bytes Desc: SegmentationResult.jpg URL: From dahliash at STANFORD.EDU Fri Aug 28 08:34:30 2009 From: dahliash at STANFORD.EDU (Dahlia Sharon) Date: Thu, 27 Aug 2009 23:34:30 -0700 Subject: freqdescriptives/statistics In-Reply-To: <790717569.753411251441250970.JavaMail.root@zm09.stanford.edu> Message-ID: Hi all, Is there a more detailed explanation of usage for the jackknife and biascorrect options for freqdescriptives than the one in the freqdescriptives reference page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? More specifically, are these options related to Bokil et al NeuroIm 2007? How should they be employed to determine significance of difference between conditions? (Is there somewhere a tutorial for the use of these options analogous to the one about cluster-based permutation testing?) Also, for the permutation analysis of TFRs (http://fieldtrip.fcdonders.nl/tutorial/statistics?s[]=freqstatistics), if I don't want to employ the planar gradient step (what exactly IS combineplanar? sorry I couldn't find it), can I simply skip it and calculate the TFRs of the raw sensor data? Many thanks! Dahlia. ---------------------------------- 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 dimitri.papadopoulos at CEA.FR Mon Aug 31 23:40:40 2009 From: dimitri.papadopoulos at CEA.FR (Dimitri Papadopoulos-Orfanos) Date: Mon, 31 Aug 2009 23:40:40 +0200 Subject: *.BAK files Message-ID: Hi, Could you please remove BAK files from the FieldTrip distribution? For example: $ find fieldtrip-20090831 -name \*.ba\* fieldtrip-20090831/classification/preprocessors/whitener.bak fieldtrip-20090831/classification/preprocessors/tsner.bak fieldtrip-20090831/classification/validators/crossvalidator.bak fieldtrip-20090831/classification/classifiers/blogreg.bak fieldtrip-20090831/classification/classifiers/blogreg.ba3 fieldtrip-20090831/classification/classifiers/blogreg.ba2 fieldtrip-20090831/classification/toolboxes/gerven/gmrflab/LinRegLaplaceEP.bak fieldtrip-20090831/classification/toolboxes/gerven/gmrflab/fastinvre64.bak fieldtrip-20090831/classification/toolboxes/gerven/gmrflab/laplacedegenerate_ep.ba2 fieldtrip-20090831/classification/toolboxes/gerven/gmrflab/laplacedegenerate_ep.bak fieldtrip-20090831/classification/toolboxes/gerven/bmlab/SRBM.bak fieldtrip-20090831/classification/toolboxes/gerven/bmlab/RBM.bak fieldtrip-20090831/classification/toolboxes/gerven/bmlab/RBM.ba2 fieldtrip-20090831/classification/toolboxes/gerven/bmlab/bmlab_working/RBM.bak fieldtrip-20090831/classification/toolboxes/gerven/bmlab/bmlab_working/RBM.ba2 fieldtrip-20090831/classification/regressors/blinreg.bak fieldtrip-20090831/classification/regressors/circreg.bak Regards, -- Dimitri Papadopoulos CEA, I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France ---------------------------------- 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. From amrgermany at YAHOO.COM Mon Aug 3 13:33:11 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Mon, 3 Aug 2009 11:33:11 +0000 Subject: Significance plot of TFR-Morlet Message-ID: Hi everyone, How do I produce a significance plot of the "Time Frequency Representations of power calculated using Morlet wavelets"? Best regards, Amr Ayoub ---------------------------------- 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 ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 3 14:09:41 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 3 Aug 2009 14:09:41 +0200 Subject: Significance plot of TFR-Morlet In-Reply-To: <428227.44019.qm@web23608.mail.ird.yahoo.com> Message-ID: Dear Amr, >>From your question I can not make up what you already tried and where you run into problems, so I'll give you some basic handles to info at the FieldTrip wiki (and also see the help of the functions below). A nice overview on plotting functions in to be found in the plotting Tutorial: http://fieldtrip.fcdonders.nl/tutorial/plotting Did you try singleplotTFR, multiplotTFR or topoplotTFR with cfg.maskparameter options? There is also clusterplot but see the mailinglist posts that have been about that recently for limitations of clusterplot (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0907 &L=fieldtrip&T=0&F=&S=&P=4160) Hope this helps you further, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Monday, August 03, 2009 1:33 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Significance plot of TFR-Morlet Hi everyone, How do I produce a significance plot of the "Time Frequency Representations of power calculated using Morlet wavelets"? Best regards, Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 3 16:25:16 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 3 Aug 2009 16:25:16 +0200 Subject: FW: [FIELDTRIP] Significance plot of TFR-Morlet Message-ID: Please always send replies to the list and not only to the person that responded, so everyone can benefit and answer. _____ From: Amr Ayoub [mailto:amrgermany at yahoo.com] Sent: Monday, August 03, 2009 4:13 PM To: ingrid.nieuwenhuis at donders.ru.nl Subject: Re: [FIELDTRIP] Significance plot of TFR-Morlet Dear Ingrid, Thanks for your fast reply. Maybe I should rephrase my question. I have used singleplotTFR with cfg.basleine = [-1.8 1.8] cfg.basleinetype='relative' cfg.xlim=[-.5 .5] cfg.ylim=[10 106] cfg.zlim=[-1.8 1.8] I see red spots corresponding to high gamma activity but I don't know if they are significant or not. These red spots are scattered on different channels, time points and frequencies. Do you think taking 200 surrogate time points of the power spectrum assuming a normal distribution of the surrogate power values, a significance threshold can be calculated by two tailed test? threshold = norminv([(1-alpha/2)],M,SD), where alpha=0.01, M=mean and SD = standard deviation Then subtract this threshold from the powerspctrm and last but not least use singleplotTFR? Thanks for your help. Best regards, Amr Ps. To double check, is normalization applied to each frequency band in the singleplotTFR? Note: cf.maskparameter is a new option in singleplotTFR. _____ From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Monday, August 3, 2009 2:09:41 PM Subject: Re: [FIELDTRIP] Significance plot of TFR-Morlet Dear Amr, >>From your question I can not make up what you already tried and where you run into problems, so I'll give you some basic handles to info at the FieldTrip wiki (and also see the help of the functions below). A nice overview on plotting functions in to be found in the plotting Tutorial: http://fieldtrip.fcdonders.nl/tutorial/plotting Did you try singleplotTFR, multiplotTFR or topoplotTFR with cfg.maskparameter options? There is also clusterplot but see the mailinglist posts that have been about that recently for limitations of clusterplot (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0907 &L=fieldtrip&T=0&F=&S=&P=4160) Hope this helps you further, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Monday, August 03, 2009 1:33 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Significance plot of TFR-Morlet Hi everyone, How do I produce a significance plot of the "Time Frequency Representations of power calculated using Morlet wavelets"? Best regards, Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 amrgermany at YAHOO.COM Mon Aug 3 13:33:11 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Mon, 3 Aug 2009 11:33:11 +0000 Subject: Significance plot of TFR-Morlet Message-ID: From ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 3 14:09:41 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 3 Aug 2009 14:09:41 +0200 Subject: Significance plot of TFR-Morlet In-Reply-To: <428227.44019.qm@web23608.mail.ird.yahoo.com> Message-ID: From jrkerlin at UCDAVIS.EDU Tue Aug 4 02:57:00 2009 From: jrkerlin at UCDAVIS.EDU (Jess R. Kerlin) Date: Mon, 3 Aug 2009 17:57:00 -0700 Subject: bdf files Message-ID: FTers, While trying to preprocess data *.bdf data in a recent version of FT (July 11th, 09). I get spikes in a significant subset of trials (sudden, unpredicatable jumps to ~8000 uV). I know these spikes are not present in the BDF files (no problems loading in BESA). FT does not detect an error, although one is clearly present. I've had different issues with previous versions of FT when loading in BDF's before using the biosig toolbox, but it looks like the newer code was largely ported from EEGLAB. Anyone know what's up? Thanks, Jess ---------------------------------- 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. From j.poort at NIN.KNAW.NL Wed Aug 5 10:43:29 2009 From: j.poort at NIN.KNAW.NL (Jasper Poort) Date: Wed, 5 Aug 2009 10:43:29 +0200 Subject: fourierspectra and freqstatistics Message-ID: Dear all, I have the following question I want to compare the powerspectra in two conditions for individual channels. When I first run freqanalyis with cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; this results in a power spectrum for two conditions: size(A.powspctrm): 943 1 19 48 ntrials x nchannels x nfrequency x ntime size(A.cumtapcnt): 943 19 I can then compare the powerspectra in two conditions by running freqstatistics with: cfg = []; cfg.method = 'analytic'; cfg.statistic = 'indepsamplesT'; ntrl1 = size(A.powspctrm,1); ntrl2 = size(B.powspctrm,1); design = zeros(1,ntrl1 + ntrl2); design(1,1:ntrl1) = 1; design(1,(ntrl1+1):(ntrl1+ntrl2)) = 2; cfg.design = design; cfg.ivar = 1; % independent variable stat = freqstatistics(cfg,A, B); differencepowspctrm = stat.stat; However, when I use freqanalyis with cfg.output = 'fourier'; this results in a fourier spectrum for two conditions: size(A.fourierspctrm): 4715 1 19 48 (ntapers (in my case 5) x ntrials) x nchannels x nfrequency x ntime size(A.cumtapcnt) : 943 1 Can I input these fourier spectra directly to freqstatistics or should I convert the fourierspectrum first to a powerspectrum (I assume this could be done by taking abs(fourierspectrum).^2 and then averaging over tapers for every trial ) ? Alternatively, is it at all possible to first run freqdescriptives and then input the averages and variance into freqstatistics (since this is the only thing necessary for the independent t-test)? Many thanks in advance, best, Jasper ---------------------------------- 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 j.schoffelen at PSY.GLA.AC.UK Wed Aug 5 10:50:18 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Aug 2009 09:50:18 +0100 Subject: fourierspectra and freqstatistics In-Reply-To: <000001ca15a8$ce549860$6afdc920$@poort@nin.knaw.nl> Message-ID: Dear Jasper, > Can I input these fourier spectra directly to freqstatistics or > should I convert the fourierspectrum first to a powerspectrum (I > assume this could be done by taking abs(fourierspectrum).^2 and > then averaging over tapers for every trial ) ? I suspect that you cannot directly put fourierspectra into freqstatistics when you want to perform a T-test on the power. I always throw the frequency data at freqdescriptives (with cfg.keeptrials = 'yes'); this should give you single trial power spectra. Then you can use the 'montecarlo' or 'analytic' method for statistical inference. You can indeed also compute the variance in freqdescriptives, but I am not sure how to get to a T-value using fieldtrip there. At least you won't get there using the 'statfuns'. Best, JM ---------------------------------- 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 rion_raman at REDIFFMAIL.COM Wed Aug 5 21:52:49 2009 From: rion_raman at REDIFFMAIL.COM (rion) Date: Wed, 5 Aug 2009 19:52:49 -0000 Subject: Multitaper analysis Message-ID: Dear Fieldtrippers, I am new comer to Fieldtrip. I have a question on the Multitaper method (mtmconvol) when used on EMG signal analysis. If i am right the method works in this way, the tapers are multipied with the data in the time domain and then the tapered data is fourier transformed and the auto and cross spectra are calculated followed by the averaging of the tapers. The EMG in my case is rectified and then it has only positive values now the multiplication of the tapers with the rectified EMG gives out some negative values due to the dpss tapers (For ex: 7 Tapers) in the time domain. These negative values are not relevant to the EMG signal. How are these values used in the latter analysis. I am missing something here any hint will be helpfull. With regards, rion. ---------------------------------- 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 amrgermany at YAHOO.COM Thu Aug 6 13:56:00 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Thu, 6 Aug 2009 11:56:00 +0000 Subject: freqanalysis_wltconvol variance In-Reply-To: <428227.44019.qm@web23608.mail.ird.yahoo.com> Message-ID: Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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 ingrid.nieuwenhuis at DONDERS.RU.NL Thu Aug 6 14:26:28 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Thu, 6 Aug 2009 14:26:28 +0200 Subject: freqanalysis_wltconvol variance In-Reply-To: <124221.38146.qm@web23607.mail.ird.yahoo.com> Message-ID: Dear Amr, If you do freqanalysis with cfg.keeptrials = 'yes', you get the power per trial. If you subsequently use freqdescriptives (see help for detailed options) you can compute the variance over trials. Best Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Thursday, August 06, 2009 1:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_wltconvol variance Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 amrgermany at YAHOO.COM Thu Aug 6 16:21:14 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Thu, 6 Aug 2009 14:21:14 +0000 Subject: freqanalysis_wltconvol variance In-Reply-To: <010a01ca1691$1f28b170$642dae83@fcdonders.nl> Message-ID: Dear Ingrid, Thanks for your speedy reply. Best regards, Amr Ayoub ________________________________ From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, August 6, 2009 2:26:28 PM Subject: Re: [FIELDTRIP] freqanalysis_wltconvol variance Dear Amr, If you do freqanalysis with cfg.keeptrials = ‘yes’, you get the power per trial. If you subsequently use freqdescriptives (see help for detailed options) you can compute the variance over trials. Best Ingrid ________________________________ From:FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Thursday, August 06, 2009 1:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_wltconvol variance Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 manish.saggar at GMAIL.COM Fri Aug 7 06:24:50 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Thu, 6 Aug 2009 23:24:50 -0500 Subject: non-parametric statistics across condition, time and groups Message-ID: Dear All, I am analyzing spatio-spectral differences longitudinally in EEG data. We have two groups of subjects. Thus I want to do non-parametric analysis of spatio-spectral data across condition, time and groups. I am wondering if that is possible via design parameter in freqstatistics function. Or should I take some values out of freqstats function and put them in SPSS or something for finding interactions between time and condition or time and group. Any help is appreciated. Regards, Manish ---------------------------------- 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. From lmeyer at CBS.MPG.DE Fri Aug 7 14:22:46 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 14:22:46 +0200 Subject: automatic EOG rejection In-Reply-To: <24840676.977201249647542774.JavaMail.root@zimbra> Message-ID: dear all, (newest fieldtrip, newest matlab) trying automatic EOG artifact rejection, i get the following error: In fetch_data at 111 In artifact_zvalue at 213 In artifact_eog at 179 Warning: data contains NaNs, no filtering applied workflow was (these all worked): - reading continous data to memory - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) - appending EOG channels - re-refercing - filtering - epoching according to triggers while trying automatic rejection comes the error; visual rejection just works fine. in the olf fieldtrip version, the error message said "not all samples are present in the data". i checked the data structure; the merged EOG channels have been correctly appended and labelled. attached is my code, thanks a lot in advance! all best, lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ---------------------------------- 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. From lmeyer at CBS.MPG.DE Fri Aug 7 14:47:21 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 14:47:21 +0200 Subject: automatic EOG rejection In-Reply-To: <21424912.980871249649239496.JavaMail.root@zimbra> Message-ID: (the code) Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ---------------------------------- 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 embedded and charset-unspecified text was scrubbed... Name: ft_schimi.txt URL: From ingrid.nieuwenhuis at DONDERS.RU.NL Fri Aug 7 15:08:06 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 7 Aug 2009 15:08:06 +0200 Subject: automatic EOG rejection In-Reply-To: <14776683.977331249647766825.JavaMail.root@zimbra> Message-ID: Dear Lars, The error message means that fetch_data tries to fetch data outside of your trials where there is no data supplied in the input data file. Fetch_data was recently changed and now puts NaNs where there is no data. But filtering data with NaNs is not a good idea, therefore the warning. What happens is in artifact_eog is that the data is padded, or better said, there is an attempt to pad the data. This is done to avoid filter artifact at the edges, and for optimal artifact detections at/just over the border (which can influence filtering). This padding doesn't work because in the input data you supplied there is no extra data which can be used for padding. Therefore the NaN's or the error that not all samples are present in the data. Would you can do is epoch the data into trials after artifact detection. So first detect and reject artifacts, and then use redefinetrial (give the trl you have now) to epoch the data. Hope this helps, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 2:23 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] automatic EOG rejection > > dear all, > > (newest fieldtrip, newest matlab) > > trying automatic EOG artifact rejection, i get the following error: > > In fetch_data at 111 > In artifact_zvalue at 213 > In artifact_eog at 179 > Warning: data contains NaNs, no filtering applied > > > workflow was (these all worked): > > - reading continous data to memory > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > - appending EOG channels > - re-refercing > - filtering > - epoching according to triggers > > > while trying automatic rejection comes the error; visual rejection just > works fine. in the olf fieldtrip version, the error message said "not all > samples are present in the data". i checked the data structure; the merged > EOG channels have been correctly appended and labelled. attached is my > code, thanks a lot in advance! > > > all best, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ---------------------------------- > 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. From lmeyer at CBS.MPG.DE Fri Aug 7 15:59:37 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 15:59:37 +0200 Subject: automatic EOG rejection In-Reply-To: <32069397.985751249653328816.JavaMail.root@zimbra> Message-ID: dear ingrid, thanks a lot, I greatly appreciate your immediate response! what you suggest was what I was trying next :-). I already had suspected the padding to be my problem. however, 'artifact_eog' always tries to fetch 'trl' >> error: ??? Reference to non-existent field 'trl'. Error in ==> artifact_eog at 165 tmpcfg.trl = cfg.trl; as soon as i declare cfg.trl = data_org.cfg.trl i.e. get 'trl' from the original, continuous data structure in memory (data_org), matlab errors Input must be a row vector of characters thanks a lot in advance, and have a good weekend, lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ----- Ursprüngliche Mail ----- Von: "Ingrid Nieuwenhuis" An: FIELDTRIP at NIC.SURFNET.NL Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: [FIELDTRIP] automatic EOG rejection Dear Lars, The error message means that fetch_data tries to fetch data outside of your trials where there is no data supplied in the input data file. Fetch_data was recently changed and now puts NaNs where there is no data. But filtering data with NaNs is not a good idea, therefore the warning. What happens is in artifact_eog is that the data is padded, or better said, there is an attempt to pad the data. This is done to avoid filter artifact at the edges, and for optimal artifact detections at/just over the border (which can influence filtering). This padding doesn't work because in the input data you supplied there is no extra data which can be used for padding. Therefore the NaN's or the error that not all samples are present in the data. Would you can do is epoch the data into trials after artifact detection. So first detect and reject artifacts, and then use redefinetrial (give the trl you have now) to epoch the data. Hope this helps, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 2:23 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] automatic EOG rejection > > dear all, > > (newest fieldtrip, newest matlab) > > trying automatic EOG artifact rejection, i get the following error: > > In fetch_data at 111 > In artifact_zvalue at 213 > In artifact_eog at 179 > Warning: data contains NaNs, no filtering applied > > > workflow was (these all worked): > > - reading continous data to memory > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > - appending EOG channels > - re-refercing > - filtering > - epoching according to triggers > > > while trying automatic rejection comes the error; visual rejection just > works fine. in the olf fieldtrip version, the error message said "not all > samples are present in the data". i checked the data structure; the merged > EOG channels have been correctly appended and labelled. attached is my > code, thanks a lot in advance! > > > all best, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ---------------------------------- > 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. ---------------------------------- 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. From ingrid.nieuwenhuis at DONDERS.RU.NL Fri Aug 7 16:20:18 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 7 Aug 2009 16:20:18 +0200 Subject: automatic EOG rejection In-Reply-To: <17239275.985841249653577276.JavaMail.root@zimbra> Message-ID: Dear Lars, Don't understand what is wrong with your data_org trial. The trl definition has 3 columns per trial: first sample of trial, last sample of trial and offset, did your data_org.cfg.trl have that? Anyways you can "epoch" your data to one long single trial trl = [1 last_sample 0] or use trialfun_general in definetrial with cfg.ntrials = 1; and cfg.triallength = inf; Then do artifact detection/rejection and then redefine trial to real epochs based on triggers. Would that work? Have a nice weekend too, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 4:00 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > dear ingrid, > > thanks a lot, I greatly appreciate your immediate response! > what you suggest was what I was trying next :-). I already had suspected > the padding to be my problem. > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > ??? Reference to non-existent field 'trl'. > Error in ==> artifact_eog at 165 > tmpcfg.trl = cfg.trl; > > > as soon as i declare > > cfg.trl = data_org.cfg.trl > > > i.e. get 'trl' from the original, continuous data structure in memory > (data_org), matlab errors > > Input must be a row vector of characters > > > thanks a lot in advance, and have a good weekend, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > The error message means that fetch_data tries to fetch data outside of > your > trials where there is no data supplied in the input data file. Fetch_data > was recently changed and now puts NaNs where there is no data. But > filtering > data with NaNs is not a good idea, therefore the warning. > > What happens is in artifact_eog is that the data is padded, or better > said, > there is an attempt to pad the data. This is done to avoid filter artifact > at the edges, and for optimal artifact detections at/just over the border > (which can influence filtering). This padding doesn't work because in the > input data you supplied there is no extra data which can be used for > padding. Therefore the NaN's or the error that not all samples are present > in the data. > > Would you can do is epoch the data into trials after artifact detection. > So > first detect and reject artifacts, and then use redefinetrial (give the > trl > you have now) to epoch the data. > > Hope this helps, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 2:23 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] automatic EOG rejection > > > > dear all, > > > > (newest fieldtrip, newest matlab) > > > > trying automatic EOG artifact rejection, i get the following error: > > > > In fetch_data at 111 > > In artifact_zvalue at 213 > > In artifact_eog at 179 > > Warning: data contains NaNs, no filtering applied > > > > > > workflow was (these all worked): > > > > - reading continous data to memory > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > - appending EOG channels > > - re-refercing > > - filtering > > - epoching according to triggers > > > > > > while trying automatic rejection comes the error; visual rejection just > > works fine. in the olf fieldtrip version, the error message said "not > all > > samples are present in the data". i checked the data structure; the > merged > > EOG channels have been correctly appended and labelled. attached is my > > code, thanks a lot in advance! > > > > > > all best, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. From lmeyer at CBS.MPG.DE Fri Aug 7 17:21:52 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 17:21:52 +0200 Subject: automatic EOG rejection In-Reply-To: <014501ca176a$30d9c1f0$642dae83@fcdonders.nl> Message-ID: Dear Ingrid, thank you so much for your help today, you rescued my weekend: Padding the onset and offset (in samples) of the initial single trial did the trick! All best, Lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ----- Ursprüngliche Mail ----- Von: "Ingrid Nieuwenhuis" An: FIELDTRIP at NIC.SURFNET.NL Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: [FIELDTRIP] automatic EOG rejection Dear Lars, Don't understand what is wrong with your data_org trial. The trl definition has 3 columns per trial: first sample of trial, last sample of trial and offset, did your data_org.cfg.trl have that? Anyways you can "epoch" your data to one long single trial trl = [1 last_sample 0] or use trialfun_general in definetrial with cfg.ntrials = 1; and cfg.triallength = inf; Then do artifact detection/rejection and then redefine trial to real epochs based on triggers. Would that work? Have a nice weekend too, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 4:00 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > dear ingrid, > > thanks a lot, I greatly appreciate your immediate response! > what you suggest was what I was trying next :-). I already had suspected > the padding to be my problem. > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > ??? Reference to non-existent field 'trl'. > Error in ==> artifact_eog at 165 > tmpcfg.trl = cfg.trl; > > > as soon as i declare > > cfg.trl = data_org.cfg.trl > > > i.e. get 'trl' from the original, continuous data structure in memory > (data_org), matlab errors > > Input must be a row vector of characters > > > thanks a lot in advance, and have a good weekend, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > The error message means that fetch_data tries to fetch data outside of > your > trials where there is no data supplied in the input data file. Fetch_data > was recently changed and now puts NaNs where there is no data. But > filtering > data with NaNs is not a good idea, therefore the warning. > > What happens is in artifact_eog is that the data is padded, or better > said, > there is an attempt to pad the data. This is done to avoid filter artifact > at the edges, and for optimal artifact detections at/just over the border > (which can influence filtering). This padding doesn't work because in the > input data you supplied there is no extra data which can be used for > padding. Therefore the NaN's or the error that not all samples are present > in the data. > > Would you can do is epoch the data into trials after artifact detection. > So > first detect and reject artifacts, and then use redefinetrial (give the > trl > you have now) to epoch the data. > > Hope this helps, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 2:23 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] automatic EOG rejection > > > > dear all, > > > > (newest fieldtrip, newest matlab) > > > > trying automatic EOG artifact rejection, i get the following error: > > > > In fetch_data at 111 > > In artifact_zvalue at 213 > > In artifact_eog at 179 > > Warning: data contains NaNs, no filtering applied > > > > > > workflow was (these all worked): > > > > - reading continous data to memory > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > - appending EOG channels > > - re-refercing > > - filtering > > - epoching according to triggers > > > > > > while trying automatic rejection comes the error; visual rejection just > > works fine. in the olf fieldtrip version, the error message said "not > all > > samples are present in the data". i checked the data structure; the > merged > > EOG channels have been correctly appended and labelled. attached is my > > code, thanks a lot in advance! > > > > > > all best, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. ---------------------------------- 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. From ingrid.nieuwenhuis at DONDERS.RU.NL Fri Aug 7 17:46:41 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 7 Aug 2009 17:46:41 +0200 Subject: automatic EOG rejection In-Reply-To: <19054670.989111249658512414.JavaMail.root@zimbra> Message-ID: My pleasure :) Did you have to do this padding manually? And did you pad the long trial with zeros or something extending the specified trial? I can imagine that also with one long trial you still get in trouble at the edges. Would be nice to have a final reply and describe exactly what you did (also useful for the archive) I'll also see if I can find a simple way to deal with it in the code... Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 5:22 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > Dear Ingrid, > > thank you so much for your help today, you rescued my weekend: Padding the > onset and offset (in samples) of the initial single trial did the trick! > > > All best, > Lars > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > Don't understand what is wrong with your data_org trial. The trl > definition > has 3 columns per trial: first sample of trial, last sample of trial and > offset, did your data_org.cfg.trl have that? > > Anyways you can "epoch" your data to one long single trial > > trl = [1 last_sample 0] > or use trialfun_general in definetrial with cfg.ntrials = 1; and > cfg.triallength = inf; > > Then do artifact detection/rejection and then redefine trial to real > epochs > based on triggers. Would that work? > > Have a nice weekend too, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 4:00 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] automatic EOG rejection > > > > dear ingrid, > > > > thanks a lot, I greatly appreciate your immediate response! > > what you suggest was what I was trying next :-). I already had suspected > > the padding to be my problem. > > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > > > ??? Reference to non-existent field 'trl'. > > Error in ==> artifact_eog at 165 > > tmpcfg.trl = cfg.trl; > > > > > > as soon as i declare > > > > cfg.trl = data_org.cfg.trl > > > > > > i.e. get 'trl' from the original, continuous data structure in memory > > (data_org), matlab errors > > > > Input must be a row vector of characters > > > > > > thanks a lot in advance, and have a good weekend, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ----- Ursprüngliche Mail ----- > > Von: "Ingrid Nieuwenhuis" > > An: FIELDTRIP at NIC.SURFNET.NL > > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > > > Dear Lars, > > > > The error message means that fetch_data tries to fetch data outside of > > your > > trials where there is no data supplied in the input data file. > Fetch_data > > was recently changed and now puts NaNs where there is no data. But > > filtering > > data with NaNs is not a good idea, therefore the warning. > > > > What happens is in artifact_eog is that the data is padded, or better > > said, > > there is an attempt to pad the data. This is done to avoid filter > artifact > > at the edges, and for optimal artifact detections at/just over the > border > > (which can influence filtering). This padding doesn't work because in > the > > input data you supplied there is no extra data which can be used for > > padding. Therefore the NaN's or the error that not all samples are > present > > in the data. > > > > Would you can do is epoch the data into trials after artifact detection. > > So > > first detect and reject artifacts, and then use redefinetrial (give the > > trl > > you have now) to epoch the data. > > > > Hope this helps, > > Best Ingrid > > > > > -----Original Message----- > > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > > Behalf Of Lars Meyer > > > Sent: Friday, August 07, 2009 2:23 PM > > > To: FIELDTRIP at NIC.SURFNET.NL > > > Subject: [FIELDTRIP] automatic EOG rejection > > > > > > dear all, > > > > > > (newest fieldtrip, newest matlab) > > > > > > trying automatic EOG artifact rejection, i get the following error: > > > > > > In fetch_data at 111 > > > In artifact_zvalue at 213 > > > In artifact_eog at 179 > > > Warning: data contains NaNs, no filtering applied > > > > > > > > > workflow was (these all worked): > > > > > > - reading continous data to memory > > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > > - appending EOG channels > > > - re-refercing > > > - filtering > > > - epoching according to triggers > > > > > > > > > while trying automatic rejection comes the error; visual rejection > just > > > works fine. in the olf fieldtrip version, the error message said "not > > all > > > samples are present in the data". i checked the data structure; the > > merged > > > EOG channels have been correctly appended and labelled. attached is my > > > code, thanks a lot in advance! > > > > > > > > > all best, > > > lars > > > > > > > > > Lars Meyer | MSc > > > Max Planck Institute for Human Cognitive & Brain Sciences > > > Department of Neuropsychology > > > Stephanstraße 1a > > > 04103 Leipzig | Germany > > > > > > Office | +49 (0)341 99 40 22 66 > > > Fax | +49 (0)341 99 40 22 60 > > > Mobile | +49 (0)175 113 76 65 > > > Home | +49 (0)341 974 26 49 > > > Mail | lmeyer at cbs.mpg.de > > > Web | www.cbs.mpg.de/~lmeyer > > > > > > ---------------------------------- > > > 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. > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. From lmeyer at CBS.MPG.DE Fri Aug 7 19:25:26 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 19:25:26 +0200 Subject: automatic EOG rejection In-Reply-To: <015901ca1776$41f1dcf0$642dae83@fcdonders.nl> Message-ID: Hey, I think, there was just an artifact right at the edge of the long trial (amplifier start, something like that), so artifact_eog tried to pad into a time before the trial (?). I basically added 100 to the (1,1) and substracted 100 from (1,2) of the original .trl. I know it would be better to ADD something to the original data (append some empty samples) so even these artifacts can be automatically removed, but I had to do it quick and dirty today :-)... and I know anyway that there are no real trials involved 100 samples near the edges. Best, Lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ----- Ursprüngliche Mail ----- Von: "Ingrid Nieuwenhuis" An: FIELDTRIP at NIC.SURFNET.NL Gesendet: Freitag, 7. August 2009 17:46:41 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: [FIELDTRIP] automatic EOG rejection My pleasure :) Did you have to do this padding manually? And did you pad the long trial with zeros or something extending the specified trial? I can imagine that also with one long trial you still get in trouble at the edges. Would be nice to have a final reply and describe exactly what you did (also useful for the archive) I'll also see if I can find a simple way to deal with it in the code... Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 5:22 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > Dear Ingrid, > > thank you so much for your help today, you rescued my weekend: Padding the > onset and offset (in samples) of the initial single trial did the trick! > > > All best, > Lars > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > Don't understand what is wrong with your data_org trial. The trl > definition > has 3 columns per trial: first sample of trial, last sample of trial and > offset, did your data_org.cfg.trl have that? > > Anyways you can "epoch" your data to one long single trial > > trl = [1 last_sample 0] > or use trialfun_general in definetrial with cfg.ntrials = 1; and > cfg.triallength = inf; > > Then do artifact detection/rejection and then redefine trial to real > epochs > based on triggers. Would that work? > > Have a nice weekend too, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 4:00 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] automatic EOG rejection > > > > dear ingrid, > > > > thanks a lot, I greatly appreciate your immediate response! > > what you suggest was what I was trying next :-). I already had suspected > > the padding to be my problem. > > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > > > ??? Reference to non-existent field 'trl'. > > Error in ==> artifact_eog at 165 > > tmpcfg.trl = cfg.trl; > > > > > > as soon as i declare > > > > cfg.trl = data_org.cfg.trl > > > > > > i.e. get 'trl' from the original, continuous data structure in memory > > (data_org), matlab errors > > > > Input must be a row vector of characters > > > > > > thanks a lot in advance, and have a good weekend, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ----- Ursprüngliche Mail ----- > > Von: "Ingrid Nieuwenhuis" > > An: FIELDTRIP at NIC.SURFNET.NL > > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > > > Dear Lars, > > > > The error message means that fetch_data tries to fetch data outside of > > your > > trials where there is no data supplied in the input data file. > Fetch_data > > was recently changed and now puts NaNs where there is no data. But > > filtering > > data with NaNs is not a good idea, therefore the warning. > > > > What happens is in artifact_eog is that the data is padded, or better > > said, > > there is an attempt to pad the data. This is done to avoid filter > artifact > > at the edges, and for optimal artifact detections at/just over the > border > > (which can influence filtering). This padding doesn't work because in > the > > input data you supplied there is no extra data which can be used for > > padding. Therefore the NaN's or the error that not all samples are > present > > in the data. > > > > Would you can do is epoch the data into trials after artifact detection. > > So > > first detect and reject artifacts, and then use redefinetrial (give the > > trl > > you have now) to epoch the data. > > > > Hope this helps, > > Best Ingrid > > > > > -----Original Message----- > > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > > Behalf Of Lars Meyer > > > Sent: Friday, August 07, 2009 2:23 PM > > > To: FIELDTRIP at NIC.SURFNET.NL > > > Subject: [FIELDTRIP] automatic EOG rejection > > > > > > dear all, > > > > > > (newest fieldtrip, newest matlab) > > > > > > trying automatic EOG artifact rejection, i get the following error: > > > > > > In fetch_data at 111 > > > In artifact_zvalue at 213 > > > In artifact_eog at 179 > > > Warning: data contains NaNs, no filtering applied > > > > > > > > > workflow was (these all worked): > > > > > > - reading continous data to memory > > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > > - appending EOG channels > > > - re-refercing > > > - filtering > > > - epoching according to triggers > > > > > > > > > while trying automatic rejection comes the error; visual rejection > just > > > works fine. in the olf fieldtrip version, the error message said "not > > all > > > samples are present in the data". i checked the data structure; the > > merged > > > EOG channels have been correctly appended and labelled. attached is my > > > code, thanks a lot in advance! > > > > > > > > > all best, > > > lars > > > > > > > > > Lars Meyer | MSc > > > Max Planck Institute for Human Cognitive & Brain Sciences > > > Department of Neuropsychology > > > Stephanstraße 1a > > > 04103 Leipzig | Germany > > > > > > Office | +49 (0)341 99 40 22 66 > > > Fax | +49 (0)341 99 40 22 60 > > > Mobile | +49 (0)175 113 76 65 > > > Home | +49 (0)341 974 26 49 > > > Mail | lmeyer at cbs.mpg.de > > > Web | www.cbs.mpg.de/~lmeyer > > > > > > ---------------------------------- > > > 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. > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. ---------------------------------- 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. From awalther at UNI-MAINZ.DE Sun Aug 9 17:34:35 2009 From: awalther at UNI-MAINZ.DE (Walther Alexander) Date: Sun, 9 Aug 2009 17:34:35 +0200 Subject: topoplotTFR on planar gradients Message-ID: Dear Fieldtrip Users, I'd like to apply the multiplotTFR function on freqstatistic results. The MEG raw data were converted to planar gradient scores and passed freqanalysis. Using fieltrip version 2008-12-08, the error message 'unsupported MEG sensor type' occurres which goes back to prepare_layout.m, line 880. Apparently, though senstype.m gets me the right information (ctf275_planar) that should be used to create an appropriate layout, prepare_layout ignores this and directly heads for the error message. Planar gradient settings seem to struggle somehow with grad2lay.m (line 259). If I switch to Fieltrip-20090803, it will create the plot thats attached. My configuration settings read as follows: cfg.maskparameter = 'mask'; cfg.zparam = 'stat'; cfg.interactive = 'yes'; cfg.zlim = [-4 4]; figure, multiplotTFR(cfg,data) Given unconverted raw data, everything works out well. Any advice? Cheers Alex -- Alexander Walther Johannes-Gutenberg-University Mainz ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: multiplotTFR_planargradient_fieldtrip20090803.png Type: image/png Size: 8158 bytes Desc: not available URL: From lmeyer at CBS.MPG.DE Mon Aug 10 15:58:16 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Mon, 10 Aug 2009 15:58:16 +0200 Subject: automatic EOG rejection In-Reply-To: <014501ca176a$30d9c1f0$642dae83@fcdonders.nl> Message-ID: dear ingrid, i tried this now, works fine for the rejection (success!). but now, i'd have to find a way to: - get the events from the raw data (definetrial, okay) - keep only those in which there is no artifact (i have the list as output from the rejection, so far, so good) but, in the way you suggest, would fieldtrip not get the rejected trials again from the raw data, according to the triggers? right now i don't see how redefinetrial can both: - get real triggers from raw data and define trials (write a trl according to triggers) - only search those segments of the raw data that result from the rejection process (write a trl according to clean segments) i.e. what needs to be done is to check entries in the 'trigger-trial trl' for identity or overlap with entries in the 'rejection-trial trl'. can redefinetrial solve my problem? how? thank you so much, again! lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ----- Ursprüngliche Mail ----- Von: "Ingrid Nieuwenhuis" An: FIELDTRIP at NIC.SURFNET.NL Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: [FIELDTRIP] automatic EOG rejection Dear Lars, Don't understand what is wrong with your data_org trial. The trl definition has 3 columns per trial: first sample of trial, last sample of trial and offset, did your data_org.cfg.trl have that? Anyways you can "epoch" your data to one long single trial trl = [1 last_sample 0] or use trialfun_general in definetrial with cfg.ntrials = 1; and cfg.triallength = inf; Then do artifact detection/rejection and then redefine trial to real epochs based on triggers. Would that work? Have a nice weekend too, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 4:00 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > dear ingrid, > > thanks a lot, I greatly appreciate your immediate response! > what you suggest was what I was trying next :-). I already had suspected > the padding to be my problem. > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > ??? Reference to non-existent field 'trl'. > Error in ==> artifact_eog at 165 > tmpcfg.trl = cfg.trl; > > > as soon as i declare > > cfg.trl = data_org.cfg.trl > > > i.e. get 'trl' from the original, continuous data structure in memory > (data_org), matlab errors > > Input must be a row vector of characters > > > thanks a lot in advance, and have a good weekend, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > The error message means that fetch_data tries to fetch data outside of > your > trials where there is no data supplied in the input data file. Fetch_data > was recently changed and now puts NaNs where there is no data. But > filtering > data with NaNs is not a good idea, therefore the warning. > > What happens is in artifact_eog is that the data is padded, or better > said, > there is an attempt to pad the data. This is done to avoid filter artifact > at the edges, and for optimal artifact detections at/just over the border > (which can influence filtering). This padding doesn't work because in the > input data you supplied there is no extra data which can be used for > padding. Therefore the NaN's or the error that not all samples are present > in the data. > > Would you can do is epoch the data into trials after artifact detection. > So > first detect and reject artifacts, and then use redefinetrial (give the > trl > you have now) to epoch the data. > > Hope this helps, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 2:23 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] automatic EOG rejection > > > > dear all, > > > > (newest fieldtrip, newest matlab) > > > > trying automatic EOG artifact rejection, i get the following error: > > > > In fetch_data at 111 > > In artifact_zvalue at 213 > > In artifact_eog at 179 > > Warning: data contains NaNs, no filtering applied > > > > > > workflow was (these all worked): > > > > - reading continous data to memory > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > - appending EOG channels > > - re-refercing > > - filtering > > - epoching according to triggers > > > > > > while trying automatic rejection comes the error; visual rejection just > > works fine. in the olf fieldtrip version, the error message said "not > all > > samples are present in the data". i checked the data structure; the > merged > > EOG channels have been correctly appended and labelled. attached is my > > code, thanks a lot in advance! > > > > > > all best, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. ---------------------------------- 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. From ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 10 16:24:30 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 10 Aug 2009 16:24:30 +0200 Subject: automatic EOG rejection In-Reply-To: <29716492.1033511249912696701.JavaMail.root@zimbra> Message-ID: Hi Lars, What you can do is: 1- read in whole data as one trial with define trial -> you get a trl (Ntrx3) with one row 2- detect artifacts with artifact_eog -> you get an artifact (Nartx2) stating first and last sample of each artifact (you managed this if I'm correctly, but fiddled a bit with samples for padding, so make sure the artifact samples match the data!! 3- Then you can use redefinetrial to go from a trl with 1 row to a trl with all epochs based on the triggers (Ntrx3) 4- Finally you use rejectartifact which modifies your trl to not include the artifacts anymore. (see help for options, you can cut out only the artifacts leaving you with most data, but trials with "holes" or reject all trials completely when contaminated). Robert and I have worked recently on a databrowser which is also included in the more recent versions of FieldTrip. Although it still might be a little buggy/unstable (work in progress :) ) it might be quite useful for you to check stage 2, (if the artifacts match the data correctly) since it allows you to browse through the data and see which segments are marked as artifact. So if you read in the unfiddled data (with trl from stage 1) with the artifact field (you got after stage 2) in the browser you can see if your padding did not shift the artifacts with regard to the sample numbers. (Hope I'm clear enough in what I mean here). Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Monday, August 10, 2009 3:58 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > dear ingrid, > > i tried this now, works fine for the rejection (success!). but now, i'd > have to find a way to: > > - get the events from the raw data (definetrial, okay) > - keep only those in which there is no artifact (i have the list as output > from the rejection, so far, so good) > > but, in the way you suggest, would fieldtrip not get the rejected trials > again from the raw data, according to the triggers? right now i don't see > how redefinetrial can both: > > - get real triggers from raw data and define trials (write a trl according > to triggers) > - only search those segments of the raw data that result from the > rejection process (write a trl according to clean segments) > > i.e. what needs to be done is to check entries in the 'trigger-trial trl' > for identity or overlap with entries in the 'rejection-trial trl'. > > > can redefinetrial solve my problem? how? thank you so much, again! > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > Don't understand what is wrong with your data_org trial. The trl > definition > has 3 columns per trial: first sample of trial, last sample of trial and > offset, did your data_org.cfg.trl have that? > > Anyways you can "epoch" your data to one long single trial > > trl = [1 last_sample 0] > or use trialfun_general in definetrial with cfg.ntrials = 1; and > cfg.triallength = inf; > > Then do artifact detection/rejection and then redefine trial to real > epochs > based on triggers. Would that work? > > Have a nice weekend too, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 4:00 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] automatic EOG rejection > > > > dear ingrid, > > > > thanks a lot, I greatly appreciate your immediate response! > > what you suggest was what I was trying next :-). I already had suspected > > the padding to be my problem. > > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > > > ??? Reference to non-existent field 'trl'. > > Error in ==> artifact_eog at 165 > > tmpcfg.trl = cfg.trl; > > > > > > as soon as i declare > > > > cfg.trl = data_org.cfg.trl > > > > > > i.e. get 'trl' from the original, continuous data structure in memory > > (data_org), matlab errors > > > > Input must be a row vector of characters > > > > > > thanks a lot in advance, and have a good weekend, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ----- Ursprüngliche Mail ----- > > Von: "Ingrid Nieuwenhuis" > > An: FIELDTRIP at NIC.SURFNET.NL > > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > > > Dear Lars, > > > > The error message means that fetch_data tries to fetch data outside of > > your > > trials where there is no data supplied in the input data file. > Fetch_data > > was recently changed and now puts NaNs where there is no data. But > > filtering > > data with NaNs is not a good idea, therefore the warning. > > > > What happens is in artifact_eog is that the data is padded, or better > > said, > > there is an attempt to pad the data. This is done to avoid filter > artifact > > at the edges, and for optimal artifact detections at/just over the > border > > (which can influence filtering). This padding doesn't work because in > the > > input data you supplied there is no extra data which can be used for > > padding. Therefore the NaN's or the error that not all samples are > present > > in the data. > > > > Would you can do is epoch the data into trials after artifact detection. > > So > > first detect and reject artifacts, and then use redefinetrial (give the > > trl > > you have now) to epoch the data. > > > > Hope this helps, > > Best Ingrid > > > > > -----Original Message----- > > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > > Behalf Of Lars Meyer > > > Sent: Friday, August 07, 2009 2:23 PM > > > To: FIELDTRIP at NIC.SURFNET.NL > > > Subject: [FIELDTRIP] automatic EOG rejection > > > > > > dear all, > > > > > > (newest fieldtrip, newest matlab) > > > > > > trying automatic EOG artifact rejection, i get the following error: > > > > > > In fetch_data at 111 > > > In artifact_zvalue at 213 > > > In artifact_eog at 179 > > > Warning: data contains NaNs, no filtering applied > > > > > > > > > workflow was (these all worked): > > > > > > - reading continous data to memory > > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > > - appending EOG channels > > > - re-refercing > > > - filtering > > > - epoching according to triggers > > > > > > > > > while trying automatic rejection comes the error; visual rejection > just > > > works fine. in the olf fieldtrip version, the error message said "not > > all > > > samples are present in the data". i checked the data structure; the > > merged > > > EOG channels have been correctly appended and labelled. attached is my > > > code, thanks a lot in advance! > > > > > > > > > all best, > > > lars > > > > > > > > > Lars Meyer | MSc > > > Max Planck Institute for Human Cognitive & Brain Sciences > > > Department of Neuropsychology > > > Stephanstraße 1a > > > 04103 Leipzig | Germany > > > > > > Office | +49 (0)341 99 40 22 66 > > > Fax | +49 (0)341 99 40 22 60 > > > Mobile | +49 (0)175 113 76 65 > > > Home | +49 (0)341 974 26 49 > > > Mail | lmeyer at cbs.mpg.de > > > Web | www.cbs.mpg.de/~lmeyer > > > > > > ---------------------------------- > > > 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. > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. From ingrid.nieuwenhuis at DONDERS.RU.NL Tue Aug 11 13:53:18 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 11 Aug 2009 13:53:18 +0200 Subject: topoplotTFR on planar gradients In-Reply-To: <4A7EEC8B.5050800@uni-mainz.de> Message-ID: Dear Alex, It looks as if you forgot to do combineplanar after freqanalysis, since senstype is ctf275_planar. See http://fieldtrip.fcdonders.nl/tutorial/eventrelatedaveraging#calculate_the_p lanar_gradient for more info Important to get planar gradient power data you should first calculate planar gradient, then do freqanalysis and finally combine planar. (NOT first combine and then freqanalysis, since the combined planar gradient is always positive, and all frequencies will be messed up then) Hope this helps, Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Walther Alexander > Sent: Sunday, August 09, 2009 5:35 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] topoplotTFR on planar gradients > > Dear Fieldtrip Users, > > I'd like to apply the multiplotTFR function on freqstatistic results. > The MEG raw data were converted to planar gradient scores and passed > freqanalysis. Using fieltrip version 2008-12-08, the error message > 'unsupported MEG sensor type' occurres which goes back to > prepare_layout.m, line 880. Apparently, though senstype.m gets me the > right information (ctf275_planar) that should be used to create an > appropriate layout, prepare_layout ignores this and directly heads for > the error message. Planar gradient settings seem to struggle somehow > with grad2lay.m (line 259). If I switch to Fieltrip-20090803, it will > create the plot thats attached. My configuration settings read as follows: > > cfg.maskparameter = 'mask'; > cfg.zparam = 'stat'; > cfg.interactive = 'yes'; > cfg.zlim = [-4 4]; > figure, multiplotTFR(cfg,data) > > > Given unconverted raw data, everything works out well. Any advice? > > Cheers > > Alex > > -- > Alexander Walther > Johannes-Gutenberg-University Mainz > > > ---------------------------------- > 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. From thomas.hartmann at UNI-KONSTANZ.DE Wed Aug 12 11:15:18 2009 From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann) Date: Wed, 12 Aug 2009 11:15:18 +0200 Subject: correlation between biological and behavioral data Message-ID: hi, is it possible to perform a correlation between biological data and behavioral / questionaire data using fieldtrip? i have one dataset per subject with frequency-data. i want to correlate this data with data from a questionaire (one score per subject). thanx in advance, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) ---------------------------------- 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. From dsenkows at UKE.UNI-HAMBURG.DE Wed Aug 12 15:41:55 2009 From: dsenkows at UKE.UNI-HAMBURG.DE (Daniel Senkowski) Date: Wed, 12 Aug 2009 15:41:55 +0200 Subject: Volumesegment - GLNX86 IEEE floating point Message-ID: Hi everyone, I received the following error message when calling the volumesegment function. ??? Error using ==> spm_platform at 86 I don't think that "GLNX86" uses IEEE floating point ops. Does anyone has an idea how to fix this? Thank you, Daniel >> cfg = []; cfg.downsample = 2; cfg.coordinates = 'ctf'; seg = volumesegment(cfg, mri); the input is volume data with dimensions [256 256 256] assuming CTF coordinates for input, i.e. positive X-axis towards nasion and Y-axis through ears Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 32 In spm_create_vol at 14 In volumewrite_spm at 61 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 168 In spm_create_vol at 14 In volumewrite_spm at 61 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 196 In spm_create_vol at 14 In volumewrite_spm at 61 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 32 In spm_create_vol at 14 In spm_write_vol at 76 In volumewrite_spm at 62 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 168 In spm_create_vol at 14 In spm_write_vol at 76 In volumewrite_spm at 62 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 186 In spm_create_vol at 14 In spm_write_vol at 76 In volumewrite_spm at 62 In volumesegment at 222 performing the segmentation on the specified volume ??? Error using ==> spm_platform at 86 I don't think that "GLNX86" uses IEEE floating point ops. Error in ==> spm_vol_minc at 80 if ~spm_platform('bigend') & datatype~=2 & datatype~=2+128, datatype = datatype*256; end; Error in ==> spm_vol>subfunc at 99 if isempty(n), V=spm_vol_minc(p); Error in ==> spm_vol>subfunc1 at 62 v = subfunc(P(i,:)); Error in ==> spm_vol>subfunc2 at 51 V = subfunc1(P); Error in ==> spm_vol at 37 V = subfunc2(P); Error in ==> spm_segment>init_sp at 567 SP.VB = spm_vol(flags.priors); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 246 spm_segment(Va,cfg.template,flags); -- 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. J�rg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Ricarda Klein Prof. Dr. Dr. Uwe Koch-Gromus ---------------------------------- 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. From wibral at BIC.UNI-FRANKFURT.DE Thu Aug 13 13:43:00 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 13 Aug 2009 13:43:00 +0200 Subject: Open Positions at the Brain Imaging Center Frankfurt Message-ID: Dear Fieldtrip list users, Dr. Peter Uhlhaas from the Max Planck Institute for Brain Research, Dept. Neurophysiology asked me to post these positions related to MEG research at the Brain Imaging Center Frankfurt. Please note that prior experience with MEG is not required. Michael Wibral _______________________________ Postdoctoral Position in Brain Imaging _______________________________ A postdoctoral position in brain imaging is available at the Max Planck Institute for Brain Research, Department of Neurophysiology (Director: Professor W. Singer) in the group of Dr. Peter J. Uhlhaas. The successful applicant will work on projects examining neural oscillations in schizophrenia with magnetoencephalography (MEG) with advanced signal-processing analyses (Beamforming, Transfer Entropy). The position is in collaboration with Dr. Michael Wibral (Head: MEG-Unit, Brain Imaging Center Frankfurt). The ideal candidate should have a PhD in neuroimaging and expertise with a neuroimaging technique (EEG, MEG, fMRI/MRI). Prior experience with MEG is not a prerequisite. Excellent research opportunities are available at the nearby Brain Imaging Center. Applications from a physics or engineering background are welcome as well. Expertise in Matlab or another programming language is desirable. The position will run for two years. The successful applicant will receive a stipend, depending on qualification and years of working experience. The position will start on the 1st of January 2010. Informal inquiries can be directed to Peter Uhlhaas (uhlhaas at mpih-frankfurt.mpg.de). To apply, please send curriculum vitae, letter of interest, names and contact information of two references to: Peter Uhlhaas Max Planck Institute for Brain Research Department of Neurophysiology Deutschordenstr. 46 60528 Frankfurt am Main GERMANY ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From nela.cicmil at DPAG.OX.AC.UK Mon Aug 17 10:53:43 2009 From: nela.cicmil at DPAG.OX.AC.UK (Nela Cicmil) Date: Mon, 17 Aug 2009 09:53:43 +0100 Subject: beamformer tutorial - sourceplot/sourceinterpolate? Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From j.schoffelen at PSY.GLA.AC.UK Mon Aug 17 12:24:35 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Mon, 17 Aug 2009 11:24:35 +0100 Subject: beamformer tutorial - sourceplot/sourceinterpolate? In-Reply-To: <20090817085343.D383D58007@webmail223.herald.ox.ac.uk> Message-ID: Dear Nela, Are you using the tutorial data, or data of your own? Best, JM On 17 Aug 2009, at 09:53, Nela Cicmil wrote: > Dear all, > > I'm a new user of fieldtrip, and encounter a problem with sourceplot > and > sourceinterploate functions in the beamformer source analysis > tutorial. > > In the tutorial, when using the function sourceplot to plot the > source-interpolated data (that is produced by the function > sourceinterpolate), > my image created is completely different from the example in the > tutorial. > > Specifically, the functional brain activity seems extremely > magnified and is not > contained within the boundaries of the mri anatomy (the slices of > which are > plotted in a different order from the tutorial example image). This > image > problem occurs even when the instructions are followed (as far as I > am aware) > exactly, using the latest possible downloaded tutorial data. > Sourceplot works > fine when plotting mri segmented data. > > My guess is that this is related to the warning I receive from > sourceinterpolate > in the step before sourceplot: > > Warning: assuming that the units are "mm" >> In fieldtrip-20090808/private/estimate_units at 29 > In fieldtrip-20090808/private/convert_units at 128 > In sourceinterpolate at 208 > converting functional data from cm into mm > converting units from 'cm' to 'mm' > > - because making the units of the anatomical data 1000x smaller > *could* account > for the problem with my plotted image. But when > I try to fix these parameters, the warning appears: > > Warning: The option cfg.sourceunits is deprecated, support is no > longer guaranteed > The option cfg.mriunits is deprecated, support is no longer guaranteed > > - and it does not seem possible to change anything. I wonder if > anyone can help > me to work out a solution to this problem? > > Sorry to bother you with a query about a tutorial; it is just that I > would like > to have confidence that I can get the functions to work properly > before > attempting to analyze more complex data! > > Thanks in advance, > Nela > > ps. I am using fieldtrip 20090808 on a Mac 10.5.8 with matlab 7.8.0 > (R2009a), > and I have spm2 on my machine, working as far as I can tell. > > -- > Nela Cicmil > D.Phil Candidate, Neurophysiology > DPAG > University of Oxford > > > ---------------------------------- > 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. From nela.cicmil at DPAG.OX.AC.UK Mon Aug 17 12:07:11 2009 From: nela.cicmil at DPAG.OX.AC.UK (Nela Cicmil) Date: Mon, 17 Aug 2009 11:07:11 +0100 Subject: beamformer tutorial - sourceplot/sourceinterpolate? In-Reply-To: <101C51FD-D910-4F6C-BBE5-EFEEDB8415AB@psy.gla.ac.uk> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From amrgermany at YAHOO.COM Mon Aug 17 13:37:36 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Mon, 17 Aug 2009 11:37:36 +0000 Subject: Re2: [FIELDTRIP] freqanalysis_wltconvol variance In-Reply-To: <010a01ca1691$1f28b170$642dae83@fcdonders.nl> Message-ID: Dear Ingrid, The analysis is painfully slow; it would need weeks to finish. Is there a MEX implementation of the time freq. analysis? Which is faster wltconvol or mtmconvol? Below is the configuration of the time freq. analysis. cfg.sgn = 'MEG'; cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.foi = 40:2:100 ; cfg.toi = -1.4:0.01:1.4; cfg.keeptrials='yes'; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 0.5 sec cfg.taper = 'hanning'; TFR = freqanalysis(cfg, TFA_slo_fz); vs cfg.sgn = 'MEG'; cfg.method = 'wltconvol '; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 40:2:100 ; cfg.toi = -1.4:0.01:1.4; cfg.keeptrials='yes'; TFR = freqanalysis(cfg, TFA_slo_fz); Data configuration: Number of channels:151 Sampling rate:250 Number of trials:391 PC configuration: Windows Vista Business SP1 64 bit - Intel Core 2 CPU 6320 @ 1.86Ghz 1.86Ghz - RAM 4GB Best regards, Amr ________________________________ From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, August 6, 2009 2:26:28 PM Subject: Re: [FIELDTRIP] freqanalysis_wltconvol variance Dear Amr, If you do freqanalysis with cfg.keeptrials = ‘yes’, you get the power per trial. If you subsequently use freqdescriptives (see help for detailed options) you can compute the variance over trials. Best Ingrid ________________________________ From:FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Thursday, August 06, 2009 1:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_wltconvol variance Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 17 14:16:48 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 17 Aug 2009 14:16:48 +0200 Subject: Re2: [FIELDTRIP] freqanalysis_wltconvol variance In-Reply-To: <241368.52789.qm@web23602.mail.ird.yahoo.com> Message-ID: Dear Amr There is no MEX implementation. I'm quite sure (not 100% though, you could test with tic toc to be sure) that mtmconvol is faster than wltconvol. I do have some tips to speed up the analysis though: 1) make the timesteps smaller, for instance 0.05 sec in stead of 0.01 sec. You have a time window of 0.5 second, so your actual time resolution is quite limited anyway. 2) Do you really need a frequency resolution of 2 Hz? You could start with 5 Hz frequency steps and increase the resolution if needed later. Hope this helps a bit, Ingrid PS please don't put my name above the question so also others can feel free to answer the question. I don't mind answering questions (if they are well phrased and I happen to know the answer such as in your case :-)), but I also don't mind if others do ;-) _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Monday, August 17, 2009 1:38 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Re2: [FIELDTRIP] freqanalysis_wltconvol variance Dear Ingrid, The analysis is painfully slow; it would need weeks to finish. Is there a MEX implementation of the time freq. analysis? Which is faster wltconvol or mtmconvol? Below is the configuration of the time freq. analysis. cfg.sgn = 'MEG'; cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.foi = 40:2:100 ; cfg.toi = -1.4:0.01:1.4; cfg.keeptrials='yes'; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 0.5 sec cfg.taper = 'hanning'; TFR = freqanalysis(cfg, TFA_slo_fz); vs cfg.sgn = 'MEG'; cfg.method = 'wltconvol '; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 40:2:100 ; cfg.toi = -1.4:0.01:1.4; cfg.keeptrials='yes'; TFR = freqanalysis(cfg, TFA_slo_fz); Data configuration: Number of channels:151 Sampling rate:250 Number of trials:391 PC configuration: Windows Vista Business SP1 64 bit - Intel Core 2 CPU 6320 @ 1.86Ghz 1.86Ghz - RAM 4GB Best regards, Amr _____ From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, August 6, 2009 2:26:28 PM Subject: Re: [FIELDTRIP] freqanalysis_wltconvol variance Dear Amr, If you do freqanalysis with cfg.keeptrials = 'yes', you get the power per trial. If you subsequently use freqdescriptives (see help for detailed options) you can compute the variance over trials. Best Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Thursday, August 06, 2009 1:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_wltconvol variance Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 Roman.Freunberger at SBG.AC.AT Mon Aug 17 15:31:04 2009 From: Roman.Freunberger at SBG.AC.AT (Roman Freunberger) Date: Mon, 17 Aug 2009 15:31:04 +0200 Subject: Reading brainvision dat files Message-ID: Hello, I am a new fieldtrip user and would like to know how to read brainvision files that were exported as .dat into matlab with fieldtrip. It would be great to read segmented and/ or continous data into matlab that was preprocessed (artifact correction, ...) in brainvision analyzer. I tried read_data in combination with the read_header function and I always get this message: ??? Error using ==> zeros NaN and Inf not allowed. Error in ==> read_brainvision_eeg at 89 dat = zeros(endsample-begsample+1, hdr.NumberOfChannels); Error in ==> read_data at 686 dat = read_brainvision_eeg(filename, hdr.orig, begsample, endsample); Error in ==> ReadAnalyzerSegments at 7 data = read_data(filename); Thank you in advance and best wishes, Roman ********************************************************** Dr. Roman Freunberger Department of Psychology University of Salzburg Hellbrunnerstrasse 34 5020 Salzburg, Austria ---------------------------------- 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 j.schoffelen at PSY.GLA.AC.UK Mon Aug 17 17:41:28 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Mon, 17 Aug 2009 16:41:28 +0100 Subject: Reading brainvision dat files In-Reply-To: Message-ID: Dear Roman, I don't have a lot of experience dealing with brainvision files in fieldtrip, but it looks as though there's something going wrong with the allocation of the data matrix. Apparently, one of the input arguments into the function zeros(), is either not a number, or infinite. This means, that either the quantity endsample-begsmaple+1 is behaving strangely, or that the hdr.NumberOfChannels is faulty, which would point to a problem reading in the header information from your datafile. Best, jan-Mathijs On 17 Aug 2009, at 14:31, Roman Freunberger wrote: > Hello, > > I am a new fieldtrip user and would like to know how to read > brainvision files that were exported as .dat into matlab with > fieldtrip. It would be great to read segmented and/ or continous > data into matlab that was preprocessed (artifact correction, …) in > brainvision analyzer. I tried read_data in combination with the > read_header function and I always get this message: > > ??? Error using ==> zeros > NaN and Inf not allowed. > > Error in ==> read_brainvision_eeg at 89 > dat = zeros(endsample-begsample+1, hdr.NumberOfChannels); > > Error in ==> read_data at 686 > dat = read_brainvision_eeg(filename, hdr.orig, begsample, > endsample); > > Error in ==> ReadAnalyzerSegments at 7 > data = read_data(filename); > > Thank you in advance and best wishes, > Roman > > ********************************************************** > Dr. Roman Freunberger > Department of Psychology > University of Salzburg > Hellbrunnerstrasse 34 > 5020 Salzburg, Austria > > > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/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 nathanweisz at MAC.COM Wed Aug 19 10:46:00 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 19 Aug 2009 10:46:00 +0200 Subject: job offer at the University of Konstanz Message-ID: i'm looking for 1 postdoc to joing my lab. details can be found in the attachment. in principle the postdoc position can be divided into 2 PhD positions, so applications from excellent PhD candidates are encouraged as well. please forward this mail to anyone who may be interested. best wishes, nathan -------------------------------------------- Dr. Nathan Weisz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 Email: nathan.weisz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "Nothing shocks me. I'm a scientist." (Indiana Jones) ---------------------------------- 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Postdoc_EmmyNoether.pdf Type: application/pdf Size: 51179 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From wibral at BIC.UNI-FRANKFURT.DE Wed Aug 19 12:35:28 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Wed, 19 Aug 2009 12:35:28 +0200 Subject: ctf data / 3rd gradients and megplanar/combineplanar Message-ID: Dear Listusers, we have stumbled over a little thing in relation to ctf MEG data and the new preprocessing tools for 3rd gradients. This is not an error in the code, but something that the users can easily do wrong: Combineplanar gives strange results if the ctf reference channels are still in the data, but doesn't really throw an error (in FT20081210, FT ??). Note that - to my limited knowledge - you need the ctf reference channels (P,Q,R,B,G, etc.) in preprocessing if you want to use the ctf tools and synthetic 3rd gradient formation (or want to backtransform from 3rd gradients to magnetometers). Therefore you have to take care to finally get rid of these channels at some point before you compute megplanar or combineplaner. A typical point in your code to do this would be after 3rd gradient preprocessing and before filtering or any other preprocessing. Simply set cfg.channel={'MEG'} for this next step. Hope this helps, Michael ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From tomh at KURAGE.NIMH.NIH.GOV Thu Aug 20 21:16:19 2009 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd (NIH/NIMH) [E]) Date: Thu, 20 Aug 2009 15:16:19 -0400 Subject: [biomag] paper announcement In-Reply-To: <4A869AED020000FE0002F817@markab.hcuge.ch> Message-ID: Rolando GRAVE wrote: > Dear Colleagues, > > We would like to call your attention to the recent publication: > http://www.hindawi.com/journals/cin/2009/656092.html > > EEG/MEG Source Imaging: Methods, Challenges, and Open Issues > > by: > Katrina Wendel, Outi Väisänen, Jaakko Malmivuo, Nevzat G. Gencer, Bart > Vanrumste, Piotr Durka, Ratko Magjarević, Selma Supek, Mihail Lucian > Pascu, Hugues Fontenelle and Rolando Grave de Peralta Menendez > >>From the paper: 2.2. Things to Avoid ... (1) Baseline correction. Varying the values of individual electrodes either by “arbitrary” baseline shifting or by scaling factors changes the surface maps and thus the estimated sources. Although linear inverse solutions are rather stable (continuity with respect to the data), the application of base line correction to two conditions (that will be compared on the basis of their sources) can produce artificial differences induced by the correction and not by the real sources. I disagree. Radial gradiometers, as used in CTF MEG systems, have an arbitrary baseline that MUST be removed. (3) The use of very high density of sensors might also jeopardize the source analysis due to different kinds of noise at different sensors. Moreover, no significant information is added after approximately 128 electrodes due to the noise levels. Lastly, some sensors might measure more artifacts than others due to their location near active muscles. You're talking EEG only again. Stop saying EEG/MEG when you only know about EEG. Adding sensors to an MEG system _increases_ spatial resolution. -- Dr. Tom --- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow ---------------------------------- 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. From Sara.GonzalezAndino at HCUGE.CH Fri Aug 21 10:14:45 2009 From: Sara.GonzalezAndino at HCUGE.CH (Sara GONZALEZ ANDINO) Date: Fri, 21 Aug 2009 10:14:45 +0200 Subject: [biomag] paper announcement In-Reply-To: <4A8DA103.1090502@kurage.nimh.nih.gov> Message-ID: Dear Dr. Tom, thanks for your interest in our paper "EEG/MEG Source Imaging: Methods, Challenges, and Open Issues" http://www.hindawi.com/journals/cin/2009/656092.html and for bringing to discussion such important topics. I do not know if all the authors of the manuscript receive mailings from these two lists. Thus, although not necessarily on behalf of all the authors, I would like to make some comments about your points. > I disagree. Radial gradiometers, as used in CTF MEG systems, have an arbitrary baseline that MUST be removed. We thought it was obvious that an arbitrary baseline need to be removed from measurements. Now, if your system really has an arbitrary (i.e. unknown and independent for each sensor) base lines, then such system cannot yield true magnetic field distributions. I guess this is not the case. Our comment was actually a warning about the facts that 1) modifying the base line does change the map (i.e the field distribution) and therefore the estimated source for both EEG or MEG. 2) Significant physiological effects (e.g. pre attentive states) are also part of the "baseline" and will be removed by this procedure. > You're talking EEG only again. Stop saying EEG/MEG when you only know about EEG. Adding sensors to an MEG system _increases_ spatial resolution. Hopefully the mathematics and physics behind EEG and MEG are the same, then: 1) If measurement M(r) ( for EEG and MEG !) are to be continuos then it is mathematically necessary that closeness between two sensors placed at r1 and r2 implies closeness of the measurements M(r1) and M(r2). From this derives that adding sensors cannot indefinitely increase spatial resolution, and that numerical ill-conditioning emerge as a consequence of the linear dependence of measurements (i.e. lead field rows). Since noise also grows with the amount of sensors, there is a limit beyond which no new information is added in the measurements but just noise. 2) If you prefer the physics to the mathematics you can look at Geselowitz equation describing the connection (In a realistic head model) between the magnetic field at/ near the scalp and the electrical potential at the interfaces. While this is not a demonstration it might help you to understand "de que va la cosa" i.e how things work. 3) You might be also interested in reading Malmivuo's papers (quoted in the manuscript you refer)) comparing spatial resolution for both EEG and MEG. In agreement with previous point (2) no significant differences in spatial resolution seems to exist between these two modalities. 4) Similar conclusions were obtained using different analysis procedures in "Spatial resolution of neuronal generators based on EEG and MEG measurements". International Journal of Neuroscience 68: 93-105, 1993 (by Pascual Marqui and Biscay Lirio). In summary I think that our comments are valid for both EEG and MEG. regards rolando www.electrical-neuroimaging.ch -- Dr. Tom --- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow >>> "Tom Holroyd (NIH/NIMH) [E]" 20.08.2009 21:16 >>> Rolando GRAVE wrote: > Dear Colleagues, > > We would like to call your attention to the recent publication: > http://www.hindawi.com/journals/cin/2009/656092.html > > EEG/MEG Source Imaging: Methods, Challenges, and Open Issues > > by: > Katrina Wendel, Outi Väisänen, Jaakko Malmivuo, Nevzat G. Gencer, Bart > Vanrumste, Piotr Durka, Ratko Magjarević, Selma Supek, Mihail Lucian > Pascu, Hugues Fontenelle and Rolando Grave de Peralta Menendez > >>From the paper: 2.2. Things to Avoid ... (1) Baseline correction. Varying the values of individual electrodes either by “arbitrary” baseline shifting or by scaling factors changes the surface maps and thus the estimated sources. Although linear inverse solutions are rather stable (continuity with respect to the data), the application of base line correction to two conditions (that will be compared on the basis of their sources) can produce artificial differences induced by the correction and not by the real sources. I disagree. Radial gradiometers, as used in CTF MEG systems, have an arbitrary baseline that MUST be removed. (3) The use of very high density of sensors might also jeopardize the source analysis due to different kinds of noise at different sensors. Moreover, no significant information is added after approximately 128 electrodes due to the noise levels. Lastly, some sensors might measure more artifacts than others due to their location near active muscles. You're talking EEG only again. Stop saying EEG/MEG when you only know about EEG. Adding sensors to an MEG system _increases_ spatial resolution. -- Dr. Tom --- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow ---------------------------------- 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. From wibral at BIC.UNI-FRANKFURT.DE Fri Aug 21 10:46:38 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Fri, 21 Aug 2009 10:46:38 +0200 Subject: [biomag] paper announcement Message-ID: Dear Tom, dear Sara, I think there is possibly a slight misunderstanding between the two of you with respect to the 'arbitrary baseline' of the axial gradiometers. As far as I understand the issue, this baseline is arbitrary and individual per sensor, but relatively stable and can be removed by 'calibration' before the measurement (i.e. in a null measurement without brain-derived magnetic fields), i.e. in a setup step of the machine. All brain-derived magnetic fields are a difference to this null-state and should be correct in their field distribution as they were added after the calibration step. So there is no need to subtract the experimental pre-stimulus baseline while measuring and thereby to sacrifice information about brain status in the experimental baseline. Tom, would you please correct me by a response to the list if I am wrong on the machine related/technical issues here. Thanks, Michael > -----Ursprüngliche Nachricht----- > Von: "Sara GONZALEZ ANDINO" > Gesendet: 21.08.09 10:20:22 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] [biomag] paper announcement > Dear Dr. Tom, > thanks for your interest in our paper > > "EEG/MEG Source Imaging: Methods, Challenges, and Open Issues" > http://www.hindawi.com/journals/cin/2009/656092.html > and for bringing to discussion such important topics. > > I do not know if all the authors of the manuscript receive mailings > from these two lists. Thus, although not necessarily on behalf of all > the authors, I would like to make some comments about your points. > > > I disagree. Radial gradiometers, as used in CTF MEG systems, > have an arbitrary baseline that MUST be removed. > > We thought it was obvious that an arbitrary baseline need to be removed > from measurements. Now, if your system really has an arbitrary (i.e. > unknown and independent for each sensor) base lines, then such system > cannot yield true magnetic field distributions. I guess this is not the > case. Our comment was actually a warning about the facts that 1) > modifying the base line does change the map (i.e the field distribution) > and therefore the estimated source for both EEG or MEG. 2) Significant > physiological effects (e.g. pre attentive states) are also part of the > "baseline" and will be removed by this procedure. > > > > You're talking EEG only again. Stop saying EEG/MEG when you only > know about EEG. Adding sensors to an MEG system _increases_ spatial > resolution. > > Hopefully the mathematics and physics behind EEG and MEG are the same, > then: > > 1) If measurement M(r) ( for EEG and MEG !) are to be continuos then it > is mathematically necessary that closeness between two sensors placed at > r1 and r2 implies closeness of the measurements M(r1) and M(r2). From > this derives that adding sensors cannot indefinitely increase spatial > resolution, and that numerical ill-conditioning emerge as a consequence > of the linear dependence of measurements (i.e. lead field rows). Since > noise also grows with the amount of sensors, there is a limit beyond > which no new information is added in the measurements but just noise. > > 2) If you prefer the physics to the mathematics you can look at > Geselowitz equation describing the connection (In a realistic head > model) between the magnetic field at/ near the scalp and the electrical > potential at the interfaces. While this is not a demonstration it might > help you to understand "de que va la cosa" i.e how things work. > > 3) You might be also interested in reading Malmivuo's papers (quoted in > the manuscript you refer)) comparing spatial resolution for both EEG and > MEG. In agreement with previous point (2) no significant differences in > spatial resolution seems to exist between these two modalities. > > 4) Similar conclusions were obtained using different analysis > procedures in "Spatial resolution of neuronal generators based on EEG > and MEG measurements". International Journal of Neuroscience 68: 93-105, > 1993 (by Pascual Marqui and Biscay Lirio). > > In summary I think that our comments are valid for both EEG and MEG. > > regards > > rolando > www.electrical-neuroimaging.ch > > > > -- > Dr. Tom > --- > I would dance and be merry, > Life would be a ding-a-derry, > If I only had a brain. > -- The Scarecrow > > > >>> "Tom Holroyd (NIH/NIMH) [E]" 20.08.2009 > 21:16 >>> > Rolando GRAVE wrote: > > Dear Colleagues, > > > > We would like to call your attention to the recent publication: > > http://www.hindawi.com/journals/cin/2009/656092.html > > > > EEG/MEG Source Imaging: Methods, Challenges, and Open Issues > > > > by: > > Katrina Wendel, Outi Väisänen, Jaakko Malmivuo, Nevzat G. Gencer, > Bart > > Vanrumste, Piotr Durka, Ratko Magjarević, Selma Supek, Mihail Lucian > > Pascu, Hugues Fontenelle and Rolando Grave de Peralta Menendez > > > > From the paper: > > 2.2. Things to Avoid > > ... > > (1) Baseline correction. Varying the values of individual electrodes > either by “arbitrary” baseline shifting or by scaling factors > changes the surface maps and thus the estimated sources. Although linear > inverse solutions are rather stable (continuity with respect to the > data), the application of base line correction to two conditions (that > will be compared on the basis of their sources) can produce artificial > differences induced by the correction and not by the real sources. > > I disagree. Radial gradiometers, as used in CTF MEG systems, > have an arbitrary baseline that MUST be removed. > > (3) The use of very high density of sensors might also jeopardize the > source analysis due to different kinds of noise at different sensors. > Moreover, no significant information is added after approximately 128 > electrodes due to the noise levels. Lastly, some sensors might measure > more artifacts than others due to their location near active muscles. > > You're talking EEG only again. Stop saying EEG/MEG when you only > know about EEG. Adding sensors to an > MEG system _increases_ spatial resolution. > > -- > Dr. Tom > --- > I would dance and be merry, > Life would be a ding-a-derry, > If I only had a brain. > -- The Scarecrow > > ---------------------------------- > 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. > ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From P.Toffanin at RUG.NL Thu Aug 27 11:53:07 2009 From: P.Toffanin at RUG.NL (Paolo Toffanin) Date: Thu, 27 Aug 2009 11:53:07 +0200 Subject: problem with brain vision data import? In-Reply-To: <4A8DA103.1090502@kurage.nimh.nih.gov> Message-ID: Dear fieldtrippers, I tried to search the list archive to see if somebody has encountered previously this problem but I was not successful, so if this issue has been already treated please address me to the solution. The problem is this. I'm loading into fieldtrip data recorded with brain vision recorder (BVR). However, I've noticed that the scales are different (see the attached pdf file), the one observed when exported from brain vision analyzer (BVA) seems 'smaller' than the one imported directly from BVR. Why is that? Is this a problem? My hope is that I won't have to use BVA anymore, even if just to export the data from there to matlab. Is this possible? The code I've used to import the data is also attached. (Data were exported from BVA as binary float 32) I hope I'm just missing a preprocessing step, but I'm not sure, could you please give me some indications? Thank you very much, Paolo ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: BVAplot.pdf Type: application/pdf Size: 8542 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ExampleImportBVA.m Type: text/x-tex Size: 574 bytes Desc: not available URL: From wibral at BIC.UNI-FRANKFURT.DE Thu Aug 27 12:32:35 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 27 Aug 2009 12:32:35 +0200 Subject: problem with brain vision data import? Message-ID: Dear Paolo, as far as I recall there should be functions to read brain vision recorder files directly into fieldtrip, i.e. you can read the .egg/.vhdr, etc. files with fieldtrip functions like definetrial.m, read_fcdc_data.m and preprocessing.m . There is no need to export to matlab first. As another workaround you could use the bvaimport functions of eeglab, cut things into trials, perhaps clean the data there and then save an eeglab .set file and read this into fieldtrip using the eeglab2fieldtrip.m function. Michael > -----Ursprüngliche Nachricht----- > Von: "Paolo Toffanin" > Gesendet: 27.08.09 12:04:32 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] problem with brain vision data import? > Dear fieldtrippers, > > I tried to search the list archive to see if somebody has encountered > previously this problem but I was not successful, so if this issue has been > already treated please address me to the solution. > > The problem is this. I'm loading into fieldtrip data recorded with brain vision > recorder (BVR). However, I've noticed that the scales are different (see the > attached pdf file), the one observed when exported from brain vision analyzer > (BVA) seems 'smaller' than the one imported directly from BVR. Why is that? Is > this a problem? > > My hope is that I won't have to use BVA anymore, even if just to export the > data from there to matlab. Is this possible? > > The code I've used to import the data is also attached. (Data were exported > from BVA as binary float 32) > > I hope I'm just missing a preprocessing step, but I'm not sure, could you > please give me some indications? > > Thank you very much, > Paolo > > ---------------------------------- > 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 -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From bleichner.martin at GMAIL.COM Thu Aug 27 14:36:05 2009 From: bleichner.martin at GMAIL.COM (Martin Bleichner) Date: Thu, 27 Aug 2009 14:36:05 +0200 Subject: Afni for Beamforming Message-ID: Hi there, I want to do some beamforming on my MEG data. The mri data with the anatomy is in afni format. Can fieldtrip read afni? I guess I have to add something to fieldtrip/external. Can someone tell me what I would have to add? Thanks Martin ---------------------------------- 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 j.schoffelen at PSY.GLA.AC.UK Thu Aug 27 16:31:39 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Thu, 27 Aug 2009 14:31:39 +0000 Subject: Afni for Beamforming In-Reply-To: Message-ID: Hi Martin, Yes, with some help fieldtrip can read afni format. You have to download the matlab toolbox from the afni-site: afni.nimh.nih.gov, and install it somewhere on your matlab-path. It is not necessary to put it into fieldtrip/external, as long as the directory is in your path it should work. Best, Jan-Mathijs On 27 Aug 2009, at 12:36, Martin Bleichner wrote: > Hi there, > > I want to do some beamforming on my MEG data. The mri data with the > anatomy is in afni format. > Can fieldtrip read afni? I guess I have to add something to > fieldtrip/external. > Can someone tell me what I would have to add? > > Thanks > Martin > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/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. From masaki.maruyama at CEA.FR Thu Aug 27 16:29:34 2009 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Thu, 27 Aug 2009 16:29:34 +0200 Subject: Coordinate of volume segmentation Message-ID: Hello, Would someone please give me suggestions or advices on the coordinate of volume segmentation? I have struggled with it in these weeks with referring the examples on the FieldTrip web pages and the previous discussions on the mailing list. However, my result still seems to be incorrect. I realigned a DICOM image file using "volumerealine", and then I segmented the volume based on the CTF coordinate. Following the examples on the FieldTrip web pages (e.g, http://fieldtrip.fcdonders.nl/example/read_neuromag_mri_and_create_singl e-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_spa ce), I examined permutations and flips of the images of segmented volumes. However, the segmented brain area was partially outside the head at the best flip (Please see the attached file). The segmented brain seems to be shifted upward than the real brain position. As far as I examined, any permutations and flips could not align appropriately. Do I need a transformation after the volume segmentation in order to comensate the difference in the origin between CTF and MNI coordinates? I'm also wondering if my original MRI image might need to be permuted/flipped before the volumerealine, since the permutation ([2 3 1]) and the best flip (only x & z axes) in my case are different from the examples on the web pages. I would appreciate any responses. With best regards, Masaki Maruyama The following is the script I used. mri_file = '/neurospin/MRI/DICOM/sbh080102633-0002-00001-000160-01.img'; mri_org = read_mri(mri_file); cfg = []; mri = volumerealign(cfg, mri_org); cfg = []; cfg.coordinates = 'ctf'; cfg.template = '/i2bm/platform/spm2/templates/T1.mnc'; [segmentedmri] = volumesegment(cfg, mri); test = segmentedmri; test.anatomy = mri.anatomy; test.transform = mri.transform; test.gray = permute(segmentedmri.gray, [2 3 1]); test.white = permute(segmentedmri.white, [2 3 1]); test.csf = permute(segmentedmri.csf, [2 3 1]); test.dim = mri.dim; for t = [1 3] test.gray = flipdim(test.gray,t); test.white = flipdim(test.white,t); test.csf = flipdim(test.csf,t); end test.avg.pow = test.gray + test.white + test.csf; cfg = []; cfg.funparameter = 'avg.pow'; cfg.interactive = 'no'; cfg.method = 'slice'; figure(2);clf sourceplot(cfg,test) ---------------------------------- 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: SegmentationResult.jpg Type: image/jpeg Size: 89257 bytes Desc: SegmentationResult.jpg URL: From dahliash at STANFORD.EDU Fri Aug 28 08:34:30 2009 From: dahliash at STANFORD.EDU (Dahlia Sharon) Date: Thu, 27 Aug 2009 23:34:30 -0700 Subject: freqdescriptives/statistics In-Reply-To: <790717569.753411251441250970.JavaMail.root@zm09.stanford.edu> Message-ID: Hi all, Is there a more detailed explanation of usage for the jackknife and biascorrect options for freqdescriptives than the one in the freqdescriptives reference page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? More specifically, are these options related to Bokil et al NeuroIm 2007? How should they be employed to determine significance of difference between conditions? (Is there somewhere a tutorial for the use of these options analogous to the one about cluster-based permutation testing?) Also, for the permutation analysis of TFRs (http://fieldtrip.fcdonders.nl/tutorial/statistics?s[]=freqstatistics), if I don't want to employ the planar gradient step (what exactly IS combineplanar? sorry I couldn't find it), can I simply skip it and calculate the TFRs of the raw sensor data? Many thanks! Dahlia. ---------------------------------- 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 dimitri.papadopoulos at CEA.FR Mon Aug 31 23:40:40 2009 From: dimitri.papadopoulos at CEA.FR (Dimitri Papadopoulos-Orfanos) Date: Mon, 31 Aug 2009 23:40:40 +0200 Subject: *.BAK files Message-ID: Hi, Could you please remove BAK files from the FieldTrip distribution? For example: $ find fieldtrip-20090831 -name \*.ba\* fieldtrip-20090831/classification/preprocessors/whitener.bak fieldtrip-20090831/classification/preprocessors/tsner.bak fieldtrip-20090831/classification/validators/crossvalidator.bak fieldtrip-20090831/classification/classifiers/blogreg.bak fieldtrip-20090831/classification/classifiers/blogreg.ba3 fieldtrip-20090831/classification/classifiers/blogreg.ba2 fieldtrip-20090831/classification/toolboxes/gerven/gmrflab/LinRegLaplaceEP.bak fieldtrip-20090831/classification/toolboxes/gerven/gmrflab/fastinvre64.bak fieldtrip-20090831/classification/toolboxes/gerven/gmrflab/laplacedegenerate_ep.ba2 fieldtrip-20090831/classification/toolboxes/gerven/gmrflab/laplacedegenerate_ep.bak fieldtrip-20090831/classification/toolboxes/gerven/bmlab/SRBM.bak fieldtrip-20090831/classification/toolboxes/gerven/bmlab/RBM.bak fieldtrip-20090831/classification/toolboxes/gerven/bmlab/RBM.ba2 fieldtrip-20090831/classification/toolboxes/gerven/bmlab/bmlab_working/RBM.bak fieldtrip-20090831/classification/toolboxes/gerven/bmlab/bmlab_working/RBM.ba2 fieldtrip-20090831/classification/regressors/blinreg.bak fieldtrip-20090831/classification/regressors/circreg.bak Regards, -- Dimitri Papadopoulos CEA, I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France ---------------------------------- 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. From amrgermany at YAHOO.COM Mon Aug 3 13:33:11 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Mon, 3 Aug 2009 11:33:11 +0000 Subject: Significance plot of TFR-Morlet Message-ID: Hi everyone, How do I produce a significance plot of the "Time Frequency Representations of power calculated using Morlet wavelets"? Best regards, Amr Ayoub ---------------------------------- 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 ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 3 14:09:41 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 3 Aug 2009 14:09:41 +0200 Subject: Significance plot of TFR-Morlet In-Reply-To: <428227.44019.qm@web23608.mail.ird.yahoo.com> Message-ID: Dear Amr, >>From your question I can not make up what you already tried and where you run into problems, so I'll give you some basic handles to info at the FieldTrip wiki (and also see the help of the functions below). A nice overview on plotting functions in to be found in the plotting Tutorial: http://fieldtrip.fcdonders.nl/tutorial/plotting Did you try singleplotTFR, multiplotTFR or topoplotTFR with cfg.maskparameter options? There is also clusterplot but see the mailinglist posts that have been about that recently for limitations of clusterplot (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0907 &L=fieldtrip&T=0&F=&S=&P=4160) Hope this helps you further, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Monday, August 03, 2009 1:33 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Significance plot of TFR-Morlet Hi everyone, How do I produce a significance plot of the "Time Frequency Representations of power calculated using Morlet wavelets"? Best regards, Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 3 16:25:16 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 3 Aug 2009 16:25:16 +0200 Subject: FW: [FIELDTRIP] Significance plot of TFR-Morlet Message-ID: Please always send replies to the list and not only to the person that responded, so everyone can benefit and answer. _____ From: Amr Ayoub [mailto:amrgermany at yahoo.com] Sent: Monday, August 03, 2009 4:13 PM To: ingrid.nieuwenhuis at donders.ru.nl Subject: Re: [FIELDTRIP] Significance plot of TFR-Morlet Dear Ingrid, Thanks for your fast reply. Maybe I should rephrase my question. I have used singleplotTFR with cfg.basleine = [-1.8 1.8] cfg.basleinetype='relative' cfg.xlim=[-.5 .5] cfg.ylim=[10 106] cfg.zlim=[-1.8 1.8] I see red spots corresponding to high gamma activity but I don't know if they are significant or not. These red spots are scattered on different channels, time points and frequencies. Do you think taking 200 surrogate time points of the power spectrum assuming a normal distribution of the surrogate power values, a significance threshold can be calculated by two tailed test? threshold = norminv([(1-alpha/2)],M,SD), where alpha=0.01, M=mean and SD = standard deviation Then subtract this threshold from the powerspctrm and last but not least use singleplotTFR? Thanks for your help. Best regards, Amr Ps. To double check, is normalization applied to each frequency band in the singleplotTFR? Note: cf.maskparameter is a new option in singleplotTFR. _____ From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Monday, August 3, 2009 2:09:41 PM Subject: Re: [FIELDTRIP] Significance plot of TFR-Morlet Dear Amr, >>From your question I can not make up what you already tried and where you run into problems, so I'll give you some basic handles to info at the FieldTrip wiki (and also see the help of the functions below). A nice overview on plotting functions in to be found in the plotting Tutorial: http://fieldtrip.fcdonders.nl/tutorial/plotting Did you try singleplotTFR, multiplotTFR or topoplotTFR with cfg.maskparameter options? There is also clusterplot but see the mailinglist posts that have been about that recently for limitations of clusterplot (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0907 &L=fieldtrip&T=0&F=&S=&P=4160) Hope this helps you further, Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Monday, August 03, 2009 1:33 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Significance plot of TFR-Morlet Hi everyone, How do I produce a significance plot of the "Time Frequency Representations of power calculated using Morlet wavelets"? Best regards, Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 amrgermany at YAHOO.COM Mon Aug 3 13:33:11 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Mon, 3 Aug 2009 11:33:11 +0000 Subject: Significance plot of TFR-Morlet Message-ID: From ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 3 14:09:41 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 3 Aug 2009 14:09:41 +0200 Subject: Significance plot of TFR-Morlet In-Reply-To: <428227.44019.qm@web23608.mail.ird.yahoo.com> Message-ID: From jrkerlin at UCDAVIS.EDU Tue Aug 4 02:57:00 2009 From: jrkerlin at UCDAVIS.EDU (Jess R. Kerlin) Date: Mon, 3 Aug 2009 17:57:00 -0700 Subject: bdf files Message-ID: FTers, While trying to preprocess data *.bdf data in a recent version of FT (July 11th, 09). I get spikes in a significant subset of trials (sudden, unpredicatable jumps to ~8000 uV). I know these spikes are not present in the BDF files (no problems loading in BESA). FT does not detect an error, although one is clearly present. I've had different issues with previous versions of FT when loading in BDF's before using the biosig toolbox, but it looks like the newer code was largely ported from EEGLAB. Anyone know what's up? Thanks, Jess ---------------------------------- 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. From j.poort at NIN.KNAW.NL Wed Aug 5 10:43:29 2009 From: j.poort at NIN.KNAW.NL (Jasper Poort) Date: Wed, 5 Aug 2009 10:43:29 +0200 Subject: fourierspectra and freqstatistics Message-ID: Dear all, I have the following question I want to compare the powerspectra in two conditions for individual channels. When I first run freqanalyis with cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.keeptrials = 'yes'; this results in a power spectrum for two conditions: size(A.powspctrm): 943 1 19 48 ntrials x nchannels x nfrequency x ntime size(A.cumtapcnt): 943 19 I can then compare the powerspectra in two conditions by running freqstatistics with: cfg = []; cfg.method = 'analytic'; cfg.statistic = 'indepsamplesT'; ntrl1 = size(A.powspctrm,1); ntrl2 = size(B.powspctrm,1); design = zeros(1,ntrl1 + ntrl2); design(1,1:ntrl1) = 1; design(1,(ntrl1+1):(ntrl1+ntrl2)) = 2; cfg.design = design; cfg.ivar = 1; % independent variable stat = freqstatistics(cfg,A, B); differencepowspctrm = stat.stat; However, when I use freqanalyis with cfg.output = 'fourier'; this results in a fourier spectrum for two conditions: size(A.fourierspctrm): 4715 1 19 48 (ntapers (in my case 5) x ntrials) x nchannels x nfrequency x ntime size(A.cumtapcnt) : 943 1 Can I input these fourier spectra directly to freqstatistics or should I convert the fourierspectrum first to a powerspectrum (I assume this could be done by taking abs(fourierspectrum).^2 and then averaging over tapers for every trial ) ? Alternatively, is it at all possible to first run freqdescriptives and then input the averages and variance into freqstatistics (since this is the only thing necessary for the independent t-test)? Many thanks in advance, best, Jasper ---------------------------------- 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 j.schoffelen at PSY.GLA.AC.UK Wed Aug 5 10:50:18 2009 From: j.schoffelen at PSY.GLA.AC.UK (jan-mathijs schoffelen) Date: Wed, 5 Aug 2009 09:50:18 +0100 Subject: fourierspectra and freqstatistics In-Reply-To: <000001ca15a8$ce549860$6afdc920$@poort@nin.knaw.nl> Message-ID: Dear Jasper, > Can I input these fourier spectra directly to freqstatistics or > should I convert the fourierspectrum first to a powerspectrum (I > assume this could be done by taking abs(fourierspectrum).^2 and > then averaging over tapers for every trial ) ? I suspect that you cannot directly put fourierspectra into freqstatistics when you want to perform a T-test on the power. I always throw the frequency data at freqdescriptives (with cfg.keeptrials = 'yes'); this should give you single trial power spectra. Then you can use the 'montecarlo' or 'analytic' method for statistical inference. You can indeed also compute the variance in freqdescriptives, but I am not sure how to get to a T-value using fieldtrip there. At least you won't get there using the 'statfuns'. Best, JM ---------------------------------- 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 rion_raman at REDIFFMAIL.COM Wed Aug 5 21:52:49 2009 From: rion_raman at REDIFFMAIL.COM (rion) Date: Wed, 5 Aug 2009 19:52:49 -0000 Subject: Multitaper analysis Message-ID: Dear Fieldtrippers, I am new comer to Fieldtrip. I have a question on the Multitaper method (mtmconvol) when used on EMG signal analysis. If i am right the method works in this way, the tapers are multipied with the data in the time domain and then the tapered data is fourier transformed and the auto and cross spectra are calculated followed by the averaging of the tapers. The EMG in my case is rectified and then it has only positive values now the multiplication of the tapers with the rectified EMG gives out some negative values due to the dpss tapers (For ex: 7 Tapers) in the time domain. These negative values are not relevant to the EMG signal. How are these values used in the latter analysis. I am missing something here any hint will be helpfull. With regards, rion. ---------------------------------- 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 amrgermany at YAHOO.COM Thu Aug 6 13:56:00 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Thu, 6 Aug 2009 11:56:00 +0000 Subject: freqanalysis_wltconvol variance In-Reply-To: <428227.44019.qm@web23608.mail.ird.yahoo.com> Message-ID: Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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 ingrid.nieuwenhuis at DONDERS.RU.NL Thu Aug 6 14:26:28 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Thu, 6 Aug 2009 14:26:28 +0200 Subject: freqanalysis_wltconvol variance In-Reply-To: <124221.38146.qm@web23607.mail.ird.yahoo.com> Message-ID: Dear Amr, If you do freqanalysis with cfg.keeptrials = 'yes', you get the power per trial. If you subsequently use freqdescriptives (see help for detailed options) you can compute the variance over trials. Best Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Thursday, August 06, 2009 1:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_wltconvol variance Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 amrgermany at YAHOO.COM Thu Aug 6 16:21:14 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Thu, 6 Aug 2009 14:21:14 +0000 Subject: freqanalysis_wltconvol variance In-Reply-To: <010a01ca1691$1f28b170$642dae83@fcdonders.nl> Message-ID: Dear Ingrid, Thanks for your speedy reply. Best regards, Amr Ayoub ________________________________ From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, August 6, 2009 2:26:28 PM Subject: Re: [FIELDTRIP] freqanalysis_wltconvol variance Dear Amr, If you do freqanalysis with cfg.keeptrials = ‘yes’, you get the power per trial. If you subsequently use freqdescriptives (see help for detailed options) you can compute the variance over trials. Best Ingrid ________________________________ From:FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Thursday, August 06, 2009 1:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_wltconvol variance Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 manish.saggar at GMAIL.COM Fri Aug 7 06:24:50 2009 From: manish.saggar at GMAIL.COM (Manish Saggar) Date: Thu, 6 Aug 2009 23:24:50 -0500 Subject: non-parametric statistics across condition, time and groups Message-ID: Dear All, I am analyzing spatio-spectral differences longitudinally in EEG data. We have two groups of subjects. Thus I want to do non-parametric analysis of spatio-spectral data across condition, time and groups. I am wondering if that is possible via design parameter in freqstatistics function. Or should I take some values out of freqstats function and put them in SPSS or something for finding interactions between time and condition or time and group. Any help is appreciated. Regards, Manish ---------------------------------- 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. From lmeyer at CBS.MPG.DE Fri Aug 7 14:22:46 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 14:22:46 +0200 Subject: automatic EOG rejection In-Reply-To: <24840676.977201249647542774.JavaMail.root@zimbra> Message-ID: dear all, (newest fieldtrip, newest matlab) trying automatic EOG artifact rejection, i get the following error: In fetch_data at 111 In artifact_zvalue at 213 In artifact_eog at 179 Warning: data contains NaNs, no filtering applied workflow was (these all worked): - reading continous data to memory - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) - appending EOG channels - re-refercing - filtering - epoching according to triggers while trying automatic rejection comes the error; visual rejection just works fine. in the olf fieldtrip version, the error message said "not all samples are present in the data". i checked the data structure; the merged EOG channels have been correctly appended and labelled. attached is my code, thanks a lot in advance! all best, lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ---------------------------------- 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. From lmeyer at CBS.MPG.DE Fri Aug 7 14:47:21 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 14:47:21 +0200 Subject: automatic EOG rejection In-Reply-To: <21424912.980871249649239496.JavaMail.root@zimbra> Message-ID: (the code) Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ---------------------------------- 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 embedded and charset-unspecified text was scrubbed... Name: ft_schimi.txt URL: From ingrid.nieuwenhuis at DONDERS.RU.NL Fri Aug 7 15:08:06 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 7 Aug 2009 15:08:06 +0200 Subject: automatic EOG rejection In-Reply-To: <14776683.977331249647766825.JavaMail.root@zimbra> Message-ID: Dear Lars, The error message means that fetch_data tries to fetch data outside of your trials where there is no data supplied in the input data file. Fetch_data was recently changed and now puts NaNs where there is no data. But filtering data with NaNs is not a good idea, therefore the warning. What happens is in artifact_eog is that the data is padded, or better said, there is an attempt to pad the data. This is done to avoid filter artifact at the edges, and for optimal artifact detections at/just over the border (which can influence filtering). This padding doesn't work because in the input data you supplied there is no extra data which can be used for padding. Therefore the NaN's or the error that not all samples are present in the data. Would you can do is epoch the data into trials after artifact detection. So first detect and reject artifacts, and then use redefinetrial (give the trl you have now) to epoch the data. Hope this helps, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 2:23 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] automatic EOG rejection > > dear all, > > (newest fieldtrip, newest matlab) > > trying automatic EOG artifact rejection, i get the following error: > > In fetch_data at 111 > In artifact_zvalue at 213 > In artifact_eog at 179 > Warning: data contains NaNs, no filtering applied > > > workflow was (these all worked): > > - reading continous data to memory > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > - appending EOG channels > - re-refercing > - filtering > - epoching according to triggers > > > while trying automatic rejection comes the error; visual rejection just > works fine. in the olf fieldtrip version, the error message said "not all > samples are present in the data". i checked the data structure; the merged > EOG channels have been correctly appended and labelled. attached is my > code, thanks a lot in advance! > > > all best, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ---------------------------------- > 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. From lmeyer at CBS.MPG.DE Fri Aug 7 15:59:37 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 15:59:37 +0200 Subject: automatic EOG rejection In-Reply-To: <32069397.985751249653328816.JavaMail.root@zimbra> Message-ID: dear ingrid, thanks a lot, I greatly appreciate your immediate response! what you suggest was what I was trying next :-). I already had suspected the padding to be my problem. however, 'artifact_eog' always tries to fetch 'trl' >> error: ??? Reference to non-existent field 'trl'. Error in ==> artifact_eog at 165 tmpcfg.trl = cfg.trl; as soon as i declare cfg.trl = data_org.cfg.trl i.e. get 'trl' from the original, continuous data structure in memory (data_org), matlab errors Input must be a row vector of characters thanks a lot in advance, and have a good weekend, lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ----- Ursprüngliche Mail ----- Von: "Ingrid Nieuwenhuis" An: FIELDTRIP at NIC.SURFNET.NL Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: [FIELDTRIP] automatic EOG rejection Dear Lars, The error message means that fetch_data tries to fetch data outside of your trials where there is no data supplied in the input data file. Fetch_data was recently changed and now puts NaNs where there is no data. But filtering data with NaNs is not a good idea, therefore the warning. What happens is in artifact_eog is that the data is padded, or better said, there is an attempt to pad the data. This is done to avoid filter artifact at the edges, and for optimal artifact detections at/just over the border (which can influence filtering). This padding doesn't work because in the input data you supplied there is no extra data which can be used for padding. Therefore the NaN's or the error that not all samples are present in the data. Would you can do is epoch the data into trials after artifact detection. So first detect and reject artifacts, and then use redefinetrial (give the trl you have now) to epoch the data. Hope this helps, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 2:23 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] automatic EOG rejection > > dear all, > > (newest fieldtrip, newest matlab) > > trying automatic EOG artifact rejection, i get the following error: > > In fetch_data at 111 > In artifact_zvalue at 213 > In artifact_eog at 179 > Warning: data contains NaNs, no filtering applied > > > workflow was (these all worked): > > - reading continous data to memory > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > - appending EOG channels > - re-refercing > - filtering > - epoching according to triggers > > > while trying automatic rejection comes the error; visual rejection just > works fine. in the olf fieldtrip version, the error message said "not all > samples are present in the data". i checked the data structure; the merged > EOG channels have been correctly appended and labelled. attached is my > code, thanks a lot in advance! > > > all best, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ---------------------------------- > 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. ---------------------------------- 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. From ingrid.nieuwenhuis at DONDERS.RU.NL Fri Aug 7 16:20:18 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 7 Aug 2009 16:20:18 +0200 Subject: automatic EOG rejection In-Reply-To: <17239275.985841249653577276.JavaMail.root@zimbra> Message-ID: Dear Lars, Don't understand what is wrong with your data_org trial. The trl definition has 3 columns per trial: first sample of trial, last sample of trial and offset, did your data_org.cfg.trl have that? Anyways you can "epoch" your data to one long single trial trl = [1 last_sample 0] or use trialfun_general in definetrial with cfg.ntrials = 1; and cfg.triallength = inf; Then do artifact detection/rejection and then redefine trial to real epochs based on triggers. Would that work? Have a nice weekend too, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 4:00 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > dear ingrid, > > thanks a lot, I greatly appreciate your immediate response! > what you suggest was what I was trying next :-). I already had suspected > the padding to be my problem. > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > ??? Reference to non-existent field 'trl'. > Error in ==> artifact_eog at 165 > tmpcfg.trl = cfg.trl; > > > as soon as i declare > > cfg.trl = data_org.cfg.trl > > > i.e. get 'trl' from the original, continuous data structure in memory > (data_org), matlab errors > > Input must be a row vector of characters > > > thanks a lot in advance, and have a good weekend, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > The error message means that fetch_data tries to fetch data outside of > your > trials where there is no data supplied in the input data file. Fetch_data > was recently changed and now puts NaNs where there is no data. But > filtering > data with NaNs is not a good idea, therefore the warning. > > What happens is in artifact_eog is that the data is padded, or better > said, > there is an attempt to pad the data. This is done to avoid filter artifact > at the edges, and for optimal artifact detections at/just over the border > (which can influence filtering). This padding doesn't work because in the > input data you supplied there is no extra data which can be used for > padding. Therefore the NaN's or the error that not all samples are present > in the data. > > Would you can do is epoch the data into trials after artifact detection. > So > first detect and reject artifacts, and then use redefinetrial (give the > trl > you have now) to epoch the data. > > Hope this helps, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 2:23 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] automatic EOG rejection > > > > dear all, > > > > (newest fieldtrip, newest matlab) > > > > trying automatic EOG artifact rejection, i get the following error: > > > > In fetch_data at 111 > > In artifact_zvalue at 213 > > In artifact_eog at 179 > > Warning: data contains NaNs, no filtering applied > > > > > > workflow was (these all worked): > > > > - reading continous data to memory > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > - appending EOG channels > > - re-refercing > > - filtering > > - epoching according to triggers > > > > > > while trying automatic rejection comes the error; visual rejection just > > works fine. in the olf fieldtrip version, the error message said "not > all > > samples are present in the data". i checked the data structure; the > merged > > EOG channels have been correctly appended and labelled. attached is my > > code, thanks a lot in advance! > > > > > > all best, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. From lmeyer at CBS.MPG.DE Fri Aug 7 17:21:52 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 17:21:52 +0200 Subject: automatic EOG rejection In-Reply-To: <014501ca176a$30d9c1f0$642dae83@fcdonders.nl> Message-ID: Dear Ingrid, thank you so much for your help today, you rescued my weekend: Padding the onset and offset (in samples) of the initial single trial did the trick! All best, Lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ----- Ursprüngliche Mail ----- Von: "Ingrid Nieuwenhuis" An: FIELDTRIP at NIC.SURFNET.NL Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: [FIELDTRIP] automatic EOG rejection Dear Lars, Don't understand what is wrong with your data_org trial. The trl definition has 3 columns per trial: first sample of trial, last sample of trial and offset, did your data_org.cfg.trl have that? Anyways you can "epoch" your data to one long single trial trl = [1 last_sample 0] or use trialfun_general in definetrial with cfg.ntrials = 1; and cfg.triallength = inf; Then do artifact detection/rejection and then redefine trial to real epochs based on triggers. Would that work? Have a nice weekend too, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 4:00 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > dear ingrid, > > thanks a lot, I greatly appreciate your immediate response! > what you suggest was what I was trying next :-). I already had suspected > the padding to be my problem. > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > ??? Reference to non-existent field 'trl'. > Error in ==> artifact_eog at 165 > tmpcfg.trl = cfg.trl; > > > as soon as i declare > > cfg.trl = data_org.cfg.trl > > > i.e. get 'trl' from the original, continuous data structure in memory > (data_org), matlab errors > > Input must be a row vector of characters > > > thanks a lot in advance, and have a good weekend, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > The error message means that fetch_data tries to fetch data outside of > your > trials where there is no data supplied in the input data file. Fetch_data > was recently changed and now puts NaNs where there is no data. But > filtering > data with NaNs is not a good idea, therefore the warning. > > What happens is in artifact_eog is that the data is padded, or better > said, > there is an attempt to pad the data. This is done to avoid filter artifact > at the edges, and for optimal artifact detections at/just over the border > (which can influence filtering). This padding doesn't work because in the > input data you supplied there is no extra data which can be used for > padding. Therefore the NaN's or the error that not all samples are present > in the data. > > Would you can do is epoch the data into trials after artifact detection. > So > first detect and reject artifacts, and then use redefinetrial (give the > trl > you have now) to epoch the data. > > Hope this helps, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 2:23 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] automatic EOG rejection > > > > dear all, > > > > (newest fieldtrip, newest matlab) > > > > trying automatic EOG artifact rejection, i get the following error: > > > > In fetch_data at 111 > > In artifact_zvalue at 213 > > In artifact_eog at 179 > > Warning: data contains NaNs, no filtering applied > > > > > > workflow was (these all worked): > > > > - reading continous data to memory > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > - appending EOG channels > > - re-refercing > > - filtering > > - epoching according to triggers > > > > > > while trying automatic rejection comes the error; visual rejection just > > works fine. in the olf fieldtrip version, the error message said "not > all > > samples are present in the data". i checked the data structure; the > merged > > EOG channels have been correctly appended and labelled. attached is my > > code, thanks a lot in advance! > > > > > > all best, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. ---------------------------------- 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. From ingrid.nieuwenhuis at DONDERS.RU.NL Fri Aug 7 17:46:41 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Fri, 7 Aug 2009 17:46:41 +0200 Subject: automatic EOG rejection In-Reply-To: <19054670.989111249658512414.JavaMail.root@zimbra> Message-ID: My pleasure :) Did you have to do this padding manually? And did you pad the long trial with zeros or something extending the specified trial? I can imagine that also with one long trial you still get in trouble at the edges. Would be nice to have a final reply and describe exactly what you did (also useful for the archive) I'll also see if I can find a simple way to deal with it in the code... Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 5:22 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > Dear Ingrid, > > thank you so much for your help today, you rescued my weekend: Padding the > onset and offset (in samples) of the initial single trial did the trick! > > > All best, > Lars > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > Don't understand what is wrong with your data_org trial. The trl > definition > has 3 columns per trial: first sample of trial, last sample of trial and > offset, did your data_org.cfg.trl have that? > > Anyways you can "epoch" your data to one long single trial > > trl = [1 last_sample 0] > or use trialfun_general in definetrial with cfg.ntrials = 1; and > cfg.triallength = inf; > > Then do artifact detection/rejection and then redefine trial to real > epochs > based on triggers. Would that work? > > Have a nice weekend too, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 4:00 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] automatic EOG rejection > > > > dear ingrid, > > > > thanks a lot, I greatly appreciate your immediate response! > > what you suggest was what I was trying next :-). I already had suspected > > the padding to be my problem. > > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > > > ??? Reference to non-existent field 'trl'. > > Error in ==> artifact_eog at 165 > > tmpcfg.trl = cfg.trl; > > > > > > as soon as i declare > > > > cfg.trl = data_org.cfg.trl > > > > > > i.e. get 'trl' from the original, continuous data structure in memory > > (data_org), matlab errors > > > > Input must be a row vector of characters > > > > > > thanks a lot in advance, and have a good weekend, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ----- Ursprüngliche Mail ----- > > Von: "Ingrid Nieuwenhuis" > > An: FIELDTRIP at NIC.SURFNET.NL > > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > > > Dear Lars, > > > > The error message means that fetch_data tries to fetch data outside of > > your > > trials where there is no data supplied in the input data file. > Fetch_data > > was recently changed and now puts NaNs where there is no data. But > > filtering > > data with NaNs is not a good idea, therefore the warning. > > > > What happens is in artifact_eog is that the data is padded, or better > > said, > > there is an attempt to pad the data. This is done to avoid filter > artifact > > at the edges, and for optimal artifact detections at/just over the > border > > (which can influence filtering). This padding doesn't work because in > the > > input data you supplied there is no extra data which can be used for > > padding. Therefore the NaN's or the error that not all samples are > present > > in the data. > > > > Would you can do is epoch the data into trials after artifact detection. > > So > > first detect and reject artifacts, and then use redefinetrial (give the > > trl > > you have now) to epoch the data. > > > > Hope this helps, > > Best Ingrid > > > > > -----Original Message----- > > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > > Behalf Of Lars Meyer > > > Sent: Friday, August 07, 2009 2:23 PM > > > To: FIELDTRIP at NIC.SURFNET.NL > > > Subject: [FIELDTRIP] automatic EOG rejection > > > > > > dear all, > > > > > > (newest fieldtrip, newest matlab) > > > > > > trying automatic EOG artifact rejection, i get the following error: > > > > > > In fetch_data at 111 > > > In artifact_zvalue at 213 > > > In artifact_eog at 179 > > > Warning: data contains NaNs, no filtering applied > > > > > > > > > workflow was (these all worked): > > > > > > - reading continous data to memory > > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > > - appending EOG channels > > > - re-refercing > > > - filtering > > > - epoching according to triggers > > > > > > > > > while trying automatic rejection comes the error; visual rejection > just > > > works fine. in the olf fieldtrip version, the error message said "not > > all > > > samples are present in the data". i checked the data structure; the > > merged > > > EOG channels have been correctly appended and labelled. attached is my > > > code, thanks a lot in advance! > > > > > > > > > all best, > > > lars > > > > > > > > > Lars Meyer | MSc > > > Max Planck Institute for Human Cognitive & Brain Sciences > > > Department of Neuropsychology > > > Stephanstraße 1a > > > 04103 Leipzig | Germany > > > > > > Office | +49 (0)341 99 40 22 66 > > > Fax | +49 (0)341 99 40 22 60 > > > Mobile | +49 (0)175 113 76 65 > > > Home | +49 (0)341 974 26 49 > > > Mail | lmeyer at cbs.mpg.de > > > Web | www.cbs.mpg.de/~lmeyer > > > > > > ---------------------------------- > > > 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. > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. From lmeyer at CBS.MPG.DE Fri Aug 7 19:25:26 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Fri, 7 Aug 2009 19:25:26 +0200 Subject: automatic EOG rejection In-Reply-To: <015901ca1776$41f1dcf0$642dae83@fcdonders.nl> Message-ID: Hey, I think, there was just an artifact right at the edge of the long trial (amplifier start, something like that), so artifact_eog tried to pad into a time before the trial (?). I basically added 100 to the (1,1) and substracted 100 from (1,2) of the original .trl. I know it would be better to ADD something to the original data (append some empty samples) so even these artifacts can be automatically removed, but I had to do it quick and dirty today :-)... and I know anyway that there are no real trials involved 100 samples near the edges. Best, Lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ----- Ursprüngliche Mail ----- Von: "Ingrid Nieuwenhuis" An: FIELDTRIP at NIC.SURFNET.NL Gesendet: Freitag, 7. August 2009 17:46:41 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: [FIELDTRIP] automatic EOG rejection My pleasure :) Did you have to do this padding manually? And did you pad the long trial with zeros or something extending the specified trial? I can imagine that also with one long trial you still get in trouble at the edges. Would be nice to have a final reply and describe exactly what you did (also useful for the archive) I'll also see if I can find a simple way to deal with it in the code... Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 5:22 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > Dear Ingrid, > > thank you so much for your help today, you rescued my weekend: Padding the > onset and offset (in samples) of the initial single trial did the trick! > > > All best, > Lars > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > Don't understand what is wrong with your data_org trial. The trl > definition > has 3 columns per trial: first sample of trial, last sample of trial and > offset, did your data_org.cfg.trl have that? > > Anyways you can "epoch" your data to one long single trial > > trl = [1 last_sample 0] > or use trialfun_general in definetrial with cfg.ntrials = 1; and > cfg.triallength = inf; > > Then do artifact detection/rejection and then redefine trial to real > epochs > based on triggers. Would that work? > > Have a nice weekend too, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 4:00 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] automatic EOG rejection > > > > dear ingrid, > > > > thanks a lot, I greatly appreciate your immediate response! > > what you suggest was what I was trying next :-). I already had suspected > > the padding to be my problem. > > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > > > ??? Reference to non-existent field 'trl'. > > Error in ==> artifact_eog at 165 > > tmpcfg.trl = cfg.trl; > > > > > > as soon as i declare > > > > cfg.trl = data_org.cfg.trl > > > > > > i.e. get 'trl' from the original, continuous data structure in memory > > (data_org), matlab errors > > > > Input must be a row vector of characters > > > > > > thanks a lot in advance, and have a good weekend, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ----- Ursprüngliche Mail ----- > > Von: "Ingrid Nieuwenhuis" > > An: FIELDTRIP at NIC.SURFNET.NL > > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > > > Dear Lars, > > > > The error message means that fetch_data tries to fetch data outside of > > your > > trials where there is no data supplied in the input data file. > Fetch_data > > was recently changed and now puts NaNs where there is no data. But > > filtering > > data with NaNs is not a good idea, therefore the warning. > > > > What happens is in artifact_eog is that the data is padded, or better > > said, > > there is an attempt to pad the data. This is done to avoid filter > artifact > > at the edges, and for optimal artifact detections at/just over the > border > > (which can influence filtering). This padding doesn't work because in > the > > input data you supplied there is no extra data which can be used for > > padding. Therefore the NaN's or the error that not all samples are > present > > in the data. > > > > Would you can do is epoch the data into trials after artifact detection. > > So > > first detect and reject artifacts, and then use redefinetrial (give the > > trl > > you have now) to epoch the data. > > > > Hope this helps, > > Best Ingrid > > > > > -----Original Message----- > > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > > Behalf Of Lars Meyer > > > Sent: Friday, August 07, 2009 2:23 PM > > > To: FIELDTRIP at NIC.SURFNET.NL > > > Subject: [FIELDTRIP] automatic EOG rejection > > > > > > dear all, > > > > > > (newest fieldtrip, newest matlab) > > > > > > trying automatic EOG artifact rejection, i get the following error: > > > > > > In fetch_data at 111 > > > In artifact_zvalue at 213 > > > In artifact_eog at 179 > > > Warning: data contains NaNs, no filtering applied > > > > > > > > > workflow was (these all worked): > > > > > > - reading continous data to memory > > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > > - appending EOG channels > > > - re-refercing > > > - filtering > > > - epoching according to triggers > > > > > > > > > while trying automatic rejection comes the error; visual rejection > just > > > works fine. in the olf fieldtrip version, the error message said "not > > all > > > samples are present in the data". i checked the data structure; the > > merged > > > EOG channels have been correctly appended and labelled. attached is my > > > code, thanks a lot in advance! > > > > > > > > > all best, > > > lars > > > > > > > > > Lars Meyer | MSc > > > Max Planck Institute for Human Cognitive & Brain Sciences > > > Department of Neuropsychology > > > Stephanstraße 1a > > > 04103 Leipzig | Germany > > > > > > Office | +49 (0)341 99 40 22 66 > > > Fax | +49 (0)341 99 40 22 60 > > > Mobile | +49 (0)175 113 76 65 > > > Home | +49 (0)341 974 26 49 > > > Mail | lmeyer at cbs.mpg.de > > > Web | www.cbs.mpg.de/~lmeyer > > > > > > ---------------------------------- > > > 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. > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. ---------------------------------- 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. From awalther at UNI-MAINZ.DE Sun Aug 9 17:34:35 2009 From: awalther at UNI-MAINZ.DE (Walther Alexander) Date: Sun, 9 Aug 2009 17:34:35 +0200 Subject: topoplotTFR on planar gradients Message-ID: Dear Fieldtrip Users, I'd like to apply the multiplotTFR function on freqstatistic results. The MEG raw data were converted to planar gradient scores and passed freqanalysis. Using fieltrip version 2008-12-08, the error message 'unsupported MEG sensor type' occurres which goes back to prepare_layout.m, line 880. Apparently, though senstype.m gets me the right information (ctf275_planar) that should be used to create an appropriate layout, prepare_layout ignores this and directly heads for the error message. Planar gradient settings seem to struggle somehow with grad2lay.m (line 259). If I switch to Fieltrip-20090803, it will create the plot thats attached. My configuration settings read as follows: cfg.maskparameter = 'mask'; cfg.zparam = 'stat'; cfg.interactive = 'yes'; cfg.zlim = [-4 4]; figure, multiplotTFR(cfg,data) Given unconverted raw data, everything works out well. Any advice? Cheers Alex -- Alexander Walther Johannes-Gutenberg-University Mainz ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: multiplotTFR_planargradient_fieldtrip20090803.png Type: image/png Size: 8158 bytes Desc: not available URL: From lmeyer at CBS.MPG.DE Mon Aug 10 15:58:16 2009 From: lmeyer at CBS.MPG.DE (Lars Meyer) Date: Mon, 10 Aug 2009 15:58:16 +0200 Subject: automatic EOG rejection In-Reply-To: <014501ca176a$30d9c1f0$642dae83@fcdonders.nl> Message-ID: dear ingrid, i tried this now, works fine for the rejection (success!). but now, i'd have to find a way to: - get the events from the raw data (definetrial, okay) - keep only those in which there is no artifact (i have the list as output from the rejection, so far, so good) but, in the way you suggest, would fieldtrip not get the rejected trials again from the raw data, according to the triggers? right now i don't see how redefinetrial can both: - get real triggers from raw data and define trials (write a trl according to triggers) - only search those segments of the raw data that result from the rejection process (write a trl according to clean segments) i.e. what needs to be done is to check entries in the 'trigger-trial trl' for identity or overlap with entries in the 'rejection-trial trl'. can redefinetrial solve my problem? how? thank you so much, again! lars Lars Meyer | MSc Max Planck Institute for Human Cognitive & Brain Sciences Department of Neuropsychology Stephanstraße 1a 04103 Leipzig | Germany Office | +49 (0)341 99 40 22 66 Fax | +49 (0)341 99 40 22 60 Mobile | +49 (0)175 113 76 65 Home | +49 (0)341 974 26 49 Mail | lmeyer at cbs.mpg.de Web | www.cbs.mpg.de/~lmeyer ----- Ursprüngliche Mail ----- Von: "Ingrid Nieuwenhuis" An: FIELDTRIP at NIC.SURFNET.NL Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: [FIELDTRIP] automatic EOG rejection Dear Lars, Don't understand what is wrong with your data_org trial. The trl definition has 3 columns per trial: first sample of trial, last sample of trial and offset, did your data_org.cfg.trl have that? Anyways you can "epoch" your data to one long single trial trl = [1 last_sample 0] or use trialfun_general in definetrial with cfg.ntrials = 1; and cfg.triallength = inf; Then do artifact detection/rejection and then redefine trial to real epochs based on triggers. Would that work? Have a nice weekend too, Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Friday, August 07, 2009 4:00 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > dear ingrid, > > thanks a lot, I greatly appreciate your immediate response! > what you suggest was what I was trying next :-). I already had suspected > the padding to be my problem. > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > ??? Reference to non-existent field 'trl'. > Error in ==> artifact_eog at 165 > tmpcfg.trl = cfg.trl; > > > as soon as i declare > > cfg.trl = data_org.cfg.trl > > > i.e. get 'trl' from the original, continuous data structure in memory > (data_org), matlab errors > > Input must be a row vector of characters > > > thanks a lot in advance, and have a good weekend, > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > The error message means that fetch_data tries to fetch data outside of > your > trials where there is no data supplied in the input data file. Fetch_data > was recently changed and now puts NaNs where there is no data. But > filtering > data with NaNs is not a good idea, therefore the warning. > > What happens is in artifact_eog is that the data is padded, or better > said, > there is an attempt to pad the data. This is done to avoid filter artifact > at the edges, and for optimal artifact detections at/just over the border > (which can influence filtering). This padding doesn't work because in the > input data you supplied there is no extra data which can be used for > padding. Therefore the NaN's or the error that not all samples are present > in the data. > > Would you can do is epoch the data into trials after artifact detection. > So > first detect and reject artifacts, and then use redefinetrial (give the > trl > you have now) to epoch the data. > > Hope this helps, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 2:23 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: [FIELDTRIP] automatic EOG rejection > > > > dear all, > > > > (newest fieldtrip, newest matlab) > > > > trying automatic EOG artifact rejection, i get the following error: > > > > In fetch_data at 111 > > In artifact_zvalue at 213 > > In artifact_eog at 179 > > Warning: data contains NaNs, no filtering applied > > > > > > workflow was (these all worked): > > > > - reading continous data to memory > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > - appending EOG channels > > - re-refercing > > - filtering > > - epoching according to triggers > > > > > > while trying automatic rejection comes the error; visual rejection just > > works fine. in the olf fieldtrip version, the error message said "not > all > > samples are present in the data". i checked the data structure; the > merged > > EOG channels have been correctly appended and labelled. attached is my > > code, thanks a lot in advance! > > > > > > all best, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. ---------------------------------- 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. From ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 10 16:24:30 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 10 Aug 2009 16:24:30 +0200 Subject: automatic EOG rejection In-Reply-To: <29716492.1033511249912696701.JavaMail.root@zimbra> Message-ID: Hi Lars, What you can do is: 1- read in whole data as one trial with define trial -> you get a trl (Ntrx3) with one row 2- detect artifacts with artifact_eog -> you get an artifact (Nartx2) stating first and last sample of each artifact (you managed this if I'm correctly, but fiddled a bit with samples for padding, so make sure the artifact samples match the data!! 3- Then you can use redefinetrial to go from a trl with 1 row to a trl with all epochs based on the triggers (Ntrx3) 4- Finally you use rejectartifact which modifies your trl to not include the artifacts anymore. (see help for options, you can cut out only the artifacts leaving you with most data, but trials with "holes" or reject all trials completely when contaminated). Robert and I have worked recently on a databrowser which is also included in the more recent versions of FieldTrip. Although it still might be a little buggy/unstable (work in progress :) ) it might be quite useful for you to check stage 2, (if the artifacts match the data correctly) since it allows you to browse through the data and see which segments are marked as artifact. So if you read in the unfiddled data (with trl from stage 1) with the artifact field (you got after stage 2) in the browser you can see if your padding did not shift the artifacts with regard to the sample numbers. (Hope I'm clear enough in what I mean here). Best Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Lars Meyer > Sent: Monday, August 10, 2009 3:58 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: Re: [FIELDTRIP] automatic EOG rejection > > dear ingrid, > > i tried this now, works fine for the rejection (success!). but now, i'd > have to find a way to: > > - get the events from the raw data (definetrial, okay) > - keep only those in which there is no artifact (i have the list as output > from the rejection, so far, so good) > > but, in the way you suggest, would fieldtrip not get the rejected trials > again from the raw data, according to the triggers? right now i don't see > how redefinetrial can both: > > - get real triggers from raw data and define trials (write a trl according > to triggers) > - only search those segments of the raw data that result from the > rejection process (write a trl according to clean segments) > > i.e. what needs to be done is to check entries in the 'trigger-trial trl' > for identity or overlap with entries in the 'rejection-trial trl'. > > > can redefinetrial solve my problem? how? thank you so much, again! > lars > > > Lars Meyer | MSc > Max Planck Institute for Human Cognitive & Brain Sciences > Department of Neuropsychology > Stephanstraße 1a > 04103 Leipzig | Germany > > Office | +49 (0)341 99 40 22 66 > Fax | +49 (0)341 99 40 22 60 > Mobile | +49 (0)175 113 76 65 > Home | +49 (0)341 974 26 49 > Mail | lmeyer at cbs.mpg.de > Web | www.cbs.mpg.de/~lmeyer > > ----- Ursprüngliche Mail ----- > Von: "Ingrid Nieuwenhuis" > An: FIELDTRIP at NIC.SURFNET.NL > Gesendet: Freitag, 7. August 2009 16:20:18 GMT +01:00 > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > Dear Lars, > > Don't understand what is wrong with your data_org trial. The trl > definition > has 3 columns per trial: first sample of trial, last sample of trial and > offset, did your data_org.cfg.trl have that? > > Anyways you can "epoch" your data to one long single trial > > trl = [1 last_sample 0] > or use trialfun_general in definetrial with cfg.ntrials = 1; and > cfg.triallength = inf; > > Then do artifact detection/rejection and then redefine trial to real > epochs > based on triggers. Would that work? > > Have a nice weekend too, > Best Ingrid > > > -----Original Message----- > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > Behalf Of Lars Meyer > > Sent: Friday, August 07, 2009 4:00 PM > > To: FIELDTRIP at NIC.SURFNET.NL > > Subject: Re: [FIELDTRIP] automatic EOG rejection > > > > dear ingrid, > > > > thanks a lot, I greatly appreciate your immediate response! > > what you suggest was what I was trying next :-). I already had suspected > > the padding to be my problem. > > however, 'artifact_eog' always tries to fetch 'trl' >> error: > > > > ??? Reference to non-existent field 'trl'. > > Error in ==> artifact_eog at 165 > > tmpcfg.trl = cfg.trl; > > > > > > as soon as i declare > > > > cfg.trl = data_org.cfg.trl > > > > > > i.e. get 'trl' from the original, continuous data structure in memory > > (data_org), matlab errors > > > > Input must be a row vector of characters > > > > > > thanks a lot in advance, and have a good weekend, > > lars > > > > > > Lars Meyer | MSc > > Max Planck Institute for Human Cognitive & Brain Sciences > > Department of Neuropsychology > > Stephanstraße 1a > > 04103 Leipzig | Germany > > > > Office | +49 (0)341 99 40 22 66 > > Fax | +49 (0)341 99 40 22 60 > > Mobile | +49 (0)175 113 76 65 > > Home | +49 (0)341 974 26 49 > > Mail | lmeyer at cbs.mpg.de > > Web | www.cbs.mpg.de/~lmeyer > > > > ----- Ursprüngliche Mail ----- > > Von: "Ingrid Nieuwenhuis" > > An: FIELDTRIP at NIC.SURFNET.NL > > Gesendet: Freitag, 7. August 2009 15:08:06 GMT +01:00 > > Amsterdam/Berlin/Bern/Rom/Stockholm/Wien > > Betreff: Re: [FIELDTRIP] automatic EOG rejection > > > > Dear Lars, > > > > The error message means that fetch_data tries to fetch data outside of > > your > > trials where there is no data supplied in the input data file. > Fetch_data > > was recently changed and now puts NaNs where there is no data. But > > filtering > > data with NaNs is not a good idea, therefore the warning. > > > > What happens is in artifact_eog is that the data is padded, or better > > said, > > there is an attempt to pad the data. This is done to avoid filter > artifact > > at the edges, and for optimal artifact detections at/just over the > border > > (which can influence filtering). This padding doesn't work because in > the > > input data you supplied there is no extra data which can be used for > > padding. Therefore the NaN's or the error that not all samples are > present > > in the data. > > > > Would you can do is epoch the data into trials after artifact detection. > > So > > first detect and reject artifacts, and then use redefinetrial (give the > > trl > > you have now) to epoch the data. > > > > Hope this helps, > > Best Ingrid > > > > > -----Original Message----- > > > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > > > Behalf Of Lars Meyer > > > Sent: Friday, August 07, 2009 2:23 PM > > > To: FIELDTRIP at NIC.SURFNET.NL > > > Subject: [FIELDTRIP] automatic EOG rejection > > > > > > dear all, > > > > > > (newest fieldtrip, newest matlab) > > > > > > trying automatic EOG artifact rejection, i get the following error: > > > > > > In fetch_data at 111 > > > In artifact_zvalue at 213 > > > In artifact_eog at 179 > > > Warning: data contains NaNs, no filtering applied > > > > > > > > > workflow was (these all worked): > > > > > > - reading continous data to memory > > > - merging EOG channels (from V+/V_ / H+/H_ to eogv and eogh) > > > - appending EOG channels > > > - re-refercing > > > - filtering > > > - epoching according to triggers > > > > > > > > > while trying automatic rejection comes the error; visual rejection > just > > > works fine. in the olf fieldtrip version, the error message said "not > > all > > > samples are present in the data". i checked the data structure; the > > merged > > > EOG channels have been correctly appended and labelled. attached is my > > > code, thanks a lot in advance! > > > > > > > > > all best, > > > lars > > > > > > > > > Lars Meyer | MSc > > > Max Planck Institute for Human Cognitive & Brain Sciences > > > Department of Neuropsychology > > > Stephanstraße 1a > > > 04103 Leipzig | Germany > > > > > > Office | +49 (0)341 99 40 22 66 > > > Fax | +49 (0)341 99 40 22 60 > > > Mobile | +49 (0)175 113 76 65 > > > Home | +49 (0)341 974 26 49 > > > Mail | lmeyer at cbs.mpg.de > > > Web | www.cbs.mpg.de/~lmeyer > > > > > > ---------------------------------- > > > 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. > > > > ---------------------------------- > > 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. > > ---------------------------------- > 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. From ingrid.nieuwenhuis at DONDERS.RU.NL Tue Aug 11 13:53:18 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Tue, 11 Aug 2009 13:53:18 +0200 Subject: topoplotTFR on planar gradients In-Reply-To: <4A7EEC8B.5050800@uni-mainz.de> Message-ID: Dear Alex, It looks as if you forgot to do combineplanar after freqanalysis, since senstype is ctf275_planar. See http://fieldtrip.fcdonders.nl/tutorial/eventrelatedaveraging#calculate_the_p lanar_gradient for more info Important to get planar gradient power data you should first calculate planar gradient, then do freqanalysis and finally combine planar. (NOT first combine and then freqanalysis, since the combined planar gradient is always positive, and all frequencies will be messed up then) Hope this helps, Ingrid > -----Original Message----- > From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On > Behalf Of Walther Alexander > Sent: Sunday, August 09, 2009 5:35 PM > To: FIELDTRIP at NIC.SURFNET.NL > Subject: [FIELDTRIP] topoplotTFR on planar gradients > > Dear Fieldtrip Users, > > I'd like to apply the multiplotTFR function on freqstatistic results. > The MEG raw data were converted to planar gradient scores and passed > freqanalysis. Using fieltrip version 2008-12-08, the error message > 'unsupported MEG sensor type' occurres which goes back to > prepare_layout.m, line 880. Apparently, though senstype.m gets me the > right information (ctf275_planar) that should be used to create an > appropriate layout, prepare_layout ignores this and directly heads for > the error message. Planar gradient settings seem to struggle somehow > with grad2lay.m (line 259). If I switch to Fieltrip-20090803, it will > create the plot thats attached. My configuration settings read as follows: > > cfg.maskparameter = 'mask'; > cfg.zparam = 'stat'; > cfg.interactive = 'yes'; > cfg.zlim = [-4 4]; > figure, multiplotTFR(cfg,data) > > > Given unconverted raw data, everything works out well. Any advice? > > Cheers > > Alex > > -- > Alexander Walther > Johannes-Gutenberg-University Mainz > > > ---------------------------------- > 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. From thomas.hartmann at UNI-KONSTANZ.DE Wed Aug 12 11:15:18 2009 From: thomas.hartmann at UNI-KONSTANZ.DE (Thomas Hartmann) Date: Wed, 12 Aug 2009 11:15:18 +0200 Subject: correlation between biological and behavioral data Message-ID: hi, is it possible to perform a correlation between biological data and behavioral / questionaire data using fieldtrip? i have one dataset per subject with frequency-data. i want to correlate this data with data from a questionaire (one score per subject). thanx in advance, thomas -- Dipl. Psych. Thomas Hartmann OBOB-Lab University of Konstanz Department of Psychology P.O. Box D25 78457 Konstanz Germany Tel.: +49 (0)7531 88 4612 Fax: +49 (0)7531-88 4601 Email: thomas.hartmann at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "I am a brain, Watson. The rest of me is a mere appendix. " (Arthur Conan Doyle) ---------------------------------- 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. From dsenkows at UKE.UNI-HAMBURG.DE Wed Aug 12 15:41:55 2009 From: dsenkows at UKE.UNI-HAMBURG.DE (Daniel Senkowski) Date: Wed, 12 Aug 2009 15:41:55 +0200 Subject: Volumesegment - GLNX86 IEEE floating point Message-ID: Hi everyone, I received the following error message when calling the volumesegment function. ??? Error using ==> spm_platform at 86 I don't think that "GLNX86" uses IEEE floating point ops. Does anyone has an idea how to fix this? Thank you, Daniel >> cfg = []; cfg.downsample = 2; cfg.coordinates = 'ctf'; seg = volumesegment(cfg, mri); the input is volume data with dimensions [256 256 256] assuming CTF coordinates for input, i.e. positive X-axis towards nasion and Y-axis through ears Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 32 In spm_create_vol at 14 In volumewrite_spm at 61 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 168 In spm_create_vol at 14 In volumewrite_spm at 61 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 196 In spm_create_vol at 14 In volumewrite_spm at 61 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 32 In spm_create_vol at 14 In spm_write_vol at 76 In volumewrite_spm at 62 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 168 In spm_create_vol at 14 In spm_write_vol at 76 In volumewrite_spm at 62 In volumesegment at 222 Warning: Cant get default Analyze orientation - assuming flipped > In spm_flip_analyze_images at 9 In spm_create_vol>create_vol at 186 In spm_create_vol at 14 In spm_write_vol at 76 In volumewrite_spm at 62 In volumesegment at 222 performing the segmentation on the specified volume ??? Error using ==> spm_platform at 86 I don't think that "GLNX86" uses IEEE floating point ops. Error in ==> spm_vol_minc at 80 if ~spm_platform('bigend') & datatype~=2 & datatype~=2+128, datatype = datatype*256; end; Error in ==> spm_vol>subfunc at 99 if isempty(n), V=spm_vol_minc(p); Error in ==> spm_vol>subfunc1 at 62 v = subfunc(P(i,:)); Error in ==> spm_vol>subfunc2 at 51 V = subfunc1(P); Error in ==> spm_vol at 37 V = subfunc2(P); Error in ==> spm_segment>init_sp at 567 SP.VB = spm_vol(flags.priors); Error in ==> spm_segment at 91 SP = init_sp(flags.estimate,VF,PG); Error in ==> volumesegment at 246 spm_segment(Va,cfg.template,flags); -- 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. J�rg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Ricarda Klein Prof. Dr. Dr. Uwe Koch-Gromus ---------------------------------- 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. From wibral at BIC.UNI-FRANKFURT.DE Thu Aug 13 13:43:00 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 13 Aug 2009 13:43:00 +0200 Subject: Open Positions at the Brain Imaging Center Frankfurt Message-ID: Dear Fieldtrip list users, Dr. Peter Uhlhaas from the Max Planck Institute for Brain Research, Dept. Neurophysiology asked me to post these positions related to MEG research at the Brain Imaging Center Frankfurt. Please note that prior experience with MEG is not required. Michael Wibral _______________________________ Postdoctoral Position in Brain Imaging _______________________________ A postdoctoral position in brain imaging is available at the Max Planck Institute for Brain Research, Department of Neurophysiology (Director: Professor W. Singer) in the group of Dr. Peter J. Uhlhaas. The successful applicant will work on projects examining neural oscillations in schizophrenia with magnetoencephalography (MEG) with advanced signal-processing analyses (Beamforming, Transfer Entropy). The position is in collaboration with Dr. Michael Wibral (Head: MEG-Unit, Brain Imaging Center Frankfurt). The ideal candidate should have a PhD in neuroimaging and expertise with a neuroimaging technique (EEG, MEG, fMRI/MRI). Prior experience with MEG is not a prerequisite. Excellent research opportunities are available at the nearby Brain Imaging Center. Applications from a physics or engineering background are welcome as well. Expertise in Matlab or another programming language is desirable. The position will run for two years. The successful applicant will receive a stipend, depending on qualification and years of working experience. The position will start on the 1st of January 2010. Informal inquiries can be directed to Peter Uhlhaas (uhlhaas at mpih-frankfurt.mpg.de). To apply, please send curriculum vitae, letter of interest, names and contact information of two references to: Peter Uhlhaas Max Planck Institute for Brain Research Department of Neurophysiology Deutschordenstr. 46 60528 Frankfurt am Main GERMANY ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From nela.cicmil at DPAG.OX.AC.UK Mon Aug 17 10:53:43 2009 From: nela.cicmil at DPAG.OX.AC.UK (Nela Cicmil) Date: Mon, 17 Aug 2009 09:53:43 +0100 Subject: beamformer tutorial - sourceplot/sourceinterpolate? Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From j.schoffelen at PSY.GLA.AC.UK Mon Aug 17 12:24:35 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Mon, 17 Aug 2009 11:24:35 +0100 Subject: beamformer tutorial - sourceplot/sourceinterpolate? In-Reply-To: <20090817085343.D383D58007@webmail223.herald.ox.ac.uk> Message-ID: Dear Nela, Are you using the tutorial data, or data of your own? Best, JM On 17 Aug 2009, at 09:53, Nela Cicmil wrote: > Dear all, > > I'm a new user of fieldtrip, and encounter a problem with sourceplot > and > sourceinterploate functions in the beamformer source analysis > tutorial. > > In the tutorial, when using the function sourceplot to plot the > source-interpolated data (that is produced by the function > sourceinterpolate), > my image created is completely different from the example in the > tutorial. > > Specifically, the functional brain activity seems extremely > magnified and is not > contained within the boundaries of the mri anatomy (the slices of > which are > plotted in a different order from the tutorial example image). This > image > problem occurs even when the instructions are followed (as far as I > am aware) > exactly, using the latest possible downloaded tutorial data. > Sourceplot works > fine when plotting mri segmented data. > > My guess is that this is related to the warning I receive from > sourceinterpolate > in the step before sourceplot: > > Warning: assuming that the units are "mm" >> In fieldtrip-20090808/private/estimate_units at 29 > In fieldtrip-20090808/private/convert_units at 128 > In sourceinterpolate at 208 > converting functional data from cm into mm > converting units from 'cm' to 'mm' > > - because making the units of the anatomical data 1000x smaller > *could* account > for the problem with my plotted image. But when > I try to fix these parameters, the warning appears: > > Warning: The option cfg.sourceunits is deprecated, support is no > longer guaranteed > The option cfg.mriunits is deprecated, support is no longer guaranteed > > - and it does not seem possible to change anything. I wonder if > anyone can help > me to work out a solution to this problem? > > Sorry to bother you with a query about a tutorial; it is just that I > would like > to have confidence that I can get the functions to work properly > before > attempting to analyze more complex data! > > Thanks in advance, > Nela > > ps. I am using fieldtrip 20090808 on a Mac 10.5.8 with matlab 7.8.0 > (R2009a), > and I have spm2 on my machine, working as far as I can tell. > > -- > Nela Cicmil > D.Phil Candidate, Neurophysiology > DPAG > University of Oxford > > > ---------------------------------- > 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. From nela.cicmil at DPAG.OX.AC.UK Mon Aug 17 12:07:11 2009 From: nela.cicmil at DPAG.OX.AC.UK (Nela Cicmil) Date: Mon, 17 Aug 2009 11:07:11 +0100 Subject: beamformer tutorial - sourceplot/sourceinterpolate? In-Reply-To: <101C51FD-D910-4F6C-BBE5-EFEEDB8415AB@psy.gla.ac.uk> Message-ID: An embedded and charset-unspecified text was scrubbed... Name: not available URL: From amrgermany at YAHOO.COM Mon Aug 17 13:37:36 2009 From: amrgermany at YAHOO.COM (Amr Ayoub) Date: Mon, 17 Aug 2009 11:37:36 +0000 Subject: Re2: [FIELDTRIP] freqanalysis_wltconvol variance In-Reply-To: <010a01ca1691$1f28b170$642dae83@fcdonders.nl> Message-ID: Dear Ingrid, The analysis is painfully slow; it would need weeks to finish. Is there a MEX implementation of the time freq. analysis? Which is faster wltconvol or mtmconvol? Below is the configuration of the time freq. analysis. cfg.sgn = 'MEG'; cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.foi = 40:2:100 ; cfg.toi = -1.4:0.01:1.4; cfg.keeptrials='yes'; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 0.5 sec cfg.taper = 'hanning'; TFR = freqanalysis(cfg, TFA_slo_fz); vs cfg.sgn = 'MEG'; cfg.method = 'wltconvol '; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 40:2:100 ; cfg.toi = -1.4:0.01:1.4; cfg.keeptrials='yes'; TFR = freqanalysis(cfg, TFA_slo_fz); Data configuration: Number of channels:151 Sampling rate:250 Number of trials:391 PC configuration: Windows Vista Business SP1 64 bit - Intel Core 2 CPU 6320 @ 1.86Ghz 1.86Ghz - RAM 4GB Best regards, Amr ________________________________ From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, August 6, 2009 2:26:28 PM Subject: Re: [FIELDTRIP] freqanalysis_wltconvol variance Dear Amr, If you do freqanalysis with cfg.keeptrials = ‘yes’, you get the power per trial. If you subsequently use freqdescriptives (see help for detailed options) you can compute the variance over trials. Best Ingrid ________________________________ From:FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Thursday, August 06, 2009 1:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_wltconvol variance Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 ingrid.nieuwenhuis at DONDERS.RU.NL Mon Aug 17 14:16:48 2009 From: ingrid.nieuwenhuis at DONDERS.RU.NL (Ingrid Nieuwenhuis) Date: Mon, 17 Aug 2009 14:16:48 +0200 Subject: Re2: [FIELDTRIP] freqanalysis_wltconvol variance In-Reply-To: <241368.52789.qm@web23602.mail.ird.yahoo.com> Message-ID: Dear Amr There is no MEX implementation. I'm quite sure (not 100% though, you could test with tic toc to be sure) that mtmconvol is faster than wltconvol. I do have some tips to speed up the analysis though: 1) make the timesteps smaller, for instance 0.05 sec in stead of 0.01 sec. You have a time window of 0.5 second, so your actual time resolution is quite limited anyway. 2) Do you really need a frequency resolution of 2 Hz? You could start with 5 Hz frequency steps and increase the resolution if needed later. Hope this helps a bit, Ingrid PS please don't put my name above the question so also others can feel free to answer the question. I don't mind answering questions (if they are well phrased and I happen to know the answer such as in your case :-)), but I also don't mind if others do ;-) _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Monday, August 17, 2009 1:38 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] Re2: [FIELDTRIP] freqanalysis_wltconvol variance Dear Ingrid, The analysis is painfully slow; it would need weeks to finish. Is there a MEX implementation of the time freq. analysis? Which is faster wltconvol or mtmconvol? Below is the configuration of the time freq. analysis. cfg.sgn = 'MEG'; cfg.method = 'mtmconvol'; cfg.output = 'pow'; cfg.foi = 40:2:100 ; cfg.toi = -1.4:0.01:1.4; cfg.keeptrials='yes'; cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 0.5 sec cfg.taper = 'hanning'; TFR = freqanalysis(cfg, TFA_slo_fz); vs cfg.sgn = 'MEG'; cfg.method = 'wltconvol '; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 40:2:100 ; cfg.toi = -1.4:0.01:1.4; cfg.keeptrials='yes'; TFR = freqanalysis(cfg, TFA_slo_fz); Data configuration: Number of channels:151 Sampling rate:250 Number of trials:391 PC configuration: Windows Vista Business SP1 64 bit - Intel Core 2 CPU 6320 @ 1.86Ghz 1.86Ghz - RAM 4GB Best regards, Amr _____ From: Ingrid Nieuwenhuis To: FIELDTRIP at NIC.SURFNET.NL Sent: Thursday, August 6, 2009 2:26:28 PM Subject: Re: [FIELDTRIP] freqanalysis_wltconvol variance Dear Amr, If you do freqanalysis with cfg.keeptrials = 'yes', you get the power per trial. If you subsequently use freqdescriptives (see help for detailed options) you can compute the variance over trials. Best Ingrid _____ From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf Of Amr Ayoub Sent: Thursday, August 06, 2009 1:56 PM To: FIELDTRIP at NIC.SURFNET.NL Subject: [FIELDTRIP] freqanalysis_wltconvol variance Hello, I am expecting that you are averaging the power spectrum across the trials in freqanalysis_wltconvol. Is there a way to compute the variance across the number of trials? Thanks in advance Amr Ayoub ---------------------------------- 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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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. http://listserv.surfnet.nl/archives/fieldtrip.html http://www.ru.nl/fcdonders/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 Roman.Freunberger at SBG.AC.AT Mon Aug 17 15:31:04 2009 From: Roman.Freunberger at SBG.AC.AT (Roman Freunberger) Date: Mon, 17 Aug 2009 15:31:04 +0200 Subject: Reading brainvision dat files Message-ID: Hello, I am a new fieldtrip user and would like to know how to read brainvision files that were exported as .dat into matlab with fieldtrip. It would be great to read segmented and/ or continous data into matlab that was preprocessed (artifact correction, ...) in brainvision analyzer. I tried read_data in combination with the read_header function and I always get this message: ??? Error using ==> zeros NaN and Inf not allowed. Error in ==> read_brainvision_eeg at 89 dat = zeros(endsample-begsample+1, hdr.NumberOfChannels); Error in ==> read_data at 686 dat = read_brainvision_eeg(filename, hdr.orig, begsample, endsample); Error in ==> ReadAnalyzerSegments at 7 data = read_data(filename); Thank you in advance and best wishes, Roman ********************************************************** Dr. Roman Freunberger Department of Psychology University of Salzburg Hellbrunnerstrasse 34 5020 Salzburg, Austria ---------------------------------- 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 j.schoffelen at PSY.GLA.AC.UK Mon Aug 17 17:41:28 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Mon, 17 Aug 2009 16:41:28 +0100 Subject: Reading brainvision dat files In-Reply-To: Message-ID: Dear Roman, I don't have a lot of experience dealing with brainvision files in fieldtrip, but it looks as though there's something going wrong with the allocation of the data matrix. Apparently, one of the input arguments into the function zeros(), is either not a number, or infinite. This means, that either the quantity endsample-begsmaple+1 is behaving strangely, or that the hdr.NumberOfChannels is faulty, which would point to a problem reading in the header information from your datafile. Best, jan-Mathijs On 17 Aug 2009, at 14:31, Roman Freunberger wrote: > Hello, > > I am a new fieldtrip user and would like to know how to read > brainvision files that were exported as .dat into matlab with > fieldtrip. It would be great to read segmented and/ or continous > data into matlab that was preprocessed (artifact correction, …) in > brainvision analyzer. I tried read_data in combination with the > read_header function and I always get this message: > > ??? Error using ==> zeros > NaN and Inf not allowed. > > Error in ==> read_brainvision_eeg at 89 > dat = zeros(endsample-begsample+1, hdr.NumberOfChannels); > > Error in ==> read_data at 686 > dat = read_brainvision_eeg(filename, hdr.orig, begsample, > endsample); > > Error in ==> ReadAnalyzerSegments at 7 > data = read_data(filename); > > Thank you in advance and best wishes, > Roman > > ********************************************************** > Dr. Roman Freunberger > Department of Psychology > University of Salzburg > Hellbrunnerstrasse 34 > 5020 Salzburg, Austria > > > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/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 nathanweisz at MAC.COM Wed Aug 19 10:46:00 2009 From: nathanweisz at MAC.COM (Nathan Weisz) Date: Wed, 19 Aug 2009 10:46:00 +0200 Subject: job offer at the University of Konstanz Message-ID: i'm looking for 1 postdoc to joing my lab. details can be found in the attachment. in principle the postdoc position can be divided into 2 PhD positions, so applications from excellent PhD candidates are encouraged as well. please forward this mail to anyone who may be interested. best wishes, nathan -------------------------------------------- Dr. Nathan Weisz OBOB-Lab University of Konstanz Department of Psychology P.O. Box D23 78457 Konstanz Germany Tel: ++49 - (0)7531 - 88 45 84 Email: nathan.weisz at uni-konstanz.de Homepage: http://www.uni-konstanz.de/obob "Nothing shocks me. I'm a scientist." (Indiana Jones) ---------------------------------- 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: Postdoc_EmmyNoether.pdf Type: application/pdf Size: 51179 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From wibral at BIC.UNI-FRANKFURT.DE Wed Aug 19 12:35:28 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Wed, 19 Aug 2009 12:35:28 +0200 Subject: ctf data / 3rd gradients and megplanar/combineplanar Message-ID: Dear Listusers, we have stumbled over a little thing in relation to ctf MEG data and the new preprocessing tools for 3rd gradients. This is not an error in the code, but something that the users can easily do wrong: Combineplanar gives strange results if the ctf reference channels are still in the data, but doesn't really throw an error (in FT20081210, FT ??). Note that - to my limited knowledge - you need the ctf reference channels (P,Q,R,B,G, etc.) in preprocessing if you want to use the ctf tools and synthetic 3rd gradient formation (or want to backtransform from 3rd gradients to magnetometers). Therefore you have to take care to finally get rid of these channels at some point before you compute megplanar or combineplaner. A typical point in your code to do this would be after 3rd gradient preprocessing and before filtering or any other preprocessing. Simply set cfg.channel={'MEG'} for this next step. Hope this helps, Michael ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From tomh at KURAGE.NIMH.NIH.GOV Thu Aug 20 21:16:19 2009 From: tomh at KURAGE.NIMH.NIH.GOV (Tom Holroyd (NIH/NIMH) [E]) Date: Thu, 20 Aug 2009 15:16:19 -0400 Subject: [biomag] paper announcement In-Reply-To: <4A869AED020000FE0002F817@markab.hcuge.ch> Message-ID: Rolando GRAVE wrote: > Dear Colleagues, > > We would like to call your attention to the recent publication: > http://www.hindawi.com/journals/cin/2009/656092.html > > EEG/MEG Source Imaging: Methods, Challenges, and Open Issues > > by: > Katrina Wendel, Outi Väisänen, Jaakko Malmivuo, Nevzat G. Gencer, Bart > Vanrumste, Piotr Durka, Ratko Magjarević, Selma Supek, Mihail Lucian > Pascu, Hugues Fontenelle and Rolando Grave de Peralta Menendez > >>From the paper: 2.2. Things to Avoid ... (1) Baseline correction. Varying the values of individual electrodes either by “arbitrary” baseline shifting or by scaling factors changes the surface maps and thus the estimated sources. Although linear inverse solutions are rather stable (continuity with respect to the data), the application of base line correction to two conditions (that will be compared on the basis of their sources) can produce artificial differences induced by the correction and not by the real sources. I disagree. Radial gradiometers, as used in CTF MEG systems, have an arbitrary baseline that MUST be removed. (3) The use of very high density of sensors might also jeopardize the source analysis due to different kinds of noise at different sensors. Moreover, no significant information is added after approximately 128 electrodes due to the noise levels. Lastly, some sensors might measure more artifacts than others due to their location near active muscles. You're talking EEG only again. Stop saying EEG/MEG when you only know about EEG. Adding sensors to an MEG system _increases_ spatial resolution. -- Dr. Tom --- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow ---------------------------------- 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. From Sara.GonzalezAndino at HCUGE.CH Fri Aug 21 10:14:45 2009 From: Sara.GonzalezAndino at HCUGE.CH (Sara GONZALEZ ANDINO) Date: Fri, 21 Aug 2009 10:14:45 +0200 Subject: [biomag] paper announcement In-Reply-To: <4A8DA103.1090502@kurage.nimh.nih.gov> Message-ID: Dear Dr. Tom, thanks for your interest in our paper "EEG/MEG Source Imaging: Methods, Challenges, and Open Issues" http://www.hindawi.com/journals/cin/2009/656092.html and for bringing to discussion such important topics. I do not know if all the authors of the manuscript receive mailings from these two lists. Thus, although not necessarily on behalf of all the authors, I would like to make some comments about your points. > I disagree. Radial gradiometers, as used in CTF MEG systems, have an arbitrary baseline that MUST be removed. We thought it was obvious that an arbitrary baseline need to be removed from measurements. Now, if your system really has an arbitrary (i.e. unknown and independent for each sensor) base lines, then such system cannot yield true magnetic field distributions. I guess this is not the case. Our comment was actually a warning about the facts that 1) modifying the base line does change the map (i.e the field distribution) and therefore the estimated source for both EEG or MEG. 2) Significant physiological effects (e.g. pre attentive states) are also part of the "baseline" and will be removed by this procedure. > You're talking EEG only again. Stop saying EEG/MEG when you only know about EEG. Adding sensors to an MEG system _increases_ spatial resolution. Hopefully the mathematics and physics behind EEG and MEG are the same, then: 1) If measurement M(r) ( for EEG and MEG !) are to be continuos then it is mathematically necessary that closeness between two sensors placed at r1 and r2 implies closeness of the measurements M(r1) and M(r2). From this derives that adding sensors cannot indefinitely increase spatial resolution, and that numerical ill-conditioning emerge as a consequence of the linear dependence of measurements (i.e. lead field rows). Since noise also grows with the amount of sensors, there is a limit beyond which no new information is added in the measurements but just noise. 2) If you prefer the physics to the mathematics you can look at Geselowitz equation describing the connection (In a realistic head model) between the magnetic field at/ near the scalp and the electrical potential at the interfaces. While this is not a demonstration it might help you to understand "de que va la cosa" i.e how things work. 3) You might be also interested in reading Malmivuo's papers (quoted in the manuscript you refer)) comparing spatial resolution for both EEG and MEG. In agreement with previous point (2) no significant differences in spatial resolution seems to exist between these two modalities. 4) Similar conclusions were obtained using different analysis procedures in "Spatial resolution of neuronal generators based on EEG and MEG measurements". International Journal of Neuroscience 68: 93-105, 1993 (by Pascual Marqui and Biscay Lirio). In summary I think that our comments are valid for both EEG and MEG. regards rolando www.electrical-neuroimaging.ch -- Dr. Tom --- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow >>> "Tom Holroyd (NIH/NIMH) [E]" 20.08.2009 21:16 >>> Rolando GRAVE wrote: > Dear Colleagues, > > We would like to call your attention to the recent publication: > http://www.hindawi.com/journals/cin/2009/656092.html > > EEG/MEG Source Imaging: Methods, Challenges, and Open Issues > > by: > Katrina Wendel, Outi Väisänen, Jaakko Malmivuo, Nevzat G. Gencer, Bart > Vanrumste, Piotr Durka, Ratko Magjarević, Selma Supek, Mihail Lucian > Pascu, Hugues Fontenelle and Rolando Grave de Peralta Menendez > >>From the paper: 2.2. Things to Avoid ... (1) Baseline correction. Varying the values of individual electrodes either by “arbitrary” baseline shifting or by scaling factors changes the surface maps and thus the estimated sources. Although linear inverse solutions are rather stable (continuity with respect to the data), the application of base line correction to two conditions (that will be compared on the basis of their sources) can produce artificial differences induced by the correction and not by the real sources. I disagree. Radial gradiometers, as used in CTF MEG systems, have an arbitrary baseline that MUST be removed. (3) The use of very high density of sensors might also jeopardize the source analysis due to different kinds of noise at different sensors. Moreover, no significant information is added after approximately 128 electrodes due to the noise levels. Lastly, some sensors might measure more artifacts than others due to their location near active muscles. You're talking EEG only again. Stop saying EEG/MEG when you only know about EEG. Adding sensors to an MEG system _increases_ spatial resolution. -- Dr. Tom --- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow ---------------------------------- 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. From wibral at BIC.UNI-FRANKFURT.DE Fri Aug 21 10:46:38 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Fri, 21 Aug 2009 10:46:38 +0200 Subject: [biomag] paper announcement Message-ID: Dear Tom, dear Sara, I think there is possibly a slight misunderstanding between the two of you with respect to the 'arbitrary baseline' of the axial gradiometers. As far as I understand the issue, this baseline is arbitrary and individual per sensor, but relatively stable and can be removed by 'calibration' before the measurement (i.e. in a null measurement without brain-derived magnetic fields), i.e. in a setup step of the machine. All brain-derived magnetic fields are a difference to this null-state and should be correct in their field distribution as they were added after the calibration step. So there is no need to subtract the experimental pre-stimulus baseline while measuring and thereby to sacrifice information about brain status in the experimental baseline. Tom, would you please correct me by a response to the list if I am wrong on the machine related/technical issues here. Thanks, Michael > -----Ursprüngliche Nachricht----- > Von: "Sara GONZALEZ ANDINO" > Gesendet: 21.08.09 10:20:22 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: Re: [FIELDTRIP] [biomag] paper announcement > Dear Dr. Tom, > thanks for your interest in our paper > > "EEG/MEG Source Imaging: Methods, Challenges, and Open Issues" > http://www.hindawi.com/journals/cin/2009/656092.html > and for bringing to discussion such important topics. > > I do not know if all the authors of the manuscript receive mailings > from these two lists. Thus, although not necessarily on behalf of all > the authors, I would like to make some comments about your points. > > > I disagree. Radial gradiometers, as used in CTF MEG systems, > have an arbitrary baseline that MUST be removed. > > We thought it was obvious that an arbitrary baseline need to be removed > from measurements. Now, if your system really has an arbitrary (i.e. > unknown and independent for each sensor) base lines, then such system > cannot yield true magnetic field distributions. I guess this is not the > case. Our comment was actually a warning about the facts that 1) > modifying the base line does change the map (i.e the field distribution) > and therefore the estimated source for both EEG or MEG. 2) Significant > physiological effects (e.g. pre attentive states) are also part of the > "baseline" and will be removed by this procedure. > > > > You're talking EEG only again. Stop saying EEG/MEG when you only > know about EEG. Adding sensors to an MEG system _increases_ spatial > resolution. > > Hopefully the mathematics and physics behind EEG and MEG are the same, > then: > > 1) If measurement M(r) ( for EEG and MEG !) are to be continuos then it > is mathematically necessary that closeness between two sensors placed at > r1 and r2 implies closeness of the measurements M(r1) and M(r2). From > this derives that adding sensors cannot indefinitely increase spatial > resolution, and that numerical ill-conditioning emerge as a consequence > of the linear dependence of measurements (i.e. lead field rows). Since > noise also grows with the amount of sensors, there is a limit beyond > which no new information is added in the measurements but just noise. > > 2) If you prefer the physics to the mathematics you can look at > Geselowitz equation describing the connection (In a realistic head > model) between the magnetic field at/ near the scalp and the electrical > potential at the interfaces. While this is not a demonstration it might > help you to understand "de que va la cosa" i.e how things work. > > 3) You might be also interested in reading Malmivuo's papers (quoted in > the manuscript you refer)) comparing spatial resolution for both EEG and > MEG. In agreement with previous point (2) no significant differences in > spatial resolution seems to exist between these two modalities. > > 4) Similar conclusions were obtained using different analysis > procedures in "Spatial resolution of neuronal generators based on EEG > and MEG measurements". International Journal of Neuroscience 68: 93-105, > 1993 (by Pascual Marqui and Biscay Lirio). > > In summary I think that our comments are valid for both EEG and MEG. > > regards > > rolando > www.electrical-neuroimaging.ch > > > > -- > Dr. Tom > --- > I would dance and be merry, > Life would be a ding-a-derry, > If I only had a brain. > -- The Scarecrow > > > >>> "Tom Holroyd (NIH/NIMH) [E]" 20.08.2009 > 21:16 >>> > Rolando GRAVE wrote: > > Dear Colleagues, > > > > We would like to call your attention to the recent publication: > > http://www.hindawi.com/journals/cin/2009/656092.html > > > > EEG/MEG Source Imaging: Methods, Challenges, and Open Issues > > > > by: > > Katrina Wendel, Outi Väisänen, Jaakko Malmivuo, Nevzat G. Gencer, > Bart > > Vanrumste, Piotr Durka, Ratko Magjarević, Selma Supek, Mihail Lucian > > Pascu, Hugues Fontenelle and Rolando Grave de Peralta Menendez > > > > From the paper: > > 2.2. Things to Avoid > > ... > > (1) Baseline correction. Varying the values of individual electrodes > either by “arbitrary” baseline shifting or by scaling factors > changes the surface maps and thus the estimated sources. Although linear > inverse solutions are rather stable (continuity with respect to the > data), the application of base line correction to two conditions (that > will be compared on the basis of their sources) can produce artificial > differences induced by the correction and not by the real sources. > > I disagree. Radial gradiometers, as used in CTF MEG systems, > have an arbitrary baseline that MUST be removed. > > (3) The use of very high density of sensors might also jeopardize the > source analysis due to different kinds of noise at different sensors. > Moreover, no significant information is added after approximately 128 > electrodes due to the noise levels. Lastly, some sensors might measure > more artifacts than others due to their location near active muscles. > > You're talking EEG only again. Stop saying EEG/MEG when you only > know about EEG. Adding sensors to an > MEG system _increases_ spatial resolution. > > -- > Dr. Tom > --- > I would dance and be merry, > Life would be a ding-a-derry, > If I only had a brain. > -- The Scarecrow > > ---------------------------------- > 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. > ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From P.Toffanin at RUG.NL Thu Aug 27 11:53:07 2009 From: P.Toffanin at RUG.NL (Paolo Toffanin) Date: Thu, 27 Aug 2009 11:53:07 +0200 Subject: problem with brain vision data import? In-Reply-To: <4A8DA103.1090502@kurage.nimh.nih.gov> Message-ID: Dear fieldtrippers, I tried to search the list archive to see if somebody has encountered previously this problem but I was not successful, so if this issue has been already treated please address me to the solution. The problem is this. I'm loading into fieldtrip data recorded with brain vision recorder (BVR). However, I've noticed that the scales are different (see the attached pdf file), the one observed when exported from brain vision analyzer (BVA) seems 'smaller' than the one imported directly from BVR. Why is that? Is this a problem? My hope is that I won't have to use BVA anymore, even if just to export the data from there to matlab. Is this possible? The code I've used to import the data is also attached. (Data were exported from BVA as binary float 32) I hope I'm just missing a preprocessing step, but I'm not sure, could you please give me some indications? Thank you very much, Paolo ---------------------------------- 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 -------------- A non-text attachment was scrubbed... Name: BVAplot.pdf Type: application/pdf Size: 8542 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ExampleImportBVA.m Type: text/x-tex Size: 574 bytes Desc: not available URL: From wibral at BIC.UNI-FRANKFURT.DE Thu Aug 27 12:32:35 2009 From: wibral at BIC.UNI-FRANKFURT.DE (Michael Wibral) Date: Thu, 27 Aug 2009 12:32:35 +0200 Subject: problem with brain vision data import? Message-ID: Dear Paolo, as far as I recall there should be functions to read brain vision recorder files directly into fieldtrip, i.e. you can read the .egg/.vhdr, etc. files with fieldtrip functions like definetrial.m, read_fcdc_data.m and preprocessing.m . There is no need to export to matlab first. As another workaround you could use the bvaimport functions of eeglab, cut things into trials, perhaps clean the data there and then save an eeglab .set file and read this into fieldtrip using the eeglab2fieldtrip.m function. Michael > -----Ursprüngliche Nachricht----- > Von: "Paolo Toffanin" > Gesendet: 27.08.09 12:04:32 > An: FIELDTRIP at NIC.SURFNET.NL > Betreff: [FIELDTRIP] problem with brain vision data import? > Dear fieldtrippers, > > I tried to search the list archive to see if somebody has encountered > previously this problem but I was not successful, so if this issue has been > already treated please address me to the solution. > > The problem is this. I'm loading into fieldtrip data recorded with brain vision > recorder (BVR). However, I've noticed that the scales are different (see the > attached pdf file), the one observed when exported from brain vision analyzer > (BVA) seems 'smaller' than the one imported directly from BVR. Why is that? Is > this a problem? > > My hope is that I won't have to use BVA anymore, even if just to export the > data from there to matlab. Is this possible? > > The code I've used to import the data is also attached. (Data were exported > from BVA as binary float 32) > > I hope I'm just missing a preprocessing step, but I'm not sure, could you > please give me some indications? > > Thank you very much, > Paolo > > ---------------------------------- > 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 -------------- A non-text attachment was scrubbed... Name: Michael Wibral.vcf Type: text/x-vcard Size: 344 bytes Desc: not available URL: From bleichner.martin at GMAIL.COM Thu Aug 27 14:36:05 2009 From: bleichner.martin at GMAIL.COM (Martin Bleichner) Date: Thu, 27 Aug 2009 14:36:05 +0200 Subject: Afni for Beamforming Message-ID: Hi there, I want to do some beamforming on my MEG data. The mri data with the anatomy is in afni format. Can fieldtrip read afni? I guess I have to add something to fieldtrip/external. Can someone tell me what I would have to add? Thanks Martin ---------------------------------- 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 j.schoffelen at PSY.GLA.AC.UK Thu Aug 27 16:31:39 2009 From: j.schoffelen at PSY.GLA.AC.UK (Jan-Mathijs Schoffelen) Date: Thu, 27 Aug 2009 14:31:39 +0000 Subject: Afni for Beamforming In-Reply-To: Message-ID: Hi Martin, Yes, with some help fieldtrip can read afni format. You have to download the matlab toolbox from the afni-site: afni.nimh.nih.gov, and install it somewhere on your matlab-path. It is not necessary to put it into fieldtrip/external, as long as the directory is in your path it should work. Best, Jan-Mathijs On 27 Aug 2009, at 12:36, Martin Bleichner wrote: > Hi there, > > I want to do some beamforming on my MEG data. The mri data with the > anatomy is in afni format. > Can fieldtrip read afni? I guess I have to add something to > fieldtrip/external. > Can someone tell me what I would have to add? > > Thanks > Martin > ---------------------------------- > > 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. > > http://listserv.surfnet.nl/archives/fieldtrip.html > > http://www.ru.nl/fcdonders/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. From masaki.maruyama at CEA.FR Thu Aug 27 16:29:34 2009 From: masaki.maruyama at CEA.FR (MARUYAMA Masaki INSERM) Date: Thu, 27 Aug 2009 16:29:34 +0200 Subject: Coordinate of volume segmentation Message-ID: Hello, Would someone please give me suggestions or advices on the coordinate of volume segmentation? I have struggled with it in these weeks with referring the examples on the FieldTrip web pages and the previous discussions on the mailing list. However, my result still seems to be incorrect. I realigned a DICOM image file using "volumerealine", and then I segmented the volume based on the CTF coordinate. Following the examples on the FieldTrip web pages (e.g, http://fieldtrip.fcdonders.nl/example/read_neuromag_mri_and_create_singl e-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_spa ce), I examined permutations and flips of the images of segmented volumes. However, the segmented brain area was partially outside the head at the best flip (Please see the attached file). The segmented brain seems to be shifted upward than the real brain position. As far as I examined, any permutations and flips could not align appropriately. Do I need a transformation after the volume segmentation in order to comensate the difference in the origin between CTF and MNI coordinates? I'm also wondering if my original MRI image might need to be permuted/flipped before the volumerealine, since the permutation ([2 3 1]) and the best flip (only x & z axes) in my case are different from the examples on the web pages. I would appreciate any responses. With best regards, Masaki Maruyama The following is the script I used. mri_file = '/neurospin/MRI/DICOM/sbh080102633-0002-00001-000160-01.img'; mri_org = read_mri(mri_file); cfg = []; mri = volumerealign(cfg, mri_org); cfg = []; cfg.coordinates = 'ctf'; cfg.template = '/i2bm/platform/spm2/templates/T1.mnc'; [segmentedmri] = volumesegment(cfg, mri); test = segmentedmri; test.anatomy = mri.anatomy; test.transform = mri.transform; test.gray = permute(segmentedmri.gray, [2 3 1]); test.white = permute(segmentedmri.white, [2 3 1]); test.csf = permute(segmentedmri.csf, [2 3 1]); test.dim = mri.dim; for t = [1 3] test.gray = flipdim(test.gray,t); test.white = flipdim(test.white,t); test.csf = flipdim(test.csf,t); end test.avg.pow = test.gray + test.white + test.csf; cfg = []; cfg.funparameter = 'avg.pow'; cfg.interactive = 'no'; cfg.method = 'slice'; figure(2);clf sourceplot(cfg,test) ---------------------------------- 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: SegmentationResult.jpg Type: image/jpeg Size: 89257 bytes Desc: SegmentationResult.jpg URL: From dahliash at STANFORD.EDU Fri Aug 28 08:34:30 2009 From: dahliash at STANFORD.EDU (Dahlia Sharon) Date: Thu, 27 Aug 2009 23:34:30 -0700 Subject: freqdescriptives/statistics In-Reply-To: <790717569.753411251441250970.JavaMail.root@zm09.stanford.edu> Message-ID: Hi all, Is there a more detailed explanation of usage for the jackknife and biascorrect options for freqdescriptives than the one in the freqdescriptives reference page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)? More specifically, are these options related to Bokil et al NeuroIm 2007? How should they be employed to determine significance of difference between conditions? (Is there somewhere a tutorial for the use of these options analogous to the one about cluster-based permutation testing?) Also, for the permutation analysis of TFRs (http://fieldtrip.fcdonders.nl/tutorial/statistics?s[]=freqstatistics), if I don't want to employ the planar gradient step (what exactly IS combineplanar? sorry I couldn't find it), can I simply skip it and calculate the TFRs of the raw sensor data? Many thanks! Dahlia. ---------------------------------- 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 dimitri.papadopoulos at CEA.FR Mon Aug 31 23:40:40 2009 From: dimitri.papadopoulos at CEA.FR (Dimitri Papadopoulos-Orfanos) Date: Mon, 31 Aug 2009 23:40:40 +0200 Subject: *.BAK files Message-ID: Hi, Could you please remove BAK files from the FieldTrip distribution? For example: $ find fieldtrip-20090831 -name \*.ba\* fieldtrip-20090831/classification/preprocessors/whitener.bak fieldtrip-20090831/classification/preprocessors/tsner.bak fieldtrip-20090831/classification/validators/crossvalidator.bak fieldtrip-20090831/classification/classifiers/blogreg.bak fieldtrip-20090831/classification/classifiers/blogreg.ba3 fieldtrip-20090831/classification/classifiers/blogreg.ba2 fieldtrip-20090831/classification/toolboxes/gerven/gmrflab/LinRegLaplaceEP.bak fieldtrip-20090831/classification/toolboxes/gerven/gmrflab/fastinvre64.bak fieldtrip-20090831/classification/toolboxes/gerven/gmrflab/laplacedegenerate_ep.ba2 fieldtrip-20090831/classification/toolboxes/gerven/gmrflab/laplacedegenerate_ep.bak fieldtrip-20090831/classification/toolboxes/gerven/bmlab/SRBM.bak fieldtrip-20090831/classification/toolboxes/gerven/bmlab/RBM.bak fieldtrip-20090831/classification/toolboxes/gerven/bmlab/RBM.ba2 fieldtrip-20090831/classification/toolboxes/gerven/bmlab/bmlab_working/RBM.bak fieldtrip-20090831/classification/toolboxes/gerven/bmlab/bmlab_working/RBM.ba2 fieldtrip-20090831/classification/regressors/blinreg.bak fieldtrip-20090831/classification/regressors/circreg.bak Regards, -- Dimitri Papadopoulos CEA, I2BM, NeuroSpin 91191 Gif-sur-Yvette cedex, France ---------------------------------- 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.