From RICHARDS at mailbox.sc.edu Tue Aug 1 02:19:08 2017 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Tue, 1 Aug 2017 00:19:08 +0000 Subject: [FieldTrip] Postdoctoral position Message-ID: Post-doctoral Fellow in Infant Attention-University of South Carolina John Richards in the Department of Psychology at the University of South Carolina is seeking a qualified PhD for a postdoctoral position. The position involves research on the development of infant attention. The laboratory uses psychophysiological methods (heart rate, EEG, ERP) and MRI (structural) to examine the brain bases of the development of infant attention and recognition memory (http://jerlab.psych.sc.edu). Ideal candidates would have background in infant cognition, perception, or attention, and experience in cognitive neuroscience methods. The position would involve current ongoing projects, data analysis and write up of existing data, and collaborative development of new work. Writing experience and a publication record is required; and extensive writing and publication will be expected. At the candidate's interest, teaching experiences are available. The position is initially funded for one year, and subsequent years will be available depending on funding. The position is available now and candidates could start immediately. The salary is set at NIH standards accounting for years of postdoctoral experience. Review of applications will begin immediately and continue until the position is filled. Please send a letter of application, curriculum vitae, 1-2 writing samples, and the names and contact information of three references to richards-john at sc.edu, John E. Richards, Department of Psychology, University of South Carolina, Columbia SC 29028. You can find further information and submit your materials electronically at https://uscjobs.sc.edu/postings/17416 *********************************************** 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 ************************************************* From q.meng301 at gmail.com Tue Aug 1 08:42:30 2017 From: q.meng301 at gmail.com (Q Meng) Date: Tue, 1 Aug 2017 16:42:30 +1000 Subject: [FieldTrip] Questions about coherence statistics on source level data Message-ID: Dear list, I'm running source analysis using DICS on my MEG data following the cortical-muscular coherence tutorial and now would like to compare the source level coherence value between 2 conditions in a between subject design. I found some older posts on this topic from the discuss list ( https://mailman.science.ru.nl/pipermail/fieldtrip/2011-September/004279.html) (https://mailman.science.ru.nl/pipermail/fieldtrip/2016-March/010166.html). Following the instructions, I Z-transformed the coherence manually and specified cfg.statistic = 'ft_statfun_diff' and then did the cluster based non-parametric permutation test. However, I got an error message says *"Error using ft_statistics_montecarlo (line 242) could not determine the parametric critical value for clustering"* right after the statistical analysis started. Please see below a snippet of code: ... Z- transform coherence manually and creating 0-coherence data ... cfg = []; cfg.method = 'montecarlo'; % cfg.statistic = 'ft_statfun_depsamplesT'; cfg.statistic = 'ft_statfun_diff'; cfg.parameter = 'coh'; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.tail = 0; cfg.clustertail = 0; cfg.correcttail = 'alpha'; cfg.connectivity = VertConn; nsubj = 19; cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; % row of design matrix that contains unit variable (in this case: subjects) cfg.ivar = 2; % row of design matrix that contains independent variable (the conditions) stat = ft_sourcestatistics(cfg, data_meg_source_cohe_sentence_dics_parsing_B2_ICA{:}, data_meg_source_cohe_sentence_dics_parsing_B5_ICA{:}); Before this, I just used cfg.statistic = 'ft_statfun_depsamplesT' to compare the coherence value between two conditions and the program itself worked well. Does anyone have an idea where my problem could be or what I should do instead?3 Thanks for your help! Best, Qing -------------- next part -------------- An HTML attachment was scrubbed... URL: From amentink at chdr.nl Tue Aug 1 11:52:33 2017 From: amentink at chdr.nl (Alexander Mentink) Date: Tue, 1 Aug 2017 09:52:33 +0000 Subject: [FieldTrip] Time frequency analysis using evoked potentials Message-ID: Hi Fieldtrip community, I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) http://tinyurl.com/y7nerh8v The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. The code I use for hanning window is %%%%%%%%%%%%%%%%%% cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); % Visualization cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) %%%%%%%%%%%%%%%%%% And for wavelet transform is %%%%%%%%%%%%%%%%%% cfg = []; cfg.channel = 'Cz'; cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.5:30; cfg.toi = -0.5:0.05:1; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'relative'; % OR absolute cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.channel = 'Cz'; figure ft_singleplotTFR(cfg, TFRwave); %%%%%%%%%%%%%%%%%% I have tried the tutorials online, but this doesn't give me any better results... Does anyone know what I am doing wrong? Thanks many times! Best regards, Alex (Master student Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: [Twitter] [LinkedIn] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: imaged4db2c.PNG Type: image/png Size: 696 bytes Desc: imaged4db2c.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: imagecccaa4.PNG Type: image/png Size: 648 bytes Desc: imagecccaa4.PNG URL: From julian.keil at gmail.com Tue Aug 1 12:22:05 2017 From: julian.keil at gmail.com (Julian Keil) Date: Tue, 1 Aug 2017 12:22:05 +0200 Subject: [FieldTrip] Time frequency analysis using evoked potentials In-Reply-To: References: Message-ID: <54F7EE1C-5619-4CC6-83CF-2AEF59D01D48@gmail.com> Hi Alex, just a very basic thought: Using a fixed zlim of [0 1] does not really make sense when using relative change (or absolute) baseline, as you could very well have values below zero post stimulus. Also, when I compare your TFR Hanning (with absolute baseline) to the TFR Wavelet (with absolute baseline), they don't look too different, just badly scaled. Maybe you can play around with the zlim of the singleplot to get a better idea of what is happening here. Also, I wouldn't expect slightly different results from the wavelet vs. the mtmconvol as you are using different settings (e.g. 3 cycles width in the mtmconvol vs. 7 cycles in the wavelet). Good luck, Julian Am 01.08.2017 um 11:52 schrieb Alexander Mentink: > Hi Fieldtrip community, > > I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. > > Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) > > http://tinyurl.com/y7nerh8v > > The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. > > The code I use for hanning window is > %%%%%%%%%%%%%%%%%% > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'Cz'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 1:0.025:30; % OR 4:0.025:30 > cfg.t_ftimwin = 3./cfg.foi; > cfg.toi = -0.5:0.01:0.7; > TFRwave = ft_freqanalysis(cfg, trialdata); > > % Visualization > cfg = []; > cfg.baseline = [-0.5 -0.1]; > cfg.baselinetype = 'absolute'; > cfg.maskstyle = 'saturation'; > cfg.zlim = [0 1]; > cfg.showlabels = 'yes'; > figure > ft_singleplotTFR(cfg, TFRwave) > %%%%%%%%%%%%%%%%%% > > And for wavelet transform is > %%%%%%%%%%%%%%%%%% > cfg = []; > cfg.channel = 'Cz'; > cfg.method = 'wavelet'; > cfg.width = 7; > cfg.output = 'pow'; > cfg.foi = 1:0.5:30; > cfg.toi = -0.5:0.05:1; > TFRwave = ft_freqanalysis(cfg, trialdata); > > cfg = []; > cfg.baseline = [-0.5 -0.1]; > cfg.baselinetype = 'relative'; % OR absolute > cfg.maskstyle = 'saturation'; > cfg.zlim = [0 1]; > cfg.channel = 'Cz'; > figure > ft_singleplotTFR(cfg, TFRwave); > %%%%%%%%%%%%%%%%%% > > I have tried the tutorials online, but this doesn't give me any better results... > > Does anyone know what I am doing wrong? > > Thanks many times! > > Best regards, > > Alex (Master student > > > > > Alexander Mentink > Centre for Human Drug Research > Zernikedreef 8 > 2333 CL Leiden > The Netherlands > T +31 (0) 71 7517166 > amentink at chdr.nl > http://www.chdr.nl > > Follow us: > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://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 J.Herring at donders.ru.nl Tue Aug 1 13:05:07 2017 From: J.Herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Tue, 1 Aug 2017 11:05:07 +0000 Subject: [FieldTrip] Time frequency analysis using evoked potentials In-Reply-To: References: Message-ID: <25A27A1A-3DED-4CC7-818C-CE61C4324A03@donders.ru.nl> Dear Alex, Change your scaling to ‘maxabs’ (cfg.zlim = ‘maxabs’;) to get a better feel of the scaling of your data. Now you have a scaling from 0 to 1, which, given your data, gives you very saturated images. Also, I would argue using a relative baseline on a TFR of an ERP (or ERF) is risky as in theory, your baseline should be zero (you even explicitly try to impose that by performing a baseline correction when calculating the ERP). This means that you are dividing your activation period by values close to zero. This will give you arbitrarily large values. An absolute baseline is preferred. Best, Jim On 1 Aug 2017, at 11:52, Alexander Mentink > wrote: Hi Fieldtrip community, I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) http://tinyurl.com/y7nerh8v The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. The code I use for hanning window is %%%%%%%%%%%%%%%%%% cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); % Visualization cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) %%%%%%%%%%%%%%%%%% And for wavelet transform is %%%%%%%%%%%%%%%%%% cfg = []; cfg.channel = 'Cz'; cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.5:30; cfg.toi = -0.5:0.05:1; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'relative'; % OR absolute cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.channel = 'Cz'; figure ft_singleplotTFR(cfg, TFRwave); %%%%%%%%%%%%%%%%%% I have tried the tutorials online, but this doesn't give me any better results... Does anyone know what I am doing wrong? Thanks many times! Best regards, Alex (Master student Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.merkel at med.ovgu.de Tue Aug 1 13:11:59 2017 From: christian.merkel at med.ovgu.de (christian.merkel at med.ovgu.de) Date: Tue, 1 Aug 2017 11:11:59 +0000 Subject: [FieldTrip] Using fixed orientations for men-source estimation Message-ID: <71D8A67A81D69A4CB5BE2B979021C26ECAFFE748@esen3.imed.uni-magdeburg.de> Hello, I am running ft_sourceanalysis and am wondering why I can restrict the parameter-estimation in LCMV and sLORETA by setting the parameter 'fixedori' but not when using MNE. Shouldn't one be able to also just use the normal direction of each source position here as well? Can I just apply the same logic in the script 'minimumnormestimate' to change the field 'lf.ori' as, for example, in 'ft_sloreta' or would this be problematic down the line? Thank You, Christian From amentink at chdr.nl Tue Aug 1 13:28:00 2017 From: amentink at chdr.nl (Alexander Mentink) Date: Tue, 1 Aug 2017 11:28:00 +0000 Subject: [FieldTrip] Time frequency analysis using evoked potentials In-Reply-To: <25A27A1A-3DED-4CC7-818C-CE61C4324A03@donders.ru.nl> References: , <25A27A1A-3DED-4CC7-818C-CE61C4324A03@donders.ru.nl> Message-ID: <3b839c54a1a142f6bea35538ce6a481a@chdr.nl> Thanks Jim, The graphs look a bit better, however I still get many NaN artifacts when I want to show the frequency range of 1-30 Hz, which disappears completely when I shift it to 4-30 Hz. Does anyone know what the underlying problem is here? KR, Alex Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: [Twitter] [LinkedIn] ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Herring, J.D. (Jim) Sent: 01 August 2017 13:05 To: FieldTrip discussion list Subject: Re: [FieldTrip] Time frequency analysis using evoked potentials Dear Alex, Change your scaling to ‘maxabs’ (cfg.zlim = ‘maxabs’;) to get a better feel of the scaling of your data. Now you have a scaling from 0 to 1, which, given your data, gives you very saturated images. Also, I would argue using a relative baseline on a TFR of an ERP (or ERF) is risky as in theory, your baseline should be zero (you even explicitly try to impose that by performing a baseline correction when calculating the ERP). This means that you are dividing your activation period by values close to zero. This will give you arbitrarily large values. An absolute baseline is preferred. Best, Jim On 1 Aug 2017, at 11:52, Alexander Mentink > wrote: Hi Fieldtrip community, I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) http://tinyurl.com/y7nerh8v The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. The code I use for hanning window is %%%%%%%%%%%%%%%%%% cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); % Visualization cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) %%%%%%%%%%%%%%%%%% And for wavelet transform is %%%%%%%%%%%%%%%%%% cfg = []; cfg.channel = 'Cz'; cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.5:30; cfg.toi = -0.5:0.05:1; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'relative'; % OR absolute cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.channel = 'Cz'; figure ft_singleplotTFR(cfg, TFRwave); %%%%%%%%%%%%%%%%%% I have tried the tutorials online, but this doesn't give me any better results... Does anyone know what I am doing wrong? Thanks many times! Best regards, Alex (Master student Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image514dfb.PNG Type: image/png Size: 696 bytes Desc: image514dfb.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image819e4b.PNG Type: image/png Size: 648 bytes Desc: image819e4b.PNG URL: From q.meng301 at gmail.com Wed Aug 2 03:11:24 2017 From: q.meng301 at gmail.com (Q Meng) Date: Wed, 2 Aug 2017 11:11:24 +1000 Subject: [FieldTrip] Questions about coherence statistics on source level data In-Reply-To: References: Message-ID: Dear list, My apology, it should be a comparison of coherence value between 2 conditions in a within subject design. In addition to my previous question on how to implement a non-parametric permutation test on the difference of coherence values, I would like to consult that in case I used hanning window as a single taper, what should I do with the Z spectra equation described in Jan-Mathijs's J.Neurosci. 2011 paper? As it will result in infinite values, right? Best, Qing Meng On Tue, Aug 1, 2017 at 4:42 PM, Q Meng wrote: > Dear list, > > I'm running source analysis using DICS on my MEG data following the > cortical-muscular coherence tutorial and now would like to compare the > source level coherence value between 2 conditions in a between subject > design. > > I found some older posts on this topic from the discuss list ( > https://mailman.science.ru.nl/pipermail/fieldtrip/2011- > September/004279.html) (https://mailman.science.ru. > nl/pipermail/fieldtrip/2016-March/010166.html). Following the > instructions, I Z-transformed the coherence manually and specified > cfg.statistic = 'ft_statfun_diff' and then did the cluster based > non-parametric permutation test. However, I got an error message says *"Error > using ft_statistics_montecarlo (line 242) could not determine the > parametric critical value for clustering"* right after the statistical > analysis started. Please see below a snippet of code: > > ... > Z- transform coherence manually and creating 0-coherence data > ... > > cfg = []; > cfg.method = 'montecarlo'; > % cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.statistic = 'ft_statfun_diff'; > cfg.parameter = 'coh'; > cfg.correctm = 'cluster'; > cfg.numrandomization = 1000; > cfg.alpha = 0.05; > cfg.clusteralpha = 0.05; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.correcttail = 'alpha'; > cfg.connectivity = VertConn; > > nsubj = 19; > cfg.design(1,:) = [1:nsubj 1:nsubj]; > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > cfg.uvar = 1; % row of design matrix that contains unit > variable (in this case: subjects) > cfg.ivar = 2; % row of design matrix that contains > independent variable (the conditions) > > > stat = ft_sourcestatistics(cfg, data_meg_source_cohe_sentence_dics_parsing_B2_ICA{:}, > data_meg_source_cohe_sentence_dics_parsing_B5_ICA{:}); > > > Before this, I just used cfg.statistic = 'ft_statfun_depsamplesT' to > compare the coherence value between two conditions and the program itself > worked well. > > Does anyone have an idea where my problem could be or what I should do instead?3 > > Thanks for your help! > > Best, > > Qing > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony.w.wilson at gmail.com Wed Aug 2 13:40:02 2017 From: tony.w.wilson at gmail.com (Tony W. Wilson) Date: Wed, 2 Aug 2017 06:40:02 -0500 Subject: [FieldTrip] Postdoctoral Positions at the University of Nebraska Medical Center in Omaha Message-ID: Applications are invited for two postdoctoral positions in the Center for Magnetoencephalography (MEG) at the University of Nebraska Medical Center (UNMC) in Omaha. Successful applicants will work with Dr. Tony Wilson and other Center investigators on multiple NIH- and NSF-funded projects investigating the neural processes underlying attention, motor performance, and sensorimotor integration in healthy and neurological populations (adults and children). The Center for MEG has expertise in cognitive, clinical, and motor neuroscience, as well as oscillatory analyses and source reconstruction of neurophysiological signals. A list of recent Center publications can be found *here* . UNMC is a vibrant multidisciplinary research environment with major resources and ample opportunities for training and collaboration. Resources include a 306-sensor MEG system, multiple 3T human MRI scanners, high-definition transcranial direct-current and alternating-current stimulation (HD-tDCS/tACS) equipment, eye-tracking equipment, and a state-of-the-art transcranial magnetic stimulation (TMS) suite. Successful candidates will have a PhD in neuroscience, psychology, or computer science, and an excellent publication record for their career stage. Candidates who have knowledge of MEG/fMRI analysis packages (SPM, Fieldtrip, BESA, Brainstorm, etc.) and/or programming skills (e.g., Matlab, Python) will have an advantage. Salary will follow NIH standard guidelines, and start dates are negotiable. A two-year minimum commitment is required, with the possibility of extension into a third year with strong performance. UNMC is also in the midst of a major growth initiative and transiting to a faculty position is certainly possible. Applicants should send a curriculum vitae and a letter of interest/cover letter to Dr. Tony Wilson at twwilson at unmc.edu . Three letters of recommendation will be requested at a later date. Review of applications will begin immediately and continue until all positions are filled. -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Herring at donders.ru.nl Thu Aug 3 14:44:38 2017 From: J.Herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 3 Aug 2017 12:44:38 +0000 Subject: [FieldTrip] Time frequency analysis using evoked potentials In-Reply-To: <3b839c54a1a142f6bea35538ce6a481a@chdr.nl> References: <25A27A1A-3DED-4CC7-818C-CE61C4324A03@donders.ru.nl> <3b839c54a1a142f6bea35538ce6a481a@chdr.nl> Message-ID: <5736B4AA-47E8-42F7-9540-6C6D2C859426@donders.ru.nl> Hi Alex, If this is the code you used: cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); There shouldn’t be a difference in the values from 4 - 30 Hz, whether, or not you calculate 1-4 Hz as well. The NaN values for the lower frequencies at the edges (and for very low frequencies for the entire time course) can be explained by the fact that your epochs from -1s to +1.2 are not long enough to fit even a single time window you are requesting. For example, in cfg.t_ftimwin you are requesting a moving time window of 3 cycles. At 1 Hz (=oscillation with period of 1 second), you are requesting a 3 second moving time window. As your data is shorter than 3 seconds, you will not be able to estimate power at any of the requested time points in cfg.toi. With an epoch length of 2.2 seconds you will only start to get estimates from ~1.4 Hz ( cycles/epoch length ) onwards. Best, Jim On 1 Aug 2017, at 13:28, Alexander Mentink > wrote: Thanks Jim, The graphs look a bit better, however I still get many NaN artifacts when I want to show the frequency range of 1-30 Hz, which disappears completely when I shift it to 4-30 Hz. Does anyone know what the underlying problem is here? KR, Alex Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: ________________________________ From: fieldtrip-bounces at science.ru.nl > on behalf of Herring, J.D. (Jim) > Sent: 01 August 2017 13:05 To: FieldTrip discussion list Subject: Re: [FieldTrip] Time frequency analysis using evoked potentials Dear Alex, Change your scaling to ‘maxabs’ (cfg.zlim = ‘maxabs’;) to get a better feel of the scaling of your data. Now you have a scaling from 0 to 1, which, given your data, gives you very saturated images. Also, I would argue using a relative baseline on a TFR of an ERP (or ERF) is risky as in theory, your baseline should be zero (you even explicitly try to impose that by performing a baseline correction when calculating the ERP). This means that you are dividing your activation period by values close to zero. This will give you arbitrarily large values. An absolute baseline is preferred. Best, Jim On 1 Aug 2017, at 11:52, Alexander Mentink > wrote: Hi Fieldtrip community, I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) http://tinyurl.com/y7nerh8v The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. The code I use for hanning window is %%%%%%%%%%%%%%%%%% cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); % Visualization cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) %%%%%%%%%%%%%%%%%% And for wavelet transform is %%%%%%%%%%%%%%%%%% cfg = []; cfg.channel = 'Cz'; cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.5:30; cfg.toi = -0.5:0.05:1; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'relative'; % OR absolute cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.channel = 'Cz'; figure ft_singleplotTFR(cfg, TFRwave); %%%%%%%%%%%%%%%%%% I have tried the tutorials online, but this doesn't give me any better results... Does anyone know what I am doing wrong? Thanks many times! Best regards, Alex (Master student Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornelia.quaedflieg at uni-hamburg.de Thu Aug 3 18:46:47 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Thu, 3 Aug 2017 18:46:47 +0200 Subject: [FieldTrip] ft_selectdata doesn't work after using ft_regressconfound Message-ID: <005301d30c78$189e9050$49dbb0f0$@uni-hamburg.de> Dear Fieldtrip-users, We are not able to use function ft_selectdata after applying head movement correction using ft_regressconfound. The error that we get is the well-known index exceeds matrix dimensions. It is due to the fact that the size of x is incorrect, it doesn’t correspond to the number of trials but is 7 which is the number of regressors in the beta variable that is created by using ft_regressconfound. There is a simple way to solve it and this is deleting the field ‘beta’ before running ft_select data. My question is, just to be sure, the variance is regressed out by using ft_regressconfound so the beta variable is not needed in any further step right? Maybe this is also something for the debug team? Thus that ft_selectdata runs after running ft_regressconfound. Best Dr Conny Quaedflieg Mit freundlichen Grüßen, E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 5382 bytes Desc: not available URL: From a.stolk8 at gmail.com Thu Aug 3 18:53:28 2017 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 3 Aug 2017 09:53:28 -0700 Subject: [FieldTrip] ft_selectdata doesn't work after using ft_regressconfound In-Reply-To: <005301d30c78$189e9050$49dbb0f0$@uni-hamburg.de> References: <005301d30c78$189e9050$49dbb0f0$@uni-hamburg.de> Message-ID: Hi Conny, Yes, you can delete the beta field, or alternatively, call ft_regressconfound with cfg.beta = 'no' (perhaps this should be the default). Didn't know there was a debug team.. Best, Arjen On Thu, Aug 3, 2017 at 9:46 AM, Conny Quaedflieg < cornelia.quaedflieg at uni-hamburg.de> wrote: > Dear Fieldtrip-users, > > > > We are not able to use function ft_selectdata after applying head movement > correction using ft_regressconfound. The error that we get is the > well-known index exceeds matrix dimensions. > > It is due to the fact that the size of x is incorrect, it doesn’t > correspond to the number of trials but is 7 which is the number of > regressors in the beta variable that is created by using > ft_regressconfound. > > There is a simple way to solve it and this is deleting the field ‘beta’ > before running ft_select data. > > > > My question is, just to be sure, the variance is regressed out by using > ft_regressconfound so the beta variable is not needed in any further step > right? > > Maybe this is also something for the debug team? Thus that ft_selectdata > runs after running ft_regressconfound. > > > > Best > > Dr Conny Quaedflieg > > > > > > Mit freundlichen Grüßen, > > > > > > [image: Unbenannt-1] > > *E-Mail*: cornelia.quaedflieg at uni-hamburg.de > > *Tel.*: +49 40 42838-5448 <+49%2040%2042838-5448> *Website*: Hyperlink > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 5382 bytes Desc: not available URL: From efrain.torres at marquette.edu Thu Aug 3 22:24:58 2017 From: efrain.torres at marquette.edu (Torres, Efrain) Date: Thu, 3 Aug 2017 20:24:58 +0000 Subject: [FieldTrip] please help, approaching deadline. ft_sourceanalysis line 813 Message-ID: To whom it may concern, I was wondering if you were able to correct your error? I am experiencing the same issue, and I was wondering if you could help me? Oddly enough, I am also on a bit of a time crunch. Sincerley, Efrain Torres -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornelia.quaedflieg at uni-hamburg.de Fri Aug 4 09:37:21 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Fri, 4 Aug 2017 09:37:21 +0200 Subject: [FieldTrip] ft_selectdata doesn't work after using ft_regressconfound In-Reply-To: References: <005301d30c78$189e9050$49dbb0f0$@uni-hamburg.de> Message-ID: <007b01d30cf4$8257c4e0$87074ea0$@uni-hamburg.de> Dear Arjen, Thanks for your fast reply. With debug team I mean Bugzilla from fieldtrip. http://www.fieldtriptoolbox.org/bugzilla best Conny Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Arjen Stolk Gesendet: Donnerstag, 3. August 2017 18:53 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_selectdata doesn't work after using ft_regressconfound Hi Conny, Yes, you can delete the beta field, or alternatively, call ft_regressconfound with cfg.beta = 'no' (perhaps this should be the default). Didn't know there was a debug team.. Best, Arjen On Thu, Aug 3, 2017 at 9:46 AM, Conny Quaedflieg > wrote: Dear Fieldtrip-users, We are not able to use function ft_selectdata after applying head movement correction using ft_regressconfound. The error that we get is the well-known index exceeds matrix dimensions. It is due to the fact that the size of x is incorrect, it doesn’t correspond to the number of trials but is 7 which is the number of regressors in the beta variable that is created by using ft_regressconfound. There is a simple way to solve it and this is deleting the field ‘beta’ before running ft_select data. My question is, just to be sure, the variance is regressed out by using ft_regressconfound so the beta variable is not needed in any further step right? Maybe this is also something for the debug team? Thus that ft_selectdata runs after running ft_regressconfound. Best Dr Conny Quaedflieg Mit freundlichen Grüßen, E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 5382 bytes Desc: not available URL: From a.kochari at uva.nl Fri Aug 4 16:45:53 2017 From: a.kochari at uva.nl (Arnold Kochari) Date: Fri, 4 Aug 2017 16:45:53 +0200 Subject: [FieldTrip] missing channels and time locked grand average Message-ID: Dear FieldTrip community, I have a question about what seems to be an old problem with no solution posted yet. I have deleted bad channels in some participants during preprocessing. Now I would like to compute grand average ERPs using ft_timelockgrandaverage. However, if a channel has been deleted in at least one participant, the mean for it does not get calculated. What I would like to see is just that the average is calculated among the remaining participants. I understand that there might be some strong arguments for the absence of this functionality. I also know about the possibility to interpolate the deleted channels using channelrepair, but I do not really agree with it. Is there any way to calculate grand averages the way I would like to do it? The only solution that I can think of right now is exporting the data, making the calculation in R and then importing the averages it again, but that would require a lot f time. Kind regards, Arnold Kochari PhD candidate, Institute for Logic, Language and Computation, University of Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Fri Aug 4 17:20:31 2017 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Fri, 4 Aug 2017 08:20:31 -0700 Subject: [FieldTrip] missing channels and time locked grand average In-Reply-To: References: Message-ID: Hi Arnold, There's a cfg.method = 'nan' option in ft_channelrepair, which creates NaN data for specified channels. As a result, these channels are still considered in the group-level statistics, provided other subjects have data for the same channels. However, I don't know whether timelockgrandaverage can yet deal with these NaN channels too. Best, Arjen On Fri, Aug 4, 2017 at 7:45 AM, Arnold Kochari wrote: > Dear FieldTrip community, > > I have a question about what seems to be an old problem with no solution > posted yet. > > I have deleted bad channels in some participants during preprocessing. Now > I would like to compute grand average ERPs using ft_timelockgrandaverage. > However, if a channel has been deleted in at least one participant, the > mean for it does not get calculated. What I would like to see is just that > the average is calculated among the remaining participants. > > I understand that there might be some strong arguments for the absence of > this functionality. I also know about the possibility to interpolate the > deleted channels using channelrepair, but I do not really agree with it. > > Is there any way to calculate grand averages the way I would like to do > it? The only solution that I can think of right now is exporting the data, > making the calculation in R and then importing the averages it again, but > that would require a lot f time. > > > Kind regards, > Arnold Kochari > PhD candidate, Institute for Logic, Language and Computation, University > of Amsterdam > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From timeehan at gmail.com Fri Aug 4 21:00:12 2017 From: timeehan at gmail.com (Tim Meehan) Date: Fri, 4 Aug 2017 15:00:12 -0400 Subject: [FieldTrip] bug in 'nearest' function Message-ID: Dear FieldTrippers, I'd like to report a bug in the 'nearest' function. It occurs at line 152, the first line of the following if statement: indx2 = find(array<=val, 1, 'last'); indx3 = find(array>=val, 1, 'first'); if abs(array(indx2)-val) <= abs(array(indx3)-val) indx = indx2; else indx = indx3; end if ~wassorted indx = xidx(indx); end In my case, the two values being compared should be considered equal (i.e. val is halfway between array(indx2) and array(indx3)). However due to precision issues, the condition is false and indx is set to indx3. Specifically: - In short format: val = -17.4930 array(indx2) = -17.4940 array(indx3) = -17.4920 - Full precision: val = -17.492999999999999 array(indx2) = -17.494000000000000 array(indx3) = -17.492000000000001 For me this leads to the 'begsampl' variable in line 223 of ft_timelockanalysis to be 2 when it should be 1, which then leads to an undersizing of subsequent variables, and finally an 'index exceeds matrix dimension' error at line 280. I gather the precision issue was noted as a general problem a long time ago, and the if statement noted above was implemented as a fix for the 'nearest' function -- interestingly, the fix even notes that the choice of indx2 over indx3 when the condition is true is arbitrary ( http://bugzilla.fcdonders.nl/show_bug.cgi?id=1943). But it seems that when val *should be* equidistant from its nearest neighbors in array, precision issues could cause an inequality in the differences, and thus cause 'nearest' to randomly select the lesser or greater of the neighbors. I guess it just so happens in my case that I need 'nearest' to arbitrarily select indx2, which it is designed to to do but fails because of the precision issue. I did try the old (commented out) fix for precision in 'nearest' and it solved my problem, i.e. it selects the lesser of the two neighbors. The bug report notes this is a slower method, but I will revert to that unless it has been found to cause other problems. Best, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From urieduardo at gmail.com Sat Aug 5 00:54:54 2017 From: urieduardo at gmail.com (=?UTF-8?Q?Uri_Eduardo_Ram=C3=ADrez_Pasos?=) Date: Fri, 4 Aug 2017 15:54:54 -0700 Subject: [FieldTrip] Artifact correction error Message-ID: Dear fieldtrip experts, I tried following the tutorial on http://www.fieldtriptoolbox.org/example/ use_independent_component_analysis_ica_to_remove_ecg_artifacts using both my data and the example data, but as soon as I run comp_ecg = ft_appenddata([], ecg, comp_ecg); I get an error saying that the egg and comp_ecg variables must be of the same type. Is this just me or was there a fieldtrip update that leads to ft_componentanalysis yielding a variable of a different type? Many thanks, Uri Ramirez -------------- next part -------------- An HTML attachment was scrubbed... URL: From emilia.flo.rama at gmail.com Mon Aug 7 21:13:10 2017 From: emilia.flo.rama at gmail.com (=?UTF-8?Q?Emilia_Fl=C3=B3?=) Date: Mon, 7 Aug 2017 16:13:10 -0300 Subject: [FieldTrip] Selecting threshold for cluster permutation Message-ID: Hi, everyone! I have data from an EEG experiment that I want to analyse with permutation cluster analysis. I'm having trouble defining the p threshold and the minimum number of neighbours (I'm recording with 64 electrodes).. Is just arbitrary and people end up using what their lab use?, or is there some literature that I can read in order to decide with more certainty.. Any advice would be extremely welcome, Best, Emilia -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.kochari at uva.nl Wed Aug 9 16:47:45 2017 From: a.kochari at uva.nl (Arnold Kochari) Date: Wed, 9 Aug 2017 16:47:45 +0200 Subject: [FieldTrip] missing channels and time locked grand average In-Reply-To: References: Message-ID: Hi Arjen, Thank you for the suggestion. I tried it, but in this case ft_timelockgrandaverage just spits out NaN for the channels where some participant(s) had NaNs. This is to be expected since that's how Matlab deals with NaNs by default. So basically I need to find some way to do averaging within the filedtrip datastructure that would be equivalent to matlab's 'omitnan' option. Arnold On Fri, Aug 4, 2017 at 5:20 PM, Arjen Stolk wrote: > Hi Arnold, > > There's a cfg.method = 'nan' option in ft_channelrepair, which creates NaN > data for specified channels. As a result, these channels are still > considered in the group-level statistics, provided other subjects have data > for the same channels. However, I don't know whether timelockgrandaverage > can yet deal with these NaN channels too. > > Best, > Arjen > > On Fri, Aug 4, 2017 at 7:45 AM, Arnold Kochari wrote: > >> Dear FieldTrip community, >> >> I have a question about what seems to be an old problem with no solution >> posted yet. >> >> I have deleted bad channels in some participants during preprocessing. >> Now I would like to compute grand average ERPs >> using ft_timelockgrandaverage. However, if a channel has been deleted in at >> least one participant, the mean for it does not get calculated. What I >> would like to see is just that the average is calculated among the >> remaining participants. >> >> I understand that there might be some strong arguments for the absence of >> this functionality. I also know about the possibility to interpolate the >> deleted channels using channelrepair, but I do not really agree with it. >> >> Is there any way to calculate grand averages the way I would like to do >> it? The only solution that I can think of right now is exporting the data, >> making the calculation in R and then importing the averages it again, but >> that would require a lot f time. >> >> >> Kind regards, >> Arnold Kochari >> PhD candidate, Institute for Logic, Language and Computation, University >> of Amsterdam >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bioeng.yoosofzadeh at gmail.com Wed Aug 9 23:13:32 2017 From: bioeng.yoosofzadeh at gmail.com (Vahab Yousofzadeh) Date: Wed, 9 Aug 2017 17:13:32 -0400 Subject: [FieldTrip] Fwd: Parcellation of connectivity matrix by AAL atlas In-Reply-To: References: Message-ID: Dear ft experts, I am trying to summarize a full connectivity matrix using an AAL atlas (similar to the tutorial for network analysis). However, what I get at the end is a very sparse matrix (see f1 and f2 for before and after parcellation, respectively). I suspect the 'nearest' interpolation is the best solution for the approach. I tried other interpolation methods, but with no success. Here are the scripts I utilized: atlas = ft_read_atlas('ROI_MNI_V4.nii'); cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'tissue'; atlas2 = ft_sourceinterpolate(cfg, atlas, conn); atlas2.pos = conn.pos; cfg = []; cfg.parameter = 'plvspctrm'; parc_conn = ft_sourceparcellate(cfg, conn, atlas2); where, Conn = dim: [18 14 13] inside: [1627x1 double] pos: [1627x3 double] outside: [0x1 double] plvspctrm: [1627x1627 double] time: [1x481 double] cfg: [1x1 struct] Any comments would be appreciated. Best regards, Vahab -------------- next part -------------- A non-text attachment was scrubbed... Name: f1.jpg Type: image/jpeg Size: 74414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: f2.jpg Type: image/jpeg Size: 13896 bytes Desc: not available URL: From cornelia.quaedflieg at uni-hamburg.de Thu Aug 10 10:15:55 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Thu, 10 Aug 2017 10:15:55 +0200 Subject: [FieldTrip] head movement correction creates complex values => why and how to solve Message-ID: <002501d311b0$e3b36ee0$ab1a4ca0$@uni-hamburg.de> Dear Fieldtrip users, I would like to correct my frequency MEG data for head movement that implemented this based on the manual on the fieldtrip website (). We perform it as the last step before the statistics. We have 70 participants and in 12 of our participants, the data (e.g., powerspctrm) contains complex values. I have several questions about this 1. Why are complex values computed in some of the participants? FFT values are normal. 2. What can I do to solve this? The problem is that all next functions (grand average, statistics) are not running with complex values. Thank in advance for any suggestions! Best dr. Conny Quaedflieg E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 5388 bytes Desc: not available URL: From cornelia.quaedflieg at uni-hamburg.de Thu Aug 10 16:09:29 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Thu, 10 Aug 2017 16:09:29 +0200 Subject: [FieldTrip] head movement correction creates complex values => why Message-ID: <010001d311e2$48125b40$d83711c0$@uni-hamburg.de> Dear users, With regard to my question, why the data from 12 out of 70 participants ta (e.g.,powerspctrm) contains complex values after using ft_regressconfound, I found out that the circumcenter is causing the complex single values. Though don’t get it why they become complex I attached coil positions of 2 pp’s Vp22 gets complex values The circumcenter function is also attached. This is what I run: cc = circumcenter2(coil1, coil2, coil3); or for PP 22 cc_vp22 = circumcenter2(coil1_VP22, coil2_VP22, coil3_VP22); Maybe someone sees why they become complex and can tell me how to solve this :) Thanks in advance Conny Mit freundlichen Grüßen, E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 5382 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: coils.mat Type: application/octet-stream Size: 15390 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: circumcenter2.m URL: From nugenta at mail.nih.gov Tue Aug 8 22:59:32 2017 From: nugenta at mail.nih.gov (Nugent, Allison C. (NIH/NIMH) [E]) Date: Tue, 8 Aug 2017 20:59:32 +0000 Subject: [FieldTrip] 2nd MEG North America Meeting: We need you! Message-ID: We are still soliciting volunteers for committee membership at the 2nd MEG-North America meeting, to be held in Bethesda, Maryland November 8th and 9th. Committee meetings will be held on November 8th, with the scientific session on November 9th. There are four committee/workgroups; a broad suggestion of agenda items is as follows: Reliability/reproducibility: Topics include discussion of a standard battery to probe reproducibility across sites and platforms. Committee members may also works towards implementation of the battery across multiple sites. Data Sharing: Topics include the discussion of common data elements and formats or data structures, repository policies, infrastructure support and development, and facilitation of data transfer into repositories. Industry Partnerships: Discussions of collaborative partnerships between academia and industry, to facilitate goals of enhancing reproducibility and sharing, along with other areas of collaboration mutually beneficial to research and clinical institutions and device developers/manufacturers. Representatives from both York Instruments and CTF have volunteered to join this committee. Facilitating Best Practices: Discussions to include how best to facilitate the emergence of best practices from the user community. What metrics can be used for identifying best practices, characteristics of test datasets, and frameworks to identify robust processing pipelines. To volunteer, please e-mail nihmegworkshop at gmail.com with your affiliation and which committee(s) you are willing to serve on. We will send confirmations to committee members by September 8th. Thank you for supporting our community! Please visit our website at https://megworkshop.nih.gov/MEGWorkshop/ Or register at: https://www.eventbrite.com/e/meg-north-america-2017-tickets-36315511673 We hope to see you there! Conference Chairs: Richard Coppola Allison Nugent Steering Committee: Sylvain Baillet Dimitrios Pantazis Timothy Roberts Julia Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: From mibanks at wisc.edu Sat Aug 12 00:05:51 2017 From: mibanks at wisc.edu (MATTHEW I BANKS) Date: Fri, 11 Aug 2017 22:05:51 +0000 Subject: [FieldTrip] Granger analysis Message-ID: Greetings. What is the easiest way to compute non-spectrally resolved Granger causality, i.e. log(var(e_x)/var(e_xy)), where e_x and e_xy are the AR model error terms? -Matt ____________________________ Matthew I. Banks, Ph.D. Associate Professor Department of Anesthesiology University of Wisconsin 1300 University Avenue, Room 4605 Madison, WI 53706 office tel. (608)261-1143 lab tel. (608)263-6662 fax (608)263-2592 http://anesthesia.wisc.edu/index.php/Banks_Laboratory http://ntp.neuroscience.wisc.edu/banks.htm -------------- next part -------------- An HTML attachment was scrubbed... URL: From hermpsy at mail.ru Sat Aug 12 12:28:39 2017 From: hermpsy at mail.ru (=?UTF-8?B?SGVybWluZSBCZXJiZXJ5YW4=?=) Date: Sat, 12 Aug 2017 13:28:39 +0300 Subject: [FieldTrip] =?utf-8?q?Fieldtrip_submission?= Message-ID: <1502533719.946112223@f390.i.mail.ru> Dear representatives of Fieldtrip, Could you, please, add me to Fieldtrip email list for getting the notifications (not only other colleagues' messages -if I get it right)? Sorry for taking your time. Thank you in advance for your letter. Kind regards, Hermine Berberyan Sent from Mail.Ru app for iOS -------- Forwarded message -------- From: To: fieldtrip at science.ru.nl Date: Saturday, 12 August 2017, 12:05 +0200 Subject: fieldtrip Digest, Vol 81, Issue 9 >Send fieldtrip mailing list submissions to >fieldtrip at science.ru.nl > >To subscribe or unsubscribe via the World Wide Web, visit >https://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. Granger analysis (MATTHEW I BANKS) > > >---------------------------------------------------------------------- > >Message: 1 >Date: Fri, 11 Aug 2017 22:05:51 +0000 >From: MATTHEW I BANKS < mibanks at wisc.edu > >To: " fieldtrip at science.ru.nl " < fieldtrip at science.ru.nl > >Subject: [FieldTrip] Granger analysis >Message-ID: >< DM5PR06MB2634608E677FE694F4047F3EDF890 at DM5PR06MB2634.namprd06.prod.outlook.com > > >Content-Type: text/plain; charset="us-ascii" > >Greetings. What is the easiest way to compute non-spectrally resolved Granger causality, i.e. log(var(e_x)/var(e_xy)), where e_x and e_xy are the AR model error terms? > > >-Matt > > >____________________________ > >Matthew I. Banks, Ph.D. >Associate Professor >Department of Anesthesiology >University of Wisconsin >1300 University Avenue, Room 4605 >Madison, WI 53706 >office tel. (608)261-1143 >lab tel. (608)263-6662 >fax (608)263-2592 >http://anesthesia.wisc.edu/index.php/Banks_Laboratory >http://ntp.neuroscience.wisc.edu/banks.htm >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: < http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170811/21109e5d/attachment-0001.html > > >------------------------------ > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >End of fieldtrip Digest, Vol 81, Issue 9 >**************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From maria.hakonen at gmail.com Sat Aug 12 21:10:42 2017 From: maria.hakonen at gmail.com (Maria Hakonen) Date: Sat, 12 Aug 2017 22:10:42 +0300 Subject: [FieldTrip] Creating head model using template MRI Message-ID: Dear Fieldtrip experts, I would like to run ft_sourceanalysis as shown in the Appendix 1 here: http://www.fieldtriptoolbox.org/tutorial/coherence ft_sourceanalysis requires head model as a parameter. I don’t have mri images for my MEG subjects (measured with 306 channel Elekta Neuromag system) and, therefore, I would need to use a template head model or a template MRI. I think that I should use a local spheres volume conduction model as suggested here: http://www.fieldtriptoolbox.org/tutorial/headmodel_meg. Could someone please let me know if standard_mri.mat is the file that I should use? I created a head model using standard_mri.mat and following the instructions here: http://www.fieldtriptoolbox.org/tutorial/headmodel_meg I first created the head model for the example data and checked whether I can get the same result as in the example (Appendix 1: http://www.fieldtriptoolbox.org/tutorial/coherence). However, the result doesn’t seem to be correct: ​ Could someone please let me know what I am doing wrong? Many thanks already in advance if you can help! Best, Maria Here is the scrip that I have tested: hdr = ft_read_header(' C:\Users\Maria\Documents\filedtrip\fieldtrip-20170620\SubjectCMC.ds'); grad = hdr.grad; load('standard_mri.mat'); load('freq.mat') cfg = []; cfg.output = 'brain'; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.grad = hdr.grad; cfg.feedback = false; cfg.method = 'localspheres'; vol = ft_prepare_headmodel(cfg,segmentedmri); cfg = []; mri = ft_volumereslice(cfg, mri); cfg = []; cfg.method = 'dics'; cfg.refchan = 'EMGlft'; cfg.frequency = 18; cfg.hdmfile = vol; cfg.inwardshift = 1; cfg.grid.resolution = 1; cfg.grid.unit = 'cm'; source = ft_sourceanalysis(cfg, freq); cfg = []; cfg.parameter = 'coh'; cfg.downsample = 2; interp = ft_sourceinterpolate(cfg, source, mri); cfg = []; cfg.method = 'ortho'; cfg.interactive = 'yes'; cfg.funparameter = 'coh'; figure; ft_sourceplot(cfg, interp); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: head_model_test.png Type: image/png Size: 61455 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Sat Aug 12 21:41:28 2017 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sat, 12 Aug 2017 19:41:28 +0000 Subject: [FieldTrip] Granger analysis In-Reply-To: References: Message-ID: <9CFD6835-3912-44A1-82BF-477E8D10A7B5@donders.ru.nl> Hi Matt, I have never done this myself, but I think that in principle it should be possible to fit a set of models, and then compute the residuals’ variance ratio by hand. In other words, assuming data1 and data2 to be variables that consist of a single channel: mvar1 = ft_mvaranalysis(cfg, data1); mvar2 = ft_mvaranalysis(cfg, data2); mvar12 = ft_mvaranalysis(cfg, ft_appenddata([],data1,data2)); GC1to2 = log(mvar2.noisecov(1,1)./mvar12.noisecov(2,2)); GC2to1 = log(mvar1.noisecov(1,1)./mvar12.noisecov(1,1)); Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 12 Aug 2017, at 00:05, MATTHEW I BANKS > wrote: Greetings. What is the easiest way to compute non-spectrally resolved Granger causality, i.e. log(var(e_x)/var(e_xy)), where e_x and e_xy are the AR model error terms? -Matt ____________________________ Matthew I. Banks, Ph.D. Associate Professor Department of Anesthesiology University of Wisconsin 1300 University Avenue, Room 4605 Madison, WI 53706 office tel. (608)261-1143 lab tel. (608)263-6662 fax (608)263-2592 http://anesthesia.wisc.edu/index.php/Banks_Laboratory http://ntp.neuroscience.wisc.edu/banks.htm _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jens.klinzing at uni-tuebingen.de Sun Aug 13 19:29:15 2017 From: jens.klinzing at uni-tuebingen.de (=?ISO-8859-1?Q?=22Jens_Klinzing=2C_Universit=E4t_T=FCbingen=22?=) Date: Sun, 13 Aug 2017 19:29:15 +0200 Subject: [FieldTrip] Reject components using prepared vs. original data Message-ID: <59908C6B.20300@uni-tuebingen.de> Dear FieldTrip community, I highpass-filter and downsample my data in order to prepare them for doing an ICA. I want to apply the resulting unmixing matrix and my list of suspicious components to the original data (before downsampling and filtering). In the ECG artifacts tutorial [1], this is done like this: % decompose the original data as it was prior to downsampling to 150Hz cfg = []; cfg.unmixing = comp.unmixing; cfg.topolabel = comp.topolabel; comp_orig = ft_componentanalysis(cfg, data_orig); % the original data can now be reconstructed, excluding those components cfg = []; cfg.component = [4 17]; data_clean = ft_rejectcomponent(cfg,comp_orig, data_orig); However, based on some older posts on this mailinglist I tried to directly provide the components calculated on prepared data like this: data_clean2 = ft_rejectcomponent(cfg,comp, data_orig); The output for both versions seems to be identical. This is maybe not surprising considering that the only fields ft_rejectcomponents seems to use from the second input comp are .label, .topolabel, .unmixing and .topo. The first three are identical for comp and comp_orig. The values in comp.topo are however slightly different (in the order of 10^-14, looks like a precision issue?) compared to the values in comp_orig.topo. So my questions are: a) Are the two solutions equivalent or am I missing something? b) Where do the tiny differences in comp/comp_orig.topo come from? c) Should the tutorial be altered to the simpler version or are there scenarios in which the two versions are not equivalent? Thanks, Jens [1] http://www.fieldtriptoolbox.org/example/use_independent_component_analysis_ica_to_remove_ecg_artifacts -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopher.guettler at charite.de Sun Aug 13 21:32:47 2017 From: christopher.guettler at charite.de (=?Windows-1252?Q?G=FCttler=2C_Christopher?=) Date: Sun, 13 Aug 2017 19:32:47 +0000 Subject: [FieldTrip] Granger analysis In-Reply-To: <9CFD6835-3912-44A1-82BF-477E8D10A7B5@donders.ru.nl> References: , <9CFD6835-3912-44A1-82BF-477E8D10A7B5@donders.ru.nl> Message-ID: Gesendet mit meinem HTC ----- Nachricht beantworten ----- Von: "Schoffelen, J.M. (Jan Mathijs)" An: "FieldTrip discussion list" Betreff: [FieldTrip] Granger analysis Datum: Sa., Aug. 12, 2017 21:42 Hi Matt, I have never done this myself, but I think that in principle it should be possible to fit a set of models, and then compute the residuals’ variance ratio by hand. In other words, assuming data1 and data2 to be variables that consist of a single channel: mvar1 = ft_mvaranalysis(cfg, data1); mvar2 = ft_mvaranalysis(cfg, data2); mvar12 = ft_mvaranalysis(cfg, ft_appenddata([],data1,data2)); GC1to2 = log(mvar2.noisecov(1,1)./mvar12.noisecov(2,2)); GC2to1 = log(mvar1.noisecov(1,1)./mvar12.noisecov(1,1)); Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 12 Aug 2017, at 00:05, MATTHEW I BANKS > wrote: Greetings. What is the easiest way to compute non-spectrally resolved Granger causality, i.e. log(var(e_x)/var(e_xy)), where e_x and e_xy are the AR model error terms? -Matt ____________________________ Matthew I. Banks, Ph.D. Associate Professor Department of Anesthesiology University of Wisconsin 1300 University Avenue, Room 4605 Madison, WI 53706 office tel. (608)261-1143 lab tel. (608)263-6662 fax (608)263-2592 http://anesthesia.wisc.edu/index.php/Banks_Laboratory http://ntp.neuroscience.wisc.edu/banks.htm _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From christine.blume at sbg.ac.at Mon Aug 14 08:40:59 2017 From: christine.blume at sbg.ac.at (Blume Christine) Date: Mon, 14 Aug 2017 06:40:59 +0000 Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test Message-ID: Dear all, I am comparing event-related oscillatory responses in two conditions A and B. In each condition, subjects have been presented with two different stimulus types, let's take "houses" and "faces" as an easy example. What I have done so far is I compared the oscillatory responses to the two stimuli WITHIN each condition using cluster based permutation tests (depsamplesT; frequency range 4-15 Hz, 173 electrodes, 6 time bins). What I find is significant differences between "houses" and "faces" within each condition. However it seems that in higher frequencies there is also a difference between conditions A and B. Now reviewers have asked me to test this difference statistically. Unfortunately, I do not really know how to go about...any suggestions are highly appreciated! Best, Christine -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at donders.ru.nl Mon Aug 14 10:10:17 2017 From: t.marshall at donders.ru.nl (Marshall, T.R. (Tom)) Date: Mon, 14 Aug 2017 08:10:17 +0000 Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test In-Reply-To: References: Message-ID: <95C9A440AA5AB042A81E170A4573A15A7B9D8EC9@EXPRD98.hosting.ru.nl> Hi Christine, If I understand correctly: For each subject you have four conditions - A_face, A_house, B_face, B_house You compared A_face with A_house and there was a significant difference You compared B_face with B_house and there was also a significant difference Right? Now the reviewers want you to test if there is a difference between A and B You could: For every subject, create an average of A_face and A_house (let's call it A_avg) For every subject, create an average of B_face and B_house (let's call it B_avg) Compare A_avg and B_avg using depsamplesT Best, Tom ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Blume Christine [christine.blume at sbg.ac.at] Sent: 14 August 2017 08:40 To: FieldTrip discussion list (fieldtrip at science.ru.nl) Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test Dear all, I am comparing event-related oscillatory responses in two conditions A and B. In each condition, subjects have been presented with two different stimulus types, let’s take “houses” and “faces” as an easy example. What I have done so far is I compared the oscillatory responses to the two stimuli WITHIN each condition using cluster based permutation tests (depsamplesT; frequency range 4-15 Hz, 173 electrodes, 6 time bins). What I find is significant differences between “houses” and “faces” within each condition. However it seems that in higher frequencies there is also a difference between conditions A and B. Now reviewers have asked me to test this difference statistically. Unfortunately, I do not really know how to go about…any suggestions are highly appreciated! Best, Christine -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Mon Aug 14 14:27:30 2017 From: anne.urai at gmail.com (Anne Urai) Date: Mon, 14 Aug 2017 14:27:30 +0200 Subject: [FieldTrip] Fwd: [Comp-neuro] International Brain Laboratory Staff Positions Ads In-Reply-To: References: Message-ID: — Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany www.anneurai.net / @AnneEUrai ---------- Forwarded message ---------- From: Zachary Mainen Date: 11 August 2017 at 17:34 Subject: [Comp-neuro] International Brain Laboratory Staff Positions Ads To: Zach Mainen Cc: info at internationalbrainlab.com Dear all, Please see below 5 available positions for staff with the International Brain Lab. Dissemination through your contacts would be much appreciated. Best, Zach Mainen --- The International Brain Laboratory (https://www.internationalbrainlab.com/) is seeking 5 collaborators who will play key roles in a new large-scale international collaboration in brain research. The IBL combines the efforts of approximately 50 scientists in 20 laboratories toward understanding the brain-wide basis of a complex behavior. The project will involve recording the activity of millions of neurons in the working brain and building mathematical models of the resulting data. The data sets this project will produce are vast and complex, including physiological recordings, behavioural measurements, and video, all of which must be standardized into common formats, integrated into a single database, and subjected to quality control. These core positions will support the both experimental and theoretical work through the entire lifecycle of data, including acquisition, analysis, modeling and dissemination. Project Manager (PM) - The primary responsibilities of the PM will include ensuring delivery of key milestones, managing overall project budget and finances, facilitating project governance and internal communication, and liaising with funders, external agencies and partners. Candidates should have demonstrated success in project management of a comparable scale and a strong background in scientific research. Technical Manager (TM) - The TM will be responsible for ensuring reproducibility of experiments across labs by (1) helping to establish and maintain a common set of experimental apparatus for behavior and neural recordings and (2) establishing procedures for standardizing, monitoring and troubleshooting experimental conditions, including animal subjects, surgical procedures, materials, etc. The position will involve extensive travel between ten experimental laboratories at six institutions across the U.S. and Europe. The ideal candidate would have a PhD in neuroscience and very strong technical and experimental skills. Strong organizational and interpersonal skills are required. Prior experience in laboratory or project management is desirable. Data Coordinator (DC) - The DC will work closely with our contributing labs and scientific programming staff to ensure the integrity and organization of data collected by experimental labs. The ideal candidate would have a PhD in neuroscience, and extensive experience with large neurophysiological and behavioral datasets. Attention to detail and ability to work collaboratively are both essential. Strong computing ability is also important, including knowledge of relational databases, Python and MATLAB. Scientific MATLAB Programmer (SMP) - The SP will contribute to the design of applications and pipelines for organization, storage and analysis of this data. The job will involve building software and data infrastructure for this collaborative research project, and supporting it. The ideal candidate will have extensive experience with MATLAB and previous work with big data in scientific research. Knowledge of Python and relational databases and experience interfacing with experimental control hardware is desirable. Senior Scientific Programmer (SSP) - The SSP will lead the design of applications and pipelines for organization, storage and analysis of this data. The job will involve building software and data infrastructure, as well as a role in ensuring data integrity, working closely with data providers to ensure it meets project standards. The ideal candidate will have extensive experience with relational databases and Python. Experience with MATLAB, previous work with big data in scientific research, and experience interfacing with experimental control hardware would also be desirable. Remuneration will be competitive and commensurate with experience. There is considerable flexibility in base location within the U.S. and Europe. To apply, please send cover letter and CV to info at internationalbrainlab.com with subject: PositionAcronym LastName. Review of applications will begin immediately and continue until the position is filled, with an ideal start date of Sept.-Oct., 2017. --- Zachary F. Mainen, Ph.D. Champalimaud Neuroscience Programme Champalimaud Centre for the Unknown Av. Brasília s/n 1400-038 Lisbon Portugal +351 210 480 100 zmainen at neuro.fchampalimaud.org www.neuro.fchampalimaud.org/group/mainen @zmainen _______________________________________________ Comp-neuro mailing list Comp-neuro at neuroinformatics.be http://www.tnb.ua.ac.be/mailman/listinfo/comp-neuro -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomitbeker at gmail.com Tue Aug 15 04:54:41 2017 From: shlomitbeker at gmail.com (Shlomit Beker) Date: Mon, 14 Aug 2017 22:54:41 -0400 Subject: [FieldTrip] Bug in ft_channelrepair Message-ID: Hi All, I have a weird issue - I get error when calling ft_channelrepair, which I cannot find a solution for. For some datasets (but not for all), it gives the following error: Error using - Matrix dimensions must agree. Error in ft_channelrepair (line 196) distance = sqrt(sum((sens.chanpos(goodsensindx, :) - repmat(sens.chanpos(badsensindx, :), numel(goodsensindx), 1)).^2, 2)); Apparently, ft_channelrepair does not reconstruct some of the bad electrodes (in my case - PO8, P10), which cause sens.chanpos to be empty. Any help is appreciated! Shlomit Beker CNL lab Albert Einstein College of Medicine -------------- next part -------------- An HTML attachment was scrubbed... URL: From christine.blume at sbg.ac.at Tue Aug 15 13:15:37 2017 From: christine.blume at sbg.ac.at (Blume Christine) Date: Tue, 15 Aug 2017 11:15:37 +0000 Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test In-Reply-To: <95C9A440AA5AB042A81E170A4573A15A7B9D8EC9@EXPRD98.hosting.ru.nl> References: <95C9A440AA5AB042A81E170A4573A15A7B9D8EC9@EXPRD98.hosting.ru.nl> Message-ID: Hi Tom, Thanks a lot indeed for the quick reply. I do find significant differences between A_avg and B_avg in the frequency range where I expect them following the results from the within condition comparisons. Although it is not directly comparable because clusters may obviously differ, I guess that is the best I can do. Thanks again! Best, Christine Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Marshall, T.R. (Tom) Gesendet: Montag, 14. August 2017 10:10 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Post hoc comparison following cluster-based permutation test Hi Christine, If I understand correctly: For each subject you have four conditions - A_face, A_house, B_face, B_house You compared A_face with A_house and there was a significant difference You compared B_face with B_house and there was also a significant difference Right? Now the reviewers want you to test if there is a difference between A and B You could: For every subject, create an average of A_face and A_house (let's call it A_avg) For every subject, create an average of B_face and B_house (let's call it B_avg) Compare A_avg and B_avg using depsamplesT Best, Tom ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Blume Christine [christine.blume at sbg.ac.at] Sent: 14 August 2017 08:40 To: FieldTrip discussion list (fieldtrip at science.ru.nl) Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test Dear all, I am comparing event-related oscillatory responses in two conditions A and B. In each condition, subjects have been presented with two different stimulus types, let's take "houses" and "faces" as an easy example. What I have done so far is I compared the oscillatory responses to the two stimuli WITHIN each condition using cluster based permutation tests (depsamplesT; frequency range 4-15 Hz, 173 electrodes, 6 time bins). What I find is significant differences between "houses" and "faces" within each condition. However it seems that in higher frequencies there is also a difference between conditions A and B. Now reviewers have asked me to test this difference statistically. Unfortunately, I do not really know how to go about...any suggestions are highly appreciated! Best, Christine -------------- next part -------------- An HTML attachment was scrubbed... URL: From silas_chiu at yahoo.com Tue Aug 15 15:19:59 2017 From: silas_chiu at yahoo.com (Silas Chiu) Date: Tue, 15 Aug 2017 13:19:59 +0000 (UTC) Subject: [FieldTrip] Frequency bins changed after ft_freqstatistics References: <703842050.1982774.1502803199970.ref@mail.yahoo.com> Message-ID: <703842050.1982774.1502803199970@mail.yahoo.com> Dear Community, Nice to meet you all. My name is Ho Ching Chiu, currently working at the language lab in Experimental Psychology, University of Bristol, for a project on sentence comprehension using EEG. I tried to use ft_freqstatistics to do cluster-based permutation test, for a within-subject comparison of the power spectrum of 19 participants across 2 conditions. (Please refer to the codes below for more details.)Before this, I used ft_freqgrandaverage to conjugate the spectrum of all participants for each conditions, so the input data for the cluster-based permutation test (for each condition) is 4D (subj_chan_freq_time) and size(condition1.powspctrm) = [19 32 125 471]. There was no error / warning message in the process of running ft_freqstatistics. The problem is the frequency bins in the output data. The frequency bin of the input data is 1:1:125, and I expected the output(.stat .prob etc) will have the same dimension of 32 x 125 x 471. But what I get is 32 x 25 x 471, and the .freq of the output becomes 5:5:125, which is not expected. Could anyone please advice if I have set anything wrong in the process? Or is this some inherent limitation of the ft_freqstatistics function? Your help is much appreciated. Thank you very much. ---------code start---------load condition1 load condition2 cfg = []; cfg.channel          = 'all';cfg.latency          = 'all';cfg.frequency        = 'all'; cfg.method           = 'montecarlo';cfg.statistic        = 'ft_statfun_depsamplesT';    cfg.correctm         = 'cluster';cfg.clusteralpha     = 0.05;cfg.clusterstatistic = 'maxsum';cfg.minnbchan        = 2;    cfg.tail             = 0;    cfg.clustertail      = 0;    cfg.alpha            = 0.025;    cfg.numrandomization = 5000;  load neighboursfile % some predefined thingscfg.neighbours       = neighbours;     % cfg.design not relevant to this question, omitted for simplicity [stat] = ft_freqstatistics(cfg, condition1, condition2);  save stat_cond1_cond2 stat; -------code ends----------- Best regards,Ho Ching -------------- next part -------------- An HTML attachment was scrubbed... URL: From mapaul at uni-osnabrueck.de Wed Aug 16 10:53:30 2017 From: mapaul at uni-osnabrueck.de (mapaul at uni-osnabrueck.de) Date: Wed, 16 Aug 2017 10:53:30 +0200 (CEST) Subject: [FieldTrip] Calculation of within-subject interaction In-Reply-To: References: Message-ID: <54234.141.20.212.123.1502873610.squirrel@myuos.uni-osnabrueck.de> Dear fieldtrip community, I found this very helpful tutorial on how to calculate an interaction effect using a cluster-based permutation: http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests I have a question regarding this step: Copy GA11 to GAdiff11_12 and perform the assignment GAdiff11_12.avg=GA11.avg-GA12.avg. Copy GA21 to GAdiff21_22 and perform the assignment GAdiff21_22.avg=GA21.avg-GA22.avg. I have a full within-subjects design and I was wondering if it matters which of my factors I define as factor 1 and which as factor 2. In other words, is there a difference between calculating GA11.avg - GA12.avg followed by GA21.avg - GA22.avg as opposed to GA11.avg - GA21.avg followed by GA12.avg - GA22.avg and then running a permutation test on the differences? Any help would be greatly appreciated! Thanks and with best regards, Mariella From grigu at cbs.mpg.de Wed Aug 16 13:13:44 2017 From: grigu at cbs.mpg.de (Maren Grigutsch) Date: Wed, 16 Aug 2017 13:13:44 +0200 Subject: [FieldTrip] Calculation of within-subject interaction In-Reply-To: <54234.141.20.212.123.1502873610.squirrel@myuos.uni-osnabrueck.de> References: <54234.141.20.212.123.1502873610.squirrel@myuos.uni-osnabrueck.de> Message-ID: Dear Mariella, in my opinion, both approaches are equivalent because (A11 - A12) - (A21 - A22) = (A11 - A21) - (A12 - A22). Best, --Maren On 08/16/2017 10:53 AM, mapaul at uni-osnabrueck.de wrote: > Dear fieldtrip community, > > I found this very helpful tutorial on how to calculate an interaction > effect using a cluster-based permutation: > > http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests > > I have a question regarding this step: > > Copy GA11 to GAdiff11_12 and perform the assignment > GAdiff11_12.avg=GA11.avg-GA12.avg. > Copy GA21 to GAdiff21_22 and perform the assignment > GAdiff21_22.avg=GA21.avg-GA22.avg. > > I have a full within-subjects design and I was wondering if it matters > which of my factors I define as factor 1 and which as factor 2. In other > words, is there a difference between calculating > > GA11.avg - GA12.avg followed by GA21.avg - GA22.avg > as opposed to GA11.avg - GA21.avg followed by GA12.avg - GA22.avg > > and then running a permutation test on the differences? > > Any help would be greatly appreciated! > > Thanks and with best regards, > Mariella > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Maren Grigutsch Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr.1a, 04103 Leipzig, Germany Phone: +49 341 - 9940 136 Fax: +49 341 - 9940 2260 web: www.cbs.mpg.de From jiang.yizhou.i at gmail.com Thu Aug 17 13:03:08 2017 From: jiang.yizhou.i at gmail.com (Yizhou Jiang) Date: Thu, 17 Aug 2017 12:03:08 +0100 Subject: [FieldTrip] Same Pattern but different scale by using ft_freqbaseline or choose baseline in ft_singleplotTFR Message-ID: Dear all, I am using two different way to plot the figure after baseline correction. 1) do the baseline correction using the function 'ft_freqbaseline', and the plot the figure; 2) do not do baseline correction and add baseline when plot the figure using 'ft_singleplotTFR'. I am confused that two figures have similar pattern, but are different in z scale. I wonder is any error with my code (below). This is the code % POWER cfg = []; cfg.channel = 'all';%channels; cfg.method = 'wavelet'; %'wavelet' cfg.keeptrials = 'yes'; cfg.output = 'pow'; %'fourier'; %'pow';'powandcsd' cfg.foi = 5:2:200; %2:2:80 cfg.toi = -1:0.02:2; cfg.pad = 'nextpow2'; cfg.width = linspace(2,25,numel(cfg.foi)); %linspace(1,25,numel(cfg.foi)) POW = ft_freqanalysis(cfg, data); % *1)* % baseline correction cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype ='db'; POW_db = ft_freqbaseline(cfg,POW); figure;clf;cfg = []; cfg.xlim=[-0.5 1.2]; cfg.parameter = 'powspctrm'; cfg.ylim = 'maxmin'; cfg.linewidth =2; cfg.fontsize=12; F=ft_singleplotTFR(cfg,POW_db); [image: 内嵌图片 1] or *2)* %no base line correction before % figure;clf;cfg = []; cfg.xlim=[-0.5 1.2]; cfg.parameter = 'powspctrm'; cfg.ylim = 'maxmin'; cfg.linewidth =2; cfg.fontsize=12; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype ='db'; F=ft_singleplotTFR(cfg,POW); [image: 内嵌图片 2] Best wishes, Wendy -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 24423 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 27743 bytes Desc: not available URL: From awutz at mit.edu Fri Aug 18 00:06:09 2017 From: awutz at mit.edu (Andreas Wutz) Date: Thu, 17 Aug 2017 22:06:09 +0000 Subject: [FieldTrip] cluster-based test with Wilcoxon signrank test Message-ID: Dear fieldtrippers, I am trying to combine the Wilcoxon signrank test statistic with the cluster-based permutation approach. To this end, I wrote my own statfun, which calculates the Wilcoxon test statistic (using signrank.m in the stats toolbox) for each random partition. The output of my statfun is s.stat, which contains a z-value (which is output by the function signrank.m for high enough N). I understand that the cluster-based test does not depend on the specific test statistic used. My question applies to the initial threshold, which is used for clustering. As I see it, I have three options here. 1) parametric In this case, I would calculate the critical value(s) for a normal distribution (+/- 1.96) and set this as s.critval. 2 - 3) nonparametric_individual / nonparametric_common I assume the threshold is here based on the permutation distribution with those samples chosen for clustering that exceed the 1-clusteralpha quantile. is this assumption correct? What is the difference between those two methods? In general, I am unsure which of the three methods to choose. Which are the advantages / disadvantages of each option? I would be very happy about your feedback! Best, Andreas -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.suntrup-krueger at uni-muenster.de Fri Aug 18 12:45:31 2017 From: s.suntrup-krueger at uni-muenster.de (Sonja =?iso-8859-1?Q?Suntrup-Kr=FCger?=) Date: Fri, 18 Aug 2017 12:45:31 +0200 (CEST) Subject: [FieldTrip] How to apply ROI mask to grandavg Message-ID: Dear all, I want to compare task-related brain activation in a ROI in two groups of subjects. I performed LCMV beamformer analysis on single subject data and, after normalization, created a grandaverage of each group, which I need to compare statistically within a defined ROI. Since the option to create a ROI in ft_sourcestatistis is unfortunately no longer available since 2015, I had the following idea to create my ROI: By using ft_volumelookup I created a binary mask from an anatomical atlas indicating my ROI in standard space. Now I would like to apply this mask on my grandaverage data. In specific, I want to multiply my mask values (zeros and ones) with the "pow" values in my grandavg. This would set all the power values outside my ROI to zero. With the result from this procedure I can then calculate my statistc. My binary mask has the dimensions: x,y,z mask [181x217x181 logical] coordsys: 'spm' In my grandavg, the dimension "dim" is the same, but the power values ("pow") and their positions ("pos") are listed as a single long vector for each subject: pow: [7109137x6 double] (because there are 6 datasets in the grandavg) pos: [7109137x3 double] dim: [181 217 181] coordsys: 'spm' My question is: How does the "x,y,z"-data structure of "dim" relate to the "single long vector"-data structure of "pow"/"pos"? If I had this information, I could transform my mask into the same structure and apply it as explained above. Your help is greatly appreciated. Thank you very much! Sonja Suntrup-Krüger -- Sonja Suntrup-Krueger, MD Assistant Professor of Neurology Institute for Biomagnetism and Biosignalanalysis University of Muenster, Germany From maria.hakonen at gmail.com Fri Aug 18 16:01:14 2017 From: maria.hakonen at gmail.com (Maria Hakonen) Date: Fri, 18 Aug 2017 17:01:14 +0300 Subject: [FieldTrip] Problem with coordinate systems when creating head model Message-ID: Dear fieldtrip experts, I would need to create a volume conduction model of the head using standard_mri.m. standard_mri.m is in the spm coordinate system and my MEG data in the neuromag system. To get all data in the same coordinate system, I have converted standard_mri.m to neuromag using ft_volumerealign. However, ft_volumesegment converts MRI back to spm. Could someone please let me know how I can get the head model and MEG data in the same coordinate system? I really appreciate any help you can provide! Here is what I have tried: mri is in spm coordinate system: mri = dim: [181 217 181] anatomy: [181x217x181 uint8] transform: [4x4 double] hdr: [1x1 struct] unit: 'mm' coordsys: 'spm' Check fiducials for ft_volumerealign: hs=ft_read_headshape('aml_sentences16b_raw_tsss.fif', 'unit','mm'); hs.fid.pos ans = -66.1226 0.0000 -0.0000 -0.0000 83.5082 -0.0000 67.1784 -0.0000 -0.0000 hs.fid.label ans = 'LPA' 'Nasion' 'RPA' cfg = []; cfg.method= 'fiducial'; cfg.fiducial.nas = [-0.0000 83.5082 -0.0000]; cfg.fiducial.lpa = [-66.1226 0.0000 -0.0000]; cfg.fiducial.rpa = [67.1784 -0.0000 -0.0000]; cfg.coordsys= 'neuromag'; cfg.headshape = hs; mri_realigned = ft_volumerealign(cfg, mri); mri_realigned seems to be in neuromag system as it should be. mri_realigned = dim: [181 217 181] anatomy: [181x217x181 uint8] transform: [4x4 double] hdr: [1x1 struct] unit: 'mm' coordsys: 'neuromag' inside: [181x217x181 logical] transformorig: [4x4 double] cfg: [1x1 struct] However, ft_volumesegment converts it back to spm system: cfg = []; cfg.output = 'brain'; cfg.coordsys = 'neuromag'; segmentedmri = ft_volumesegment(cfg, mri_realigned); Warning: The option cfg.coordsys is deprecated, support is no longer guaranteed > In ft_checkconfig (line 168) In ft_volumesegment (line 170) the input is volume data with dimensions [181 217 181] Converting the coordinate system from neuromag to spm I also tried to convert MEG data to spm system as follows: hdr = ft_read_header('aml_sentences16b_raw_tsss.fif', 'unit','mm'); cfg = []; cfg.method= 'fiducial'; cfg.target.pos(1,:) = [1 0 0]; cfg.target.pos(1,:) = [0 83 0]; cfg.target.pos(1,:) = [0 -117 0]; cfg.target.lab = {'NAS', 'LPA', 'RPA'}; cfg.grad = hdr.grad; mri_realigned = ft_sensorrealign(cfg); … but got: Warning: FT_SENSORREALIGN is deprecated, please use FT_ELECTRODEREALIGN instead. > In ft_sensorrealign (line 118) using gradiometers specified in the configuration Reference to non-existent field 'label'. Error in ft_datatype_sens (line 148) nchan = length(sens.label); Error in ft_sensorrealign (line 247) tmp(i) = ft_datatype_sens(template(i)); % ensure up-to-date sensor description template(i) seems to be as follows: ans = pos: [0 -117 0] lab: {'NAS' 'LPA' 'RPA'} I think that ft_electroderealign only works with EEG data since it gives: mri_realigned = ft_electroderealign(cfg); Warning: The field cfg.headshape is forbidden, it will be removed from your configuration > In ft_checkconfig (line 215) In ft_electroderealign (line 212) using gradiometers specified in the configuration Reference to non-existent field 'elecpos'. Error in ft_electroderealign (line 254) assert(isequaln(elec_original.elecpos, elec_original.chanpos), 'this function requires same electrode and channel positions.'); Best, Maria -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.ketz at gmail.com Fri Aug 18 23:40:11 2017 From: nick.ketz at gmail.com (Nick Ketz) Date: Fri, 18 Aug 2017 14:40:11 -0700 Subject: [FieldTrip] bias in cluster stats from density of frequency sampling? Message-ID: I've recently gotten into an internal debate about what the optimal frequency sampling (using wavelet decomposition) would be for a given range of frequencies, and it has given rise a few points of discussion: over all my general question is this: Is it possible to bias the cluster based permutation statistics by over sampling the frequency domain? Consider the case where you have two true signals, one at 2Hz and one at 10Hz. Now, in an absurd scenario you sample every 1Hz in delta band (i.e. 1, 2 and 3Hz), and you sample every 0.1Hz in alpha (i.e. 8:.1:12 = 41bins). Now you go and do a cluster based analysis, are you more likely to find the 10Hz signal because you have 10 frequency that are within that range (10.0 to 10.9Hz) compared to the 2Hz signal in which you only have 1 bin? My intuition is that, yes, you would be biased because the t-values form 10.0 to 10.9Hz would get grouped and summed together to characterize the 10Hz cluster, and only the single 2Hz bin t-values would characterize to the 2Hz signal. This question is arising from a sampling strategy that seems optimal and least biased to me, which is to space your frequency bins at intervals related to the uncertainty in the frequency estimate (i.e. frequency/wavelet-width). Using this strategy you end up with far fewer bins in the mid to higher frequency bands, beta and gammer, and many more in the lower bands (things get more complicated when your widths are frequency dependent). Will this bias cluster based analyses from finding clusters in these higher freqs compared to a linear sampling scheme? Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Sat Aug 19 14:55:29 2017 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sat, 19 Aug 2017 12:55:29 +0000 Subject: [FieldTrip] How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) Message-ID: Sonja. You are definitely on the right track. pow: [7109137x6 double] (because there are 6 datasets in the grandavg) pos: [7109137x3 double] dim: [181 217 181] The dim are the size of the cube for your source model matrix. The pow/pos and other matrices are linear. The linear arrays are a little easier to manipulate, may be the reason that FT decided to use these rather than have 3D matrices. 181*217*181 = 7109137. If you create a ROI matrix, it would either be of dimensions, N-ROI X 181 X 217 X 181, or more conveniently you could reshape it into a N-ROI x 7109137. Then multiply the ROI matrix * the pow, e.g., [N-ROI X 7109137] * [7109137 X 6] = N-ROI * 6. This would sum across each voxel in the source model matrix for each roi. You can imagine a single ROI of the entire source model (1 x N-dipoles), this would sum across all voxels in the source model. Or a single ROI, say of the IFG, in the ROI matrix, would give you the sum of the CDR pow data in the IFG. Or 10 selected ROIs; etc etc. I also often put the POW data into a MRI volume. In the MATLAB format a NIFTI MRI volume struct representing this source model would have a img member that is 181 x 217 x 181. You can simply assign the POW to the img model to get the CDR data into the MRI volume, e.g., MRIVOLUME.img = pow. Then save or manipulate the MRI volume struct. 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 ************************************************* -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of fieldtrip-request at science.ru.nl Sent: Saturday, August 19, 2017 6:00 AM To: fieldtrip at science.ru.nl Subject: fieldtrip Digest, Vol 81, Issue 16 Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit https://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. How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) 2. Problem with coordinate systems when creating head model (Maria Hakonen) 3. bias in cluster stats from density of frequency sampling? (Nick Ketz) ---------------------------------------------------------------------- Message: 1 Date: Fri, 18 Aug 2017 12:45:31 +0200 (CEST) From: Sonja Suntrup-Kr?ger To: Subject: [FieldTrip] How to apply ROI mask to grandavg Message-ID: Content-Type: text/plain; charset=iso-8859-1 Dear all, I want to compare task-related brain activation in a ROI in two groups of subjects. I performed LCMV beamformer analysis on single subject data and, after normalization, created a grandaverage of each group, which I need to compare statistically within a defined ROI. Since the option to create a ROI in ft_sourcestatistis is unfortunately no longer available since 2015, I had the following idea to create my ROI: By using ft_volumelookup I created a binary mask from an anatomical atlas indicating my ROI in standard space. Now I would like to apply this mask on my grandaverage data. In specific, I want to multiply my mask values (zeros and ones) with the "pow" values in my grandavg. This would set all the power values outside my ROI to zero. With the result from this procedure I can then calculate my statistc. My binary mask has the dimensions: x,y,z mask [181x217x181 logical] coordsys: 'spm' In my grandavg, the dimension "dim" is the same, but the power values ("pow") and their positions ("pos") are listed as a single long vector for each subject: pow: [7109137x6 double] (because there are 6 datasets in the grandavg) pos: [7109137x3 double] dim: [181 217 181] coordsys: 'spm' My question is: How does the "x,y,z"-data structure of "dim" relate to the "single long vector"-data structure of "pow"/"pos"? If I had this information, I could transform my mask into the same structure and apply it as explained above. Your help is greatly appreciated. Thank you very much! Sonja Suntrup-Kr?ger -- Sonja Suntrup-Krueger, MD Assistant Professor of Neurology Institute for Biomagnetism and Biosignalanalysis University of Muenster, Germany ******************************* From robpetrosino at gmail.com Sat Aug 19 18:42:57 2017 From: robpetrosino at gmail.com (Roberto Petrosino) Date: Sat, 19 Aug 2017 18:42:57 +0200 Subject: [FieldTrip] adding info about individual trials Message-ID: <8E89FC7C-FA23-42AE-B0D9-3981F5B8241E@gmail.com> Hello everyone, I just started learning FieldTrip, and I am still adjusting to it, so apologies if my question is very basic. Before running standard pre-processing steps and artifact rejection, I need to add specific information about individual trials of my non-epoched EEG data (i.e., which word was presented for specific trials), but I can’t find my way in the documentation online. Is there any specific function it might be appropriate for this purpose? Thanks in advance, -Roberto ---------- Roberto Petrosino Ph.D. Student in Linguistics CT Institute for the Brain and Cognitive Sciences University of Connecticut -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sun Aug 20 14:01:45 2017 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 20 Aug 2017 20:01:45 +0800 Subject: [FieldTrip] adding info about individual trials Message-ID: This really depends what you want to use that information for. Normally I would think that all trials should be preprocessed in the same way regardless of condition, so I don't really need this information at that stage, but later on it might be useful for things like regressing ERP amplitude on word length or something. But for stuff like this you don't necessarily have to have this information *in* the data structure. For example, imagine I want to know which word was presented each trial. Typically, I have that list in a text file somewhere, in order (i.e., the first line of the text file is trial 1, the second line is trial 2, etc.). Then I do my various preprocessing of the EEG data in fieldtrip. Rather than actually removing the trials with artifacts, at first I just keep a list of which trials have artifact (or, better yet, which trials are 'good', without artifacts). Then I can use that list at the end of my processing pipeline to pull out the good trials and match them up to which words they are, and I can run whatever statistics I need on that. But there is no fieldtrip-specific tricks about that; I just have a text file listing all the information I need and I read that into MATLAB. --- Stephen Politzer-Ahles The Hong Kong Polytechnic University Department of Chinese and Bilingual Studies http://www.mypolyuweb.hk/~sjpolit/ > > > ------------------------------ > > Message: 2 > Date: Sat, 19 Aug 2017 18:42:57 +0200 > From: Roberto Petrosino > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] adding info about individual trials > Message-ID: <8E89FC7C-FA23-42AE-B0D9-3981F5B8241E at gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello everyone, > > I just started learning FieldTrip, and I am still adjusting to it, so > apologies if my question is very basic. > > Before running standard pre-processing steps and artifact rejection, I > need to add specific information about individual trials of my non-epoched > EEG data (i.e., which word was presented for specific trials), but I can?t > find my way in the documentation online. Is there any specific function it > might be appropriate for this purpose? > > Thanks in advance, > > -Roberto > > ---------- > Roberto Petrosino > Ph.D. Student in Linguistics > CT Institute for the Brain and Cognitive Sciences > University of Connecticut > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: attachments/20170819/3ae6923e/attachment-0001.html> > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 81, Issue 17 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.ketz at gmail.com Mon Aug 21 07:48:51 2017 From: nick.ketz at gmail.com (Nick Ketz) Date: Sun, 20 Aug 2017 22:48:51 -0700 Subject: [FieldTrip] adding info about individual trials Message-ID: You can create a custom trial function that does something like this: http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition Or, if you can just add that info to the trialinfo matrix after epoching but before removing artifacts -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornelia.quaedflieg at uni-hamburg.de Mon Aug 21 21:50:31 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Mon, 21 Aug 2017 21:50:31 +0200 Subject: [FieldTrip] head model - not able to use singleshell - different plot Message-ID: <010601d31ab6$bf6650c0$3e32f240$@uni-hamburg.de> Dear fieldtrip users, I have two simple questions about constructing an individual head model that keep me puzzling. 1. I get a warning when using cfg.method = 'singleshell'; The warning is: Warning: please specify cfg.method='projectmesh', 'iso2mesh' or 'isosurface' > In ft_prepare_mesh at 138 In ft_prepare_headmodel at 344 Warning: using 'projectmesh' as default I checked the cfg.method in the reference documentation as well as in the manuals on the fieldtrip website and here it is used as well. Does anyone have an idea why I can't use it? My full code is: cfg = []; cfg.method = 'singleshell'; hdm = ft_prepare_headmodel(cfg, seg); 2. when plotting the template grid in single-subject head coordinates, superimposed onto the head model my looks different than the plot of the manual (see below). Could this be related to the fact that the singleshell is not used when preparing the head model? Or might there be something else wrong in my code? My plot The plot in the manual The full code is: % and this is where the template source models are templatedir = fullfile(ftdir, 'template', 'sourcemodel'); load(fullfile(templatedir, 'standard_sourcemodel3d8mm')); template = sourcemodel; clear sourcemodel; % inverse-warp the template grid to subject specific coordinates cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri = mri_spm_rs; cfg.grid.unit = 'mm'; sourcemodel = ft_prepare_sourcemodel(cfg); figure; hold on % plot all objects in one figure ft_plot_mesh(sourcemodel.pos(sourcemodel.inside,:)); ft_plot_vol(hdm, 'facecolor', 'cortex', 'edgecolor', 'none');alpha 0.4; camlight; Any help is really appreciated E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 41493 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image006.jpg Type: image/jpeg Size: 10483 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image007.jpg Type: image/jpeg Size: 5384 bytes Desc: not available URL: From s.suntrup-krueger at uni-muenster.de Tue Aug 22 09:15:36 2017 From: s.suntrup-krueger at uni-muenster.de (Sonja =?iso-8859-1?Q?Suntrup-Kr=FCger?=) Date: Tue, 22 Aug 2017 09:15:36 +0200 (CEST) Subject: [FieldTrip] How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) In-Reply-To: Message-ID: Dear John, hello everyone, thank you very much for your valuable response!! Your suggestion is exactly what I had in mind. However, as I see it, if I want to do the multiplication you suggested (multiply the ROI matrix * the pow), the question that remains is how to reshape the ROI-matrix correcly. In other words: How do the Voxel indices of the linear pos (or pow) -matrix relate to the voxel indices of the dim-cube matrix? I think this is what I need to know to correctly reshape my ROI-matrix from cube (N-ROI X 181 X 217 X 181) to linear (N-ROI x 7109137) prior to the multiplication step. Further advice is greatly appreciated! Thank you very much! Sincerely, Sonja RICHARDS, JOHN schrieb am 2017-08-19: > Sonja. You are definitely on the right track. > pow: [7109137x6 double] (because there are 6 datasets in the grandavg) > pos: [7109137x3 double] > dim: [181 217 181] > The dim are the size of the cube for your source model matrix. The pow/pos and other matrices are linear. The linear arrays are a little easier to manipulate, may be the reason that FT decided to use these rather than have 3D matrices. 181*217*181 = 7109137. > If you create a ROI matrix, it would either be of dimensions, N-ROI X 181 X 217 X 181, or more conveniently you could reshape it into a N-ROI x 7109137. > Then multiply the ROI matrix * the pow, e.g., > [N-ROI X 7109137] * [7109137 X 6] = N-ROI * 6. > This would sum across each voxel in the source model matrix for each roi. You can imagine a single ROI of the entire source model (1 x N-dipoles), this would sum across all voxels in the source model. > Or a single ROI, say of the IFG, in the ROI matrix, would give you the sum of the CDR pow data in the IFG. Or 10 selected ROIs; etc etc. > I also often put the POW data into a MRI volume. In the MATLAB format a NIFTI MRI volume struct representing this source model would have a img member that is 181 x 217 x 181. You can simply assign the POW to the img model to get the CDR data into the MRI volume, e.g., MRIVOLUME.img = pow. Then save or manipulate the MRI volume struct. > 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 > ************************************************* > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of fieldtrip-request at science.ru.nl > Sent: Saturday, August 19, 2017 6:00 AM > To: fieldtrip at science.ru.nl > Subject: fieldtrip Digest, Vol 81, Issue 16 > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > To subscribe or unsubscribe via the World Wide Web, visit > https://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. How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) > 2. Problem with coordinate systems when creating head model > (Maria Hakonen) > 3. bias in cluster stats from density of frequency sampling? > (Nick Ketz) > ---------------------------------------------------------------------- > Message: 1 > Date: Fri, 18 Aug 2017 12:45:31 +0200 (CEST) > From: Sonja Suntrup-Kr?ger > To: > Subject: [FieldTrip] How to apply ROI mask to grandavg > Message-ID: > > Content-Type: text/plain; charset=iso-8859-1 > Dear all, > I want to compare task-related brain activation in a ROI in two groups of subjects. I performed LCMV beamformer analysis on single subject data and, after normalization, created a grandaverage of each group, which I need to compare statistically within a defined ROI. > Since the option to create a ROI in ft_sourcestatistis is unfortunately no longer available since 2015, I had the following idea to create my ROI: > By using ft_volumelookup I created a binary mask from an anatomical atlas indicating my ROI in standard space. Now I would like to apply this mask on my grandaverage data. In specific, I want to multiply my mask values (zeros and ones) with the "pow" values in my grandavg. > This would set all the power values outside my ROI to zero. With the result from this procedure I can then calculate my statistc. > My binary mask has the dimensions: x,y,z > mask [181x217x181 logical] > coordsys: 'spm' > In my grandavg, the dimension "dim" is the same, but the power values ("pow") and their positions ("pos") are listed as a single long vector for each subject: > pow: [7109137x6 double] (because there are 6 datasets in the grandavg) > pos: [7109137x3 double] > dim: [181 217 181] > coordsys: 'spm' > My question is: How does the "x,y,z"-data structure of "dim" relate to the "single long vector"-data structure of "pow"/"pos"? If I had this information, I could transform my mask into the same structure and apply it as explained above. > Your help is greatly appreciated. > Thank you very much! > Sonja Suntrup-Kr?ger > -- > Sonja Suntrup-Krueger, MD > Assistant Professor of Neurology > Institute for Biomagnetism and Biosignalanalysis University of Muenster, Germany > ******************************* From RICHARDS at mailbox.sc.edu Tue Aug 22 15:17:06 2017 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Tue, 22 Aug 2017 13:17:06 +0000 Subject: [FieldTrip] How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) In-Reply-To: References: Message-ID: Sonja: The x,y,z of the dim are the dimensions of a 3D matrix; the pos and pow are linear matrices, and are stacked as if they were an XYZ atlas. How to do the other stuff is MATLAB programming. If you have a 3D matrix, you can treat is like a linear matrix for multiplication. e.g., ROIMATRIX(x, y, z) can be accessed linearly with ROIMATRIX(:). If you have a 4D matrix (nROI,x,y,z), it could be reshaped reshapematrix=reshape(ROIMATRIX,nROI,size(ROIMATRIX,2)*size(ROIMatrix,3)*size(ROIMATRIX,4)); This will give a matrix with (nROI,nVoxels), similar in dimension to the pos or pow matrix. Or. Keep your ROI atlas in the FT format in the first place (e.g. nROI X length(pos)) and then you won't have to transform it for the operations with the pow vector. There are several other ways to do this in MATLAB. One way is to use indices rather than 3D matrices. You can translate each 3D ROI into an index matrix with sub2ind; then use the resulting indices to access the corresponding elements in the pow (e.g., extractroi=pow(indices)), and simply sum or get an average of the elements in extractroi. This is MATLAB program rather than FT programming. 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 ************************************************* -----Original Message----- From: Sonja Suntrup-Krüger [mailto:s.suntrup-krueger at uni-muenster.de] Sent: Tuesday, August 22, 2017 3:16 AM To: RICHARDS, JOHN ; fieldtrip at science.ru.nl Subject: Re: How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) Dear John, hello everyone, thank you very much for your valuable response!! Your suggestion is exactly what I had in mind. However, as I see it, if I want to do the multiplication you suggested (multiply the ROI matrix * the pow), the question that remains is how to reshape the ROI-matrix correcly. In other words: How do the Voxel indices of the linear pos (or pow) -matrix relate to the voxel indices of the dim-cube matrix? I think this is what I need to know to correctly reshape my ROI-matrix from cube (N-ROI X 181 X 217 X 181) to linear (N-ROI x 7109137) prior to the multiplication step. Further advice is greatly appreciated! Thank you very much! Sincerely, Sonja RICHARDS, JOHN schrieb am 2017-08-19: > Sonja. You are definitely on the right track. > pow: [7109137x6 double] (because there are 6 datasets in the grandavg) > pos: [7109137x3 double] > dim: [181 217 181] > The dim are the size of the cube for your source model matrix. The pow/pos and other matrices are linear. The linear arrays are a little easier to manipulate, may be the reason that FT decided to use these rather than have 3D matrices. 181*217*181 = 7109137. > If you create a ROI matrix, it would either be of dimensions, N-ROI X 181 X 217 X 181, or more conveniently you could reshape it into a N-ROI x 7109137. > Then multiply the ROI matrix * the pow, e.g., [N-ROI X 7109137] * > [7109137 X 6] = N-ROI * 6. > This would sum across each voxel in the source model matrix for each roi. You can imagine a single ROI of the entire source model (1 x N-dipoles), this would sum across all voxels in the source model. > Or a single ROI, say of the IFG, in the ROI matrix, would give you the sum of the CDR pow data in the IFG. Or 10 selected ROIs; etc etc. > I also often put the POW data into a MRI volume. In the MATLAB format a NIFTI MRI volume struct representing this source model would have a img member that is 181 x 217 x 181. You can simply assign the POW to the img model to get the CDR data into the MRI volume, e.g., MRIVOLUME.img = pow. Then save or manipulate the MRI volume struct. > 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 > ************************************************* > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of > fieldtrip-request at science.ru.nl > Sent: Saturday, August 19, 2017 6:00 AM > To: fieldtrip at science.ru.nl > Subject: fieldtrip Digest, Vol 81, Issue 16 > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > To subscribe or unsubscribe via the World Wide Web, visit > https://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. How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) > 2. Problem with coordinate systems when creating head model > (Maria Hakonen) > 3. bias in cluster stats from density of frequency sampling? > (Nick Ketz) > ---------------------------------------------------------------------- > Message: 1 > Date: Fri, 18 Aug 2017 12:45:31 +0200 (CEST) > From: Sonja Suntrup-Kr?ger > To: > Subject: [FieldTrip] How to apply ROI mask to grandavg > Message-ID: > > er.de> > Content-Type: text/plain; charset=iso-8859-1 > Dear all, > I want to compare task-related brain activation in a ROI in two groups of subjects. I performed LCMV beamformer analysis on single subject data and, after normalization, created a grandaverage of each group, which I need to compare statistically within a defined ROI. > Since the option to create a ROI in ft_sourcestatistis is unfortunately no longer available since 2015, I had the following idea to create my ROI: > By using ft_volumelookup I created a binary mask from an anatomical atlas indicating my ROI in standard space. Now I would like to apply this mask on my grandaverage data. In specific, I want to multiply my mask values (zeros and ones) with the "pow" values in my grandavg. > This would set all the power values outside my ROI to zero. With the result from this procedure I can then calculate my statistc. > My binary mask has the dimensions: x,y,z > mask [181x217x181 logical] > coordsys: 'spm' > In my grandavg, the dimension "dim" is the same, but the power values ("pow") and their positions ("pos") are listed as a single long vector for each subject: > pow: [7109137x6 double] (because there are 6 datasets in the grandavg) > pos: [7109137x3 double] > dim: [181 217 181] > coordsys: 'spm' > My question is: How does the "x,y,z"-data structure of "dim" relate to the "single long vector"-data structure of "pow"/"pos"? If I had this information, I could transform my mask into the same structure and apply it as explained above. > Your help is greatly appreciated. > Thank you very much! > Sonja Suntrup-Kr?ger > -- > Sonja Suntrup-Krueger, MD > Assistant Professor of Neurology > Institute for Biomagnetism and Biosignalanalysis University of > Muenster, Germany > ******************************* From christine.blume at sbg.ac.at Wed Aug 23 15:31:07 2017 From: christine.blume at sbg.ac.at (Blume Christine) Date: Wed, 23 Aug 2017 13:31:07 +0000 Subject: [FieldTrip] Effect size measure for cluster-based permutation tests Message-ID: Dear all, I came across a question posted by someone about a year ago, which concerned effect size measures for cluster-based permutation tests. Unfortunately, the question does not seem to have been answered... Q: I am using cluster-based permutation tests (depsamplesT, on time-frequency data) and am wondering how to best calculate an effect size from that. Best, Christine -------------- next part -------------- An HTML attachment was scrubbed... URL: From alik.widge at gmail.com Wed Aug 23 16:41:44 2017 From: alik.widge at gmail.com (Alik Widge) Date: Wed, 23 Aug 2017 10:41:44 -0400 Subject: [FieldTrip] Effect size measure for cluster-based permutation tests In-Reply-To: References: Message-ID: My naive answer, which perhaps will provoke Eric to provide a better one: you have the actual cluster statistic and its permutation distribution under the null hypothesis. It seems as though that distribution could be assumed Gaussian and something like Cohen's d calculated. On Aug 23, 2017 9:35 AM, "Blume Christine" wrote: > Dear all, > > > > I came across a question posted by someone about a year ago, which > concerned effect size measures for cluster-based permutation tests. > Unfortunately, the question does not seem to have been answered… > > > > Q: I am using cluster-based permutation tests (depsamplesT, on > time-frequency data) and am wondering how to best calculate an effect size > from that. > > > > Best, > > Christine > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ainsley.temudo at nyu.edu Wed Aug 23 22:00:19 2017 From: ainsley.temudo at nyu.edu (Ainsley Temudo) Date: Thu, 24 Aug 2017 00:00:19 +0400 Subject: [FieldTrip] ROI masks for cortical surface source model Message-ID: Hi everyone, I have a few questions regarding how to use the atlases to create ROI masks to use for my source analysis 1. *how do you use the freesurfer atlas*. i’ve tried ft_read_atlas({'aparc+aseg.mgz','SPNS1151-oct-6-src.fif’}) but I don’t think this is the correct use because I get a structure with an aparc field which is 256x256x256. I don’t see the link between this and my source model. It tried using ft_volumelookup after (using the volume that was put through freesufer as an input ) but this also gives a 256x256x256 mask. I know at some point I have to orig.inuse to link the vertices in the high resolution tessellation to those in the sourcemodel. but i’m missing something or doing something wrong before this. 1. *If I want to use a template atlas, how do I link that to my source space.* I tried following this http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space . but how do I warp the cortical sheet grid that i've already created to the the template grid. 3. *Is it possible to use an ROI mask that was created from fMRI data in afni in **field trip?* I can read in the ROI using ft_read_atlas, but have no idea how that could be used to select the corresponding grid points in my source model. would really appreciate if someone could help answer this questions Thanks! Ainsley -------------- next part -------------- An HTML attachment was scrubbed... URL: From psc.dav at gmail.com Wed Aug 23 22:57:46 2017 From: psc.dav at gmail.com (David Pascucci) Date: Wed, 23 Aug 2017 22:57:46 +0200 Subject: [FieldTrip] single trials eLoreta Message-ID: Dear fieldtrip experts, I am doing single-trial connectivity in the source space with EEG, and I moved recently to fieldtrip. I am trying to use the eLoreta method to get single-trial estimates in the following way: % eLORETA cfg = []; cfg.method = 'eloreta'; cfg.grid = leadfield; cfg.headmodel = headmodel; cfg.eloreta.keepfilter = 'yes'; cfg.eloreta.normalize = 'yes'; cfg.eloreta.lambda = 0.05; *(1) cfg.eloreta.projectnoise = 'yes'; eLO_source = ft_sourceanalysis(cfg,data); % in the above line, "data" is the results of ft_timelockanalysis % with cfg.covariance = 'yes'; *(2) % then I put the source positions from the MNI template I % used for the sourcemodel (see: % http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject- % specific_grids_that_are_equivalent_across_subjects_in_normalized_space eLO_source.pos = template_grid.pos; iPOS = eLO_source.pos; iPOS(eLO_source.inside==0,:) = NaN; % only points inside gray matter % Then I select ROIs (here only one for simplicity) to extract single-trial source activity: [v,I] = min(pdist2(iPOS, ROIs_mni , 'euclidean')); % And I multiply the spatial filter for the EEG data in each trial W = eLO_source.avg.filter{I}; % filter at my ROI of interest for tr = 1:size(data.trial,1) % loop over trials trials{tr} = W * squeeze(data.trial(tr,:,:)); *(3) end My 3 questions (marked at the right of the above code) are the following: (0, not marked above): Is this approach correct? (1) Is there a way to select the best lambda parameter (e.g., selecting the one that best approximates the activity at the EEG channels level)? (2) I am confused about the role of the covariance, since it doesn't seem to be used when source activity is estimated using the set of spatial filters at the single trial (my lack of knowledge) (3) Is the "trials{tr} = W * squeeze(data.trial(tr,:,:)); " approach correct to get time-series of source activity in a ROI? I hope this was clear enough, looking forward for your feedback. Best, David -- --------------------- David Pascucci Postdoctoral Fellow University of Fribourg Department of Psychology Rue de Faucigny 2 1700 Fribourg Switzerland -------------- next part -------------- An HTML attachment was scrubbed... URL: From juliacoopiza at gmail.com Wed Aug 23 23:16:05 2017 From: juliacoopiza at gmail.com (Julia Coopi) Date: Wed, 23 Aug 2017 15:16:05 -0600 Subject: [FieldTrip] Using PPC method Message-ID: Dear Fieldtrippers, I am new in fieltrip. I want to use pair wise phase consistency method for measuring the spike-pahse locking. My data set is recorded by neuralynx. For measuring it I found this link: http://www.fieldtriptoolbox.or g/tutorial/spikefield. Is it the right link? Should I go through all steps including reading spikes and LFPs from neuralynx, make trails and .... finally call thefollowing function? ft_spiketriggeredspectrum It is very boring and time consuming. Actually, I imported files into matlab and make the trials which was a huge work at that time. I don't want to do it again and import data from neuralynx by fieldtrip (which seems is not very straighforward). I want to use the PPC method of fieldtrip using imported files into matlab. Is there any way to do that? Please guide me what is the best way. Thanks, Julia -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascualm at key.uzh.ch Thu Aug 24 05:27:40 2017 From: pascualm at key.uzh.ch (pascualm at key.uzh.ch) Date: Thu, 24 Aug 2017 12:27:40 +0900 Subject: [FieldTrip] =?utf-8?q?Innovations_orthogonalization=3A_a_solution?= =?utf-8?q?_to_the_major_pitfalls_of_EEG/MEG_=E2=80=9Cleakage_corre?= =?utf-8?b?Y3Rpb27igJ0=?= Message-ID: Dear Colleagues, The pre-print at: https://doi.org/10.1101/178657 might be of interest to those working in the field of brain connectivity based on signals of electric neuronal activity. It is shown that "leakage correction" in the form of "signal orthogonalization" consistently produces false connectomes. More importantly, a new method is proposed for the resolution ("unmixing") of electrophysiological signals, based on "innovations orthogonalization". -------- Abstract : The problem of interest here is the study of brain functional and effective connectivity based on non-invasive EEG-MEG inverse solution time series. These signals generally have low spatial resolution, such that an estimated signal at any one site is an instantaneous linear mixture of the true, actual, unobserved signals across all cortical sites. False connectivity can result from analysis of these low-resolution signals. Recent efforts toward “unmixing” have been developed, under the name of “leakage correction”. One recent noteworthy approach is that by Colclough et al (2015 NeuroImage, 117:439-448), which forces the inverse solution signals to have zero cross-correlation at lag zero. One goal is to show that Colclough’s method produces false human connectomes under very broad conditions. The second major goal is to develop a new solution, that appropriately “unmixes” the inverse solution signals, based on innovations orthogonalization. The new method first fits a multivariate autoregression to the inverse solution signals, giving the mixed innovations. Second, the mixed innovations are orthogonalized. Third, the mixed and orthogonalized innovations allow the estimation of the “unmixing” matrix, which is then finally used to “unmix” the inverse solution signals. It is shown that under very broad conditions, the new method produces proper human connectomes, even when the signals are not generated by an autoregressive model. -------- Cordially, Roberto ... Roberto D. Pascual-Marqui, PhD, PD The KEY Institute for Brain-Mind Research, University of Zurich Visiting Professor at Neuropsychiatry, Kansai Medical University, Osaka [www.keyinst.uzh.ch/loreta] [scholar.google.com/citations?user=pascualmarqui] From rikkert.hindriks at upf.edu Thu Aug 24 11:58:14 2017 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Thu, 24 Aug 2017 11:58:14 +0200 Subject: [FieldTrip] MEG magnetometer leadfields Message-ID: Dear all, I'm generating simulated data for leadfield matrices for the CTF 275 axial gradiometer system and I would like to compare different the results with those obtained from data simulated using a magnetometer configuration. It is possible to generate equivalent magnetometer leadfield matrices? (Equivalent in the sense of having the same number of coils at the same positions). Thanks and kind regards, Rikkert Virus-free. www.avg.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Thu Aug 24 13:11:27 2017 From: michelic72 at gmail.com (Cristiano Micheli) Date: Thu, 24 Aug 2017 13:11:27 +0200 Subject: [FieldTrip] MEG magnetometer leadfields In-Reply-To: References: Message-ID: Dear Rikkert, as far as I know the CTF toolbox is incorporated in the /external directory of FieldTrip and can help you a big deal. If, for example, you recorded or have access to original CTF recordings you can use the readin functions (ft_read_header) to read your datasets. After read-in,you will find that one of the header fields is called 'grad' andin there you have the information of all coils positions. See also this for further reading: http://www.fieldtriptoolbox.org/getting_started/ctf?s[]=ctf One of the grad sub-fields is called 'tra' and contains the magnetometers (columns) to gradiometer (rows) weights matrix. If you take care to define a new 'tra' matrix which weights 1 for each magnetometer then you reach your goal. You'll probably need to look into *grad.coilpos *and retain only a subset of your magnetometers positions (either the nearest or the furthest set from the head center)*, *and take care to keep consistency with the indexes in grad.tra too *.* IHTH Cris On Thu, Aug 24, 2017 at 11:58 AM, HINDRIKS, RIKKERT < rikkert.hindriks at upf.edu> wrote: > Dear all, > > I'm generating simulated data for leadfield matrices for the CTF 275 axial > gradiometer system and I would like to compare different the results with > those obtained from data simulated using a magnetometer configuration. > > It is possible to generate equivalent magnetometer leadfield matrices? > (Equivalent in the sense of having the same number of coils at the same > positions). > > Thanks and kind regards, > Rikkert > > > Virus-free. > www.avg.com > > <#m_-6692326249519774685_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From awutz at mit.edu Thu Aug 24 15:21:53 2017 From: awutz at mit.edu (Andreas Wutz) Date: Thu, 24 Aug 2017 13:21:53 +0000 Subject: [FieldTrip] Using PPC method In-Reply-To: References: Message-ID: Dear Julia, it seems that we are going down the same road. I am also in the process of building a pipeline for spike-field coherence and I am orienting myself along the mentioned tutorial. That being said, it should become clear that I am far from being an expert for this kind of analysis. Nevertheless, I want to share what I have learned about it in the last days. I hope someone else in the list will correct me in case. This post should also serve as a check for my own analysis. First, you don't have to re-do your prior analysis for your neuralynx data. You only have to bring the outputs of your analysis into a format that the ft_xxx functions can read. You probably already have all the required information for that from your previous spike sorting. Let's look at the data structure (already segmented into trials, as shown in the tutorial): spikeTrials = label: {'sig002a_wf' 'sig003a_wf'} timestamp: {[1x83601 int32] [1x61513 int32]} waveform: {[1x32x83601 double] [1x32x61513 double]} unit: {[1x83601 double] [1x61513 double]} hdr: [1x1 struct] dimord: '{chan}_lead_time_spike' cfg: [1x1 struct] time: {[1x83601 double] [1x61513 double]} trial: {[1x83601 double] [1x61513 double]} trialtime: [600x2 double] The fields ".waveform" and ".unit" won't be necessary for spike-field coherence. For the fields ".cfg" and ".hdr", I am not sure if they are used at some point. I fill them with the info I have. spikeTrials.hdr.FileHeader.Frequency = your SamplingFrequency; % 40000 spikeTrials.cfg.timestampspersecond = your SamplingFrequency; % 40000 spikeTrials.cfg.trl = nTrials x 3 matrix with start (1st column), end (2nd) and offset relative to trigger (3rd) of each trial in timestamp units. ".label" contains a cell array of strings with one string for each unit. ".dimord" can be copied from above. ".trialtime" = nTrials x 2 matrix with start (1st) / end (2nd) of each trial relative to trigger in seconds. The important fields are ".timestamp", ".time", ".trial". Those contain all info about each spike for each unit (1 x nUnits cell array, each cell contains a vector with one entry per spike for that unit). ".timestamp": spike times in timestamp units from the beginning of the recording (NOTE: Make sure your recording is continuous such that the timestamps increase from first to last, no clock resets to zero). ".time": spike times in seconds relative to trigger in each trial ".trial": trial number in which the spike occurred (1 for trial 1, 2 for 2 and so on) Best, Andreas ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Julia Coopi [juliacoopiza at gmail.com] Sent: Wednesday, August 23, 2017 5:16 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Using PPC method Dear Fieldtrippers, I am new in fieltrip. I want to use pair wise phase consistency method for measuring the spike-pahse locking. My data set is recorded by neuralynx. For measuring it I found this link: http://www.fieldtriptoolbox.org/tutorial/spikefield. Is it the right link? Should I go through all steps including reading spikes and LFPs from neuralynx, make trails and .... finally call thefollowing function? ft_spiketriggeredspectrum It is very boring and time consuming. Actually, I imported files into matlab and make the trials which was a huge work at that time. I don't want to do it again and import data from neuralynx by fieldtrip (which seems is not very straighforward). I want to use the PPC method of fieldtrip using imported files into matlab. Is there any way to do that? Please guide me what is the best way. Thanks, Julia -------------- next part -------------- An HTML attachment was scrubbed... URL: From tianyangma2013 at gmail.com Mon Aug 28 11:05:38 2017 From: tianyangma2013 at gmail.com (=?UTF-8?B?6ams5aSp6Ziz?=) Date: Mon, 28 Aug 2017 11:05:38 +0200 Subject: [FieldTrip] Using PPC method Message-ID: Dear Andreas, I am also a new learner using PPC method. In your reply to Julia, I don’t quite understand why there are same number of values in timestamp and time, since timestamps is the spike times from the beginning of the recording to the end and time is relative to trigger in each trial. In my case, I have timestamp of spikes and LFP data 0.5 s before and after stimulus in each trial . Do you think it is possible I could use the code by somehow manipulating the format of input? Thanks! Best, Tianyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From awutz at mit.edu Mon Aug 28 14:49:54 2017 From: awutz at mit.edu (Andreas Wutz) Date: Mon, 28 Aug 2017 12:49:54 +0000 Subject: [FieldTrip] Using PPC method In-Reply-To: References: Message-ID: Dear Tianyang, the spike timestamps in the fields ".timestamp" and ."time" should correspond to all trials that occur within the respective trial periods. In the spike-field coherence tutorial, if you compare the data structure for the entire recording (there called "spike") with the trial-cut data structure (there called "spikeTrials"), you can see that there are less spikes in the latter. This is because those trials, which are not within the specified trial periods, are left out. The tutorial worked great for me. Unfortunately, it stops at the point where inferential stats have to be computed. I understand that I have to break up the relationship between spike timestamp per trial with lfp phase per trial. This will require random resampling of the lfp-phases. Intuitively, I would shuffle the trial vector for the lfp and then calculate the ppc for each random partition (using the same number of spikes). Let me add my own questions here. 1) It is unclear to me what happens when I have more than one spike per trial (e.g. 3 spikes in trial 1). Should I construct the resampling distribution with as many draws from each trial as there where in the original data (e.g. 3 draws from trial 1 but at different time points)? 2) I wonder whether only the trial vector should be shuffled (preserving the time points per trial compared to the original effect but now from a different, random trial). In other words, if I had in the original data 3 spikes which happened in the trials [1 2 3] and at the times [-.5 0 1], should the random partition look like this: partition: trial = [3 1 2], time = [-.5 0 1] or should the time points be taken completely at random? I hope, I was able to be clear enough with my explanation. Best, Andreas ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of 马天阳 [tianyangma2013 at gmail.com] Sent: Monday, August 28, 2017 5:05 AM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Using PPC method Dear Andreas, I am also a new learner using PPC method. In your reply to Julia, I don’t quite understand why there are same number of values in timestamp and time, since timestamps is the spike times from the beginning of the recording to the end and time is relative to trigger in each trial. In my case, I have timestamp of spikes and LFP data 0.5 s before and after stimulus in each trial . Do you think it is possible I could use the code by somehow manipulating the format of input? Thanks! Best, Tianyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From nima.noury at student.uni-tuebingen.de Mon Aug 28 15:00:54 2017 From: nima.noury at student.uni-tuebingen.de (Nima Noury) Date: Mon, 28 Aug 2017 15:00:54 +0200 Subject: [FieldTrip] Last call for 2017 Tuebingen Systems Neuroscience Symposium (SNS) Message-ID: <20170828150054.Horde.LxjzP7lI-YaIc_1WPdDKRyM@webmail.uni-tuebingen.de> The Centre for Integrative Neuroscience, MEG Center Tuebingen, and the Graduate Training Centre of Neuroscience are pleased to announce the 2017 Tuebingen Systems Neuroscience Symposium (SNS2017) The symposium takes place on October 11 and 12, 2017 at the University of Tuebingen. This annual international meeting brings together leading researchers in the field of systems neuroscience featuring plenary talks, poster sessions and social events. Join us in Tuebingen to learn about the latest advances in systems neuroscience. Confirmed speakers: Francesco Battaglia, Nijmegen Gustavo Deco, Barcelona Biyu He, New York Christoph Kayser, Glasgow Daniel Margulies, Leipzig Uta Noppeney, Birmingham Marios Philiastides, Glasgow Hansjörg Scherberger, Göttingen Woodrow Shew, Fayetteville Preejas Tewarie, Nottingham For more information and registration, please visit: http://meg.medizin.uni-tuebingen.de/2017/ Please forward this information to any of your colleagues and collaborators that may be interested in the symposium. Nima Noury AG Large-Scale Neuronal Interactions Centre for Integrative Neuroscience (CIN) University of Tübingen Otfried Müller-Straße 25 72076 Tübingen Germany From tianyangma2013 at gmail.com Mon Aug 28 23:31:17 2017 From: tianyangma2013 at gmail.com (=?UTF-8?B?6ams5aSp6Ziz?=) Date: Mon, 28 Aug 2017 23:31:17 +0200 Subject: [FieldTrip] Using PPC method In-Reply-To: References: Message-ID: Dear Andreas, I still don't quite understand the tutorial. spikeTrials = label: {'sig002a_wf' 'sig003a_wf'} timestamp: {[1x83601 int32 ] [1x61513 int32 ]} waveform: {[1x32x83601 double ] [1x32x61513 double ]} unit: {[1x83601 double ] [1x61513 double ]} hdr: [1x1 struct ] dimord: '{chan}_lead_time_spike' cfg: [1x1 struct ] time: {[1x83601 double ] [1x61513 double ]} trial: {[1x83601 double ] [1x61513 double ]} trialtime: [600x2 double ] Like here, I don't know why for timestamp,time and trial, there are same number of values. If I have one unit, 60 trials and focus on -0.5 s to 0.5 s around stimulus event, I think trial means which trial of the 60 trials has spikes in this 1 s. The time means time point of spikes located in the 1 s around stimulus for each trial. Is it correct? But what about the timestamp? It means from the beginning of recording to the end and has nothing to do with trials? I feel I am quite lost. Best, Tianyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From awutz at mit.edu Tue Aug 29 00:55:10 2017 From: awutz at mit.edu (Andreas Wutz) Date: Mon, 28 Aug 2017 22:55:10 +0000 Subject: [FieldTrip] Using PPC method In-Reply-To: References: , Message-ID: Dear Tianyang, maybe it's a good idea to download the accompanying sample data from the tutorial and look if you can recreate the shown data structure. Then look closer into the values of the respective fields. That should give you a better grasp on what is required there. I have not fully looked into the code but my feeling is that spikeTrials.timestamp is not of any further use and is just carried from the data structure before (which was not cut into trials and where the raw timestamps were useful). The timing of spikes relative to the trial zero point is fully described in the fields ".time", ".trial" and ".trialtime". Best, Andreas From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of 马天阳 [tianyangma2013 at gmail.com] Sent: Monday, August 28, 2017 5:31 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Using PPC method Dear Andreas, I still don't quite understand the tutorial. spikeTrials = label: {'sig002a_wf' 'sig003a_wf'} timestamp: {[1x83601 int32] [1x61513 int32]} waveform: {[1x32x83601 double] [1x32x61513 double]} unit: {[1x83601 double] [1x61513 double]} hdr: [1x1 struct] dimord: '{chan}_lead_time_spike' cfg: [1x1 struct] time: {[1x83601 double] [1x61513 double]} trial: {[1x83601 double] [1x61513 double]} trialtime: [600x2 double] Like here, I don't know why for timestamp,time and trial, there are same number of values. If I have one unit, 60 trials and focus on -0.5 s to 0.5 s around stimulus event, I think trial means which trial of the 60 trials has spikes in this 1 s. The time means time point of spikes located in the 1 s around stimulus for each trial. Is it correct? But what about the timestamp? It means from the beginning of recording to the end and has nothing to do with trials? I feel I am quite lost. Best, Tianyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From maximilien.chaumon at gmail.com Tue Aug 29 15:09:56 2017 From: maximilien.chaumon at gmail.com (Maximilien Chaumon) Date: Tue, 29 Aug 2017 13:09:56 +0000 Subject: [FieldTrip] ft_volumerealign headshape should stay out of scalp volume In-Reply-To: References: Message-ID: Dear all, I'm aligning an MRI with a headshape point cloud. I often get headshape points inside the skull after realigning with icp, like for this guy, for instance: [image: image.png] Would it be possible to tell the icp search algorithm when points are inside the skull and force it to blow the headshape cloud point outwards? Many thanks, Max ​ ​ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 82349 bytes Desc: not available URL: From amentink at chdr.nl Thu Aug 31 14:03:48 2017 From: amentink at chdr.nl (Alexander Mentink) Date: Thu, 31 Aug 2017 12:03:48 +0000 Subject: [FieldTrip] Units powerspectrum time-frequency analysis Message-ID: Dear FieldTrip community, I have a question regarding time-frequency analyses, it would be awesome if someone could help me out! Does anyone perhaps know what the absolute units are of the TFRwave.powerspctrm that you get when performing a continuous wavelet transform: cfg = []; cfg.channel = 'Cz'; cfg.method = 'tfr'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.25:30; cfg.toi = -3:0.01:2.5; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.channel = 'Cz'; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.zlim = 'maxabs'; cfg.xlim = [-0.2 1.5]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) The single plot shows reliable results compared to the Hanning window method, however the values of the powerspectrum are in the hundred thousands (?) - see image attached. This can't be uV^2/Hz, perhaps nV^2/Hz? Thanks in advance! Alex Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: [Twitter] [LinkedIn] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image5c5f52.PNG Type: image/png Size: 696 bytes Desc: image5c5f52.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image8e5b87.PNG Type: image/png Size: 648 bytes Desc: image8e5b87.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TFR_hanning_cm1_37.png Type: image/png Size: 30823 bytes Desc: TFR_hanning_cm1_37.png URL: From RICHARDS at mailbox.sc.edu Tue Aug 1 02:19:08 2017 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Tue, 1 Aug 2017 00:19:08 +0000 Subject: [FieldTrip] Postdoctoral position Message-ID: Post-doctoral Fellow in Infant Attention-University of South Carolina John Richards in the Department of Psychology at the University of South Carolina is seeking a qualified PhD for a postdoctoral position. The position involves research on the development of infant attention. The laboratory uses psychophysiological methods (heart rate, EEG, ERP) and MRI (structural) to examine the brain bases of the development of infant attention and recognition memory (http://jerlab.psych.sc.edu). Ideal candidates would have background in infant cognition, perception, or attention, and experience in cognitive neuroscience methods. The position would involve current ongoing projects, data analysis and write up of existing data, and collaborative development of new work. Writing experience and a publication record is required; and extensive writing and publication will be expected. At the candidate's interest, teaching experiences are available. The position is initially funded for one year, and subsequent years will be available depending on funding. The position is available now and candidates could start immediately. The salary is set at NIH standards accounting for years of postdoctoral experience. Review of applications will begin immediately and continue until the position is filled. Please send a letter of application, curriculum vitae, 1-2 writing samples, and the names and contact information of three references to richards-john at sc.edu, John E. Richards, Department of Psychology, University of South Carolina, Columbia SC 29028. You can find further information and submit your materials electronically at https://uscjobs.sc.edu/postings/17416 *********************************************** 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 ************************************************* From q.meng301 at gmail.com Tue Aug 1 08:42:30 2017 From: q.meng301 at gmail.com (Q Meng) Date: Tue, 1 Aug 2017 16:42:30 +1000 Subject: [FieldTrip] Questions about coherence statistics on source level data Message-ID: Dear list, I'm running source analysis using DICS on my MEG data following the cortical-muscular coherence tutorial and now would like to compare the source level coherence value between 2 conditions in a between subject design. I found some older posts on this topic from the discuss list ( https://mailman.science.ru.nl/pipermail/fieldtrip/2011-September/004279.html) (https://mailman.science.ru.nl/pipermail/fieldtrip/2016-March/010166.html). Following the instructions, I Z-transformed the coherence manually and specified cfg.statistic = 'ft_statfun_diff' and then did the cluster based non-parametric permutation test. However, I got an error message says *"Error using ft_statistics_montecarlo (line 242) could not determine the parametric critical value for clustering"* right after the statistical analysis started. Please see below a snippet of code: ... Z- transform coherence manually and creating 0-coherence data ... cfg = []; cfg.method = 'montecarlo'; % cfg.statistic = 'ft_statfun_depsamplesT'; cfg.statistic = 'ft_statfun_diff'; cfg.parameter = 'coh'; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.tail = 0; cfg.clustertail = 0; cfg.correcttail = 'alpha'; cfg.connectivity = VertConn; nsubj = 19; cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; % row of design matrix that contains unit variable (in this case: subjects) cfg.ivar = 2; % row of design matrix that contains independent variable (the conditions) stat = ft_sourcestatistics(cfg, data_meg_source_cohe_sentence_dics_parsing_B2_ICA{:}, data_meg_source_cohe_sentence_dics_parsing_B5_ICA{:}); Before this, I just used cfg.statistic = 'ft_statfun_depsamplesT' to compare the coherence value between two conditions and the program itself worked well. Does anyone have an idea where my problem could be or what I should do instead?3 Thanks for your help! Best, Qing -------------- next part -------------- An HTML attachment was scrubbed... URL: From amentink at chdr.nl Tue Aug 1 11:52:33 2017 From: amentink at chdr.nl (Alexander Mentink) Date: Tue, 1 Aug 2017 09:52:33 +0000 Subject: [FieldTrip] Time frequency analysis using evoked potentials Message-ID: Hi Fieldtrip community, I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) http://tinyurl.com/y7nerh8v The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. The code I use for hanning window is %%%%%%%%%%%%%%%%%% cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); % Visualization cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) %%%%%%%%%%%%%%%%%% And for wavelet transform is %%%%%%%%%%%%%%%%%% cfg = []; cfg.channel = 'Cz'; cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.5:30; cfg.toi = -0.5:0.05:1; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'relative'; % OR absolute cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.channel = 'Cz'; figure ft_singleplotTFR(cfg, TFRwave); %%%%%%%%%%%%%%%%%% I have tried the tutorials online, but this doesn't give me any better results... Does anyone know what I am doing wrong? Thanks many times! Best regards, Alex (Master student Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: [Twitter] [LinkedIn] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: imaged4db2c.PNG Type: image/png Size: 696 bytes Desc: imaged4db2c.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: imagecccaa4.PNG Type: image/png Size: 648 bytes Desc: imagecccaa4.PNG URL: From julian.keil at gmail.com Tue Aug 1 12:22:05 2017 From: julian.keil at gmail.com (Julian Keil) Date: Tue, 1 Aug 2017 12:22:05 +0200 Subject: [FieldTrip] Time frequency analysis using evoked potentials In-Reply-To: References: Message-ID: <54F7EE1C-5619-4CC6-83CF-2AEF59D01D48@gmail.com> Hi Alex, just a very basic thought: Using a fixed zlim of [0 1] does not really make sense when using relative change (or absolute) baseline, as you could very well have values below zero post stimulus. Also, when I compare your TFR Hanning (with absolute baseline) to the TFR Wavelet (with absolute baseline), they don't look too different, just badly scaled. Maybe you can play around with the zlim of the singleplot to get a better idea of what is happening here. Also, I wouldn't expect slightly different results from the wavelet vs. the mtmconvol as you are using different settings (e.g. 3 cycles width in the mtmconvol vs. 7 cycles in the wavelet). Good luck, Julian Am 01.08.2017 um 11:52 schrieb Alexander Mentink: > Hi Fieldtrip community, > > I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. > > Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) > > http://tinyurl.com/y7nerh8v > > The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. > > The code I use for hanning window is > %%%%%%%%%%%%%%%%%% > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'Cz'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 1:0.025:30; % OR 4:0.025:30 > cfg.t_ftimwin = 3./cfg.foi; > cfg.toi = -0.5:0.01:0.7; > TFRwave = ft_freqanalysis(cfg, trialdata); > > % Visualization > cfg = []; > cfg.baseline = [-0.5 -0.1]; > cfg.baselinetype = 'absolute'; > cfg.maskstyle = 'saturation'; > cfg.zlim = [0 1]; > cfg.showlabels = 'yes'; > figure > ft_singleplotTFR(cfg, TFRwave) > %%%%%%%%%%%%%%%%%% > > And for wavelet transform is > %%%%%%%%%%%%%%%%%% > cfg = []; > cfg.channel = 'Cz'; > cfg.method = 'wavelet'; > cfg.width = 7; > cfg.output = 'pow'; > cfg.foi = 1:0.5:30; > cfg.toi = -0.5:0.05:1; > TFRwave = ft_freqanalysis(cfg, trialdata); > > cfg = []; > cfg.baseline = [-0.5 -0.1]; > cfg.baselinetype = 'relative'; % OR absolute > cfg.maskstyle = 'saturation'; > cfg.zlim = [0 1]; > cfg.channel = 'Cz'; > figure > ft_singleplotTFR(cfg, TFRwave); > %%%%%%%%%%%%%%%%%% > > I have tried the tutorials online, but this doesn't give me any better results... > > Does anyone know what I am doing wrong? > > Thanks many times! > > Best regards, > > Alex (Master student > > > > > Alexander Mentink > Centre for Human Drug Research > Zernikedreef 8 > 2333 CL Leiden > The Netherlands > T +31 (0) 71 7517166 > amentink at chdr.nl > http://www.chdr.nl > > Follow us: > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://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 J.Herring at donders.ru.nl Tue Aug 1 13:05:07 2017 From: J.Herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Tue, 1 Aug 2017 11:05:07 +0000 Subject: [FieldTrip] Time frequency analysis using evoked potentials In-Reply-To: References: Message-ID: <25A27A1A-3DED-4CC7-818C-CE61C4324A03@donders.ru.nl> Dear Alex, Change your scaling to ‘maxabs’ (cfg.zlim = ‘maxabs’;) to get a better feel of the scaling of your data. Now you have a scaling from 0 to 1, which, given your data, gives you very saturated images. Also, I would argue using a relative baseline on a TFR of an ERP (or ERF) is risky as in theory, your baseline should be zero (you even explicitly try to impose that by performing a baseline correction when calculating the ERP). This means that you are dividing your activation period by values close to zero. This will give you arbitrarily large values. An absolute baseline is preferred. Best, Jim On 1 Aug 2017, at 11:52, Alexander Mentink > wrote: Hi Fieldtrip community, I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) http://tinyurl.com/y7nerh8v The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. The code I use for hanning window is %%%%%%%%%%%%%%%%%% cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); % Visualization cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) %%%%%%%%%%%%%%%%%% And for wavelet transform is %%%%%%%%%%%%%%%%%% cfg = []; cfg.channel = 'Cz'; cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.5:30; cfg.toi = -0.5:0.05:1; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'relative'; % OR absolute cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.channel = 'Cz'; figure ft_singleplotTFR(cfg, TFRwave); %%%%%%%%%%%%%%%%%% I have tried the tutorials online, but this doesn't give me any better results... Does anyone know what I am doing wrong? Thanks many times! Best regards, Alex (Master student Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.merkel at med.ovgu.de Tue Aug 1 13:11:59 2017 From: christian.merkel at med.ovgu.de (christian.merkel at med.ovgu.de) Date: Tue, 1 Aug 2017 11:11:59 +0000 Subject: [FieldTrip] Using fixed orientations for men-source estimation Message-ID: <71D8A67A81D69A4CB5BE2B979021C26ECAFFE748@esen3.imed.uni-magdeburg.de> Hello, I am running ft_sourceanalysis and am wondering why I can restrict the parameter-estimation in LCMV and sLORETA by setting the parameter 'fixedori' but not when using MNE. Shouldn't one be able to also just use the normal direction of each source position here as well? Can I just apply the same logic in the script 'minimumnormestimate' to change the field 'lf.ori' as, for example, in 'ft_sloreta' or would this be problematic down the line? Thank You, Christian From amentink at chdr.nl Tue Aug 1 13:28:00 2017 From: amentink at chdr.nl (Alexander Mentink) Date: Tue, 1 Aug 2017 11:28:00 +0000 Subject: [FieldTrip] Time frequency analysis using evoked potentials In-Reply-To: <25A27A1A-3DED-4CC7-818C-CE61C4324A03@donders.ru.nl> References: , <25A27A1A-3DED-4CC7-818C-CE61C4324A03@donders.ru.nl> Message-ID: <3b839c54a1a142f6bea35538ce6a481a@chdr.nl> Thanks Jim, The graphs look a bit better, however I still get many NaN artifacts when I want to show the frequency range of 1-30 Hz, which disappears completely when I shift it to 4-30 Hz. Does anyone know what the underlying problem is here? KR, Alex Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: [Twitter] [LinkedIn] ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Herring, J.D. (Jim) Sent: 01 August 2017 13:05 To: FieldTrip discussion list Subject: Re: [FieldTrip] Time frequency analysis using evoked potentials Dear Alex, Change your scaling to ‘maxabs’ (cfg.zlim = ‘maxabs’;) to get a better feel of the scaling of your data. Now you have a scaling from 0 to 1, which, given your data, gives you very saturated images. Also, I would argue using a relative baseline on a TFR of an ERP (or ERF) is risky as in theory, your baseline should be zero (you even explicitly try to impose that by performing a baseline correction when calculating the ERP). This means that you are dividing your activation period by values close to zero. This will give you arbitrarily large values. An absolute baseline is preferred. Best, Jim On 1 Aug 2017, at 11:52, Alexander Mentink > wrote: Hi Fieldtrip community, I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) http://tinyurl.com/y7nerh8v The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. The code I use for hanning window is %%%%%%%%%%%%%%%%%% cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); % Visualization cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) %%%%%%%%%%%%%%%%%% And for wavelet transform is %%%%%%%%%%%%%%%%%% cfg = []; cfg.channel = 'Cz'; cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.5:30; cfg.toi = -0.5:0.05:1; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'relative'; % OR absolute cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.channel = 'Cz'; figure ft_singleplotTFR(cfg, TFRwave); %%%%%%%%%%%%%%%%%% I have tried the tutorials online, but this doesn't give me any better results... Does anyone know what I am doing wrong? Thanks many times! Best regards, Alex (Master student Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image514dfb.PNG Type: image/png Size: 696 bytes Desc: image514dfb.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image819e4b.PNG Type: image/png Size: 648 bytes Desc: image819e4b.PNG URL: From q.meng301 at gmail.com Wed Aug 2 03:11:24 2017 From: q.meng301 at gmail.com (Q Meng) Date: Wed, 2 Aug 2017 11:11:24 +1000 Subject: [FieldTrip] Questions about coherence statistics on source level data In-Reply-To: References: Message-ID: Dear list, My apology, it should be a comparison of coherence value between 2 conditions in a within subject design. In addition to my previous question on how to implement a non-parametric permutation test on the difference of coherence values, I would like to consult that in case I used hanning window as a single taper, what should I do with the Z spectra equation described in Jan-Mathijs's J.Neurosci. 2011 paper? As it will result in infinite values, right? Best, Qing Meng On Tue, Aug 1, 2017 at 4:42 PM, Q Meng wrote: > Dear list, > > I'm running source analysis using DICS on my MEG data following the > cortical-muscular coherence tutorial and now would like to compare the > source level coherence value between 2 conditions in a between subject > design. > > I found some older posts on this topic from the discuss list ( > https://mailman.science.ru.nl/pipermail/fieldtrip/2011- > September/004279.html) (https://mailman.science.ru. > nl/pipermail/fieldtrip/2016-March/010166.html). Following the > instructions, I Z-transformed the coherence manually and specified > cfg.statistic = 'ft_statfun_diff' and then did the cluster based > non-parametric permutation test. However, I got an error message says *"Error > using ft_statistics_montecarlo (line 242) could not determine the > parametric critical value for clustering"* right after the statistical > analysis started. Please see below a snippet of code: > > ... > Z- transform coherence manually and creating 0-coherence data > ... > > cfg = []; > cfg.method = 'montecarlo'; > % cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.statistic = 'ft_statfun_diff'; > cfg.parameter = 'coh'; > cfg.correctm = 'cluster'; > cfg.numrandomization = 1000; > cfg.alpha = 0.05; > cfg.clusteralpha = 0.05; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.correcttail = 'alpha'; > cfg.connectivity = VertConn; > > nsubj = 19; > cfg.design(1,:) = [1:nsubj 1:nsubj]; > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > cfg.uvar = 1; % row of design matrix that contains unit > variable (in this case: subjects) > cfg.ivar = 2; % row of design matrix that contains > independent variable (the conditions) > > > stat = ft_sourcestatistics(cfg, data_meg_source_cohe_sentence_dics_parsing_B2_ICA{:}, > data_meg_source_cohe_sentence_dics_parsing_B5_ICA{:}); > > > Before this, I just used cfg.statistic = 'ft_statfun_depsamplesT' to > compare the coherence value between two conditions and the program itself > worked well. > > Does anyone have an idea where my problem could be or what I should do instead?3 > > Thanks for your help! > > Best, > > Qing > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony.w.wilson at gmail.com Wed Aug 2 13:40:02 2017 From: tony.w.wilson at gmail.com (Tony W. Wilson) Date: Wed, 2 Aug 2017 06:40:02 -0500 Subject: [FieldTrip] Postdoctoral Positions at the University of Nebraska Medical Center in Omaha Message-ID: Applications are invited for two postdoctoral positions in the Center for Magnetoencephalography (MEG) at the University of Nebraska Medical Center (UNMC) in Omaha. Successful applicants will work with Dr. Tony Wilson and other Center investigators on multiple NIH- and NSF-funded projects investigating the neural processes underlying attention, motor performance, and sensorimotor integration in healthy and neurological populations (adults and children). The Center for MEG has expertise in cognitive, clinical, and motor neuroscience, as well as oscillatory analyses and source reconstruction of neurophysiological signals. A list of recent Center publications can be found *here* . UNMC is a vibrant multidisciplinary research environment with major resources and ample opportunities for training and collaboration. Resources include a 306-sensor MEG system, multiple 3T human MRI scanners, high-definition transcranial direct-current and alternating-current stimulation (HD-tDCS/tACS) equipment, eye-tracking equipment, and a state-of-the-art transcranial magnetic stimulation (TMS) suite. Successful candidates will have a PhD in neuroscience, psychology, or computer science, and an excellent publication record for their career stage. Candidates who have knowledge of MEG/fMRI analysis packages (SPM, Fieldtrip, BESA, Brainstorm, etc.) and/or programming skills (e.g., Matlab, Python) will have an advantage. Salary will follow NIH standard guidelines, and start dates are negotiable. A two-year minimum commitment is required, with the possibility of extension into a third year with strong performance. UNMC is also in the midst of a major growth initiative and transiting to a faculty position is certainly possible. Applicants should send a curriculum vitae and a letter of interest/cover letter to Dr. Tony Wilson at twwilson at unmc.edu . Three letters of recommendation will be requested at a later date. Review of applications will begin immediately and continue until all positions are filled. -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Herring at donders.ru.nl Thu Aug 3 14:44:38 2017 From: J.Herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 3 Aug 2017 12:44:38 +0000 Subject: [FieldTrip] Time frequency analysis using evoked potentials In-Reply-To: <3b839c54a1a142f6bea35538ce6a481a@chdr.nl> References: <25A27A1A-3DED-4CC7-818C-CE61C4324A03@donders.ru.nl> <3b839c54a1a142f6bea35538ce6a481a@chdr.nl> Message-ID: <5736B4AA-47E8-42F7-9540-6C6D2C859426@donders.ru.nl> Hi Alex, If this is the code you used: cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); There shouldn’t be a difference in the values from 4 - 30 Hz, whether, or not you calculate 1-4 Hz as well. The NaN values for the lower frequencies at the edges (and for very low frequencies for the entire time course) can be explained by the fact that your epochs from -1s to +1.2 are not long enough to fit even a single time window you are requesting. For example, in cfg.t_ftimwin you are requesting a moving time window of 3 cycles. At 1 Hz (=oscillation with period of 1 second), you are requesting a 3 second moving time window. As your data is shorter than 3 seconds, you will not be able to estimate power at any of the requested time points in cfg.toi. With an epoch length of 2.2 seconds you will only start to get estimates from ~1.4 Hz ( cycles/epoch length ) onwards. Best, Jim On 1 Aug 2017, at 13:28, Alexander Mentink > wrote: Thanks Jim, The graphs look a bit better, however I still get many NaN artifacts when I want to show the frequency range of 1-30 Hz, which disappears completely when I shift it to 4-30 Hz. Does anyone know what the underlying problem is here? KR, Alex Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: ________________________________ From: fieldtrip-bounces at science.ru.nl > on behalf of Herring, J.D. (Jim) > Sent: 01 August 2017 13:05 To: FieldTrip discussion list Subject: Re: [FieldTrip] Time frequency analysis using evoked potentials Dear Alex, Change your scaling to ‘maxabs’ (cfg.zlim = ‘maxabs’;) to get a better feel of the scaling of your data. Now you have a scaling from 0 to 1, which, given your data, gives you very saturated images. Also, I would argue using a relative baseline on a TFR of an ERP (or ERF) is risky as in theory, your baseline should be zero (you even explicitly try to impose that by performing a baseline correction when calculating the ERP). This means that you are dividing your activation period by values close to zero. This will give you arbitrarily large values. An absolute baseline is preferred. Best, Jim On 1 Aug 2017, at 11:52, Alexander Mentink > wrote: Hi Fieldtrip community, I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) http://tinyurl.com/y7nerh8v The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. The code I use for hanning window is %%%%%%%%%%%%%%%%%% cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); % Visualization cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) %%%%%%%%%%%%%%%%%% And for wavelet transform is %%%%%%%%%%%%%%%%%% cfg = []; cfg.channel = 'Cz'; cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.5:30; cfg.toi = -0.5:0.05:1; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'relative'; % OR absolute cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.channel = 'Cz'; figure ft_singleplotTFR(cfg, TFRwave); %%%%%%%%%%%%%%%%%% I have tried the tutorials online, but this doesn't give me any better results... Does anyone know what I am doing wrong? Thanks many times! Best regards, Alex (Master student Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornelia.quaedflieg at uni-hamburg.de Thu Aug 3 18:46:47 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Thu, 3 Aug 2017 18:46:47 +0200 Subject: [FieldTrip] ft_selectdata doesn't work after using ft_regressconfound Message-ID: <005301d30c78$189e9050$49dbb0f0$@uni-hamburg.de> Dear Fieldtrip-users, We are not able to use function ft_selectdata after applying head movement correction using ft_regressconfound. The error that we get is the well-known index exceeds matrix dimensions. It is due to the fact that the size of x is incorrect, it doesn’t correspond to the number of trials but is 7 which is the number of regressors in the beta variable that is created by using ft_regressconfound. There is a simple way to solve it and this is deleting the field ‘beta’ before running ft_select data. My question is, just to be sure, the variance is regressed out by using ft_regressconfound so the beta variable is not needed in any further step right? Maybe this is also something for the debug team? Thus that ft_selectdata runs after running ft_regressconfound. Best Dr Conny Quaedflieg Mit freundlichen Grüßen, E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 5382 bytes Desc: not available URL: From a.stolk8 at gmail.com Thu Aug 3 18:53:28 2017 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 3 Aug 2017 09:53:28 -0700 Subject: [FieldTrip] ft_selectdata doesn't work after using ft_regressconfound In-Reply-To: <005301d30c78$189e9050$49dbb0f0$@uni-hamburg.de> References: <005301d30c78$189e9050$49dbb0f0$@uni-hamburg.de> Message-ID: Hi Conny, Yes, you can delete the beta field, or alternatively, call ft_regressconfound with cfg.beta = 'no' (perhaps this should be the default). Didn't know there was a debug team.. Best, Arjen On Thu, Aug 3, 2017 at 9:46 AM, Conny Quaedflieg < cornelia.quaedflieg at uni-hamburg.de> wrote: > Dear Fieldtrip-users, > > > > We are not able to use function ft_selectdata after applying head movement > correction using ft_regressconfound. The error that we get is the > well-known index exceeds matrix dimensions. > > It is due to the fact that the size of x is incorrect, it doesn’t > correspond to the number of trials but is 7 which is the number of > regressors in the beta variable that is created by using > ft_regressconfound. > > There is a simple way to solve it and this is deleting the field ‘beta’ > before running ft_select data. > > > > My question is, just to be sure, the variance is regressed out by using > ft_regressconfound so the beta variable is not needed in any further step > right? > > Maybe this is also something for the debug team? Thus that ft_selectdata > runs after running ft_regressconfound. > > > > Best > > Dr Conny Quaedflieg > > > > > > Mit freundlichen Grüßen, > > > > > > [image: Unbenannt-1] > > *E-Mail*: cornelia.quaedflieg at uni-hamburg.de > > *Tel.*: +49 40 42838-5448 <+49%2040%2042838-5448> *Website*: Hyperlink > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 5382 bytes Desc: not available URL: From efrain.torres at marquette.edu Thu Aug 3 22:24:58 2017 From: efrain.torres at marquette.edu (Torres, Efrain) Date: Thu, 3 Aug 2017 20:24:58 +0000 Subject: [FieldTrip] please help, approaching deadline. ft_sourceanalysis line 813 Message-ID: To whom it may concern, I was wondering if you were able to correct your error? I am experiencing the same issue, and I was wondering if you could help me? Oddly enough, I am also on a bit of a time crunch. Sincerley, Efrain Torres -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornelia.quaedflieg at uni-hamburg.de Fri Aug 4 09:37:21 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Fri, 4 Aug 2017 09:37:21 +0200 Subject: [FieldTrip] ft_selectdata doesn't work after using ft_regressconfound In-Reply-To: References: <005301d30c78$189e9050$49dbb0f0$@uni-hamburg.de> Message-ID: <007b01d30cf4$8257c4e0$87074ea0$@uni-hamburg.de> Dear Arjen, Thanks for your fast reply. With debug team I mean Bugzilla from fieldtrip. http://www.fieldtriptoolbox.org/bugzilla best Conny Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Arjen Stolk Gesendet: Donnerstag, 3. August 2017 18:53 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_selectdata doesn't work after using ft_regressconfound Hi Conny, Yes, you can delete the beta field, or alternatively, call ft_regressconfound with cfg.beta = 'no' (perhaps this should be the default). Didn't know there was a debug team.. Best, Arjen On Thu, Aug 3, 2017 at 9:46 AM, Conny Quaedflieg > wrote: Dear Fieldtrip-users, We are not able to use function ft_selectdata after applying head movement correction using ft_regressconfound. The error that we get is the well-known index exceeds matrix dimensions. It is due to the fact that the size of x is incorrect, it doesn’t correspond to the number of trials but is 7 which is the number of regressors in the beta variable that is created by using ft_regressconfound. There is a simple way to solve it and this is deleting the field ‘beta’ before running ft_select data. My question is, just to be sure, the variance is regressed out by using ft_regressconfound so the beta variable is not needed in any further step right? Maybe this is also something for the debug team? Thus that ft_selectdata runs after running ft_regressconfound. Best Dr Conny Quaedflieg Mit freundlichen Grüßen, E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 5382 bytes Desc: not available URL: From a.kochari at uva.nl Fri Aug 4 16:45:53 2017 From: a.kochari at uva.nl (Arnold Kochari) Date: Fri, 4 Aug 2017 16:45:53 +0200 Subject: [FieldTrip] missing channels and time locked grand average Message-ID: Dear FieldTrip community, I have a question about what seems to be an old problem with no solution posted yet. I have deleted bad channels in some participants during preprocessing. Now I would like to compute grand average ERPs using ft_timelockgrandaverage. However, if a channel has been deleted in at least one participant, the mean for it does not get calculated. What I would like to see is just that the average is calculated among the remaining participants. I understand that there might be some strong arguments for the absence of this functionality. I also know about the possibility to interpolate the deleted channels using channelrepair, but I do not really agree with it. Is there any way to calculate grand averages the way I would like to do it? The only solution that I can think of right now is exporting the data, making the calculation in R and then importing the averages it again, but that would require a lot f time. Kind regards, Arnold Kochari PhD candidate, Institute for Logic, Language and Computation, University of Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Fri Aug 4 17:20:31 2017 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Fri, 4 Aug 2017 08:20:31 -0700 Subject: [FieldTrip] missing channels and time locked grand average In-Reply-To: References: Message-ID: Hi Arnold, There's a cfg.method = 'nan' option in ft_channelrepair, which creates NaN data for specified channels. As a result, these channels are still considered in the group-level statistics, provided other subjects have data for the same channels. However, I don't know whether timelockgrandaverage can yet deal with these NaN channels too. Best, Arjen On Fri, Aug 4, 2017 at 7:45 AM, Arnold Kochari wrote: > Dear FieldTrip community, > > I have a question about what seems to be an old problem with no solution > posted yet. > > I have deleted bad channels in some participants during preprocessing. Now > I would like to compute grand average ERPs using ft_timelockgrandaverage. > However, if a channel has been deleted in at least one participant, the > mean for it does not get calculated. What I would like to see is just that > the average is calculated among the remaining participants. > > I understand that there might be some strong arguments for the absence of > this functionality. I also know about the possibility to interpolate the > deleted channels using channelrepair, but I do not really agree with it. > > Is there any way to calculate grand averages the way I would like to do > it? The only solution that I can think of right now is exporting the data, > making the calculation in R and then importing the averages it again, but > that would require a lot f time. > > > Kind regards, > Arnold Kochari > PhD candidate, Institute for Logic, Language and Computation, University > of Amsterdam > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From timeehan at gmail.com Fri Aug 4 21:00:12 2017 From: timeehan at gmail.com (Tim Meehan) Date: Fri, 4 Aug 2017 15:00:12 -0400 Subject: [FieldTrip] bug in 'nearest' function Message-ID: Dear FieldTrippers, I'd like to report a bug in the 'nearest' function. It occurs at line 152, the first line of the following if statement: indx2 = find(array<=val, 1, 'last'); indx3 = find(array>=val, 1, 'first'); if abs(array(indx2)-val) <= abs(array(indx3)-val) indx = indx2; else indx = indx3; end if ~wassorted indx = xidx(indx); end In my case, the two values being compared should be considered equal (i.e. val is halfway between array(indx2) and array(indx3)). However due to precision issues, the condition is false and indx is set to indx3. Specifically: - In short format: val = -17.4930 array(indx2) = -17.4940 array(indx3) = -17.4920 - Full precision: val = -17.492999999999999 array(indx2) = -17.494000000000000 array(indx3) = -17.492000000000001 For me this leads to the 'begsampl' variable in line 223 of ft_timelockanalysis to be 2 when it should be 1, which then leads to an undersizing of subsequent variables, and finally an 'index exceeds matrix dimension' error at line 280. I gather the precision issue was noted as a general problem a long time ago, and the if statement noted above was implemented as a fix for the 'nearest' function -- interestingly, the fix even notes that the choice of indx2 over indx3 when the condition is true is arbitrary ( http://bugzilla.fcdonders.nl/show_bug.cgi?id=1943). But it seems that when val *should be* equidistant from its nearest neighbors in array, precision issues could cause an inequality in the differences, and thus cause 'nearest' to randomly select the lesser or greater of the neighbors. I guess it just so happens in my case that I need 'nearest' to arbitrarily select indx2, which it is designed to to do but fails because of the precision issue. I did try the old (commented out) fix for precision in 'nearest' and it solved my problem, i.e. it selects the lesser of the two neighbors. The bug report notes this is a slower method, but I will revert to that unless it has been found to cause other problems. Best, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From urieduardo at gmail.com Sat Aug 5 00:54:54 2017 From: urieduardo at gmail.com (=?UTF-8?Q?Uri_Eduardo_Ram=C3=ADrez_Pasos?=) Date: Fri, 4 Aug 2017 15:54:54 -0700 Subject: [FieldTrip] Artifact correction error Message-ID: Dear fieldtrip experts, I tried following the tutorial on http://www.fieldtriptoolbox.org/example/ use_independent_component_analysis_ica_to_remove_ecg_artifacts using both my data and the example data, but as soon as I run comp_ecg = ft_appenddata([], ecg, comp_ecg); I get an error saying that the egg and comp_ecg variables must be of the same type. Is this just me or was there a fieldtrip update that leads to ft_componentanalysis yielding a variable of a different type? Many thanks, Uri Ramirez -------------- next part -------------- An HTML attachment was scrubbed... URL: From emilia.flo.rama at gmail.com Mon Aug 7 21:13:10 2017 From: emilia.flo.rama at gmail.com (=?UTF-8?Q?Emilia_Fl=C3=B3?=) Date: Mon, 7 Aug 2017 16:13:10 -0300 Subject: [FieldTrip] Selecting threshold for cluster permutation Message-ID: Hi, everyone! I have data from an EEG experiment that I want to analyse with permutation cluster analysis. I'm having trouble defining the p threshold and the minimum number of neighbours (I'm recording with 64 electrodes).. Is just arbitrary and people end up using what their lab use?, or is there some literature that I can read in order to decide with more certainty.. Any advice would be extremely welcome, Best, Emilia -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.kochari at uva.nl Wed Aug 9 16:47:45 2017 From: a.kochari at uva.nl (Arnold Kochari) Date: Wed, 9 Aug 2017 16:47:45 +0200 Subject: [FieldTrip] missing channels and time locked grand average In-Reply-To: References: Message-ID: Hi Arjen, Thank you for the suggestion. I tried it, but in this case ft_timelockgrandaverage just spits out NaN for the channels where some participant(s) had NaNs. This is to be expected since that's how Matlab deals with NaNs by default. So basically I need to find some way to do averaging within the filedtrip datastructure that would be equivalent to matlab's 'omitnan' option. Arnold On Fri, Aug 4, 2017 at 5:20 PM, Arjen Stolk wrote: > Hi Arnold, > > There's a cfg.method = 'nan' option in ft_channelrepair, which creates NaN > data for specified channels. As a result, these channels are still > considered in the group-level statistics, provided other subjects have data > for the same channels. However, I don't know whether timelockgrandaverage > can yet deal with these NaN channels too. > > Best, > Arjen > > On Fri, Aug 4, 2017 at 7:45 AM, Arnold Kochari wrote: > >> Dear FieldTrip community, >> >> I have a question about what seems to be an old problem with no solution >> posted yet. >> >> I have deleted bad channels in some participants during preprocessing. >> Now I would like to compute grand average ERPs >> using ft_timelockgrandaverage. However, if a channel has been deleted in at >> least one participant, the mean for it does not get calculated. What I >> would like to see is just that the average is calculated among the >> remaining participants. >> >> I understand that there might be some strong arguments for the absence of >> this functionality. I also know about the possibility to interpolate the >> deleted channels using channelrepair, but I do not really agree with it. >> >> Is there any way to calculate grand averages the way I would like to do >> it? The only solution that I can think of right now is exporting the data, >> making the calculation in R and then importing the averages it again, but >> that would require a lot f time. >> >> >> Kind regards, >> Arnold Kochari >> PhD candidate, Institute for Logic, Language and Computation, University >> of Amsterdam >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bioeng.yoosofzadeh at gmail.com Wed Aug 9 23:13:32 2017 From: bioeng.yoosofzadeh at gmail.com (Vahab Yousofzadeh) Date: Wed, 9 Aug 2017 17:13:32 -0400 Subject: [FieldTrip] Fwd: Parcellation of connectivity matrix by AAL atlas In-Reply-To: References: Message-ID: Dear ft experts, I am trying to summarize a full connectivity matrix using an AAL atlas (similar to the tutorial for network analysis). However, what I get at the end is a very sparse matrix (see f1 and f2 for before and after parcellation, respectively). I suspect the 'nearest' interpolation is the best solution for the approach. I tried other interpolation methods, but with no success. Here are the scripts I utilized: atlas = ft_read_atlas('ROI_MNI_V4.nii'); cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'tissue'; atlas2 = ft_sourceinterpolate(cfg, atlas, conn); atlas2.pos = conn.pos; cfg = []; cfg.parameter = 'plvspctrm'; parc_conn = ft_sourceparcellate(cfg, conn, atlas2); where, Conn = dim: [18 14 13] inside: [1627x1 double] pos: [1627x3 double] outside: [0x1 double] plvspctrm: [1627x1627 double] time: [1x481 double] cfg: [1x1 struct] Any comments would be appreciated. Best regards, Vahab -------------- next part -------------- A non-text attachment was scrubbed... Name: f1.jpg Type: image/jpeg Size: 74414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: f2.jpg Type: image/jpeg Size: 13896 bytes Desc: not available URL: From cornelia.quaedflieg at uni-hamburg.de Thu Aug 10 10:15:55 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Thu, 10 Aug 2017 10:15:55 +0200 Subject: [FieldTrip] head movement correction creates complex values => why and how to solve Message-ID: <002501d311b0$e3b36ee0$ab1a4ca0$@uni-hamburg.de> Dear Fieldtrip users, I would like to correct my frequency MEG data for head movement that implemented this based on the manual on the fieldtrip website (). We perform it as the last step before the statistics. We have 70 participants and in 12 of our participants, the data (e.g., powerspctrm) contains complex values. I have several questions about this 1. Why are complex values computed in some of the participants? FFT values are normal. 2. What can I do to solve this? The problem is that all next functions (grand average, statistics) are not running with complex values. Thank in advance for any suggestions! Best dr. Conny Quaedflieg E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 5388 bytes Desc: not available URL: From cornelia.quaedflieg at uni-hamburg.de Thu Aug 10 16:09:29 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Thu, 10 Aug 2017 16:09:29 +0200 Subject: [FieldTrip] head movement correction creates complex values => why Message-ID: <010001d311e2$48125b40$d83711c0$@uni-hamburg.de> Dear users, With regard to my question, why the data from 12 out of 70 participants ta (e.g.,powerspctrm) contains complex values after using ft_regressconfound, I found out that the circumcenter is causing the complex single values. Though don’t get it why they become complex I attached coil positions of 2 pp’s Vp22 gets complex values The circumcenter function is also attached. This is what I run: cc = circumcenter2(coil1, coil2, coil3); or for PP 22 cc_vp22 = circumcenter2(coil1_VP22, coil2_VP22, coil3_VP22); Maybe someone sees why they become complex and can tell me how to solve this :) Thanks in advance Conny Mit freundlichen Grüßen, E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 5382 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: coils.mat Type: application/octet-stream Size: 15390 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: circumcenter2.m URL: From nugenta at mail.nih.gov Tue Aug 8 22:59:32 2017 From: nugenta at mail.nih.gov (Nugent, Allison C. (NIH/NIMH) [E]) Date: Tue, 8 Aug 2017 20:59:32 +0000 Subject: [FieldTrip] 2nd MEG North America Meeting: We need you! Message-ID: We are still soliciting volunteers for committee membership at the 2nd MEG-North America meeting, to be held in Bethesda, Maryland November 8th and 9th. Committee meetings will be held on November 8th, with the scientific session on November 9th. There are four committee/workgroups; a broad suggestion of agenda items is as follows: Reliability/reproducibility: Topics include discussion of a standard battery to probe reproducibility across sites and platforms. Committee members may also works towards implementation of the battery across multiple sites. Data Sharing: Topics include the discussion of common data elements and formats or data structures, repository policies, infrastructure support and development, and facilitation of data transfer into repositories. Industry Partnerships: Discussions of collaborative partnerships between academia and industry, to facilitate goals of enhancing reproducibility and sharing, along with other areas of collaboration mutually beneficial to research and clinical institutions and device developers/manufacturers. Representatives from both York Instruments and CTF have volunteered to join this committee. Facilitating Best Practices: Discussions to include how best to facilitate the emergence of best practices from the user community. What metrics can be used for identifying best practices, characteristics of test datasets, and frameworks to identify robust processing pipelines. To volunteer, please e-mail nihmegworkshop at gmail.com with your affiliation and which committee(s) you are willing to serve on. We will send confirmations to committee members by September 8th. Thank you for supporting our community! Please visit our website at https://megworkshop.nih.gov/MEGWorkshop/ Or register at: https://www.eventbrite.com/e/meg-north-america-2017-tickets-36315511673 We hope to see you there! Conference Chairs: Richard Coppola Allison Nugent Steering Committee: Sylvain Baillet Dimitrios Pantazis Timothy Roberts Julia Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: From mibanks at wisc.edu Sat Aug 12 00:05:51 2017 From: mibanks at wisc.edu (MATTHEW I BANKS) Date: Fri, 11 Aug 2017 22:05:51 +0000 Subject: [FieldTrip] Granger analysis Message-ID: Greetings. What is the easiest way to compute non-spectrally resolved Granger causality, i.e. log(var(e_x)/var(e_xy)), where e_x and e_xy are the AR model error terms? -Matt ____________________________ Matthew I. Banks, Ph.D. Associate Professor Department of Anesthesiology University of Wisconsin 1300 University Avenue, Room 4605 Madison, WI 53706 office tel. (608)261-1143 lab tel. (608)263-6662 fax (608)263-2592 http://anesthesia.wisc.edu/index.php/Banks_Laboratory http://ntp.neuroscience.wisc.edu/banks.htm -------------- next part -------------- An HTML attachment was scrubbed... URL: From hermpsy at mail.ru Sat Aug 12 12:28:39 2017 From: hermpsy at mail.ru (=?UTF-8?B?SGVybWluZSBCZXJiZXJ5YW4=?=) Date: Sat, 12 Aug 2017 13:28:39 +0300 Subject: [FieldTrip] =?utf-8?q?Fieldtrip_submission?= Message-ID: <1502533719.946112223@f390.i.mail.ru> Dear representatives of Fieldtrip, Could you, please, add me to Fieldtrip email list for getting the notifications (not only other colleagues' messages -if I get it right)? Sorry for taking your time. Thank you in advance for your letter. Kind regards, Hermine Berberyan Sent from Mail.Ru app for iOS -------- Forwarded message -------- From: To: fieldtrip at science.ru.nl Date: Saturday, 12 August 2017, 12:05 +0200 Subject: fieldtrip Digest, Vol 81, Issue 9 >Send fieldtrip mailing list submissions to >fieldtrip at science.ru.nl > >To subscribe or unsubscribe via the World Wide Web, visit >https://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. Granger analysis (MATTHEW I BANKS) > > >---------------------------------------------------------------------- > >Message: 1 >Date: Fri, 11 Aug 2017 22:05:51 +0000 >From: MATTHEW I BANKS < mibanks at wisc.edu > >To: " fieldtrip at science.ru.nl " < fieldtrip at science.ru.nl > >Subject: [FieldTrip] Granger analysis >Message-ID: >< DM5PR06MB2634608E677FE694F4047F3EDF890 at DM5PR06MB2634.namprd06.prod.outlook.com > > >Content-Type: text/plain; charset="us-ascii" > >Greetings. What is the easiest way to compute non-spectrally resolved Granger causality, i.e. log(var(e_x)/var(e_xy)), where e_x and e_xy are the AR model error terms? > > >-Matt > > >____________________________ > >Matthew I. Banks, Ph.D. >Associate Professor >Department of Anesthesiology >University of Wisconsin >1300 University Avenue, Room 4605 >Madison, WI 53706 >office tel. (608)261-1143 >lab tel. (608)263-6662 >fax (608)263-2592 >http://anesthesia.wisc.edu/index.php/Banks_Laboratory >http://ntp.neuroscience.wisc.edu/banks.htm >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: < http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170811/21109e5d/attachment-0001.html > > >------------------------------ > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >End of fieldtrip Digest, Vol 81, Issue 9 >**************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From maria.hakonen at gmail.com Sat Aug 12 21:10:42 2017 From: maria.hakonen at gmail.com (Maria Hakonen) Date: Sat, 12 Aug 2017 22:10:42 +0300 Subject: [FieldTrip] Creating head model using template MRI Message-ID: Dear Fieldtrip experts, I would like to run ft_sourceanalysis as shown in the Appendix 1 here: http://www.fieldtriptoolbox.org/tutorial/coherence ft_sourceanalysis requires head model as a parameter. I don’t have mri images for my MEG subjects (measured with 306 channel Elekta Neuromag system) and, therefore, I would need to use a template head model or a template MRI. I think that I should use a local spheres volume conduction model as suggested here: http://www.fieldtriptoolbox.org/tutorial/headmodel_meg. Could someone please let me know if standard_mri.mat is the file that I should use? I created a head model using standard_mri.mat and following the instructions here: http://www.fieldtriptoolbox.org/tutorial/headmodel_meg I first created the head model for the example data and checked whether I can get the same result as in the example (Appendix 1: http://www.fieldtriptoolbox.org/tutorial/coherence). However, the result doesn’t seem to be correct: ​ Could someone please let me know what I am doing wrong? Many thanks already in advance if you can help! Best, Maria Here is the scrip that I have tested: hdr = ft_read_header(' C:\Users\Maria\Documents\filedtrip\fieldtrip-20170620\SubjectCMC.ds'); grad = hdr.grad; load('standard_mri.mat'); load('freq.mat') cfg = []; cfg.output = 'brain'; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.grad = hdr.grad; cfg.feedback = false; cfg.method = 'localspheres'; vol = ft_prepare_headmodel(cfg,segmentedmri); cfg = []; mri = ft_volumereslice(cfg, mri); cfg = []; cfg.method = 'dics'; cfg.refchan = 'EMGlft'; cfg.frequency = 18; cfg.hdmfile = vol; cfg.inwardshift = 1; cfg.grid.resolution = 1; cfg.grid.unit = 'cm'; source = ft_sourceanalysis(cfg, freq); cfg = []; cfg.parameter = 'coh'; cfg.downsample = 2; interp = ft_sourceinterpolate(cfg, source, mri); cfg = []; cfg.method = 'ortho'; cfg.interactive = 'yes'; cfg.funparameter = 'coh'; figure; ft_sourceplot(cfg, interp); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: head_model_test.png Type: image/png Size: 61455 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Sat Aug 12 21:41:28 2017 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sat, 12 Aug 2017 19:41:28 +0000 Subject: [FieldTrip] Granger analysis In-Reply-To: References: Message-ID: <9CFD6835-3912-44A1-82BF-477E8D10A7B5@donders.ru.nl> Hi Matt, I have never done this myself, but I think that in principle it should be possible to fit a set of models, and then compute the residuals’ variance ratio by hand. In other words, assuming data1 and data2 to be variables that consist of a single channel: mvar1 = ft_mvaranalysis(cfg, data1); mvar2 = ft_mvaranalysis(cfg, data2); mvar12 = ft_mvaranalysis(cfg, ft_appenddata([],data1,data2)); GC1to2 = log(mvar2.noisecov(1,1)./mvar12.noisecov(2,2)); GC2to1 = log(mvar1.noisecov(1,1)./mvar12.noisecov(1,1)); Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 12 Aug 2017, at 00:05, MATTHEW I BANKS > wrote: Greetings. What is the easiest way to compute non-spectrally resolved Granger causality, i.e. log(var(e_x)/var(e_xy)), where e_x and e_xy are the AR model error terms? -Matt ____________________________ Matthew I. Banks, Ph.D. Associate Professor Department of Anesthesiology University of Wisconsin 1300 University Avenue, Room 4605 Madison, WI 53706 office tel. (608)261-1143 lab tel. (608)263-6662 fax (608)263-2592 http://anesthesia.wisc.edu/index.php/Banks_Laboratory http://ntp.neuroscience.wisc.edu/banks.htm _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jens.klinzing at uni-tuebingen.de Sun Aug 13 19:29:15 2017 From: jens.klinzing at uni-tuebingen.de (=?ISO-8859-1?Q?=22Jens_Klinzing=2C_Universit=E4t_T=FCbingen=22?=) Date: Sun, 13 Aug 2017 19:29:15 +0200 Subject: [FieldTrip] Reject components using prepared vs. original data Message-ID: <59908C6B.20300@uni-tuebingen.de> Dear FieldTrip community, I highpass-filter and downsample my data in order to prepare them for doing an ICA. I want to apply the resulting unmixing matrix and my list of suspicious components to the original data (before downsampling and filtering). In the ECG artifacts tutorial [1], this is done like this: % decompose the original data as it was prior to downsampling to 150Hz cfg = []; cfg.unmixing = comp.unmixing; cfg.topolabel = comp.topolabel; comp_orig = ft_componentanalysis(cfg, data_orig); % the original data can now be reconstructed, excluding those components cfg = []; cfg.component = [4 17]; data_clean = ft_rejectcomponent(cfg,comp_orig, data_orig); However, based on some older posts on this mailinglist I tried to directly provide the components calculated on prepared data like this: data_clean2 = ft_rejectcomponent(cfg,comp, data_orig); The output for both versions seems to be identical. This is maybe not surprising considering that the only fields ft_rejectcomponents seems to use from the second input comp are .label, .topolabel, .unmixing and .topo. The first three are identical for comp and comp_orig. The values in comp.topo are however slightly different (in the order of 10^-14, looks like a precision issue?) compared to the values in comp_orig.topo. So my questions are: a) Are the two solutions equivalent or am I missing something? b) Where do the tiny differences in comp/comp_orig.topo come from? c) Should the tutorial be altered to the simpler version or are there scenarios in which the two versions are not equivalent? Thanks, Jens [1] http://www.fieldtriptoolbox.org/example/use_independent_component_analysis_ica_to_remove_ecg_artifacts -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopher.guettler at charite.de Sun Aug 13 21:32:47 2017 From: christopher.guettler at charite.de (=?Windows-1252?Q?G=FCttler=2C_Christopher?=) Date: Sun, 13 Aug 2017 19:32:47 +0000 Subject: [FieldTrip] Granger analysis In-Reply-To: <9CFD6835-3912-44A1-82BF-477E8D10A7B5@donders.ru.nl> References: , <9CFD6835-3912-44A1-82BF-477E8D10A7B5@donders.ru.nl> Message-ID: Gesendet mit meinem HTC ----- Nachricht beantworten ----- Von: "Schoffelen, J.M. (Jan Mathijs)" An: "FieldTrip discussion list" Betreff: [FieldTrip] Granger analysis Datum: Sa., Aug. 12, 2017 21:42 Hi Matt, I have never done this myself, but I think that in principle it should be possible to fit a set of models, and then compute the residuals’ variance ratio by hand. In other words, assuming data1 and data2 to be variables that consist of a single channel: mvar1 = ft_mvaranalysis(cfg, data1); mvar2 = ft_mvaranalysis(cfg, data2); mvar12 = ft_mvaranalysis(cfg, ft_appenddata([],data1,data2)); GC1to2 = log(mvar2.noisecov(1,1)./mvar12.noisecov(2,2)); GC2to1 = log(mvar1.noisecov(1,1)./mvar12.noisecov(1,1)); Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 12 Aug 2017, at 00:05, MATTHEW I BANKS > wrote: Greetings. What is the easiest way to compute non-spectrally resolved Granger causality, i.e. log(var(e_x)/var(e_xy)), where e_x and e_xy are the AR model error terms? -Matt ____________________________ Matthew I. Banks, Ph.D. Associate Professor Department of Anesthesiology University of Wisconsin 1300 University Avenue, Room 4605 Madison, WI 53706 office tel. (608)261-1143 lab tel. (608)263-6662 fax (608)263-2592 http://anesthesia.wisc.edu/index.php/Banks_Laboratory http://ntp.neuroscience.wisc.edu/banks.htm _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From christine.blume at sbg.ac.at Mon Aug 14 08:40:59 2017 From: christine.blume at sbg.ac.at (Blume Christine) Date: Mon, 14 Aug 2017 06:40:59 +0000 Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test Message-ID: Dear all, I am comparing event-related oscillatory responses in two conditions A and B. In each condition, subjects have been presented with two different stimulus types, let's take "houses" and "faces" as an easy example. What I have done so far is I compared the oscillatory responses to the two stimuli WITHIN each condition using cluster based permutation tests (depsamplesT; frequency range 4-15 Hz, 173 electrodes, 6 time bins). What I find is significant differences between "houses" and "faces" within each condition. However it seems that in higher frequencies there is also a difference between conditions A and B. Now reviewers have asked me to test this difference statistically. Unfortunately, I do not really know how to go about...any suggestions are highly appreciated! Best, Christine -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at donders.ru.nl Mon Aug 14 10:10:17 2017 From: t.marshall at donders.ru.nl (Marshall, T.R. (Tom)) Date: Mon, 14 Aug 2017 08:10:17 +0000 Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test In-Reply-To: References: Message-ID: <95C9A440AA5AB042A81E170A4573A15A7B9D8EC9@EXPRD98.hosting.ru.nl> Hi Christine, If I understand correctly: For each subject you have four conditions - A_face, A_house, B_face, B_house You compared A_face with A_house and there was a significant difference You compared B_face with B_house and there was also a significant difference Right? Now the reviewers want you to test if there is a difference between A and B You could: For every subject, create an average of A_face and A_house (let's call it A_avg) For every subject, create an average of B_face and B_house (let's call it B_avg) Compare A_avg and B_avg using depsamplesT Best, Tom ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Blume Christine [christine.blume at sbg.ac.at] Sent: 14 August 2017 08:40 To: FieldTrip discussion list (fieldtrip at science.ru.nl) Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test Dear all, I am comparing event-related oscillatory responses in two conditions A and B. In each condition, subjects have been presented with two different stimulus types, let’s take “houses” and “faces” as an easy example. What I have done so far is I compared the oscillatory responses to the two stimuli WITHIN each condition using cluster based permutation tests (depsamplesT; frequency range 4-15 Hz, 173 electrodes, 6 time bins). What I find is significant differences between “houses” and “faces” within each condition. However it seems that in higher frequencies there is also a difference between conditions A and B. Now reviewers have asked me to test this difference statistically. Unfortunately, I do not really know how to go about…any suggestions are highly appreciated! Best, Christine -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Mon Aug 14 14:27:30 2017 From: anne.urai at gmail.com (Anne Urai) Date: Mon, 14 Aug 2017 14:27:30 +0200 Subject: [FieldTrip] Fwd: [Comp-neuro] International Brain Laboratory Staff Positions Ads In-Reply-To: References: Message-ID: — Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany www.anneurai.net / @AnneEUrai ---------- Forwarded message ---------- From: Zachary Mainen Date: 11 August 2017 at 17:34 Subject: [Comp-neuro] International Brain Laboratory Staff Positions Ads To: Zach Mainen Cc: info at internationalbrainlab.com Dear all, Please see below 5 available positions for staff with the International Brain Lab. Dissemination through your contacts would be much appreciated. Best, Zach Mainen --- The International Brain Laboratory (https://www.internationalbrainlab.com/) is seeking 5 collaborators who will play key roles in a new large-scale international collaboration in brain research. The IBL combines the efforts of approximately 50 scientists in 20 laboratories toward understanding the brain-wide basis of a complex behavior. The project will involve recording the activity of millions of neurons in the working brain and building mathematical models of the resulting data. The data sets this project will produce are vast and complex, including physiological recordings, behavioural measurements, and video, all of which must be standardized into common formats, integrated into a single database, and subjected to quality control. These core positions will support the both experimental and theoretical work through the entire lifecycle of data, including acquisition, analysis, modeling and dissemination. Project Manager (PM) - The primary responsibilities of the PM will include ensuring delivery of key milestones, managing overall project budget and finances, facilitating project governance and internal communication, and liaising with funders, external agencies and partners. Candidates should have demonstrated success in project management of a comparable scale and a strong background in scientific research. Technical Manager (TM) - The TM will be responsible for ensuring reproducibility of experiments across labs by (1) helping to establish and maintain a common set of experimental apparatus for behavior and neural recordings and (2) establishing procedures for standardizing, monitoring and troubleshooting experimental conditions, including animal subjects, surgical procedures, materials, etc. The position will involve extensive travel between ten experimental laboratories at six institutions across the U.S. and Europe. The ideal candidate would have a PhD in neuroscience and very strong technical and experimental skills. Strong organizational and interpersonal skills are required. Prior experience in laboratory or project management is desirable. Data Coordinator (DC) - The DC will work closely with our contributing labs and scientific programming staff to ensure the integrity and organization of data collected by experimental labs. The ideal candidate would have a PhD in neuroscience, and extensive experience with large neurophysiological and behavioral datasets. Attention to detail and ability to work collaboratively are both essential. Strong computing ability is also important, including knowledge of relational databases, Python and MATLAB. Scientific MATLAB Programmer (SMP) - The SP will contribute to the design of applications and pipelines for organization, storage and analysis of this data. The job will involve building software and data infrastructure for this collaborative research project, and supporting it. The ideal candidate will have extensive experience with MATLAB and previous work with big data in scientific research. Knowledge of Python and relational databases and experience interfacing with experimental control hardware is desirable. Senior Scientific Programmer (SSP) - The SSP will lead the design of applications and pipelines for organization, storage and analysis of this data. The job will involve building software and data infrastructure, as well as a role in ensuring data integrity, working closely with data providers to ensure it meets project standards. The ideal candidate will have extensive experience with relational databases and Python. Experience with MATLAB, previous work with big data in scientific research, and experience interfacing with experimental control hardware would also be desirable. Remuneration will be competitive and commensurate with experience. There is considerable flexibility in base location within the U.S. and Europe. To apply, please send cover letter and CV to info at internationalbrainlab.com with subject: PositionAcronym LastName. Review of applications will begin immediately and continue until the position is filled, with an ideal start date of Sept.-Oct., 2017. --- Zachary F. Mainen, Ph.D. Champalimaud Neuroscience Programme Champalimaud Centre for the Unknown Av. Brasília s/n 1400-038 Lisbon Portugal +351 210 480 100 zmainen at neuro.fchampalimaud.org www.neuro.fchampalimaud.org/group/mainen @zmainen _______________________________________________ Comp-neuro mailing list Comp-neuro at neuroinformatics.be http://www.tnb.ua.ac.be/mailman/listinfo/comp-neuro -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomitbeker at gmail.com Tue Aug 15 04:54:41 2017 From: shlomitbeker at gmail.com (Shlomit Beker) Date: Mon, 14 Aug 2017 22:54:41 -0400 Subject: [FieldTrip] Bug in ft_channelrepair Message-ID: Hi All, I have a weird issue - I get error when calling ft_channelrepair, which I cannot find a solution for. For some datasets (but not for all), it gives the following error: Error using - Matrix dimensions must agree. Error in ft_channelrepair (line 196) distance = sqrt(sum((sens.chanpos(goodsensindx, :) - repmat(sens.chanpos(badsensindx, :), numel(goodsensindx), 1)).^2, 2)); Apparently, ft_channelrepair does not reconstruct some of the bad electrodes (in my case - PO8, P10), which cause sens.chanpos to be empty. Any help is appreciated! Shlomit Beker CNL lab Albert Einstein College of Medicine -------------- next part -------------- An HTML attachment was scrubbed... URL: From christine.blume at sbg.ac.at Tue Aug 15 13:15:37 2017 From: christine.blume at sbg.ac.at (Blume Christine) Date: Tue, 15 Aug 2017 11:15:37 +0000 Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test In-Reply-To: <95C9A440AA5AB042A81E170A4573A15A7B9D8EC9@EXPRD98.hosting.ru.nl> References: <95C9A440AA5AB042A81E170A4573A15A7B9D8EC9@EXPRD98.hosting.ru.nl> Message-ID: Hi Tom, Thanks a lot indeed for the quick reply. I do find significant differences between A_avg and B_avg in the frequency range where I expect them following the results from the within condition comparisons. Although it is not directly comparable because clusters may obviously differ, I guess that is the best I can do. Thanks again! Best, Christine Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Marshall, T.R. (Tom) Gesendet: Montag, 14. August 2017 10:10 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Post hoc comparison following cluster-based permutation test Hi Christine, If I understand correctly: For each subject you have four conditions - A_face, A_house, B_face, B_house You compared A_face with A_house and there was a significant difference You compared B_face with B_house and there was also a significant difference Right? Now the reviewers want you to test if there is a difference between A and B You could: For every subject, create an average of A_face and A_house (let's call it A_avg) For every subject, create an average of B_face and B_house (let's call it B_avg) Compare A_avg and B_avg using depsamplesT Best, Tom ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Blume Christine [christine.blume at sbg.ac.at] Sent: 14 August 2017 08:40 To: FieldTrip discussion list (fieldtrip at science.ru.nl) Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test Dear all, I am comparing event-related oscillatory responses in two conditions A and B. In each condition, subjects have been presented with two different stimulus types, let's take "houses" and "faces" as an easy example. What I have done so far is I compared the oscillatory responses to the two stimuli WITHIN each condition using cluster based permutation tests (depsamplesT; frequency range 4-15 Hz, 173 electrodes, 6 time bins). What I find is significant differences between "houses" and "faces" within each condition. However it seems that in higher frequencies there is also a difference between conditions A and B. Now reviewers have asked me to test this difference statistically. Unfortunately, I do not really know how to go about...any suggestions are highly appreciated! Best, Christine -------------- next part -------------- An HTML attachment was scrubbed... URL: From silas_chiu at yahoo.com Tue Aug 15 15:19:59 2017 From: silas_chiu at yahoo.com (Silas Chiu) Date: Tue, 15 Aug 2017 13:19:59 +0000 (UTC) Subject: [FieldTrip] Frequency bins changed after ft_freqstatistics References: <703842050.1982774.1502803199970.ref@mail.yahoo.com> Message-ID: <703842050.1982774.1502803199970@mail.yahoo.com> Dear Community, Nice to meet you all. My name is Ho Ching Chiu, currently working at the language lab in Experimental Psychology, University of Bristol, for a project on sentence comprehension using EEG. I tried to use ft_freqstatistics to do cluster-based permutation test, for a within-subject comparison of the power spectrum of 19 participants across 2 conditions. (Please refer to the codes below for more details.)Before this, I used ft_freqgrandaverage to conjugate the spectrum of all participants for each conditions, so the input data for the cluster-based permutation test (for each condition) is 4D (subj_chan_freq_time) and size(condition1.powspctrm) = [19 32 125 471]. There was no error / warning message in the process of running ft_freqstatistics. The problem is the frequency bins in the output data. The frequency bin of the input data is 1:1:125, and I expected the output(.stat .prob etc) will have the same dimension of 32 x 125 x 471. But what I get is 32 x 25 x 471, and the .freq of the output becomes 5:5:125, which is not expected. Could anyone please advice if I have set anything wrong in the process? Or is this some inherent limitation of the ft_freqstatistics function? Your help is much appreciated. Thank you very much. ---------code start---------load condition1 load condition2 cfg = []; cfg.channel          = 'all';cfg.latency          = 'all';cfg.frequency        = 'all'; cfg.method           = 'montecarlo';cfg.statistic        = 'ft_statfun_depsamplesT';    cfg.correctm         = 'cluster';cfg.clusteralpha     = 0.05;cfg.clusterstatistic = 'maxsum';cfg.minnbchan        = 2;    cfg.tail             = 0;    cfg.clustertail      = 0;    cfg.alpha            = 0.025;    cfg.numrandomization = 5000;  load neighboursfile % some predefined thingscfg.neighbours       = neighbours;     % cfg.design not relevant to this question, omitted for simplicity [stat] = ft_freqstatistics(cfg, condition1, condition2);  save stat_cond1_cond2 stat; -------code ends----------- Best regards,Ho Ching -------------- next part -------------- An HTML attachment was scrubbed... URL: From mapaul at uni-osnabrueck.de Wed Aug 16 10:53:30 2017 From: mapaul at uni-osnabrueck.de (mapaul at uni-osnabrueck.de) Date: Wed, 16 Aug 2017 10:53:30 +0200 (CEST) Subject: [FieldTrip] Calculation of within-subject interaction In-Reply-To: References: Message-ID: <54234.141.20.212.123.1502873610.squirrel@myuos.uni-osnabrueck.de> Dear fieldtrip community, I found this very helpful tutorial on how to calculate an interaction effect using a cluster-based permutation: http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests I have a question regarding this step: Copy GA11 to GAdiff11_12 and perform the assignment GAdiff11_12.avg=GA11.avg-GA12.avg. Copy GA21 to GAdiff21_22 and perform the assignment GAdiff21_22.avg=GA21.avg-GA22.avg. I have a full within-subjects design and I was wondering if it matters which of my factors I define as factor 1 and which as factor 2. In other words, is there a difference between calculating GA11.avg - GA12.avg followed by GA21.avg - GA22.avg as opposed to GA11.avg - GA21.avg followed by GA12.avg - GA22.avg and then running a permutation test on the differences? Any help would be greatly appreciated! Thanks and with best regards, Mariella From grigu at cbs.mpg.de Wed Aug 16 13:13:44 2017 From: grigu at cbs.mpg.de (Maren Grigutsch) Date: Wed, 16 Aug 2017 13:13:44 +0200 Subject: [FieldTrip] Calculation of within-subject interaction In-Reply-To: <54234.141.20.212.123.1502873610.squirrel@myuos.uni-osnabrueck.de> References: <54234.141.20.212.123.1502873610.squirrel@myuos.uni-osnabrueck.de> Message-ID: Dear Mariella, in my opinion, both approaches are equivalent because (A11 - A12) - (A21 - A22) = (A11 - A21) - (A12 - A22). Best, --Maren On 08/16/2017 10:53 AM, mapaul at uni-osnabrueck.de wrote: > Dear fieldtrip community, > > I found this very helpful tutorial on how to calculate an interaction > effect using a cluster-based permutation: > > http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests > > I have a question regarding this step: > > Copy GA11 to GAdiff11_12 and perform the assignment > GAdiff11_12.avg=GA11.avg-GA12.avg. > Copy GA21 to GAdiff21_22 and perform the assignment > GAdiff21_22.avg=GA21.avg-GA22.avg. > > I have a full within-subjects design and I was wondering if it matters > which of my factors I define as factor 1 and which as factor 2. In other > words, is there a difference between calculating > > GA11.avg - GA12.avg followed by GA21.avg - GA22.avg > as opposed to GA11.avg - GA21.avg followed by GA12.avg - GA22.avg > > and then running a permutation test on the differences? > > Any help would be greatly appreciated! > > Thanks and with best regards, > Mariella > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Maren Grigutsch Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr.1a, 04103 Leipzig, Germany Phone: +49 341 - 9940 136 Fax: +49 341 - 9940 2260 web: www.cbs.mpg.de From jiang.yizhou.i at gmail.com Thu Aug 17 13:03:08 2017 From: jiang.yizhou.i at gmail.com (Yizhou Jiang) Date: Thu, 17 Aug 2017 12:03:08 +0100 Subject: [FieldTrip] Same Pattern but different scale by using ft_freqbaseline or choose baseline in ft_singleplotTFR Message-ID: Dear all, I am using two different way to plot the figure after baseline correction. 1) do the baseline correction using the function 'ft_freqbaseline', and the plot the figure; 2) do not do baseline correction and add baseline when plot the figure using 'ft_singleplotTFR'. I am confused that two figures have similar pattern, but are different in z scale. I wonder is any error with my code (below). This is the code % POWER cfg = []; cfg.channel = 'all';%channels; cfg.method = 'wavelet'; %'wavelet' cfg.keeptrials = 'yes'; cfg.output = 'pow'; %'fourier'; %'pow';'powandcsd' cfg.foi = 5:2:200; %2:2:80 cfg.toi = -1:0.02:2; cfg.pad = 'nextpow2'; cfg.width = linspace(2,25,numel(cfg.foi)); %linspace(1,25,numel(cfg.foi)) POW = ft_freqanalysis(cfg, data); % *1)* % baseline correction cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype ='db'; POW_db = ft_freqbaseline(cfg,POW); figure;clf;cfg = []; cfg.xlim=[-0.5 1.2]; cfg.parameter = 'powspctrm'; cfg.ylim = 'maxmin'; cfg.linewidth =2; cfg.fontsize=12; F=ft_singleplotTFR(cfg,POW_db); [image: 内嵌图片 1] or *2)* %no base line correction before % figure;clf;cfg = []; cfg.xlim=[-0.5 1.2]; cfg.parameter = 'powspctrm'; cfg.ylim = 'maxmin'; cfg.linewidth =2; cfg.fontsize=12; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype ='db'; F=ft_singleplotTFR(cfg,POW); [image: 内嵌图片 2] Best wishes, Wendy -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 24423 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 27743 bytes Desc: not available URL: From awutz at mit.edu Fri Aug 18 00:06:09 2017 From: awutz at mit.edu (Andreas Wutz) Date: Thu, 17 Aug 2017 22:06:09 +0000 Subject: [FieldTrip] cluster-based test with Wilcoxon signrank test Message-ID: Dear fieldtrippers, I am trying to combine the Wilcoxon signrank test statistic with the cluster-based permutation approach. To this end, I wrote my own statfun, which calculates the Wilcoxon test statistic (using signrank.m in the stats toolbox) for each random partition. The output of my statfun is s.stat, which contains a z-value (which is output by the function signrank.m for high enough N). I understand that the cluster-based test does not depend on the specific test statistic used. My question applies to the initial threshold, which is used for clustering. As I see it, I have three options here. 1) parametric In this case, I would calculate the critical value(s) for a normal distribution (+/- 1.96) and set this as s.critval. 2 - 3) nonparametric_individual / nonparametric_common I assume the threshold is here based on the permutation distribution with those samples chosen for clustering that exceed the 1-clusteralpha quantile. is this assumption correct? What is the difference between those two methods? In general, I am unsure which of the three methods to choose. Which are the advantages / disadvantages of each option? I would be very happy about your feedback! Best, Andreas -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.suntrup-krueger at uni-muenster.de Fri Aug 18 12:45:31 2017 From: s.suntrup-krueger at uni-muenster.de (Sonja =?iso-8859-1?Q?Suntrup-Kr=FCger?=) Date: Fri, 18 Aug 2017 12:45:31 +0200 (CEST) Subject: [FieldTrip] How to apply ROI mask to grandavg Message-ID: Dear all, I want to compare task-related brain activation in a ROI in two groups of subjects. I performed LCMV beamformer analysis on single subject data and, after normalization, created a grandaverage of each group, which I need to compare statistically within a defined ROI. Since the option to create a ROI in ft_sourcestatistis is unfortunately no longer available since 2015, I had the following idea to create my ROI: By using ft_volumelookup I created a binary mask from an anatomical atlas indicating my ROI in standard space. Now I would like to apply this mask on my grandaverage data. In specific, I want to multiply my mask values (zeros and ones) with the "pow" values in my grandavg. This would set all the power values outside my ROI to zero. With the result from this procedure I can then calculate my statistc. My binary mask has the dimensions: x,y,z mask [181x217x181 logical] coordsys: 'spm' In my grandavg, the dimension "dim" is the same, but the power values ("pow") and their positions ("pos") are listed as a single long vector for each subject: pow: [7109137x6 double] (because there are 6 datasets in the grandavg) pos: [7109137x3 double] dim: [181 217 181] coordsys: 'spm' My question is: How does the "x,y,z"-data structure of "dim" relate to the "single long vector"-data structure of "pow"/"pos"? If I had this information, I could transform my mask into the same structure and apply it as explained above. Your help is greatly appreciated. Thank you very much! Sonja Suntrup-Krüger -- Sonja Suntrup-Krueger, MD Assistant Professor of Neurology Institute for Biomagnetism and Biosignalanalysis University of Muenster, Germany From maria.hakonen at gmail.com Fri Aug 18 16:01:14 2017 From: maria.hakonen at gmail.com (Maria Hakonen) Date: Fri, 18 Aug 2017 17:01:14 +0300 Subject: [FieldTrip] Problem with coordinate systems when creating head model Message-ID: Dear fieldtrip experts, I would need to create a volume conduction model of the head using standard_mri.m. standard_mri.m is in the spm coordinate system and my MEG data in the neuromag system. To get all data in the same coordinate system, I have converted standard_mri.m to neuromag using ft_volumerealign. However, ft_volumesegment converts MRI back to spm. Could someone please let me know how I can get the head model and MEG data in the same coordinate system? I really appreciate any help you can provide! Here is what I have tried: mri is in spm coordinate system: mri = dim: [181 217 181] anatomy: [181x217x181 uint8] transform: [4x4 double] hdr: [1x1 struct] unit: 'mm' coordsys: 'spm' Check fiducials for ft_volumerealign: hs=ft_read_headshape('aml_sentences16b_raw_tsss.fif', 'unit','mm'); hs.fid.pos ans = -66.1226 0.0000 -0.0000 -0.0000 83.5082 -0.0000 67.1784 -0.0000 -0.0000 hs.fid.label ans = 'LPA' 'Nasion' 'RPA' cfg = []; cfg.method= 'fiducial'; cfg.fiducial.nas = [-0.0000 83.5082 -0.0000]; cfg.fiducial.lpa = [-66.1226 0.0000 -0.0000]; cfg.fiducial.rpa = [67.1784 -0.0000 -0.0000]; cfg.coordsys= 'neuromag'; cfg.headshape = hs; mri_realigned = ft_volumerealign(cfg, mri); mri_realigned seems to be in neuromag system as it should be. mri_realigned = dim: [181 217 181] anatomy: [181x217x181 uint8] transform: [4x4 double] hdr: [1x1 struct] unit: 'mm' coordsys: 'neuromag' inside: [181x217x181 logical] transformorig: [4x4 double] cfg: [1x1 struct] However, ft_volumesegment converts it back to spm system: cfg = []; cfg.output = 'brain'; cfg.coordsys = 'neuromag'; segmentedmri = ft_volumesegment(cfg, mri_realigned); Warning: The option cfg.coordsys is deprecated, support is no longer guaranteed > In ft_checkconfig (line 168) In ft_volumesegment (line 170) the input is volume data with dimensions [181 217 181] Converting the coordinate system from neuromag to spm I also tried to convert MEG data to spm system as follows: hdr = ft_read_header('aml_sentences16b_raw_tsss.fif', 'unit','mm'); cfg = []; cfg.method= 'fiducial'; cfg.target.pos(1,:) = [1 0 0]; cfg.target.pos(1,:) = [0 83 0]; cfg.target.pos(1,:) = [0 -117 0]; cfg.target.lab = {'NAS', 'LPA', 'RPA'}; cfg.grad = hdr.grad; mri_realigned = ft_sensorrealign(cfg); … but got: Warning: FT_SENSORREALIGN is deprecated, please use FT_ELECTRODEREALIGN instead. > In ft_sensorrealign (line 118) using gradiometers specified in the configuration Reference to non-existent field 'label'. Error in ft_datatype_sens (line 148) nchan = length(sens.label); Error in ft_sensorrealign (line 247) tmp(i) = ft_datatype_sens(template(i)); % ensure up-to-date sensor description template(i) seems to be as follows: ans = pos: [0 -117 0] lab: {'NAS' 'LPA' 'RPA'} I think that ft_electroderealign only works with EEG data since it gives: mri_realigned = ft_electroderealign(cfg); Warning: The field cfg.headshape is forbidden, it will be removed from your configuration > In ft_checkconfig (line 215) In ft_electroderealign (line 212) using gradiometers specified in the configuration Reference to non-existent field 'elecpos'. Error in ft_electroderealign (line 254) assert(isequaln(elec_original.elecpos, elec_original.chanpos), 'this function requires same electrode and channel positions.'); Best, Maria -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.ketz at gmail.com Fri Aug 18 23:40:11 2017 From: nick.ketz at gmail.com (Nick Ketz) Date: Fri, 18 Aug 2017 14:40:11 -0700 Subject: [FieldTrip] bias in cluster stats from density of frequency sampling? Message-ID: I've recently gotten into an internal debate about what the optimal frequency sampling (using wavelet decomposition) would be for a given range of frequencies, and it has given rise a few points of discussion: over all my general question is this: Is it possible to bias the cluster based permutation statistics by over sampling the frequency domain? Consider the case where you have two true signals, one at 2Hz and one at 10Hz. Now, in an absurd scenario you sample every 1Hz in delta band (i.e. 1, 2 and 3Hz), and you sample every 0.1Hz in alpha (i.e. 8:.1:12 = 41bins). Now you go and do a cluster based analysis, are you more likely to find the 10Hz signal because you have 10 frequency that are within that range (10.0 to 10.9Hz) compared to the 2Hz signal in which you only have 1 bin? My intuition is that, yes, you would be biased because the t-values form 10.0 to 10.9Hz would get grouped and summed together to characterize the 10Hz cluster, and only the single 2Hz bin t-values would characterize to the 2Hz signal. This question is arising from a sampling strategy that seems optimal and least biased to me, which is to space your frequency bins at intervals related to the uncertainty in the frequency estimate (i.e. frequency/wavelet-width). Using this strategy you end up with far fewer bins in the mid to higher frequency bands, beta and gammer, and many more in the lower bands (things get more complicated when your widths are frequency dependent). Will this bias cluster based analyses from finding clusters in these higher freqs compared to a linear sampling scheme? Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Sat Aug 19 14:55:29 2017 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sat, 19 Aug 2017 12:55:29 +0000 Subject: [FieldTrip] How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) Message-ID: Sonja. You are definitely on the right track. pow: [7109137x6 double] (because there are 6 datasets in the grandavg) pos: [7109137x3 double] dim: [181 217 181] The dim are the size of the cube for your source model matrix. The pow/pos and other matrices are linear. The linear arrays are a little easier to manipulate, may be the reason that FT decided to use these rather than have 3D matrices. 181*217*181 = 7109137. If you create a ROI matrix, it would either be of dimensions, N-ROI X 181 X 217 X 181, or more conveniently you could reshape it into a N-ROI x 7109137. Then multiply the ROI matrix * the pow, e.g., [N-ROI X 7109137] * [7109137 X 6] = N-ROI * 6. This would sum across each voxel in the source model matrix for each roi. You can imagine a single ROI of the entire source model (1 x N-dipoles), this would sum across all voxels in the source model. Or a single ROI, say of the IFG, in the ROI matrix, would give you the sum of the CDR pow data in the IFG. Or 10 selected ROIs; etc etc. I also often put the POW data into a MRI volume. In the MATLAB format a NIFTI MRI volume struct representing this source model would have a img member that is 181 x 217 x 181. You can simply assign the POW to the img model to get the CDR data into the MRI volume, e.g., MRIVOLUME.img = pow. Then save or manipulate the MRI volume struct. 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 ************************************************* -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of fieldtrip-request at science.ru.nl Sent: Saturday, August 19, 2017 6:00 AM To: fieldtrip at science.ru.nl Subject: fieldtrip Digest, Vol 81, Issue 16 Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit https://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. How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) 2. Problem with coordinate systems when creating head model (Maria Hakonen) 3. bias in cluster stats from density of frequency sampling? (Nick Ketz) ---------------------------------------------------------------------- Message: 1 Date: Fri, 18 Aug 2017 12:45:31 +0200 (CEST) From: Sonja Suntrup-Kr?ger To: Subject: [FieldTrip] How to apply ROI mask to grandavg Message-ID: Content-Type: text/plain; charset=iso-8859-1 Dear all, I want to compare task-related brain activation in a ROI in two groups of subjects. I performed LCMV beamformer analysis on single subject data and, after normalization, created a grandaverage of each group, which I need to compare statistically within a defined ROI. Since the option to create a ROI in ft_sourcestatistis is unfortunately no longer available since 2015, I had the following idea to create my ROI: By using ft_volumelookup I created a binary mask from an anatomical atlas indicating my ROI in standard space. Now I would like to apply this mask on my grandaverage data. In specific, I want to multiply my mask values (zeros and ones) with the "pow" values in my grandavg. This would set all the power values outside my ROI to zero. With the result from this procedure I can then calculate my statistc. My binary mask has the dimensions: x,y,z mask [181x217x181 logical] coordsys: 'spm' In my grandavg, the dimension "dim" is the same, but the power values ("pow") and their positions ("pos") are listed as a single long vector for each subject: pow: [7109137x6 double] (because there are 6 datasets in the grandavg) pos: [7109137x3 double] dim: [181 217 181] coordsys: 'spm' My question is: How does the "x,y,z"-data structure of "dim" relate to the "single long vector"-data structure of "pow"/"pos"? If I had this information, I could transform my mask into the same structure and apply it as explained above. Your help is greatly appreciated. Thank you very much! Sonja Suntrup-Kr?ger -- Sonja Suntrup-Krueger, MD Assistant Professor of Neurology Institute for Biomagnetism and Biosignalanalysis University of Muenster, Germany ******************************* From robpetrosino at gmail.com Sat Aug 19 18:42:57 2017 From: robpetrosino at gmail.com (Roberto Petrosino) Date: Sat, 19 Aug 2017 18:42:57 +0200 Subject: [FieldTrip] adding info about individual trials Message-ID: <8E89FC7C-FA23-42AE-B0D9-3981F5B8241E@gmail.com> Hello everyone, I just started learning FieldTrip, and I am still adjusting to it, so apologies if my question is very basic. Before running standard pre-processing steps and artifact rejection, I need to add specific information about individual trials of my non-epoched EEG data (i.e., which word was presented for specific trials), but I can’t find my way in the documentation online. Is there any specific function it might be appropriate for this purpose? Thanks in advance, -Roberto ---------- Roberto Petrosino Ph.D. Student in Linguistics CT Institute for the Brain and Cognitive Sciences University of Connecticut -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sun Aug 20 14:01:45 2017 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 20 Aug 2017 20:01:45 +0800 Subject: [FieldTrip] adding info about individual trials Message-ID: This really depends what you want to use that information for. Normally I would think that all trials should be preprocessed in the same way regardless of condition, so I don't really need this information at that stage, but later on it might be useful for things like regressing ERP amplitude on word length or something. But for stuff like this you don't necessarily have to have this information *in* the data structure. For example, imagine I want to know which word was presented each trial. Typically, I have that list in a text file somewhere, in order (i.e., the first line of the text file is trial 1, the second line is trial 2, etc.). Then I do my various preprocessing of the EEG data in fieldtrip. Rather than actually removing the trials with artifacts, at first I just keep a list of which trials have artifact (or, better yet, which trials are 'good', without artifacts). Then I can use that list at the end of my processing pipeline to pull out the good trials and match them up to which words they are, and I can run whatever statistics I need on that. But there is no fieldtrip-specific tricks about that; I just have a text file listing all the information I need and I read that into MATLAB. --- Stephen Politzer-Ahles The Hong Kong Polytechnic University Department of Chinese and Bilingual Studies http://www.mypolyuweb.hk/~sjpolit/ > > > ------------------------------ > > Message: 2 > Date: Sat, 19 Aug 2017 18:42:57 +0200 > From: Roberto Petrosino > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] adding info about individual trials > Message-ID: <8E89FC7C-FA23-42AE-B0D9-3981F5B8241E at gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello everyone, > > I just started learning FieldTrip, and I am still adjusting to it, so > apologies if my question is very basic. > > Before running standard pre-processing steps and artifact rejection, I > need to add specific information about individual trials of my non-epoched > EEG data (i.e., which word was presented for specific trials), but I can?t > find my way in the documentation online. Is there any specific function it > might be appropriate for this purpose? > > Thanks in advance, > > -Roberto > > ---------- > Roberto Petrosino > Ph.D. Student in Linguistics > CT Institute for the Brain and Cognitive Sciences > University of Connecticut > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: attachments/20170819/3ae6923e/attachment-0001.html> > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 81, Issue 17 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.ketz at gmail.com Mon Aug 21 07:48:51 2017 From: nick.ketz at gmail.com (Nick Ketz) Date: Sun, 20 Aug 2017 22:48:51 -0700 Subject: [FieldTrip] adding info about individual trials Message-ID: You can create a custom trial function that does something like this: http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition Or, if you can just add that info to the trialinfo matrix after epoching but before removing artifacts -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornelia.quaedflieg at uni-hamburg.de Mon Aug 21 21:50:31 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Mon, 21 Aug 2017 21:50:31 +0200 Subject: [FieldTrip] head model - not able to use singleshell - different plot Message-ID: <010601d31ab6$bf6650c0$3e32f240$@uni-hamburg.de> Dear fieldtrip users, I have two simple questions about constructing an individual head model that keep me puzzling. 1. I get a warning when using cfg.method = 'singleshell'; The warning is: Warning: please specify cfg.method='projectmesh', 'iso2mesh' or 'isosurface' > In ft_prepare_mesh at 138 In ft_prepare_headmodel at 344 Warning: using 'projectmesh' as default I checked the cfg.method in the reference documentation as well as in the manuals on the fieldtrip website and here it is used as well. Does anyone have an idea why I can't use it? My full code is: cfg = []; cfg.method = 'singleshell'; hdm = ft_prepare_headmodel(cfg, seg); 2. when plotting the template grid in single-subject head coordinates, superimposed onto the head model my looks different than the plot of the manual (see below). Could this be related to the fact that the singleshell is not used when preparing the head model? Or might there be something else wrong in my code? My plot The plot in the manual The full code is: % and this is where the template source models are templatedir = fullfile(ftdir, 'template', 'sourcemodel'); load(fullfile(templatedir, 'standard_sourcemodel3d8mm')); template = sourcemodel; clear sourcemodel; % inverse-warp the template grid to subject specific coordinates cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri = mri_spm_rs; cfg.grid.unit = 'mm'; sourcemodel = ft_prepare_sourcemodel(cfg); figure; hold on % plot all objects in one figure ft_plot_mesh(sourcemodel.pos(sourcemodel.inside,:)); ft_plot_vol(hdm, 'facecolor', 'cortex', 'edgecolor', 'none');alpha 0.4; camlight; Any help is really appreciated E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 41493 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image006.jpg Type: image/jpeg Size: 10483 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image007.jpg Type: image/jpeg Size: 5384 bytes Desc: not available URL: From s.suntrup-krueger at uni-muenster.de Tue Aug 22 09:15:36 2017 From: s.suntrup-krueger at uni-muenster.de (Sonja =?iso-8859-1?Q?Suntrup-Kr=FCger?=) Date: Tue, 22 Aug 2017 09:15:36 +0200 (CEST) Subject: [FieldTrip] How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) In-Reply-To: Message-ID: Dear John, hello everyone, thank you very much for your valuable response!! Your suggestion is exactly what I had in mind. However, as I see it, if I want to do the multiplication you suggested (multiply the ROI matrix * the pow), the question that remains is how to reshape the ROI-matrix correcly. In other words: How do the Voxel indices of the linear pos (or pow) -matrix relate to the voxel indices of the dim-cube matrix? I think this is what I need to know to correctly reshape my ROI-matrix from cube (N-ROI X 181 X 217 X 181) to linear (N-ROI x 7109137) prior to the multiplication step. Further advice is greatly appreciated! Thank you very much! Sincerely, Sonja RICHARDS, JOHN schrieb am 2017-08-19: > Sonja. You are definitely on the right track. > pow: [7109137x6 double] (because there are 6 datasets in the grandavg) > pos: [7109137x3 double] > dim: [181 217 181] > The dim are the size of the cube for your source model matrix. The pow/pos and other matrices are linear. The linear arrays are a little easier to manipulate, may be the reason that FT decided to use these rather than have 3D matrices. 181*217*181 = 7109137. > If you create a ROI matrix, it would either be of dimensions, N-ROI X 181 X 217 X 181, or more conveniently you could reshape it into a N-ROI x 7109137. > Then multiply the ROI matrix * the pow, e.g., > [N-ROI X 7109137] * [7109137 X 6] = N-ROI * 6. > This would sum across each voxel in the source model matrix for each roi. You can imagine a single ROI of the entire source model (1 x N-dipoles), this would sum across all voxels in the source model. > Or a single ROI, say of the IFG, in the ROI matrix, would give you the sum of the CDR pow data in the IFG. Or 10 selected ROIs; etc etc. > I also often put the POW data into a MRI volume. In the MATLAB format a NIFTI MRI volume struct representing this source model would have a img member that is 181 x 217 x 181. You can simply assign the POW to the img model to get the CDR data into the MRI volume, e.g., MRIVOLUME.img = pow. Then save or manipulate the MRI volume struct. > 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 > ************************************************* > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of fieldtrip-request at science.ru.nl > Sent: Saturday, August 19, 2017 6:00 AM > To: fieldtrip at science.ru.nl > Subject: fieldtrip Digest, Vol 81, Issue 16 > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > To subscribe or unsubscribe via the World Wide Web, visit > https://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. How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) > 2. Problem with coordinate systems when creating head model > (Maria Hakonen) > 3. bias in cluster stats from density of frequency sampling? > (Nick Ketz) > ---------------------------------------------------------------------- > Message: 1 > Date: Fri, 18 Aug 2017 12:45:31 +0200 (CEST) > From: Sonja Suntrup-Kr?ger > To: > Subject: [FieldTrip] How to apply ROI mask to grandavg > Message-ID: > > Content-Type: text/plain; charset=iso-8859-1 > Dear all, > I want to compare task-related brain activation in a ROI in two groups of subjects. I performed LCMV beamformer analysis on single subject data and, after normalization, created a grandaverage of each group, which I need to compare statistically within a defined ROI. > Since the option to create a ROI in ft_sourcestatistis is unfortunately no longer available since 2015, I had the following idea to create my ROI: > By using ft_volumelookup I created a binary mask from an anatomical atlas indicating my ROI in standard space. Now I would like to apply this mask on my grandaverage data. In specific, I want to multiply my mask values (zeros and ones) with the "pow" values in my grandavg. > This would set all the power values outside my ROI to zero. With the result from this procedure I can then calculate my statistc. > My binary mask has the dimensions: x,y,z > mask [181x217x181 logical] > coordsys: 'spm' > In my grandavg, the dimension "dim" is the same, but the power values ("pow") and their positions ("pos") are listed as a single long vector for each subject: > pow: [7109137x6 double] (because there are 6 datasets in the grandavg) > pos: [7109137x3 double] > dim: [181 217 181] > coordsys: 'spm' > My question is: How does the "x,y,z"-data structure of "dim" relate to the "single long vector"-data structure of "pow"/"pos"? If I had this information, I could transform my mask into the same structure and apply it as explained above. > Your help is greatly appreciated. > Thank you very much! > Sonja Suntrup-Kr?ger > -- > Sonja Suntrup-Krueger, MD > Assistant Professor of Neurology > Institute for Biomagnetism and Biosignalanalysis University of Muenster, Germany > ******************************* From RICHARDS at mailbox.sc.edu Tue Aug 22 15:17:06 2017 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Tue, 22 Aug 2017 13:17:06 +0000 Subject: [FieldTrip] How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) In-Reply-To: References: Message-ID: Sonja: The x,y,z of the dim are the dimensions of a 3D matrix; the pos and pow are linear matrices, and are stacked as if they were an XYZ atlas. How to do the other stuff is MATLAB programming. If you have a 3D matrix, you can treat is like a linear matrix for multiplication. e.g., ROIMATRIX(x, y, z) can be accessed linearly with ROIMATRIX(:). If you have a 4D matrix (nROI,x,y,z), it could be reshaped reshapematrix=reshape(ROIMATRIX,nROI,size(ROIMATRIX,2)*size(ROIMatrix,3)*size(ROIMATRIX,4)); This will give a matrix with (nROI,nVoxels), similar in dimension to the pos or pow matrix. Or. Keep your ROI atlas in the FT format in the first place (e.g. nROI X length(pos)) and then you won't have to transform it for the operations with the pow vector. There are several other ways to do this in MATLAB. One way is to use indices rather than 3D matrices. You can translate each 3D ROI into an index matrix with sub2ind; then use the resulting indices to access the corresponding elements in the pow (e.g., extractroi=pow(indices)), and simply sum or get an average of the elements in extractroi. This is MATLAB program rather than FT programming. 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 ************************************************* -----Original Message----- From: Sonja Suntrup-Krüger [mailto:s.suntrup-krueger at uni-muenster.de] Sent: Tuesday, August 22, 2017 3:16 AM To: RICHARDS, JOHN ; fieldtrip at science.ru.nl Subject: Re: How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) Dear John, hello everyone, thank you very much for your valuable response!! Your suggestion is exactly what I had in mind. However, as I see it, if I want to do the multiplication you suggested (multiply the ROI matrix * the pow), the question that remains is how to reshape the ROI-matrix correcly. In other words: How do the Voxel indices of the linear pos (or pow) -matrix relate to the voxel indices of the dim-cube matrix? I think this is what I need to know to correctly reshape my ROI-matrix from cube (N-ROI X 181 X 217 X 181) to linear (N-ROI x 7109137) prior to the multiplication step. Further advice is greatly appreciated! Thank you very much! Sincerely, Sonja RICHARDS, JOHN schrieb am 2017-08-19: > Sonja. You are definitely on the right track. > pow: [7109137x6 double] (because there are 6 datasets in the grandavg) > pos: [7109137x3 double] > dim: [181 217 181] > The dim are the size of the cube for your source model matrix. The pow/pos and other matrices are linear. The linear arrays are a little easier to manipulate, may be the reason that FT decided to use these rather than have 3D matrices. 181*217*181 = 7109137. > If you create a ROI matrix, it would either be of dimensions, N-ROI X 181 X 217 X 181, or more conveniently you could reshape it into a N-ROI x 7109137. > Then multiply the ROI matrix * the pow, e.g., [N-ROI X 7109137] * > [7109137 X 6] = N-ROI * 6. > This would sum across each voxel in the source model matrix for each roi. You can imagine a single ROI of the entire source model (1 x N-dipoles), this would sum across all voxels in the source model. > Or a single ROI, say of the IFG, in the ROI matrix, would give you the sum of the CDR pow data in the IFG. Or 10 selected ROIs; etc etc. > I also often put the POW data into a MRI volume. In the MATLAB format a NIFTI MRI volume struct representing this source model would have a img member that is 181 x 217 x 181. You can simply assign the POW to the img model to get the CDR data into the MRI volume, e.g., MRIVOLUME.img = pow. Then save or manipulate the MRI volume struct. > 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 > ************************************************* > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of > fieldtrip-request at science.ru.nl > Sent: Saturday, August 19, 2017 6:00 AM > To: fieldtrip at science.ru.nl > Subject: fieldtrip Digest, Vol 81, Issue 16 > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > To subscribe or unsubscribe via the World Wide Web, visit > https://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. How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) > 2. Problem with coordinate systems when creating head model > (Maria Hakonen) > 3. bias in cluster stats from density of frequency sampling? > (Nick Ketz) > ---------------------------------------------------------------------- > Message: 1 > Date: Fri, 18 Aug 2017 12:45:31 +0200 (CEST) > From: Sonja Suntrup-Kr?ger > To: > Subject: [FieldTrip] How to apply ROI mask to grandavg > Message-ID: > > er.de> > Content-Type: text/plain; charset=iso-8859-1 > Dear all, > I want to compare task-related brain activation in a ROI in two groups of subjects. I performed LCMV beamformer analysis on single subject data and, after normalization, created a grandaverage of each group, which I need to compare statistically within a defined ROI. > Since the option to create a ROI in ft_sourcestatistis is unfortunately no longer available since 2015, I had the following idea to create my ROI: > By using ft_volumelookup I created a binary mask from an anatomical atlas indicating my ROI in standard space. Now I would like to apply this mask on my grandaverage data. In specific, I want to multiply my mask values (zeros and ones) with the "pow" values in my grandavg. > This would set all the power values outside my ROI to zero. With the result from this procedure I can then calculate my statistc. > My binary mask has the dimensions: x,y,z > mask [181x217x181 logical] > coordsys: 'spm' > In my grandavg, the dimension "dim" is the same, but the power values ("pow") and their positions ("pos") are listed as a single long vector for each subject: > pow: [7109137x6 double] (because there are 6 datasets in the grandavg) > pos: [7109137x3 double] > dim: [181 217 181] > coordsys: 'spm' > My question is: How does the "x,y,z"-data structure of "dim" relate to the "single long vector"-data structure of "pow"/"pos"? If I had this information, I could transform my mask into the same structure and apply it as explained above. > Your help is greatly appreciated. > Thank you very much! > Sonja Suntrup-Kr?ger > -- > Sonja Suntrup-Krueger, MD > Assistant Professor of Neurology > Institute for Biomagnetism and Biosignalanalysis University of > Muenster, Germany > ******************************* From christine.blume at sbg.ac.at Wed Aug 23 15:31:07 2017 From: christine.blume at sbg.ac.at (Blume Christine) Date: Wed, 23 Aug 2017 13:31:07 +0000 Subject: [FieldTrip] Effect size measure for cluster-based permutation tests Message-ID: Dear all, I came across a question posted by someone about a year ago, which concerned effect size measures for cluster-based permutation tests. Unfortunately, the question does not seem to have been answered... Q: I am using cluster-based permutation tests (depsamplesT, on time-frequency data) and am wondering how to best calculate an effect size from that. Best, Christine -------------- next part -------------- An HTML attachment was scrubbed... URL: From alik.widge at gmail.com Wed Aug 23 16:41:44 2017 From: alik.widge at gmail.com (Alik Widge) Date: Wed, 23 Aug 2017 10:41:44 -0400 Subject: [FieldTrip] Effect size measure for cluster-based permutation tests In-Reply-To: References: Message-ID: My naive answer, which perhaps will provoke Eric to provide a better one: you have the actual cluster statistic and its permutation distribution under the null hypothesis. It seems as though that distribution could be assumed Gaussian and something like Cohen's d calculated. On Aug 23, 2017 9:35 AM, "Blume Christine" wrote: > Dear all, > > > > I came across a question posted by someone about a year ago, which > concerned effect size measures for cluster-based permutation tests. > Unfortunately, the question does not seem to have been answered… > > > > Q: I am using cluster-based permutation tests (depsamplesT, on > time-frequency data) and am wondering how to best calculate an effect size > from that. > > > > Best, > > Christine > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ainsley.temudo at nyu.edu Wed Aug 23 22:00:19 2017 From: ainsley.temudo at nyu.edu (Ainsley Temudo) Date: Thu, 24 Aug 2017 00:00:19 +0400 Subject: [FieldTrip] ROI masks for cortical surface source model Message-ID: Hi everyone, I have a few questions regarding how to use the atlases to create ROI masks to use for my source analysis 1. *how do you use the freesurfer atlas*. i’ve tried ft_read_atlas({'aparc+aseg.mgz','SPNS1151-oct-6-src.fif’}) but I don’t think this is the correct use because I get a structure with an aparc field which is 256x256x256. I don’t see the link between this and my source model. It tried using ft_volumelookup after (using the volume that was put through freesufer as an input ) but this also gives a 256x256x256 mask. I know at some point I have to orig.inuse to link the vertices in the high resolution tessellation to those in the sourcemodel. but i’m missing something or doing something wrong before this. 1. *If I want to use a template atlas, how do I link that to my source space.* I tried following this http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space . but how do I warp the cortical sheet grid that i've already created to the the template grid. 3. *Is it possible to use an ROI mask that was created from fMRI data in afni in **field trip?* I can read in the ROI using ft_read_atlas, but have no idea how that could be used to select the corresponding grid points in my source model. would really appreciate if someone could help answer this questions Thanks! Ainsley -------------- next part -------------- An HTML attachment was scrubbed... URL: From psc.dav at gmail.com Wed Aug 23 22:57:46 2017 From: psc.dav at gmail.com (David Pascucci) Date: Wed, 23 Aug 2017 22:57:46 +0200 Subject: [FieldTrip] single trials eLoreta Message-ID: Dear fieldtrip experts, I am doing single-trial connectivity in the source space with EEG, and I moved recently to fieldtrip. I am trying to use the eLoreta method to get single-trial estimates in the following way: % eLORETA cfg = []; cfg.method = 'eloreta'; cfg.grid = leadfield; cfg.headmodel = headmodel; cfg.eloreta.keepfilter = 'yes'; cfg.eloreta.normalize = 'yes'; cfg.eloreta.lambda = 0.05; *(1) cfg.eloreta.projectnoise = 'yes'; eLO_source = ft_sourceanalysis(cfg,data); % in the above line, "data" is the results of ft_timelockanalysis % with cfg.covariance = 'yes'; *(2) % then I put the source positions from the MNI template I % used for the sourcemodel (see: % http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject- % specific_grids_that_are_equivalent_across_subjects_in_normalized_space eLO_source.pos = template_grid.pos; iPOS = eLO_source.pos; iPOS(eLO_source.inside==0,:) = NaN; % only points inside gray matter % Then I select ROIs (here only one for simplicity) to extract single-trial source activity: [v,I] = min(pdist2(iPOS, ROIs_mni , 'euclidean')); % And I multiply the spatial filter for the EEG data in each trial W = eLO_source.avg.filter{I}; % filter at my ROI of interest for tr = 1:size(data.trial,1) % loop over trials trials{tr} = W * squeeze(data.trial(tr,:,:)); *(3) end My 3 questions (marked at the right of the above code) are the following: (0, not marked above): Is this approach correct? (1) Is there a way to select the best lambda parameter (e.g., selecting the one that best approximates the activity at the EEG channels level)? (2) I am confused about the role of the covariance, since it doesn't seem to be used when source activity is estimated using the set of spatial filters at the single trial (my lack of knowledge) (3) Is the "trials{tr} = W * squeeze(data.trial(tr,:,:)); " approach correct to get time-series of source activity in a ROI? I hope this was clear enough, looking forward for your feedback. Best, David -- --------------------- David Pascucci Postdoctoral Fellow University of Fribourg Department of Psychology Rue de Faucigny 2 1700 Fribourg Switzerland -------------- next part -------------- An HTML attachment was scrubbed... URL: From juliacoopiza at gmail.com Wed Aug 23 23:16:05 2017 From: juliacoopiza at gmail.com (Julia Coopi) Date: Wed, 23 Aug 2017 15:16:05 -0600 Subject: [FieldTrip] Using PPC method Message-ID: Dear Fieldtrippers, I am new in fieltrip. I want to use pair wise phase consistency method for measuring the spike-pahse locking. My data set is recorded by neuralynx. For measuring it I found this link: http://www.fieldtriptoolbox.or g/tutorial/spikefield. Is it the right link? Should I go through all steps including reading spikes and LFPs from neuralynx, make trails and .... finally call thefollowing function? ft_spiketriggeredspectrum It is very boring and time consuming. Actually, I imported files into matlab and make the trials which was a huge work at that time. I don't want to do it again and import data from neuralynx by fieldtrip (which seems is not very straighforward). I want to use the PPC method of fieldtrip using imported files into matlab. Is there any way to do that? Please guide me what is the best way. Thanks, Julia -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascualm at key.uzh.ch Thu Aug 24 05:27:40 2017 From: pascualm at key.uzh.ch (pascualm at key.uzh.ch) Date: Thu, 24 Aug 2017 12:27:40 +0900 Subject: [FieldTrip] =?utf-8?q?Innovations_orthogonalization=3A_a_solution?= =?utf-8?q?_to_the_major_pitfalls_of_EEG/MEG_=E2=80=9Cleakage_corre?= =?utf-8?b?Y3Rpb27igJ0=?= Message-ID: Dear Colleagues, The pre-print at: https://doi.org/10.1101/178657 might be of interest to those working in the field of brain connectivity based on signals of electric neuronal activity. It is shown that "leakage correction" in the form of "signal orthogonalization" consistently produces false connectomes. More importantly, a new method is proposed for the resolution ("unmixing") of electrophysiological signals, based on "innovations orthogonalization". -------- Abstract : The problem of interest here is the study of brain functional and effective connectivity based on non-invasive EEG-MEG inverse solution time series. These signals generally have low spatial resolution, such that an estimated signal at any one site is an instantaneous linear mixture of the true, actual, unobserved signals across all cortical sites. False connectivity can result from analysis of these low-resolution signals. Recent efforts toward “unmixing” have been developed, under the name of “leakage correction”. One recent noteworthy approach is that by Colclough et al (2015 NeuroImage, 117:439-448), which forces the inverse solution signals to have zero cross-correlation at lag zero. One goal is to show that Colclough’s method produces false human connectomes under very broad conditions. The second major goal is to develop a new solution, that appropriately “unmixes” the inverse solution signals, based on innovations orthogonalization. The new method first fits a multivariate autoregression to the inverse solution signals, giving the mixed innovations. Second, the mixed innovations are orthogonalized. Third, the mixed and orthogonalized innovations allow the estimation of the “unmixing” matrix, which is then finally used to “unmix” the inverse solution signals. It is shown that under very broad conditions, the new method produces proper human connectomes, even when the signals are not generated by an autoregressive model. -------- Cordially, Roberto ... Roberto D. Pascual-Marqui, PhD, PD The KEY Institute for Brain-Mind Research, University of Zurich Visiting Professor at Neuropsychiatry, Kansai Medical University, Osaka [www.keyinst.uzh.ch/loreta] [scholar.google.com/citations?user=pascualmarqui] From rikkert.hindriks at upf.edu Thu Aug 24 11:58:14 2017 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Thu, 24 Aug 2017 11:58:14 +0200 Subject: [FieldTrip] MEG magnetometer leadfields Message-ID: Dear all, I'm generating simulated data for leadfield matrices for the CTF 275 axial gradiometer system and I would like to compare different the results with those obtained from data simulated using a magnetometer configuration. It is possible to generate equivalent magnetometer leadfield matrices? (Equivalent in the sense of having the same number of coils at the same positions). Thanks and kind regards, Rikkert Virus-free. www.avg.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Thu Aug 24 13:11:27 2017 From: michelic72 at gmail.com (Cristiano Micheli) Date: Thu, 24 Aug 2017 13:11:27 +0200 Subject: [FieldTrip] MEG magnetometer leadfields In-Reply-To: References: Message-ID: Dear Rikkert, as far as I know the CTF toolbox is incorporated in the /external directory of FieldTrip and can help you a big deal. If, for example, you recorded or have access to original CTF recordings you can use the readin functions (ft_read_header) to read your datasets. After read-in,you will find that one of the header fields is called 'grad' andin there you have the information of all coils positions. See also this for further reading: http://www.fieldtriptoolbox.org/getting_started/ctf?s[]=ctf One of the grad sub-fields is called 'tra' and contains the magnetometers (columns) to gradiometer (rows) weights matrix. If you take care to define a new 'tra' matrix which weights 1 for each magnetometer then you reach your goal. You'll probably need to look into *grad.coilpos *and retain only a subset of your magnetometers positions (either the nearest or the furthest set from the head center)*, *and take care to keep consistency with the indexes in grad.tra too *.* IHTH Cris On Thu, Aug 24, 2017 at 11:58 AM, HINDRIKS, RIKKERT < rikkert.hindriks at upf.edu> wrote: > Dear all, > > I'm generating simulated data for leadfield matrices for the CTF 275 axial > gradiometer system and I would like to compare different the results with > those obtained from data simulated using a magnetometer configuration. > > It is possible to generate equivalent magnetometer leadfield matrices? > (Equivalent in the sense of having the same number of coils at the same > positions). > > Thanks and kind regards, > Rikkert > > > Virus-free. > www.avg.com > > <#m_-6692326249519774685_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From awutz at mit.edu Thu Aug 24 15:21:53 2017 From: awutz at mit.edu (Andreas Wutz) Date: Thu, 24 Aug 2017 13:21:53 +0000 Subject: [FieldTrip] Using PPC method In-Reply-To: References: Message-ID: Dear Julia, it seems that we are going down the same road. I am also in the process of building a pipeline for spike-field coherence and I am orienting myself along the mentioned tutorial. That being said, it should become clear that I am far from being an expert for this kind of analysis. Nevertheless, I want to share what I have learned about it in the last days. I hope someone else in the list will correct me in case. This post should also serve as a check for my own analysis. First, you don't have to re-do your prior analysis for your neuralynx data. You only have to bring the outputs of your analysis into a format that the ft_xxx functions can read. You probably already have all the required information for that from your previous spike sorting. Let's look at the data structure (already segmented into trials, as shown in the tutorial): spikeTrials = label: {'sig002a_wf' 'sig003a_wf'} timestamp: {[1x83601 int32] [1x61513 int32]} waveform: {[1x32x83601 double] [1x32x61513 double]} unit: {[1x83601 double] [1x61513 double]} hdr: [1x1 struct] dimord: '{chan}_lead_time_spike' cfg: [1x1 struct] time: {[1x83601 double] [1x61513 double]} trial: {[1x83601 double] [1x61513 double]} trialtime: [600x2 double] The fields ".waveform" and ".unit" won't be necessary for spike-field coherence. For the fields ".cfg" and ".hdr", I am not sure if they are used at some point. I fill them with the info I have. spikeTrials.hdr.FileHeader.Frequency = your SamplingFrequency; % 40000 spikeTrials.cfg.timestampspersecond = your SamplingFrequency; % 40000 spikeTrials.cfg.trl = nTrials x 3 matrix with start (1st column), end (2nd) and offset relative to trigger (3rd) of each trial in timestamp units. ".label" contains a cell array of strings with one string for each unit. ".dimord" can be copied from above. ".trialtime" = nTrials x 2 matrix with start (1st) / end (2nd) of each trial relative to trigger in seconds. The important fields are ".timestamp", ".time", ".trial". Those contain all info about each spike for each unit (1 x nUnits cell array, each cell contains a vector with one entry per spike for that unit). ".timestamp": spike times in timestamp units from the beginning of the recording (NOTE: Make sure your recording is continuous such that the timestamps increase from first to last, no clock resets to zero). ".time": spike times in seconds relative to trigger in each trial ".trial": trial number in which the spike occurred (1 for trial 1, 2 for 2 and so on) Best, Andreas ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Julia Coopi [juliacoopiza at gmail.com] Sent: Wednesday, August 23, 2017 5:16 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Using PPC method Dear Fieldtrippers, I am new in fieltrip. I want to use pair wise phase consistency method for measuring the spike-pahse locking. My data set is recorded by neuralynx. For measuring it I found this link: http://www.fieldtriptoolbox.org/tutorial/spikefield. Is it the right link? Should I go through all steps including reading spikes and LFPs from neuralynx, make trails and .... finally call thefollowing function? ft_spiketriggeredspectrum It is very boring and time consuming. Actually, I imported files into matlab and make the trials which was a huge work at that time. I don't want to do it again and import data from neuralynx by fieldtrip (which seems is not very straighforward). I want to use the PPC method of fieldtrip using imported files into matlab. Is there any way to do that? Please guide me what is the best way. Thanks, Julia -------------- next part -------------- An HTML attachment was scrubbed... URL: From tianyangma2013 at gmail.com Mon Aug 28 11:05:38 2017 From: tianyangma2013 at gmail.com (=?UTF-8?B?6ams5aSp6Ziz?=) Date: Mon, 28 Aug 2017 11:05:38 +0200 Subject: [FieldTrip] Using PPC method Message-ID: Dear Andreas, I am also a new learner using PPC method. In your reply to Julia, I don’t quite understand why there are same number of values in timestamp and time, since timestamps is the spike times from the beginning of the recording to the end and time is relative to trigger in each trial. In my case, I have timestamp of spikes and LFP data 0.5 s before and after stimulus in each trial . Do you think it is possible I could use the code by somehow manipulating the format of input? Thanks! Best, Tianyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From awutz at mit.edu Mon Aug 28 14:49:54 2017 From: awutz at mit.edu (Andreas Wutz) Date: Mon, 28 Aug 2017 12:49:54 +0000 Subject: [FieldTrip] Using PPC method In-Reply-To: References: Message-ID: Dear Tianyang, the spike timestamps in the fields ".timestamp" and ."time" should correspond to all trials that occur within the respective trial periods. In the spike-field coherence tutorial, if you compare the data structure for the entire recording (there called "spike") with the trial-cut data structure (there called "spikeTrials"), you can see that there are less spikes in the latter. This is because those trials, which are not within the specified trial periods, are left out. The tutorial worked great for me. Unfortunately, it stops at the point where inferential stats have to be computed. I understand that I have to break up the relationship between spike timestamp per trial with lfp phase per trial. This will require random resampling of the lfp-phases. Intuitively, I would shuffle the trial vector for the lfp and then calculate the ppc for each random partition (using the same number of spikes). Let me add my own questions here. 1) It is unclear to me what happens when I have more than one spike per trial (e.g. 3 spikes in trial 1). Should I construct the resampling distribution with as many draws from each trial as there where in the original data (e.g. 3 draws from trial 1 but at different time points)? 2) I wonder whether only the trial vector should be shuffled (preserving the time points per trial compared to the original effect but now from a different, random trial). In other words, if I had in the original data 3 spikes which happened in the trials [1 2 3] and at the times [-.5 0 1], should the random partition look like this: partition: trial = [3 1 2], time = [-.5 0 1] or should the time points be taken completely at random? I hope, I was able to be clear enough with my explanation. Best, Andreas ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of 马天阳 [tianyangma2013 at gmail.com] Sent: Monday, August 28, 2017 5:05 AM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Using PPC method Dear Andreas, I am also a new learner using PPC method. In your reply to Julia, I don’t quite understand why there are same number of values in timestamp and time, since timestamps is the spike times from the beginning of the recording to the end and time is relative to trigger in each trial. In my case, I have timestamp of spikes and LFP data 0.5 s before and after stimulus in each trial . Do you think it is possible I could use the code by somehow manipulating the format of input? Thanks! Best, Tianyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From nima.noury at student.uni-tuebingen.de Mon Aug 28 15:00:54 2017 From: nima.noury at student.uni-tuebingen.de (Nima Noury) Date: Mon, 28 Aug 2017 15:00:54 +0200 Subject: [FieldTrip] Last call for 2017 Tuebingen Systems Neuroscience Symposium (SNS) Message-ID: <20170828150054.Horde.LxjzP7lI-YaIc_1WPdDKRyM@webmail.uni-tuebingen.de> The Centre for Integrative Neuroscience, MEG Center Tuebingen, and the Graduate Training Centre of Neuroscience are pleased to announce the 2017 Tuebingen Systems Neuroscience Symposium (SNS2017) The symposium takes place on October 11 and 12, 2017 at the University of Tuebingen. This annual international meeting brings together leading researchers in the field of systems neuroscience featuring plenary talks, poster sessions and social events. Join us in Tuebingen to learn about the latest advances in systems neuroscience. Confirmed speakers: Francesco Battaglia, Nijmegen Gustavo Deco, Barcelona Biyu He, New York Christoph Kayser, Glasgow Daniel Margulies, Leipzig Uta Noppeney, Birmingham Marios Philiastides, Glasgow Hansjörg Scherberger, Göttingen Woodrow Shew, Fayetteville Preejas Tewarie, Nottingham For more information and registration, please visit: http://meg.medizin.uni-tuebingen.de/2017/ Please forward this information to any of your colleagues and collaborators that may be interested in the symposium. Nima Noury AG Large-Scale Neuronal Interactions Centre for Integrative Neuroscience (CIN) University of Tübingen Otfried Müller-Straße 25 72076 Tübingen Germany From tianyangma2013 at gmail.com Mon Aug 28 23:31:17 2017 From: tianyangma2013 at gmail.com (=?UTF-8?B?6ams5aSp6Ziz?=) Date: Mon, 28 Aug 2017 23:31:17 +0200 Subject: [FieldTrip] Using PPC method In-Reply-To: References: Message-ID: Dear Andreas, I still don't quite understand the tutorial. spikeTrials = label: {'sig002a_wf' 'sig003a_wf'} timestamp: {[1x83601 int32 ] [1x61513 int32 ]} waveform: {[1x32x83601 double ] [1x32x61513 double ]} unit: {[1x83601 double ] [1x61513 double ]} hdr: [1x1 struct ] dimord: '{chan}_lead_time_spike' cfg: [1x1 struct ] time: {[1x83601 double ] [1x61513 double ]} trial: {[1x83601 double ] [1x61513 double ]} trialtime: [600x2 double ] Like here, I don't know why for timestamp,time and trial, there are same number of values. If I have one unit, 60 trials and focus on -0.5 s to 0.5 s around stimulus event, I think trial means which trial of the 60 trials has spikes in this 1 s. The time means time point of spikes located in the 1 s around stimulus for each trial. Is it correct? But what about the timestamp? It means from the beginning of recording to the end and has nothing to do with trials? I feel I am quite lost. Best, Tianyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From awutz at mit.edu Tue Aug 29 00:55:10 2017 From: awutz at mit.edu (Andreas Wutz) Date: Mon, 28 Aug 2017 22:55:10 +0000 Subject: [FieldTrip] Using PPC method In-Reply-To: References: , Message-ID: Dear Tianyang, maybe it's a good idea to download the accompanying sample data from the tutorial and look if you can recreate the shown data structure. Then look closer into the values of the respective fields. That should give you a better grasp on what is required there. I have not fully looked into the code but my feeling is that spikeTrials.timestamp is not of any further use and is just carried from the data structure before (which was not cut into trials and where the raw timestamps were useful). The timing of spikes relative to the trial zero point is fully described in the fields ".time", ".trial" and ".trialtime". Best, Andreas From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of 马天阳 [tianyangma2013 at gmail.com] Sent: Monday, August 28, 2017 5:31 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Using PPC method Dear Andreas, I still don't quite understand the tutorial. spikeTrials = label: {'sig002a_wf' 'sig003a_wf'} timestamp: {[1x83601 int32] [1x61513 int32]} waveform: {[1x32x83601 double] [1x32x61513 double]} unit: {[1x83601 double] [1x61513 double]} hdr: [1x1 struct] dimord: '{chan}_lead_time_spike' cfg: [1x1 struct] time: {[1x83601 double] [1x61513 double]} trial: {[1x83601 double] [1x61513 double]} trialtime: [600x2 double] Like here, I don't know why for timestamp,time and trial, there are same number of values. If I have one unit, 60 trials and focus on -0.5 s to 0.5 s around stimulus event, I think trial means which trial of the 60 trials has spikes in this 1 s. The time means time point of spikes located in the 1 s around stimulus for each trial. Is it correct? But what about the timestamp? It means from the beginning of recording to the end and has nothing to do with trials? I feel I am quite lost. Best, Tianyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From maximilien.chaumon at gmail.com Tue Aug 29 15:09:56 2017 From: maximilien.chaumon at gmail.com (Maximilien Chaumon) Date: Tue, 29 Aug 2017 13:09:56 +0000 Subject: [FieldTrip] ft_volumerealign headshape should stay out of scalp volume In-Reply-To: References: Message-ID: Dear all, I'm aligning an MRI with a headshape point cloud. I often get headshape points inside the skull after realigning with icp, like for this guy, for instance: [image: image.png] Would it be possible to tell the icp search algorithm when points are inside the skull and force it to blow the headshape cloud point outwards? Many thanks, Max ​ ​ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 82349 bytes Desc: not available URL: From amentink at chdr.nl Thu Aug 31 14:03:48 2017 From: amentink at chdr.nl (Alexander Mentink) Date: Thu, 31 Aug 2017 12:03:48 +0000 Subject: [FieldTrip] Units powerspectrum time-frequency analysis Message-ID: Dear FieldTrip community, I have a question regarding time-frequency analyses, it would be awesome if someone could help me out! Does anyone perhaps know what the absolute units are of the TFRwave.powerspctrm that you get when performing a continuous wavelet transform: cfg = []; cfg.channel = 'Cz'; cfg.method = 'tfr'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.25:30; cfg.toi = -3:0.01:2.5; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.channel = 'Cz'; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.zlim = 'maxabs'; cfg.xlim = [-0.2 1.5]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) The single plot shows reliable results compared to the Hanning window method, however the values of the powerspectrum are in the hundred thousands (?) - see image attached. This can't be uV^2/Hz, perhaps nV^2/Hz? Thanks in advance! Alex Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: [Twitter] [LinkedIn] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image5c5f52.PNG Type: image/png Size: 696 bytes Desc: image5c5f52.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image8e5b87.PNG Type: image/png Size: 648 bytes Desc: image8e5b87.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TFR_hanning_cm1_37.png Type: image/png Size: 30823 bytes Desc: TFR_hanning_cm1_37.png URL: From RICHARDS at mailbox.sc.edu Tue Aug 1 02:19:08 2017 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Tue, 1 Aug 2017 00:19:08 +0000 Subject: [FieldTrip] Postdoctoral position Message-ID: Post-doctoral Fellow in Infant Attention-University of South Carolina John Richards in the Department of Psychology at the University of South Carolina is seeking a qualified PhD for a postdoctoral position. The position involves research on the development of infant attention. The laboratory uses psychophysiological methods (heart rate, EEG, ERP) and MRI (structural) to examine the brain bases of the development of infant attention and recognition memory (http://jerlab.psych.sc.edu). Ideal candidates would have background in infant cognition, perception, or attention, and experience in cognitive neuroscience methods. The position would involve current ongoing projects, data analysis and write up of existing data, and collaborative development of new work. Writing experience and a publication record is required; and extensive writing and publication will be expected. At the candidate's interest, teaching experiences are available. The position is initially funded for one year, and subsequent years will be available depending on funding. The position is available now and candidates could start immediately. The salary is set at NIH standards accounting for years of postdoctoral experience. Review of applications will begin immediately and continue until the position is filled. Please send a letter of application, curriculum vitae, 1-2 writing samples, and the names and contact information of three references to richards-john at sc.edu, John E. Richards, Department of Psychology, University of South Carolina, Columbia SC 29028. You can find further information and submit your materials electronically at https://uscjobs.sc.edu/postings/17416 *********************************************** 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 ************************************************* From q.meng301 at gmail.com Tue Aug 1 08:42:30 2017 From: q.meng301 at gmail.com (Q Meng) Date: Tue, 1 Aug 2017 16:42:30 +1000 Subject: [FieldTrip] Questions about coherence statistics on source level data Message-ID: Dear list, I'm running source analysis using DICS on my MEG data following the cortical-muscular coherence tutorial and now would like to compare the source level coherence value between 2 conditions in a between subject design. I found some older posts on this topic from the discuss list ( https://mailman.science.ru.nl/pipermail/fieldtrip/2011-September/004279.html) (https://mailman.science.ru.nl/pipermail/fieldtrip/2016-March/010166.html). Following the instructions, I Z-transformed the coherence manually and specified cfg.statistic = 'ft_statfun_diff' and then did the cluster based non-parametric permutation test. However, I got an error message says *"Error using ft_statistics_montecarlo (line 242) could not determine the parametric critical value for clustering"* right after the statistical analysis started. Please see below a snippet of code: ... Z- transform coherence manually and creating 0-coherence data ... cfg = []; cfg.method = 'montecarlo'; % cfg.statistic = 'ft_statfun_depsamplesT'; cfg.statistic = 'ft_statfun_diff'; cfg.parameter = 'coh'; cfg.correctm = 'cluster'; cfg.numrandomization = 1000; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.tail = 0; cfg.clustertail = 0; cfg.correcttail = 'alpha'; cfg.connectivity = VertConn; nsubj = 19; cfg.design(1,:) = [1:nsubj 1:nsubj]; cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; cfg.uvar = 1; % row of design matrix that contains unit variable (in this case: subjects) cfg.ivar = 2; % row of design matrix that contains independent variable (the conditions) stat = ft_sourcestatistics(cfg, data_meg_source_cohe_sentence_dics_parsing_B2_ICA{:}, data_meg_source_cohe_sentence_dics_parsing_B5_ICA{:}); Before this, I just used cfg.statistic = 'ft_statfun_depsamplesT' to compare the coherence value between two conditions and the program itself worked well. Does anyone have an idea where my problem could be or what I should do instead?3 Thanks for your help! Best, Qing -------------- next part -------------- An HTML attachment was scrubbed... URL: From amentink at chdr.nl Tue Aug 1 11:52:33 2017 From: amentink at chdr.nl (Alexander Mentink) Date: Tue, 1 Aug 2017 09:52:33 +0000 Subject: [FieldTrip] Time frequency analysis using evoked potentials Message-ID: Hi Fieldtrip community, I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) http://tinyurl.com/y7nerh8v The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. The code I use for hanning window is %%%%%%%%%%%%%%%%%% cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); % Visualization cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) %%%%%%%%%%%%%%%%%% And for wavelet transform is %%%%%%%%%%%%%%%%%% cfg = []; cfg.channel = 'Cz'; cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.5:30; cfg.toi = -0.5:0.05:1; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'relative'; % OR absolute cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.channel = 'Cz'; figure ft_singleplotTFR(cfg, TFRwave); %%%%%%%%%%%%%%%%%% I have tried the tutorials online, but this doesn't give me any better results... Does anyone know what I am doing wrong? Thanks many times! Best regards, Alex (Master student Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: [Twitter] [LinkedIn] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: imaged4db2c.PNG Type: image/png Size: 696 bytes Desc: imaged4db2c.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: imagecccaa4.PNG Type: image/png Size: 648 bytes Desc: imagecccaa4.PNG URL: From julian.keil at gmail.com Tue Aug 1 12:22:05 2017 From: julian.keil at gmail.com (Julian Keil) Date: Tue, 1 Aug 2017 12:22:05 +0200 Subject: [FieldTrip] Time frequency analysis using evoked potentials In-Reply-To: References: Message-ID: <54F7EE1C-5619-4CC6-83CF-2AEF59D01D48@gmail.com> Hi Alex, just a very basic thought: Using a fixed zlim of [0 1] does not really make sense when using relative change (or absolute) baseline, as you could very well have values below zero post stimulus. Also, when I compare your TFR Hanning (with absolute baseline) to the TFR Wavelet (with absolute baseline), they don't look too different, just badly scaled. Maybe you can play around with the zlim of the singleplot to get a better idea of what is happening here. Also, I wouldn't expect slightly different results from the wavelet vs. the mtmconvol as you are using different settings (e.g. 3 cycles width in the mtmconvol vs. 7 cycles in the wavelet). Good luck, Julian Am 01.08.2017 um 11:52 schrieb Alexander Mentink: > Hi Fieldtrip community, > > I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. > > Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) > > http://tinyurl.com/y7nerh8v > > The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. > > The code I use for hanning window is > %%%%%%%%%%%%%%%%%% > cfg = []; > cfg.output = 'pow'; > cfg.channel = 'Cz'; > cfg.method = 'mtmconvol'; > cfg.taper = 'hanning'; > cfg.foi = 1:0.025:30; % OR 4:0.025:30 > cfg.t_ftimwin = 3./cfg.foi; > cfg.toi = -0.5:0.01:0.7; > TFRwave = ft_freqanalysis(cfg, trialdata); > > % Visualization > cfg = []; > cfg.baseline = [-0.5 -0.1]; > cfg.baselinetype = 'absolute'; > cfg.maskstyle = 'saturation'; > cfg.zlim = [0 1]; > cfg.showlabels = 'yes'; > figure > ft_singleplotTFR(cfg, TFRwave) > %%%%%%%%%%%%%%%%%% > > And for wavelet transform is > %%%%%%%%%%%%%%%%%% > cfg = []; > cfg.channel = 'Cz'; > cfg.method = 'wavelet'; > cfg.width = 7; > cfg.output = 'pow'; > cfg.foi = 1:0.5:30; > cfg.toi = -0.5:0.05:1; > TFRwave = ft_freqanalysis(cfg, trialdata); > > cfg = []; > cfg.baseline = [-0.5 -0.1]; > cfg.baselinetype = 'relative'; % OR absolute > cfg.maskstyle = 'saturation'; > cfg.zlim = [0 1]; > cfg.channel = 'Cz'; > figure > ft_singleplotTFR(cfg, TFRwave); > %%%%%%%%%%%%%%%%%% > > I have tried the tutorials online, but this doesn't give me any better results... > > Does anyone know what I am doing wrong? > > Thanks many times! > > Best regards, > > Alex (Master student > > > > > Alexander Mentink > Centre for Human Drug Research > Zernikedreef 8 > 2333 CL Leiden > The Netherlands > T +31 (0) 71 7517166 > amentink at chdr.nl > http://www.chdr.nl > > Follow us: > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://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 J.Herring at donders.ru.nl Tue Aug 1 13:05:07 2017 From: J.Herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Tue, 1 Aug 2017 11:05:07 +0000 Subject: [FieldTrip] Time frequency analysis using evoked potentials In-Reply-To: References: Message-ID: <25A27A1A-3DED-4CC7-818C-CE61C4324A03@donders.ru.nl> Dear Alex, Change your scaling to ‘maxabs’ (cfg.zlim = ‘maxabs’;) to get a better feel of the scaling of your data. Now you have a scaling from 0 to 1, which, given your data, gives you very saturated images. Also, I would argue using a relative baseline on a TFR of an ERP (or ERF) is risky as in theory, your baseline should be zero (you even explicitly try to impose that by performing a baseline correction when calculating the ERP). This means that you are dividing your activation period by values close to zero. This will give you arbitrarily large values. An absolute baseline is preferred. Best, Jim On 1 Aug 2017, at 11:52, Alexander Mentink > wrote: Hi Fieldtrip community, I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) http://tinyurl.com/y7nerh8v The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. The code I use for hanning window is %%%%%%%%%%%%%%%%%% cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); % Visualization cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) %%%%%%%%%%%%%%%%%% And for wavelet transform is %%%%%%%%%%%%%%%%%% cfg = []; cfg.channel = 'Cz'; cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.5:30; cfg.toi = -0.5:0.05:1; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'relative'; % OR absolute cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.channel = 'Cz'; figure ft_singleplotTFR(cfg, TFRwave); %%%%%%%%%%%%%%%%%% I have tried the tutorials online, but this doesn't give me any better results... Does anyone know what I am doing wrong? Thanks many times! Best regards, Alex (Master student Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.merkel at med.ovgu.de Tue Aug 1 13:11:59 2017 From: christian.merkel at med.ovgu.de (christian.merkel at med.ovgu.de) Date: Tue, 1 Aug 2017 11:11:59 +0000 Subject: [FieldTrip] Using fixed orientations for men-source estimation Message-ID: <71D8A67A81D69A4CB5BE2B979021C26ECAFFE748@esen3.imed.uni-magdeburg.de> Hello, I am running ft_sourceanalysis and am wondering why I can restrict the parameter-estimation in LCMV and sLORETA by setting the parameter 'fixedori' but not when using MNE. Shouldn't one be able to also just use the normal direction of each source position here as well? Can I just apply the same logic in the script 'minimumnormestimate' to change the field 'lf.ori' as, for example, in 'ft_sloreta' or would this be problematic down the line? Thank You, Christian From amentink at chdr.nl Tue Aug 1 13:28:00 2017 From: amentink at chdr.nl (Alexander Mentink) Date: Tue, 1 Aug 2017 11:28:00 +0000 Subject: [FieldTrip] Time frequency analysis using evoked potentials In-Reply-To: <25A27A1A-3DED-4CC7-818C-CE61C4324A03@donders.ru.nl> References: , <25A27A1A-3DED-4CC7-818C-CE61C4324A03@donders.ru.nl> Message-ID: <3b839c54a1a142f6bea35538ce6a481a@chdr.nl> Thanks Jim, The graphs look a bit better, however I still get many NaN artifacts when I want to show the frequency range of 1-30 Hz, which disappears completely when I shift it to 4-30 Hz. Does anyone know what the underlying problem is here? KR, Alex Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: [Twitter] [LinkedIn] ________________________________ From: fieldtrip-bounces at science.ru.nl on behalf of Herring, J.D. (Jim) Sent: 01 August 2017 13:05 To: FieldTrip discussion list Subject: Re: [FieldTrip] Time frequency analysis using evoked potentials Dear Alex, Change your scaling to ‘maxabs’ (cfg.zlim = ‘maxabs’;) to get a better feel of the scaling of your data. Now you have a scaling from 0 to 1, which, given your data, gives you very saturated images. Also, I would argue using a relative baseline on a TFR of an ERP (or ERF) is risky as in theory, your baseline should be zero (you even explicitly try to impose that by performing a baseline correction when calculating the ERP). This means that you are dividing your activation period by values close to zero. This will give you arbitrarily large values. An absolute baseline is preferred. Best, Jim On 1 Aug 2017, at 11:52, Alexander Mentink > wrote: Hi Fieldtrip community, I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) http://tinyurl.com/y7nerh8v The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. The code I use for hanning window is %%%%%%%%%%%%%%%%%% cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); % Visualization cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) %%%%%%%%%%%%%%%%%% And for wavelet transform is %%%%%%%%%%%%%%%%%% cfg = []; cfg.channel = 'Cz'; cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.5:30; cfg.toi = -0.5:0.05:1; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'relative'; % OR absolute cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.channel = 'Cz'; figure ft_singleplotTFR(cfg, TFRwave); %%%%%%%%%%%%%%%%%% I have tried the tutorials online, but this doesn't give me any better results... Does anyone know what I am doing wrong? Thanks many times! Best regards, Alex (Master student Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image514dfb.PNG Type: image/png Size: 696 bytes Desc: image514dfb.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image819e4b.PNG Type: image/png Size: 648 bytes Desc: image819e4b.PNG URL: From q.meng301 at gmail.com Wed Aug 2 03:11:24 2017 From: q.meng301 at gmail.com (Q Meng) Date: Wed, 2 Aug 2017 11:11:24 +1000 Subject: [FieldTrip] Questions about coherence statistics on source level data In-Reply-To: References: Message-ID: Dear list, My apology, it should be a comparison of coherence value between 2 conditions in a within subject design. In addition to my previous question on how to implement a non-parametric permutation test on the difference of coherence values, I would like to consult that in case I used hanning window as a single taper, what should I do with the Z spectra equation described in Jan-Mathijs's J.Neurosci. 2011 paper? As it will result in infinite values, right? Best, Qing Meng On Tue, Aug 1, 2017 at 4:42 PM, Q Meng wrote: > Dear list, > > I'm running source analysis using DICS on my MEG data following the > cortical-muscular coherence tutorial and now would like to compare the > source level coherence value between 2 conditions in a between subject > design. > > I found some older posts on this topic from the discuss list ( > https://mailman.science.ru.nl/pipermail/fieldtrip/2011- > September/004279.html) (https://mailman.science.ru. > nl/pipermail/fieldtrip/2016-March/010166.html). Following the > instructions, I Z-transformed the coherence manually and specified > cfg.statistic = 'ft_statfun_diff' and then did the cluster based > non-parametric permutation test. However, I got an error message says *"Error > using ft_statistics_montecarlo (line 242) could not determine the > parametric critical value for clustering"* right after the statistical > analysis started. Please see below a snippet of code: > > ... > Z- transform coherence manually and creating 0-coherence data > ... > > cfg = []; > cfg.method = 'montecarlo'; > % cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.statistic = 'ft_statfun_diff'; > cfg.parameter = 'coh'; > cfg.correctm = 'cluster'; > cfg.numrandomization = 1000; > cfg.alpha = 0.05; > cfg.clusteralpha = 0.05; > cfg.tail = 0; > cfg.clustertail = 0; > cfg.correcttail = 'alpha'; > cfg.connectivity = VertConn; > > nsubj = 19; > cfg.design(1,:) = [1:nsubj 1:nsubj]; > cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2]; > cfg.uvar = 1; % row of design matrix that contains unit > variable (in this case: subjects) > cfg.ivar = 2; % row of design matrix that contains > independent variable (the conditions) > > > stat = ft_sourcestatistics(cfg, data_meg_source_cohe_sentence_dics_parsing_B2_ICA{:}, > data_meg_source_cohe_sentence_dics_parsing_B5_ICA{:}); > > > Before this, I just used cfg.statistic = 'ft_statfun_depsamplesT' to > compare the coherence value between two conditions and the program itself > worked well. > > Does anyone have an idea where my problem could be or what I should do instead?3 > > Thanks for your help! > > Best, > > Qing > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony.w.wilson at gmail.com Wed Aug 2 13:40:02 2017 From: tony.w.wilson at gmail.com (Tony W. Wilson) Date: Wed, 2 Aug 2017 06:40:02 -0500 Subject: [FieldTrip] Postdoctoral Positions at the University of Nebraska Medical Center in Omaha Message-ID: Applications are invited for two postdoctoral positions in the Center for Magnetoencephalography (MEG) at the University of Nebraska Medical Center (UNMC) in Omaha. Successful applicants will work with Dr. Tony Wilson and other Center investigators on multiple NIH- and NSF-funded projects investigating the neural processes underlying attention, motor performance, and sensorimotor integration in healthy and neurological populations (adults and children). The Center for MEG has expertise in cognitive, clinical, and motor neuroscience, as well as oscillatory analyses and source reconstruction of neurophysiological signals. A list of recent Center publications can be found *here* . UNMC is a vibrant multidisciplinary research environment with major resources and ample opportunities for training and collaboration. Resources include a 306-sensor MEG system, multiple 3T human MRI scanners, high-definition transcranial direct-current and alternating-current stimulation (HD-tDCS/tACS) equipment, eye-tracking equipment, and a state-of-the-art transcranial magnetic stimulation (TMS) suite. Successful candidates will have a PhD in neuroscience, psychology, or computer science, and an excellent publication record for their career stage. Candidates who have knowledge of MEG/fMRI analysis packages (SPM, Fieldtrip, BESA, Brainstorm, etc.) and/or programming skills (e.g., Matlab, Python) will have an advantage. Salary will follow NIH standard guidelines, and start dates are negotiable. A two-year minimum commitment is required, with the possibility of extension into a third year with strong performance. UNMC is also in the midst of a major growth initiative and transiting to a faculty position is certainly possible. Applicants should send a curriculum vitae and a letter of interest/cover letter to Dr. Tony Wilson at twwilson at unmc.edu . Three letters of recommendation will be requested at a later date. Review of applications will begin immediately and continue until all positions are filled. -------------- next part -------------- An HTML attachment was scrubbed... URL: From J.Herring at donders.ru.nl Thu Aug 3 14:44:38 2017 From: J.Herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 3 Aug 2017 12:44:38 +0000 Subject: [FieldTrip] Time frequency analysis using evoked potentials In-Reply-To: <3b839c54a1a142f6bea35538ce6a481a@chdr.nl> References: <25A27A1A-3DED-4CC7-818C-CE61C4324A03@donders.ru.nl> <3b839c54a1a142f6bea35538ce6a481a@chdr.nl> Message-ID: <5736B4AA-47E8-42F7-9540-6C6D2C859426@donders.ru.nl> Hi Alex, If this is the code you used: cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); There shouldn’t be a difference in the values from 4 - 30 Hz, whether, or not you calculate 1-4 Hz as well. The NaN values for the lower frequencies at the edges (and for very low frequencies for the entire time course) can be explained by the fact that your epochs from -1s to +1.2 are not long enough to fit even a single time window you are requesting. For example, in cfg.t_ftimwin you are requesting a moving time window of 3 cycles. At 1 Hz (=oscillation with period of 1 second), you are requesting a 3 second moving time window. As your data is shorter than 3 seconds, you will not be able to estimate power at any of the requested time points in cfg.toi. With an epoch length of 2.2 seconds you will only start to get estimates from ~1.4 Hz ( cycles/epoch length ) onwards. Best, Jim On 1 Aug 2017, at 13:28, Alexander Mentink > wrote: Thanks Jim, The graphs look a bit better, however I still get many NaN artifacts when I want to show the frequency range of 1-30 Hz, which disappears completely when I shift it to 4-30 Hz. Does anyone know what the underlying problem is here? KR, Alex Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: ________________________________ From: fieldtrip-bounces at science.ru.nl > on behalf of Herring, J.D. (Jim) > Sent: 01 August 2017 13:05 To: FieldTrip discussion list Subject: Re: [FieldTrip] Time frequency analysis using evoked potentials Dear Alex, Change your scaling to ‘maxabs’ (cfg.zlim = ‘maxabs’;) to get a better feel of the scaling of your data. Now you have a scaling from 0 to 1, which, given your data, gives you very saturated images. Also, I would argue using a relative baseline on a TFR of an ERP (or ERF) is risky as in theory, your baseline should be zero (you even explicitly try to impose that by performing a baseline correction when calculating the ERP). This means that you are dividing your activation period by values close to zero. This will give you arbitrarily large values. An absolute baseline is preferred. Best, Jim On 1 Aug 2017, at 11:52, Alexander Mentink > wrote: Hi Fieldtrip community, I am trying to analyse time frequency representations of electrical evoked potentials, but I am not getting any reliable results at all. Using hanning window (1-30 Hz) or (4-30 Hz), wavelet transform with absolute baselinetype and relative baselinetype gives me four totally different results (see link) http://tinyurl.com/y7nerh8v The EEG data is defined 1000 ms pre stimulus and 1200 ms post stimulus, artifacts removed and preprocessed with baseline correction between 200 ms and 0 ms, bandpass filtered between 0.5 - 30 Hz and referenced to earlobes. The timelocked analysis is attached to the dropbox link as well. The code I use for hanning window is %%%%%%%%%%%%%%%%%% cfg = []; cfg.output = 'pow'; cfg.channel = 'Cz'; cfg.method = 'mtmconvol'; cfg.taper = 'hanning'; cfg.foi = 1:0.025:30; % OR 4:0.025:30 cfg.t_ftimwin = 3./cfg.foi; cfg.toi = -0.5:0.01:0.7; TFRwave = ft_freqanalysis(cfg, trialdata); % Visualization cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) %%%%%%%%%%%%%%%%%% And for wavelet transform is %%%%%%%%%%%%%%%%%% cfg = []; cfg.channel = 'Cz'; cfg.method = 'wavelet'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.5:30; cfg.toi = -0.5:0.05:1; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'relative'; % OR absolute cfg.maskstyle = 'saturation'; cfg.zlim = [0 1]; cfg.channel = 'Cz'; figure ft_singleplotTFR(cfg, TFRwave); %%%%%%%%%%%%%%%%%% I have tried the tutorials online, but this doesn't give me any better results... Does anyone know what I am doing wrong? Thanks many times! Best regards, Alex (Master student Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornelia.quaedflieg at uni-hamburg.de Thu Aug 3 18:46:47 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Thu, 3 Aug 2017 18:46:47 +0200 Subject: [FieldTrip] ft_selectdata doesn't work after using ft_regressconfound Message-ID: <005301d30c78$189e9050$49dbb0f0$@uni-hamburg.de> Dear Fieldtrip-users, We are not able to use function ft_selectdata after applying head movement correction using ft_regressconfound. The error that we get is the well-known index exceeds matrix dimensions. It is due to the fact that the size of x is incorrect, it doesn’t correspond to the number of trials but is 7 which is the number of regressors in the beta variable that is created by using ft_regressconfound. There is a simple way to solve it and this is deleting the field ‘beta’ before running ft_select data. My question is, just to be sure, the variance is regressed out by using ft_regressconfound so the beta variable is not needed in any further step right? Maybe this is also something for the debug team? Thus that ft_selectdata runs after running ft_regressconfound. Best Dr Conny Quaedflieg Mit freundlichen Grüßen, E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 5382 bytes Desc: not available URL: From a.stolk8 at gmail.com Thu Aug 3 18:53:28 2017 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Thu, 3 Aug 2017 09:53:28 -0700 Subject: [FieldTrip] ft_selectdata doesn't work after using ft_regressconfound In-Reply-To: <005301d30c78$189e9050$49dbb0f0$@uni-hamburg.de> References: <005301d30c78$189e9050$49dbb0f0$@uni-hamburg.de> Message-ID: Hi Conny, Yes, you can delete the beta field, or alternatively, call ft_regressconfound with cfg.beta = 'no' (perhaps this should be the default). Didn't know there was a debug team.. Best, Arjen On Thu, Aug 3, 2017 at 9:46 AM, Conny Quaedflieg < cornelia.quaedflieg at uni-hamburg.de> wrote: > Dear Fieldtrip-users, > > > > We are not able to use function ft_selectdata after applying head movement > correction using ft_regressconfound. The error that we get is the > well-known index exceeds matrix dimensions. > > It is due to the fact that the size of x is incorrect, it doesn’t > correspond to the number of trials but is 7 which is the number of > regressors in the beta variable that is created by using > ft_regressconfound. > > There is a simple way to solve it and this is deleting the field ‘beta’ > before running ft_select data. > > > > My question is, just to be sure, the variance is regressed out by using > ft_regressconfound so the beta variable is not needed in any further step > right? > > Maybe this is also something for the debug team? Thus that ft_selectdata > runs after running ft_regressconfound. > > > > Best > > Dr Conny Quaedflieg > > > > > > Mit freundlichen Grüßen, > > > > > > [image: Unbenannt-1] > > *E-Mail*: cornelia.quaedflieg at uni-hamburg.de > > *Tel.*: +49 40 42838-5448 <+49%2040%2042838-5448> *Website*: Hyperlink > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 5382 bytes Desc: not available URL: From efrain.torres at marquette.edu Thu Aug 3 22:24:58 2017 From: efrain.torres at marquette.edu (Torres, Efrain) Date: Thu, 3 Aug 2017 20:24:58 +0000 Subject: [FieldTrip] please help, approaching deadline. ft_sourceanalysis line 813 Message-ID: To whom it may concern, I was wondering if you were able to correct your error? I am experiencing the same issue, and I was wondering if you could help me? Oddly enough, I am also on a bit of a time crunch. Sincerley, Efrain Torres -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornelia.quaedflieg at uni-hamburg.de Fri Aug 4 09:37:21 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Fri, 4 Aug 2017 09:37:21 +0200 Subject: [FieldTrip] ft_selectdata doesn't work after using ft_regressconfound In-Reply-To: References: <005301d30c78$189e9050$49dbb0f0$@uni-hamburg.de> Message-ID: <007b01d30cf4$8257c4e0$87074ea0$@uni-hamburg.de> Dear Arjen, Thanks for your fast reply. With debug team I mean Bugzilla from fieldtrip. http://www.fieldtriptoolbox.org/bugzilla best Conny Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Arjen Stolk Gesendet: Donnerstag, 3. August 2017 18:53 An: FieldTrip discussion list Betreff: Re: [FieldTrip] ft_selectdata doesn't work after using ft_regressconfound Hi Conny, Yes, you can delete the beta field, or alternatively, call ft_regressconfound with cfg.beta = 'no' (perhaps this should be the default). Didn't know there was a debug team.. Best, Arjen On Thu, Aug 3, 2017 at 9:46 AM, Conny Quaedflieg > wrote: Dear Fieldtrip-users, We are not able to use function ft_selectdata after applying head movement correction using ft_regressconfound. The error that we get is the well-known index exceeds matrix dimensions. It is due to the fact that the size of x is incorrect, it doesn’t correspond to the number of trials but is 7 which is the number of regressors in the beta variable that is created by using ft_regressconfound. There is a simple way to solve it and this is deleting the field ‘beta’ before running ft_select data. My question is, just to be sure, the variance is regressed out by using ft_regressconfound so the beta variable is not needed in any further step right? Maybe this is also something for the debug team? Thus that ft_selectdata runs after running ft_regressconfound. Best Dr Conny Quaedflieg Mit freundlichen Grüßen, E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 5382 bytes Desc: not available URL: From a.kochari at uva.nl Fri Aug 4 16:45:53 2017 From: a.kochari at uva.nl (Arnold Kochari) Date: Fri, 4 Aug 2017 16:45:53 +0200 Subject: [FieldTrip] missing channels and time locked grand average Message-ID: Dear FieldTrip community, I have a question about what seems to be an old problem with no solution posted yet. I have deleted bad channels in some participants during preprocessing. Now I would like to compute grand average ERPs using ft_timelockgrandaverage. However, if a channel has been deleted in at least one participant, the mean for it does not get calculated. What I would like to see is just that the average is calculated among the remaining participants. I understand that there might be some strong arguments for the absence of this functionality. I also know about the possibility to interpolate the deleted channels using channelrepair, but I do not really agree with it. Is there any way to calculate grand averages the way I would like to do it? The only solution that I can think of right now is exporting the data, making the calculation in R and then importing the averages it again, but that would require a lot f time. Kind regards, Arnold Kochari PhD candidate, Institute for Logic, Language and Computation, University of Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Fri Aug 4 17:20:31 2017 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Fri, 4 Aug 2017 08:20:31 -0700 Subject: [FieldTrip] missing channels and time locked grand average In-Reply-To: References: Message-ID: Hi Arnold, There's a cfg.method = 'nan' option in ft_channelrepair, which creates NaN data for specified channels. As a result, these channels are still considered in the group-level statistics, provided other subjects have data for the same channels. However, I don't know whether timelockgrandaverage can yet deal with these NaN channels too. Best, Arjen On Fri, Aug 4, 2017 at 7:45 AM, Arnold Kochari wrote: > Dear FieldTrip community, > > I have a question about what seems to be an old problem with no solution > posted yet. > > I have deleted bad channels in some participants during preprocessing. Now > I would like to compute grand average ERPs using ft_timelockgrandaverage. > However, if a channel has been deleted in at least one participant, the > mean for it does not get calculated. What I would like to see is just that > the average is calculated among the remaining participants. > > I understand that there might be some strong arguments for the absence of > this functionality. I also know about the possibility to interpolate the > deleted channels using channelrepair, but I do not really agree with it. > > Is there any way to calculate grand averages the way I would like to do > it? The only solution that I can think of right now is exporting the data, > making the calculation in R and then importing the averages it again, but > that would require a lot f time. > > > Kind regards, > Arnold Kochari > PhD candidate, Institute for Logic, Language and Computation, University > of Amsterdam > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From timeehan at gmail.com Fri Aug 4 21:00:12 2017 From: timeehan at gmail.com (Tim Meehan) Date: Fri, 4 Aug 2017 15:00:12 -0400 Subject: [FieldTrip] bug in 'nearest' function Message-ID: Dear FieldTrippers, I'd like to report a bug in the 'nearest' function. It occurs at line 152, the first line of the following if statement: indx2 = find(array<=val, 1, 'last'); indx3 = find(array>=val, 1, 'first'); if abs(array(indx2)-val) <= abs(array(indx3)-val) indx = indx2; else indx = indx3; end if ~wassorted indx = xidx(indx); end In my case, the two values being compared should be considered equal (i.e. val is halfway between array(indx2) and array(indx3)). However due to precision issues, the condition is false and indx is set to indx3. Specifically: - In short format: val = -17.4930 array(indx2) = -17.4940 array(indx3) = -17.4920 - Full precision: val = -17.492999999999999 array(indx2) = -17.494000000000000 array(indx3) = -17.492000000000001 For me this leads to the 'begsampl' variable in line 223 of ft_timelockanalysis to be 2 when it should be 1, which then leads to an undersizing of subsequent variables, and finally an 'index exceeds matrix dimension' error at line 280. I gather the precision issue was noted as a general problem a long time ago, and the if statement noted above was implemented as a fix for the 'nearest' function -- interestingly, the fix even notes that the choice of indx2 over indx3 when the condition is true is arbitrary ( http://bugzilla.fcdonders.nl/show_bug.cgi?id=1943). But it seems that when val *should be* equidistant from its nearest neighbors in array, precision issues could cause an inequality in the differences, and thus cause 'nearest' to randomly select the lesser or greater of the neighbors. I guess it just so happens in my case that I need 'nearest' to arbitrarily select indx2, which it is designed to to do but fails because of the precision issue. I did try the old (commented out) fix for precision in 'nearest' and it solved my problem, i.e. it selects the lesser of the two neighbors. The bug report notes this is a slower method, but I will revert to that unless it has been found to cause other problems. Best, Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From urieduardo at gmail.com Sat Aug 5 00:54:54 2017 From: urieduardo at gmail.com (=?UTF-8?Q?Uri_Eduardo_Ram=C3=ADrez_Pasos?=) Date: Fri, 4 Aug 2017 15:54:54 -0700 Subject: [FieldTrip] Artifact correction error Message-ID: Dear fieldtrip experts, I tried following the tutorial on http://www.fieldtriptoolbox.org/example/ use_independent_component_analysis_ica_to_remove_ecg_artifacts using both my data and the example data, but as soon as I run comp_ecg = ft_appenddata([], ecg, comp_ecg); I get an error saying that the egg and comp_ecg variables must be of the same type. Is this just me or was there a fieldtrip update that leads to ft_componentanalysis yielding a variable of a different type? Many thanks, Uri Ramirez -------------- next part -------------- An HTML attachment was scrubbed... URL: From emilia.flo.rama at gmail.com Mon Aug 7 21:13:10 2017 From: emilia.flo.rama at gmail.com (=?UTF-8?Q?Emilia_Fl=C3=B3?=) Date: Mon, 7 Aug 2017 16:13:10 -0300 Subject: [FieldTrip] Selecting threshold for cluster permutation Message-ID: Hi, everyone! I have data from an EEG experiment that I want to analyse with permutation cluster analysis. I'm having trouble defining the p threshold and the minimum number of neighbours (I'm recording with 64 electrodes).. Is just arbitrary and people end up using what their lab use?, or is there some literature that I can read in order to decide with more certainty.. Any advice would be extremely welcome, Best, Emilia -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.kochari at uva.nl Wed Aug 9 16:47:45 2017 From: a.kochari at uva.nl (Arnold Kochari) Date: Wed, 9 Aug 2017 16:47:45 +0200 Subject: [FieldTrip] missing channels and time locked grand average In-Reply-To: References: Message-ID: Hi Arjen, Thank you for the suggestion. I tried it, but in this case ft_timelockgrandaverage just spits out NaN for the channels where some participant(s) had NaNs. This is to be expected since that's how Matlab deals with NaNs by default. So basically I need to find some way to do averaging within the filedtrip datastructure that would be equivalent to matlab's 'omitnan' option. Arnold On Fri, Aug 4, 2017 at 5:20 PM, Arjen Stolk wrote: > Hi Arnold, > > There's a cfg.method = 'nan' option in ft_channelrepair, which creates NaN > data for specified channels. As a result, these channels are still > considered in the group-level statistics, provided other subjects have data > for the same channels. However, I don't know whether timelockgrandaverage > can yet deal with these NaN channels too. > > Best, > Arjen > > On Fri, Aug 4, 2017 at 7:45 AM, Arnold Kochari wrote: > >> Dear FieldTrip community, >> >> I have a question about what seems to be an old problem with no solution >> posted yet. >> >> I have deleted bad channels in some participants during preprocessing. >> Now I would like to compute grand average ERPs >> using ft_timelockgrandaverage. However, if a channel has been deleted in at >> least one participant, the mean for it does not get calculated. What I >> would like to see is just that the average is calculated among the >> remaining participants. >> >> I understand that there might be some strong arguments for the absence of >> this functionality. I also know about the possibility to interpolate the >> deleted channels using channelrepair, but I do not really agree with it. >> >> Is there any way to calculate grand averages the way I would like to do >> it? The only solution that I can think of right now is exporting the data, >> making the calculation in R and then importing the averages it again, but >> that would require a lot f time. >> >> >> Kind regards, >> Arnold Kochari >> PhD candidate, Institute for Logic, Language and Computation, University >> of Amsterdam >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bioeng.yoosofzadeh at gmail.com Wed Aug 9 23:13:32 2017 From: bioeng.yoosofzadeh at gmail.com (Vahab Yousofzadeh) Date: Wed, 9 Aug 2017 17:13:32 -0400 Subject: [FieldTrip] Fwd: Parcellation of connectivity matrix by AAL atlas In-Reply-To: References: Message-ID: Dear ft experts, I am trying to summarize a full connectivity matrix using an AAL atlas (similar to the tutorial for network analysis). However, what I get at the end is a very sparse matrix (see f1 and f2 for before and after parcellation, respectively). I suspect the 'nearest' interpolation is the best solution for the approach. I tried other interpolation methods, but with no success. Here are the scripts I utilized: atlas = ft_read_atlas('ROI_MNI_V4.nii'); cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'tissue'; atlas2 = ft_sourceinterpolate(cfg, atlas, conn); atlas2.pos = conn.pos; cfg = []; cfg.parameter = 'plvspctrm'; parc_conn = ft_sourceparcellate(cfg, conn, atlas2); where, Conn = dim: [18 14 13] inside: [1627x1 double] pos: [1627x3 double] outside: [0x1 double] plvspctrm: [1627x1627 double] time: [1x481 double] cfg: [1x1 struct] Any comments would be appreciated. Best regards, Vahab -------------- next part -------------- A non-text attachment was scrubbed... Name: f1.jpg Type: image/jpeg Size: 74414 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: f2.jpg Type: image/jpeg Size: 13896 bytes Desc: not available URL: From cornelia.quaedflieg at uni-hamburg.de Thu Aug 10 10:15:55 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Thu, 10 Aug 2017 10:15:55 +0200 Subject: [FieldTrip] head movement correction creates complex values => why and how to solve Message-ID: <002501d311b0$e3b36ee0$ab1a4ca0$@uni-hamburg.de> Dear Fieldtrip users, I would like to correct my frequency MEG data for head movement that implemented this based on the manual on the fieldtrip website (). We perform it as the last step before the statistics. We have 70 participants and in 12 of our participants, the data (e.g., powerspctrm) contains complex values. I have several questions about this 1. Why are complex values computed in some of the participants? FFT values are normal. 2. What can I do to solve this? The problem is that all next functions (grand average, statistics) are not running with complex values. Thank in advance for any suggestions! Best dr. Conny Quaedflieg E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 5388 bytes Desc: not available URL: From cornelia.quaedflieg at uni-hamburg.de Thu Aug 10 16:09:29 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Thu, 10 Aug 2017 16:09:29 +0200 Subject: [FieldTrip] head movement correction creates complex values => why Message-ID: <010001d311e2$48125b40$d83711c0$@uni-hamburg.de> Dear users, With regard to my question, why the data from 12 out of 70 participants ta (e.g.,powerspctrm) contains complex values after using ft_regressconfound, I found out that the circumcenter is causing the complex single values. Though don’t get it why they become complex I attached coil positions of 2 pp’s Vp22 gets complex values The circumcenter function is also attached. This is what I run: cc = circumcenter2(coil1, coil2, coil3); or for PP 22 cc_vp22 = circumcenter2(coil1_VP22, coil2_VP22, coil3_VP22); Maybe someone sees why they become complex and can tell me how to solve this :) Thanks in advance Conny Mit freundlichen Grüßen, E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 5382 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: coils.mat Type: application/octet-stream Size: 15390 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: circumcenter2.m URL: From nugenta at mail.nih.gov Tue Aug 8 22:59:32 2017 From: nugenta at mail.nih.gov (Nugent, Allison C. (NIH/NIMH) [E]) Date: Tue, 8 Aug 2017 20:59:32 +0000 Subject: [FieldTrip] 2nd MEG North America Meeting: We need you! Message-ID: We are still soliciting volunteers for committee membership at the 2nd MEG-North America meeting, to be held in Bethesda, Maryland November 8th and 9th. Committee meetings will be held on November 8th, with the scientific session on November 9th. There are four committee/workgroups; a broad suggestion of agenda items is as follows: Reliability/reproducibility: Topics include discussion of a standard battery to probe reproducibility across sites and platforms. Committee members may also works towards implementation of the battery across multiple sites. Data Sharing: Topics include the discussion of common data elements and formats or data structures, repository policies, infrastructure support and development, and facilitation of data transfer into repositories. Industry Partnerships: Discussions of collaborative partnerships between academia and industry, to facilitate goals of enhancing reproducibility and sharing, along with other areas of collaboration mutually beneficial to research and clinical institutions and device developers/manufacturers. Representatives from both York Instruments and CTF have volunteered to join this committee. Facilitating Best Practices: Discussions to include how best to facilitate the emergence of best practices from the user community. What metrics can be used for identifying best practices, characteristics of test datasets, and frameworks to identify robust processing pipelines. To volunteer, please e-mail nihmegworkshop at gmail.com with your affiliation and which committee(s) you are willing to serve on. We will send confirmations to committee members by September 8th. Thank you for supporting our community! Please visit our website at https://megworkshop.nih.gov/MEGWorkshop/ Or register at: https://www.eventbrite.com/e/meg-north-america-2017-tickets-36315511673 We hope to see you there! Conference Chairs: Richard Coppola Allison Nugent Steering Committee: Sylvain Baillet Dimitrios Pantazis Timothy Roberts Julia Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: From mibanks at wisc.edu Sat Aug 12 00:05:51 2017 From: mibanks at wisc.edu (MATTHEW I BANKS) Date: Fri, 11 Aug 2017 22:05:51 +0000 Subject: [FieldTrip] Granger analysis Message-ID: Greetings. What is the easiest way to compute non-spectrally resolved Granger causality, i.e. log(var(e_x)/var(e_xy)), where e_x and e_xy are the AR model error terms? -Matt ____________________________ Matthew I. Banks, Ph.D. Associate Professor Department of Anesthesiology University of Wisconsin 1300 University Avenue, Room 4605 Madison, WI 53706 office tel. (608)261-1143 lab tel. (608)263-6662 fax (608)263-2592 http://anesthesia.wisc.edu/index.php/Banks_Laboratory http://ntp.neuroscience.wisc.edu/banks.htm -------------- next part -------------- An HTML attachment was scrubbed... URL: From hermpsy at mail.ru Sat Aug 12 12:28:39 2017 From: hermpsy at mail.ru (=?UTF-8?B?SGVybWluZSBCZXJiZXJ5YW4=?=) Date: Sat, 12 Aug 2017 13:28:39 +0300 Subject: [FieldTrip] =?utf-8?q?Fieldtrip_submission?= Message-ID: <1502533719.946112223@f390.i.mail.ru> Dear representatives of Fieldtrip, Could you, please, add me to Fieldtrip email list for getting the notifications (not only other colleagues' messages -if I get it right)? Sorry for taking your time. Thank you in advance for your letter. Kind regards, Hermine Berberyan Sent from Mail.Ru app for iOS -------- Forwarded message -------- From: To: fieldtrip at science.ru.nl Date: Saturday, 12 August 2017, 12:05 +0200 Subject: fieldtrip Digest, Vol 81, Issue 9 >Send fieldtrip mailing list submissions to >fieldtrip at science.ru.nl > >To subscribe or unsubscribe via the World Wide Web, visit >https://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. Granger analysis (MATTHEW I BANKS) > > >---------------------------------------------------------------------- > >Message: 1 >Date: Fri, 11 Aug 2017 22:05:51 +0000 >From: MATTHEW I BANKS < mibanks at wisc.edu > >To: " fieldtrip at science.ru.nl " < fieldtrip at science.ru.nl > >Subject: [FieldTrip] Granger analysis >Message-ID: >< DM5PR06MB2634608E677FE694F4047F3EDF890 at DM5PR06MB2634.namprd06.prod.outlook.com > > >Content-Type: text/plain; charset="us-ascii" > >Greetings. What is the easiest way to compute non-spectrally resolved Granger causality, i.e. log(var(e_x)/var(e_xy)), where e_x and e_xy are the AR model error terms? > > >-Matt > > >____________________________ > >Matthew I. Banks, Ph.D. >Associate Professor >Department of Anesthesiology >University of Wisconsin >1300 University Avenue, Room 4605 >Madison, WI 53706 >office tel. (608)261-1143 >lab tel. (608)263-6662 >fax (608)263-2592 >http://anesthesia.wisc.edu/index.php/Banks_Laboratory >http://ntp.neuroscience.wisc.edu/banks.htm >-------------- next part -------------- >An HTML attachment was scrubbed... >URL: < http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170811/21109e5d/attachment-0001.html > > >------------------------------ > >_______________________________________________ >fieldtrip mailing list >fieldtrip at donders.ru.nl >https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > >End of fieldtrip Digest, Vol 81, Issue 9 >**************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From maria.hakonen at gmail.com Sat Aug 12 21:10:42 2017 From: maria.hakonen at gmail.com (Maria Hakonen) Date: Sat, 12 Aug 2017 22:10:42 +0300 Subject: [FieldTrip] Creating head model using template MRI Message-ID: Dear Fieldtrip experts, I would like to run ft_sourceanalysis as shown in the Appendix 1 here: http://www.fieldtriptoolbox.org/tutorial/coherence ft_sourceanalysis requires head model as a parameter. I don’t have mri images for my MEG subjects (measured with 306 channel Elekta Neuromag system) and, therefore, I would need to use a template head model or a template MRI. I think that I should use a local spheres volume conduction model as suggested here: http://www.fieldtriptoolbox.org/tutorial/headmodel_meg. Could someone please let me know if standard_mri.mat is the file that I should use? I created a head model using standard_mri.mat and following the instructions here: http://www.fieldtriptoolbox.org/tutorial/headmodel_meg I first created the head model for the example data and checked whether I can get the same result as in the example (Appendix 1: http://www.fieldtriptoolbox.org/tutorial/coherence). However, the result doesn’t seem to be correct: ​ Could someone please let me know what I am doing wrong? Many thanks already in advance if you can help! Best, Maria Here is the scrip that I have tested: hdr = ft_read_header(' C:\Users\Maria\Documents\filedtrip\fieldtrip-20170620\SubjectCMC.ds'); grad = hdr.grad; load('standard_mri.mat'); load('freq.mat') cfg = []; cfg.output = 'brain'; segmentedmri = ft_volumesegment(cfg, mri); cfg = []; cfg.grad = hdr.grad; cfg.feedback = false; cfg.method = 'localspheres'; vol = ft_prepare_headmodel(cfg,segmentedmri); cfg = []; mri = ft_volumereslice(cfg, mri); cfg = []; cfg.method = 'dics'; cfg.refchan = 'EMGlft'; cfg.frequency = 18; cfg.hdmfile = vol; cfg.inwardshift = 1; cfg.grid.resolution = 1; cfg.grid.unit = 'cm'; source = ft_sourceanalysis(cfg, freq); cfg = []; cfg.parameter = 'coh'; cfg.downsample = 2; interp = ft_sourceinterpolate(cfg, source, mri); cfg = []; cfg.method = 'ortho'; cfg.interactive = 'yes'; cfg.funparameter = 'coh'; figure; ft_sourceplot(cfg, interp); -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: head_model_test.png Type: image/png Size: 61455 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Sat Aug 12 21:41:28 2017 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sat, 12 Aug 2017 19:41:28 +0000 Subject: [FieldTrip] Granger analysis In-Reply-To: References: Message-ID: <9CFD6835-3912-44A1-82BF-477E8D10A7B5@donders.ru.nl> Hi Matt, I have never done this myself, but I think that in principle it should be possible to fit a set of models, and then compute the residuals’ variance ratio by hand. In other words, assuming data1 and data2 to be variables that consist of a single channel: mvar1 = ft_mvaranalysis(cfg, data1); mvar2 = ft_mvaranalysis(cfg, data2); mvar12 = ft_mvaranalysis(cfg, ft_appenddata([],data1,data2)); GC1to2 = log(mvar2.noisecov(1,1)./mvar12.noisecov(2,2)); GC2to1 = log(mvar1.noisecov(1,1)./mvar12.noisecov(1,1)); Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 12 Aug 2017, at 00:05, MATTHEW I BANKS > wrote: Greetings. What is the easiest way to compute non-spectrally resolved Granger causality, i.e. log(var(e_x)/var(e_xy)), where e_x and e_xy are the AR model error terms? -Matt ____________________________ Matthew I. Banks, Ph.D. Associate Professor Department of Anesthesiology University of Wisconsin 1300 University Avenue, Room 4605 Madison, WI 53706 office tel. (608)261-1143 lab tel. (608)263-6662 fax (608)263-2592 http://anesthesia.wisc.edu/index.php/Banks_Laboratory http://ntp.neuroscience.wisc.edu/banks.htm _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jens.klinzing at uni-tuebingen.de Sun Aug 13 19:29:15 2017 From: jens.klinzing at uni-tuebingen.de (=?ISO-8859-1?Q?=22Jens_Klinzing=2C_Universit=E4t_T=FCbingen=22?=) Date: Sun, 13 Aug 2017 19:29:15 +0200 Subject: [FieldTrip] Reject components using prepared vs. original data Message-ID: <59908C6B.20300@uni-tuebingen.de> Dear FieldTrip community, I highpass-filter and downsample my data in order to prepare them for doing an ICA. I want to apply the resulting unmixing matrix and my list of suspicious components to the original data (before downsampling and filtering). In the ECG artifacts tutorial [1], this is done like this: % decompose the original data as it was prior to downsampling to 150Hz cfg = []; cfg.unmixing = comp.unmixing; cfg.topolabel = comp.topolabel; comp_orig = ft_componentanalysis(cfg, data_orig); % the original data can now be reconstructed, excluding those components cfg = []; cfg.component = [4 17]; data_clean = ft_rejectcomponent(cfg,comp_orig, data_orig); However, based on some older posts on this mailinglist I tried to directly provide the components calculated on prepared data like this: data_clean2 = ft_rejectcomponent(cfg,comp, data_orig); The output for both versions seems to be identical. This is maybe not surprising considering that the only fields ft_rejectcomponents seems to use from the second input comp are .label, .topolabel, .unmixing and .topo. The first three are identical for comp and comp_orig. The values in comp.topo are however slightly different (in the order of 10^-14, looks like a precision issue?) compared to the values in comp_orig.topo. So my questions are: a) Are the two solutions equivalent or am I missing something? b) Where do the tiny differences in comp/comp_orig.topo come from? c) Should the tutorial be altered to the simpler version or are there scenarios in which the two versions are not equivalent? Thanks, Jens [1] http://www.fieldtriptoolbox.org/example/use_independent_component_analysis_ica_to_remove_ecg_artifacts -------------- next part -------------- An HTML attachment was scrubbed... URL: From christopher.guettler at charite.de Sun Aug 13 21:32:47 2017 From: christopher.guettler at charite.de (=?Windows-1252?Q?G=FCttler=2C_Christopher?=) Date: Sun, 13 Aug 2017 19:32:47 +0000 Subject: [FieldTrip] Granger analysis In-Reply-To: <9CFD6835-3912-44A1-82BF-477E8D10A7B5@donders.ru.nl> References: , <9CFD6835-3912-44A1-82BF-477E8D10A7B5@donders.ru.nl> Message-ID: Gesendet mit meinem HTC ----- Nachricht beantworten ----- Von: "Schoffelen, J.M. (Jan Mathijs)" An: "FieldTrip discussion list" Betreff: [FieldTrip] Granger analysis Datum: Sa., Aug. 12, 2017 21:42 Hi Matt, I have never done this myself, but I think that in principle it should be possible to fit a set of models, and then compute the residuals’ variance ratio by hand. In other words, assuming data1 and data2 to be variables that consist of a single channel: mvar1 = ft_mvaranalysis(cfg, data1); mvar2 = ft_mvaranalysis(cfg, data2); mvar12 = ft_mvaranalysis(cfg, ft_appenddata([],data1,data2)); GC1to2 = log(mvar2.noisecov(1,1)./mvar12.noisecov(2,2)); GC2to1 = log(mvar1.noisecov(1,1)./mvar12.noisecov(1,1)); Best wishes, Jan-Mathijs J.M.Schoffelen, MD PhD Senior Researcher, VIDI-fellow - PI, language in interaction Telephone: +31-24-3614793 Physical location: room 00.028 Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands On 12 Aug 2017, at 00:05, MATTHEW I BANKS > wrote: Greetings. What is the easiest way to compute non-spectrally resolved Granger causality, i.e. log(var(e_x)/var(e_xy)), where e_x and e_xy are the AR model error terms? -Matt ____________________________ Matthew I. Banks, Ph.D. Associate Professor Department of Anesthesiology University of Wisconsin 1300 University Avenue, Room 4605 Madison, WI 53706 office tel. (608)261-1143 lab tel. (608)263-6662 fax (608)263-2592 http://anesthesia.wisc.edu/index.php/Banks_Laboratory http://ntp.neuroscience.wisc.edu/banks.htm _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From christine.blume at sbg.ac.at Mon Aug 14 08:40:59 2017 From: christine.blume at sbg.ac.at (Blume Christine) Date: Mon, 14 Aug 2017 06:40:59 +0000 Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test Message-ID: Dear all, I am comparing event-related oscillatory responses in two conditions A and B. In each condition, subjects have been presented with two different stimulus types, let's take "houses" and "faces" as an easy example. What I have done so far is I compared the oscillatory responses to the two stimuli WITHIN each condition using cluster based permutation tests (depsamplesT; frequency range 4-15 Hz, 173 electrodes, 6 time bins). What I find is significant differences between "houses" and "faces" within each condition. However it seems that in higher frequencies there is also a difference between conditions A and B. Now reviewers have asked me to test this difference statistically. Unfortunately, I do not really know how to go about...any suggestions are highly appreciated! Best, Christine -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.marshall at donders.ru.nl Mon Aug 14 10:10:17 2017 From: t.marshall at donders.ru.nl (Marshall, T.R. (Tom)) Date: Mon, 14 Aug 2017 08:10:17 +0000 Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test In-Reply-To: References: Message-ID: <95C9A440AA5AB042A81E170A4573A15A7B9D8EC9@EXPRD98.hosting.ru.nl> Hi Christine, If I understand correctly: For each subject you have four conditions - A_face, A_house, B_face, B_house You compared A_face with A_house and there was a significant difference You compared B_face with B_house and there was also a significant difference Right? Now the reviewers want you to test if there is a difference between A and B You could: For every subject, create an average of A_face and A_house (let's call it A_avg) For every subject, create an average of B_face and B_house (let's call it B_avg) Compare A_avg and B_avg using depsamplesT Best, Tom ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Blume Christine [christine.blume at sbg.ac.at] Sent: 14 August 2017 08:40 To: FieldTrip discussion list (fieldtrip at science.ru.nl) Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test Dear all, I am comparing event-related oscillatory responses in two conditions A and B. In each condition, subjects have been presented with two different stimulus types, let’s take “houses” and “faces” as an easy example. What I have done so far is I compared the oscillatory responses to the two stimuli WITHIN each condition using cluster based permutation tests (depsamplesT; frequency range 4-15 Hz, 173 electrodes, 6 time bins). What I find is significant differences between “houses” and “faces” within each condition. However it seems that in higher frequencies there is also a difference between conditions A and B. Now reviewers have asked me to test this difference statistically. Unfortunately, I do not really know how to go about…any suggestions are highly appreciated! Best, Christine -------------- next part -------------- An HTML attachment was scrubbed... URL: From anne.urai at gmail.com Mon Aug 14 14:27:30 2017 From: anne.urai at gmail.com (Anne Urai) Date: Mon, 14 Aug 2017 14:27:30 +0200 Subject: [FieldTrip] Fwd: [Comp-neuro] International Brain Laboratory Staff Positions Ads In-Reply-To: References: Message-ID: — Anne E. Urai, MSc PhD student | Institut für Neurophysiologie und Pathophysiologie Universitätsklinikum Hamburg-Eppendorf | Martinistrasse 52, 20246 | Hamburg, Germany www.anneurai.net / @AnneEUrai ---------- Forwarded message ---------- From: Zachary Mainen Date: 11 August 2017 at 17:34 Subject: [Comp-neuro] International Brain Laboratory Staff Positions Ads To: Zach Mainen Cc: info at internationalbrainlab.com Dear all, Please see below 5 available positions for staff with the International Brain Lab. Dissemination through your contacts would be much appreciated. Best, Zach Mainen --- The International Brain Laboratory (https://www.internationalbrainlab.com/) is seeking 5 collaborators who will play key roles in a new large-scale international collaboration in brain research. The IBL combines the efforts of approximately 50 scientists in 20 laboratories toward understanding the brain-wide basis of a complex behavior. The project will involve recording the activity of millions of neurons in the working brain and building mathematical models of the resulting data. The data sets this project will produce are vast and complex, including physiological recordings, behavioural measurements, and video, all of which must be standardized into common formats, integrated into a single database, and subjected to quality control. These core positions will support the both experimental and theoretical work through the entire lifecycle of data, including acquisition, analysis, modeling and dissemination. Project Manager (PM) - The primary responsibilities of the PM will include ensuring delivery of key milestones, managing overall project budget and finances, facilitating project governance and internal communication, and liaising with funders, external agencies and partners. Candidates should have demonstrated success in project management of a comparable scale and a strong background in scientific research. Technical Manager (TM) - The TM will be responsible for ensuring reproducibility of experiments across labs by (1) helping to establish and maintain a common set of experimental apparatus for behavior and neural recordings and (2) establishing procedures for standardizing, monitoring and troubleshooting experimental conditions, including animal subjects, surgical procedures, materials, etc. The position will involve extensive travel between ten experimental laboratories at six institutions across the U.S. and Europe. The ideal candidate would have a PhD in neuroscience and very strong technical and experimental skills. Strong organizational and interpersonal skills are required. Prior experience in laboratory or project management is desirable. Data Coordinator (DC) - The DC will work closely with our contributing labs and scientific programming staff to ensure the integrity and organization of data collected by experimental labs. The ideal candidate would have a PhD in neuroscience, and extensive experience with large neurophysiological and behavioral datasets. Attention to detail and ability to work collaboratively are both essential. Strong computing ability is also important, including knowledge of relational databases, Python and MATLAB. Scientific MATLAB Programmer (SMP) - The SP will contribute to the design of applications and pipelines for organization, storage and analysis of this data. The job will involve building software and data infrastructure for this collaborative research project, and supporting it. The ideal candidate will have extensive experience with MATLAB and previous work with big data in scientific research. Knowledge of Python and relational databases and experience interfacing with experimental control hardware is desirable. Senior Scientific Programmer (SSP) - The SSP will lead the design of applications and pipelines for organization, storage and analysis of this data. The job will involve building software and data infrastructure, as well as a role in ensuring data integrity, working closely with data providers to ensure it meets project standards. The ideal candidate will have extensive experience with relational databases and Python. Experience with MATLAB, previous work with big data in scientific research, and experience interfacing with experimental control hardware would also be desirable. Remuneration will be competitive and commensurate with experience. There is considerable flexibility in base location within the U.S. and Europe. To apply, please send cover letter and CV to info at internationalbrainlab.com with subject: PositionAcronym LastName. Review of applications will begin immediately and continue until the position is filled, with an ideal start date of Sept.-Oct., 2017. --- Zachary F. Mainen, Ph.D. Champalimaud Neuroscience Programme Champalimaud Centre for the Unknown Av. Brasília s/n 1400-038 Lisbon Portugal +351 210 480 100 zmainen at neuro.fchampalimaud.org www.neuro.fchampalimaud.org/group/mainen @zmainen _______________________________________________ Comp-neuro mailing list Comp-neuro at neuroinformatics.be http://www.tnb.ua.ac.be/mailman/listinfo/comp-neuro -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomitbeker at gmail.com Tue Aug 15 04:54:41 2017 From: shlomitbeker at gmail.com (Shlomit Beker) Date: Mon, 14 Aug 2017 22:54:41 -0400 Subject: [FieldTrip] Bug in ft_channelrepair Message-ID: Hi All, I have a weird issue - I get error when calling ft_channelrepair, which I cannot find a solution for. For some datasets (but not for all), it gives the following error: Error using - Matrix dimensions must agree. Error in ft_channelrepair (line 196) distance = sqrt(sum((sens.chanpos(goodsensindx, :) - repmat(sens.chanpos(badsensindx, :), numel(goodsensindx), 1)).^2, 2)); Apparently, ft_channelrepair does not reconstruct some of the bad electrodes (in my case - PO8, P10), which cause sens.chanpos to be empty. Any help is appreciated! Shlomit Beker CNL lab Albert Einstein College of Medicine -------------- next part -------------- An HTML attachment was scrubbed... URL: From christine.blume at sbg.ac.at Tue Aug 15 13:15:37 2017 From: christine.blume at sbg.ac.at (Blume Christine) Date: Tue, 15 Aug 2017 11:15:37 +0000 Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test In-Reply-To: <95C9A440AA5AB042A81E170A4573A15A7B9D8EC9@EXPRD98.hosting.ru.nl> References: <95C9A440AA5AB042A81E170A4573A15A7B9D8EC9@EXPRD98.hosting.ru.nl> Message-ID: Hi Tom, Thanks a lot indeed for the quick reply. I do find significant differences between A_avg and B_avg in the frequency range where I expect them following the results from the within condition comparisons. Although it is not directly comparable because clusters may obviously differ, I guess that is the best I can do. Thanks again! Best, Christine Von: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] Im Auftrag von Marshall, T.R. (Tom) Gesendet: Montag, 14. August 2017 10:10 An: FieldTrip discussion list Betreff: Re: [FieldTrip] Post hoc comparison following cluster-based permutation test Hi Christine, If I understand correctly: For each subject you have four conditions - A_face, A_house, B_face, B_house You compared A_face with A_house and there was a significant difference You compared B_face with B_house and there was also a significant difference Right? Now the reviewers want you to test if there is a difference between A and B You could: For every subject, create an average of A_face and A_house (let's call it A_avg) For every subject, create an average of B_face and B_house (let's call it B_avg) Compare A_avg and B_avg using depsamplesT Best, Tom ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Blume Christine [christine.blume at sbg.ac.at] Sent: 14 August 2017 08:40 To: FieldTrip discussion list (fieldtrip at science.ru.nl) Subject: [FieldTrip] Post hoc comparison following cluster-based permutation test Dear all, I am comparing event-related oscillatory responses in two conditions A and B. In each condition, subjects have been presented with two different stimulus types, let's take "houses" and "faces" as an easy example. What I have done so far is I compared the oscillatory responses to the two stimuli WITHIN each condition using cluster based permutation tests (depsamplesT; frequency range 4-15 Hz, 173 electrodes, 6 time bins). What I find is significant differences between "houses" and "faces" within each condition. However it seems that in higher frequencies there is also a difference between conditions A and B. Now reviewers have asked me to test this difference statistically. Unfortunately, I do not really know how to go about...any suggestions are highly appreciated! Best, Christine -------------- next part -------------- An HTML attachment was scrubbed... URL: From silas_chiu at yahoo.com Tue Aug 15 15:19:59 2017 From: silas_chiu at yahoo.com (Silas Chiu) Date: Tue, 15 Aug 2017 13:19:59 +0000 (UTC) Subject: [FieldTrip] Frequency bins changed after ft_freqstatistics References: <703842050.1982774.1502803199970.ref@mail.yahoo.com> Message-ID: <703842050.1982774.1502803199970@mail.yahoo.com> Dear Community, Nice to meet you all. My name is Ho Ching Chiu, currently working at the language lab in Experimental Psychology, University of Bristol, for a project on sentence comprehension using EEG. I tried to use ft_freqstatistics to do cluster-based permutation test, for a within-subject comparison of the power spectrum of 19 participants across 2 conditions. (Please refer to the codes below for more details.)Before this, I used ft_freqgrandaverage to conjugate the spectrum of all participants for each conditions, so the input data for the cluster-based permutation test (for each condition) is 4D (subj_chan_freq_time) and size(condition1.powspctrm) = [19 32 125 471]. There was no error / warning message in the process of running ft_freqstatistics. The problem is the frequency bins in the output data. The frequency bin of the input data is 1:1:125, and I expected the output(.stat .prob etc) will have the same dimension of 32 x 125 x 471. But what I get is 32 x 25 x 471, and the .freq of the output becomes 5:5:125, which is not expected. Could anyone please advice if I have set anything wrong in the process? Or is this some inherent limitation of the ft_freqstatistics function? Your help is much appreciated. Thank you very much. ---------code start---------load condition1 load condition2 cfg = []; cfg.channel          = 'all';cfg.latency          = 'all';cfg.frequency        = 'all'; cfg.method           = 'montecarlo';cfg.statistic        = 'ft_statfun_depsamplesT';    cfg.correctm         = 'cluster';cfg.clusteralpha     = 0.05;cfg.clusterstatistic = 'maxsum';cfg.minnbchan        = 2;    cfg.tail             = 0;    cfg.clustertail      = 0;    cfg.alpha            = 0.025;    cfg.numrandomization = 5000;  load neighboursfile % some predefined thingscfg.neighbours       = neighbours;     % cfg.design not relevant to this question, omitted for simplicity [stat] = ft_freqstatistics(cfg, condition1, condition2);  save stat_cond1_cond2 stat; -------code ends----------- Best regards,Ho Ching -------------- next part -------------- An HTML attachment was scrubbed... URL: From mapaul at uni-osnabrueck.de Wed Aug 16 10:53:30 2017 From: mapaul at uni-osnabrueck.de (mapaul at uni-osnabrueck.de) Date: Wed, 16 Aug 2017 10:53:30 +0200 (CEST) Subject: [FieldTrip] Calculation of within-subject interaction In-Reply-To: References: Message-ID: <54234.141.20.212.123.1502873610.squirrel@myuos.uni-osnabrueck.de> Dear fieldtrip community, I found this very helpful tutorial on how to calculate an interaction effect using a cluster-based permutation: http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests I have a question regarding this step: Copy GA11 to GAdiff11_12 and perform the assignment GAdiff11_12.avg=GA11.avg-GA12.avg. Copy GA21 to GAdiff21_22 and perform the assignment GAdiff21_22.avg=GA21.avg-GA22.avg. I have a full within-subjects design and I was wondering if it matters which of my factors I define as factor 1 and which as factor 2. In other words, is there a difference between calculating GA11.avg - GA12.avg followed by GA21.avg - GA22.avg as opposed to GA11.avg - GA21.avg followed by GA12.avg - GA22.avg and then running a permutation test on the differences? Any help would be greatly appreciated! Thanks and with best regards, Mariella From grigu at cbs.mpg.de Wed Aug 16 13:13:44 2017 From: grigu at cbs.mpg.de (Maren Grigutsch) Date: Wed, 16 Aug 2017 13:13:44 +0200 Subject: [FieldTrip] Calculation of within-subject interaction In-Reply-To: <54234.141.20.212.123.1502873610.squirrel@myuos.uni-osnabrueck.de> References: <54234.141.20.212.123.1502873610.squirrel@myuos.uni-osnabrueck.de> Message-ID: Dear Mariella, in my opinion, both approaches are equivalent because (A11 - A12) - (A21 - A22) = (A11 - A21) - (A12 - A22). Best, --Maren On 08/16/2017 10:53 AM, mapaul at uni-osnabrueck.de wrote: > Dear fieldtrip community, > > I found this very helpful tutorial on how to calculate an interaction > effect using a cluster-based permutation: > > http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests > > I have a question regarding this step: > > Copy GA11 to GAdiff11_12 and perform the assignment > GAdiff11_12.avg=GA11.avg-GA12.avg. > Copy GA21 to GAdiff21_22 and perform the assignment > GAdiff21_22.avg=GA21.avg-GA22.avg. > > I have a full within-subjects design and I was wondering if it matters > which of my factors I define as factor 1 and which as factor 2. In other > words, is there a difference between calculating > > GA11.avg - GA12.avg followed by GA21.avg - GA22.avg > as opposed to GA11.avg - GA21.avg followed by GA12.avg - GA22.avg > > and then running a permutation test on the differences? > > Any help would be greatly appreciated! > > Thanks and with best regards, > Mariella > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Maren Grigutsch Max Planck Institute for Human Cognitive and Brain Sciences Stephanstr.1a, 04103 Leipzig, Germany Phone: +49 341 - 9940 136 Fax: +49 341 - 9940 2260 web: www.cbs.mpg.de From jiang.yizhou.i at gmail.com Thu Aug 17 13:03:08 2017 From: jiang.yizhou.i at gmail.com (Yizhou Jiang) Date: Thu, 17 Aug 2017 12:03:08 +0100 Subject: [FieldTrip] Same Pattern but different scale by using ft_freqbaseline or choose baseline in ft_singleplotTFR Message-ID: Dear all, I am using two different way to plot the figure after baseline correction. 1) do the baseline correction using the function 'ft_freqbaseline', and the plot the figure; 2) do not do baseline correction and add baseline when plot the figure using 'ft_singleplotTFR'. I am confused that two figures have similar pattern, but are different in z scale. I wonder is any error with my code (below). This is the code % POWER cfg = []; cfg.channel = 'all';%channels; cfg.method = 'wavelet'; %'wavelet' cfg.keeptrials = 'yes'; cfg.output = 'pow'; %'fourier'; %'pow';'powandcsd' cfg.foi = 5:2:200; %2:2:80 cfg.toi = -1:0.02:2; cfg.pad = 'nextpow2'; cfg.width = linspace(2,25,numel(cfg.foi)); %linspace(1,25,numel(cfg.foi)) POW = ft_freqanalysis(cfg, data); % *1)* % baseline correction cfg = []; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype ='db'; POW_db = ft_freqbaseline(cfg,POW); figure;clf;cfg = []; cfg.xlim=[-0.5 1.2]; cfg.parameter = 'powspctrm'; cfg.ylim = 'maxmin'; cfg.linewidth =2; cfg.fontsize=12; F=ft_singleplotTFR(cfg,POW_db); [image: 内嵌图片 1] or *2)* %no base line correction before % figure;clf;cfg = []; cfg.xlim=[-0.5 1.2]; cfg.parameter = 'powspctrm'; cfg.ylim = 'maxmin'; cfg.linewidth =2; cfg.fontsize=12; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype ='db'; F=ft_singleplotTFR(cfg,POW); [image: 内嵌图片 2] Best wishes, Wendy -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 24423 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 27743 bytes Desc: not available URL: From awutz at mit.edu Fri Aug 18 00:06:09 2017 From: awutz at mit.edu (Andreas Wutz) Date: Thu, 17 Aug 2017 22:06:09 +0000 Subject: [FieldTrip] cluster-based test with Wilcoxon signrank test Message-ID: Dear fieldtrippers, I am trying to combine the Wilcoxon signrank test statistic with the cluster-based permutation approach. To this end, I wrote my own statfun, which calculates the Wilcoxon test statistic (using signrank.m in the stats toolbox) for each random partition. The output of my statfun is s.stat, which contains a z-value (which is output by the function signrank.m for high enough N). I understand that the cluster-based test does not depend on the specific test statistic used. My question applies to the initial threshold, which is used for clustering. As I see it, I have three options here. 1) parametric In this case, I would calculate the critical value(s) for a normal distribution (+/- 1.96) and set this as s.critval. 2 - 3) nonparametric_individual / nonparametric_common I assume the threshold is here based on the permutation distribution with those samples chosen for clustering that exceed the 1-clusteralpha quantile. is this assumption correct? What is the difference between those two methods? In general, I am unsure which of the three methods to choose. Which are the advantages / disadvantages of each option? I would be very happy about your feedback! Best, Andreas -------------- next part -------------- An HTML attachment was scrubbed... URL: From s.suntrup-krueger at uni-muenster.de Fri Aug 18 12:45:31 2017 From: s.suntrup-krueger at uni-muenster.de (Sonja =?iso-8859-1?Q?Suntrup-Kr=FCger?=) Date: Fri, 18 Aug 2017 12:45:31 +0200 (CEST) Subject: [FieldTrip] How to apply ROI mask to grandavg Message-ID: Dear all, I want to compare task-related brain activation in a ROI in two groups of subjects. I performed LCMV beamformer analysis on single subject data and, after normalization, created a grandaverage of each group, which I need to compare statistically within a defined ROI. Since the option to create a ROI in ft_sourcestatistis is unfortunately no longer available since 2015, I had the following idea to create my ROI: By using ft_volumelookup I created a binary mask from an anatomical atlas indicating my ROI in standard space. Now I would like to apply this mask on my grandaverage data. In specific, I want to multiply my mask values (zeros and ones) with the "pow" values in my grandavg. This would set all the power values outside my ROI to zero. With the result from this procedure I can then calculate my statistc. My binary mask has the dimensions: x,y,z mask [181x217x181 logical] coordsys: 'spm' In my grandavg, the dimension "dim" is the same, but the power values ("pow") and their positions ("pos") are listed as a single long vector for each subject: pow: [7109137x6 double] (because there are 6 datasets in the grandavg) pos: [7109137x3 double] dim: [181 217 181] coordsys: 'spm' My question is: How does the "x,y,z"-data structure of "dim" relate to the "single long vector"-data structure of "pow"/"pos"? If I had this information, I could transform my mask into the same structure and apply it as explained above. Your help is greatly appreciated. Thank you very much! Sonja Suntrup-Krüger -- Sonja Suntrup-Krueger, MD Assistant Professor of Neurology Institute for Biomagnetism and Biosignalanalysis University of Muenster, Germany From maria.hakonen at gmail.com Fri Aug 18 16:01:14 2017 From: maria.hakonen at gmail.com (Maria Hakonen) Date: Fri, 18 Aug 2017 17:01:14 +0300 Subject: [FieldTrip] Problem with coordinate systems when creating head model Message-ID: Dear fieldtrip experts, I would need to create a volume conduction model of the head using standard_mri.m. standard_mri.m is in the spm coordinate system and my MEG data in the neuromag system. To get all data in the same coordinate system, I have converted standard_mri.m to neuromag using ft_volumerealign. However, ft_volumesegment converts MRI back to spm. Could someone please let me know how I can get the head model and MEG data in the same coordinate system? I really appreciate any help you can provide! Here is what I have tried: mri is in spm coordinate system: mri = dim: [181 217 181] anatomy: [181x217x181 uint8] transform: [4x4 double] hdr: [1x1 struct] unit: 'mm' coordsys: 'spm' Check fiducials for ft_volumerealign: hs=ft_read_headshape('aml_sentences16b_raw_tsss.fif', 'unit','mm'); hs.fid.pos ans = -66.1226 0.0000 -0.0000 -0.0000 83.5082 -0.0000 67.1784 -0.0000 -0.0000 hs.fid.label ans = 'LPA' 'Nasion' 'RPA' cfg = []; cfg.method= 'fiducial'; cfg.fiducial.nas = [-0.0000 83.5082 -0.0000]; cfg.fiducial.lpa = [-66.1226 0.0000 -0.0000]; cfg.fiducial.rpa = [67.1784 -0.0000 -0.0000]; cfg.coordsys= 'neuromag'; cfg.headshape = hs; mri_realigned = ft_volumerealign(cfg, mri); mri_realigned seems to be in neuromag system as it should be. mri_realigned = dim: [181 217 181] anatomy: [181x217x181 uint8] transform: [4x4 double] hdr: [1x1 struct] unit: 'mm' coordsys: 'neuromag' inside: [181x217x181 logical] transformorig: [4x4 double] cfg: [1x1 struct] However, ft_volumesegment converts it back to spm system: cfg = []; cfg.output = 'brain'; cfg.coordsys = 'neuromag'; segmentedmri = ft_volumesegment(cfg, mri_realigned); Warning: The option cfg.coordsys is deprecated, support is no longer guaranteed > In ft_checkconfig (line 168) In ft_volumesegment (line 170) the input is volume data with dimensions [181 217 181] Converting the coordinate system from neuromag to spm I also tried to convert MEG data to spm system as follows: hdr = ft_read_header('aml_sentences16b_raw_tsss.fif', 'unit','mm'); cfg = []; cfg.method= 'fiducial'; cfg.target.pos(1,:) = [1 0 0]; cfg.target.pos(1,:) = [0 83 0]; cfg.target.pos(1,:) = [0 -117 0]; cfg.target.lab = {'NAS', 'LPA', 'RPA'}; cfg.grad = hdr.grad; mri_realigned = ft_sensorrealign(cfg); … but got: Warning: FT_SENSORREALIGN is deprecated, please use FT_ELECTRODEREALIGN instead. > In ft_sensorrealign (line 118) using gradiometers specified in the configuration Reference to non-existent field 'label'. Error in ft_datatype_sens (line 148) nchan = length(sens.label); Error in ft_sensorrealign (line 247) tmp(i) = ft_datatype_sens(template(i)); % ensure up-to-date sensor description template(i) seems to be as follows: ans = pos: [0 -117 0] lab: {'NAS' 'LPA' 'RPA'} I think that ft_electroderealign only works with EEG data since it gives: mri_realigned = ft_electroderealign(cfg); Warning: The field cfg.headshape is forbidden, it will be removed from your configuration > In ft_checkconfig (line 215) In ft_electroderealign (line 212) using gradiometers specified in the configuration Reference to non-existent field 'elecpos'. Error in ft_electroderealign (line 254) assert(isequaln(elec_original.elecpos, elec_original.chanpos), 'this function requires same electrode and channel positions.'); Best, Maria -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.ketz at gmail.com Fri Aug 18 23:40:11 2017 From: nick.ketz at gmail.com (Nick Ketz) Date: Fri, 18 Aug 2017 14:40:11 -0700 Subject: [FieldTrip] bias in cluster stats from density of frequency sampling? Message-ID: I've recently gotten into an internal debate about what the optimal frequency sampling (using wavelet decomposition) would be for a given range of frequencies, and it has given rise a few points of discussion: over all my general question is this: Is it possible to bias the cluster based permutation statistics by over sampling the frequency domain? Consider the case where you have two true signals, one at 2Hz and one at 10Hz. Now, in an absurd scenario you sample every 1Hz in delta band (i.e. 1, 2 and 3Hz), and you sample every 0.1Hz in alpha (i.e. 8:.1:12 = 41bins). Now you go and do a cluster based analysis, are you more likely to find the 10Hz signal because you have 10 frequency that are within that range (10.0 to 10.9Hz) compared to the 2Hz signal in which you only have 1 bin? My intuition is that, yes, you would be biased because the t-values form 10.0 to 10.9Hz would get grouped and summed together to characterize the 10Hz cluster, and only the single 2Hz bin t-values would characterize to the 2Hz signal. This question is arising from a sampling strategy that seems optimal and least biased to me, which is to space your frequency bins at intervals related to the uncertainty in the frequency estimate (i.e. frequency/wavelet-width). Using this strategy you end up with far fewer bins in the mid to higher frequency bands, beta and gammer, and many more in the lower bands (things get more complicated when your widths are frequency dependent). Will this bias cluster based analyses from finding clusters in these higher freqs compared to a linear sampling scheme? Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Sat Aug 19 14:55:29 2017 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sat, 19 Aug 2017 12:55:29 +0000 Subject: [FieldTrip] How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) Message-ID: Sonja. You are definitely on the right track. pow: [7109137x6 double] (because there are 6 datasets in the grandavg) pos: [7109137x3 double] dim: [181 217 181] The dim are the size of the cube for your source model matrix. The pow/pos and other matrices are linear. The linear arrays are a little easier to manipulate, may be the reason that FT decided to use these rather than have 3D matrices. 181*217*181 = 7109137. If you create a ROI matrix, it would either be of dimensions, N-ROI X 181 X 217 X 181, or more conveniently you could reshape it into a N-ROI x 7109137. Then multiply the ROI matrix * the pow, e.g., [N-ROI X 7109137] * [7109137 X 6] = N-ROI * 6. This would sum across each voxel in the source model matrix for each roi. You can imagine a single ROI of the entire source model (1 x N-dipoles), this would sum across all voxels in the source model. Or a single ROI, say of the IFG, in the ROI matrix, would give you the sum of the CDR pow data in the IFG. Or 10 selected ROIs; etc etc. I also often put the POW data into a MRI volume. In the MATLAB format a NIFTI MRI volume struct representing this source model would have a img member that is 181 x 217 x 181. You can simply assign the POW to the img model to get the CDR data into the MRI volume, e.g., MRIVOLUME.img = pow. Then save or manipulate the MRI volume struct. 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 ************************************************* -----Original Message----- From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of fieldtrip-request at science.ru.nl Sent: Saturday, August 19, 2017 6:00 AM To: fieldtrip at science.ru.nl Subject: fieldtrip Digest, Vol 81, Issue 16 Send fieldtrip mailing list submissions to fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit https://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. How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) 2. Problem with coordinate systems when creating head model (Maria Hakonen) 3. bias in cluster stats from density of frequency sampling? (Nick Ketz) ---------------------------------------------------------------------- Message: 1 Date: Fri, 18 Aug 2017 12:45:31 +0200 (CEST) From: Sonja Suntrup-Kr?ger To: Subject: [FieldTrip] How to apply ROI mask to grandavg Message-ID: Content-Type: text/plain; charset=iso-8859-1 Dear all, I want to compare task-related brain activation in a ROI in two groups of subjects. I performed LCMV beamformer analysis on single subject data and, after normalization, created a grandaverage of each group, which I need to compare statistically within a defined ROI. Since the option to create a ROI in ft_sourcestatistis is unfortunately no longer available since 2015, I had the following idea to create my ROI: By using ft_volumelookup I created a binary mask from an anatomical atlas indicating my ROI in standard space. Now I would like to apply this mask on my grandaverage data. In specific, I want to multiply my mask values (zeros and ones) with the "pow" values in my grandavg. This would set all the power values outside my ROI to zero. With the result from this procedure I can then calculate my statistc. My binary mask has the dimensions: x,y,z mask [181x217x181 logical] coordsys: 'spm' In my grandavg, the dimension "dim" is the same, but the power values ("pow") and their positions ("pos") are listed as a single long vector for each subject: pow: [7109137x6 double] (because there are 6 datasets in the grandavg) pos: [7109137x3 double] dim: [181 217 181] coordsys: 'spm' My question is: How does the "x,y,z"-data structure of "dim" relate to the "single long vector"-data structure of "pow"/"pos"? If I had this information, I could transform my mask into the same structure and apply it as explained above. Your help is greatly appreciated. Thank you very much! Sonja Suntrup-Kr?ger -- Sonja Suntrup-Krueger, MD Assistant Professor of Neurology Institute for Biomagnetism and Biosignalanalysis University of Muenster, Germany ******************************* From robpetrosino at gmail.com Sat Aug 19 18:42:57 2017 From: robpetrosino at gmail.com (Roberto Petrosino) Date: Sat, 19 Aug 2017 18:42:57 +0200 Subject: [FieldTrip] adding info about individual trials Message-ID: <8E89FC7C-FA23-42AE-B0D9-3981F5B8241E@gmail.com> Hello everyone, I just started learning FieldTrip, and I am still adjusting to it, so apologies if my question is very basic. Before running standard pre-processing steps and artifact rejection, I need to add specific information about individual trials of my non-epoched EEG data (i.e., which word was presented for specific trials), but I can’t find my way in the documentation online. Is there any specific function it might be appropriate for this purpose? Thanks in advance, -Roberto ---------- Roberto Petrosino Ph.D. Student in Linguistics CT Institute for the Brain and Cognitive Sciences University of Connecticut -------------- next part -------------- An HTML attachment was scrubbed... URL: From politzerahless at gmail.com Sun Aug 20 14:01:45 2017 From: politzerahless at gmail.com (Stephen Politzer-Ahles) Date: Sun, 20 Aug 2017 20:01:45 +0800 Subject: [FieldTrip] adding info about individual trials Message-ID: This really depends what you want to use that information for. Normally I would think that all trials should be preprocessed in the same way regardless of condition, so I don't really need this information at that stage, but later on it might be useful for things like regressing ERP amplitude on word length or something. But for stuff like this you don't necessarily have to have this information *in* the data structure. For example, imagine I want to know which word was presented each trial. Typically, I have that list in a text file somewhere, in order (i.e., the first line of the text file is trial 1, the second line is trial 2, etc.). Then I do my various preprocessing of the EEG data in fieldtrip. Rather than actually removing the trials with artifacts, at first I just keep a list of which trials have artifact (or, better yet, which trials are 'good', without artifacts). Then I can use that list at the end of my processing pipeline to pull out the good trials and match them up to which words they are, and I can run whatever statistics I need on that. But there is no fieldtrip-specific tricks about that; I just have a text file listing all the information I need and I read that into MATLAB. --- Stephen Politzer-Ahles The Hong Kong Polytechnic University Department of Chinese and Bilingual Studies http://www.mypolyuweb.hk/~sjpolit/ > > > ------------------------------ > > Message: 2 > Date: Sat, 19 Aug 2017 18:42:57 +0200 > From: Roberto Petrosino > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] adding info about individual trials > Message-ID: <8E89FC7C-FA23-42AE-B0D9-3981F5B8241E at gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello everyone, > > I just started learning FieldTrip, and I am still adjusting to it, so > apologies if my question is very basic. > > Before running standard pre-processing steps and artifact rejection, I > need to add specific information about individual trials of my non-epoched > EEG data (i.e., which word was presented for specific trials), but I can?t > find my way in the documentation online. Is there any specific function it > might be appropriate for this purpose? > > Thanks in advance, > > -Roberto > > ---------- > Roberto Petrosino > Ph.D. Student in Linguistics > CT Institute for the Brain and Cognitive Sciences > University of Connecticut > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: attachments/20170819/3ae6923e/attachment-0001.html> > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 81, Issue 17 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick.ketz at gmail.com Mon Aug 21 07:48:51 2017 From: nick.ketz at gmail.com (Nick Ketz) Date: Sun, 20 Aug 2017 22:48:51 -0700 Subject: [FieldTrip] adding info about individual trials Message-ID: You can create a custom trial function that does something like this: http://www.fieldtriptoolbox.org/example/making_your_own_trialfun_for_conditional_trial_definition Or, if you can just add that info to the trialinfo matrix after epoching but before removing artifacts -------------- next part -------------- An HTML attachment was scrubbed... URL: From cornelia.quaedflieg at uni-hamburg.de Mon Aug 21 21:50:31 2017 From: cornelia.quaedflieg at uni-hamburg.de (Conny Quaedflieg) Date: Mon, 21 Aug 2017 21:50:31 +0200 Subject: [FieldTrip] head model - not able to use singleshell - different plot Message-ID: <010601d31ab6$bf6650c0$3e32f240$@uni-hamburg.de> Dear fieldtrip users, I have two simple questions about constructing an individual head model that keep me puzzling. 1. I get a warning when using cfg.method = 'singleshell'; The warning is: Warning: please specify cfg.method='projectmesh', 'iso2mesh' or 'isosurface' > In ft_prepare_mesh at 138 In ft_prepare_headmodel at 344 Warning: using 'projectmesh' as default I checked the cfg.method in the reference documentation as well as in the manuals on the fieldtrip website and here it is used as well. Does anyone have an idea why I can't use it? My full code is: cfg = []; cfg.method = 'singleshell'; hdm = ft_prepare_headmodel(cfg, seg); 2. when plotting the template grid in single-subject head coordinates, superimposed onto the head model my looks different than the plot of the manual (see below). Could this be related to the fact that the singleshell is not used when preparing the head model? Or might there be something else wrong in my code? My plot The plot in the manual The full code is: % and this is where the template source models are templatedir = fullfile(ftdir, 'template', 'sourcemodel'); load(fullfile(templatedir, 'standard_sourcemodel3d8mm')); template = sourcemodel; clear sourcemodel; % inverse-warp the template grid to subject specific coordinates cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.mri = mri_spm_rs; cfg.grid.unit = 'mm'; sourcemodel = ft_prepare_sourcemodel(cfg); figure; hold on % plot all objects in one figure ft_plot_mesh(sourcemodel.pos(sourcemodel.inside,:)); ft_plot_vol(hdm, 'facecolor', 'cortex', 'edgecolor', 'none');alpha 0.4; camlight; Any help is really appreciated E-Mail: cornelia.quaedflieg at uni-hamburg.de Tel.: +49 40 42838-5448 Website: Hyperlink -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.png Type: image/png Size: 41493 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image006.jpg Type: image/jpeg Size: 10483 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image007.jpg Type: image/jpeg Size: 5384 bytes Desc: not available URL: From s.suntrup-krueger at uni-muenster.de Tue Aug 22 09:15:36 2017 From: s.suntrup-krueger at uni-muenster.de (Sonja =?iso-8859-1?Q?Suntrup-Kr=FCger?=) Date: Tue, 22 Aug 2017 09:15:36 +0200 (CEST) Subject: [FieldTrip] How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) In-Reply-To: Message-ID: Dear John, hello everyone, thank you very much for your valuable response!! Your suggestion is exactly what I had in mind. However, as I see it, if I want to do the multiplication you suggested (multiply the ROI matrix * the pow), the question that remains is how to reshape the ROI-matrix correcly. In other words: How do the Voxel indices of the linear pos (or pow) -matrix relate to the voxel indices of the dim-cube matrix? I think this is what I need to know to correctly reshape my ROI-matrix from cube (N-ROI X 181 X 217 X 181) to linear (N-ROI x 7109137) prior to the multiplication step. Further advice is greatly appreciated! Thank you very much! Sincerely, Sonja RICHARDS, JOHN schrieb am 2017-08-19: > Sonja. You are definitely on the right track. > pow: [7109137x6 double] (because there are 6 datasets in the grandavg) > pos: [7109137x3 double] > dim: [181 217 181] > The dim are the size of the cube for your source model matrix. The pow/pos and other matrices are linear. The linear arrays are a little easier to manipulate, may be the reason that FT decided to use these rather than have 3D matrices. 181*217*181 = 7109137. > If you create a ROI matrix, it would either be of dimensions, N-ROI X 181 X 217 X 181, or more conveniently you could reshape it into a N-ROI x 7109137. > Then multiply the ROI matrix * the pow, e.g., > [N-ROI X 7109137] * [7109137 X 6] = N-ROI * 6. > This would sum across each voxel in the source model matrix for each roi. You can imagine a single ROI of the entire source model (1 x N-dipoles), this would sum across all voxels in the source model. > Or a single ROI, say of the IFG, in the ROI matrix, would give you the sum of the CDR pow data in the IFG. Or 10 selected ROIs; etc etc. > I also often put the POW data into a MRI volume. In the MATLAB format a NIFTI MRI volume struct representing this source model would have a img member that is 181 x 217 x 181. You can simply assign the POW to the img model to get the CDR data into the MRI volume, e.g., MRIVOLUME.img = pow. Then save or manipulate the MRI volume struct. > 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 > ************************************************* > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of fieldtrip-request at science.ru.nl > Sent: Saturday, August 19, 2017 6:00 AM > To: fieldtrip at science.ru.nl > Subject: fieldtrip Digest, Vol 81, Issue 16 > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > To subscribe or unsubscribe via the World Wide Web, visit > https://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. How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) > 2. Problem with coordinate systems when creating head model > (Maria Hakonen) > 3. bias in cluster stats from density of frequency sampling? > (Nick Ketz) > ---------------------------------------------------------------------- > Message: 1 > Date: Fri, 18 Aug 2017 12:45:31 +0200 (CEST) > From: Sonja Suntrup-Kr?ger > To: > Subject: [FieldTrip] How to apply ROI mask to grandavg > Message-ID: > > Content-Type: text/plain; charset=iso-8859-1 > Dear all, > I want to compare task-related brain activation in a ROI in two groups of subjects. I performed LCMV beamformer analysis on single subject data and, after normalization, created a grandaverage of each group, which I need to compare statistically within a defined ROI. > Since the option to create a ROI in ft_sourcestatistis is unfortunately no longer available since 2015, I had the following idea to create my ROI: > By using ft_volumelookup I created a binary mask from an anatomical atlas indicating my ROI in standard space. Now I would like to apply this mask on my grandaverage data. In specific, I want to multiply my mask values (zeros and ones) with the "pow" values in my grandavg. > This would set all the power values outside my ROI to zero. With the result from this procedure I can then calculate my statistc. > My binary mask has the dimensions: x,y,z > mask [181x217x181 logical] > coordsys: 'spm' > In my grandavg, the dimension "dim" is the same, but the power values ("pow") and their positions ("pos") are listed as a single long vector for each subject: > pow: [7109137x6 double] (because there are 6 datasets in the grandavg) > pos: [7109137x3 double] > dim: [181 217 181] > coordsys: 'spm' > My question is: How does the "x,y,z"-data structure of "dim" relate to the "single long vector"-data structure of "pow"/"pos"? If I had this information, I could transform my mask into the same structure and apply it as explained above. > Your help is greatly appreciated. > Thank you very much! > Sonja Suntrup-Kr?ger > -- > Sonja Suntrup-Krueger, MD > Assistant Professor of Neurology > Institute for Biomagnetism and Biosignalanalysis University of Muenster, Germany > ******************************* From RICHARDS at mailbox.sc.edu Tue Aug 22 15:17:06 2017 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Tue, 22 Aug 2017 13:17:06 +0000 Subject: [FieldTrip] How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) In-Reply-To: References: Message-ID: Sonja: The x,y,z of the dim are the dimensions of a 3D matrix; the pos and pow are linear matrices, and are stacked as if they were an XYZ atlas. How to do the other stuff is MATLAB programming. If you have a 3D matrix, you can treat is like a linear matrix for multiplication. e.g., ROIMATRIX(x, y, z) can be accessed linearly with ROIMATRIX(:). If you have a 4D matrix (nROI,x,y,z), it could be reshaped reshapematrix=reshape(ROIMATRIX,nROI,size(ROIMATRIX,2)*size(ROIMatrix,3)*size(ROIMATRIX,4)); This will give a matrix with (nROI,nVoxels), similar in dimension to the pos or pow matrix. Or. Keep your ROI atlas in the FT format in the first place (e.g. nROI X length(pos)) and then you won't have to transform it for the operations with the pow vector. There are several other ways to do this in MATLAB. One way is to use indices rather than 3D matrices. You can translate each 3D ROI into an index matrix with sub2ind; then use the resulting indices to access the corresponding elements in the pow (e.g., extractroi=pow(indices)), and simply sum or get an average of the elements in extractroi. This is MATLAB program rather than FT programming. 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 ************************************************* -----Original Message----- From: Sonja Suntrup-Krüger [mailto:s.suntrup-krueger at uni-muenster.de] Sent: Tuesday, August 22, 2017 3:16 AM To: RICHARDS, JOHN ; fieldtrip at science.ru.nl Subject: Re: How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) Dear John, hello everyone, thank you very much for your valuable response!! Your suggestion is exactly what I had in mind. However, as I see it, if I want to do the multiplication you suggested (multiply the ROI matrix * the pow), the question that remains is how to reshape the ROI-matrix correcly. In other words: How do the Voxel indices of the linear pos (or pow) -matrix relate to the voxel indices of the dim-cube matrix? I think this is what I need to know to correctly reshape my ROI-matrix from cube (N-ROI X 181 X 217 X 181) to linear (N-ROI x 7109137) prior to the multiplication step. Further advice is greatly appreciated! Thank you very much! Sincerely, Sonja RICHARDS, JOHN schrieb am 2017-08-19: > Sonja. You are definitely on the right track. > pow: [7109137x6 double] (because there are 6 datasets in the grandavg) > pos: [7109137x3 double] > dim: [181 217 181] > The dim are the size of the cube for your source model matrix. The pow/pos and other matrices are linear. The linear arrays are a little easier to manipulate, may be the reason that FT decided to use these rather than have 3D matrices. 181*217*181 = 7109137. > If you create a ROI matrix, it would either be of dimensions, N-ROI X 181 X 217 X 181, or more conveniently you could reshape it into a N-ROI x 7109137. > Then multiply the ROI matrix * the pow, e.g., [N-ROI X 7109137] * > [7109137 X 6] = N-ROI * 6. > This would sum across each voxel in the source model matrix for each roi. You can imagine a single ROI of the entire source model (1 x N-dipoles), this would sum across all voxels in the source model. > Or a single ROI, say of the IFG, in the ROI matrix, would give you the sum of the CDR pow data in the IFG. Or 10 selected ROIs; etc etc. > I also often put the POW data into a MRI volume. In the MATLAB format a NIFTI MRI volume struct representing this source model would have a img member that is 181 x 217 x 181. You can simply assign the POW to the img model to get the CDR data into the MRI volume, e.g., MRIVOLUME.img = pow. Then save or manipulate the MRI volume struct. > 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 > ************************************************* > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl > [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of > fieldtrip-request at science.ru.nl > Sent: Saturday, August 19, 2017 6:00 AM > To: fieldtrip at science.ru.nl > Subject: fieldtrip Digest, Vol 81, Issue 16 > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > To subscribe or unsubscribe via the World Wide Web, visit > https://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. How to apply ROI mask to grandavg (Sonja Suntrup-Kr?ger) > 2. Problem with coordinate systems when creating head model > (Maria Hakonen) > 3. bias in cluster stats from density of frequency sampling? > (Nick Ketz) > ---------------------------------------------------------------------- > Message: 1 > Date: Fri, 18 Aug 2017 12:45:31 +0200 (CEST) > From: Sonja Suntrup-Kr?ger > To: > Subject: [FieldTrip] How to apply ROI mask to grandavg > Message-ID: > > er.de> > Content-Type: text/plain; charset=iso-8859-1 > Dear all, > I want to compare task-related brain activation in a ROI in two groups of subjects. I performed LCMV beamformer analysis on single subject data and, after normalization, created a grandaverage of each group, which I need to compare statistically within a defined ROI. > Since the option to create a ROI in ft_sourcestatistis is unfortunately no longer available since 2015, I had the following idea to create my ROI: > By using ft_volumelookup I created a binary mask from an anatomical atlas indicating my ROI in standard space. Now I would like to apply this mask on my grandaverage data. In specific, I want to multiply my mask values (zeros and ones) with the "pow" values in my grandavg. > This would set all the power values outside my ROI to zero. With the result from this procedure I can then calculate my statistc. > My binary mask has the dimensions: x,y,z > mask [181x217x181 logical] > coordsys: 'spm' > In my grandavg, the dimension "dim" is the same, but the power values ("pow") and their positions ("pos") are listed as a single long vector for each subject: > pow: [7109137x6 double] (because there are 6 datasets in the grandavg) > pos: [7109137x3 double] > dim: [181 217 181] > coordsys: 'spm' > My question is: How does the "x,y,z"-data structure of "dim" relate to the "single long vector"-data structure of "pow"/"pos"? If I had this information, I could transform my mask into the same structure and apply it as explained above. > Your help is greatly appreciated. > Thank you very much! > Sonja Suntrup-Kr?ger > -- > Sonja Suntrup-Krueger, MD > Assistant Professor of Neurology > Institute for Biomagnetism and Biosignalanalysis University of > Muenster, Germany > ******************************* From christine.blume at sbg.ac.at Wed Aug 23 15:31:07 2017 From: christine.blume at sbg.ac.at (Blume Christine) Date: Wed, 23 Aug 2017 13:31:07 +0000 Subject: [FieldTrip] Effect size measure for cluster-based permutation tests Message-ID: Dear all, I came across a question posted by someone about a year ago, which concerned effect size measures for cluster-based permutation tests. Unfortunately, the question does not seem to have been answered... Q: I am using cluster-based permutation tests (depsamplesT, on time-frequency data) and am wondering how to best calculate an effect size from that. Best, Christine -------------- next part -------------- An HTML attachment was scrubbed... URL: From alik.widge at gmail.com Wed Aug 23 16:41:44 2017 From: alik.widge at gmail.com (Alik Widge) Date: Wed, 23 Aug 2017 10:41:44 -0400 Subject: [FieldTrip] Effect size measure for cluster-based permutation tests In-Reply-To: References: Message-ID: My naive answer, which perhaps will provoke Eric to provide a better one: you have the actual cluster statistic and its permutation distribution under the null hypothesis. It seems as though that distribution could be assumed Gaussian and something like Cohen's d calculated. On Aug 23, 2017 9:35 AM, "Blume Christine" wrote: > Dear all, > > > > I came across a question posted by someone about a year ago, which > concerned effect size measures for cluster-based permutation tests. > Unfortunately, the question does not seem to have been answered… > > > > Q: I am using cluster-based permutation tests (depsamplesT, on > time-frequency data) and am wondering how to best calculate an effect size > from that. > > > > Best, > > Christine > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ainsley.temudo at nyu.edu Wed Aug 23 22:00:19 2017 From: ainsley.temudo at nyu.edu (Ainsley Temudo) Date: Thu, 24 Aug 2017 00:00:19 +0400 Subject: [FieldTrip] ROI masks for cortical surface source model Message-ID: Hi everyone, I have a few questions regarding how to use the atlases to create ROI masks to use for my source analysis 1. *how do you use the freesurfer atlas*. i’ve tried ft_read_atlas({'aparc+aseg.mgz','SPNS1151-oct-6-src.fif’}) but I don’t think this is the correct use because I get a structure with an aparc field which is 256x256x256. I don’t see the link between this and my source model. It tried using ft_volumelookup after (using the volume that was put through freesufer as an input ) but this also gives a 256x256x256 mask. I know at some point I have to orig.inuse to link the vertices in the high resolution tessellation to those in the sourcemodel. but i’m missing something or doing something wrong before this. 1. *If I want to use a template atlas, how do I link that to my source space.* I tried following this http://www.fieldtriptoolbox.org/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_brain_atlas_based_mni_space . but how do I warp the cortical sheet grid that i've already created to the the template grid. 3. *Is it possible to use an ROI mask that was created from fMRI data in afni in **field trip?* I can read in the ROI using ft_read_atlas, but have no idea how that could be used to select the corresponding grid points in my source model. would really appreciate if someone could help answer this questions Thanks! Ainsley -------------- next part -------------- An HTML attachment was scrubbed... URL: From psc.dav at gmail.com Wed Aug 23 22:57:46 2017 From: psc.dav at gmail.com (David Pascucci) Date: Wed, 23 Aug 2017 22:57:46 +0200 Subject: [FieldTrip] single trials eLoreta Message-ID: Dear fieldtrip experts, I am doing single-trial connectivity in the source space with EEG, and I moved recently to fieldtrip. I am trying to use the eLoreta method to get single-trial estimates in the following way: % eLORETA cfg = []; cfg.method = 'eloreta'; cfg.grid = leadfield; cfg.headmodel = headmodel; cfg.eloreta.keepfilter = 'yes'; cfg.eloreta.normalize = 'yes'; cfg.eloreta.lambda = 0.05; *(1) cfg.eloreta.projectnoise = 'yes'; eLO_source = ft_sourceanalysis(cfg,data); % in the above line, "data" is the results of ft_timelockanalysis % with cfg.covariance = 'yes'; *(2) % then I put the source positions from the MNI template I % used for the sourcemodel (see: % http://www.fieldtriptoolbox.org/tutorial/sourcemodel#subject- % specific_grids_that_are_equivalent_across_subjects_in_normalized_space eLO_source.pos = template_grid.pos; iPOS = eLO_source.pos; iPOS(eLO_source.inside==0,:) = NaN; % only points inside gray matter % Then I select ROIs (here only one for simplicity) to extract single-trial source activity: [v,I] = min(pdist2(iPOS, ROIs_mni , 'euclidean')); % And I multiply the spatial filter for the EEG data in each trial W = eLO_source.avg.filter{I}; % filter at my ROI of interest for tr = 1:size(data.trial,1) % loop over trials trials{tr} = W * squeeze(data.trial(tr,:,:)); *(3) end My 3 questions (marked at the right of the above code) are the following: (0, not marked above): Is this approach correct? (1) Is there a way to select the best lambda parameter (e.g., selecting the one that best approximates the activity at the EEG channels level)? (2) I am confused about the role of the covariance, since it doesn't seem to be used when source activity is estimated using the set of spatial filters at the single trial (my lack of knowledge) (3) Is the "trials{tr} = W * squeeze(data.trial(tr,:,:)); " approach correct to get time-series of source activity in a ROI? I hope this was clear enough, looking forward for your feedback. Best, David -- --------------------- David Pascucci Postdoctoral Fellow University of Fribourg Department of Psychology Rue de Faucigny 2 1700 Fribourg Switzerland -------------- next part -------------- An HTML attachment was scrubbed... URL: From juliacoopiza at gmail.com Wed Aug 23 23:16:05 2017 From: juliacoopiza at gmail.com (Julia Coopi) Date: Wed, 23 Aug 2017 15:16:05 -0600 Subject: [FieldTrip] Using PPC method Message-ID: Dear Fieldtrippers, I am new in fieltrip. I want to use pair wise phase consistency method for measuring the spike-pahse locking. My data set is recorded by neuralynx. For measuring it I found this link: http://www.fieldtriptoolbox.or g/tutorial/spikefield. Is it the right link? Should I go through all steps including reading spikes and LFPs from neuralynx, make trails and .... finally call thefollowing function? ft_spiketriggeredspectrum It is very boring and time consuming. Actually, I imported files into matlab and make the trials which was a huge work at that time. I don't want to do it again and import data from neuralynx by fieldtrip (which seems is not very straighforward). I want to use the PPC method of fieldtrip using imported files into matlab. Is there any way to do that? Please guide me what is the best way. Thanks, Julia -------------- next part -------------- An HTML attachment was scrubbed... URL: From pascualm at key.uzh.ch Thu Aug 24 05:27:40 2017 From: pascualm at key.uzh.ch (pascualm at key.uzh.ch) Date: Thu, 24 Aug 2017 12:27:40 +0900 Subject: [FieldTrip] =?utf-8?q?Innovations_orthogonalization=3A_a_solution?= =?utf-8?q?_to_the_major_pitfalls_of_EEG/MEG_=E2=80=9Cleakage_corre?= =?utf-8?b?Y3Rpb27igJ0=?= Message-ID: Dear Colleagues, The pre-print at: https://doi.org/10.1101/178657 might be of interest to those working in the field of brain connectivity based on signals of electric neuronal activity. It is shown that "leakage correction" in the form of "signal orthogonalization" consistently produces false connectomes. More importantly, a new method is proposed for the resolution ("unmixing") of electrophysiological signals, based on "innovations orthogonalization". -------- Abstract : The problem of interest here is the study of brain functional and effective connectivity based on non-invasive EEG-MEG inverse solution time series. These signals generally have low spatial resolution, such that an estimated signal at any one site is an instantaneous linear mixture of the true, actual, unobserved signals across all cortical sites. False connectivity can result from analysis of these low-resolution signals. Recent efforts toward “unmixing” have been developed, under the name of “leakage correction”. One recent noteworthy approach is that by Colclough et al (2015 NeuroImage, 117:439-448), which forces the inverse solution signals to have zero cross-correlation at lag zero. One goal is to show that Colclough’s method produces false human connectomes under very broad conditions. The second major goal is to develop a new solution, that appropriately “unmixes” the inverse solution signals, based on innovations orthogonalization. The new method first fits a multivariate autoregression to the inverse solution signals, giving the mixed innovations. Second, the mixed innovations are orthogonalized. Third, the mixed and orthogonalized innovations allow the estimation of the “unmixing” matrix, which is then finally used to “unmix” the inverse solution signals. It is shown that under very broad conditions, the new method produces proper human connectomes, even when the signals are not generated by an autoregressive model. -------- Cordially, Roberto ... Roberto D. Pascual-Marqui, PhD, PD The KEY Institute for Brain-Mind Research, University of Zurich Visiting Professor at Neuropsychiatry, Kansai Medical University, Osaka [www.keyinst.uzh.ch/loreta] [scholar.google.com/citations?user=pascualmarqui] From rikkert.hindriks at upf.edu Thu Aug 24 11:58:14 2017 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Thu, 24 Aug 2017 11:58:14 +0200 Subject: [FieldTrip] MEG magnetometer leadfields Message-ID: Dear all, I'm generating simulated data for leadfield matrices for the CTF 275 axial gradiometer system and I would like to compare different the results with those obtained from data simulated using a magnetometer configuration. It is possible to generate equivalent magnetometer leadfield matrices? (Equivalent in the sense of having the same number of coils at the same positions). Thanks and kind regards, Rikkert Virus-free. www.avg.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Thu Aug 24 13:11:27 2017 From: michelic72 at gmail.com (Cristiano Micheli) Date: Thu, 24 Aug 2017 13:11:27 +0200 Subject: [FieldTrip] MEG magnetometer leadfields In-Reply-To: References: Message-ID: Dear Rikkert, as far as I know the CTF toolbox is incorporated in the /external directory of FieldTrip and can help you a big deal. If, for example, you recorded or have access to original CTF recordings you can use the readin functions (ft_read_header) to read your datasets. After read-in,you will find that one of the header fields is called 'grad' andin there you have the information of all coils positions. See also this for further reading: http://www.fieldtriptoolbox.org/getting_started/ctf?s[]=ctf One of the grad sub-fields is called 'tra' and contains the magnetometers (columns) to gradiometer (rows) weights matrix. If you take care to define a new 'tra' matrix which weights 1 for each magnetometer then you reach your goal. You'll probably need to look into *grad.coilpos *and retain only a subset of your magnetometers positions (either the nearest or the furthest set from the head center)*, *and take care to keep consistency with the indexes in grad.tra too *.* IHTH Cris On Thu, Aug 24, 2017 at 11:58 AM, HINDRIKS, RIKKERT < rikkert.hindriks at upf.edu> wrote: > Dear all, > > I'm generating simulated data for leadfield matrices for the CTF 275 axial > gradiometer system and I would like to compare different the results with > those obtained from data simulated using a magnetometer configuration. > > It is possible to generate equivalent magnetometer leadfield matrices? > (Equivalent in the sense of having the same number of coils at the same > positions). > > Thanks and kind regards, > Rikkert > > > Virus-free. > www.avg.com > > <#m_-6692326249519774685_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From awutz at mit.edu Thu Aug 24 15:21:53 2017 From: awutz at mit.edu (Andreas Wutz) Date: Thu, 24 Aug 2017 13:21:53 +0000 Subject: [FieldTrip] Using PPC method In-Reply-To: References: Message-ID: Dear Julia, it seems that we are going down the same road. I am also in the process of building a pipeline for spike-field coherence and I am orienting myself along the mentioned tutorial. That being said, it should become clear that I am far from being an expert for this kind of analysis. Nevertheless, I want to share what I have learned about it in the last days. I hope someone else in the list will correct me in case. This post should also serve as a check for my own analysis. First, you don't have to re-do your prior analysis for your neuralynx data. You only have to bring the outputs of your analysis into a format that the ft_xxx functions can read. You probably already have all the required information for that from your previous spike sorting. Let's look at the data structure (already segmented into trials, as shown in the tutorial): spikeTrials = label: {'sig002a_wf' 'sig003a_wf'} timestamp: {[1x83601 int32] [1x61513 int32]} waveform: {[1x32x83601 double] [1x32x61513 double]} unit: {[1x83601 double] [1x61513 double]} hdr: [1x1 struct] dimord: '{chan}_lead_time_spike' cfg: [1x1 struct] time: {[1x83601 double] [1x61513 double]} trial: {[1x83601 double] [1x61513 double]} trialtime: [600x2 double] The fields ".waveform" and ".unit" won't be necessary for spike-field coherence. For the fields ".cfg" and ".hdr", I am not sure if they are used at some point. I fill them with the info I have. spikeTrials.hdr.FileHeader.Frequency = your SamplingFrequency; % 40000 spikeTrials.cfg.timestampspersecond = your SamplingFrequency; % 40000 spikeTrials.cfg.trl = nTrials x 3 matrix with start (1st column), end (2nd) and offset relative to trigger (3rd) of each trial in timestamp units. ".label" contains a cell array of strings with one string for each unit. ".dimord" can be copied from above. ".trialtime" = nTrials x 2 matrix with start (1st) / end (2nd) of each trial relative to trigger in seconds. The important fields are ".timestamp", ".time", ".trial". Those contain all info about each spike for each unit (1 x nUnits cell array, each cell contains a vector with one entry per spike for that unit). ".timestamp": spike times in timestamp units from the beginning of the recording (NOTE: Make sure your recording is continuous such that the timestamps increase from first to last, no clock resets to zero). ".time": spike times in seconds relative to trigger in each trial ".trial": trial number in which the spike occurred (1 for trial 1, 2 for 2 and so on) Best, Andreas ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Julia Coopi [juliacoopiza at gmail.com] Sent: Wednesday, August 23, 2017 5:16 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Using PPC method Dear Fieldtrippers, I am new in fieltrip. I want to use pair wise phase consistency method for measuring the spike-pahse locking. My data set is recorded by neuralynx. For measuring it I found this link: http://www.fieldtriptoolbox.org/tutorial/spikefield. Is it the right link? Should I go through all steps including reading spikes and LFPs from neuralynx, make trails and .... finally call thefollowing function? ft_spiketriggeredspectrum It is very boring and time consuming. Actually, I imported files into matlab and make the trials which was a huge work at that time. I don't want to do it again and import data from neuralynx by fieldtrip (which seems is not very straighforward). I want to use the PPC method of fieldtrip using imported files into matlab. Is there any way to do that? Please guide me what is the best way. Thanks, Julia -------------- next part -------------- An HTML attachment was scrubbed... URL: From tianyangma2013 at gmail.com Mon Aug 28 11:05:38 2017 From: tianyangma2013 at gmail.com (=?UTF-8?B?6ams5aSp6Ziz?=) Date: Mon, 28 Aug 2017 11:05:38 +0200 Subject: [FieldTrip] Using PPC method Message-ID: Dear Andreas, I am also a new learner using PPC method. In your reply to Julia, I don’t quite understand why there are same number of values in timestamp and time, since timestamps is the spike times from the beginning of the recording to the end and time is relative to trigger in each trial. In my case, I have timestamp of spikes and LFP data 0.5 s before and after stimulus in each trial . Do you think it is possible I could use the code by somehow manipulating the format of input? Thanks! Best, Tianyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From awutz at mit.edu Mon Aug 28 14:49:54 2017 From: awutz at mit.edu (Andreas Wutz) Date: Mon, 28 Aug 2017 12:49:54 +0000 Subject: [FieldTrip] Using PPC method In-Reply-To: References: Message-ID: Dear Tianyang, the spike timestamps in the fields ".timestamp" and ."time" should correspond to all trials that occur within the respective trial periods. In the spike-field coherence tutorial, if you compare the data structure for the entire recording (there called "spike") with the trial-cut data structure (there called "spikeTrials"), you can see that there are less spikes in the latter. This is because those trials, which are not within the specified trial periods, are left out. The tutorial worked great for me. Unfortunately, it stops at the point where inferential stats have to be computed. I understand that I have to break up the relationship between spike timestamp per trial with lfp phase per trial. This will require random resampling of the lfp-phases. Intuitively, I would shuffle the trial vector for the lfp and then calculate the ppc for each random partition (using the same number of spikes). Let me add my own questions here. 1) It is unclear to me what happens when I have more than one spike per trial (e.g. 3 spikes in trial 1). Should I construct the resampling distribution with as many draws from each trial as there where in the original data (e.g. 3 draws from trial 1 but at different time points)? 2) I wonder whether only the trial vector should be shuffled (preserving the time points per trial compared to the original effect but now from a different, random trial). In other words, if I had in the original data 3 spikes which happened in the trials [1 2 3] and at the times [-.5 0 1], should the random partition look like this: partition: trial = [3 1 2], time = [-.5 0 1] or should the time points be taken completely at random? I hope, I was able to be clear enough with my explanation. Best, Andreas ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of 马天阳 [tianyangma2013 at gmail.com] Sent: Monday, August 28, 2017 5:05 AM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Using PPC method Dear Andreas, I am also a new learner using PPC method. In your reply to Julia, I don’t quite understand why there are same number of values in timestamp and time, since timestamps is the spike times from the beginning of the recording to the end and time is relative to trigger in each trial. In my case, I have timestamp of spikes and LFP data 0.5 s before and after stimulus in each trial . Do you think it is possible I could use the code by somehow manipulating the format of input? Thanks! Best, Tianyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From nima.noury at student.uni-tuebingen.de Mon Aug 28 15:00:54 2017 From: nima.noury at student.uni-tuebingen.de (Nima Noury) Date: Mon, 28 Aug 2017 15:00:54 +0200 Subject: [FieldTrip] Last call for 2017 Tuebingen Systems Neuroscience Symposium (SNS) Message-ID: <20170828150054.Horde.LxjzP7lI-YaIc_1WPdDKRyM@webmail.uni-tuebingen.de> The Centre for Integrative Neuroscience, MEG Center Tuebingen, and the Graduate Training Centre of Neuroscience are pleased to announce the 2017 Tuebingen Systems Neuroscience Symposium (SNS2017) The symposium takes place on October 11 and 12, 2017 at the University of Tuebingen. This annual international meeting brings together leading researchers in the field of systems neuroscience featuring plenary talks, poster sessions and social events. Join us in Tuebingen to learn about the latest advances in systems neuroscience. Confirmed speakers: Francesco Battaglia, Nijmegen Gustavo Deco, Barcelona Biyu He, New York Christoph Kayser, Glasgow Daniel Margulies, Leipzig Uta Noppeney, Birmingham Marios Philiastides, Glasgow Hansjörg Scherberger, Göttingen Woodrow Shew, Fayetteville Preejas Tewarie, Nottingham For more information and registration, please visit: http://meg.medizin.uni-tuebingen.de/2017/ Please forward this information to any of your colleagues and collaborators that may be interested in the symposium. Nima Noury AG Large-Scale Neuronal Interactions Centre for Integrative Neuroscience (CIN) University of Tübingen Otfried Müller-Straße 25 72076 Tübingen Germany From tianyangma2013 at gmail.com Mon Aug 28 23:31:17 2017 From: tianyangma2013 at gmail.com (=?UTF-8?B?6ams5aSp6Ziz?=) Date: Mon, 28 Aug 2017 23:31:17 +0200 Subject: [FieldTrip] Using PPC method In-Reply-To: References: Message-ID: Dear Andreas, I still don't quite understand the tutorial. spikeTrials = label: {'sig002a_wf' 'sig003a_wf'} timestamp: {[1x83601 int32 ] [1x61513 int32 ]} waveform: {[1x32x83601 double ] [1x32x61513 double ]} unit: {[1x83601 double ] [1x61513 double ]} hdr: [1x1 struct ] dimord: '{chan}_lead_time_spike' cfg: [1x1 struct ] time: {[1x83601 double ] [1x61513 double ]} trial: {[1x83601 double ] [1x61513 double ]} trialtime: [600x2 double ] Like here, I don't know why for timestamp,time and trial, there are same number of values. If I have one unit, 60 trials and focus on -0.5 s to 0.5 s around stimulus event, I think trial means which trial of the 60 trials has spikes in this 1 s. The time means time point of spikes located in the 1 s around stimulus for each trial. Is it correct? But what about the timestamp? It means from the beginning of recording to the end and has nothing to do with trials? I feel I am quite lost. Best, Tianyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From awutz at mit.edu Tue Aug 29 00:55:10 2017 From: awutz at mit.edu (Andreas Wutz) Date: Mon, 28 Aug 2017 22:55:10 +0000 Subject: [FieldTrip] Using PPC method In-Reply-To: References: , Message-ID: Dear Tianyang, maybe it's a good idea to download the accompanying sample data from the tutorial and look if you can recreate the shown data structure. Then look closer into the values of the respective fields. That should give you a better grasp on what is required there. I have not fully looked into the code but my feeling is that spikeTrials.timestamp is not of any further use and is just carried from the data structure before (which was not cut into trials and where the raw timestamps were useful). The timing of spikes relative to the trial zero point is fully described in the fields ".time", ".trial" and ".trialtime". Best, Andreas From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of 马天阳 [tianyangma2013 at gmail.com] Sent: Monday, August 28, 2017 5:31 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Using PPC method Dear Andreas, I still don't quite understand the tutorial. spikeTrials = label: {'sig002a_wf' 'sig003a_wf'} timestamp: {[1x83601 int32] [1x61513 int32]} waveform: {[1x32x83601 double] [1x32x61513 double]} unit: {[1x83601 double] [1x61513 double]} hdr: [1x1 struct] dimord: '{chan}_lead_time_spike' cfg: [1x1 struct] time: {[1x83601 double] [1x61513 double]} trial: {[1x83601 double] [1x61513 double]} trialtime: [600x2 double] Like here, I don't know why for timestamp,time and trial, there are same number of values. If I have one unit, 60 trials and focus on -0.5 s to 0.5 s around stimulus event, I think trial means which trial of the 60 trials has spikes in this 1 s. The time means time point of spikes located in the 1 s around stimulus for each trial. Is it correct? But what about the timestamp? It means from the beginning of recording to the end and has nothing to do with trials? I feel I am quite lost. Best, Tianyang -------------- next part -------------- An HTML attachment was scrubbed... URL: From maximilien.chaumon at gmail.com Tue Aug 29 15:09:56 2017 From: maximilien.chaumon at gmail.com (Maximilien Chaumon) Date: Tue, 29 Aug 2017 13:09:56 +0000 Subject: [FieldTrip] ft_volumerealign headshape should stay out of scalp volume In-Reply-To: References: Message-ID: Dear all, I'm aligning an MRI with a headshape point cloud. I often get headshape points inside the skull after realigning with icp, like for this guy, for instance: [image: image.png] Would it be possible to tell the icp search algorithm when points are inside the skull and force it to blow the headshape cloud point outwards? Many thanks, Max ​ ​ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 82349 bytes Desc: not available URL: From amentink at chdr.nl Thu Aug 31 14:03:48 2017 From: amentink at chdr.nl (Alexander Mentink) Date: Thu, 31 Aug 2017 12:03:48 +0000 Subject: [FieldTrip] Units powerspectrum time-frequency analysis Message-ID: Dear FieldTrip community, I have a question regarding time-frequency analyses, it would be awesome if someone could help me out! Does anyone perhaps know what the absolute units are of the TFRwave.powerspctrm that you get when performing a continuous wavelet transform: cfg = []; cfg.channel = 'Cz'; cfg.method = 'tfr'; cfg.width = 7; cfg.output = 'pow'; cfg.foi = 1:0.25:30; cfg.toi = -3:0.01:2.5; TFRwave = ft_freqanalysis(cfg, trialdata); cfg = []; cfg.channel = 'Cz'; cfg.baseline = [-0.5 -0.1]; cfg.baselinetype = 'absolute'; cfg.zlim = 'maxabs'; cfg.xlim = [-0.2 1.5]; cfg.showlabels = 'yes'; figure ft_singleplotTFR(cfg, TFRwave) The single plot shows reliable results compared to the Hanning window method, however the values of the powerspectrum are in the hundred thousands (?) - see image attached. This can't be uV^2/Hz, perhaps nV^2/Hz? Thanks in advance! Alex Alexander Mentink Centre for Human Drug Research Zernikedreef 8 2333 CL Leiden The Netherlands T +31 (0) 71 7517166 amentink at chdr.nl http://www.chdr.nl Follow us: [Twitter] [LinkedIn] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image5c5f52.PNG Type: image/png Size: 696 bytes Desc: image5c5f52.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image8e5b87.PNG Type: image/png Size: 648 bytes Desc: image8e5b87.PNG URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: TFR_hanning_cm1_37.png Type: image/png Size: 30823 bytes Desc: TFR_hanning_cm1_37.png URL: