From nima.noury at student.uni-tuebingen.de Mon Sep 3 10:10:26 2018 From: nima.noury at student.uni-tuebingen.de (Nima Noury) Date: Mon, 03 Sep 2018 10:10:26 +0200 Subject: [FieldTrip] Deadline approaching: Tuebingen Systems Neuroscience Symposium, Oct 18-19 Message-ID: <20180903101026.Horde.A4Iqx-Y7Ydb8cwUn8xnCq_p@webmail.uni-tuebingen.de> The Centre for Integrative Neuroscience, MEG Center Tuebingen, and the Graduate Training Centre of Neuroscience are pleased to announce the 2018 Tuebingen Systems Neuroscience Symposium (SNS2018) The symposium takes place on October 18 and 19, 2018 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: Bahador Bahrami, Munich Sylvain Baillet, Montreal Paul Cisek, Montreal Olivier Collignon, Leuven Lila Davachi, New York Ileana Hanganu-Opatz, Hamburg Ayelet Landau, Jerusalem Wolfgang Maass, Graz Carl Petersen, Lausanne Mark Stokes, Oxford Matthew Self, Amsterdam For more information and registration, please visit: http://meg.medizin.uni-tuebingen.de/2018/ 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 alessandro.orticoni at gmail.com Mon Sep 3 22:16:23 2018 From: alessandro.orticoni at gmail.com (Alessandro Orticoni) Date: Mon, 3 Sep 2018 22:16:23 +0200 Subject: [FieldTrip] [Fieldtrip] Power spectrum units and Error in ft_topoplotER Message-ID: Dear all, I would have two questions. *1)* First one is about ft_freqanalysis: which are the units of the output, given the cfg.output='pow' and the EEG data in uV? *2)* The second one is about the topoplot. I'm trying to plot the power spectrum over the following six channels (I created the following .lay file): 1 -0.186808 0.232745 0.125128 0.093849 F3 2 0.186808 0.232745 0.125128 0.093849 F4 3 -0.225000 0.000046 0.125128 0.093849 C3 4 0.225000 0.000046 0.125128 0.093849 C4 5 -0.139045 -0.427979 0.125128 0.093849 O1 6 0.139045 -0.427979 0.125128 0.093849 O2 This is the code I wrote to try to plot it: freq_EEG_append = freq_EEG{1}{1}; % Just one sleep stage for i=2:6 % Length(selchan) freq_EEG_append.label{i,1} = freq_EEG{1}{i}.label; freq_EEG_append.powspctrm(i,:) = freq_EEG{1}{i}.powspctrm; freq_EEG_append.cfg.channel{i,1} = freq_EEG{1}{i}.cfg.channel; end cfg = []; % cfg.xlim = [0.3 0.5]; % cfg.zlim = [0 6e-14]; cfg.layout = 'EEGCap.lay'; cfg.parameter = 'individual'; figure; ft_topoplotER(cfg,freq_EEG_append); colorbar; In the first part of the code, I created the struct freq_EEG_append collecting the data from freq_EEG, a 1x4 cell (four sleep stages) array whose elements (still cell array) contains six structures (six channels), each resulting from the application of the ft_freqanalysis. freq_EEG_append = struct with fields: label: {6×1 cell} dimord: 'chan_freq' freq: [1×1121 double] powspctrm: [6×1121 double] cfg: [1×1 struct] But I'm getting the following error: Error using cell/unique (line 85) Input A must be a cell array of character vectors. Error in ft_channelselection (line 107) if length(datachannel)~=length(unique(datachannel)) Error in ft_prepare_layout (line 234) cfg.channel = ft_channelselection(cfg.channel, data.label); Error in ft_topoplotER (line 209) cfg.layout = ft_prepare_layout(tmpcfg, varargin{1}); Thanks in advance for your help. Best, Alessandro Orticoni -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Sep 4 09:23:35 2018 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 4 Sep 2018 09:23:35 +0200 Subject: [FieldTrip] BIOMAG conference - Open Science Panel session Message-ID: Dear FieldTrip users, For those of you that did not attend the BIOMAG conference last week, please here find the slides of the topics that we presented and discussed in the Open Science Panel session: https://www.slideshare.net/RobertOostenveld/biomag2018-robert-oostenveld-open-science-intro https://www.slideshare.net/RobertOostenveld/biomag2018-guiomar-niso-bids-and-omega https://www.slideshare.net/RobertOostenveld/biomag2018-darren-price-camcan https://www.slideshare.net/RobertOostenveld/biomag2018-janmathijs-schoffelen-cobidas https://www.slideshare.net/RobertOostenveld/biomag2018-vladimir-litvak-frontiers https://www.slideshare.net/RobertOostenveld/biomag2018-tzvetan-popov-hcp-from-a-users-perspective https://www.slideshare.net/RobertOostenveld/biomag2018-denis-engemann-mnehcp best regards, Robert PS did you note the breaking news (posted by PLOS 5 minutes ago) that 11 of the EU contries will require publications funded by the respective national science foundations to be immediately and full open accesss as of 2020. Here the headlines in my Dutch newspaper, I am sure that the news will spread quickly elsewhere. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Sep 4 10:05:52 2018 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 4 Sep 2018 10:05:52 +0200 Subject: [FieldTrip] Toolkit 2018 videos now online Message-ID: Dear FieldTrip users, It took some time, but thanks to Raphaël Thézé - who did the conversion and editing of video and audio recordings - we now have the lectures of the 2018 M/EEG toolkit course on our Youtube channel . If you have been viewing online lectures of previous years , you may realize that some of the material has not changed that much. Nevertheless, listening to different people (this year with Sophie, Simon and Mats) presenting the material might still result in you getting a better understanding. Please note that the recording of the lecture on Sleep and continuous EEG by Martin Dresler failed due to technical reasons, so we cannot share that. Hopefully we’ll be able to get that recorded next year. Enjoy, Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuela.costa at ctb.upm.es Tue Sep 4 10:42:18 2018 From: manuela.costa at ctb.upm.es (Manuela Costa) Date: Tue, 4 Sep 2018 10:42:18 +0200 Subject: [FieldTrip] Error in ft_mvaranalysis In-Reply-To: References: Message-ID: Dear Jan-Mathijs, thank you very much for fixing the typo in the code. I do not get anymore the same error but as you predicted I get a new one. I hope you can help me with that as well. Best wishes Manuela Matrix dimensions must agree. Error in ft_mvaranalysis>catnan (line 607) datamatrix(:,begsmp:endsmp) = datacells{trials(k)}(chanindx,:).*taper(ones(nchan,1),:); Error in ft_mvaranalysis (line 425) dat = catnan(tmpdata.trial, chanindx, rpt{rlop}, tap(m,:), nnans, dobvar); Error in Step2_Calculate_Granger_time_freq_updated_MC (line 124) mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, preprocessing_emotional_Rem_ds{subj}); I copy here the information about the structure (it's the same as before) The data is downsampled at 250 Hz. The fields of my data structure are fsample, trial, time, label and cfg. The size of preprocessing_emotional_Rem_ds{1}.trial{1} is 3x3751 (channels, data points). Configuration structure: cfg = []; cfg.toolbox = 'bsmart'; cfg.order = 10; cfg.toi = -0.5:0.01:3; %% the time points at which the windows are centered cfg.t_ftimwin = 0.25; %% length of time window in second mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, preprocessing_emotional_Rem_ds{subj}); 2018-08-31 11:32 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl>: > Dear Manuela, > > This looks like a typo in the code, which I will fix (and once fixed will > become available in the daily release version of the code). To give myself > some time: probably not tonight, but perhaps after the weekend :). However, > the fact that this part of the code clearly doesn’t work, I am not entirely > sure whether the rest will work smoothly as well, as soon as the current > hurdle is fixed. But let’s see > > Best wishes, > Jan-Mathijs > > > On 29 Aug 2018, at 13:34, Manuela Costa wrote: > > Dear community, > > > I'm planning to do granger causality analysis on human iEEG data. I'm > using ft_mvaranalysis to get time-dependent coefficient sets based on a > sliding window, but I get an error. > > The data is downsampled at 250 Hz. The fields of my data structure are > fsample, trial, time, label and cfg. The size of > preprocessing_emotional_Rem_ds{1}.trial{1} is 3x3751 (channels, data > points). Below is the configuration structure and the error message. The > ft_mvaranalysis function works if I do not use the sliding window approach. > I tried to use different cfg.toi and cfg.t_ftimwin but I could not find a > solution. I hope you can help me. > > > Best wishes, > > > Manuela Costa > > > Configuration structure: > > > cfg = []; > cfg.toolbox = 'bsmart'; > cfg.order = 10; > cfg.toi = -0.5:0.01:3; %% the time points at which the windows > are centered > cfg.t_ftimwin = 0.25; %% length of time window in second > mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, > preprocessing_emotional_Rem_ds{subj}); > > > > > > > > Error message: > > > > > Matrix dimensions must agree. > > > Error in ft_mvaranalysis (line 185) > latency(k,:) = cfg.toi + cfg.t_ftimwin.*[-0.5 0.5]; > > > Error in Step2_Calculate_Granger_time_freq(line 108) > mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg,preprocess > ing_emotional_Rem_ds{subj}); > > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hame.hame.hame at gmail.com Tue Sep 4 12:15:07 2018 From: hame.hame.hame at gmail.com (Hame Park) Date: Tue, 4 Sep 2018 12:15:07 +0200 Subject: [FieldTrip] Combining ROI mask and functional mask in ft_sourceplot not working Message-ID: Hello, I want to use two masks; one from based on my data and one based on the atlas. when set separately, it works fine. However, when I use them both, the ROI mask does not apply. I looked into the code and it seems (to me) the mask is indeed combined at one point, but it is not applied in the final stage.. Any advice, comments would be much appreciated! Thank you. Best wishes, Hame -------------- next part -------------- An HTML attachment was scrubbed... URL: From M.vanEs at donders.ru.nl Tue Sep 4 15:06:52 2018 From: M.vanEs at donders.ru.nl (Es, M.W.J. van (Mats)) Date: Tue, 4 Sep 2018 13:06:52 +0000 Subject: [FieldTrip] [Fieldtrip] Power spectrum units and Error in ft_topoplotER Message-ID: <3FC79061C73BEF44A3BEDA5DFC0ADBDFDE3BC87A@exprd01.hosting.ru.nl> Hi Alessandro, Power is the square of the magnitude of your signal. Since your signal is in uV, the units of power would be (uV)^2. Note that this only holds if you have not applied any transformations (like normalizations) to your raw data or power values. Relating to your second question, I think your specification of the label structure is wrong. Try replacing the first {} brackets in freq_EEG_append.label{i,1} = freq_EEG{1}{i}.label; with normal brackets (): freq_EEG_append.label(i,1) = freq_EEG{1}{i}.label; Hope that helps. Best, Mats van Es ---------------------------------------------------------------------- Message: 1 Date: Mon, 3 Sep 2018 22:16:23 +0200 From: Alessandro Orticoni To: fieldtrip at science.ru.nl Subject: [FieldTrip] [Fieldtrip] Power spectrum units and Error in ft_topoplotER Message-ID: Content-Type: text/plain; charset="utf-8" Dear all, I would have two questions. *1)* First one is about ft_freqanalysis: which are the units of the output, given the cfg.output='pow' and the EEG data in uV? *2)* The second one is about the topoplot. I'm trying to plot the power spectrum over the following six channels (I created the following .lay file): 1 -0.186808 0.232745 0.125128 0.093849 F3 2 0.186808 0.232745 0.125128 0.093849 F4 3 -0.225000 0.000046 0.125128 0.093849 C3 4 0.225000 0.000046 0.125128 0.093849 C4 5 -0.139045 -0.427979 0.125128 0.093849 O1 6 0.139045 -0.427979 0.125128 0.093849 O2 This is the code I wrote to try to plot it: freq_EEG_append = freq_EEG{1}{1}; % Just one sleep stage for i=2:6 % Length(selchan) freq_EEG_append.label{i,1} = freq_EEG{1}{i}.label; freq_EEG_append.powspctrmft_sin(i,:) = freq_EEG{1}{i}.powspctrm; freq_EEG_append.cfg.channel{i,1} = freq_EEG{1}{i}.cfg.channel; end cfg = []; % cfg.xlim = [0.3 0.5]; % cfg.zlim = [0 6e-14]; cfg.layout = 'EEGCap.lay'; cfg.parameter = 'individual'; figure; ft_topoplotER(cfg,freq_EEG_append); colorbar; In the first part of the code, I created the struct freq_EEG_append collecting the data from freq_EEG, a 1x4 cell (four sleep stages) array whose elements (still cell array) contains six structures (six channels), each resulting from the application of the ft_freqanalysis. freq_EEG_append = struct with fields: label: {6×1 cell} dimord: 'chan_freq' freq: [1×1121 double] powspctrm: [6×1121 double] cfg: [1×1 struct] But I'm getting the following error: Error using cell/unique (line 85) Input A must be a cell array of character vectors. Error in ft_channelselection (line 107) if length(datachannel)~=length(unique(datachannel)) Error in ft_prepare_layout (line 234) cfg.channel = ft_channelselection(cfg.channel, data.label); Error in ft_topoplotER (line 209) cfg.layout = ft_prepare_layout(tmpcfg, varargin{1}); Thanks in advance for your help. Best, Alessandro Orticoni From alessandro.orticoni at gmail.com Tue Sep 4 19:44:32 2018 From: alessandro.orticoni at gmail.com (Alessandro Orticoni) Date: Tue, 4 Sep 2018 19:44:32 +0200 Subject: [FieldTrip] [Fieldtrip] Power spectrum units and Error in ft_topoplotER In-Reply-To: <3FC79061C73BEF44A3BEDA5DFC0ADBDFDE3BC87A@exprd01.hosting.ru.nl> References: <3FC79061C73BEF44A3BEDA5DFC0ADBDFDE3BC87A@exprd01.hosting.ru.nl> Message-ID: Hi Mats, Thanks a lot, you're right, now it works. Yeah, I didn't apply any kind of transformation, I just used the ft_freqanalysis and applied it to the data. Thanks again. Best, Alessandro Orticoni Il giorno mar 4 set 2018 alle ore 15:35 Es, M.W.J. van (Mats) < M.vanEs at donders.ru.nl> ha scritto: > > Hi Alessandro, > > Power is the square of the magnitude of your signal. Since your signal is > in uV, the units of power would be (uV)^2. Note that this only holds if you > have not applied any transformations (like normalizations) to your raw data > or power values. Relating to your second question, I think your > specification of the label structure is wrong. Try replacing the first {} > brackets in > freq_EEG_append.label{i,1} = freq_EEG{1}{i}.label; > with normal brackets (): > freq_EEG_append.label(i,1) = freq_EEG{1}{i}.label; > > Hope that helps. > > Best, > Mats van Es > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 3 Sep 2018 22:16:23 +0200 > From: Alessandro Orticoni > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] [Fieldtrip] Power spectrum units and Error in > ft_topoplotER > Message-ID: > < > CACwO6W8rSrzq3Vsp8sZNNvcPQ3np9cMw-tPiEBgbePPVqD5zPw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Dear all, > > I would have two questions. > > *1)* First one is about ft_freqanalysis: which are the units of the > output, given the cfg.output='pow' and the EEG data in uV? > > *2)* The second one is about the topoplot. I'm trying to plot the power > spectrum over the following six channels (I created the following .lay > file): > > 1 -0.186808 0.232745 0.125128 0.093849 F3 > 2 0.186808 0.232745 0.125128 0.093849 F4 > 3 -0.225000 0.000046 0.125128 0.093849 C3 > 4 0.225000 0.000046 0.125128 0.093849 C4 > 5 -0.139045 -0.427979 0.125128 0.093849 O1 > 6 0.139045 -0.427979 0.125128 0.093849 O2 > > This is the code I wrote to try to plot it: > > freq_EEG_append = freq_EEG{1}{1}; % Just one sleep stage > > for i=2:6 % Length(selchan) > freq_EEG_append.label{i,1} = freq_EEG{1}{i}.label; > freq_EEG_append.powspctrmft_sin(i,:) = freq_EEG{1}{i}.powspctrm; > freq_EEG_append.cfg.channel{i,1} = freq_EEG{1}{i}.cfg.channel; end > > cfg = []; > % cfg.xlim = [0.3 0.5]; > % cfg.zlim = [0 6e-14]; > cfg.layout = 'EEGCap.lay'; > cfg.parameter = 'individual'; > figure; > ft_topoplotER(cfg,freq_EEG_append); > colorbar; > > In the first part of the code, I created the struct freq_EEG_append > collecting the data from freq_EEG, a 1x4 cell (four sleep stages) array > whose elements (still cell array) contains six structures (six channels), > each resulting from the application of the ft_freqanalysis. > > freq_EEG_append = > > struct with fields: > label: {6×1 cell} > dimord: 'chan_freq' > freq: [1×1121 double] > powspctrm: [6×1121 double] > cfg: [1×1 struct] > > But I'm getting the following error: > > Error using cell/unique (line 85) > Input A must be a cell array of character vectors. > > Error in ft_channelselection (line 107) > if length(datachannel)~=length(unique(datachannel)) > > Error in ft_prepare_layout (line 234) > cfg.channel = ft_channelselection(cfg.channel, data.label); > > Error in ft_topoplotER (line 209) > cfg.layout = ft_prepare_layout(tmpcfg, varargin{1}); > > > Thanks in advance for your help. > > > Best, > Alessandro Orticoni > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From alessandro.orticoni at gmail.com Tue Sep 4 19:59:18 2018 From: alessandro.orticoni at gmail.com (Alessandro Orticoni) Date: Tue, 4 Sep 2018 19:59:18 +0200 Subject: [FieldTrip] ft_topoplotER layout Message-ID: Dear FieldTrip team, I have another question, regarding the layout used for the power spectrum plot. I'm using the following .lay file (I wrote that -0.2 on purpose): 1 -0.07 0.232745 0.125128 0.093849 F3 2 0.07 0.232745 0.125128 0.093849 F4 3 -0.2 0.000046 0.125128 0.093849 C3 4 0.09 0.000046 0.125128 0.093849 C4 5 -0.07 -0.427979 0.125128 0.093849 O1 6 0.07 -0.427979 0.125128 0.093849 O2 [image: untitled.jpg] The Frontal and the Occipital channels are in the right positions, but when I try to move the C3 towards the center too (changing -0.2 in -0.09), also the other channels move: [image: untitled.jpg] What should I change to have them in the correct position? Thanks again. Best, Alessandro Orticoni -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: untitled.jpg Type: image/jpeg Size: 23650 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: untitled.jpg Type: image/jpeg Size: 20294 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Tue Sep 4 20:04:09 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 4 Sep 2018 18:04:09 +0000 Subject: [FieldTrip] Error in ft_mvaranalysis In-Reply-To: References: Message-ID: Hi Manuela, The code in ft_mvaranalysis (at least the part that is supposed to support the time-resolved models) is a bit messy. I patched it for now, making the function a bit more robust with respect to rounding off errors in the conversion between sample indices and time windows. I hope that the newer version now works for you. Best wishes, Jan-Mathijs On 4 Sep 2018, at 10:42, Manuela Costa > wrote: Dear Jan-Mathijs, thank you very much for fixing the typo in the code. I do not get anymore the same error but as you predicted I get a new one. I hope you can help me with that as well. Best wishes Manuela Matrix dimensions must agree. Error in ft_mvaranalysis>catnan (line 607) datamatrix(:,begsmp:endsmp) = datacells{trials(k)}(chanindx,:).*taper(ones(nchan,1),:); Error in ft_mvaranalysis (line 425) dat = catnan(tmpdata.trial, chanindx, rpt{rlop}, tap(m,:), nnans, dobvar); Error in Step2_Calculate_Granger_time_freq_updated_MC (line 124) mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, preprocessing_emotional_Rem_ds{subj}); I copy here the information about the structure (it's the same as before) The data is downsampled at 250 Hz. The fields of my data structure are fsample, trial, time, label and cfg. The size of preprocessing_emotional_Rem_ds{1}.trial{1} is 3x3751 (channels, data points). Configuration structure: cfg = []; cfg.toolbox = 'bsmart'; cfg.order = 10; cfg.toi = -0.5:0.01:3; %% the time points at which the windows are centered cfg.t_ftimwin = 0.25; %% length of time window in second mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, preprocessing_emotional_Rem_ds{subj}); 2018-08-31 11:32 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) >: Dear Manuela, This looks like a typo in the code, which I will fix (and once fixed will become available in the daily release version of the code). To give myself some time: probably not tonight, but perhaps after the weekend :). However, the fact that this part of the code clearly doesn’t work, I am not entirely sure whether the rest will work smoothly as well, as soon as the current hurdle is fixed. But let’s see Best wishes, Jan-Mathijs On 29 Aug 2018, at 13:34, Manuela Costa > wrote: Dear community, I'm planning to do granger causality analysis on human iEEG data. I'm using ft_mvaranalysis to get time-dependent coefficient sets based on a sliding window, but I get an error. The data is downsampled at 250 Hz. The fields of my data structure are fsample, trial, time, label and cfg. The size of preprocessing_emotional_Rem_ds{1}.trial{1} is 3x3751 (channels, data points). Below is the configuration structure and the error message. The ft_mvaranalysis function works if I do not use the sliding window approach. I tried to use different cfg.toi and cfg.t_ftimwin but I could not find a solution. I hope you can help me. Best wishes, Manuela Costa Configuration structure: cfg = []; cfg.toolbox = 'bsmart'; cfg.order = 10; cfg.toi = -0.5:0.01:3; %% the time points at which the windows are centered cfg.t_ftimwin = 0.25; %% length of time window in second mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, preprocessing_emotional_Rem_ds{subj}); Error message: Matrix dimensions must agree. Error in ft_mvaranalysis (line 185) latency(k,:) = cfg.toi + cfg.t_ftimwin.*[-0.5 0.5]; Error in Step2_Calculate_Granger_time_freq(line 108) mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg,preprocessing_emotional_Rem_ds{subj}); _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikexcohen at gmail.com Tue Sep 4 18:40:54 2018 From: mikexcohen at gmail.com (Mike X Cohen) Date: Tue, 4 Sep 2018 18:40:54 +0200 Subject: [FieldTrip] New online courses on linear algebra, signal processing, and programming Message-ID: Dear colleagues, Over the past year, I've been working on a growing collection of online courses (linked from sincxpress.com) that can be used in formal university classes or for self-learning. All together, there is currently >120 hours of video instruction as well as many many thousands of lines of MATLAB and Python code, suitable for teaching and for adaptation to data analysis. Current course topics include: - Introduction to MATLAB programming - Advanced problem-solving in MATLAB - Linear algebra (MATLAB and Python) - Advanced linear algebra applications in neuroscience (MATLAB) - Fourier transform (MATLAB and Python) - Neural signal processing, time-frequency analysis, and statistics (MATLAB) I will be adding more courses over the next months/years, and they will all be linked from sincxpress.com. I hope you find this educational material useful for you, your colleagues, and your students. Sincerely, Mike -- Mike X Cohen, PhD Fresh look: mikexcohen.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From nico.boehler at ugent.be Wed Sep 5 10:24:36 2018 From: nico.boehler at ugent.be (=?iso-8859-1?Q?Nico_B=F6hler?=) Date: Wed, 5 Sep 2018 08:24:36 +0000 Subject: [FieldTrip] 2.5-3 year postdoc position on attentional control and visuomotor integration using EEG Message-ID: <1536135904559.50450@ugent.be> ** Apologies for possible multiple postings ** We seek a highly motivated full-time postdoc in the context of a European collaborative project (FLAG-ERA JTC 2017 associated to the Human Brain Project; https://www.flagera.eu/flag-era-calls/jtc-2017/projects/) called: "MAC-Brain - Developing a Multi-scale account of Attentional Control as the constraining interface between vision and action: A cross-species investigation of relevant neural circuits in the human and macaque Brain". The present position will be mainly based in the lab of Nico Boehler at Ghent University, Belgium, but a strong collaboration, possibly including research stays, is planned with the other principal investigators of the project (Leonardo Chelazzi, University of Verona, Italy; Suliann Ben Hamed, CNRS, Lyon, France; Emiliano Macaluso, INSERM, Lyon, France). The topic of the project revolves around the interaction of various attentional control signals (cueing, statistical learning, value etc.), as well as their downstream integration with motor processes. Across the different partners, this topic will be investigated at different levels (ranging from cell recordings over EEG to fMRI) in different species (humans and non-human primates) with a strong focus on integrating information across these different levels. The present position will focus on EEG measures with possible extensions to TMS-EEG and/or eyetracking in human participants. The duration of the position is between 2.5 and 3 years. The planned starting date is January 2019, but slight variations are possible. Experience with EEG (or MEG) and a background in attentional control or related topics is expected, experience with TMS or eyetracking would be an asset. For applying, please send a CV (including two email addresses of referees) and a motivation letter to Nico Boehler (nico.boehler at ugent.be), whom you can also contact for further information on the project or details about the position. The deadline for applications is October 15, 2018.? -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom.marshall at psy.ox.ac.uk Wed Sep 5 12:38:04 2018 From: tom.marshall at psy.ox.ac.uk (Tom Marshall) Date: Wed, 5 Sep 2018 10:38:04 +0000 Subject: [FieldTrip] Combining ROI mask and functional mask in ft_sourceplot not working In-Reply-To: References: Message-ID: Hi Hame, This is not official fieldtrip code, but I wrote a little tutorial for combining multiple masks that might be helpful to you. You can find it here. Best, Tom ________________________________ From: fieldtrip on behalf of Hame Park Sent: 04 September 2018 11:15 To: FieldTrip discussion list Subject: [FieldTrip] Combining ROI mask and functional mask in ft_sourceplot not working Hello, I want to use two masks; one from based on my data and one based on the atlas. when set separately, it works fine. However, when I use them both, the ROI mask does not apply. I looked into the code and it seems (to me) the mask is indeed combined at one point, but it is not applied in the final stage.. Any advice, comments would be much appreciated! Thank you. Best wishes, Hame -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Sep 5 15:25:30 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 5 Sep 2018 13:25:30 +0000 Subject: [FieldTrip] A white paper on Best Practices in Data Analysis and Sharing in Neuroimaging using MEEG Message-ID: <4143DE9D-C443-42B7-9953-AD0C015A69EA@donders.ru.nl> Dear FieldTrip community, As member of the Committee for Best Practices in Data Analysis and Sharing (COBIDAS) for MEEG, I’d like to invite you all to contribute to the committee’s endeavour to draft a (widely supported) white paper on said Best Practices. See below for an invitation e-mail by the committee’s chairs, and additional information about the process. 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 ____________________________________________________ To: The Fieldtrip Community From: The Organization from Human Brain Mapping [OHBM] Cobidas MEEG Co-Chairs Details of the COBIDAS MEEG white paper were presented at the Organization for Human Brain Mapping [OHBM] General Assembly meeting in Singapore in June 2018. An OHBM Committee co-chaired by Aina Puce & Cyril Pernet has drafted an initial version of the white paper - after soliciting input from around 100 volunteers from the OHBM community. We are at the next phase of work on the white paper, which involves public comments from the OHBM & wider scientific community. Sections of the COBIDAS MEEG white paper have now been posted as a series of blog posts [https://cobidasmeeg.wordpress.com/], where comments or questions/queries can be left at the end of each blog post. A preprint has also been uploaded on the Open Science Framework of this first version [https://osf.io/a8dhx]. We are hoping that members of the FieldTrip community will also participate in giving feedback on the document during the comment period, which runs from August 2018 until the end of November 2018. Each section of the document was posted in a blog post and accepts comments. Aina & Cyril will monitor the blog & also try and answer questions as they arise. After the end of the comment period we will incorporate the comments/edits to an updated document that will be circulated to the COBIDAS MEEG committee for final editing. We hope to post the white paper to the OHBM website as well as the updated pre-print early in 2019 & give a progress report to OHBM Council and the Membership at the next OHBM General Assembly in Rome in June 2019. Aina Puce & Cyril Pernet, OHBM COBIDAS MEEG Committee, Co-Chairs Indiana University & University of Edinburgh email: ainapuce at indiana.edu email: cyril.pernet at ed.ac.uk ____________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew.dimitrijevic at sunnybrook.ca Wed Sep 5 18:08:23 2018 From: andrew.dimitrijevic at sunnybrook.ca (Dimitrijevic, Andrew) Date: Wed, 5 Sep 2018 16:08:23 +0000 Subject: [FieldTrip] Postdoc position in Toronto - Cochlear Implants and Brain Computer Interfaces Message-ID: Dear FieldTrippers A postdoctoral position is available at the Sunnybrook Cochlear Implant Lab in Toronto Canada. Specifically we are looking for people who have experience with brain computer interfaces (BCIs). Interested applicants should contact Andrew at: andrew.dimitrijevic at sunnybrook.ca Cheers andrew Andrew Dimitrijevic, PhD Research Director of the Cochlear Implant Program Sunnybrook Health Science Centre Assistant Professor Department of Otolaryngology - Head and Neck Surgery Faculty of Medicine, University of Toronto 2075 Bayview Ave., Room M1 102 Toronto, ON, M4N 3M5 Office Tel: 416-480-6100 x4894 Lab Tel: 416-480-6100 x7771 https://www.researchgate.net/lab/Cochlear-Implant-Lab-Andrew-Dimitrijevic https://scholar.google.ca/citations?user=VYt9GCIAAAAJ&hl=en This e-mail is intended only for the named recipient(s) and may contain confidential, personal and/or health information (information which may be subject to legal restrictions on use, retention and/or disclosure). No waiver of confidence is intended by virtue of communication via the internet. Any review or distribution by anyone other than the person(s) for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and destroy all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From manuela.costa at ctb.upm.es Thu Sep 6 14:37:55 2018 From: manuela.costa at ctb.upm.es (Manuela Costa) Date: Thu, 6 Sep 2018 14:37:55 +0200 Subject: [FieldTrip] Error in ft_mvaranalysis In-Reply-To: References: Message-ID: Hi Jan-Mathijs, the new version of ft_mvaranalysis now works for me. Thank you for your work Best wishes Manuela 2018-09-04 20:04 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl>: > Hi Manuela, > > The code in ft_mvaranalysis (at least the part that is supposed to support > the time-resolved models) is a bit messy. I patched it for now, making the > function a bit more robust with respect to rounding off errors in the > conversion between sample indices and time windows. I hope that the newer > version now works for you. > > Best wishes, > Jan-Mathijs > > > On 4 Sep 2018, at 10:42, Manuela Costa wrote: > > Dear Jan-Mathijs, > > thank you very much for fixing the typo in the code. > I do not get anymore the same error but as you predicted I get a new one. > I hope you can help me with that as well. > > Best wishes > Manuela > > > Matrix dimensions must agree. > > Error in ft_mvaranalysis>catnan (line 607) > datamatrix(:,begsmp:endsmp) = datacells{trials(k)}(chanindx, > :).*taper(ones(nchan,1),:); > > Error in ft_mvaranalysis (line 425) > dat = catnan(tmpdata.trial, chanindx, rpt{rlop}, tap(m,:), nnans, dobvar); > > Error in Step2_Calculate_Granger_time_freq_updated_MC (line 124) > mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, > preprocessing_emotional_Rem_ds{subj}); > > > I copy here the information about the structure (it's the same as before) > > The data is downsampled at 250 Hz. The fields of my data structure are > fsample, trial, time, label and cfg. The size of > preprocessing_emotional_Rem_ds{1}.trial{1} is 3x3751 (channels, data > points). > > Configuration structure: > > > cfg = []; > cfg.toolbox = 'bsmart'; > cfg.order = 10; > cfg.toi = -0.5:0.01:3; %% the time points at which the windows > are centered > cfg.t_ftimwin = 0.25; %% length of time window in second > mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, > preprocessing_emotional_Rem_ds{subj}); > > > 2018-08-31 11:32 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl>: > >> Dear Manuela, >> >> This looks like a typo in the code, which I will fix (and once fixed will >> become available in the daily release version of the code). To give myself >> some time: probably not tonight, but perhaps after the weekend :). However, >> the fact that this part of the code clearly doesn’t work, I am not entirely >> sure whether the rest will work smoothly as well, as soon as the current >> hurdle is fixed. But let’s see >> >> Best wishes, >> Jan-Mathijs >> >> >> On 29 Aug 2018, at 13:34, Manuela Costa wrote: >> >> Dear community, >> >> >> I'm planning to do granger causality analysis on human iEEG data. I'm >> using ft_mvaranalysis to get time-dependent coefficient sets based on a >> sliding window, but I get an error. >> >> The data is downsampled at 250 Hz. The fields of my data structure are >> fsample, trial, time, label and cfg. The size of >> preprocessing_emotional_Rem_ds{1}.trial{1} is 3x3751 (channels, data >> points). Below is the configuration structure and the error message. The >> ft_mvaranalysis function works if I do not use the sliding window approach. >> I tried to use different cfg.toi and cfg.t_ftimwin but I could not find a >> solution. I hope you can help me. >> >> >> Best wishes, >> >> >> Manuela Costa >> >> >> Configuration structure: >> >> >> cfg = []; >> cfg.toolbox = 'bsmart'; >> cfg.order = 10; >> cfg.toi = -0.5:0.01:3; %% the time points at which the windows >> are centered >> cfg.t_ftimwin = 0.25; %% length of time window in second >> mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg, >> preprocessing_emotional_Rem_ds{subj}); >> >> >> >> >> >> >> >> Error message: >> >> >> >> >> Matrix dimensions must agree. >> >> >> Error in ft_mvaranalysis (line 185) >> latency(k,:) = cfg.toi + cfg.t_ftimwin.*[-0.5 0.5]; >> >> >> Error in Step2_Calculate_Granger_time_freq(line 108) >> mdata_emotional_Rem{subj} = ft_mvaranalysis(cfg,preprocess >> ing_emotional_Rem_ds{subj}); >> >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> >> > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kamiakavi at gmail.com Thu Sep 6 16:34:58 2018 From: kamiakavi at gmail.com (Kamia Kavi) Date: Thu, 6 Sep 2018 16:34:58 +0200 Subject: [FieldTrip] Nonparametric Satatics Based on "Blair and Karniski 1993" Using FieldTrip Message-ID: Dear FieldTrip-ers, Is there an option in FirldTrip to perform a non-parametric statistics as described in Blair and Karniski 1993? Best wishes, Kamia -------------- next part -------------- An HTML attachment was scrubbed... URL: From samranasghar at gmail.com Thu Sep 6 18:01:45 2018 From: samranasghar at gmail.com (Samran) Date: Thu, 6 Sep 2018 18:01:45 +0200 Subject: [FieldTrip] Cluster-based permutation tests on ERPs 2x2 ANOVA interaction interpretation and post-hoc analysis Message-ID: Hi, I am trying to see effects of a treatment using ERPs. Each person participated in two interventions, where EEG was recorded before and after each intervention. So, I have a repeated measures two-way ANOVA design where treatment (2 levels: Placebo, Active) and session (2 levels: pre-, post-) are the two factors. I have read the tutorials on using Cluster-based permutation tests on event related fields ( http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock), how to test interaction effect ( http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests), and https://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html by Eric Maris on how to test main and interaction effects of a 2x2 within-subjects design. I have selected a time period a-priori where I want to check the differences. I was wondering, if I get significant differences in the interaction, how can I do the post-hoc tests to identify which treatment made the difference, and if the pre-sessions are similar? Thanks. -- Regards, M. Samran Navid. -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Thu Sep 6 18:46:03 2018 From: david.m.groppe at gmail.com (David Groppe) Date: Thu, 6 Sep 2018 12:46:03 -0400 Subject: [FieldTrip] Nonparametric Satatics Based on "Blair and Karniski 1993" Using FieldTrip In-Reply-To: References: Message-ID: Hi Kamia, The cluster-based permutation test implemented by FieldTrip is similar to the Blair & Karniski method: http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock If you set the parameters of the test such that no timepoint/electrode has any neighbours (i.e., you can't form any clusters), than it is equivalent to the Blair & Karniski method. For an explanation of how the cluster-based test differs from Blair & Karniski, I cover that in this review/tutorial paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4060794/ cheers, -David On Thu, Sep 6, 2018 at 10:36 AM Kamia Kavi wrote: > Dear FieldTrip-ers, > > Is there an option in FirldTrip to perform a non-parametric statistics as > described in Blair and Karniski 1993? > > Best wishes, > > Kamia > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kamiakavi at gmail.com Thu Sep 6 20:55:56 2018 From: kamiakavi at gmail.com (Kamia Kavi) Date: Thu, 6 Sep 2018 20:55:56 +0200 Subject: [FieldTrip] Nonparametric Satatics Based on "Blair and Karniski 1993" Using FieldTrip In-Reply-To: References: Message-ID: Hey David, Thank you very much for your tip as well as your paper. I printed that and will read it tomorrow. Two follow-up questions: 1) So, to not cluster the timepoints/channels, is it enough the change the ‘cfg.correcm’ parameter from ‘cluster’ to ‘no’ and leave the other parameters unchanged? 2) if cfg.correctm = ‘no’ (and, of course, using cfg.method = 'montecarlo'), are significant values (i.e., ones rather than zeros) in stat.mask logical matrix already corrected for multiple comparisons? In other words, can these ‘ones’ in the matrix be considered as statically significant channel/timepoints between two conditions at a certain critical value? Best wishes, Kamia On Thu, Sep 6, 2018 at 7:35 PM David Groppe wrote: > Hi Kamia, > The cluster-based permutation test implemented by FieldTrip is similar > to the Blair & Karniski method: > > http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock > > If you set the parameters of the test such that no timepoint/electrode has > any neighbours (i.e., you can't form any clusters), than it is equivalent > to the Blair & Karniski method. > > For an explanation of how the cluster-based test differs from Blair & > Karniski, I cover that in this review/tutorial paper: > > https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4060794/ > > cheers, > -David > > > > On Thu, Sep 6, 2018 at 10:36 AM Kamia Kavi wrote: > >> Dear FieldTrip-ers, >> >> Is there an option in FirldTrip to perform a non-parametric statistics as >> described in Blair and Karniski 1993? >> >> Best wishes, >> >> Kamia >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From athierfelder at tuebingen.mpg.de Fri Sep 7 12:50:04 2018 From: athierfelder at tuebingen.mpg.de (Annika Thierfelder) Date: Fri, 7 Sep 2018 12:50:04 +0200 Subject: [FieldTrip] head- and sourcemodel templates Message-ID: <54561e76-e731-6536-41aa-0684125a9c52@tuebingen.mpg.de> Dear fieldtrippers, I have a short question about the template files provided by fieldtrip. I am doing MNE source reconstruction with the template BEM headmodel and the cortical sheets provided in the sourcemodel templates. However, I noticed that the sourcemodel is outside of the BEM brain surface at some points. So I plotted it against the MRI template and it doesn't really seem to fit. It seems quite small and shifted, so it's hard to judge the shape. Are those not produced from the same template MRI? And would it therefore make sense to go through the process of producing a sourcemodel from the standard MRI myself as described here [http://www.fieldtriptoolbox.org/tutorial/sourcemodel#construction_of_a_source_model_based_on_a_surface_description_of_the_cortical_sheet] ? Thanks in advance for your advice, Best, Annika From david.m.groppe at gmail.com Fri Sep 7 15:37:57 2018 From: david.m.groppe at gmail.com (David Groppe) Date: Fri, 7 Sep 2018 09:37:57 -0400 Subject: [FieldTrip] Nonparametric Satatics Based on "Blair and Karniski 1993" Using FieldTrip In-Reply-To: References: Message-ID: What you would need to do Kamia is to set the neighbors matrix to the identity matrix: neighbours = ft_prepare_neighbours(cfg_neighb, dataFC_LP); That function is described here: http://www.fieldtriptoolbox.org/reference/ft_prepare_neighbours And I was wrong with what I initially told you. This will still cluster variables across time within single electrodes, so it is not equivalent to the Blair & Karniski test. I don't know if there is a way to prevent any clustering at all in FieldTrip (perhaps set the neighbour matrix to all zeros?). I have some MATLAB code that implements the Blair & Karniski method: https://www.mathworks.com/matlabcentral/fileexchange/54585-mult_comp_perm_t2-data1-data2-n_perm-tail-alpha_level-mu-t_stat-reports-seed_state?s_tid=prof_contriblnk https://www.mathworks.com/matlabcentral/fileexchange/29782-mult_comp_perm_t1-data-n_perm-tail-alpha_level-mu-reports-seed_state?s_tid=prof_contriblnk That might be easier to use. It is part of a toolbox for ERP analysis that may be useful if you're working with ERPs: https://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox cheers, -David On Thu, Sep 6, 2018 at 3:35 PM Kamia Kavi wrote: > Hey David, > > > > Thank you very much for your tip as well as your paper. I printed that and > will read it tomorrow. > > > > Two follow-up questions: > > 1) So, to not cluster the timepoints/channels, is it enough the change the > ‘cfg.correcm’ parameter from ‘cluster’ to ‘no’ and leave the other > parameters unchanged? > > > > 2) if cfg.correctm = ‘no’ (and, of course, using cfg.method = > 'montecarlo'), are significant values (i.e., ones rather than zeros) in > stat.mask logical matrix already corrected for multiple comparisons? In > other words, can these ‘ones’ in the matrix be considered as statically > significant channel/timepoints between two conditions at a certain critical > value? > > > > Best wishes, > > > > Kamia > > On Thu, Sep 6, 2018 at 7:35 PM David Groppe > wrote: > >> Hi Kamia, >> The cluster-based permutation test implemented by FieldTrip is similar >> to the Blair & Karniski method: >> >> http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock >> >> If you set the parameters of the test such that no timepoint/electrode >> has any neighbours (i.e., you can't form any clusters), than it is >> equivalent to the Blair & Karniski method. >> >> For an explanation of how the cluster-based test differs from Blair & >> Karniski, I cover that in this review/tutorial paper: >> >> https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4060794/ >> >> cheers, >> -David >> >> >> >> On Thu, Sep 6, 2018 at 10:36 AM Kamia Kavi wrote: >> >>> Dear FieldTrip-ers, >>> >>> Is there an option in FirldTrip to perform a non-parametric statistics >>> as described in Blair and Karniski 1993? >>> >>> Best wishes, >>> >>> Kamia >>> _______________________________________________ >>> fieldtrip mailing list >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> https://doi.org/10.1371/journal.pcbi.1002202 >>> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From raphaelguex at yahoo.fr Fri Sep 7 16:19:22 2018 From: raphaelguex at yahoo.fr (Raphael Guex) Date: Fri, 7 Sep 2018 14:19:22 +0000 (UTC) Subject: [FieldTrip] Nonparametric Satatics Based on "Blair and Karniski 1993" Using FieldTrip In-Reply-To: References: Message-ID: <769480402.1660117.1536329962993@mail.yahoo.com> Hello Kamia Two follow-up questions: 1) So, to not cluster the timepoints/channels, is it enough the change the ‘cfg.correcm’ parameter from ‘cluster’ to ‘no’ and leave the other parameters unchanged?  > yes i think it is.  2) if cfg.correctm = ‘no’ (and, of course, using cfg.method = 'montecarlo'), are significant values (i.e., ones rather than zeros) in stat.mask logical matrix already corrected for multiple comparisons? In other words, can these ‘ones’ in the matrix be considered as statically significant channel/timepoints between two conditions at a certain critical value?>no it is not corrected then for multiple corrections. yes, the ones are significant. good luckraphael Le jeudi 6 septembre 2018 à 21:21:00 UTC+2, Kamia Kavi a écrit : Hey David,   Thank you very much for your tip as well as your paper. Iprinted that and will read it tomorrow.   Two follow-up questions: 1) So, to not cluster the timepoints/channels, is it enoughthe change the ‘cfg.correcm’ parameter from ‘cluster’ to ‘no’ and leave theother parameters unchanged?   2) if cfg.correctm = ‘no’ (and, of course, using cfg.method= 'montecarlo'), are significant values (i.e., ones rather than zeros) in stat.masklogical matrix already corrected for multiple comparisons? In other words, canthese ‘ones’ in the matrix be considered as statically significant channel/timepointsbetween two conditions at a certain critical value?   Best wishes,   Kamia On Thu, Sep 6, 2018 at 7:35 PM David Groppe wrote: Hi Kamia,   The cluster-based permutation test implemented by FieldTrip is similar to the Blair & Karniski method: http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock If you set the parameters of the test such that no timepoint/electrode has any neighbours (i.e., you can't form any clusters), than it is equivalent to the Blair & Karniski method. For an explanation of how the cluster-based test differs from Blair & Karniski, I cover that in this review/tutorial paper: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4060794/ cheers,   -David On Thu, Sep 6, 2018 at 10:36 AM Kamia Kavi wrote: Dear FieldTrip-ers, Is there an option in FirldTrip to perform a non-parametric statistics as described in Blair and Karniski 1993? Best wishes, Kamia_______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kamiakavi at gmail.com Fri Sep 7 19:17:12 2018 From: kamiakavi at gmail.com (Kamia Kavi) Date: Fri, 7 Sep 2018 19:17:12 +0200 Subject: [FieldTrip] Nonparametric Satatics Based on "Blair and Karniski 1993" Using FieldTrip In-Reply-To: References: Message-ID: Dear David, Thanks for the info. I've fiddled with FieldTrip a bit and I think (but I'm not sure) that if cfg.correctm is set to any option other than 'cluster', it does not cluster across times and channels. But I'm still not sure what option for cfg.correctm will run Blair&Karniski method. Thanks for the code and the toolbox. I will check my data later with your toolbox as well. Best wishes, Kamia On Fri, Sep 7, 2018 at 4:35 PM David Groppe wrote: > What you would need to do Kamia is to set the neighbors matrix to the > identity matrix: > > neighbours = ft_prepare_neighbours(cfg_neighb, dataFC_LP); > > That function is described here: > http://www.fieldtriptoolbox.org/reference/ft_prepare_neighbours > > > And I was wrong with what I initially told you. This will still cluster > variables across time within single electrodes, so it is not equivalent to > the Blair & Karniski test. I don't know if there is a way to prevent any > clustering at all in FieldTrip (perhaps set the neighbour matrix to all > zeros?). > > I have some MATLAB code that implements the Blair & Karniski method: > > > https://www.mathworks.com/matlabcentral/fileexchange/54585-mult_comp_perm_t2-data1-data2-n_perm-tail-alpha_level-mu-t_stat-reports-seed_state?s_tid=prof_contriblnk > > > https://www.mathworks.com/matlabcentral/fileexchange/29782-mult_comp_perm_t1-data-n_perm-tail-alpha_level-mu-reports-seed_state?s_tid=prof_contriblnk > > That might be easier to use. It is part of a toolbox for ERP analysis that > may be useful if you're working with ERPs: > https://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox > > cheers, > -David > > > > On Thu, Sep 6, 2018 at 3:35 PM Kamia Kavi wrote: > >> Hey David, >> >> >> >> Thank you very much for your tip as well as your paper. I printed that >> and will read it tomorrow. >> >> >> >> Two follow-up questions: >> >> 1) So, to not cluster the timepoints/channels, is it enough the change >> the ‘cfg.correcm’ parameter from ‘cluster’ to ‘no’ and leave the other >> parameters unchanged? >> >> >> >> 2) if cfg.correctm = ‘no’ (and, of course, using cfg.method = >> 'montecarlo'), are significant values (i.e., ones rather than zeros) in >> stat.mask logical matrix already corrected for multiple comparisons? In >> other words, can these ‘ones’ in the matrix be considered as statically >> significant channel/timepoints between two conditions at a certain critical >> value? >> >> >> >> Best wishes, >> >> >> >> Kamia >> >> On Thu, Sep 6, 2018 at 7:35 PM David Groppe >> wrote: >> >>> Hi Kamia, >>> The cluster-based permutation test implemented by FieldTrip is >>> similar to the Blair & Karniski method: >>> >>> http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock >>> >>> If you set the parameters of the test such that no timepoint/electrode >>> has any neighbours (i.e., you can't form any clusters), than it is >>> equivalent to the Blair & Karniski method. >>> >>> For an explanation of how the cluster-based test differs from Blair & >>> Karniski, I cover that in this review/tutorial paper: >>> >>> https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4060794/ >>> >>> cheers, >>> -David >>> >>> >>> >>> On Thu, Sep 6, 2018 at 10:36 AM Kamia Kavi wrote: >>> >>>> Dear FieldTrip-ers, >>>> >>>> Is there an option in FirldTrip to perform a non-parametric statistics >>>> as described in Blair and Karniski 1993? >>>> >>>> Best wishes, >>>> >>>> Kamia >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> https://doi.org/10.1371/journal.pcbi.1002202 >>>> >>> _______________________________________________ >>> fieldtrip mailing list >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> https://doi.org/10.1371/journal.pcbi.1002202 >>> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 >> > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Sat Sep 8 15:18:24 2018 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sat, 8 Sep 2018 13:18:24 +0000 Subject: [FieldTrip] Cognitive Neuroscience Position Message-ID: ASSISTANT PROFESSOR IN COGNITIVE NEUROSCIENCE UNIVERSITY OF SOUTH CAROLINA COLUMBIA, SOUTH CAROLINA The University of South Carolina (www.sc.edu) invites applications for a tenure-track faculty position at the rank of assistant professor in the area of cognitive neuroscience to begin August 16, 2019. Cognitive neuroscience is an area of strength within the department and has strong infrastructural support. We seek candidates with a research focus in executive function, aging, or human memory, to complement existing strengths in the Department in areas such as attention, language, and decision making. Successful candidates will be expected to make significant contributions to scholarship in their area of expertise within cognitive neuroscience, mentor graduate students, and teach courses in cognitive neuroscience, cognition, and related areas at both undergraduate and graduate levels. The candidate will take advantage of at least one of the cutting-edge technologies available in the Department (f/MRI, TMS, tDCS, eye tracking, EEG, patient/lesion studies). The department is seeking applicants with a strong record of scholarship, the potential for procuring grant funding, and an interest in collaborative work. A rich potential for collaborative and interdisciplinary connections exists through the McCausland Center for Brain Imaging, the Institute for Mind and Brain, the Center for the Study of Aphasia Recovery, and the Dorn V.A. Hospital. Ample laboratory space for the candidate is available at the Institute of Mind and Brain. Applicants must hold a doctoral degree in psychology or a related field at the time of appointment. Psychology (http://www.psych.sc.edu/) is one of the top departments in the College of Arts and Sciences, with one endowed chair, five named professors, four AAAS fellows, six APA fellows and four current or past presidents of national and international scholarly societies. The faculty averages more than $7,200,000 annually in external awards while mentoring and teaching 1000+ undergraduate majors and 80+ Ph.D. students across three graduate programs. The department is proud of its significant outreach through the Psychology Services Center and programs engaging schools and communities. All applicants must fill out an online application at USC Jobs: https://uscjobs.sc.edu/. Candidates should be prepared to upload a CV, letter of application, personal statement, names, phone numbers, and email addresses of letter writers, and any additional materials that demonstrate educational, academic, and work experience. Letter writers should send signed letters on letterhead via email to DOROTHYK at mailbox.sc.edu with "Cognitive Neuroscience Assistant Professor Search" in the subject line. Paper submissions of letters may be sent to: Cognitive Neuroscience Assistant Professor Search Department of Psychology University of South Carolina Barnwell College Columbia, SC 29208 The search committee will begin reviewing application materials November 19, 2018 and continue until the position is filled. For full consideration, all application materials must be received no later than November 19, 2018. However, we will continue to consider applications until the position is filled. For further information about this position, please contact Search Committee Chair Rutvik Desai, Ph.D. (rutvik at sc.edu). The University of South Carolina System (www.sc.edu) is comprised of the state's flagship university in Columbia (founded in 1801 and currently one of the top 50 "Best Colleges" according to U.S. News and World Report), three regional comprehensive universities (USC Aiken, USC Beaufort and USC Upstate), and Palmetto College consisting of four two-year campuses (USC Lancaster, USC Salkehatchie, USC Sumter, USC Union and Fort Jackson/Extended University). Together, the USC System institutions offer more than 450 degree programs on campus and online and are uniquely positioned to meet the state's educational, cultural, health and research needs. The System employs nearly 14,000 people who work daily to improve the lives of students, fellow South Carolinians and the world. Our diverse engaged faculty and staff enjoy a dynamic and intellectually stimulating work environment. The University of South Carolina is an affirmative action, equal opportunity employer. Minorities and women are encouraged to apply. The University of South Carolina does not discriminate in educational or employment opportunities on the basis of race, color, religion, national origin, sex, sexual orientation, gender, age, disability, veteran status or genetics. *********************************************** 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 https://jerlab.sc.edu ************************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.spaak at donders.ru.nl Mon Sep 10 11:36:27 2018 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 10 Sep 2018 11:36:27 +0200 Subject: [FieldTrip] Cluster-based permutation tests on ERPs 2x2 ANOVA interaction interpretation and post-hoc analysis In-Reply-To: References: Message-ID: Hi Samran, > I was wondering, if I get significant differences in the interaction, how can I do the post-hoc tests to identify which treatment made the difference, and if the pre-sessions are similar? If I understand your design correctly, then these would just be paired t-tests (Post vs Pre within Placebo; Post vs Pre within Active; Placebo vs Active within Pre; Placebo vs Active within Post). Cheers, Eelke > > Thanks. > > -- > Regards, > > > M. Samran Navid. > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From andrew.dimitrijevic at sunnybrook.ca Mon Sep 10 17:35:18 2018 From: andrew.dimitrijevic at sunnybrook.ca (Dimitrijevic, Andrew) Date: Mon, 10 Sep 2018 15:35:18 +0000 Subject: [FieldTrip] Postdoc position in Toronto Canada : cochlear implants + music + EEG Message-ID: Dear FieldTrippers, We are looking to fill a postdoctoral position for a recently funded project that involves music perception in cochlear implant users. EEG measures of sensory and cognitive processing will be involved. Interested applicants should contact Andrew at: andrew.dimitrijevic at sunnybrook.ca Note ... this is a different position than the one I posted last week which uses Brain Computer Interfaces in CI :) Cheers Andrew ----------------------------------- Andrew Dimitrijevic, PhD Research Director of the Cochlear Implant Program Sunnybrook Health Science Centre Assistant Professor Department of Otolaryngology - Head and Neck Surgery Faculty of Medicine, University of Toronto 2075 Bayview Ave., Room M1 102 Toronto, ON, M4N 3M5 Office Tel: 416-480-6100 x4894 Lab Tel: 416-480-6100 x7771 https://www.researchgate.net/lab/Cochlear-Implant-Lab-Andrew-Dimitrijevic https://scholar.google.ca/citations?user=VYt9GCIAAAAJ&hl=en This e-mail is intended only for the named recipient(s) and may contain confidential, personal and/or health information (information which may be subject to legal restrictions on use, retention and/or disclosure). No waiver of confidence is intended by virtue of communication via the internet. Any review or distribution by anyone other than the person(s) for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and destroy all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From athierfelder at tuebingen.mpg.de Tue Sep 11 15:04:59 2018 From: athierfelder at tuebingen.mpg.de (Annika Thierfelder) Date: Tue, 11 Sep 2018 15:04:59 +0200 Subject: [FieldTrip] Cortical Sheet for MNE source reconstruction In-Reply-To: <54561e76-e731-6536-41aa-0684125a9c52@tuebingen.mpg.de> References: <54561e76-e731-6536-41aa-0684125a9c52@tuebingen.mpg.de> Message-ID: Dear everyone, I'm still encountering problems with my source analysis that I don't know how to solve. When I try to interpolate the source back to the MRI, it does not look at all the way it should (the sources seem to explode outside of the brain). You can have a look at it here: https://drive.google.com/file/d/1WZ2WYkKkI8FfyNHmCgk7OnbPLb6iCZYT/view?usp=sharing I'm using the cortical sheet provided by fieldtrip (cortex_5124.surf.gii), along with the standard MRI and BEM. When I construct a source model from the BEM (which is not what I want since it distributes the sources evenly spaced but I tried it for testing), the sources are all neatly inside the brain, so I seem to be using that cortical sheet in a wrong way. Do I have to process it further? All tutorials I found just do it like this. Below you can find the processing pipeline I am currently using. Any help is appreciated! Best and thank you, Annika ======================================================================================= sourcemodel =  load('cortex_5124.surf.gii'); % compute the leadfield leadfield = []; cfg = []; cfg.grid = sourcemodel; cfg.headmodel = headmodel; cfg.elec = chanlocs; leadfield = ft_prepare_leadfield(cfg); % I put the data through ft_timelockanalysis to have it in the right format, although it doesn't do anything. % The data I work with is resting state data, that's why I don't compute the noise covariance here. cfg = []; data_prepared = ft_timelockanalysis(cfg, data); % source reconstruction with MNE cfg = []; cfg.method = 'mne'; cfg.grid = leadfield; cfg.headmodel = headmodel; cfg.mne.prewhiten = 'yes'; cfg.mne.lambda = 0.1; cfg.mne.scalesourcecov = 'yes'; cfg.elec = chanlocs; source = ft_sourceanalysis(cfg, data_prepared); % save into single structure to save memory source = ft_struct2single(source); % interpolate to the template MRI cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'avg.pow'; interp = ft_sourceinterpolate(cfg, source, mri); % and do the source plot cfg = []; cfg.funparameter = 'pow'; cfg.method = 'ortho'; ft_sourceplot(cfg, interp); On 9/7/2018 12:50 PM, Annika Thierfelder wrote: > Dear fieldtrippers, > > I have a short question about the template files provided by > fieldtrip. I am doing MNE source reconstruction with the template BEM > headmodel and the cortical sheets provided in the sourcemodel > templates. However, I noticed that the sourcemodel is outside of the > BEM brain surface at some points. So I plotted it against the MRI > template and it doesn't really seem to fit. It seems quite small and > shifted, so it's hard to judge the shape. > > Are those not produced from the same template MRI? And would it > therefore make sense to go through the process of producing a > sourcemodel from the standard MRI myself as described here > [http://www.fieldtriptoolbox.org/tutorial/sourcemodel#construction_of_a_source_model_based_on_a_surface_description_of_the_cortical_sheet] > ? > > Thanks in advance for your advice, > > Best, > > Annika > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From ericgabriel.rodrigues at hotmail.com Tue Sep 11 15:06:33 2018 From: ericgabriel.rodrigues at hotmail.com (Eric Gabriel) Date: Tue, 11 Sep 2018 13:06:33 +0000 Subject: [FieldTrip] Error using ft_definetrial (line 188) Message-ID: Hi, my name is Eric Rodrigues I am a Master's student in Neuroengineering at the Santos Dumont Institute in Brazil. I would like to define the data that will be read for preprocessing, for this I am using the 'ft_definetrial' function. I initially used the following script: cfg = []; cfg.dataset = 'rat1.nex'; cfg.trialdef.eventtype = '?'; dummy = ft_definetrial(cfg); evaluating trialfunction 'ft_trialfun_general' reading the header from 'rat1.nex' reading the events from 'rat1.nex' the following events were found in the datafile event type: 'AllFile ' with event values: event type: 'Event03 ' with event values: event type: 'Event04 ' with event values: event type: 'Event05 ' with event values: event type: 'Event06 ' with event values: event type: 'Event07 ' with event values: event type: 'Event08 ' with event values: event type: 'Event17 ' with event values: event type: 'Event18 ' with event values: event type: 'Event19 ' with event values: event type: 'Event20 ' with event values: event type: 'Event21 ' with event values: event type: 'Event22 ' with event values: event type: 'Event23 ' with event values: event type: 'Start ' with event values: event type: 'Stop ' with event values: no trials have been defined yet, see FT_DEFINETRIAL for further help found 4620 events created 0 trials the call to "ft_definetrial" took 1 seconds and required the additional allocation of an estimated 0 MB >> I want to create windows of 8 seconds (4 seconds before and 4 seconds later) in relation to Event 21, for this: cfg = []; cfg.dataset = 'rat1.nex'; cfg.trialfun = 'ft_trialfun_general'; cfg.trialdef.eventtype = 'Event21'; cfg.trialdef.eventvalue = '?'; cfg.trialdef.prestim = 4; % in seconds cfg.trialdef.poststim = 4; % in seconds cfg = ft_definetrial(cfg); However, the following error appears: Error using ft_definetrial (line 188) no trials were defined, see FT_DEFINETRIAL for help Thanks in advance for the help. Eric Gabriel Oliveira Rodrigues Engenheiro Civil - CREA: 2116637597 - RN Mestrando em Neuroengenharia Edmond and Lily Safra International Institute of Neuroscience Macaiba, RN - Brazil. (84) 99627-5378 -------------- next part -------------- An HTML attachment was scrubbed... URL: From fereshte.ramezani at gmail.com Thu Sep 13 07:40:35 2018 From: fereshte.ramezani at gmail.com (Fereshte) Date: Thu, 13 Sep 2018 10:10:35 +0430 Subject: [FieldTrip] Creating a mesh of 5 head lables Message-ID: An embedded and charset-unspecified text was scrubbed... Name: warning1.txt URL: -------------- next part -------------- Dear experts, I've tried making a FEM head model using 5 head labels (GM, WM, CSF, skull and scalp ; I have not used "ft_volumesegment" to obtain these lables ). I read these 5 labels in MATLAB using 'ft_read_mri' and then I try making a mesh using 'v2m' function. The output doesn't seem to be correct due to the number of nodes for outer GM (cortex) which is '129626' and number of nodes in total ( 169166 ). The code and the labels are attached for your perusal. I'd highly appreciate your help. Thanks in advance, Fereshte -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- clc clear all ft_defaults %read image(mri) and 5 lable segmentation mri = ft_read_mri('MRI.nii'); skull_c=ft_read_mri('Skull.nii'); scalp_c=ft_read_mri('Scalp.nii'); gray_c=ft_read_mri('gray.nii'); white_c=ft_read_mri('WM.nii'); csf_c=ft_read_mri('CSF.nii'); % making a volume head=zeros(mri.dim(1),mri.dim(2),mri.dim(3)); head(find(scalp.anatomy))=1; head(find(skull.anatomy))=2; head(find(csf.anatomy))=3; head(find(gray.anatomy))=4; head(find(white.anatomy))=5; imshow(head(:,:,100),[]) % mesh [node, elem, face] = v2m(uint8(head),[],5,100,'cgalmesh'); % show the mesh for corrected head model as _c hs=plotmesh(node,face); save mesh.mat node elem face; %%% load mesh load mesh.mat node elem face ; ran=[1 2 4 3]; Nodem=mean(node(:,1:3)); mesh.pos=node(:,1:3)-ones(size(node,1),1)*Nodem; mesh.tet=elem(:,ran); mesh.labels=elem(:,5); mesh.tissue=elem(:,5); mesh.tissuelabel={'scalp', 'skull', 'CSF', 'gray', 'white',}; disp(mesh) save mesh.mat -append mesh; load mesh; % outer GM surface nodes GM=elem(find(elem(:,5)==4),1:4); GM_surf=volface(GM); test=GM_surf(:);%convert the test matrix to a vector test_2=sort(test); % arrange the elements GM_surface_nodes=unique(test_2); % remove the duplicate elements [a b]=size(GM_surface_nodes);% find the position of the GM surface nodes for i=1:a t=GM_surface_nodes(i,1); GM_surface_nodes_position(i,1:3)=node(t,1:3); end X=GM_surface_nodes_position; From litvak.vladimir at gmail.com Thu Sep 13 10:55:27 2018 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 13 Sep 2018 09:55:27 +0100 Subject: [FieldTrip] Postdoctoral Researcher in Computational Neuroscience - Data Analysis In-Reply-To: References: Message-ID: Dear colleagues, We are looking for a postdoctoral fellow to work with me and Rafal Bogacz on a very interesting dataset we have recently acquired. There is a possibility to be based either at the FIL in London ( https://www.fil.ion.ucl.ac.uk/) or BNDU in Oxford ( https://www.mrcbndu.ox.ac.uk/). Please see https://tinyurl.com/y7aj836m for details. Feel free to contact me (v.litvak at ucl.ac.uk) or Rafal ( rafal.bogacz at ndcn.ox.ac.uk ) with any informal enquiries. Best, Vladimir Postdoctoral Researcher in Computational Neuroscience - Data Analysis Nuffield Department of Clinical Neurosciences, John Radcliffe Hospital, Headington, Oxford Grade 7: £32,236 - £39,609 p.a. An exciting opportunity has become available at the MRC Brain Network Dynamics Unit at the University of Oxford (BNDU) for a Postdoctoral Researcher in Computational Neuroscience. The successful applicant will investigate how the brain controls the trade-off between speed and accuracy of decisions. The goal of the proposed project is to analyse a rich dataset recorded from patients with Parkinson’s disease and control participants while they made decisions based on noisy and gradually presented information. During this experiment, local field potentials were recorded from the subthalamic nucleus of the patients via deep brain stimulation electrodes, and the cortical activity was recorded using MEG. The project will be co-supervised by Rafal Bogacz from Oxford, who has an expertise in computational models of decision making, and Vladimir Litvak from UCL, who is an expert in analysis of local field potentials and MEG data. We are happy for the postholder to be based either in Oxford or in London. Candidates should have a promising track record in original research in their particular field. Candidates are expected to have advanced technical expertise in neurophysiological or behavioural data analysis and general expertise in computational neuroscience. They also need to be highly proficient in Matlab programming. They should provide evidence of designing and completing high quality research as part of a cohesive programme. The successful applicant will possess PhD or equivalent qualification in a relevant area (e.g. computer science, neuroscience, engineering, mathematics, physics, psychology), have expertise in mathematical modelling and data analysis and proficiency in programming. The post is full-time for a fixed-term of 1 year in the first instance starting April 2019. Only applications received before 12.00 midday on Friday 26 October 2018 will be considered. It is anticipated Interviews will be held soon after the closing date. Contact Person : HR Officer Vacancy ID : 136073 Contact Phone : 01865 234781 Closing Date : 26-Oct-2018 Contact Email : recruitment at ndcn.ox.ac.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Sep 13 12:11:29 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 13 Sep 2018 10:11:29 +0000 Subject: [FieldTrip] head- and sourcemodel templates In-Reply-To: <54561e76-e731-6536-41aa-0684125a9c52@tuebingen.mpg.de> References: <54561e76-e731-6536-41aa-0684125a9c52@tuebingen.mpg.de> Message-ID: <762D09AF-9A79-4E36-A098-C89900E7EC27@donders.ru.nl> Hi Annika, The template sourcemodels have been downloaded from SPM, and are based on the colin 27 MRI template. It could be that the standard_BEM has been derived from the same image, but I am not sure. Yet, even if they have been derived from the same image, the different image processing streams and softwares used might have resulted in the meshes intersecting. When I look at the inner boundary in conjunction with the sourcemodel, both objects are well-registered, I can confirm that the cortex sticks out a little bit in left temporal cortex, but for the rest it looks very OK to me. I am pretty sure that FieldTrip checks whether dipole position are located outside the inner compartment of the volume conductor model (and sets them to ‘outside’ when computing the inverse solution), so the affected vertices will not affect the MNE. Creating a consistent set of volume conduction models, with corresponding template source models is not a super straightforward process. If you happen to have such templates (or have created them) we’d be happy to hear about it. Best wishes, Jan-Mathijs > On 7 Sep 2018, at 12:50, Annika Thierfelder wrote: > > Dear fieldtrippers, > > I have a short question about the template files provided by fieldtrip. I am doing MNE source reconstruction with the template BEM headmodel and the cortical sheets provided in the sourcemodel templates. However, I noticed that the sourcemodel is outside of the BEM brain surface at some points. So I plotted it against the MRI template and it doesn't really seem to fit. It seems quite small and shifted, so it's hard to judge the shape. > > Are those not produced from the same template MRI? And would it therefore make sense to go through the process of producing a sourcemodel from the standard MRI myself as described here [http://www.fieldtriptoolbox.org/tutorial/sourcemodel#construction_of_a_source_model_based_on_a_surface_description_of_the_cortical_sheet] ? > > Thanks in advance for your advice, > > Best, > > Annika > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From jan.schoffelen at donders.ru.nl Thu Sep 13 12:13:32 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 13 Sep 2018 10:13:32 +0000 Subject: [FieldTrip] Cortical Sheet for MNE source reconstruction In-Reply-To: References: <54561e76-e731-6536-41aa-0684125a9c52@tuebingen.mpg.de> Message-ID: Hi Annika, Part of what you are looking at is an extrapolation artifact, which is caused by ft_sourceinterpolate. Is there a specific reason why you want the data visualized on a 3D grid, rather than as the original surface? Using ft_sourceplot (or ft_sourcemovie) should work with the original source data (provided it contains a description of the cortical mesh, in the fields pos and tri). Best wishes, Jan-Mathijs > On 11 Sep 2018, at 15:04, Annika Thierfelder wrote: > > Dear everyone, > > I'm still encountering problems with my source analysis that I don't know how to solve. When I try to interpolate the source back to the MRI, it does not look at all the way it should (the sources seem to explode outside of the brain). You can have a look at it here: https://drive.google.com/file/d/1WZ2WYkKkI8FfyNHmCgk7OnbPLb6iCZYT/view?usp=sharing > > I'm using the cortical sheet provided by fieldtrip (cortex_5124.surf.gii), along with the standard MRI and BEM. When I construct a source model from the BEM (which is not what I want since it distributes the sources evenly spaced but I tried it for testing), the sources are all neatly inside the brain, so I seem to be using that cortical sheet in a wrong way. Do I have to process it further? All tutorials I found just do it like this. > > Below you can find the processing pipeline I am currently using. Any help is appreciated! > > Best and thank you, > > Annika > > ======================================================================================= > > sourcemodel = load('cortex_5124.surf.gii'); > > % compute the leadfield > leadfield = []; > cfg = []; > cfg.grid = sourcemodel; > cfg.headmodel = headmodel; > cfg.elec = chanlocs; > leadfield = ft_prepare_leadfield(cfg); > > % I put the data through ft_timelockanalysis to have it in the right format, although it doesn't do anything. > % The data I work with is resting state data, that's why I don't compute the noise covariance here. > cfg = []; > data_prepared = ft_timelockanalysis(cfg, data); > > % source reconstruction with MNE > cfg = []; > cfg.method = 'mne'; > cfg.grid = leadfield; > cfg.headmodel = headmodel; > cfg.mne.prewhiten = 'yes'; > cfg.mne.lambda = 0.1; > cfg.mne.scalesourcecov = 'yes'; > cfg.elec = chanlocs; > source = ft_sourceanalysis(cfg, data_prepared); > > % save into single structure to save memory > source = ft_struct2single(source); > > % interpolate to the template MRI > cfg = []; > cfg.interpmethod = 'nearest'; > cfg.parameter = 'avg.pow'; > interp = ft_sourceinterpolate(cfg, source, mri); > > % and do the source plot > cfg = []; > cfg.funparameter = 'pow'; > cfg.method = 'ortho'; > ft_sourceplot(cfg, interp); > On 9/7/2018 12:50 PM, Annika Thierfelder wrote: >> Dear fieldtrippers, >> >> I have a short question about the template files provided by fieldtrip. I am doing MNE source reconstruction with the template BEM headmodel and the cortical sheets provided in the sourcemodel templates. However, I noticed that the sourcemodel is outside of the BEM brain surface at some points. So I plotted it against the MRI template and it doesn't really seem to fit. It seems quite small and shifted, so it's hard to judge the shape. >> >> Are those not produced from the same template MRI? And would it therefore make sense to go through the process of producing a sourcemodel from the standard MRI myself as described here [http://www.fieldtriptoolbox.org/tutorial/sourcemodel#construction_of_a_source_model_based_on_a_surface_description_of_the_cortical_sheet] ? >> >> Thanks in advance for your advice, >> >> Best, >> >> Annika >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From athierfelder at tuebingen.mpg.de Thu Sep 13 13:35:23 2018 From: athierfelder at tuebingen.mpg.de (Annika Thierfelder) Date: Thu, 13 Sep 2018 13:35:23 +0200 Subject: [FieldTrip] Cortical Sheet for MNE source reconstruction In-Reply-To: References: <54561e76-e731-6536-41aa-0684125a9c52@tuebingen.mpg.de> Message-ID: <50c7d0d9-6a7a-0bdc-c6c6-abb1c1c57ef5@tuebingen.mpg.de> Hi Jan-Mathijs, Thank you very much for your response! There is quite some story behind the reason why I extrapolated it to the 3D grid, but I'll try to explain shortly so you can also see how both my emails relate. When I let the MNE algorithm run for the first time, I noticed that there was a consistent activity overshoot at always the same voxel in all my conditions. So I checked the code and I tracked it down to the part in the sourcemodel outside of the headmodel, as described in the other email. I shifted the sourcemodel a little bit upwards manually and got rid of the artefact (although that might not be the best solution). However, I realized that the misalignment in the source- and the headmodel is, as you also said, in the left temporal cortex. But my artifacts were in the right temporal cortex. Also, the activation did not seem to be on the side where we expected it to be. So, I found out that this might be due to the coordinate systems, so I wanted to make sure if it is the same if I plot it on the MRI. And this then looked like you saw in the image, so I got very confused if there was something essentially wrong in the whole pipeline I used. It is very reassuring to hear that this probably is not the case. Is there any way to check this? So, as a final question: Is it probable that the source activity is mirrored in the surface sourceplots? Best and thanks again for the help, Annika On 9/13/2018 12:13 PM, Schoffelen, J.M. (Jan Mathijs) wrote: > Hi Annika, > > Part of what you are looking at is an extrapolation artifact, which is caused by ft_sourceinterpolate. Is there a specific reason why you want the data visualized on a 3D grid, rather than as the original surface? Using ft_sourceplot (or ft_sourcemovie) should work with the original source data (provided it contains a description of the cortical mesh, in the fields pos and tri). > > Best wishes, > Jan-Mathijs > > > > > >> On 11 Sep 2018, at 15:04, Annika Thierfelder wrote: >> >> Dear everyone, >> >> I'm still encountering problems with my source analysis that I don't know how to solve. When I try to interpolate the source back to the MRI, it does not look at all the way it should (the sources seem to explode outside of the brain). You can have a look at it here: https://drive.google.com/file/d/1WZ2WYkKkI8FfyNHmCgk7OnbPLb6iCZYT/view?usp=sharing >> >> I'm using the cortical sheet provided by fieldtrip (cortex_5124.surf.gii), along with the standard MRI and BEM. When I construct a source model from the BEM (which is not what I want since it distributes the sources evenly spaced but I tried it for testing), the sources are all neatly inside the brain, so I seem to be using that cortical sheet in a wrong way. Do I have to process it further? All tutorials I found just do it like this. >> >> Below you can find the processing pipeline I am currently using. Any help is appreciated! >> >> Best and thank you, >> >> Annika >> >> ======================================================================================= >> >> sourcemodel = load('cortex_5124.surf.gii'); >> >> % compute the leadfield >> leadfield = []; >> cfg = []; >> cfg.grid = sourcemodel; >> cfg.headmodel = headmodel; >> cfg.elec = chanlocs; >> leadfield = ft_prepare_leadfield(cfg); >> >> % I put the data through ft_timelockanalysis to have it in the right format, although it doesn't do anything. >> % The data I work with is resting state data, that's why I don't compute the noise covariance here. >> cfg = []; >> data_prepared = ft_timelockanalysis(cfg, data); >> >> % source reconstruction with MNE >> cfg = []; >> cfg.method = 'mne'; >> cfg.grid = leadfield; >> cfg.headmodel = headmodel; >> cfg.mne.prewhiten = 'yes'; >> cfg.mne.lambda = 0.1; >> cfg.mne.scalesourcecov = 'yes'; >> cfg.elec = chanlocs; >> source = ft_sourceanalysis(cfg, data_prepared); >> >> % save into single structure to save memory >> source = ft_struct2single(source); >> >> % interpolate to the template MRI >> cfg = []; >> cfg.interpmethod = 'nearest'; >> cfg.parameter = 'avg.pow'; >> interp = ft_sourceinterpolate(cfg, source, mri); >> >> % and do the source plot >> cfg = []; >> cfg.funparameter = 'pow'; >> cfg.method = 'ortho'; >> ft_sourceplot(cfg, interp); >> On 9/7/2018 12:50 PM, Annika Thierfelder wrote: >>> Dear fieldtrippers, >>> >>> I have a short question about the template files provided by fieldtrip. I am doing MNE source reconstruction with the template BEM headmodel and the cortical sheets provided in the sourcemodel templates. However, I noticed that the sourcemodel is outside of the BEM brain surface at some points. So I plotted it against the MRI template and it doesn't really seem to fit. It seems quite small and shifted, so it's hard to judge the shape. >>> >>> Are those not produced from the same template MRI? And would it therefore make sense to go through the process of producing a sourcemodel from the standard MRI myself as described here [http://www.fieldtriptoolbox.org/tutorial/sourcemodel#construction_of_a_source_model_based_on_a_surface_description_of_the_cortical_sheet] ? >>> >>> Thanks in advance for your advice, >>> >>> Best, >>> >>> Annika >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> https://doi.org/10.1371/journal.pcbi.1002202 >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From matti.stenroos at aalto.fi Thu Sep 13 15:07:08 2018 From: matti.stenroos at aalto.fi (Matti Stenroos) Date: Thu, 13 Sep 2018 16:07:08 +0300 Subject: [FieldTrip] Cortical Sheet for MNE source reconstruction In-Reply-To: <24377_1536838542_5B9A4B8D_24377_109_1_50c7d0d9-6a7a-0bdc-c6c6-abb1c1c57ef5@tuebingen.mpg.de> References: <54561e76-e731-6536-41aa-0684125a9c52@tuebingen.mpg.de> <24377_1536838542_5B9A4B8D_24377_109_1_50c7d0d9-6a7a-0bdc-c6c6-abb1c1c57ef5@tuebingen.mpg.de> Message-ID: <8f5ecb2b-7f5d-7deb-702a-a7c1fcc0ae9e@aalto.fi> Hi Annika, It is difficult to predict, what will happen, if source points are outside the assumed source region. In some BEM implementations, it is explicitly assumed that sources are inside the skull. If they are, however, outside, the forward solution is totally wrong. If the BEM is implemented so that it allows sources outside the brain, the results for such sources do not make sense physiologically. So, in any case, before doing MNE or scanning with dipoles, you should make sure that source space is inside the skull (for FieldTrip BEMS and local-spheres model), and none of the source points are "too close". If I remember right, FieldTrip should automatically check that. If it doesn't, the user needs to do that... (if a source point happens to be in scalp, a lot of activity will project there). Cheers, Matti On 2018-09-13 14:35, Annika Thierfelder wrote: > Hi Jan-Mathijs, > > Thank you very much for your response! There is quite some story behind > the reason why I extrapolated it to the 3D grid, but I'll try to explain > shortly so you can also see how both my emails relate. > > When I let the MNE algorithm run for the first time, I noticed that > there was a consistent activity overshoot at always the same voxel in > all my conditions. So I checked the code and I tracked it down to the > part in the sourcemodel outside of the headmodel, as described in the > other email. I shifted the sourcemodel a little bit upwards manually and > got rid of the artefact (although that might not be the best solution). > > However, I realized that the misalignment in the source- and the > headmodel is, as you also said, in the left temporal cortex. But my > artifacts were in the right temporal cortex. Also, the activation did > not seem to be on the side where we expected it to be. > > So, I found out that this might be due to the coordinate systems, so I > wanted to make sure if it is the same if I plot it on the MRI. And this > then looked like you saw in the image, so I got very confused if there > was something essentially wrong in the whole pipeline I used. It is very > reassuring to hear that this probably is not the case. Is there any way > to check this? > > So, as a final question: Is it probable that the source activity is > mirrored in the surface sourceplots? > > Best and thanks again for the help, > > Annika > > > On 9/13/2018 12:13 PM, Schoffelen, J.M. (Jan Mathijs) wrote: >> Hi Annika, >> >> Part of what you are looking at is an extrapolation artifact, which is >> caused by ft_sourceinterpolate. Is there a specific reason why you >> want the data visualized on a 3D grid, rather than as the original >> surface? Using ft_sourceplot (or ft_sourcemovie) should work with the >> original source data (provided it contains a description of the >> cortical mesh, in the fields pos and tri). >> >> Best wishes, >> Jan-Mathijs >> >> >> >> >> >>> On 11 Sep 2018, at 15:04, Annika Thierfelder >>> wrote: >>> >>> Dear everyone, >>> >>> I'm still encountering problems with my source analysis that I don't >>> know how to solve. When I try to interpolate the source back to the >>> MRI, it does not look at all the way it should (the sources seem to >>> explode outside of the brain). You can have a look at it here: >>> https://drive.google.com/file/d/1WZ2WYkKkI8FfyNHmCgk7OnbPLb6iCZYT/view?usp=sharing >>> >>> >>> I'm using the cortical sheet provided by fieldtrip >>> (cortex_5124.surf.gii), along with the standard MRI and BEM. When I >>> construct a source model from the BEM (which is not what I want since >>> it distributes the sources evenly spaced but I tried it for testing), >>> the sources are all neatly inside the brain, so I seem to be using >>> that cortical sheet in a wrong way. Do I have to process it further? >>> All tutorials I found just do it like this. >>> >>> Below you can find the processing pipeline I am currently using. Any >>> help is appreciated! >>> >>> Best and thank you, >>> >>> Annika >>> >>> ======================================================================================= >>> >>> >>> sourcemodel =  load('cortex_5124.surf.gii'); >>> >>> % compute the leadfield >>> leadfield = []; >>> cfg = []; >>> cfg.grid = sourcemodel; >>> cfg.headmodel = headmodel; >>> cfg.elec = chanlocs; >>> leadfield = ft_prepare_leadfield(cfg); >>> >>> % I put the data through ft_timelockanalysis to have it in the right >>> format, although it doesn't do anything. >>> % The data I work with is resting state data, that's why I don't >>> compute the noise covariance here. >>> cfg = []; >>> data_prepared = ft_timelockanalysis(cfg, data); >>> >>> % source reconstruction with MNE >>> cfg = []; >>> cfg.method = 'mne'; >>> cfg.grid = leadfield; >>> cfg.headmodel = headmodel; >>> cfg.mne.prewhiten = 'yes'; >>> cfg.mne.lambda = 0.1; >>> cfg.mne.scalesourcecov = 'yes'; >>> cfg.elec = chanlocs; >>> source = ft_sourceanalysis(cfg, data_prepared); >>> >>> % save into single structure to save memory >>> source = ft_struct2single(source); >>> >>> % interpolate to the template MRI >>> cfg = []; >>> cfg.interpmethod = 'nearest'; >>> cfg.parameter = 'avg.pow'; >>> interp = ft_sourceinterpolate(cfg, source, mri); >>> >>> % and do the source plot >>> cfg = []; >>> cfg.funparameter = 'pow'; >>> cfg.method = 'ortho'; >>> ft_sourceplot(cfg, interp); >>> On 9/7/2018 12:50 PM, Annika Thierfelder wrote: >>>> Dear fieldtrippers, >>>> >>>> I have a short question about the template files provided by >>>> fieldtrip. I am doing MNE source reconstruction with the template >>>> BEM headmodel and the cortical sheets provided in the sourcemodel >>>> templates. However, I noticed that the sourcemodel is outside of the >>>> BEM brain surface at some points. So I plotted it against the MRI >>>> template and it doesn't really seem to fit. It seems quite small and >>>> shifted, so it's hard to judge the shape. >>>> >>>> Are those not produced from the same template MRI? And would it >>>> therefore make sense to go through the process of producing a >>>> sourcemodel from the standard MRI myself as described here >>>> [http://www.fieldtriptoolbox.org/tutorial/sourcemodel#construction_of_a_source_model_based_on_a_surface_description_of_the_cortical_sheet] >>>> ? >>>> >>>> Thanks in advance for your advice, >>>> >>>> Best, >>>> >>>> Annika >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> https://doi.org/10.1371/journal.pcbi.1002202 >>> _______________________________________________ >>> fieldtrip mailing list >>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> https://doi.org/10.1371/journal.pcbi.1002202 >> >> _______________________________________________ >> fieldtrip mailing list >> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> https://doi.org/10.1371/journal.pcbi.1002202 > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From fereshte.ramezani at gmail.com Sat Sep 15 15:39:57 2018 From: fereshte.ramezani at gmail.com (Fereshte) Date: Sat, 15 Sep 2018 18:09:57 +0430 Subject: [FieldTrip] Creating a mesh Message-ID: Dear experts, I've tried making a FEM head model using 5 head labels (GM, WM, CSF, skull and scalp ; I have not used "ft_volumesegment" to obtain these lables ). I read these 5 labels in MATLAB using 'ft_read_mri' and then I try making a mesh using 'v2m' function. The output doesn't seem to be correct due to the number of nodes for outer GM (cortex) which is '129626' and number of nodes in total ( 169166 ). The code is written below. I'd highly appreciate your help. Thanks in advance, Fereshte clc clear all ft_defaults %read image(mri) and 5 lable segmentation mri = ft_read_mri('MRI.nii'); skull_c=ft_read_mri('Skull.nii'); scalp_c=ft_read_mri('Scalp.nii'); gray_c=ft_read_mri('gray.nii'); white_c=ft_read_mri('WM.nii'); csf_c=ft_read_mri('CSF.nii'); % making a volume head=zeros(mri.dim(1),mri.dim(2),mri.dim(3)); head(find(scalp.anatomy))=1; head(find(skull.anatomy))=2; head(find(csf.anatomy))=3; head(find(gray.anatomy))=4; head(find(white.anatomy))=5; imshow(head(:,:,100),[]) % mesh [node, elem, face] = v2m(uint8(head),[],5,100,'cgalmesh'); % show the mesh for corrected head model as _c hs=plotmesh(node,face); save mesh.mat node elem face; %%% load mesh load mesh.mat node elem face ; ran=[1 2 4 3]; Nodem=mean(node(:,1:3)); mesh.pos=node(:,1:3)-ones(size(node,1),1)*Nodem; mesh.tet=elem(:,ran); mesh.labels=elem(:,5); mesh.tissue=elem(:,5); mesh.tissuelabel={'scalp', 'skull', 'CSF', 'gray', 'white',}; disp(mesh) save mesh.mat -append mesh; load mesh; % outer GM surface nodes GM=elem(find(elem(:,5)==4),1:4); GM_surf=volface(GM); test=GM_surf(:);%convert the test matrix to a vector test_2=sort(test); % arrange the elements GM_surface_nodes=unique(test_2); % remove the duplicate elements [a b]=size(GM_surface_nodes);% find the position of the GM surface nodes for i=1:a t=GM_surface_nodes(i,1); GM_surface_nodes_position(i,1:3)=node(t,1:3); end X=GM_surface_nodes_position; -------------- next part -------------- An HTML attachment was scrubbed... URL: From sauppe.s at gmail.com Sat Sep 15 16:38:04 2018 From: sauppe.s at gmail.com (Sebastian Sauppe) Date: Sat, 15 Sep 2018 16:38:04 +0200 Subject: [FieldTrip] Which subplot of clusterplot to take? Message-ID: Dear Fieldtrip list members, I have a question on how to best produce a cluster plot. I have the results from a cluster-based permutation test of time-frequency data (ft_freqstatistics). When I run ft_clusterplot to visualize where my two conditions differ, a larger number of subplots is produced (in my case 12). These subplots have different electrodes marked as significant and I guess that they represent the development of the significant cluster(s). I’ve got two questions and hope that someone of you can help with this. (1) How is the number of subplots determined? I get, for example, 12 subplots from clusterplot but there are 23 time bins in my data. (2) When preparing a plot to include in a paper, which one of the subplots should I best take? Or is there a way to combine them to show the fullest extent of the cluster? (I think it is not practical to include 12 or more subplots in a figure for a paper.) Here is the plotting code I use: %% plot the results of permutation test % cluster plot % prepare cluster plot cfg = []; cfg.alpha = 0.025; cfg.zlim = 'maxmin'; cfg.layout = 'GSN-HydroCel-129.sfp'; layout = ft_prepare_layout(cfg); cfg.layout = layout; cfg.colorbar = 'yes'; cfg.marker = 'on'; % make clusterplot ft_clusterplot(cfg, stat); Best, Sebastian ----------- Dr. Sebastian Sauppe Department of Comparative Linguistics, University of Zurich Homepage: https://sites.google.com/site/sauppes/ Twitter: @SebastianSauppe Google Scholar Citations: https://scholar.google.de/citations?user=wEtciKQAAAAJ ResearchGate: http://www.researchgate.net/profile/Sebastian_Sauppe ORCID ID: http://orcid.org/0000-0001-8670-8197 -------------- next part -------------- An HTML attachment was scrubbed... URL: From taravanviegen at gmail.com Sat Sep 15 18:28:08 2018 From: taravanviegen at gmail.com (Tara van Viegen) Date: Sat, 15 Sep 2018 17:28:08 +0100 Subject: [FieldTrip] Which subplot of clusterplot to take? In-Reply-To: References: Message-ID: Dear Sebastian, 1) The permutation test identified a significant difference between your conditions. The extent of the cluster (i.e. the most pronounced difference between your conditions) is found in the time window that is plotted in the 12 subplots. See http://www.fieldtriptoolbox.org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test for more information on this. 2) If you do not wish to use 12 subplots in a figure you can simply show the plot averaged over time points. Note that the clusterplot plots t-values, so you might want to plot the difference between your conditions in microvolt or femtotesla for example. That does leave you with the decision on how to include the spatial extent (i.e. electrodes) of your cluster. You could show all electrodes that were part of the cluster at any one time point, or you could plot the electrode size as a function of how often (i.e. at how many time points) the electrode was part of the cluster. Hope this helps. Best, Tara van Viegen On Sat, Sep 15, 2018 at 4:35 PM Sebastian Sauppe wrote: > Dear Fieldtrip list members, > > I have a question on how to best produce a cluster plot. I have the > results from a cluster-based permutation test of time-frequency data > (ft_freqstatistics). When I run ft_clusterplot to visualize where my two > conditions differ, a larger number of subplots is produced (in my case 12). > These subplots have different electrodes marked as significant and I guess > that they represent the development of the significant cluster(s). > > I’ve got two questions and hope that someone of you can help with this. > > (1) How is the number of subplots determined? I get, for example, 12 > subplots from clusterplot but there are 23 time bins in my data. > (2) When preparing a plot to include in a paper, which one of the subplots > should I best take? Or is there a way to combine them to show the fullest > extent of the cluster? (I think it is not practical to include 12 or more > subplots in a figure for a paper.) > > Here is the plotting code I use: > > %% plot the results of permutation test > % cluster plot > > > % prepare cluster plot > cfg = []; > cfg.alpha = 0.025; > cfg.zlim = 'maxmin'; > cfg.layout = 'GSN-HydroCel-129.sfp'; > layout = ft_prepare_layout(cfg); > cfg.layout = layout; > cfg.colorbar = 'yes'; > cfg.marker = 'on'; > > > % make clusterplot > ft_clusterplot(cfg, stat); > > Best, > Sebastian > > ----------- > Dr. Sebastian Sauppe > Department of Comparative Linguistics, University of Zurich > Homepage: https://sites.google.com/site/sauppes/ > Twitter: @SebastianSauppe > Google Scholar Citations: > https://scholar.google.de/citations?user=wEtciKQAAAAJ > ResearchGate: http://www.researchgate.net/profile/Sebastian_Sauppe > ORCID ID: http://orcid.org/0000-0001-8670-8197 > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From di.zhu3 at students.mq.edu.au Mon Sep 17 09:20:54 2018 From: di.zhu3 at students.mq.edu.au (Judy Zhu) Date: Mon, 17 Sep 2018 17:20:54 +1000 Subject: [FieldTrip] Artifact rejection on average ERF Message-ID: Dear Fieldtrippers, I am attempting to remove some artifact in my data using ICA component rejection. I would like your advice on whether it would be valid to perform artifact rejection on the averaged ERF (i.e. timelock output), and how this may affect the covariance matrix. I have tried doing the artifact rejection on all individual epochs before computing ERF, but this hasn't worked consistently well across subjects, therefore I would like to try it on the average ERFs for each subject. I am doing the following steps: - compute the average ERF (for each condition) and the covariance matrix (based on all conditions combined together) using ft_timelockanalysis - perform artifact rejection on the average ERFs using ft_rejectcomponent - use the cleaned ERFs for lcmv beamforming My questions is: Can I use the cleaned ERFs with the previously-computed covariance matrix to do beamforming? (or is that covariance matrix now invalid?) Is there a way I can re-compute the covariance matrix for the cleaned ERFs? Many thanks for your help in advance! Thanks, Judy Judy D. Zhu PhD Candidate ARC Centre of Excellence in Cognition and its Disorders Department of Cognitive Science, Macquarie University, Sydney, Australia -------------- next part -------------- An HTML attachment was scrubbed... URL: From camille.fakche at gmail.com Mon Sep 17 14:20:46 2018 From: camille.fakche at gmail.com (Camille Fakche) Date: Mon, 17 Sep 2018 14:20:46 +0200 Subject: [FieldTrip] ft_prepare_mesh error Message-ID: Hi, I run a Matlab script that called functions from Freesurfer and Fieldtrip softwares to process human ECoG (i.e. Fieldtrip tutorial on human ECoG), and I systematically get the following error message when I called the function ft_prepare_mesh to create a cortex hull : adding the FreeSurfer environment dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address Referenced from: /Applications/freesurfer/bin/../lib/gcc/lib/libgomp.1.dylib Expected in: /usr/lib/libSystem.B.dylib dyld: Symbol not found: ___emutls_get_address Referenced from: /Applications/freesurfer/bin/../lib/gcc/lib/libgomp.1.dylib Expected in: /usr/lib/libSystem.B.dylib mris_fill -c -r 1 /Users/camille/Desktop/Work/IRM/mn/surf/lh.pial /private/tmp/tp89b7981c_34ea_4609_988c_c4b150e3d4b7_pial.filled.mgz: Aborted reading filled volume... gunzip: can't stat: /private/tmp/tp89b7981c_34ea_4609_988c_c4b150e3d4b7_pial.filled.mgz (/private/tmp/tp89b7981c_34ea_4609_988c_c4b150e3d4b7_pial.filled.mgz.gz): No such file or directory ERROR: problem reading fname. I believe that it is a problem from Freesurfer paths, but I don't know how to solve it. Does someone have an idea? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pdhami06 at gmail.com Tue Sep 18 20:10:23 2018 From: pdhami06 at gmail.com (Paul Dhami) Date: Tue, 18 Sep 2018 14:10:23 -0400 Subject: [FieldTrip] Frequency Analysis Coming Up with NaNs - related to removal of TMS artifcat? Message-ID: Dear Fieldtrip community, I have an TMS-EEG dataset, epoched from -1 to 1 second, with the trigger being the TMS pulse. Due to the TMS pulse artifact, data from -5 ms to 10 ms is trimmed (removed and replaced with NaNs). After importing the preprocessed data from eeglab using eeglab2fieldtrip(EEG, 'preprocessing'), I tried running a multitaper TFR analysis, with the code below being what I have used: dataSPfreq = eeglab2fieldtrip(EEG, 'preprocessing'); cfg = []; cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.foi = 4:2:30; cfg.t_ftimwin = 2 ./ cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = -0.1:0.01:0.5; dataSPfreq = ft_freqanalysis(cfg, dataSPfreq) The output then is filled with NaNs. I'm assuming it has something to do with the NaNs in the dataset, but then when trying to select TOIs that shouldn't be affected by the NaN's, such as: dataSPfreq = eeglab2fieldtrip(EEG, 'preprocessing'); cfg = []; cfg.output = 'pow'; cfg.method = 'mtmconvol'; cfg.foi = 4:2:30; cfg.t_ftimwin = 2 ./ cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = 0.1:0.01:0.6; dataSPfreq = ft_freqanalysis(cfg, dataSPfreq) with toi adjusted (which I believe should contain the appropriate time window size for the lowest frequency at 0.5 s) I still end up with NaNs. Sorry if there is an obvious mistake that I am missing. Any help with this would be greatly appreciated. Best, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.spaak at donders.ru.nl Wed Sep 19 09:43:01 2018 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 19 Sep 2018 09:43:01 +0200 Subject: [FieldTrip] Frequency Analysis Coming Up with NaNs - related to removal of TMS artifcat? In-Reply-To: References: Message-ID: Dear Paul, Internally, ft_freqanalysis will always do a Fourier transform of the entire trial for efficiency reasons, which is why any nan in the data will result in nans in the output, irrespective of cfg.toi. Have a look at ft_interpolatenan to fix the raw data before doing frequency analysis. Cheers, Eelke On Tue, 18 Sep 2018 at 20:10, Paul Dhami wrote: > > Dear Fieldtrip community, > > I have an TMS-EEG dataset, epoched from -1 to 1 second, with the trigger being the TMS pulse. Due to the TMS pulse artifact, data from -5 ms to 10 ms is trimmed (removed and replaced with NaNs). > > After importing the preprocessed data from eeglab using eeglab2fieldtrip(EEG, 'preprocessing'), I tried running a multitaper TFR analysis, with the code below being what I have used: > > dataSPfreq = eeglab2fieldtrip(EEG, 'preprocessing'); > > cfg = []; > > cfg.output = 'pow'; > > cfg.method = 'mtmconvol'; > > cfg.foi = 4:2:30; > > cfg.t_ftimwin = 2 ./ cfg.foi; > > cfg.tapsmofrq = 0.4 *cfg.foi; > > cfg.toi = -0.1:0.01:0.5; > > > > dataSPfreq = ft_freqanalysis(cfg, dataSPfreq) > > > The output then is filled with NaNs. > > > I'm assuming it has something to do with the NaNs in the dataset, but then when trying to select TOIs that shouldn't be affected by the NaN's, such as: > > > dataSPfreq = eeglab2fieldtrip(EEG, 'preprocessing'); > > cfg = []; > > cfg.output = 'pow'; > > cfg.method = 'mtmconvol'; > > cfg.foi = 4:2:30; > > cfg.t_ftimwin = 2 ./ cfg.foi; > > cfg.tapsmofrq = 0.4 *cfg.foi; > > cfg.toi = 0.1:0.01:0.6; > > > > dataSPfreq = ft_freqanalysis(cfg, dataSPfreq) > > > with toi adjusted (which I believe should contain the appropriate time window size for the lowest frequency at 0.5 s) I still end up with NaNs. > > > Sorry if there is an obvious mistake that I am missing. Any help with this would be greatly appreciated. > > > Best, > > Paul > > > > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From ankenk at drcmr.dk Wed Sep 19 10:13:06 2018 From: ankenk at drcmr.dk (Anke Karabanov) Date: Wed, 19 Sep 2018 10:13:06 +0200 Subject: [FieldTrip] Call for Participation: Winter School on Noninvasive Transcranial Brain Stimulation with a Focus on Multimodal Integration Message-ID: <5adc5f85-288b-fa39-2eac-9905215a8e14@drcmr.dk> Dear colleagues, The Danish Research Center for Magnetic Resonance Imaging is organizing a Winter School on Noninvasive Brain Stimulation from the 27-30 of November in Copenhagen, Denmark. The course will course will cover advanced applications of TES and TMS with a specific focus on multimodal integration with EEG and fMRI. Lectures are given by leading scientists in the field. For more information please visithttp://www.drcmr.dk/ntbswinterschool. Best Regards Anke Karabanov -------------- next part -------------- An HTML attachment was scrubbed... URL: From psc.dav at gmail.com Wed Sep 19 19:20:01 2018 From: psc.dav at gmail.com (David Pascucci) Date: Wed, 19 Sep 2018 19:20:01 +0200 Subject: [FieldTrip] =?utf-8?q?Ph=2ED_position=3A_Serial_Dependence_in_Pe?= =?utf-8?q?rception_and_Decision-Making_=E2=80=94Psychophysical_and?= =?utf-8?q?_Neuroimaging_investigation?= Message-ID: The Laboratory of Psychophysics at the École Polytechnique fédérale de Lausanne (EPFL, Switzerland), is looking for an excellent, highly motivated candidate for a 4-year Ph.D. position focusing on “*Serial Dependence in Perception and Decision-Making*”. The project is coordinated by Dr. *David Pascucci *and funded by an Ambizione grant from the Swiss National Science Foundation (SNSF). The successful candidate will work in the lab of Prof. *Michael Herzog* with periods abroad at the University of Iceland, Reykjavík, in collaboration with Prof. *Árni Kristjánsson*. The position will focus on the effects that prior cognitive and neural processes exert on current perception, in both healthy individuals and schizophrenic patients. The research will leverage on state-of-the-art psychophysical and neuroimaging methods, including *Inverted Encoding *modeling of *f*MRI/EEG data, EEG source imaging, and *Granger-causal* modeling. The following are the *ideal requirements* for the candidate: o Highly qualified M.S. in Cognitive science, Neuroscience, Biomedical/Bio engineering and related areas; o Solid mathematical and signal processing background; o Experience in programming and statistical analyses (Matlab, R); o Proficiency in English (verbal and written communication); Located on the shores of Lake Geneva, EPFL is one of the leading universities in Europe (ranked among the top 15 by the QS World University Rankings). The Ph.D. salary is approximately 3500 CHF/month after taxes. Applications should be submitted online through the form http://phd.epfl.ch/application. Deadline 15.11.2018. Expressions of interest are most welcome [david.pascucci at unifr.ch; michael.herzog at epfl.ch]. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dsincasto at gmail.com Wed Sep 19 22:41:07 2018 From: dsincasto at gmail.com (Dorothy Sincasto) Date: Wed, 19 Sep 2018 13:41:07 -0700 Subject: [FieldTrip] Align freesurfer surface to headmodel Message-ID: Dear fieldtrippers I would like to align the headmodel of a subject with the freesurfer surface. It seems that this is a bit different than the fieldtrip mne tutorial, as we already have the freesurfer surfaces (so we did not align the mri, save them and run freesurfer). To try to convert the freesurface surface coordinates to the subjects MEG coordinates I do: cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'spm'; mri_spm = ft_volumerealign(cfg, mri); cfg = []; cfg.resolution = 1; cfg.dim = [256 256 256]; mri_spm_rs = ft_volumereslice(cfg, mri); transform_vox2spm = mri_spm_rs.transform; cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_ctf_rs = ft_volumerealign(cfg, mri_spm_rs); transform_vox2ctf = mri_ctf_rs.transform; T = transform_vox2ctf/transform_vox2spm; sourcespace = ft_read_headshape({my_surface} sourcespace = ft_transform_geometry(T, sourcespace); However, although the surface and headmodel is quite aligned, the surface is a bit lower and posterior than the headmodel, as can be seen in this screenshot: https://ibb.co/eEVV2K We also tried the transformation matrices from freesurfer outputed with the command mri_info surface.surf voxel to ras transform: -1.0000 0.0000 -0.0000 131.6938 0.0000 0.0000 1.0000 -111.6126 -0.0000 -1.0000 -0.0000 157.1196 0.0000 0.0000 0.0000 1.0000 voxel-to-ras determinant -1 ras to voxel transform: -1.0000 -0.0000 -0.0000 131.6938 0.0000 -0.0000 -1.0000 157.1196 0.0000 1.0000 0.0000 111.6126 -0.0000 -0.0000 -0.0000 1.0000 But the results are worse. I am a bit desperate in finding a way to align the surface without having to rerun freesurface on all the subjects. Is there a method to properly align the freesurfer surface to the aligned headmodel? Thank you Dorothy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Sep 21 10:12:28 2018 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 21 Sep 2018 08:12:28 +0000 Subject: [FieldTrip] Align freesurfer surface to headmodel In-Reply-To: References: Message-ID: <52AC72E9-F994-4B04-80F6-1C5608F18F83@donders.ru.nl> Hi Dorothy, The best way to do this is indeed to follow the tutorial. If you don’t want to rerun the freesurfer pipeline things only get complicated. The code you pasted is not correct, because of the reslicing step in between. Creating the ’T’ matrix as a combination of two vox2somethingelse transformation matrices is only allowed if the voxel spaces that correspond to each of the transformations is identical. Best wishes, Jan-Mathijs PS: If you insist on trying it, the best way to go about this would be to use the T1w.mgz anatomical image from the freesurfer mri folder for the headmodel creation. Before the headmodel creation, you probably would want to coregister this image to the coordinate system of your EEG/MEG sensors. 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 19 Sep 2018, at 22:41, Dorothy Sincasto > wrote: Dear fieldtrippers I would like to align the headmodel of a subject with the freesurfer surface. It seems that this is a bit different than the fieldtrip mne tutorial, as we already have the freesurfer surfaces (so we did not align the mri, save them and run freesurfer). To try to convert the freesurface surface coordinates to the subjects MEG coordinates I do: cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'spm'; mri_spm = ft_volumerealign(cfg, mri); cfg = []; cfg.resolution = 1; cfg.dim = [256 256 256]; mri_spm_rs = ft_volumereslice(cfg, mri); transform_vox2spm = mri_spm_rs.transform; cfg = []; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; mri_ctf_rs = ft_volumerealign(cfg, mri_spm_rs); transform_vox2ctf = mri_ctf_rs.transform; T = transform_vox2ctf/transform_vox2spm; sourcespace = ft_read_headshape({my_surface} sourcespace = ft_transform_geometry(T, sourcespace); However, although the surface and headmodel is quite aligned, the surface is a bit lower and posterior than the headmodel, as can be seen in this screenshot: https://ibb.co/eEVV2K We also tried the transformation matrices from freesurfer outputed with the command mri_info surface.surf voxel to ras transform: -1.0000 0.0000 -0.0000 131.6938 0.0000 0.0000 1.0000 -111.6126 -0.0000 -1.0000 -0.0000 157.1196 0.0000 0.0000 0.0000 1.0000 voxel-to-ras determinant -1 ras to voxel transform: -1.0000 -0.0000 -0.0000 131.6938 0.0000 -0.0000 -1.0000 157.1196 0.0000 1.0000 0.0000 111.6126 -0.0000 -0.0000 -0.0000 1.0000 But the results are worse. I am a bit desperate in finding a way to align the surface without having to rerun freesurface on all the subjects. Is there a method to properly align the freesurfer surface to the aligned headmodel? Thank you Dorothy _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ali.mazah at gmail.com Fri Sep 21 14:03:45 2018 From: ali.mazah at gmail.com (Ali Mazaheri) Date: Fri, 21 Sep 2018 13:03:45 +0100 Subject: [FieldTrip] Post-doc and Research Assistant position Message-ID: Dear Fieldtrippers A post-doctoral scholar and a research assistant position are going to become available at the School of Psychology, University of Birmingham. The objective of the research we plan to undertake is to turn EEG, measured using state-of-the art discreet wearable electrodes, into a tool for ‘brain reading’ in the real world where the user will be standing and moving around. Interested candidates can contact me at ali.mazah at gmail.com best, Ali -- Dr Ali Mazaheri, PhD Associate Professor School of Psychology 3.03 Hills Building University of Birmingham +44(0)121 414 2863 www.alimazaheri.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dsincasto at gmail.com Fri Sep 21 15:23:28 2018 From: dsincasto at gmail.com (Dorothy Sincasto) Date: Fri, 21 Sep 2018 06:23:28 -0700 Subject: [FieldTrip] Align freesurfer surface to headmodel In-Reply-To: <52AC72E9-F994-4B04-80F6-1C5608F18F83@donders.ru.nl> References: <52AC72E9-F994-4B04-80F6-1C5608F18F83@donders.ru.nl> Message-ID: Hi Jan-Mathijis Thanks for the suggestion. Now, I load the freesurfer T1.mgz, I change the transformation matrix obtained from the command mri_info --vox2ras-tkr and then I align the T1.mgz and with the obtained transformation matrix I transform the surface. If I create a headmodel from the T1.mgz the surface is perfectly aligned, however, if I use a headmodel from the original mri it is slightly not aligned. For some reason, the T1.mgz headshape alignment is less precise (as measured by the average distance of the polhemus and the scalp points). Do you know why is that? Is it possible to align the subject-space aligned T1.mgz with the subject-space aligned mri? For the posterity that is the code I used: system('mri_info --vox2ras-tkr /path2/T1.mgz > /path2/t1-vox2ras-tkr.xfm') t1 = ft_read_mri('/path2/T1.mgz'); t1.transform = load('/path2/t1-vox2ras-tkr.xfm'); cfg=[]; cfg.method = 'interactive'; cfg.coordsys = 'ctf'; cfg.viewmode = 'ortho'; mri_aligned1 = ft_volumerealign(cfg,t1); cfg=[]; cfg.method = 'headshape'; cfg.headshape.headshape = polhemus; cfg.coordsys = 'ctf'; cfg.headshape.interactive = 'no'; cfg.headshape.icp = 'yes'; cfg.checksize = 1e10 ; % don't remove scalp segmentation from output mri_aligned2 = ft_volumerealign(cfg,mri_aligned1 ); sourcespace = ft_read_headshape({'/path2/surf/lh.white', '/path2/surf/rh.white'}); sourcespace = ft_convert_units(sourcespace, 'mm'); sourcespace = ft_transform_geometry(mri_aligned2.transform/t1.transform, sourcespace); Thanks for your help, Dorothy On Fri, Sep 21, 2018 at 1:35 AM Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Dorothy, > > The best way to do this is indeed to follow the tutorial. If you don’t > want to rerun the freesurfer pipeline things only get complicated. > The code you pasted is not correct, because of the reslicing step in > between. Creating the ’T’ matrix as a combination of two vox2somethingelse > transformation matrices is only allowed if the voxel spaces that correspond > to each of the transformations is identical. > > Best wishes, > > Jan-Mathijs > > PS: If you insist on trying it, the best way to go about this would be to > use the T1w.mgz anatomical image from the freesurfer mri folder for the > headmodel creation. Before the headmodel creation, you probably would want > to coregister this image to the coordinate system of your EEG/MEG sensors. > > > 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 19 Sep 2018, at 22:41, Dorothy Sincasto wrote: > > Dear fieldtrippers > > I would like to align the headmodel of a subject with the > freesurfer surface. It seems that this is a bit different than the > fieldtrip mne tutorial, as we already have the freesurfer surfaces (so we > did not align the mri, save them and run freesurfer). > > To try to convert the freesurface surface coordinates to the subjects MEG > coordinates I do: > > > cfg = []; > cfg.method = 'interactive'; > cfg.coordsys = 'spm'; > mri_spm = ft_volumerealign(cfg, mri); > > > cfg = []; > cfg.resolution = 1; > cfg.dim = [256 256 256]; > mri_spm_rs = ft_volumereslice(cfg, mri); > transform_vox2spm = mri_spm_rs.transform; > > > cfg = []; > cfg.method = 'interactive'; > cfg.coordsys = 'ctf'; > mri_ctf_rs = ft_volumerealign(cfg, mri_spm_rs); > transform_vox2ctf = mri_ctf_rs.transform; > > > T = transform_vox2ctf/transform_vox2spm; > > sourcespace = ft_read_headshape({my_surface} > sourcespace = ft_transform_geometry(T, sourcespace); > > However, although the surface and headmodel is quite aligned, the surface > is a bit lower and posterior than the headmodel, as can be seen in this > screenshot: https://ibb.co/eEVV2K > > We also tried the transformation matrices from freesurfer outputed with > the command mri_info surface.surf > voxel to ras transform: > -1.0000 0.0000 -0.0000 131.6938 > 0.0000 0.0000 1.0000 -111.6126 > -0.0000 -1.0000 -0.0000 157.1196 > 0.0000 0.0000 0.0000 1.0000 > > voxel-to-ras determinant -1 > > ras to voxel transform: > -1.0000 -0.0000 -0.0000 131.6938 > 0.0000 -0.0000 -1.0000 157.1196 > 0.0000 1.0000 0.0000 111.6126 > -0.0000 -0.0000 -0.0000 1.0000 > > But the results are worse. I am a bit desperate in finding a way to align > the surface without having to rerun freesurface on all the subjects. > > Is there a method to properly align the freesurfer surface to the aligned > headmodel? > > Thank you > Dorothy > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bianca.trovo at alumni.unitn.it Fri Sep 21 16:02:57 2018 From: bianca.trovo at alumni.unitn.it (=?UTF-8?Q?Bianca_Trov=C3=B2?=) Date: Fri, 21 Sep 2018 16:02:57 +0200 Subject: [FieldTrip] Error in NM306mag.lay Message-ID: Dear community, I discovered an error in the magnetometer layout file for the Elekta Neuromag system (*/fieldtrip-20180910/template/layout/NM306mag.lay*) present in several Fieldtrip versions (2017 and 2018 at least). Each sensor name should be preceded by the character 'MEG' but instead only the numbers are there. This produces an error in some Fieldtrip functions that try to use the layout (example* ft_databrowser*). To correct just paste the characters 'MEG' in front of every sensor number (or use another layout). Example: *Before* 1 -0.408393 0.273197 0.064507 0.071200 0111 2 -0.328194 0.305701 0.064507 0.071200 0121 3 -0.377055 0.178745 0.064507 0.071200 0131 4 -0.450000 0.110941 0.064507 0.071200 0141 5 -0.310736 0.168122 0.064507 0.071200 0211 6 -0.241095 0.171484 0.064507 0.071200 0221 7 -0.257448 0.057674 0.064507 0.071200 0231 8 -0.326327 0.041365 0.064507 0.071200 0241 *After* 1 -0.408393 0.273197 0.064507 0.071200 MEG0111 2 -0.328194 0.305701 0.064507 0.071200 MEG0121 3 -0.377055 0.178745 0.064507 0.071200 MEG0131 4 -0.450000 0.110941 0.064507 0.071200 MEG0141 5 -0.310736 0.168122 0.064507 0.071200 MEG0211 6 -0.241095 0.171484 0.064507 0.071200 MEG0221 7 -0.257448 0.057674 0.064507 0.071200 MEG0231 8 -0.326327 0.041365 0.064507 0.071200 MEG0241 Thanks, -- *Bianca Trovò* PhD student, Sorbonne Université Cognitive Neuroimaging unit, INSERM U992 Neurospin center, CEA/SAC/DSV/I2BM Bât 145,Point Courier 156, 91191 Gif-sur-Yvette Cedex, FRANCE Phone (office): +33169089319 Email (office): *bianca.trovo at cea.fr * *Unicog Lab Schurger's Team * -------------- next part -------------- An HTML attachment was scrubbed... URL: From gianpaolo.demarchi at gmail.com Fri Sep 21 17:13:51 2018 From: gianpaolo.demarchi at gmail.com (Gianpaolo Demarchi) Date: Fri, 21 Sep 2018 17:13:51 +0200 Subject: [FieldTrip] Error in NM306mag.lay In-Reply-To: References: Message-ID: Hi Bianca, (Cit.) “it’s a feature, not a bug!” It has been there for a while now, see here: http://www.fieldtriptoolbox.org/template/layout#neuromag_array Best, -g > Il giorno 21 set 2018, alle ore 16:02, Bianca Trovò ha scritto: > > Dear community, > > I discovered an error in the magnetometer layout file for the Elekta Neuromag system (/fieldtrip-20180910/template/layout/NM306mag.lay) present in several Fieldtrip versions (2017 and 2018 at least). Each sensor name should be preceded by the character 'MEG' but instead only the numbers are there. This produces an error in some Fieldtrip functions that try to use the layout (example ft_databrowser). > To correct just paste the characters 'MEG' in front of every sensor number (or use another layout). Example: > > Before > 1 -0.408393 0.273197 0.064507 0.071200 0111 > 2 -0.328194 0.305701 0.064507 0.071200 0121 > 3 -0.377055 0.178745 0.064507 0.071200 0131 > 4 -0.450000 0.110941 0.064507 0.071200 0141 > 5 -0.310736 0.168122 0.064507 0.071200 0211 > 6 -0.241095 0.171484 0.064507 0.071200 0221 > 7 -0.257448 0.057674 0.064507 0.071200 0231 > 8 -0.326327 0.041365 0.064507 0.071200 0241 > > After > 1 -0.408393 0.273197 0.064507 0.071200 MEG0111 > 2 -0.328194 0.305701 0.064507 0.071200 MEG0121 > 3 -0.377055 0.178745 0.064507 0.071200 MEG0131 > 4 -0.450000 0.110941 0.064507 0.071200 MEG0141 > 5 -0.310736 0.168122 0.064507 0.071200 MEG0211 > 6 -0.241095 0.171484 0.064507 0.071200 MEG0221 > 7 -0.257448 0.057674 0.064507 0.071200 MEG0231 > 8 -0.326327 0.041365 0.064507 0.071200 MEG0241 > > > Thanks, > -- > Bianca Trovò > > PhD student, Sorbonne Université > Cognitive Neuroimaging unit, INSERM U992 > Neurospin center, CEA/SAC/DSV/I2BM > Bât 145,Point Courier 156, 91191 Gif-sur-Yvette Cedex, FRANCE > Phone (office): +33169089319 > Email (office): bianca.trovo at cea.fr > Unicog Lab Schurger's Team > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bianca.trovo at alumni.unitn.it Fri Sep 21 18:40:19 2018 From: bianca.trovo at alumni.unitn.it (=?UTF-8?Q?Bianca_Trov=C3=B2?=) Date: Fri, 21 Sep 2018 18:40:19 +0200 Subject: [FieldTrip] Error in NM306mag.lay In-Reply-To: References: Message-ID: Alright... Got it, Gianpaolo, thanks! I guess I should study the Fieldtrip documentation better :p Somewhere (somehow) I had a couple of layouts called 'NM306planar_1.lay' and 'NM306planar_2.lay' where the 'MEG' labels is indeed present and I thought those were the good FT ones. Best, B Il giorno ven 21 set 2018 alle ore 17:55 Gianpaolo Demarchi < gianpaolo.demarchi at gmail.com> ha scritto: > Hi Bianca, > (Cit.) “it’s a feature, not a bug!” > > It has been there for a while now, see here: > > http://www.fieldtriptoolbox.org/template/layout#neuromag_array > > Best, > -g > > Il giorno 21 set 2018, alle ore 16:02, Bianca Trovò < > bianca.trovo at alumni.unitn.it> ha scritto: > > Dear community, > > I discovered an error in the magnetometer layout file for the Elekta > Neuromag system (*/fieldtrip-20180910/template/layout/NM306mag.lay*) > present in several Fieldtrip versions (2017 and 2018 at least). Each sensor > name should be preceded by the character 'MEG' but instead only the numbers > are there. This produces an error in some Fieldtrip functions that try to > use the layout (example* ft_databrowser*). > To correct just paste the characters 'MEG' in front of every sensor number > (or use another layout). Example: > > *Before* > 1 -0.408393 0.273197 0.064507 0.071200 0111 > 2 -0.328194 0.305701 0.064507 0.071200 0121 > 3 -0.377055 0.178745 0.064507 0.071200 0131 > 4 -0.450000 0.110941 0.064507 0.071200 0141 > 5 -0.310736 0.168122 0.064507 0.071200 0211 > 6 -0.241095 0.171484 0.064507 0.071200 0221 > 7 -0.257448 0.057674 0.064507 0.071200 0231 > 8 -0.326327 0.041365 0.064507 0.071200 0241 > > *After* > 1 -0.408393 0.273197 0.064507 0.071200 MEG0111 > 2 -0.328194 0.305701 0.064507 0.071200 MEG0121 > 3 -0.377055 0.178745 0.064507 0.071200 MEG0131 > 4 -0.450000 0.110941 0.064507 0.071200 MEG0141 > 5 -0.310736 0.168122 0.064507 0.071200 MEG0211 > 6 -0.241095 0.171484 0.064507 0.071200 MEG0221 > 7 -0.257448 0.057674 0.064507 0.071200 MEG0231 > 8 -0.326327 0.041365 0.064507 0.071200 MEG0241 > > > Thanks, > -- > *Bianca Trovò* > > PhD student, Sorbonne Université > Cognitive Neuroimaging unit, INSERM U992 > Neurospin center, CEA/SAC/DSV/I2BM > Bât 145,Point Courier 156, 91191 Gif-sur-Yvette Cedex, FRANCE > > Phone (office): +33169089319 > Email (office): *bianca.trovo at cea.fr * > *Unicog Lab Schurger's Team > * > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -- *Bianca Trovò* PhD student, Sorbonne Université Cognitive Neuroimaging unit, INSERM U992 Neurospin center, CEA/SAC/DSV/I2BM Bât 145,Point Courier 156, 91191 Gif-sur-Yvette Cedex, FRANCE Phone (office): +33169089319 Email (office): *bianca.trovo at cea.fr * *Unicog Lab Schurger's Team * -------------- next part -------------- An HTML attachment was scrubbed... URL: From pdhami06 at gmail.com Sat Sep 22 16:53:04 2018 From: pdhami06 at gmail.com (Paul Dhami) Date: Sat, 22 Sep 2018 10:53:04 -0400 Subject: [FieldTrip] Is dB baseline normalization following ft_freqanalysis appropriate? Message-ID: Dear Fieldtrip community, I am ultimately hoping to perform the cluster-based permutation testing for comparing potential power differences between two groups. >From my understanding, to facilitate statistical comparisons, baseline normalization is warranted. Would it be appropriate (if at all) to do this baseline normalization right after following ft_freqanalysis? My current frequency preprocessing looks like this for a single subject: % frequency analysis cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.foi = 2:1:40; cfg.t_ftimwin = 2 ./ cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = -0.4:0.01:0.4; dataSPfreq = ft_freqanalysis(cfg, dataSPfreq); %baseline correction cfg = []; cfg.baseline = [-0.4 -0.1]; cfg.baselinetype = 'db'; dataSPfreq = ft_freqbaseline(cfg, dataSPfreq); >From here, I then was hoping to submit my two structures, each containing the single subject preprocessed data from their respective group, to freq_statistics. I initially thought this was fine, but when trying to use ft_singleplotTFR, I ran into this error: Complex values are not supported, which only occurred when I did the baseline correction (I also ran it without any baseline correction and it worked fine). Any insight would be greatly appreciated. Thank you, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.spaak at donders.ru.nl Sun Sep 23 16:23:09 2018 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Sun, 23 Sep 2018 16:23:09 +0200 Subject: [FieldTrip] Is dB baseline normalization following ft_freqanalysis appropriate? In-Reply-To: References: Message-ID: Dear Paul, dB values (10*log10(a/b)) will be complex if and only if the values a or b are negative. ft_freqanalysis should not output negative power values (power is strictly positive). So, my hunch is that something somewhere else in your pipeline is doing this. To track down where the negative/complex numbers occur, it might help if you give your variables distinct names (e.g. "data" for raw data, "freq" for output of ft_freqanalysis, and "freq_bsl" after baseline correction, etc.). (Another hunch, in case it really is just the two snippets you posted: does it matter if you use cfg.output = 'pow' instead of cfg.output = 'powandcsd'?) Hope that helps, cheers, Eelke On Sat, 22 Sep 2018 at 16:53, Paul Dhami wrote: > > Dear Fieldtrip community, > > I am ultimately hoping to perform the cluster-based permutation testing for comparing potential power differences between two groups. > > From my understanding, to facilitate statistical comparisons, baseline normalization is warranted. > > Would it be appropriate (if at all) to do this baseline normalization right after following ft_freqanalysis? > > My current frequency preprocessing looks like this for a single subject: > > > > % frequency analysis > > cfg = []; > > cfg.output = 'powandcsd'; > > cfg.method = 'mtmconvol'; > > cfg.foi = 2:1:40; > > cfg.t_ftimwin = 2 ./ cfg.foi; > > cfg.tapsmofrq = 0.4 *cfg.foi; > > cfg.toi = -0.4:0.01:0.4; > > > > dataSPfreq = ft_freqanalysis(cfg, dataSPfreq); > > > %baseline correction > > cfg = []; > > cfg.baseline = [-0.4 -0.1]; > > cfg.baselinetype = 'db'; > > dataSPfreq = ft_freqbaseline(cfg, dataSPfreq); > > > From here, I then was hoping to submit my two structures, each containing the single subject preprocessed data from their respective group, to freq_statistics. > > > I initially thought this was fine, but when trying to use ft_singleplotTFR, I ran into this error: Complex values are not supported, which only occurred when I did the baseline correction (I also ran it without any baseline correction and it worked fine). > > > Any insight would be greatly appreciated. > > > Thank you, > > Paul > > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From pdhami06 at gmail.com Mon Sep 24 14:16:34 2018 From: pdhami06 at gmail.com (Paul Dhami) Date: Mon, 24 Sep 2018 08:16:34 -0400 Subject: [FieldTrip] Subject: Re: Is dB baseline normalization following ft_freqanalysis appropriate? Message-ID: Dear Eelke, thank you for your response. Here is my full preprocessing for one subject: %%%%%%%%%%%%%%% cfg = [] cfg.dataset = [myTMSEEGs(numSubj).SinglePulse.(curSubjSP{SPnum}).filepath '/' myTMSEEGs(numSubj).SinglePulse.(curSubjSP{SPnum}).filename]; EEG = pop_loadset('filename', myTMSEEGs(numSubj).SinglePulse.(curSubjSP{SPnum}).filename, 'filepath', [myTMSEEGs(numSubj).SinglePulse.(curSubjSP{SPnum}).filepath '/']); % adding trialdef information to configuration file cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = 128; % TMS trigger cfg.trialdef.prestim = 1; cfg.trialdef.poststim = 1; % defining trial cfg = ft_definetrial(cfg); % freq analysis prep dataSP = eeglab2fieldtrip(EEG, 'preprocessing'); dataSP.cfg = cfg; % interpolating NaN values before frequency analysis cfg = []; cfg.prewindow = 0.995; % -5 ms cfg.postwindow = 0.990; % 10 ms cfg.method = 'linear'; dataSP = ft_interpolatenan(cfg, dataSP); % frequency analysis cfg = []; cfg.output = 'powandcsd'; cfg.method = 'mtmconvol'; cfg.foi = 2:1:40; cfg.t_ftimwin = 2 ./ cfg.foi; cfg.tapsmofrq = 0.4 *cfg.foi; cfg.toi = -0.4:0.01:0.4; dataSPfreq = ft_freqanalysis(cfg, dataSP); %baseline correction cfg = []; cfg.baseline = [-0.4 -0.1]; cfg.baselinetype = 'db'; dataSPfreq_bl = ft_freqbaseline(cfg, dataSPfreq); %%%%%%%%%%%%%%%%%%%%%%%% I tried a few things as you suggested: 1. my ft_freqanalysis is only outputting positive values (variable dataSPfreq) and baseline db correction has both positive and negatives (as to be expected) 2. the error was the same between powandcsd 3. I believe the mistake is related to calling for the baseline normalization a second time (cfg.baseline = [-0.4 -0.1] and cfg.baselinetype = 'db'). Once removing these configurations, I was able to use singleplotTFR fine. Would this produce the errors reported earlier? Finally, if the error was related to the aforementioned seconding calling of baseline normalization, and assuming removing it is the correct solution, is it best to perform a baseline normalization following ft_freqanalysis if the goal is to eventually move onto group-differences using the permutation method? Thank you again for your help. Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From ig24 at nyu.edu Mon Sep 24 18:28:42 2018 From: ig24 at nyu.edu (Iris Groen) Date: Mon, 24 Sep 2018 12:28:42 -0400 Subject: [FieldTrip] ft_write_data error for .edf format Message-ID: <0D3A75E2-08AE-40EA-97C5-D596C596B305@nyu.edu> Hello FieldTrippers, I am working on an iEEG dataset. As part of our processing pipeline I convert the data to BIDS format, and I would like to use the basic Fieldtrip functions ft_read_data and ft_write_data to read in my data file, split it up in separate runs, and then write the data out again in the same format (.edf), without applying any processing on the data itself. When I used these functions a few months ago they worked just fine. However, when I use them now I run into a problem. When I read in the original data, edfread throws a warning, but not an error. However, when I read in that data after it has been written out by ft_write_data, it results in an error. This happens even when I read in and write out the exact same file, suggesting there might be something going wrong in the data writing process. Please see below for example code and data. The same error does not appear when I write the data out to brainvision analyzer format, so I could simply switch that format. But I still would like to understand why writing to .edf is resulting in a problem. Many thanks for your help! Best, Iris fileName = 'examplerecording.edf’; % read in the data data_in = ft_read_data(fileName); Warning: channels with different sampling rate not supported, selecting subset of 120 channels at 512.000000 Hz hdr_in = ft_read_header(fileName); Warning: channels with different sampling rate not supported, selecting subset of 120 channels at 512.000000 Hz % write out the data ft_write_data(‘exampledata.edf', data_in, 'header', hdr_in, 'dataformat', 'edf’); % read the data in again data_out = ft_read_data(‘exampledata.edf’); Warning OPENEDF: Failing Physical Minimum, taking Digital Minimum instead Warning OPENEDF: Failing Physical Maximum, taking Digital Maximum instead Index exceeds matrix dimensions. Error in read_edf (line 209) if EDF.Chan_Select(k) Error in ft_read_header (line 775) hdr = read_edf(filename); Error in ft_read_data (line 201) hdr = ft_read_header(filename, 'headerformat', headerformat, 'chanindx', chanindx, 'checkmaxfilter', checkmaxfilter); 209 if EDF.Chan_Select(k) Please find the data file from the example above here: https://nyu.box.com/s/eleoyaiowyfxutrxl2v1j8as6v985rw7 Note on these data: One problem seems to be the different sampling rates of the channels as indicated by the first warning. However, this warning was present before and then it didn’t result in an error when reading in the same data after it had been written out: the two channels with deviating sampling rates were simply dropped (as indicated by the warning), resulting in 120 channels instead of the original 122. But it seems that now when reading in the same data results in another channel being dropped, creating a discrepancy between the number of channels in EDF.Chan_Select (119 in this case) and the number of channels listed in EDF.NS (120). So the issue appears to be with the header channel info - should I perhaps adapt the header info in hdr.orig when writing out the file using ft_write_data? Alternatively, coudl the warning about the physical and digital minima/maxima be an indication of what’s causing this problem? (there is no such warning when reading in the same data after first writing it to brain vision analyzer format). — Iris Groen Postdoctoral Associate New York University 6 Washington Place New York, NY, 10003 iris.groen at nyu.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From tokadome at neuro.med.kyushu-u.ac.jp Tue Sep 25 09:13:03 2018 From: tokadome at neuro.med.kyushu-u.ac.jp (=?utf-8?B?5bKh55WZ5pWP5qi5?=) Date: Tue, 25 Sep 2018 16:13:03 +0900 Subject: [FieldTrip] ft_prepare_mesh ERROR Message-ID: <637223E2-7994-40FF-9D5A-A5C24E5B9374@neuro.med.kyushu-u.ac.jp> Hello fieldtrip experts, when trying to run ‘ft_prepare_mesh’ command from fieldtrip with MATLAB R2018a, I run into the error below. I was preprocessing MRI date according with the paper ’Nature Protocol 2018; 13: 1699-1723. http://doi.org/10.1038/s41596-018-0009-6 ‘. I’m running this on a iMac, macOS High Sierra 10.13.6, with fieldtrip-20180909, freesurfer-Darwin-OSX-stable-pub-v6.0.0-2beb96c. From past archives, I think this is because of SIP. So I disabled SIP of OSX, but I run into same errors. I tried different subjects, which caused similar errors. Any ideas would be greatly appreciated, thank you! [CODE] cfg = []; cfg.method = ‘cortexhull’; cfg.headshape = ; cfg.fshome = ; hull_lh = ft_prepare_mesh (cfg); [ERROR] dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address Referenced from: /Applications/freesurfer/bin/../lib/gcc/lib/libgomp.1.dylib Expected in: /usr/lib/libSystem.B.dylib dyld: Symbol not found: ___emutls_get_address Referenced from: /Applications/freesurfer/bin/../lib/gcc/lib/libgomp.1.dylib Expected in: /usr/lib/libSystem.B.dylib mris_fill -c -r 1 /Users/okadometoshiki/Desktop/SubjectUCI29/freesurfer/surf/lh.pial /private/var/folders/cc/fv5fk09d3hj5g5kx7dg7pqq80000gn/T/tp0a8d7856_136c_4156_bf73_d23f64bbf687_pial.filled.mgz: Aborted reading filled volume... gunzip: can't stat: /private/var/folders/cc/fv5fk09d3hj5g5kx7dg7pqq80000gn/T/tp0a8d7856_136c_4156_bf73_d23f64bbf687_pial.filled.mgz (/private/var/folders/cc/fv5fk09d3hj5g5kx7dg7pqq80000gn/T/tp0a8d7856_136c_4156_bf73_d23f64bbf687_pial.filled.mgz.gz): No such file or directory ERROR: problem reading fname ======== Toshiki Okadome -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.spaak at donders.ru.nl Tue Sep 25 09:39:06 2018 From: e.spaak at donders.ru.nl (Eelke Spaak) Date: Tue, 25 Sep 2018 09:39:06 +0200 Subject: [FieldTrip] Subject: Re: Is dB baseline normalization following ft_freqanalysis appropriate? In-Reply-To: References: Message-ID: Dear Paul, > 3. I believe the mistake is related to calling for the baseline > normalization a second time (cfg.baseline = [-0.4 -0.1] and > cfg.baselinetype = 'db'). Once removing these configurations, I was able to > use singleplotTFR fine. Would this produce the errors reported earlier? > Yes. log(x) when x<0 will yield complex results. So don't do dB baseline more than once. > Finally, if the error was related to the aforementioned seconding calling > of baseline normalization, and assuming removing it is the correct > solution, is it best to perform a baseline normalization following > ft_freqanalysis if the goal is to eventually move onto group-differences > using the permutation method? > This depends on the exact details of your experiment. In general, if you're indeed testing differences between participants, you will indeed want to apply some form of correction for overall power differences due to distance to the sensors etc. Cheers, Eelke > > Thank you again for your help. > > Paul > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nitin.williams at helsinki.fi Tue Sep 25 14:15:50 2018 From: nitin.williams at helsinki.fi (Williams, Nitin J) Date: Tue, 25 Sep 2018 12:15:50 +0000 Subject: [FieldTrip] EEG time-varying networks - paper & code Message-ID: APOLOGIES FOR CROSS-POSTING: Dear all, I am just writing to let you know of our recent paper on a Markov Model-based method to analyse time-varying networks in EEG task-related data: https://doi.org/10.3389/fncom.2018.00076 The method combine sparse-MVAR (Multi Variate Auto Regressive) modelling to estimate networks, with Markov modelling to characterise network changes. We propose this method as complementing existing methods to analyse time-varying networks in EEG/MEG task-related data. MATLAB code for the method can be downloaded from: https://github.com/nitinwilliams/eeg_meg_analysis/tree/master/sMVAR_MM_toolbox Any comments/questions on the method/code are of course welcome. Regards, Nitin -------------- next part -------------- An HTML attachment was scrubbed... URL: From maria.hakonen at gmail.com Wed Sep 26 11:15:17 2018 From: maria.hakonen at gmail.com (Maria Hakonen) Date: Wed, 26 Sep 2018 12:15:17 +0300 Subject: [FieldTrip] =?utf-8?q?How_to_move_subjects=E2=80=99_heads_into_a?= =?utf-8?q?_same_position=3F?= Message-ID: Hi all, I wonder if field trip has any function that could be used to transfer all the subjects’ heads into a same position, so that the sensors correspond better to each other? I have done this before using maxfilter with -trans option. However, I don't have neuromag data now and, therefore, I can't use maxfilter. Best, Maria -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.Arana at donders.ru.nl Wed Sep 26 11:24:34 2018 From: S.Arana at donders.ru.nl (Arana, S.L. (Sophie)) Date: Wed, 26 Sep 2018 09:24:34 +0000 Subject: [FieldTrip] =?windows-1252?q?How_to_move_subjects=92_heads_into_?= =?windows-1252?q?a_same_position=3F?= In-Reply-To: References: Message-ID: Hi Maria, ft_megrealign might be what you are looking for. http://www.fieldtriptoolbox.org/reference/ft_megrealign Cheers, Sophie ________________________________ From: fieldtrip [fieldtrip-bounces at science.ru.nl] on behalf of Maria Hakonen [maria.hakonen at gmail.com] Sent: Wednesday, September 26, 2018 11:15 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] How to move subjects’ heads into a same position? Hi all, I wonder if field trip has any function that could be used to transfer all the subjects’ heads into a same position, so that the sensors correspond better to each other? I have done this before using maxfilter with -trans option. However, I don't have neuromag data now and, therefore, I can't use maxfilter. Best, Maria -------------- next part -------------- An HTML attachment was scrubbed... URL: From maria.hakonen at gmail.com Wed Sep 26 12:42:38 2018 From: maria.hakonen at gmail.com (Maria Hakonen) Date: Wed, 26 Sep 2018 13:42:38 +0300 Subject: [FieldTrip] =?utf-8?q?How_to_move_subjects=E2=80=99_heads_into_a?= =?utf-8?q?_same_position=3F?= In-Reply-To: References: Message-ID: Thanks a lot! ft_mergealign seems to need the head model. Could you please yet let me know it is possible to create the head model without mri data? Best, Maria ke 26. syysk. 2018 klo 12.35 Arana, S.L. (Sophie) (S.Arana at donders.ru.nl) kirjoitti: > Hi Maria, > > ft_megrealign might be what you are looking for. > http://www.fieldtriptoolbox.org/reference/ft_megrealign > > Cheers, > Sophie > ------------------------------ > *From:* fieldtrip [fieldtrip-bounces at science.ru.nl] on behalf of Maria > Hakonen [maria.hakonen at gmail.com] > *Sent:* Wednesday, September 26, 2018 11:15 AM > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] How to move subjects’ heads into a same position? > > Hi all, > > I wonder if field trip has any function that could be used to transfer > all the subjects’ heads into a same position, so that the sensors > correspond better to each other? I have done this before using maxfilter > with -trans option. However, I don't have neuromag data now and, > therefore, I can't use maxfilter. > > Best, > Maria > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From S.Homolle at donders.ru.nl Wed Sep 26 13:46:35 2018 From: S.Homolle at donders.ru.nl (=?Windows-1252?Q?Hom=F6lle=2C_S=2E_=28Simon=29?=) Date: Wed, 26 Sep 2018 11:46:35 +0000 Subject: [FieldTrip] =?windows-1252?q?How_to_move_subjects=92_heads_into_?= =?windows-1252?q?a_same_position=3F?= In-Reply-To: References: , Message-ID: <2247A6E8AF3DB04AAB11BDDD86B72F838FDE111A@EXPRD98.hosting.ru.nl> Dear Maria, the easiest way to use a headmodel without the mri, is to use a template head model. You can find some info about under http://www.fieldtriptoolbox.org/template Cheers, Simon Homölle PhD Candidate Donders Institute for Brain, Cognition and Behaviour Centre for Cognitive Neuroimaging Radboud University Nijmegen Phone: +31-(0)24-36-65059 ________________________________ From: fieldtrip [fieldtrip-bounces at science.ru.nl] on behalf of Maria Hakonen [maria.hakonen at gmail.com] Sent: Wednesday, September 26, 2018 12:42 PM To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] How to move subjects’ heads into a same position? Thanks a lot! ft_mergealign seems to need the head model. Could you please yet let me know it is possible to create the head model without mri data? Best, Maria ke 26. syysk. 2018 klo 12.35 Arana, S.L. (Sophie) (S.Arana at donders.ru.nl) kirjoitti: Hi Maria, ft_megrealign might be what you are looking for. http://www.fieldtriptoolbox.org/reference/ft_megrealign Cheers, Sophie ________________________________ From: fieldtrip [fieldtrip-bounces at science.ru.nl] on behalf of Maria Hakonen [maria.hakonen at gmail.com] Sent: Wednesday, September 26, 2018 11:15 AM To: fieldtrip at science.ru.nl Subject: [FieldTrip] How to move subjects’ heads into a same position? Hi all, I wonder if field trip has any function that could be used to transfer all the subjects’ heads into a same position, so that the sensors correspond better to each other? I have done this before using maxfilter with -trans option. However, I don't have neuromag data now and, therefore, I can't use maxfilter. Best, Maria _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: From stieg030 at umn.edu Thu Sep 27 16:29:07 2018 From: stieg030 at umn.edu (James Stieger) Date: Thu, 27 Sep 2018 10:29:07 -0400 Subject: [FieldTrip] FT_STATFUN_DEPSAMPLESREGRT Across Subjects For Cluster Based Permutation Test Message-ID: Hello Fieldtrip! I am hoping to extend the technique outlined in the following page to behavioral data across time. http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables?s[]=regression I have behavioral data for each subject over a series of experiments and I want to test whether changes in averaged topographic frequency information is related to these behavioral changes over time across a population of subjects. The way I was hoping to code this up is as follows: subject 1 behavioral data = [0.3 0.6 0.9] subject 2 behavioral data = [0.2 0.6 0.75] cfg.statistic = ft_statfun_depsamplesregt; design(1,:) = [0.3 0.6 0.9 0.2 0.6 0.75] design(2,:) = [1 1 1 1 2 2 2 2] cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; I am assuming here that the unit of observation is subjects and I have a time series of variables for each subject placed in ivar. finally the input to ft_freqstatistics will be an averaged struct and the powspctrm with have dimord = subject_channel_frequency_time. Am I doing this correctly? Will this work? If not, do you have any suggestions for how to continue? Additionally some subjects participated in 7 experiments and some participated in 10. Can I NaN out the missing data, or should I limit this analysis to the experiments that all subjects participated in? Thanks for the help! James -------------- next part -------------- An HTML attachment was scrubbed... URL: From gio at gpiantoni.com Fri Sep 28 12:03:32 2018 From: gio at gpiantoni.com (Gio Piantoni) Date: Fri, 28 Sep 2018 12:03:32 +0200 Subject: [FieldTrip] ft_write_data error for .edf format In-Reply-To: <0D3A75E2-08AE-40EA-97C5-D596C596B305@nyu.edu> References: <0D3A75E2-08AE-40EA-97C5-D596C596B305@nyu.edu> Message-ID: Hi Iris, Thanks for sharing the data and the clear description of the problem. The issue is not the sampling rate but the physical range of some of your channels. And you're right that it's a problem in writing EDF files, not reading them in (i.e. ft_write_data fails in this case and 'exampledata.edf' is not a legal EDF file). If you want to track down the issue, check "write_edf.m", where physMin and physMax should be 960 characters long (120 channels x 8 bytes) but in your case, they are 966 and 963. So, there will be a small offset in the header and read_edf.m (or any other EDF reader) cannot make sense of it. F.e. your channel 117 has a physical minimum of -2038879.22647786, which then becomes: sprintf('%-8g', -2038879.22647786) '-2.03888e+06' (which is longer than 8 characters). The scaling number "-2038879.22647786" is computed by write_edf.m following a heuristic approach. In this case, the range is too large to be represented with sprintf. Some of the options are: 1) fix the sprintf syntax 2) use a more robust approach to estimating the scaling 3) use brainvision analyzer format I wouldn't know how to solve 1) and 2) in a reliable way, so I suggest you go for 3)... Hope this helps, -g PS: I'm surprised you said that it used to work fine a few months ago. I tested some older commits that affected edf functions (d2b408d9ab6e1baf64659de2c2a6132d743fe34e b51f1c13d30fc8ecd7359f54ec2e4be5841aa6bf 998cda7bef2a9c4506c8b8292095e364e5eca9ec 885e6ec0a6da3c193c506114812ec8a4cb494e9a) and your MWE always throws some kind of error. On Mon, Sep 24, 2018 at 6:33 PM Iris Groen wrote: > > Hello FieldTrippers, > > I am working on an iEEG dataset. As part of our processing pipeline I convert the data to BIDS format, and I would like to use the basic Fieldtrip functions ft_read_data and ft_write_data to read in my data file, split it up in separate runs, and then write the data out again in the same format (.edf), without applying any processing on the data itself. > > When I used these functions a few months ago they worked just fine. However, when I use them now I run into a problem. When I read in the original data, edfread throws a warning, but not an error. However, when I read in that data after it has been written out by ft_write_data, it results in an error. This happens even when I read in and write out the exact same file, suggesting there might be something going wrong in the data writing process. > > Please see below for example code and data. The same error does not appear when I write the data out to brainvision analyzer format, so I could simply switch that format. But I still would like to understand why writing to .edf is resulting in a problem. > > Many thanks for your help! > > Best, > Iris > > fileName = 'examplerecording.edf’; > > % read in the data > data_in = ft_read_data(fileName); > Warning: channels with different sampling rate not supported, selecting subset of 120 channels at 512.000000 Hz > hdr_in = ft_read_header(fileName); > Warning: channels with different sampling rate not supported, selecting subset of 120 channels at 512.000000 Hz > > % write out the data > ft_write_data(‘exampledata.edf', data_in, 'header', hdr_in, 'dataformat', 'edf’); > > % read the data in again > data_out = ft_read_data(‘exampledata.edf’); > > Warning OPENEDF: Failing Physical Minimum, taking Digital Minimum instead > Warning OPENEDF: Failing Physical Maximum, taking Digital Maximum instead > Index exceeds matrix dimensions. > Error in read_edf (line 209) > if EDF.Chan_Select(k) > Error in ft_read_header (line 775) > hdr = read_edf(filename); > Error in ft_read_data (line 201) > hdr = ft_read_header(filename, 'headerformat', headerformat, 'chanindx', chanindx, 'checkmaxfilter', checkmaxfilter); > 209 if EDF.Chan_Select(k) > > > Please find the data file from the example above here: > https://nyu.box.com/s/eleoyaiowyfxutrxl2v1j8as6v985rw7 > > Note on these data: One problem seems to be the different sampling rates of the channels as indicated by the first warning. However, this warning was present before and then it didn’t result in an error when reading in the same data after it had been written out: the two channels with deviating sampling rates were simply dropped (as indicated by the warning), resulting in 120 channels instead of the original 122. But it seems that now when reading in the same data results in another channel being dropped, creating a discrepancy between the number of channels in EDF.Chan_Select (119 in this case) and the number of channels listed in EDF.NS (120). So the issue appears to be with the header channel info - should I perhaps adapt the header info in hdr.orig when writing out the file using ft_write_data? Alternatively, coudl the warning about the physical and digital minima/maxima be an indication of what’s causing this problem? (there is no such warning when reading in the same data after first writing it to brain vision analyzer format). > > — > > Iris Groen > Postdoctoral Associate > New York University > 6 Washington Place > New York, NY, 10003 > iris.groen at nyu.edu > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From mona at sdsc.edu Fri Sep 28 16:38:03 2018 From: mona at sdsc.edu (Wong-Barnum, Mona) Date: Fri, 28 Sep 2018 14:38:03 +0000 Subject: [FieldTrip] mailing list archive and search? Message-ID: Hi: Is this mailing list archived and searchable? Mona ********************************************* Mona Wong Web & Mobile Application Developer San Diego Supercomputer Center "Nothing is impossible, the word itself says 'I'm possible'!" --- Audrey Hepburn ********************************************* From athierfelder at tuebingen.mpg.de Fri Sep 28 17:49:08 2018 From: athierfelder at tuebingen.mpg.de (Annika Thierfelder) Date: Fri, 28 Sep 2018 17:49:08 +0200 Subject: [FieldTrip] mailing list archive and search? In-Reply-To: References: Message-ID: Hi Mona, this might be what you are looking for: https://mailman.science.ru.nl/pipermail/fieldtrip/ I don't know if it is searchable per se, but if you google search your question with the addition " site:mailman.science.ru.nl " in the query, you should only get results from this site. Hope this helps! Best, Annika On 9/28/2018 4:38 PM, Wong-Barnum, Mona wrote: > Hi: > > Is this mailing list archived and searchable? > > Mona > > ********************************************* > Mona Wong > Web & Mobile Application Developer > San Diego Supercomputer Center > > "Nothing is impossible, the word > itself says 'I'm possible'!" > --- Audrey Hepburn > ********************************************* > > > _______________________________________________ > fieldtrip mailing list > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip > https://doi.org/10.1371/journal.pcbi.1002202 From a.stolk8 at gmail.com Sat Sep 29 07:50:54 2018 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Fri, 28 Sep 2018 22:50:54 -0700 Subject: [FieldTrip] ft_prepare_mesh ERROR In-Reply-To: <637223E2-7994-40FF-9D5A-A5C24E5B9374@neuro.med.kyushu-u.ac.jp> References: <637223E2-7994-40FF-9D5A-A5C24E5B9374@neuro.med.kyushu-u.ac.jp> Message-ID: Dear Toshiki, >From that error, it seems your version of Freesurfer is referencing libraries that do not exist while executing the *mris_fill *command. To rule out that the issue is due to the call to *mris_fill* being made from within the matlab environment as *prepare_mesh_cortexhull* does, you could try to call *mris_fill* directly from within a terminal and see if it replicates, as follows: export FREESURFER_HOME=/Applications/freesurfer source $FREESURFER_HOME/SetUpFreeSurfer.sh mris_fill -c -r 1 path_to_freesurfer/surf/lh.pial tmp.filled.mgz If that reproduces the error, it might be worth consulting the Freesurfer development team concerning this. A similar issue was reported here , but it doesn't look like a fix has been suggested. Alternatively, you could try a different version of Freesurfer for creating the cortical hull ( freesurfer-Darwin-lion-stable-pub-v5.3.0 runs fine on my mac). Hope this helps, Arjen On Sep 25, 2018, at 12:13 AM, 岡留敏樹 wrote: Hello fieldtrip experts, when trying to run ‘ft_prepare_mesh’ command from fieldtrip with MATLAB R2018a, I run into the error below. I was preprocessing MRI date according with the paper ’Nature Protocol 2018; 13: 1699-1723. http://doi.org/10.1038/s41596-018-0009-6 ‘. I’m running this on a iMac, macOS High Sierra 10.13.6, with fieldtrip-20180909, freesurfer-Darwin-OSX-stable-pub-v6.0.0-2beb96c. >From past archives, I think this is because of SIP. So I disabled SIP of OSX, but I run into same errors. I tried different subjects, which caused similar errors. Any ideas would be greatly appreciated, thank you! [CODE] cfg = []; cfg.method = ‘cortexhull’; cfg.headshape = ; cfg.fshome = ; hull_lh = ft_prepare_mesh (cfg); [ERROR] dyld: lazy symbol binding failed: Symbol not found: ___emutls_get_address Referenced from: /Applications/freesurfer/bin/../lib/gcc/lib/libgomp.1.dylib Expected in: /usr/lib/libSystem.B.dylib dyld: Symbol not found: ___emutls_get_address Referenced from: /Applications/freesurfer/bin/../lib/gcc/lib/libgomp.1.dylib Expected in: /usr/lib/libSystem.B.dylib mris_fill -c -r 1 /Users/okadometoshiki/Desktop/SubjectUCI29/freesurfer/surf/lh.pial /private/var/folders/cc/fv5fk09d3hj5g5kx7dg7pqq80000gn/T/tp0a8d7856_136c_4156_bf73_d23f64bbf687_pial.filled.mgz: Aborted reading filled volume... gunzip: can't stat: /private/var/folders/cc/fv5fk09d3hj5g5kx7dg7pqq80000gn/T/tp0a8d7856_136c_4156_bf73_d23f64bbf687_pial.filled.mgz (/private/var/folders/cc/fv5fk09d3hj5g5kx7dg7pqq80000gn/T/tp0a8d7856_136c_4156_bf73_d23f64bbf687_pial.filled.mgz.gz): No such file or directory ERROR: problem reading fname ======== Toshiki Okadome _______________________________________________ fieldtrip mailing list https://mailman.science.ru.nl/mailman/listinfo/fieldtrip https://doi.org/10.1371/journal.pcbi.1002202 -------------- next part -------------- An HTML attachment was scrubbed... URL: