From ecaspar at ulb.ac.be Fri Jan 2 11:23:04 2015 From: ecaspar at ulb.ac.be (Emilie Caspar) Date: Fri, 2 Jan 2015 11:23:04 +0100 Subject: [FieldTrip] multi plot and layout Message-ID: <20EDBE47-BEF4-4F80-BFCA-6F2016A58CC8@ulb.ac.be> Dear Fieldtrippers, It's probably a very simple question but I don't understand the problem. I would like to use multi plot and topoplot for my data. So I wrote: cfg = []; cfg.xlim = [-0.1 0.4]; cfg.ylim = [-10 13]; cfg.layout = 'biosemi64.lay'; figure; ft_multiplotER(cfg, avgRobotC_ToneC, avgRobotC_ToneI, avgRobotI_ToneC, avgRobotI_ToneI); However, the mistake indicates that labels in data and labels in layout do not match. However, I'm sure of the layout I'm using and in addition, when I'm using the ft_rejectvisual (in the same script) with the following line codes, it works very well: cfg = []; cfg.alim = 100; cfg.keepchannel = 'yes'; cfg.layout = 'biosemi64.lay'; cfg.method = 'channel'; %% Or 'trial' cfg.metric = 'var'; clean_data = ft_rejectvisual(cfg, epData); …... So I clearly don't understand why multi plot and topoplot do not accept this layout, while the layout is accepted for another function in the same script on the same data. Singleplot works very well. Have you any idea? Thanks! Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jan 5 09:36:11 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 5 Jan 2015 09:36:11 +0100 Subject: [FieldTrip] FEM sLORETA Fieldtrip In-Reply-To: References: Message-ID: <0BAC74CA-25AB-4316-AEC8-88559FF70381@donders.ru.nl> Dear John At this moment FieldTrip does not yet include an implementation of sLORETA. However, it does have an implementation of eLORETA (see FT_SOURCEANALYSIS with cfg.method=‘eloreta’). Perhaps you could use the low level inverse/ft_eloreta code to make an sLORETA implementation. best regards, Robert On 28 Dec 2014, at 22:18, RICHARDS, JOHN wrote: > Robert: > > I hope you can help me. Is FieldTrip able to do sLORETA CDR models? I like the integration of the FEM in FieldTrip, but can’t find a sLORETA algorithm. I use individual structural MRIs, with EEG, with segmentation, and want to do sLORETA models. > > Thanks, John > > *********************************************** > John E. Richards Carolina Distinguished Professor > Department of Psychology > University of South Carolina > Columbia, SC 29208 > Dept Phone: 803 777 2079 > Fax: 803 777 9558 > Email: richards-john at sc.edu > HTTP: jerlab.psych.sc.edu > *********************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jan 5 09:44:59 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 5 Jan 2015 09:44:59 +0100 Subject: [FieldTrip] SIMBIO tool in Fieldtrip for FEM head modelling In-Reply-To: References: Message-ID: Dear Munsif, The SIMBIO FEM tool that is under development is integrated in FieldTrip, i.e. you do not call it separately. The procedure is that you coregister your anatomical MRI to the same coordinate system in which you want to express your sensor and source locations, segment the MRI and pass the segmented MRI to ft_prepare_mesh and subsequently to ft_prepare_headmodel, which will call the appropriate functions from SIMBIO. Finally, you can call ft_prepare_leadfield (or the lower level ft_compute_leadfield) to compute the forward solutions for the desired source locations. The documentation on http://fieldtrip.fcdonders.nl/development/simbio contains example code. best regards, Robert PS please address future questions to the email list. On 15 Dec 2014, at 05:00, Munsif Jatoi wrote: > Dear Sir, > > I hope you are fine. > > Sir, I am doing PhD in the field of Brain source Localization based on EEG signals at Universiti Teknologi PETRONAS, Perak, Malaysia since 2011. I have developed a MATLAb code based upon SPM8 and Fieldtrip for simulated EEG data. For this, I have used BEM modelling (please find the attached .m file). However, I want to use FEM modelling to compare my results to be taken by using various inverse methods (MUSIC, Min Norm etc.). I have come to know through the website of Fieldtrip (http://fieldtrip.fcdonders.nl/development/simbio) that there is a tool for FEM. When I searched through it, I couldn't find the SIMBIO tool which can be used for FEM head modelling. So can you please help me in this sense. > > > Many Thanks, > Munsif. > > -- > Munsif Ali H.Jatoi, > > Ph D Scholar, > Centre for Intelligent Signals and Imaging Research, > Universiti Teknologi PETRONAS, > Malaysia. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: eegspm_pipeline_withcomments (3).m Type: application/octet-stream Size: 11632 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Mon Jan 5 15:23:20 2015 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Mon, 5 Jan 2015 15:23:20 +0100 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data Message-ID: Hi all, I performed DICS beamforming on resting-state data ( eyes closed) of a clinical population and controls. According to the sensor data, the control groups have more alpha-band (8-14 Hz) activity over occipital areas after cluster statistic (attached figure upper plot) . Curiously, after beamforming , group comparisons showed the reversed patters in visual cortex (attached figure bottom plot) .Hence, the source-level results are opposite to the sensor-level results. This is *not* a problem of the design matrix, or confusing the groups. I check the individual neural activity index on the single subject level . They make sense in general . I also tune the parameter a lot (tapper, central frequency smooth frequency , regularization parameter , et al ), the opposite pattern remains. I understand that Beamformer images DO NOT DIRECTLY CORRESPOND TO ANY sensor data. However, the opposite pattern is really weird. I noticed that Tobias Navarro Schröder had the similar issue 4 years ago ( http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). Thus, I am not the only one who encountered this problem. Any tips and suggestions will be greatly appreciated. Thanks in advance! Best, Hatieng -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: resting_issues.jpg Type: image/jpeg Size: 71312 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: resting_issues.jpg Type: image/jpeg Size: 71312 bytes Desc: not available URL: From a.stolk at fcdonders.ru.nl Mon Jan 5 15:39:25 2015 From: a.stolk at fcdonders.ru.nl (Stolk, A. (Arjen)) Date: Mon, 5 Jan 2015 14:39:25 +0000 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data In-Reply-To: References: Message-ID: Hey Haiteng, Is your contrast based on absolute signal frequency power? If so, did you check for any systematic differences in headposition (and especially in terms of distance to the sensors - the z-dimension) across the groups? I presume such a systematic difference could yield different results at the sensor- and source-level, but there are probably also other possibilities out there. Yours, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Haiteng Jiang [haiteng.jiang at gmail.com] Sent: Monday, January 05, 2015 3:23 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data Hi all, I performed DICS beamforming on resting-state data ( eyes closed) of a clinical population and controls. According to the sensor data, the control groups have more alpha-band (8-14 Hz) activity over occipital areas after cluster statistic (attached figure upper plot) . Curiously, after beamforming , group comparisons showed the reversed patters in visual cortex (attached figure bottom plot) .Hence, the source-level results are opposite to the sensor-level results. This is *not* a problem of the design matrix, or confusing the groups. I check the individual neural activity index on the single subject level . They make sense in general . I also tune the parameter a lot (tapper, central frequency smooth frequency , regularization parameter , et al ), the opposite pattern remains. I understand that Beamformer images DO NOT DIRECTLY CORRESPOND TO ANY sensor data. However, the opposite pattern is really weird. I noticed that Tobias Navarro Schröder had the similar issue 4 years ago (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). Thus, I am not the only one who encountered this problem. Any tips and suggestions will be greatly appreciated. Thanks in advance! [cid:ii_i4jxr2sz1_14aba77f4264462a] Best, Hatieng -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: resting_issues.jpg Type: image/jpeg Size: 71312 bytes Desc: resting_issues.jpg URL: From mark.woolrich at ohba.ox.ac.uk Mon Jan 5 15:46:59 2015 From: mark.woolrich at ohba.ox.ac.uk (Mark Woolrich) Date: Mon, 5 Jan 2015 14:46:59 +0000 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data In-Reply-To: References: Message-ID: Dear Hatieng, This might be the same issue we found when comparing eyes open to eyes shut. Take a look at this technical note to see how we addressed it: http://www.ncbi.nlm.nih.gov/pubmed/24412400 Cheers, Mark. On 5 Jan 2015, at 14:23, Haiteng Jiang > wrote: Hi all, I performed DICS beamforming on resting-state data ( eyes closed) of a clinical population and controls. According to the sensor data, the control groups have more alpha-band (8-14 Hz) activity over occipital areas after cluster statistic (attached figure upper plot) . Curiously, after beamforming , group comparisons showed the reversed patters in visual cortex (attached figure bottom plot) .Hence, the source-level results are opposite to the sensor-level results. This is *not* a problem of the design matrix, or confusing the groups. I check the individual neural activity index on the single subject level . They make sense in general . I also tune the parameter a lot (tapper, central frequency smooth frequency , regularization parameter , et al ), the opposite pattern remains. I understand that Beamformer images DO NOT DIRECTLY CORRESPOND TO ANY sensor data. However, the opposite pattern is really weird. I noticed that Tobias Navarro Schröder had the similar issue 4 years ago (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). Thus, I am not the only one who encountered this problem. Any tips and suggestions will be greatly appreciated. Thanks in advance! Best, Hatieng -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Mon Jan 5 16:12:56 2015 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Mon, 05 Jan 2015 16:12:56 +0100 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data In-Reply-To: References: Message-ID: <54AAA9F8.9050005@fcdonders.ru.nl> Hey Haiteng, Following up on Arjen's point; I've noticed that when people in the MEG close their eyes for a couple of minutes, their heads sometimes drop a little (ie nose moves toward chest). If your clinical group were feeling more drowsy during the recording and thus dropped their heads more, this would lead to exactly the kind of systematic SNR difference that Arjen is describing, and maybe most acutely in posterior sensors. Best, Tom On 1/5/2015 3:39 PM, Stolk, A. (Arjen) wrote: > Hey Haiteng, > > Is your contrast based on absolute signal frequency power? If so, did > you check for any systematic differences in headposition (and > especially in terms of distance to the sensors - the z-dimension) > across the groups? I presume such a systematic difference could yield > different results at the sensor- and source-level, but there are > probably also other possibilities out there. > > Yours, > Arjen > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > Phone: +31(0)243 68294 > Web: www.arjenstolk.nl > ------------------------------------------------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > [fieldtrip-bounces at science.ru.nl] on behalf of Haiteng Jiang > [haiteng.jiang at gmail.com] > *Sent:* Monday, January 05, 2015 3:23 PM > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Opposite DICS Beamforming results on source and > sensor level on resting state data > > Hi all, > > I performed DICS beamforming on resting-state data ( eyes closed) > of a clinical population and controls. According to the sensor data, > the control groups have more alpha-band (8-14 > Hz) activity over occipital areas after cluster statistic (attached > figure upper plot) . Curiously, after beamforming , group > comparisons showed the reversed patters in visual cortex (attached > figure bottom plot) .Hence, the source-level results are opposite to > the sensor-level results. This is *not* a problem of the design > matrix, or confusing the groups. I check the individual neural > activity index on the single subject level . They make sense in > general . I also tune the parameter a lot (tapper, central frequency > smooth frequency , regularization parameter , et al ), the opposite > pattern remains. I understand that Beamformer images DO NOT DIRECTLY > CORRESPOND TO ANY sensor data. However, the opposite pattern is > really weird. I noticed that Tobias Navarro Schröder had the similar > issue 4 years ago > (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). > Thus, I am not the only one who encountered this problem. > Any tips and suggestions will be greatly appreciated. Thanks in > advance! > > > > Best, > Hatieng > > > > -- > Haiteng Jiang > PhD candidate > Donders Institute for Brain, Cognition and Behaviour > Neuronal Oscillations Group > Computational Cognitive Neuroscience Lab > https://sites.google.com/site/haitengjiang/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 71312 bytes Desc: not available URL: From caspervanheck at gmail.com Mon Jan 5 17:02:54 2015 From: caspervanheck at gmail.com (Casper van Heck) Date: Mon, 5 Jan 2015 17:02:54 +0100 Subject: [FieldTrip] Question about how to reduce the file size In-Reply-To: <484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk> References: <484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk> Message-ID: Dear Emilie, I'm using a Windows-based wreck with 8GB ram and 1.5GB files, which never pops over an usage of 4GB, so I am a bit surprised that you're getting issues with your data. Also; reducing the sampling rate that much should reduce the memory footprint to something close to 400mb, at least, which to my mind should not produce issues of any kind. Could you post a bit more of your code? I've been lowering the sampling rate too (5000 to 500), but I'm also cutting the data into smaller pieces, based on markers, effectively splitting the data into four parts, and throwing away more than 80%. Cutting the data into pieces can provide a workaround for memory issues. Detail: while I do filter (and some other details) before the resampling, and I'm only resampling due to time constraints, not crashing behaviour. Also check the memory tutorial: fieldtrip.fcdonders.nl/tutorial/memory Does this help? Casper On Fri, Dec 12, 2014 at 11:24 PM, Caspar, Emilie wrote: > Dear Fieltrippers, > I did a pilot study on one participant today. Now that I'm trying to > analyze my data, I realize that the size file is too big for my computer > (size = 3Gb). Even after one hour, the filters (high pass + low pass) were > not yet achieved. > > So I would like to see how to reduce the size of my sample BEFORE the > filters. > > I know that there is "ft_resampledata", and I did it to reduce the > actual sample rate (= 2048) to 256. However, even with this procedure my > computer is crashing (even with 16 Go RAM). In addition, I'm not sure that > I can resample before filtering (I read different informations). > > Another way I was thinking about was to pre-select electrodes that I > need (only 6 electrodes on 64). But here I have two questions: > - Can I pre-process only some electrodes? Does it really reduce size for > next preprocesses? > - Is this the correct way to ask? As it crashes, not sure it works. > > cfg = []; > cfg.dataset = [ file.name]; > cfg.channel = 'B5', 'B6', 'B15', 'B16'; > allData_prepross = ft_preprocessing(cfg); > cfg.resamplefs = 256; > DataSample = ft_resampledata(cfg, allData_prepross) > > > I would appreciate pieces of advice! > > Many thanks :) > > Emilie > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jan 5 17:55:09 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 5 Jan 2015 17:55:09 +0100 Subject: [FieldTrip] multi plot and layout In-Reply-To: <20EDBE47-BEF4-4F80-BFCA-6F2016A58CC8@ulb.ac.be> References: <20EDBE47-BEF4-4F80-BFCA-6F2016A58CC8@ulb.ac.be> Message-ID: <98D05186-0070-41FF-9F8B-06D77E38F793@donders.ru.nl> Hi Emilie ft_rejectvisual with method=channel does not make use of the layout, so that is not a suitable comparison. Can you do cfg = []; cfg.layout = 'biosemi64.lay'; layout = ft_prepare_layout(cfg) and compare layout.label with the labels in the data? Or you can also simply open the biosemi64.lay file in a text editor. best regards, Robert On 02 Jan 2015, at 11:23, Emilie Caspar wrote: > Dear Fieldtrippers, > > It's probably a very simple question but I don't understand the problem. > > I would like to use multi plot and topoplot for my data. > So I wrote: > > cfg = []; > cfg.xlim = [-0.1 0.4]; > cfg.ylim = [-10 13]; > cfg.layout = 'biosemi64.lay'; > figure; > ft_multiplotER(cfg, avgRobotC_ToneC, avgRobotC_ToneI, avgRobotI_ToneC, avgRobotI_ToneI); > > > However, the mistake indicates that labels in data and labels in layout do not match. However, I'm sure of the layout I'm using and in addition, when I'm using the ft_rejectvisual (in the same script) with the following line codes, it works very well: > > cfg = []; > cfg.alim = 100; > cfg.keepchannel = 'yes'; > cfg.layout = 'biosemi64.lay'; > cfg.method = 'channel'; %% Or 'trial' > cfg.metric = 'var'; > clean_data = ft_rejectvisual(cfg, epData); > …... > > So I clearly don't understand why multi plot and topoplot do not accept this layout, while the layout is accepted for another function in the same script on the same data. Singleplot works very well. > > Have you any idea? > > Thanks! > > Emilie > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jan 5 18:09:08 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 5 Jan 2015 18:09:08 +0100 Subject: [FieldTrip] Question about how to reduce the file size In-Reply-To: References: <484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk> Message-ID: <336FFF24-331E-441A-8BB3-56B00B130D0E@donders.ru.nl> Hi Casper, Biosemi files are often problematic. The files themselves are 24 bit, which makes them efficient on disk (although though they are still huge on disk), but once in memory they take 64 bit per sample. So your 3GB becomes 8GB in memory, not accounting for any overhead. Depending on the analysis pipeline, it might well be that two copies of the data are needed in memory (so 16GB), plus further overhead. Note that downampling requires that a low-pass filter is applied prior to downsampling to avoid aliassing (http://en.wikipedia.org/wiki/Aliasing). This happens automatically in ft_resampledata (look for cfg.resamplemethod and related comments in the code). You can use a strategy like this cfg1 = []; cfg1.dataset = yourfilename; cfg1 = ... cfg1 = ft_definetrial(cfg1); % this part is optional, without it it results in continuous data in memory cfg2 = []; cfg2.resamplefs = 500; for i=1:nchan cfg1.channel = i; % you can use a number as well as a string temp = ft_preprocessing(cfg1); singlechan{i} = ft_resampledata(cfg2, temp); clear temp; end % for all channels data = ft_appenddata([], singlechan{:}); This reads and downsamples the data one channel at a time. best regards, Robert On 05 Jan 2015, at 17:02, Casper van Heck wrote: > Dear Emilie, > > I'm using a Windows-based wreck with 8GB ram and 1.5GB files, which never pops over an usage of 4GB, so I am a bit surprised that you're getting issues with your data. Also; reducing the sampling rate that much should reduce the memory footprint to something close to 400mb, at least, which to my mind should not produce issues of any kind. Could you post a bit more of your code? > > I've been lowering the sampling rate too (5000 to 500), but I'm also cutting the data into smaller pieces, based on markers, effectively splitting the data into four parts, and throwing away more than 80%. Cutting the data into pieces can provide a workaround for memory issues. Detail: while I do filter (and some other details) before the resampling, and I'm only resampling due to time constraints, not crashing behaviour. > > Also check the memory tutorial: fieldtrip.fcdonders.nl/tutorial/memory > > Does this help? > > Casper > > On Fri, Dec 12, 2014 at 11:24 PM, Caspar, Emilie wrote: > Dear Fieltrippers, > > I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved. > > So I would like to see how to reduce the size of my sample BEFORE the filters. > > I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different informations). > > Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions: > - Can I pre-process only some electrodes? Does it really reduce size for next preprocesses? > - Is this the correct way to ask? As it crashes, not sure it works. > > cfg = []; > cfg.dataset = [ file.name]; > cfg.channel = 'B5', 'B6', 'B15', 'B16'; > allData_prepross = ft_preprocessing(cfg); > cfg.resamplefs = 256; > DataSample = ft_resampledata(cfg, allData_prepross) > > > I would appreciate pieces of advice! > > Many thanks :) > > Emilie > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ecaspar at ulb.ac.be Mon Jan 5 22:00:27 2015 From: ecaspar at ulb.ac.be (Emilie Caspar) Date: Mon, 5 Jan 2015 22:00:27 +0100 Subject: [FieldTrip] multi plot and layout In-Reply-To: <98D05186-0070-41FF-9F8B-06D77E38F793@donders.ru.nl> References: <20EDBE47-BEF4-4F80-BFCA-6F2016A58CC8@ulb.ac.be> <98D05186-0070-41FF-9F8B-06D77E38F793@donders.ru.nl> Message-ID: Dear Robert, Thank you for your answer. Indeed, biosemi electrodes have two labels, the "official" name, and a specific name related to their system. If I relabel my electrodes, the layout will certainly works. Best regards, Emilie On 5 janv. 2015, at 17:55, Robert Oostenveld wrote: > Hi Emilie > > ft_rejectvisual with method=channel does not make use of the layout, so that is not a suitable comparison. > > Can you do > > cfg = []; > cfg.layout = 'biosemi64.lay'; > layout = ft_prepare_layout(cfg) > > and compare layout.label with the labels in the data? Or you can also simply open the biosemi64.lay file in a text editor. > > best regards, > Robert > > > On 02 Jan 2015, at 11:23, Emilie Caspar wrote: > >> Dear Fieldtrippers, >> >> It's probably a very simple question but I don't understand the problem. >> >> I would like to use multi plot and topoplot for my data. >> So I wrote: >> >> cfg = []; >> cfg.xlim = [-0.1 0.4]; >> cfg.ylim = [-10 13]; >> cfg.layout = 'biosemi64.lay'; >> figure; >> ft_multiplotER(cfg, avgRobotC_ToneC, avgRobotC_ToneI, avgRobotI_ToneC, avgRobotI_ToneI); >> >> >> However, the mistake indicates that labels in data and labels in layout do not match. However, I'm sure of the layout I'm using and in addition, when I'm using the ft_rejectvisual (in the same script) with the following line codes, it works very well: >> >> cfg = []; >> cfg.alim = 100; >> cfg.keepchannel = 'yes'; >> cfg.layout = 'biosemi64.lay'; >> cfg.method = 'channel'; %% Or 'trial' >> cfg.metric = 'var'; >> clean_data = ft_rejectvisual(cfg, epData); >> …... >> >> So I clearly don't understand why multi plot and topoplot do not accept this layout, while the layout is accepted for another function in the same script on the same data. Singleplot works very well. >> >> Have you any idea? >> >> Thanks! >> >> Emilie >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Mon Jan 5 22:10:26 2015 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Mon, 5 Jan 2015 22:10:26 +0100 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data (Stolk, A. (Arjen)) Message-ID: Hi Arjen, Thanks for your response. I actually tried both (absolute power and nai). Both of them are still opposite when comparing sensor level to source level. Besides, I have the task data. It works fine on the contrast. Therefore, I assume the co-registration is OK in general. However, I have no fiducial points in the MRI scans, so I have to select the nas, lpa and rpa with no physical reference. Therefore , it is possible that the two group have systematic differences in head position. I will check that. All the best, Haiteng > > > Message: 2 > Date: Mon, 5 Jan 2015 14:39:25 +0000 > From: "Stolk, A. (Arjen)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Opposite DICS Beamforming results on source > and sensor level on resting state data > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hey Haiteng, > > Is your contrast based on absolute signal frequency power? If so, did you > check for any systematic differences in headposition (and especially in > terms of distance to the sensors - the z-dimension) across the groups? I > presume such a systematic difference could yield different results at the > sensor- and source-level, but there are probably also other possibilities > out there. > > Yours, > Arjen > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > Phone: +31(0)243 68294 > Web: www.arjenstolk.nl > ________________________________ > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Haiteng Jiang [haiteng.jiang at gmail.com] > Sent: Monday, January 05, 2015 3:23 PM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Opposite DICS Beamforming results on source and > sensor level on resting state data > > Hi all, > > I performed DICS beamforming on resting-state data ( eyes closed) of a > clinical population and controls. According to the sensor data, the > control groups have more alpha-band (8-14 > Hz) activity over occipital areas after cluster statistic (attached > figure upper plot) . Curiously, after beamforming , group comparisons > showed the reversed patters in visual cortex (attached figure bottom plot) > .Hence, the source-level results are opposite to the sensor-level results. > This is *not* a problem of the design matrix, or confusing the groups. I > check the individual neural activity index on the single subject level . > They make sense in general . I also tune the parameter a lot (tapper, > central frequency smooth frequency , regularization parameter , et al ), > the opposite pattern remains. I understand that Beamformer images DO NOT > DIRECTLY CORRESPOND TO ANY sensor data. However, the opposite pattern is > really weird. I noticed that Tobias Navarro Schr?der had the similar > issue 4 years ago ( > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). > Thus, I am not the only one who encountered this problem. > > Any tips and suggestions will be greatly appreciated. Thanks in > advance! > [cid:ii_i4jxr2sz1_14aba77f4264462a] > > > Best, > Hatieng > > > > > > > -- > Haiteng Jiang > PhD candidate > Donders Institute for Brain, Cognition and Behaviour > Neuronal Oscillations Group > Computational Cognitive Neuroscience Lab > https://sites.google.com/site/haitengjiang/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150105/0843735d/attachment.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: resting_issues.jpg > Type: image/jpeg > Size: 71312 bytes > Desc: resting_issues.jpg > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150105/0843735d/attachment.jpg > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 50, Issue 3 > **************************************** > -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Tue Jan 6 08:13:34 2015 From: yoniilevy at gmail.com (Yoni Levy) Date: Tue, 6 Jan 2015 09:13:34 +0200 Subject: [FieldTrip] Cluster-based permutation tests for between-subject design Message-ID: Dear Eric, Following up on the thread from about 2 months ago, in your reply (in FAQs: http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), when you mention the mixed between-within-subjects design, I assume that you refer to a design with two subjects groups which are of equal size (e.g. 12 participants vs 12 participants, and not 14 participants vs 12 participants). I assume that in the latter case (unequal groups' size), testing the interaction effect would not be possible; correct? Thanks, Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Tue Jan 6 13:10:46 2015 From: yoniilevy at gmail.com (Yoni Levy) Date: Tue, 6 Jan 2015 14:10:46 +0200 Subject: [FieldTrip] Cluster-based permutation tests for between-subject design Message-ID: More specifically, I was wondering about the recipe for a 2x2 mixed between-within-subjects design (with 2 groups of unequal size). For instance, provided I have two groups: the first with subj1 till subj12 (12 participants), and the second with subj21 till subj34 (14 participants), and each participant with 2 conditions. Then for each participant i calculate the difference between the 2 conditions (subjXdiff) (say for instance, the difference in power in each grid point), and then compare the two groups with an indepsamplesT: subj1diff, ... subj12diff versus subj21diff,.. subj34diff. Would such an indepsamplesT test correspond to testing the interaction between group and condition? Thanks, Yoni On Tue, Jan 6, 2015 at 9:13 AM, Yoni Levy wrote: > Dear Eric, > > Following up on the thread from about 2 months ago, in your reply (in > FAQs: > http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), > when you mention the mixed between-within-subjects design, I assume > that you refer to a design with two subjects groups which are of equal size > (e.g. 12 participants vs 12 participants, and not 14 participants vs 12 > participants). I assume that in the latter case (unequal groups' size), > testing the interaction effect would not be possible; correct? > > Thanks, > Yoni > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.garcia.d at gmail.com Tue Jan 6 21:48:58 2015 From: l.garcia.d at gmail.com (Luis Garcia Dominguez) Date: Tue, 6 Jan 2015 15:48:58 -0500 Subject: [FieldTrip] Cluster-based permutation tests for between-subject design In-Reply-To: References: Message-ID: Hello all, I have a problem when using the ft_dipolefitting function in two different versions. The old version of the function gives me the accurate result and a low residual variance (RV) while the new version produce a totally off localization with high RV. I have attached a .mat file with the two inputs to the function (cfg and timelock) for easy reproducibility. Steps: 1) load('input_variables.mat') % the file attached 2) fix the path to the standard bem file in the appropiate field of cfg as: cfg.hdmfile = [path 'standard_bem.mat] 3) run: source = ft_dipolefitting(cfg, timelock); In the version that comes with EEGlab 11.0.4.4b (which shows a revision = '$Id: ft_dipolefitting.m 5439 2012-03-12 13:17:15Z giopia $';) a local minimun is found and the dipole is: >> source.dip ans = pos: [51.7641 24.5471 -35.4362] mom: [3x1 double] pot: [27x1 double] rv: 0.0218 While in the most recent fieldtrip version: ans = pos: [-45.2455 -86.2421 -15.2132] mom: [3x1 double] pot: [27x1 double] rv: 0.5848 I have intracranial electrodes that show that the solution from the old dipolefitting function is the right one. Can you please, help me to understand what is the source of this huge difference? Thanks! On 6 January 2015 at 02:13, Yoni Levy wrote: > Dear Eric, > > Following up on the thread from about 2 months ago, in your reply (in > FAQs: > http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), > when you mention the mixed between-within-subjects design, I assume > that you refer to a design with two subjects groups which are of equal size > (e.g. 12 participants vs 12 participants, and not 14 participants vs 12 > participants). I assume that in the latter case (unequal groups' size), > testing the interaction effect would not be possible; correct? > > Thanks, > Yoni > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: input_variables.mat Type: application/octet-stream Size: 87154 bytes Desc: not available URL: From laetitia.grabot at gmail.com Wed Jan 7 09:57:28 2015 From: laetitia.grabot at gmail.com (Laetitia Grabot) Date: Wed, 7 Jan 2015 09:57:28 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip Message-ID: Dear all, I would like to read in fieldtrip a epoch file (.fif) created in mne-python. As adviced in the website section "integrate fieldtrip and MNE-Python", I used the following piece of code: *cfg = [];cfg.dataset = filename;data1 = ft_preprocessing(cfg);* And I get the following error: *Error using fiff_setup_read_raw (line 89)No raw data in/neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fifError in fiff_setup_read_raw (line 89) error(me,'No raw data in %s',fname);Error in ft_read_header (line 1157) raw = fiff_setup_read_raw(filename);Error in ft_preprocessing (line 338) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat);* It seems that there is a problem at the level of the header of the file. Any help would be appreciated if someone already solved this issue. By the way, this piece of code works well to read an evoked file without error. Thanks a lot, Best, Laetitia G. -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.engemann at fz-juelich.de Wed Jan 7 12:57:13 2015 From: d.engemann at fz-juelich.de (Denis-Alexander Engemann) Date: Wed, 7 Jan 2015 12:57:13 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Hi Laetitia, here's a tutorial on integrating Fieldtrip with MNE-Python: http://fieldtrip.fcdonders.nl/development/integrate_with_mne You should make sure to use recent fieldtrip code, the support for reading MNE-Python epochs has been added quite recently to the MNE-Matlab tools used inside Fieldtrip. HTH, Denis 2015-01-07 9:57 GMT+01:00 Laetitia Grabot >: Dear all, I would like to read in fieldtrip a epoch file (.fif) created in mne-python. As adviced in the website section "integrate fieldtrip and MNE-Python", I used the following piece of code: cfg = []; cfg.dataset = filename; data1 = ft_preprocessing(cfg); And I get the following error: Error using fiff_setup_read_raw (line 89) No raw data in /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif Error in fiff_setup_read_raw (line 89) error(me,'No raw data in %s',fname); Error in ft_read_header (line 1157) raw = fiff_setup_read_raw(filename); Error in ft_preprocessing (line 338) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); It seems that there is a problem at the level of the header of the file. Any help would be appreciated if someone already solved this issue. By the way, this piece of code works well to read an evoked file without error. Thanks a lot, Best, Laetitia G. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From laetitia.grabot at gmail.com Wed Jan 7 13:43:21 2015 From: laetitia.grabot at gmail.com (Laetitia Grabot) Date: Wed, 7 Jan 2015 13:43:21 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Thanks Denis for the quick answer! My code looks the same than in the tutorial, that's why I don't understand the problem. I tried with the latest version of the day of Fieldtrip, but I still have the same error. 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann < d.engemann at fz-juelich.de>: > Hi Laetitia, > > here's a tutorial on integrating Fieldtrip with MNE-Python: > > http://fieldtrip.fcdonders.nl/development/integrate_with_mne > > You should make sure to use recent fieldtrip code, the support for > reading MNE-Python epochs has been added quite recently to the MNE-Matlab > tools used inside Fieldtrip. > > HTH, > Denis > > > > > > 2015-01-07 9:57 GMT+01:00 Laetitia Grabot : > >> Dear all, >> I would like to read in fieldtrip a epoch file (.fif) created in >> mne-python. As adviced in the website section "integrate fieldtrip and >> MNE-Python", I used the following piece of code: >> >> >> >> * cfg = []; cfg.dataset = filename; data1 = ft_preprocessing(cfg);* >> >> And I get the following error: >> >> >> >> >> >> >> >> >> >> >> >> >> >> *Error using fiff_setup_read_raw (line 89) No raw data in >> /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif >> Error in fiff_setup_read_raw (line 89) error(me,'No raw data in >> %s',fname); Error in ft_read_header (line 1157) raw = >> fiff_setup_read_raw(filename); Error in ft_preprocessing (line 338) hdr = >> ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); * >> It seems that there is a problem at the level of the header of the file. >> Any help would be appreciated if someone already solved this issue. By the >> way, this piece of code works well to read an evoked file without error. >> >> Thanks a lot, >> Best, >> Laetitia G. >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > Forschungszentrum Juelich GmbH > 52425 Juelich > Sitz der Gesellschaft: Juelich > Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 > Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher > Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), > Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, > Prof. Dr. Sebastian M. Schmidt > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.engemann at fz-juelich.de Wed Jan 7 14:24:40 2015 From: d.engemann at fz-juelich.de (Denis-Alexander Engemann) Date: Wed, 7 Jan 2015 14:24:40 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Mhm. That's weird. Could you save a single epoch to disk and share it privately via email? If the epoch is large you could crop it using ``epochs.crop``. --Denis 2015-01-07 13:43 GMT+01:00 Laetitia Grabot : > Thanks Denis for the quick answer! > My code looks the same than in the tutorial, that's why I don't understand > the problem. I tried with the latest version of the day of Fieldtrip, but I > still have the same error. > > 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann < > d.engemann at fz-juelich.de>: > >> Hi Laetitia, >> >> here's a tutorial on integrating Fieldtrip with MNE-Python: >> >> http://fieldtrip.fcdonders.nl/development/integrate_with_mne >> >> You should make sure to use recent fieldtrip code, the support for >> reading MNE-Python epochs has been added quite recently to the MNE-Matlab >> tools used inside Fieldtrip. >> >> HTH, >> Denis >> >> >> >> >> >> 2015-01-07 9:57 GMT+01:00 Laetitia Grabot : >> >>> Dear all, >>> I would like to read in fieldtrip a epoch file (.fif) created in >>> mne-python. As adviced in the website section "integrate fieldtrip and >>> MNE-Python", I used the following piece of code: >>> >>> >>> >>> * cfg = []; cfg.dataset = filename; data1 = ft_preprocessing(cfg);* >>> >>> And I get the following error: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *Error using fiff_setup_read_raw (line 89) No raw data in >>> /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif >>> Error in fiff_setup_read_raw (line 89) error(me,'No raw data in >>> %s',fname); Error in ft_read_header (line 1157) raw = >>> fiff_setup_read_raw(filename); Error in ft_preprocessing (line 338) hdr = >>> ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); * >>> It seems that there is a problem at the level of the header of the >>> file. Any help would be appreciated if someone already solved this issue. >>> By the way, this piece of code works well to read an evoked file without >>> error. >>> >>> Thanks a lot, >>> Best, >>> Laetitia G. >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> >> ------------------------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------------------------ >> Forschungszentrum Juelich GmbH >> 52425 Juelich >> Sitz der Gesellschaft: Juelich >> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 >> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher >> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), >> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, >> Prof. Dr. Sebastian M. Schmidt >> >> ------------------------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at telecom-paristech.fr Wed Jan 7 14:28:36 2015 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Wed, 7 Jan 2015 14:28:36 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: hi, how do you specify that your fif file is an epochs file and not a raw file? epochs files should end with -epo.fif calling fiff_setup_read_raw.m suggests that fieldtrip thinks it's a raw file. HTH Alex On Wed, Jan 7, 2015 at 1:43 PM, Laetitia Grabot wrote: > Thanks Denis for the quick answer! > My code looks the same than in the tutorial, that's why I don't understand > the problem. I tried with the latest version of the day of Fieldtrip, but I > still have the same error. > > 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann > : >> >> Hi Laetitia, >> >> here's a tutorial on integrating Fieldtrip with MNE-Python: >> >> http://fieldtrip.fcdonders.nl/development/integrate_with_mne >> >> You should make sure to use recent fieldtrip code, the support for reading >> MNE-Python epochs has been added quite recently to the MNE-Matlab tools used >> inside Fieldtrip. >> >> HTH, >> Denis >> >> >> >> >> >> 2015-01-07 9:57 GMT+01:00 Laetitia Grabot : >>> >>> Dear all, >>> I would like to read in fieldtrip a epoch file (.fif) created in >>> mne-python. As adviced in the website section "integrate fieldtrip and >>> MNE-Python", I used the following piece of code: >>> >>> cfg = []; >>> cfg.dataset = filename; >>> data1 = ft_preprocessing(cfg); >>> >>> And I get the following error: >>> >>> Error using fiff_setup_read_raw (line 89) >>> No raw data in >>> >>> /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif >>> >>> Error in fiff_setup_read_raw (line 89) >>> error(me,'No raw data in %s',fname); >>> >>> Error in ft_read_header (line 1157) >>> raw = fiff_setup_read_raw(filename); >>> >>> Error in ft_preprocessing (line 338) >>> hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); >>> >>> It seems that there is a problem at the level of the header of the file. >>> Any help would be appreciated if someone already solved this issue. By the >>> way, this piece of code works well to read an evoked file without error. >>> >>> Thanks a lot, >>> Best, >>> Laetitia G. >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> >> ------------------------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------------------------ >> Forschungszentrum Juelich GmbH >> 52425 Juelich >> Sitz der Gesellschaft: Juelich >> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 >> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher >> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), >> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, >> Prof. Dr. Sebastian M. Schmidt >> >> ------------------------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > From laetitia.grabot at gmail.com Wed Jan 7 16:20:21 2015 From: laetitia.grabot at gmail.com (Laetitia Grabot) Date: Wed, 7 Jan 2015 16:20:21 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: I just realized that I was not using the recent version I just downloaded (problem of multiple fieldtrip paths) but now that is ok. I also tried to change the path name to '-epo.fif'. Yet, I still have an error: My code: *%testfilename = '/neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epoch_test_LG-epo.fif' ;cfg = [];cfg.dataset = filename;data1 = ft_preprocessing(cfg);* The error: *Reference to non-existent field 'FIFFB_EPOCHS'.Error in fiff_read_epochs (line 43)ep = fiff_dir_tree_find(meas, FIFF.FIFFB_EPOCHS);Error in ft_read_header (line 1388) epochs = fiff_read_epochs(filename);Error in ft_preprocessing (line 396) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat);* Thanks again, Laetitia 2015-01-07 14:28 GMT+01:00 Alexandre Gramfort < alexandre.gramfort at telecom-paristech.fr>: > hi, > > how do you specify that your fif file is an epochs file and not a raw file? > > epochs files should end with -epo.fif > > calling fiff_setup_read_raw.m suggests that fieldtrip thinks it's a raw > file. > > HTH > Alex > > On Wed, Jan 7, 2015 at 1:43 PM, Laetitia Grabot > wrote: > > Thanks Denis for the quick answer! > > My code looks the same than in the tutorial, that's why I don't > understand > > the problem. I tried with the latest version of the day of Fieldtrip, > but I > > still have the same error. > > > > 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann > > : > >> > >> Hi Laetitia, > >> > >> here's a tutorial on integrating Fieldtrip with MNE-Python: > >> > >> http://fieldtrip.fcdonders.nl/development/integrate_with_mne > >> > >> You should make sure to use recent fieldtrip code, the support for > reading > >> MNE-Python epochs has been added quite recently to the MNE-Matlab tools > used > >> inside Fieldtrip. > >> > >> HTH, > >> Denis > >> > >> > >> > >> > >> > >> 2015-01-07 9:57 GMT+01:00 Laetitia Grabot : > >>> > >>> Dear all, > >>> I would like to read in fieldtrip a epoch file (.fif) created in > >>> mne-python. As adviced in the website section "integrate fieldtrip and > >>> MNE-Python", I used the following piece of code: > >>> > >>> cfg = []; > >>> cfg.dataset = filename; > >>> data1 = ft_preprocessing(cfg); > >>> > >>> And I get the following error: > >>> > >>> Error using fiff_setup_read_raw (line 89) > >>> No raw data in > >>> > >>> > /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif > >>> > >>> Error in fiff_setup_read_raw (line 89) > >>> error(me,'No raw data in %s',fname); > >>> > >>> Error in ft_read_header (line 1157) > >>> raw = fiff_setup_read_raw(filename); > >>> > >>> Error in ft_preprocessing (line 338) > >>> hdr = ft_read_header(cfg.headerfile, 'headerformat', > cfg.headerformat); > >>> > >>> It seems that there is a problem at the level of the header of the > file. > >>> Any help would be appreciated if someone already solved this issue. By > the > >>> way, this piece of code works well to read an evoked file without > error. > >>> > >>> Thanks a lot, > >>> Best, > >>> Laetitia G. > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> > >> > >> > >> > >> > ------------------------------------------------------------------------------------------------ > >> > >> > ------------------------------------------------------------------------------------------------ > >> Forschungszentrum Juelich GmbH > >> 52425 Juelich > >> Sitz der Gesellschaft: Juelich > >> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 > >> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher > >> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), > >> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, > >> Prof. Dr. Sebastian M. Schmidt > >> > >> > ------------------------------------------------------------------------------------------------ > >> > >> > ------------------------------------------------------------------------------------------------ > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > The information in this e-mail is intended only for the person to whom > it is > > addressed. If you believe this e-mail was sent to you in error and the > > e-mail > > contains patient information, please contact the Partners Compliance > > HelpLine at > > http://www.partners.org/complianceline . If the e-mail was sent to you > in > > error > > but does not contain patient information, please contact the sender and > > properly > > dispose of the e-mail. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at telecom-paristech.fr Wed Jan 7 18:00:25 2015 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Wed, 7 Jan 2015 18:00:25 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Laetitia, can you share the file so we can look into it? Alex From d.engemann at fz-juelich.de Wed Jan 7 18:14:48 2015 From: d.engemann at fz-juelich.de (Denis-Alexander Engemann) Date: Wed, 7 Jan 2015 18:14:48 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Already solved. Apparently a path issue with another MNE-Matlab. 2015-01-07 18:00 GMT+01:00 Alexandre Gramfort >: Laetitia, can you share the file so we can look into it? Alex _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From laetitia.grabot at gmail.com Wed Jan 7 19:04:00 2015 From: laetitia.grabot at gmail.com (Laetitia Grabot) Date: Wed, 7 Jan 2015 19:04:00 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Yes, I cleaned up my (too numerous) matlab and fieldtrip paths and it works, thanks! 2015-01-07 18:14 GMT+01:00 Denis-Alexander Engemann < d.engemann at fz-juelich.de>: > Already solved. Apparently a path issue with another MNE-Matlab. > > 2015-01-07 18:00 GMT+01:00 Alexandre Gramfort < > alexandre.gramfort at telecom-paristech.fr>: > >> Laetitia, >> >> can you share the file so we can look into it? >> >> Alex >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > Forschungszentrum Juelich GmbH > 52425 Juelich > Sitz der Gesellschaft: Juelich > Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 > Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher > Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), > Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, > Prof. Dr. Sebastian M. Schmidt > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Thu Jan 8 12:26:52 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Thu, 8 Jan 2015 11:26:52 +0000 Subject: [FieldTrip] Cluster-based permutation tests for between-subject design In-Reply-To: References: Message-ID: <39F7E98E967D3F48B543DDBD9C94213546E364@exprd02.hosting.ru.nl> Yes, and this should also be exactly the recipe on the FAQ page. Best, Eric From: Yoni Levy [mailto:yoniilevy at gmail.com] Sent: dinsdag 6 januari 2015 13:11 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Cluster-based permutation tests for between-subject design More specifically, I was wondering about the recipe for a 2x2 mixed between-within-subjects design (with 2 groups of unequal size). For instance, provided I have two groups: the first with subj1 till subj12 (12 participants), and the second with subj21 till subj34 (14 participants), and each participant with 2 conditions. Then for each participant i calculate the difference between the 2 conditions (subjXdiff) (say for instance, the difference in power in each grid point), and then compare the two groups with an indepsamplesT: subj1diff, ... subj12diff versus subj21diff,.. subj34diff. Would such an indepsamplesT test correspond to testing the interaction between group and condition? Thanks, Yoni On Tue, Jan 6, 2015 at 9:13 AM, Yoni Levy > wrote: Dear Eric, Following up on the thread from about 2 months ago, in your reply (in FAQs: http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), when you mention the mixed between-within-subjects design, I assume that you refer to a design with two subjects groups which are of equal size (e.g. 12 participants vs 12 participants, and not 14 participants vs 12 participants). I assume that in the latter case (unequal groups' size), testing the interaction effect would not be possible; correct? Thanks, Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Thu Jan 8 14:26:13 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Thu, 8 Jan 2015 13:26:13 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... Message-ID: Dear all, I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". What would your reply? I expect angry emails from you : ) Bests, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jan 8 14:43:57 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 8 Jan 2015 14:43:57 +0100 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: References: Message-ID: Dear Davide, Now I'm very curious how you described FieldTrip in the manuscript! Best, Eelke On 8 January 2015 at 14:26, Davide Rivolta wrote: > > Dear all, > > I have recently used FT (and DICS in particular) for the analysis of a > pharmaco-MEG study. > > One of the reviewers of our submitted manuscript is not fully convinced > about FT. Here is his comment: > > "More details regarding what software was used to implement the beamforrmer > is important to properly assess the validity of the results. It does not > appear that the authors used currently available validated software to > perform this analysis". > > What would your reply? > I expect angry emails from you : ) > > > Bests, > Davide > From r.oostenveld at donders.ru.nl Thu Jan 8 18:13:34 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 8 Jan 2015 17:13:34 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: References: Message-ID: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl> Hi Davide, Ideally reviewers have expertise in all aspects of the paper that they review. But reviewers are not all-knowledgeable and hence it shoudl not come as a surprise that a reviewer might not be able to properly assess certain aspects of the study. I don’t know how you referred to the software that you used in your analysis, but presume that you cited the FieldTrip reference paper. In the response to the reviewer you could furthermore point out http://fieldtrip.fcdonders.nl/publications. Note that I still should update it for 2014. Alternatively, you could point to http://scholar.google.com/scholar?cites=5316958122258245287&scisbd=1 which automatically lists all papers that have cited our reference paper. You might also point out that Joaching Gross (who should be considered “the" authority on DICS) is using the same FieldTrip software himself. Showing these citations of scientific papers prior to yours that have relied on the FieldTrip software is still no argument for it being “validated software”. But I hope that it raises the confidence of the reviewer that the software you used is not the result of a toy project. Formally validated software is in general difficult to come by, and I would actually be curious as to which software packages the reviewer considers as “validated" for MEG analysis. cheers Robert On 08 Jan 2015, at 13:26, Davide Rivolta wrote: > > Dear all, > > I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. > > One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: > > "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". > > What would your reply? > I expect angry emails from you : ) > > > Bests, > Davide > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Thu Jan 8 19:16:06 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Thu, 8 Jan 2015 18:16:06 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl> References: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl> Message-ID: <478FDC02-2816-4BF5-A615-3EC227978103@gmail.com> Dear Robert, Many thanks for your kind reply. Yes, I fully cited FieldTrip in the original submission. It is indeed a good idea to list all the papers that have used FT. I will follow all your advice. Bests, Davide Sent from my iPad > On 8 Jan 2015, at 17:13, Robert Oostenveld wrote: > > Hi Davide, > > Ideally reviewers have expertise in all aspects of the paper that they review. But reviewers are not all-knowledgeable and hence it shoudl not come as a surprise that a reviewer might not be able to properly assess certain aspects of the study. > > I don’t know how you referred to the software that you used in your analysis, but presume that you cited the FieldTrip reference paper. In the response to the reviewer you could furthermore point out http://fieldtrip.fcdonders.nl/publications. Note that I still should update it for 2014. Alternatively, you could point to http://scholar.google.com/scholar?cites=5316958122258245287&scisbd=1 which automatically lists all papers that have cited our reference paper. You might also point out that Joaching Gross (who should be considered “the" authority on DICS) is using the same FieldTrip software himself. > > Showing these citations of scientific papers prior to yours that have relied on the FieldTrip software is still no argument for it being “validated software”. But I hope that it raises the confidence of the reviewer that the software you used is not the result of a toy project. Formally validated software is in general difficult to come by, and I would actually be curious as to which software packages the reviewer considers as “validated" for MEG analysis. > > cheers > Robert > > >> On 08 Jan 2015, at 13:26, Davide Rivolta wrote: >> >> >> Dear all, >> >> I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. >> >> One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: >> >> "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". >> >> What would your reply? >> I expect angry emails from you : ) >> >> >> Bests, >> Davide >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Thu Jan 8 19:32:11 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Thu, 8 Jan 2015 18:32:11 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: <478FDC02-2816-4BF5-A615-3EC227978103@gmail.com> References: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl>, <478FDC02-2816-4BF5-A615-3EC227978103@gmail.com> Message-ID: Hi Davide, I presume that you did mention that Fieldtrip is a(n open source) Matlab toolbox, not a stand-alone piece of software. Good luck with the resubmission! Stan Op 8 jan. 2015 om 19:28 heeft "Davide Rivolta" > het volgende geschreven: Dear Robert, Many thanks for your kind reply. Yes, I fully cited FieldTrip in the original submission. It is indeed a good idea to list all the papers that have used FT. I will follow all your advice. Bests, Davide Sent from my iPad On 8 Jan 2015, at 17:13, Robert Oostenveld > wrote: Hi Davide, Ideally reviewers have expertise in all aspects of the paper that they review. But reviewers are not all-knowledgeable and hence it shoudl not come as a surprise that a reviewer might not be able to properly assess certain aspects of the study. I don’t know how you referred to the software that you used in your analysis, but presume that you cited the FieldTrip reference paper. In the response to the reviewer you could furthermore point out http://fieldtrip.fcdonders.nl/publications. Note that I still should update it for 2014. Alternatively, you could point to http://scholar.google.com/scholar?cites=5316958122258245287&scisbd=1 which automatically lists all papers that have cited our reference paper. You might also point out that Joaching Gross (who should be considered “the" authority on DICS) is using the same FieldTrip software himself. Showing these citations of scientific papers prior to yours that have relied on the FieldTrip software is still no argument for it being “validated software”. But I hope that it raises the confidence of the reviewer that the software you used is not the result of a toy project. Formally validated software is in general difficult to come by, and I would actually be curious as to which software packages the reviewer considers as “validated" for MEG analysis. cheers Robert On 08 Jan 2015, at 13:26, Davide Rivolta > wrote: Dear all, I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". What would your reply? I expect angry emails from you : ) Bests, Davide _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Thu Jan 8 19:34:31 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Thu, 8 Jan 2015 18:34:31 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: References: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl> <478FDC02-2816-4BF5-A615-3EC227978103@gmail.com> Message-ID: <4382326E-2975-4DF9-BECF-8991395F27CE@gmail.com> Hi Stan, Yes, I did indicate that it is an open source Matlab toolbox. Thanks! Davide Sent from my iPad > On 8 Jan 2015, at 18:32, Pelt, S. van (Stan) wrote: > > Hi Davide, > > I presume that you did mention that Fieldtrip is a(n open source) Matlab toolbox, not a stand-alone piece of software. > > Good luck with the resubmission! > Stan > > Op 8 jan. 2015 om 19:28 heeft "Davide Rivolta" het volgende geschreven: > >> Dear Robert, >> >> Many thanks for your kind reply. Yes, I fully cited FieldTrip in the original submission. >> It is indeed a good idea to list all the papers that have used FT. I will follow all your advice. >> >> Bests, >> Davide >> >> Sent from my iPad >> >> On 8 Jan 2015, at 17:13, Robert Oostenveld wrote: >> >>> Hi Davide, >>> >>> Ideally reviewers have expertise in all aspects of the paper that they review. But reviewers are not all-knowledgeable and hence it shoudl not come as a surprise that a reviewer might not be able to properly assess certain aspects of the study. >>> >>> I don’t know how you referred to the software that you used in your analysis, but presume that you cited the FieldTrip reference paper. In the response to the reviewer you could furthermore point out http://fieldtrip.fcdonders.nl/publications. Note that I still should update it for 2014. Alternatively, you could point to http://scholar.google.com/scholar?cites=5316958122258245287&scisbd=1 which automatically lists all papers that have cited our reference paper. You might also point out that Joaching Gross (who should be considered “the" authority on DICS) is using the same FieldTrip software himself. >>> >>> Showing these citations of scientific papers prior to yours that have relied on the FieldTrip software is still no argument for it being “validated software”. But I hope that it raises the confidence of the reviewer that the software you used is not the result of a toy project. Formally validated software is in general difficult to come by, and I would actually be curious as to which software packages the reviewer considers as “validated" for MEG analysis. >>> >>> cheers >>> Robert >>> >>> >>>> On 08 Jan 2015, at 13:26, Davide Rivolta wrote: >>>> >>>> >>>> Dear all, >>>> >>>> I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. >>>> >>>> One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: >>>> >>>> "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". >>>> >>>> What would your reply? >>>> I expect angry emails from you : ) >>>> >>>> >>>> Bests, >>>> Davide >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at fcdonders.ru.nl Mon Jan 12 15:52:51 2015 From: jan.schoffelen at fcdonders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 12 Jan 2015 14:52:51 +0000 Subject: [FieldTrip] only read this is you are doing source reconstruction on eeg data Message-ID: <5BED7454-A406-462D-9C79-5D2EA7814EAC@fcdonders.ru.nl> Dear all, We have identified and fixed a nasty bug in FieldTrip that has consequences for those who do source reconstruction on EEG data, and have done so using a FieldTrip version of the past month or so. The bug was nasty because it didn’t cause a MATLAB or FieldTrip error. Please do read on only if you fulfill following two requirements: -you do source reconstruction of EEG data, using FieldTrip, or a toolbox that relies on low level fieldtrip functionality -you have been using a FieldTrip version that’s more recent than December 15, 2014 (svn revision 10043) Otherwise, have a nice day :-). …. …. (suspense) …. (even more suspense) …. OK, here’s the problem: in order for the EEG source reconstruction to work, the electrodes need to be projected onto the skin surface. In the FieldTrip versions 10043-10093 this projection was incorrect, causing some of the electrodes ending up on wrong locations, causing incorrect forward models (leadfields) and consequently incorrect inverse reconstruction. As of FT-version r.10094 this should be fixed. Best wishes and apologies for any inconenience caused, Jan-Mathijs From mathieu.sitko at wanadoo.fr Mon Jan 12 16:44:59 2015 From: mathieu.sitko at wanadoo.fr (Mathieu Sitko) Date: Mon, 12 Jan 2015 16:44:59 +0100 Subject: [FieldTrip] Wilson Factorization Message-ID: <54B3EBFB.5090105@wanadoo.fr> I have a problem with the convergence of spectral matrix factorization: with a tolerance of 1e-8, all my data (H,S,Z) are NaN values. How could you explain that? thank you From jan.schoffelen at fcdonders.ru.nl Mon Jan 12 20:18:52 2015 From: jan.schoffelen at fcdonders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 12 Jan 2015 19:18:52 +0000 Subject: [FieldTrip] Wilson Factorization In-Reply-To: <54B3EBFB.5090105@wanadoo.fr> References: <54B3EBFB.5090105@wanadoo.fr> Message-ID: Mathieu, Since your question is of relatively poor quality, I can only venture a poor quality guess: it’s likely that your data is rank deficient. The Wilson algorithm involves inversion of matrices, rank deficiency will quickly lead to nans. Please consult the following link (and references therein) in order to optimize the probability of obtaining a useful answer, and to optimize the goodwill of the FT-community (especially the ‘Ten simple rules…’ are a must read). http://fieldtrip.fcdonders.nl/discussion_list Best wishes, Jan-Mathijs On Jan 12, 2015, at 4:44 PM, Mathieu Sitko wrote: > I have a problem with the convergence of spectral matrix factorization: with a tolerance of 1e-8, all my data (H,S,Z) are NaN values. How could you explain that? > thank you > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tyler.grummett at flinders.edu.au Tue Jan 13 00:36:41 2015 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 12 Jan 2015 23:36:41 +0000 Subject: [FieldTrip] only read this is you are doing source reconstruction on eeg data In-Reply-To: <5BED7454-A406-462D-9C79-5D2EA7814EAC@fcdonders.ru.nl> References: <5BED7454-A406-462D-9C79-5D2EA7814EAC@fcdonders.ru.nl> Message-ID: <0AD3A8E7-8E9A-4280-9D23-776524DFFBD0@flinders.edu.au> Hi jan, I accidentally updated without checking what my previous version of field trip was, is there a way of finding out? Also, if you came from a different toolbox with different electrode positions and copied all the locations from fieldtrip and inserted them, will that cause inaccurate results? I was advised to do this a while ago when I was having issues aligning my electrode positions with fieldtrip's Tyler > On 13 Jan 2015, at 1:27 am, Schoffelen, J.M. (Jan Mathijs) wrote: > > Dear all, > > We have identified and fixed a nasty bug in FieldTrip that has consequences for those who do source reconstruction on EEG data, and have done so using a FieldTrip version of the past month or so. The bug was nasty because it didn’t cause a MATLAB or FieldTrip error. > > Please do read on only if you fulfill following two requirements: > -you do source reconstruction of EEG data, using FieldTrip, or a toolbox that relies on low level fieldtrip functionality > -you have been using a FieldTrip version that’s more recent than December 15, 2014 (svn revision 10043) > > Otherwise, have a nice day :-). > > …. > > …. > > (suspense) > > …. > > (even more suspense) > > …. > > OK, here’s the problem: in order for the EEG source reconstruction to work, the electrodes need to be projected onto the skin surface. In the FieldTrip versions 10043-10093 this projection was incorrect, causing some of the electrodes ending up on wrong locations, causing incorrect forward models (leadfields) and consequently incorrect inverse reconstruction. As of FT-version r.10094 this should be fixed. > > Best wishes and apologies for any inconenience caused, > > Jan-Mathijs > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lysne at unm.edu Tue Jan 13 01:18:43 2015 From: lysne at unm.edu (Per Arnold Lysne) Date: Tue, 13 Jan 2015 00:18:43 +0000 Subject: [FieldTrip] Wilson Factorization In-Reply-To: References: <54B3EBFB.5090105@wanadoo.fr>, Message-ID: <1421108319514.22602@unm.edu> Hi Mathieu, I have had a similar problem when trying to factor a spectral matrix generated from an average evoked response. In case you are trying to do the same thing, my solution has been to transform individual trials to the time/frequency domain and do the averaging there. I get usable results when factoring the resulting power spectral matrix. Hope that helps, Per Lysne University of New Mexico ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Schoffelen, J.M. (Jan Mathijs) Sent: Monday, January 12, 2015 12:18 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Wilson Factorization Mathieu, Since your question is of relatively poor quality, I can only venture a poor quality guess: it’s likely that your data is rank deficient. The Wilson algorithm involves inversion of matrices, rank deficiency will quickly lead to nans. Please consult the following link (and references therein) in order to optimize the probability of obtaining a useful answer, and to optimize the goodwill of the FT-community (especially the ‘Ten simple rules…’ are a must read). http://fieldtrip.fcdonders.nl/discussion_list Best wishes, Jan-Mathijs On Jan 12, 2015, at 4:44 PM, Mathieu Sitko wrote: > I have a problem with the convergence of spectral matrix factorization: with a tolerance of 1e-8, all my data (H,S,Z) are NaN values. How could you explain that? > thank you > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From bushra.riaz at gu.se Tue Jan 13 09:05:09 2015 From: bushra.riaz at gu.se (Bushra Riaz Syeda) Date: Tue, 13 Jan 2015 08:05:09 +0000 Subject: [FieldTrip] Call for applicants: 2 PhD students and 1 post-doc position in high-Tc superconductivity and sensors for medical applications. Message-ID: <1421136309282.66059@gu.se> Begin forwarded message: Dear colleagues and friends, My apologies if you receive this more than once. Thanks to a generous grant from the Knut och Alice Wallenbergs Stiftelse, we are now hiring 2 PhD students and 1 post-doc for our project "NeuroSQUID" at the Chalmers University of Technology here in Gothenburg, Sweden. The aim of the project is to explore high-Tc superconductivity at the nanoscale and develop a high-Tc superconducting sensor system for functional neuroimaging (i.e., magnetoencephalography). Please forward this to your respective networks and potential candidates. PhD student position in high-Tc superconductivity: http://www.chalmers.se/en/about-chalmers/vacancies/Pages/default.aspx?rmpage=job&rmjob=2688 PhD student position in superconducting sensor technology for medical applications/MEG: http://www.chalmers.se/en/about-chalmers/vacancies/Pages/default.aspx?rmpage=job&rmjob=2686 Post-doc position in superconducting sensor technology for medical applications/MEG: http://www.chalmers.se/en/about-chalmers/vacancies/Pages/default.aspx?rmpage=job&rmjob=2718 NOTE: The application deadline is the 31st of January. More information about Chalmers: http://www.chalmers.se/en/ More information about the University of Gothenburg and Sahlgrenska Academy, the medical school and university with which we collaborate: http://sahlgrenska.gu.se/english More information about NatMEG, the Swedish National Facility for Magnetoencephalography with which we collaborate: http://www.natmeg.se More information about the collaborative research platform MedTech West: http://www.medtechwest.se Thanks! Justin MedTech West http://www.medtechwest.se Institute of Neuroscience and Physiology Sahlgrenska Academy & University of Gothenburg -------------- next part -------------- An HTML attachment was scrubbed... URL: From lucilegamond at gmail.com Tue Jan 13 09:35:48 2015 From: lucilegamond at gmail.com (Lucile Gamond) Date: Tue, 13 Jan 2015 09:35:48 +0100 Subject: [FieldTrip] Clustering: minimal time window ? Message-ID: Dear all, A quick question about the clustering method: I know that we can modulate the minimal number of channels in a cluster... Is there a similar option for the temporal aspect ? Such as a minimal time-window allowed ? Or is it possible to obtain a cluster on only one time-sample (at least theoritically)? Thanks a lot for your help, Kind regards Lucile -------------- next part -------------- An HTML attachment was scrubbed... URL: From yingli.ucla at gmail.com Wed Jan 14 20:04:32 2015 From: yingli.ucla at gmail.com (Ying Li) Date: Wed, 14 Jan 2015 11:04:32 -0800 Subject: [FieldTrip] How to read .dicom format using FT_READ_MRI Message-ID: Dear all, I'm trying to load MRI into matlab. The MRI data I have is a series of .dicom files (~250 frames, "IMG1"~"IMG250"). I'm wondering how to specify the input parameter for the function "ft_read_mri". Since I have 250 files, which file should I use for the input? If I only use the first file "IMG1", for example mri = ft_read_mri('IMG1'); Then I will get the following error: Warning: Not enough data imported. Attempted to read 3053459760 bytes at position 2953. Only read 534544. ERROR: IMG1 does not have a series number Error in load_dicom_series (line 42) if(nargin < 1 | nargin > 3) Output argument "vol" (and maybe others) not assigned during call to "XX\fieldtrip_20140518\external\freesurfer\load_dicom_series.m>load_dicom_series". Error in ft_read_mri (line 287) [img,transform,hdr,mr_params] = load_dicom_series(dcmdir,dcmdir,filename); I'll appreciate your reply a lot! Best, Ying -------------- next part -------------- An HTML attachment was scrubbed... URL: From yingli.ucla at gmail.com Thu Jan 15 01:08:30 2015 From: yingli.ucla at gmail.com (Ying Li) Date: Wed, 14 Jan 2015 16:08:30 -0800 Subject: [FieldTrip] Electrode Alignment Message-ID: Hi Everyone, I'm trying to align my .elc electrode file (ALS coordinate) to the template head model provided by fieldtrip (MNI coordinate). Since we used ANT electrode (as attached) to measure the EEG, so there are not Lpa, Rpa, and Nz fiducials in the electrodes. Therefore, it seems that I can't use "automatic alignment" to align the electrode. Also, it is very difficult to only use "interactive alignment" to align the electrode... I already know that the electrode coordinate is "als", so I'm wondering whether there exists some other methods that can help to transform the electrode to the "MNI coordinate". I'll appreciate your help a lot ! Best, Ying -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ANT 64 electrode layout.png Type: image/png Size: 19930 bytes Desc: not available URL: From martin.bleichner at uni-oldenburg.de Thu Jan 15 13:42:18 2015 From: martin.bleichner at uni-oldenburg.de (Martin Bleichner) Date: Thu, 15 Jan 2015 13:42:18 +0100 Subject: [FieldTrip] PhD Position Oldenburg/Germany Message-ID: <54B7B5AA.9090106@uni-oldenburg.de> Dear Fieltrip Users, The Department of Psychology, Carl von Ossietzky University Oldenburg, Neuropsychology lab (head: Prof. Dr. Stefan Debener) is offering a position as *Member of academic staff / PhD Student* E13 TV-L, 65% of the fulltime weekly hours The position starts as soon as possible and is limited for 3 years. Studying communication during social interactions using behavioral observation, mobile EEG & cognitive modelling In this interdisciplinary project we seek to identify factors involved in successful social interactions in humans. Social interactions will be studied by combining established approaches from the fields of performing arts, behavioral assessment, neurophysiology and cognitive modeling. This position will be located in Oldenburg and will focus on the neurophysiological mechanisms of social interactions as assessed by mobile EEG. The position is part of the project 'IMPACT- IMproving Patterns of social interACTion' funded by the Volkswagen Foundation. The project includes complementary research at the Technical University Dresden, Germany (Jun. Prof. Dr. Stefan Scherbaum) focusing on cognitive modeling and behavioral assessment of social interactions. We offer an agile, interdisciplinary and international work environment. A PhD candidate has the opportunity to enroll in the PhD program of the Graduate School 'Science and Technology' (www.oltech.org ). *Tasks:*The successful candidate will design, record and analyse multi-subject studies using advanced mobile EEG technology. The candidate has to publish obtained research results in peer reviewed scientific journals. *Qualifications:*An academic university degree (e.g. Diploma or Master's degree) in psychology, biology, neurosciences, psycholinguistics or a related discipline is required. We are seeking a candidate with strong knowledge in experimental and/or cognitive neuroscience. It is beneficial to have expertise in EEG/MEG or neuroimaging, knowledge in programming in Matlab and a background in biomedical signal processing. The applicant is required to have very good knowledge of both English and German. The Carl von Ossietzky University is striving to increase the number of women employed in research and science. Therefore, we explicitly ask women to apply. Following § 21 Abs. 3 NHG female applicants with equivalent qualifications will be preferred. Disabled applicants with equivalent qualifications will be preferred. Please send your application including a letter of motivation with a short statement of research interests, CV, names of two potential referees, if applicable list of publications, and copies of certificates toDr. Martin Bleichner . We prefer an electronic application with a single pdf.*Please apply**by first of February 2015 to ensure consideration.* Questions prior to the application can be addressed also to Dr. Bleichner, Carl von Ossietzky Universität Oldenburg, Fakultät für Medizin und Gesundheitswissenschaften, Department für Psychologie, D-26111 Oldenburg, Germany, email:martin.bleichner at uni-oldenburg.de , phone: +49 (0)441 - 798 - 2940 -- Dr. Martin Bleichner Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany martin.bleichner at uni-oldenburg.de Tel.: +49 (0)441 - 798-2940 http://www.uni-oldenburg.de/psychologie/neuropsychologie/team/martin-bleichner/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Thu Jan 15 16:41:42 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 15 Jan 2015 16:41:42 +0100 (CET) Subject: [FieldTrip] MaxFilter and ICA preprocessing Message-ID: <1593874569.164723.1421336502194.JavaMail.root@bcbl.eu> Dear all, after preprocessing my MEG data (Elekta Neuromag) with MaxFilter, I noticed that the ICA decomposition takes longer than if the data hasn't been preprocessed with MF. As a side note: I've taken care of reducing the dimensionality of the data to cfg.runica.pca = rank(data.trial{1}*data.trial{1}'), as I've read in previous posts that otherwise the results of the ICA decomposition can contain complex values. My questions are: 1) is the fact that the ICA training takes longer normal? 2) why does the ICA training take longer in the case of MF preprocessing? Sorry for cross-posting on both lists, I'm just hoping to get an answer asap. Best, Fred --------------------------------------------------------------------------- From f.roux at bcbl.eu Thu Jan 15 18:00:56 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 15 Jan 2015 18:00:56 +0100 (CET) Subject: [FieldTrip] MaxFilter and ICA preprocessing In-Reply-To: <1593874569.164723.1421336502194.JavaMail.root@bcbl.eu> Message-ID: <2006140742.166364.1421341256776.JavaMail.root@bcbl.eu> Problem solved. I am posting below the solution with what I think may be the explanation, in case someone else might experience a similar issue. cfg = []; cfg.method = 'runica'; cfg.numcomponent = rank(meg_data.trial{1}*meg_data.trial{1}'); ic_data = ft_componentanalysis(cfg,meg_data); Most likely, this reduces the complexity of the solution the algorithm searches for. Insead of searching for n1 = length(meg_data.label) ICs the algorithm searches for n2 = rank(meg_data.trial{1}*meg_data.trial{1}') ICs. The slowing down of the ICA arises because the data has rank n2 and not n1, but still the algorithm tries to search for a solution satisfying rank = n1. Remains the question why cfg.runica.pca = rank(meg_data.trial{1}*meg_data.trial{1}') didn't have any effect. Has this option become obsolete in more recent versions of FT? Best, Fred Frédéric Roux ----- Original Message ----- From: "Frédéric Roux" To: "FieldTrip discussion list" , "Discussion list for international MEG community" Sent: Thursday, January 15, 2015 4:41:42 PM Subject: MaxFilter and ICA preprocessing Dear all, after preprocessing my MEG data (Elekta Neuromag) with MaxFilter, I noticed that the ICA decomposition takes longer than if the data hasn't been preprocessed with MF. As a side note: I've taken care of reducing the dimensionality of the data to cfg.runica.pca = rank(data.trial{1}*data.trial{1}'), as I've read in previous posts that otherwise the results of the ICA decomposition can contain complex values. My questions are: 1) is the fact that the ICA training takes longer normal? 2) why does the ICA training take longer in the case of MF preprocessing? Sorry for cross-posting on both lists, I'm just hoping to get an answer asap. Best, Fred --------------------------------------------------------------------------- From eelke.spaak at donders.ru.nl Thu Jan 15 18:11:47 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 15 Jan 2015 18:11:47 +0100 Subject: [FieldTrip] MaxFilter and ICA preprocessing In-Reply-To: References: <1593874569.164723.1421336502194.JavaMail.root@bcbl.eu> Message-ID: Dear Fred, The options cfg.runica.pca and cfg.numcomponent should have the exact same effect when using cfg.method = 'runica'. (See the code for ft_componentanalysis at lines 480-490.) One possible explanation for why you were getting slow results is that ICA depends on a random initialization; perhaps sometimes the initial weights were better than at other times? Best, Eelke On 15 January 2015 at 18:00, Frédéric Roux wrote: > Problem solved. > > I am posting below the solution with what I think may be > the explanation, in case someone else might experience a similar > issue. > > cfg = []; > cfg.method = 'runica'; > cfg.numcomponent = rank(meg_data.trial{1}*meg_data.trial{1}'); > > ic_data = ft_componentanalysis(cfg,meg_data); > > Most likely, this reduces the complexity of the solution the algorithm > searches for. Insead of searching for n1 = length(meg_data.label) ICs > the algorithm searches for n2 = rank(meg_data.trial{1}*meg_data.trial{1}') ICs. > The slowing down of the ICA arises because the data has rank n2 and not n1, but > still the algorithm tries to search for a solution satisfying rank = n1. > > Remains the question why cfg.runica.pca = rank(meg_data.trial{1}*meg_data.trial{1}') didn't > have any effect. Has this option become obsolete in more recent versions of FT? > > Best, > > Fred > > > Frédéric Roux > > ----- Original Message ----- > From: "Frédéric Roux" > To: "FieldTrip discussion list" , "Discussion list for international MEG community" > Sent: Thursday, January 15, 2015 4:41:42 PM > Subject: MaxFilter and ICA preprocessing > > Dear all, > > after preprocessing my MEG data (Elekta Neuromag) with MaxFilter, I noticed that the ICA decomposition > takes longer than if the data hasn't been preprocessed with MF. > > As a side note: I've taken care of reducing the dimensionality of the data to cfg.runica.pca = rank(data.trial{1}*data.trial{1}'), as I've read in previous posts that otherwise the results of the ICA decomposition can contain complex values. > > My questions are: > > 1) is the fact that the ICA training takes longer normal? > > 2) why does the ICA training take longer in the case of MF preprocessing? > > Sorry for cross-posting on both lists, I'm just hoping to get an answer asap. > > > Best, > Fred > > > --------------------------------------------------------------------------- > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stan.vanpelt at donders.ru.nl Fri Jan 16 09:43:40 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Fri, 16 Jan 2015 08:43:40 +0000 Subject: [FieldTrip] How to read .dicom format using FT_READ_MRI In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894CB27BDF@exprd03.hosting.ru.nl> Dear Ying, As far as I understand, Fieldtrip can read in the entire series of dicom-files by just specifying the first file name of the series, just like you did. However, for this it is required that the series number is clear in each file name, e.g. MRI_S01_MEG.0001.0001.IMA, MRI_S01_MEG.0001.0002.IMA, etc. I suppose that is not clear in your dicom file names. Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ying Li Sent: woensdag 14 januari 2015 20:05 To: FieldTrip discussion list Subject: [FieldTrip] How to read .dicom format using FT_READ_MRI Dear all, I'm trying to load MRI into matlab. The MRI data I have is a series of .dicom files (~250 frames, "IMG1"~"IMG250"). I'm wondering how to specify the input parameter for the function "ft_read_mri". Since I have 250 files, which file should I use for the input? If I only use the first file "IMG1", for example mri = ft_read_mri('IMG1'); Then I will get the following error: Warning: Not enough data imported. Attempted to read 3053459760 bytes at position 2953. Only read 534544. ERROR: IMG1 does not have a series number Error in load_dicom_series (line 42) if(nargin < 1 | nargin > 3) Output argument "vol" (and maybe others) not assigned during call to "XX\fieldtrip_20140518\external\freesurfer\load_dicom_series.m>load_dicom_series". Error in ft_read_mri (line 287) [img,transform,hdr,mr_params] = load_dicom_series(dcmdir,dcmdir,filename); I'll appreciate your reply a lot! Best, Ying -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Fri Jan 16 11:54:35 2015 From: michelic72 at gmail.com (Cristiano Micheli) Date: Fri, 16 Jan 2015 11:54:35 +0100 Subject: [FieldTrip] How to read .dicom format using FT_READ_MRI In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894CB27BDF@exprd03.hosting.ru.nl> References: <7CCA2706D7A4DA45931A892DF3C2894CB27BDF@exprd03.hosting.ru.nl> Message-ID: Hi Ying and Stan, I had the same problem, and I solved it in a 'quick and dirty' way by changing the name of the first image of the dicom series (i.e. substituting the dots with underscores). It may help to change/add the extension of the first file too . Best of luck! Cris On Fri, Jan 16, 2015 at 9:43 AM, Pelt, S. van (Stan) < stan.vanpelt at donders.ru.nl> wrote: > Dear Ying, > > > > As far as I understand, Fieldtrip can read in the entire series of > dicom-files by just specifying the first file name of the series, just like > you did. However, for this it is required that the series number is clear > in each file name, e.g. MRI_S01_MEG.0001.0001.IMA, > MRI_S01_MEG.0001.0002.IMA, etc. I suppose that is not clear in your dicom > file names. > > > > Best, > > Stan > > > > -- > > Stan van Pelt, PhD > > Donders Institute for Brain, Cognition and Behaviour > > Radboud University > > Montessorilaan 3, B.01.34 > > 6525 HR Nijmegen, the Netherlands > > tel: +31 24 3616288 > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Ying Li > *Sent:* woensdag 14 januari 2015 20:05 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] How to read .dicom format using FT_READ_MRI > > > > Dear all, > > > > I'm trying to load MRI into matlab. The MRI data I have is a series of > .dicom files (~250 frames, "IMG1"~"IMG250"). I'm wondering how to specify > the input parameter for the function "ft_read_mri". Since I have 250 files, > which file should I use for the input? > > > > If I only use the first file "IMG1", for example mri = > ft_read_mri('IMG1'); Then I will get the following error: > > > > Warning: Not enough data imported. Attempted to read 3053459760 bytes at > position 2953. Only read 534544. > > ERROR: IMG1 does not have a series number > > Error in load_dicom_series (line 42) > > if(nargin < 1 | nargin > 3) > > > > Output argument "vol" (and maybe others) not assigned during call to > > > "XX\fieldtrip_20140518\external\freesurfer\load_dicom_series.m>load_dicom_series". > > > > Error in ft_read_mri (line 287) > > [img,transform,hdr,mr_params] = > load_dicom_series(dcmdir,dcmdir,filename); > > > > I'll appreciate your reply a lot! > > > > Best, > > > > Ying > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Fri Jan 16 19:24:02 2015 From: luke.bloy at gmail.com (Luke Bloy) Date: Fri, 16 Jan 2015 13:24:02 -0500 Subject: [FieldTrip] Realtime setup Message-ID: Hi all, I'm interested in setting up some realtime analysis on a CTF system. Fieldtrip seems to have done quite a bit of work in getting this working, but i don't see a lot of documentation / discussion about hardware setup etc, but perhaps I'm missing it. Can anyone help me in deciding what is needed at a hardware level to make the ft_realtime routines work with a CTF machine? Thanks. Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From kkalimeri at gmail.com Sun Jan 18 13:37:22 2015 From: kkalimeri at gmail.com (Kyriaki Kalimeri) Date: Sun, 18 Jan 2015 14:37:22 +0200 Subject: [FieldTrip] Postdoctoral Fellowship position - ISI Foundation Message-ID: Job Description Institute for Scientific Interchange(ISI) is seeking to appoint a highly motivated Postdoctoral Assistant to undertake research activities related to human centric computing for the Horizon2020 project "Sound Of Vision". ISI provides an unusually rich opportunity for collegial interaction in a highly competitive environment. Mentoring will also be provided by a multidisciplinary faculty team including co-investigators on the project and collaborators from Neurology, Engineering, Medicine and Psychology. Project Overview Sound of Vision (Natural sense of vision through acoustics and haptics) is a highly multidisciplinary project that will design, implement and validate an original non-invasive, wearable hardware and software system to assist visually impaired people by creating and conveying an auditory representation of the surrounding environment. This representation will be created, updated and delivered to the blind users continuously and in real time. In addition to the auditory representation, haptics will be used moderately as an additional channel to convey some of the most relevant information. The system will help visually impaired people to both perceive and navigate in any kind of environment (indoor/outdoor), without the need for predefined tags/sensors located in the surroundings and regardless of the lighting conditions. Specifically you will: - Conduct user and feasibility studies to determine the appropriate mobile platform and delivery components to support the functionality of the "Sound of Vision" prototype; - Participate in the shared decision making around alternatives to the hardware and software development; - Participate in a large trial to assist in system deployment and data collection; - Carry out innovative, impactful research of strategic importance to the domain of behavioural neuroscience, cognitive science and human computer interaction; - Produce high quality scientific and technical outputs including journal articles, conference papers and presentations, patents and technical reports. To be successful in this position you will need: - PhD in neuroscience, computer science, computer engineering or other related field with a neuroscience-related background. - demonstrated experience in behavioural neuroscience and BCI techniques. Specific areas of focus include visual impairments, brain plasticity and usability research will be desired. - fluency in English The review of applications will begin immediately and the position will remain open until filled. The initial appointment is for 1 year with a possibility of extension. To apply, send cover letter, curriculum vitae and professional reference list to the PI of the project Dr.Kyriaki Kalimeri, kyriaki.kalimeri at isi.it. ISI is an equal opportunity employer and does not discriminate on the basis of race, color, national origin, gender, sexual orientation, age, religion or disability. -- *Dr. Kyriaki KalimeriElectronic & Computer Engineer* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Jan 19 09:59:48 2015 From: jorn at artinis.com (=?utf-8?Q?J=C3=B6rn_M._Horschig?=) Date: Mon, 19 Jan 2015 09:59:48 +0100 Subject: [FieldTrip] Realtime setup In-Reply-To: References: Message-ID: <000201d033c6$47c4ded0$d74e9c70$@artinis.com> Hi Luke, nice to see that you are getting into the realtime business ;) The software side of realtime analysis should be documented quite well, but a bit scattered across the FT page (just in case, e.g. http://fieldtrip.fcdonders.nl/development/realtime/ctf or http://fieldtrip.fcdonders.nl/development/realtime). As you said, the hardware setup itself is not hugely discussed, but that is because there is not much to discuss. The FT buffer is implement by a shared memory segment (i.e. some reserved address in memory that is accessible) and communication between computers takes place via a TCP socket. So, hardware requirements are memory and a network card ;) As long as your computers are not too ancient, there should also be no problem in terms of computational requirements. Our realtime computer is about 3 years old, our acquisition computer at least 4 (but I guess more in the range of 6-8 yrs). I am not working at the Donders anymore, so I cannot check the exact specs. Are you facing any particular problems? Or just asking before setting anything up? In the last years, we wrote several papers about how we use the realtime implementation at the Donders, maybe they help as well in understanding our hardware setup: http://www.sciencedirect.com/science/article/pii/S1053811914010064 http://link.springer.com/article/10.1007%2Fs10548-014-0401-7 http://www.sciencedirect.com/science/article/pii/S1053811912011597 If you have any more questions, feel free to ask again. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Luke Bloy Sent: Friday, January 16, 2015 7:24 PM To: FieldTrip list serve Cc: jm.horschig at donders.ru.nl Subject: [FieldTrip] Realtime setup Hi all, I'm interested in setting up some realtime analysis on a CTF system. Fieldtrip seems to have done quite a bit of work in getting this working, but i don't see a lot of documentation / discussion about hardware setup etc, but perhaps I'm missing it. Can anyone help me in deciding what is needed at a hardware level to make the ft_realtime routines work with a CTF machine? Thanks. Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From ploner at lrz.tu-muenchen.de Mon Jan 19 13:12:46 2015 From: ploner at lrz.tu-muenchen.de (Markus Ploner) Date: Mon, 19 Jan 2015 13:12:46 +0100 Subject: [FieldTrip] =?utf-8?q?PhD_Student_in_computational_neuroscience/p?= =?utf-8?q?ain_research_-_Technische_Universit=C3=A4t_M=C3=BCnchen?= Message-ID: PhD Student in computational neuroscience/pain research Department of Neurology, Technische Universität München, Munich, Germany Applications are invited for a PhD Student position at the Department of Neurology, Technische Universität München, to work on the cerebral representation of pain by using EEG. The project will focus on the neurophysiological correlates of pain in healthy human subjects and patients suffering from chronic pain disorders. Major experimental methods include EEG time-frequency analysis, source analysis and connectivity analysis. The candidate will join a research group dedicated to the multimodal investigation of the cerebral representation of pain (http://www.painlabmunich.de ) which is part of the TUM-Neuroimaging Center (TUM-NIC; http://www.tumnic.mri.tum.de ). TUM-NIC hosts state-of-the-art neuroimaging facilities and offers training in major neuroimaging techniques. Applicants should have a background in computer science, statistics, physics, engineering, neuroscience, medicine, psychology, or other relevant disciplines. Prior experience in MATLAB programming is mandatory. Skills for sophisticated analysis of EEG data (e.g. information theory, machine learning techniques, mediation analysis) are highly desirable. Candidates have the possibility to integrate in the PhD program Medical Life Science and Technology (http://www.phd.med.tum.de ) or the Graduate School of Systemic Neurosciences (http://www.gsn.uni-muenchen.de/index.html ), which offer interdisciplinary high-level training for students with different backgrounds. Salary will be commensurate with the German TVöD salary scale (EG13). Applications will be considered until the position is filled. Candidates may contact Dr. Markus Ploner for more detailed information or directly e-mail their application (ploner at lrz.tum.de ), including letter of motivation, CV and letters of recommendation. Markus Ploner MD Heisenberg Professor of Human Pain Research Department of Neurology Technische Universität München Munich, Germany ploner at lrz.tum.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Mon Jan 19 22:07:38 2015 From: luke.bloy at gmail.com (Luke Bloy) Date: Mon, 19 Jan 2015 16:07:38 -0500 Subject: [FieldTrip] Realtime setup In-Reply-To: <000201d033c6$47c4ded0$d74e9c70$@artinis.com> References: <000201d033c6$47c4ded0$d74e9c70$@artinis.com> Message-ID: Hi Jörn, This is a great place for me to start. I'm just beginning to think through a setup so I haven't run into any problems yet. But I'm sure that I will. Thank you. -Luke On Mon, Jan 19, 2015 at 3:59 AM, Jörn M. Horschig wrote: > Hi Luke, > > > > nice to see that you are getting into the realtime business ;) > > The software side of realtime analysis should be documented quite well, > but a bit scattered across the FT page (just in case, e.g. > http://fieldtrip.fcdonders.nl/development/realtime/ctf or > http://fieldtrip.fcdonders.nl/development/realtime). As you said, the > hardware setup itself is not hugely discussed, but that is because there is > not much to discuss. The FT buffer is implement by a shared memory segment > (i.e. some reserved address in memory that is accessible) and communication > between computers takes place via a TCP socket. So, hardware requirements > are memory and a network card ;) As long as your computers are not too > ancient, there should also be no problem in terms of computational > requirements. Our realtime computer is about 3 years old, our acquisition > computer at least 4 (but I guess more in the range of 6-8 yrs). I am not > working at the Donders anymore, so I cannot check the exact specs. Are you > facing any particular problems? Or just asking before setting anything up? > > > > In the last years, we wrote several papers about how we use the realtime > implementation at the Donders, maybe they help as well in understanding our > hardware setup: > > http://www.sciencedirect.com/science/article/pii/S1053811914010064 > > http://link.springer.com/article/10.1007%2Fs10548-014-0401-7 > > http://www.sciencedirect.com/science/article/pii/S1053811912011597 > > > > If you have any more questions, feel free to ask again. > > > > Best, > > Jörn > > > > *--* > > > > *Jörn M. Horschig*, Software Engineer > > Artinis Medical Systems | +31 481 350 980 > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Luke Bloy > *Sent:* Friday, January 16, 2015 7:24 PM > *To:* FieldTrip list serve > *Cc:* jm.horschig at donders.ru.nl > *Subject:* [FieldTrip] Realtime setup > > > > Hi all, > > > > I'm interested in setting up some realtime analysis on a CTF system. > Fieldtrip seems to have done quite a bit of work in getting this working, > but i don't see a lot of documentation / discussion about hardware setup > etc, but perhaps I'm missing it. > > > > Can anyone help me in deciding what is needed at a hardware level to make > the ft_realtime routines work with a CTF machine? > > > > Thanks. > > Luke > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Wed Jan 21 02:56:14 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Tue, 20 Jan 2015 17:56:14 -0800 Subject: [FieldTrip] Biosemi eventtype problem Message-ID: <54BF073E.40808@gmail.com> Hi all, I was wondering whether anyone has seen this issue on Biosemi bdf before and, if so, how you solved it. If I use FT to read in the data, I have 'STATUS' as an event type with event values. However, the values in there are not really the values that were sent. Also, the number of values doesn't match what was sent. So I went on to check what EEGlab would do. Using the GUI, the event values that are produced cannot be selected further. It's a weird error, it detects event values (the same values that FT detects), but it then complains that they are not strings. Final attempt: force EEGlab to read one channel in particular in the command line. It turns out, these data have 64 channels, 8 EXG and one additional channel, 73. If I force EEGlab to read from channel 73, I get all the correct event values. So apparently what EEGlab and FT see as the line with the event values ('STATUS') is not where they really are in these particular data. I guess what I could do is read the data with EEGlab forcing the event type to be the 73 channel and then export it to FT later on, but I was wondering whether the solution to the problem is much easier than that. Thanks a lot, Vitoria From a.maye at uke.de Wed Jan 21 09:09:32 2015 From: a.maye at uke.de (Alexander Maye) Date: Wed, 21 Jan 2015 09:09:32 +0100 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <54BF073E.40808@gmail.com> References: <54BF073E.40808@gmail.com> Message-ID: <10381509.nCaZsCYVui@mars.neurophys.uke.uni-hamburg.de> Hi Vitoria, with this minimal description it's hard to say what the problem is, but these are the things that come to my mind: - Did you setup/modify a config file for the ftbuffer, and did you start the buffer with this config? - Sometimes the higher bits of the parallel port are set, giving you event values >60.000. Maybe you could mask out the bits that you are interested in? Another possibility is that ftbuffer's event values are in two's-complement format. In any case you could check the output of the ftbuffer program - if your events aren't there, your program will not see them either. - Transition from some value to zero are not detected as events as it seems. Hope this helps, ALEX. -------------- next part -------------- -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From yoniilevy at gmail.com Thu Jan 22 07:54:07 2015 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 22 Jan 2015 08:54:07 +0200 Subject: [FieldTrip] Statistics: comparing conditions with different sample size Message-ID: Is there a way in FT to deal with the statistical comparison of conditions with different sample size (for instance N = 500 vs N = 100)? Thanks for any input Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Jan 22 09:05:20 2015 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 22 Jan 2015 09:05:20 +0100 Subject: [FieldTrip] Statistics: comparing conditions with different sample size In-Reply-To: References: Message-ID: Dear Yoni, do you mean different *group* sizes (as in 500 patients vs. 100 controls)? Then use the stat fun indepsamplesT. If you mean 500 trials vs 100 trials within one subject, you can again use the indepsamplesT-function, but beware! The number of trials can severely influence your signal. I personally strongly suggest using the same number of trials and subjects. Best, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 22.01.2015 um 07:54 schrieb Yoni Levy: > Is there a way in FT to deal with the statistical comparison of conditions with different sample size (for instance N = 500 vs N = 100)? > > Thanks for any input > Yoni > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From r.braukmann at donders.ru.nl Thu Jan 22 12:09:45 2015 From: r.braukmann at donders.ru.nl (Ricarda Braukmann) Date: Thu, 22 Jan 2015 12:09:45 +0100 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitoria, I had a problem with biosemi markers not being read in correctly by FT as well. First of all, if I remember correctly, using ft_read_event only worked for me with .bdf files (and not .edf files). Still even with the .bdf files, the numbers were not correct. This was caused by the fact that the biosemi system always sent out two markers to the EEG (one constant marker and one marker specific to stimulus presentation). FT for some reason did not recognize these markers as 2 (8bit) markers but created 1 16 bit marker from it. Once I knew this it was easily solved, I just recoded the markers. Not sure whether this is what is happening with your set-up as well (might be different with newer ft versions), but maybe it helps. In any case, I belief that the biosemi STATUS markers are indeed not strings. Best, Ricarda On Wednesday, January 21, 2015, Alexander Maye wrote: > Hi Vitoria, > > with this minimal description it's hard to say what the problem is, but > these > are the things that come to my mind: > - Did you setup/modify a config file for the ftbuffer, and did you start > the > buffer with this config? > - Sometimes the higher bits of the parallel port are set, giving you event > values >60.000. Maybe you could mask out the bits that you are interested > in? > Another possibility is that ftbuffer's event values are in two's-complement > format. In any case you could check the output of the ftbuffer program - if > your events aren't there, your program will not see them either. > - Transition from some value to zero are not detected as events as it > seems. > > Hope this helps, > > ALEX. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elmeri.syrjanen at gmail.com Thu Jan 22 13:13:03 2015 From: elmeri.syrjanen at gmail.com (=?UTF-8?Q?Elmeri_Syrj=C3=A4nen?=) Date: Thu, 22 Jan 2015 13:13:03 +0100 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> Message-ID: We have the same problem with reading the status correctly from Biosemi. Our experiment software (presentation) sends a zero as first trigger so a simple value(:) = value(:) - value(1); in the trial function will remove the offset from the triggers. /elmeri On Thu, Jan 22, 2015 at 12:09 PM, Ricarda Braukmann < r.braukmann at donders.ru.nl> wrote: > Hi Vitoria, > > I had a problem with biosemi markers not being read in correctly by FT as > well. > > First of all, if I remember correctly, using ft_read_event only worked for > me with .bdf files (and not .edf files). > Still even with the .bdf files, the numbers were not correct. > This was caused by the fact that the biosemi system always sent out two > markers to the EEG (one constant marker and one marker specific to stimulus > presentation). > FT for some reason did not recognize these markers as 2 (8bit) markers but > created 1 16 bit marker from it. > > Once I knew this it was easily solved, I just recoded the markers. > Not sure whether this is what is happening with your set-up as well (might > be different with newer ft versions), but maybe it helps. > > In any case, I belief that the biosemi STATUS markers are indeed not > strings. > > Best, > Ricarda > > > On Wednesday, January 21, 2015, Alexander Maye wrote: > >> Hi Vitoria, >> >> with this minimal description it's hard to say what the problem is, but >> these >> are the things that come to my mind: >> - Did you setup/modify a config file for the ftbuffer, and did you start >> the >> buffer with this config? >> - Sometimes the higher bits of the parallel port are set, giving you event >> values >60.000. Maybe you could mask out the bits that you are interested >> in? >> Another possibility is that ftbuffer's event values are in >> two's-complement >> format. In any case you could check the output of the ftbuffer program - >> if >> your events aren't there, your program will not see them either. >> - Transition from some value to zero are not detected as events as it >> seems. >> >> Hope this helps, >> >> ALEX. >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Thu Jan 22 13:26:00 2015 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 22 Jan 2015 14:26:00 +0200 Subject: [FieldTrip] Statistics: comparing conditions with different sample size Message-ID: Hi Julian I indeed meant comparing within subject conditions, one with many more trials than the other (e.g. 500 vs 100 trials). I am aware that this difference would bias my result, the question is whether there might be a way to bypass such bias, without the conservative solution of equating the trial number in both conditions (i.e. removing 400 trials from condition1, and thereby comparing 100 vs 100). One possible solution that was suggested was to proceed with an indepT test, and then proceeding with an "spm_t2z" transformation ; yet, I wonder whether this is also valid for such large difference between sample sizes. Thanks Yoni On Thu, Jan 22, 2015 at 1:00 PM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Statistics: comparing conditions with different sample size > (Yoni Levy) > 2. Re: Statistics: comparing conditions with different sample > size (Julian Keil) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 22 Jan 2015 08:54:07 +0200 > From: Yoni Levy > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Statistics: comparing conditions with different > sample size > Message-ID: > QiybRRQvQ-QfTRpWgj0it4oPLr8BnkSHLA at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Is there a way in FT to deal with the statistical comparison of conditions > with different sample size (for instance N = 500 vs N = 100)? > > Thanks for any input > Yoni > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150122/3714595f/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Thu, 22 Jan 2015 09:05:20 +0100 > From: Julian Keil > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Statistics: comparing conditions with > different sample size > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Dear Yoni, > > do you mean different *group* sizes (as in 500 patients vs. 100 controls)? > Then use the stat fun indepsamplesT. > If you mean 500 trials vs 100 trials within one subject, you can again use > the indepsamplesT-function, but beware! The number of trials can severely > influence your signal. > I personally strongly suggest using the same number of trials and subjects. > > Best, > > Julian > > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universit?tsklinik > der Charit? im St. Hedwig-Krankenhaus > Gro?e Hamburger Stra?e 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 22.01.2015 um 07:54 schrieb Yoni Levy: > > > Is there a way in FT to deal with the statistical comparison of > conditions with different sample size (for instance N = 500 vs N = 100)? > > > > Thanks for any input > > Yoni > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150122/a11451c9/attachment-0001.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: signature.asc > Type: application/pgp-signature > Size: 495 bytes > Desc: Message signed with OpenPGP using GPGMail > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150122/a11451c9/attachment-0001.pgp > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 50, Issue 15 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jevtic at ucl.ac.uk Thu Jan 22 16:52:14 2015 From: t.jevtic at ucl.ac.uk (Jevtic, Tijana) Date: Thu, 22 Jan 2015 15:52:14 +0000 Subject: [FieldTrip] TMSi data streaming Message-ID: <1421941934832.82105@ucl.ac.uk> Dear all, I'm quite new to Matlab software and I just got the TMSi porti7 equipment to use from now onwards. I came across fieldtrip as a tool for data streaming but when I follow the protocol provided by the TMSi suppliers, I have errors. Can I ask any one of you to share basic code for acquiring and storing the data with unmentioned equipment, please? Many thanks in advance. Tijana ------------------ Tijana Jevtic, BSc, MSc, MIEEE PhD student, Research Assistant Aspire Create - Centre for Rehabilitation Engineering and Assistive Technology Institute of Orthopaedics and Musculoskeletal Science, University College London, Royal National Orthopaedic Hospital, Stanmore, HA7 4LP United Kingdom t.jevtic at ucl.ac.uk Tel: +44 (0) 7513 691217 http://www.ucl.ac.uk/aspire-create -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.vandenieuwenhuijzen at donders.ru.nl Thu Jan 22 17:50:26 2015 From: m.vandenieuwenhuijzen at donders.ru.nl (Nieuwenhuijzen, M.E. van de (Marieke)) Date: Thu, 22 Jan 2015 16:50:26 +0000 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata Message-ID: Hi Fieldtrippers, I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Fri Jan 23 01:32:16 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Thu, 22 Jan 2015 16:32:16 -0800 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> Message-ID: <54C19690.9070304@gmail.com> Hi Ricarda, Alex, Elmeri et al. Thanks. The files I'm trying to read are .bdf. Ricarda, could you please clarify "I just recoded the markers."? Did you edit the .bdf file with a text editor? In a previous dataset I acquired with Biosemi (in combination with Presentation), with eventtype 'STATUS', I get the right event values in the right number (that is, I send 10 times marker '1', ft_definetrial finds 10 times marker '1'). With this new Biosemi dataset (programmed by someone else in E-prime, it's not my data): cfg=[]; cfg.dataset = dataset; cfg.trialdef.eventtype = 'STATUS'; cfg.trialdef.eventvalue = '?'; ft_definetrial returns markers that were not sent, and doesn't return markers that were sent. (The same occurs if I read the data in EEGlab by the way). It doesn't look like there's a linear transformation between what was sent and what FT finds. For example, markers sent were 1:21; FT returns [3:23 29:31], but I'll definitely look into the suggestion that maybe 1:21 was sent but for some reason recorded as 3:23 and the 29:31 are coming from somewhere else. Thanks a lot! Vitoria From harding at cbs.mpg.de Fri Jan 23 14:39:37 2015 From: harding at cbs.mpg.de (Eleanor Harding) Date: Fri, 23 Jan 2015 14:39:37 +0100 (CET) Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: Message-ID: <1608329006.4466.1422020377153.JavaMail.root@zimbra> Hi Marieke, A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. Good luck, Ellie Harding Message: 5 Date: Thu, 22 Jan 2015 16:50:26 +0000 From: "Nieuwenhuijzen, M.E. van de (Marieke)" To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi Fieldtrippers, I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstraße 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding From r.thomas at nin.knaw.nl Fri Jan 23 15:37:49 2015 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Fri, 23 Jan 2015 14:37:49 +0000 Subject: [FieldTrip] Electrode file *.bvef format Message-ID: <84b76474c6904886b156cbf02e040e76@EXNHI02.herseninstituut.knaw.nl> ?Dear FieldTrippers, Does FT read *.bvef (Brainproducts) electrode location files? Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 23 17:56:20 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 23 Jan 2015 16:56:20 +0000 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: <1608329006.4466.1422020377153.JavaMail.root@zimbra> References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> Message-ID: Marieke, Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. JM On Jan 23, 2015, at 2:39 PM, Eleanor Harding wrote: > Hi Marieke, > > A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, > > Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. > > Good luck, > Ellie Harding > > > > Message: 5 > Date: Thu, 22 Jan 2015 16:50:26 +0000 > From: "Nieuwenhuijzen, M.E. van de (Marieke)" > > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Low-pass frequency when downsampling using > ft_resampledata > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi Fieldtrippers, > > I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? > > Best, > Marieke > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > > -- > ------------------------------------------------------------------ > Eleanor Harding > PhD Student > Max Planck Institute for Human Cognitive and Brain Sciences > Stephanstraße 1A, 04103 Leipzig, Germany > Phone: +49 341 9940-2268 > Fax: +49 341 9940 2260 > http://www.cbs.mpg.de/~harding > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Fri Jan 23 18:09:48 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 23 Jan 2015 17:09:48 +0000 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <54C19690.9070304@gmail.com> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <54C19690.9070304@gmail.com> Message-ID: <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> Hi V., > With this new Biosemi dataset (programmed by someone else in E-prime, it's not my data): Have you consulted with this ‘someone else’? From the looks of it, it doesn’t seem a FieldTrip issue per se. Best, JM > cfg=[]; > cfg.dataset = dataset; > cfg.trialdef.eventtype = 'STATUS'; > cfg.trialdef.eventvalue = '?'; > ft_definetrial returns markers that were not sent, and doesn't return markers that were sent. (The same occurs if I read the data in EEGlab by the way). > It doesn't look like there's a linear transformation between what was sent and what FT finds. For example, markers sent were 1:21; FT returns [3:23 29:31], but I'll definitely look into the suggestion that maybe 1:21 was sent but for some reason recorded as 3:23 and the 29:31 are coming from somewhere else. > > Thanks a lot! > Vitoria > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.braukmann at donders.ru.nl Fri Jan 23 18:14:31 2015 From: r.braukmann at donders.ru.nl (Ricarda Braukmann) Date: Fri, 23 Jan 2015 18:14:31 +0100 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <8a3cfe0d5138437498552cae9f944035@EXPRD01.hosting.ru.nl> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <8a3cfe0d5138437498552cae9f944035@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitoria, Im not sure this will help you but I still wanted to come back to the recoding that worked for me (and sorry for being so vague on it in my first email) So, I recoded it in Matlab. I first find the events in the bdf datafile and then redefine them using a small script I made myself (I am convinced there is an easier way but this worked for me and I had limited time and mainly wanted to have a quick look at the data): event = ft_read_event(bdfdataset); %redfine the events: event = EEGSynch_FFT_trialfun_BioSemiMarkerRedefine(event); I attached my redefine function if you want to have a look. In my case the first of the two markers should always be 255 which the script checks, but this might be different in your case. Let me know if anything is unclear still. Best, Ricarda On Fri, Jan 23, 2015 at 1:32 AM, Vitoria Piai wrote: > Hi Ricarda, Alex, Elmeri et al. > > Thanks. The files I'm trying to read are .bdf. > Ricarda, could you please clarify "I just recoded the markers."? Did you > edit the .bdf file with a text editor? > > In a previous dataset I acquired with Biosemi (in combination with > Presentation), with eventtype 'STATUS', I get the right event values in > the right number (that is, I send 10 times marker '1', ft_definetrial > finds 10 times marker '1'). > With this new Biosemi dataset (programmed by someone else in E-prime, > it's not my data): > cfg=[]; > cfg.dataset = dataset; > cfg.trialdef.eventtype = 'STATUS'; > cfg.trialdef.eventvalue = '?'; > ft_definetrial returns markers that were not sent, and doesn't return > markers that were sent. (The same occurs if I read the data in EEGlab by > the way). > It doesn't look like there's a linear transformation between what was > sent and what FT finds. For example, markers sent were 1:21; FT returns > [3:23 29:31], but I'll definitely look into the suggestion that maybe > 1:21 was sent but for some reason recorded as 3:23 and the 29:31 are > coming from somewhere else. > > Thanks a lot! > Vitoria > > -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bi2de.m Type: text/x-csrc Size: 4022 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: de2bi.m Type: text/x-csrc Size: 6173 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: EEGSynch_FFT_trialfun_BioSemiMarkerRedefine.m Type: text/x-csrc Size: 799 bytes Desc: not available URL: From v.piai.research at gmail.com Fri Jan 23 20:54:42 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Fri, 23 Jan 2015 11:54:42 -0800 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <54C19690.9070304@gmail.com> <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> Message-ID: <54C2A702.30800@gmail.com> Thanks, Ricarda and JM! JM, I know for sure it's not a FT problem :) I checked the E-prime scripts used and all the markers were sent (according to the E-prime code). What I'm trying to figure out is what kind of conversion was applied between E-prime and Biosemi so I can work backwards and still detect my events. It doesn't seem to be a linear transformation between what E-prime sent and Biosemi coded... Anyways, thanks a lot for your thoughts! Vitoria On 1/23/2015 9:09 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > Hi V., > >> With this new Biosemi dataset (programmed by someone else in E-prime, it's not my data): > Have you consulted with this ‘someone else’? From the looks of it, it doesn’t seem a FieldTrip issue per se. > > > Best, > JM > > > > >> cfg=[]; >> cfg.dataset = dataset; >> cfg.trialdef.eventtype = 'STATUS'; >> cfg.trialdef.eventvalue = '?'; >> ft_definetrial returns markers that were not sent, and doesn't return markers that were sent. (The same occurs if I read the data in EEGlab by the way). >> It doesn't look like there's a linear transformation between what was sent and what FT finds. For example, markers sent were 1:21; FT returns [3:23 29:31], but I'll definitely look into the suggestion that maybe 1:21 was sent but for some reason recorded as 3:23 and the 29:31 are coming from somewhere else. >> >> Thanks a lot! >> Vitoria >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From v.piai.research at gmail.com Mon Jan 26 04:29:48 2015 From: v.piai.research at gmail.com (=?windows-1252?Q?Vit=F3ria_Piai?=) Date: Sun, 25 Jan 2015 19:29:48 -0800 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <54C2A702.30800@gmail.com> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <54C19690.9070304@gmail.com> <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> <54C2A702.30800@gmail.com> Message-ID: <54C5B4AC.1080109@gmail.com> Hi all, I managed to gather more information regarding this issue and I thought I'd post the resolution here just in case someone bumps into the same problem in the future. The issue is indeed caused by not having set E-prime to work correctly with Biosemi. I use Presentation, and that goes flawlessly with Biosemi. But these data were acquired by someone else in E-prime. The reply from Biosemi's CEO below may be helpful in case you use E-prime. Thanks for all the thoughts, Vitoria >>>>>>>>>>>>>>>>>>>>>>>>>> First rule of triggering from E-Prime to ActiveTwo is that you must reset the port to zero after each non-zero code. Hold values high on the port for 10 msec or so and return to zero after and you will not see any of the problems you describe. E-Prime will not do this automatically (though it would seem logical for the software to do it) -- you must write a zero to the port after each code. Random codes occur when you do not follow the above rule if you have told ActiView to decimate EEG and triggersamples by some fraction other than 1 (e.g. 1/4th). By doing this you leave it to ActiView what value to assign to the trigger channel at samples bordering the intersection between two non-zero values. ActiView performs a logical AND between trigger bits in the high state on samples to be combined. So, if you had a 1 followed by a 2 with no zero in between and you decimate by 1/4 you will end up with 1 - 3 - 2. 3 is the logical AND of 1 and 2 in binary. ActiveTwo has a 16 bit trigger port. Your triggers are all on bits 0-7, probably because you are using a standard parallel port with only 8 bits. The value on the upper half of the Trig1-8 field is the value at the rising edge of the trigger and the value on the lower half of the Trig1-8 field is the value at the falling edge. This should be zero if you are resetting the port correctly. >>>>>>>>>>>>>>>>>>>> On 1/23/2015 11:54 AM, Vitoria Piai wrote: > Thanks, Ricarda and JM! > JM, I know for sure it's not a FT problem :) > > I checked the E-prime scripts used and all the markers were sent > (according to the E-prime code). What I'm trying to figure out is what > kind of conversion was applied between E-prime and Biosemi so I can > work backwards and still detect my events. It doesn't seem to be a > linear transformation between what E-prime sent and Biosemi coded... > Anyways, thanks a lot for your thoughts! > Vitoria > > On 1/23/2015 9:09 AM, Schoffelen, J.M. (Jan Mathijs) wrote: >> Hi V., >> >>> With this new Biosemi dataset (programmed by someone else in >>> E-prime, it's not my data): >> Have you consulted with this ‘someone else’? From the looks of it, it >> doesn’t seem a FieldTrip issue per se. >> >> >> Best, >> JM >> >> >> >> >>> cfg=[]; >>> cfg.dataset = dataset; >>> cfg.trialdef.eventtype = 'STATUS'; >>> cfg.trialdef.eventvalue = '?'; >>> ft_definetrial returns markers that were not sent, and doesn't >>> return markers that were sent. (The same occurs if I read the data >>> in EEGlab by the way). >>> It doesn't look like there's a linear transformation between what >>> was sent and what FT finds. For example, markers sent were 1:21; FT >>> returns [3:23 29:31], but I'll definitely look into the suggestion >>> that maybe 1:21 was sent but for some reason recorded as 3:23 and >>> the 29:31 are coming from somewhere else. >>> >>> Thanks a lot! >>> Vitoria >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From brungio at gmail.com Mon Jan 26 16:05:17 2015 From: brungio at gmail.com (Bruno L. Giordano) Date: Mon, 26 Jan 2015 15:05:17 +0000 Subject: [FieldTrip] ft_denoise_pca and ft_preproc_dftfilter on long trials In-Reply-To: <54C5B4AC.1080109@gmail.com> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <54C19690.9070304@gmail.com> <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> <54C2A702.30800@gmail.com> <54C5B4AC.1080109@gmail.com> Message-ID: <54C657AD.2080603@gmail.com> Hello, I am using the pca/regression method in ft_denoise_pca to get rid of reference-channel variance for rather long trials (>5 min). I am wondering whether these regression methods break down, or don't perform as well as they should be, when trials are this long. If yes, is there some alternative method I could use that performs better for long trials? I am wondering about trial length also because the regression method for line-noise removal in ft_preproc_dftfilter doesn't appear to perform well with trials of this length (even though they obviously do wonders when I preprocess shorter segments). Thank you, Bruno ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bruno L. Giordano, PhD Institute of Neuroscience and Psychology 58 Hillhead Street, University of Glasgow Glasgow, G12 8QB, Scotland T +44 (0) 141 330 5484 Www: http://www.brunolgiordano.net Email charter: http://www.emailcharter.org/ From nico.weeger at googlemail.com Tue Jan 27 17:50:34 2015 From: nico.weeger at googlemail.com (Nico Weeger) Date: Tue, 27 Jan 2015 17:50:34 +0100 Subject: [FieldTrip] Simulate data to compare methods Message-ID: Hello FieldTrip community, I am new to FieldTrip and I try to simulate data to compare the ft_frequanalysis methods Hanning, Multitaper and Wavelet. Therefore I simulate Data manually using different latency, amplitude and frequency combinations using the following equation: sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); sig = sig1+sig2+sig3+sig4; where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; After using ft_frequanalysis (see the following cfgs) *Cfg Wavelet:* cfg = []; cfg.output = 'pow'; cfg.channel = labels; cfg.method = 'wavelet'; cfg.width = 7; cfg.gwidth = 3; cfg.foilim = [1 70]; cfg.toi = 0:0.05:2; TFRwave = ft_freqanalysis(cfg, data_preproc); *Cfg Hanning / Multitaper:* cfg = []; cfg.output = 'pow'; cfg.channel = labels; cfg.method = 'mtmconvol' cfg.foi = 1:1:70 cfg.tapsmofrq = 0.2*cfg.foi; cfg.taper = 'dpss' / ‘hanning’; cfg.t_ftimwin = 4./cfg.foi; cfg.toi = 0:0.05:2; TFRmult1 = ft_freqanalysis(cfg, data_preproc); the data is plotted with ft_singleplotTFR (see cfg below) *cfg singleplot:* cfg = []; cfg.maskstyle = 'saturation'; cfg.colorbar = 'yes'; cfg.layout = 'AC_Osc.lay'; ft_singleplotTFR(cfg, TFRwave); Two problems occur. First, the power scale of wavelet and Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). 1. How can I get the scale of all methods equal, or do I have to change the Wavelet settings to get the right scale of the values? Second, the best result of Multitaper analysis is performed using only one Taper. The goal was to get a result, where the advantages and disadvantages of Multitaper analysis compared to the other methods can be seen. 2. How can I change the simulation so that more tapers show better results than a single taper does? Thank you for your time and help. Regards, Nicolas Weeger Student of Master-Program Appied Research, University Ansbach, Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Tue Jan 27 18:36:15 2015 From: mcantor at umich.edu (Max Cantor) Date: Tue, 27 Jan 2015 12:36:15 -0500 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: Hi Nico, I'm not sure about the second question, but as for the first question, you can manually set the scales for ft_singleplotTFR using cfg.zlim. Hope that helps, Max On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger wrote: > Hello FieldTrip community, > > > > I am new to FieldTrip and I try to simulate data to compare the > ft_frequanalysis methods Hanning, Multitaper and Wavelet. > > Therefore I simulate Data manually using different latency, amplitude and > frequency combinations using the following equation: > > sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > > sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > > sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > > sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > > sig = sig1+sig2+sig3+sig4; > > where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > > > After using ft_frequanalysis (see the following cfgs) > > > *Cfg Wavelet:* > > cfg = []; > > cfg.output = 'pow'; > > cfg.channel = labels; > > cfg.method = 'wavelet'; > > cfg.width = 7; > > cfg.gwidth = 3; > > cfg.foilim = [1 70]; > > cfg.toi = 0:0.05:2; > > TFRwave = ft_freqanalysis(cfg, data_preproc); > > > > *Cfg Hanning / Multitaper:* > > cfg = []; > > cfg.output = 'pow'; > > cfg.channel = labels; > > cfg.method = 'mtmconvol' > > cfg.foi = 1:1:70 > > cfg.tapsmofrq = 0.2*cfg.foi; > > cfg.taper = 'dpss' / ‘hanning’; > > cfg.t_ftimwin = 4./cfg.foi; > > cfg.toi = 0:0.05:2; > > TFRmult1 = ft_freqanalysis(cfg, data_preproc); > > > > > the data is plotted with ft_singleplotTFR (see cfg below) > > > *cfg singleplot:* > > cfg = []; > > cfg.maskstyle = 'saturation'; > > cfg.colorbar = 'yes'; > > cfg.layout = 'AC_Osc.lay'; > > ft_singleplotTFR(cfg, TFRwave); > > > Two problems occur. First, the power scale of wavelet and > Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). > > 1. How can I get the scale of all methods equal, or do I have to > change the Wavelet settings to get the right scale of the values? > > Second, the best result of Multitaper analysis is performed using only one > Taper. The goal was to get a result, where the advantages and disadvantages > of Multitaper analysis compared to the other methods can be seen. > > 2. How can I change the simulation so that more tapers show better > results than a single taper does? > > > Thank you for your time and help. > > > Regards, > > > > Nicolas Weeger > > Student of Master-Program Appied Research, > > University Ansbach, > > Germany > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From toomas.kirt at mail.ee Wed Jan 28 11:44:11 2015 From: toomas.kirt at mail.ee (Toomas Kirt) Date: Wed, 28 Jan 2015 12:44:11 +0200 Subject: [FieldTrip] 3rd Baltic-Nordic Summer School on Neuroinformatics (BNNI 2015) Message-ID: <1422441851.54c8bd7bdfae4@posti.mail.ee> An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Jan 28 12:24:25 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 28 Jan 2015 12:24:25 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: Hi Nico, As for question (2), you probably first need to think about what constitutes a "better" result. Using more tapers with dpss will always result in more frequency smoothing. If your source signal is primarily composed of pure sinusoids, and you interpret a spectrum as "better" if it shows clearer peaks, then you will always get the "best" result for the single-taper case. Multitapering allows optimal control over the amount of smoothing you obtain in the frequency domain, which is more or less independent of the amount of smoothing you obtain in the time domain (as opposed to e.g. wavelets, where these are fundamentally linked). When dealing with brain signals, you will often find that a certain stimulus might induce e.g. a gamma response at 40-50 Hz in one subject and one trial, while in another subject or another trial the same stimulus might induce a 50-60 Hz response or so. Of course, in the average over trials (and subjects), this heterogeneity (i.e., noise) will wash out, but it will severely damage your statistical sensitivity. Therefore, using multitapers to add smoothing can produce a much more consistent result and therefore be "better" in the sense of actually understanding the brain. As for your simulation, perhaps using filtered noise would be better than sinusoids. Also, since multitapering benefits you most strongly when taking variation over observations into account, you could consider simulating different observations, each consisting of noise filtered in a slightly different randomly chosen bandwidth, and inspecting the resulting variation over observations in the spectra. Best, Eelke On 27 January 2015 at 18:36, Max Cantor wrote: > Hi Nico, > > I'm not sure about the second question, but as for the first question, you > can manually set the scales for ft_singleplotTFR using cfg.zlim. > > Hope that helps, > > Max > > On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > wrote: >> >> Hello FieldTrip community, >> >> >> >> I am new to FieldTrip and I try to simulate data to compare the >> ft_frequanalysis methods Hanning, Multitaper and Wavelet. >> >> Therefore I simulate Data manually using different latency, amplitude and >> frequency combinations using the following equation: >> >> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); >> >> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); >> >> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); >> >> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); >> >> sig = sig1+sig2+sig3+sig4; >> >> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; >> >> >> After using ft_frequanalysis (see the following cfgs) >> >> >> Cfg Wavelet: >> >> cfg = []; >> >> cfg.output = 'pow'; >> >> cfg.channel = labels; >> >> cfg.method = 'wavelet'; >> >> cfg.width = 7; >> >> cfg.gwidth = 3; >> >> cfg.foilim = [1 70]; >> >> cfg.toi = 0:0.05:2; >> >> TFRwave = ft_freqanalysis(cfg, data_preproc); >> >> >> >> Cfg Hanning / Multitaper: >> >> cfg = []; >> >> cfg.output = 'pow'; >> >> cfg.channel = labels; >> >> cfg.method = 'mtmconvol' >> >> cfg.foi = 1:1:70 >> >> cfg.tapsmofrq = 0.2*cfg.foi; >> >> cfg.taper = 'dpss' / ‘hanning’; >> >> cfg.t_ftimwin = 4./cfg.foi; >> >> cfg.toi = 0:0.05:2; >> >> TFRmult1 = ft_freqanalysis(cfg, data_preproc); >> >> >> >> >> the data is plotted with ft_singleplotTFR (see cfg below) >> >> >> cfg singleplot: >> >> cfg = []; >> >> cfg.maskstyle = 'saturation'; >> >> cfg.colorbar = 'yes'; >> >> cfg.layout = 'AC_Osc.lay'; >> >> ft_singleplotTFR(cfg, TFRwave); >> >> >> Two problems occur. First, the power scale of wavelet and >> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). >> >> 1. How can I get the scale of all methods equal, or do I have to >> change the Wavelet settings to get the right scale of the values? >> >> Second, the best result of Multitaper analysis is performed using only one >> Taper. The goal was to get a result, where the advantages and disadvantages >> of Multitaper analysis compared to the other methods can be seen. >> >> 2. How can I change the simulation so that more tapers show better >> results than a single taper does? >> >> >> Thank you for your time and help. >> >> >> Regards, >> >> >> >> Nicolas Weeger >> >> Student of Master-Program Appied Research, >> >> University Ansbach, >> >> Germany >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan From t.jevtic at ucl.ac.uk Wed Jan 28 16:19:41 2015 From: t.jevtic at ucl.ac.uk (Jevtic, Tijana) Date: Wed, 28 Jan 2015 15:19:41 +0000 Subject: [FieldTrip] Compiling .cc files Message-ID: <1422458382579.81361@ucl.ac.uk> Hi everybody, Can I ask for anybody to point out how can I use bufferViewer.cc and tmsi2ft.cc aka, how can I compile/built etc them :) I looked through the email list and ft website but I can not find step by step explanation. I googled a lot but nothing seems to be working for me so far... Thank you very much in advance.? Best Wishes, Tijana ------------------ Tijana Jevtic, BSc, MSc, MIEEE PhD student, Research Assistant Aspire Create - Centre for Rehabilitation Engineering and Assistive Technology Institute of Orthopaedics and Musculoskeletal Science, University College London, Royal National Orthopaedic Hospital, Stanmore, HA7 4LP United Kingdom t.jevtic at ucl.ac.uk Tel: +44 (0) 7513 691217 http://www.ucl.ac.uk/aspire-create -------------- next part -------------- An HTML attachment was scrubbed... URL: From payashi.garry at seh.ox.ac.uk Wed Jan 28 16:32:51 2015 From: payashi.garry at seh.ox.ac.uk (Payashi Garry) Date: Wed, 28 Jan 2015 15:32:51 +0000 Subject: [FieldTrip] help with topoplot_TFR Message-ID: <522FFFC2-BC59-4995-8873-F2090932707A@ndcn.ox.ac.uk> Dear Fieldtrip community, My name is Payashi Garry and I am working in the Nuffield Department of Clinical Neurosciences in the University of Oxford. I am analysing some continuous EEG data that we have measured from our Neuro-Intensive Care unit patients. We are interested in using quantitative EEG measures to assess whether these can be used to detect cerebral ischaemia. I have performed time frequency analysis using ft_freqanalysis. I have then been usig ft_topoplotTFR to visualise the results with no problems. However, one of the parameters we are investigating is the change in alpha/delta ratio. I was wondering if it would be possible to create topographic maps of the alpha/delta ratio for a particular time period (i.e. alpha power/delta power) using ft_topoplotTFR? At the moment I am generating topographic maps for alpha and delta power using the following commands: cfg=[]; cfg.baselinetype = 'absolute'; cfg.xlim = [10 2500]; cfg.ylim = [1 4]; cfg.zlim = [0 100]; cfg.colorbar = 'yes'; figure ft_topoplotTFR(cfg, freq_continuous) title('delta power prenitrite', 'FontSize', 36, 'FontName', 'Arial') with freq_continuous being my time/frequency/channel data. I would be very grateful for any advice on this, and would be happy to supply more information if needed. Many thanks Best wishes Payashi **** Dr Payashi Garry MB BChir FRCA Specialty Registrar in Anaesthetics and BRC Research Fellow Nuffield Department of Clinical Neurosciences John Radcliffe Hospital Oxford OX3 9DU Tel: 01865 572878 From tzvetan.popov at uni-konstanz.de Wed Jan 28 17:20:29 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Wed, 28 Jan 2015 17:20:29 +0100 Subject: [FieldTrip] help with topoplot_TFR In-Reply-To: <522FFFC2-BC59-4995-8873-F2090932707A@ndcn.ox.ac.uk> References: <522FFFC2-BC59-4995-8873-F2090932707A@ndcn.ox.ac.uk> Message-ID: Dear Payashi, you could compute the ratio per sample point and write it for example in ratiodata.avg= ratio. Where ratio is a chan_time matrix. Then you could type ratiodata.label = freq_continuous.label; ratiodata.dimord = ‘chan_time’. Next, you can use ft_multiplotER which handles time domain data where cfg.xlim is the option you need in order to plot the ratio topography for a particular time point. Is this what you need? good luck tzvetan > Dear Fieldtrip community, > > My name is Payashi Garry and I am working in the Nuffield Department of Clinical Neurosciences in the University of Oxford. I am analysing some continuous EEG data that we have measured from our Neuro-Intensive Care unit patients. We are interested in using quantitative EEG measures to assess whether these can be used to detect cerebral ischaemia. > > I have performed time frequency analysis using ft_freqanalysis. I have then been usig ft_topoplotTFR to visualise the results with no problems. However, one of the parameters we are investigating is the change in alpha/delta ratio. I was wondering if it would be possible to create topographic maps of the alpha/delta ratio for a particular time period (i.e. alpha power/delta power) using ft_topoplotTFR? > > At the moment I am generating topographic maps for alpha and delta power using the following commands: > > cfg=[]; > cfg.baselinetype = 'absolute'; > cfg.xlim = [10 2500]; > cfg.ylim = [1 4]; > cfg.zlim = [0 100]; > cfg.colorbar = 'yes'; > figure > ft_topoplotTFR(cfg, freq_continuous) > title('delta power prenitrite', 'FontSize', 36, 'FontName', 'Arial') > > with freq_continuous being my time/frequency/channel data. > > I would be very grateful for any advice on this, and would be happy to supply more information if needed. > > Many thanks > Best wishes > Payashi > > **** > Dr Payashi Garry MB BChir FRCA > Specialty Registrar in Anaesthetics and BRC Research Fellow > Nuffield Department of Clinical Neurosciences > John Radcliffe Hospital > Oxford OX3 9DU > Tel: 01865 572878 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jens.klinzing at uni-tuebingen.de Thu Jan 29 13:16:07 2015 From: jens.klinzing at uni-tuebingen.de (=?windows-1252?Q?=22Jens_Klinzing=2C_Universit=E4t_T=FCbingen?= =?windows-1252?Q?=22?=) Date: Thu, 29 Jan 2015 13:16:07 +0100 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> Message-ID: <54CA2487.9030108@uni-tuebingen.de> Hi Marieke, I had the impression that you are interested in the automatic low-pass filtering performed by ft_resampledata. If you don't specify cfg.resamplemethod = 'downsample', ft_resampledata will call the built-in matlab function 'resample' to do the job. This function automatically applies a low-pass filter before resampling. mathworks.com/help/signal/ref/resample.html "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." I couldn't find an explicit statement what the cutoff frequency of that filter would be, though. There are some forum entries on the web, but they don't give the answer either. Can someone help? All the best, Jens Am 23.01.2015 um 17:56 schrieb Schoffelen, J.M. (Jan Mathijs): > Marieke, > Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. > > JM > > > On Jan 23, 2015, at 2:39 PM, Eleanor Harding wrote: > >> Hi Marieke, >> >> A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, >> >> Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. >> >> Good luck, >> Ellie Harding >> >> >> >> Message: 5 >> Date: Thu, 22 Jan 2015 16:50:26 +0000 >> From: "Nieuwenhuijzen, M.E. van de (Marieke)" >> >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] Low-pass frequency when downsampling using >> ft_resampledata >> Message-ID: >> >> Content-Type: text/plain; charset="iso-8859-1" >> >> Hi Fieldtrippers, >> >> I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? >> >> Best, >> Marieke >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: >> >> >> -- >> ------------------------------------------------------------------ >> Eleanor Harding >> PhD Student >> Max Planck Institute for Human Cognitive and Brain Sciences >> Stephanstraße 1A, 04103 Leipzig, Germany >> Phone: +49 341 9940-2268 >> Fax: +49 341 9940 2260 >> http://www.cbs.mpg.de/~harding >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From bioeng.yoosofzadeh at gmail.com Thu Jan 29 15:31:47 2015 From: bioeng.yoosofzadeh at gmail.com (Vahab Yousofzadeh) Date: Thu, 29 Jan 2015 14:31:47 +0000 Subject: [FieldTrip] PhD studentships related to MEG research at university of Ulster Message-ID: Dear All, On behalf of the University of Ulster’s Intelligent Systems Research Centre, I am helping to announce the following available PhD studentships related to MEG research: *http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=821&ri=3 * *http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=780&ri=3 * *http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=822&ri=3 * Please note that the application deadline is on the 27th Feb, and anyone interested should apply at http://www.compeng.ulster.ac.uk/rgs/guideForApplicants.php Best Regards, Vahab Youssofzadeh -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Butz at uni-duesseldorf.de Thu Jan 29 15:52:29 2015 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Thu, 29 Jan 2015 15:52:29 +0100 Subject: [FieldTrip] PhD studentships related to MEG research at university of Ulster In-Reply-To: References: Message-ID: <7350b030a1772.54ca573d@uni-duesseldorf.de> Dear Vahab just saw your job add and thought you might also be interested in advertising this over the mailing list of www.megcommunity.org(http://www.megcommunity.org). This is a non-commercial website run by MEG researchers from different labs and countries. You can reach a couple of hundred of MEG researchers worldwide via our mailing list by now. Hope this helps and best wishes Markus PS: All the best for your MEG research and starting up the new MEG centre! Am 29.01.15 15:42 schrieb Vahab Yousofzadeh : > > > > > Dear All, > > > > On behalf of the University of Ulster’s Intelligent Systems Research Centre, I am helping to announce the following available PhD studentships related to MEG research: > > > > http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=821&ri=3 > > http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=780&ri=3 > > http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=822&ri=3 > > > > Please note that the application deadline is on the 27th Feb, and anyone interested should apply at > > http://www.compeng.ulster.ac.uk/rgs/guideForApplicants.php > > > > Best Regards, > > Vahab Youssofzadeh > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From widmann at uni-leipzig.de Thu Jan 29 17:19:47 2015 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Thu, 29 Jan 2015 17:19:47 +0100 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: <54CA2487.9030108@uni-tuebingen.de> References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> <54CA2487.9030108@uni-tuebingen.de> Message-ID: <3D8E568A-7E77-437C-93BA-03CA0639CE44@uni-leipzig.de> Dear Marieke and Jens, MATLAB resample sets the -6dB half-amplitude cutoff of the anti-aliasing filter to the new Nyquist frequency. This is quite common practice, however, for EEG/MEG data this is not recommended, as the remaining energy in the transition band above the cutoff/new Nyquist frequency can still introduce considerable aliasing artifacts. So indeed the current Fieldtrip implementation is problematic. In the attached Fig. 1 a frequency response plot as it would be applied when downsampling from 500 to 250 Hz. Even worse is that resample (and Fieldtrip) does not apply any padding of the signal before filtering (doc resample: "In its filtering process, resample assumes that the input sequence, x, is zero before and after the samples it is given. Thus, large deviations from zero at the endpoints of x can cause inaccuracies in y at its endpoints.“). This will introduce DC artifacts at the beginning and end of the data. In particular for epoched data this can result in quite massive distortions (see Fig. 2 in the attachment; filtered and downsampled series of ones; same filter as above; same problem as it was formerly observed in EEGLAB: https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=1017). I suggest submitting a bug report (please put me into cc). I think I can fix both problems but this will take some days. I would recommend not using the current implementation. Best, Andreas > Am 29.01.2015 um 13:16 schrieb Jens Klinzing, Universität Tübingen : > > Hi Marieke, > I had the impression that you are interested in the automatic low-pass filtering performed by ft_resampledata. > > If you don't specify cfg.resamplemethod = 'downsample', ft_resampledata will call the built-in matlab function 'resample' to do the job. This function automatically applies a low-pass filter before resampling. > > mathworks.com/help/signal/ref/resample.html > > "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." > > I couldn't find an explicit statement what the cutoff frequency of that filter would be, though. There are some forum entries on the web, but they don't give the answer either. > > Can someone help? > > All the best, > Jens > > Am 23.01.2015 um 17:56 schrieb Schoffelen, J.M. (Jan Mathijs): >> Marieke, >> Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. >> >> JM >> >> >> On Jan 23, 2015, at 2:39 PM, Eleanor Harding wrote: >> >>> Hi Marieke, >>> >>> A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, >>> >>> Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. >>> >>> Good luck, >>> Ellie Harding >>> >>> >>> >>> Message: 5 >>> Date: Thu, 22 Jan 2015 16:50:26 +0000 >>> From: "Nieuwenhuijzen, M.E. van de (Marieke)" >>> >>> To: "fieldtrip at science.ru.nl" >>> Subject: [FieldTrip] Low-pass frequency when downsampling using >>> ft_resampledata >>> Message-ID: >>> >>> Content-Type: text/plain; charset="iso-8859-1" >>> >>> Hi Fieldtrippers, >>> >>> I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? >>> >>> Best, >>> Marieke >>> -------------- next part -------------- >>> An HTML attachment was scrubbed... >>> URL: >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Eleanor Harding >>> PhD Student >>> Max Planck Institute for Human Cognitive and Brain Sciences >>> Stephanstraße 1A, 04103 Leipzig, Germany >>> Phone: +49 341 9940-2268 >>> Fax: +49 341 9940 2260 >>> http://www.cbs.mpg.de/~harding >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fig1_fresp.jpg Type: image/jpeg Size: 35336 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fig2_dcartifact.jpg Type: image/jpeg Size: 13995 bytes Desc: not available URL: From nico.weeger at googlemail.com Thu Jan 29 17:43:04 2015 From: nico.weeger at googlemail.com (Nico Weeger) Date: Thu, 29 Jan 2015 17:43:04 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: Hi Eelke, thank you very much for ur advice! Due to ur help I solved the problem using multiple trials and different frequencies. Thanks a lot! Best regards Nico 2015-01-28 12:24 GMT+01:00 Eelke Spaak : > Hi Nico, > > As for question (2), you probably first need to think about what > constitutes a "better" result. Using more tapers with dpss will always > result in more frequency smoothing. If your source signal is primarily > composed of pure sinusoids, and you interpret a spectrum as "better" > if it shows clearer peaks, then you will always get the "best" result > for the single-taper case. > > Multitapering allows optimal control over the amount of smoothing you > obtain in the frequency domain, which is more or less independent of > the amount of smoothing you obtain in the time domain (as opposed to > e.g. wavelets, where these are fundamentally linked). When dealing > with brain signals, you will often find that a certain stimulus might > induce e.g. a gamma response at 40-50 Hz in one subject and one trial, > while in another subject or another trial the same stimulus might > induce a 50-60 Hz response or so. Of course, in the average over > trials (and subjects), this heterogeneity (i.e., noise) will wash out, > but it will severely damage your statistical sensitivity. Therefore, > using multitapers to add smoothing can produce a much more consistent > result and therefore be "better" in the sense of actually > understanding the brain. > > As for your simulation, perhaps using filtered noise would be better > than sinusoids. Also, since multitapering benefits you most strongly > when taking variation over observations into account, you could > consider simulating different observations, each consisting of noise > filtered in a slightly different randomly chosen bandwidth, and > inspecting the resulting variation over observations in the spectra. > > Best, > Eelke > > On 27 January 2015 at 18:36, Max Cantor wrote: > > Hi Nico, > > > > I'm not sure about the second question, but as for the first question, > you > > can manually set the scales for ft_singleplotTFR using cfg.zlim. > > > > Hope that helps, > > > > Max > > > > On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger < > nico.weeger at googlemail.com> > > wrote: > >> > >> Hello FieldTrip community, > >> > >> > >> > >> I am new to FieldTrip and I try to simulate data to compare the > >> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > >> > >> Therefore I simulate Data manually using different latency, amplitude > and > >> frequency combinations using the following equation: > >> > >> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > >> > >> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > >> > >> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > >> > >> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > >> > >> sig = sig1+sig2+sig3+sig4; > >> > >> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > >> > >> > >> After using ft_frequanalysis (see the following cfgs) > >> > >> > >> Cfg Wavelet: > >> > >> cfg = []; > >> > >> cfg.output = 'pow'; > >> > >> cfg.channel = labels; > >> > >> cfg.method = 'wavelet'; > >> > >> cfg.width = 7; > >> > >> cfg.gwidth = 3; > >> > >> cfg.foilim = [1 70]; > >> > >> cfg.toi = 0:0.05:2; > >> > >> TFRwave = ft_freqanalysis(cfg, data_preproc); > >> > >> > >> > >> Cfg Hanning / Multitaper: > >> > >> cfg = []; > >> > >> cfg.output = 'pow'; > >> > >> cfg.channel = labels; > >> > >> cfg.method = 'mtmconvol' > >> > >> cfg.foi = 1:1:70 > >> > >> cfg.tapsmofrq = 0.2*cfg.foi; > >> > >> cfg.taper = 'dpss' / ‘hanning’; > >> > >> cfg.t_ftimwin = 4./cfg.foi; > >> > >> cfg.toi = 0:0.05:2; > >> > >> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > >> > >> > >> > >> > >> the data is plotted with ft_singleplotTFR (see cfg below) > >> > >> > >> cfg singleplot: > >> > >> cfg = []; > >> > >> cfg.maskstyle = 'saturation'; > >> > >> cfg.colorbar = 'yes'; > >> > >> cfg.layout = 'AC_Osc.lay'; > >> > >> ft_singleplotTFR(cfg, TFRwave); > >> > >> > >> Two problems occur. First, the power scale of wavelet and > >> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet > 0-~15*10^4). > >> > >> 1. How can I get the scale of all methods equal, or do I have to > >> change the Wavelet settings to get the right scale of the values? > >> > >> Second, the best result of Multitaper analysis is performed using only > one > >> Taper. The goal was to get a result, where the advantages and > disadvantages > >> of Multitaper analysis compared to the other methods can be seen. > >> > >> 2. How can I change the simulation so that more tapers show better > >> results than a single taper does? > >> > >> > >> Thank you for your time and help. > >> > >> > >> Regards, > >> > >> > >> > >> Nicolas Weeger > >> > >> Student of Master-Program Appied Research, > >> > >> University Ansbach, > >> > >> Germany > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -- > > Max Cantor > > Lab Manager > > Computational Neurolinguistics Lab > > University of Michigan > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Thu Jan 29 19:31:24 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 29 Jan 2015 19:31:24 +0100 Subject: [FieldTrip] help with topoplot_TFR In-Reply-To: <1750B296-D38B-4912-B843-FFC5D0B5B1BC@ndcn.ox.ac.uk> References: <1750B296-D38B-4912-B843-FFC5D0B5B1BC@ndcn.ox.ac.uk> Message-ID: Hi Payashi, > I have computed the ratio per sample and called it ADR. It is a 14x1x480 matrix (channels x freq x time). good, so now you squeeze(ADR) in order to get the actual ‘chan_time’ representation. Then you introduce a new variable say tlk_ADR: tlk_ADR.avg =ADR; tlk_ADR.label = freq_ADR.label; tlk_ADR.dimord = freq_ADR.dimord; tlk_ADR.time = freq_ADR.time; tlk_ADR.elec = freq_ADR.elec; then you call all plotting functions that deal with time domain signals such as ft_multiplotER, ft_singleplotER and ft_topoplotER. Not …TFR. So your code would look like; > cfg=[]; > cfg.xlim = [3000 3200]; > cfg.colorbar = 'yes'; > figure > ft_topoplotER(cfg, tlk_ADR); good luck tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jan 29 19:37:20 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 29 Jan 2015 18:37:20 +0000 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: <3D8E568A-7E77-437C-93BA-03CA0639CE44@uni-leipzig.de> References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> <54CA2487.9030108@uni-tuebingen.de> <3D8E568A-7E77-437C-93BA-03CA0639CE44@uni-leipzig.de> Message-ID: <38A19F94-055C-4B26-8DA6-BBB0CB393A35@fcdonders.ru.nl> Dear Andreas, Note that ft_resampledata supports the options demean and detrend. Also, as of release 9829 FT always explicitly removes the epoch-wise DC-offset prior to resampling (and adds it back if cfg.demean is ‘no’), which means that users that are not aware of the potential problem are partly protected against strong DC offsets. Our recommendation is furthermore not to detrend, because this may distort slow event-related components in a non-trivial way. Also, it may falsely introduce experimental effects at unexpected time points, e.g. in the baseline. If the user suspects that low-frequency energy in the signals may lead to funny edge behavior in the resampling step, I’d recommend either to highpassfilter the data prior to resampling, or to read in more data than needed, so that the edge effects end up in non-interesting parts of the data. I think that a more aggressive lowpassfilter will be a useful option to build in. Best, Jan-Mathijs On Jan 29, 2015, at 5:19 PM, Andreas Widmann > wrote: Dear Marieke and Jens, MATLAB resample sets the -6dB half-amplitude cutoff of the anti-aliasing filter to the new Nyquist frequency. This is quite common practice, however, for EEG/MEG data this is not recommended, as the remaining energy in the transition band above the cutoff/new Nyquist frequency can still introduce considerable aliasing artifacts. So indeed the current Fieldtrip implementation is problematic. In the attached Fig. 1 a frequency response plot as it would be applied when downsampling from 500 to 250 Hz. Even worse is that resample (and Fieldtrip) does not apply any padding of the signal before filtering (doc resample: "In its filtering process, resample assumes that the input sequence, x, is zero before and after the samples it is given. Thus, large deviations from zero at the endpoints of x can cause inaccuracies in y at its endpoints.“). This will introduce DC artifacts at the beginning and end of the data. In particular for epoched data this can result in quite massive distortions (see Fig. 2 in the attachment; filtered and downsampled series of ones; same filter as above; same problem as it was formerly observed in EEGLAB: https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=1017). I suggest submitting a bug report (please put me into cc). I think I can fix both problems but this will take some days. I would recommend not using the current implementation. Best, Andreas Am 29.01.2015 um 13:16 schrieb Jens Klinzing, Universität Tübingen >: Hi Marieke, I had the impression that you are interested in the automatic low-pass filtering performed by ft_resampledata. If you don't specify cfg.resamplemethod = 'downsample', ft_resampledata will call the built-in matlab function 'resample' to do the job. This function automatically applies a low-pass filter before resampling. mathworks.com/help/signal/ref/resample.html "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." I couldn't find an explicit statement what the cutoff frequency of that filter would be, though. There are some forum entries on the web, but they don't give the answer either. Can someone help? All the best, Jens Am 23.01.2015 um 17:56 schrieb Schoffelen, J.M. (Jan Mathijs): Marieke, Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. JM On Jan 23, 2015, at 2:39 PM, Eleanor Harding > wrote: Hi Marieke, A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. Good luck, Ellie Harding Message: 5 Date: Thu, 22 Jan 2015 16:50:26 +0000 From: "Nieuwenhuijzen, M.E. van de (Marieke)" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata Message-ID: > Content-Type: text/plain; charset="iso-8859-1" Hi Fieldtrippers, I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstraße 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjordanov at besa.de Fri Jan 30 11:10:15 2015 From: tjordanov at besa.de (tjordanov at besa.de) Date: Fri, 30 Jan 2015 11:10:15 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: <001601d03c74$f1b617e0$d52247a0$@de> Hi Eelke, I found your answer very interesting. If I understand you correctly, the advantage of the multitaper method is that it smoothes in the frequency domain independently of the smoothing in the time domain. Then it should be equivalent (or similar) with the following procedure: 1) Calculate single trial single taper decomposition of the signal. 2) Choose an appropriate 1D Gauss function (note that it is important to be 1D else it would smooth in both - time and frequency) 3) Apply the selected Gauss function on the decomposed signal only in the frequency direction (not in time in order to avoid temporal smearing). Do this for all trials and all time points. 4) Calculate the average over the trials. In this procedure the choice of the Gaussian would determine the amount of smearing in the frequency domain. Is this so, or I misunderstood something? Best, Todor -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak Sent: Mittwoch, 28. Januar 2015 12:24 To: FieldTrip discussion list Subject: Re: [FieldTrip] Simulate data to compare methods Hi Nico, As for question (2), you probably first need to think about what constitutes a "better" result. Using more tapers with dpss will always result in more frequency smoothing. If your source signal is primarily composed of pure sinusoids, and you interpret a spectrum as "better" if it shows clearer peaks, then you will always get the "best" result for the single-taper case. Multitapering allows optimal control over the amount of smoothing you obtain in the frequency domain, which is more or less independent of the amount of smoothing you obtain in the time domain (as opposed to e.g. wavelets, where these are fundamentally linked). When dealing with brain signals, you will often find that a certain stimulus might induce e.g. a gamma response at 40-50 Hz in one subject and one trial, while in another subject or another trial the same stimulus might induce a 50-60 Hz response or so. Of course, in the average over trials (and subjects), this heterogeneity (i.e., noise) will wash out, but it will severely damage your statistical sensitivity. Therefore, using multitapers to add smoothing can produce a much more consistent result and therefore be "better" in the sense of actually understanding the brain. As for your simulation, perhaps using filtered noise would be better than sinusoids. Also, since multitapering benefits you most strongly when taking variation over observations into account, you could consider simulating different observations, each consisting of noise filtered in a slightly different randomly chosen bandwidth, and inspecting the resulting variation over observations in the spectra. Best, Eelke On 27 January 2015 at 18:36, Max Cantor wrote: > Hi Nico, > > I'm not sure about the second question, but as for the first question, > you can manually set the scales for ft_singleplotTFR using cfg.zlim. > > Hope that helps, > > Max > > On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > > wrote: >> >> Hello FieldTrip community, >> >> >> >> I am new to FieldTrip and I try to simulate data to compare the >> ft_frequanalysis methods Hanning, Multitaper and Wavelet. >> >> Therefore I simulate Data manually using different latency, amplitude >> and frequency combinations using the following equation: >> >> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); >> >> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); >> >> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); >> >> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); >> >> sig = sig1+sig2+sig3+sig4; >> >> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; >> >> >> After using ft_frequanalysis (see the following cfgs) >> >> >> Cfg Wavelet: >> >> cfg = []; >> >> cfg.output = 'pow'; >> >> cfg.channel = labels; >> >> cfg.method = 'wavelet'; >> >> cfg.width = 7; >> >> cfg.gwidth = 3; >> >> cfg.foilim = [1 70]; >> >> cfg.toi = 0:0.05:2; >> >> TFRwave = ft_freqanalysis(cfg, data_preproc); >> >> >> >> Cfg Hanning / Multitaper: >> >> cfg = []; >> >> cfg.output = 'pow'; >> >> cfg.channel = labels; >> >> cfg.method = 'mtmconvol' >> >> cfg.foi = 1:1:70 >> >> cfg.tapsmofrq = 0.2*cfg.foi; >> >> cfg.taper = 'dpss' / ‘hanning’; >> >> cfg.t_ftimwin = 4./cfg.foi; >> >> cfg.toi = 0:0.05:2; >> >> TFRmult1 = ft_freqanalysis(cfg, data_preproc); >> >> >> >> >> the data is plotted with ft_singleplotTFR (see cfg below) >> >> >> cfg singleplot: >> >> cfg = []; >> >> cfg.maskstyle = 'saturation'; >> >> cfg.colorbar = 'yes'; >> >> cfg.layout = 'AC_Osc.lay'; >> >> ft_singleplotTFR(cfg, TFRwave); >> >> >> Two problems occur. First, the power scale of wavelet and >> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). >> >> 1. How can I get the scale of all methods equal, or do I have to >> change the Wavelet settings to get the right scale of the values? >> >> Second, the best result of Multitaper analysis is performed using >> only one Taper. The goal was to get a result, where the advantages >> and disadvantages of Multitaper analysis compared to the other methods can be seen. >> >> 2. How can I change the simulation so that more tapers show better >> results than a single taper does? >> >> >> Thank you for your time and help. >> >> >> Regards, >> >> >> >> Nicolas Weeger >> >> Student of Master-Program Appied Research, >> >> University Ansbach, >> >> Germany >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Jan 30 11:51:37 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 30 Jan 2015 11:51:37 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: Hi Todor, Although your procedure would also yield smoothing in the frequency domain which is independent from that in the time domain, it is not at all equivalent to using multitapers! The tapers in the discrete prolate spheroidal sequence (dpss, == multitaper in fieldtrip) are pairwise orthogonal, hence their estimates are independent from one another. This will result in there being more information extracted from the signal than if you used a single taper and then apply Gaussian smoothing over frequencies. You could have a look at https://en.wikipedia.org/wiki/Multitaper which gives quite a decent overview of multitapering. Or for the full details, refer to the original paper by David Thompson: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 Best. Eelke On 30 January 2015 at 11:10, tjordanov at besa.de wrote: > Hi Eelke, > > I found your answer very interesting. If I understand you correctly, the advantage of the multitaper method is that it smoothes in the frequency domain independently of the smoothing in the time domain. Then it should be equivalent (or similar) with the following procedure: > 1) Calculate single trial single taper decomposition of the signal. > 2) Choose an appropriate 1D Gauss function (note that it is important to be 1D else it would smooth in both - time and frequency) > 3) Apply the selected Gauss function on the decomposed signal only in the frequency direction (not in time in order to avoid temporal smearing). Do this for all trials and all time points. > 4) Calculate the average over the trials. > In this procedure the choice of the Gaussian would determine the amount of smearing in the frequency domain. > > Is this so, or I misunderstood something? > > Best, > Todor > > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > Sent: Mittwoch, 28. Januar 2015 12:24 > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Nico, > > As for question (2), you probably first need to think about what constitutes a "better" result. Using more tapers with dpss will always result in more frequency smoothing. If your source signal is primarily composed of pure sinusoids, and you interpret a spectrum as "better" > if it shows clearer peaks, then you will always get the "best" result for the single-taper case. > > Multitapering allows optimal control over the amount of smoothing you obtain in the frequency domain, which is more or less independent of the amount of smoothing you obtain in the time domain (as opposed to e.g. wavelets, where these are fundamentally linked). When dealing with brain signals, you will often find that a certain stimulus might induce e.g. a gamma response at 40-50 Hz in one subject and one trial, while in another subject or another trial the same stimulus might induce a 50-60 Hz response or so. Of course, in the average over trials (and subjects), this heterogeneity (i.e., noise) will wash out, but it will severely damage your statistical sensitivity. Therefore, using multitapers to add smoothing can produce a much more consistent result and therefore be "better" in the sense of actually understanding the brain. > > As for your simulation, perhaps using filtered noise would be better than sinusoids. Also, since multitapering benefits you most strongly when taking variation over observations into account, you could consider simulating different observations, each consisting of noise filtered in a slightly different randomly chosen bandwidth, and inspecting the resulting variation over observations in the spectra. > > Best, > Eelke > > On 27 January 2015 at 18:36, Max Cantor wrote: >> Hi Nico, >> >> I'm not sure about the second question, but as for the first question, >> you can manually set the scales for ft_singleplotTFR using cfg.zlim. >> >> Hope that helps, >> >> Max >> >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger >> >> wrote: >>> >>> Hello FieldTrip community, >>> >>> >>> >>> I am new to FieldTrip and I try to simulate data to compare the >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. >>> >>> Therefore I simulate Data manually using different latency, amplitude >>> and frequency combinations using the following equation: >>> >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); >>> >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); >>> >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); >>> >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); >>> >>> sig = sig1+sig2+sig3+sig4; >>> >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; >>> >>> >>> After using ft_frequanalysis (see the following cfgs) >>> >>> >>> Cfg Wavelet: >>> >>> cfg = []; >>> >>> cfg.output = 'pow'; >>> >>> cfg.channel = labels; >>> >>> cfg.method = 'wavelet'; >>> >>> cfg.width = 7; >>> >>> cfg.gwidth = 3; >>> >>> cfg.foilim = [1 70]; >>> >>> cfg.toi = 0:0.05:2; >>> >>> TFRwave = ft_freqanalysis(cfg, data_preproc); >>> >>> >>> >>> Cfg Hanning / Multitaper: >>> >>> cfg = []; >>> >>> cfg.output = 'pow'; >>> >>> cfg.channel = labels; >>> >>> cfg.method = 'mtmconvol' >>> >>> cfg.foi = 1:1:70 >>> >>> cfg.tapsmofrq = 0.2*cfg.foi; >>> >>> cfg.taper = 'dpss' / ‘hanning’; >>> >>> cfg.t_ftimwin = 4./cfg.foi; >>> >>> cfg.toi = 0:0.05:2; >>> >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); >>> >>> >>> >>> >>> the data is plotted with ft_singleplotTFR (see cfg below) >>> >>> >>> cfg singleplot: >>> >>> cfg = []; >>> >>> cfg.maskstyle = 'saturation'; >>> >>> cfg.colorbar = 'yes'; >>> >>> cfg.layout = 'AC_Osc.lay'; >>> >>> ft_singleplotTFR(cfg, TFRwave); >>> >>> >>> Two problems occur. First, the power scale of wavelet and >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). >>> >>> 1. How can I get the scale of all methods equal, or do I have to >>> change the Wavelet settings to get the right scale of the values? >>> >>> Second, the best result of Multitaper analysis is performed using >>> only one Taper. The goal was to get a result, where the advantages >>> and disadvantages of Multitaper analysis compared to the other methods can be seen. >>> >>> 2. How can I change the simulation so that more tapers show better >>> results than a single taper does? >>> >>> >>> Thank you for your time and help. >>> >>> >>> Regards, >>> >>> >>> >>> Nicolas Weeger >>> >>> Student of Master-Program Appied Research, >>> >>> University Ansbach, >>> >>> Germany >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> Max Cantor >> Lab Manager >> Computational Neurolinguistics Lab >> University of Michigan > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jorn at artinis.com Fri Jan 30 13:34:16 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Fri, 30 Jan 2015 13:34:16 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: <002c01d03c89$0ff98020$2fec8060$@artinis.com> Hi Todor, maybe this matlab function helps illustrating what dpss multitapers are, and will thus clarify what makes them so powerful compared to other techniques: https://www.dropbox.com/s/0uifk9l8rb6m5vl/Tapering.m?dl=0 (go to example 5) Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Eelke Spaak > Sent: Friday, January 30, 2015 11:52 AM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Todor, > > Although your procedure would also yield smoothing in the frequency > domain which is independent from that in the time domain, it is not at all > equivalent to using multitapers! > > The tapers in the discrete prolate spheroidal sequence (dpss, == multitaper > in fieldtrip) are pairwise orthogonal, hence their estimates are independent > from one another. This will result in there being more information extracted > from the signal than if you used a single taper and then apply Gaussian > smoothing over frequencies. You could have a look at > https://en.wikipedia.org/wiki/Multitaper which gives quite a decent > overview of multitapering. Or for the full details, refer to the original paper > by David Thompson: > http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 > > Best. > Eelke > > On 30 January 2015 at 11:10, tjordanov at besa.de > wrote: > > Hi Eelke, > > > > I found your answer very interesting. If I understand you correctly, the > advantage of the multitaper method is that it smoothes in the frequency > domain independently of the smoothing in the time domain. Then it should > be equivalent (or similar) with the following procedure: > > 1) Calculate single trial single taper decomposition of the signal. > > 2) Choose an appropriate 1D Gauss function (note that it is important > > to be 1D else it would smooth in both - time and frequency) > > 3) Apply the selected Gauss function on the decomposed signal only in the > frequency direction (not in time in order to avoid temporal smearing). Do this > for all trials and all time points. > > 4) Calculate the average over the trials. > > In this procedure the choice of the Gaussian would determine the amount > of smearing in the frequency domain. > > > > Is this so, or I misunderstood something? > > > > Best, > > Todor > > > > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > > Sent: Mittwoch, 28. Januar 2015 12:24 > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > Hi Nico, > > > > As for question (2), you probably first need to think about what constitutes > a "better" result. Using more tapers with dpss will always result in more > frequency smoothing. If your source signal is primarily composed of pure > sinusoids, and you interpret a spectrum as "better" > > if it shows clearer peaks, then you will always get the "best" result for the > single-taper case. > > > > Multitapering allows optimal control over the amount of smoothing you > obtain in the frequency domain, which is more or less independent of the > amount of smoothing you obtain in the time domain (as opposed to e.g. > wavelets, where these are fundamentally linked). When dealing with brain > signals, you will often find that a certain stimulus might induce e.g. a gamma > response at 40-50 Hz in one subject and one trial, while in another subject or > another trial the same stimulus might induce a 50-60 Hz response or so. Of > course, in the average over trials (and subjects), this heterogeneity (i.e., > noise) will wash out, but it will severely damage your statistical sensitivity. > Therefore, using multitapers to add smoothing can produce a much more > consistent result and therefore be "better" in the sense of actually > understanding the brain. > > > > As for your simulation, perhaps using filtered noise would be better than > sinusoids. Also, since multitapering benefits you most strongly when taking > variation over observations into account, you could consider simulating > different observations, each consisting of noise filtered in a slightly different > randomly chosen bandwidth, and inspecting the resulting variation over > observations in the spectra. > > > > Best, > > Eelke > > > > On 27 January 2015 at 18:36, Max Cantor wrote: > >> Hi Nico, > >> > >> I'm not sure about the second question, but as for the first > >> question, you can manually set the scales for ft_singleplotTFR using > cfg.zlim. > >> > >> Hope that helps, > >> > >> Max > >> > >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > >> > >> wrote: > >>> > >>> Hello FieldTrip community, > >>> > >>> > >>> > >>> I am new to FieldTrip and I try to simulate data to compare the > >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > >>> > >>> Therefore I simulate Data manually using different latency, > >>> amplitude and frequency combinations using the following equation: > >>> > >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > >>> > >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > >>> > >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > >>> > >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > >>> > >>> sig = sig1+sig2+sig3+sig4; > >>> > >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > >>> > >>> > >>> After using ft_frequanalysis (see the following cfgs) > >>> > >>> > >>> Cfg Wavelet: > >>> > >>> cfg = []; > >>> > >>> cfg.output = 'pow'; > >>> > >>> cfg.channel = labels; > >>> > >>> cfg.method = 'wavelet'; > >>> > >>> cfg.width = 7; > >>> > >>> cfg.gwidth = 3; > >>> > >>> cfg.foilim = [1 70]; > >>> > >>> cfg.toi = 0:0.05:2; > >>> > >>> TFRwave = ft_freqanalysis(cfg, data_preproc); > >>> > >>> > >>> > >>> Cfg Hanning / Multitaper: > >>> > >>> cfg = []; > >>> > >>> cfg.output = 'pow'; > >>> > >>> cfg.channel = labels; > >>> > >>> cfg.method = 'mtmconvol' > >>> > >>> cfg.foi = 1:1:70 > >>> > >>> cfg.tapsmofrq = 0.2*cfg.foi; > >>> > >>> cfg.taper = 'dpss' / ‘hanning’; > >>> > >>> cfg.t_ftimwin = 4./cfg.foi; > >>> > >>> cfg.toi = 0:0.05:2; > >>> > >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > >>> > >>> > >>> > >>> > >>> the data is plotted with ft_singleplotTFR (see cfg below) > >>> > >>> > >>> cfg singleplot: > >>> > >>> cfg = []; > >>> > >>> cfg.maskstyle = 'saturation'; > >>> > >>> cfg.colorbar = 'yes'; > >>> > >>> cfg.layout = 'AC_Osc.lay'; > >>> > >>> ft_singleplotTFR(cfg, TFRwave); > >>> > >>> > >>> Two problems occur. First, the power scale of wavelet and > >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0- > ~15*10^4). > >>> > >>> 1. How can I get the scale of all methods equal, or do I have to > >>> change the Wavelet settings to get the right scale of the values? > >>> > >>> Second, the best result of Multitaper analysis is performed using > >>> only one Taper. The goal was to get a result, where the advantages > >>> and disadvantages of Multitaper analysis compared to the other > methods can be seen. > >>> > >>> 2. How can I change the simulation so that more tapers show better > >>> results than a single taper does? > >>> > >>> > >>> Thank you for your time and help. > >>> > >>> > >>> Regards, > >>> > >>> > >>> > >>> Nicolas Weeger > >>> > >>> Student of Master-Program Appied Research, > >>> > >>> University Ansbach, > >>> > >>> Germany > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> > >> > >> > >> -- > >> Max Cantor > >> Lab Manager > >> Computational Neurolinguistics Lab > >> University of Michigan > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From widmann at uni-leipzig.de Fri Jan 30 17:32:33 2015 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Fri, 30 Jan 2015 17:32:33 +0100 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: <38A19F94-055C-4B26-8DA6-BBB0CB393A35@fcdonders.ru.nl> References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> <54CA2487.9030108@uni-tuebingen.de> <3D8E568A-7E77-437C-93BA-03CA0639CE44@uni-leipzig.de> <38A19F94-055C-4B26-8DA6-BBB0CB393A35@fcdonders.ru.nl> Message-ID: <32D98DDD-7D51-4306-BF3A-9F46E77FA948@uni-leipzig.de> Dear Jan-Mathijs, unfortunately demeaning (or detrending, or moderate highpass filtering) will not completely prevent DC artifacts. Even small offsets at the beginning or end of the signal can lead to noticable distortions. I would suggest padding the data with DC constants at both ends. This is to my knowledge the easiest way to minimize DC artifacts very effectively. > I think that a more aggressive lowpassfilter will be a useful option to build in. This will be the more complicated part as the anti-aliasing filter is applied to the up-sampled signal in case of non-integer ratios of old to new sampling rate. If you file a bug report I can try to fix. Best, Andreas > Am 29.01.2015 um 19:37 schrieb Schoffelen, J.M. (Jan Mathijs) : > > Dear Andreas, > > Note that ft_resampledata supports the options demean and detrend. Also, as of release 9829 FT always explicitly removes the epoch-wise DC-offset prior to resampling (and adds it back if cfg.demean is ‘no’), which means that users that are not aware of the potential problem are partly protected against strong DC offsets. Our recommendation is furthermore not to detrend, because this may distort slow event-related components in a non-trivial way. Also, it may falsely introduce experimental effects at unexpected time points, e.g. in the baseline. > If the user suspects that low-frequency energy in the signals may lead to funny edge behavior in the resampling step, I’d recommend either to highpassfilter the data prior to resampling, or to read in more data than needed, so that the edge effects end up in non-interesting parts of the data. > I think that a more aggressive lowpassfilter will be a useful option to build in. > > Best, > Jan-Mathijs > > > On Jan 29, 2015, at 5:19 PM, Andreas Widmann wrote: > >> Dear Marieke and Jens, >> >> MATLAB resample sets the -6dB half-amplitude cutoff of the anti-aliasing filter to the new Nyquist frequency. This is quite common practice, however, for EEG/MEG data this is not recommended, as the remaining energy in the transition band above the cutoff/new Nyquist frequency can still introduce considerable aliasing artifacts. So indeed the current Fieldtrip implementation is problematic. In the attached Fig. 1 a frequency response plot as it would be applied when downsampling from 500 to 250 Hz. >> >> Even worse is that resample (and Fieldtrip) does not apply any padding of the signal before filtering (doc resample: "In its filtering process, resample assumes that the input sequence, x, is zero before and after the samples it is given. Thus, large deviations from zero at the endpoints of x can cause inaccuracies in y at its endpoints.“). This will introduce DC artifacts at the beginning and end of the data. In particular for epoched data this can result in quite massive distortions (see Fig. 2 in the attachment; filtered and downsampled series of ones; same filter as above; same problem as it was formerly observed in EEGLAB: https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=1017). >> >> I suggest submitting a bug report (please put me into cc). I think I can fix both problems but this will take some days. I would recommend not using the current implementation. >> >> Best, >> Andreas >> >>> Am 29.01.2015 um 13:16 schrieb Jens Klinzing, Universität Tübingen : >>> >>> Hi Marieke, >>> I had the impression that you are interested in the automatic low-pass filtering performed by ft_resampledata. >>> >>> If you don't specify cfg.resamplemethod = 'downsample', ft_resampledata will call the built-in matlab function 'resample' to do the job. This function automatically applies a low-pass filter before resampling. >>> >>> mathworks.com/help/signal/ref/resample.html >>> >>> "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." >>> >>> I couldn't find an explicit statement what the cutoff frequency of that filter would be, though. There are some forum entries on the web, but they don't give the answer either. >>> >>> Can someone help? >>> >>> All the best, >>> Jens >>> >>> Am 23.01.2015 um 17:56 schrieb Schoffelen, J.M. (Jan Mathijs): >>>> Marieke, >>>> Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. >>>> >>>> JM >>>> >>>> >>>> On Jan 23, 2015, at 2:39 PM, Eleanor Harding wrote: >>>> >>>>> Hi Marieke, >>>>> >>>>> A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, >>>>> >>>>> Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. >>>>> >>>>> Good luck, >>>>> Ellie Harding >>>>> >>>>> >>>>> >>>>> Message: 5 >>>>> Date: Thu, 22 Jan 2015 16:50:26 +0000 >>>>> From: "Nieuwenhuijzen, M.E. van de (Marieke)" >>>>> >>>>> To: "fieldtrip at science.ru.nl" >>>>> Subject: [FieldTrip] Low-pass frequency when downsampling using >>>>> ft_resampledata >>>>> Message-ID: >>>>> >>>>> Content-Type: text/plain; charset="iso-8859-1" >>>>> >>>>> Hi Fieldtrippers, >>>>> >>>>> I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? >>>>> >>>>> Best, >>>>> Marieke >>>>> -------------- next part -------------- >>>>> An HTML attachment was scrubbed... >>>>> URL: >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Eleanor Harding >>>>> PhD Student >>>>> Max Planck Institute for Human Cognitive and Brain Sciences >>>>> Stephanstraße 1A, 04103 Leipzig, Germany >>>>> Phone: +49 341 9940-2268 >>>>> Fax: +49 341 9940 2260 >>>>> http://www.cbs.mpg.de/~harding >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tjordanov at besa.de Fri Jan 30 17:37:18 2015 From: tjordanov at besa.de (tjordanov at besa.de) Date: Fri, 30 Jan 2015 17:37:18 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: <002c01d03c89$0ff98020$2fec8060$@artinis.com> References: <002c01d03c89$0ff98020$2fec8060$@artinis.com> Message-ID: <000001d03cab$039169c0$0ab43d40$@de> Hi Eelke, hi Jörn, thank you for your elaborate answers and for the script - it is very informative and useful. I am in some extent familiar with the theory behind multitapering and I am also convinced that it has very good theoretical properties. However, let us take a look at the application. I simulated 200 trials data with jitter in the frequency. You can find the frequency profile of the trials as attachment ("FrequenciesForSimulation.png"). There are 67 trials with central frequency 34 Hz (variation between 32 and 36 Hz), 67 trials with central frequency 50 Hz (48 to 52 Hz) and 66 trials with central frequency 66 Hz (64 to 68 Hz). I performed multitaper analysis with 1, 2 and 3 tapers (see results "Multitaper1taper.png", "Multitaper2tapers.png", "Multitaper3tapers.png"). As we can see from the results only the decomposition with one taper detected correctly the three frequencies, all other two methods (with 2 and 3 tapers) just distorted (smoothed) the first result. I can see that such kind of smoothing is good for the statistical power between subjects but it does not prove the advantage of using multiple tapers compared to using just single taper. What do you think? Best, Todor -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jörn M. Horschig Sent: Freitag, 30. Januar 2015 13:34 To: 'FieldTrip discussion list' Subject: Re: [FieldTrip] Simulate data to compare methods Hi Todor, maybe this matlab function helps illustrating what dpss multitapers are, and will thus clarify what makes them so powerful compared to other techniques: https://www.dropbox.com/s/0uifk9l8rb6m5vl/Tapering.m?dl=0 (go to example 5) Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Eelke Spaak > Sent: Friday, January 30, 2015 11:52 AM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Todor, > > Although your procedure would also yield smoothing in the frequency > domain which is independent from that in the time domain, it is not at > all equivalent to using multitapers! > > The tapers in the discrete prolate spheroidal sequence (dpss, == > multitaper in fieldtrip) are pairwise orthogonal, hence their > estimates are independent from one another. This will result in there > being more information extracted from the signal than if you used a > single taper and then apply Gaussian smoothing over frequencies. You > could have a look at https://en.wikipedia.org/wiki/Multitaper which > gives quite a decent overview of multitapering. Or for the full > details, refer to the original paper by David Thompson: > http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 > > Best. > Eelke > > On 30 January 2015 at 11:10, tjordanov at besa.de > wrote: > > Hi Eelke, > > > > I found your answer very interesting. If I understand you correctly, > > the > advantage of the multitaper method is that it smoothes in the > frequency domain independently of the smoothing in the time domain. > Then it should be equivalent (or similar) with the following procedure: > > 1) Calculate single trial single taper decomposition of the signal. > > 2) Choose an appropriate 1D Gauss function (note that it is > > important to be 1D else it would smooth in both - time and > > frequency) > > 3) Apply the selected Gauss function on the decomposed signal only > > in the > frequency direction (not in time in order to avoid temporal smearing). > Do this for all trials and all time points. > > 4) Calculate the average over the trials. > > In this procedure the choice of the Gaussian would determine the > > amount > of smearing in the frequency domain. > > > > Is this so, or I misunderstood something? > > > > Best, > > Todor > > > > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > > Sent: Mittwoch, 28. Januar 2015 12:24 > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > Hi Nico, > > > > As for question (2), you probably first need to think about what > > constitutes > a "better" result. Using more tapers with dpss will always result in > more frequency smoothing. If your source signal is primarily composed > of pure sinusoids, and you interpret a spectrum as "better" > > if it shows clearer peaks, then you will always get the "best" > > result for the > single-taper case. > > > > Multitapering allows optimal control over the amount of smoothing > > you > obtain in the frequency domain, which is more or less independent of > the amount of smoothing you obtain in the time domain (as opposed to e.g. > wavelets, where these are fundamentally linked). When dealing with > brain signals, you will often find that a certain stimulus might > induce e.g. a gamma response at 40-50 Hz in one subject and one trial, > while in another subject or another trial the same stimulus might > induce a 50-60 Hz response or so. Of course, in the average over > trials (and subjects), this heterogeneity (i.e., > noise) will wash out, but it will severely damage your statistical sensitivity. > Therefore, using multitapers to add smoothing can produce a much more > consistent result and therefore be "better" in the sense of actually > understanding the brain. > > > > As for your simulation, perhaps using filtered noise would be better > > than > sinusoids. Also, since multitapering benefits you most strongly when > taking variation over observations into account, you could consider > simulating different observations, each consisting of noise filtered > in a slightly different randomly chosen bandwidth, and inspecting the > resulting variation over observations in the spectra. > > > > Best, > > Eelke > > > > On 27 January 2015 at 18:36, Max Cantor wrote: > >> Hi Nico, > >> > >> I'm not sure about the second question, but as for the first > >> question, you can manually set the scales for ft_singleplotTFR > >> using > cfg.zlim. > >> > >> Hope that helps, > >> > >> Max > >> > >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > >> > >> wrote: > >>> > >>> Hello FieldTrip community, > >>> > >>> > >>> > >>> I am new to FieldTrip and I try to simulate data to compare the > >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > >>> > >>> Therefore I simulate Data manually using different latency, > >>> amplitude and frequency combinations using the following equation: > >>> > >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > >>> > >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > >>> > >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > >>> > >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > >>> > >>> sig = sig1+sig2+sig3+sig4; > >>> > >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > >>> > >>> > >>> After using ft_frequanalysis (see the following cfgs) > >>> > >>> > >>> Cfg Wavelet: > >>> > >>> cfg = []; > >>> > >>> cfg.output = 'pow'; > >>> > >>> cfg.channel = labels; > >>> > >>> cfg.method = 'wavelet'; > >>> > >>> cfg.width = 7; > >>> > >>> cfg.gwidth = 3; > >>> > >>> cfg.foilim = [1 70]; > >>> > >>> cfg.toi = 0:0.05:2; > >>> > >>> TFRwave = ft_freqanalysis(cfg, data_preproc); > >>> > >>> > >>> > >>> Cfg Hanning / Multitaper: > >>> > >>> cfg = []; > >>> > >>> cfg.output = 'pow'; > >>> > >>> cfg.channel = labels; > >>> > >>> cfg.method = 'mtmconvol' > >>> > >>> cfg.foi = 1:1:70 > >>> > >>> cfg.tapsmofrq = 0.2*cfg.foi; > >>> > >>> cfg.taper = 'dpss' / ‘hanning’; > >>> > >>> cfg.t_ftimwin = 4./cfg.foi; > >>> > >>> cfg.toi = 0:0.05:2; > >>> > >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > >>> > >>> > >>> > >>> > >>> the data is plotted with ft_singleplotTFR (see cfg below) > >>> > >>> > >>> cfg singleplot: > >>> > >>> cfg = []; > >>> > >>> cfg.maskstyle = 'saturation'; > >>> > >>> cfg.colorbar = 'yes'; > >>> > >>> cfg.layout = 'AC_Osc.lay'; > >>> > >>> ft_singleplotTFR(cfg, TFRwave); > >>> > >>> > >>> Two problems occur. First, the power scale of wavelet and > >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0- > ~15*10^4). > >>> > >>> 1. How can I get the scale of all methods equal, or do I have to > >>> change the Wavelet settings to get the right scale of the values? > >>> > >>> Second, the best result of Multitaper analysis is performed using > >>> only one Taper. The goal was to get a result, where the advantages > >>> and disadvantages of Multitaper analysis compared to the other > methods can be seen. > >>> > >>> 2. How can I change the simulation so that more tapers show better > >>> results than a single taper does? > >>> > >>> > >>> Thank you for your time and help. > >>> > >>> > >>> Regards, > >>> > >>> > >>> > >>> Nicolas Weeger > >>> > >>> Student of Master-Program Appied Research, > >>> > >>> University Ansbach, > >>> > >>> Germany > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> > >> > >> > >> -- > >> Max Cantor > >> Lab Manager > >> Computational Neurolinguistics Lab > >> University of Michigan > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: FrequenciesForSimulation.png Type: image/png Size: 6793 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Multitaper1taper.png Type: image/png Size: 6344 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Multitaper2tapers.png Type: image/png Size: 6301 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Multitaper3tapers.png Type: image/png Size: 6207 bytes Desc: not available URL: From tomh at kurage.nimh.nih.gov Fri Jan 30 18:40:51 2015 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Fri, 30 Jan 2015 12:40:51 -0500 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: <002c01d03c89$0ff98020$2fec8060$@artinis.com> References: <002c01d03c89$0ff98020$2fec8060$@artinis.com> Message-ID: <20150130124051.7cf4d8a1@kurage.nimh.nih.gov> This is more about the Subject than about filtering, but may I say yay multitapering, and also yay Stockwell transforms. The latter are somewhat easier to understand than wavelets, and the phase is easier to extract. Also if you sum across time and inverse FFT the result is the usual power specrtum. Enough about that. Here is what I use to simulate MEG data. It's written in Python, but it's pretty easy to translate. It creates a 1/f^2 noise and then performs a fractional derivative to create a 1/f noise. The noise demonstrates growth of variance over time but is nevertheless normally distributed (mean is removed and s.d. = 1). It makes good surrogate MEG data, properly scaled. Adding a couple ECDs is beyond the scope of this post. :-) from numpy import zeros, array, arange from numpy.fft import fft, ifft from numpy.random import normal def meg_noise(l, n = .5): """Return l samples of 1/f noise.""" l2 = l / 2 d = zeros((l,), 'f') y = 0. for i in range(l): x = normal() # white y += x # brown d[i] = y # detrend d = d - arange(l) * (d[-1] - d[0]) / l # Fractional derivative of d. Regular derivative (n=1) adds 2 to the # exponent of the spectrum. Fractional derivative does a multiple # of that, so n = .5 adds 1 to the exponent. Thus for brown (-2) # you get pink (-1). w = array(range(l2) + range(-l2, 0)) # now w = [ 0, 1, ..., l2 - 1, -l2, -l2 + 1, ..., -1 ] jwn = pow((1j) * w, n) D = fft(d) D = D * jwn dd = ifft(D).real / l dd -= dd.mean() dd /= dd.std() return dd On Fri, 30 Jan 2015 13:34:16 +0100 "Jörn M. Horschig" wrote: > Hi Todor, > > maybe this matlab function helps illustrating what dpss multitapers > are, and will thus clarify what makes them so powerful compared to > other techniques: > https://www.dropbox.com/s/0uifk9l8rb6m5vl/Tapering.m?dl=0 (go to > example 5) > > Best, > Jörn > > > > -- > > Jörn M. Horschig, Software Engineer > Artinis Medical Systems | +31 481 350 980 > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > > bounces at science.ru.nl] On Behalf Of Eelke Spaak > > Sent: Friday, January 30, 2015 11:52 AM > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > Hi Todor, > > > > Although your procedure would also yield smoothing in the frequency > > domain which is independent from that in the time domain, it is not > > at all equivalent to using multitapers! > > > > The tapers in the discrete prolate spheroidal sequence (dpss, == > > multitaper in fieldtrip) are pairwise orthogonal, hence their > > estimates are independent from one another. This will result in > > there being more information extracted from the signal than if you > > used a single taper and then apply Gaussian smoothing over > > frequencies. You could have a look at > > https://en.wikipedia.org/wiki/Multitaper which gives quite a decent > > overview of multitapering. Or for the full details, refer to the > > original paper by David Thompson: > > http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 > > > > Best. > > Eelke > > > > On 30 January 2015 at 11:10, tjordanov at besa.de > > wrote: > > > Hi Eelke, > > > > > > I found your answer very interesting. If I understand you > > > correctly, the > > advantage of the multitaper method is that it smoothes in the > > frequency domain independently of the smoothing in the time domain. > > Then it should be equivalent (or similar) with the following > > procedure: > > > 1) Calculate single trial single taper decomposition of the > > > signal. 2) Choose an appropriate 1D Gauss function (note that it > > > is important to be 1D else it would smooth in both - time and > > > frequency) 3) Apply the selected Gauss function on the decomposed > > > signal only in the > > frequency direction (not in time in order to avoid temporal > > smearing). Do this for all trials and all time points. > > > 4) Calculate the average over the trials. > > > In this procedure the choice of the Gaussian would determine the > > > amount > > of smearing in the frequency domain. > > > > > > Is this so, or I misunderstood something? > > > > > > Best, > > > Todor > > > > > > > > > -----Original Message----- > > > From: fieldtrip-bounces at science.ru.nl > > > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > > > Sent: Mittwoch, 28. Januar 2015 12:24 > > > To: FieldTrip discussion list > > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > > > Hi Nico, > > > > > > As for question (2), you probably first need to think about what > > > constitutes > > a "better" result. Using more tapers with dpss will always result > > in more frequency smoothing. If your source signal is primarily > > composed of pure sinusoids, and you interpret a spectrum as "better" > > > if it shows clearer peaks, then you will always get the "best" > > > result for the > > single-taper case. > > > > > > Multitapering allows optimal control over the amount of smoothing > > > you > > obtain in the frequency domain, which is more or less independent > > of the amount of smoothing you obtain in the time domain (as > > opposed to e.g. wavelets, where these are fundamentally linked). > > When dealing with brain signals, you will often find that a certain > > stimulus might induce e.g. a gamma response at 40-50 Hz in one > > subject and one trial, while in another subject or another trial > > the same stimulus might induce a 50-60 Hz response or so. Of > > course, in the average over trials (and subjects), this > > heterogeneity (i.e., noise) will wash out, but it will severely > > damage your statistical sensitivity. Therefore, using multitapers > > to add smoothing can produce a much more consistent result and > > therefore be "better" in the sense of actually understanding the > > brain. > > > > > > As for your simulation, perhaps using filtered noise would be > > > better than > > sinusoids. Also, since multitapering benefits you most strongly > > when taking variation over observations into account, you could > > consider simulating different observations, each consisting of > > noise filtered in a slightly different randomly chosen bandwidth, > > and inspecting the resulting variation over observations in the > > spectra. > > > > > > Best, > > > Eelke > > > > > > On 27 January 2015 at 18:36, Max Cantor wrote: > > >> Hi Nico, > > >> > > >> I'm not sure about the second question, but as for the first > > >> question, you can manually set the scales for ft_singleplotTFR > > >> using > > cfg.zlim. > > >> > > >> Hope that helps, > > >> > > >> Max > > >> > > >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > > >> > > >> wrote: > > >>> > > >>> Hello FieldTrip community, > > >>> > > >>> > > >>> > > >>> I am new to FieldTrip and I try to simulate data to compare the > > >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > > >>> > > >>> Therefore I simulate Data manually using different latency, > > >>> amplitude and frequency combinations using the following > > >>> equation: > > >>> > > >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > > >>> > > >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > > >>> > > >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > > >>> > > >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > > >>> > > >>> sig = sig1+sig2+sig3+sig4; > > >>> > > >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = > > >>> 60; > > >>> > > >>> > > >>> After using ft_frequanalysis (see the following cfgs) > > >>> > > >>> > > >>> Cfg Wavelet: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.output = 'pow'; > > >>> > > >>> cfg.channel = labels; > > >>> > > >>> cfg.method = 'wavelet'; > > >>> > > >>> cfg.width = 7; > > >>> > > >>> cfg.gwidth = 3; > > >>> > > >>> cfg.foilim = [1 70]; > > >>> > > >>> cfg.toi = 0:0.05:2; > > >>> > > >>> TFRwave = ft_freqanalysis(cfg, data_preproc); > > >>> > > >>> > > >>> > > >>> Cfg Hanning / Multitaper: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.output = 'pow'; > > >>> > > >>> cfg.channel = labels; > > >>> > > >>> cfg.method = 'mtmconvol' > > >>> > > >>> cfg.foi = 1:1:70 > > >>> > > >>> cfg.tapsmofrq = 0.2*cfg.foi; > > >>> > > >>> cfg.taper = 'dpss' / ‘hanning’; > > >>> > > >>> cfg.t_ftimwin = 4./cfg.foi; > > >>> > > >>> cfg.toi = 0:0.05:2; > > >>> > > >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > > >>> > > >>> > > >>> > > >>> > > >>> the data is plotted with ft_singleplotTFR (see cfg below) > > >>> > > >>> > > >>> cfg singleplot: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.maskstyle = 'saturation'; > > >>> > > >>> cfg.colorbar = 'yes'; > > >>> > > >>> cfg.layout = 'AC_Osc.lay'; > > >>> > > >>> ft_singleplotTFR(cfg, TFRwave); > > >>> > > >>> > > >>> Two problems occur. First, the power scale of wavelet and > > >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet > > >>> 0- > > ~15*10^4). > > >>> > > >>> 1. How can I get the scale of all methods equal, or do I > > >>> have to change the Wavelet settings to get the right scale of > > >>> the values? > > >>> > > >>> Second, the best result of Multitaper analysis is performed > > >>> using only one Taper. The goal was to get a result, where the > > >>> advantages and disadvantages of Multitaper analysis compared to > > >>> the other > > methods can be seen. > > >>> > > >>> 2. How can I change the simulation so that more tapers > > >>> show better results than a single taper does? > > >>> > > >>> > > >>> Thank you for your time and help. > > >>> > > >>> > > >>> Regards, > > >>> > > >>> > > >>> > > >>> Nicolas Weeger > > >>> > > >>> Student of Master-Program Appied Research, > > >>> > > >>> University Ansbach, > > >>> > > >>> Germany > > >>> > > >>> > > >>> _______________________________________________ > > >>> fieldtrip mailing list > > >>> fieldtrip at donders.ru.nl > > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >> > > >> > > >> > > >> > > >> -- > > >> Max Cantor > > >> Lab Manager > > >> Computational Neurolinguistics Lab > > >> University of Michigan > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tom -- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow -------------- next part -------------- A non-text attachment was scrubbed... Name: GrowthOfVariance.png Type: image/png Size: 28854 bytes Desc: not available URL: From ecaspar at ulb.ac.be Fri Jan 2 11:23:04 2015 From: ecaspar at ulb.ac.be (Emilie Caspar) Date: Fri, 2 Jan 2015 11:23:04 +0100 Subject: [FieldTrip] multi plot and layout Message-ID: <20EDBE47-BEF4-4F80-BFCA-6F2016A58CC8@ulb.ac.be> Dear Fieldtrippers, It's probably a very simple question but I don't understand the problem. I would like to use multi plot and topoplot for my data. So I wrote: cfg = []; cfg.xlim = [-0.1 0.4]; cfg.ylim = [-10 13]; cfg.layout = 'biosemi64.lay'; figure; ft_multiplotER(cfg, avgRobotC_ToneC, avgRobotC_ToneI, avgRobotI_ToneC, avgRobotI_ToneI); However, the mistake indicates that labels in data and labels in layout do not match. However, I'm sure of the layout I'm using and in addition, when I'm using the ft_rejectvisual (in the same script) with the following line codes, it works very well: cfg = []; cfg.alim = 100; cfg.keepchannel = 'yes'; cfg.layout = 'biosemi64.lay'; cfg.method = 'channel'; %% Or 'trial' cfg.metric = 'var'; clean_data = ft_rejectvisual(cfg, epData); …... So I clearly don't understand why multi plot and topoplot do not accept this layout, while the layout is accepted for another function in the same script on the same data. Singleplot works very well. Have you any idea? Thanks! Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jan 5 09:36:11 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 5 Jan 2015 09:36:11 +0100 Subject: [FieldTrip] FEM sLORETA Fieldtrip In-Reply-To: References: Message-ID: <0BAC74CA-25AB-4316-AEC8-88559FF70381@donders.ru.nl> Dear John At this moment FieldTrip does not yet include an implementation of sLORETA. However, it does have an implementation of eLORETA (see FT_SOURCEANALYSIS with cfg.method=‘eloreta’). Perhaps you could use the low level inverse/ft_eloreta code to make an sLORETA implementation. best regards, Robert On 28 Dec 2014, at 22:18, RICHARDS, JOHN wrote: > Robert: > > I hope you can help me. Is FieldTrip able to do sLORETA CDR models? I like the integration of the FEM in FieldTrip, but can’t find a sLORETA algorithm. I use individual structural MRIs, with EEG, with segmentation, and want to do sLORETA models. > > Thanks, John > > *********************************************** > John E. Richards Carolina Distinguished Professor > Department of Psychology > University of South Carolina > Columbia, SC 29208 > Dept Phone: 803 777 2079 > Fax: 803 777 9558 > Email: richards-john at sc.edu > HTTP: jerlab.psych.sc.edu > *********************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jan 5 09:44:59 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 5 Jan 2015 09:44:59 +0100 Subject: [FieldTrip] SIMBIO tool in Fieldtrip for FEM head modelling In-Reply-To: References: Message-ID: Dear Munsif, The SIMBIO FEM tool that is under development is integrated in FieldTrip, i.e. you do not call it separately. The procedure is that you coregister your anatomical MRI to the same coordinate system in which you want to express your sensor and source locations, segment the MRI and pass the segmented MRI to ft_prepare_mesh and subsequently to ft_prepare_headmodel, which will call the appropriate functions from SIMBIO. Finally, you can call ft_prepare_leadfield (or the lower level ft_compute_leadfield) to compute the forward solutions for the desired source locations. The documentation on http://fieldtrip.fcdonders.nl/development/simbio contains example code. best regards, Robert PS please address future questions to the email list. On 15 Dec 2014, at 05:00, Munsif Jatoi wrote: > Dear Sir, > > I hope you are fine. > > Sir, I am doing PhD in the field of Brain source Localization based on EEG signals at Universiti Teknologi PETRONAS, Perak, Malaysia since 2011. I have developed a MATLAb code based upon SPM8 and Fieldtrip for simulated EEG data. For this, I have used BEM modelling (please find the attached .m file). However, I want to use FEM modelling to compare my results to be taken by using various inverse methods (MUSIC, Min Norm etc.). I have come to know through the website of Fieldtrip (http://fieldtrip.fcdonders.nl/development/simbio) that there is a tool for FEM. When I searched through it, I couldn't find the SIMBIO tool which can be used for FEM head modelling. So can you please help me in this sense. > > > Many Thanks, > Munsif. > > -- > Munsif Ali H.Jatoi, > > Ph D Scholar, > Centre for Intelligent Signals and Imaging Research, > Universiti Teknologi PETRONAS, > Malaysia. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: eegspm_pipeline_withcomments (3).m Type: application/octet-stream Size: 11632 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Mon Jan 5 15:23:20 2015 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Mon, 5 Jan 2015 15:23:20 +0100 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data Message-ID: Hi all, I performed DICS beamforming on resting-state data ( eyes closed) of a clinical population and controls. According to the sensor data, the control groups have more alpha-band (8-14 Hz) activity over occipital areas after cluster statistic (attached figure upper plot) . Curiously, after beamforming , group comparisons showed the reversed patters in visual cortex (attached figure bottom plot) .Hence, the source-level results are opposite to the sensor-level results. This is *not* a problem of the design matrix, or confusing the groups. I check the individual neural activity index on the single subject level . They make sense in general . I also tune the parameter a lot (tapper, central frequency smooth frequency , regularization parameter , et al ), the opposite pattern remains. I understand that Beamformer images DO NOT DIRECTLY CORRESPOND TO ANY sensor data. However, the opposite pattern is really weird. I noticed that Tobias Navarro Schröder had the similar issue 4 years ago ( http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). Thus, I am not the only one who encountered this problem. Any tips and suggestions will be greatly appreciated. Thanks in advance! Best, Hatieng -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: resting_issues.jpg Type: image/jpeg Size: 71312 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: resting_issues.jpg Type: image/jpeg Size: 71312 bytes Desc: not available URL: From a.stolk at fcdonders.ru.nl Mon Jan 5 15:39:25 2015 From: a.stolk at fcdonders.ru.nl (Stolk, A. (Arjen)) Date: Mon, 5 Jan 2015 14:39:25 +0000 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data In-Reply-To: References: Message-ID: Hey Haiteng, Is your contrast based on absolute signal frequency power? If so, did you check for any systematic differences in headposition (and especially in terms of distance to the sensors - the z-dimension) across the groups? I presume such a systematic difference could yield different results at the sensor- and source-level, but there are probably also other possibilities out there. Yours, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Haiteng Jiang [haiteng.jiang at gmail.com] Sent: Monday, January 05, 2015 3:23 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data Hi all, I performed DICS beamforming on resting-state data ( eyes closed) of a clinical population and controls. According to the sensor data, the control groups have more alpha-band (8-14 Hz) activity over occipital areas after cluster statistic (attached figure upper plot) . Curiously, after beamforming , group comparisons showed the reversed patters in visual cortex (attached figure bottom plot) .Hence, the source-level results are opposite to the sensor-level results. This is *not* a problem of the design matrix, or confusing the groups. I check the individual neural activity index on the single subject level . They make sense in general . I also tune the parameter a lot (tapper, central frequency smooth frequency , regularization parameter , et al ), the opposite pattern remains. I understand that Beamformer images DO NOT DIRECTLY CORRESPOND TO ANY sensor data. However, the opposite pattern is really weird. I noticed that Tobias Navarro Schröder had the similar issue 4 years ago (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). Thus, I am not the only one who encountered this problem. Any tips and suggestions will be greatly appreciated. Thanks in advance! [cid:ii_i4jxr2sz1_14aba77f4264462a] Best, Hatieng -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: resting_issues.jpg Type: image/jpeg Size: 71312 bytes Desc: resting_issues.jpg URL: From mark.woolrich at ohba.ox.ac.uk Mon Jan 5 15:46:59 2015 From: mark.woolrich at ohba.ox.ac.uk (Mark Woolrich) Date: Mon, 5 Jan 2015 14:46:59 +0000 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data In-Reply-To: References: Message-ID: Dear Hatieng, This might be the same issue we found when comparing eyes open to eyes shut. Take a look at this technical note to see how we addressed it: http://www.ncbi.nlm.nih.gov/pubmed/24412400 Cheers, Mark. On 5 Jan 2015, at 14:23, Haiteng Jiang > wrote: Hi all, I performed DICS beamforming on resting-state data ( eyes closed) of a clinical population and controls. According to the sensor data, the control groups have more alpha-band (8-14 Hz) activity over occipital areas after cluster statistic (attached figure upper plot) . Curiously, after beamforming , group comparisons showed the reversed patters in visual cortex (attached figure bottom plot) .Hence, the source-level results are opposite to the sensor-level results. This is *not* a problem of the design matrix, or confusing the groups. I check the individual neural activity index on the single subject level . They make sense in general . I also tune the parameter a lot (tapper, central frequency smooth frequency , regularization parameter , et al ), the opposite pattern remains. I understand that Beamformer images DO NOT DIRECTLY CORRESPOND TO ANY sensor data. However, the opposite pattern is really weird. I noticed that Tobias Navarro Schröder had the similar issue 4 years ago (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). Thus, I am not the only one who encountered this problem. Any tips and suggestions will be greatly appreciated. Thanks in advance! Best, Hatieng -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Mon Jan 5 16:12:56 2015 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Mon, 05 Jan 2015 16:12:56 +0100 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data In-Reply-To: References: Message-ID: <54AAA9F8.9050005@fcdonders.ru.nl> Hey Haiteng, Following up on Arjen's point; I've noticed that when people in the MEG close their eyes for a couple of minutes, their heads sometimes drop a little (ie nose moves toward chest). If your clinical group were feeling more drowsy during the recording and thus dropped their heads more, this would lead to exactly the kind of systematic SNR difference that Arjen is describing, and maybe most acutely in posterior sensors. Best, Tom On 1/5/2015 3:39 PM, Stolk, A. (Arjen) wrote: > Hey Haiteng, > > Is your contrast based on absolute signal frequency power? If so, did > you check for any systematic differences in headposition (and > especially in terms of distance to the sensors - the z-dimension) > across the groups? I presume such a systematic difference could yield > different results at the sensor- and source-level, but there are > probably also other possibilities out there. > > Yours, > Arjen > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > Phone: +31(0)243 68294 > Web: www.arjenstolk.nl > ------------------------------------------------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > [fieldtrip-bounces at science.ru.nl] on behalf of Haiteng Jiang > [haiteng.jiang at gmail.com] > *Sent:* Monday, January 05, 2015 3:23 PM > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Opposite DICS Beamforming results on source and > sensor level on resting state data > > Hi all, > > I performed DICS beamforming on resting-state data ( eyes closed) > of a clinical population and controls. According to the sensor data, > the control groups have more alpha-band (8-14 > Hz) activity over occipital areas after cluster statistic (attached > figure upper plot) . Curiously, after beamforming , group > comparisons showed the reversed patters in visual cortex (attached > figure bottom plot) .Hence, the source-level results are opposite to > the sensor-level results. This is *not* a problem of the design > matrix, or confusing the groups. I check the individual neural > activity index on the single subject level . They make sense in > general . I also tune the parameter a lot (tapper, central frequency > smooth frequency , regularization parameter , et al ), the opposite > pattern remains. I understand that Beamformer images DO NOT DIRECTLY > CORRESPOND TO ANY sensor data. However, the opposite pattern is > really weird. I noticed that Tobias Navarro Schröder had the similar > issue 4 years ago > (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). > Thus, I am not the only one who encountered this problem. > Any tips and suggestions will be greatly appreciated. Thanks in > advance! > > > > Best, > Hatieng > > > > -- > Haiteng Jiang > PhD candidate > Donders Institute for Brain, Cognition and Behaviour > Neuronal Oscillations Group > Computational Cognitive Neuroscience Lab > https://sites.google.com/site/haitengjiang/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 71312 bytes Desc: not available URL: From caspervanheck at gmail.com Mon Jan 5 17:02:54 2015 From: caspervanheck at gmail.com (Casper van Heck) Date: Mon, 5 Jan 2015 17:02:54 +0100 Subject: [FieldTrip] Question about how to reduce the file size In-Reply-To: <484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk> References: <484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk> Message-ID: Dear Emilie, I'm using a Windows-based wreck with 8GB ram and 1.5GB files, which never pops over an usage of 4GB, so I am a bit surprised that you're getting issues with your data. Also; reducing the sampling rate that much should reduce the memory footprint to something close to 400mb, at least, which to my mind should not produce issues of any kind. Could you post a bit more of your code? I've been lowering the sampling rate too (5000 to 500), but I'm also cutting the data into smaller pieces, based on markers, effectively splitting the data into four parts, and throwing away more than 80%. Cutting the data into pieces can provide a workaround for memory issues. Detail: while I do filter (and some other details) before the resampling, and I'm only resampling due to time constraints, not crashing behaviour. Also check the memory tutorial: fieldtrip.fcdonders.nl/tutorial/memory Does this help? Casper On Fri, Dec 12, 2014 at 11:24 PM, Caspar, Emilie wrote: > Dear Fieltrippers, > I did a pilot study on one participant today. Now that I'm trying to > analyze my data, I realize that the size file is too big for my computer > (size = 3Gb). Even after one hour, the filters (high pass + low pass) were > not yet achieved. > > So I would like to see how to reduce the size of my sample BEFORE the > filters. > > I know that there is "ft_resampledata", and I did it to reduce the > actual sample rate (= 2048) to 256. However, even with this procedure my > computer is crashing (even with 16 Go RAM). In addition, I'm not sure that > I can resample before filtering (I read different informations). > > Another way I was thinking about was to pre-select electrodes that I > need (only 6 electrodes on 64). But here I have two questions: > - Can I pre-process only some electrodes? Does it really reduce size for > next preprocesses? > - Is this the correct way to ask? As it crashes, not sure it works. > > cfg = []; > cfg.dataset = [ file.name]; > cfg.channel = 'B5', 'B6', 'B15', 'B16'; > allData_prepross = ft_preprocessing(cfg); > cfg.resamplefs = 256; > DataSample = ft_resampledata(cfg, allData_prepross) > > > I would appreciate pieces of advice! > > Many thanks :) > > Emilie > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jan 5 17:55:09 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 5 Jan 2015 17:55:09 +0100 Subject: [FieldTrip] multi plot and layout In-Reply-To: <20EDBE47-BEF4-4F80-BFCA-6F2016A58CC8@ulb.ac.be> References: <20EDBE47-BEF4-4F80-BFCA-6F2016A58CC8@ulb.ac.be> Message-ID: <98D05186-0070-41FF-9F8B-06D77E38F793@donders.ru.nl> Hi Emilie ft_rejectvisual with method=channel does not make use of the layout, so that is not a suitable comparison. Can you do cfg = []; cfg.layout = 'biosemi64.lay'; layout = ft_prepare_layout(cfg) and compare layout.label with the labels in the data? Or you can also simply open the biosemi64.lay file in a text editor. best regards, Robert On 02 Jan 2015, at 11:23, Emilie Caspar wrote: > Dear Fieldtrippers, > > It's probably a very simple question but I don't understand the problem. > > I would like to use multi plot and topoplot for my data. > So I wrote: > > cfg = []; > cfg.xlim = [-0.1 0.4]; > cfg.ylim = [-10 13]; > cfg.layout = 'biosemi64.lay'; > figure; > ft_multiplotER(cfg, avgRobotC_ToneC, avgRobotC_ToneI, avgRobotI_ToneC, avgRobotI_ToneI); > > > However, the mistake indicates that labels in data and labels in layout do not match. However, I'm sure of the layout I'm using and in addition, when I'm using the ft_rejectvisual (in the same script) with the following line codes, it works very well: > > cfg = []; > cfg.alim = 100; > cfg.keepchannel = 'yes'; > cfg.layout = 'biosemi64.lay'; > cfg.method = 'channel'; %% Or 'trial' > cfg.metric = 'var'; > clean_data = ft_rejectvisual(cfg, epData); > …... > > So I clearly don't understand why multi plot and topoplot do not accept this layout, while the layout is accepted for another function in the same script on the same data. Singleplot works very well. > > Have you any idea? > > Thanks! > > Emilie > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jan 5 18:09:08 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 5 Jan 2015 18:09:08 +0100 Subject: [FieldTrip] Question about how to reduce the file size In-Reply-To: References: <484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk> Message-ID: <336FFF24-331E-441A-8BB3-56B00B130D0E@donders.ru.nl> Hi Casper, Biosemi files are often problematic. The files themselves are 24 bit, which makes them efficient on disk (although though they are still huge on disk), but once in memory they take 64 bit per sample. So your 3GB becomes 8GB in memory, not accounting for any overhead. Depending on the analysis pipeline, it might well be that two copies of the data are needed in memory (so 16GB), plus further overhead. Note that downampling requires that a low-pass filter is applied prior to downsampling to avoid aliassing (http://en.wikipedia.org/wiki/Aliasing). This happens automatically in ft_resampledata (look for cfg.resamplemethod and related comments in the code). You can use a strategy like this cfg1 = []; cfg1.dataset = yourfilename; cfg1 = ... cfg1 = ft_definetrial(cfg1); % this part is optional, without it it results in continuous data in memory cfg2 = []; cfg2.resamplefs = 500; for i=1:nchan cfg1.channel = i; % you can use a number as well as a string temp = ft_preprocessing(cfg1); singlechan{i} = ft_resampledata(cfg2, temp); clear temp; end % for all channels data = ft_appenddata([], singlechan{:}); This reads and downsamples the data one channel at a time. best regards, Robert On 05 Jan 2015, at 17:02, Casper van Heck wrote: > Dear Emilie, > > I'm using a Windows-based wreck with 8GB ram and 1.5GB files, which never pops over an usage of 4GB, so I am a bit surprised that you're getting issues with your data. Also; reducing the sampling rate that much should reduce the memory footprint to something close to 400mb, at least, which to my mind should not produce issues of any kind. Could you post a bit more of your code? > > I've been lowering the sampling rate too (5000 to 500), but I'm also cutting the data into smaller pieces, based on markers, effectively splitting the data into four parts, and throwing away more than 80%. Cutting the data into pieces can provide a workaround for memory issues. Detail: while I do filter (and some other details) before the resampling, and I'm only resampling due to time constraints, not crashing behaviour. > > Also check the memory tutorial: fieldtrip.fcdonders.nl/tutorial/memory > > Does this help? > > Casper > > On Fri, Dec 12, 2014 at 11:24 PM, Caspar, Emilie wrote: > Dear Fieltrippers, > > I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved. > > So I would like to see how to reduce the size of my sample BEFORE the filters. > > I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different informations). > > Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions: > - Can I pre-process only some electrodes? Does it really reduce size for next preprocesses? > - Is this the correct way to ask? As it crashes, not sure it works. > > cfg = []; > cfg.dataset = [ file.name]; > cfg.channel = 'B5', 'B6', 'B15', 'B16'; > allData_prepross = ft_preprocessing(cfg); > cfg.resamplefs = 256; > DataSample = ft_resampledata(cfg, allData_prepross) > > > I would appreciate pieces of advice! > > Many thanks :) > > Emilie > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ecaspar at ulb.ac.be Mon Jan 5 22:00:27 2015 From: ecaspar at ulb.ac.be (Emilie Caspar) Date: Mon, 5 Jan 2015 22:00:27 +0100 Subject: [FieldTrip] multi plot and layout In-Reply-To: <98D05186-0070-41FF-9F8B-06D77E38F793@donders.ru.nl> References: <20EDBE47-BEF4-4F80-BFCA-6F2016A58CC8@ulb.ac.be> <98D05186-0070-41FF-9F8B-06D77E38F793@donders.ru.nl> Message-ID: Dear Robert, Thank you for your answer. Indeed, biosemi electrodes have two labels, the "official" name, and a specific name related to their system. If I relabel my electrodes, the layout will certainly works. Best regards, Emilie On 5 janv. 2015, at 17:55, Robert Oostenveld wrote: > Hi Emilie > > ft_rejectvisual with method=channel does not make use of the layout, so that is not a suitable comparison. > > Can you do > > cfg = []; > cfg.layout = 'biosemi64.lay'; > layout = ft_prepare_layout(cfg) > > and compare layout.label with the labels in the data? Or you can also simply open the biosemi64.lay file in a text editor. > > best regards, > Robert > > > On 02 Jan 2015, at 11:23, Emilie Caspar wrote: > >> Dear Fieldtrippers, >> >> It's probably a very simple question but I don't understand the problem. >> >> I would like to use multi plot and topoplot for my data. >> So I wrote: >> >> cfg = []; >> cfg.xlim = [-0.1 0.4]; >> cfg.ylim = [-10 13]; >> cfg.layout = 'biosemi64.lay'; >> figure; >> ft_multiplotER(cfg, avgRobotC_ToneC, avgRobotC_ToneI, avgRobotI_ToneC, avgRobotI_ToneI); >> >> >> However, the mistake indicates that labels in data and labels in layout do not match. However, I'm sure of the layout I'm using and in addition, when I'm using the ft_rejectvisual (in the same script) with the following line codes, it works very well: >> >> cfg = []; >> cfg.alim = 100; >> cfg.keepchannel = 'yes'; >> cfg.layout = 'biosemi64.lay'; >> cfg.method = 'channel'; %% Or 'trial' >> cfg.metric = 'var'; >> clean_data = ft_rejectvisual(cfg, epData); >> …... >> >> So I clearly don't understand why multi plot and topoplot do not accept this layout, while the layout is accepted for another function in the same script on the same data. Singleplot works very well. >> >> Have you any idea? >> >> Thanks! >> >> Emilie >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Mon Jan 5 22:10:26 2015 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Mon, 5 Jan 2015 22:10:26 +0100 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data (Stolk, A. (Arjen)) Message-ID: Hi Arjen, Thanks for your response. I actually tried both (absolute power and nai). Both of them are still opposite when comparing sensor level to source level. Besides, I have the task data. It works fine on the contrast. Therefore, I assume the co-registration is OK in general. However, I have no fiducial points in the MRI scans, so I have to select the nas, lpa and rpa with no physical reference. Therefore , it is possible that the two group have systematic differences in head position. I will check that. All the best, Haiteng > > > Message: 2 > Date: Mon, 5 Jan 2015 14:39:25 +0000 > From: "Stolk, A. (Arjen)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Opposite DICS Beamforming results on source > and sensor level on resting state data > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hey Haiteng, > > Is your contrast based on absolute signal frequency power? If so, did you > check for any systematic differences in headposition (and especially in > terms of distance to the sensors - the z-dimension) across the groups? I > presume such a systematic difference could yield different results at the > sensor- and source-level, but there are probably also other possibilities > out there. > > Yours, > Arjen > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > Phone: +31(0)243 68294 > Web: www.arjenstolk.nl > ________________________________ > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Haiteng Jiang [haiteng.jiang at gmail.com] > Sent: Monday, January 05, 2015 3:23 PM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Opposite DICS Beamforming results on source and > sensor level on resting state data > > Hi all, > > I performed DICS beamforming on resting-state data ( eyes closed) of a > clinical population and controls. According to the sensor data, the > control groups have more alpha-band (8-14 > Hz) activity over occipital areas after cluster statistic (attached > figure upper plot) . Curiously, after beamforming , group comparisons > showed the reversed patters in visual cortex (attached figure bottom plot) > .Hence, the source-level results are opposite to the sensor-level results. > This is *not* a problem of the design matrix, or confusing the groups. I > check the individual neural activity index on the single subject level . > They make sense in general . I also tune the parameter a lot (tapper, > central frequency smooth frequency , regularization parameter , et al ), > the opposite pattern remains. I understand that Beamformer images DO NOT > DIRECTLY CORRESPOND TO ANY sensor data. However, the opposite pattern is > really weird. I noticed that Tobias Navarro Schr?der had the similar > issue 4 years ago ( > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). > Thus, I am not the only one who encountered this problem. > > Any tips and suggestions will be greatly appreciated. Thanks in > advance! > [cid:ii_i4jxr2sz1_14aba77f4264462a] > > > Best, > Hatieng > > > > > > > -- > Haiteng Jiang > PhD candidate > Donders Institute for Brain, Cognition and Behaviour > Neuronal Oscillations Group > Computational Cognitive Neuroscience Lab > https://sites.google.com/site/haitengjiang/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150105/0843735d/attachment.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: resting_issues.jpg > Type: image/jpeg > Size: 71312 bytes > Desc: resting_issues.jpg > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150105/0843735d/attachment.jpg > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 50, Issue 3 > **************************************** > -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Tue Jan 6 08:13:34 2015 From: yoniilevy at gmail.com (Yoni Levy) Date: Tue, 6 Jan 2015 09:13:34 +0200 Subject: [FieldTrip] Cluster-based permutation tests for between-subject design Message-ID: Dear Eric, Following up on the thread from about 2 months ago, in your reply (in FAQs: http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), when you mention the mixed between-within-subjects design, I assume that you refer to a design with two subjects groups which are of equal size (e.g. 12 participants vs 12 participants, and not 14 participants vs 12 participants). I assume that in the latter case (unequal groups' size), testing the interaction effect would not be possible; correct? Thanks, Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Tue Jan 6 13:10:46 2015 From: yoniilevy at gmail.com (Yoni Levy) Date: Tue, 6 Jan 2015 14:10:46 +0200 Subject: [FieldTrip] Cluster-based permutation tests for between-subject design Message-ID: More specifically, I was wondering about the recipe for a 2x2 mixed between-within-subjects design (with 2 groups of unequal size). For instance, provided I have two groups: the first with subj1 till subj12 (12 participants), and the second with subj21 till subj34 (14 participants), and each participant with 2 conditions. Then for each participant i calculate the difference between the 2 conditions (subjXdiff) (say for instance, the difference in power in each grid point), and then compare the two groups with an indepsamplesT: subj1diff, ... subj12diff versus subj21diff,.. subj34diff. Would such an indepsamplesT test correspond to testing the interaction between group and condition? Thanks, Yoni On Tue, Jan 6, 2015 at 9:13 AM, Yoni Levy wrote: > Dear Eric, > > Following up on the thread from about 2 months ago, in your reply (in > FAQs: > http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), > when you mention the mixed between-within-subjects design, I assume > that you refer to a design with two subjects groups which are of equal size > (e.g. 12 participants vs 12 participants, and not 14 participants vs 12 > participants). I assume that in the latter case (unequal groups' size), > testing the interaction effect would not be possible; correct? > > Thanks, > Yoni > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.garcia.d at gmail.com Tue Jan 6 21:48:58 2015 From: l.garcia.d at gmail.com (Luis Garcia Dominguez) Date: Tue, 6 Jan 2015 15:48:58 -0500 Subject: [FieldTrip] Cluster-based permutation tests for between-subject design In-Reply-To: References: Message-ID: Hello all, I have a problem when using the ft_dipolefitting function in two different versions. The old version of the function gives me the accurate result and a low residual variance (RV) while the new version produce a totally off localization with high RV. I have attached a .mat file with the two inputs to the function (cfg and timelock) for easy reproducibility. Steps: 1) load('input_variables.mat') % the file attached 2) fix the path to the standard bem file in the appropiate field of cfg as: cfg.hdmfile = [path 'standard_bem.mat] 3) run: source = ft_dipolefitting(cfg, timelock); In the version that comes with EEGlab 11.0.4.4b (which shows a revision = '$Id: ft_dipolefitting.m 5439 2012-03-12 13:17:15Z giopia $';) a local minimun is found and the dipole is: >> source.dip ans = pos: [51.7641 24.5471 -35.4362] mom: [3x1 double] pot: [27x1 double] rv: 0.0218 While in the most recent fieldtrip version: ans = pos: [-45.2455 -86.2421 -15.2132] mom: [3x1 double] pot: [27x1 double] rv: 0.5848 I have intracranial electrodes that show that the solution from the old dipolefitting function is the right one. Can you please, help me to understand what is the source of this huge difference? Thanks! On 6 January 2015 at 02:13, Yoni Levy wrote: > Dear Eric, > > Following up on the thread from about 2 months ago, in your reply (in > FAQs: > http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), > when you mention the mixed between-within-subjects design, I assume > that you refer to a design with two subjects groups which are of equal size > (e.g. 12 participants vs 12 participants, and not 14 participants vs 12 > participants). I assume that in the latter case (unequal groups' size), > testing the interaction effect would not be possible; correct? > > Thanks, > Yoni > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: input_variables.mat Type: application/octet-stream Size: 87154 bytes Desc: not available URL: From laetitia.grabot at gmail.com Wed Jan 7 09:57:28 2015 From: laetitia.grabot at gmail.com (Laetitia Grabot) Date: Wed, 7 Jan 2015 09:57:28 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip Message-ID: Dear all, I would like to read in fieldtrip a epoch file (.fif) created in mne-python. As adviced in the website section "integrate fieldtrip and MNE-Python", I used the following piece of code: *cfg = [];cfg.dataset = filename;data1 = ft_preprocessing(cfg);* And I get the following error: *Error using fiff_setup_read_raw (line 89)No raw data in/neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fifError in fiff_setup_read_raw (line 89) error(me,'No raw data in %s',fname);Error in ft_read_header (line 1157) raw = fiff_setup_read_raw(filename);Error in ft_preprocessing (line 338) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat);* It seems that there is a problem at the level of the header of the file. Any help would be appreciated if someone already solved this issue. By the way, this piece of code works well to read an evoked file without error. Thanks a lot, Best, Laetitia G. -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.engemann at fz-juelich.de Wed Jan 7 12:57:13 2015 From: d.engemann at fz-juelich.de (Denis-Alexander Engemann) Date: Wed, 7 Jan 2015 12:57:13 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Hi Laetitia, here's a tutorial on integrating Fieldtrip with MNE-Python: http://fieldtrip.fcdonders.nl/development/integrate_with_mne You should make sure to use recent fieldtrip code, the support for reading MNE-Python epochs has been added quite recently to the MNE-Matlab tools used inside Fieldtrip. HTH, Denis 2015-01-07 9:57 GMT+01:00 Laetitia Grabot >: Dear all, I would like to read in fieldtrip a epoch file (.fif) created in mne-python. As adviced in the website section "integrate fieldtrip and MNE-Python", I used the following piece of code: cfg = []; cfg.dataset = filename; data1 = ft_preprocessing(cfg); And I get the following error: Error using fiff_setup_read_raw (line 89) No raw data in /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif Error in fiff_setup_read_raw (line 89) error(me,'No raw data in %s',fname); Error in ft_read_header (line 1157) raw = fiff_setup_read_raw(filename); Error in ft_preprocessing (line 338) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); It seems that there is a problem at the level of the header of the file. Any help would be appreciated if someone already solved this issue. By the way, this piece of code works well to read an evoked file without error. Thanks a lot, Best, Laetitia G. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From laetitia.grabot at gmail.com Wed Jan 7 13:43:21 2015 From: laetitia.grabot at gmail.com (Laetitia Grabot) Date: Wed, 7 Jan 2015 13:43:21 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Thanks Denis for the quick answer! My code looks the same than in the tutorial, that's why I don't understand the problem. I tried with the latest version of the day of Fieldtrip, but I still have the same error. 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann < d.engemann at fz-juelich.de>: > Hi Laetitia, > > here's a tutorial on integrating Fieldtrip with MNE-Python: > > http://fieldtrip.fcdonders.nl/development/integrate_with_mne > > You should make sure to use recent fieldtrip code, the support for > reading MNE-Python epochs has been added quite recently to the MNE-Matlab > tools used inside Fieldtrip. > > HTH, > Denis > > > > > > 2015-01-07 9:57 GMT+01:00 Laetitia Grabot : > >> Dear all, >> I would like to read in fieldtrip a epoch file (.fif) created in >> mne-python. As adviced in the website section "integrate fieldtrip and >> MNE-Python", I used the following piece of code: >> >> >> >> * cfg = []; cfg.dataset = filename; data1 = ft_preprocessing(cfg);* >> >> And I get the following error: >> >> >> >> >> >> >> >> >> >> >> >> >> >> *Error using fiff_setup_read_raw (line 89) No raw data in >> /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif >> Error in fiff_setup_read_raw (line 89) error(me,'No raw data in >> %s',fname); Error in ft_read_header (line 1157) raw = >> fiff_setup_read_raw(filename); Error in ft_preprocessing (line 338) hdr = >> ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); * >> It seems that there is a problem at the level of the header of the file. >> Any help would be appreciated if someone already solved this issue. By the >> way, this piece of code works well to read an evoked file without error. >> >> Thanks a lot, >> Best, >> Laetitia G. >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > Forschungszentrum Juelich GmbH > 52425 Juelich > Sitz der Gesellschaft: Juelich > Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 > Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher > Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), > Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, > Prof. Dr. Sebastian M. Schmidt > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.engemann at fz-juelich.de Wed Jan 7 14:24:40 2015 From: d.engemann at fz-juelich.de (Denis-Alexander Engemann) Date: Wed, 7 Jan 2015 14:24:40 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Mhm. That's weird. Could you save a single epoch to disk and share it privately via email? If the epoch is large you could crop it using ``epochs.crop``. --Denis 2015-01-07 13:43 GMT+01:00 Laetitia Grabot : > Thanks Denis for the quick answer! > My code looks the same than in the tutorial, that's why I don't understand > the problem. I tried with the latest version of the day of Fieldtrip, but I > still have the same error. > > 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann < > d.engemann at fz-juelich.de>: > >> Hi Laetitia, >> >> here's a tutorial on integrating Fieldtrip with MNE-Python: >> >> http://fieldtrip.fcdonders.nl/development/integrate_with_mne >> >> You should make sure to use recent fieldtrip code, the support for >> reading MNE-Python epochs has been added quite recently to the MNE-Matlab >> tools used inside Fieldtrip. >> >> HTH, >> Denis >> >> >> >> >> >> 2015-01-07 9:57 GMT+01:00 Laetitia Grabot : >> >>> Dear all, >>> I would like to read in fieldtrip a epoch file (.fif) created in >>> mne-python. As adviced in the website section "integrate fieldtrip and >>> MNE-Python", I used the following piece of code: >>> >>> >>> >>> * cfg = []; cfg.dataset = filename; data1 = ft_preprocessing(cfg);* >>> >>> And I get the following error: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *Error using fiff_setup_read_raw (line 89) No raw data in >>> /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif >>> Error in fiff_setup_read_raw (line 89) error(me,'No raw data in >>> %s',fname); Error in ft_read_header (line 1157) raw = >>> fiff_setup_read_raw(filename); Error in ft_preprocessing (line 338) hdr = >>> ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); * >>> It seems that there is a problem at the level of the header of the >>> file. Any help would be appreciated if someone already solved this issue. >>> By the way, this piece of code works well to read an evoked file without >>> error. >>> >>> Thanks a lot, >>> Best, >>> Laetitia G. >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> >> ------------------------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------------------------ >> Forschungszentrum Juelich GmbH >> 52425 Juelich >> Sitz der Gesellschaft: Juelich >> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 >> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher >> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), >> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, >> Prof. Dr. Sebastian M. Schmidt >> >> ------------------------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at telecom-paristech.fr Wed Jan 7 14:28:36 2015 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Wed, 7 Jan 2015 14:28:36 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: hi, how do you specify that your fif file is an epochs file and not a raw file? epochs files should end with -epo.fif calling fiff_setup_read_raw.m suggests that fieldtrip thinks it's a raw file. HTH Alex On Wed, Jan 7, 2015 at 1:43 PM, Laetitia Grabot wrote: > Thanks Denis for the quick answer! > My code looks the same than in the tutorial, that's why I don't understand > the problem. I tried with the latest version of the day of Fieldtrip, but I > still have the same error. > > 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann > : >> >> Hi Laetitia, >> >> here's a tutorial on integrating Fieldtrip with MNE-Python: >> >> http://fieldtrip.fcdonders.nl/development/integrate_with_mne >> >> You should make sure to use recent fieldtrip code, the support for reading >> MNE-Python epochs has been added quite recently to the MNE-Matlab tools used >> inside Fieldtrip. >> >> HTH, >> Denis >> >> >> >> >> >> 2015-01-07 9:57 GMT+01:00 Laetitia Grabot : >>> >>> Dear all, >>> I would like to read in fieldtrip a epoch file (.fif) created in >>> mne-python. As adviced in the website section "integrate fieldtrip and >>> MNE-Python", I used the following piece of code: >>> >>> cfg = []; >>> cfg.dataset = filename; >>> data1 = ft_preprocessing(cfg); >>> >>> And I get the following error: >>> >>> Error using fiff_setup_read_raw (line 89) >>> No raw data in >>> >>> /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif >>> >>> Error in fiff_setup_read_raw (line 89) >>> error(me,'No raw data in %s',fname); >>> >>> Error in ft_read_header (line 1157) >>> raw = fiff_setup_read_raw(filename); >>> >>> Error in ft_preprocessing (line 338) >>> hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); >>> >>> It seems that there is a problem at the level of the header of the file. >>> Any help would be appreciated if someone already solved this issue. By the >>> way, this piece of code works well to read an evoked file without error. >>> >>> Thanks a lot, >>> Best, >>> Laetitia G. >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> >> ------------------------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------------------------ >> Forschungszentrum Juelich GmbH >> 52425 Juelich >> Sitz der Gesellschaft: Juelich >> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 >> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher >> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), >> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, >> Prof. Dr. Sebastian M. Schmidt >> >> ------------------------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > From laetitia.grabot at gmail.com Wed Jan 7 16:20:21 2015 From: laetitia.grabot at gmail.com (Laetitia Grabot) Date: Wed, 7 Jan 2015 16:20:21 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: I just realized that I was not using the recent version I just downloaded (problem of multiple fieldtrip paths) but now that is ok. I also tried to change the path name to '-epo.fif'. Yet, I still have an error: My code: *%testfilename = '/neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epoch_test_LG-epo.fif' ;cfg = [];cfg.dataset = filename;data1 = ft_preprocessing(cfg);* The error: *Reference to non-existent field 'FIFFB_EPOCHS'.Error in fiff_read_epochs (line 43)ep = fiff_dir_tree_find(meas, FIFF.FIFFB_EPOCHS);Error in ft_read_header (line 1388) epochs = fiff_read_epochs(filename);Error in ft_preprocessing (line 396) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat);* Thanks again, Laetitia 2015-01-07 14:28 GMT+01:00 Alexandre Gramfort < alexandre.gramfort at telecom-paristech.fr>: > hi, > > how do you specify that your fif file is an epochs file and not a raw file? > > epochs files should end with -epo.fif > > calling fiff_setup_read_raw.m suggests that fieldtrip thinks it's a raw > file. > > HTH > Alex > > On Wed, Jan 7, 2015 at 1:43 PM, Laetitia Grabot > wrote: > > Thanks Denis for the quick answer! > > My code looks the same than in the tutorial, that's why I don't > understand > > the problem. I tried with the latest version of the day of Fieldtrip, > but I > > still have the same error. > > > > 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann > > : > >> > >> Hi Laetitia, > >> > >> here's a tutorial on integrating Fieldtrip with MNE-Python: > >> > >> http://fieldtrip.fcdonders.nl/development/integrate_with_mne > >> > >> You should make sure to use recent fieldtrip code, the support for > reading > >> MNE-Python epochs has been added quite recently to the MNE-Matlab tools > used > >> inside Fieldtrip. > >> > >> HTH, > >> Denis > >> > >> > >> > >> > >> > >> 2015-01-07 9:57 GMT+01:00 Laetitia Grabot : > >>> > >>> Dear all, > >>> I would like to read in fieldtrip a epoch file (.fif) created in > >>> mne-python. As adviced in the website section "integrate fieldtrip and > >>> MNE-Python", I used the following piece of code: > >>> > >>> cfg = []; > >>> cfg.dataset = filename; > >>> data1 = ft_preprocessing(cfg); > >>> > >>> And I get the following error: > >>> > >>> Error using fiff_setup_read_raw (line 89) > >>> No raw data in > >>> > >>> > /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif > >>> > >>> Error in fiff_setup_read_raw (line 89) > >>> error(me,'No raw data in %s',fname); > >>> > >>> Error in ft_read_header (line 1157) > >>> raw = fiff_setup_read_raw(filename); > >>> > >>> Error in ft_preprocessing (line 338) > >>> hdr = ft_read_header(cfg.headerfile, 'headerformat', > cfg.headerformat); > >>> > >>> It seems that there is a problem at the level of the header of the > file. > >>> Any help would be appreciated if someone already solved this issue. By > the > >>> way, this piece of code works well to read an evoked file without > error. > >>> > >>> Thanks a lot, > >>> Best, > >>> Laetitia G. > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> > >> > >> > >> > >> > ------------------------------------------------------------------------------------------------ > >> > >> > ------------------------------------------------------------------------------------------------ > >> Forschungszentrum Juelich GmbH > >> 52425 Juelich > >> Sitz der Gesellschaft: Juelich > >> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 > >> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher > >> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), > >> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, > >> Prof. Dr. Sebastian M. Schmidt > >> > >> > ------------------------------------------------------------------------------------------------ > >> > >> > ------------------------------------------------------------------------------------------------ > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > The information in this e-mail is intended only for the person to whom > it is > > addressed. If you believe this e-mail was sent to you in error and the > > e-mail > > contains patient information, please contact the Partners Compliance > > HelpLine at > > http://www.partners.org/complianceline . If the e-mail was sent to you > in > > error > > but does not contain patient information, please contact the sender and > > properly > > dispose of the e-mail. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at telecom-paristech.fr Wed Jan 7 18:00:25 2015 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Wed, 7 Jan 2015 18:00:25 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Laetitia, can you share the file so we can look into it? Alex From d.engemann at fz-juelich.de Wed Jan 7 18:14:48 2015 From: d.engemann at fz-juelich.de (Denis-Alexander Engemann) Date: Wed, 7 Jan 2015 18:14:48 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Already solved. Apparently a path issue with another MNE-Matlab. 2015-01-07 18:00 GMT+01:00 Alexandre Gramfort >: Laetitia, can you share the file so we can look into it? Alex _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From laetitia.grabot at gmail.com Wed Jan 7 19:04:00 2015 From: laetitia.grabot at gmail.com (Laetitia Grabot) Date: Wed, 7 Jan 2015 19:04:00 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Yes, I cleaned up my (too numerous) matlab and fieldtrip paths and it works, thanks! 2015-01-07 18:14 GMT+01:00 Denis-Alexander Engemann < d.engemann at fz-juelich.de>: > Already solved. Apparently a path issue with another MNE-Matlab. > > 2015-01-07 18:00 GMT+01:00 Alexandre Gramfort < > alexandre.gramfort at telecom-paristech.fr>: > >> Laetitia, >> >> can you share the file so we can look into it? >> >> Alex >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > Forschungszentrum Juelich GmbH > 52425 Juelich > Sitz der Gesellschaft: Juelich > Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 > Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher > Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), > Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, > Prof. Dr. Sebastian M. Schmidt > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Thu Jan 8 12:26:52 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Thu, 8 Jan 2015 11:26:52 +0000 Subject: [FieldTrip] Cluster-based permutation tests for between-subject design In-Reply-To: References: Message-ID: <39F7E98E967D3F48B543DDBD9C94213546E364@exprd02.hosting.ru.nl> Yes, and this should also be exactly the recipe on the FAQ page. Best, Eric From: Yoni Levy [mailto:yoniilevy at gmail.com] Sent: dinsdag 6 januari 2015 13:11 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Cluster-based permutation tests for between-subject design More specifically, I was wondering about the recipe for a 2x2 mixed between-within-subjects design (with 2 groups of unequal size). For instance, provided I have two groups: the first with subj1 till subj12 (12 participants), and the second with subj21 till subj34 (14 participants), and each participant with 2 conditions. Then for each participant i calculate the difference between the 2 conditions (subjXdiff) (say for instance, the difference in power in each grid point), and then compare the two groups with an indepsamplesT: subj1diff, ... subj12diff versus subj21diff,.. subj34diff. Would such an indepsamplesT test correspond to testing the interaction between group and condition? Thanks, Yoni On Tue, Jan 6, 2015 at 9:13 AM, Yoni Levy > wrote: Dear Eric, Following up on the thread from about 2 months ago, in your reply (in FAQs: http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), when you mention the mixed between-within-subjects design, I assume that you refer to a design with two subjects groups which are of equal size (e.g. 12 participants vs 12 participants, and not 14 participants vs 12 participants). I assume that in the latter case (unequal groups' size), testing the interaction effect would not be possible; correct? Thanks, Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Thu Jan 8 14:26:13 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Thu, 8 Jan 2015 13:26:13 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... Message-ID: Dear all, I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". What would your reply? I expect angry emails from you : ) Bests, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jan 8 14:43:57 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 8 Jan 2015 14:43:57 +0100 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: References: Message-ID: Dear Davide, Now I'm very curious how you described FieldTrip in the manuscript! Best, Eelke On 8 January 2015 at 14:26, Davide Rivolta wrote: > > Dear all, > > I have recently used FT (and DICS in particular) for the analysis of a > pharmaco-MEG study. > > One of the reviewers of our submitted manuscript is not fully convinced > about FT. Here is his comment: > > "More details regarding what software was used to implement the beamforrmer > is important to properly assess the validity of the results. It does not > appear that the authors used currently available validated software to > perform this analysis". > > What would your reply? > I expect angry emails from you : ) > > > Bests, > Davide > From r.oostenveld at donders.ru.nl Thu Jan 8 18:13:34 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 8 Jan 2015 17:13:34 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: References: Message-ID: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl> Hi Davide, Ideally reviewers have expertise in all aspects of the paper that they review. But reviewers are not all-knowledgeable and hence it shoudl not come as a surprise that a reviewer might not be able to properly assess certain aspects of the study. I don’t know how you referred to the software that you used in your analysis, but presume that you cited the FieldTrip reference paper. In the response to the reviewer you could furthermore point out http://fieldtrip.fcdonders.nl/publications. Note that I still should update it for 2014. Alternatively, you could point to http://scholar.google.com/scholar?cites=5316958122258245287&scisbd=1 which automatically lists all papers that have cited our reference paper. You might also point out that Joaching Gross (who should be considered “the" authority on DICS) is using the same FieldTrip software himself. Showing these citations of scientific papers prior to yours that have relied on the FieldTrip software is still no argument for it being “validated software”. But I hope that it raises the confidence of the reviewer that the software you used is not the result of a toy project. Formally validated software is in general difficult to come by, and I would actually be curious as to which software packages the reviewer considers as “validated" for MEG analysis. cheers Robert On 08 Jan 2015, at 13:26, Davide Rivolta wrote: > > Dear all, > > I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. > > One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: > > "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". > > What would your reply? > I expect angry emails from you : ) > > > Bests, > Davide > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Thu Jan 8 19:16:06 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Thu, 8 Jan 2015 18:16:06 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl> References: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl> Message-ID: <478FDC02-2816-4BF5-A615-3EC227978103@gmail.com> Dear Robert, Many thanks for your kind reply. Yes, I fully cited FieldTrip in the original submission. It is indeed a good idea to list all the papers that have used FT. I will follow all your advice. Bests, Davide Sent from my iPad > On 8 Jan 2015, at 17:13, Robert Oostenveld wrote: > > Hi Davide, > > Ideally reviewers have expertise in all aspects of the paper that they review. But reviewers are not all-knowledgeable and hence it shoudl not come as a surprise that a reviewer might not be able to properly assess certain aspects of the study. > > I don’t know how you referred to the software that you used in your analysis, but presume that you cited the FieldTrip reference paper. In the response to the reviewer you could furthermore point out http://fieldtrip.fcdonders.nl/publications. Note that I still should update it for 2014. Alternatively, you could point to http://scholar.google.com/scholar?cites=5316958122258245287&scisbd=1 which automatically lists all papers that have cited our reference paper. You might also point out that Joaching Gross (who should be considered “the" authority on DICS) is using the same FieldTrip software himself. > > Showing these citations of scientific papers prior to yours that have relied on the FieldTrip software is still no argument for it being “validated software”. But I hope that it raises the confidence of the reviewer that the software you used is not the result of a toy project. Formally validated software is in general difficult to come by, and I would actually be curious as to which software packages the reviewer considers as “validated" for MEG analysis. > > cheers > Robert > > >> On 08 Jan 2015, at 13:26, Davide Rivolta wrote: >> >> >> Dear all, >> >> I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. >> >> One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: >> >> "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". >> >> What would your reply? >> I expect angry emails from you : ) >> >> >> Bests, >> Davide >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Thu Jan 8 19:32:11 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Thu, 8 Jan 2015 18:32:11 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: <478FDC02-2816-4BF5-A615-3EC227978103@gmail.com> References: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl>, <478FDC02-2816-4BF5-A615-3EC227978103@gmail.com> Message-ID: Hi Davide, I presume that you did mention that Fieldtrip is a(n open source) Matlab toolbox, not a stand-alone piece of software. Good luck with the resubmission! Stan Op 8 jan. 2015 om 19:28 heeft "Davide Rivolta" > het volgende geschreven: Dear Robert, Many thanks for your kind reply. Yes, I fully cited FieldTrip in the original submission. It is indeed a good idea to list all the papers that have used FT. I will follow all your advice. Bests, Davide Sent from my iPad On 8 Jan 2015, at 17:13, Robert Oostenveld > wrote: Hi Davide, Ideally reviewers have expertise in all aspects of the paper that they review. But reviewers are not all-knowledgeable and hence it shoudl not come as a surprise that a reviewer might not be able to properly assess certain aspects of the study. I don’t know how you referred to the software that you used in your analysis, but presume that you cited the FieldTrip reference paper. In the response to the reviewer you could furthermore point out http://fieldtrip.fcdonders.nl/publications. Note that I still should update it for 2014. Alternatively, you could point to http://scholar.google.com/scholar?cites=5316958122258245287&scisbd=1 which automatically lists all papers that have cited our reference paper. You might also point out that Joaching Gross (who should be considered “the" authority on DICS) is using the same FieldTrip software himself. Showing these citations of scientific papers prior to yours that have relied on the FieldTrip software is still no argument for it being “validated software”. But I hope that it raises the confidence of the reviewer that the software you used is not the result of a toy project. Formally validated software is in general difficult to come by, and I would actually be curious as to which software packages the reviewer considers as “validated" for MEG analysis. cheers Robert On 08 Jan 2015, at 13:26, Davide Rivolta > wrote: Dear all, I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". What would your reply? I expect angry emails from you : ) Bests, Davide _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Thu Jan 8 19:34:31 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Thu, 8 Jan 2015 18:34:31 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: References: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl> <478FDC02-2816-4BF5-A615-3EC227978103@gmail.com> Message-ID: <4382326E-2975-4DF9-BECF-8991395F27CE@gmail.com> Hi Stan, Yes, I did indicate that it is an open source Matlab toolbox. Thanks! Davide Sent from my iPad > On 8 Jan 2015, at 18:32, Pelt, S. van (Stan) wrote: > > Hi Davide, > > I presume that you did mention that Fieldtrip is a(n open source) Matlab toolbox, not a stand-alone piece of software. > > Good luck with the resubmission! > Stan > > Op 8 jan. 2015 om 19:28 heeft "Davide Rivolta" het volgende geschreven: > >> Dear Robert, >> >> Many thanks for your kind reply. Yes, I fully cited FieldTrip in the original submission. >> It is indeed a good idea to list all the papers that have used FT. I will follow all your advice. >> >> Bests, >> Davide >> >> Sent from my iPad >> >> On 8 Jan 2015, at 17:13, Robert Oostenveld wrote: >> >>> Hi Davide, >>> >>> Ideally reviewers have expertise in all aspects of the paper that they review. But reviewers are not all-knowledgeable and hence it shoudl not come as a surprise that a reviewer might not be able to properly assess certain aspects of the study. >>> >>> I don’t know how you referred to the software that you used in your analysis, but presume that you cited the FieldTrip reference paper. In the response to the reviewer you could furthermore point out http://fieldtrip.fcdonders.nl/publications. Note that I still should update it for 2014. Alternatively, you could point to http://scholar.google.com/scholar?cites=5316958122258245287&scisbd=1 which automatically lists all papers that have cited our reference paper. You might also point out that Joaching Gross (who should be considered “the" authority on DICS) is using the same FieldTrip software himself. >>> >>> Showing these citations of scientific papers prior to yours that have relied on the FieldTrip software is still no argument for it being “validated software”. But I hope that it raises the confidence of the reviewer that the software you used is not the result of a toy project. Formally validated software is in general difficult to come by, and I would actually be curious as to which software packages the reviewer considers as “validated" for MEG analysis. >>> >>> cheers >>> Robert >>> >>> >>>> On 08 Jan 2015, at 13:26, Davide Rivolta wrote: >>>> >>>> >>>> Dear all, >>>> >>>> I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. >>>> >>>> One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: >>>> >>>> "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". >>>> >>>> What would your reply? >>>> I expect angry emails from you : ) >>>> >>>> >>>> Bests, >>>> Davide >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at fcdonders.ru.nl Mon Jan 12 15:52:51 2015 From: jan.schoffelen at fcdonders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 12 Jan 2015 14:52:51 +0000 Subject: [FieldTrip] only read this is you are doing source reconstruction on eeg data Message-ID: <5BED7454-A406-462D-9C79-5D2EA7814EAC@fcdonders.ru.nl> Dear all, We have identified and fixed a nasty bug in FieldTrip that has consequences for those who do source reconstruction on EEG data, and have done so using a FieldTrip version of the past month or so. The bug was nasty because it didn’t cause a MATLAB or FieldTrip error. Please do read on only if you fulfill following two requirements: -you do source reconstruction of EEG data, using FieldTrip, or a toolbox that relies on low level fieldtrip functionality -you have been using a FieldTrip version that’s more recent than December 15, 2014 (svn revision 10043) Otherwise, have a nice day :-). …. …. (suspense) …. (even more suspense) …. OK, here’s the problem: in order for the EEG source reconstruction to work, the electrodes need to be projected onto the skin surface. In the FieldTrip versions 10043-10093 this projection was incorrect, causing some of the electrodes ending up on wrong locations, causing incorrect forward models (leadfields) and consequently incorrect inverse reconstruction. As of FT-version r.10094 this should be fixed. Best wishes and apologies for any inconenience caused, Jan-Mathijs From mathieu.sitko at wanadoo.fr Mon Jan 12 16:44:59 2015 From: mathieu.sitko at wanadoo.fr (Mathieu Sitko) Date: Mon, 12 Jan 2015 16:44:59 +0100 Subject: [FieldTrip] Wilson Factorization Message-ID: <54B3EBFB.5090105@wanadoo.fr> I have a problem with the convergence of spectral matrix factorization: with a tolerance of 1e-8, all my data (H,S,Z) are NaN values. How could you explain that? thank you From jan.schoffelen at fcdonders.ru.nl Mon Jan 12 20:18:52 2015 From: jan.schoffelen at fcdonders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 12 Jan 2015 19:18:52 +0000 Subject: [FieldTrip] Wilson Factorization In-Reply-To: <54B3EBFB.5090105@wanadoo.fr> References: <54B3EBFB.5090105@wanadoo.fr> Message-ID: Mathieu, Since your question is of relatively poor quality, I can only venture a poor quality guess: it’s likely that your data is rank deficient. The Wilson algorithm involves inversion of matrices, rank deficiency will quickly lead to nans. Please consult the following link (and references therein) in order to optimize the probability of obtaining a useful answer, and to optimize the goodwill of the FT-community (especially the ‘Ten simple rules…’ are a must read). http://fieldtrip.fcdonders.nl/discussion_list Best wishes, Jan-Mathijs On Jan 12, 2015, at 4:44 PM, Mathieu Sitko wrote: > I have a problem with the convergence of spectral matrix factorization: with a tolerance of 1e-8, all my data (H,S,Z) are NaN values. How could you explain that? > thank you > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tyler.grummett at flinders.edu.au Tue Jan 13 00:36:41 2015 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 12 Jan 2015 23:36:41 +0000 Subject: [FieldTrip] only read this is you are doing source reconstruction on eeg data In-Reply-To: <5BED7454-A406-462D-9C79-5D2EA7814EAC@fcdonders.ru.nl> References: <5BED7454-A406-462D-9C79-5D2EA7814EAC@fcdonders.ru.nl> Message-ID: <0AD3A8E7-8E9A-4280-9D23-776524DFFBD0@flinders.edu.au> Hi jan, I accidentally updated without checking what my previous version of field trip was, is there a way of finding out? Also, if you came from a different toolbox with different electrode positions and copied all the locations from fieldtrip and inserted them, will that cause inaccurate results? I was advised to do this a while ago when I was having issues aligning my electrode positions with fieldtrip's Tyler > On 13 Jan 2015, at 1:27 am, Schoffelen, J.M. (Jan Mathijs) wrote: > > Dear all, > > We have identified and fixed a nasty bug in FieldTrip that has consequences for those who do source reconstruction on EEG data, and have done so using a FieldTrip version of the past month or so. The bug was nasty because it didn’t cause a MATLAB or FieldTrip error. > > Please do read on only if you fulfill following two requirements: > -you do source reconstruction of EEG data, using FieldTrip, or a toolbox that relies on low level fieldtrip functionality > -you have been using a FieldTrip version that’s more recent than December 15, 2014 (svn revision 10043) > > Otherwise, have a nice day :-). > > …. > > …. > > (suspense) > > …. > > (even more suspense) > > …. > > OK, here’s the problem: in order for the EEG source reconstruction to work, the electrodes need to be projected onto the skin surface. In the FieldTrip versions 10043-10093 this projection was incorrect, causing some of the electrodes ending up on wrong locations, causing incorrect forward models (leadfields) and consequently incorrect inverse reconstruction. As of FT-version r.10094 this should be fixed. > > Best wishes and apologies for any inconenience caused, > > Jan-Mathijs > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lysne at unm.edu Tue Jan 13 01:18:43 2015 From: lysne at unm.edu (Per Arnold Lysne) Date: Tue, 13 Jan 2015 00:18:43 +0000 Subject: [FieldTrip] Wilson Factorization In-Reply-To: References: <54B3EBFB.5090105@wanadoo.fr>, Message-ID: <1421108319514.22602@unm.edu> Hi Mathieu, I have had a similar problem when trying to factor a spectral matrix generated from an average evoked response. In case you are trying to do the same thing, my solution has been to transform individual trials to the time/frequency domain and do the averaging there. I get usable results when factoring the resulting power spectral matrix. Hope that helps, Per Lysne University of New Mexico ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Schoffelen, J.M. (Jan Mathijs) Sent: Monday, January 12, 2015 12:18 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Wilson Factorization Mathieu, Since your question is of relatively poor quality, I can only venture a poor quality guess: it’s likely that your data is rank deficient. The Wilson algorithm involves inversion of matrices, rank deficiency will quickly lead to nans. Please consult the following link (and references therein) in order to optimize the probability of obtaining a useful answer, and to optimize the goodwill of the FT-community (especially the ‘Ten simple rules…’ are a must read). http://fieldtrip.fcdonders.nl/discussion_list Best wishes, Jan-Mathijs On Jan 12, 2015, at 4:44 PM, Mathieu Sitko wrote: > I have a problem with the convergence of spectral matrix factorization: with a tolerance of 1e-8, all my data (H,S,Z) are NaN values. How could you explain that? > thank you > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From bushra.riaz at gu.se Tue Jan 13 09:05:09 2015 From: bushra.riaz at gu.se (Bushra Riaz Syeda) Date: Tue, 13 Jan 2015 08:05:09 +0000 Subject: [FieldTrip] Call for applicants: 2 PhD students and 1 post-doc position in high-Tc superconductivity and sensors for medical applications. Message-ID: <1421136309282.66059@gu.se> Begin forwarded message: Dear colleagues and friends, My apologies if you receive this more than once. Thanks to a generous grant from the Knut och Alice Wallenbergs Stiftelse, we are now hiring 2 PhD students and 1 post-doc for our project "NeuroSQUID" at the Chalmers University of Technology here in Gothenburg, Sweden. The aim of the project is to explore high-Tc superconductivity at the nanoscale and develop a high-Tc superconducting sensor system for functional neuroimaging (i.e., magnetoencephalography). Please forward this to your respective networks and potential candidates. PhD student position in high-Tc superconductivity: http://www.chalmers.se/en/about-chalmers/vacancies/Pages/default.aspx?rmpage=job&rmjob=2688 PhD student position in superconducting sensor technology for medical applications/MEG: http://www.chalmers.se/en/about-chalmers/vacancies/Pages/default.aspx?rmpage=job&rmjob=2686 Post-doc position in superconducting sensor technology for medical applications/MEG: http://www.chalmers.se/en/about-chalmers/vacancies/Pages/default.aspx?rmpage=job&rmjob=2718 NOTE: The application deadline is the 31st of January. More information about Chalmers: http://www.chalmers.se/en/ More information about the University of Gothenburg and Sahlgrenska Academy, the medical school and university with which we collaborate: http://sahlgrenska.gu.se/english More information about NatMEG, the Swedish National Facility for Magnetoencephalography with which we collaborate: http://www.natmeg.se More information about the collaborative research platform MedTech West: http://www.medtechwest.se Thanks! Justin MedTech West http://www.medtechwest.se Institute of Neuroscience and Physiology Sahlgrenska Academy & University of Gothenburg -------------- next part -------------- An HTML attachment was scrubbed... URL: From lucilegamond at gmail.com Tue Jan 13 09:35:48 2015 From: lucilegamond at gmail.com (Lucile Gamond) Date: Tue, 13 Jan 2015 09:35:48 +0100 Subject: [FieldTrip] Clustering: minimal time window ? Message-ID: Dear all, A quick question about the clustering method: I know that we can modulate the minimal number of channels in a cluster... Is there a similar option for the temporal aspect ? Such as a minimal time-window allowed ? Or is it possible to obtain a cluster on only one time-sample (at least theoritically)? Thanks a lot for your help, Kind regards Lucile -------------- next part -------------- An HTML attachment was scrubbed... URL: From yingli.ucla at gmail.com Wed Jan 14 20:04:32 2015 From: yingli.ucla at gmail.com (Ying Li) Date: Wed, 14 Jan 2015 11:04:32 -0800 Subject: [FieldTrip] How to read .dicom format using FT_READ_MRI Message-ID: Dear all, I'm trying to load MRI into matlab. The MRI data I have is a series of .dicom files (~250 frames, "IMG1"~"IMG250"). I'm wondering how to specify the input parameter for the function "ft_read_mri". Since I have 250 files, which file should I use for the input? If I only use the first file "IMG1", for example mri = ft_read_mri('IMG1'); Then I will get the following error: Warning: Not enough data imported. Attempted to read 3053459760 bytes at position 2953. Only read 534544. ERROR: IMG1 does not have a series number Error in load_dicom_series (line 42) if(nargin < 1 | nargin > 3) Output argument "vol" (and maybe others) not assigned during call to "XX\fieldtrip_20140518\external\freesurfer\load_dicom_series.m>load_dicom_series". Error in ft_read_mri (line 287) [img,transform,hdr,mr_params] = load_dicom_series(dcmdir,dcmdir,filename); I'll appreciate your reply a lot! Best, Ying -------------- next part -------------- An HTML attachment was scrubbed... URL: From yingli.ucla at gmail.com Thu Jan 15 01:08:30 2015 From: yingli.ucla at gmail.com (Ying Li) Date: Wed, 14 Jan 2015 16:08:30 -0800 Subject: [FieldTrip] Electrode Alignment Message-ID: Hi Everyone, I'm trying to align my .elc electrode file (ALS coordinate) to the template head model provided by fieldtrip (MNI coordinate). Since we used ANT electrode (as attached) to measure the EEG, so there are not Lpa, Rpa, and Nz fiducials in the electrodes. Therefore, it seems that I can't use "automatic alignment" to align the electrode. Also, it is very difficult to only use "interactive alignment" to align the electrode... I already know that the electrode coordinate is "als", so I'm wondering whether there exists some other methods that can help to transform the electrode to the "MNI coordinate". I'll appreciate your help a lot ! Best, Ying -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ANT 64 electrode layout.png Type: image/png Size: 19930 bytes Desc: not available URL: From martin.bleichner at uni-oldenburg.de Thu Jan 15 13:42:18 2015 From: martin.bleichner at uni-oldenburg.de (Martin Bleichner) Date: Thu, 15 Jan 2015 13:42:18 +0100 Subject: [FieldTrip] PhD Position Oldenburg/Germany Message-ID: <54B7B5AA.9090106@uni-oldenburg.de> Dear Fieltrip Users, The Department of Psychology, Carl von Ossietzky University Oldenburg, Neuropsychology lab (head: Prof. Dr. Stefan Debener) is offering a position as *Member of academic staff / PhD Student* E13 TV-L, 65% of the fulltime weekly hours The position starts as soon as possible and is limited for 3 years. Studying communication during social interactions using behavioral observation, mobile EEG & cognitive modelling In this interdisciplinary project we seek to identify factors involved in successful social interactions in humans. Social interactions will be studied by combining established approaches from the fields of performing arts, behavioral assessment, neurophysiology and cognitive modeling. This position will be located in Oldenburg and will focus on the neurophysiological mechanisms of social interactions as assessed by mobile EEG. The position is part of the project 'IMPACT- IMproving Patterns of social interACTion' funded by the Volkswagen Foundation. The project includes complementary research at the Technical University Dresden, Germany (Jun. Prof. Dr. Stefan Scherbaum) focusing on cognitive modeling and behavioral assessment of social interactions. We offer an agile, interdisciplinary and international work environment. A PhD candidate has the opportunity to enroll in the PhD program of the Graduate School 'Science and Technology' (www.oltech.org ). *Tasks:*The successful candidate will design, record and analyse multi-subject studies using advanced mobile EEG technology. The candidate has to publish obtained research results in peer reviewed scientific journals. *Qualifications:*An academic university degree (e.g. Diploma or Master's degree) in psychology, biology, neurosciences, psycholinguistics or a related discipline is required. We are seeking a candidate with strong knowledge in experimental and/or cognitive neuroscience. It is beneficial to have expertise in EEG/MEG or neuroimaging, knowledge in programming in Matlab and a background in biomedical signal processing. The applicant is required to have very good knowledge of both English and German. The Carl von Ossietzky University is striving to increase the number of women employed in research and science. Therefore, we explicitly ask women to apply. Following § 21 Abs. 3 NHG female applicants with equivalent qualifications will be preferred. Disabled applicants with equivalent qualifications will be preferred. Please send your application including a letter of motivation with a short statement of research interests, CV, names of two potential referees, if applicable list of publications, and copies of certificates toDr. Martin Bleichner . We prefer an electronic application with a single pdf.*Please apply**by first of February 2015 to ensure consideration.* Questions prior to the application can be addressed also to Dr. Bleichner, Carl von Ossietzky Universität Oldenburg, Fakultät für Medizin und Gesundheitswissenschaften, Department für Psychologie, D-26111 Oldenburg, Germany, email:martin.bleichner at uni-oldenburg.de , phone: +49 (0)441 - 798 - 2940 -- Dr. Martin Bleichner Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany martin.bleichner at uni-oldenburg.de Tel.: +49 (0)441 - 798-2940 http://www.uni-oldenburg.de/psychologie/neuropsychologie/team/martin-bleichner/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Thu Jan 15 16:41:42 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 15 Jan 2015 16:41:42 +0100 (CET) Subject: [FieldTrip] MaxFilter and ICA preprocessing Message-ID: <1593874569.164723.1421336502194.JavaMail.root@bcbl.eu> Dear all, after preprocessing my MEG data (Elekta Neuromag) with MaxFilter, I noticed that the ICA decomposition takes longer than if the data hasn't been preprocessed with MF. As a side note: I've taken care of reducing the dimensionality of the data to cfg.runica.pca = rank(data.trial{1}*data.trial{1}'), as I've read in previous posts that otherwise the results of the ICA decomposition can contain complex values. My questions are: 1) is the fact that the ICA training takes longer normal? 2) why does the ICA training take longer in the case of MF preprocessing? Sorry for cross-posting on both lists, I'm just hoping to get an answer asap. Best, Fred --------------------------------------------------------------------------- From f.roux at bcbl.eu Thu Jan 15 18:00:56 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 15 Jan 2015 18:00:56 +0100 (CET) Subject: [FieldTrip] MaxFilter and ICA preprocessing In-Reply-To: <1593874569.164723.1421336502194.JavaMail.root@bcbl.eu> Message-ID: <2006140742.166364.1421341256776.JavaMail.root@bcbl.eu> Problem solved. I am posting below the solution with what I think may be the explanation, in case someone else might experience a similar issue. cfg = []; cfg.method = 'runica'; cfg.numcomponent = rank(meg_data.trial{1}*meg_data.trial{1}'); ic_data = ft_componentanalysis(cfg,meg_data); Most likely, this reduces the complexity of the solution the algorithm searches for. Insead of searching for n1 = length(meg_data.label) ICs the algorithm searches for n2 = rank(meg_data.trial{1}*meg_data.trial{1}') ICs. The slowing down of the ICA arises because the data has rank n2 and not n1, but still the algorithm tries to search for a solution satisfying rank = n1. Remains the question why cfg.runica.pca = rank(meg_data.trial{1}*meg_data.trial{1}') didn't have any effect. Has this option become obsolete in more recent versions of FT? Best, Fred Frédéric Roux ----- Original Message ----- From: "Frédéric Roux" To: "FieldTrip discussion list" , "Discussion list for international MEG community" Sent: Thursday, January 15, 2015 4:41:42 PM Subject: MaxFilter and ICA preprocessing Dear all, after preprocessing my MEG data (Elekta Neuromag) with MaxFilter, I noticed that the ICA decomposition takes longer than if the data hasn't been preprocessed with MF. As a side note: I've taken care of reducing the dimensionality of the data to cfg.runica.pca = rank(data.trial{1}*data.trial{1}'), as I've read in previous posts that otherwise the results of the ICA decomposition can contain complex values. My questions are: 1) is the fact that the ICA training takes longer normal? 2) why does the ICA training take longer in the case of MF preprocessing? Sorry for cross-posting on both lists, I'm just hoping to get an answer asap. Best, Fred --------------------------------------------------------------------------- From eelke.spaak at donders.ru.nl Thu Jan 15 18:11:47 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 15 Jan 2015 18:11:47 +0100 Subject: [FieldTrip] MaxFilter and ICA preprocessing In-Reply-To: References: <1593874569.164723.1421336502194.JavaMail.root@bcbl.eu> Message-ID: Dear Fred, The options cfg.runica.pca and cfg.numcomponent should have the exact same effect when using cfg.method = 'runica'. (See the code for ft_componentanalysis at lines 480-490.) One possible explanation for why you were getting slow results is that ICA depends on a random initialization; perhaps sometimes the initial weights were better than at other times? Best, Eelke On 15 January 2015 at 18:00, Frédéric Roux wrote: > Problem solved. > > I am posting below the solution with what I think may be > the explanation, in case someone else might experience a similar > issue. > > cfg = []; > cfg.method = 'runica'; > cfg.numcomponent = rank(meg_data.trial{1}*meg_data.trial{1}'); > > ic_data = ft_componentanalysis(cfg,meg_data); > > Most likely, this reduces the complexity of the solution the algorithm > searches for. Insead of searching for n1 = length(meg_data.label) ICs > the algorithm searches for n2 = rank(meg_data.trial{1}*meg_data.trial{1}') ICs. > The slowing down of the ICA arises because the data has rank n2 and not n1, but > still the algorithm tries to search for a solution satisfying rank = n1. > > Remains the question why cfg.runica.pca = rank(meg_data.trial{1}*meg_data.trial{1}') didn't > have any effect. Has this option become obsolete in more recent versions of FT? > > Best, > > Fred > > > Frédéric Roux > > ----- Original Message ----- > From: "Frédéric Roux" > To: "FieldTrip discussion list" , "Discussion list for international MEG community" > Sent: Thursday, January 15, 2015 4:41:42 PM > Subject: MaxFilter and ICA preprocessing > > Dear all, > > after preprocessing my MEG data (Elekta Neuromag) with MaxFilter, I noticed that the ICA decomposition > takes longer than if the data hasn't been preprocessed with MF. > > As a side note: I've taken care of reducing the dimensionality of the data to cfg.runica.pca = rank(data.trial{1}*data.trial{1}'), as I've read in previous posts that otherwise the results of the ICA decomposition can contain complex values. > > My questions are: > > 1) is the fact that the ICA training takes longer normal? > > 2) why does the ICA training take longer in the case of MF preprocessing? > > Sorry for cross-posting on both lists, I'm just hoping to get an answer asap. > > > Best, > Fred > > > --------------------------------------------------------------------------- > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stan.vanpelt at donders.ru.nl Fri Jan 16 09:43:40 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Fri, 16 Jan 2015 08:43:40 +0000 Subject: [FieldTrip] How to read .dicom format using FT_READ_MRI In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894CB27BDF@exprd03.hosting.ru.nl> Dear Ying, As far as I understand, Fieldtrip can read in the entire series of dicom-files by just specifying the first file name of the series, just like you did. However, for this it is required that the series number is clear in each file name, e.g. MRI_S01_MEG.0001.0001.IMA, MRI_S01_MEG.0001.0002.IMA, etc. I suppose that is not clear in your dicom file names. Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ying Li Sent: woensdag 14 januari 2015 20:05 To: FieldTrip discussion list Subject: [FieldTrip] How to read .dicom format using FT_READ_MRI Dear all, I'm trying to load MRI into matlab. The MRI data I have is a series of .dicom files (~250 frames, "IMG1"~"IMG250"). I'm wondering how to specify the input parameter for the function "ft_read_mri". Since I have 250 files, which file should I use for the input? If I only use the first file "IMG1", for example mri = ft_read_mri('IMG1'); Then I will get the following error: Warning: Not enough data imported. Attempted to read 3053459760 bytes at position 2953. Only read 534544. ERROR: IMG1 does not have a series number Error in load_dicom_series (line 42) if(nargin < 1 | nargin > 3) Output argument "vol" (and maybe others) not assigned during call to "XX\fieldtrip_20140518\external\freesurfer\load_dicom_series.m>load_dicom_series". Error in ft_read_mri (line 287) [img,transform,hdr,mr_params] = load_dicom_series(dcmdir,dcmdir,filename); I'll appreciate your reply a lot! Best, Ying -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Fri Jan 16 11:54:35 2015 From: michelic72 at gmail.com (Cristiano Micheli) Date: Fri, 16 Jan 2015 11:54:35 +0100 Subject: [FieldTrip] How to read .dicom format using FT_READ_MRI In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894CB27BDF@exprd03.hosting.ru.nl> References: <7CCA2706D7A4DA45931A892DF3C2894CB27BDF@exprd03.hosting.ru.nl> Message-ID: Hi Ying and Stan, I had the same problem, and I solved it in a 'quick and dirty' way by changing the name of the first image of the dicom series (i.e. substituting the dots with underscores). It may help to change/add the extension of the first file too . Best of luck! Cris On Fri, Jan 16, 2015 at 9:43 AM, Pelt, S. van (Stan) < stan.vanpelt at donders.ru.nl> wrote: > Dear Ying, > > > > As far as I understand, Fieldtrip can read in the entire series of > dicom-files by just specifying the first file name of the series, just like > you did. However, for this it is required that the series number is clear > in each file name, e.g. MRI_S01_MEG.0001.0001.IMA, > MRI_S01_MEG.0001.0002.IMA, etc. I suppose that is not clear in your dicom > file names. > > > > Best, > > Stan > > > > -- > > Stan van Pelt, PhD > > Donders Institute for Brain, Cognition and Behaviour > > Radboud University > > Montessorilaan 3, B.01.34 > > 6525 HR Nijmegen, the Netherlands > > tel: +31 24 3616288 > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Ying Li > *Sent:* woensdag 14 januari 2015 20:05 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] How to read .dicom format using FT_READ_MRI > > > > Dear all, > > > > I'm trying to load MRI into matlab. The MRI data I have is a series of > .dicom files (~250 frames, "IMG1"~"IMG250"). I'm wondering how to specify > the input parameter for the function "ft_read_mri". Since I have 250 files, > which file should I use for the input? > > > > If I only use the first file "IMG1", for example mri = > ft_read_mri('IMG1'); Then I will get the following error: > > > > Warning: Not enough data imported. Attempted to read 3053459760 bytes at > position 2953. Only read 534544. > > ERROR: IMG1 does not have a series number > > Error in load_dicom_series (line 42) > > if(nargin < 1 | nargin > 3) > > > > Output argument "vol" (and maybe others) not assigned during call to > > > "XX\fieldtrip_20140518\external\freesurfer\load_dicom_series.m>load_dicom_series". > > > > Error in ft_read_mri (line 287) > > [img,transform,hdr,mr_params] = > load_dicom_series(dcmdir,dcmdir,filename); > > > > I'll appreciate your reply a lot! > > > > Best, > > > > Ying > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Fri Jan 16 19:24:02 2015 From: luke.bloy at gmail.com (Luke Bloy) Date: Fri, 16 Jan 2015 13:24:02 -0500 Subject: [FieldTrip] Realtime setup Message-ID: Hi all, I'm interested in setting up some realtime analysis on a CTF system. Fieldtrip seems to have done quite a bit of work in getting this working, but i don't see a lot of documentation / discussion about hardware setup etc, but perhaps I'm missing it. Can anyone help me in deciding what is needed at a hardware level to make the ft_realtime routines work with a CTF machine? Thanks. Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From kkalimeri at gmail.com Sun Jan 18 13:37:22 2015 From: kkalimeri at gmail.com (Kyriaki Kalimeri) Date: Sun, 18 Jan 2015 14:37:22 +0200 Subject: [FieldTrip] Postdoctoral Fellowship position - ISI Foundation Message-ID: Job Description Institute for Scientific Interchange(ISI) is seeking to appoint a highly motivated Postdoctoral Assistant to undertake research activities related to human centric computing for the Horizon2020 project "Sound Of Vision". ISI provides an unusually rich opportunity for collegial interaction in a highly competitive environment. Mentoring will also be provided by a multidisciplinary faculty team including co-investigators on the project and collaborators from Neurology, Engineering, Medicine and Psychology. Project Overview Sound of Vision (Natural sense of vision through acoustics and haptics) is a highly multidisciplinary project that will design, implement and validate an original non-invasive, wearable hardware and software system to assist visually impaired people by creating and conveying an auditory representation of the surrounding environment. This representation will be created, updated and delivered to the blind users continuously and in real time. In addition to the auditory representation, haptics will be used moderately as an additional channel to convey some of the most relevant information. The system will help visually impaired people to both perceive and navigate in any kind of environment (indoor/outdoor), without the need for predefined tags/sensors located in the surroundings and regardless of the lighting conditions. Specifically you will: - Conduct user and feasibility studies to determine the appropriate mobile platform and delivery components to support the functionality of the "Sound of Vision" prototype; - Participate in the shared decision making around alternatives to the hardware and software development; - Participate in a large trial to assist in system deployment and data collection; - Carry out innovative, impactful research of strategic importance to the domain of behavioural neuroscience, cognitive science and human computer interaction; - Produce high quality scientific and technical outputs including journal articles, conference papers and presentations, patents and technical reports. To be successful in this position you will need: - PhD in neuroscience, computer science, computer engineering or other related field with a neuroscience-related background. - demonstrated experience in behavioural neuroscience and BCI techniques. Specific areas of focus include visual impairments, brain plasticity and usability research will be desired. - fluency in English The review of applications will begin immediately and the position will remain open until filled. The initial appointment is for 1 year with a possibility of extension. To apply, send cover letter, curriculum vitae and professional reference list to the PI of the project Dr.Kyriaki Kalimeri, kyriaki.kalimeri at isi.it. ISI is an equal opportunity employer and does not discriminate on the basis of race, color, national origin, gender, sexual orientation, age, religion or disability. -- *Dr. Kyriaki KalimeriElectronic & Computer Engineer* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Jan 19 09:59:48 2015 From: jorn at artinis.com (=?utf-8?Q?J=C3=B6rn_M._Horschig?=) Date: Mon, 19 Jan 2015 09:59:48 +0100 Subject: [FieldTrip] Realtime setup In-Reply-To: References: Message-ID: <000201d033c6$47c4ded0$d74e9c70$@artinis.com> Hi Luke, nice to see that you are getting into the realtime business ;) The software side of realtime analysis should be documented quite well, but a bit scattered across the FT page (just in case, e.g. http://fieldtrip.fcdonders.nl/development/realtime/ctf or http://fieldtrip.fcdonders.nl/development/realtime). As you said, the hardware setup itself is not hugely discussed, but that is because there is not much to discuss. The FT buffer is implement by a shared memory segment (i.e. some reserved address in memory that is accessible) and communication between computers takes place via a TCP socket. So, hardware requirements are memory and a network card ;) As long as your computers are not too ancient, there should also be no problem in terms of computational requirements. Our realtime computer is about 3 years old, our acquisition computer at least 4 (but I guess more in the range of 6-8 yrs). I am not working at the Donders anymore, so I cannot check the exact specs. Are you facing any particular problems? Or just asking before setting anything up? In the last years, we wrote several papers about how we use the realtime implementation at the Donders, maybe they help as well in understanding our hardware setup: http://www.sciencedirect.com/science/article/pii/S1053811914010064 http://link.springer.com/article/10.1007%2Fs10548-014-0401-7 http://www.sciencedirect.com/science/article/pii/S1053811912011597 If you have any more questions, feel free to ask again. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Luke Bloy Sent: Friday, January 16, 2015 7:24 PM To: FieldTrip list serve Cc: jm.horschig at donders.ru.nl Subject: [FieldTrip] Realtime setup Hi all, I'm interested in setting up some realtime analysis on a CTF system. Fieldtrip seems to have done quite a bit of work in getting this working, but i don't see a lot of documentation / discussion about hardware setup etc, but perhaps I'm missing it. Can anyone help me in deciding what is needed at a hardware level to make the ft_realtime routines work with a CTF machine? Thanks. Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From ploner at lrz.tu-muenchen.de Mon Jan 19 13:12:46 2015 From: ploner at lrz.tu-muenchen.de (Markus Ploner) Date: Mon, 19 Jan 2015 13:12:46 +0100 Subject: [FieldTrip] =?utf-8?q?PhD_Student_in_computational_neuroscience/p?= =?utf-8?q?ain_research_-_Technische_Universit=C3=A4t_M=C3=BCnchen?= Message-ID: PhD Student in computational neuroscience/pain research Department of Neurology, Technische Universität München, Munich, Germany Applications are invited for a PhD Student position at the Department of Neurology, Technische Universität München, to work on the cerebral representation of pain by using EEG. The project will focus on the neurophysiological correlates of pain in healthy human subjects and patients suffering from chronic pain disorders. Major experimental methods include EEG time-frequency analysis, source analysis and connectivity analysis. The candidate will join a research group dedicated to the multimodal investigation of the cerebral representation of pain (http://www.painlabmunich.de ) which is part of the TUM-Neuroimaging Center (TUM-NIC; http://www.tumnic.mri.tum.de ). TUM-NIC hosts state-of-the-art neuroimaging facilities and offers training in major neuroimaging techniques. Applicants should have a background in computer science, statistics, physics, engineering, neuroscience, medicine, psychology, or other relevant disciplines. Prior experience in MATLAB programming is mandatory. Skills for sophisticated analysis of EEG data (e.g. information theory, machine learning techniques, mediation analysis) are highly desirable. Candidates have the possibility to integrate in the PhD program Medical Life Science and Technology (http://www.phd.med.tum.de ) or the Graduate School of Systemic Neurosciences (http://www.gsn.uni-muenchen.de/index.html ), which offer interdisciplinary high-level training for students with different backgrounds. Salary will be commensurate with the German TVöD salary scale (EG13). Applications will be considered until the position is filled. Candidates may contact Dr. Markus Ploner for more detailed information or directly e-mail their application (ploner at lrz.tum.de ), including letter of motivation, CV and letters of recommendation. Markus Ploner MD Heisenberg Professor of Human Pain Research Department of Neurology Technische Universität München Munich, Germany ploner at lrz.tum.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Mon Jan 19 22:07:38 2015 From: luke.bloy at gmail.com (Luke Bloy) Date: Mon, 19 Jan 2015 16:07:38 -0500 Subject: [FieldTrip] Realtime setup In-Reply-To: <000201d033c6$47c4ded0$d74e9c70$@artinis.com> References: <000201d033c6$47c4ded0$d74e9c70$@artinis.com> Message-ID: Hi Jörn, This is a great place for me to start. I'm just beginning to think through a setup so I haven't run into any problems yet. But I'm sure that I will. Thank you. -Luke On Mon, Jan 19, 2015 at 3:59 AM, Jörn M. Horschig wrote: > Hi Luke, > > > > nice to see that you are getting into the realtime business ;) > > The software side of realtime analysis should be documented quite well, > but a bit scattered across the FT page (just in case, e.g. > http://fieldtrip.fcdonders.nl/development/realtime/ctf or > http://fieldtrip.fcdonders.nl/development/realtime). As you said, the > hardware setup itself is not hugely discussed, but that is because there is > not much to discuss. The FT buffer is implement by a shared memory segment > (i.e. some reserved address in memory that is accessible) and communication > between computers takes place via a TCP socket. So, hardware requirements > are memory and a network card ;) As long as your computers are not too > ancient, there should also be no problem in terms of computational > requirements. Our realtime computer is about 3 years old, our acquisition > computer at least 4 (but I guess more in the range of 6-8 yrs). I am not > working at the Donders anymore, so I cannot check the exact specs. Are you > facing any particular problems? Or just asking before setting anything up? > > > > In the last years, we wrote several papers about how we use the realtime > implementation at the Donders, maybe they help as well in understanding our > hardware setup: > > http://www.sciencedirect.com/science/article/pii/S1053811914010064 > > http://link.springer.com/article/10.1007%2Fs10548-014-0401-7 > > http://www.sciencedirect.com/science/article/pii/S1053811912011597 > > > > If you have any more questions, feel free to ask again. > > > > Best, > > Jörn > > > > *--* > > > > *Jörn M. Horschig*, Software Engineer > > Artinis Medical Systems | +31 481 350 980 > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Luke Bloy > *Sent:* Friday, January 16, 2015 7:24 PM > *To:* FieldTrip list serve > *Cc:* jm.horschig at donders.ru.nl > *Subject:* [FieldTrip] Realtime setup > > > > Hi all, > > > > I'm interested in setting up some realtime analysis on a CTF system. > Fieldtrip seems to have done quite a bit of work in getting this working, > but i don't see a lot of documentation / discussion about hardware setup > etc, but perhaps I'm missing it. > > > > Can anyone help me in deciding what is needed at a hardware level to make > the ft_realtime routines work with a CTF machine? > > > > Thanks. > > Luke > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Wed Jan 21 02:56:14 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Tue, 20 Jan 2015 17:56:14 -0800 Subject: [FieldTrip] Biosemi eventtype problem Message-ID: <54BF073E.40808@gmail.com> Hi all, I was wondering whether anyone has seen this issue on Biosemi bdf before and, if so, how you solved it. If I use FT to read in the data, I have 'STATUS' as an event type with event values. However, the values in there are not really the values that were sent. Also, the number of values doesn't match what was sent. So I went on to check what EEGlab would do. Using the GUI, the event values that are produced cannot be selected further. It's a weird error, it detects event values (the same values that FT detects), but it then complains that they are not strings. Final attempt: force EEGlab to read one channel in particular in the command line. It turns out, these data have 64 channels, 8 EXG and one additional channel, 73. If I force EEGlab to read from channel 73, I get all the correct event values. So apparently what EEGlab and FT see as the line with the event values ('STATUS') is not where they really are in these particular data. I guess what I could do is read the data with EEGlab forcing the event type to be the 73 channel and then export it to FT later on, but I was wondering whether the solution to the problem is much easier than that. Thanks a lot, Vitoria From a.maye at uke.de Wed Jan 21 09:09:32 2015 From: a.maye at uke.de (Alexander Maye) Date: Wed, 21 Jan 2015 09:09:32 +0100 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <54BF073E.40808@gmail.com> References: <54BF073E.40808@gmail.com> Message-ID: <10381509.nCaZsCYVui@mars.neurophys.uke.uni-hamburg.de> Hi Vitoria, with this minimal description it's hard to say what the problem is, but these are the things that come to my mind: - Did you setup/modify a config file for the ftbuffer, and did you start the buffer with this config? - Sometimes the higher bits of the parallel port are set, giving you event values >60.000. Maybe you could mask out the bits that you are interested in? Another possibility is that ftbuffer's event values are in two's-complement format. In any case you could check the output of the ftbuffer program - if your events aren't there, your program will not see them either. - Transition from some value to zero are not detected as events as it seems. Hope this helps, ALEX. -------------- next part -------------- -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From yoniilevy at gmail.com Thu Jan 22 07:54:07 2015 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 22 Jan 2015 08:54:07 +0200 Subject: [FieldTrip] Statistics: comparing conditions with different sample size Message-ID: Is there a way in FT to deal with the statistical comparison of conditions with different sample size (for instance N = 500 vs N = 100)? Thanks for any input Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Jan 22 09:05:20 2015 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 22 Jan 2015 09:05:20 +0100 Subject: [FieldTrip] Statistics: comparing conditions with different sample size In-Reply-To: References: Message-ID: Dear Yoni, do you mean different *group* sizes (as in 500 patients vs. 100 controls)? Then use the stat fun indepsamplesT. If you mean 500 trials vs 100 trials within one subject, you can again use the indepsamplesT-function, but beware! The number of trials can severely influence your signal. I personally strongly suggest using the same number of trials and subjects. Best, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 22.01.2015 um 07:54 schrieb Yoni Levy: > Is there a way in FT to deal with the statistical comparison of conditions with different sample size (for instance N = 500 vs N = 100)? > > Thanks for any input > Yoni > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From r.braukmann at donders.ru.nl Thu Jan 22 12:09:45 2015 From: r.braukmann at donders.ru.nl (Ricarda Braukmann) Date: Thu, 22 Jan 2015 12:09:45 +0100 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitoria, I had a problem with biosemi markers not being read in correctly by FT as well. First of all, if I remember correctly, using ft_read_event only worked for me with .bdf files (and not .edf files). Still even with the .bdf files, the numbers were not correct. This was caused by the fact that the biosemi system always sent out two markers to the EEG (one constant marker and one marker specific to stimulus presentation). FT for some reason did not recognize these markers as 2 (8bit) markers but created 1 16 bit marker from it. Once I knew this it was easily solved, I just recoded the markers. Not sure whether this is what is happening with your set-up as well (might be different with newer ft versions), but maybe it helps. In any case, I belief that the biosemi STATUS markers are indeed not strings. Best, Ricarda On Wednesday, January 21, 2015, Alexander Maye wrote: > Hi Vitoria, > > with this minimal description it's hard to say what the problem is, but > these > are the things that come to my mind: > - Did you setup/modify a config file for the ftbuffer, and did you start > the > buffer with this config? > - Sometimes the higher bits of the parallel port are set, giving you event > values >60.000. Maybe you could mask out the bits that you are interested > in? > Another possibility is that ftbuffer's event values are in two's-complement > format. In any case you could check the output of the ftbuffer program - if > your events aren't there, your program will not see them either. > - Transition from some value to zero are not detected as events as it > seems. > > Hope this helps, > > ALEX. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elmeri.syrjanen at gmail.com Thu Jan 22 13:13:03 2015 From: elmeri.syrjanen at gmail.com (=?UTF-8?Q?Elmeri_Syrj=C3=A4nen?=) Date: Thu, 22 Jan 2015 13:13:03 +0100 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> Message-ID: We have the same problem with reading the status correctly from Biosemi. Our experiment software (presentation) sends a zero as first trigger so a simple value(:) = value(:) - value(1); in the trial function will remove the offset from the triggers. /elmeri On Thu, Jan 22, 2015 at 12:09 PM, Ricarda Braukmann < r.braukmann at donders.ru.nl> wrote: > Hi Vitoria, > > I had a problem with biosemi markers not being read in correctly by FT as > well. > > First of all, if I remember correctly, using ft_read_event only worked for > me with .bdf files (and not .edf files). > Still even with the .bdf files, the numbers were not correct. > This was caused by the fact that the biosemi system always sent out two > markers to the EEG (one constant marker and one marker specific to stimulus > presentation). > FT for some reason did not recognize these markers as 2 (8bit) markers but > created 1 16 bit marker from it. > > Once I knew this it was easily solved, I just recoded the markers. > Not sure whether this is what is happening with your set-up as well (might > be different with newer ft versions), but maybe it helps. > > In any case, I belief that the biosemi STATUS markers are indeed not > strings. > > Best, > Ricarda > > > On Wednesday, January 21, 2015, Alexander Maye wrote: > >> Hi Vitoria, >> >> with this minimal description it's hard to say what the problem is, but >> these >> are the things that come to my mind: >> - Did you setup/modify a config file for the ftbuffer, and did you start >> the >> buffer with this config? >> - Sometimes the higher bits of the parallel port are set, giving you event >> values >60.000. Maybe you could mask out the bits that you are interested >> in? >> Another possibility is that ftbuffer's event values are in >> two's-complement >> format. In any case you could check the output of the ftbuffer program - >> if >> your events aren't there, your program will not see them either. >> - Transition from some value to zero are not detected as events as it >> seems. >> >> Hope this helps, >> >> ALEX. >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Thu Jan 22 13:26:00 2015 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 22 Jan 2015 14:26:00 +0200 Subject: [FieldTrip] Statistics: comparing conditions with different sample size Message-ID: Hi Julian I indeed meant comparing within subject conditions, one with many more trials than the other (e.g. 500 vs 100 trials). I am aware that this difference would bias my result, the question is whether there might be a way to bypass such bias, without the conservative solution of equating the trial number in both conditions (i.e. removing 400 trials from condition1, and thereby comparing 100 vs 100). One possible solution that was suggested was to proceed with an indepT test, and then proceeding with an "spm_t2z" transformation ; yet, I wonder whether this is also valid for such large difference between sample sizes. Thanks Yoni On Thu, Jan 22, 2015 at 1:00 PM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Statistics: comparing conditions with different sample size > (Yoni Levy) > 2. Re: Statistics: comparing conditions with different sample > size (Julian Keil) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 22 Jan 2015 08:54:07 +0200 > From: Yoni Levy > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Statistics: comparing conditions with different > sample size > Message-ID: > QiybRRQvQ-QfTRpWgj0it4oPLr8BnkSHLA at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Is there a way in FT to deal with the statistical comparison of conditions > with different sample size (for instance N = 500 vs N = 100)? > > Thanks for any input > Yoni > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150122/3714595f/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Thu, 22 Jan 2015 09:05:20 +0100 > From: Julian Keil > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Statistics: comparing conditions with > different sample size > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Dear Yoni, > > do you mean different *group* sizes (as in 500 patients vs. 100 controls)? > Then use the stat fun indepsamplesT. > If you mean 500 trials vs 100 trials within one subject, you can again use > the indepsamplesT-function, but beware! The number of trials can severely > influence your signal. > I personally strongly suggest using the same number of trials and subjects. > > Best, > > Julian > > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universit?tsklinik > der Charit? im St. Hedwig-Krankenhaus > Gro?e Hamburger Stra?e 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 22.01.2015 um 07:54 schrieb Yoni Levy: > > > Is there a way in FT to deal with the statistical comparison of > conditions with different sample size (for instance N = 500 vs N = 100)? > > > > Thanks for any input > > Yoni > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150122/a11451c9/attachment-0001.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: signature.asc > Type: application/pgp-signature > Size: 495 bytes > Desc: Message signed with OpenPGP using GPGMail > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150122/a11451c9/attachment-0001.pgp > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 50, Issue 15 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jevtic at ucl.ac.uk Thu Jan 22 16:52:14 2015 From: t.jevtic at ucl.ac.uk (Jevtic, Tijana) Date: Thu, 22 Jan 2015 15:52:14 +0000 Subject: [FieldTrip] TMSi data streaming Message-ID: <1421941934832.82105@ucl.ac.uk> Dear all, I'm quite new to Matlab software and I just got the TMSi porti7 equipment to use from now onwards. I came across fieldtrip as a tool for data streaming but when I follow the protocol provided by the TMSi suppliers, I have errors. Can I ask any one of you to share basic code for acquiring and storing the data with unmentioned equipment, please? Many thanks in advance. Tijana ------------------ Tijana Jevtic, BSc, MSc, MIEEE PhD student, Research Assistant Aspire Create - Centre for Rehabilitation Engineering and Assistive Technology Institute of Orthopaedics and Musculoskeletal Science, University College London, Royal National Orthopaedic Hospital, Stanmore, HA7 4LP United Kingdom t.jevtic at ucl.ac.uk Tel: +44 (0) 7513 691217 http://www.ucl.ac.uk/aspire-create -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.vandenieuwenhuijzen at donders.ru.nl Thu Jan 22 17:50:26 2015 From: m.vandenieuwenhuijzen at donders.ru.nl (Nieuwenhuijzen, M.E. van de (Marieke)) Date: Thu, 22 Jan 2015 16:50:26 +0000 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata Message-ID: Hi Fieldtrippers, I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Fri Jan 23 01:32:16 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Thu, 22 Jan 2015 16:32:16 -0800 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> Message-ID: <54C19690.9070304@gmail.com> Hi Ricarda, Alex, Elmeri et al. Thanks. The files I'm trying to read are .bdf. Ricarda, could you please clarify "I just recoded the markers."? Did you edit the .bdf file with a text editor? In a previous dataset I acquired with Biosemi (in combination with Presentation), with eventtype 'STATUS', I get the right event values in the right number (that is, I send 10 times marker '1', ft_definetrial finds 10 times marker '1'). With this new Biosemi dataset (programmed by someone else in E-prime, it's not my data): cfg=[]; cfg.dataset = dataset; cfg.trialdef.eventtype = 'STATUS'; cfg.trialdef.eventvalue = '?'; ft_definetrial returns markers that were not sent, and doesn't return markers that were sent. (The same occurs if I read the data in EEGlab by the way). It doesn't look like there's a linear transformation between what was sent and what FT finds. For example, markers sent were 1:21; FT returns [3:23 29:31], but I'll definitely look into the suggestion that maybe 1:21 was sent but for some reason recorded as 3:23 and the 29:31 are coming from somewhere else. Thanks a lot! Vitoria From harding at cbs.mpg.de Fri Jan 23 14:39:37 2015 From: harding at cbs.mpg.de (Eleanor Harding) Date: Fri, 23 Jan 2015 14:39:37 +0100 (CET) Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: Message-ID: <1608329006.4466.1422020377153.JavaMail.root@zimbra> Hi Marieke, A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. Good luck, Ellie Harding Message: 5 Date: Thu, 22 Jan 2015 16:50:26 +0000 From: "Nieuwenhuijzen, M.E. van de (Marieke)" To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi Fieldtrippers, I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstraße 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding From r.thomas at nin.knaw.nl Fri Jan 23 15:37:49 2015 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Fri, 23 Jan 2015 14:37:49 +0000 Subject: [FieldTrip] Electrode file *.bvef format Message-ID: <84b76474c6904886b156cbf02e040e76@EXNHI02.herseninstituut.knaw.nl> ?Dear FieldTrippers, Does FT read *.bvef (Brainproducts) electrode location files? Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 23 17:56:20 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 23 Jan 2015 16:56:20 +0000 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: <1608329006.4466.1422020377153.JavaMail.root@zimbra> References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> Message-ID: Marieke, Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. JM On Jan 23, 2015, at 2:39 PM, Eleanor Harding wrote: > Hi Marieke, > > A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, > > Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. > > Good luck, > Ellie Harding > > > > Message: 5 > Date: Thu, 22 Jan 2015 16:50:26 +0000 > From: "Nieuwenhuijzen, M.E. van de (Marieke)" > > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Low-pass frequency when downsampling using > ft_resampledata > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi Fieldtrippers, > > I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? > > Best, > Marieke > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > > -- > ------------------------------------------------------------------ > Eleanor Harding > PhD Student > Max Planck Institute for Human Cognitive and Brain Sciences > Stephanstraße 1A, 04103 Leipzig, Germany > Phone: +49 341 9940-2268 > Fax: +49 341 9940 2260 > http://www.cbs.mpg.de/~harding > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Fri Jan 23 18:09:48 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 23 Jan 2015 17:09:48 +0000 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <54C19690.9070304@gmail.com> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <54C19690.9070304@gmail.com> Message-ID: <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> Hi V., > With this new Biosemi dataset (programmed by someone else in E-prime, it's not my data): Have you consulted with this ‘someone else’? From the looks of it, it doesn’t seem a FieldTrip issue per se. Best, JM > cfg=[]; > cfg.dataset = dataset; > cfg.trialdef.eventtype = 'STATUS'; > cfg.trialdef.eventvalue = '?'; > ft_definetrial returns markers that were not sent, and doesn't return markers that were sent. (The same occurs if I read the data in EEGlab by the way). > It doesn't look like there's a linear transformation between what was sent and what FT finds. For example, markers sent were 1:21; FT returns [3:23 29:31], but I'll definitely look into the suggestion that maybe 1:21 was sent but for some reason recorded as 3:23 and the 29:31 are coming from somewhere else. > > Thanks a lot! > Vitoria > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.braukmann at donders.ru.nl Fri Jan 23 18:14:31 2015 From: r.braukmann at donders.ru.nl (Ricarda Braukmann) Date: Fri, 23 Jan 2015 18:14:31 +0100 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <8a3cfe0d5138437498552cae9f944035@EXPRD01.hosting.ru.nl> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <8a3cfe0d5138437498552cae9f944035@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitoria, Im not sure this will help you but I still wanted to come back to the recoding that worked for me (and sorry for being so vague on it in my first email) So, I recoded it in Matlab. I first find the events in the bdf datafile and then redefine them using a small script I made myself (I am convinced there is an easier way but this worked for me and I had limited time and mainly wanted to have a quick look at the data): event = ft_read_event(bdfdataset); %redfine the events: event = EEGSynch_FFT_trialfun_BioSemiMarkerRedefine(event); I attached my redefine function if you want to have a look. In my case the first of the two markers should always be 255 which the script checks, but this might be different in your case. Let me know if anything is unclear still. Best, Ricarda On Fri, Jan 23, 2015 at 1:32 AM, Vitoria Piai wrote: > Hi Ricarda, Alex, Elmeri et al. > > Thanks. The files I'm trying to read are .bdf. > Ricarda, could you please clarify "I just recoded the markers."? Did you > edit the .bdf file with a text editor? > > In a previous dataset I acquired with Biosemi (in combination with > Presentation), with eventtype 'STATUS', I get the right event values in > the right number (that is, I send 10 times marker '1', ft_definetrial > finds 10 times marker '1'). > With this new Biosemi dataset (programmed by someone else in E-prime, > it's not my data): > cfg=[]; > cfg.dataset = dataset; > cfg.trialdef.eventtype = 'STATUS'; > cfg.trialdef.eventvalue = '?'; > ft_definetrial returns markers that were not sent, and doesn't return > markers that were sent. (The same occurs if I read the data in EEGlab by > the way). > It doesn't look like there's a linear transformation between what was > sent and what FT finds. For example, markers sent were 1:21; FT returns > [3:23 29:31], but I'll definitely look into the suggestion that maybe > 1:21 was sent but for some reason recorded as 3:23 and the 29:31 are > coming from somewhere else. > > Thanks a lot! > Vitoria > > -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bi2de.m Type: text/x-csrc Size: 4022 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: de2bi.m Type: text/x-csrc Size: 6173 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: EEGSynch_FFT_trialfun_BioSemiMarkerRedefine.m Type: text/x-csrc Size: 799 bytes Desc: not available URL: From v.piai.research at gmail.com Fri Jan 23 20:54:42 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Fri, 23 Jan 2015 11:54:42 -0800 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <54C19690.9070304@gmail.com> <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> Message-ID: <54C2A702.30800@gmail.com> Thanks, Ricarda and JM! JM, I know for sure it's not a FT problem :) I checked the E-prime scripts used and all the markers were sent (according to the E-prime code). What I'm trying to figure out is what kind of conversion was applied between E-prime and Biosemi so I can work backwards and still detect my events. It doesn't seem to be a linear transformation between what E-prime sent and Biosemi coded... Anyways, thanks a lot for your thoughts! Vitoria On 1/23/2015 9:09 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > Hi V., > >> With this new Biosemi dataset (programmed by someone else in E-prime, it's not my data): > Have you consulted with this ‘someone else’? From the looks of it, it doesn’t seem a FieldTrip issue per se. > > > Best, > JM > > > > >> cfg=[]; >> cfg.dataset = dataset; >> cfg.trialdef.eventtype = 'STATUS'; >> cfg.trialdef.eventvalue = '?'; >> ft_definetrial returns markers that were not sent, and doesn't return markers that were sent. (The same occurs if I read the data in EEGlab by the way). >> It doesn't look like there's a linear transformation between what was sent and what FT finds. For example, markers sent were 1:21; FT returns [3:23 29:31], but I'll definitely look into the suggestion that maybe 1:21 was sent but for some reason recorded as 3:23 and the 29:31 are coming from somewhere else. >> >> Thanks a lot! >> Vitoria >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From v.piai.research at gmail.com Mon Jan 26 04:29:48 2015 From: v.piai.research at gmail.com (=?windows-1252?Q?Vit=F3ria_Piai?=) Date: Sun, 25 Jan 2015 19:29:48 -0800 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <54C2A702.30800@gmail.com> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <54C19690.9070304@gmail.com> <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> <54C2A702.30800@gmail.com> Message-ID: <54C5B4AC.1080109@gmail.com> Hi all, I managed to gather more information regarding this issue and I thought I'd post the resolution here just in case someone bumps into the same problem in the future. The issue is indeed caused by not having set E-prime to work correctly with Biosemi. I use Presentation, and that goes flawlessly with Biosemi. But these data were acquired by someone else in E-prime. The reply from Biosemi's CEO below may be helpful in case you use E-prime. Thanks for all the thoughts, Vitoria >>>>>>>>>>>>>>>>>>>>>>>>>> First rule of triggering from E-Prime to ActiveTwo is that you must reset the port to zero after each non-zero code. Hold values high on the port for 10 msec or so and return to zero after and you will not see any of the problems you describe. E-Prime will not do this automatically (though it would seem logical for the software to do it) -- you must write a zero to the port after each code. Random codes occur when you do not follow the above rule if you have told ActiView to decimate EEG and triggersamples by some fraction other than 1 (e.g. 1/4th). By doing this you leave it to ActiView what value to assign to the trigger channel at samples bordering the intersection between two non-zero values. ActiView performs a logical AND between trigger bits in the high state on samples to be combined. So, if you had a 1 followed by a 2 with no zero in between and you decimate by 1/4 you will end up with 1 - 3 - 2. 3 is the logical AND of 1 and 2 in binary. ActiveTwo has a 16 bit trigger port. Your triggers are all on bits 0-7, probably because you are using a standard parallel port with only 8 bits. The value on the upper half of the Trig1-8 field is the value at the rising edge of the trigger and the value on the lower half of the Trig1-8 field is the value at the falling edge. This should be zero if you are resetting the port correctly. >>>>>>>>>>>>>>>>>>>> On 1/23/2015 11:54 AM, Vitoria Piai wrote: > Thanks, Ricarda and JM! > JM, I know for sure it's not a FT problem :) > > I checked the E-prime scripts used and all the markers were sent > (according to the E-prime code). What I'm trying to figure out is what > kind of conversion was applied between E-prime and Biosemi so I can > work backwards and still detect my events. It doesn't seem to be a > linear transformation between what E-prime sent and Biosemi coded... > Anyways, thanks a lot for your thoughts! > Vitoria > > On 1/23/2015 9:09 AM, Schoffelen, J.M. (Jan Mathijs) wrote: >> Hi V., >> >>> With this new Biosemi dataset (programmed by someone else in >>> E-prime, it's not my data): >> Have you consulted with this ‘someone else’? From the looks of it, it >> doesn’t seem a FieldTrip issue per se. >> >> >> Best, >> JM >> >> >> >> >>> cfg=[]; >>> cfg.dataset = dataset; >>> cfg.trialdef.eventtype = 'STATUS'; >>> cfg.trialdef.eventvalue = '?'; >>> ft_definetrial returns markers that were not sent, and doesn't >>> return markers that were sent. (The same occurs if I read the data >>> in EEGlab by the way). >>> It doesn't look like there's a linear transformation between what >>> was sent and what FT finds. For example, markers sent were 1:21; FT >>> returns [3:23 29:31], but I'll definitely look into the suggestion >>> that maybe 1:21 was sent but for some reason recorded as 3:23 and >>> the 29:31 are coming from somewhere else. >>> >>> Thanks a lot! >>> Vitoria >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From brungio at gmail.com Mon Jan 26 16:05:17 2015 From: brungio at gmail.com (Bruno L. Giordano) Date: Mon, 26 Jan 2015 15:05:17 +0000 Subject: [FieldTrip] ft_denoise_pca and ft_preproc_dftfilter on long trials In-Reply-To: <54C5B4AC.1080109@gmail.com> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <54C19690.9070304@gmail.com> <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> <54C2A702.30800@gmail.com> <54C5B4AC.1080109@gmail.com> Message-ID: <54C657AD.2080603@gmail.com> Hello, I am using the pca/regression method in ft_denoise_pca to get rid of reference-channel variance for rather long trials (>5 min). I am wondering whether these regression methods break down, or don't perform as well as they should be, when trials are this long. If yes, is there some alternative method I could use that performs better for long trials? I am wondering about trial length also because the regression method for line-noise removal in ft_preproc_dftfilter doesn't appear to perform well with trials of this length (even though they obviously do wonders when I preprocess shorter segments). Thank you, Bruno ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bruno L. Giordano, PhD Institute of Neuroscience and Psychology 58 Hillhead Street, University of Glasgow Glasgow, G12 8QB, Scotland T +44 (0) 141 330 5484 Www: http://www.brunolgiordano.net Email charter: http://www.emailcharter.org/ From nico.weeger at googlemail.com Tue Jan 27 17:50:34 2015 From: nico.weeger at googlemail.com (Nico Weeger) Date: Tue, 27 Jan 2015 17:50:34 +0100 Subject: [FieldTrip] Simulate data to compare methods Message-ID: Hello FieldTrip community, I am new to FieldTrip and I try to simulate data to compare the ft_frequanalysis methods Hanning, Multitaper and Wavelet. Therefore I simulate Data manually using different latency, amplitude and frequency combinations using the following equation: sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); sig = sig1+sig2+sig3+sig4; where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; After using ft_frequanalysis (see the following cfgs) *Cfg Wavelet:* cfg = []; cfg.output = 'pow'; cfg.channel = labels; cfg.method = 'wavelet'; cfg.width = 7; cfg.gwidth = 3; cfg.foilim = [1 70]; cfg.toi = 0:0.05:2; TFRwave = ft_freqanalysis(cfg, data_preproc); *Cfg Hanning / Multitaper:* cfg = []; cfg.output = 'pow'; cfg.channel = labels; cfg.method = 'mtmconvol' cfg.foi = 1:1:70 cfg.tapsmofrq = 0.2*cfg.foi; cfg.taper = 'dpss' / ‘hanning’; cfg.t_ftimwin = 4./cfg.foi; cfg.toi = 0:0.05:2; TFRmult1 = ft_freqanalysis(cfg, data_preproc); the data is plotted with ft_singleplotTFR (see cfg below) *cfg singleplot:* cfg = []; cfg.maskstyle = 'saturation'; cfg.colorbar = 'yes'; cfg.layout = 'AC_Osc.lay'; ft_singleplotTFR(cfg, TFRwave); Two problems occur. First, the power scale of wavelet and Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). 1. How can I get the scale of all methods equal, or do I have to change the Wavelet settings to get the right scale of the values? Second, the best result of Multitaper analysis is performed using only one Taper. The goal was to get a result, where the advantages and disadvantages of Multitaper analysis compared to the other methods can be seen. 2. How can I change the simulation so that more tapers show better results than a single taper does? Thank you for your time and help. Regards, Nicolas Weeger Student of Master-Program Appied Research, University Ansbach, Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Tue Jan 27 18:36:15 2015 From: mcantor at umich.edu (Max Cantor) Date: Tue, 27 Jan 2015 12:36:15 -0500 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: Hi Nico, I'm not sure about the second question, but as for the first question, you can manually set the scales for ft_singleplotTFR using cfg.zlim. Hope that helps, Max On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger wrote: > Hello FieldTrip community, > > > > I am new to FieldTrip and I try to simulate data to compare the > ft_frequanalysis methods Hanning, Multitaper and Wavelet. > > Therefore I simulate Data manually using different latency, amplitude and > frequency combinations using the following equation: > > sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > > sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > > sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > > sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > > sig = sig1+sig2+sig3+sig4; > > where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > > > After using ft_frequanalysis (see the following cfgs) > > > *Cfg Wavelet:* > > cfg = []; > > cfg.output = 'pow'; > > cfg.channel = labels; > > cfg.method = 'wavelet'; > > cfg.width = 7; > > cfg.gwidth = 3; > > cfg.foilim = [1 70]; > > cfg.toi = 0:0.05:2; > > TFRwave = ft_freqanalysis(cfg, data_preproc); > > > > *Cfg Hanning / Multitaper:* > > cfg = []; > > cfg.output = 'pow'; > > cfg.channel = labels; > > cfg.method = 'mtmconvol' > > cfg.foi = 1:1:70 > > cfg.tapsmofrq = 0.2*cfg.foi; > > cfg.taper = 'dpss' / ‘hanning’; > > cfg.t_ftimwin = 4./cfg.foi; > > cfg.toi = 0:0.05:2; > > TFRmult1 = ft_freqanalysis(cfg, data_preproc); > > > > > the data is plotted with ft_singleplotTFR (see cfg below) > > > *cfg singleplot:* > > cfg = []; > > cfg.maskstyle = 'saturation'; > > cfg.colorbar = 'yes'; > > cfg.layout = 'AC_Osc.lay'; > > ft_singleplotTFR(cfg, TFRwave); > > > Two problems occur. First, the power scale of wavelet and > Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). > > 1. How can I get the scale of all methods equal, or do I have to > change the Wavelet settings to get the right scale of the values? > > Second, the best result of Multitaper analysis is performed using only one > Taper. The goal was to get a result, where the advantages and disadvantages > of Multitaper analysis compared to the other methods can be seen. > > 2. How can I change the simulation so that more tapers show better > results than a single taper does? > > > Thank you for your time and help. > > > Regards, > > > > Nicolas Weeger > > Student of Master-Program Appied Research, > > University Ansbach, > > Germany > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From toomas.kirt at mail.ee Wed Jan 28 11:44:11 2015 From: toomas.kirt at mail.ee (Toomas Kirt) Date: Wed, 28 Jan 2015 12:44:11 +0200 Subject: [FieldTrip] 3rd Baltic-Nordic Summer School on Neuroinformatics (BNNI 2015) Message-ID: <1422441851.54c8bd7bdfae4@posti.mail.ee> An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Jan 28 12:24:25 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 28 Jan 2015 12:24:25 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: Hi Nico, As for question (2), you probably first need to think about what constitutes a "better" result. Using more tapers with dpss will always result in more frequency smoothing. If your source signal is primarily composed of pure sinusoids, and you interpret a spectrum as "better" if it shows clearer peaks, then you will always get the "best" result for the single-taper case. Multitapering allows optimal control over the amount of smoothing you obtain in the frequency domain, which is more or less independent of the amount of smoothing you obtain in the time domain (as opposed to e.g. wavelets, where these are fundamentally linked). When dealing with brain signals, you will often find that a certain stimulus might induce e.g. a gamma response at 40-50 Hz in one subject and one trial, while in another subject or another trial the same stimulus might induce a 50-60 Hz response or so. Of course, in the average over trials (and subjects), this heterogeneity (i.e., noise) will wash out, but it will severely damage your statistical sensitivity. Therefore, using multitapers to add smoothing can produce a much more consistent result and therefore be "better" in the sense of actually understanding the brain. As for your simulation, perhaps using filtered noise would be better than sinusoids. Also, since multitapering benefits you most strongly when taking variation over observations into account, you could consider simulating different observations, each consisting of noise filtered in a slightly different randomly chosen bandwidth, and inspecting the resulting variation over observations in the spectra. Best, Eelke On 27 January 2015 at 18:36, Max Cantor wrote: > Hi Nico, > > I'm not sure about the second question, but as for the first question, you > can manually set the scales for ft_singleplotTFR using cfg.zlim. > > Hope that helps, > > Max > > On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > wrote: >> >> Hello FieldTrip community, >> >> >> >> I am new to FieldTrip and I try to simulate data to compare the >> ft_frequanalysis methods Hanning, Multitaper and Wavelet. >> >> Therefore I simulate Data manually using different latency, amplitude and >> frequency combinations using the following equation: >> >> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); >> >> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); >> >> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); >> >> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); >> >> sig = sig1+sig2+sig3+sig4; >> >> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; >> >> >> After using ft_frequanalysis (see the following cfgs) >> >> >> Cfg Wavelet: >> >> cfg = []; >> >> cfg.output = 'pow'; >> >> cfg.channel = labels; >> >> cfg.method = 'wavelet'; >> >> cfg.width = 7; >> >> cfg.gwidth = 3; >> >> cfg.foilim = [1 70]; >> >> cfg.toi = 0:0.05:2; >> >> TFRwave = ft_freqanalysis(cfg, data_preproc); >> >> >> >> Cfg Hanning / Multitaper: >> >> cfg = []; >> >> cfg.output = 'pow'; >> >> cfg.channel = labels; >> >> cfg.method = 'mtmconvol' >> >> cfg.foi = 1:1:70 >> >> cfg.tapsmofrq = 0.2*cfg.foi; >> >> cfg.taper = 'dpss' / ‘hanning’; >> >> cfg.t_ftimwin = 4./cfg.foi; >> >> cfg.toi = 0:0.05:2; >> >> TFRmult1 = ft_freqanalysis(cfg, data_preproc); >> >> >> >> >> the data is plotted with ft_singleplotTFR (see cfg below) >> >> >> cfg singleplot: >> >> cfg = []; >> >> cfg.maskstyle = 'saturation'; >> >> cfg.colorbar = 'yes'; >> >> cfg.layout = 'AC_Osc.lay'; >> >> ft_singleplotTFR(cfg, TFRwave); >> >> >> Two problems occur. First, the power scale of wavelet and >> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). >> >> 1. How can I get the scale of all methods equal, or do I have to >> change the Wavelet settings to get the right scale of the values? >> >> Second, the best result of Multitaper analysis is performed using only one >> Taper. The goal was to get a result, where the advantages and disadvantages >> of Multitaper analysis compared to the other methods can be seen. >> >> 2. How can I change the simulation so that more tapers show better >> results than a single taper does? >> >> >> Thank you for your time and help. >> >> >> Regards, >> >> >> >> Nicolas Weeger >> >> Student of Master-Program Appied Research, >> >> University Ansbach, >> >> Germany >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan From t.jevtic at ucl.ac.uk Wed Jan 28 16:19:41 2015 From: t.jevtic at ucl.ac.uk (Jevtic, Tijana) Date: Wed, 28 Jan 2015 15:19:41 +0000 Subject: [FieldTrip] Compiling .cc files Message-ID: <1422458382579.81361@ucl.ac.uk> Hi everybody, Can I ask for anybody to point out how can I use bufferViewer.cc and tmsi2ft.cc aka, how can I compile/built etc them :) I looked through the email list and ft website but I can not find step by step explanation. I googled a lot but nothing seems to be working for me so far... Thank you very much in advance.? Best Wishes, Tijana ------------------ Tijana Jevtic, BSc, MSc, MIEEE PhD student, Research Assistant Aspire Create - Centre for Rehabilitation Engineering and Assistive Technology Institute of Orthopaedics and Musculoskeletal Science, University College London, Royal National Orthopaedic Hospital, Stanmore, HA7 4LP United Kingdom t.jevtic at ucl.ac.uk Tel: +44 (0) 7513 691217 http://www.ucl.ac.uk/aspire-create -------------- next part -------------- An HTML attachment was scrubbed... URL: From payashi.garry at seh.ox.ac.uk Wed Jan 28 16:32:51 2015 From: payashi.garry at seh.ox.ac.uk (Payashi Garry) Date: Wed, 28 Jan 2015 15:32:51 +0000 Subject: [FieldTrip] help with topoplot_TFR Message-ID: <522FFFC2-BC59-4995-8873-F2090932707A@ndcn.ox.ac.uk> Dear Fieldtrip community, My name is Payashi Garry and I am working in the Nuffield Department of Clinical Neurosciences in the University of Oxford. I am analysing some continuous EEG data that we have measured from our Neuro-Intensive Care unit patients. We are interested in using quantitative EEG measures to assess whether these can be used to detect cerebral ischaemia. I have performed time frequency analysis using ft_freqanalysis. I have then been usig ft_topoplotTFR to visualise the results with no problems. However, one of the parameters we are investigating is the change in alpha/delta ratio. I was wondering if it would be possible to create topographic maps of the alpha/delta ratio for a particular time period (i.e. alpha power/delta power) using ft_topoplotTFR? At the moment I am generating topographic maps for alpha and delta power using the following commands: cfg=[]; cfg.baselinetype = 'absolute'; cfg.xlim = [10 2500]; cfg.ylim = [1 4]; cfg.zlim = [0 100]; cfg.colorbar = 'yes'; figure ft_topoplotTFR(cfg, freq_continuous) title('delta power prenitrite', 'FontSize', 36, 'FontName', 'Arial') with freq_continuous being my time/frequency/channel data. I would be very grateful for any advice on this, and would be happy to supply more information if needed. Many thanks Best wishes Payashi **** Dr Payashi Garry MB BChir FRCA Specialty Registrar in Anaesthetics and BRC Research Fellow Nuffield Department of Clinical Neurosciences John Radcliffe Hospital Oxford OX3 9DU Tel: 01865 572878 From tzvetan.popov at uni-konstanz.de Wed Jan 28 17:20:29 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Wed, 28 Jan 2015 17:20:29 +0100 Subject: [FieldTrip] help with topoplot_TFR In-Reply-To: <522FFFC2-BC59-4995-8873-F2090932707A@ndcn.ox.ac.uk> References: <522FFFC2-BC59-4995-8873-F2090932707A@ndcn.ox.ac.uk> Message-ID: Dear Payashi, you could compute the ratio per sample point and write it for example in ratiodata.avg= ratio. Where ratio is a chan_time matrix. Then you could type ratiodata.label = freq_continuous.label; ratiodata.dimord = ‘chan_time’. Next, you can use ft_multiplotER which handles time domain data where cfg.xlim is the option you need in order to plot the ratio topography for a particular time point. Is this what you need? good luck tzvetan > Dear Fieldtrip community, > > My name is Payashi Garry and I am working in the Nuffield Department of Clinical Neurosciences in the University of Oxford. I am analysing some continuous EEG data that we have measured from our Neuro-Intensive Care unit patients. We are interested in using quantitative EEG measures to assess whether these can be used to detect cerebral ischaemia. > > I have performed time frequency analysis using ft_freqanalysis. I have then been usig ft_topoplotTFR to visualise the results with no problems. However, one of the parameters we are investigating is the change in alpha/delta ratio. I was wondering if it would be possible to create topographic maps of the alpha/delta ratio for a particular time period (i.e. alpha power/delta power) using ft_topoplotTFR? > > At the moment I am generating topographic maps for alpha and delta power using the following commands: > > cfg=[]; > cfg.baselinetype = 'absolute'; > cfg.xlim = [10 2500]; > cfg.ylim = [1 4]; > cfg.zlim = [0 100]; > cfg.colorbar = 'yes'; > figure > ft_topoplotTFR(cfg, freq_continuous) > title('delta power prenitrite', 'FontSize', 36, 'FontName', 'Arial') > > with freq_continuous being my time/frequency/channel data. > > I would be very grateful for any advice on this, and would be happy to supply more information if needed. > > Many thanks > Best wishes > Payashi > > **** > Dr Payashi Garry MB BChir FRCA > Specialty Registrar in Anaesthetics and BRC Research Fellow > Nuffield Department of Clinical Neurosciences > John Radcliffe Hospital > Oxford OX3 9DU > Tel: 01865 572878 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jens.klinzing at uni-tuebingen.de Thu Jan 29 13:16:07 2015 From: jens.klinzing at uni-tuebingen.de (=?windows-1252?Q?=22Jens_Klinzing=2C_Universit=E4t_T=FCbingen?= =?windows-1252?Q?=22?=) Date: Thu, 29 Jan 2015 13:16:07 +0100 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> Message-ID: <54CA2487.9030108@uni-tuebingen.de> Hi Marieke, I had the impression that you are interested in the automatic low-pass filtering performed by ft_resampledata. If you don't specify cfg.resamplemethod = 'downsample', ft_resampledata will call the built-in matlab function 'resample' to do the job. This function automatically applies a low-pass filter before resampling. mathworks.com/help/signal/ref/resample.html "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." I couldn't find an explicit statement what the cutoff frequency of that filter would be, though. There are some forum entries on the web, but they don't give the answer either. Can someone help? All the best, Jens Am 23.01.2015 um 17:56 schrieb Schoffelen, J.M. (Jan Mathijs): > Marieke, > Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. > > JM > > > On Jan 23, 2015, at 2:39 PM, Eleanor Harding wrote: > >> Hi Marieke, >> >> A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, >> >> Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. >> >> Good luck, >> Ellie Harding >> >> >> >> Message: 5 >> Date: Thu, 22 Jan 2015 16:50:26 +0000 >> From: "Nieuwenhuijzen, M.E. van de (Marieke)" >> >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] Low-pass frequency when downsampling using >> ft_resampledata >> Message-ID: >> >> Content-Type: text/plain; charset="iso-8859-1" >> >> Hi Fieldtrippers, >> >> I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? >> >> Best, >> Marieke >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: >> >> >> -- >> ------------------------------------------------------------------ >> Eleanor Harding >> PhD Student >> Max Planck Institute for Human Cognitive and Brain Sciences >> Stephanstraße 1A, 04103 Leipzig, Germany >> Phone: +49 341 9940-2268 >> Fax: +49 341 9940 2260 >> http://www.cbs.mpg.de/~harding >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From bioeng.yoosofzadeh at gmail.com Thu Jan 29 15:31:47 2015 From: bioeng.yoosofzadeh at gmail.com (Vahab Yousofzadeh) Date: Thu, 29 Jan 2015 14:31:47 +0000 Subject: [FieldTrip] PhD studentships related to MEG research at university of Ulster Message-ID: Dear All, On behalf of the University of Ulster’s Intelligent Systems Research Centre, I am helping to announce the following available PhD studentships related to MEG research: *http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=821&ri=3 * *http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=780&ri=3 * *http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=822&ri=3 * Please note that the application deadline is on the 27th Feb, and anyone interested should apply at http://www.compeng.ulster.ac.uk/rgs/guideForApplicants.php Best Regards, Vahab Youssofzadeh -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Butz at uni-duesseldorf.de Thu Jan 29 15:52:29 2015 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Thu, 29 Jan 2015 15:52:29 +0100 Subject: [FieldTrip] PhD studentships related to MEG research at university of Ulster In-Reply-To: References: Message-ID: <7350b030a1772.54ca573d@uni-duesseldorf.de> Dear Vahab just saw your job add and thought you might also be interested in advertising this over the mailing list of www.megcommunity.org(http://www.megcommunity.org). This is a non-commercial website run by MEG researchers from different labs and countries. You can reach a couple of hundred of MEG researchers worldwide via our mailing list by now. Hope this helps and best wishes Markus PS: All the best for your MEG research and starting up the new MEG centre! Am 29.01.15 15:42 schrieb Vahab Yousofzadeh : > > > > > Dear All, > > > > On behalf of the University of Ulster’s Intelligent Systems Research Centre, I am helping to announce the following available PhD studentships related to MEG research: > > > > http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=821&ri=3 > > http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=780&ri=3 > > http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=822&ri=3 > > > > Please note that the application deadline is on the 27th Feb, and anyone interested should apply at > > http://www.compeng.ulster.ac.uk/rgs/guideForApplicants.php > > > > Best Regards, > > Vahab Youssofzadeh > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From widmann at uni-leipzig.de Thu Jan 29 17:19:47 2015 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Thu, 29 Jan 2015 17:19:47 +0100 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: <54CA2487.9030108@uni-tuebingen.de> References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> <54CA2487.9030108@uni-tuebingen.de> Message-ID: <3D8E568A-7E77-437C-93BA-03CA0639CE44@uni-leipzig.de> Dear Marieke and Jens, MATLAB resample sets the -6dB half-amplitude cutoff of the anti-aliasing filter to the new Nyquist frequency. This is quite common practice, however, for EEG/MEG data this is not recommended, as the remaining energy in the transition band above the cutoff/new Nyquist frequency can still introduce considerable aliasing artifacts. So indeed the current Fieldtrip implementation is problematic. In the attached Fig. 1 a frequency response plot as it would be applied when downsampling from 500 to 250 Hz. Even worse is that resample (and Fieldtrip) does not apply any padding of the signal before filtering (doc resample: "In its filtering process, resample assumes that the input sequence, x, is zero before and after the samples it is given. Thus, large deviations from zero at the endpoints of x can cause inaccuracies in y at its endpoints.“). This will introduce DC artifacts at the beginning and end of the data. In particular for epoched data this can result in quite massive distortions (see Fig. 2 in the attachment; filtered and downsampled series of ones; same filter as above; same problem as it was formerly observed in EEGLAB: https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=1017). I suggest submitting a bug report (please put me into cc). I think I can fix both problems but this will take some days. I would recommend not using the current implementation. Best, Andreas > Am 29.01.2015 um 13:16 schrieb Jens Klinzing, Universität Tübingen : > > Hi Marieke, > I had the impression that you are interested in the automatic low-pass filtering performed by ft_resampledata. > > If you don't specify cfg.resamplemethod = 'downsample', ft_resampledata will call the built-in matlab function 'resample' to do the job. This function automatically applies a low-pass filter before resampling. > > mathworks.com/help/signal/ref/resample.html > > "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." > > I couldn't find an explicit statement what the cutoff frequency of that filter would be, though. There are some forum entries on the web, but they don't give the answer either. > > Can someone help? > > All the best, > Jens > > Am 23.01.2015 um 17:56 schrieb Schoffelen, J.M. (Jan Mathijs): >> Marieke, >> Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. >> >> JM >> >> >> On Jan 23, 2015, at 2:39 PM, Eleanor Harding wrote: >> >>> Hi Marieke, >>> >>> A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, >>> >>> Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. >>> >>> Good luck, >>> Ellie Harding >>> >>> >>> >>> Message: 5 >>> Date: Thu, 22 Jan 2015 16:50:26 +0000 >>> From: "Nieuwenhuijzen, M.E. van de (Marieke)" >>> >>> To: "fieldtrip at science.ru.nl" >>> Subject: [FieldTrip] Low-pass frequency when downsampling using >>> ft_resampledata >>> Message-ID: >>> >>> Content-Type: text/plain; charset="iso-8859-1" >>> >>> Hi Fieldtrippers, >>> >>> I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? >>> >>> Best, >>> Marieke >>> -------------- next part -------------- >>> An HTML attachment was scrubbed... >>> URL: >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Eleanor Harding >>> PhD Student >>> Max Planck Institute for Human Cognitive and Brain Sciences >>> Stephanstraße 1A, 04103 Leipzig, Germany >>> Phone: +49 341 9940-2268 >>> Fax: +49 341 9940 2260 >>> http://www.cbs.mpg.de/~harding >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fig1_fresp.jpg Type: image/jpeg Size: 35336 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fig2_dcartifact.jpg Type: image/jpeg Size: 13995 bytes Desc: not available URL: From nico.weeger at googlemail.com Thu Jan 29 17:43:04 2015 From: nico.weeger at googlemail.com (Nico Weeger) Date: Thu, 29 Jan 2015 17:43:04 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: Hi Eelke, thank you very much for ur advice! Due to ur help I solved the problem using multiple trials and different frequencies. Thanks a lot! Best regards Nico 2015-01-28 12:24 GMT+01:00 Eelke Spaak : > Hi Nico, > > As for question (2), you probably first need to think about what > constitutes a "better" result. Using more tapers with dpss will always > result in more frequency smoothing. If your source signal is primarily > composed of pure sinusoids, and you interpret a spectrum as "better" > if it shows clearer peaks, then you will always get the "best" result > for the single-taper case. > > Multitapering allows optimal control over the amount of smoothing you > obtain in the frequency domain, which is more or less independent of > the amount of smoothing you obtain in the time domain (as opposed to > e.g. wavelets, where these are fundamentally linked). When dealing > with brain signals, you will often find that a certain stimulus might > induce e.g. a gamma response at 40-50 Hz in one subject and one trial, > while in another subject or another trial the same stimulus might > induce a 50-60 Hz response or so. Of course, in the average over > trials (and subjects), this heterogeneity (i.e., noise) will wash out, > but it will severely damage your statistical sensitivity. Therefore, > using multitapers to add smoothing can produce a much more consistent > result and therefore be "better" in the sense of actually > understanding the brain. > > As for your simulation, perhaps using filtered noise would be better > than sinusoids. Also, since multitapering benefits you most strongly > when taking variation over observations into account, you could > consider simulating different observations, each consisting of noise > filtered in a slightly different randomly chosen bandwidth, and > inspecting the resulting variation over observations in the spectra. > > Best, > Eelke > > On 27 January 2015 at 18:36, Max Cantor wrote: > > Hi Nico, > > > > I'm not sure about the second question, but as for the first question, > you > > can manually set the scales for ft_singleplotTFR using cfg.zlim. > > > > Hope that helps, > > > > Max > > > > On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger < > nico.weeger at googlemail.com> > > wrote: > >> > >> Hello FieldTrip community, > >> > >> > >> > >> I am new to FieldTrip and I try to simulate data to compare the > >> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > >> > >> Therefore I simulate Data manually using different latency, amplitude > and > >> frequency combinations using the following equation: > >> > >> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > >> > >> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > >> > >> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > >> > >> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > >> > >> sig = sig1+sig2+sig3+sig4; > >> > >> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > >> > >> > >> After using ft_frequanalysis (see the following cfgs) > >> > >> > >> Cfg Wavelet: > >> > >> cfg = []; > >> > >> cfg.output = 'pow'; > >> > >> cfg.channel = labels; > >> > >> cfg.method = 'wavelet'; > >> > >> cfg.width = 7; > >> > >> cfg.gwidth = 3; > >> > >> cfg.foilim = [1 70]; > >> > >> cfg.toi = 0:0.05:2; > >> > >> TFRwave = ft_freqanalysis(cfg, data_preproc); > >> > >> > >> > >> Cfg Hanning / Multitaper: > >> > >> cfg = []; > >> > >> cfg.output = 'pow'; > >> > >> cfg.channel = labels; > >> > >> cfg.method = 'mtmconvol' > >> > >> cfg.foi = 1:1:70 > >> > >> cfg.tapsmofrq = 0.2*cfg.foi; > >> > >> cfg.taper = 'dpss' / ‘hanning’; > >> > >> cfg.t_ftimwin = 4./cfg.foi; > >> > >> cfg.toi = 0:0.05:2; > >> > >> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > >> > >> > >> > >> > >> the data is plotted with ft_singleplotTFR (see cfg below) > >> > >> > >> cfg singleplot: > >> > >> cfg = []; > >> > >> cfg.maskstyle = 'saturation'; > >> > >> cfg.colorbar = 'yes'; > >> > >> cfg.layout = 'AC_Osc.lay'; > >> > >> ft_singleplotTFR(cfg, TFRwave); > >> > >> > >> Two problems occur. First, the power scale of wavelet and > >> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet > 0-~15*10^4). > >> > >> 1. How can I get the scale of all methods equal, or do I have to > >> change the Wavelet settings to get the right scale of the values? > >> > >> Second, the best result of Multitaper analysis is performed using only > one > >> Taper. The goal was to get a result, where the advantages and > disadvantages > >> of Multitaper analysis compared to the other methods can be seen. > >> > >> 2. How can I change the simulation so that more tapers show better > >> results than a single taper does? > >> > >> > >> Thank you for your time and help. > >> > >> > >> Regards, > >> > >> > >> > >> Nicolas Weeger > >> > >> Student of Master-Program Appied Research, > >> > >> University Ansbach, > >> > >> Germany > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -- > > Max Cantor > > Lab Manager > > Computational Neurolinguistics Lab > > University of Michigan > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Thu Jan 29 19:31:24 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 29 Jan 2015 19:31:24 +0100 Subject: [FieldTrip] help with topoplot_TFR In-Reply-To: <1750B296-D38B-4912-B843-FFC5D0B5B1BC@ndcn.ox.ac.uk> References: <1750B296-D38B-4912-B843-FFC5D0B5B1BC@ndcn.ox.ac.uk> Message-ID: Hi Payashi, > I have computed the ratio per sample and called it ADR. It is a 14x1x480 matrix (channels x freq x time). good, so now you squeeze(ADR) in order to get the actual ‘chan_time’ representation. Then you introduce a new variable say tlk_ADR: tlk_ADR.avg =ADR; tlk_ADR.label = freq_ADR.label; tlk_ADR.dimord = freq_ADR.dimord; tlk_ADR.time = freq_ADR.time; tlk_ADR.elec = freq_ADR.elec; then you call all plotting functions that deal with time domain signals such as ft_multiplotER, ft_singleplotER and ft_topoplotER. Not …TFR. So your code would look like; > cfg=[]; > cfg.xlim = [3000 3200]; > cfg.colorbar = 'yes'; > figure > ft_topoplotER(cfg, tlk_ADR); good luck tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jan 29 19:37:20 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 29 Jan 2015 18:37:20 +0000 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: <3D8E568A-7E77-437C-93BA-03CA0639CE44@uni-leipzig.de> References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> <54CA2487.9030108@uni-tuebingen.de> <3D8E568A-7E77-437C-93BA-03CA0639CE44@uni-leipzig.de> Message-ID: <38A19F94-055C-4B26-8DA6-BBB0CB393A35@fcdonders.ru.nl> Dear Andreas, Note that ft_resampledata supports the options demean and detrend. Also, as of release 9829 FT always explicitly removes the epoch-wise DC-offset prior to resampling (and adds it back if cfg.demean is ‘no’), which means that users that are not aware of the potential problem are partly protected against strong DC offsets. Our recommendation is furthermore not to detrend, because this may distort slow event-related components in a non-trivial way. Also, it may falsely introduce experimental effects at unexpected time points, e.g. in the baseline. If the user suspects that low-frequency energy in the signals may lead to funny edge behavior in the resampling step, I’d recommend either to highpassfilter the data prior to resampling, or to read in more data than needed, so that the edge effects end up in non-interesting parts of the data. I think that a more aggressive lowpassfilter will be a useful option to build in. Best, Jan-Mathijs On Jan 29, 2015, at 5:19 PM, Andreas Widmann > wrote: Dear Marieke and Jens, MATLAB resample sets the -6dB half-amplitude cutoff of the anti-aliasing filter to the new Nyquist frequency. This is quite common practice, however, for EEG/MEG data this is not recommended, as the remaining energy in the transition band above the cutoff/new Nyquist frequency can still introduce considerable aliasing artifacts. So indeed the current Fieldtrip implementation is problematic. In the attached Fig. 1 a frequency response plot as it would be applied when downsampling from 500 to 250 Hz. Even worse is that resample (and Fieldtrip) does not apply any padding of the signal before filtering (doc resample: "In its filtering process, resample assumes that the input sequence, x, is zero before and after the samples it is given. Thus, large deviations from zero at the endpoints of x can cause inaccuracies in y at its endpoints.“). This will introduce DC artifacts at the beginning and end of the data. In particular for epoched data this can result in quite massive distortions (see Fig. 2 in the attachment; filtered and downsampled series of ones; same filter as above; same problem as it was formerly observed in EEGLAB: https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=1017). I suggest submitting a bug report (please put me into cc). I think I can fix both problems but this will take some days. I would recommend not using the current implementation. Best, Andreas Am 29.01.2015 um 13:16 schrieb Jens Klinzing, Universität Tübingen >: Hi Marieke, I had the impression that you are interested in the automatic low-pass filtering performed by ft_resampledata. If you don't specify cfg.resamplemethod = 'downsample', ft_resampledata will call the built-in matlab function 'resample' to do the job. This function automatically applies a low-pass filter before resampling. mathworks.com/help/signal/ref/resample.html "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." I couldn't find an explicit statement what the cutoff frequency of that filter would be, though. There are some forum entries on the web, but they don't give the answer either. Can someone help? All the best, Jens Am 23.01.2015 um 17:56 schrieb Schoffelen, J.M. (Jan Mathijs): Marieke, Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. JM On Jan 23, 2015, at 2:39 PM, Eleanor Harding > wrote: Hi Marieke, A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. Good luck, Ellie Harding Message: 5 Date: Thu, 22 Jan 2015 16:50:26 +0000 From: "Nieuwenhuijzen, M.E. van de (Marieke)" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata Message-ID: > Content-Type: text/plain; charset="iso-8859-1" Hi Fieldtrippers, I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstraße 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjordanov at besa.de Fri Jan 30 11:10:15 2015 From: tjordanov at besa.de (tjordanov at besa.de) Date: Fri, 30 Jan 2015 11:10:15 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: <001601d03c74$f1b617e0$d52247a0$@de> Hi Eelke, I found your answer very interesting. If I understand you correctly, the advantage of the multitaper method is that it smoothes in the frequency domain independently of the smoothing in the time domain. Then it should be equivalent (or similar) with the following procedure: 1) Calculate single trial single taper decomposition of the signal. 2) Choose an appropriate 1D Gauss function (note that it is important to be 1D else it would smooth in both - time and frequency) 3) Apply the selected Gauss function on the decomposed signal only in the frequency direction (not in time in order to avoid temporal smearing). Do this for all trials and all time points. 4) Calculate the average over the trials. In this procedure the choice of the Gaussian would determine the amount of smearing in the frequency domain. Is this so, or I misunderstood something? Best, Todor -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak Sent: Mittwoch, 28. Januar 2015 12:24 To: FieldTrip discussion list Subject: Re: [FieldTrip] Simulate data to compare methods Hi Nico, As for question (2), you probably first need to think about what constitutes a "better" result. Using more tapers with dpss will always result in more frequency smoothing. If your source signal is primarily composed of pure sinusoids, and you interpret a spectrum as "better" if it shows clearer peaks, then you will always get the "best" result for the single-taper case. Multitapering allows optimal control over the amount of smoothing you obtain in the frequency domain, which is more or less independent of the amount of smoothing you obtain in the time domain (as opposed to e.g. wavelets, where these are fundamentally linked). When dealing with brain signals, you will often find that a certain stimulus might induce e.g. a gamma response at 40-50 Hz in one subject and one trial, while in another subject or another trial the same stimulus might induce a 50-60 Hz response or so. Of course, in the average over trials (and subjects), this heterogeneity (i.e., noise) will wash out, but it will severely damage your statistical sensitivity. Therefore, using multitapers to add smoothing can produce a much more consistent result and therefore be "better" in the sense of actually understanding the brain. As for your simulation, perhaps using filtered noise would be better than sinusoids. Also, since multitapering benefits you most strongly when taking variation over observations into account, you could consider simulating different observations, each consisting of noise filtered in a slightly different randomly chosen bandwidth, and inspecting the resulting variation over observations in the spectra. Best, Eelke On 27 January 2015 at 18:36, Max Cantor wrote: > Hi Nico, > > I'm not sure about the second question, but as for the first question, > you can manually set the scales for ft_singleplotTFR using cfg.zlim. > > Hope that helps, > > Max > > On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > > wrote: >> >> Hello FieldTrip community, >> >> >> >> I am new to FieldTrip and I try to simulate data to compare the >> ft_frequanalysis methods Hanning, Multitaper and Wavelet. >> >> Therefore I simulate Data manually using different latency, amplitude >> and frequency combinations using the following equation: >> >> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); >> >> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); >> >> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); >> >> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); >> >> sig = sig1+sig2+sig3+sig4; >> >> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; >> >> >> After using ft_frequanalysis (see the following cfgs) >> >> >> Cfg Wavelet: >> >> cfg = []; >> >> cfg.output = 'pow'; >> >> cfg.channel = labels; >> >> cfg.method = 'wavelet'; >> >> cfg.width = 7; >> >> cfg.gwidth = 3; >> >> cfg.foilim = [1 70]; >> >> cfg.toi = 0:0.05:2; >> >> TFRwave = ft_freqanalysis(cfg, data_preproc); >> >> >> >> Cfg Hanning / Multitaper: >> >> cfg = []; >> >> cfg.output = 'pow'; >> >> cfg.channel = labels; >> >> cfg.method = 'mtmconvol' >> >> cfg.foi = 1:1:70 >> >> cfg.tapsmofrq = 0.2*cfg.foi; >> >> cfg.taper = 'dpss' / ‘hanning’; >> >> cfg.t_ftimwin = 4./cfg.foi; >> >> cfg.toi = 0:0.05:2; >> >> TFRmult1 = ft_freqanalysis(cfg, data_preproc); >> >> >> >> >> the data is plotted with ft_singleplotTFR (see cfg below) >> >> >> cfg singleplot: >> >> cfg = []; >> >> cfg.maskstyle = 'saturation'; >> >> cfg.colorbar = 'yes'; >> >> cfg.layout = 'AC_Osc.lay'; >> >> ft_singleplotTFR(cfg, TFRwave); >> >> >> Two problems occur. First, the power scale of wavelet and >> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). >> >> 1. How can I get the scale of all methods equal, or do I have to >> change the Wavelet settings to get the right scale of the values? >> >> Second, the best result of Multitaper analysis is performed using >> only one Taper. The goal was to get a result, where the advantages >> and disadvantages of Multitaper analysis compared to the other methods can be seen. >> >> 2. How can I change the simulation so that more tapers show better >> results than a single taper does? >> >> >> Thank you for your time and help. >> >> >> Regards, >> >> >> >> Nicolas Weeger >> >> Student of Master-Program Appied Research, >> >> University Ansbach, >> >> Germany >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Jan 30 11:51:37 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 30 Jan 2015 11:51:37 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: Hi Todor, Although your procedure would also yield smoothing in the frequency domain which is independent from that in the time domain, it is not at all equivalent to using multitapers! The tapers in the discrete prolate spheroidal sequence (dpss, == multitaper in fieldtrip) are pairwise orthogonal, hence their estimates are independent from one another. This will result in there being more information extracted from the signal than if you used a single taper and then apply Gaussian smoothing over frequencies. You could have a look at https://en.wikipedia.org/wiki/Multitaper which gives quite a decent overview of multitapering. Or for the full details, refer to the original paper by David Thompson: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 Best. Eelke On 30 January 2015 at 11:10, tjordanov at besa.de wrote: > Hi Eelke, > > I found your answer very interesting. If I understand you correctly, the advantage of the multitaper method is that it smoothes in the frequency domain independently of the smoothing in the time domain. Then it should be equivalent (or similar) with the following procedure: > 1) Calculate single trial single taper decomposition of the signal. > 2) Choose an appropriate 1D Gauss function (note that it is important to be 1D else it would smooth in both - time and frequency) > 3) Apply the selected Gauss function on the decomposed signal only in the frequency direction (not in time in order to avoid temporal smearing). Do this for all trials and all time points. > 4) Calculate the average over the trials. > In this procedure the choice of the Gaussian would determine the amount of smearing in the frequency domain. > > Is this so, or I misunderstood something? > > Best, > Todor > > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > Sent: Mittwoch, 28. Januar 2015 12:24 > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Nico, > > As for question (2), you probably first need to think about what constitutes a "better" result. Using more tapers with dpss will always result in more frequency smoothing. If your source signal is primarily composed of pure sinusoids, and you interpret a spectrum as "better" > if it shows clearer peaks, then you will always get the "best" result for the single-taper case. > > Multitapering allows optimal control over the amount of smoothing you obtain in the frequency domain, which is more or less independent of the amount of smoothing you obtain in the time domain (as opposed to e.g. wavelets, where these are fundamentally linked). When dealing with brain signals, you will often find that a certain stimulus might induce e.g. a gamma response at 40-50 Hz in one subject and one trial, while in another subject or another trial the same stimulus might induce a 50-60 Hz response or so. Of course, in the average over trials (and subjects), this heterogeneity (i.e., noise) will wash out, but it will severely damage your statistical sensitivity. Therefore, using multitapers to add smoothing can produce a much more consistent result and therefore be "better" in the sense of actually understanding the brain. > > As for your simulation, perhaps using filtered noise would be better than sinusoids. Also, since multitapering benefits you most strongly when taking variation over observations into account, you could consider simulating different observations, each consisting of noise filtered in a slightly different randomly chosen bandwidth, and inspecting the resulting variation over observations in the spectra. > > Best, > Eelke > > On 27 January 2015 at 18:36, Max Cantor wrote: >> Hi Nico, >> >> I'm not sure about the second question, but as for the first question, >> you can manually set the scales for ft_singleplotTFR using cfg.zlim. >> >> Hope that helps, >> >> Max >> >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger >> >> wrote: >>> >>> Hello FieldTrip community, >>> >>> >>> >>> I am new to FieldTrip and I try to simulate data to compare the >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. >>> >>> Therefore I simulate Data manually using different latency, amplitude >>> and frequency combinations using the following equation: >>> >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); >>> >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); >>> >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); >>> >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); >>> >>> sig = sig1+sig2+sig3+sig4; >>> >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; >>> >>> >>> After using ft_frequanalysis (see the following cfgs) >>> >>> >>> Cfg Wavelet: >>> >>> cfg = []; >>> >>> cfg.output = 'pow'; >>> >>> cfg.channel = labels; >>> >>> cfg.method = 'wavelet'; >>> >>> cfg.width = 7; >>> >>> cfg.gwidth = 3; >>> >>> cfg.foilim = [1 70]; >>> >>> cfg.toi = 0:0.05:2; >>> >>> TFRwave = ft_freqanalysis(cfg, data_preproc); >>> >>> >>> >>> Cfg Hanning / Multitaper: >>> >>> cfg = []; >>> >>> cfg.output = 'pow'; >>> >>> cfg.channel = labels; >>> >>> cfg.method = 'mtmconvol' >>> >>> cfg.foi = 1:1:70 >>> >>> cfg.tapsmofrq = 0.2*cfg.foi; >>> >>> cfg.taper = 'dpss' / ‘hanning’; >>> >>> cfg.t_ftimwin = 4./cfg.foi; >>> >>> cfg.toi = 0:0.05:2; >>> >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); >>> >>> >>> >>> >>> the data is plotted with ft_singleplotTFR (see cfg below) >>> >>> >>> cfg singleplot: >>> >>> cfg = []; >>> >>> cfg.maskstyle = 'saturation'; >>> >>> cfg.colorbar = 'yes'; >>> >>> cfg.layout = 'AC_Osc.lay'; >>> >>> ft_singleplotTFR(cfg, TFRwave); >>> >>> >>> Two problems occur. First, the power scale of wavelet and >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). >>> >>> 1. How can I get the scale of all methods equal, or do I have to >>> change the Wavelet settings to get the right scale of the values? >>> >>> Second, the best result of Multitaper analysis is performed using >>> only one Taper. The goal was to get a result, where the advantages >>> and disadvantages of Multitaper analysis compared to the other methods can be seen. >>> >>> 2. How can I change the simulation so that more tapers show better >>> results than a single taper does? >>> >>> >>> Thank you for your time and help. >>> >>> >>> Regards, >>> >>> >>> >>> Nicolas Weeger >>> >>> Student of Master-Program Appied Research, >>> >>> University Ansbach, >>> >>> Germany >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> Max Cantor >> Lab Manager >> Computational Neurolinguistics Lab >> University of Michigan > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jorn at artinis.com Fri Jan 30 13:34:16 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Fri, 30 Jan 2015 13:34:16 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: <002c01d03c89$0ff98020$2fec8060$@artinis.com> Hi Todor, maybe this matlab function helps illustrating what dpss multitapers are, and will thus clarify what makes them so powerful compared to other techniques: https://www.dropbox.com/s/0uifk9l8rb6m5vl/Tapering.m?dl=0 (go to example 5) Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Eelke Spaak > Sent: Friday, January 30, 2015 11:52 AM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Todor, > > Although your procedure would also yield smoothing in the frequency > domain which is independent from that in the time domain, it is not at all > equivalent to using multitapers! > > The tapers in the discrete prolate spheroidal sequence (dpss, == multitaper > in fieldtrip) are pairwise orthogonal, hence their estimates are independent > from one another. This will result in there being more information extracted > from the signal than if you used a single taper and then apply Gaussian > smoothing over frequencies. You could have a look at > https://en.wikipedia.org/wiki/Multitaper which gives quite a decent > overview of multitapering. Or for the full details, refer to the original paper > by David Thompson: > http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 > > Best. > Eelke > > On 30 January 2015 at 11:10, tjordanov at besa.de > wrote: > > Hi Eelke, > > > > I found your answer very interesting. If I understand you correctly, the > advantage of the multitaper method is that it smoothes in the frequency > domain independently of the smoothing in the time domain. Then it should > be equivalent (or similar) with the following procedure: > > 1) Calculate single trial single taper decomposition of the signal. > > 2) Choose an appropriate 1D Gauss function (note that it is important > > to be 1D else it would smooth in both - time and frequency) > > 3) Apply the selected Gauss function on the decomposed signal only in the > frequency direction (not in time in order to avoid temporal smearing). Do this > for all trials and all time points. > > 4) Calculate the average over the trials. > > In this procedure the choice of the Gaussian would determine the amount > of smearing in the frequency domain. > > > > Is this so, or I misunderstood something? > > > > Best, > > Todor > > > > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > > Sent: Mittwoch, 28. Januar 2015 12:24 > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > Hi Nico, > > > > As for question (2), you probably first need to think about what constitutes > a "better" result. Using more tapers with dpss will always result in more > frequency smoothing. If your source signal is primarily composed of pure > sinusoids, and you interpret a spectrum as "better" > > if it shows clearer peaks, then you will always get the "best" result for the > single-taper case. > > > > Multitapering allows optimal control over the amount of smoothing you > obtain in the frequency domain, which is more or less independent of the > amount of smoothing you obtain in the time domain (as opposed to e.g. > wavelets, where these are fundamentally linked). When dealing with brain > signals, you will often find that a certain stimulus might induce e.g. a gamma > response at 40-50 Hz in one subject and one trial, while in another subject or > another trial the same stimulus might induce a 50-60 Hz response or so. Of > course, in the average over trials (and subjects), this heterogeneity (i.e., > noise) will wash out, but it will severely damage your statistical sensitivity. > Therefore, using multitapers to add smoothing can produce a much more > consistent result and therefore be "better" in the sense of actually > understanding the brain. > > > > As for your simulation, perhaps using filtered noise would be better than > sinusoids. Also, since multitapering benefits you most strongly when taking > variation over observations into account, you could consider simulating > different observations, each consisting of noise filtered in a slightly different > randomly chosen bandwidth, and inspecting the resulting variation over > observations in the spectra. > > > > Best, > > Eelke > > > > On 27 January 2015 at 18:36, Max Cantor wrote: > >> Hi Nico, > >> > >> I'm not sure about the second question, but as for the first > >> question, you can manually set the scales for ft_singleplotTFR using > cfg.zlim. > >> > >> Hope that helps, > >> > >> Max > >> > >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > >> > >> wrote: > >>> > >>> Hello FieldTrip community, > >>> > >>> > >>> > >>> I am new to FieldTrip and I try to simulate data to compare the > >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > >>> > >>> Therefore I simulate Data manually using different latency, > >>> amplitude and frequency combinations using the following equation: > >>> > >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > >>> > >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > >>> > >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > >>> > >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > >>> > >>> sig = sig1+sig2+sig3+sig4; > >>> > >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > >>> > >>> > >>> After using ft_frequanalysis (see the following cfgs) > >>> > >>> > >>> Cfg Wavelet: > >>> > >>> cfg = []; > >>> > >>> cfg.output = 'pow'; > >>> > >>> cfg.channel = labels; > >>> > >>> cfg.method = 'wavelet'; > >>> > >>> cfg.width = 7; > >>> > >>> cfg.gwidth = 3; > >>> > >>> cfg.foilim = [1 70]; > >>> > >>> cfg.toi = 0:0.05:2; > >>> > >>> TFRwave = ft_freqanalysis(cfg, data_preproc); > >>> > >>> > >>> > >>> Cfg Hanning / Multitaper: > >>> > >>> cfg = []; > >>> > >>> cfg.output = 'pow'; > >>> > >>> cfg.channel = labels; > >>> > >>> cfg.method = 'mtmconvol' > >>> > >>> cfg.foi = 1:1:70 > >>> > >>> cfg.tapsmofrq = 0.2*cfg.foi; > >>> > >>> cfg.taper = 'dpss' / ‘hanning’; > >>> > >>> cfg.t_ftimwin = 4./cfg.foi; > >>> > >>> cfg.toi = 0:0.05:2; > >>> > >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > >>> > >>> > >>> > >>> > >>> the data is plotted with ft_singleplotTFR (see cfg below) > >>> > >>> > >>> cfg singleplot: > >>> > >>> cfg = []; > >>> > >>> cfg.maskstyle = 'saturation'; > >>> > >>> cfg.colorbar = 'yes'; > >>> > >>> cfg.layout = 'AC_Osc.lay'; > >>> > >>> ft_singleplotTFR(cfg, TFRwave); > >>> > >>> > >>> Two problems occur. First, the power scale of wavelet and > >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0- > ~15*10^4). > >>> > >>> 1. How can I get the scale of all methods equal, or do I have to > >>> change the Wavelet settings to get the right scale of the values? > >>> > >>> Second, the best result of Multitaper analysis is performed using > >>> only one Taper. The goal was to get a result, where the advantages > >>> and disadvantages of Multitaper analysis compared to the other > methods can be seen. > >>> > >>> 2. How can I change the simulation so that more tapers show better > >>> results than a single taper does? > >>> > >>> > >>> Thank you for your time and help. > >>> > >>> > >>> Regards, > >>> > >>> > >>> > >>> Nicolas Weeger > >>> > >>> Student of Master-Program Appied Research, > >>> > >>> University Ansbach, > >>> > >>> Germany > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> > >> > >> > >> -- > >> Max Cantor > >> Lab Manager > >> Computational Neurolinguistics Lab > >> University of Michigan > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From widmann at uni-leipzig.de Fri Jan 30 17:32:33 2015 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Fri, 30 Jan 2015 17:32:33 +0100 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: <38A19F94-055C-4B26-8DA6-BBB0CB393A35@fcdonders.ru.nl> References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> <54CA2487.9030108@uni-tuebingen.de> <3D8E568A-7E77-437C-93BA-03CA0639CE44@uni-leipzig.de> <38A19F94-055C-4B26-8DA6-BBB0CB393A35@fcdonders.ru.nl> Message-ID: <32D98DDD-7D51-4306-BF3A-9F46E77FA948@uni-leipzig.de> Dear Jan-Mathijs, unfortunately demeaning (or detrending, or moderate highpass filtering) will not completely prevent DC artifacts. Even small offsets at the beginning or end of the signal can lead to noticable distortions. I would suggest padding the data with DC constants at both ends. This is to my knowledge the easiest way to minimize DC artifacts very effectively. > I think that a more aggressive lowpassfilter will be a useful option to build in. This will be the more complicated part as the anti-aliasing filter is applied to the up-sampled signal in case of non-integer ratios of old to new sampling rate. If you file a bug report I can try to fix. Best, Andreas > Am 29.01.2015 um 19:37 schrieb Schoffelen, J.M. (Jan Mathijs) : > > Dear Andreas, > > Note that ft_resampledata supports the options demean and detrend. Also, as of release 9829 FT always explicitly removes the epoch-wise DC-offset prior to resampling (and adds it back if cfg.demean is ‘no’), which means that users that are not aware of the potential problem are partly protected against strong DC offsets. Our recommendation is furthermore not to detrend, because this may distort slow event-related components in a non-trivial way. Also, it may falsely introduce experimental effects at unexpected time points, e.g. in the baseline. > If the user suspects that low-frequency energy in the signals may lead to funny edge behavior in the resampling step, I’d recommend either to highpassfilter the data prior to resampling, or to read in more data than needed, so that the edge effects end up in non-interesting parts of the data. > I think that a more aggressive lowpassfilter will be a useful option to build in. > > Best, > Jan-Mathijs > > > On Jan 29, 2015, at 5:19 PM, Andreas Widmann wrote: > >> Dear Marieke and Jens, >> >> MATLAB resample sets the -6dB half-amplitude cutoff of the anti-aliasing filter to the new Nyquist frequency. This is quite common practice, however, for EEG/MEG data this is not recommended, as the remaining energy in the transition band above the cutoff/new Nyquist frequency can still introduce considerable aliasing artifacts. So indeed the current Fieldtrip implementation is problematic. In the attached Fig. 1 a frequency response plot as it would be applied when downsampling from 500 to 250 Hz. >> >> Even worse is that resample (and Fieldtrip) does not apply any padding of the signal before filtering (doc resample: "In its filtering process, resample assumes that the input sequence, x, is zero before and after the samples it is given. Thus, large deviations from zero at the endpoints of x can cause inaccuracies in y at its endpoints.“). This will introduce DC artifacts at the beginning and end of the data. In particular for epoched data this can result in quite massive distortions (see Fig. 2 in the attachment; filtered and downsampled series of ones; same filter as above; same problem as it was formerly observed in EEGLAB: https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=1017). >> >> I suggest submitting a bug report (please put me into cc). I think I can fix both problems but this will take some days. I would recommend not using the current implementation. >> >> Best, >> Andreas >> >>> Am 29.01.2015 um 13:16 schrieb Jens Klinzing, Universität Tübingen : >>> >>> Hi Marieke, >>> I had the impression that you are interested in the automatic low-pass filtering performed by ft_resampledata. >>> >>> If you don't specify cfg.resamplemethod = 'downsample', ft_resampledata will call the built-in matlab function 'resample' to do the job. This function automatically applies a low-pass filter before resampling. >>> >>> mathworks.com/help/signal/ref/resample.html >>> >>> "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." >>> >>> I couldn't find an explicit statement what the cutoff frequency of that filter would be, though. There are some forum entries on the web, but they don't give the answer either. >>> >>> Can someone help? >>> >>> All the best, >>> Jens >>> >>> Am 23.01.2015 um 17:56 schrieb Schoffelen, J.M. (Jan Mathijs): >>>> Marieke, >>>> Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. >>>> >>>> JM >>>> >>>> >>>> On Jan 23, 2015, at 2:39 PM, Eleanor Harding wrote: >>>> >>>>> Hi Marieke, >>>>> >>>>> A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, >>>>> >>>>> Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. >>>>> >>>>> Good luck, >>>>> Ellie Harding >>>>> >>>>> >>>>> >>>>> Message: 5 >>>>> Date: Thu, 22 Jan 2015 16:50:26 +0000 >>>>> From: "Nieuwenhuijzen, M.E. van de (Marieke)" >>>>> >>>>> To: "fieldtrip at science.ru.nl" >>>>> Subject: [FieldTrip] Low-pass frequency when downsampling using >>>>> ft_resampledata >>>>> Message-ID: >>>>> >>>>> Content-Type: text/plain; charset="iso-8859-1" >>>>> >>>>> Hi Fieldtrippers, >>>>> >>>>> I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? >>>>> >>>>> Best, >>>>> Marieke >>>>> -------------- next part -------------- >>>>> An HTML attachment was scrubbed... >>>>> URL: >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Eleanor Harding >>>>> PhD Student >>>>> Max Planck Institute for Human Cognitive and Brain Sciences >>>>> Stephanstraße 1A, 04103 Leipzig, Germany >>>>> Phone: +49 341 9940-2268 >>>>> Fax: +49 341 9940 2260 >>>>> http://www.cbs.mpg.de/~harding >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tjordanov at besa.de Fri Jan 30 17:37:18 2015 From: tjordanov at besa.de (tjordanov at besa.de) Date: Fri, 30 Jan 2015 17:37:18 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: <002c01d03c89$0ff98020$2fec8060$@artinis.com> References: <002c01d03c89$0ff98020$2fec8060$@artinis.com> Message-ID: <000001d03cab$039169c0$0ab43d40$@de> Hi Eelke, hi Jörn, thank you for your elaborate answers and for the script - it is very informative and useful. I am in some extent familiar with the theory behind multitapering and I am also convinced that it has very good theoretical properties. However, let us take a look at the application. I simulated 200 trials data with jitter in the frequency. You can find the frequency profile of the trials as attachment ("FrequenciesForSimulation.png"). There are 67 trials with central frequency 34 Hz (variation between 32 and 36 Hz), 67 trials with central frequency 50 Hz (48 to 52 Hz) and 66 trials with central frequency 66 Hz (64 to 68 Hz). I performed multitaper analysis with 1, 2 and 3 tapers (see results "Multitaper1taper.png", "Multitaper2tapers.png", "Multitaper3tapers.png"). As we can see from the results only the decomposition with one taper detected correctly the three frequencies, all other two methods (with 2 and 3 tapers) just distorted (smoothed) the first result. I can see that such kind of smoothing is good for the statistical power between subjects but it does not prove the advantage of using multiple tapers compared to using just single taper. What do you think? Best, Todor -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jörn M. Horschig Sent: Freitag, 30. Januar 2015 13:34 To: 'FieldTrip discussion list' Subject: Re: [FieldTrip] Simulate data to compare methods Hi Todor, maybe this matlab function helps illustrating what dpss multitapers are, and will thus clarify what makes them so powerful compared to other techniques: https://www.dropbox.com/s/0uifk9l8rb6m5vl/Tapering.m?dl=0 (go to example 5) Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Eelke Spaak > Sent: Friday, January 30, 2015 11:52 AM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Todor, > > Although your procedure would also yield smoothing in the frequency > domain which is independent from that in the time domain, it is not at > all equivalent to using multitapers! > > The tapers in the discrete prolate spheroidal sequence (dpss, == > multitaper in fieldtrip) are pairwise orthogonal, hence their > estimates are independent from one another. This will result in there > being more information extracted from the signal than if you used a > single taper and then apply Gaussian smoothing over frequencies. You > could have a look at https://en.wikipedia.org/wiki/Multitaper which > gives quite a decent overview of multitapering. Or for the full > details, refer to the original paper by David Thompson: > http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 > > Best. > Eelke > > On 30 January 2015 at 11:10, tjordanov at besa.de > wrote: > > Hi Eelke, > > > > I found your answer very interesting. If I understand you correctly, > > the > advantage of the multitaper method is that it smoothes in the > frequency domain independently of the smoothing in the time domain. > Then it should be equivalent (or similar) with the following procedure: > > 1) Calculate single trial single taper decomposition of the signal. > > 2) Choose an appropriate 1D Gauss function (note that it is > > important to be 1D else it would smooth in both - time and > > frequency) > > 3) Apply the selected Gauss function on the decomposed signal only > > in the > frequency direction (not in time in order to avoid temporal smearing). > Do this for all trials and all time points. > > 4) Calculate the average over the trials. > > In this procedure the choice of the Gaussian would determine the > > amount > of smearing in the frequency domain. > > > > Is this so, or I misunderstood something? > > > > Best, > > Todor > > > > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > > Sent: Mittwoch, 28. Januar 2015 12:24 > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > Hi Nico, > > > > As for question (2), you probably first need to think about what > > constitutes > a "better" result. Using more tapers with dpss will always result in > more frequency smoothing. If your source signal is primarily composed > of pure sinusoids, and you interpret a spectrum as "better" > > if it shows clearer peaks, then you will always get the "best" > > result for the > single-taper case. > > > > Multitapering allows optimal control over the amount of smoothing > > you > obtain in the frequency domain, which is more or less independent of > the amount of smoothing you obtain in the time domain (as opposed to e.g. > wavelets, where these are fundamentally linked). When dealing with > brain signals, you will often find that a certain stimulus might > induce e.g. a gamma response at 40-50 Hz in one subject and one trial, > while in another subject or another trial the same stimulus might > induce a 50-60 Hz response or so. Of course, in the average over > trials (and subjects), this heterogeneity (i.e., > noise) will wash out, but it will severely damage your statistical sensitivity. > Therefore, using multitapers to add smoothing can produce a much more > consistent result and therefore be "better" in the sense of actually > understanding the brain. > > > > As for your simulation, perhaps using filtered noise would be better > > than > sinusoids. Also, since multitapering benefits you most strongly when > taking variation over observations into account, you could consider > simulating different observations, each consisting of noise filtered > in a slightly different randomly chosen bandwidth, and inspecting the > resulting variation over observations in the spectra. > > > > Best, > > Eelke > > > > On 27 January 2015 at 18:36, Max Cantor wrote: > >> Hi Nico, > >> > >> I'm not sure about the second question, but as for the first > >> question, you can manually set the scales for ft_singleplotTFR > >> using > cfg.zlim. > >> > >> Hope that helps, > >> > >> Max > >> > >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > >> > >> wrote: > >>> > >>> Hello FieldTrip community, > >>> > >>> > >>> > >>> I am new to FieldTrip and I try to simulate data to compare the > >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > >>> > >>> Therefore I simulate Data manually using different latency, > >>> amplitude and frequency combinations using the following equation: > >>> > >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > >>> > >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > >>> > >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > >>> > >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > >>> > >>> sig = sig1+sig2+sig3+sig4; > >>> > >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > >>> > >>> > >>> After using ft_frequanalysis (see the following cfgs) > >>> > >>> > >>> Cfg Wavelet: > >>> > >>> cfg = []; > >>> > >>> cfg.output = 'pow'; > >>> > >>> cfg.channel = labels; > >>> > >>> cfg.method = 'wavelet'; > >>> > >>> cfg.width = 7; > >>> > >>> cfg.gwidth = 3; > >>> > >>> cfg.foilim = [1 70]; > >>> > >>> cfg.toi = 0:0.05:2; > >>> > >>> TFRwave = ft_freqanalysis(cfg, data_preproc); > >>> > >>> > >>> > >>> Cfg Hanning / Multitaper: > >>> > >>> cfg = []; > >>> > >>> cfg.output = 'pow'; > >>> > >>> cfg.channel = labels; > >>> > >>> cfg.method = 'mtmconvol' > >>> > >>> cfg.foi = 1:1:70 > >>> > >>> cfg.tapsmofrq = 0.2*cfg.foi; > >>> > >>> cfg.taper = 'dpss' / ‘hanning’; > >>> > >>> cfg.t_ftimwin = 4./cfg.foi; > >>> > >>> cfg.toi = 0:0.05:2; > >>> > >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > >>> > >>> > >>> > >>> > >>> the data is plotted with ft_singleplotTFR (see cfg below) > >>> > >>> > >>> cfg singleplot: > >>> > >>> cfg = []; > >>> > >>> cfg.maskstyle = 'saturation'; > >>> > >>> cfg.colorbar = 'yes'; > >>> > >>> cfg.layout = 'AC_Osc.lay'; > >>> > >>> ft_singleplotTFR(cfg, TFRwave); > >>> > >>> > >>> Two problems occur. First, the power scale of wavelet and > >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0- > ~15*10^4). > >>> > >>> 1. How can I get the scale of all methods equal, or do I have to > >>> change the Wavelet settings to get the right scale of the values? > >>> > >>> Second, the best result of Multitaper analysis is performed using > >>> only one Taper. The goal was to get a result, where the advantages > >>> and disadvantages of Multitaper analysis compared to the other > methods can be seen. > >>> > >>> 2. How can I change the simulation so that more tapers show better > >>> results than a single taper does? > >>> > >>> > >>> Thank you for your time and help. > >>> > >>> > >>> Regards, > >>> > >>> > >>> > >>> Nicolas Weeger > >>> > >>> Student of Master-Program Appied Research, > >>> > >>> University Ansbach, > >>> > >>> Germany > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> > >> > >> > >> -- > >> Max Cantor > >> Lab Manager > >> Computational Neurolinguistics Lab > >> University of Michigan > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: FrequenciesForSimulation.png Type: image/png Size: 6793 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Multitaper1taper.png Type: image/png Size: 6344 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Multitaper2tapers.png Type: image/png Size: 6301 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Multitaper3tapers.png Type: image/png Size: 6207 bytes Desc: not available URL: From tomh at kurage.nimh.nih.gov Fri Jan 30 18:40:51 2015 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Fri, 30 Jan 2015 12:40:51 -0500 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: <002c01d03c89$0ff98020$2fec8060$@artinis.com> References: <002c01d03c89$0ff98020$2fec8060$@artinis.com> Message-ID: <20150130124051.7cf4d8a1@kurage.nimh.nih.gov> This is more about the Subject than about filtering, but may I say yay multitapering, and also yay Stockwell transforms. The latter are somewhat easier to understand than wavelets, and the phase is easier to extract. Also if you sum across time and inverse FFT the result is the usual power specrtum. Enough about that. Here is what I use to simulate MEG data. It's written in Python, but it's pretty easy to translate. It creates a 1/f^2 noise and then performs a fractional derivative to create a 1/f noise. The noise demonstrates growth of variance over time but is nevertheless normally distributed (mean is removed and s.d. = 1). It makes good surrogate MEG data, properly scaled. Adding a couple ECDs is beyond the scope of this post. :-) from numpy import zeros, array, arange from numpy.fft import fft, ifft from numpy.random import normal def meg_noise(l, n = .5): """Return l samples of 1/f noise.""" l2 = l / 2 d = zeros((l,), 'f') y = 0. for i in range(l): x = normal() # white y += x # brown d[i] = y # detrend d = d - arange(l) * (d[-1] - d[0]) / l # Fractional derivative of d. Regular derivative (n=1) adds 2 to the # exponent of the spectrum. Fractional derivative does a multiple # of that, so n = .5 adds 1 to the exponent. Thus for brown (-2) # you get pink (-1). w = array(range(l2) + range(-l2, 0)) # now w = [ 0, 1, ..., l2 - 1, -l2, -l2 + 1, ..., -1 ] jwn = pow((1j) * w, n) D = fft(d) D = D * jwn dd = ifft(D).real / l dd -= dd.mean() dd /= dd.std() return dd On Fri, 30 Jan 2015 13:34:16 +0100 "Jörn M. Horschig" wrote: > Hi Todor, > > maybe this matlab function helps illustrating what dpss multitapers > are, and will thus clarify what makes them so powerful compared to > other techniques: > https://www.dropbox.com/s/0uifk9l8rb6m5vl/Tapering.m?dl=0 (go to > example 5) > > Best, > Jörn > > > > -- > > Jörn M. Horschig, Software Engineer > Artinis Medical Systems | +31 481 350 980 > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > > bounces at science.ru.nl] On Behalf Of Eelke Spaak > > Sent: Friday, January 30, 2015 11:52 AM > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > Hi Todor, > > > > Although your procedure would also yield smoothing in the frequency > > domain which is independent from that in the time domain, it is not > > at all equivalent to using multitapers! > > > > The tapers in the discrete prolate spheroidal sequence (dpss, == > > multitaper in fieldtrip) are pairwise orthogonal, hence their > > estimates are independent from one another. This will result in > > there being more information extracted from the signal than if you > > used a single taper and then apply Gaussian smoothing over > > frequencies. You could have a look at > > https://en.wikipedia.org/wiki/Multitaper which gives quite a decent > > overview of multitapering. Or for the full details, refer to the > > original paper by David Thompson: > > http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 > > > > Best. > > Eelke > > > > On 30 January 2015 at 11:10, tjordanov at besa.de > > wrote: > > > Hi Eelke, > > > > > > I found your answer very interesting. If I understand you > > > correctly, the > > advantage of the multitaper method is that it smoothes in the > > frequency domain independently of the smoothing in the time domain. > > Then it should be equivalent (or similar) with the following > > procedure: > > > 1) Calculate single trial single taper decomposition of the > > > signal. 2) Choose an appropriate 1D Gauss function (note that it > > > is important to be 1D else it would smooth in both - time and > > > frequency) 3) Apply the selected Gauss function on the decomposed > > > signal only in the > > frequency direction (not in time in order to avoid temporal > > smearing). Do this for all trials and all time points. > > > 4) Calculate the average over the trials. > > > In this procedure the choice of the Gaussian would determine the > > > amount > > of smearing in the frequency domain. > > > > > > Is this so, or I misunderstood something? > > > > > > Best, > > > Todor > > > > > > > > > -----Original Message----- > > > From: fieldtrip-bounces at science.ru.nl > > > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > > > Sent: Mittwoch, 28. Januar 2015 12:24 > > > To: FieldTrip discussion list > > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > > > Hi Nico, > > > > > > As for question (2), you probably first need to think about what > > > constitutes > > a "better" result. Using more tapers with dpss will always result > > in more frequency smoothing. If your source signal is primarily > > composed of pure sinusoids, and you interpret a spectrum as "better" > > > if it shows clearer peaks, then you will always get the "best" > > > result for the > > single-taper case. > > > > > > Multitapering allows optimal control over the amount of smoothing > > > you > > obtain in the frequency domain, which is more or less independent > > of the amount of smoothing you obtain in the time domain (as > > opposed to e.g. wavelets, where these are fundamentally linked). > > When dealing with brain signals, you will often find that a certain > > stimulus might induce e.g. a gamma response at 40-50 Hz in one > > subject and one trial, while in another subject or another trial > > the same stimulus might induce a 50-60 Hz response or so. Of > > course, in the average over trials (and subjects), this > > heterogeneity (i.e., noise) will wash out, but it will severely > > damage your statistical sensitivity. Therefore, using multitapers > > to add smoothing can produce a much more consistent result and > > therefore be "better" in the sense of actually understanding the > > brain. > > > > > > As for your simulation, perhaps using filtered noise would be > > > better than > > sinusoids. Also, since multitapering benefits you most strongly > > when taking variation over observations into account, you could > > consider simulating different observations, each consisting of > > noise filtered in a slightly different randomly chosen bandwidth, > > and inspecting the resulting variation over observations in the > > spectra. > > > > > > Best, > > > Eelke > > > > > > On 27 January 2015 at 18:36, Max Cantor wrote: > > >> Hi Nico, > > >> > > >> I'm not sure about the second question, but as for the first > > >> question, you can manually set the scales for ft_singleplotTFR > > >> using > > cfg.zlim. > > >> > > >> Hope that helps, > > >> > > >> Max > > >> > > >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > > >> > > >> wrote: > > >>> > > >>> Hello FieldTrip community, > > >>> > > >>> > > >>> > > >>> I am new to FieldTrip and I try to simulate data to compare the > > >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > > >>> > > >>> Therefore I simulate Data manually using different latency, > > >>> amplitude and frequency combinations using the following > > >>> equation: > > >>> > > >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > > >>> > > >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > > >>> > > >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > > >>> > > >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > > >>> > > >>> sig = sig1+sig2+sig3+sig4; > > >>> > > >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = > > >>> 60; > > >>> > > >>> > > >>> After using ft_frequanalysis (see the following cfgs) > > >>> > > >>> > > >>> Cfg Wavelet: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.output = 'pow'; > > >>> > > >>> cfg.channel = labels; > > >>> > > >>> cfg.method = 'wavelet'; > > >>> > > >>> cfg.width = 7; > > >>> > > >>> cfg.gwidth = 3; > > >>> > > >>> cfg.foilim = [1 70]; > > >>> > > >>> cfg.toi = 0:0.05:2; > > >>> > > >>> TFRwave = ft_freqanalysis(cfg, data_preproc); > > >>> > > >>> > > >>> > > >>> Cfg Hanning / Multitaper: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.output = 'pow'; > > >>> > > >>> cfg.channel = labels; > > >>> > > >>> cfg.method = 'mtmconvol' > > >>> > > >>> cfg.foi = 1:1:70 > > >>> > > >>> cfg.tapsmofrq = 0.2*cfg.foi; > > >>> > > >>> cfg.taper = 'dpss' / ‘hanning’; > > >>> > > >>> cfg.t_ftimwin = 4./cfg.foi; > > >>> > > >>> cfg.toi = 0:0.05:2; > > >>> > > >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > > >>> > > >>> > > >>> > > >>> > > >>> the data is plotted with ft_singleplotTFR (see cfg below) > > >>> > > >>> > > >>> cfg singleplot: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.maskstyle = 'saturation'; > > >>> > > >>> cfg.colorbar = 'yes'; > > >>> > > >>> cfg.layout = 'AC_Osc.lay'; > > >>> > > >>> ft_singleplotTFR(cfg, TFRwave); > > >>> > > >>> > > >>> Two problems occur. First, the power scale of wavelet and > > >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet > > >>> 0- > > ~15*10^4). > > >>> > > >>> 1. How can I get the scale of all methods equal, or do I > > >>> have to change the Wavelet settings to get the right scale of > > >>> the values? > > >>> > > >>> Second, the best result of Multitaper analysis is performed > > >>> using only one Taper. The goal was to get a result, where the > > >>> advantages and disadvantages of Multitaper analysis compared to > > >>> the other > > methods can be seen. > > >>> > > >>> 2. How can I change the simulation so that more tapers > > >>> show better results than a single taper does? > > >>> > > >>> > > >>> Thank you for your time and help. > > >>> > > >>> > > >>> Regards, > > >>> > > >>> > > >>> > > >>> Nicolas Weeger > > >>> > > >>> Student of Master-Program Appied Research, > > >>> > > >>> University Ansbach, > > >>> > > >>> Germany > > >>> > > >>> > > >>> _______________________________________________ > > >>> fieldtrip mailing list > > >>> fieldtrip at donders.ru.nl > > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >> > > >> > > >> > > >> > > >> -- > > >> Max Cantor > > >> Lab Manager > > >> Computational Neurolinguistics Lab > > >> University of Michigan > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tom -- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow -------------- next part -------------- A non-text attachment was scrubbed... Name: GrowthOfVariance.png Type: image/png Size: 28854 bytes Desc: not available URL: From ecaspar at ulb.ac.be Fri Jan 2 11:23:04 2015 From: ecaspar at ulb.ac.be (Emilie Caspar) Date: Fri, 2 Jan 2015 11:23:04 +0100 Subject: [FieldTrip] multi plot and layout Message-ID: <20EDBE47-BEF4-4F80-BFCA-6F2016A58CC8@ulb.ac.be> Dear Fieldtrippers, It's probably a very simple question but I don't understand the problem. I would like to use multi plot and topoplot for my data. So I wrote: cfg = []; cfg.xlim = [-0.1 0.4]; cfg.ylim = [-10 13]; cfg.layout = 'biosemi64.lay'; figure; ft_multiplotER(cfg, avgRobotC_ToneC, avgRobotC_ToneI, avgRobotI_ToneC, avgRobotI_ToneI); However, the mistake indicates that labels in data and labels in layout do not match. However, I'm sure of the layout I'm using and in addition, when I'm using the ft_rejectvisual (in the same script) with the following line codes, it works very well: cfg = []; cfg.alim = 100; cfg.keepchannel = 'yes'; cfg.layout = 'biosemi64.lay'; cfg.method = 'channel'; %% Or 'trial' cfg.metric = 'var'; clean_data = ft_rejectvisual(cfg, epData); …... So I clearly don't understand why multi plot and topoplot do not accept this layout, while the layout is accepted for another function in the same script on the same data. Singleplot works very well. Have you any idea? Thanks! Emilie -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jan 5 09:36:11 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 5 Jan 2015 09:36:11 +0100 Subject: [FieldTrip] FEM sLORETA Fieldtrip In-Reply-To: References: Message-ID: <0BAC74CA-25AB-4316-AEC8-88559FF70381@donders.ru.nl> Dear John At this moment FieldTrip does not yet include an implementation of sLORETA. However, it does have an implementation of eLORETA (see FT_SOURCEANALYSIS with cfg.method=‘eloreta’). Perhaps you could use the low level inverse/ft_eloreta code to make an sLORETA implementation. best regards, Robert On 28 Dec 2014, at 22:18, RICHARDS, JOHN wrote: > Robert: > > I hope you can help me. Is FieldTrip able to do sLORETA CDR models? I like the integration of the FEM in FieldTrip, but can’t find a sLORETA algorithm. I use individual structural MRIs, with EEG, with segmentation, and want to do sLORETA models. > > Thanks, John > > *********************************************** > John E. Richards Carolina Distinguished Professor > Department of Psychology > University of South Carolina > Columbia, SC 29208 > Dept Phone: 803 777 2079 > Fax: 803 777 9558 > Email: richards-john at sc.edu > HTTP: jerlab.psych.sc.edu > *********************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jan 5 09:44:59 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 5 Jan 2015 09:44:59 +0100 Subject: [FieldTrip] SIMBIO tool in Fieldtrip for FEM head modelling In-Reply-To: References: Message-ID: Dear Munsif, The SIMBIO FEM tool that is under development is integrated in FieldTrip, i.e. you do not call it separately. The procedure is that you coregister your anatomical MRI to the same coordinate system in which you want to express your sensor and source locations, segment the MRI and pass the segmented MRI to ft_prepare_mesh and subsequently to ft_prepare_headmodel, which will call the appropriate functions from SIMBIO. Finally, you can call ft_prepare_leadfield (or the lower level ft_compute_leadfield) to compute the forward solutions for the desired source locations. The documentation on http://fieldtrip.fcdonders.nl/development/simbio contains example code. best regards, Robert PS please address future questions to the email list. On 15 Dec 2014, at 05:00, Munsif Jatoi wrote: > Dear Sir, > > I hope you are fine. > > Sir, I am doing PhD in the field of Brain source Localization based on EEG signals at Universiti Teknologi PETRONAS, Perak, Malaysia since 2011. I have developed a MATLAb code based upon SPM8 and Fieldtrip for simulated EEG data. For this, I have used BEM modelling (please find the attached .m file). However, I want to use FEM modelling to compare my results to be taken by using various inverse methods (MUSIC, Min Norm etc.). I have come to know through the website of Fieldtrip (http://fieldtrip.fcdonders.nl/development/simbio) that there is a tool for FEM. When I searched through it, I couldn't find the SIMBIO tool which can be used for FEM head modelling. So can you please help me in this sense. > > > Many Thanks, > Munsif. > > -- > Munsif Ali H.Jatoi, > > Ph D Scholar, > Centre for Intelligent Signals and Imaging Research, > Universiti Teknologi PETRONAS, > Malaysia. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: eegspm_pipeline_withcomments (3).m Type: application/octet-stream Size: 11632 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Mon Jan 5 15:23:20 2015 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Mon, 5 Jan 2015 15:23:20 +0100 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data Message-ID: Hi all, I performed DICS beamforming on resting-state data ( eyes closed) of a clinical population and controls. According to the sensor data, the control groups have more alpha-band (8-14 Hz) activity over occipital areas after cluster statistic (attached figure upper plot) . Curiously, after beamforming , group comparisons showed the reversed patters in visual cortex (attached figure bottom plot) .Hence, the source-level results are opposite to the sensor-level results. This is *not* a problem of the design matrix, or confusing the groups. I check the individual neural activity index on the single subject level . They make sense in general . I also tune the parameter a lot (tapper, central frequency smooth frequency , regularization parameter , et al ), the opposite pattern remains. I understand that Beamformer images DO NOT DIRECTLY CORRESPOND TO ANY sensor data. However, the opposite pattern is really weird. I noticed that Tobias Navarro Schröder had the similar issue 4 years ago ( http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). Thus, I am not the only one who encountered this problem. Any tips and suggestions will be greatly appreciated. Thanks in advance! Best, Hatieng -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: resting_issues.jpg Type: image/jpeg Size: 71312 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: resting_issues.jpg Type: image/jpeg Size: 71312 bytes Desc: not available URL: From a.stolk at fcdonders.ru.nl Mon Jan 5 15:39:25 2015 From: a.stolk at fcdonders.ru.nl (Stolk, A. (Arjen)) Date: Mon, 5 Jan 2015 14:39:25 +0000 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data In-Reply-To: References: Message-ID: Hey Haiteng, Is your contrast based on absolute signal frequency power? If so, did you check for any systematic differences in headposition (and especially in terms of distance to the sensors - the z-dimension) across the groups? I presume such a systematic difference could yield different results at the sensor- and source-level, but there are probably also other possibilities out there. Yours, Arjen -- Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Email: a.stolk at donders.ru.nl Phone: +31(0)243 68294 Web: www.arjenstolk.nl ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Haiteng Jiang [haiteng.jiang at gmail.com] Sent: Monday, January 05, 2015 3:23 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data Hi all, I performed DICS beamforming on resting-state data ( eyes closed) of a clinical population and controls. According to the sensor data, the control groups have more alpha-band (8-14 Hz) activity over occipital areas after cluster statistic (attached figure upper plot) . Curiously, after beamforming , group comparisons showed the reversed patters in visual cortex (attached figure bottom plot) .Hence, the source-level results are opposite to the sensor-level results. This is *not* a problem of the design matrix, or confusing the groups. I check the individual neural activity index on the single subject level . They make sense in general . I also tune the parameter a lot (tapper, central frequency smooth frequency , regularization parameter , et al ), the opposite pattern remains. I understand that Beamformer images DO NOT DIRECTLY CORRESPOND TO ANY sensor data. However, the opposite pattern is really weird. I noticed that Tobias Navarro Schröder had the similar issue 4 years ago (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). Thus, I am not the only one who encountered this problem. Any tips and suggestions will be greatly appreciated. Thanks in advance! [cid:ii_i4jxr2sz1_14aba77f4264462a] Best, Hatieng -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: resting_issues.jpg Type: image/jpeg Size: 71312 bytes Desc: resting_issues.jpg URL: From mark.woolrich at ohba.ox.ac.uk Mon Jan 5 15:46:59 2015 From: mark.woolrich at ohba.ox.ac.uk (Mark Woolrich) Date: Mon, 5 Jan 2015 14:46:59 +0000 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data In-Reply-To: References: Message-ID: Dear Hatieng, This might be the same issue we found when comparing eyes open to eyes shut. Take a look at this technical note to see how we addressed it: http://www.ncbi.nlm.nih.gov/pubmed/24412400 Cheers, Mark. On 5 Jan 2015, at 14:23, Haiteng Jiang > wrote: Hi all, I performed DICS beamforming on resting-state data ( eyes closed) of a clinical population and controls. According to the sensor data, the control groups have more alpha-band (8-14 Hz) activity over occipital areas after cluster statistic (attached figure upper plot) . Curiously, after beamforming , group comparisons showed the reversed patters in visual cortex (attached figure bottom plot) .Hence, the source-level results are opposite to the sensor-level results. This is *not* a problem of the design matrix, or confusing the groups. I check the individual neural activity index on the single subject level . They make sense in general . I also tune the parameter a lot (tapper, central frequency smooth frequency , regularization parameter , et al ), the opposite pattern remains. I understand that Beamformer images DO NOT DIRECTLY CORRESPOND TO ANY sensor data. However, the opposite pattern is really weird. I noticed that Tobias Navarro Schröder had the similar issue 4 years ago (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). Thus, I am not the only one who encountered this problem. Any tips and suggestions will be greatly appreciated. Thanks in advance! Best, Hatieng -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at fcdonders.ru.nl Mon Jan 5 16:12:56 2015 From: t.marshall at fcdonders.ru.nl (Tom Marshall) Date: Mon, 05 Jan 2015 16:12:56 +0100 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data In-Reply-To: References: Message-ID: <54AAA9F8.9050005@fcdonders.ru.nl> Hey Haiteng, Following up on Arjen's point; I've noticed that when people in the MEG close their eyes for a couple of minutes, their heads sometimes drop a little (ie nose moves toward chest). If your clinical group were feeling more drowsy during the recording and thus dropped their heads more, this would lead to exactly the kind of systematic SNR difference that Arjen is describing, and maybe most acutely in posterior sensors. Best, Tom On 1/5/2015 3:39 PM, Stolk, A. (Arjen) wrote: > Hey Haiteng, > > Is your contrast based on absolute signal frequency power? If so, did > you check for any systematic differences in headposition (and > especially in terms of distance to the sensors - the z-dimension) > across the groups? I presume such a systematic difference could yield > different results at the sensor- and source-level, but there are > probably also other possibilities out there. > > Yours, > Arjen > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > Phone: +31(0)243 68294 > Web: www.arjenstolk.nl > ------------------------------------------------------------------------ > *From:* fieldtrip-bounces at science.ru.nl > [fieldtrip-bounces at science.ru.nl] on behalf of Haiteng Jiang > [haiteng.jiang at gmail.com] > *Sent:* Monday, January 05, 2015 3:23 PM > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Opposite DICS Beamforming results on source and > sensor level on resting state data > > Hi all, > > I performed DICS beamforming on resting-state data ( eyes closed) > of a clinical population and controls. According to the sensor data, > the control groups have more alpha-band (8-14 > Hz) activity over occipital areas after cluster statistic (attached > figure upper plot) . Curiously, after beamforming , group > comparisons showed the reversed patters in visual cortex (attached > figure bottom plot) .Hence, the source-level results are opposite to > the sensor-level results. This is *not* a problem of the design > matrix, or confusing the groups. I check the individual neural > activity index on the single subject level . They make sense in > general . I also tune the parameter a lot (tapper, central frequency > smooth frequency , regularization parameter , et al ), the opposite > pattern remains. I understand that Beamformer images DO NOT DIRECTLY > CORRESPOND TO ANY sensor data. However, the opposite pattern is > really weird. I noticed that Tobias Navarro Schröder had the similar > issue 4 years ago > (http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). > Thus, I am not the only one who encountered this problem. > Any tips and suggestions will be greatly appreciated. Thanks in > advance! > > > > Best, > Hatieng > > > > -- > Haiteng Jiang > PhD candidate > Donders Institute for Brain, Cognition and Behaviour > Neuronal Oscillations Group > Computational Cognitive Neuroscience Lab > https://sites.google.com/site/haitengjiang/ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 71312 bytes Desc: not available URL: From caspervanheck at gmail.com Mon Jan 5 17:02:54 2015 From: caspervanheck at gmail.com (Casper van Heck) Date: Mon, 5 Jan 2015 17:02:54 +0100 Subject: [FieldTrip] Question about how to reduce the file size In-Reply-To: <484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk> References: <484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk> Message-ID: Dear Emilie, I'm using a Windows-based wreck with 8GB ram and 1.5GB files, which never pops over an usage of 4GB, so I am a bit surprised that you're getting issues with your data. Also; reducing the sampling rate that much should reduce the memory footprint to something close to 400mb, at least, which to my mind should not produce issues of any kind. Could you post a bit more of your code? I've been lowering the sampling rate too (5000 to 500), but I'm also cutting the data into smaller pieces, based on markers, effectively splitting the data into four parts, and throwing away more than 80%. Cutting the data into pieces can provide a workaround for memory issues. Detail: while I do filter (and some other details) before the resampling, and I'm only resampling due to time constraints, not crashing behaviour. Also check the memory tutorial: fieldtrip.fcdonders.nl/tutorial/memory Does this help? Casper On Fri, Dec 12, 2014 at 11:24 PM, Caspar, Emilie wrote: > Dear Fieltrippers, > I did a pilot study on one participant today. Now that I'm trying to > analyze my data, I realize that the size file is too big for my computer > (size = 3Gb). Even after one hour, the filters (high pass + low pass) were > not yet achieved. > > So I would like to see how to reduce the size of my sample BEFORE the > filters. > > I know that there is "ft_resampledata", and I did it to reduce the > actual sample rate (= 2048) to 256. However, even with this procedure my > computer is crashing (even with 16 Go RAM). In addition, I'm not sure that > I can resample before filtering (I read different informations). > > Another way I was thinking about was to pre-select electrodes that I > need (only 6 electrodes on 64). But here I have two questions: > - Can I pre-process only some electrodes? Does it really reduce size for > next preprocesses? > - Is this the correct way to ask? As it crashes, not sure it works. > > cfg = []; > cfg.dataset = [ file.name]; > cfg.channel = 'B5', 'B6', 'B15', 'B16'; > allData_prepross = ft_preprocessing(cfg); > cfg.resamplefs = 256; > DataSample = ft_resampledata(cfg, allData_prepross) > > > I would appreciate pieces of advice! > > Many thanks :) > > Emilie > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jan 5 17:55:09 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 5 Jan 2015 17:55:09 +0100 Subject: [FieldTrip] multi plot and layout In-Reply-To: <20EDBE47-BEF4-4F80-BFCA-6F2016A58CC8@ulb.ac.be> References: <20EDBE47-BEF4-4F80-BFCA-6F2016A58CC8@ulb.ac.be> Message-ID: <98D05186-0070-41FF-9F8B-06D77E38F793@donders.ru.nl> Hi Emilie ft_rejectvisual with method=channel does not make use of the layout, so that is not a suitable comparison. Can you do cfg = []; cfg.layout = 'biosemi64.lay'; layout = ft_prepare_layout(cfg) and compare layout.label with the labels in the data? Or you can also simply open the biosemi64.lay file in a text editor. best regards, Robert On 02 Jan 2015, at 11:23, Emilie Caspar wrote: > Dear Fieldtrippers, > > It's probably a very simple question but I don't understand the problem. > > I would like to use multi plot and topoplot for my data. > So I wrote: > > cfg = []; > cfg.xlim = [-0.1 0.4]; > cfg.ylim = [-10 13]; > cfg.layout = 'biosemi64.lay'; > figure; > ft_multiplotER(cfg, avgRobotC_ToneC, avgRobotC_ToneI, avgRobotI_ToneC, avgRobotI_ToneI); > > > However, the mistake indicates that labels in data and labels in layout do not match. However, I'm sure of the layout I'm using and in addition, when I'm using the ft_rejectvisual (in the same script) with the following line codes, it works very well: > > cfg = []; > cfg.alim = 100; > cfg.keepchannel = 'yes'; > cfg.layout = 'biosemi64.lay'; > cfg.method = 'channel'; %% Or 'trial' > cfg.metric = 'var'; > clean_data = ft_rejectvisual(cfg, epData); > …... > > So I clearly don't understand why multi plot and topoplot do not accept this layout, while the layout is accepted for another function in the same script on the same data. Singleplot works very well. > > Have you any idea? > > Thanks! > > Emilie > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Jan 5 18:09:08 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 5 Jan 2015 18:09:08 +0100 Subject: [FieldTrip] Question about how to reduce the file size In-Reply-To: References: <484FAA32-F84A-4BD2-8928-C07265183751@live.ucl.ac.uk> Message-ID: <336FFF24-331E-441A-8BB3-56B00B130D0E@donders.ru.nl> Hi Casper, Biosemi files are often problematic. The files themselves are 24 bit, which makes them efficient on disk (although though they are still huge on disk), but once in memory they take 64 bit per sample. So your 3GB becomes 8GB in memory, not accounting for any overhead. Depending on the analysis pipeline, it might well be that two copies of the data are needed in memory (so 16GB), plus further overhead. Note that downampling requires that a low-pass filter is applied prior to downsampling to avoid aliassing (http://en.wikipedia.org/wiki/Aliasing). This happens automatically in ft_resampledata (look for cfg.resamplemethod and related comments in the code). You can use a strategy like this cfg1 = []; cfg1.dataset = yourfilename; cfg1 = ... cfg1 = ft_definetrial(cfg1); % this part is optional, without it it results in continuous data in memory cfg2 = []; cfg2.resamplefs = 500; for i=1:nchan cfg1.channel = i; % you can use a number as well as a string temp = ft_preprocessing(cfg1); singlechan{i} = ft_resampledata(cfg2, temp); clear temp; end % for all channels data = ft_appenddata([], singlechan{:}); This reads and downsamples the data one channel at a time. best regards, Robert On 05 Jan 2015, at 17:02, Casper van Heck wrote: > Dear Emilie, > > I'm using a Windows-based wreck with 8GB ram and 1.5GB files, which never pops over an usage of 4GB, so I am a bit surprised that you're getting issues with your data. Also; reducing the sampling rate that much should reduce the memory footprint to something close to 400mb, at least, which to my mind should not produce issues of any kind. Could you post a bit more of your code? > > I've been lowering the sampling rate too (5000 to 500), but I'm also cutting the data into smaller pieces, based on markers, effectively splitting the data into four parts, and throwing away more than 80%. Cutting the data into pieces can provide a workaround for memory issues. Detail: while I do filter (and some other details) before the resampling, and I'm only resampling due to time constraints, not crashing behaviour. > > Also check the memory tutorial: fieldtrip.fcdonders.nl/tutorial/memory > > Does this help? > > Casper > > On Fri, Dec 12, 2014 at 11:24 PM, Caspar, Emilie wrote: > Dear Fieltrippers, > > I did a pilot study on one participant today. Now that I'm trying to analyze my data, I realize that the size file is too big for my computer (size = 3Gb). Even after one hour, the filters (high pass + low pass) were not yet achieved. > > So I would like to see how to reduce the size of my sample BEFORE the filters. > > I know that there is "ft_resampledata", and I did it to reduce the actual sample rate (= 2048) to 256. However, even with this procedure my computer is crashing (even with 16 Go RAM). In addition, I'm not sure that I can resample before filtering (I read different informations). > > Another way I was thinking about was to pre-select electrodes that I need (only 6 electrodes on 64). But here I have two questions: > - Can I pre-process only some electrodes? Does it really reduce size for next preprocesses? > - Is this the correct way to ask? As it crashes, not sure it works. > > cfg = []; > cfg.dataset = [ file.name]; > cfg.channel = 'B5', 'B6', 'B15', 'B16'; > allData_prepross = ft_preprocessing(cfg); > cfg.resamplefs = 256; > DataSample = ft_resampledata(cfg, allData_prepross) > > > I would appreciate pieces of advice! > > Many thanks :) > > Emilie > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ecaspar at ulb.ac.be Mon Jan 5 22:00:27 2015 From: ecaspar at ulb.ac.be (Emilie Caspar) Date: Mon, 5 Jan 2015 22:00:27 +0100 Subject: [FieldTrip] multi plot and layout In-Reply-To: <98D05186-0070-41FF-9F8B-06D77E38F793@donders.ru.nl> References: <20EDBE47-BEF4-4F80-BFCA-6F2016A58CC8@ulb.ac.be> <98D05186-0070-41FF-9F8B-06D77E38F793@donders.ru.nl> Message-ID: Dear Robert, Thank you for your answer. Indeed, biosemi electrodes have two labels, the "official" name, and a specific name related to their system. If I relabel my electrodes, the layout will certainly works. Best regards, Emilie On 5 janv. 2015, at 17:55, Robert Oostenveld wrote: > Hi Emilie > > ft_rejectvisual with method=channel does not make use of the layout, so that is not a suitable comparison. > > Can you do > > cfg = []; > cfg.layout = 'biosemi64.lay'; > layout = ft_prepare_layout(cfg) > > and compare layout.label with the labels in the data? Or you can also simply open the biosemi64.lay file in a text editor. > > best regards, > Robert > > > On 02 Jan 2015, at 11:23, Emilie Caspar wrote: > >> Dear Fieldtrippers, >> >> It's probably a very simple question but I don't understand the problem. >> >> I would like to use multi plot and topoplot for my data. >> So I wrote: >> >> cfg = []; >> cfg.xlim = [-0.1 0.4]; >> cfg.ylim = [-10 13]; >> cfg.layout = 'biosemi64.lay'; >> figure; >> ft_multiplotER(cfg, avgRobotC_ToneC, avgRobotC_ToneI, avgRobotI_ToneC, avgRobotI_ToneI); >> >> >> However, the mistake indicates that labels in data and labels in layout do not match. However, I'm sure of the layout I'm using and in addition, when I'm using the ft_rejectvisual (in the same script) with the following line codes, it works very well: >> >> cfg = []; >> cfg.alim = 100; >> cfg.keepchannel = 'yes'; >> cfg.layout = 'biosemi64.lay'; >> cfg.method = 'channel'; %% Or 'trial' >> cfg.metric = 'var'; >> clean_data = ft_rejectvisual(cfg, epData); >> …... >> >> So I clearly don't understand why multi plot and topoplot do not accept this layout, while the layout is accepted for another function in the same script on the same data. Singleplot works very well. >> >> Have you any idea? >> >> Thanks! >> >> Emilie >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From haiteng.jiang at gmail.com Mon Jan 5 22:10:26 2015 From: haiteng.jiang at gmail.com (Haiteng Jiang) Date: Mon, 5 Jan 2015 22:10:26 +0100 Subject: [FieldTrip] Opposite DICS Beamforming results on source and sensor level on resting state data (Stolk, A. (Arjen)) Message-ID: Hi Arjen, Thanks for your response. I actually tried both (absolute power and nai). Both of them are still opposite when comparing sensor level to source level. Besides, I have the task data. It works fine on the contrast. Therefore, I assume the co-registration is OK in general. However, I have no fiducial points in the MRI scans, so I have to select the nas, lpa and rpa with no physical reference. Therefore , it is possible that the two group have systematic differences in head position. I will check that. All the best, Haiteng > > > Message: 2 > Date: Mon, 5 Jan 2015 14:39:25 +0000 > From: "Stolk, A. (Arjen)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Opposite DICS Beamforming results on source > and sensor level on resting state data > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hey Haiteng, > > Is your contrast based on absolute signal frequency power? If so, did you > check for any systematic differences in headposition (and especially in > terms of distance to the sensors - the z-dimension) across the groups? I > presume such a systematic difference could yield different results at the > sensor- and source-level, but there are probably also other possibilities > out there. > > Yours, > Arjen > > -- > Donders Institute for Brain, Cognition and Behaviour > Centre for Cognitive Neuroimaging > Radboud University Nijmegen > > Email: a.stolk at donders.ru.nl > Phone: +31(0)243 68294 > Web: www.arjenstolk.nl > ________________________________ > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Haiteng Jiang [haiteng.jiang at gmail.com] > Sent: Monday, January 05, 2015 3:23 PM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Opposite DICS Beamforming results on source and > sensor level on resting state data > > Hi all, > > I performed DICS beamforming on resting-state data ( eyes closed) of a > clinical population and controls. According to the sensor data, the > control groups have more alpha-band (8-14 > Hz) activity over occipital areas after cluster statistic (attached > figure upper plot) . Curiously, after beamforming , group comparisons > showed the reversed patters in visual cortex (attached figure bottom plot) > .Hence, the source-level results are opposite to the sensor-level results. > This is *not* a problem of the design matrix, or confusing the groups. I > check the individual neural activity index on the single subject level . > They make sense in general . I also tune the parameter a lot (tapper, > central frequency smooth frequency , regularization parameter , et al ), > the opposite pattern remains. I understand that Beamformer images DO NOT > DIRECTLY CORRESPOND TO ANY sensor data. However, the opposite pattern is > really weird. I noticed that Tobias Navarro Schr?der had the similar > issue 4 years ago ( > http://mailman.science.ru.nl/pipermail/fieldtrip/2011-May/003875.html). > Thus, I am not the only one who encountered this problem. > > Any tips and suggestions will be greatly appreciated. Thanks in > advance! > [cid:ii_i4jxr2sz1_14aba77f4264462a] > > > Best, > Hatieng > > > > > > > -- > Haiteng Jiang > PhD candidate > Donders Institute for Brain, Cognition and Behaviour > Neuronal Oscillations Group > Computational Cognitive Neuroscience Lab > https://sites.google.com/site/haitengjiang/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150105/0843735d/attachment.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: resting_issues.jpg > Type: image/jpeg > Size: 71312 bytes > Desc: resting_issues.jpg > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150105/0843735d/attachment.jpg > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 50, Issue 3 > **************************************** > -- Haiteng Jiang PhD candidate Donders Institute for Brain, Cognition and Behaviour Neuronal Oscillations Group Computational Cognitive Neuroscience Lab https://sites.google.com/site/haitengjiang/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Tue Jan 6 08:13:34 2015 From: yoniilevy at gmail.com (Yoni Levy) Date: Tue, 6 Jan 2015 09:13:34 +0200 Subject: [FieldTrip] Cluster-based permutation tests for between-subject design Message-ID: Dear Eric, Following up on the thread from about 2 months ago, in your reply (in FAQs: http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), when you mention the mixed between-within-subjects design, I assume that you refer to a design with two subjects groups which are of equal size (e.g. 12 participants vs 12 participants, and not 14 participants vs 12 participants). I assume that in the latter case (unequal groups' size), testing the interaction effect would not be possible; correct? Thanks, Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Tue Jan 6 13:10:46 2015 From: yoniilevy at gmail.com (Yoni Levy) Date: Tue, 6 Jan 2015 14:10:46 +0200 Subject: [FieldTrip] Cluster-based permutation tests for between-subject design Message-ID: More specifically, I was wondering about the recipe for a 2x2 mixed between-within-subjects design (with 2 groups of unequal size). For instance, provided I have two groups: the first with subj1 till subj12 (12 participants), and the second with subj21 till subj34 (14 participants), and each participant with 2 conditions. Then for each participant i calculate the difference between the 2 conditions (subjXdiff) (say for instance, the difference in power in each grid point), and then compare the two groups with an indepsamplesT: subj1diff, ... subj12diff versus subj21diff,.. subj34diff. Would such an indepsamplesT test correspond to testing the interaction between group and condition? Thanks, Yoni On Tue, Jan 6, 2015 at 9:13 AM, Yoni Levy wrote: > Dear Eric, > > Following up on the thread from about 2 months ago, in your reply (in > FAQs: > http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), > when you mention the mixed between-within-subjects design, I assume > that you refer to a design with two subjects groups which are of equal size > (e.g. 12 participants vs 12 participants, and not 14 participants vs 12 > participants). I assume that in the latter case (unequal groups' size), > testing the interaction effect would not be possible; correct? > > Thanks, > Yoni > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From l.garcia.d at gmail.com Tue Jan 6 21:48:58 2015 From: l.garcia.d at gmail.com (Luis Garcia Dominguez) Date: Tue, 6 Jan 2015 15:48:58 -0500 Subject: [FieldTrip] Cluster-based permutation tests for between-subject design In-Reply-To: References: Message-ID: Hello all, I have a problem when using the ft_dipolefitting function in two different versions. The old version of the function gives me the accurate result and a low residual variance (RV) while the new version produce a totally off localization with high RV. I have attached a .mat file with the two inputs to the function (cfg and timelock) for easy reproducibility. Steps: 1) load('input_variables.mat') % the file attached 2) fix the path to the standard bem file in the appropiate field of cfg as: cfg.hdmfile = [path 'standard_bem.mat] 3) run: source = ft_dipolefitting(cfg, timelock); In the version that comes with EEGlab 11.0.4.4b (which shows a revision = '$Id: ft_dipolefitting.m 5439 2012-03-12 13:17:15Z giopia $';) a local minimun is found and the dipole is: >> source.dip ans = pos: [51.7641 24.5471 -35.4362] mom: [3x1 double] pot: [27x1 double] rv: 0.0218 While in the most recent fieldtrip version: ans = pos: [-45.2455 -86.2421 -15.2132] mom: [3x1 double] pot: [27x1 double] rv: 0.5848 I have intracranial electrodes that show that the solution from the old dipolefitting function is the right one. Can you please, help me to understand what is the source of this huge difference? Thanks! On 6 January 2015 at 02:13, Yoni Levy wrote: > Dear Eric, > > Following up on the thread from about 2 months ago, in your reply (in > FAQs: > http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), > when you mention the mixed between-within-subjects design, I assume > that you refer to a design with two subjects groups which are of equal size > (e.g. 12 participants vs 12 participants, and not 14 participants vs 12 > participants). I assume that in the latter case (unequal groups' size), > testing the interaction effect would not be possible; correct? > > Thanks, > Yoni > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: input_variables.mat Type: application/octet-stream Size: 87154 bytes Desc: not available URL: From laetitia.grabot at gmail.com Wed Jan 7 09:57:28 2015 From: laetitia.grabot at gmail.com (Laetitia Grabot) Date: Wed, 7 Jan 2015 09:57:28 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip Message-ID: Dear all, I would like to read in fieldtrip a epoch file (.fif) created in mne-python. As adviced in the website section "integrate fieldtrip and MNE-Python", I used the following piece of code: *cfg = [];cfg.dataset = filename;data1 = ft_preprocessing(cfg);* And I get the following error: *Error using fiff_setup_read_raw (line 89)No raw data in/neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fifError in fiff_setup_read_raw (line 89) error(me,'No raw data in %s',fname);Error in ft_read_header (line 1157) raw = fiff_setup_read_raw(filename);Error in ft_preprocessing (line 338) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat);* It seems that there is a problem at the level of the header of the file. Any help would be appreciated if someone already solved this issue. By the way, this piece of code works well to read an evoked file without error. Thanks a lot, Best, Laetitia G. -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.engemann at fz-juelich.de Wed Jan 7 12:57:13 2015 From: d.engemann at fz-juelich.de (Denis-Alexander Engemann) Date: Wed, 7 Jan 2015 12:57:13 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Hi Laetitia, here's a tutorial on integrating Fieldtrip with MNE-Python: http://fieldtrip.fcdonders.nl/development/integrate_with_mne You should make sure to use recent fieldtrip code, the support for reading MNE-Python epochs has been added quite recently to the MNE-Matlab tools used inside Fieldtrip. HTH, Denis 2015-01-07 9:57 GMT+01:00 Laetitia Grabot >: Dear all, I would like to read in fieldtrip a epoch file (.fif) created in mne-python. As adviced in the website section "integrate fieldtrip and MNE-Python", I used the following piece of code: cfg = []; cfg.dataset = filename; data1 = ft_preprocessing(cfg); And I get the following error: Error using fiff_setup_read_raw (line 89) No raw data in /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif Error in fiff_setup_read_raw (line 89) error(me,'No raw data in %s',fname); Error in ft_read_header (line 1157) raw = fiff_setup_read_raw(filename); Error in ft_preprocessing (line 338) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); It seems that there is a problem at the level of the header of the file. Any help would be appreciated if someone already solved this issue. By the way, this piece of code works well to read an evoked file without error. Thanks a lot, Best, Laetitia G. _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From laetitia.grabot at gmail.com Wed Jan 7 13:43:21 2015 From: laetitia.grabot at gmail.com (Laetitia Grabot) Date: Wed, 7 Jan 2015 13:43:21 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Thanks Denis for the quick answer! My code looks the same than in the tutorial, that's why I don't understand the problem. I tried with the latest version of the day of Fieldtrip, but I still have the same error. 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann < d.engemann at fz-juelich.de>: > Hi Laetitia, > > here's a tutorial on integrating Fieldtrip with MNE-Python: > > http://fieldtrip.fcdonders.nl/development/integrate_with_mne > > You should make sure to use recent fieldtrip code, the support for > reading MNE-Python epochs has been added quite recently to the MNE-Matlab > tools used inside Fieldtrip. > > HTH, > Denis > > > > > > 2015-01-07 9:57 GMT+01:00 Laetitia Grabot : > >> Dear all, >> I would like to read in fieldtrip a epoch file (.fif) created in >> mne-python. As adviced in the website section "integrate fieldtrip and >> MNE-Python", I used the following piece of code: >> >> >> >> * cfg = []; cfg.dataset = filename; data1 = ft_preprocessing(cfg);* >> >> And I get the following error: >> >> >> >> >> >> >> >> >> >> >> >> >> >> *Error using fiff_setup_read_raw (line 89) No raw data in >> /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif >> Error in fiff_setup_read_raw (line 89) error(me,'No raw data in >> %s',fname); Error in ft_read_header (line 1157) raw = >> fiff_setup_read_raw(filename); Error in ft_preprocessing (line 338) hdr = >> ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); * >> It seems that there is a problem at the level of the header of the file. >> Any help would be appreciated if someone already solved this issue. By the >> way, this piece of code works well to read an evoked file without error. >> >> Thanks a lot, >> Best, >> Laetitia G. >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > Forschungszentrum Juelich GmbH > 52425 Juelich > Sitz der Gesellschaft: Juelich > Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 > Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher > Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), > Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, > Prof. Dr. Sebastian M. Schmidt > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From d.engemann at fz-juelich.de Wed Jan 7 14:24:40 2015 From: d.engemann at fz-juelich.de (Denis-Alexander Engemann) Date: Wed, 7 Jan 2015 14:24:40 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Mhm. That's weird. Could you save a single epoch to disk and share it privately via email? If the epoch is large you could crop it using ``epochs.crop``. --Denis 2015-01-07 13:43 GMT+01:00 Laetitia Grabot : > Thanks Denis for the quick answer! > My code looks the same than in the tutorial, that's why I don't understand > the problem. I tried with the latest version of the day of Fieldtrip, but I > still have the same error. > > 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann < > d.engemann at fz-juelich.de>: > >> Hi Laetitia, >> >> here's a tutorial on integrating Fieldtrip with MNE-Python: >> >> http://fieldtrip.fcdonders.nl/development/integrate_with_mne >> >> You should make sure to use recent fieldtrip code, the support for >> reading MNE-Python epochs has been added quite recently to the MNE-Matlab >> tools used inside Fieldtrip. >> >> HTH, >> Denis >> >> >> >> >> >> 2015-01-07 9:57 GMT+01:00 Laetitia Grabot : >> >>> Dear all, >>> I would like to read in fieldtrip a epoch file (.fif) created in >>> mne-python. As adviced in the website section "integrate fieldtrip and >>> MNE-Python", I used the following piece of code: >>> >>> >>> >>> * cfg = []; cfg.dataset = filename; data1 = ft_preprocessing(cfg);* >>> >>> And I get the following error: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> *Error using fiff_setup_read_raw (line 89) No raw data in >>> /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif >>> Error in fiff_setup_read_raw (line 89) error(me,'No raw data in >>> %s',fname); Error in ft_read_header (line 1157) raw = >>> fiff_setup_read_raw(filename); Error in ft_preprocessing (line 338) hdr = >>> ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); * >>> It seems that there is a problem at the level of the header of the >>> file. Any help would be appreciated if someone already solved this issue. >>> By the way, this piece of code works well to read an evoked file without >>> error. >>> >>> Thanks a lot, >>> Best, >>> Laetitia G. >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> >> ------------------------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------------------------ >> Forschungszentrum Juelich GmbH >> 52425 Juelich >> Sitz der Gesellschaft: Juelich >> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 >> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher >> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), >> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, >> Prof. Dr. Sebastian M. Schmidt >> >> ------------------------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at telecom-paristech.fr Wed Jan 7 14:28:36 2015 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Wed, 7 Jan 2015 14:28:36 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: hi, how do you specify that your fif file is an epochs file and not a raw file? epochs files should end with -epo.fif calling fiff_setup_read_raw.m suggests that fieldtrip thinks it's a raw file. HTH Alex On Wed, Jan 7, 2015 at 1:43 PM, Laetitia Grabot wrote: > Thanks Denis for the quick answer! > My code looks the same than in the tutorial, that's why I don't understand > the problem. I tried with the latest version of the day of Fieldtrip, but I > still have the same error. > > 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann > : >> >> Hi Laetitia, >> >> here's a tutorial on integrating Fieldtrip with MNE-Python: >> >> http://fieldtrip.fcdonders.nl/development/integrate_with_mne >> >> You should make sure to use recent fieldtrip code, the support for reading >> MNE-Python epochs has been added quite recently to the MNE-Matlab tools used >> inside Fieldtrip. >> >> HTH, >> Denis >> >> >> >> >> >> 2015-01-07 9:57 GMT+01:00 Laetitia Grabot : >>> >>> Dear all, >>> I would like to read in fieldtrip a epoch file (.fif) created in >>> mne-python. As adviced in the website section "integrate fieldtrip and >>> MNE-Python", I used the following piece of code: >>> >>> cfg = []; >>> cfg.dataset = filename; >>> data1 = ft_preprocessing(cfg); >>> >>> And I get the following error: >>> >>> Error using fiff_setup_read_raw (line 89) >>> No raw data in >>> >>> /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif >>> >>> Error in fiff_setup_read_raw (line 89) >>> error(me,'No raw data in %s',fname); >>> >>> Error in ft_read_header (line 1157) >>> raw = fiff_setup_read_raw(filename); >>> >>> Error in ft_preprocessing (line 338) >>> hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); >>> >>> It seems that there is a problem at the level of the header of the file. >>> Any help would be appreciated if someone already solved this issue. By the >>> way, this piece of code works well to read an evoked file without error. >>> >>> Thanks a lot, >>> Best, >>> Laetitia G. >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> >> ------------------------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------------------------ >> Forschungszentrum Juelich GmbH >> 52425 Juelich >> Sitz der Gesellschaft: Juelich >> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 >> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher >> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), >> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, >> Prof. Dr. Sebastian M. Schmidt >> >> ------------------------------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > The information in this e-mail is intended only for the person to whom it is > addressed. If you believe this e-mail was sent to you in error and the > e-mail > contains patient information, please contact the Partners Compliance > HelpLine at > http://www.partners.org/complianceline . If the e-mail was sent to you in > error > but does not contain patient information, please contact the sender and > properly > dispose of the e-mail. > From laetitia.grabot at gmail.com Wed Jan 7 16:20:21 2015 From: laetitia.grabot at gmail.com (Laetitia Grabot) Date: Wed, 7 Jan 2015 16:20:21 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: I just realized that I was not using the recent version I just downloaded (problem of multiple fieldtrip paths) but now that is ok. I also tried to change the path name to '-epo.fif'. Yet, I still have an error: My code: *%testfilename = '/neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epoch_test_LG-epo.fif' ;cfg = [];cfg.dataset = filename;data1 = ft_preprocessing(cfg);* The error: *Reference to non-existent field 'FIFFB_EPOCHS'.Error in fiff_read_epochs (line 43)ep = fiff_dir_tree_find(meas, FIFF.FIFFB_EPOCHS);Error in ft_read_header (line 1388) epochs = fiff_read_epochs(filename);Error in ft_preprocessing (line 396) hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat);* Thanks again, Laetitia 2015-01-07 14:28 GMT+01:00 Alexandre Gramfort < alexandre.gramfort at telecom-paristech.fr>: > hi, > > how do you specify that your fif file is an epochs file and not a raw file? > > epochs files should end with -epo.fif > > calling fiff_setup_read_raw.m suggests that fieldtrip thinks it's a raw > file. > > HTH > Alex > > On Wed, Jan 7, 2015 at 1:43 PM, Laetitia Grabot > wrote: > > Thanks Denis for the quick answer! > > My code looks the same than in the tutorial, that's why I don't > understand > > the problem. I tried with the latest version of the day of Fieldtrip, > but I > > still have the same error. > > > > 2015-01-07 12:57 GMT+01:00 Denis-Alexander Engemann > > : > >> > >> Hi Laetitia, > >> > >> here's a tutorial on integrating Fieldtrip with MNE-Python: > >> > >> http://fieldtrip.fcdonders.nl/development/integrate_with_mne > >> > >> You should make sure to use recent fieldtrip code, the support for > reading > >> MNE-Python epochs has been added quite recently to the MNE-Matlab tools > used > >> inside Fieldtrip. > >> > >> HTH, > >> Denis > >> > >> > >> > >> > >> > >> 2015-01-07 9:57 GMT+01:00 Laetitia Grabot : > >>> > >>> Dear all, > >>> I would like to read in fieldtrip a epoch file (.fif) created in > >>> mne-python. As adviced in the website section "integrate fieldtrip and > >>> MNE-Python", I used the following piece of code: > >>> > >>> cfg = []; > >>> cfg.dataset = filename; > >>> data1 = ft_preprocessing(cfg); > >>> > >>> And I get the following error: > >>> > >>> Error using fiff_setup_read_raw (line 89) > >>> No raw data in > >>> > >>> > /neurospin/meg/meg_tmp/PhaseTime_Anne_2013/epochs/jm100042_equalizedEpochs_allCond_firstStimLocked_filtr45Hz_Afirst.fif > >>> > >>> Error in fiff_setup_read_raw (line 89) > >>> error(me,'No raw data in %s',fname); > >>> > >>> Error in ft_read_header (line 1157) > >>> raw = fiff_setup_read_raw(filename); > >>> > >>> Error in ft_preprocessing (line 338) > >>> hdr = ft_read_header(cfg.headerfile, 'headerformat', > cfg.headerformat); > >>> > >>> It seems that there is a problem at the level of the header of the > file. > >>> Any help would be appreciated if someone already solved this issue. By > the > >>> way, this piece of code works well to read an evoked file without > error. > >>> > >>> Thanks a lot, > >>> Best, > >>> Laetitia G. > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> > >> > >> > >> > >> > ------------------------------------------------------------------------------------------------ > >> > >> > ------------------------------------------------------------------------------------------------ > >> Forschungszentrum Juelich GmbH > >> 52425 Juelich > >> Sitz der Gesellschaft: Juelich > >> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 > >> Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher > >> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), > >> Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, > >> Prof. Dr. Sebastian M. Schmidt > >> > >> > ------------------------------------------------------------------------------------------------ > >> > >> > ------------------------------------------------------------------------------------------------ > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > The information in this e-mail is intended only for the person to whom > it is > > addressed. If you believe this e-mail was sent to you in error and the > > e-mail > > contains patient information, please contact the Partners Compliance > > HelpLine at > > http://www.partners.org/complianceline . If the e-mail was sent to you > in > > error > > but does not contain patient information, please contact the sender and > > properly > > dispose of the e-mail. > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexandre.gramfort at telecom-paristech.fr Wed Jan 7 18:00:25 2015 From: alexandre.gramfort at telecom-paristech.fr (Alexandre Gramfort) Date: Wed, 7 Jan 2015 18:00:25 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Laetitia, can you share the file so we can look into it? Alex From d.engemann at fz-juelich.de Wed Jan 7 18:14:48 2015 From: d.engemann at fz-juelich.de (Denis-Alexander Engemann) Date: Wed, 7 Jan 2015 18:14:48 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Already solved. Apparently a path issue with another MNE-Matlab. 2015-01-07 18:00 GMT+01:00 Alexandre Gramfort >: Laetitia, can you share the file so we can look into it? Alex _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From laetitia.grabot at gmail.com Wed Jan 7 19:04:00 2015 From: laetitia.grabot at gmail.com (Laetitia Grabot) Date: Wed, 7 Jan 2015 19:04:00 +0100 Subject: [FieldTrip] Read mne-python epochs file in fieldtrip In-Reply-To: References: Message-ID: Yes, I cleaned up my (too numerous) matlab and fieldtrip paths and it works, thanks! 2015-01-07 18:14 GMT+01:00 Denis-Alexander Engemann < d.engemann at fz-juelich.de>: > Already solved. Apparently a path issue with another MNE-Matlab. > > 2015-01-07 18:00 GMT+01:00 Alexandre Gramfort < > alexandre.gramfort at telecom-paristech.fr>: > >> Laetitia, >> >> can you share the file so we can look into it? >> >> Alex >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > Forschungszentrum Juelich GmbH > 52425 Juelich > Sitz der Gesellschaft: Juelich > Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 > Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher > Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), > Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, > Prof. Dr. Sebastian M. Schmidt > > ------------------------------------------------------------------------------------------------ > > ------------------------------------------------------------------------------------------------ > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Thu Jan 8 12:26:52 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Thu, 8 Jan 2015 11:26:52 +0000 Subject: [FieldTrip] Cluster-based permutation tests for between-subject design In-Reply-To: References: Message-ID: <39F7E98E967D3F48B543DDBD9C94213546E364@exprd02.hosting.ru.nl> Yes, and this should also be exactly the recipe on the FAQ page. Best, Eric From: Yoni Levy [mailto:yoniilevy at gmail.com] Sent: dinsdag 6 januari 2015 13:11 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Cluster-based permutation tests for between-subject design More specifically, I was wondering about the recipe for a 2x2 mixed between-within-subjects design (with 2 groups of unequal size). For instance, provided I have two groups: the first with subj1 till subj12 (12 participants), and the second with subj21 till subj34 (14 participants), and each participant with 2 conditions. Then for each participant i calculate the difference between the 2 conditions (subjXdiff) (say for instance, the difference in power in each grid point), and then compare the two groups with an indepsamplesT: subj1diff, ... subj12diff versus subj21diff,.. subj34diff. Would such an indepsamplesT test correspond to testing the interaction between group and condition? Thanks, Yoni On Tue, Jan 6, 2015 at 9:13 AM, Yoni Levy > wrote: Dear Eric, Following up on the thread from about 2 months ago, in your reply (in FAQs: http://fieldtrip.fcdonders.nl/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), when you mention the mixed between-within-subjects design, I assume that you refer to a design with two subjects groups which are of equal size (e.g. 12 participants vs 12 participants, and not 14 participants vs 12 participants). I assume that in the latter case (unequal groups' size), testing the interaction effect would not be possible; correct? Thanks, Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Thu Jan 8 14:26:13 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Thu, 8 Jan 2015 13:26:13 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... Message-ID: Dear all, I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". What would your reply? I expect angry emails from you : ) Bests, Davide -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Thu Jan 8 14:43:57 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 8 Jan 2015 14:43:57 +0100 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: References: Message-ID: Dear Davide, Now I'm very curious how you described FieldTrip in the manuscript! Best, Eelke On 8 January 2015 at 14:26, Davide Rivolta wrote: > > Dear all, > > I have recently used FT (and DICS in particular) for the analysis of a > pharmaco-MEG study. > > One of the reviewers of our submitted manuscript is not fully convinced > about FT. Here is his comment: > > "More details regarding what software was used to implement the beamforrmer > is important to properly assess the validity of the results. It does not > appear that the authors used currently available validated software to > perform this analysis". > > What would your reply? > I expect angry emails from you : ) > > > Bests, > Davide > From r.oostenveld at donders.ru.nl Thu Jan 8 18:13:34 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 8 Jan 2015 17:13:34 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: References: Message-ID: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl> Hi Davide, Ideally reviewers have expertise in all aspects of the paper that they review. But reviewers are not all-knowledgeable and hence it shoudl not come as a surprise that a reviewer might not be able to properly assess certain aspects of the study. I don’t know how you referred to the software that you used in your analysis, but presume that you cited the FieldTrip reference paper. In the response to the reviewer you could furthermore point out http://fieldtrip.fcdonders.nl/publications. Note that I still should update it for 2014. Alternatively, you could point to http://scholar.google.com/scholar?cites=5316958122258245287&scisbd=1 which automatically lists all papers that have cited our reference paper. You might also point out that Joaching Gross (who should be considered “the" authority on DICS) is using the same FieldTrip software himself. Showing these citations of scientific papers prior to yours that have relied on the FieldTrip software is still no argument for it being “validated software”. But I hope that it raises the confidence of the reviewer that the software you used is not the result of a toy project. Formally validated software is in general difficult to come by, and I would actually be curious as to which software packages the reviewer considers as “validated" for MEG analysis. cheers Robert On 08 Jan 2015, at 13:26, Davide Rivolta wrote: > > Dear all, > > I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. > > One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: > > "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". > > What would your reply? > I expect angry emails from you : ) > > > Bests, > Davide > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Thu Jan 8 19:16:06 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Thu, 8 Jan 2015 18:16:06 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl> References: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl> Message-ID: <478FDC02-2816-4BF5-A615-3EC227978103@gmail.com> Dear Robert, Many thanks for your kind reply. Yes, I fully cited FieldTrip in the original submission. It is indeed a good idea to list all the papers that have used FT. I will follow all your advice. Bests, Davide Sent from my iPad > On 8 Jan 2015, at 17:13, Robert Oostenveld wrote: > > Hi Davide, > > Ideally reviewers have expertise in all aspects of the paper that they review. But reviewers are not all-knowledgeable and hence it shoudl not come as a surprise that a reviewer might not be able to properly assess certain aspects of the study. > > I don’t know how you referred to the software that you used in your analysis, but presume that you cited the FieldTrip reference paper. In the response to the reviewer you could furthermore point out http://fieldtrip.fcdonders.nl/publications. Note that I still should update it for 2014. Alternatively, you could point to http://scholar.google.com/scholar?cites=5316958122258245287&scisbd=1 which automatically lists all papers that have cited our reference paper. You might also point out that Joaching Gross (who should be considered “the" authority on DICS) is using the same FieldTrip software himself. > > Showing these citations of scientific papers prior to yours that have relied on the FieldTrip software is still no argument for it being “validated software”. But I hope that it raises the confidence of the reviewer that the software you used is not the result of a toy project. Formally validated software is in general difficult to come by, and I would actually be curious as to which software packages the reviewer considers as “validated" for MEG analysis. > > cheers > Robert > > >> On 08 Jan 2015, at 13:26, Davide Rivolta wrote: >> >> >> Dear all, >> >> I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. >> >> One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: >> >> "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". >> >> What would your reply? >> I expect angry emails from you : ) >> >> >> Bests, >> Davide >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Thu Jan 8 19:32:11 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Thu, 8 Jan 2015 18:32:11 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: <478FDC02-2816-4BF5-A615-3EC227978103@gmail.com> References: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl>, <478FDC02-2816-4BF5-A615-3EC227978103@gmail.com> Message-ID: Hi Davide, I presume that you did mention that Fieldtrip is a(n open source) Matlab toolbox, not a stand-alone piece of software. Good luck with the resubmission! Stan Op 8 jan. 2015 om 19:28 heeft "Davide Rivolta" > het volgende geschreven: Dear Robert, Many thanks for your kind reply. Yes, I fully cited FieldTrip in the original submission. It is indeed a good idea to list all the papers that have used FT. I will follow all your advice. Bests, Davide Sent from my iPad On 8 Jan 2015, at 17:13, Robert Oostenveld > wrote: Hi Davide, Ideally reviewers have expertise in all aspects of the paper that they review. But reviewers are not all-knowledgeable and hence it shoudl not come as a surprise that a reviewer might not be able to properly assess certain aspects of the study. I don’t know how you referred to the software that you used in your analysis, but presume that you cited the FieldTrip reference paper. In the response to the reviewer you could furthermore point out http://fieldtrip.fcdonders.nl/publications. Note that I still should update it for 2014. Alternatively, you could point to http://scholar.google.com/scholar?cites=5316958122258245287&scisbd=1 which automatically lists all papers that have cited our reference paper. You might also point out that Joaching Gross (who should be considered “the" authority on DICS) is using the same FieldTrip software himself. Showing these citations of scientific papers prior to yours that have relied on the FieldTrip software is still no argument for it being “validated software”. But I hope that it raises the confidence of the reviewer that the software you used is not the result of a toy project. Formally validated software is in general difficult to come by, and I would actually be curious as to which software packages the reviewer considers as “validated" for MEG analysis. cheers Robert On 08 Jan 2015, at 13:26, Davide Rivolta > wrote: Dear all, I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". What would your reply? I expect angry emails from you : ) Bests, Davide _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Thu Jan 8 19:34:31 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Thu, 8 Jan 2015 18:34:31 +0000 Subject: [FieldTrip] Is FieldTrip valid? A reviewer doubts it... In-Reply-To: References: <0AAFA33E-8460-4D70-BBAA-087BEFAE76FF@donders.ru.nl> <478FDC02-2816-4BF5-A615-3EC227978103@gmail.com> Message-ID: <4382326E-2975-4DF9-BECF-8991395F27CE@gmail.com> Hi Stan, Yes, I did indicate that it is an open source Matlab toolbox. Thanks! Davide Sent from my iPad > On 8 Jan 2015, at 18:32, Pelt, S. van (Stan) wrote: > > Hi Davide, > > I presume that you did mention that Fieldtrip is a(n open source) Matlab toolbox, not a stand-alone piece of software. > > Good luck with the resubmission! > Stan > > Op 8 jan. 2015 om 19:28 heeft "Davide Rivolta" het volgende geschreven: > >> Dear Robert, >> >> Many thanks for your kind reply. Yes, I fully cited FieldTrip in the original submission. >> It is indeed a good idea to list all the papers that have used FT. I will follow all your advice. >> >> Bests, >> Davide >> >> Sent from my iPad >> >> On 8 Jan 2015, at 17:13, Robert Oostenveld wrote: >> >>> Hi Davide, >>> >>> Ideally reviewers have expertise in all aspects of the paper that they review. But reviewers are not all-knowledgeable and hence it shoudl not come as a surprise that a reviewer might not be able to properly assess certain aspects of the study. >>> >>> I don’t know how you referred to the software that you used in your analysis, but presume that you cited the FieldTrip reference paper. In the response to the reviewer you could furthermore point out http://fieldtrip.fcdonders.nl/publications. Note that I still should update it for 2014. Alternatively, you could point to http://scholar.google.com/scholar?cites=5316958122258245287&scisbd=1 which automatically lists all papers that have cited our reference paper. You might also point out that Joaching Gross (who should be considered “the" authority on DICS) is using the same FieldTrip software himself. >>> >>> Showing these citations of scientific papers prior to yours that have relied on the FieldTrip software is still no argument for it being “validated software”. But I hope that it raises the confidence of the reviewer that the software you used is not the result of a toy project. Formally validated software is in general difficult to come by, and I would actually be curious as to which software packages the reviewer considers as “validated" for MEG analysis. >>> >>> cheers >>> Robert >>> >>> >>>> On 08 Jan 2015, at 13:26, Davide Rivolta wrote: >>>> >>>> >>>> Dear all, >>>> >>>> I have recently used FT (and DICS in particular) for the analysis of a pharmaco-MEG study. >>>> >>>> One of the reviewers of our submitted manuscript is not fully convinced about FT. Here is his comment: >>>> >>>> "More details regarding what software was used to implement the beamforrmer is important to properly assess the validity of the results. It does not appear that the authors used currently available validated software to perform this analysis". >>>> >>>> What would your reply? >>>> I expect angry emails from you : ) >>>> >>>> >>>> Bests, >>>> Davide >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at fcdonders.ru.nl Mon Jan 12 15:52:51 2015 From: jan.schoffelen at fcdonders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 12 Jan 2015 14:52:51 +0000 Subject: [FieldTrip] only read this is you are doing source reconstruction on eeg data Message-ID: <5BED7454-A406-462D-9C79-5D2EA7814EAC@fcdonders.ru.nl> Dear all, We have identified and fixed a nasty bug in FieldTrip that has consequences for those who do source reconstruction on EEG data, and have done so using a FieldTrip version of the past month or so. The bug was nasty because it didn’t cause a MATLAB or FieldTrip error. Please do read on only if you fulfill following two requirements: -you do source reconstruction of EEG data, using FieldTrip, or a toolbox that relies on low level fieldtrip functionality -you have been using a FieldTrip version that’s more recent than December 15, 2014 (svn revision 10043) Otherwise, have a nice day :-). …. …. (suspense) …. (even more suspense) …. OK, here’s the problem: in order for the EEG source reconstruction to work, the electrodes need to be projected onto the skin surface. In the FieldTrip versions 10043-10093 this projection was incorrect, causing some of the electrodes ending up on wrong locations, causing incorrect forward models (leadfields) and consequently incorrect inverse reconstruction. As of FT-version r.10094 this should be fixed. Best wishes and apologies for any inconenience caused, Jan-Mathijs From mathieu.sitko at wanadoo.fr Mon Jan 12 16:44:59 2015 From: mathieu.sitko at wanadoo.fr (Mathieu Sitko) Date: Mon, 12 Jan 2015 16:44:59 +0100 Subject: [FieldTrip] Wilson Factorization Message-ID: <54B3EBFB.5090105@wanadoo.fr> I have a problem with the convergence of spectral matrix factorization: with a tolerance of 1e-8, all my data (H,S,Z) are NaN values. How could you explain that? thank you From jan.schoffelen at fcdonders.ru.nl Mon Jan 12 20:18:52 2015 From: jan.schoffelen at fcdonders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 12 Jan 2015 19:18:52 +0000 Subject: [FieldTrip] Wilson Factorization In-Reply-To: <54B3EBFB.5090105@wanadoo.fr> References: <54B3EBFB.5090105@wanadoo.fr> Message-ID: Mathieu, Since your question is of relatively poor quality, I can only venture a poor quality guess: it’s likely that your data is rank deficient. The Wilson algorithm involves inversion of matrices, rank deficiency will quickly lead to nans. Please consult the following link (and references therein) in order to optimize the probability of obtaining a useful answer, and to optimize the goodwill of the FT-community (especially the ‘Ten simple rules…’ are a must read). http://fieldtrip.fcdonders.nl/discussion_list Best wishes, Jan-Mathijs On Jan 12, 2015, at 4:44 PM, Mathieu Sitko wrote: > I have a problem with the convergence of spectral matrix factorization: with a tolerance of 1e-8, all my data (H,S,Z) are NaN values. How could you explain that? > thank you > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tyler.grummett at flinders.edu.au Tue Jan 13 00:36:41 2015 From: tyler.grummett at flinders.edu.au (Tyler Grummett) Date: Mon, 12 Jan 2015 23:36:41 +0000 Subject: [FieldTrip] only read this is you are doing source reconstruction on eeg data In-Reply-To: <5BED7454-A406-462D-9C79-5D2EA7814EAC@fcdonders.ru.nl> References: <5BED7454-A406-462D-9C79-5D2EA7814EAC@fcdonders.ru.nl> Message-ID: <0AD3A8E7-8E9A-4280-9D23-776524DFFBD0@flinders.edu.au> Hi jan, I accidentally updated without checking what my previous version of field trip was, is there a way of finding out? Also, if you came from a different toolbox with different electrode positions and copied all the locations from fieldtrip and inserted them, will that cause inaccurate results? I was advised to do this a while ago when I was having issues aligning my electrode positions with fieldtrip's Tyler > On 13 Jan 2015, at 1:27 am, Schoffelen, J.M. (Jan Mathijs) wrote: > > Dear all, > > We have identified and fixed a nasty bug in FieldTrip that has consequences for those who do source reconstruction on EEG data, and have done so using a FieldTrip version of the past month or so. The bug was nasty because it didn’t cause a MATLAB or FieldTrip error. > > Please do read on only if you fulfill following two requirements: > -you do source reconstruction of EEG data, using FieldTrip, or a toolbox that relies on low level fieldtrip functionality > -you have been using a FieldTrip version that’s more recent than December 15, 2014 (svn revision 10043) > > Otherwise, have a nice day :-). > > …. > > …. > > (suspense) > > …. > > (even more suspense) > > …. > > OK, here’s the problem: in order for the EEG source reconstruction to work, the electrodes need to be projected onto the skin surface. In the FieldTrip versions 10043-10093 this projection was incorrect, causing some of the electrodes ending up on wrong locations, causing incorrect forward models (leadfields) and consequently incorrect inverse reconstruction. As of FT-version r.10094 this should be fixed. > > Best wishes and apologies for any inconenience caused, > > Jan-Mathijs > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From lysne at unm.edu Tue Jan 13 01:18:43 2015 From: lysne at unm.edu (Per Arnold Lysne) Date: Tue, 13 Jan 2015 00:18:43 +0000 Subject: [FieldTrip] Wilson Factorization In-Reply-To: References: <54B3EBFB.5090105@wanadoo.fr>, Message-ID: <1421108319514.22602@unm.edu> Hi Mathieu, I have had a similar problem when trying to factor a spectral matrix generated from an average evoked response. In case you are trying to do the same thing, my solution has been to transform individual trials to the time/frequency domain and do the averaging there. I get usable results when factoring the resulting power spectral matrix. Hope that helps, Per Lysne University of New Mexico ________________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Schoffelen, J.M. (Jan Mathijs) Sent: Monday, January 12, 2015 12:18 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Wilson Factorization Mathieu, Since your question is of relatively poor quality, I can only venture a poor quality guess: it’s likely that your data is rank deficient. The Wilson algorithm involves inversion of matrices, rank deficiency will quickly lead to nans. Please consult the following link (and references therein) in order to optimize the probability of obtaining a useful answer, and to optimize the goodwill of the FT-community (especially the ‘Ten simple rules…’ are a must read). http://fieldtrip.fcdonders.nl/discussion_list Best wishes, Jan-Mathijs On Jan 12, 2015, at 4:44 PM, Mathieu Sitko wrote: > I have a problem with the convergence of spectral matrix factorization: with a tolerance of 1e-8, all my data (H,S,Z) are NaN values. How could you explain that? > thank you > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From bushra.riaz at gu.se Tue Jan 13 09:05:09 2015 From: bushra.riaz at gu.se (Bushra Riaz Syeda) Date: Tue, 13 Jan 2015 08:05:09 +0000 Subject: [FieldTrip] Call for applicants: 2 PhD students and 1 post-doc position in high-Tc superconductivity and sensors for medical applications. Message-ID: <1421136309282.66059@gu.se> Begin forwarded message: Dear colleagues and friends, My apologies if you receive this more than once. Thanks to a generous grant from the Knut och Alice Wallenbergs Stiftelse, we are now hiring 2 PhD students and 1 post-doc for our project "NeuroSQUID" at the Chalmers University of Technology here in Gothenburg, Sweden. The aim of the project is to explore high-Tc superconductivity at the nanoscale and develop a high-Tc superconducting sensor system for functional neuroimaging (i.e., magnetoencephalography). Please forward this to your respective networks and potential candidates. PhD student position in high-Tc superconductivity: http://www.chalmers.se/en/about-chalmers/vacancies/Pages/default.aspx?rmpage=job&rmjob=2688 PhD student position in superconducting sensor technology for medical applications/MEG: http://www.chalmers.se/en/about-chalmers/vacancies/Pages/default.aspx?rmpage=job&rmjob=2686 Post-doc position in superconducting sensor technology for medical applications/MEG: http://www.chalmers.se/en/about-chalmers/vacancies/Pages/default.aspx?rmpage=job&rmjob=2718 NOTE: The application deadline is the 31st of January. More information about Chalmers: http://www.chalmers.se/en/ More information about the University of Gothenburg and Sahlgrenska Academy, the medical school and university with which we collaborate: http://sahlgrenska.gu.se/english More information about NatMEG, the Swedish National Facility for Magnetoencephalography with which we collaborate: http://www.natmeg.se More information about the collaborative research platform MedTech West: http://www.medtechwest.se Thanks! Justin MedTech West http://www.medtechwest.se Institute of Neuroscience and Physiology Sahlgrenska Academy & University of Gothenburg -------------- next part -------------- An HTML attachment was scrubbed... URL: From lucilegamond at gmail.com Tue Jan 13 09:35:48 2015 From: lucilegamond at gmail.com (Lucile Gamond) Date: Tue, 13 Jan 2015 09:35:48 +0100 Subject: [FieldTrip] Clustering: minimal time window ? Message-ID: Dear all, A quick question about the clustering method: I know that we can modulate the minimal number of channels in a cluster... Is there a similar option for the temporal aspect ? Such as a minimal time-window allowed ? Or is it possible to obtain a cluster on only one time-sample (at least theoritically)? Thanks a lot for your help, Kind regards Lucile -------------- next part -------------- An HTML attachment was scrubbed... URL: From yingli.ucla at gmail.com Wed Jan 14 20:04:32 2015 From: yingli.ucla at gmail.com (Ying Li) Date: Wed, 14 Jan 2015 11:04:32 -0800 Subject: [FieldTrip] How to read .dicom format using FT_READ_MRI Message-ID: Dear all, I'm trying to load MRI into matlab. The MRI data I have is a series of .dicom files (~250 frames, "IMG1"~"IMG250"). I'm wondering how to specify the input parameter for the function "ft_read_mri". Since I have 250 files, which file should I use for the input? If I only use the first file "IMG1", for example mri = ft_read_mri('IMG1'); Then I will get the following error: Warning: Not enough data imported. Attempted to read 3053459760 bytes at position 2953. Only read 534544. ERROR: IMG1 does not have a series number Error in load_dicom_series (line 42) if(nargin < 1 | nargin > 3) Output argument "vol" (and maybe others) not assigned during call to "XX\fieldtrip_20140518\external\freesurfer\load_dicom_series.m>load_dicom_series". Error in ft_read_mri (line 287) [img,transform,hdr,mr_params] = load_dicom_series(dcmdir,dcmdir,filename); I'll appreciate your reply a lot! Best, Ying -------------- next part -------------- An HTML attachment was scrubbed... URL: From yingli.ucla at gmail.com Thu Jan 15 01:08:30 2015 From: yingli.ucla at gmail.com (Ying Li) Date: Wed, 14 Jan 2015 16:08:30 -0800 Subject: [FieldTrip] Electrode Alignment Message-ID: Hi Everyone, I'm trying to align my .elc electrode file (ALS coordinate) to the template head model provided by fieldtrip (MNI coordinate). Since we used ANT electrode (as attached) to measure the EEG, so there are not Lpa, Rpa, and Nz fiducials in the electrodes. Therefore, it seems that I can't use "automatic alignment" to align the electrode. Also, it is very difficult to only use "interactive alignment" to align the electrode... I already know that the electrode coordinate is "als", so I'm wondering whether there exists some other methods that can help to transform the electrode to the "MNI coordinate". I'll appreciate your help a lot ! Best, Ying -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ANT 64 electrode layout.png Type: image/png Size: 19930 bytes Desc: not available URL: From martin.bleichner at uni-oldenburg.de Thu Jan 15 13:42:18 2015 From: martin.bleichner at uni-oldenburg.de (Martin Bleichner) Date: Thu, 15 Jan 2015 13:42:18 +0100 Subject: [FieldTrip] PhD Position Oldenburg/Germany Message-ID: <54B7B5AA.9090106@uni-oldenburg.de> Dear Fieltrip Users, The Department of Psychology, Carl von Ossietzky University Oldenburg, Neuropsychology lab (head: Prof. Dr. Stefan Debener) is offering a position as *Member of academic staff / PhD Student* E13 TV-L, 65% of the fulltime weekly hours The position starts as soon as possible and is limited for 3 years. Studying communication during social interactions using behavioral observation, mobile EEG & cognitive modelling In this interdisciplinary project we seek to identify factors involved in successful social interactions in humans. Social interactions will be studied by combining established approaches from the fields of performing arts, behavioral assessment, neurophysiology and cognitive modeling. This position will be located in Oldenburg and will focus on the neurophysiological mechanisms of social interactions as assessed by mobile EEG. The position is part of the project 'IMPACT- IMproving Patterns of social interACTion' funded by the Volkswagen Foundation. The project includes complementary research at the Technical University Dresden, Germany (Jun. Prof. Dr. Stefan Scherbaum) focusing on cognitive modeling and behavioral assessment of social interactions. We offer an agile, interdisciplinary and international work environment. A PhD candidate has the opportunity to enroll in the PhD program of the Graduate School 'Science and Technology' (www.oltech.org ). *Tasks:*The successful candidate will design, record and analyse multi-subject studies using advanced mobile EEG technology. The candidate has to publish obtained research results in peer reviewed scientific journals. *Qualifications:*An academic university degree (e.g. Diploma or Master's degree) in psychology, biology, neurosciences, psycholinguistics or a related discipline is required. We are seeking a candidate with strong knowledge in experimental and/or cognitive neuroscience. It is beneficial to have expertise in EEG/MEG or neuroimaging, knowledge in programming in Matlab and a background in biomedical signal processing. The applicant is required to have very good knowledge of both English and German. The Carl von Ossietzky University is striving to increase the number of women employed in research and science. Therefore, we explicitly ask women to apply. Following § 21 Abs. 3 NHG female applicants with equivalent qualifications will be preferred. Disabled applicants with equivalent qualifications will be preferred. Please send your application including a letter of motivation with a short statement of research interests, CV, names of two potential referees, if applicable list of publications, and copies of certificates toDr. Martin Bleichner . We prefer an electronic application with a single pdf.*Please apply**by first of February 2015 to ensure consideration.* Questions prior to the application can be addressed also to Dr. Bleichner, Carl von Ossietzky Universität Oldenburg, Fakultät für Medizin und Gesundheitswissenschaften, Department für Psychologie, D-26111 Oldenburg, Germany, email:martin.bleichner at uni-oldenburg.de , phone: +49 (0)441 - 798 - 2940 -- Dr. Martin Bleichner Neuropsychology Lab Department of Psychology University of Oldenburg D-26111 Oldenburg Germany martin.bleichner at uni-oldenburg.de Tel.: +49 (0)441 - 798-2940 http://www.uni-oldenburg.de/psychologie/neuropsychologie/team/martin-bleichner/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Thu Jan 15 16:41:42 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 15 Jan 2015 16:41:42 +0100 (CET) Subject: [FieldTrip] MaxFilter and ICA preprocessing Message-ID: <1593874569.164723.1421336502194.JavaMail.root@bcbl.eu> Dear all, after preprocessing my MEG data (Elekta Neuromag) with MaxFilter, I noticed that the ICA decomposition takes longer than if the data hasn't been preprocessed with MF. As a side note: I've taken care of reducing the dimensionality of the data to cfg.runica.pca = rank(data.trial{1}*data.trial{1}'), as I've read in previous posts that otherwise the results of the ICA decomposition can contain complex values. My questions are: 1) is the fact that the ICA training takes longer normal? 2) why does the ICA training take longer in the case of MF preprocessing? Sorry for cross-posting on both lists, I'm just hoping to get an answer asap. Best, Fred --------------------------------------------------------------------------- From f.roux at bcbl.eu Thu Jan 15 18:00:56 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Thu, 15 Jan 2015 18:00:56 +0100 (CET) Subject: [FieldTrip] MaxFilter and ICA preprocessing In-Reply-To: <1593874569.164723.1421336502194.JavaMail.root@bcbl.eu> Message-ID: <2006140742.166364.1421341256776.JavaMail.root@bcbl.eu> Problem solved. I am posting below the solution with what I think may be the explanation, in case someone else might experience a similar issue. cfg = []; cfg.method = 'runica'; cfg.numcomponent = rank(meg_data.trial{1}*meg_data.trial{1}'); ic_data = ft_componentanalysis(cfg,meg_data); Most likely, this reduces the complexity of the solution the algorithm searches for. Insead of searching for n1 = length(meg_data.label) ICs the algorithm searches for n2 = rank(meg_data.trial{1}*meg_data.trial{1}') ICs. The slowing down of the ICA arises because the data has rank n2 and not n1, but still the algorithm tries to search for a solution satisfying rank = n1. Remains the question why cfg.runica.pca = rank(meg_data.trial{1}*meg_data.trial{1}') didn't have any effect. Has this option become obsolete in more recent versions of FT? Best, Fred Frédéric Roux ----- Original Message ----- From: "Frédéric Roux" To: "FieldTrip discussion list" , "Discussion list for international MEG community" Sent: Thursday, January 15, 2015 4:41:42 PM Subject: MaxFilter and ICA preprocessing Dear all, after preprocessing my MEG data (Elekta Neuromag) with MaxFilter, I noticed that the ICA decomposition takes longer than if the data hasn't been preprocessed with MF. As a side note: I've taken care of reducing the dimensionality of the data to cfg.runica.pca = rank(data.trial{1}*data.trial{1}'), as I've read in previous posts that otherwise the results of the ICA decomposition can contain complex values. My questions are: 1) is the fact that the ICA training takes longer normal? 2) why does the ICA training take longer in the case of MF preprocessing? Sorry for cross-posting on both lists, I'm just hoping to get an answer asap. Best, Fred --------------------------------------------------------------------------- From eelke.spaak at donders.ru.nl Thu Jan 15 18:11:47 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Thu, 15 Jan 2015 18:11:47 +0100 Subject: [FieldTrip] MaxFilter and ICA preprocessing In-Reply-To: References: <1593874569.164723.1421336502194.JavaMail.root@bcbl.eu> Message-ID: Dear Fred, The options cfg.runica.pca and cfg.numcomponent should have the exact same effect when using cfg.method = 'runica'. (See the code for ft_componentanalysis at lines 480-490.) One possible explanation for why you were getting slow results is that ICA depends on a random initialization; perhaps sometimes the initial weights were better than at other times? Best, Eelke On 15 January 2015 at 18:00, Frédéric Roux wrote: > Problem solved. > > I am posting below the solution with what I think may be > the explanation, in case someone else might experience a similar > issue. > > cfg = []; > cfg.method = 'runica'; > cfg.numcomponent = rank(meg_data.trial{1}*meg_data.trial{1}'); > > ic_data = ft_componentanalysis(cfg,meg_data); > > Most likely, this reduces the complexity of the solution the algorithm > searches for. Insead of searching for n1 = length(meg_data.label) ICs > the algorithm searches for n2 = rank(meg_data.trial{1}*meg_data.trial{1}') ICs. > The slowing down of the ICA arises because the data has rank n2 and not n1, but > still the algorithm tries to search for a solution satisfying rank = n1. > > Remains the question why cfg.runica.pca = rank(meg_data.trial{1}*meg_data.trial{1}') didn't > have any effect. Has this option become obsolete in more recent versions of FT? > > Best, > > Fred > > > Frédéric Roux > > ----- Original Message ----- > From: "Frédéric Roux" > To: "FieldTrip discussion list" , "Discussion list for international MEG community" > Sent: Thursday, January 15, 2015 4:41:42 PM > Subject: MaxFilter and ICA preprocessing > > Dear all, > > after preprocessing my MEG data (Elekta Neuromag) with MaxFilter, I noticed that the ICA decomposition > takes longer than if the data hasn't been preprocessed with MF. > > As a side note: I've taken care of reducing the dimensionality of the data to cfg.runica.pca = rank(data.trial{1}*data.trial{1}'), as I've read in previous posts that otherwise the results of the ICA decomposition can contain complex values. > > My questions are: > > 1) is the fact that the ICA training takes longer normal? > > 2) why does the ICA training take longer in the case of MF preprocessing? > > Sorry for cross-posting on both lists, I'm just hoping to get an answer asap. > > > Best, > Fred > > > --------------------------------------------------------------------------- > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From stan.vanpelt at donders.ru.nl Fri Jan 16 09:43:40 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Fri, 16 Jan 2015 08:43:40 +0000 Subject: [FieldTrip] How to read .dicom format using FT_READ_MRI In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894CB27BDF@exprd03.hosting.ru.nl> Dear Ying, As far as I understand, Fieldtrip can read in the entire series of dicom-files by just specifying the first file name of the series, just like you did. However, for this it is required that the series number is clear in each file name, e.g. MRI_S01_MEG.0001.0001.IMA, MRI_S01_MEG.0001.0002.IMA, etc. I suppose that is not clear in your dicom file names. Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Ying Li Sent: woensdag 14 januari 2015 20:05 To: FieldTrip discussion list Subject: [FieldTrip] How to read .dicom format using FT_READ_MRI Dear all, I'm trying to load MRI into matlab. The MRI data I have is a series of .dicom files (~250 frames, "IMG1"~"IMG250"). I'm wondering how to specify the input parameter for the function "ft_read_mri". Since I have 250 files, which file should I use for the input? If I only use the first file "IMG1", for example mri = ft_read_mri('IMG1'); Then I will get the following error: Warning: Not enough data imported. Attempted to read 3053459760 bytes at position 2953. Only read 534544. ERROR: IMG1 does not have a series number Error in load_dicom_series (line 42) if(nargin < 1 | nargin > 3) Output argument "vol" (and maybe others) not assigned during call to "XX\fieldtrip_20140518\external\freesurfer\load_dicom_series.m>load_dicom_series". Error in ft_read_mri (line 287) [img,transform,hdr,mr_params] = load_dicom_series(dcmdir,dcmdir,filename); I'll appreciate your reply a lot! Best, Ying -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Fri Jan 16 11:54:35 2015 From: michelic72 at gmail.com (Cristiano Micheli) Date: Fri, 16 Jan 2015 11:54:35 +0100 Subject: [FieldTrip] How to read .dicom format using FT_READ_MRI In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894CB27BDF@exprd03.hosting.ru.nl> References: <7CCA2706D7A4DA45931A892DF3C2894CB27BDF@exprd03.hosting.ru.nl> Message-ID: Hi Ying and Stan, I had the same problem, and I solved it in a 'quick and dirty' way by changing the name of the first image of the dicom series (i.e. substituting the dots with underscores). It may help to change/add the extension of the first file too . Best of luck! Cris On Fri, Jan 16, 2015 at 9:43 AM, Pelt, S. van (Stan) < stan.vanpelt at donders.ru.nl> wrote: > Dear Ying, > > > > As far as I understand, Fieldtrip can read in the entire series of > dicom-files by just specifying the first file name of the series, just like > you did. However, for this it is required that the series number is clear > in each file name, e.g. MRI_S01_MEG.0001.0001.IMA, > MRI_S01_MEG.0001.0002.IMA, etc. I suppose that is not clear in your dicom > file names. > > > > Best, > > Stan > > > > -- > > Stan van Pelt, PhD > > Donders Institute for Brain, Cognition and Behaviour > > Radboud University > > Montessorilaan 3, B.01.34 > > 6525 HR Nijmegen, the Netherlands > > tel: +31 24 3616288 > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Ying Li > *Sent:* woensdag 14 januari 2015 20:05 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] How to read .dicom format using FT_READ_MRI > > > > Dear all, > > > > I'm trying to load MRI into matlab. The MRI data I have is a series of > .dicom files (~250 frames, "IMG1"~"IMG250"). I'm wondering how to specify > the input parameter for the function "ft_read_mri". Since I have 250 files, > which file should I use for the input? > > > > If I only use the first file "IMG1", for example mri = > ft_read_mri('IMG1'); Then I will get the following error: > > > > Warning: Not enough data imported. Attempted to read 3053459760 bytes at > position 2953. Only read 534544. > > ERROR: IMG1 does not have a series number > > Error in load_dicom_series (line 42) > > if(nargin < 1 | nargin > 3) > > > > Output argument "vol" (and maybe others) not assigned during call to > > > "XX\fieldtrip_20140518\external\freesurfer\load_dicom_series.m>load_dicom_series". > > > > Error in ft_read_mri (line 287) > > [img,transform,hdr,mr_params] = > load_dicom_series(dcmdir,dcmdir,filename); > > > > I'll appreciate your reply a lot! > > > > Best, > > > > Ying > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Fri Jan 16 19:24:02 2015 From: luke.bloy at gmail.com (Luke Bloy) Date: Fri, 16 Jan 2015 13:24:02 -0500 Subject: [FieldTrip] Realtime setup Message-ID: Hi all, I'm interested in setting up some realtime analysis on a CTF system. Fieldtrip seems to have done quite a bit of work in getting this working, but i don't see a lot of documentation / discussion about hardware setup etc, but perhaps I'm missing it. Can anyone help me in deciding what is needed at a hardware level to make the ft_realtime routines work with a CTF machine? Thanks. Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From kkalimeri at gmail.com Sun Jan 18 13:37:22 2015 From: kkalimeri at gmail.com (Kyriaki Kalimeri) Date: Sun, 18 Jan 2015 14:37:22 +0200 Subject: [FieldTrip] Postdoctoral Fellowship position - ISI Foundation Message-ID: Job Description Institute for Scientific Interchange(ISI) is seeking to appoint a highly motivated Postdoctoral Assistant to undertake research activities related to human centric computing for the Horizon2020 project "Sound Of Vision". ISI provides an unusually rich opportunity for collegial interaction in a highly competitive environment. Mentoring will also be provided by a multidisciplinary faculty team including co-investigators on the project and collaborators from Neurology, Engineering, Medicine and Psychology. Project Overview Sound of Vision (Natural sense of vision through acoustics and haptics) is a highly multidisciplinary project that will design, implement and validate an original non-invasive, wearable hardware and software system to assist visually impaired people by creating and conveying an auditory representation of the surrounding environment. This representation will be created, updated and delivered to the blind users continuously and in real time. In addition to the auditory representation, haptics will be used moderately as an additional channel to convey some of the most relevant information. The system will help visually impaired people to both perceive and navigate in any kind of environment (indoor/outdoor), without the need for predefined tags/sensors located in the surroundings and regardless of the lighting conditions. Specifically you will: - Conduct user and feasibility studies to determine the appropriate mobile platform and delivery components to support the functionality of the "Sound of Vision" prototype; - Participate in the shared decision making around alternatives to the hardware and software development; - Participate in a large trial to assist in system deployment and data collection; - Carry out innovative, impactful research of strategic importance to the domain of behavioural neuroscience, cognitive science and human computer interaction; - Produce high quality scientific and technical outputs including journal articles, conference papers and presentations, patents and technical reports. To be successful in this position you will need: - PhD in neuroscience, computer science, computer engineering or other related field with a neuroscience-related background. - demonstrated experience in behavioural neuroscience and BCI techniques. Specific areas of focus include visual impairments, brain plasticity and usability research will be desired. - fluency in English The review of applications will begin immediately and the position will remain open until filled. The initial appointment is for 1 year with a possibility of extension. To apply, send cover letter, curriculum vitae and professional reference list to the PI of the project Dr.Kyriaki Kalimeri, kyriaki.kalimeri at isi.it. ISI is an equal opportunity employer and does not discriminate on the basis of race, color, national origin, gender, sexual orientation, age, religion or disability. -- *Dr. Kyriaki KalimeriElectronic & Computer Engineer* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Jan 19 09:59:48 2015 From: jorn at artinis.com (=?utf-8?Q?J=C3=B6rn_M._Horschig?=) Date: Mon, 19 Jan 2015 09:59:48 +0100 Subject: [FieldTrip] Realtime setup In-Reply-To: References: Message-ID: <000201d033c6$47c4ded0$d74e9c70$@artinis.com> Hi Luke, nice to see that you are getting into the realtime business ;) The software side of realtime analysis should be documented quite well, but a bit scattered across the FT page (just in case, e.g. http://fieldtrip.fcdonders.nl/development/realtime/ctf or http://fieldtrip.fcdonders.nl/development/realtime). As you said, the hardware setup itself is not hugely discussed, but that is because there is not much to discuss. The FT buffer is implement by a shared memory segment (i.e. some reserved address in memory that is accessible) and communication between computers takes place via a TCP socket. So, hardware requirements are memory and a network card ;) As long as your computers are not too ancient, there should also be no problem in terms of computational requirements. Our realtime computer is about 3 years old, our acquisition computer at least 4 (but I guess more in the range of 6-8 yrs). I am not working at the Donders anymore, so I cannot check the exact specs. Are you facing any particular problems? Or just asking before setting anything up? In the last years, we wrote several papers about how we use the realtime implementation at the Donders, maybe they help as well in understanding our hardware setup: http://www.sciencedirect.com/science/article/pii/S1053811914010064 http://link.springer.com/article/10.1007%2Fs10548-014-0401-7 http://www.sciencedirect.com/science/article/pii/S1053811912011597 If you have any more questions, feel free to ask again. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Luke Bloy Sent: Friday, January 16, 2015 7:24 PM To: FieldTrip list serve Cc: jm.horschig at donders.ru.nl Subject: [FieldTrip] Realtime setup Hi all, I'm interested in setting up some realtime analysis on a CTF system. Fieldtrip seems to have done quite a bit of work in getting this working, but i don't see a lot of documentation / discussion about hardware setup etc, but perhaps I'm missing it. Can anyone help me in deciding what is needed at a hardware level to make the ft_realtime routines work with a CTF machine? Thanks. Luke -------------- next part -------------- An HTML attachment was scrubbed... URL: From ploner at lrz.tu-muenchen.de Mon Jan 19 13:12:46 2015 From: ploner at lrz.tu-muenchen.de (Markus Ploner) Date: Mon, 19 Jan 2015 13:12:46 +0100 Subject: [FieldTrip] =?utf-8?q?PhD_Student_in_computational_neuroscience/p?= =?utf-8?q?ain_research_-_Technische_Universit=C3=A4t_M=C3=BCnchen?= Message-ID: PhD Student in computational neuroscience/pain research Department of Neurology, Technische Universität München, Munich, Germany Applications are invited for a PhD Student position at the Department of Neurology, Technische Universität München, to work on the cerebral representation of pain by using EEG. The project will focus on the neurophysiological correlates of pain in healthy human subjects and patients suffering from chronic pain disorders. Major experimental methods include EEG time-frequency analysis, source analysis and connectivity analysis. The candidate will join a research group dedicated to the multimodal investigation of the cerebral representation of pain (http://www.painlabmunich.de ) which is part of the TUM-Neuroimaging Center (TUM-NIC; http://www.tumnic.mri.tum.de ). TUM-NIC hosts state-of-the-art neuroimaging facilities and offers training in major neuroimaging techniques. Applicants should have a background in computer science, statistics, physics, engineering, neuroscience, medicine, psychology, or other relevant disciplines. Prior experience in MATLAB programming is mandatory. Skills for sophisticated analysis of EEG data (e.g. information theory, machine learning techniques, mediation analysis) are highly desirable. Candidates have the possibility to integrate in the PhD program Medical Life Science and Technology (http://www.phd.med.tum.de ) or the Graduate School of Systemic Neurosciences (http://www.gsn.uni-muenchen.de/index.html ), which offer interdisciplinary high-level training for students with different backgrounds. Salary will be commensurate with the German TVöD salary scale (EG13). Applications will be considered until the position is filled. Candidates may contact Dr. Markus Ploner for more detailed information or directly e-mail their application (ploner at lrz.tum.de ), including letter of motivation, CV and letters of recommendation. Markus Ploner MD Heisenberg Professor of Human Pain Research Department of Neurology Technische Universität München Munich, Germany ploner at lrz.tum.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke.bloy at gmail.com Mon Jan 19 22:07:38 2015 From: luke.bloy at gmail.com (Luke Bloy) Date: Mon, 19 Jan 2015 16:07:38 -0500 Subject: [FieldTrip] Realtime setup In-Reply-To: <000201d033c6$47c4ded0$d74e9c70$@artinis.com> References: <000201d033c6$47c4ded0$d74e9c70$@artinis.com> Message-ID: Hi Jörn, This is a great place for me to start. I'm just beginning to think through a setup so I haven't run into any problems yet. But I'm sure that I will. Thank you. -Luke On Mon, Jan 19, 2015 at 3:59 AM, Jörn M. Horschig wrote: > Hi Luke, > > > > nice to see that you are getting into the realtime business ;) > > The software side of realtime analysis should be documented quite well, > but a bit scattered across the FT page (just in case, e.g. > http://fieldtrip.fcdonders.nl/development/realtime/ctf or > http://fieldtrip.fcdonders.nl/development/realtime). As you said, the > hardware setup itself is not hugely discussed, but that is because there is > not much to discuss. The FT buffer is implement by a shared memory segment > (i.e. some reserved address in memory that is accessible) and communication > between computers takes place via a TCP socket. So, hardware requirements > are memory and a network card ;) As long as your computers are not too > ancient, there should also be no problem in terms of computational > requirements. Our realtime computer is about 3 years old, our acquisition > computer at least 4 (but I guess more in the range of 6-8 yrs). I am not > working at the Donders anymore, so I cannot check the exact specs. Are you > facing any particular problems? Or just asking before setting anything up? > > > > In the last years, we wrote several papers about how we use the realtime > implementation at the Donders, maybe they help as well in understanding our > hardware setup: > > http://www.sciencedirect.com/science/article/pii/S1053811914010064 > > http://link.springer.com/article/10.1007%2Fs10548-014-0401-7 > > http://www.sciencedirect.com/science/article/pii/S1053811912011597 > > > > If you have any more questions, feel free to ask again. > > > > Best, > > Jörn > > > > *--* > > > > *Jörn M. Horschig*, Software Engineer > > Artinis Medical Systems | +31 481 350 980 > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Luke Bloy > *Sent:* Friday, January 16, 2015 7:24 PM > *To:* FieldTrip list serve > *Cc:* jm.horschig at donders.ru.nl > *Subject:* [FieldTrip] Realtime setup > > > > Hi all, > > > > I'm interested in setting up some realtime analysis on a CTF system. > Fieldtrip seems to have done quite a bit of work in getting this working, > but i don't see a lot of documentation / discussion about hardware setup > etc, but perhaps I'm missing it. > > > > Can anyone help me in deciding what is needed at a hardware level to make > the ft_realtime routines work with a CTF machine? > > > > Thanks. > > Luke > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Wed Jan 21 02:56:14 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Tue, 20 Jan 2015 17:56:14 -0800 Subject: [FieldTrip] Biosemi eventtype problem Message-ID: <54BF073E.40808@gmail.com> Hi all, I was wondering whether anyone has seen this issue on Biosemi bdf before and, if so, how you solved it. If I use FT to read in the data, I have 'STATUS' as an event type with event values. However, the values in there are not really the values that were sent. Also, the number of values doesn't match what was sent. So I went on to check what EEGlab would do. Using the GUI, the event values that are produced cannot be selected further. It's a weird error, it detects event values (the same values that FT detects), but it then complains that they are not strings. Final attempt: force EEGlab to read one channel in particular in the command line. It turns out, these data have 64 channels, 8 EXG and one additional channel, 73. If I force EEGlab to read from channel 73, I get all the correct event values. So apparently what EEGlab and FT see as the line with the event values ('STATUS') is not where they really are in these particular data. I guess what I could do is read the data with EEGlab forcing the event type to be the 73 channel and then export it to FT later on, but I was wondering whether the solution to the problem is much easier than that. Thanks a lot, Vitoria From a.maye at uke.de Wed Jan 21 09:09:32 2015 From: a.maye at uke.de (Alexander Maye) Date: Wed, 21 Jan 2015 09:09:32 +0100 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <54BF073E.40808@gmail.com> References: <54BF073E.40808@gmail.com> Message-ID: <10381509.nCaZsCYVui@mars.neurophys.uke.uni-hamburg.de> Hi Vitoria, with this minimal description it's hard to say what the problem is, but these are the things that come to my mind: - Did you setup/modify a config file for the ftbuffer, and did you start the buffer with this config? - Sometimes the higher bits of the parallel port are set, giving you event values >60.000. Maybe you could mask out the bits that you are interested in? Another possibility is that ftbuffer's event values are in two's-complement format. In any case you could check the output of the ftbuffer program - if your events aren't there, your program will not see them either. - Transition from some value to zero are not detected as events as it seems. Hope this helps, ALEX. -------------- next part -------------- -- _____________________________________________________________________ Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Rainer Schoppik _____________________________________________________________________ SAVE PAPER - THINK BEFORE PRINTING From yoniilevy at gmail.com Thu Jan 22 07:54:07 2015 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 22 Jan 2015 08:54:07 +0200 Subject: [FieldTrip] Statistics: comparing conditions with different sample size Message-ID: Is there a way in FT to deal with the statistical comparison of conditions with different sample size (for instance N = 500 vs N = 100)? Thanks for any input Yoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From julian.keil at gmail.com Thu Jan 22 09:05:20 2015 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 22 Jan 2015 09:05:20 +0100 Subject: [FieldTrip] Statistics: comparing conditions with different sample size In-Reply-To: References: Message-ID: Dear Yoni, do you mean different *group* sizes (as in 500 patients vs. 100 controls)? Then use the stat fun indepsamplesT. If you mean 500 trials vs 100 trials within one subject, you can again use the indepsamplesT-function, but beware! The number of trials can severely influence your signal. I personally strongly suggest using the same number of trials and subjects. Best, Julian ******************** Dr. Julian Keil AG Multisensorische Integration Psychiatrische Universitätsklinik der Charité im St. Hedwig-Krankenhaus Große Hamburger Straße 5-11, Raum E 307 10115 Berlin Telefon: +49-30-2311-1879 Fax: +49-30-2311-2209 http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration Am 22.01.2015 um 07:54 schrieb Yoni Levy: > Is there a way in FT to deal with the statistical comparison of conditions with different sample size (for instance N = 500 vs N = 100)? > > Thanks for any input > Yoni > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From r.braukmann at donders.ru.nl Thu Jan 22 12:09:45 2015 From: r.braukmann at donders.ru.nl (Ricarda Braukmann) Date: Thu, 22 Jan 2015 12:09:45 +0100 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitoria, I had a problem with biosemi markers not being read in correctly by FT as well. First of all, if I remember correctly, using ft_read_event only worked for me with .bdf files (and not .edf files). Still even with the .bdf files, the numbers were not correct. This was caused by the fact that the biosemi system always sent out two markers to the EEG (one constant marker and one marker specific to stimulus presentation). FT for some reason did not recognize these markers as 2 (8bit) markers but created 1 16 bit marker from it. Once I knew this it was easily solved, I just recoded the markers. Not sure whether this is what is happening with your set-up as well (might be different with newer ft versions), but maybe it helps. In any case, I belief that the biosemi STATUS markers are indeed not strings. Best, Ricarda On Wednesday, January 21, 2015, Alexander Maye wrote: > Hi Vitoria, > > with this minimal description it's hard to say what the problem is, but > these > are the things that come to my mind: > - Did you setup/modify a config file for the ftbuffer, and did you start > the > buffer with this config? > - Sometimes the higher bits of the parallel port are set, giving you event > values >60.000. Maybe you could mask out the bits that you are interested > in? > Another possibility is that ftbuffer's event values are in two's-complement > format. In any case you could check the output of the ftbuffer program - if > your events aren't there, your program will not see them either. > - Transition from some value to zero are not detected as events as it > seems. > > Hope this helps, > > ALEX. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elmeri.syrjanen at gmail.com Thu Jan 22 13:13:03 2015 From: elmeri.syrjanen at gmail.com (=?UTF-8?Q?Elmeri_Syrj=C3=A4nen?=) Date: Thu, 22 Jan 2015 13:13:03 +0100 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> Message-ID: We have the same problem with reading the status correctly from Biosemi. Our experiment software (presentation) sends a zero as first trigger so a simple value(:) = value(:) - value(1); in the trial function will remove the offset from the triggers. /elmeri On Thu, Jan 22, 2015 at 12:09 PM, Ricarda Braukmann < r.braukmann at donders.ru.nl> wrote: > Hi Vitoria, > > I had a problem with biosemi markers not being read in correctly by FT as > well. > > First of all, if I remember correctly, using ft_read_event only worked for > me with .bdf files (and not .edf files). > Still even with the .bdf files, the numbers were not correct. > This was caused by the fact that the biosemi system always sent out two > markers to the EEG (one constant marker and one marker specific to stimulus > presentation). > FT for some reason did not recognize these markers as 2 (8bit) markers but > created 1 16 bit marker from it. > > Once I knew this it was easily solved, I just recoded the markers. > Not sure whether this is what is happening with your set-up as well (might > be different with newer ft versions), but maybe it helps. > > In any case, I belief that the biosemi STATUS markers are indeed not > strings. > > Best, > Ricarda > > > On Wednesday, January 21, 2015, Alexander Maye wrote: > >> Hi Vitoria, >> >> with this minimal description it's hard to say what the problem is, but >> these >> are the things that come to my mind: >> - Did you setup/modify a config file for the ftbuffer, and did you start >> the >> buffer with this config? >> - Sometimes the higher bits of the parallel port are set, giving you event >> values >60.000. Maybe you could mask out the bits that you are interested >> in? >> Another possibility is that ftbuffer's event values are in >> two's-complement >> format. In any case you could check the output of the ftbuffer program - >> if >> your events aren't there, your program will not see them either. >> - Transition from some value to zero are not detected as events as it >> seems. >> >> Hope this helps, >> >> ALEX. >> >> > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From yoniilevy at gmail.com Thu Jan 22 13:26:00 2015 From: yoniilevy at gmail.com (Yoni Levy) Date: Thu, 22 Jan 2015 14:26:00 +0200 Subject: [FieldTrip] Statistics: comparing conditions with different sample size Message-ID: Hi Julian I indeed meant comparing within subject conditions, one with many more trials than the other (e.g. 500 vs 100 trials). I am aware that this difference would bias my result, the question is whether there might be a way to bypass such bias, without the conservative solution of equating the trial number in both conditions (i.e. removing 400 trials from condition1, and thereby comparing 100 vs 100). One possible solution that was suggested was to proceed with an indepT test, and then proceeding with an "spm_t2z" transformation ; yet, I wonder whether this is also valid for such large difference between sample sizes. Thanks Yoni On Thu, Jan 22, 2015 at 1:00 PM, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Statistics: comparing conditions with different sample size > (Yoni Levy) > 2. Re: Statistics: comparing conditions with different sample > size (Julian Keil) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 22 Jan 2015 08:54:07 +0200 > From: Yoni Levy > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Statistics: comparing conditions with different > sample size > Message-ID: > QiybRRQvQ-QfTRpWgj0it4oPLr8BnkSHLA at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Is there a way in FT to deal with the statistical comparison of conditions > with different sample size (for instance N = 500 vs N = 100)? > > Thanks for any input > Yoni > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150122/3714595f/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Thu, 22 Jan 2015 09:05:20 +0100 > From: Julian Keil > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Statistics: comparing conditions with > different sample size > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > Dear Yoni, > > do you mean different *group* sizes (as in 500 patients vs. 100 controls)? > Then use the stat fun indepsamplesT. > If you mean 500 trials vs 100 trials within one subject, you can again use > the indepsamplesT-function, but beware! The number of trials can severely > influence your signal. > I personally strongly suggest using the same number of trials and subjects. > > Best, > > Julian > > > ******************** > Dr. Julian Keil > > AG Multisensorische Integration > Psychiatrische Universit?tsklinik > der Charit? im St. Hedwig-Krankenhaus > Gro?e Hamburger Stra?e 5-11, Raum E 307 > 10115 Berlin > > Telefon: +49-30-2311-1879 > Fax: +49-30-2311-2209 > > http://psy-ccm.charite.de/forschung/bildgebung/ag_multisensorische_integration > > Am 22.01.2015 um 07:54 schrieb Yoni Levy: > > > Is there a way in FT to deal with the statistical comparison of > conditions with different sample size (for instance N = 500 vs N = 100)? > > > > Thanks for any input > > Yoni > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150122/a11451c9/attachment-0001.html > > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: signature.asc > Type: application/pgp-signature > Size: 495 bytes > Desc: Message signed with OpenPGP using GPGMail > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150122/a11451c9/attachment-0001.pgp > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 50, Issue 15 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jevtic at ucl.ac.uk Thu Jan 22 16:52:14 2015 From: t.jevtic at ucl.ac.uk (Jevtic, Tijana) Date: Thu, 22 Jan 2015 15:52:14 +0000 Subject: [FieldTrip] TMSi data streaming Message-ID: <1421941934832.82105@ucl.ac.uk> Dear all, I'm quite new to Matlab software and I just got the TMSi porti7 equipment to use from now onwards. I came across fieldtrip as a tool for data streaming but when I follow the protocol provided by the TMSi suppliers, I have errors. Can I ask any one of you to share basic code for acquiring and storing the data with unmentioned equipment, please? Many thanks in advance. Tijana ------------------ Tijana Jevtic, BSc, MSc, MIEEE PhD student, Research Assistant Aspire Create - Centre for Rehabilitation Engineering and Assistive Technology Institute of Orthopaedics and Musculoskeletal Science, University College London, Royal National Orthopaedic Hospital, Stanmore, HA7 4LP United Kingdom t.jevtic at ucl.ac.uk Tel: +44 (0) 7513 691217 http://www.ucl.ac.uk/aspire-create -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.vandenieuwenhuijzen at donders.ru.nl Thu Jan 22 17:50:26 2015 From: m.vandenieuwenhuijzen at donders.ru.nl (Nieuwenhuijzen, M.E. van de (Marieke)) Date: Thu, 22 Jan 2015 16:50:26 +0000 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata Message-ID: Hi Fieldtrippers, I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Fri Jan 23 01:32:16 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Thu, 22 Jan 2015 16:32:16 -0800 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> Message-ID: <54C19690.9070304@gmail.com> Hi Ricarda, Alex, Elmeri et al. Thanks. The files I'm trying to read are .bdf. Ricarda, could you please clarify "I just recoded the markers."? Did you edit the .bdf file with a text editor? In a previous dataset I acquired with Biosemi (in combination with Presentation), with eventtype 'STATUS', I get the right event values in the right number (that is, I send 10 times marker '1', ft_definetrial finds 10 times marker '1'). With this new Biosemi dataset (programmed by someone else in E-prime, it's not my data): cfg=[]; cfg.dataset = dataset; cfg.trialdef.eventtype = 'STATUS'; cfg.trialdef.eventvalue = '?'; ft_definetrial returns markers that were not sent, and doesn't return markers that were sent. (The same occurs if I read the data in EEGlab by the way). It doesn't look like there's a linear transformation between what was sent and what FT finds. For example, markers sent were 1:21; FT returns [3:23 29:31], but I'll definitely look into the suggestion that maybe 1:21 was sent but for some reason recorded as 3:23 and the 29:31 are coming from somewhere else. Thanks a lot! Vitoria From harding at cbs.mpg.de Fri Jan 23 14:39:37 2015 From: harding at cbs.mpg.de (Eleanor Harding) Date: Fri, 23 Jan 2015 14:39:37 +0100 (CET) Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: Message-ID: <1608329006.4466.1422020377153.JavaMail.root@zimbra> Hi Marieke, A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. Good luck, Ellie Harding Message: 5 Date: Thu, 22 Jan 2015 16:50:26 +0000 From: "Nieuwenhuijzen, M.E. van de (Marieke)" To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi Fieldtrippers, I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstraße 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding From r.thomas at nin.knaw.nl Fri Jan 23 15:37:49 2015 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Fri, 23 Jan 2015 14:37:49 +0000 Subject: [FieldTrip] Electrode file *.bvef format Message-ID: <84b76474c6904886b156cbf02e040e76@EXNHI02.herseninstituut.knaw.nl> ?Dear FieldTrippers, Does FT read *.bvef (Brainproducts) electrode location files? Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Jan 23 17:56:20 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 23 Jan 2015 16:56:20 +0000 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: <1608329006.4466.1422020377153.JavaMail.root@zimbra> References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> Message-ID: Marieke, Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. JM On Jan 23, 2015, at 2:39 PM, Eleanor Harding wrote: > Hi Marieke, > > A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, > > Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. > > Good luck, > Ellie Harding > > > > Message: 5 > Date: Thu, 22 Jan 2015 16:50:26 +0000 > From: "Nieuwenhuijzen, M.E. van de (Marieke)" > > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Low-pass frequency when downsampling using > ft_resampledata > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi Fieldtrippers, > > I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? > > Best, > Marieke > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > > -- > ------------------------------------------------------------------ > Eleanor Harding > PhD Student > Max Planck Institute for Human Cognitive and Brain Sciences > Stephanstraße 1A, 04103 Leipzig, Germany > Phone: +49 341 9940-2268 > Fax: +49 341 9940 2260 > http://www.cbs.mpg.de/~harding > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jan.schoffelen at donders.ru.nl Fri Jan 23 18:09:48 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 23 Jan 2015 17:09:48 +0000 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <54C19690.9070304@gmail.com> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <54C19690.9070304@gmail.com> Message-ID: <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> Hi V., > With this new Biosemi dataset (programmed by someone else in E-prime, it's not my data): Have you consulted with this ‘someone else’? From the looks of it, it doesn’t seem a FieldTrip issue per se. Best, JM > cfg=[]; > cfg.dataset = dataset; > cfg.trialdef.eventtype = 'STATUS'; > cfg.trialdef.eventvalue = '?'; > ft_definetrial returns markers that were not sent, and doesn't return markers that were sent. (The same occurs if I read the data in EEGlab by the way). > It doesn't look like there's a linear transformation between what was sent and what FT finds. For example, markers sent were 1:21; FT returns [3:23 29:31], but I'll definitely look into the suggestion that maybe 1:21 was sent but for some reason recorded as 3:23 and the 29:31 are coming from somewhere else. > > Thanks a lot! > Vitoria > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.braukmann at donders.ru.nl Fri Jan 23 18:14:31 2015 From: r.braukmann at donders.ru.nl (Ricarda Braukmann) Date: Fri, 23 Jan 2015 18:14:31 +0100 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <8a3cfe0d5138437498552cae9f944035@EXPRD01.hosting.ru.nl> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <8a3cfe0d5138437498552cae9f944035@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitoria, Im not sure this will help you but I still wanted to come back to the recoding that worked for me (and sorry for being so vague on it in my first email) So, I recoded it in Matlab. I first find the events in the bdf datafile and then redefine them using a small script I made myself (I am convinced there is an easier way but this worked for me and I had limited time and mainly wanted to have a quick look at the data): event = ft_read_event(bdfdataset); %redfine the events: event = EEGSynch_FFT_trialfun_BioSemiMarkerRedefine(event); I attached my redefine function if you want to have a look. In my case the first of the two markers should always be 255 which the script checks, but this might be different in your case. Let me know if anything is unclear still. Best, Ricarda On Fri, Jan 23, 2015 at 1:32 AM, Vitoria Piai wrote: > Hi Ricarda, Alex, Elmeri et al. > > Thanks. The files I'm trying to read are .bdf. > Ricarda, could you please clarify "I just recoded the markers."? Did you > edit the .bdf file with a text editor? > > In a previous dataset I acquired with Biosemi (in combination with > Presentation), with eventtype 'STATUS', I get the right event values in > the right number (that is, I send 10 times marker '1', ft_definetrial > finds 10 times marker '1'). > With this new Biosemi dataset (programmed by someone else in E-prime, > it's not my data): > cfg=[]; > cfg.dataset = dataset; > cfg.trialdef.eventtype = 'STATUS'; > cfg.trialdef.eventvalue = '?'; > ft_definetrial returns markers that were not sent, and doesn't return > markers that were sent. (The same occurs if I read the data in EEGlab by > the way). > It doesn't look like there's a linear transformation between what was > sent and what FT finds. For example, markers sent were 1:21; FT returns > [3:23 29:31], but I'll definitely look into the suggestion that maybe > 1:21 was sent but for some reason recorded as 3:23 and the 29:31 are > coming from somewhere else. > > Thanks a lot! > Vitoria > > -- Ricarda Braukmann, MSc PhD student Radboud University Medical Centre & Baby Research Center Donders Institute for Brain, Cognition and Behaviour, Centre for Neuroscience & Centre for Cognition Room B.01.22 Phone: +31 (0) 24 36 12652 Email: r.braukmann at donders.ru.nl Website: http://www.zebra-project.nl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bi2de.m Type: text/x-csrc Size: 4022 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: de2bi.m Type: text/x-csrc Size: 6173 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: EEGSynch_FFT_trialfun_BioSemiMarkerRedefine.m Type: text/x-csrc Size: 799 bytes Desc: not available URL: From v.piai.research at gmail.com Fri Jan 23 20:54:42 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Fri, 23 Jan 2015 11:54:42 -0800 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <54C19690.9070304@gmail.com> <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> Message-ID: <54C2A702.30800@gmail.com> Thanks, Ricarda and JM! JM, I know for sure it's not a FT problem :) I checked the E-prime scripts used and all the markers were sent (according to the E-prime code). What I'm trying to figure out is what kind of conversion was applied between E-prime and Biosemi so I can work backwards and still detect my events. It doesn't seem to be a linear transformation between what E-prime sent and Biosemi coded... Anyways, thanks a lot for your thoughts! Vitoria On 1/23/2015 9:09 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > Hi V., > >> With this new Biosemi dataset (programmed by someone else in E-prime, it's not my data): > Have you consulted with this ‘someone else’? From the looks of it, it doesn’t seem a FieldTrip issue per se. > > > Best, > JM > > > > >> cfg=[]; >> cfg.dataset = dataset; >> cfg.trialdef.eventtype = 'STATUS'; >> cfg.trialdef.eventvalue = '?'; >> ft_definetrial returns markers that were not sent, and doesn't return markers that were sent. (The same occurs if I read the data in EEGlab by the way). >> It doesn't look like there's a linear transformation between what was sent and what FT finds. For example, markers sent were 1:21; FT returns [3:23 29:31], but I'll definitely look into the suggestion that maybe 1:21 was sent but for some reason recorded as 3:23 and the 29:31 are coming from somewhere else. >> >> Thanks a lot! >> Vitoria >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From v.piai.research at gmail.com Mon Jan 26 04:29:48 2015 From: v.piai.research at gmail.com (=?windows-1252?Q?Vit=F3ria_Piai?=) Date: Sun, 25 Jan 2015 19:29:48 -0800 Subject: [FieldTrip] Biosemi eventtype problem In-Reply-To: <54C2A702.30800@gmail.com> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <54C19690.9070304@gmail.com> <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> <54C2A702.30800@gmail.com> Message-ID: <54C5B4AC.1080109@gmail.com> Hi all, I managed to gather more information regarding this issue and I thought I'd post the resolution here just in case someone bumps into the same problem in the future. The issue is indeed caused by not having set E-prime to work correctly with Biosemi. I use Presentation, and that goes flawlessly with Biosemi. But these data were acquired by someone else in E-prime. The reply from Biosemi's CEO below may be helpful in case you use E-prime. Thanks for all the thoughts, Vitoria >>>>>>>>>>>>>>>>>>>>>>>>>> First rule of triggering from E-Prime to ActiveTwo is that you must reset the port to zero after each non-zero code. Hold values high on the port for 10 msec or so and return to zero after and you will not see any of the problems you describe. E-Prime will not do this automatically (though it would seem logical for the software to do it) -- you must write a zero to the port after each code. Random codes occur when you do not follow the above rule if you have told ActiView to decimate EEG and triggersamples by some fraction other than 1 (e.g. 1/4th). By doing this you leave it to ActiView what value to assign to the trigger channel at samples bordering the intersection between two non-zero values. ActiView performs a logical AND between trigger bits in the high state on samples to be combined. So, if you had a 1 followed by a 2 with no zero in between and you decimate by 1/4 you will end up with 1 - 3 - 2. 3 is the logical AND of 1 and 2 in binary. ActiveTwo has a 16 bit trigger port. Your triggers are all on bits 0-7, probably because you are using a standard parallel port with only 8 bits. The value on the upper half of the Trig1-8 field is the value at the rising edge of the trigger and the value on the lower half of the Trig1-8 field is the value at the falling edge. This should be zero if you are resetting the port correctly. >>>>>>>>>>>>>>>>>>>> On 1/23/2015 11:54 AM, Vitoria Piai wrote: > Thanks, Ricarda and JM! > JM, I know for sure it's not a FT problem :) > > I checked the E-prime scripts used and all the markers were sent > (according to the E-prime code). What I'm trying to figure out is what > kind of conversion was applied between E-prime and Biosemi so I can > work backwards and still detect my events. It doesn't seem to be a > linear transformation between what E-prime sent and Biosemi coded... > Anyways, thanks a lot for your thoughts! > Vitoria > > On 1/23/2015 9:09 AM, Schoffelen, J.M. (Jan Mathijs) wrote: >> Hi V., >> >>> With this new Biosemi dataset (programmed by someone else in >>> E-prime, it's not my data): >> Have you consulted with this ‘someone else’? From the looks of it, it >> doesn’t seem a FieldTrip issue per se. >> >> >> Best, >> JM >> >> >> >> >>> cfg=[]; >>> cfg.dataset = dataset; >>> cfg.trialdef.eventtype = 'STATUS'; >>> cfg.trialdef.eventvalue = '?'; >>> ft_definetrial returns markers that were not sent, and doesn't >>> return markers that were sent. (The same occurs if I read the data >>> in EEGlab by the way). >>> It doesn't look like there's a linear transformation between what >>> was sent and what FT finds. For example, markers sent were 1:21; FT >>> returns [3:23 29:31], but I'll definitely look into the suggestion >>> that maybe 1:21 was sent but for some reason recorded as 3:23 and >>> the 29:31 are coming from somewhere else. >>> >>> Thanks a lot! >>> Vitoria >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From brungio at gmail.com Mon Jan 26 16:05:17 2015 From: brungio at gmail.com (Bruno L. Giordano) Date: Mon, 26 Jan 2015 15:05:17 +0000 Subject: [FieldTrip] ft_denoise_pca and ft_preproc_dftfilter on long trials In-Reply-To: <54C5B4AC.1080109@gmail.com> References: <54BF073E.40808@gmail.com> <6d6f14dd9c534522ba98c8f776611fbb@EXPRD01.hosting.ru.nl> <54C19690.9070304@gmail.com> <89958022-338F-4269-8CAA-F6A155370CFB@fcdonders.ru.nl> <54C2A702.30800@gmail.com> <54C5B4AC.1080109@gmail.com> Message-ID: <54C657AD.2080603@gmail.com> Hello, I am using the pca/regression method in ft_denoise_pca to get rid of reference-channel variance for rather long trials (>5 min). I am wondering whether these regression methods break down, or don't perform as well as they should be, when trials are this long. If yes, is there some alternative method I could use that performs better for long trials? I am wondering about trial length also because the regression method for line-noise removal in ft_preproc_dftfilter doesn't appear to perform well with trials of this length (even though they obviously do wonders when I preprocess shorter segments). Thank you, Bruno ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bruno L. Giordano, PhD Institute of Neuroscience and Psychology 58 Hillhead Street, University of Glasgow Glasgow, G12 8QB, Scotland T +44 (0) 141 330 5484 Www: http://www.brunolgiordano.net Email charter: http://www.emailcharter.org/ From nico.weeger at googlemail.com Tue Jan 27 17:50:34 2015 From: nico.weeger at googlemail.com (Nico Weeger) Date: Tue, 27 Jan 2015 17:50:34 +0100 Subject: [FieldTrip] Simulate data to compare methods Message-ID: Hello FieldTrip community, I am new to FieldTrip and I try to simulate data to compare the ft_frequanalysis methods Hanning, Multitaper and Wavelet. Therefore I simulate Data manually using different latency, amplitude and frequency combinations using the following equation: sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); sig = sig1+sig2+sig3+sig4; where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; After using ft_frequanalysis (see the following cfgs) *Cfg Wavelet:* cfg = []; cfg.output = 'pow'; cfg.channel = labels; cfg.method = 'wavelet'; cfg.width = 7; cfg.gwidth = 3; cfg.foilim = [1 70]; cfg.toi = 0:0.05:2; TFRwave = ft_freqanalysis(cfg, data_preproc); *Cfg Hanning / Multitaper:* cfg = []; cfg.output = 'pow'; cfg.channel = labels; cfg.method = 'mtmconvol' cfg.foi = 1:1:70 cfg.tapsmofrq = 0.2*cfg.foi; cfg.taper = 'dpss' / ‘hanning’; cfg.t_ftimwin = 4./cfg.foi; cfg.toi = 0:0.05:2; TFRmult1 = ft_freqanalysis(cfg, data_preproc); the data is plotted with ft_singleplotTFR (see cfg below) *cfg singleplot:* cfg = []; cfg.maskstyle = 'saturation'; cfg.colorbar = 'yes'; cfg.layout = 'AC_Osc.lay'; ft_singleplotTFR(cfg, TFRwave); Two problems occur. First, the power scale of wavelet and Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). 1. How can I get the scale of all methods equal, or do I have to change the Wavelet settings to get the right scale of the values? Second, the best result of Multitaper analysis is performed using only one Taper. The goal was to get a result, where the advantages and disadvantages of Multitaper analysis compared to the other methods can be seen. 2. How can I change the simulation so that more tapers show better results than a single taper does? Thank you for your time and help. Regards, Nicolas Weeger Student of Master-Program Appied Research, University Ansbach, Germany -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcantor at umich.edu Tue Jan 27 18:36:15 2015 From: mcantor at umich.edu (Max Cantor) Date: Tue, 27 Jan 2015 12:36:15 -0500 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: Hi Nico, I'm not sure about the second question, but as for the first question, you can manually set the scales for ft_singleplotTFR using cfg.zlim. Hope that helps, Max On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger wrote: > Hello FieldTrip community, > > > > I am new to FieldTrip and I try to simulate data to compare the > ft_frequanalysis methods Hanning, Multitaper and Wavelet. > > Therefore I simulate Data manually using different latency, amplitude and > frequency combinations using the following equation: > > sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > > sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > > sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > > sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > > sig = sig1+sig2+sig3+sig4; > > where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > > > After using ft_frequanalysis (see the following cfgs) > > > *Cfg Wavelet:* > > cfg = []; > > cfg.output = 'pow'; > > cfg.channel = labels; > > cfg.method = 'wavelet'; > > cfg.width = 7; > > cfg.gwidth = 3; > > cfg.foilim = [1 70]; > > cfg.toi = 0:0.05:2; > > TFRwave = ft_freqanalysis(cfg, data_preproc); > > > > *Cfg Hanning / Multitaper:* > > cfg = []; > > cfg.output = 'pow'; > > cfg.channel = labels; > > cfg.method = 'mtmconvol' > > cfg.foi = 1:1:70 > > cfg.tapsmofrq = 0.2*cfg.foi; > > cfg.taper = 'dpss' / ‘hanning’; > > cfg.t_ftimwin = 4./cfg.foi; > > cfg.toi = 0:0.05:2; > > TFRmult1 = ft_freqanalysis(cfg, data_preproc); > > > > > the data is plotted with ft_singleplotTFR (see cfg below) > > > *cfg singleplot:* > > cfg = []; > > cfg.maskstyle = 'saturation'; > > cfg.colorbar = 'yes'; > > cfg.layout = 'AC_Osc.lay'; > > ft_singleplotTFR(cfg, TFRwave); > > > Two problems occur. First, the power scale of wavelet and > Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). > > 1. How can I get the scale of all methods equal, or do I have to > change the Wavelet settings to get the right scale of the values? > > Second, the best result of Multitaper analysis is performed using only one > Taper. The goal was to get a result, where the advantages and disadvantages > of Multitaper analysis compared to the other methods can be seen. > > 2. How can I change the simulation so that more tapers show better > results than a single taper does? > > > Thank you for your time and help. > > > Regards, > > > > Nicolas Weeger > > Student of Master-Program Appied Research, > > University Ansbach, > > Germany > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Max Cantor Lab Manager Computational Neurolinguistics Lab University of Michigan -------------- next part -------------- An HTML attachment was scrubbed... URL: From toomas.kirt at mail.ee Wed Jan 28 11:44:11 2015 From: toomas.kirt at mail.ee (Toomas Kirt) Date: Wed, 28 Jan 2015 12:44:11 +0200 Subject: [FieldTrip] 3rd Baltic-Nordic Summer School on Neuroinformatics (BNNI 2015) Message-ID: <1422441851.54c8bd7bdfae4@posti.mail.ee> An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Jan 28 12:24:25 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 28 Jan 2015 12:24:25 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: Hi Nico, As for question (2), you probably first need to think about what constitutes a "better" result. Using more tapers with dpss will always result in more frequency smoothing. If your source signal is primarily composed of pure sinusoids, and you interpret a spectrum as "better" if it shows clearer peaks, then you will always get the "best" result for the single-taper case. Multitapering allows optimal control over the amount of smoothing you obtain in the frequency domain, which is more or less independent of the amount of smoothing you obtain in the time domain (as opposed to e.g. wavelets, where these are fundamentally linked). When dealing with brain signals, you will often find that a certain stimulus might induce e.g. a gamma response at 40-50 Hz in one subject and one trial, while in another subject or another trial the same stimulus might induce a 50-60 Hz response or so. Of course, in the average over trials (and subjects), this heterogeneity (i.e., noise) will wash out, but it will severely damage your statistical sensitivity. Therefore, using multitapers to add smoothing can produce a much more consistent result and therefore be "better" in the sense of actually understanding the brain. As for your simulation, perhaps using filtered noise would be better than sinusoids. Also, since multitapering benefits you most strongly when taking variation over observations into account, you could consider simulating different observations, each consisting of noise filtered in a slightly different randomly chosen bandwidth, and inspecting the resulting variation over observations in the spectra. Best, Eelke On 27 January 2015 at 18:36, Max Cantor wrote: > Hi Nico, > > I'm not sure about the second question, but as for the first question, you > can manually set the scales for ft_singleplotTFR using cfg.zlim. > > Hope that helps, > > Max > > On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > wrote: >> >> Hello FieldTrip community, >> >> >> >> I am new to FieldTrip and I try to simulate data to compare the >> ft_frequanalysis methods Hanning, Multitaper and Wavelet. >> >> Therefore I simulate Data manually using different latency, amplitude and >> frequency combinations using the following equation: >> >> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); >> >> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); >> >> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); >> >> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); >> >> sig = sig1+sig2+sig3+sig4; >> >> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; >> >> >> After using ft_frequanalysis (see the following cfgs) >> >> >> Cfg Wavelet: >> >> cfg = []; >> >> cfg.output = 'pow'; >> >> cfg.channel = labels; >> >> cfg.method = 'wavelet'; >> >> cfg.width = 7; >> >> cfg.gwidth = 3; >> >> cfg.foilim = [1 70]; >> >> cfg.toi = 0:0.05:2; >> >> TFRwave = ft_freqanalysis(cfg, data_preproc); >> >> >> >> Cfg Hanning / Multitaper: >> >> cfg = []; >> >> cfg.output = 'pow'; >> >> cfg.channel = labels; >> >> cfg.method = 'mtmconvol' >> >> cfg.foi = 1:1:70 >> >> cfg.tapsmofrq = 0.2*cfg.foi; >> >> cfg.taper = 'dpss' / ‘hanning’; >> >> cfg.t_ftimwin = 4./cfg.foi; >> >> cfg.toi = 0:0.05:2; >> >> TFRmult1 = ft_freqanalysis(cfg, data_preproc); >> >> >> >> >> the data is plotted with ft_singleplotTFR (see cfg below) >> >> >> cfg singleplot: >> >> cfg = []; >> >> cfg.maskstyle = 'saturation'; >> >> cfg.colorbar = 'yes'; >> >> cfg.layout = 'AC_Osc.lay'; >> >> ft_singleplotTFR(cfg, TFRwave); >> >> >> Two problems occur. First, the power scale of wavelet and >> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). >> >> 1. How can I get the scale of all methods equal, or do I have to >> change the Wavelet settings to get the right scale of the values? >> >> Second, the best result of Multitaper analysis is performed using only one >> Taper. The goal was to get a result, where the advantages and disadvantages >> of Multitaper analysis compared to the other methods can be seen. >> >> 2. How can I change the simulation so that more tapers show better >> results than a single taper does? >> >> >> Thank you for your time and help. >> >> >> Regards, >> >> >> >> Nicolas Weeger >> >> Student of Master-Program Appied Research, >> >> University Ansbach, >> >> Germany >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan From t.jevtic at ucl.ac.uk Wed Jan 28 16:19:41 2015 From: t.jevtic at ucl.ac.uk (Jevtic, Tijana) Date: Wed, 28 Jan 2015 15:19:41 +0000 Subject: [FieldTrip] Compiling .cc files Message-ID: <1422458382579.81361@ucl.ac.uk> Hi everybody, Can I ask for anybody to point out how can I use bufferViewer.cc and tmsi2ft.cc aka, how can I compile/built etc them :) I looked through the email list and ft website but I can not find step by step explanation. I googled a lot but nothing seems to be working for me so far... Thank you very much in advance.? Best Wishes, Tijana ------------------ Tijana Jevtic, BSc, MSc, MIEEE PhD student, Research Assistant Aspire Create - Centre for Rehabilitation Engineering and Assistive Technology Institute of Orthopaedics and Musculoskeletal Science, University College London, Royal National Orthopaedic Hospital, Stanmore, HA7 4LP United Kingdom t.jevtic at ucl.ac.uk Tel: +44 (0) 7513 691217 http://www.ucl.ac.uk/aspire-create -------------- next part -------------- An HTML attachment was scrubbed... URL: From payashi.garry at seh.ox.ac.uk Wed Jan 28 16:32:51 2015 From: payashi.garry at seh.ox.ac.uk (Payashi Garry) Date: Wed, 28 Jan 2015 15:32:51 +0000 Subject: [FieldTrip] help with topoplot_TFR Message-ID: <522FFFC2-BC59-4995-8873-F2090932707A@ndcn.ox.ac.uk> Dear Fieldtrip community, My name is Payashi Garry and I am working in the Nuffield Department of Clinical Neurosciences in the University of Oxford. I am analysing some continuous EEG data that we have measured from our Neuro-Intensive Care unit patients. We are interested in using quantitative EEG measures to assess whether these can be used to detect cerebral ischaemia. I have performed time frequency analysis using ft_freqanalysis. I have then been usig ft_topoplotTFR to visualise the results with no problems. However, one of the parameters we are investigating is the change in alpha/delta ratio. I was wondering if it would be possible to create topographic maps of the alpha/delta ratio for a particular time period (i.e. alpha power/delta power) using ft_topoplotTFR? At the moment I am generating topographic maps for alpha and delta power using the following commands: cfg=[]; cfg.baselinetype = 'absolute'; cfg.xlim = [10 2500]; cfg.ylim = [1 4]; cfg.zlim = [0 100]; cfg.colorbar = 'yes'; figure ft_topoplotTFR(cfg, freq_continuous) title('delta power prenitrite', 'FontSize', 36, 'FontName', 'Arial') with freq_continuous being my time/frequency/channel data. I would be very grateful for any advice on this, and would be happy to supply more information if needed. Many thanks Best wishes Payashi **** Dr Payashi Garry MB BChir FRCA Specialty Registrar in Anaesthetics and BRC Research Fellow Nuffield Department of Clinical Neurosciences John Radcliffe Hospital Oxford OX3 9DU Tel: 01865 572878 From tzvetan.popov at uni-konstanz.de Wed Jan 28 17:20:29 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Wed, 28 Jan 2015 17:20:29 +0100 Subject: [FieldTrip] help with topoplot_TFR In-Reply-To: <522FFFC2-BC59-4995-8873-F2090932707A@ndcn.ox.ac.uk> References: <522FFFC2-BC59-4995-8873-F2090932707A@ndcn.ox.ac.uk> Message-ID: Dear Payashi, you could compute the ratio per sample point and write it for example in ratiodata.avg= ratio. Where ratio is a chan_time matrix. Then you could type ratiodata.label = freq_continuous.label; ratiodata.dimord = ‘chan_time’. Next, you can use ft_multiplotER which handles time domain data where cfg.xlim is the option you need in order to plot the ratio topography for a particular time point. Is this what you need? good luck tzvetan > Dear Fieldtrip community, > > My name is Payashi Garry and I am working in the Nuffield Department of Clinical Neurosciences in the University of Oxford. I am analysing some continuous EEG data that we have measured from our Neuro-Intensive Care unit patients. We are interested in using quantitative EEG measures to assess whether these can be used to detect cerebral ischaemia. > > I have performed time frequency analysis using ft_freqanalysis. I have then been usig ft_topoplotTFR to visualise the results with no problems. However, one of the parameters we are investigating is the change in alpha/delta ratio. I was wondering if it would be possible to create topographic maps of the alpha/delta ratio for a particular time period (i.e. alpha power/delta power) using ft_topoplotTFR? > > At the moment I am generating topographic maps for alpha and delta power using the following commands: > > cfg=[]; > cfg.baselinetype = 'absolute'; > cfg.xlim = [10 2500]; > cfg.ylim = [1 4]; > cfg.zlim = [0 100]; > cfg.colorbar = 'yes'; > figure > ft_topoplotTFR(cfg, freq_continuous) > title('delta power prenitrite', 'FontSize', 36, 'FontName', 'Arial') > > with freq_continuous being my time/frequency/channel data. > > I would be very grateful for any advice on this, and would be happy to supply more information if needed. > > Many thanks > Best wishes > Payashi > > **** > Dr Payashi Garry MB BChir FRCA > Specialty Registrar in Anaesthetics and BRC Research Fellow > Nuffield Department of Clinical Neurosciences > John Radcliffe Hospital > Oxford OX3 9DU > Tel: 01865 572878 > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jens.klinzing at uni-tuebingen.de Thu Jan 29 13:16:07 2015 From: jens.klinzing at uni-tuebingen.de (=?windows-1252?Q?=22Jens_Klinzing=2C_Universit=E4t_T=FCbingen?= =?windows-1252?Q?=22?=) Date: Thu, 29 Jan 2015 13:16:07 +0100 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> Message-ID: <54CA2487.9030108@uni-tuebingen.de> Hi Marieke, I had the impression that you are interested in the automatic low-pass filtering performed by ft_resampledata. If you don't specify cfg.resamplemethod = 'downsample', ft_resampledata will call the built-in matlab function 'resample' to do the job. This function automatically applies a low-pass filter before resampling. mathworks.com/help/signal/ref/resample.html "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." I couldn't find an explicit statement what the cutoff frequency of that filter would be, though. There are some forum entries on the web, but they don't give the answer either. Can someone help? All the best, Jens Am 23.01.2015 um 17:56 schrieb Schoffelen, J.M. (Jan Mathijs): > Marieke, > Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. > > JM > > > On Jan 23, 2015, at 2:39 PM, Eleanor Harding wrote: > >> Hi Marieke, >> >> A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, >> >> Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. >> >> Good luck, >> Ellie Harding >> >> >> >> Message: 5 >> Date: Thu, 22 Jan 2015 16:50:26 +0000 >> From: "Nieuwenhuijzen, M.E. van de (Marieke)" >> >> To: "fieldtrip at science.ru.nl" >> Subject: [FieldTrip] Low-pass frequency when downsampling using >> ft_resampledata >> Message-ID: >> >> Content-Type: text/plain; charset="iso-8859-1" >> >> Hi Fieldtrippers, >> >> I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? >> >> Best, >> Marieke >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: >> >> >> -- >> ------------------------------------------------------------------ >> Eleanor Harding >> PhD Student >> Max Planck Institute for Human Cognitive and Brain Sciences >> Stephanstraße 1A, 04103 Leipzig, Germany >> Phone: +49 341 9940-2268 >> Fax: +49 341 9940 2260 >> http://www.cbs.mpg.de/~harding >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From bioeng.yoosofzadeh at gmail.com Thu Jan 29 15:31:47 2015 From: bioeng.yoosofzadeh at gmail.com (Vahab Yousofzadeh) Date: Thu, 29 Jan 2015 14:31:47 +0000 Subject: [FieldTrip] PhD studentships related to MEG research at university of Ulster Message-ID: Dear All, On behalf of the University of Ulster’s Intelligent Systems Research Centre, I am helping to announce the following available PhD studentships related to MEG research: *http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=821&ri=3 * *http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=780&ri=3 * *http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=822&ri=3 * Please note that the application deadline is on the 27th Feb, and anyone interested should apply at http://www.compeng.ulster.ac.uk/rgs/guideForApplicants.php Best Regards, Vahab Youssofzadeh -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Butz at uni-duesseldorf.de Thu Jan 29 15:52:29 2015 From: Markus.Butz at uni-duesseldorf.de (Markus Butz) Date: Thu, 29 Jan 2015 15:52:29 +0100 Subject: [FieldTrip] PhD studentships related to MEG research at university of Ulster In-Reply-To: References: Message-ID: <7350b030a1772.54ca573d@uni-duesseldorf.de> Dear Vahab just saw your job add and thought you might also be interested in advertising this over the mailing list of www.megcommunity.org(http://www.megcommunity.org). This is a non-commercial website run by MEG researchers from different labs and countries. You can reach a couple of hundred of MEG researchers worldwide via our mailing list by now. Hope this helps and best wishes Markus PS: All the best for your MEG research and starting up the new MEG centre! Am 29.01.15 15:42 schrieb Vahab Yousofzadeh : > > > > > Dear All, > > > > On behalf of the University of Ulster’s Intelligent Systems Research Centre, I am helping to announce the following available PhD studentships related to MEG research: > > > > http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=821&ri=3 > > http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=780&ri=3 > > http://www.compeng.ulster.ac.uk/rgs/displayPhDProposal.php?id=822&ri=3 > > > > Please note that the application deadline is on the 27th Feb, and anyone interested should apply at > > http://www.compeng.ulster.ac.uk/rgs/guideForApplicants.php > > > > Best Regards, > > Vahab Youssofzadeh > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From widmann at uni-leipzig.de Thu Jan 29 17:19:47 2015 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Thu, 29 Jan 2015 17:19:47 +0100 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: <54CA2487.9030108@uni-tuebingen.de> References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> <54CA2487.9030108@uni-tuebingen.de> Message-ID: <3D8E568A-7E77-437C-93BA-03CA0639CE44@uni-leipzig.de> Dear Marieke and Jens, MATLAB resample sets the -6dB half-amplitude cutoff of the anti-aliasing filter to the new Nyquist frequency. This is quite common practice, however, for EEG/MEG data this is not recommended, as the remaining energy in the transition band above the cutoff/new Nyquist frequency can still introduce considerable aliasing artifacts. So indeed the current Fieldtrip implementation is problematic. In the attached Fig. 1 a frequency response plot as it would be applied when downsampling from 500 to 250 Hz. Even worse is that resample (and Fieldtrip) does not apply any padding of the signal before filtering (doc resample: "In its filtering process, resample assumes that the input sequence, x, is zero before and after the samples it is given. Thus, large deviations from zero at the endpoints of x can cause inaccuracies in y at its endpoints.“). This will introduce DC artifacts at the beginning and end of the data. In particular for epoched data this can result in quite massive distortions (see Fig. 2 in the attachment; filtered and downsampled series of ones; same filter as above; same problem as it was formerly observed in EEGLAB: https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=1017). I suggest submitting a bug report (please put me into cc). I think I can fix both problems but this will take some days. I would recommend not using the current implementation. Best, Andreas > Am 29.01.2015 um 13:16 schrieb Jens Klinzing, Universität Tübingen : > > Hi Marieke, > I had the impression that you are interested in the automatic low-pass filtering performed by ft_resampledata. > > If you don't specify cfg.resamplemethod = 'downsample', ft_resampledata will call the built-in matlab function 'resample' to do the job. This function automatically applies a low-pass filter before resampling. > > mathworks.com/help/signal/ref/resample.html > > "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." > > I couldn't find an explicit statement what the cutoff frequency of that filter would be, though. There are some forum entries on the web, but they don't give the answer either. > > Can someone help? > > All the best, > Jens > > Am 23.01.2015 um 17:56 schrieb Schoffelen, J.M. (Jan Mathijs): >> Marieke, >> Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. >> >> JM >> >> >> On Jan 23, 2015, at 2:39 PM, Eleanor Harding wrote: >> >>> Hi Marieke, >>> >>> A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, >>> >>> Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. >>> >>> Good luck, >>> Ellie Harding >>> >>> >>> >>> Message: 5 >>> Date: Thu, 22 Jan 2015 16:50:26 +0000 >>> From: "Nieuwenhuijzen, M.E. van de (Marieke)" >>> >>> To: "fieldtrip at science.ru.nl" >>> Subject: [FieldTrip] Low-pass frequency when downsampling using >>> ft_resampledata >>> Message-ID: >>> >>> Content-Type: text/plain; charset="iso-8859-1" >>> >>> Hi Fieldtrippers, >>> >>> I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? >>> >>> Best, >>> Marieke >>> -------------- next part -------------- >>> An HTML attachment was scrubbed... >>> URL: >>> >>> >>> -- >>> ------------------------------------------------------------------ >>> Eleanor Harding >>> PhD Student >>> Max Planck Institute for Human Cognitive and Brain Sciences >>> Stephanstraße 1A, 04103 Leipzig, Germany >>> Phone: +49 341 9940-2268 >>> Fax: +49 341 9940 2260 >>> http://www.cbs.mpg.de/~harding >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fig1_fresp.jpg Type: image/jpeg Size: 35336 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fig2_dcartifact.jpg Type: image/jpeg Size: 13995 bytes Desc: not available URL: From nico.weeger at googlemail.com Thu Jan 29 17:43:04 2015 From: nico.weeger at googlemail.com (Nico Weeger) Date: Thu, 29 Jan 2015 17:43:04 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: Hi Eelke, thank you very much for ur advice! Due to ur help I solved the problem using multiple trials and different frequencies. Thanks a lot! Best regards Nico 2015-01-28 12:24 GMT+01:00 Eelke Spaak : > Hi Nico, > > As for question (2), you probably first need to think about what > constitutes a "better" result. Using more tapers with dpss will always > result in more frequency smoothing. If your source signal is primarily > composed of pure sinusoids, and you interpret a spectrum as "better" > if it shows clearer peaks, then you will always get the "best" result > for the single-taper case. > > Multitapering allows optimal control over the amount of smoothing you > obtain in the frequency domain, which is more or less independent of > the amount of smoothing you obtain in the time domain (as opposed to > e.g. wavelets, where these are fundamentally linked). When dealing > with brain signals, you will often find that a certain stimulus might > induce e.g. a gamma response at 40-50 Hz in one subject and one trial, > while in another subject or another trial the same stimulus might > induce a 50-60 Hz response or so. Of course, in the average over > trials (and subjects), this heterogeneity (i.e., noise) will wash out, > but it will severely damage your statistical sensitivity. Therefore, > using multitapers to add smoothing can produce a much more consistent > result and therefore be "better" in the sense of actually > understanding the brain. > > As for your simulation, perhaps using filtered noise would be better > than sinusoids. Also, since multitapering benefits you most strongly > when taking variation over observations into account, you could > consider simulating different observations, each consisting of noise > filtered in a slightly different randomly chosen bandwidth, and > inspecting the resulting variation over observations in the spectra. > > Best, > Eelke > > On 27 January 2015 at 18:36, Max Cantor wrote: > > Hi Nico, > > > > I'm not sure about the second question, but as for the first question, > you > > can manually set the scales for ft_singleplotTFR using cfg.zlim. > > > > Hope that helps, > > > > Max > > > > On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger < > nico.weeger at googlemail.com> > > wrote: > >> > >> Hello FieldTrip community, > >> > >> > >> > >> I am new to FieldTrip and I try to simulate data to compare the > >> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > >> > >> Therefore I simulate Data manually using different latency, amplitude > and > >> frequency combinations using the following equation: > >> > >> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > >> > >> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > >> > >> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > >> > >> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > >> > >> sig = sig1+sig2+sig3+sig4; > >> > >> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > >> > >> > >> After using ft_frequanalysis (see the following cfgs) > >> > >> > >> Cfg Wavelet: > >> > >> cfg = []; > >> > >> cfg.output = 'pow'; > >> > >> cfg.channel = labels; > >> > >> cfg.method = 'wavelet'; > >> > >> cfg.width = 7; > >> > >> cfg.gwidth = 3; > >> > >> cfg.foilim = [1 70]; > >> > >> cfg.toi = 0:0.05:2; > >> > >> TFRwave = ft_freqanalysis(cfg, data_preproc); > >> > >> > >> > >> Cfg Hanning / Multitaper: > >> > >> cfg = []; > >> > >> cfg.output = 'pow'; > >> > >> cfg.channel = labels; > >> > >> cfg.method = 'mtmconvol' > >> > >> cfg.foi = 1:1:70 > >> > >> cfg.tapsmofrq = 0.2*cfg.foi; > >> > >> cfg.taper = 'dpss' / ‘hanning’; > >> > >> cfg.t_ftimwin = 4./cfg.foi; > >> > >> cfg.toi = 0:0.05:2; > >> > >> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > >> > >> > >> > >> > >> the data is plotted with ft_singleplotTFR (see cfg below) > >> > >> > >> cfg singleplot: > >> > >> cfg = []; > >> > >> cfg.maskstyle = 'saturation'; > >> > >> cfg.colorbar = 'yes'; > >> > >> cfg.layout = 'AC_Osc.lay'; > >> > >> ft_singleplotTFR(cfg, TFRwave); > >> > >> > >> Two problems occur. First, the power scale of wavelet and > >> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet > 0-~15*10^4). > >> > >> 1. How can I get the scale of all methods equal, or do I have to > >> change the Wavelet settings to get the right scale of the values? > >> > >> Second, the best result of Multitaper analysis is performed using only > one > >> Taper. The goal was to get a result, where the advantages and > disadvantages > >> of Multitaper analysis compared to the other methods can be seen. > >> > >> 2. How can I change the simulation so that more tapers show better > >> results than a single taper does? > >> > >> > >> Thank you for your time and help. > >> > >> > >> Regards, > >> > >> > >> > >> Nicolas Weeger > >> > >> Student of Master-Program Appied Research, > >> > >> University Ansbach, > >> > >> Germany > >> > >> > >> _______________________________________________ > >> fieldtrip mailing list > >> fieldtrip at donders.ru.nl > >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > > -- > > Max Cantor > > Lab Manager > > Computational Neurolinguistics Lab > > University of Michigan > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Thu Jan 29 19:31:24 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 29 Jan 2015 19:31:24 +0100 Subject: [FieldTrip] help with topoplot_TFR In-Reply-To: <1750B296-D38B-4912-B843-FFC5D0B5B1BC@ndcn.ox.ac.uk> References: <1750B296-D38B-4912-B843-FFC5D0B5B1BC@ndcn.ox.ac.uk> Message-ID: Hi Payashi, > I have computed the ratio per sample and called it ADR. It is a 14x1x480 matrix (channels x freq x time). good, so now you squeeze(ADR) in order to get the actual ‘chan_time’ representation. Then you introduce a new variable say tlk_ADR: tlk_ADR.avg =ADR; tlk_ADR.label = freq_ADR.label; tlk_ADR.dimord = freq_ADR.dimord; tlk_ADR.time = freq_ADR.time; tlk_ADR.elec = freq_ADR.elec; then you call all plotting functions that deal with time domain signals such as ft_multiplotER, ft_singleplotER and ft_topoplotER. Not …TFR. So your code would look like; > cfg=[]; > cfg.xlim = [3000 3200]; > cfg.colorbar = 'yes'; > figure > ft_topoplotER(cfg, tlk_ADR); good luck tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Jan 29 19:37:20 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 29 Jan 2015 18:37:20 +0000 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: <3D8E568A-7E77-437C-93BA-03CA0639CE44@uni-leipzig.de> References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> <54CA2487.9030108@uni-tuebingen.de> <3D8E568A-7E77-437C-93BA-03CA0639CE44@uni-leipzig.de> Message-ID: <38A19F94-055C-4B26-8DA6-BBB0CB393A35@fcdonders.ru.nl> Dear Andreas, Note that ft_resampledata supports the options demean and detrend. Also, as of release 9829 FT always explicitly removes the epoch-wise DC-offset prior to resampling (and adds it back if cfg.demean is ‘no’), which means that users that are not aware of the potential problem are partly protected against strong DC offsets. Our recommendation is furthermore not to detrend, because this may distort slow event-related components in a non-trivial way. Also, it may falsely introduce experimental effects at unexpected time points, e.g. in the baseline. If the user suspects that low-frequency energy in the signals may lead to funny edge behavior in the resampling step, I’d recommend either to highpassfilter the data prior to resampling, or to read in more data than needed, so that the edge effects end up in non-interesting parts of the data. I think that a more aggressive lowpassfilter will be a useful option to build in. Best, Jan-Mathijs On Jan 29, 2015, at 5:19 PM, Andreas Widmann > wrote: Dear Marieke and Jens, MATLAB resample sets the -6dB half-amplitude cutoff of the anti-aliasing filter to the new Nyquist frequency. This is quite common practice, however, for EEG/MEG data this is not recommended, as the remaining energy in the transition band above the cutoff/new Nyquist frequency can still introduce considerable aliasing artifacts. So indeed the current Fieldtrip implementation is problematic. In the attached Fig. 1 a frequency response plot as it would be applied when downsampling from 500 to 250 Hz. Even worse is that resample (and Fieldtrip) does not apply any padding of the signal before filtering (doc resample: "In its filtering process, resample assumes that the input sequence, x, is zero before and after the samples it is given. Thus, large deviations from zero at the endpoints of x can cause inaccuracies in y at its endpoints.“). This will introduce DC artifacts at the beginning and end of the data. In particular for epoched data this can result in quite massive distortions (see Fig. 2 in the attachment; filtered and downsampled series of ones; same filter as above; same problem as it was formerly observed in EEGLAB: https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=1017). I suggest submitting a bug report (please put me into cc). I think I can fix both problems but this will take some days. I would recommend not using the current implementation. Best, Andreas Am 29.01.2015 um 13:16 schrieb Jens Klinzing, Universität Tübingen >: Hi Marieke, I had the impression that you are interested in the automatic low-pass filtering performed by ft_resampledata. If you don't specify cfg.resamplemethod = 'downsample', ft_resampledata will call the built-in matlab function 'resample' to do the job. This function automatically applies a low-pass filter before resampling. mathworks.com/help/signal/ref/resample.html "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." I couldn't find an explicit statement what the cutoff frequency of that filter would be, though. There are some forum entries on the web, but they don't give the answer either. Can someone help? All the best, Jens Am 23.01.2015 um 17:56 schrieb Schoffelen, J.M. (Jan Mathijs): Marieke, Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. JM On Jan 23, 2015, at 2:39 PM, Eleanor Harding > wrote: Hi Marieke, A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. Good luck, Ellie Harding Message: 5 Date: Thu, 22 Jan 2015 16:50:26 +0000 From: "Nieuwenhuijzen, M.E. van de (Marieke)" > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata Message-ID: > Content-Type: text/plain; charset="iso-8859-1" Hi Fieldtrippers, I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: -- ------------------------------------------------------------------ Eleanor Harding PhD Student Max Planck Institute for Human Cognitive and Brain Sciences Stephanstraße 1A, 04103 Leipzig, Germany Phone: +49 341 9940-2268 Fax: +49 341 9940 2260 http://www.cbs.mpg.de/~harding _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjordanov at besa.de Fri Jan 30 11:10:15 2015 From: tjordanov at besa.de (tjordanov at besa.de) Date: Fri, 30 Jan 2015 11:10:15 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: <001601d03c74$f1b617e0$d52247a0$@de> Hi Eelke, I found your answer very interesting. If I understand you correctly, the advantage of the multitaper method is that it smoothes in the frequency domain independently of the smoothing in the time domain. Then it should be equivalent (or similar) with the following procedure: 1) Calculate single trial single taper decomposition of the signal. 2) Choose an appropriate 1D Gauss function (note that it is important to be 1D else it would smooth in both - time and frequency) 3) Apply the selected Gauss function on the decomposed signal only in the frequency direction (not in time in order to avoid temporal smearing). Do this for all trials and all time points. 4) Calculate the average over the trials. In this procedure the choice of the Gaussian would determine the amount of smearing in the frequency domain. Is this so, or I misunderstood something? Best, Todor -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak Sent: Mittwoch, 28. Januar 2015 12:24 To: FieldTrip discussion list Subject: Re: [FieldTrip] Simulate data to compare methods Hi Nico, As for question (2), you probably first need to think about what constitutes a "better" result. Using more tapers with dpss will always result in more frequency smoothing. If your source signal is primarily composed of pure sinusoids, and you interpret a spectrum as "better" if it shows clearer peaks, then you will always get the "best" result for the single-taper case. Multitapering allows optimal control over the amount of smoothing you obtain in the frequency domain, which is more or less independent of the amount of smoothing you obtain in the time domain (as opposed to e.g. wavelets, where these are fundamentally linked). When dealing with brain signals, you will often find that a certain stimulus might induce e.g. a gamma response at 40-50 Hz in one subject and one trial, while in another subject or another trial the same stimulus might induce a 50-60 Hz response or so. Of course, in the average over trials (and subjects), this heterogeneity (i.e., noise) will wash out, but it will severely damage your statistical sensitivity. Therefore, using multitapers to add smoothing can produce a much more consistent result and therefore be "better" in the sense of actually understanding the brain. As for your simulation, perhaps using filtered noise would be better than sinusoids. Also, since multitapering benefits you most strongly when taking variation over observations into account, you could consider simulating different observations, each consisting of noise filtered in a slightly different randomly chosen bandwidth, and inspecting the resulting variation over observations in the spectra. Best, Eelke On 27 January 2015 at 18:36, Max Cantor wrote: > Hi Nico, > > I'm not sure about the second question, but as for the first question, > you can manually set the scales for ft_singleplotTFR using cfg.zlim. > > Hope that helps, > > Max > > On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > > wrote: >> >> Hello FieldTrip community, >> >> >> >> I am new to FieldTrip and I try to simulate data to compare the >> ft_frequanalysis methods Hanning, Multitaper and Wavelet. >> >> Therefore I simulate Data manually using different latency, amplitude >> and frequency combinations using the following equation: >> >> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); >> >> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); >> >> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); >> >> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); >> >> sig = sig1+sig2+sig3+sig4; >> >> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; >> >> >> After using ft_frequanalysis (see the following cfgs) >> >> >> Cfg Wavelet: >> >> cfg = []; >> >> cfg.output = 'pow'; >> >> cfg.channel = labels; >> >> cfg.method = 'wavelet'; >> >> cfg.width = 7; >> >> cfg.gwidth = 3; >> >> cfg.foilim = [1 70]; >> >> cfg.toi = 0:0.05:2; >> >> TFRwave = ft_freqanalysis(cfg, data_preproc); >> >> >> >> Cfg Hanning / Multitaper: >> >> cfg = []; >> >> cfg.output = 'pow'; >> >> cfg.channel = labels; >> >> cfg.method = 'mtmconvol' >> >> cfg.foi = 1:1:70 >> >> cfg.tapsmofrq = 0.2*cfg.foi; >> >> cfg.taper = 'dpss' / ‘hanning’; >> >> cfg.t_ftimwin = 4./cfg.foi; >> >> cfg.toi = 0:0.05:2; >> >> TFRmult1 = ft_freqanalysis(cfg, data_preproc); >> >> >> >> >> the data is plotted with ft_singleplotTFR (see cfg below) >> >> >> cfg singleplot: >> >> cfg = []; >> >> cfg.maskstyle = 'saturation'; >> >> cfg.colorbar = 'yes'; >> >> cfg.layout = 'AC_Osc.lay'; >> >> ft_singleplotTFR(cfg, TFRwave); >> >> >> Two problems occur. First, the power scale of wavelet and >> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). >> >> 1. How can I get the scale of all methods equal, or do I have to >> change the Wavelet settings to get the right scale of the values? >> >> Second, the best result of Multitaper analysis is performed using >> only one Taper. The goal was to get a result, where the advantages >> and disadvantages of Multitaper analysis compared to the other methods can be seen. >> >> 2. How can I change the simulation so that more tapers show better >> results than a single taper does? >> >> >> Thank you for your time and help. >> >> >> Regards, >> >> >> >> Nicolas Weeger >> >> Student of Master-Program Appied Research, >> >> University Ansbach, >> >> Germany >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Max Cantor > Lab Manager > Computational Neurolinguistics Lab > University of Michigan _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From eelke.spaak at donders.ru.nl Fri Jan 30 11:51:37 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Fri, 30 Jan 2015 11:51:37 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: Hi Todor, Although your procedure would also yield smoothing in the frequency domain which is independent from that in the time domain, it is not at all equivalent to using multitapers! The tapers in the discrete prolate spheroidal sequence (dpss, == multitaper in fieldtrip) are pairwise orthogonal, hence their estimates are independent from one another. This will result in there being more information extracted from the signal than if you used a single taper and then apply Gaussian smoothing over frequencies. You could have a look at https://en.wikipedia.org/wiki/Multitaper which gives quite a decent overview of multitapering. Or for the full details, refer to the original paper by David Thompson: http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 Best. Eelke On 30 January 2015 at 11:10, tjordanov at besa.de wrote: > Hi Eelke, > > I found your answer very interesting. If I understand you correctly, the advantage of the multitaper method is that it smoothes in the frequency domain independently of the smoothing in the time domain. Then it should be equivalent (or similar) with the following procedure: > 1) Calculate single trial single taper decomposition of the signal. > 2) Choose an appropriate 1D Gauss function (note that it is important to be 1D else it would smooth in both - time and frequency) > 3) Apply the selected Gauss function on the decomposed signal only in the frequency direction (not in time in order to avoid temporal smearing). Do this for all trials and all time points. > 4) Calculate the average over the trials. > In this procedure the choice of the Gaussian would determine the amount of smearing in the frequency domain. > > Is this so, or I misunderstood something? > > Best, > Todor > > > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > Sent: Mittwoch, 28. Januar 2015 12:24 > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Nico, > > As for question (2), you probably first need to think about what constitutes a "better" result. Using more tapers with dpss will always result in more frequency smoothing. If your source signal is primarily composed of pure sinusoids, and you interpret a spectrum as "better" > if it shows clearer peaks, then you will always get the "best" result for the single-taper case. > > Multitapering allows optimal control over the amount of smoothing you obtain in the frequency domain, which is more or less independent of the amount of smoothing you obtain in the time domain (as opposed to e.g. wavelets, where these are fundamentally linked). When dealing with brain signals, you will often find that a certain stimulus might induce e.g. a gamma response at 40-50 Hz in one subject and one trial, while in another subject or another trial the same stimulus might induce a 50-60 Hz response or so. Of course, in the average over trials (and subjects), this heterogeneity (i.e., noise) will wash out, but it will severely damage your statistical sensitivity. Therefore, using multitapers to add smoothing can produce a much more consistent result and therefore be "better" in the sense of actually understanding the brain. > > As for your simulation, perhaps using filtered noise would be better than sinusoids. Also, since multitapering benefits you most strongly when taking variation over observations into account, you could consider simulating different observations, each consisting of noise filtered in a slightly different randomly chosen bandwidth, and inspecting the resulting variation over observations in the spectra. > > Best, > Eelke > > On 27 January 2015 at 18:36, Max Cantor wrote: >> Hi Nico, >> >> I'm not sure about the second question, but as for the first question, >> you can manually set the scales for ft_singleplotTFR using cfg.zlim. >> >> Hope that helps, >> >> Max >> >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger >> >> wrote: >>> >>> Hello FieldTrip community, >>> >>> >>> >>> I am new to FieldTrip and I try to simulate data to compare the >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. >>> >>> Therefore I simulate Data manually using different latency, amplitude >>> and frequency combinations using the following equation: >>> >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); >>> >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); >>> >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); >>> >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); >>> >>> sig = sig1+sig2+sig3+sig4; >>> >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; >>> >>> >>> After using ft_frequanalysis (see the following cfgs) >>> >>> >>> Cfg Wavelet: >>> >>> cfg = []; >>> >>> cfg.output = 'pow'; >>> >>> cfg.channel = labels; >>> >>> cfg.method = 'wavelet'; >>> >>> cfg.width = 7; >>> >>> cfg.gwidth = 3; >>> >>> cfg.foilim = [1 70]; >>> >>> cfg.toi = 0:0.05:2; >>> >>> TFRwave = ft_freqanalysis(cfg, data_preproc); >>> >>> >>> >>> Cfg Hanning / Multitaper: >>> >>> cfg = []; >>> >>> cfg.output = 'pow'; >>> >>> cfg.channel = labels; >>> >>> cfg.method = 'mtmconvol' >>> >>> cfg.foi = 1:1:70 >>> >>> cfg.tapsmofrq = 0.2*cfg.foi; >>> >>> cfg.taper = 'dpss' / ‘hanning’; >>> >>> cfg.t_ftimwin = 4./cfg.foi; >>> >>> cfg.toi = 0:0.05:2; >>> >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); >>> >>> >>> >>> >>> the data is plotted with ft_singleplotTFR (see cfg below) >>> >>> >>> cfg singleplot: >>> >>> cfg = []; >>> >>> cfg.maskstyle = 'saturation'; >>> >>> cfg.colorbar = 'yes'; >>> >>> cfg.layout = 'AC_Osc.lay'; >>> >>> ft_singleplotTFR(cfg, TFRwave); >>> >>> >>> Two problems occur. First, the power scale of wavelet and >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0-~15*10^4). >>> >>> 1. How can I get the scale of all methods equal, or do I have to >>> change the Wavelet settings to get the right scale of the values? >>> >>> Second, the best result of Multitaper analysis is performed using >>> only one Taper. The goal was to get a result, where the advantages >>> and disadvantages of Multitaper analysis compared to the other methods can be seen. >>> >>> 2. How can I change the simulation so that more tapers show better >>> results than a single taper does? >>> >>> >>> Thank you for your time and help. >>> >>> >>> Regards, >>> >>> >>> >>> Nicolas Weeger >>> >>> Student of Master-Program Appied Research, >>> >>> University Ansbach, >>> >>> Germany >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> >> -- >> Max Cantor >> Lab Manager >> Computational Neurolinguistics Lab >> University of Michigan > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jorn at artinis.com Fri Jan 30 13:34:16 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Fri, 30 Jan 2015 13:34:16 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: References: Message-ID: <002c01d03c89$0ff98020$2fec8060$@artinis.com> Hi Todor, maybe this matlab function helps illustrating what dpss multitapers are, and will thus clarify what makes them so powerful compared to other techniques: https://www.dropbox.com/s/0uifk9l8rb6m5vl/Tapering.m?dl=0 (go to example 5) Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Eelke Spaak > Sent: Friday, January 30, 2015 11:52 AM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Todor, > > Although your procedure would also yield smoothing in the frequency > domain which is independent from that in the time domain, it is not at all > equivalent to using multitapers! > > The tapers in the discrete prolate spheroidal sequence (dpss, == multitaper > in fieldtrip) are pairwise orthogonal, hence their estimates are independent > from one another. This will result in there being more information extracted > from the signal than if you used a single taper and then apply Gaussian > smoothing over frequencies. You could have a look at > https://en.wikipedia.org/wiki/Multitaper which gives quite a decent > overview of multitapering. Or for the full details, refer to the original paper > by David Thompson: > http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 > > Best. > Eelke > > On 30 January 2015 at 11:10, tjordanov at besa.de > wrote: > > Hi Eelke, > > > > I found your answer very interesting. If I understand you correctly, the > advantage of the multitaper method is that it smoothes in the frequency > domain independently of the smoothing in the time domain. Then it should > be equivalent (or similar) with the following procedure: > > 1) Calculate single trial single taper decomposition of the signal. > > 2) Choose an appropriate 1D Gauss function (note that it is important > > to be 1D else it would smooth in both - time and frequency) > > 3) Apply the selected Gauss function on the decomposed signal only in the > frequency direction (not in time in order to avoid temporal smearing). Do this > for all trials and all time points. > > 4) Calculate the average over the trials. > > In this procedure the choice of the Gaussian would determine the amount > of smearing in the frequency domain. > > > > Is this so, or I misunderstood something? > > > > Best, > > Todor > > > > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > > Sent: Mittwoch, 28. Januar 2015 12:24 > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > Hi Nico, > > > > As for question (2), you probably first need to think about what constitutes > a "better" result. Using more tapers with dpss will always result in more > frequency smoothing. If your source signal is primarily composed of pure > sinusoids, and you interpret a spectrum as "better" > > if it shows clearer peaks, then you will always get the "best" result for the > single-taper case. > > > > Multitapering allows optimal control over the amount of smoothing you > obtain in the frequency domain, which is more or less independent of the > amount of smoothing you obtain in the time domain (as opposed to e.g. > wavelets, where these are fundamentally linked). When dealing with brain > signals, you will often find that a certain stimulus might induce e.g. a gamma > response at 40-50 Hz in one subject and one trial, while in another subject or > another trial the same stimulus might induce a 50-60 Hz response or so. Of > course, in the average over trials (and subjects), this heterogeneity (i.e., > noise) will wash out, but it will severely damage your statistical sensitivity. > Therefore, using multitapers to add smoothing can produce a much more > consistent result and therefore be "better" in the sense of actually > understanding the brain. > > > > As for your simulation, perhaps using filtered noise would be better than > sinusoids. Also, since multitapering benefits you most strongly when taking > variation over observations into account, you could consider simulating > different observations, each consisting of noise filtered in a slightly different > randomly chosen bandwidth, and inspecting the resulting variation over > observations in the spectra. > > > > Best, > > Eelke > > > > On 27 January 2015 at 18:36, Max Cantor wrote: > >> Hi Nico, > >> > >> I'm not sure about the second question, but as for the first > >> question, you can manually set the scales for ft_singleplotTFR using > cfg.zlim. > >> > >> Hope that helps, > >> > >> Max > >> > >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > >> > >> wrote: > >>> > >>> Hello FieldTrip community, > >>> > >>> > >>> > >>> I am new to FieldTrip and I try to simulate data to compare the > >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > >>> > >>> Therefore I simulate Data manually using different latency, > >>> amplitude and frequency combinations using the following equation: > >>> > >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > >>> > >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > >>> > >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > >>> > >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > >>> > >>> sig = sig1+sig2+sig3+sig4; > >>> > >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > >>> > >>> > >>> After using ft_frequanalysis (see the following cfgs) > >>> > >>> > >>> Cfg Wavelet: > >>> > >>> cfg = []; > >>> > >>> cfg.output = 'pow'; > >>> > >>> cfg.channel = labels; > >>> > >>> cfg.method = 'wavelet'; > >>> > >>> cfg.width = 7; > >>> > >>> cfg.gwidth = 3; > >>> > >>> cfg.foilim = [1 70]; > >>> > >>> cfg.toi = 0:0.05:2; > >>> > >>> TFRwave = ft_freqanalysis(cfg, data_preproc); > >>> > >>> > >>> > >>> Cfg Hanning / Multitaper: > >>> > >>> cfg = []; > >>> > >>> cfg.output = 'pow'; > >>> > >>> cfg.channel = labels; > >>> > >>> cfg.method = 'mtmconvol' > >>> > >>> cfg.foi = 1:1:70 > >>> > >>> cfg.tapsmofrq = 0.2*cfg.foi; > >>> > >>> cfg.taper = 'dpss' / ‘hanning’; > >>> > >>> cfg.t_ftimwin = 4./cfg.foi; > >>> > >>> cfg.toi = 0:0.05:2; > >>> > >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > >>> > >>> > >>> > >>> > >>> the data is plotted with ft_singleplotTFR (see cfg below) > >>> > >>> > >>> cfg singleplot: > >>> > >>> cfg = []; > >>> > >>> cfg.maskstyle = 'saturation'; > >>> > >>> cfg.colorbar = 'yes'; > >>> > >>> cfg.layout = 'AC_Osc.lay'; > >>> > >>> ft_singleplotTFR(cfg, TFRwave); > >>> > >>> > >>> Two problems occur. First, the power scale of wavelet and > >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0- > ~15*10^4). > >>> > >>> 1. How can I get the scale of all methods equal, or do I have to > >>> change the Wavelet settings to get the right scale of the values? > >>> > >>> Second, the best result of Multitaper analysis is performed using > >>> only one Taper. The goal was to get a result, where the advantages > >>> and disadvantages of Multitaper analysis compared to the other > methods can be seen. > >>> > >>> 2. How can I change the simulation so that more tapers show better > >>> results than a single taper does? > >>> > >>> > >>> Thank you for your time and help. > >>> > >>> > >>> Regards, > >>> > >>> > >>> > >>> Nicolas Weeger > >>> > >>> Student of Master-Program Appied Research, > >>> > >>> University Ansbach, > >>> > >>> Germany > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> > >> > >> > >> -- > >> Max Cantor > >> Lab Manager > >> Computational Neurolinguistics Lab > >> University of Michigan > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From widmann at uni-leipzig.de Fri Jan 30 17:32:33 2015 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Fri, 30 Jan 2015 17:32:33 +0100 Subject: [FieldTrip] Low-pass frequency when downsampling using ft_resampledata (Nieuwenhuijzen, M.E. van de (Marieke)) In-Reply-To: <38A19F94-055C-4B26-8DA6-BBB0CB393A35@fcdonders.ru.nl> References: <1608329006.4466.1422020377153.JavaMail.root@zimbra> <54CA2487.9030108@uni-tuebingen.de> <3D8E568A-7E77-437C-93BA-03CA0639CE44@uni-leipzig.de> <38A19F94-055C-4B26-8DA6-BBB0CB393A35@fcdonders.ru.nl> Message-ID: <32D98DDD-7D51-4306-BF3A-9F46E77FA948@uni-leipzig.de> Dear Jan-Mathijs, unfortunately demeaning (or detrending, or moderate highpass filtering) will not completely prevent DC artifacts. Even small offsets at the beginning or end of the signal can lead to noticable distortions. I would suggest padding the data with DC constants at both ends. This is to my knowledge the easiest way to minimize DC artifacts very effectively. > I think that a more aggressive lowpassfilter will be a useful option to build in. This will be the more complicated part as the anti-aliasing filter is applied to the up-sampled signal in case of non-integer ratios of old to new sampling rate. If you file a bug report I can try to fix. Best, Andreas > Am 29.01.2015 um 19:37 schrieb Schoffelen, J.M. (Jan Mathijs) : > > Dear Andreas, > > Note that ft_resampledata supports the options demean and detrend. Also, as of release 9829 FT always explicitly removes the epoch-wise DC-offset prior to resampling (and adds it back if cfg.demean is ‘no’), which means that users that are not aware of the potential problem are partly protected against strong DC offsets. Our recommendation is furthermore not to detrend, because this may distort slow event-related components in a non-trivial way. Also, it may falsely introduce experimental effects at unexpected time points, e.g. in the baseline. > If the user suspects that low-frequency energy in the signals may lead to funny edge behavior in the resampling step, I’d recommend either to highpassfilter the data prior to resampling, or to read in more data than needed, so that the edge effects end up in non-interesting parts of the data. > I think that a more aggressive lowpassfilter will be a useful option to build in. > > Best, > Jan-Mathijs > > > On Jan 29, 2015, at 5:19 PM, Andreas Widmann wrote: > >> Dear Marieke and Jens, >> >> MATLAB resample sets the -6dB half-amplitude cutoff of the anti-aliasing filter to the new Nyquist frequency. This is quite common practice, however, for EEG/MEG data this is not recommended, as the remaining energy in the transition band above the cutoff/new Nyquist frequency can still introduce considerable aliasing artifacts. So indeed the current Fieldtrip implementation is problematic. In the attached Fig. 1 a frequency response plot as it would be applied when downsampling from 500 to 250 Hz. >> >> Even worse is that resample (and Fieldtrip) does not apply any padding of the signal before filtering (doc resample: "In its filtering process, resample assumes that the input sequence, x, is zero before and after the samples it is given. Thus, large deviations from zero at the endpoints of x can cause inaccuracies in y at its endpoints.“). This will introduce DC artifacts at the beginning and end of the data. In particular for epoched data this can result in quite massive distortions (see Fig. 2 in the attachment; filtered and downsampled series of ones; same filter as above; same problem as it was formerly observed in EEGLAB: https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=1017). >> >> I suggest submitting a bug report (please put me into cc). I think I can fix both problems but this will take some days. I would recommend not using the current implementation. >> >> Best, >> Andreas >> >>> Am 29.01.2015 um 13:16 schrieb Jens Klinzing, Universität Tübingen : >>> >>> Hi Marieke, >>> I had the impression that you are interested in the automatic low-pass filtering performed by ft_resampledata. >>> >>> If you don't specify cfg.resamplemethod = 'downsample', ft_resampledata will call the built-in matlab function 'resample' to do the job. This function automatically applies a low-pass filter before resampling. >>> >>> mathworks.com/help/signal/ref/resample.html >>> >>> "resample applies an anti-aliasing (lowpass) FIR filter to x during the resampling process. It designs the filter using firls with a Kaiser window." >>> >>> I couldn't find an explicit statement what the cutoff frequency of that filter would be, though. There are some forum entries on the web, but they don't give the answer either. >>> >>> Can someone help? >>> >>> All the best, >>> Jens >>> >>> Am 23.01.2015 um 17:56 schrieb Schoffelen, J.M. (Jan Mathijs): >>>> Marieke, >>>> Have you considered to generate a spectrum of your downsampled signal (up to Nyquist frequency) and check the low-pass cutoff there? I guess it will be easily visible. >>>> >>>> JM >>>> >>>> >>>> On Jan 23, 2015, at 2:39 PM, Eleanor Harding wrote: >>>> >>>>> Hi Marieke, >>>>> >>>>> A rule of thumb for downsampling is to low-pass filter at 1/3 of your desired sampling rate, so, for you that would be 100 Hz. But of course you shouldn't make the filter cutoff too close to what you are looking for in your data. Below is a helpful publication, >>>>> >>>>> Widmann, A., Schröger, E., & Maess, B. (in press). Digital filter design for electrophysiological data - a practical approach. Journal of Neuroscience Methods. >>>>> >>>>> Good luck, >>>>> Ellie Harding >>>>> >>>>> >>>>> >>>>> Message: 5 >>>>> Date: Thu, 22 Jan 2015 16:50:26 +0000 >>>>> From: "Nieuwenhuijzen, M.E. van de (Marieke)" >>>>> >>>>> To: "fieldtrip at science.ru.nl" >>>>> Subject: [FieldTrip] Low-pass frequency when downsampling using >>>>> ft_resampledata >>>>> Message-ID: >>>>> >>>>> Content-Type: text/plain; charset="iso-8859-1" >>>>> >>>>> Hi Fieldtrippers, >>>>> >>>>> I have a small question about ft_resampledata. I have ECoG data that was measured with a sampling frequency of 1000 Hz, which I downsample to 300 Hz. >From what I understand, to avoid aliasing, this function applies a low-pass filter to the data before downsampling. How can I determine what the low-pass frequency of that filter would be? >>>>> >>>>> Best, >>>>> Marieke >>>>> -------------- next part -------------- >>>>> An HTML attachment was scrubbed... >>>>> URL: >>>>> >>>>> >>>>> -- >>>>> ------------------------------------------------------------------ >>>>> Eleanor Harding >>>>> PhD Student >>>>> Max Planck Institute for Human Cognitive and Brain Sciences >>>>> Stephanstraße 1A, 04103 Leipzig, Germany >>>>> Phone: +49 341 9940-2268 >>>>> Fax: +49 341 9940 2260 >>>>> http://www.cbs.mpg.de/~harding >>>>> >>>>> >>>>> _______________________________________________ >>>>> fieldtrip mailing list >>>>> fieldtrip at donders.ru.nl >>>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From tjordanov at besa.de Fri Jan 30 17:37:18 2015 From: tjordanov at besa.de (tjordanov at besa.de) Date: Fri, 30 Jan 2015 17:37:18 +0100 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: <002c01d03c89$0ff98020$2fec8060$@artinis.com> References: <002c01d03c89$0ff98020$2fec8060$@artinis.com> Message-ID: <000001d03cab$039169c0$0ab43d40$@de> Hi Eelke, hi Jörn, thank you for your elaborate answers and for the script - it is very informative and useful. I am in some extent familiar with the theory behind multitapering and I am also convinced that it has very good theoretical properties. However, let us take a look at the application. I simulated 200 trials data with jitter in the frequency. You can find the frequency profile of the trials as attachment ("FrequenciesForSimulation.png"). There are 67 trials with central frequency 34 Hz (variation between 32 and 36 Hz), 67 trials with central frequency 50 Hz (48 to 52 Hz) and 66 trials with central frequency 66 Hz (64 to 68 Hz). I performed multitaper analysis with 1, 2 and 3 tapers (see results "Multitaper1taper.png", "Multitaper2tapers.png", "Multitaper3tapers.png"). As we can see from the results only the decomposition with one taper detected correctly the three frequencies, all other two methods (with 2 and 3 tapers) just distorted (smoothed) the first result. I can see that such kind of smoothing is good for the statistical power between subjects but it does not prove the advantage of using multiple tapers compared to using just single taper. What do you think? Best, Todor -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Jörn M. Horschig Sent: Freitag, 30. Januar 2015 13:34 To: 'FieldTrip discussion list' Subject: Re: [FieldTrip] Simulate data to compare methods Hi Todor, maybe this matlab function helps illustrating what dpss multitapers are, and will thus clarify what makes them so powerful compared to other techniques: https://www.dropbox.com/s/0uifk9l8rb6m5vl/Tapering.m?dl=0 (go to example 5) Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Eelke Spaak > Sent: Friday, January 30, 2015 11:52 AM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Simulate data to compare methods > > Hi Todor, > > Although your procedure would also yield smoothing in the frequency > domain which is independent from that in the time domain, it is not at > all equivalent to using multitapers! > > The tapers in the discrete prolate spheroidal sequence (dpss, == > multitaper in fieldtrip) are pairwise orthogonal, hence their > estimates are independent from one another. This will result in there > being more information extracted from the signal than if you used a > single taper and then apply Gaussian smoothing over frequencies. You > could have a look at https://en.wikipedia.org/wiki/Multitaper which > gives quite a decent overview of multitapering. Or for the full > details, refer to the original paper by David Thompson: > http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 > > Best. > Eelke > > On 30 January 2015 at 11:10, tjordanov at besa.de > wrote: > > Hi Eelke, > > > > I found your answer very interesting. If I understand you correctly, > > the > advantage of the multitaper method is that it smoothes in the > frequency domain independently of the smoothing in the time domain. > Then it should be equivalent (or similar) with the following procedure: > > 1) Calculate single trial single taper decomposition of the signal. > > 2) Choose an appropriate 1D Gauss function (note that it is > > important to be 1D else it would smooth in both - time and > > frequency) > > 3) Apply the selected Gauss function on the decomposed signal only > > in the > frequency direction (not in time in order to avoid temporal smearing). > Do this for all trials and all time points. > > 4) Calculate the average over the trials. > > In this procedure the choice of the Gaussian would determine the > > amount > of smearing in the frequency domain. > > > > Is this so, or I misunderstood something? > > > > Best, > > Todor > > > > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl > > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > > Sent: Mittwoch, 28. Januar 2015 12:24 > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > Hi Nico, > > > > As for question (2), you probably first need to think about what > > constitutes > a "better" result. Using more tapers with dpss will always result in > more frequency smoothing. If your source signal is primarily composed > of pure sinusoids, and you interpret a spectrum as "better" > > if it shows clearer peaks, then you will always get the "best" > > result for the > single-taper case. > > > > Multitapering allows optimal control over the amount of smoothing > > you > obtain in the frequency domain, which is more or less independent of > the amount of smoothing you obtain in the time domain (as opposed to e.g. > wavelets, where these are fundamentally linked). When dealing with > brain signals, you will often find that a certain stimulus might > induce e.g. a gamma response at 40-50 Hz in one subject and one trial, > while in another subject or another trial the same stimulus might > induce a 50-60 Hz response or so. Of course, in the average over > trials (and subjects), this heterogeneity (i.e., > noise) will wash out, but it will severely damage your statistical sensitivity. > Therefore, using multitapers to add smoothing can produce a much more > consistent result and therefore be "better" in the sense of actually > understanding the brain. > > > > As for your simulation, perhaps using filtered noise would be better > > than > sinusoids. Also, since multitapering benefits you most strongly when > taking variation over observations into account, you could consider > simulating different observations, each consisting of noise filtered > in a slightly different randomly chosen bandwidth, and inspecting the > resulting variation over observations in the spectra. > > > > Best, > > Eelke > > > > On 27 January 2015 at 18:36, Max Cantor wrote: > >> Hi Nico, > >> > >> I'm not sure about the second question, but as for the first > >> question, you can manually set the scales for ft_singleplotTFR > >> using > cfg.zlim. > >> > >> Hope that helps, > >> > >> Max > >> > >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > >> > >> wrote: > >>> > >>> Hello FieldTrip community, > >>> > >>> > >>> > >>> I am new to FieldTrip and I try to simulate data to compare the > >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > >>> > >>> Therefore I simulate Data manually using different latency, > >>> amplitude and frequency combinations using the following equation: > >>> > >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > >>> > >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > >>> > >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > >>> > >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > >>> > >>> sig = sig1+sig2+sig3+sig4; > >>> > >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = 60; > >>> > >>> > >>> After using ft_frequanalysis (see the following cfgs) > >>> > >>> > >>> Cfg Wavelet: > >>> > >>> cfg = []; > >>> > >>> cfg.output = 'pow'; > >>> > >>> cfg.channel = labels; > >>> > >>> cfg.method = 'wavelet'; > >>> > >>> cfg.width = 7; > >>> > >>> cfg.gwidth = 3; > >>> > >>> cfg.foilim = [1 70]; > >>> > >>> cfg.toi = 0:0.05:2; > >>> > >>> TFRwave = ft_freqanalysis(cfg, data_preproc); > >>> > >>> > >>> > >>> Cfg Hanning / Multitaper: > >>> > >>> cfg = []; > >>> > >>> cfg.output = 'pow'; > >>> > >>> cfg.channel = labels; > >>> > >>> cfg.method = 'mtmconvol' > >>> > >>> cfg.foi = 1:1:70 > >>> > >>> cfg.tapsmofrq = 0.2*cfg.foi; > >>> > >>> cfg.taper = 'dpss' / ‘hanning’; > >>> > >>> cfg.t_ftimwin = 4./cfg.foi; > >>> > >>> cfg.toi = 0:0.05:2; > >>> > >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > >>> > >>> > >>> > >>> > >>> the data is plotted with ft_singleplotTFR (see cfg below) > >>> > >>> > >>> cfg singleplot: > >>> > >>> cfg = []; > >>> > >>> cfg.maskstyle = 'saturation'; > >>> > >>> cfg.colorbar = 'yes'; > >>> > >>> cfg.layout = 'AC_Osc.lay'; > >>> > >>> ft_singleplotTFR(cfg, TFRwave); > >>> > >>> > >>> Two problems occur. First, the power scale of wavelet and > >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet 0- > ~15*10^4). > >>> > >>> 1. How can I get the scale of all methods equal, or do I have to > >>> change the Wavelet settings to get the right scale of the values? > >>> > >>> Second, the best result of Multitaper analysis is performed using > >>> only one Taper. The goal was to get a result, where the advantages > >>> and disadvantages of Multitaper analysis compared to the other > methods can be seen. > >>> > >>> 2. How can I change the simulation so that more tapers show better > >>> results than a single taper does? > >>> > >>> > >>> Thank you for your time and help. > >>> > >>> > >>> Regards, > >>> > >>> > >>> > >>> Nicolas Weeger > >>> > >>> Student of Master-Program Appied Research, > >>> > >>> University Ansbach, > >>> > >>> Germany > >>> > >>> > >>> _______________________________________________ > >>> fieldtrip mailing list > >>> fieldtrip at donders.ru.nl > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >> > >> > >> > >> > >> -- > >> Max Cantor > >> Lab Manager > >> Computational Neurolinguistics Lab > >> University of Michigan > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: FrequenciesForSimulation.png Type: image/png Size: 6793 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Multitaper1taper.png Type: image/png Size: 6344 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Multitaper2tapers.png Type: image/png Size: 6301 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Multitaper3tapers.png Type: image/png Size: 6207 bytes Desc: not available URL: From tomh at kurage.nimh.nih.gov Fri Jan 30 18:40:51 2015 From: tomh at kurage.nimh.nih.gov (Tom Holroyd) Date: Fri, 30 Jan 2015 12:40:51 -0500 Subject: [FieldTrip] Simulate data to compare methods In-Reply-To: <002c01d03c89$0ff98020$2fec8060$@artinis.com> References: <002c01d03c89$0ff98020$2fec8060$@artinis.com> Message-ID: <20150130124051.7cf4d8a1@kurage.nimh.nih.gov> This is more about the Subject than about filtering, but may I say yay multitapering, and also yay Stockwell transforms. The latter are somewhat easier to understand than wavelets, and the phase is easier to extract. Also if you sum across time and inverse FFT the result is the usual power specrtum. Enough about that. Here is what I use to simulate MEG data. It's written in Python, but it's pretty easy to translate. It creates a 1/f^2 noise and then performs a fractional derivative to create a 1/f noise. The noise demonstrates growth of variance over time but is nevertheless normally distributed (mean is removed and s.d. = 1). It makes good surrogate MEG data, properly scaled. Adding a couple ECDs is beyond the scope of this post. :-) from numpy import zeros, array, arange from numpy.fft import fft, ifft from numpy.random import normal def meg_noise(l, n = .5): """Return l samples of 1/f noise.""" l2 = l / 2 d = zeros((l,), 'f') y = 0. for i in range(l): x = normal() # white y += x # brown d[i] = y # detrend d = d - arange(l) * (d[-1] - d[0]) / l # Fractional derivative of d. Regular derivative (n=1) adds 2 to the # exponent of the spectrum. Fractional derivative does a multiple # of that, so n = .5 adds 1 to the exponent. Thus for brown (-2) # you get pink (-1). w = array(range(l2) + range(-l2, 0)) # now w = [ 0, 1, ..., l2 - 1, -l2, -l2 + 1, ..., -1 ] jwn = pow((1j) * w, n) D = fft(d) D = D * jwn dd = ifft(D).real / l dd -= dd.mean() dd /= dd.std() return dd On Fri, 30 Jan 2015 13:34:16 +0100 "Jörn M. Horschig" wrote: > Hi Todor, > > maybe this matlab function helps illustrating what dpss multitapers > are, and will thus clarify what makes them so powerful compared to > other techniques: > https://www.dropbox.com/s/0uifk9l8rb6m5vl/Tapering.m?dl=0 (go to > example 5) > > Best, > Jörn > > > > -- > > Jörn M. Horschig, Software Engineer > Artinis Medical Systems | +31 481 350 980 > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > > bounces at science.ru.nl] On Behalf Of Eelke Spaak > > Sent: Friday, January 30, 2015 11:52 AM > > To: FieldTrip discussion list > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > Hi Todor, > > > > Although your procedure would also yield smoothing in the frequency > > domain which is independent from that in the time domain, it is not > > at all equivalent to using multitapers! > > > > The tapers in the discrete prolate spheroidal sequence (dpss, == > > multitaper in fieldtrip) are pairwise orthogonal, hence their > > estimates are independent from one another. This will result in > > there being more information extracted from the signal than if you > > used a single taper and then apply Gaussian smoothing over > > frequencies. You could have a look at > > https://en.wikipedia.org/wiki/Multitaper which gives quite a decent > > overview of multitapering. Or for the full details, refer to the > > original paper by David Thompson: > > http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1456701 > > > > Best. > > Eelke > > > > On 30 January 2015 at 11:10, tjordanov at besa.de > > wrote: > > > Hi Eelke, > > > > > > I found your answer very interesting. If I understand you > > > correctly, the > > advantage of the multitaper method is that it smoothes in the > > frequency domain independently of the smoothing in the time domain. > > Then it should be equivalent (or similar) with the following > > procedure: > > > 1) Calculate single trial single taper decomposition of the > > > signal. 2) Choose an appropriate 1D Gauss function (note that it > > > is important to be 1D else it would smooth in both - time and > > > frequency) 3) Apply the selected Gauss function on the decomposed > > > signal only in the > > frequency direction (not in time in order to avoid temporal > > smearing). Do this for all trials and all time points. > > > 4) Calculate the average over the trials. > > > In this procedure the choice of the Gaussian would determine the > > > amount > > of smearing in the frequency domain. > > > > > > Is this so, or I misunderstood something? > > > > > > Best, > > > Todor > > > > > > > > > -----Original Message----- > > > From: fieldtrip-bounces at science.ru.nl > > > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Eelke Spaak > > > Sent: Mittwoch, 28. Januar 2015 12:24 > > > To: FieldTrip discussion list > > > Subject: Re: [FieldTrip] Simulate data to compare methods > > > > > > Hi Nico, > > > > > > As for question (2), you probably first need to think about what > > > constitutes > > a "better" result. Using more tapers with dpss will always result > > in more frequency smoothing. If your source signal is primarily > > composed of pure sinusoids, and you interpret a spectrum as "better" > > > if it shows clearer peaks, then you will always get the "best" > > > result for the > > single-taper case. > > > > > > Multitapering allows optimal control over the amount of smoothing > > > you > > obtain in the frequency domain, which is more or less independent > > of the amount of smoothing you obtain in the time domain (as > > opposed to e.g. wavelets, where these are fundamentally linked). > > When dealing with brain signals, you will often find that a certain > > stimulus might induce e.g. a gamma response at 40-50 Hz in one > > subject and one trial, while in another subject or another trial > > the same stimulus might induce a 50-60 Hz response or so. Of > > course, in the average over trials (and subjects), this > > heterogeneity (i.e., noise) will wash out, but it will severely > > damage your statistical sensitivity. Therefore, using multitapers > > to add smoothing can produce a much more consistent result and > > therefore be "better" in the sense of actually understanding the > > brain. > > > > > > As for your simulation, perhaps using filtered noise would be > > > better than > > sinusoids. Also, since multitapering benefits you most strongly > > when taking variation over observations into account, you could > > consider simulating different observations, each consisting of > > noise filtered in a slightly different randomly chosen bandwidth, > > and inspecting the resulting variation over observations in the > > spectra. > > > > > > Best, > > > Eelke > > > > > > On 27 January 2015 at 18:36, Max Cantor wrote: > > >> Hi Nico, > > >> > > >> I'm not sure about the second question, but as for the first > > >> question, you can manually set the scales for ft_singleplotTFR > > >> using > > cfg.zlim. > > >> > > >> Hope that helps, > > >> > > >> Max > > >> > > >> On Tue, Jan 27, 2015 at 11:50 AM, Nico Weeger > > >> > > >> wrote: > > >>> > > >>> Hello FieldTrip community, > > >>> > > >>> > > >>> > > >>> I am new to FieldTrip and I try to simulate data to compare the > > >>> ft_frequanalysis methods Hanning, Multitaper and Wavelet. > > >>> > > >>> Therefore I simulate Data manually using different latency, > > >>> amplitude and frequency combinations using the following > > >>> equation: > > >>> > > >>> sig1 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f1*t); > > >>> > > >>> sig2 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f2*t); > > >>> > > >>> sig3 = exp(-(t-lat1).^2/(2*sigma1))*amp1.*sin(2*pi*f2*t); > > >>> > > >>> sig4 = exp(-(t-lat2).^2/(2*sigma2))*amp2.*sin(2*pi*f1*t); > > >>> > > >>> sig = sig1+sig2+sig3+sig4; > > >>> > > >>> where amp1=20; amp2 = 5; lat1= 1.7; lat2 = 2.3; f1 = 12; f2 = > > >>> 60; > > >>> > > >>> > > >>> After using ft_frequanalysis (see the following cfgs) > > >>> > > >>> > > >>> Cfg Wavelet: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.output = 'pow'; > > >>> > > >>> cfg.channel = labels; > > >>> > > >>> cfg.method = 'wavelet'; > > >>> > > >>> cfg.width = 7; > > >>> > > >>> cfg.gwidth = 3; > > >>> > > >>> cfg.foilim = [1 70]; > > >>> > > >>> cfg.toi = 0:0.05:2; > > >>> > > >>> TFRwave = ft_freqanalysis(cfg, data_preproc); > > >>> > > >>> > > >>> > > >>> Cfg Hanning / Multitaper: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.output = 'pow'; > > >>> > > >>> cfg.channel = labels; > > >>> > > >>> cfg.method = 'mtmconvol' > > >>> > > >>> cfg.foi = 1:1:70 > > >>> > > >>> cfg.tapsmofrq = 0.2*cfg.foi; > > >>> > > >>> cfg.taper = 'dpss' / ‘hanning’; > > >>> > > >>> cfg.t_ftimwin = 4./cfg.foi; > > >>> > > >>> cfg.toi = 0:0.05:2; > > >>> > > >>> TFRmult1 = ft_freqanalysis(cfg, data_preproc); > > >>> > > >>> > > >>> > > >>> > > >>> the data is plotted with ft_singleplotTFR (see cfg below) > > >>> > > >>> > > >>> cfg singleplot: > > >>> > > >>> cfg = []; > > >>> > > >>> cfg.maskstyle = 'saturation'; > > >>> > > >>> cfg.colorbar = 'yes'; > > >>> > > >>> cfg.layout = 'AC_Osc.lay'; > > >>> > > >>> ft_singleplotTFR(cfg, TFRwave); > > >>> > > >>> > > >>> Two problems occur. First, the power scale of wavelet and > > >>> Multitaper/Hanning differs extremely (Multi 0-~100 and Wavelet > > >>> 0- > > ~15*10^4). > > >>> > > >>> 1. How can I get the scale of all methods equal, or do I > > >>> have to change the Wavelet settings to get the right scale of > > >>> the values? > > >>> > > >>> Second, the best result of Multitaper analysis is performed > > >>> using only one Taper. The goal was to get a result, where the > > >>> advantages and disadvantages of Multitaper analysis compared to > > >>> the other > > methods can be seen. > > >>> > > >>> 2. How can I change the simulation so that more tapers > > >>> show better results than a single taper does? > > >>> > > >>> > > >>> Thank you for your time and help. > > >>> > > >>> > > >>> Regards, > > >>> > > >>> > > >>> > > >>> Nicolas Weeger > > >>> > > >>> Student of Master-Program Appied Research, > > >>> > > >>> University Ansbach, > > >>> > > >>> Germany > > >>> > > >>> > > >>> _______________________________________________ > > >>> fieldtrip mailing list > > >>> fieldtrip at donders.ru.nl > > >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > >> > > >> > > >> > > >> > > >> -- > > >> Max Cantor > > >> Lab Manager > > >> Computational Neurolinguistics Lab > > >> University of Michigan > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > > > _______________________________________________ > > > fieldtrip mailing list > > > fieldtrip at donders.ru.nl > > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Dr. Tom -- I would dance and be merry, Life would be a ding-a-derry, If I only had a brain. -- The Scarecrow -------------- next part -------------- A non-text attachment was scrubbed... Name: GrowthOfVariance.png Type: image/png Size: 28854 bytes Desc: not available URL: