From lindseyrtate at ou.edu Sat Aug 1 01:29:05 2015 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Fri, 31 Jul 2015 23:29:05 +0000 Subject: [FieldTrip] Virtual EOG Channel Message-ID: <69FCE2607D920B4D97BD3BA9941176E70166A300F4@it-osmium.sooner.net.ou.edu> Hello community, My name is Lindsey Tate, and I'm a PhD student at the University of Oklahoma. I'm starting work on a project analyzing data that my mentor collected previously at another institution. This data includes EEG and MEG during a saccade and anti-saccade task. My mentor previously used BESA which I have no access to currently but may have limited access to in the future. She explained that when they collected the data they didn't collect EOG channels to measure eye movements because these movements can be picked up by other channels, and in BESA there is a short process to creating a "virtual EOG" channel from the other/nearby channels. I can't find any documentation of someone doing this outside of BESA. Has anyone ever done this before in FieldTrip? If so, how did you do it and how were the results? If not, do you have ideas about how you could do such a thing? Thank you in advance for any help or advice you can offer, Lindsey -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Aug 3 08:02:16 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 3 Aug 2015 06:02:16 +0000 Subject: [FieldTrip] Virtual EOG Channel In-Reply-To: <69FCE2607D920B4D97BD3BA9941176E70166A300F4@it-osmium.sooner.net.ou.edu> References: <69FCE2607D920B4D97BD3BA9941176E70166A300F4@it-osmium.sooner.net.ou.edu> Message-ID: Hi Lindsey, You might want to have a look at some parts of the following page: http://www.fieldtriptoolbox.org/example/preprocessing_eeg?s[]=rereferencing I think it contains the information that you are looking for. Best wishes, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org On Aug 1, 2015, at 1:29 AM, Tate, Lindsey R. > wrote: Hello community, My name is Lindsey Tate, and I'm a PhD student at the University of Oklahoma. I'm starting work on a project analyzing data that my mentor collected previously at another institution. This data includes EEG and MEG during a saccade and anti-saccade task. My mentor previously used BESA which I have no access to currently but may have limited access to in the future. She explained that when they collected the data they didn't collect EOG channels to measure eye movements because these movements can be picked up by other channels, and in BESA there is a short process to creating a "virtual EOG" channel from the other/nearby channels. I can't find any documentation of someone doing this outside of BESA. Has anyone ever done this before in FieldTrip? If so, how did you do it and how were the results? If not, do you have ideas about how you could do such a thing? Thank you in advance for any help or advice you can offer, Lindsey _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Aug 3 09:37:58 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 3 Aug 2015 09:37:58 +0200 Subject: [FieldTrip] Effect of cfg.minnbchan In-Reply-To: References: Message-ID: <007e01d0cdbf$51a83490$f4f89db0$@artinis.com> Dear Marlies, if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: % For every (time,frequency)-element, it is calculated how many significant % neighbours .this channel has If a significant channel has less than minnbchan % significant neighbours, then this channel is removed from onoff. If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers Sent: Friday, July 31, 2015 3:27 PM To: fieldtrip, donders Subject: [FieldTrip] Effect of cfg.minnbchan Dear Fieldtrippers. I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. The code I used to run this analysis is pasted below. Thanks in advance! Best, Marlies Marlies Vissers PhD student University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl --- % Import the electrode labels from an EEGlab set elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); % Create matrix with TF data freqData.freq = frex; % Frequenies of TF matrix freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix freqData.dimord = 'subj_chan_freq_time'; freqData.label = elec.label; freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time % Create matrix with behavioral data, make sure the sizes match behav.freq = frex; behav.time = tx(TF_idx(1):TF_idx(2))./1000; behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix behav.label = elec.label; behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctr m,4)]); % accEffect is 1*subj array % Set configuration for perm test % Create cfg and insert parameters cfg = []; cfg.latency = [0 1.250]; cfg.frequency = [2 30]; cfg.channel ='all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_intersubcorr'; cfg.type = ft_getopt(cfg, 'type', 'Spearman'); cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; cfg_neighb.method = 'template'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); % Create design mat subj = 31; design = zeros(2,2*subj); for i = 1:subj design(2,i) = i; end for i = 1:subj design(2,subj+i) = i; end design(1,1:subj) = 1; design(1,subj+1:2*subj) = 2; cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; % Run stats [stat] = ft_freqstatistics(cfg,freqData,behav); -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Aug 3 09:56:41 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 3 Aug 2015 07:56:41 +0000 Subject: [FieldTrip] Undefined function or variable "lab" In-Reply-To: References: Message-ID: <77A6E025-667C-4255-BF8B-B22197BF3678@fcdonders.ru.nl> Hi Ervin, Given the information provided, it’s still hard to tell what might be going on. What version of FieldTrip are you using, and what does dataTarget.elec look like? What do your colleagues have to say about this? (The reason for the last question is, that they most likely have most hands-on experience with the quirks of the particular dataformat you are working with, and thus will be able to provide more specific input than the people who occasionally read posts on this list). Also, the statement that an ‘older version of fieldtrip works’ is quite unspecific (e.g. are your colleagues using a 2009-version of the code, or a more recent one :o)? Is there code totally unmodified, or did they made some code changes in order for it to work?), so I don’t think that this is going to bring you close to a solution. Yet, I think it is good diagnostic information to know that somewhere in the past ‘it’ seemed to work, either with or without local changes. Would it make sense for you to team up with your colleagues to find on what’s going on? Best, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org On Jul 31, 2015, at 2:00 PM, Poljac, E. (Ervin) > wrote: Anyone an idea of what might be wrong here? Much appreciated, Ervin ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Poljac, E. (Ervin) [ervin.poljac at donders.ru.nl] Sent: Monday, July 27, 2015 1:54 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Undefined function or variable "lab" Hello fieldtrippers, I am trying to prepare my EEG data for analysis. Among others, I identify bad channels and try to repair them. However, there is this annoying error: Undefined function or variable "lab". Error in channelposition (line 314) n = size(lab,2); Error in ft_datatype_sens (line 329) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_raw (line 146) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 225) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_channelrepair (line 102) data = ft_checkdata(data, 'datatype', 'raw', 'feedback', 'yes'); In the debug mode I see that the variable 'sens' has a correct value, the bad channel seems to be identified, but then for some reason, lab is not filled. I am copy-pasting that part of my code below. I hope someone has experience with this and how to solve it. Some of my colleagues use an older fieldtrip version that works (so, no error there), and I compared the filein s ft_checkdata, ft_datatype_sens and ft_datatype_sens, they are different, but it is not obvious to me what exactly is new, causing the error. Many thanks, Ervin My code: %% channel rejection, identifying bad channels for target condition cfg=[]; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = [50];% frequency band - foilim or just foi?? rejectedData=ft_freqanalysis(cfg,dataTarget); idx=unique([find(rejectedData.powspctrm>0.5*10^4)]); %this threshold might change for each recording neighbours=open('/Users/Ervin/Documents/MATLAB/biosemi64_neighb.mat'); neighbours=neighbours.neighbours; cfg = []; cfg.channel = rejectedData.label; cfg.layout = 'biosemi64.lay'; cfg.feedback = 'yes'; lay = ft_prepare_layout(cfg); if ~isempty(idx) badchannels=cell(numel(idx),1); [badchannels{1:numel(idx),1}] = deal(rejectedData.label{idx}); % Interpolation for rejected channels cfg=[]; cfg.layout=lay; cfg.badchannel=badchannels; dataTarget.elec.label = dataTarget.label; dataTarget.elec.pnt = lay.pos; cfg.neighbours=neighbours; dataTargetRepaired=ft_channelrepair(cfg, dataTarget); end -- Ervin Poljac, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition (DCC) Radboud University Nijmegen Room B.00.78A Montessorilaan 3 6500 HE Nijmegen T. 024 36 15457 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Mon Aug 3 12:29:22 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Mon, 3 Aug 2015 10:29:22 +0000 (UTC) Subject: [FieldTrip] ft_checkconfig Message-ID: <1647214019.423212.1438597762591.JavaMail.yahoo@mail.yahoo.com> Hi, I am new in fieldtrip. I am trying to create a realtime EEG data from bioamplifier.I call ft_realtime_signalviewer function and receives this error : cfg = ft_checkconfig(cfg,'dataset2files', 'yes'); I am using Matlab 2013, 64 bits windows 7. Any help is very helpful.  Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From elmeri.syrjanen at gmail.com Mon Aug 3 15:16:10 2015 From: elmeri.syrjanen at gmail.com (=?UTF-8?Q?Elmeri_Syrj=C3=A4nen?=) Date: Mon, 3 Aug 2015 15:16:10 +0200 Subject: [FieldTrip] Virtual EOG Channel In-Reply-To: References: <69FCE2607D920B4D97BD3BA9941176E70166A300F4@it-osmium.sooner.net.ou.edu> Message-ID: Hi, here is some code that works well for me: % Create a virtual channel of frontal electrodes for finding eye-blinks cfg = []; cfg.layout = 'biosemi128.lay'; cfg.channel = {'C30', 'C29', 'C17', 'C16', 'C8'}; EOGdata = ft_preprocessing(cfg, ERPdata); cfg = []; cfg.avgoverchan = 'yes'; EOGdata = ft_selectdata(cfg, EOGdata); EOGdata.label = {'EOG'}; /elmeri On Mon, Aug 3, 2015 at 8:02 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Lindsey, > > You might want to have a look at some parts of the following page: > http://www.fieldtriptoolbox.org/example/preprocessing_eeg?s[]=rereferencing > I think it contains the information that you are looking for. > > Best wishes, > Jan-Mathijs > > > Jan-Mathijs Schoffelen, MD PhD, Senior researcher > > Max Planck Institute for Psycholinguistics > Donders Centre for Cognitive Neuroimaging > > E-mail: j.schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > http://www.fieldtriptoolbox.org > > > > On Aug 1, 2015, at 1:29 AM, Tate, Lindsey R. wrote: > > Hello community, > > My name is Lindsey Tate, and I'm a PhD student at the University of > Oklahoma. I'm starting work on a project analyzing data that my mentor > collected previously at another institution. This data includes EEG and MEG > during a saccade and anti-saccade task. My mentor previously used BESA > which I have no access to currently but may have limited access to in the > future. She explained that when they collected the data they didn't collect > EOG channels to measure eye movements because these movements can be picked > up by other channels, and in BESA there is a short process to creating a > "virtual EOG" channel from the other/nearby channels. I can't find any > documentation of someone doing this outside of BESA. > > Has anyone ever done this before in FieldTrip? If so, how did you do it > and how were the results? If not, do you have ideas about how you could do > such a thing? > > Thank you in advance for any help or advice you can offer, > Lindsey > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Tue Aug 4 11:31:52 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Tue, 4 Aug 2015 09:31:52 +0000 (UTC) Subject: [FieldTrip] realtime TMS-EEG Message-ID: <191681055.167105.1438680712821.JavaMail.yahoo@mail.yahoo.com> Hi, I'm using TMSI Porti and I want to record the data in realtime.However, it is not working when I used the ft_realtime_signalviewer.Does I miss any step? Any solution guys? Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Tue Aug 4 11:59:08 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Tue, 4 Aug 2015 09:59:08 +0000 Subject: [FieldTrip] realtime TMS-EEG In-Reply-To: <191681055.167105.1438680712821.JavaMail.yahoo@mail.yahoo.com> References: <191681055.167105.1438680712821.JavaMail.yahoo@mail.yahoo.com> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB51857F@exprd01.hosting.ru.nl> Dear Wan, Please have a look at this page: http://www.fieldtriptoolbox.org/development/realtime (also specific to TMSi: http://www.fieldtriptoolbox.org/development/realtime/tmsi) The pages might not be fully up to date but they should help you get started. If you then run into problems please help us help you by supplying the following: § The cfg you used § The fields of your data structure § The line you called that gave an error / that you would like to ask a question on § The exact error message you got Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of wan amirah Wan azlan Sent: dinsdag 4 augustus 2015 11:32 To: fieldtrip at science.ru.nl Subject: [FieldTrip] realtime TMS-EEG Hi, I'm using TMSI Porti and I want to record the data in realtime. However, it is not working when I used the ft_realtime_signalviewer. Does I miss any step? Any solution guys? Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bushra.riaz at gu.se Tue Aug 4 14:48:15 2015 From: bushra.riaz at gu.se (Bushra Riaz Syeda) Date: Tue, 4 Aug 2015 12:48:15 +0000 Subject: [FieldTrip] 2 days left! Post-doc position in MEG for children with brain cancer... Message-ID: Just a reminder since the deadline is approaching... ________________________________ From: Justin Schneiderman Subject: Post-doc position in MEG for children with brain cancer... Dear colleagues and friends, I'm pleased to announce an open position in our growing MEG group: Postdoctoral researcher in MEG for children with brain cancer at MedTech West (www.medtechwest.se) and the University of Gothenburg Institute of Neuroscienceand Physiology (http://neurophys.gu.se/english) in collaboration with the Sahlgrenska University Hospital, Queen Silvia Children's Hospital, and Sweden's MEG lab at Karolinska Institutet, NatMEG (www.natmeg.se). More information about the position and application procedure can be found here: http://www.gu.se/english/about_the_university/announcements-in-the-job-application-portal/?languageId=100001&disableRedirect=true&returnUrl=http%3A%2F%2Fwww.gu.se%2Fomuniversitetet%2Faktuellt%2Fledigaanstallningar%2F%3Fid%3D19144%26Dnr%3D712083%26Type%3DS&Dnr=712083&Type=S Please forward this to colleagues, soon-to-graduate PhD students, and others that might be interested. Application deadline is 6 AUG. Thanks! -Justin MedTech West http://www.medtechwest.se Institute of Neuroscience and Physiology Sahlgrenska Academy & University of Gothenburg? -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Tue Aug 4 16:36:49 2015 From: caspervanheck at gmail.com (Casper van Heck) Date: Tue, 4 Aug 2015 16:36:49 +0200 Subject: [FieldTrip] Fourier analysis units Message-ID: Dear fellow Fieldtrippers, I've made some Fourier analyses using *ft_freqanalysis* with *cfg.method = 'mtmfft'*, and found something worth reporting. However, Fieldtrip does not report the units. Looking at conversations in the Fieldtrip discussion archive, it would seem this question has either been sidestepped or not answered in the past, so I'd like to ask this question again. Does anybody know? Best regards, Casper -------------- next part -------------- An HTML attachment was scrubbed... URL: From marliesvissers at gmail.com Tue Aug 4 16:38:57 2015 From: marliesvissers at gmail.com (Marlies Vissers) Date: Tue, 4 Aug 2015 16:38:57 +0200 Subject: [FieldTrip] Effect of cfg.minnbchan In-Reply-To: <007e01d0cdbf$51a83490$f4f89db0$@artinis.com> References: <007e01d0cdbf$51a83490$f4f89db0$@artinis.com> Message-ID: Dear Jörn, Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error *‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’*. If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? Thanks in advance! Best, Marlies On 3 August 2015 at 09:37, Jörn M. Horschig wrote: > Dear Marlies, > > > > if I am not mistaken, the minnbchan option checks indeed if every channels > in a cluster has at least the specified amount of channels in it and > removes it otherwise. The code is documented as follows: > > % For every (time,frequency)-element, it is calculated how many > significant > > % neighbours .this channel has If a significant channel has less than > minnbchan > > % significant neighbours, then this channel is removed from onoff. > > > > If something went wrong is hard to tell – it also depends on how the > neighbor structure looks like. If you do not have C3 or C1, then C5 can > indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz > could be called a neighbor of FC4. You can check how neighbors are defined > by using ft_neighbourplot. That’s the first check I’d do. > > > > Best, > > Jörn > > > > > > *--* > > > > *Jörn M. Horschig, PhD*, Software Engineer > > Artinis Medical Systems | +31 481 350 980 > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Marlies Vissers > *Sent:* Friday, July 31, 2015 3:27 PM > *To:* fieldtrip, donders > *Subject:* [FieldTrip] Effect of cfg.minnbchan > > > > Dear Fieldtrippers. > > > > I have a question about the effect of the tuning parameter cfg.minnbchan > when performing cluster based permutation testing, since the spatial > characteristics of my clusters differ from what I expected to find given > the settings I used. > > > > I am running cross-subject correlations (n=31) between a behavioral > variable and a subj*channel*time*frequency matrix with power data > (preprocessed using EEGlab and decomposed outside of Fieldtrip), using > ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd > like to avoid finding clusters with difficult-to-interpret shapes, I set > cfg.minnbchan to 2. > > > > My concern however, is that the resulting clusters do not always exist of > neighbouring electrodes. For example, one of the resulting clusters is > located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected > through the other dimensions (time & frequency). In one of Eric Maris' > previous replies to an older post about cfg.minnbchan, I read that the > parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. > Does this mean that any cluster without spatially neighbouring electrodes > should have been rejected when minnbchan is set to 2? > > > > I would be very grateful if someone could let me know whether setting > cfg.minnbchan to 2 can -in principle- still yield clusters with > spatially-non-adjacent electrodes, or whether this result is likely due to > an error in my code. If the latter, I'd very much appreciate advice on > checks I could perform to detect the potential error. > > > > The code I used to run this analysis is pasted below. > > > > Thanks in advance! > > > > Best, > > Marlies > > > > Marlies Vissers > > PhD student > > > > University of Amsterdam | Department Brain and Cognition | Cognition and > Plasticity Laboratory > > Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl > > > > --- > > > > % Import the electrode labels from an EEGlab set > > elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); > > > > % Create matrix with TF data > > freqData.freq = frex; % Frequenies > of TF matrix > > freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix > > freqData.dimord = 'subj_chan_freq_time'; > > freqData.label = elec.label; > > freqData.powspctrm = tempTF; % tempTF is matrix with > subj*channels*freq*time > > > > % Create matrix with behavioral data, make sure the sizes match > > behav.freq = frex; > > behav.time = tx(TF_idx(1):TF_idx(2))./1000; > > behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is > just behavioral data in this matrix > > behav.label = elec.label; > > behav.powspctrm = repmat(accEffect,[1 > size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); > % accEffect is 1*subj array > > > > % Set configuration for perm test > > % Create cfg and insert parameters > > cfg = []; > > cfg.latency = [0 1.250]; > > cfg.frequency = [2 30]; > > cfg.channel ='all'; > > cfg.method = 'montecarlo'; > > cfg.statistic = 'ft_statfun_intersubcorr'; > > cfg.type = ft_getopt(cfg, 'type', 'Spearman'); > > cfg.correctm = 'cluster'; > > cfg.clusteralpha = 0.05; > > cfg.clusterstatistic = 'maxsum'; > > cfg.minnbchan = 2; > > cfg.tail = 0; > > cfg.clustertail = 0; > > cfg.alpha = 0.025; > > cfg.numrandomization = 1000; > > > > % prepare_neighbours determines what sensors may form clusters: load > Biosemi 64 channel cap > > cfg.template = [fieldtripdir thisSlash 'template' thisSlash > 'neighbours' thisSlash 'biosemi64_neighb.mat']; > > cfg.layout = [fieldtripdir thisSlash 'template' > thisSlash 'layout' thisSlash 'biosemi64.lay']; > > cfg_neighb.method = 'template'; > > cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); > > > > % Create design mat > > subj = 31; > > design = zeros(2,2*subj); > > for i = 1:subj > > design(2,i) = i; > > end > > for i = 1:subj > > design(2,subj+i) = i; > > end > > design(1,1:subj) = 1; > > design(1,subj+1:2*subj) = 2; > > cfg.design = design; > > cfg.ivar = 1; > > cfg.uvar = 2; > > > > % Run stats > > [stat] = ft_freqstatistics(cfg,freqData,behav); > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Aug 5 09:13:25 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 5 Aug 2015 07:13:25 +0000 Subject: [FieldTrip] Fourier analysis units In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB519825@exprd01.hosting.ru.nl> Dear Casper, The units of the power spectrum depends on the units of your input data. For example, if your input data is in microvolts, the unit of the power spectrum is microvolts^2 (give that cfg.output=’pow’). Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Casper van Heck Sent: dinsdag 4 augustus 2015 16:37 To: FieldTrip discussion list Subject: [FieldTrip] Fourier analysis units Dear fellow Fieldtrippers, I've made some Fourier analyses using ft_freqanalysis with cfg.method = 'mtmfft', and found something worth reporting. However, Fieldtrip does not report the units. Looking at conversations in the Fieldtrip discussion archive, it would seem this question has either been sidestepped or not answered in the past, so I'd like to ask this question again. Does anybody know? Best regards, Casper -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Wed Aug 5 14:54:09 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Wed, 5 Aug 2015 12:54:09 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 4 In-Reply-To: References: Message-ID: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> Dear Marlies, I did not go through all details of your correspondence with Jorn, but let me add a few remarks from a birds-eye perspective. 1. Your statfun is intersubjcorr, which evaluates the correlation over subjects between a neuronal and a behavioural variable, with the neuronal variable typically being high-dimensional, and thereby creating a multiple comparisons problem. Btw, I don’t like the name intersubjcorr, because the correlation is over subjects and not between (=inter). 2. I’m puzzled by where the connectivity matrix comes from, because your analysis does not involve between-channel quantities. In fact, from the perspective of the neuronal data, it is a typical univariate analysis in which every channel is treated separately. The only between-aspect in your study involves the relation between the (high-dimensional) neuronal variable and the (one-dimensional) behavioral variable. 3. Fieldtrip has no cluster-based statistics implemented that clusters channel-pairs, except for the trivial case in which you select a single reference channel for which you evaluate the coupling with all other channels (as in Maris, Schoffelen & Fries, 2007). best, Eric From: Marlies Vissers > Subject: Re: [FieldTrip] Effect of cfg.minnbchan Date: 4 Aug 2015 16:38:57 CEST To: FieldTrip discussion list > Reply-To: FieldTrip discussion list > Dear Jörn, Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error ‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’. If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? Thanks in advance! Best, Marlies On 3 August 2015 at 09:37, Jörn M. Horschig > wrote: Dear Marlies, if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: % For every (time,frequency)-element, it is calculated how many significant % neighbours .this channel has If a significant channel has less than minnbchan % significant neighbours, then this channel is removed from onoff. If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers Sent: Friday, July 31, 2015 3:27 PM To: fieldtrip, donders > Subject: [FieldTrip] Effect of cfg.minnbchan Dear Fieldtrippers. I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. The code I used to run this analysis is pasted below. Thanks in advance! Best, Marlies Marlies Vissers PhD student University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl --- % Import the electrode labels from an EEGlab set elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); % Create matrix with TF data freqData.freq = frex; % Frequenies of TF matrix freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix freqData.dimord = 'subj_chan_freq_time'; freqData.label = elec.label; freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time % Create matrix with behavioral data, make sure the sizes match behav.freq = frex; behav.time = tx(TF_idx(1):TF_idx(2))./1000; behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix behav.label = elec.label; behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array % Set configuration for perm test % Create cfg and insert parameters cfg = []; cfg.latency = [0 1.250]; cfg.frequency = [2 30]; cfg.channel ='all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_intersubcorr'; cfg.type = ft_getopt(cfg, 'type', 'Spearman'); cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; cfg_neighb.method = 'template'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); % Create design mat subj = 31; design = zeros(2,2*subj); for i = 1:subj design(2,i) = i; end for i = 1:subj design(2,subj+i) = i; end design(1,1:subj) = 1; design(1,subj+1:2*subj) = 2; cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; % Run stats [stat] = ft_freqstatistics(cfg,freqData,behav); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Wed Aug 5 15:04:53 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Wed, 5 Aug 2015 15:04:53 +0200 Subject: [FieldTrip] Effect of cfg.minnbchan In-Reply-To: References: <007e01d0cdbf$51a83490$f4f89db0$@artinis.com> Message-ID: <00c701d0cf7f$520ec400$f62c4c00$@artinis.com> Dear Marlies, the channelconnectivity function is in a private directory, therefore not directly executable. If you are keen on pursuing this, you can copy it out or cd into that directory. However, check Eric’s response, from which it seems that you might on to something that is not intended to be happening ;) did you ever run into these problems with a “normal” test, say a depsampleT test as described in the FT tutorial? Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers Sent: Tuesday, August 4, 2015 4:39 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Effect of cfg.minnbchan Dear Jörn, Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error ‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’. If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? Thanks in advance! Best, Marlies On 3 August 2015 at 09:37, Jörn M. Horschig > wrote: Dear Marlies, if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: % For every (time,frequency)-element, it is calculated how many significant % neighbours .this channel has If a significant channel has less than minnbchan % significant neighbours, then this channel is removed from onoff. If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl ] On Behalf Of Marlies Vissers Sent: Friday, July 31, 2015 3:27 PM To: fieldtrip, donders > Subject: [FieldTrip] Effect of cfg.minnbchan Dear Fieldtrippers. I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. The code I used to run this analysis is pasted below. Thanks in advance! Best, Marlies Marlies Vissers PhD student University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl --- % Import the electrode labels from an EEGlab set elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); % Create matrix with TF data freqData.freq = frex; % Frequenies of TF matrix freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix freqData.dimord = 'subj_chan_freq_time'; freqData.label = elec.label; freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time % Create matrix with behavioral data, make sure the sizes match behav.freq = frex; behav.time = tx(TF_idx(1):TF_idx(2))./1000; behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix behav.label = elec.label; behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array % Set configuration for perm test % Create cfg and insert parameters cfg = []; cfg.latency = [0 1.250]; cfg.frequency = [2 30]; cfg.channel ='all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_intersubcorr'; cfg.type = ft_getopt(cfg, 'type', 'Spearman'); cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; cfg_neighb.method = 'template'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); % Create design mat subj = 31; design = zeros(2,2*subj); for i = 1:subj design(2,i) = i; end for i = 1:subj design(2,subj+i) = i; end design(1,1:subj) = 1; design(1,subj+1:2*subj) = 2; cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; % Run stats [stat] = ft_freqstatistics(cfg,freqData,behav); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Aug 5 15:11:05 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 5 Aug 2015 13:11:05 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 4 In-Reply-To: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> References: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> Message-ID: <431477C1-7C6F-4D4D-96F5-1C80729B3140@fcdonders.ru.nl> Hi Eric, Allow me to chime in to avoid any confusion from your side regarding point 2). I think that Marlies refers to a boolean spatial adjacency matrix that defines whether channels are neighbours, or not. In the code, this is referred to as a matrix named ‘connectivity’, which may not be the most obvious denomination. At some point in time we have made some low-level changes in the FieldTrip code, concerning the treatment of the spatial dimension for the clustering, which allows to treat spatial clustering along edges along a triangulated mesh (e.g. dipole locations defined on the cortical sheet) in the same way as spatial clustering on an extracranial channel array. Channel clustering is now a ‘special case’ where the cfg.neighbours structure array is converted into the boolean adjancency matrix, by the low-level channelconnectivity function, which is in fieldtrip/private. Best, Jan-Mathijs On Aug 5, 2015, at 2:54 PM, Maris, E.G.G. (Eric) > wrote: Dear Marlies, I did not go through all details of your correspondence with Jorn, but let me add a few remarks from a birds-eye perspective. 1. Your statfun is intersubjcorr, which evaluates the correlation over subjects between a neuronal and a behavioural variable, with the neuronal variable typically being high-dimensional, and thereby creating a multiple comparisons problem. Btw, I don’t like the name intersubjcorr, because the correlation is over subjects and not between (=inter). 2. I’m puzzled by where the connectivity matrix comes from, because your analysis does not involve between-channel quantities. In fact, from the perspective of the neuronal data, it is a typical univariate analysis in which every channel is treated separately. The only between-aspect in your study involves the relation between the (high-dimensional) neuronal variable and the (one-dimensional) behavioral variable. 3. Fieldtrip has no cluster-based statistics implemented that clusters channel-pairs, except for the trivial case in which you select a single reference channel for which you evaluate the coupling with all other channels (as in Maris, Schoffelen & Fries, 2007). best, Eric From: Marlies Vissers > Subject: Re: [FieldTrip] Effect of cfg.minnbchan Date: 4 Aug 2015 16:38:57 CEST To: FieldTrip discussion list > Reply-To: FieldTrip discussion list > Dear Jörn, Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error ‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’. If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? Thanks in advance! Best, Marlies On 3 August 2015 at 09:37, Jörn M. Horschig > wrote: Dear Marlies, if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: % For every (time,frequency)-element, it is calculated how many significant % neighbours .this channel has If a significant channel has less than minnbchan % significant neighbours, then this channel is removed from onoff. If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers Sent: Friday, July 31, 2015 3:27 PM To: fieldtrip, donders > Subject: [FieldTrip] Effect of cfg.minnbchan Dear Fieldtrippers. I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. The code I used to run this analysis is pasted below. Thanks in advance! Best, Marlies Marlies Vissers PhD student University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl --- % Import the electrode labels from an EEGlab set elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); % Create matrix with TF data freqData.freq = frex; % Frequenies of TF matrix freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix freqData.dimord = 'subj_chan_freq_time'; freqData.label = elec.label; freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time % Create matrix with behavioral data, make sure the sizes match behav.freq = frex; behav.time = tx(TF_idx(1):TF_idx(2))./1000; behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix behav.label = elec.label; behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array % Set configuration for perm test % Create cfg and insert parameters cfg = []; cfg.latency = [0 1.250]; cfg.frequency = [2 30]; cfg.channel ='all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_intersubcorr'; cfg.type = ft_getopt(cfg, 'type', 'Spearman'); cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; cfg_neighb.method = 'template'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); % Create design mat subj = 31; design = zeros(2,2*subj); for i = 1:subj design(2,i) = i; end for i = 1:subj design(2,subj+i) = i; end design(1,1:subj) = 1; design(1,subj+1:2*subj) = 2; cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; % Run stats [stat] = ft_freqstatistics(cfg,freqData,behav); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Wed Aug 5 16:45:06 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Wed, 5 Aug 2015 07:45:06 -0700 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 4 In-Reply-To: <431477C1-7C6F-4D4D-96F5-1C80729B3140@fcdonders.ru.nl> References: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> <431477C1-7C6F-4D4D-96F5-1C80729B3140@fcdonders.ru.nl> Message-ID: And to briefly chime in on point 1, i believe that statfun has changed its name to correlationT some time ago. Yours, Arjen > On Aug 5, 2015, at 6:11 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > > Hi Eric, > > Allow me to chime in to avoid any confusion from your side regarding point 2). I think that Marlies refers to a boolean spatial adjacency matrix that defines whether channels are neighbours, or not. In the code, this is referred to as a matrix named ‘connectivity’, which may not be the most obvious denomination. At some point in time we have made some low-level changes in the FieldTrip code, concerning the treatment of the spatial dimension for the clustering, which allows to treat spatial clustering along edges along a triangulated mesh (e.g. dipole locations defined on the cortical sheet) in the same way as spatial clustering on an extracranial channel array. Channel clustering is now a ‘special case’ where the cfg.neighbours structure array is converted into the boolean adjancency matrix, by the low-level channelconnectivity function, which is in fieldtrip/private. > > Best, > Jan-Mathijs > >> On Aug 5, 2015, at 2:54 PM, Maris, E.G.G. (Eric) wrote: >> >> Dear Marlies, >> >> I did not go through all details of your correspondence with Jorn, but let me add a few remarks from a birds-eye perspective. >> >> 1. Your statfun is intersubjcorr, which evaluates the correlation over subjects between a neuronal and a behavioural variable, with the neuronal variable typically being high-dimensional, and thereby creating a multiple comparisons problem. Btw, I don’t like the name intersubjcorr, because the correlation is over subjects and not between (=inter). >> 2. I’m puzzled by where the connectivity matrix comes from, because your analysis does not involve between-channel quantities. In fact, from the perspective of the neuronal data, it is a typical univariate analysis in which every channel is treated separately. The only between-aspect in your study involves the relation between the (high-dimensional) neuronal variable and the (one-dimensional) behavioral variable. >> 3. Fieldtrip has no cluster-based statistics implemented that clusters channel-pairs, except for the trivial case in which you select a single reference channel for which you evaluate the coupling with all other channels (as in Maris, Schoffelen & Fries, 2007). >> >> best, >> Eric >> >> >>> >>> >>> From: Marlies Vissers >>> Subject: Re: [FieldTrip] Effect of cfg.minnbchan >>> Date: 4 Aug 2015 16:38:57 CEST >>> To: FieldTrip discussion list >>> Reply-To: FieldTrip discussion list >>> >>> >>> Dear Jörn, >>> >>> Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. >>> However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. >>> Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. >>> E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. >>> >>> I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error ‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’. >>> If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. >>> >>> Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? >>> >>> Thanks in advance! >>> >>> Best, >>> Marlies >>> >>>> On 3 August 2015 at 09:37, Jörn M. Horschig wrote: >>>> Dear Marlies, >>>> >>>> if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: >>>> % For every (time,frequency)-element, it is calculated how many significant >>>> % neighbours .this channel has If a significant channel has less than minnbchan >>>> % significant neighbours, then this channel is removed from onoff. >>>> >>>> If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. >>>> >>>> Best, >>>> Jörn >>>> >>>> >>>> -- >>>> >>>> Jörn M. Horschig, PhD, Software Engineer >>>> Artinis Medical Systems | +31 481 350 980 >>>> >>>> From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers >>>> Sent: Friday, July 31, 2015 3:27 PM >>>> To: fieldtrip, donders >>>> Subject: [FieldTrip] Effect of cfg.minnbchan >>>> >>>> Dear Fieldtrippers. >>>> >>>> I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. >>>> >>>> I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. >>>> >>>> My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? >>>> >>>> I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. >>>> >>>> The code I used to run this analysis is pasted below. >>>> >>>> Thanks in advance! >>>> >>>> Best, >>>> Marlies >>>> >>>> Marlies Vissers >>>> PhD student >>>> >>>> University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory >>>> Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl >>>> >>>> --- >>>> >>>> % Import the electrode labels from an EEGlab set >>>> elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); >>>> >>>> % Create matrix with TF data >>>> freqData.freq = frex; % Frequenies of TF matrix >>>> freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix >>>> freqData.dimord = 'subj_chan_freq_time'; >>>> freqData.label = elec.label; >>>> freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time >>>> >>>> % Create matrix with behavioral data, make sure the sizes match >>>> behav.freq = frex; >>>> behav.time = tx(TF_idx(1):TF_idx(2))./1000; >>>> behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix >>>> behav.label = elec.label; >>>> behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array >>>> >>>> % Set configuration for perm test >>>> % Create cfg and insert parameters >>>> cfg = []; >>>> cfg.latency = [0 1.250]; >>>> cfg.frequency = [2 30]; >>>> cfg.channel ='all'; >>>> cfg.method = 'montecarlo'; >>>> cfg.statistic = 'ft_statfun_intersubcorr'; >>>> cfg.type = ft_getopt(cfg, 'type', 'Spearman'); >>>> cfg.correctm = 'cluster'; >>>> cfg.clusteralpha = 0.05; >>>> cfg.clusterstatistic = 'maxsum'; >>>> cfg.minnbchan = 2; >>>> cfg.tail = 0; >>>> cfg.clustertail = 0; >>>> cfg.alpha = 0.025; >>>> cfg.numrandomization = 1000; >>>> >>>> % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap >>>> cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; >>>> cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; >>>> cfg_neighb.method = 'template'; >>>> cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); >>>> >>>> % Create design mat >>>> subj = 31; >>>> design = zeros(2,2*subj); >>>> for i = 1:subj >>>> design(2,i) = i; >>>> end >>>> for i = 1:subj >>>> design(2,subj+i) = i; >>>> end >>>> design(1,1:subj) = 1; >>>> design(1,subj+1:2*subj) = 2; >>>> cfg.design = design; >>>> cfg.ivar = 1; >>>> cfg.uvar = 2; >>>> >>>> % Run stats >>>> [stat] = ft_freqstatistics(cfg,freqData,behav); >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Wed Aug 5 19:23:20 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Wed, 5 Aug 2015 19:23:20 +0200 Subject: [FieldTrip] EEG forward solution Message-ID: Hi all, I am working on constructing a forward model for source reconstruction using minimum-norm estimate. There are two tutorials on EEG forward solutions: http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate Each uses a somewhat different set of functions for calculating the source model and the volume conduction model but it is not clear whether these differences are real (i.e. yielding different outcomes) or only apparent (i.e. different ways of reaching the same result). Specifically, my question is: if I follow the tutorial http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg , all the way to the line... vol = ft_prepare_headmodel(cfg, bnd); ...to which I then add...: %source model cfg = [ ]; cfg.mri = mri_of_subject; sourceModel = ft_prepare_sourcemodel(cfg); % lead field cfg = [ ]; cfg.vol = vol; cfg.elec = electrode_positions; cfg.grid = sourceModel; leadfield = ft_prepare_leadfield(cfg); ...will this give me the same leadfield as the procedure outlined in http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate ? If these are both valid ways of calculating the leadfield, but they do not yield equivalent results, what - in general - should be my considerations when choosing between the two? Thanks! Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From assaf.harel at wright.edu Thu Aug 6 08:39:04 2015 From: assaf.harel at wright.edu (Harel, Assaf) Date: Thu, 6 Aug 2015 06:39:04 +0000 Subject: [FieldTrip] Postdoc fellow at the Human Neuroscience and Visual Cognition & ASTECCA Laboratories Message-ID: POSTDOCTORAL FELLOW Human Neuroscience and Visual Cognition & ASTECCA Laboratories, Department of Psychology, Wright State University We are seeking a postdoctoral fellow to take a leading role in our research on the neurocognitive correlates of attentional control and lapses of attention in semi-structured ecological settings. The goal of this project is to rigorously characterize the relationship between laboratory measures of attentional control and failures of attention in realistic task contexts. We specifically aim to combine cognitive behavioral studies, ERP experiments, and computational modeling to test the extent to which laboratory measures can predict individual differences in susceptibility to attentional failures. We will investigate how these combined measures can be used to identify which individuals are most likely to benefit from a cognitive training paradigm aimed at enhancing attentional control. The postdoctoral fellow will be responsible for designing the studies, programming the experimental paradigms, recruiting participants, and collecting the data. In addition, the fellow will be responsible for data analysis and reporting the research findings in peer-reviewed journals. The position is fully funded for three years. The successful candidate will hold a PhD in Cognitive Neuroscience, Cognitive Psychology, Computer Science, or any other related discipline by the start date of the position. Experience in computer programming, especially with Matlab, and familiarity with fMRI or EEG research are required. Experience in computational cognitive modeling will be considered a strong advantage. The Department of Psychology is housed in the College of Science and Mathematics, offers a Ph.D. in Human Factors and Industrial/ Organizational Psychology, and has 3 undergraduate concentration areas: (1) Cognition and Perception, (2) Industrial/ Organizational, and (3) Behavioral Neuroscience. Wright State University was recently ranked among the "Best in the Midwest" universities by The Princeton Review, listed among 260 Best National Universities in the annual "America's Best Colleges" rankings by U.S. News and World Report, and ranked fourth nationally among universities with limited numbers of doctoral programs in the Faculty Scholarly Productivity Index. Wright State University is an Equal Opportunity/Affirmative Action Employer. For more information on this position contact Assaf Harel, Ph.D. at assaf.harel at wright.edu or Ion Juvina, Ph.D. at ion.juvina at wright.edu. Applicants should visit the following link to upload CV and statement of research: . In addition, please have three letters of reference sent directly to Ion Juvina, Ph.D., Assistant Professor, Department of Psychology, 313G Fawcett Hall, 3640 Colonel Glenn Hwy, Wright State University, Dayton, OH 45435. Review of complete applications will begin August 8, 2015, and continue until the position is filled. All new hires must go through a criminal background check before they can be hired. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Thu Aug 6 16:32:10 2015 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Thu, 6 Aug 2015 14:32:10 +0000 Subject: [FieldTrip] Error in Cluster permutation tutorial? Message-ID: <1438871530409.50689@nin.knaw.nl> Dear FieldTrippers, I followed the tutorial on http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics?s[]=cluster&s[]=permutation at the very end, I wanted to do the ft_clusterplot but then I did not get topoplots as a function of time as in the tutorial and instead just got one plot. Is there something wrong in the way the parameters are set in the tutorial. The last part is as follows: % make a plot cfg = []; cfg.highlightsymbolseries = ['*','*','.','.','.']; cfg.layout = 'CTF151.lay'; cfg.contournum = 0; cfg.markersymbol = '.'; cfg.alpha = 0.05; cfg.parameter='stat'; cfg.zlim = [-5 5]; ft_clusterplot(cfg,stat); Any input will be very helpful. Thanks. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From ibjuslc at gmail.com Thu Aug 6 16:46:20 2015 From: ibjuslc at gmail.com (ishita basu) Date: Thu, 6 Aug 2015 10:46:20 -0400 Subject: [FieldTrip] custer based non parametric permutation test for coherence difference Message-ID: I am very interested in using your firldtrip code for doing nonparametric cluster based permutation testing for coherence differences. I tried reading through the fieldtrip tutorials on doing similar analysis on time-frequency spectral data, but could not find anything on coherence except for the coherence calculations for the cortico-muscular data (doesn’t involve any statistical testing). I also saw that the main function being used , i.e the ft_freqstatistics function requires input from ft_freqanalysis and not ft_connectivityanalysis (the one for calculating coherence). Another doubt I had was, it seems like I need some neighborhood information for doing the cluster analysis. If I wanted to cluster only in the time frequency grid and not spatially (I am using depth electrode data ) or I wanted the algorithm to find spatial clusters for me in the absence of prior knowledge, is that feasible ? Thanks Ishita -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.wieffering at gmail.com Thu Aug 6 16:50:55 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Thu, 6 Aug 2015 10:50:55 -0400 Subject: [FieldTrip] Granger Causality Analysis after Beamformer In-Reply-To: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> Message-ID: Hi again, Jan-Mathijs- Thanks again for your help. I have been following your suggestion and so far completed LCMV Beamformer on two regions of interest and gone on to construct two virtual channels from there, according to the connectivity tutorial. However, I receive an error when I compute ft_mvaranalysis and would be grateful if you could take a look: virtualchannel01 = label: {'source1'} time: {1x66 cell} trial: {1x66 cell} virtualchannel02 = label: {'source2'} time: {1x66 cell} trial: {1x66 cell} % append virtual channel datasets cfg = []; cfg.continuous = 'no'; data_both = ft_appenddata(cfg, virtualchannel01, virtualchannel02); % compute mvar analysis cfg = []; cfg.continuous = 'no'; cfg.toolbox = 'bsmart'; cfg.order = 5; cfg.channelcmb = ['source1'; 'source2']; mvardata = ft_mvaranalysis(cfg, data_both); *which outputs the following:* Warning: transposing channelcombination matrix > In ft_channelcombination (line 60) In ft_mvaranalysis (line 204) label = 'source1' 'source2' the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB preprocessing preprocessing trial 66 from 66 the call to "ft_preprocessing" took 0 seconds and required the additional allocation of an estimated 0 MB Index exceeds matrix dimensions. Error in ft_mvaranalysis (line 333) tmpcfg.toilim = timeaxis([begsample endsample]); I'm wondering where this error comes from - not sure how to go about fixing it. My present goal has been to practice these steps and experiment with connectivity analysis, and therefore the datasets I'm working with are relatively small - is it possible that's the issue here? Also, I wondered if FieldTrip (or the bsmart toolbox) offers any guidance on how to select a mvar model order, as I know this is an influential factor in Granger Causality. I've experimented with SIFT in the past and found their model-fitting guidance and validation very helpful - don't know if there's anything similar that's also compatible with FieldTrip. Once again, thanks for all your help!! Helen WIeffering Erika Nyhus Dept of Neuroscience Bowdoin College On Thu, Jul 30, 2015 at 5:08 PM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Helen, > > Yes, you can restrict yourself in the end to focus on a predefined > frequency band. Yet, for the computation, you need to compute the whole > frequency range. > Reason: for the parametric estimator, what’s in a name, you parametrize > the spectrum, so you get all frequencies for ‘free’. > for the non-parametric estimator, you need to whole spectrum to begin > with, in order to be able to decompose the cross-spectrum, using the > Wilson-Burg algorithm (as described in the 2008 Dhamala paper). > Best, > Jan-Mathijs > > > > On Jul 30, 2015, at 10:51 PM, Helen Wieffering > wrote: > > Hi Jan-Mathis, > > Thanks for your quick reply - this is very helpful. In fact, we've already > completed coherence measures on this data and pre-defined potential areas > of interest based on published literature - but we wanted to take that > further by looking into granger causality. > > I want to follow up on the first method you described (applying > ft_mvaranalysis to source-level data). We would like to limit our > connectivity analysis to the theta-band frequencies, which was why DICS > Beamformer was appealing. However, if I'm understanding correctly, the LCMV > filter is necessary for our connectivity analysis since granger causality > is computed in the time domain. I'm wondering, if we go back and compute > LCMV source reconstruction instead, will it be possible to later compute > granger causality for the specific frequencies we're studying? > > Thanks again! > > Helen Wieffering > Erika Nyhus > Dept. of Neuroscience > Bowdoin College > > On Thu, Jul 30, 2015 at 3:30 PM, Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl> wrote: > >> Dear Helen, >> >> There is no step-by-step guidance for this on the FieldTrip wiki. >> Personally, I would first go for a slightly less ambitious, i.e. not use >> Granger causality as the target connectivity measure, but first investigate >> the patterns in the data using plain good-old-fashioned (imaginary) >> coherence or so, which is a measure that can be easily computed given the >> pipeline you have executed so far. >> The estimation of Granger causality (in the frequency domain), or of one >> of its relatives such as PDC or DTF requires one of the following 2 >> approaches: >> >> -indeed you either need to get your spectral transfer matrix by >> parametric means, i.e. call ft_mvaranalysis (either on sensor-level or on >> source-level data), and proceed from there. If the coefficients are to be >> estimated on source-level data, you first need to apply a source >> reconstruction in the time domain, e.g. using an LCMV-beamformer, create a >> set of ‘virtual channels’ (there is some docu about this on the FT-wiki, I >> guess you will get there with the search term ‘virtual channel’. Once you >> are at the source level, you can either continue with ft_mvaranalysis on >> the virtual channel time courses, followed by ft_freqanalysis_mvar, >> followed by ft_connectivityanalysis, or you can follow the non-parametric >> route, where you would do an ft_freqanalysis (with ‘mtmfft’), followed by >> ft_connectivityanalysis. How this is done in practice is explained in one >> of the tutorials that are concerned with connectivity (in the example it is >> demonstrated with ‘channel’ data, but it would be straightforward to fool >> FieldTrip into swallowing ‘virtual channel’ data). A different route along >> the parametric-estimation path would be to fit the autoregressive model at >> the channel-level (in a PCA-reduced subspace), and project the coefficients >> of the model into source space. The idea behind this approach is explained >> and demonstrated in this paper: >> http://onlinelibrary.wiley.com/doi/10.1002/hbm.21482/full. >> -alternatively >> , >> you can estimate spectra non-parametrically (with mtmfft), and then compute >> a ‘broadband’ spatial filter with LCMV, using the covariance estimated from >> the same data epochs as the ones you will use for the spectral >> decomposition. Next, you can project the sensor level fourier-data into >> source space using the spatial filters (use cfg.keepfilter = ‘yes’ when >> calling ft_sourceanalysis) defined at your locations of interest. This is >> allowed because the spatial filtering is a linear step, as is the Fourier >> transformation, so the order of which shouldn’t matter for the result, >> although the computation may be more efficient in one order or the other. >> >> The difficult thing for you I guess would be a way to a priori define >> your locations of interest. This is an empirical question, but you could >> either use information from published literature, or preferably an >> experimental contrast from your data to identify regions-of-interest. >> >> Best wishes, >> >> Jan-Mathijs >> >> >> >> >> >> >> Jan-Mathijs Schoffelen, MD PhD, Senior researcher >> >> Max Planck Institute for Psycholinguistics >> Donders Centre for Cognitive Neuroimaging >> >> E-mail: j.schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> http://www.fieldtriptoolbox.org >> >> >> On Jul 30, 2015, at 8:31 PM, Helen Wieffering >> wrote: >> >> > Dear FieldTrip users, >> > >> > I am writing to ask for any available guidance on computing granger >> causality measures using ft_connectivity_analysis in FieldTrip. >> > >> > Our data comes from 128 EEG channels. So far we have: >> > - cleaned and preprocessed the data >> > - computed frequency analysis using 'mtmfft' at 6 Hz >> > - localized sources of 6hz activity to a normalized head model using >> Beamformer and method 'dics'. >> > >> > We would now like to compute connectivity analysis between the >> strongest sources, using granger causality. I have read through the >> FieldTrip tutorials, but am still not sure how to proceed. >> > >> > Mainly, my question is whether we should have first computed >> ft_mvaranalysis with our preprocessed data, and then done frequency >> analysis using cfg.method = 'mvar' and proceeded with source analysis >> (Beamformer) from there. Should we go back and complete those steps? I'm >> also wondering about the best method for selecting sources to use for >> connectivity analysis. >> > >> > If anyone has had success with this, I'd love to hear! >> > >> > Thanks in advance. >> > >> > Helen Wieffering >> > Erika Nyhus >> > Dept. of Neuroscience >> > Bowdoin College >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 6 20:59:03 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 6 Aug 2015 18:59:03 +0000 Subject: [FieldTrip] custer based non parametric permutation test for coherence difference In-Reply-To: References: Message-ID: Hi Ishita, I suggest that you search a bit through the archive of this discussion list, because your question has come up on several occasions in the past. Do you want to do statistics within a subject (unit-of-observation is trial), or across subjects (unit-of-observation is subject)? Another doubt I had was, it seems like I need some neighborhood information for doing the cluster analysis. If I wanted to cluster only in the time frequency grid and not spatially (I am using depth electrode data ) or I wanted the algorithm to find spatial clusters for me in the absence of prior knowledge, is that feasible if you specify cfg.neighbours = {}, the clustering will be done only in time and frequency. I don’t understand what you mean with ‘finding spatial clusters in the absence of prior knowledge’, but if you tell the function to not cluster in space, it will not do so :o). Best, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 6 21:03:18 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 6 Aug 2015 19:03:18 +0000 Subject: [FieldTrip] Granger Causality Analysis after Beamformer In-Reply-To: <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> Message-ID: <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> Hi Helen, forwarding to the list as well, Do you have an up-to-date version of FieldTrip? There were some issues regarding the error you get, but as far as I remember, these should have been resolved. I would start with downloading a new version. If the problem persists it could be that you need to ensure that the time axis of all trials is identical (and that all trials have the same number of samples). If the sample numbers match across trials, you could try data_both.time(2:end)=data_both.time(1): Best, Jan-Mathijs On Aug 6, 2015, at 4:50 PM, Helen Wieffering > wrote: Hi again, Jan-Mathijs- Thanks again for your help. I have been following your suggestion and so far completed LCMV Beamformer on two regions of interest and gone on to construct two virtual channels from there, according to the connectivity tutorial. However, I receive an error when I compute ft_mvaranalysis and would be grateful if you could take a look: virtualchannel01 = label: {'source1'} time: {1x66 cell} trial: {1x66 cell} virtualchannel02 = label: {'source2'} time: {1x66 cell} trial: {1x66 cell} % append virtual channel datasets cfg = []; cfg.continuous = 'no'; data_both = ft_appenddata(cfg, virtualchannel01, virtualchannel02); % compute mvar analysis cfg = []; cfg.continuous = 'no'; cfg.toolbox = 'bsmart'; cfg.order = 5; cfg.channelcmb = ['source1'; 'source2']; mvardata = ft_mvaranalysis(cfg, data_both); which outputs the following: Warning: transposing channelcombination matrix > In ft_channelcombination (line 60) In ft_mvaranalysis (line 204) label = 'source1' 'source2' the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB preprocessing preprocessing trial 66 from 66 the call to "ft_preprocessing" took 0 seconds and required the additional allocation of an estimated 0 MB Index exceeds matrix dimensions. Error in ft_mvaranalysis (line 333) tmpcfg.toilim = timeaxis([begsample endsample]); I'm wondering where this error comes from - not sure how to go about fixing it. My present goal has been to practice these steps and experiment with connectivity analysis, and therefore the datasets I'm working with are relatively small - is it possible that's the issue here? Also, I wondered if FieldTrip (or the bsmart toolbox) offers any guidance on how to select a mvar model order, as I know this is an influential factor in Granger Causality. I've experimented with SIFT in the past and found their model-fitting guidance and validation very helpful - don't know if there's anything similar that's also compatible with FieldTrip. Once again, thanks for all your help!! Helen WIeffering Erika Nyhus Dept of Neuroscience Bowdoin College On Thu, Jul 30, 2015 at 5:08 PM, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Helen, Yes, you can restrict yourself in the end to focus on a predefined frequency band. Yet, for the computation, you need to compute the whole frequency range. Reason: for the parametric estimator, what’s in a name, you parametrize the spectrum, so you get all frequencies for ‘free’. for the non-parametric estimator, you need to whole spectrum to begin with, in order to be able to decompose the cross-spectrum, using the Wilson-Burg algorithm (as described in the 2008 Dhamala paper). Best, Jan-Mathijs On Jul 30, 2015, at 10:51 PM, Helen Wieffering > wrote: Hi Jan-Mathis, Thanks for your quick reply - this is very helpful. In fact, we've already completed coherence measures on this data and pre-defined potential areas of interest based on published literature - but we wanted to take that further by looking into granger causality. I want to follow up on the first method you described (applying ft_mvaranalysis to source-level data). We would like to limit our connectivity analysis to the theta-band frequencies, which was why DICS Beamformer was appealing. However, if I'm understanding correctly, the LCMV filter is necessary for our connectivity analysis since granger causality is computed in the time domain. I'm wondering, if we go back and compute LCMV source reconstruction instead, will it be possible to later compute granger causality for the specific frequencies we're studying? Thanks again! Helen Wieffering Erika Nyhus Dept. of Neuroscience Bowdoin College On Thu, Jul 30, 2015 at 3:30 PM, Schoffelen, J.M. (Jan Mathijs) > wrote: Dear Helen, There is no step-by-step guidance for this on the FieldTrip wiki. Personally, I would first go for a slightly less ambitious, i.e. not use Granger causality as the target connectivity measure, but first investigate the patterns in the data using plain good-old-fashioned (imaginary) coherence or so, which is a measure that can be easily computed given the pipeline you have executed so far. The estimation of Granger causality (in the frequency domain), or of one of its relatives such as PDC or DTF requires one of the following 2 approaches: -indeed you either need to get your spectral transfer matrix by parametric means, i.e. call ft_mvaranalysis (either on sensor-level or on source-level data), and proceed from there. If the coefficients are to be estimated on source-level data, you first need to apply a source reconstruction in the time domain, e.g. using an LCMV-beamformer, create a set of ‘virtual channels’ (there is some docu about this on the FT-wiki, I guess you will get there with the search term ‘virtual channel’. Once you are at the source level, you can either continue with ft_mvaranalysis on the virtual channel time courses, followed by ft_freqanalysis_mvar, followed by ft_connectivityanalysis, or you can follow the non-parametric route, where you would do an ft_freqanalysis (with ‘mtmfft’), followed by ft_connectivityanalysis. How this is done in practice is explained in one of the tutorials that are concerned with connectivity (in the example it is demonstrated with ‘channel’ data, but it would be straightforward to fool FieldTrip into swallowing ‘virtual channel’ data). A different route along the parametric-estimation path would be to fit the autoregressive model at the channel-level (in a PCA-reduced subspace), and project the coefficients of the model into source space. The idea behind this approach is explained and demonstrated in this paper: http://onlinelibrary.wiley.com/doi/10.1002/hbm.21482/full. -alternatively, you can estimate spectra non-parametrically (with mtmfft), and then compute a ‘broadband’ spatial filter with LCMV, using the covariance estimated from the same data epochs as the ones you will use for the spectral decomposition. Next, you can project the sensor level fourier-data into source space using the spatial filters (use cfg.keepfilter = ‘yes’ when calling ft_sourceanalysis) defined at your locations of interest. This is allowed because the spatial filtering is a linear step, as is the Fourier transformation, so the order of which shouldn’t matter for the result, although the computation may be more efficient in one order or the other. The difficult thing for you I guess would be a way to a priori define your locations of interest. This is an empirical question, but you could either use information from published literature, or preferably an experimental contrast from your data to identify regions-of-interest. Best wishes, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org On Jul 30, 2015, at 8:31 PM, Helen Wieffering > wrote: > Dear FieldTrip users, > > I am writing to ask for any available guidance on computing granger causality measures using ft_connectivity_analysis in FieldTrip. > > Our data comes from 128 EEG channels. So far we have: > - cleaned and preprocessed the data > - computed frequency analysis using 'mtmfft' at 6 Hz > - localized sources of 6hz activity to a normalized head model using Beamformer and method 'dics'. > > We would now like to compute connectivity analysis between the strongest sources, using granger causality. I have read through the FieldTrip tutorials, but am still not sure how to proceed. > > Mainly, my question is whether we should have first computed ft_mvaranalysis with our preprocessed data, and then done frequency analysis using cfg.method = 'mvar' and proceeded with source analysis (Beamformer) from there. Should we go back and complete those steps? I'm also wondering about the best method for selecting sources to use for connectivity analysis. > > If anyone has had success with this, I'd love to hear! > > Thanks in advance. > > Helen Wieffering > Erika Nyhus > Dept. of Neuroscience > Bowdoin College > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Thu Aug 6 21:59:34 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 6 Aug 2015 21:59:34 +0200 Subject: [FieldTrip] Error in Cluster permutation tutorial? In-Reply-To: <1438871530409.50689@nin.knaw.nl> References: <1438871530409.50689@nin.knaw.nl> Message-ID: Hi Rajat, I was able to reproduce the problem. Would you please file a bug http://bugzilla.fieldtriptoolbox.org/ and we’ll take it from there. Thanks. Tzvetan > Dear FieldTrippers, > > I followed the tutorial on > http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics?s[]=cluster&s[]=permutation > > at the very end, I wanted to do the ft_clusterplot but then I did not get topoplots as a function of time as in the > tutorial and instead just got one plot. > > Is there something wrong in the way the parameters are set in the tutorial. > The last part is as follows: > % make a plot > cfg = []; > cfg.highlightsymbolseries = ['*','*','.','.','.']; > cfg.layout = 'CTF151.lay'; > cfg.contournum = 0; > cfg.markersymbol = '.'; > cfg.alpha = 0.05; > cfg.parameter='stat'; > cfg.zlim = [-5 5]; > ft_clusterplot(cfg,stat); > > Any input will be very helpful. > > Thanks. > > Rajat > > > Rajat Mani Thomas > Social Brain Lab > Netherlands Institute for Neuroscience > Amsterdam > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ervin.poljac at donders.ru.nl Thu Aug 6 23:59:16 2015 From: ervin.poljac at donders.ru.nl (Poljac, E. (Ervin)) Date: Thu, 6 Aug 2015 21:59:16 +0000 Subject: [FieldTrip] Undefined function or variable "lab" In-Reply-To: <77A6E025-667C-4255-BF8B-B22197BF3678@fcdonders.ru.nl> References: , <77A6E025-667C-4255-BF8B-B22197BF3678@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, Thanks for your answer, one of my colleagues indeed suggested that I should look at data.elec.label and it seems that there are two additional labels ('COMNT' and 'SCALE'. ), so after removing them, the ft_channelrepair function worked. Regards, Ervin -- Ervin Poljac, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition (DCC) Radboud University Nijmegen Room B.00.78A Montessorilaan 3 6500 HE Nijmegen T. 024 36 15457 ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Sent: Monday, August 03, 2015 9:56 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Undefined function or variable "lab" Hi Ervin, Given the information provided, it’s still hard to tell what might be going on. What version of FieldTrip are you using, and what does dataTarget.elec look like? What do your colleagues have to say about this? (The reason for the last question is, that they most likely have most hands-on experience with the quirks of the particular dataformat you are working with, and thus will be able to provide more specific input than the people who occasionally read posts on this list). Also, the statement that an ‘older version of fieldtrip works’ is quite unspecific (e.g. are your colleagues using a 2009-version of the code, or a more recent one :o)? Is there code totally unmodified, or did they made some code changes in order for it to work?), so I don’t think that this is going to bring you close to a solution. Yet, I think it is good diagnostic information to know that somewhere in the past ‘it’ seemed to work, either with or without local changes. Would it make sense for you to team up with your colleagues to find on what’s going on? Best, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org On Jul 31, 2015, at 2:00 PM, Poljac, E. (Ervin) > wrote: Anyone an idea of what might be wrong here? Much appreciated, Ervin ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Poljac, E. (Ervin) [ervin.poljac at donders.ru.nl] Sent: Monday, July 27, 2015 1:54 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Undefined function or variable "lab" Hello fieldtrippers, I am trying to prepare my EEG data for analysis. Among others, I identify bad channels and try to repair them. However, there is this annoying error: Undefined function or variable "lab". Error in channelposition (line 314) n = size(lab,2); Error in ft_datatype_sens (line 329) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_raw (line 146) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 225) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_channelrepair (line 102) data = ft_checkdata(data, 'datatype', 'raw', 'feedback', 'yes'); In the debug mode I see that the variable 'sens' has a correct value, the bad channel seems to be identified, but then for some reason, lab is not filled. I am copy-pasting that part of my code below. I hope someone has experience with this and how to solve it. Some of my colleagues use an older fieldtrip version that works (so, no error there), and I compared the filein s ft_checkdata, ft_datatype_sens and ft_datatype_sens, they are different, but it is not obvious to me what exactly is new, causing the error. Many thanks, Ervin My code: %% channel rejection, identifying bad channels for target condition cfg=[]; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = [50];% frequency band - foilim or just foi?? rejectedData=ft_freqanalysis(cfg,dataTarget); idx=unique([find(rejectedData.powspctrm>0.5*10^4)]); %this threshold might change for each recording neighbours=open('/Users/Ervin/Documents/MATLAB/biosemi64_neighb.mat'); neighbours=neighbours.neighbours; cfg = []; cfg.channel = rejectedData.label; cfg.layout = 'biosemi64.lay'; cfg.feedback = 'yes'; lay = ft_prepare_layout(cfg); if ~isempty(idx) badchannels=cell(numel(idx),1); [badchannels{1:numel(idx),1}] = deal(rejectedData.label{idx}); % Interpolation for rejected channels cfg=[]; cfg.layout=lay; cfg.badchannel=badchannels; dataTarget.elec.label = dataTarget.label; dataTarget.elec.pnt = lay.pos; cfg.neighbours=neighbours; dataTargetRepaired=ft_channelrepair(cfg, dataTarget); end -- Ervin Poljac, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition (DCC) Radboud University Nijmegen Room B.00.78A Montessorilaan 3 6500 HE Nijmegen T. 024 36 15457 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.wieffering at gmail.com Fri Aug 7 16:27:32 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Fri, 7 Aug 2015 10:27:32 -0400 Subject: [FieldTrip] Granger Causality Analysis after Beamformer In-Reply-To: <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> Message-ID: Thanks, Jan-Mathijs, you were correct about the error being related to sample info. After creating virtualchannel01 and virtualchannel02, I simply added the two lines below: virtualchannel01.fsample = 250; virtualchannel02.fsample = 250; Appending the datasets and computing ft_mvaranalysis has worked smoothly from there! Best, Helen -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaitanya.pro at gmail.com Fri Aug 7 16:38:32 2015 From: chaitanya.pro at gmail.com (Chaitanya Srinivas) Date: Fri, 7 Aug 2015 20:08:32 +0530 Subject: [FieldTrip] [k p or eoz] Granger Causality Analysis after Beamformer In-Reply-To: References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> Message-ID: Hhhhyybhrbyghh r ttttttttrzl sxs. Essssssse ssssss -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Aug 7 16:41:55 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 7 Aug 2015 14:41:55 +0000 Subject: [FieldTrip] Granger Causality Analysis after Beamformer In-Reply-To: References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> Message-ID: <3229622B-91FB-48B8-B840-CEC216230893@fcdonders.ru.nl> Hi Helen, I am glad it works now. Thanks for letting us know. Best wishes, Jan-Mathijs On Aug 7, 2015, at 4:27 PM, Helen Wieffering wrote: > Thanks, Jan-Mathijs, you were correct about the error being related to sample info. > > After creating virtualchannel01 and virtualchannel02, I simply added the two lines below: > virtualchannel01.fsample = 250; > virtualchannel02.fsample = 250; > > Appending the datasets and computing ft_mvaranalysis has worked smoothly from there! > > Best, > Helen > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From spa268 at nyu.edu Fri Aug 7 16:43:51 2015 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Fri, 7 Aug 2015 18:43:51 +0400 Subject: [FieldTrip] Error in Cluster permutation tutorial? Message-ID: FYI, I'm pretty sure the corresponding sample code at http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock is also several years out of date (I remember having problems with it in the past, it seems to be from before ft_clusterplot() existed, as it's just using ft_topoplotER). Of course I am as much to blame as anyone for not updating it. But if someone is going to update the other page then maybe this one can be done as well; I can take a crack at it if no one picks it up on bugzilla. Also, is it just me or is http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics#permutation_test_based_on_cluster_statistics essentially duplicating (with what looks like a more recent example and code) what's in http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock ? Would it be worthwhile to reconcile these two (and maybe replace one with a link to the other, so they don't get out of sync again)? Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ On Fri, Aug 7, 2015 at 2:00 PM, wrote: > > Message: 1 > Date: Thu, 6 Aug 2015 14:32:10 +0000 > From: Rajat Thomas > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Error in Cluster permutation tutorial? > Message-ID: <1438871530409.50689 at nin.knaw.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Dear FieldTrippers, > > > I followed the tutorial on > > > http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics?s[]=cluster&s[]=permutation > > at the very end, I wanted to do the ft_clusterplot but then I did not get > topoplots as a function of time as in the > tutorial and instead just got one plot. > > Is there something wrong in the way the parameters are set in the tutorial. > The last part is as follows: > > % make a plot > cfg = []; > cfg.highlightsymbolseries = ['*','*','.','.','.']; > cfg.layout = 'CTF151.lay'; > cfg.contournum = 0; > cfg.markersymbol = '.'; > cfg.alpha = 0.05; > cfg.parameter='stat'; > cfg.zlim< > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/zlim.html> = > [-5 5]; > ft_clusterplot(cfg,stat); > > Any input will be very helpful. > > Thanks. > > Rajat > > > Rajat Mani Thomas > Social Brain Lab > Netherlands Institute for Neuroscience > Amsterdam > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel.haehnke at lrz.tu-muenchen.de Wed Aug 12 14:30:46 2015 From: daniel.haehnke at lrz.tu-muenchen.de (=?utf-8?Q?Daniel_H=C3=A4hnke?=) Date: Wed, 12 Aug 2015 14:30:46 +0200 Subject: [FieldTrip] ft_spiketriggeredaverage & cfg.latency Message-ID: Dear FieldTrip community, I want to compute the spike triggered average at various epochs of a trial. I want to use ft_spiketriggeredaverage and cfg.latency for that (cfg.latency would specify the epoch). However, while cfg.latency is still in the help and the code of ft_spiketriggeredaverage, it seems like it is not supported anymore. I could of course simply cut out the epochs I am interested in and then run ft_spiketriggeredaverage on that, but I would miss LFPs at the edges of the epochs: e.g. if my STA is from -0.1 to 0.1 with respect to a spike and my epoch is from 1 to 1.5, I would only be able to incorporate LFPs from 1.1 to 1.4. Can anyone think of a workaround for this problem? Cheers, Daniel -- Technische Universität München Daniel Hähnke Institute of Neuroscience Translational NeuroCognition Laboratory Biedersteiner Straße 29, Bau 601 D-80802 München Tel.: +49 89 4140 3356 daniel.haehnke at lrz.tum.de www.ifn.me.tum.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From jk604 at cam.ac.uk Wed Aug 12 18:24:52 2015 From: jk604 at cam.ac.uk (Jana Klimova) Date: Wed, 12 Aug 2015 17:24:52 +0100 Subject: [FieldTrip] Error using ft_multiplotER (line 553), labels in data and labels in layout do not match Message-ID: <55CB7354.8030602@cam.ac.uk> Hello, I am using Fieldtrip interactive plotting under MEEGtools in SPM12 toolbox in MATLAB to plot ERP topography over a period of interest. It's working fine for magnetometers (MEG modality) but when I choose MEGCOMB modality, I get an error: 'Error using ft_multiplotER (line 553) labels in data and labels in layout do not match'. Has anyone got this error before and managed to figure out what's wrong? If I want to plot the same data using display function in SPM, I don't have any problems with MEGCOMB modality. It just doesn't allow me to average over time, that's why I decided to use Fieldtrip functions. Thanks a lot in advance for any suggestions. Kind regards, Jana From stephen.whitmarsh at ki.se Wed Aug 12 20:40:18 2015 From: stephen.whitmarsh at ki.se (Stephen Whitmarsh) Date: Wed, 12 Aug 2015 18:40:18 +0000 Subject: [FieldTrip] Error using ft_multiplotER (line 553), labels in data and labels in layout do not match In-Reply-To: <55CB7354.8030602@cam.ac.uk> References: <55CB7354.8030602@cam.ac.uk> Message-ID: Hi Jana, You'll need to have combined gradiometers in your data to be able to plot them. Use ft_combineplanar for that. Cheers, Stephen ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Jana Klimova [jk604 at cam.ac.uk] Sent: 12 August 2015 18:24 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Error using ft_multiplotER (line 553), labels in data and labels in layout do not match Hello, I am using Fieldtrip interactive plotting under MEEGtools in SPM12 toolbox in MATLAB to plot ERP topography over a period of interest. It's working fine for magnetometers (MEG modality) but when I choose MEGCOMB modality, I get an error: 'Error using ft_multiplotER (line 553) labels in data and labels in layout do not match'. Has anyone got this error before and managed to figure out what's wrong? If I want to plot the same data using display function in SPM, I don't have any problems with MEGCOMB modality. It just doesn't allow me to average over time, that's why I decided to use Fieldtrip functions. Thanks a lot in advance for any suggestions. Kind regards, Jana _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From plyons at udel.edu Wed Aug 12 22:35:26 2015 From: plyons at udel.edu (Peter Lyons) Date: Wed, 12 Aug 2015 16:35:26 -0400 Subject: [FieldTrip] (no subject) Message-ID: Hello Everyone, I'm working on a cluster-based permutation analysis on time-frequency EEG data. I was able to successfully run the ft_freqstatistics function after computing the grand average (ft_freqgrandaverage) for my two independent groups. I am, however, struggling with viewing the topography of my cluster output using the ft_clusterplot function. I suspect the case may be that I am missing a time dimension in my data set based on this error message that I received: "Attempted to access stat.time(15); index out of bounds because numel(stat.time)=0. Error in ft_clusterplot (line 248) time_perclus = [stat.time(ind_min) stat.time(ind_max)];" Is there a viable way to use the ft_clusterplot if the dimensions contained in my data set is "chan_freq"? Or, is there an alternative plotting function that would work just as well or better? I would greatly appreciate any assistance with this. Thank you! Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From samane.shojaie at gmail.com Thu Aug 13 07:21:10 2015 From: samane.shojaie at gmail.com (Seyedeh Samane Shojaei) Date: Thu, 13 Aug 2015 13:21:10 +0800 Subject: [FieldTrip] problem in pre-processing stage Message-ID: Dear all, I am a new user of FieldTrip, I got problem at the first stage of reading data. I am using Matlab R2011a, windows 7, 64 bit. when I run my code, the following problem appears: addpath('FielTrip\fieldtrip-lite-20150810\fieldtrip-20150810') addpath('FielTrip\Tutorial\ArtifactRemoval\ArtifactRemoval.ds') ft_defaults % ft_preprocessing of example dataset cfg = []; cfg.dataset = 'ArtifactRemoval.ds'; cfg.trialdef.eventtype = 'trial'; cfg = ft_definetrial(cfg); Warning: could not determine filetype of ArtifactRemoval.ds > In ft_filetype at 1221 In utilities\private\dataset2files at 42 In ft_checkconfig at 541 In ft_definetrial at 128 In ICAremoveEOG at 9 Warning: no trialfun was specified, using ft_trialfun_general > In ft_definetrial at 135 In ICAremoveEOG at 9 evaluating trialfunction 'ft_trialfun_general' ??? Error using ==> ft_read_header at 2053 unsupported header format (unknown) Error in ==> ft_trialfun_general at 78 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 174 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> ICAremoveEOG at 9 cfg = ft_definetrial(cfg); It is appreciated if you could help me. Regards, Samane -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomitbeker at gmail.com Thu Aug 13 07:59:04 2015 From: shlomitbeker at gmail.com (Shlomit Beker) Date: Thu, 13 Aug 2015 08:59:04 +0300 Subject: [FieldTrip] problem in pre-processing stage In-Reply-To: References: Message-ID: Double check the name and path defined in your script, that refer to your data. It tends to cause this kind of error. ‫ב-13 באוג 2015, בשעה 08:21, ‏Seyedeh Samane Shojaei כתב/ה:‬ > Dear all, > > I am a new user of FieldTrip, I got problem at the first stage of reading data. I am using Matlab R2011a, windows 7, 64 bit. when I run my code, the following problem appears: > > addpath('FielTrip\fieldtrip-lite-20150810\fieldtrip-20150810') > addpath('FielTrip\Tutorial\ArtifactRemoval\ArtifactRemoval.ds') > ft_defaults > % ft_preprocessing of example dataset > cfg = []; > cfg.dataset = 'ArtifactRemoval.ds'; > cfg.trialdef.eventtype = 'trial'; > cfg = ft_definetrial(cfg); > > Warning: could not determine filetype of ArtifactRemoval.ds > > In ft_filetype at 1221 > In utilities\private\dataset2files at 42 > In ft_checkconfig at 541 > In ft_definetrial at 128 > In ICAremoveEOG at 9 > Warning: no trialfun was specified, using ft_trialfun_general > > In ft_definetrial at 135 > In ICAremoveEOG at 9 > evaluating trialfunction 'ft_trialfun_general' > ??? Error using ==> ft_read_header at 2053 > unsupported header format (unknown) > > Error in ==> ft_trialfun_general at 78 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 174 > [trl, event] = feval(cfg.trialfun, cfg); > > Error in ==> ICAremoveEOG at 9 > cfg = ft_definetrial(cfg); > > It is appreciated if you could help me. > Regards, > Samane > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at ki.se Thu Aug 13 08:04:22 2015 From: stephen.whitmarsh at ki.se (Stephen Whitmarsh) Date: Thu, 13 Aug 2015 06:04:22 +0000 Subject: [FieldTrip] problem in pre-processing stage In-Reply-To: References: Message-ID: Hi Seyede, Have you tried providing the full path to the dataset, e.g. cfg.dataset = 'C:/data/MEG/ArtifactRemoval.ds'? Adding the dataset directory to the path as you did, doesn't make those files accessible to MATLAB when loading data etc. I would remove that. If its still doesn't work, try to work through the initial steps here, and see where it breaks: http://www.fieldtriptoolbox.org/getting_started/ctf Cheers, Stephen P.s. Of course you could run your script from the dataset directory but this is *highly* discouraged and will result in problems further down the line. ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Seyedeh Samane Shojaei [samane.shojaie at gmail.com] Sent: 13 August 2015 07:21 To: fieldtrip at science.ru.nl Subject: [FieldTrip] problem in pre-processing stage Dear all, I am a new user of FieldTrip, I got problem at the first stage of reading data. I am using Matlab R2011a, windows 7, 64 bit. when I run my code, the following problem appears: addpath('FielTrip\fieldtrip-lite-20150810\fieldtrip-20150810') addpath('FielTrip\Tutorial\ArtifactRemoval\ArtifactRemoval.ds') ft_defaults % ft_preprocessing of example dataset cfg = []; cfg.dataset = 'ArtifactRemoval.ds'; cfg.trialdef.eventtype = 'trial'; cfg = ft_definetrial(cfg); Warning: could not determine filetype of ArtifactRemoval.ds > In ft_filetype at 1221 In utilities\private\dataset2files at 42 In ft_checkconfig at 541 In ft_definetrial at 128 In ICAremoveEOG at 9 Warning: no trialfun was specified, using ft_trialfun_general > In ft_definetrial at 135 In ICAremoveEOG at 9 evaluating trialfunction 'ft_trialfun_general' ??? Error using ==> ft_read_header at 2053 unsupported header format (unknown) Error in ==> ft_trialfun_general at 78 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 174 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> ICAremoveEOG at 9 cfg = ft_definetrial(cfg); It is appreciated if you could help me. Regards, Samane -------------- next part -------------- An HTML attachment was scrubbed... URL: From samane.shojaie at gmail.com Thu Aug 13 08:21:47 2015 From: samane.shojaie at gmail.com (Seyedeh Samane Shojaei) Date: Thu, 13 Aug 2015 14:21:47 +0800 Subject: [FieldTrip] problem in pre-processing stage In-Reply-To: References: Message-ID: Dear Stephen, It is solved when I provided the full path to the dataset. Thanks a lot, Samane On Thu, Aug 13, 2015 at 2:04 PM, Stephen Whitmarsh wrote: > Hi Seyede, > > Have you tried providing the full path to the dataset, e.g. cfg.dataset = > 'C:/data/MEG/ArtifactRemoval.ds'? > Adding the dataset directory to the path as you did, doesn't make those > files accessible to MATLAB when loading data etc. I would remove that. > > If its still doesn't work, try to work through the initial steps here, and > see where it breaks: > http://www.fieldtriptoolbox.org/getting_started/ctf > > Cheers, > Stephen > > P.s. Of course you could run your script from the dataset directory but > this is *highly* discouraged and will result in problems further down the > line. > > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Seyedeh Samane Shojaei [samane.shojaie at gmail.com] > *Sent:* 13 August 2015 07:21 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] problem in pre-processing stage > > Dear all, > > I am a new user of FieldTrip, I got problem at the first stage of reading > data. I am using Matlab R2011a, windows 7, 64 bit. when I run my code, the > following problem appears: > > addpath('FielTrip\fieldtrip-lite-20150810\fieldtrip-20150810') > addpath('FielTrip\Tutorial\ArtifactRemoval\ArtifactRemoval.ds') > ft_defaults > % ft_preprocessing of example dataset > cfg = []; > cfg.dataset = 'ArtifactRemoval.ds'; > cfg.trialdef.eventtype = 'trial'; > cfg = ft_definetrial(cfg); > > Warning: could not determine filetype of ArtifactRemoval.ds > > In ft_filetype at 1221 > In utilities\private\dataset2files at 42 > In ft_checkconfig at 541 > In ft_definetrial at 128 > In ICAremoveEOG at 9 > Warning: no trialfun was specified, using ft_trialfun_general > > In ft_definetrial at 135 > In ICAremoveEOG at 9 > evaluating trialfunction 'ft_trialfun_general' > ??? Error using ==> ft_read_header at 2053 > unsupported header format (unknown) > > Error in ==> ft_trialfun_general at 78 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 174 > [trl, event] = feval(cfg.trialfun, cfg); > > Error in ==> ICAremoveEOG at 9 > cfg = ft_definetrial(cfg); > > It is appreciated if you could help me. > Regards, > Samane > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From krisappel at uos.de Thu Aug 13 10:32:35 2015 From: krisappel at uos.de (Kristoffer Appel) Date: Thu, 13 Aug 2015 10:32:35 +0200 Subject: [FieldTrip] EEG source localization: ft_sourcegrandaverage does not keep individual data Message-ID: <55CC5623.2090100@uos.de> Hi all, I analyze data from an EEG experiment. Within-subject design, 8 subjects each produced trial data in two conditions. I have used ft_sourceanalysis on the data from ft_freqanalysis for obtaining the source data for each subject and each conditon, which works (at least ft_sourceplot shows something which seems to make sense). I use ft_sourcegrandaverage on the data of one condition of all 8 subjects, and a grand average is computed. So far, so good. But: I specify cfg.keepindividual = 'yes'; However, the single subject data are not kept, so I can't use ft_sourcestatistics. What could I have done wrong? Kind regards Kristoffer -- Kristoffer Appel, M.Sc. Institut für Kognitionswissenschaft Universität Osnabrück Albrechtstraße 28, 49076 Osnabrück Raum: 31/405 Tel: +49-541-969-7090, Fax:+49-541-969-2246 Email: krisappel at uos.de From julian.keil at gmail.com Thu Aug 13 10:40:15 2015 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 13 Aug 2015 10:40:15 +0200 Subject: [FieldTrip] EEG source localization: ft_sourcegrandaverage does not keep individual data In-Reply-To: <55CC5623.2090100@uos.de> References: <55CC5623.2090100@uos.de> Message-ID: Hi Kristoffer, you don't have to average over subjects before computing the statistics. You can feed a cell structure with your source-level data into the ft_sourcestatistics function. E.g. stats = ft_sourcestatistics(cfg,data1{:},data2{:}) Good Luck Julian Am 13.08.2015 um 10:32 schrieb Kristoffer Appel: > Hi all, > > I analyze data from an EEG experiment. Within-subject design, 8 subjects each produced trial data in two conditions. > > I have used ft_sourceanalysis on the data from ft_freqanalysis for obtaining the source data for each subject and each conditon, which works (at least ft_sourceplot shows something which seems to make sense). > > I use ft_sourcegrandaverage on the data of one condition of all 8 subjects, and a grand average is computed. So far, so good. > > But: > I specify cfg.keepindividual = 'yes'; > However, the single subject data are not kept, so I can't use ft_sourcestatistics. > > What could I have done wrong? > > Kind regards > Kristoffer > > > > > -- > Kristoffer Appel, M.Sc. > > Institut für Kognitionswissenschaft > Universität Osnabrück > Albrechtstraße 28, 49076 Osnabrück > Raum: 31/405 > Tel: +49-541-969-7090, Fax:+49-541-969-2246 > Email: krisappel at uos.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From krisappel at uos.de Thu Aug 13 14:03:46 2015 From: krisappel at uos.de (Kristoffer Appel) Date: Thu, 13 Aug 2015 14:03:46 +0200 Subject: [FieldTrip] EEG source localization: ft_sourcegrandaverage does not keep individual data In-Reply-To: References: <55CC5623.2090100@uos.de> Message-ID: <55CC87A2.2070005@uos.de> Hi Julian, thank you. Seems to work! Cheers Kristoffer On 08/13/2015 10:40 AM, Julian Keil wrote: > Hi Kristoffer, > > you don't have to average over subjects before computing the statistics. > You can feed a cell structure with your source-level data into the ft_sourcestatistics function. > E.g. stats = ft_sourcestatistics(cfg,data1{:},data2{:}) > > Good Luck > > Julian > > Am 13.08.2015 um 10:32 schrieb Kristoffer Appel: > >> Hi all, >> >> I analyze data from an EEG experiment. Within-subject design, 8 subjects each produced trial data in two conditions. >> >> I have used ft_sourceanalysis on the data from ft_freqanalysis for obtaining the source data for each subject and each conditon, which works (at least ft_sourceplot shows something which seems to make sense). >> >> I use ft_sourcegrandaverage on the data of one condition of all 8 subjects, and a grand average is computed. So far, so good. >> >> But: >> I specify cfg.keepindividual = 'yes'; >> However, the single subject data are not kept, so I can't use ft_sourcestatistics. >> >> What could I have done wrong? >> >> Kind regards >> Kristoffer >> >> >> >> >> -- >> Kristoffer Appel, M.Sc. >> >> Institut für Kognitionswissenschaft >> Universität Osnabrück >> Albrechtstraße 28, 49076 Osnabrück >> Raum: 31/405 >> Tel: +49-541-969-7090, Fax:+49-541-969-2246 >> Email: krisappel at uos.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Kristoffer Appel, M.Sc. Institut für Kognitionswissenschaft Universität Osnabrück Albrechtstraße 28, 49076 Osnabrück Raum: 31/405 Tel: +49-541-969-7090, Fax:+49-541-969-2246 Email: krisappel at uos.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 13 14:13:27 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 13 Aug 2015 12:13:27 +0000 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <2CBD4370-2E33-4C78-9016-368FA21F4B57@fcdonders.ru.nl> Hi Peter, I cannot reproduce your problem. Are you using the latest version of fieldtrip. I very recently fixed a bug in ft_clusterplot, which could well explain your problem. If you are actually using the most recent FT-version, then my change might have introduced a bug :o). Best, Jan-Mathijs On Aug 12, 2015, at 10:35 PM, Peter Lyons wrote: > Hello Everyone, > > I'm working on a cluster-based permutation analysis on time-frequency EEG data. I was able to successfully run the ft_freqstatistics function after computing the grand average (ft_freqgrandaverage) for my two independent groups. > > I am, however, struggling with viewing the topography of my cluster output using the ft_clusterplot function. I suspect the case may be that I am missing a time dimension in my data set based on this error message that I received: > > "Attempted to access stat.time(15); index out of bounds because numel(stat.time)=0. > > Error in ft_clusterplot (line 248) > time_perclus = [stat.time(ind_min) stat.time(ind_max)];" > > > Is there a viable way to use the ft_clusterplot if the dimensions contained in my data set is "chan_freq"? > > Or, is there an alternative plotting function that would work just as well or better? > > I would greatly appreciate any assistance with this. > > Thank you! > > Peter > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From plyons at udel.edu Thu Aug 13 17:54:23 2015 From: plyons at udel.edu (Peter Lyons) Date: Thu, 13 Aug 2015 11:54:23 -0400 Subject: [FieldTrip] (no subject) In-Reply-To: <2CBD4370-2E33-4C78-9016-368FA21F4B57@fcdonders.ru.nl> References: <2CBD4370-2E33-4C78-9016-368FA21F4B57@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, I believe you may be correct. The error I had received was from a recent Fieldtrip download (20150810). I ran my script again on an older version (20150522) I have installed on another computer and the plot came out great. Thanks again for your help! Peter On Thu, Aug 13, 2015 at 8:13 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Peter, > I cannot reproduce your problem. Are you using the latest version of > fieldtrip. I very recently fixed a bug in ft_clusterplot, which could well > explain your problem. If you are actually using the most recent FT-version, > then my change might have introduced a bug :o). > > Best, > Jan-Mathijs > > On Aug 12, 2015, at 10:35 PM, Peter Lyons wrote: > > > Hello Everyone, > > > > I'm working on a cluster-based permutation analysis on time-frequency > EEG data. I was able to successfully run the ft_freqstatistics function > after computing the grand average (ft_freqgrandaverage) for my two > independent groups. > > > > I am, however, struggling with viewing the topography of my cluster > output using the ft_clusterplot function. I suspect the case may be that I > am missing a time dimension in my data set based on this error message that > I received: > > > > "Attempted to access stat.time(15); index out of bounds because > numel(stat.time)=0. > > > > Error in ft_clusterplot (line 248) > > time_perclus = [stat.time(ind_min) stat.time(ind_max)];" > > > > > > Is there a viable way to use the ft_clusterplot if the dimensions > contained in my data set is "chan_freq"? > > > > Or, is there an alternative plotting function that would work just as > well or better? > > > > I would greatly appreciate any assistance with this. > > > > Thank you! > > > > Peter > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 13 18:49:59 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 13 Aug 2015 16:49:59 +0000 Subject: [FieldTrip] (no subject) In-Reply-To: References: <2CBD4370-2E33-4C78-9016-368FA21F4B57@fcdonders.ru.nl> Message-ID: Hi Peter, https://code.google.com/p/fieldtrip/source/browse/trunk/ft_clusterplot.m My change was dated the 11th (see the above link). I believe that you just had the bad luck to have an FT copy that had a bug in it. I suggest to upgrade to the 20150812 version (just to be sure). Best, Jan-Mathijs On Aug 13, 2015, at 5:54 PM, Peter Lyons > wrote: Hi Jan-Mathijs, I believe you may be correct. The error I had received was from a recent Fieldtrip download (20150810). I ran my script again on an older version (20150522) I have installed on another computer and the plot came out great. Thanks again for your help! Peter On Thu, Aug 13, 2015 at 8:13 AM, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Peter, I cannot reproduce your problem. Are you using the latest version of fieldtrip. I very recently fixed a bug in ft_clusterplot, which could well explain your problem. If you are actually using the most recent FT-version, then my change might have introduced a bug :o). Best, Jan-Mathijs On Aug 12, 2015, at 10:35 PM, Peter Lyons > wrote: > Hello Everyone, > > I'm working on a cluster-based permutation analysis on time-frequency EEG data. I was able to successfully run the ft_freqstatistics function after computing the grand average (ft_freqgrandaverage) for my two independent groups. > > I am, however, struggling with viewing the topography of my cluster output using the ft_clusterplot function. I suspect the case may be that I am missing a time dimension in my data set based on this error message that I received: > > "Attempted to access stat.time(15); index out of bounds because numel(stat.time)=0. > > Error in ft_clusterplot (line 248) > time_perclus = [stat.time(ind_min) stat.time(ind_max)];" > > > Is there a viable way to use the ft_clusterplot if the dimensions contained in my data set is "chan_freq"? > > Or, is there an alternative plotting function that would work just as well or better? > > I would greatly appreciate any assistance with this. > > Thank you! > > Peter > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mick.lehmann at uzh.ch Fri Aug 14 15:40:33 2015 From: mick.lehmann at uzh.ch (Mick Lehmann) Date: Fri, 14 Aug 2015 15:40:33 +0200 Subject: [FieldTrip] Baseline Correction using 'relchange' or 'db' In-Reply-To: References: Message-ID: <251EF6AA-DC11-417E-B190-D4191F2FB2A5@uzh.ch> Dear Stephan and Anne, sorry that it took me so long. It was the main issue that the cfg was set too late and the cfg-settings were only defined for the following condition. Therefore, only one condition was baseline corrected while the other wasn't. This resulted in weird statistical analyses while the figures were fine since the baseline correction was applied in ft_multiplitTFR. Thank you very much for reading the script so carefully! All the best, Mick -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at ki.se Fri Aug 14 16:41:42 2015 From: stephen.whitmarsh at ki.se (Stephen Whitmarsh) Date: Fri, 14 Aug 2015 14:41:42 +0000 Subject: [FieldTrip] Baseline Correction using 'relchange' or 'db' In-Reply-To: <251EF6AA-DC11-417E-B190-D4191F2FB2A5@uzh.ch> References: , <251EF6AA-DC11-417E-B190-D4191F2FB2A5@uzh.ch> Message-ID: Great new Mick, good luck with the study! Stephen ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Mick Lehmann [mick.lehmann at uzh.ch] Sent: 14 August 2015 15:40 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Baseline Correction using 'relchange' or 'db' Dear Stephan and Anne, sorry that it took me so long. It was the main issue that the cfg was set too late and the cfg-settings were only defined for the following condition. Therefore, only one condition was baseline corrected while the other wasn't. This resulted in weird statistical analyses while the figures were fine since the baseline correction was applied in ft_multiplitTFR. Thank you very much for reading the script so carefully! All the best, Mick -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Sat Aug 15 11:43:55 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Sat, 15 Aug 2015 09:43:55 +0000 (UTC) Subject: [FieldTrip] realtime TMS-EEG In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB51857F@exprd01.hosting.ru.nl> References: <3D00B7615FB58D46A0B49B9AD67A33EB51857F@exprd01.hosting.ru.nl> Message-ID: <1567462124.2919460.1439631835989.JavaMail.yahoo@mail.yahoo.com> Hi, Thank you for answering my question. Sorry for my late reply.Actually it is work. I forgot to add the ft_defaults in matlab.I manage to view the signal.However,  the EEG signal is not moving in the plot. It only shows the last signal before stop. I mean it is realtime so I supposed to see the movement of the signal.What should I do in this matter? Thank you. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 On Tuesday, August 4, 2015 5:59 PM, "Herring, J.D. (Jim)" wrote: #yiv6304201544 #yiv6304201544 -- _filtered #yiv6304201544 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv6304201544 {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;} _filtered #yiv6304201544 {font-family:SimSun;panose-1:2 1 6 0 3 1 1 1 1 1;} _filtered #yiv6304201544 {font-family:SimSun;panose-1:2 1 6 0 3 1 1 1 1 1;} _filtered #yiv6304201544 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv6304201544 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;} _filtered #yiv6304201544 {panose-1:2 1 6 0 3 1 1 1 1 1;}#yiv6304201544 #yiv6304201544 p.yiv6304201544MsoNormal, #yiv6304201544 li.yiv6304201544MsoNormal, #yiv6304201544 div.yiv6304201544MsoNormal {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}#yiv6304201544 a:link, #yiv6304201544 span.yiv6304201544MsoHyperlink {color:blue;text-decoration:underline;}#yiv6304201544 a:visited, #yiv6304201544 span.yiv6304201544MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv6304201544 span.yiv6304201544EmailStyle17 {color:#1F497D;}#yiv6304201544 .yiv6304201544MsoChpDefault {font-size:10.0pt;} _filtered #yiv6304201544 {margin:72.0pt 72.0pt 72.0pt 72.0pt;}#yiv6304201544 div.yiv6304201544WordSection1 {}#yiv6304201544 _filtered #yiv6304201544 {} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;}#yiv6304201544 ol {margin-bottom:0cm;}#yiv6304201544 ul {margin-bottom:0cm;}#yiv6304201544 Dear Wan,   Please have a look at this page:http://www.fieldtriptoolbox.org/development/realtime (also specific to TMSi:http://www.fieldtriptoolbox.org/development/realtime/tmsi) The pages might not be fully up to date but they should help you get started. If you then run into problems please help us help you by supplying the following:   § The cfg you used § The fields of your data structure § The line you called that gave an error / that you would like to ask a question on § The exact error message you got   Best,   Jim       From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl]On Behalf Of wan amirah Wan azlan Sent: dinsdag 4 augustus 2015 11:32 To: fieldtrip at science.ru.nl Subject: [FieldTrip] realtime TMS-EEG   Hi,   I'm using TMSI Porti and I want to record the data in realtime. However, it is not working when I used the ft_realtime_signalviewer. Does I miss any step?  Any solution guys?   Thanks.   Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Sat Aug 15 19:02:34 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Sat, 15 Aug 2015 19:02:34 +0200 Subject: [FieldTrip] holes in head Message-ID: Dear Fieldtrip community, When plotting the head shape with ft_volumerealign (the input to the ft_volumerealign function being simpy the output produced by the ft_read_mri), some of the subjects show deep crater-like holes in the head surface. Images available here: https://goo.gl/photos/txeai9EfFXCn4hQ17 Does anyone have an idea what might have caused these 'holes'? If this is incomplete information to be able to answer the question, please ask so I can provide further details. Best wishes, Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Sun Aug 16 10:55:16 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Sun, 16 Aug 2015 08:55:16 +0000 (UTC) Subject: [FieldTrip] tmsidriver Message-ID: <956939491.3228363.1439715316045.JavaMail.yahoo@mail.yahoo.com> Hi, >From what I understand, to able to create the realtime EEg using TMSi porti is by opening the tmsidriver.exe. Is this correct? If so, where can I find it in the toolbox? because  I do not found the tmsidriver.exe.thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Sun Aug 16 11:16:08 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Sun, 16 Aug 2015 09:16:08 +0000 (UTC) Subject: [FieldTrip] tmsidriver In-Reply-To: <956939491.3228363.1439715316045.JavaMail.yahoo@mail.yahoo.com> References: <956939491.3228363.1439715316045.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1587713174.3378746.1439716568760.JavaMail.yahoo@mail.yahoo.com> Hi, I already found the driver.But why the screen is all black? Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 On Sunday, August 16, 2015 4:55 PM, wan amirah Wan azlan wrote: Hi, >From what I understand, to able to create the realtime EEg using TMSi porti is by opening the tmsidriver.exe. Is this correct? If so, where can I find it in the toolbox? because  I do not found the tmsidriver.exe.thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Mon Aug 17 11:46:38 2015 From: michelic72 at gmail.com (Cristiano Micheli) Date: Mon, 17 Aug 2015 11:46:38 +0200 Subject: [FieldTrip] holes in head In-Reply-To: References: Message-ID: Dear Maris I am heavily guessing here, but are the anatomical MRI images cut on top? I only encountered this in the case that the MRI slices covered an incomplete volume of the head. It might be something else, though this is easy to check... Good luck Cris On Sat, Aug 15, 2015 at 7:02 PM, Maris Skujevskis wrote: > Dear Fieldtrip community, > > When plotting the head shape with ft_volumerealign (the input to the > ft_volumerealign function being simpy the output produced by the > ft_read_mri), some of the subjects show deep crater-like holes in the head > surface. > Images available here: https://goo.gl/photos/txeai9EfFXCn4hQ17 > > Does anyone have an idea what might have caused these 'holes'? > > If this is incomplete information to be able to answer the question, > please ask so I can provide further details. > > Best wishes, > Maris > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Mon Aug 17 14:51:21 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Mon, 17 Aug 2015 14:51:21 +0200 Subject: [FieldTrip] holes in head Message-ID: Thanks for your suggestion, Cristiano. However, the anatomical images do cover the entire head! There seem to be two possibilities - either there is something wrong in how some lower level function employed by ft_volumerealign creates the head surface out of my MR files or there are some real deformities present in my MR images. Since I do not have a well-trained eye for this, could someone take a quick look at a couple of the original MR files of any of these subjects (same link as previously): https://goo.gl/photos/txeai9EfFXCn4hQ17 and say whether they look distorted in any way? Let me know and I will share the MR files. Best wishes, Maris > Date: Mon, 17 Aug 2015 11:46:38 +0200 > From: Cristiano Micheli > To: FieldTrip discussion list > Subject: Re: [FieldTrip] holes in head > Message-ID: > ZT2mdpTxePPwDT72z1hU9biQ7--ipA at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Dear Maris > > I am heavily guessing here, but are the anatomical MRI images cut on top? I > only encountered this in the case that the MRI slices covered an incomplete > volume of the head. > > It might be something else, though this is easy to check... > > Good luck > Cris > > > On Sat, Aug 15, 2015 at 7:02 PM, Maris Skujevskis > wrote: > > > Dear Fieldtrip community, > > > > When plotting the head shape with ft_volumerealign (the input to the > > ft_volumerealign function being simpy the output produced by the > > ft_read_mri), some of the subjects show deep crater-like holes in the > head > > surface. > > Images available here: https://goo.gl/photos/txeai9EfFXCn4hQ17 > > > > Does anyone have an idea what might have caused these 'holes'? > > > > If this is incomplete information to be able to answer the question, > > please ask so I can provide further details. > > > > Best wishes, > > Maris > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150817/b429c646/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 57, Issue 13 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Aug 17 15:20:59 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 17 Aug 2015 15:20:59 +0200 Subject: [FieldTrip] Error in Cluster permutation tutorial? In-Reply-To: References: Message-ID: <3A47A52D-41CB-44F1-ADF3-83F4574F5CE2@donders.ru.nl> Hi Rajat and Stephen Please see my inline reply below. On 06 Aug 2015, at 16:32, Rajat Thomas wrote: > I followed the tutorial on > http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics?s[]=cluster&s[]=permutation > > at the very end, I wanted to do the ft_clusterplot but then I did not get topoplots as a function of time as in the > tutorial and instead just got one plot. > > Is there something wrong in the way the parameters are set in the tutorial. The code for ft_clusterplot was recently extended to be able to handle more types of data, but apparently it broke for the existing type of data. I have fixed it (see https://code.google.com/p/fieldtrip/source/detail?r=10603), it now supports chan, chan_time, chan_freq and chan_freq_time (but only if either time or freq has length 1). The fixed version is available from github or svn, or this evening on ftp. On 07 Aug 2015, at 16:43, Stephen Politzer-Ahles wrote: > Also, is it just me or is http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics#permutation_test_based_on_cluster_statistics essentially duplicating (with what looks like a more recent example and code) what's in http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock ? Would it be worthwhile to reconcile these two (and maybe replace one with a link to the other, so they don't get out of sync again)? Content-wise they are similar, but we use the eventrelatedstatistics tutorial in training settings (e.g. workshops) as gentle introduction into statistics in general with only towards the end the clustering, whereas cluster_permutation_timelock goes more in depth. So they serve different goals. Since the code should now be working again for the 1st, I hope it also works for the 2nd. best regards, Robert From michelic72 at gmail.com Mon Aug 17 17:15:09 2015 From: michelic72 at gmail.com (Cristiano Micheli) Date: Mon, 17 Aug 2015 17:15:09 +0200 Subject: [FieldTrip] holes in head In-Reply-To: References: Message-ID: Hi Maris, it's interesting. I think there is no need (for now) to upload the data though. Could you attach the code that you used to generate the figures? There might be important information there, such as the coordinate system or the resolution of the MR scans (what is the FOV? What is the slice distance? etc...) It'd be great if you could patch the snippet of code. All the best! Cris On Mon, Aug 17, 2015 at 2:51 PM, Maris Skujevskis wrote: > Thanks for your suggestion, Cristiano. However, the anatomical images do > cover the entire head! > > There seem to be two possibilities - either there is something wrong in > how some lower level function employed by ft_volumerealign creates the head > surface out of my MR files or there are some real deformities present in my > MR images. > > Since I do not have a well-trained eye for this, could someone take a > quick look at a couple of the original MR files of any of these subjects > (same link as previously): https://goo.gl/photos/txeai9EfFXCn4hQ17 and > say whether they look distorted in any way? Let me know and I will share > the MR files. > > Best wishes, > Maris > > >> Date: Mon, 17 Aug 2015 11:46:38 +0200 >> From: Cristiano Micheli >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] holes in head >> Message-ID: >> > ZT2mdpTxePPwDT72z1hU9biQ7--ipA at mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> >> Dear Maris >> >> I am heavily guessing here, but are the anatomical MRI images cut on top? >> I >> only encountered this in the case that the MRI slices covered an >> incomplete >> volume of the head. >> >> It might be something else, though this is easy to check... >> >> Good luck >> Cris >> >> >> On Sat, Aug 15, 2015 at 7:02 PM, Maris Skujevskis > > >> wrote: >> >> > Dear Fieldtrip community, >> > >> > When plotting the head shape with ft_volumerealign (the input to the >> > ft_volumerealign function being simpy the output produced by the >> > ft_read_mri), some of the subjects show deep crater-like holes in the >> head >> > surface. >> > Images available here: https://goo.gl/photos/txeai9EfFXCn4hQ17 >> > >> > Does anyone have an idea what might have caused these 'holes'? >> > >> > If this is incomplete information to be able to answer the question, >> > please ask so I can provide further details. >> > >> > Best wishes, >> > Maris >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150817/b429c646/attachment-0001.html >> > >> >> ------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 57, Issue 13 >> ***************************************** >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.hipp at googlemail.com Tue Aug 18 11:20:37 2015 From: joerg.hipp at googlemail.com (Joerg Hipp) Date: Tue, 18 Aug 2015 11:20:37 +0200 Subject: [FieldTrip] Postdoc position: "EEG / MEG Biomarkers Development" at Roche in Basel Message-ID: Dear all, we are searching for a postdoctoral fellow at Roche in Basel, Switzerland. The aim is to identify, develop, and implement disease-related EEG / MEG biomarkers. Please find details here: http://www.roche.com/careers/jobs/jobsearch/job.htm?id=E-3103768353&locale=en&title=PostDoctoral%20Research%20Fellow%20-%20EEG%20/%20MEG%20Biomarkers%20development All the best, Joerg -- Joerg Hipp, PhD Biomarker and Experimental Medicine Leader F. Hoffmann-La Roche Ltd. Grenzacherstrasse 124 4070 Basel, Switzerland Email: joerg.hipp at roche.com https://scholar.google.ch/citations?user=oxsJ6q4AAAAJ&hl=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From aler1 at gmx.de Tue Aug 18 11:34:53 2015 From: aler1 at gmx.de (alla Brodski) Date: Tue, 18 Aug 2015 11:34:53 +0200 Subject: [FieldTrip] Postdoc position: "EEG / MEG Biomarkers Development" at Roche in Basel In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From marliesvissers at gmail.com Tue Aug 18 13:16:36 2015 From: marliesvissers at gmail.com (Marlies Vissers) Date: Tue, 18 Aug 2015 13:16:36 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 4 In-Reply-To: References: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> <431477C1-7C6F-4D4D-96F5-1C80729B3140@fcdonders.ru.nl> Message-ID: Dear Eric, Jan-Mathijs, Arjan, and Jorn, Thanks for your input on my questions. Jan-Mathijs’ reading of my post was correct: with the connectivity matrix I indeed intended to refer to the boolean matrix that defines the neighbour-structure of the channels. The analysis I plan to run is a cross-subject brain-behavior correlation (so over subjects) over my channel*time*frequency space, which should subsequently be cluster-corrected. Thanks Arjan for pointing out that the function I was using has been renamed! My problem was that I obtained strange cluster shapes with non-neighbouring electrodes only, while minnbchan was set to 2. It might be important to mention again that I imported my data to Fieldtrip for the permutation test, after running time-frequency composition with custom Matlab routines. I structured my data such that the format matches the format of data that was fully preprocessed and decomposed in Fieldtrip (at least I tried to). Jorn’s advice on how to run the low-level function channelconnectivity was helpful. When doing so (inputting the data structure as it was passed by ft_statistics_montecarlo), I noted that the boolean connectivity matrix representing the channel-neighbours did not resemble the spatial characteristics of the electrodes in my data. Furthermore, I noticed that the channel field in my output (stat.cfg.channel) displayed a different channel order than the one I constructed using ft_read_sens, which properly fits the organization of my data. I tried to solve this issue by manually hardcoding the correct channellabels in the private function channelconnectivity. This seems to work: my clusters now consist of neighbouring channels, and the channel order in my output is similar to my input as well. I am not sure whether my solution is valid, so I copied my edits below (line18-25 in the original channelconnectivty function). I commented out the line ‘chans = cfg.channel’, and hardcoded the channel locations instead. If one of you sees something that is absolutely not intended to happen, knows what might have gone wrong, or has any other advice or comments, please let me know! Thanks in advance, Marlies Edited code from the function channelconnectivity (orignal line chans=cfg.channel is now commented out) % check whether to use channels in the cfg or data if nargin < 2 && isfield(cfg, 'channel') %chans = cfg.channel; chans ={ 'Fp1' 'AF7' 'AF3' 'F1' 'F3' 'F5' 'F7' 'FT7' 'FC5' 'FC3' 'FC1' 'C1' 'C3' 'C5' 'T7' 'TP7' 'CP5' 'CP3' 'CP1' 'P1' 'P3' 'P5' 'P7' 'P9' 'PO7' 'PO3' 'O1' 'Iz' 'Oz' 'POz' 'Pz' 'CPz' 'Fpz' 'Fp2' 'AF8' 'AF4' 'AFz' 'Fz' 'F2' 'F4' 'F6' 'F8' 'FT8' 'FC6' 'FC4' 'FC2' 'FCz' 'Cz' 'C2' 'C4' 'C6' 'T8' 'TP8' 'CP6' 'CP4' 'CP2' 'P2' 'P4' 'P6' 'P8' 'P10' 'PO8' 'PO4' 'O2'}; elseif nargin == 2 chans = data.label; else error('either the cfg needs to have both cfg.channel and cfg.neighbours, or a second (data) input argument needs to be specified'); end On 5 August 2015 at 16:45, Arjen Stolk wrote: > And to briefly chime in on point 1, i believe that statfun has changed its > name to correlationT some time ago. > Yours, Arjen > > > > On Aug 5, 2015, at 6:11 AM, Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl> wrote: > > Hi Eric, > > Allow me to chime in to avoid any confusion from your side regarding point > 2). I think that Marlies refers to a boolean spatial adjacency matrix that > defines whether channels are neighbours, or not. In the code, this is > referred to as a matrix named ‘connectivity’, which may not be the most > obvious denomination. At some point in time we have made some low-level > changes in the FieldTrip code, concerning the treatment of the spatial > dimension for the clustering, which allows to treat spatial clustering > along edges along a triangulated mesh (e.g. dipole locations defined on the > cortical sheet) in the same way as spatial clustering on an extracranial > channel array. Channel clustering is now a ‘special case’ where the > cfg.neighbours structure array is converted into the boolean adjancency > matrix, by the low-level channelconnectivity function, which is in > fieldtrip/private. > > Best, > Jan-Mathijs > > On Aug 5, 2015, at 2:54 PM, Maris, E.G.G. (Eric) > wrote: > > Dear Marlies, > > I did not go through all details of your correspondence with Jorn, but let > me add a few remarks from a birds-eye perspective. > > 1. Your statfun is intersubjcorr, which evaluates the correlation over > subjects between a neuronal and a behavioural variable, with the neuronal > variable typically being high-dimensional, and thereby creating a multiple > comparisons problem. Btw, I don’t like the name *inter*subjcorr, because > the correlation is * over* subjects and not between (=inter). > 2. I’m puzzled by where the connectivity matrix comes from, because your > analysis does not involve between-channel quantities. In fact, from the > perspective of the neuronal data, it is a typical univariate analysis in > which every channel is treated separately. The only between-aspect in your > study involves the relation between the (high-dimensional) neuronal > variable and the (one-dimensional) behavioral variable. > 3. Fieldtrip has no cluster-based statistics implemented that clusters > channel-pairs, except for the trivial case in which you select a single > reference channel for which you evaluate the coupling with all other > channels (as in Maris, Schoffelen & Fries, 2007). > > best, > Eric > > > > > *From: *Marlies Vissers > *Subject: **Re: [FieldTrip] Effect of cfg.minnbchan* > *Date: *4 Aug 2015 16:38:57 CEST > *To: *FieldTrip discussion list > *Reply-To: *FieldTrip discussion list > > > Dear Jörn, > > > Thanks for your reply and suggestion! My neighbourhood-definitions look > fine according to ft_neighbourplot. > However, I am not sure whether the connectivity matrix in my output > (stat.cfg.connectivity) is correct. For example, I inspected which channels > are defined as neighbours of C5 in the connectivity matrix. Here, I assumed > the channel order in this matrix resembles the channel order defined by the > function ‘ft_read_sens’, as stored in the field elec.label. > Using this particular organization of electrodes, the pattern of spatially > neighbouring channels matches the strange spatial distribution of one of my > resulting clusters. > E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern > matches my strange result, where a cluster consisting of FC4, Cz, and C5, > survived cluster correction with minnbchan set to 2. > > > I am currently trying to establish whether my cfg.connectivity matrix is > indeed the problem, and where this problem arises. One thing I suspect > might be the cause is that the call to ‘channelconnectivity’ by > ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, > goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure > directly (but not when running ft_freqstatistics), I get the following error > *‘Undefined function 'channelconnectivity' for input arguments of type > 'struct'’*. > If channelconnectivity was not properly run, it could be that the > electrode ordering as defined by ft_read_sens is not adjusted to the order > used by cfg.neighbours before construction of the connectivity matrix. > However, when I just run ft_freqstatistics, I do not get an error that > suggests any problems with ‘channelconnectivity’, so I am not entirely sure > whether this error also occurs when running the analysis as a whole. > > > Could you (or anyone else) give me any advice on how to make sure that the > definition of neighbours in the connectivity matrix is constructed using > the properly reordered vector with channel indices (the variable sel2 in > channelconnectivity if I’m correct)? > > > Thanks in advance! > > > Best, > Marlies > > On 3 August 2015 at 09:37, Jörn M. Horschig wrote: > >> Dear Marlies, >> >> if I am not mistaken, the minnbchan option checks indeed if every >> channels in a cluster has at least the specified amount of channels in it >> and removes it otherwise. The code is documented as follows: >> % For every (time,frequency)-element, it is calculated how many >> significant >> % neighbours .this channel has If a significant channel has less than >> minnbchan >> % significant neighbours, then this channel is removed from onoff. >> >> If something went wrong is hard to tell – it also depends on how the >> neighbor structure looks like. If you do not have C3 or C1, then C5 can >> indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz >> could be called a neighbor of FC4. You can check how neighbors are defined >> by using ft_neighbourplot. That’s the first check I’d do. >> >> Best, >> Jörn >> >> >> *--* >> >> *Jörn M. Horschig, PhD*, Software Engineer >> Artinis Medical Systems | +31 481 350 980 >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Marlies Vissers >> *Sent:* Friday, July 31, 2015 3:27 PM >> *To:* fieldtrip, donders >> *Subject:* [FieldTrip] Effect of cfg.minnbchan >> >> Dear Fieldtrippers. >> >> I have a question about the effect of the tuning parameter cfg.minnbchan >> when performing cluster based permutation testing, since the spatial >> characteristics of my clusters differ from what I expected to find given >> the settings I used. >> >> I am running cross-subject correlations (n=31) between a behavioral >> variable and a subj*channel*time*frequency matrix with power data >> (preprocessed using EEGlab and decomposed outside of Fieldtrip), using >> ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd >> like to avoid finding clusters with difficult-to-interpret shapes, I set >> cfg.minnbchan to 2. >> >> My concern however, is that the resulting clusters do not always exist of >> neighbouring electrodes. For example, one of the resulting clusters is >> located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected >> through the other dimensions (time & frequency). In one of Eric Maris' >> previous replies to an older post about cfg.minnbchan, I read that the >> parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. >> Does this mean that any cluster without spatially neighbouring electrodes >> should have been rejected when minnbchan is set to 2? >> >> I would be very grateful if someone could let me know whether setting >> cfg.minnbchan to 2 can -in principle- still yield clusters with >> spatially-non-adjacent electrodes, or whether this result is likely due to >> an error in my code. If the latter, I'd very much appreciate advice on >> checks I could perform to detect the potential error. >> >> The code I used to run this analysis is pasted below. >> >> Thanks in advance! >> >> Best, >> Marlies >> >> Marlies Vissers >> PhD student >> >> University of Amsterdam | Department Brain and Cognition | Cognition and >> Plasticity Laboratory >> Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl >> >> --- >> >> % Import the electrode labels from an EEGlab set >> elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); >> >> % Create matrix with TF data >> freqData.freq = frex; % Frequenies >> of TF matrix >> freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF >> matrix >> freqData.dimord = 'subj_chan_freq_time'; >> freqData.label = elec.label; >> freqData.powspctrm = tempTF; % tempTF is matrix >> with subj*channels*freq*time >> >> % Create matrix with behavioral data, make sure the sizes match >> behav.freq = frex; >> behav.time = tx(TF_idx(1):TF_idx(2))./1000; >> behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is >> just behavioral data in this matrix >> behav.label = elec.label; >> behav.powspctrm = repmat(accEffect,[1 >> size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); >> % accEffect is 1*subj array >> >> % Set configuration for perm test >> % Create cfg and insert parameters >> cfg = []; >> cfg.latency = [0 1.250]; >> cfg.frequency = [2 30]; >> cfg.channel ='all'; >> cfg.method = 'montecarlo'; >> cfg.statistic = 'ft_statfun_intersubcorr'; >> cfg.type = ft_getopt(cfg, 'type', 'Spearman'); >> cfg.correctm = 'cluster'; >> cfg.clusteralpha = 0.05; >> cfg.clusterstatistic = 'maxsum'; >> cfg.minnbchan = 2; >> cfg.tail = 0; >> cfg.clustertail = 0; >> cfg.alpha = 0.025; >> cfg.numrandomization = 1000; >> >> % prepare_neighbours determines what sensors may form clusters: load >> Biosemi 64 channel cap >> cfg.template = [fieldtripdir thisSlash 'template' thisSlash >> 'neighbours' thisSlash 'biosemi64_neighb.mat']; >> cfg.layout = [fieldtripdir thisSlash 'template' >> thisSlash 'layout' thisSlash 'biosemi64.lay']; >> cfg_neighb.method = 'template'; >> cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); >> >> % Create design mat >> subj = 31; >> design = zeros(2,2*subj); >> for i = 1:subj >> design(2,i) = i; >> end >> for i = 1:subj >> design(2,subj+i) = i; >> end >> design(1,1:subj) = 1; >> design(1,subj+1:2*subj) = 2; >> cfg.design = design; >> cfg.ivar = 1; >> cfg.uvar = 2; >> >> % Run stats >> [stat] = ft_freqstatistics(cfg,freqData,behav); >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.vandenieuwenhuijzen at donders.ru.nl Tue Aug 18 16:29:55 2015 From: m.vandenieuwenhuijzen at donders.ru.nl (Nieuwenhuijzen, M.E. van de (Marieke)) Date: Tue, 18 Aug 2015 14:29:55 +0000 Subject: [FieldTrip] zlim in ft_plot_mesh & record-button in ft_sourcemovie Message-ID: Hi Fieldtrippers, I have two small questions on plotting MNE reconstructed source space data on a mesh. - The first question is about ft_plot_mesh. Is it possible to set the zlim somehow, such that if I want to compare two plots the colour scales of said plots are equal? - The second question is about ft_sourcemovie, and more specifically the Record-button. When I click this button, the Pause and Quit buttons seem to be ignored afterwards, so I can't stop the movie, nor can I quit the movie and close the window, which means I have to force-quit Matlab. Do you have any pointers on what could solve this issue? And where would this recorded movie be saved? Or do I misinterpret the function of the button? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at donders.ru.nl Tue Aug 18 17:29:49 2015 From: n.lam at donders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Tue, 18 Aug 2015 15:29:49 +0000 Subject: [FieldTrip] zlim in ft_plot_mesh & record-button in ft_sourcemovie In-Reply-To: References: Message-ID: Hey Marieke, For adjusting the zlim I use Cheers, Nietzsche ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Nieuwenhuijzen, M.E. van de (Marieke) [m.vandenieuwenhuijzen at donders.ru.nl] Sent: 18 August 2015 16:29 To: fieldtrip at science.ru.nl Subject: [FieldTrip] zlim in ft_plot_mesh & record-button in ft_sourcemovie Hi Fieldtrippers, I have two small questions on plotting MNE reconstructed source space data on a mesh. - The first question is about ft_plot_mesh. Is it possible to set the zlim somehow, such that if I want to compare two plots the colour scales of said plots are equal? - The second question is about ft_sourcemovie, and more specifically the Record-button. When I click this button, the Pause and Quit buttons seem to be ignored afterwards, so I can't stop the movie, nor can I quit the movie and close the window, which means I have to force-quit Matlab. Do you have any pointers on what could solve this issue? And where would this recorded movie be saved? Or do I misinterpret the function of the button? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Wed Aug 19 01:53:06 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Wed, 19 Aug 2015 01:53:06 +0200 Subject: [FieldTrip] "segmentation is not star-shaped" warning Message-ID: Dear Fieldtrip community, I am working on constructing an EEG volume conduction model. When running ft_prepare_mesh I get a warning message the meaning if which is not clear, hence I do not know how to fix it. Any help will be appreciated. Details below. Code executed: >mri = ft_read_mri(file_name_mri); >cfg = [ ]; >cfg.brainsmooth = 5; >cfg.scalpsmooth = 4; >cfg.brainthreshold = 0.5; >cfg.scalpthreshold = 0.1; >segm_mri = ft_volumesegment(cfg, mri); >cfg = [ ]; >cfg.method = 'projectmesh'; >cfg.tissue = {'brain','skull','scalp'}; >cfg.numvertices = [3000 2000 1000]; >surf_mesh = ft_prepare_mesh(cfg, segm_mri); The code executes till the end, but I get this message: >"Warning: the segmentation is not star-shaped, please check the surface mesh" When inspecting the mesh visually, I find no obvious abnormalities. The meshes that do get the warning look more or less the same as the meshes of other subjects that do not get the warning. What is most interesting, when I use a segmented Fieldtrip template ('~/matlab/fieldtrip/external/spm8/templates/T1.nii') as an input to ft_prepare_mesh, I also get the same warning. Here are 3 related questions: What could be another way of checking/another indicator that the surface meshes have been constructed incorrectly, since visually they seem ok? Could changing the smoothing and thresholding parameters improve the segmentation? (I haven't yet found values that do not produce the warning, though.) Is this an 'important' warning that signals that my subsequent source localization might not work or might work incorrectly (i.e., I should not just ignore it) ? Thanks in advance, Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From daphbd1994 at hotmail.com Wed Aug 19 17:18:42 2015 From: daphbd1994 at hotmail.com (=?iso-8859-1?B?RGFwaG7pIEJlcnRyYW5kLUR1Ym9pcw==?=) Date: Wed, 19 Aug 2015 13:18:42 -0200 Subject: [FieldTrip] Convert .mat to .ds Message-ID: Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander "But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version?Best regards,Daphné -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonas at obleser.de Wed Aug 19 23:05:35 2015 From: jonas at obleser.de (Jonas Obleser) Date: Wed, 19 Aug 2015 23:05:35 +0200 Subject: [FieldTrip] Pre-call for new post docs in the Obleser lab Message-ID: <6D62C565-634F-4C2B-90F3-6CF7A9AF80A9@obleser.de> Pre-call: The research group “Auditory Cognition” (headed by Prof. Dr. Jonas Obleser; auditorycognition.com ) in the recently established Department of Psychology, University of Lübeck, is seeking to soon hire several Postdoctoral Researchers starting by January 2016, initially for 3 years, with the option of a 2-year extension. These positions fall into the larger framework of an ERC Consolidator grant “The listening challenge: How ageing brains adapt” recently awarded to Jonas Obleser, and will allow the joint development of cognitive neuroscience and psychological research projects targeting adaptive control in the auditory modality of middle-aged adults. [About the ERC project: The auditory sensory modality poses an excellent, although under-utilised, research model to understand the cognitive adjustments to sensory change (here termed “adaptive control”), their neural basis, and their large variation amongst individuals. Hearing abilities begin to decline already in the fourth life decade, and our guiding hypothesis is that individuals differ in the extent to which they are neurally, cognitively, and psychologically equipped to adapt to this sensory decline.] We are looking for creative minds with a PhD degree and a promising track record in cognitive neuroscience, psychology, physics, or engineering. A strong background and interest in research methods is desirable. Prior experience with either human neuroscience methods (especially advanced EEG and/or fMRI analyses) or modeling of rich data sets (e.g., latent growth modeling) is expected. The University of Lübeck is a modern university specializing in Medicine, Computer Science, Molecular Biology, Biomathematics and Medical Engineering. Internationally renowned research and high standards of academic tutoring characterize the profile of the university. A new dedicated research building (Centre for Brain, Behaviour, and Metabolism – CBBM) housing also the Obleser lab will open in late 2015. Payment will follow salary group E13 TV-L (full time), if conditions based on German Public service regulations are satisfied. These positions will be announced officially later in autumn 2015, but interested candidates should be in touch now with Jonas Obleser, jonas.obleser at uni-luebeck.de http://auditorycognition.com http://uni-luebeck.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From samane.shojaie at gmail.com Thu Aug 20 06:06:54 2015 From: samane.shojaie at gmail.com (Seyedeh Samane Shojaei) Date: Thu, 20 Aug 2015 12:06:54 +0800 Subject: [FieldTrip] problem with surface & template files Message-ID: Dear all, May I know where the "surface files" is? I am running last part of "Localizing oscillatory sources using beamformer techniques" tutorial ( http://www.fieldtriptoolbox.org/tutorial/beamformer), but have a difficulty to find 'surface_white_both.mat'. my another problem is for running the code available for planar gradient calculation (http://www.fieldtriptoolbox.org/tutorial/eventrelatedaveraging). the error is because the template file is not found. ??? Error using ==> ft_prepare_neighbours at 140 Template file could not be found - please check spelling or see http://fieldtrip.fcdonders.nl/faq/how_can_i_define_my_own_neighbourhood_template (please consider sharing it with others via the FT mailing list) how to add the templates? when I use "addpath('template')", it is not recognized. your help will be appreciated, Samane -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Thu Aug 20 09:32:27 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 20 Aug 2015 07:32:27 +0000 Subject: [FieldTrip] problem with surface & template files In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B3036F@exprd01.hosting.ru.nl> Dear Samane, Please make sure you have downloaded the full version of fieldtrip and not the ‘lite’ version. Not all of the templates are included in the ‘lite’ version to save space. If you have done that, make sure that you have added the path to the fieldtrip folder (e.g. addpath(‘d:\fieldtrip’) and run ‘ft_defaults’. You should then be able to run the code in the beamformer and event-related averaging tutorial as fieldtrip automatically looks for the templates in the correct location (which is: fieldtrip\template\anatomy\...). Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Seyedeh Samane Shojaei Sent: donderdag 20 augustus 2015 6:07 To: FieldTrip discussion list Subject: [FieldTrip] problem with surface & template files Dear all, May I know where the "surface files" is? I am running last part of "Localizing oscillatory sources using beamformer techniques" tutorial (http://www.fieldtriptoolbox.org/tutorial/beamformer), but have a difficulty to find 'surface_white_both.mat'. my another problem is for running the code available for planar gradient calculation (http://www.fieldtriptoolbox.org/tutorial/eventrelatedaveraging). the error is because the template file is not found. ??? Error using ==> ft_prepare_neighbours at 140 Template file could not be found - please check spelling or see http://fieldtrip.fcdonders.nl/faq/how_can_i_define_my_own_neighbourhood_template (please consider sharing it with others via the FT mailing list) how to add the templates? when I use "addpath('template')", it is not recognized. your help will be appreciated, Samane -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Thu Aug 20 09:37:20 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 20 Aug 2015 07:37:20 +0000 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> Dear Daphne, I have checked for you and the newest available version of fieldtrip (also fieldtrip-lite) includes writeCTFds.m in the folder 'fieldtrip\external\ctf\'. I have also checked a version from 2010 and it was there back then as well. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: woensdag 19 augustus 2015 17:19 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Convert .mat to .ds Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander " But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? Best regards, Daphné -------------- next part -------------- An HTML attachment was scrubbed... URL: From samane.shojaie at gmail.com Thu Aug 20 10:20:54 2015 From: samane.shojaie at gmail.com (Seyedeh Samane Shojaei) Date: Thu, 20 Aug 2015 16:20:54 +0800 Subject: [FieldTrip] problem with surface & template files In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB12B3036F@exprd01.hosting.ru.nl> References: <3D00B7615FB58D46A0B49B9AD67A33EB12B3036F@exprd01.hosting.ru.nl> Message-ID: Dear Jim, Thank you so much. I was using "lite" version. now it is fixed. Regards, Samane On Thu, Aug 20, 2015 at 3:32 PM, Herring, J.D. (Jim) < j.herring at donders.ru.nl> wrote: > Dear Samane, > > > > Please make sure you have downloaded the full version of fieldtrip and not > the ‘lite’ version. Not all of the templates are included in the ‘lite’ > version to save space. If you have done that, make sure that you have added > the path to the fieldtrip folder (e.g. addpath(‘d:\fieldtrip’) and run > ‘ft_defaults’. > > > > You should then be able to run the code in the beamformer and > event-related averaging tutorial as fieldtrip automatically looks for the > templates in the correct location (which is: > fieldtrip\template\anatomy\...). > > > > Best, > > > > Jim > > > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Seyedeh Samane Shojaei > *Sent:* donderdag 20 augustus 2015 6:07 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] problem with surface & template files > > > > Dear all, > > > > May I know where the "surface files" is? I am running last part of "Localizing > oscillatory sources using beamformer techniques" tutorial ( > http://www.fieldtriptoolbox.org/tutorial/beamformer), but have a > difficulty to find 'surface_white_both.mat'. > > > > my another problem is for running the code available for planar gradient > calculation ( > http://www.fieldtriptoolbox.org/tutorial/eventrelatedaveraging). the > error is because the template file is not found. > > ??? Error using ==> ft_prepare_neighbours at 140 > > Template file could not be found - please check spelling or see > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_define_my_own_neighbourhood_template > > (please consider sharing it with others via the FT mailing list) > > > > how to add the templates? when I use "addpath('template')", it is > not recognized. > > > > > > > your help will be appreciated, > > Samane > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daphbd1994 at hotmail.com Thu Aug 20 16:13:38 2015 From: daphbd1994 at hotmail.com (=?Windows-1252?B?RGFwaG7pIEJlcnRyYW5kLUR1Ym9pcw==?=) Date: Thu, 20 Aug 2015 12:13:38 -0200 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> References: , <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> Message-ID: Thank you! It was my error : I downloaded an older version, the one on the top of the list! I am a little bit confused, it looks like if I need to put .ds as an input file. I just have .mat times-series that doesn't come from CTF so I cannot use readCTFds.m. Would it be possible to convert .mat times-series (nSensor x ntimes-series) to .ds? Best, Daphné From: j.herring at donders.ru.nl To: fieldtrip at science.ru.nl Date: Thu, 20 Aug 2015 07:37:20 +0000 Subject: Re: [FieldTrip] Convert .mat to .ds Dear Daphne, I have checked for you and the newest available version of fieldtrip (also fieldtrip-lite) includes writeCTFds.m in the folder ‘fieldtrip\external\ctf\’. I have also checked a version from 2010 and it was there back then as well. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: woensdag 19 augustus 2015 17:19 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Convert .mat to .ds Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander " But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? Best regards, Daphné _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Thu Aug 20 17:05:30 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 20 Aug 2015 15:05:30 +0000 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: References: , <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl> Dear Daphne, If you are trying to read your own data format into fieldtrip, perhaps you should have a look at this page: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat It would be easier to transform your data format to be used in Fieldtrip than to first convert it to a CTF format and then read it into Fieldtrip. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: donderdag 20 augustus 2015 16:14 To: FieldTrip discussion list Subject: Re: [FieldTrip] Convert .mat to .ds Thank you! It was my error : I downloaded an older version, the one on the top of the list! I am a little bit confused, it looks like if I need to put .ds as an input file. I just have .mat times-series that doesn't come from CTF so I cannot use readCTFds.m. Would it be possible to convert .mat times-series (nSensor x ntimes-series) to .ds? Best, Daphné ________________________________ From: j.herring at donders.ru.nl To: fieldtrip at science.ru.nl Date: Thu, 20 Aug 2015 07:37:20 +0000 Subject: Re: [FieldTrip] Convert .mat to .ds Dear Daphne, I have checked for you and the newest available version of fieldtrip (also fieldtrip-lite) includes writeCTFds.m in the folder 'fieldtrip\external\ctf\'. I have also checked a version from 2010 and it was there back then as well. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: woensdag 19 augustus 2015 17:19 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Convert .mat to .ds Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander " But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? Best regards, Daphné _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Aug 20 17:09:09 2015 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 20 Aug 2015 16:09:09 +0100 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl> References: <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl> Message-ID: Just to add to Jim's point, some ITAB formats are supported in Fieldtrip (I see itab_raw and itab_mhd). If you can get your data to be in one of those formats, things will be much easier for you. Best, Vladimir On Thu, Aug 20, 2015 at 4:05 PM, Herring, J.D. (Jim) < j.herring at donders.ru.nl> wrote: > Dear Daphne, > > > > If you are trying to read your own data format into fieldtrip, perhaps you > should have a look at this page: > http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat > > > > It would be easier to transform your data format to be used in Fieldtrip > than to first convert it to a CTF format and then read it into Fieldtrip. > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Daphné Bertrand-Dubois > *Sent:* donderdag 20 augustus 2015 16:14 > *To:* FieldTrip discussion list > > *Subject:* Re: [FieldTrip] Convert .mat to .ds > > > > Thank you! > > > > It was my error : I downloaded an older version, the one on the top of the > list! > > > > I am a little bit confused, it looks like if I need to put .ds as an input > file. I just have .mat times-series that doesn't come from CTF so I cannot > use readCTFds.m. Would it be possible to convert .mat times-series (nSensor > x ntimes-series) to .ds? > > > > Best, > > > > Daphné > > > ------------------------------ > > From: j.herring at donders.ru.nl > To: fieldtrip at science.ru.nl > Date: Thu, 20 Aug 2015 07:37:20 +0000 > Subject: Re: [FieldTrip] Convert .mat to .ds > > Dear Daphne, > > > > I have checked for you and the newest available version of fieldtrip (also > fieldtrip-lite) includes writeCTFds.m in the folder > ‘fieldtrip\external\ctf\’. I have also checked a version from 2010 and it > was there back then as well. > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [ > mailto:fieldtrip-bounces at science.ru.nl ] *On > Behalf Of *Daphné Bertrand-Dubois > *Sent:* woensdag 19 augustus 2015 17:19 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Convert .mat to .ds > > > > Hi, > > > > I have data (from the MEG at ITAB) that cannot be process by fieldtrip. > Howerver, we have convert them into .mat file and I would like them to be > in .ds format so I can process the data. > > > > I read this message: > > > > *" Hello z.imane* > > > > *To convert .mat to .ds, try using the function writeCTFds.m located in the* > > *fieldtrip folder /fieldtrip/external/ctf/* > > > > *Best* > > *Bankim Subhash Chander "* > > But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? > > Best regards, > > Daphné > > > _______________________________________________ fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daphbd1994 at hotmail.com Thu Aug 20 17:03:52 2015 From: daphbd1994 at hotmail.com (=?Windows-1252?B?RGFwaG7pIEJlcnRyYW5kLUR1Ym9pcw==?=) Date: Thu, 20 Aug 2015 13:03:52 -0200 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: References: , <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl>, , <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl>, Message-ID: Thank you! In fact, I wanted .ds because I wanted to use Brainstorm (and brainstorm doesn't read ITAB data format). If I can't that's ok, I will use Fieldtrip! I could find read_itab_mhd but I don't find read_itab_raw (mines are .raw from ITAB). I also found itab2grad. :) Best,Daphné Date: Thu, 20 Aug 2015 16:09:09 +0100 From: litvak.vladimir at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Convert .mat to .ds Just to add to Jim's point, some ITAB formats are supported in Fieldtrip (I see itab_raw and itab_mhd). If you can get your data to be in one of those formats, things will be much easier for you. Best, Vladimir On Thu, Aug 20, 2015 at 4:05 PM, Herring, J.D. (Jim) wrote: Dear Daphne, If you are trying to read your own data format into fieldtrip, perhaps you should have a look at this page: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat It would be easier to transform your data format to be used in Fieldtrip than to first convert it to a CTF format and then read it into Fieldtrip. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: donderdag 20 augustus 2015 16:14 To: FieldTrip discussion list Subject: Re: [FieldTrip] Convert .mat to .ds Thank you! It was my error : I downloaded an older version, the one on the top of the list! I am a little bit confused, it looks like if I need to put .ds as an input file. I just have .mat times-series that doesn't come from CTF so I cannot use readCTFds.m. Would it be possible to convert .mat times-series (nSensor x ntimes-series) to .ds? Best, Daphné From: j.herring at donders.ru.nl To: fieldtrip at science.ru.nl Date: Thu, 20 Aug 2015 07:37:20 +0000 Subject: Re: [FieldTrip] Convert .mat to .ds Dear Daphne, I have checked for you and the newest available version of fieldtrip (also fieldtrip-lite) includes writeCTFds.m in the folder ‘fieldtrip\external\ctf\’. I have also checked a version from 2010 and it was there back then as well. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: woensdag 19 augustus 2015 17:19 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Convert .mat to .ds Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander " But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? Best regards, Daphné _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Aug 20 17:41:49 2015 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 20 Aug 2015 16:41:49 +0100 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: References: <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl> Message-ID: itab_raw is supported directly in the code of ft_read_data. You should try reading your data with ft_preprocessing function as in the tutorials. If that works I suggest you contact Francoise Tadel and tell him that you have data that you can read with Fieldtrip and want to import it into Brainstorm. I'm sure he'll think of something easier than writing it out in the CTF format. Best, Vladimir On Thu, Aug 20, 2015 at 4:03 PM, Daphné Bertrand-Dubois < daphbd1994 at hotmail.com> wrote: > Thank you! > > In fact, I wanted .ds because I wanted to use Brainstorm (and brainstorm > doesn't read ITAB data format). If I can't that's ok, I will use Fieldtrip! > > I could find *read_itab_mhd* but I don't find *read_itab_raw* (mines are > .raw from ITAB). I also found *itab2grad. :)* > > Best, > Daphné > ------------------------------ > Date: Thu, 20 Aug 2015 16:09:09 +0100 > From: litvak.vladimir at gmail.com > To: fieldtrip at science.ru.nl > > Subject: Re: [FieldTrip] Convert .mat to .ds > > Just to add to Jim's point, some ITAB formats are supported in Fieldtrip > (I see itab_raw and itab_mhd). If you can get your data to be in one of > those formats, things will be much easier for you. > > Best, > > Vladimir > > On Thu, Aug 20, 2015 at 4:05 PM, Herring, J.D. (Jim) < > j.herring at donders.ru.nl> wrote: > > Dear Daphne, > > > > If you are trying to read your own data format into fieldtrip, perhaps you > should have a look at this page: > http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat > > > > It would be easier to transform your data format to be used in Fieldtrip > than to first convert it to a CTF format and then read it into Fieldtrip. > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Daphné Bertrand-Dubois > *Sent:* donderdag 20 augustus 2015 16:14 > *To:* FieldTrip discussion list > > *Subject:* Re: [FieldTrip] Convert .mat to .ds > > > > Thank you! > > > > It was my error : I downloaded an older version, the one on the top of the > list! > > > > I am a little bit confused, it looks like if I need to put .ds as an input > file. I just have .mat times-series that doesn't come from CTF so I cannot > use readCTFds.m. Would it be possible to convert .mat times-series (nSensor > x ntimes-series) to .ds? > > > > Best, > > > > Daphné > > > ------------------------------ > > From: j.herring at donders.ru.nl > To: fieldtrip at science.ru.nl > Date: Thu, 20 Aug 2015 07:37:20 +0000 > Subject: Re: [FieldTrip] Convert .mat to .ds > > Dear Daphne, > > > > I have checked for you and the newest available version of fieldtrip (also > fieldtrip-lite) includes writeCTFds.m in the folder > ‘fieldtrip\external\ctf\’. I have also checked a version from 2010 and it > was there back then as well. > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [ > mailto:fieldtrip-bounces at science.ru.nl ] *On > Behalf Of *Daphné Bertrand-Dubois > *Sent:* woensdag 19 augustus 2015 17:19 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Convert .mat to .ds > > > > Hi, > > > > I have data (from the MEG at ITAB) that cannot be process by fieldtrip. > Howerver, we have convert them into .mat file and I would like them to be > in .ds format so I can process the data. > > > > I read this message: > > > > *" Hello z.imane* > > > > *To convert .mat to .ds, try using the function writeCTFds.m located in the* > > *fieldtrip folder /fieldtrip/external/ctf/* > > > > *Best* > > *Bankim Subhash Chander "* > > But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? > > Best regards, > > Daphné > > > _______________________________________________ fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Fri Aug 21 03:31:19 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Fri, 21 Aug 2015 01:31:19 +0000 (UTC) Subject: [FieldTrip] TMSi Porti Message-ID: <2056941582.4864225.1440120679274.JavaMail.yahoo@mail.yahoo.com> Hi, I am using the TMSi Porti to record the EEG signal.So, I'm using the tmsidriver.exe so that there is signal shown.However, there is no signal display.Anyone can help me? Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Fri Aug 21 11:11:24 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 21 Aug 2015 09:11:24 +0000 Subject: [FieldTrip] TMSi Porti In-Reply-To: <2056941582.4864225.1440120679274.JavaMail.yahoo@mail.yahoo.com> References: <2056941582.4864225.1440120679274.JavaMail.yahoo@mail.yahoo.com> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B312B0@exprd01.hosting.ru.nl> Dear Wan, Please have a look here: http://www.fieldtriptoolbox.org/development/realtime/tmsi Perhaps specifying some of the configuration options or using the other available tool will help in proceeding. Also, note that the driver only writes the signal from the TMSi driver to the FieldTrip buffer. You will still need to read from the FieldTrip buffer using the various realtime functions. Best, Jim ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of wan amirah Wan azlan [wanamirahwanazlan at yahoo.com] Sent: Friday, August 21, 2015 3:31 AM To: FieldTrip Discussion List Subject: [FieldTrip] TMSi Porti Hi, I am using the TMSi Porti to record the EEG signal. So, I'm using the tmsidriver.exe so that there is signal shown. However, there is no signal display. Anyone can help me? Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Sun Aug 23 20:17:05 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sun, 23 Aug 2015 18:17:05 +0000 Subject: [FieldTrip] Distributed source simulation Message-ID: <731A3644-A7FB-4F76-9EB7-F845D5ADC34D@mailbox.sc.edu> Is there any way to use the distributed source map, e.g., from beamformer or eloreta/mne source analysis, to simulate data? I would like to use a whole-grid distributed source model in the simulation; wiith active dipoles places in an entire anatomical ROI, rather than just single (or small number of multiple) dipoles. Thanks, John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Aug 25 10:51:56 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 25 Aug 2015 10:51:56 +0200 Subject: [FieldTrip] data-deleting bug in FieldTrip (present for 9 hours during yesterday, now fixed) Message-ID: Dear FieldTrip users In SVN revision 10622 I changed this https://bitbucket.org/fieldtriptoolbox/fieldtrip/commits/0539a45d6bd609673a5c618c8ad6ad62de1c4013 to make the unzipping and subsequent cleaning up of *.gz, *.tgz and *.zip datasets more consistent (as I noticed that it was done in different manners), but did not realize that there would be an interaction between this and dataset2files, the helper function that deals with raw datasets that are split over multiple files. So in short, in the 9 hours between https://bitbucket.org/fieldtriptoolbox/fieldtrip/commits/0539a45d6bd609673a5c618c8ad6ad62de1c4013 and https://bitbucket.org/fieldtriptoolbox/fieldtrip/commits/7e872c328086c86da2a9ee3986aa3741a3325b2c we had a FT version that might have caused problems by deleting the raw data files that you were processing. The problem was due to the detection of the specified input file being different from the one that was actually read from, and if so, it would assume that it was unzipped and delete the file. But there are cases that were incorrectly detected (handled in private/dataset2files), e.g. in a CTF *.ds directory and a *.meg4 data file, or with brainvision vhdr/vmrk/eeg files. Please do not use SVN version 10622, nor the ftp download version “20150824”. That ftp version has now been deleted from our ftp server, but has been there for an hour or so. I am very sorry for the inconvenience that this may cause or may have caused. best regards, Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Aug 25 12:38:06 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 25 Aug 2015 12:38:06 +0200 Subject: [FieldTrip] FFT question In-Reply-To: References: Message-ID: <0F8D4C1E-306A-4B5F-846F-5C27368D144D@donders.ru.nl> On 25 Aug 2015, at 02:34, Ben Hutchinson wrote: > I was looking at your webpage on the FFT here http://www.fieldtriptoolbox.org/tutorial/fourier and noticed that the for an ordinary sinewave, like sin(x), the imaginary component of the FFT actually has a negative spike on the left side and a positive spike on the right side. Why is this? I thought that the left side of an FFT had the coefficient of the sinewave, and the right side of the FFT had the negative of that. So with a regular sinewave, (such as sin(x) which is actually the same as coef*sin(x) where coef=1) the left side of the imaginary part of the FFT is supposed to show that coefficient, meaning that it should have a spike of positive 1. But the FFT on this webpage instead shows a spike of -1 at that location. Why is that? Hi Ben from Matlab "help fft" For length N input vector x, the DFT is a length N vector X, with elements N X(k) = sum x(n)*exp(-j*2*pi*(k-1)*(n-1)/N), 1 <= k <= N. n=1 The inverse DFT (computed by IFFT) is given by N x(n) = (1/N) sum X(k)*exp( j*2*pi*(k-1)*(n-1)/N), 1 <= n <= N. k=1 Note the “-j” in the first equation. See page 158 in http://www.dspguide.com/CH8.PDF and specifically equation 8.3 on page 153, which explains it in more detail. I recommend the DSP guide as a general resource to learn more about digital signal processing. best regards, Robert PS please address future questions to the email discussion list (CC) so that other people can benefit from it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mehmetakifozcoban at gmail.com Tue Aug 25 16:40:57 2015 From: mehmetakifozcoban at gmail.com (=?UTF-8?B?TWVobWV0IEFraWYgw5Z6w6dvYmFu?=) Date: Tue, 25 Aug 2015 17:40:57 +0300 Subject: [FieldTrip] Dear fieldtrippers Message-ID: I have 55 eeg data but their extension is .tdt. .. have you know how can i open with fieldtrip M.akif Biomedical Researcher -------------- next part -------------- An HTML attachment was scrubbed... URL: From laurent.hugueville at upmc.fr Tue Aug 25 17:36:33 2015 From: laurent.hugueville at upmc.fr (Laurent Hugueville) Date: Tue, 25 Aug 2015 17:36:33 +0200 Subject: [FieldTrip] Dear fieldtrippers In-Reply-To: References: Message-ID: <55DC8B81.6070305@upmc.fr> Hi! Perhaps, you can use : http://sccn.ucsd.edu/wiki/EEGLAB_Extensions_details *TDT data import:* Adam Wilson at the NITRO Lab at the University of Wisconsin Madison (USA) offers an extension available for loading Tucker-Davis Technology format data into EEGLAB. Chears, Laurent. Le 25/08/2015 16:40, Mehmet Akif Özçoban a écrit : > > I have 55 eeg data but their extension is .tdt. .. have you know how > can i open with fieldtrip > > M.akif Biomedical Researcher > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Laurent Hugueville Tél. 01.57.27.46.38 Centre de Recherche de l'Institut du Cerveau et de la Moelle Epinière UPMC / INSERM UMRS975 / CNRS UMR 7225 47, Boulevard de l'Hôpital 75651 Paris cedex 13 -------------- next part -------------- An HTML attachment was scrubbed... URL: From voxxys at gmail.com Tue Aug 25 20:36:35 2015 From: voxxys at gmail.com (Ksenia Volkova) Date: Tue, 25 Aug 2015 21:36:35 +0300 Subject: [FieldTrip] Fitting dipole to a topography Message-ID: Dear fieldtrip users, I wonder if you can help me out. I have a relatively simple problem: having a topography matrix (where rows correspond to topographies, and columns correspond to channels) I want to fit a dipole to each topography. I have looked through tutorials and documentation and I've seen this example http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit. Still, I can't figure out how I should use the toolbox to solve my problem. What would be the right arguments to call ft_dipolefitting with in my case? If I have EEG data, topography matrix and channel locations, what would be the easiest way to fit a dipole to each topography? Thank you in advance for any help. Ksenia Volkova -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Wed Aug 26 07:47:38 2015 From: wanamirahwanazlan at yahoo.com (Wan Amirah W Azlan) Date: Wed, 26 Aug 2015 05:47:38 +0000 (UTC) Subject: [FieldTrip] Realtime TMSi Porti Message-ID: <1320276013.493924.1440568058141.JavaMail.yahoo@mail.yahoo.com> Hi, Does anyone here can help me how to connect the TMSi Porti in the fieldtrip? So that I am able to display the signal?This is because I have difficulty in connecting TMSI Porti. Is there ant steps that I'm missing? I already used the functions available such as ft_realtime_signalviewer and ft_read_data. But none of them are working.I am using windows 7 64 bit, but I also tried in windows XP 32 bits. However, also not working.Thanks.  Regards,Wan Amirah binti W Azlan,Postgraduate student,Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia.Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Wed Aug 26 08:27:31 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Wed, 26 Aug 2015 08:27:31 +0200 Subject: [FieldTrip] Fitting dipole to a topography In-Reply-To: References: Message-ID: <7B07EF02-6BE0-40EB-895F-075A3EA63C92@uni-konstanz.de> Dear Ksenia, I would first start with the organization of the data in a format FieldTrip can sense. data = []; data.trial ={[chan x time]} % this is your elec x topography matrix, where topography is observed on consecutive time points data.time = [vector-number of time points]; data.label = {‘elec1’,’elec2’ etc.} your electrode labels data.elec = this is key reflecting the position of the electrodes relative to the head Next, you have to compute a volume conduction model. How to do so is explained here: http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg?s[]=eeg&s[]=volume&s[]=conduction&s[]=model After this you can proceed with the dipole fitting which is explained for instance here: http://www.fieldtriptoolbox.org/tutorial/natmeg/dipolefitting#fit_a_dipole_model_to_the_meg_data Under cfg.latency you could specify the number of the topography you are interested in and under cfg.vol the BEM model you computed in the previous step. If you don#t have individual MRI you can use the standard BEM model located in the ~template/headmodel/standard_bem.mat. Note that before you do so you should coregister the headmodel with the electrodes using ft_electroderealign. Good luck tzvetan > Dear fieldtrip users, > > I wonder if you can help me out. I have a relatively simple problem: having a topography matrix (where rows correspond to topographies, and columns correspond to channels) I want to fit a dipole to each topography. I have looked through tutorials and documentation and I've seen this example http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit. Still, I can't figure out how I should use the toolbox to solve my problem. > > What would be the right arguments to call ft_dipolefitting with in my case? If I have EEG data, topography matrix and channel locations, what would be the easiest way to fit a dipole to each topography? > > Thank you in advance for any help. > > Ksenia Volkova > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Wed Aug 26 08:47:43 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Wed, 26 Aug 2015 08:47:43 +0200 Subject: [FieldTrip] Realtime TMSi Porti In-Reply-To: <1320276013.493924.1440568058141.JavaMail.yahoo@mail.yahoo.com> References: <1320276013.493924.1440568058141.JavaMail.yahoo@mail.yahoo.com> Message-ID: <005001d0dfcb$1c6cec80$5546c580$@artinis.com> Dear Wan Amirah, have you tried contacting the TMSi support? They have experience with this and should be able to help you. In any case, make sure to give a detailed description on what you are doing and what does not work (supported by code snippets and/or screenshots). Best of luck! Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wan Amirah W Azlan Sent: Wednesday, August 26, 2015 7:48 AM To: FieldTrip Discussion List Subject: [FieldTrip] Realtime TMSi Porti Hi, Does anyone here can help me how to connect the TMSi Porti in the fieldtrip? So that I am able to display the signal? This is because I have difficulty in connecting TMSI Porti. Is there ant steps that I'm missing? I already used the functions available such as ft_realtime_signalviewer and ft_read_data. But none of them are working. I am using windows 7 64 bit, but I also tried in windows XP 32 bits. However, also not working. Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Wed Aug 26 11:04:44 2015 From: wanamirahwanazlan at yahoo.com (Wan Amirah W Azlan) Date: Wed, 26 Aug 2015 09:04:44 +0000 (UTC) Subject: [FieldTrip] Realtime TMSi Porti In-Reply-To: <005001d0dfcb$1c6cec80$5546c580$@artinis.com> References: <005001d0dfcb$1c6cec80$5546c580$@artinis.com> Message-ID: <1028546645.547877.1440579885418.JavaMail.yahoo@mail.yahoo.com> Dear Mr. Jorn, Thank you for the reply.Actually, I want to do the realtime data processing of EEG signal from TMSi Porti. The online processing will be performed while recording the EEG signal. I am sorry  for not attach the error. Here I attach the error shown in Matlab. I am using Matlab2013. I attach the printscreen in word file.Hope you have any suggestion regarding the error. By the way, I already contact the TMSi support and waiting for their reply.However, in the meantime, I wish if there is any suggestion in from fieldtrip. Thank you.  Regards,Wan Amirah binti W Azlan,Postgraduate student,Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia.Tel (H/P): +60193702134 On Wednesday, August 26, 2015 2:47 PM, Jörn M. Horschig wrote: #yiv7566064489 #yiv7566064489 -- _filtered #yiv7566064489 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv7566064489 {panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv7566064489 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv7566064489 {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}#yiv7566064489 #yiv7566064489 p.yiv7566064489MsoNormal, #yiv7566064489 li.yiv7566064489MsoNormal, #yiv7566064489 div.yiv7566064489MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv7566064489 a:link, #yiv7566064489 span.yiv7566064489MsoHyperlink {color:#0563C1;text-decoration:underline;}#yiv7566064489 a:visited, #yiv7566064489 span.yiv7566064489MsoHyperlinkFollowed {color:#954F72;text-decoration:underline;}#yiv7566064489 span.yiv7566064489EmailStyle17 {color:#1F497D;}#yiv7566064489 .yiv7566064489MsoChpDefault {font-size:10.0pt;} _filtered #yiv7566064489 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv7566064489 div.yiv7566064489WordSection1 {}#yiv7566064489 Dear Wan Amirah,  have you tried contacting the TMSi support? They have experience with this and should be able to help you. In any case, make sure to give a detailed description on what you are doing and what does not work (supported by code snippets and/or screenshots). Best of luck!  Best,Jörn  --  Jörn M. Horschig, PhD, Software EngineerArtinis Medical Systems  |  +31 481 350 980  From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wan Amirah W Azlan Sent: Wednesday, August 26, 2015 7:48 AM To: FieldTrip Discussion List Subject: [FieldTrip] Realtime TMSi Porti  Hi,  Does anyone here can help me how to connect the TMSi Porti in the fieldtrip? So that I am able to display the signal?This is because I have difficulty in connecting TMSI Porti. Is there ant steps that I'm missing? I already used the functions available such as ft_realtime_signalviewer and ft_read_data. But none of them are working.I am using windows 7 64 bit, but I also tried in windows XP 32 bits. However, also not working.Thanks.  Regards,Wan Amirah binti W Azlan,Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 237247 bytes Desc: not available URL: From guillaume.dumas at pasteur.fr Wed Aug 26 11:43:04 2015 From: guillaume.dumas at pasteur.fr (Guillaume Dumas) Date: Wed, 26 Aug 2015 09:43:04 +0000 Subject: [FieldTrip] Degrees of freedom in Z-coherence transform Message-ID: Dear Fieldtripers, Following Maris et al. 2007 paper about "Nonparametric testing of coherence difference" I was hesitating regarding the number of degrees of freedom to use in the Z-coherence transform when coherence is calculated over N trials by averaging across M non-overlapping windows in each of them. Is the df equals to N or N*M then? I am a little confused since in Fieldtrip, this is even 2*N that appears to be used: http://fieldtrip.googlecode.com/svn/trunk/statfun/ft_statfun_indepsamplesZcoh.m Thanks for your time. Best, Guillaume -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Wed Aug 26 12:17:13 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Wed, 26 Aug 2015 10:17:13 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 21 In-Reply-To: References: Message-ID: <165710B3-40CE-466D-B67C-F895B9BA3687@donders.ru.nl> Hi Guillaume, Following Maris et al. 2007 paper about "Nonparametric testing of coherence difference" I was hesitating regarding the number of degrees of freedom to use in the Z-coherence transform when coherence is calculated over N trials by averaging across M non-overlapping windows in each of them. Is the df equals to N or N*M then? I am a little confused since in Fieldtrip, this is even 2*N that appears to be used: http://fieldtrip.googlecode.com/svn/trunk/statfun/ft_statfun_indepsamplesZcoh.m The degrees of freedom is equal to the number of tapers, and because you effectively use non-overlapping tapers (every window corresponds to one taper), your degrees of freedom is N*M. best, Eric Maris Thanks for your time. Best, Guillaume _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Wed Aug 26 12:42:49 2015 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Wed, 26 Aug 2015 12:42:49 +0200 Subject: [FieldTrip] MEG gradiometer leadfield units Message-ID: Hi all, I constructed a single-sphere leadfield in Fieldtrip for the CTF 275 MEG system, but am unsure about the units: If I assume that dipole moments are expressed in pAm and sensor signals in T, then a dipole moment of 10 nAm gives sensor signals in the range 10-100 fT, which is what one expects. Can anyone confirm the units I assumed for this leadfield? Thanks a lot, Rikkert Hindriks -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Wed Aug 26 20:16:20 2015 From: brungio at gmail.com (Bruno L. Giordano) Date: Wed, 26 Aug 2015 19:16:20 +0100 Subject: [FieldTrip] Much faster lcmv beamformer with mtimesx Message-ID: <55DE0274.5040201@gmail.com> Hello, I worked on optimizing the beamformer lcmv function, and got improvements that might be quite interesting. I am beamforming a 54k time points x 240 sensors signal on a 44k nodes grid. On a 16 cores machine it takes around 520 s to do it using the beamformer_lcmv function (fixedori = 'yes') , whereas it takes around 26 s to do it on the same machine using the optimized function. To achieve the speed up, I stack the filters on different pages of a 3D matrix, and use mtimesx to do the projection, with one single command, and no for loop across the grid nodes. Mtimesx is called in 'MATLAB' mode: more improvements are likely if it is called using one of the other faster options. I am also keeping the projection as one single matrix, instead of redistributing across a cell structure with one element per grid node (this operation also takes quite some time). Mtimesx can be downloaded here: http://uk.mathworks.com/matlabcentral/fileexchange/25977-mtimesx-fast-matrix-multiply-with-multi-dimensional-support If you are interested, I can share the hacked lcmv beamformer function. Best, Bruno -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bruno L. Giordano, PhD Institute of Neuroscience and Psychology 58 Hillhead Street, University of Glasgow Glasgow, G12 8QB, Scotland T +44 (0) 141 330 5484 Www: http://www.brunolgiordano.net Email charter: http://www.emailcharter.org/ From j.herring at donders.ru.nl Thu Aug 27 10:36:12 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 27 Aug 2015 08:36:12 +0000 Subject: [FieldTrip] Realtime TMSi Porti In-Reply-To: <1028546645.547877.1440579885418.JavaMail.yahoo@mail.yahoo.com> References: <005001d0dfcb$1c6cec80$5546c580$@artinis.com> <1028546645.547877.1440579885418.JavaMail.yahoo@mail.yahoo.com> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B3829E@exprd01.hosting.ru.nl> Dear Wan, From this error message it seems that you are not writing to the buffer, or reading from the wrong location. What are you specifically doing (which parameters, which functions, which drivers) to stream data from the TMSi device to the buffer? Are you running everything on a single computer or is the EEG recorded on a separate computer? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wan Amirah W Azlan Sent: woensdag 26 augustus 2015 11:05 To: Jörn M. Horschig; 'FieldTrip discussion list' Subject: Re: [FieldTrip] Realtime TMSi Porti Dear Mr. Jorn, Thank you for the reply. Actually, I want to do the realtime data processing of EEG signal from TMSi Porti. The online processing will be performed while recording the EEG signal. I am sorry for not attach the error. Here I attach the error shown in Matlab. I am using Matlab2013. I attach the printscreen in word file. Hope you have any suggestion regarding the error. By the way, I already contact the TMSi support and waiting for their reply. However, in the meantime, I wish if there is any suggestion in from fieldtrip. Thank you. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 On Wednesday, August 26, 2015 2:47 PM, Jörn M. Horschig > wrote: Dear Wan Amirah, have you tried contacting the TMSi support? They have experience with this and should be able to help you. In any case, make sure to give a detailed description on what you are doing and what does not work (supported by code snippets and/or screenshots). Best of luck! Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wan Amirah W Azlan Sent: Wednesday, August 26, 2015 7:48 AM To: FieldTrip Discussion List > Subject: [FieldTrip] Realtime TMSi Porti Hi, Does anyone here can help me how to connect the TMSi Porti in the fieldtrip? So that I am able to display the signal? This is because I have difficulty in connecting TMSI Porti. Is there ant steps that I'm missing? I already used the functions available such as ft_realtime_signalviewer and ft_read_data. But none of them are working. I am using windows 7 64 bit, but I also tried in windows XP 32 bits. However, also not working. Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel.haehnke at lrz.tu-muenchen.de Thu Aug 27 10:47:50 2015 From: daniel.haehnke at lrz.tu-muenchen.de (=?utf-8?Q?Daniel_H=C3=A4hnke?=) Date: Thu, 27 Aug 2015 10:47:50 +0200 Subject: [FieldTrip] Pairwise phase consistency: spikes and LFPs, minimum number of spikes Message-ID: <862C293A-1329-46A7-9B2D-4A5F51C2ED74@lrz.tum.de> Dear Fieldtrip community, I am currently analysing spike-LFP data using FT_SPIKETRIGGEREDSPECTRUM_STATS and a sliding window approach to calculate the pairwise phase consistency (PPC) between spikes and LFPs. However, some of my single units have very low firing rates which leads to artefacts in my results. So I guess I have to either use an approach that doesn’t use sliding windows and/or only select single units based on a threshold of minimum spiking rate. Is there a suggested number of spikes to use for PPC calculation? Womelsdorf et al., 2014, for example (Womelsdorf, T., Ardid, S., Everling, S., & Valiante, T. A. (2014). Burst firing synchronizes prefrontal and anterior cingulate cortex during attentional control. Current Biology : CB, 24(22), 2613–2621. http://doi.org/10.1016/j.cub.2014.09.046 ) used only those PPC values that were calculated from more than 30 spikes. I guess they do that because PPC’s variance becomes reasonably small at this value. They don’t use a sliding window approach, so I guess I would need that number of spikes for each time bin? Best wishes, Daniel -- Daniel Hähnke PhD student Technische Universität München Institute of Neuroscience Translational NeuroCognition Laboratory Biedersteiner Straße 29, Bau 601 80802 Munich Germany Email: daniel.haehnke at lrz.tum.de Phone: +49 89 4140 3356 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lauri.parkkonen at aalto.fi Thu Aug 27 14:35:00 2015 From: lauri.parkkonen at aalto.fi (Parkkonen Lauri) Date: Thu, 27 Aug 2015 12:35:00 +0000 Subject: [FieldTrip] Position for an early-stage researcher (doctoral student) at Elekta Message-ID: We are recruiting an early-stage researcher for the EU-funded ChildBrain project. In this project, we aim to develop and apply new brain research methods to study normal and atypical cognitive development of children. This specific position is for a methodologically-oriented person who wants to work towards improving the applicability of MEG to pediatric populations. Obtaining a PhD at the end of the project is a possibility but not a requirement for successful completion. Hence, we also invite more industrially-oriented applicants with an MEG and software-engineering interest to apply. The work will be carried out at Elekta Oy (Helsinki), one of the industrial partners in ChildBrain. Secondments to academic project partners are an integral part of the position. The work will be supervised by Dr. Lauri Parkkonen and Dr. Robert Oostenveld. Further information about the project, application procedure and eligibility criteria on www.childbrain.eu and about this particular position under ESR Projects / ESR15. Best regards, Lauri Parkkonen -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.nivethida at gmail.com Thu Aug 27 16:51:30 2015 From: dr.nivethida at gmail.com (nivethida t) Date: Thu, 27 Aug 2015 10:51:30 -0400 Subject: [FieldTrip] error with ft_redefinetrial Message-ID: Hi all, I am trying to segment my 5s long dataset into chunks of 500ms. cfg = []; cfg.length = 0.5; cfg.overlap = 0; data_imwr_rest_seg = ft_redefinetrial(cfg, data_imwr_rest); Some (not all) of the datasets give me the following error message: *Index exceeds matrix dimensions.* *Error in ft_fetch_data (line 104) count(trlbeg:trlend) = count(trlbeg:trlend) + 1;Error in ft_redefinetrial (line 246) data.trial{iTrl} = ft_fetch_data(dataold, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', 1:hdr.nChans, 'skipcheckdata', 1);Error in ft_redefinetrial (line 304) data = ft_redefinetrial(tmpcfg, data);* There is also a warning message that appears for all trials - *Warning: Size input contains non-integer values. This will error ina future release. Use FLOOR to convert to integer values. > In ft_fetch_data at 94 In ft_redefinetrial at 246 In ft_redefinetrial at 304 * Can anyone help me identify what the problem could be? Thanks, Nivethida -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc.lalancette at sickkids.ca Thu Aug 27 18:02:17 2015 From: marc.lalancette at sickkids.ca (Marc Lalancette) Date: Thu, 27 Aug 2015 16:02:17 +0000 Subject: [FieldTrip] MEG gradiometer leadfield units (HINDRIKS, RIKKERT) Message-ID: <2A2B6A5B8C4C174CBCCE0B45E548DEB22A0D6EEF@SKMBXX01.sickkids.ca> Hi Rikkert, I ran into the same question some time ago and eventually figured it out. Assuming the code has not changed, it depends on the units you use and I had to use a correction factor when using lengths in cm. See this thread for details: http://mailman.science.ru.nl/pipermail/fieldtrip/2014-September/008438.html By the way, there were open issues regarding units back then, you can search fieldtrip's Bugzilla to check the current status. Cheers, Marc Lalancette Lab Research Project Manager, Research MEG lab Department of Diagnostic Imaging, Program in Neurosciences and Mental Health The Hospital for Sick Children, 555 University Avenue, Room S742, Toronto, ON, M5G 1X8 416-813-7654 x201535 -----Original Message----- Date: Wed, 26 Aug 2015 12:42:49 +0200 From: "HINDRIKS, RIKKERT" To: fieldtrip at science.ru.nl Subject: [FieldTrip] MEG gradiometer leadfield units Message-ID: Content-Type: text/plain; charset="utf-8" Hi all, I constructed a single-sphere leadfield in Fieldtrip for the CTF 275 MEG system, but am unsure about the units: If I assume that dipole moments are expressed in pAm and sensor signals in T, then a dipole moment of 10 nAm gives sensor signals in the range 10-100 fT, which is what one expects. Can anyone confirm the units I assumed for this leadfield? Thanks a lot, Rikkert Hindriks ________________________________ This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. From dr.nivethida at gmail.com Thu Aug 27 22:08:00 2015 From: dr.nivethida at gmail.com (nivethida t) Date: Thu, 27 Aug 2015 20:08:00 +0000 Subject: [FieldTrip] error with ft_redefinetrial Message-ID: Hi all, I am trying to segment my 5s long dataset into chunks of 500ms. cfg = []; cfg.length = 0.5; cfg.overlap = 0; data_imwr_rest_seg = ft_redefinetrial(cfg, data_imwr_rest); Some (not all) of the datasets give me the following error message: Index exceeds matrix dimensions. Error in ft_fetch_data (line 104) count(trlbeg:trlend) = count(trlbeg:trlend) + 1; Error in ft_redefinetrial (line 246) data.trial{iTrl} = ft_fetch_data(dataold, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', 1:hdr.nChans, 'skipcheckdata', 1); Error in ft_redefinetrial (line 304) data = ft_redefinetrial(tmpcfg, data); There is also a warning message that appears for all trials - Warning: Size input contains non-integer values. This will error in a future release. Use FLOOR to convert to integer values. > In ft_fetch_data at 94 In ft_redefinetrial at 246 In ft_redefinetrial at 304 Can anyone help me identify what the problem could be? -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Fri Aug 28 13:38:29 2015 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Fri, 28 Aug 2015 13:38:29 +0200 Subject: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open Message-ID: Dear all, Aarhus University (IMC and Cfin) will be hosting a FieldTrip Course on EEG/MEG Analysis with Jim Herring and Luca Ambrogioni the 7.-9. of October 2015. Registration to the limited places is open now via the link below. Externals will be charged a fee of 150 Euro. http://interactingminds.au.dk/events/single-events/artikel/imc-bootcamp-default-mode-network/ Best Katrin Heimann, Postdoc IMC Aarhus University -------------- next part -------------- An HTML attachment was scrubbed... URL: From mehmetakifozcoban at gmail.com Fri Aug 28 13:53:24 2015 From: mehmetakifozcoban at gmail.com (=?UTF-8?B?TWVobWV0IEFraWYgw5Z6w6dvYmFu?=) Date: Fri, 28 Aug 2015 14:53:24 +0300 Subject: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open In-Reply-To: References: Message-ID: Could you upload videos youtube channel please 28 Ağu 2015 14:47 tarihinde "KatrinH Heimann" yazdı: > Dear all, > > Aarhus University (IMC and Cfin) will be hosting a FieldTrip Course on > EEG/MEG Analysis with Jim Herring and Luca Ambrogioni the 7.-9. of October > 2015. Registration to the limited places is open now via the link below. > Externals will be charged a fee of 150 Euro. > > > http://interactingminds.au.dk/events/single-events/artikel/imc-bootcamp-default-mode-network/ > > Best > Katrin Heimann, Postdoc IMC Aarhus University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Fri Aug 28 14:02:51 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Fri, 28 Aug 2015 12:02:51 +0000 Subject: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C17DC341F@exprd03.hosting.ru.nl> Dear Mehmet, Videos of the lectures of last spring’s FieldTrip Toolkit course held at the Donders institute/Radboud University have already been made available on the FieldTrip youtube-channel: https://www.youtube.com/user/FieldTripToolboxTV Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Mehmet Akif Özçoban Sent: vrijdag 28 augustus 2015 13:53 To: FieldTrip discussion list Subject: Re: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open Could you upload videos youtube channel please 28 Ağu 2015 14:47 tarihinde "KatrinH Heimann" > yazdı: Dear all, Aarhus University (IMC and Cfin) will be hosting a FieldTrip Course on EEG/MEG Analysis with Jim Herring and Luca Ambrogioni the 7.-9. of October 2015. Registration to the limited places is open now via the link below. Externals will be charged a fee of 150 Euro. http://interactingminds.au.dk/events/single-events/artikel/imc-bootcamp-default-mode-network/ Best Katrin Heimann, Postdoc IMC Aarhus University _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mehmetakifozcoban at gmail.com Fri Aug 28 14:35:26 2015 From: mehmetakifozcoban at gmail.com (=?UTF-8?B?TWVobWV0IEFraWYgw5Z6w6dvYmFu?=) Date: Fri, 28 Aug 2015 15:35:26 +0300 Subject: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C17DC341F@exprd03.hosting.ru.nl> References: <7CCA2706D7A4DA45931A892DF3C2894C17DC341F@exprd03.hosting.ru.nl> Message-ID: Thousands times thank you i saw that....I mean that could you upload lessons will have been in Aarhus too... 28 Ağu 2015 15:31 tarihinde "Pelt, S. van (Stan)" < stan.vanpelt at donders.ru.nl> yazdı: > Dear Mehmet, > > > > Videos of the lectures of last spring’s FieldTrip Toolkit course held at > the Donders institute/Radboud University have already been made available > on the FieldTrip youtube-channel: > https://www.youtube.com/user/FieldTripToolboxTV > > > > Best, > > Stan > > > > -- > > Stan van Pelt, PhD > > Donders Institute for Brain, Cognition and Behaviour > > Radboud University > > Montessorilaan 3, B.01.34 > > 6525 HR Nijmegen, the Netherlands > > tel: +31 24 3616288 > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Mehmet Akif Özçoban > *Sent:* vrijdag 28 augustus 2015 13:53 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] FieldTrip Course with Instructors from the > Donders Institute in Aarhus, Registration open > > > > Could you upload videos youtube channel please > > 28 Ağu 2015 14:47 tarihinde "KatrinH Heimann" > yazdı: > > Dear all, > > > > Aarhus University (IMC and Cfin) will be hosting a FieldTrip Course on > EEG/MEG Analysis with Jim Herring and Luca Ambrogioni the 7.-9. of October > 2015. Registration to the limited places is open now via the link below. > Externals will be charged a fee of 150 Euro. > > > > > http://interactingminds.au.dk/events/single-events/artikel/imc-bootcamp-default-mode-network/ > > > > Best > > Katrin Heimann, Postdoc IMC Aarhus University > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.fritsche at student.ru.nl Fri Aug 28 15:31:01 2015 From: m.fritsche at student.ru.nl (Fritsche, M. (Matthias)) Date: Fri, 28 Aug 2015 13:31:01 +0000 Subject: [FieldTrip] Two-way permutation test Message-ID: Dear Fieldtrip mailing list, my name is Matthias Fritsche and I'm a research intern in Floris de Lange's 'Prediction & Attention' group at the Donders Center for Cognitive Neuroimaging. I'm currently working on my Master's project and have got a question I hope you might be able to help me with. I'm currently at the data analysis stage of a behavioral experiment and wondered whether there is a possibility to conduct a two-way permutation test (ANOVA-style, but without actually using ANOVAs/F-values). My experiment has two independent variables, let’s call them A and B, and one dependent variable. Every participant was tested in all of the four conditions, A1B1, A2B1, A1B2 and A2B2. The dependent variable is a parameter of a model that is fit to the data. However, due to unstable fitting at the subject level, I can only obtain this parameter from the group-averaged data. When only interested in effects between two specific conditions, e.g. A1B1 vs A2B1, the test is straightforward. In order to create the null distribution, I randomly swap the condition labels, A1B1 and A2B1, for each participant and compute the resulting group test statistic (difference of the dependent variable between A1B1 and A2B1) for that permutation. One option would be to test the difference between every two conditions in this way. However, I wondered whether there is also a way to use a permutation test similar to a 2-way ANOVA, i.e. testing the main effects of factor A and factor B, as well as the interaction effect. For that purpose, there seem to be permutation tests that use ANOVAs to generate permutation distributions of F-values. However, I cannot use ANOVAs since I only have the dependent variable for the whole group and not for individual participants. Do you know of any method to solve this? Thanks for your help. Best, Matthias -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Fri Aug 28 16:20:46 2015 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Fri, 28 Aug 2015 16:20:46 +0200 Subject: [FieldTrip] FieldTrip Course in Aarhus, right link Message-ID: Dear all, apologies for sending the wrong link and thanks to everyone that noticed ;) Here the right one: http://interactingminds.au.dk/events/single-events/artikel/field-trip-workshop/ Katrin -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Fri Aug 28 17:08:55 2015 From: david.m.groppe at gmail.com (David Groppe) Date: Fri, 28 Aug 2015 11:08:55 -0400 Subject: [FieldTrip] Two-way permutation test In-Reply-To: References: Message-ID: Hi Matthias, If I understand you correctly, you can use a t-score based permutation test to solve your problem. This procedure can test for an effect of factor A, factor B, and their interaction as described here: http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox:_within-subject_t-tests cheers, -David On Fri, Aug 28, 2015 at 9:31 AM, Fritsche, M. (Matthias) < m.fritsche at student.ru.nl> wrote: > Dear Fieldtrip mailing list, > > my name is Matthias Fritsche and I'm a research intern in Floris de > Lange's 'Prediction & Attention' group at the Donders Center for Cognitive > Neuroimaging. I'm currently working on my Master's project and have got a > question I hope you might be able to help me with. > > I'm currently at the data analysis stage of a behavioral experiment and > wondered whether there is a possibility to conduct a two-way permutation > test (ANOVA-style, but without actually using ANOVAs/F-values). > > My experiment has two independent variables, let’s call them A and B, and > one dependent variable. Every participant was tested in all of the four > conditions, A1B1, A2B1, A1B2 and A2B2. The dependent variable is a > parameter of a model that is fit to the data. However, due to unstable > fitting at the subject level, I can only obtain this parameter from the > group-averaged data. > > When only interested in effects between two specific conditions, e.g. A1B1 > vs A2B1, the test is straightforward. In order to create the null > distribution, I randomly swap the condition labels, A1B1 and A2B1, for each > participant and compute the resulting group test statistic (difference of > the dependent variable between A1B1 and A2B1) for that permutation. One > option would be to test the difference between every two conditions in this > way. > > However, I wondered whether there is also a way to use a permutation test > similar to a 2-way ANOVA, i.e. testing the main effects of factor A and > factor B, as well as the interaction effect. For that purpose, there seem > to be permutation tests that use ANOVAs to generate permutation > distributions of F-values. However, I cannot use ANOVAs since I only have > the dependent variable for the whole group and not for individual > participants. Do you know of any method to solve this? > > Thanks for your help. > > Best, > Matthias > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rb643 at medschl.cam.ac.uk Fri Aug 28 19:02:52 2015 From: rb643 at medschl.cam.ac.uk (Richard Bethlehem) Date: Fri, 28 Aug 2015 17:02:52 +0000 Subject: [FieldTrip] WPLI for individual trials Message-ID: <3188FAB8621D294696F13E80A7BBC97EFF84D73C@me-mbx3.medschl.cam.ac.uk> Dear Fieldtrippers, Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? Cheers, Richard ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m From e.maris at donders.ru.nl Sat Aug 29 12:19:39 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Sat, 29 Aug 2015 10:19:39 +0000 Subject: [FieldTrip] Two-way permutation test In-Reply-To: References: Message-ID: Hi Matthias & David, You can find a brief explanation on the topic of permutation based interaction effect testing here: http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests It also give pointers to how to implement it in Fieldtrip, which you should be familiar with. (For David: Matthias is a student in our Master CNS program, and I pointed him to the FT discussion list. Btw the list has an archive that contains many discussions of the interaction effect issue.) best, Eric Maris From: David Groppe > Subject: Re: [FieldTrip] Two-way permutation test Date: 28 Aug 2015 17:08:55 CEST To: FieldTrip discussion list > Reply-To: FieldTrip discussion list > Hi Matthias, If I understand you correctly, you can use a t-score based permutation test to solve your problem. This procedure can test for an effect of factor A, factor B, and their interaction as described here: http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox:_within-subject_t-tests cheers, -David On Fri, Aug 28, 2015 at 9:31 AM, Fritsche, M. (Matthias) > wrote: Dear Fieldtrip mailing list, my name is Matthias Fritsche and I'm a research intern in Floris de Lange's 'Prediction & Attention' group at the Donders Center for Cognitive Neuroimaging. I'm currently working on my Master's project and have got a question I hope you might be able to help me with. I'm currently at the data analysis stage of a behavioral experiment and wondered whether there is a possibility to conduct a two-way permutation test (ANOVA-style, but without actually using ANOVAs/F-values). My experiment has two independent variables, let’s call them A and B, and one dependent variable. Every participant was tested in all of the four conditions, A1B1, A2B1, A1B2 and A2B2. The dependent variable is a parameter of a model that is fit to the data. However, due to unstable fitting at the subject level, I can only obtain this parameter from the group-averaged data. When only interested in effects between two specific conditions, e.g. A1B1 vs A2B1, the test is straightforward. In order to create the null distribution, I randomly swap the condition labels, A1B1 and A2B1, for each participant and compute the resulting group test statistic (difference of the dependent variable between A1B1 and A2B1) for that permutation. One option would be to test the difference between every two conditions in this way. However, I wondered whether there is also a way to use a permutation test similar to a 2-way ANOVA, i.e. testing the main effects of factor A and factor B, as well as the interaction effect. For that purpose, there seem to be permutation tests that use ANOVAs to generate permutation distributions of F-values. However, I cannot use ANOVAs since I only have the dependent variable for the whole group and not for individual participants. Do you know of any method to solve this? Thanks for your help. Best, Matthias _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From spa268 at nyu.edu Sat Aug 29 13:06:10 2015 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Sat, 29 Aug 2015 15:06:10 +0400 Subject: [FieldTrip] Two-way permutation test Message-ID: Hello Matthias, It is possible to do a factorial test in Fieldtrip, you just have to hack the data a little bit. See this post from Eric Maris: http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests (also http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html, which is an older message recommending the same procedure if I remember correctly) Best, Steve > Message: 7 > Date: Fri, 28 Aug 2015 11:08:55 -0400 > From: David Groppe > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Two-way permutation test > Message-ID: > B32PZbahoLy+T0w at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Matthias, > If I understand you correctly, you can use a t-score based permutation > test to solve your problem. This procedure can test for an effect of factor > A, factor B, and their interaction as described here: > > > http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox:_within-subject_t-tests > > cheers, > -David > > > On Fri, Aug 28, 2015 at 9:31 AM, Fritsche, M. (Matthias) < > m.fritsche at student.ru.nl> wrote: > > > Dear Fieldtrip mailing list, > > > > my name is Matthias Fritsche and I'm a research intern in Floris de > > Lange's 'Prediction & Attention' group at the Donders Center for > Cognitive > > Neuroimaging. I'm currently working on my Master's project and have got a > > question I hope you might be able to help me with. > > > > I'm currently at the data analysis stage of a behavioral experiment and > > wondered whether there is a possibility to conduct a two-way permutation > > test (ANOVA-style, but without actually using ANOVAs/F-values). > > > > My experiment has two independent variables, let?s call them A and B, and > > one dependent variable. Every participant was tested in all of the four > > conditions, A1B1, A2B1, A1B2 and A2B2. The dependent variable is a > > parameter of a model that is fit to the data. However, due to unstable > > fitting at the subject level, I can only obtain this parameter from the > > group-averaged data. > > > > When only interested in effects between two specific conditions, e.g. > A1B1 > > vs A2B1, the test is straightforward. In order to create the null > > distribution, I randomly swap the condition labels, A1B1 and A2B1, for > each > > participant and compute the resulting group test statistic (difference of > > the dependent variable between A1B1 and A2B1) for that permutation. One > > option would be to test the difference between every two conditions in > this > > way. > > > > However, I wondered whether there is also a way to use a permutation test > > similar to a 2-way ANOVA, i.e. testing the main effects of factor A and > > factor B, as well as the interaction effect. For that purpose, there seem > > to be permutation tests that use ANOVAs to generate permutation > > distributions of F-values. However, I cannot use ANOVAs since I only have > > the dependent variable for the whole group and not for individual > > participants. Do you know of any method to solve this? > > > > Thanks for your help. > > > > Best, > > Matthias > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150828/7f8230bf/attachment-0001.html > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Aug 30 17:40:46 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sun, 30 Aug 2015 15:40:46 +0000 Subject: [FieldTrip] WPLI for individual trials In-Reply-To: <3188FAB8621D294696F13E80A7BBC97EFF84D73C@me-mbx3.medschl.cam.ac.uk> References: <3188FAB8621D294696F13E80A7BBC97EFF84D73C@me-mbx3.medschl.cam.ac.uk> Message-ID: Hi Richard, In general it is not possible to obtain a ‘single observation’ phase synchrony metric, where this metric is based on the distributional properties (i.e. across observations) of the phase difference. This holds not only for quantities like coherence, but also for WPLI. This being said, one could resort to a leave-one-out strategy, called jackknifing, to get an estimate of how much an individual trial contributes to the overall connectivity estimate. This has been formally described in http://www.sciencedirect.com/science/article/pii/S1053811915003316. Note that in order for this to work, you still need to have multiple trials in your input data. FieldTrip used to support the cfg.jackknife option in ft_connectivityanalysis for the computation of coherence, but I don’t know to what extent this generalizes to WPLI. Also, it’s been a while that I used this (i.e. jackknife) option (for coherence), so I am not sure whether this is still operational in the current version of FieldTrip. (since this option is a bit obscure, we have not done our utmost best to maintain backward-compatibility of the code here, so things may have been broken by general improvements to the code base). If you would like to follow up on this, I suggest you to contact the first author on the paper mentioned (above), I am sure that Craig would be willing to point you into the right direction (as far as he is not yet reading along … Craig, do you copy, over?). Best, Jan-Mathijs On Aug 28, 2015, at 7:02 PM, Richard Bethlehem wrote: > Dear Fieldtrippers, > > Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? > > Cheers, > > Richard > > ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From rb643 at medschl.cam.ac.uk Mon Aug 31 13:00:06 2015 From: rb643 at medschl.cam.ac.uk (Richard Bethlehem) Date: Mon, 31 Aug 2015 11:00:06 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 26 Message-ID: <3188FAB8621D294696F13E80A7BBC97EFF869DA0@me-mbx3.medschl.cam.ac.uk> Hi Jan Mathijs, Thanks for the tip! I think I missed the cross-observational aspect of WPLI and assumed you could also compute it on a trial by trial basis. I will look into the paper and see if I can reproduce it. However... my data is resting-state that is simply segmented into smaller parts ('trials') to see if there is a metric that is consistent across segments I was interested in looking at individual trials. If WPLI depends on cross-observations this might not the be optimal measure to look at such data as the segments are actually part of a continuous recording. What would be the recommended alternative (that also somewhat tackles the conduction problem)? And more in general, what would be the recommended metric for looking at resting-state connectivity (where there are no real trials)? Cheers, Richard ---------------------------------------------------------------------- Message: 1 Date: Sun, 30 Aug 2015 15:40:46 +0000 From: "Schoffelen, J.M. (Jan Mathijs)" To: FieldTrip discussion list Subject: Re: [FieldTrip] WPLI for individual trials Message-ID: Content-Type: text/plain; charset="Windows-1252" Hi Richard, In general it is not possible to obtain a ?single observation? phase synchrony metric, where this metric is based on the distributional properties (i.e. across observations) of the phase difference. This holds not only for quantities like coherence, but also for WPLI. This being said, one could resort to a leave-one-out strategy, called jackknifing, to get an estimate of how much an individual trial contributes to the overall connectivity estimate. This has been formally described in http://www.sciencedirect.com/science/article/pii/S1053811915003316. Note that in order for this to work, you still need to have multiple trials in your input data. FieldTrip used to support the cfg.jackknife option in ft_connectivityanalysis for the computation of coherence, but I don?t know to what extent this generalizes to WPLI. Also, it?s been a while that I used this (i.e. jackknife) option (for coherence), so I am not sure whether this is still operational in the current version of FieldTrip. (since this option is a bit obscure, we have not done our utmost best to maintain backward-compatibility of the code here, so things may have been broken by general improvements to the code base). If you would like to follow up on this, I suggest you to contact the first author on the paper mentioned (above), I am sure that Craig would be willing to point you into the right direction (as far as he is not yet reading along ? Craig, do you copy, over?). Best, Jan-Mathijs On Aug 28, 2015, at 7:02 PM, Richard Bethlehem wrote: > Dear Fieldtrippers, > > Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? > > Cheers, > > Richard > > ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 57, Issue 26 ***************************************** From rb643 at medschl.cam.ac.uk Mon Aug 31 13:02:56 2015 From: rb643 at medschl.cam.ac.uk (Richard Bethlehem) Date: Mon, 31 Aug 2015 11:02:56 +0000 Subject: [FieldTrip] WPLI for individual trials Message-ID: <3188FAB8621D294696F13E80A7BBC97EFF869DBD@me-mbx3.medschl.cam.ac.uk> Hi Jan Mathijs, Thanks for the tip! I think I missed the cross-observational aspect of WPLI and assumed you could also compute it on a trial by trial basis. I will look into the paper and see if I can reproduce it. However... my data is resting-state that is simply segmented into smaller parts ('trials') to see if there is a metric that is consistent across segments I was interested in looking at individual trials. If WPLI depends on cross-observations this might not the be optimal measure to look at such data as the segments are actually part of a continuous recording. What would be the recommended alternative (that also somewhat tackles the conduction problem)? And more in general, what would be the recommended metric for looking at resting-state connectivity (where there are no real trials)? Cheers, Richard ---------------------------------------------------------------------- Message: 1 Date: Sun, 30 Aug 2015 15:40:46 +0000 From: "Schoffelen, J.M. (Jan Mathijs)" To: FieldTrip discussion list Subject: Re: [FieldTrip] WPLI for individual trials Message-ID: Content-Type: text/plain; charset="Windows-1252" Hi Richard, In general it is not possible to obtain a ?single observation? phase synchrony metric, where this metric is based on the distributional properties (i.e. across observations) of the phase difference. This holds not only for quantities like coherence, but also for WPLI. This being said, one could resort to a leave-one-out strategy, called jackknifing, to get an estimate of how much an individual trial contributes to the overall connectivity estimate. This has been formally described in http://www.sciencedirect.com/science/article/pii/S1053811915003316. Note that in order for this to work, you still need to have multiple trials in your input data. FieldTrip used to support the cfg.jackknife option in ft_connectivityanalysis for the computation of coherence, but I don?t know to what extent this generalizes to WPLI. Also, it?s been a while that I used this (i.e. jackknife) option (for coherence), so I am not sure whether this is still operational in the current version of FieldTrip. (since this option is a bit obscure, we have not done our utmost best to maintain backward-compatibility of the code here, so things may have been broken by general improvements to the code base). If you would like to follow up on this, I suggest you to contact the first author on the paper mentioned (above), I am sure that Craig would be willing to point you into the right direction (as far as he is not yet reading along ? Craig, do you copy, over?). Best, Jan-Mathijs On Aug 28, 2015, at 7:02 PM, Richard Bethlehem wrote: > Dear Fieldtrippers, > > Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? > > Cheers, > > Richard > > ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m > _______________________________________________ ***************************************** From markus.gschwind at gmail.com Mon Aug 31 13:56:35 2015 From: markus.gschwind at gmail.com (Markus Gschwind) Date: Mon, 31 Aug 2015 13:56:35 +0200 Subject: [FieldTrip] General matlab script for cluster based permutation testing? Message-ID: Dear all, I wonder if someone could guide me how to use the cluster-based permutation testing after (Maris & Oostenvidle, 2007) on non-fieldtrip data, for example on simple matrices in matlab. Or is there even a matlab script around? Thanks in advance, Markus -------------- next part -------------- An HTML attachment was scrubbed... URL: From craiggrichter at gmail.com Mon Aug 31 15:26:49 2015 From: craiggrichter at gmail.com (Craig Richter) Date: Mon, 31 Aug 2015 15:26:49 +0200 Subject: [FieldTrip] WPLI for individual trials In-Reply-To: References: <3188FAB8621D294696F13E80A7BBC97EFF84D73C@me-mbx3.medschl.cam.ac.uk> Message-ID: <6DB5AD8B-78D4-4A0B-A693-5527CB94545C@gmail.com> Hi Jan-Mathijs, I read you loud and clear. Richard, if you think the method Jan-Mathijs describes will work for your application, I can explain to you my method for computing it using FT. Best, C. > On 30 Aug 2015, at 17:40, Schoffelen, J.M. (Jan Mathijs) wrote: > > Hi Richard, > > In general it is not possible to obtain a ‘single observation’ phase synchrony metric, where this metric is based on the distributional properties (i.e. across observations) of the phase difference. This holds not only for quantities like coherence, but also for WPLI. This being said, one could resort to a leave-one-out strategy, called jackknifing, to get an estimate of how much an individual trial contributes to the overall connectivity estimate. This has been formally described in http://www.sciencedirect.com/science/article/pii/S1053811915003316. Note that in order for this to work, you still need to have multiple trials in your input data. FieldTrip used to support the cfg.jackknife option in ft_connectivityanalysis for the computation of coherence, but I don’t know to what extent this generalizes to WPLI. Also, it’s been a while that I used this (i.e. jackknife) option (for coherence), so I am not sure whether this is still operational in the current version of FieldTrip. (since this option is a bit obscure, we have not done our utmost best to maintain backward-compatibility of the code here, so things may have been broken by general improvements to the code base). If you would like to follow up on this, I suggest you to contact the first author on the paper mentioned (above), I am sure that Craig would be willing to point you into the right direction (as far as he is not yet reading along … Craig, do you copy, over?). > > Best, > Jan-Mathijs > > > > On Aug 28, 2015, at 7:02 PM, Richard Bethlehem wrote: > >> Dear Fieldtrippers, >> >> Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? >> >> Cheers, >> >> Richard >> >> ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From jia.wu at yale.edu Mon Aug 31 22:33:32 2015 From: jia.wu at yale.edu (Wu, Jia) Date: Mon, 31 Aug 2015 20:33:32 +0000 Subject: [FieldTrip] beamformer on EEG data Message-ID: Hi, I'm new to the community and fieldtrip. I'm trying to use beamformer to do oscillatory source localization on some EEG data. I thought I stumbled upon some tutorial specific on this top on the fieldtrip wiki, but I couldn't find it any more. Most source localization materials seem to be for MEG data. And I've been confused about the steps to build a correct headmodel, sourcemodel, leadfield based on only EEG information. Anybody has a quick link to the tutorial? If such tutorial doesn't exist I will email the group about my specific questions. best, -jia -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindseyrtate at ou.edu Sat Aug 1 01:29:05 2015 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Fri, 31 Jul 2015 23:29:05 +0000 Subject: [FieldTrip] Virtual EOG Channel Message-ID: <69FCE2607D920B4D97BD3BA9941176E70166A300F4@it-osmium.sooner.net.ou.edu> Hello community, My name is Lindsey Tate, and I'm a PhD student at the University of Oklahoma. I'm starting work on a project analyzing data that my mentor collected previously at another institution. This data includes EEG and MEG during a saccade and anti-saccade task. My mentor previously used BESA which I have no access to currently but may have limited access to in the future. She explained that when they collected the data they didn't collect EOG channels to measure eye movements because these movements can be picked up by other channels, and in BESA there is a short process to creating a "virtual EOG" channel from the other/nearby channels. I can't find any documentation of someone doing this outside of BESA. Has anyone ever done this before in FieldTrip? If so, how did you do it and how were the results? If not, do you have ideas about how you could do such a thing? Thank you in advance for any help or advice you can offer, Lindsey -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Aug 3 08:02:16 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 3 Aug 2015 06:02:16 +0000 Subject: [FieldTrip] Virtual EOG Channel In-Reply-To: <69FCE2607D920B4D97BD3BA9941176E70166A300F4@it-osmium.sooner.net.ou.edu> References: <69FCE2607D920B4D97BD3BA9941176E70166A300F4@it-osmium.sooner.net.ou.edu> Message-ID: Hi Lindsey, You might want to have a look at some parts of the following page: http://www.fieldtriptoolbox.org/example/preprocessing_eeg?s[]=rereferencing I think it contains the information that you are looking for. Best wishes, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org On Aug 1, 2015, at 1:29 AM, Tate, Lindsey R. > wrote: Hello community, My name is Lindsey Tate, and I'm a PhD student at the University of Oklahoma. I'm starting work on a project analyzing data that my mentor collected previously at another institution. This data includes EEG and MEG during a saccade and anti-saccade task. My mentor previously used BESA which I have no access to currently but may have limited access to in the future. She explained that when they collected the data they didn't collect EOG channels to measure eye movements because these movements can be picked up by other channels, and in BESA there is a short process to creating a "virtual EOG" channel from the other/nearby channels. I can't find any documentation of someone doing this outside of BESA. Has anyone ever done this before in FieldTrip? If so, how did you do it and how were the results? If not, do you have ideas about how you could do such a thing? Thank you in advance for any help or advice you can offer, Lindsey _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Aug 3 09:37:58 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 3 Aug 2015 09:37:58 +0200 Subject: [FieldTrip] Effect of cfg.minnbchan In-Reply-To: References: Message-ID: <007e01d0cdbf$51a83490$f4f89db0$@artinis.com> Dear Marlies, if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: % For every (time,frequency)-element, it is calculated how many significant % neighbours .this channel has If a significant channel has less than minnbchan % significant neighbours, then this channel is removed from onoff. If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers Sent: Friday, July 31, 2015 3:27 PM To: fieldtrip, donders Subject: [FieldTrip] Effect of cfg.minnbchan Dear Fieldtrippers. I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. The code I used to run this analysis is pasted below. Thanks in advance! Best, Marlies Marlies Vissers PhD student University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl --- % Import the electrode labels from an EEGlab set elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); % Create matrix with TF data freqData.freq = frex; % Frequenies of TF matrix freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix freqData.dimord = 'subj_chan_freq_time'; freqData.label = elec.label; freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time % Create matrix with behavioral data, make sure the sizes match behav.freq = frex; behav.time = tx(TF_idx(1):TF_idx(2))./1000; behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix behav.label = elec.label; behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctr m,4)]); % accEffect is 1*subj array % Set configuration for perm test % Create cfg and insert parameters cfg = []; cfg.latency = [0 1.250]; cfg.frequency = [2 30]; cfg.channel ='all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_intersubcorr'; cfg.type = ft_getopt(cfg, 'type', 'Spearman'); cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; cfg_neighb.method = 'template'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); % Create design mat subj = 31; design = zeros(2,2*subj); for i = 1:subj design(2,i) = i; end for i = 1:subj design(2,subj+i) = i; end design(1,1:subj) = 1; design(1,subj+1:2*subj) = 2; cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; % Run stats [stat] = ft_freqstatistics(cfg,freqData,behav); -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Aug 3 09:56:41 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 3 Aug 2015 07:56:41 +0000 Subject: [FieldTrip] Undefined function or variable "lab" In-Reply-To: References: Message-ID: <77A6E025-667C-4255-BF8B-B22197BF3678@fcdonders.ru.nl> Hi Ervin, Given the information provided, it’s still hard to tell what might be going on. What version of FieldTrip are you using, and what does dataTarget.elec look like? What do your colleagues have to say about this? (The reason for the last question is, that they most likely have most hands-on experience with the quirks of the particular dataformat you are working with, and thus will be able to provide more specific input than the people who occasionally read posts on this list). Also, the statement that an ‘older version of fieldtrip works’ is quite unspecific (e.g. are your colleagues using a 2009-version of the code, or a more recent one :o)? Is there code totally unmodified, or did they made some code changes in order for it to work?), so I don’t think that this is going to bring you close to a solution. Yet, I think it is good diagnostic information to know that somewhere in the past ‘it’ seemed to work, either with or without local changes. Would it make sense for you to team up with your colleagues to find on what’s going on? Best, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org On Jul 31, 2015, at 2:00 PM, Poljac, E. (Ervin) > wrote: Anyone an idea of what might be wrong here? Much appreciated, Ervin ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Poljac, E. (Ervin) [ervin.poljac at donders.ru.nl] Sent: Monday, July 27, 2015 1:54 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Undefined function or variable "lab" Hello fieldtrippers, I am trying to prepare my EEG data for analysis. Among others, I identify bad channels and try to repair them. However, there is this annoying error: Undefined function or variable "lab". Error in channelposition (line 314) n = size(lab,2); Error in ft_datatype_sens (line 329) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_raw (line 146) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 225) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_channelrepair (line 102) data = ft_checkdata(data, 'datatype', 'raw', 'feedback', 'yes'); In the debug mode I see that the variable 'sens' has a correct value, the bad channel seems to be identified, but then for some reason, lab is not filled. I am copy-pasting that part of my code below. I hope someone has experience with this and how to solve it. Some of my colleagues use an older fieldtrip version that works (so, no error there), and I compared the filein s ft_checkdata, ft_datatype_sens and ft_datatype_sens, they are different, but it is not obvious to me what exactly is new, causing the error. Many thanks, Ervin My code: %% channel rejection, identifying bad channels for target condition cfg=[]; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = [50];% frequency band - foilim or just foi?? rejectedData=ft_freqanalysis(cfg,dataTarget); idx=unique([find(rejectedData.powspctrm>0.5*10^4)]); %this threshold might change for each recording neighbours=open('/Users/Ervin/Documents/MATLAB/biosemi64_neighb.mat'); neighbours=neighbours.neighbours; cfg = []; cfg.channel = rejectedData.label; cfg.layout = 'biosemi64.lay'; cfg.feedback = 'yes'; lay = ft_prepare_layout(cfg); if ~isempty(idx) badchannels=cell(numel(idx),1); [badchannels{1:numel(idx),1}] = deal(rejectedData.label{idx}); % Interpolation for rejected channels cfg=[]; cfg.layout=lay; cfg.badchannel=badchannels; dataTarget.elec.label = dataTarget.label; dataTarget.elec.pnt = lay.pos; cfg.neighbours=neighbours; dataTargetRepaired=ft_channelrepair(cfg, dataTarget); end -- Ervin Poljac, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition (DCC) Radboud University Nijmegen Room B.00.78A Montessorilaan 3 6500 HE Nijmegen T. 024 36 15457 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Mon Aug 3 12:29:22 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Mon, 3 Aug 2015 10:29:22 +0000 (UTC) Subject: [FieldTrip] ft_checkconfig Message-ID: <1647214019.423212.1438597762591.JavaMail.yahoo@mail.yahoo.com> Hi, I am new in fieldtrip. I am trying to create a realtime EEG data from bioamplifier.I call ft_realtime_signalviewer function and receives this error : cfg = ft_checkconfig(cfg,'dataset2files', 'yes'); I am using Matlab 2013, 64 bits windows 7. Any help is very helpful.  Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From elmeri.syrjanen at gmail.com Mon Aug 3 15:16:10 2015 From: elmeri.syrjanen at gmail.com (=?UTF-8?Q?Elmeri_Syrj=C3=A4nen?=) Date: Mon, 3 Aug 2015 15:16:10 +0200 Subject: [FieldTrip] Virtual EOG Channel In-Reply-To: References: <69FCE2607D920B4D97BD3BA9941176E70166A300F4@it-osmium.sooner.net.ou.edu> Message-ID: Hi, here is some code that works well for me: % Create a virtual channel of frontal electrodes for finding eye-blinks cfg = []; cfg.layout = 'biosemi128.lay'; cfg.channel = {'C30', 'C29', 'C17', 'C16', 'C8'}; EOGdata = ft_preprocessing(cfg, ERPdata); cfg = []; cfg.avgoverchan = 'yes'; EOGdata = ft_selectdata(cfg, EOGdata); EOGdata.label = {'EOG'}; /elmeri On Mon, Aug 3, 2015 at 8:02 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Lindsey, > > You might want to have a look at some parts of the following page: > http://www.fieldtriptoolbox.org/example/preprocessing_eeg?s[]=rereferencing > I think it contains the information that you are looking for. > > Best wishes, > Jan-Mathijs > > > Jan-Mathijs Schoffelen, MD PhD, Senior researcher > > Max Planck Institute for Psycholinguistics > Donders Centre for Cognitive Neuroimaging > > E-mail: j.schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > http://www.fieldtriptoolbox.org > > > > On Aug 1, 2015, at 1:29 AM, Tate, Lindsey R. wrote: > > Hello community, > > My name is Lindsey Tate, and I'm a PhD student at the University of > Oklahoma. I'm starting work on a project analyzing data that my mentor > collected previously at another institution. This data includes EEG and MEG > during a saccade and anti-saccade task. My mentor previously used BESA > which I have no access to currently but may have limited access to in the > future. She explained that when they collected the data they didn't collect > EOG channels to measure eye movements because these movements can be picked > up by other channels, and in BESA there is a short process to creating a > "virtual EOG" channel from the other/nearby channels. I can't find any > documentation of someone doing this outside of BESA. > > Has anyone ever done this before in FieldTrip? If so, how did you do it > and how were the results? If not, do you have ideas about how you could do > such a thing? > > Thank you in advance for any help or advice you can offer, > Lindsey > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Tue Aug 4 11:31:52 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Tue, 4 Aug 2015 09:31:52 +0000 (UTC) Subject: [FieldTrip] realtime TMS-EEG Message-ID: <191681055.167105.1438680712821.JavaMail.yahoo@mail.yahoo.com> Hi, I'm using TMSI Porti and I want to record the data in realtime.However, it is not working when I used the ft_realtime_signalviewer.Does I miss any step? Any solution guys? Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Tue Aug 4 11:59:08 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Tue, 4 Aug 2015 09:59:08 +0000 Subject: [FieldTrip] realtime TMS-EEG In-Reply-To: <191681055.167105.1438680712821.JavaMail.yahoo@mail.yahoo.com> References: <191681055.167105.1438680712821.JavaMail.yahoo@mail.yahoo.com> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB51857F@exprd01.hosting.ru.nl> Dear Wan, Please have a look at this page: http://www.fieldtriptoolbox.org/development/realtime (also specific to TMSi: http://www.fieldtriptoolbox.org/development/realtime/tmsi) The pages might not be fully up to date but they should help you get started. If you then run into problems please help us help you by supplying the following: § The cfg you used § The fields of your data structure § The line you called that gave an error / that you would like to ask a question on § The exact error message you got Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of wan amirah Wan azlan Sent: dinsdag 4 augustus 2015 11:32 To: fieldtrip at science.ru.nl Subject: [FieldTrip] realtime TMS-EEG Hi, I'm using TMSI Porti and I want to record the data in realtime. However, it is not working when I used the ft_realtime_signalviewer. Does I miss any step? Any solution guys? Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bushra.riaz at gu.se Tue Aug 4 14:48:15 2015 From: bushra.riaz at gu.se (Bushra Riaz Syeda) Date: Tue, 4 Aug 2015 12:48:15 +0000 Subject: [FieldTrip] 2 days left! Post-doc position in MEG for children with brain cancer... Message-ID: Just a reminder since the deadline is approaching... ________________________________ From: Justin Schneiderman Subject: Post-doc position in MEG for children with brain cancer... Dear colleagues and friends, I'm pleased to announce an open position in our growing MEG group: Postdoctoral researcher in MEG for children with brain cancer at MedTech West (www.medtechwest.se) and the University of Gothenburg Institute of Neuroscienceand Physiology (http://neurophys.gu.se/english) in collaboration with the Sahlgrenska University Hospital, Queen Silvia Children's Hospital, and Sweden's MEG lab at Karolinska Institutet, NatMEG (www.natmeg.se). More information about the position and application procedure can be found here: http://www.gu.se/english/about_the_university/announcements-in-the-job-application-portal/?languageId=100001&disableRedirect=true&returnUrl=http%3A%2F%2Fwww.gu.se%2Fomuniversitetet%2Faktuellt%2Fledigaanstallningar%2F%3Fid%3D19144%26Dnr%3D712083%26Type%3DS&Dnr=712083&Type=S Please forward this to colleagues, soon-to-graduate PhD students, and others that might be interested. Application deadline is 6 AUG. Thanks! -Justin MedTech West http://www.medtechwest.se Institute of Neuroscience and Physiology Sahlgrenska Academy & University of Gothenburg? -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Tue Aug 4 16:36:49 2015 From: caspervanheck at gmail.com (Casper van Heck) Date: Tue, 4 Aug 2015 16:36:49 +0200 Subject: [FieldTrip] Fourier analysis units Message-ID: Dear fellow Fieldtrippers, I've made some Fourier analyses using *ft_freqanalysis* with *cfg.method = 'mtmfft'*, and found something worth reporting. However, Fieldtrip does not report the units. Looking at conversations in the Fieldtrip discussion archive, it would seem this question has either been sidestepped or not answered in the past, so I'd like to ask this question again. Does anybody know? Best regards, Casper -------------- next part -------------- An HTML attachment was scrubbed... URL: From marliesvissers at gmail.com Tue Aug 4 16:38:57 2015 From: marliesvissers at gmail.com (Marlies Vissers) Date: Tue, 4 Aug 2015 16:38:57 +0200 Subject: [FieldTrip] Effect of cfg.minnbchan In-Reply-To: <007e01d0cdbf$51a83490$f4f89db0$@artinis.com> References: <007e01d0cdbf$51a83490$f4f89db0$@artinis.com> Message-ID: Dear Jörn, Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error *‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’*. If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? Thanks in advance! Best, Marlies On 3 August 2015 at 09:37, Jörn M. Horschig wrote: > Dear Marlies, > > > > if I am not mistaken, the minnbchan option checks indeed if every channels > in a cluster has at least the specified amount of channels in it and > removes it otherwise. The code is documented as follows: > > % For every (time,frequency)-element, it is calculated how many > significant > > % neighbours .this channel has If a significant channel has less than > minnbchan > > % significant neighbours, then this channel is removed from onoff. > > > > If something went wrong is hard to tell – it also depends on how the > neighbor structure looks like. If you do not have C3 or C1, then C5 can > indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz > could be called a neighbor of FC4. You can check how neighbors are defined > by using ft_neighbourplot. That’s the first check I’d do. > > > > Best, > > Jörn > > > > > > *--* > > > > *Jörn M. Horschig, PhD*, Software Engineer > > Artinis Medical Systems | +31 481 350 980 > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Marlies Vissers > *Sent:* Friday, July 31, 2015 3:27 PM > *To:* fieldtrip, donders > *Subject:* [FieldTrip] Effect of cfg.minnbchan > > > > Dear Fieldtrippers. > > > > I have a question about the effect of the tuning parameter cfg.minnbchan > when performing cluster based permutation testing, since the spatial > characteristics of my clusters differ from what I expected to find given > the settings I used. > > > > I am running cross-subject correlations (n=31) between a behavioral > variable and a subj*channel*time*frequency matrix with power data > (preprocessed using EEGlab and decomposed outside of Fieldtrip), using > ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd > like to avoid finding clusters with difficult-to-interpret shapes, I set > cfg.minnbchan to 2. > > > > My concern however, is that the resulting clusters do not always exist of > neighbouring electrodes. For example, one of the resulting clusters is > located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected > through the other dimensions (time & frequency). In one of Eric Maris' > previous replies to an older post about cfg.minnbchan, I read that the > parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. > Does this mean that any cluster without spatially neighbouring electrodes > should have been rejected when minnbchan is set to 2? > > > > I would be very grateful if someone could let me know whether setting > cfg.minnbchan to 2 can -in principle- still yield clusters with > spatially-non-adjacent electrodes, or whether this result is likely due to > an error in my code. If the latter, I'd very much appreciate advice on > checks I could perform to detect the potential error. > > > > The code I used to run this analysis is pasted below. > > > > Thanks in advance! > > > > Best, > > Marlies > > > > Marlies Vissers > > PhD student > > > > University of Amsterdam | Department Brain and Cognition | Cognition and > Plasticity Laboratory > > Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl > > > > --- > > > > % Import the electrode labels from an EEGlab set > > elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); > > > > % Create matrix with TF data > > freqData.freq = frex; % Frequenies > of TF matrix > > freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix > > freqData.dimord = 'subj_chan_freq_time'; > > freqData.label = elec.label; > > freqData.powspctrm = tempTF; % tempTF is matrix with > subj*channels*freq*time > > > > % Create matrix with behavioral data, make sure the sizes match > > behav.freq = frex; > > behav.time = tx(TF_idx(1):TF_idx(2))./1000; > > behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is > just behavioral data in this matrix > > behav.label = elec.label; > > behav.powspctrm = repmat(accEffect,[1 > size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); > % accEffect is 1*subj array > > > > % Set configuration for perm test > > % Create cfg and insert parameters > > cfg = []; > > cfg.latency = [0 1.250]; > > cfg.frequency = [2 30]; > > cfg.channel ='all'; > > cfg.method = 'montecarlo'; > > cfg.statistic = 'ft_statfun_intersubcorr'; > > cfg.type = ft_getopt(cfg, 'type', 'Spearman'); > > cfg.correctm = 'cluster'; > > cfg.clusteralpha = 0.05; > > cfg.clusterstatistic = 'maxsum'; > > cfg.minnbchan = 2; > > cfg.tail = 0; > > cfg.clustertail = 0; > > cfg.alpha = 0.025; > > cfg.numrandomization = 1000; > > > > % prepare_neighbours determines what sensors may form clusters: load > Biosemi 64 channel cap > > cfg.template = [fieldtripdir thisSlash 'template' thisSlash > 'neighbours' thisSlash 'biosemi64_neighb.mat']; > > cfg.layout = [fieldtripdir thisSlash 'template' > thisSlash 'layout' thisSlash 'biosemi64.lay']; > > cfg_neighb.method = 'template'; > > cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); > > > > % Create design mat > > subj = 31; > > design = zeros(2,2*subj); > > for i = 1:subj > > design(2,i) = i; > > end > > for i = 1:subj > > design(2,subj+i) = i; > > end > > design(1,1:subj) = 1; > > design(1,subj+1:2*subj) = 2; > > cfg.design = design; > > cfg.ivar = 1; > > cfg.uvar = 2; > > > > % Run stats > > [stat] = ft_freqstatistics(cfg,freqData,behav); > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Aug 5 09:13:25 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 5 Aug 2015 07:13:25 +0000 Subject: [FieldTrip] Fourier analysis units In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB519825@exprd01.hosting.ru.nl> Dear Casper, The units of the power spectrum depends on the units of your input data. For example, if your input data is in microvolts, the unit of the power spectrum is microvolts^2 (give that cfg.output=’pow’). Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Casper van Heck Sent: dinsdag 4 augustus 2015 16:37 To: FieldTrip discussion list Subject: [FieldTrip] Fourier analysis units Dear fellow Fieldtrippers, I've made some Fourier analyses using ft_freqanalysis with cfg.method = 'mtmfft', and found something worth reporting. However, Fieldtrip does not report the units. Looking at conversations in the Fieldtrip discussion archive, it would seem this question has either been sidestepped or not answered in the past, so I'd like to ask this question again. Does anybody know? Best regards, Casper -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Wed Aug 5 14:54:09 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Wed, 5 Aug 2015 12:54:09 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 4 In-Reply-To: References: Message-ID: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> Dear Marlies, I did not go through all details of your correspondence with Jorn, but let me add a few remarks from a birds-eye perspective. 1. Your statfun is intersubjcorr, which evaluates the correlation over subjects between a neuronal and a behavioural variable, with the neuronal variable typically being high-dimensional, and thereby creating a multiple comparisons problem. Btw, I don’t like the name intersubjcorr, because the correlation is over subjects and not between (=inter). 2. I’m puzzled by where the connectivity matrix comes from, because your analysis does not involve between-channel quantities. In fact, from the perspective of the neuronal data, it is a typical univariate analysis in which every channel is treated separately. The only between-aspect in your study involves the relation between the (high-dimensional) neuronal variable and the (one-dimensional) behavioral variable. 3. Fieldtrip has no cluster-based statistics implemented that clusters channel-pairs, except for the trivial case in which you select a single reference channel for which you evaluate the coupling with all other channels (as in Maris, Schoffelen & Fries, 2007). best, Eric From: Marlies Vissers > Subject: Re: [FieldTrip] Effect of cfg.minnbchan Date: 4 Aug 2015 16:38:57 CEST To: FieldTrip discussion list > Reply-To: FieldTrip discussion list > Dear Jörn, Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error ‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’. If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? Thanks in advance! Best, Marlies On 3 August 2015 at 09:37, Jörn M. Horschig > wrote: Dear Marlies, if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: % For every (time,frequency)-element, it is calculated how many significant % neighbours .this channel has If a significant channel has less than minnbchan % significant neighbours, then this channel is removed from onoff. If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers Sent: Friday, July 31, 2015 3:27 PM To: fieldtrip, donders > Subject: [FieldTrip] Effect of cfg.minnbchan Dear Fieldtrippers. I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. The code I used to run this analysis is pasted below. Thanks in advance! Best, Marlies Marlies Vissers PhD student University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl --- % Import the electrode labels from an EEGlab set elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); % Create matrix with TF data freqData.freq = frex; % Frequenies of TF matrix freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix freqData.dimord = 'subj_chan_freq_time'; freqData.label = elec.label; freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time % Create matrix with behavioral data, make sure the sizes match behav.freq = frex; behav.time = tx(TF_idx(1):TF_idx(2))./1000; behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix behav.label = elec.label; behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array % Set configuration for perm test % Create cfg and insert parameters cfg = []; cfg.latency = [0 1.250]; cfg.frequency = [2 30]; cfg.channel ='all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_intersubcorr'; cfg.type = ft_getopt(cfg, 'type', 'Spearman'); cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; cfg_neighb.method = 'template'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); % Create design mat subj = 31; design = zeros(2,2*subj); for i = 1:subj design(2,i) = i; end for i = 1:subj design(2,subj+i) = i; end design(1,1:subj) = 1; design(1,subj+1:2*subj) = 2; cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; % Run stats [stat] = ft_freqstatistics(cfg,freqData,behav); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Wed Aug 5 15:04:53 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Wed, 5 Aug 2015 15:04:53 +0200 Subject: [FieldTrip] Effect of cfg.minnbchan In-Reply-To: References: <007e01d0cdbf$51a83490$f4f89db0$@artinis.com> Message-ID: <00c701d0cf7f$520ec400$f62c4c00$@artinis.com> Dear Marlies, the channelconnectivity function is in a private directory, therefore not directly executable. If you are keen on pursuing this, you can copy it out or cd into that directory. However, check Eric’s response, from which it seems that you might on to something that is not intended to be happening ;) did you ever run into these problems with a “normal” test, say a depsampleT test as described in the FT tutorial? Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers Sent: Tuesday, August 4, 2015 4:39 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Effect of cfg.minnbchan Dear Jörn, Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error ‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’. If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? Thanks in advance! Best, Marlies On 3 August 2015 at 09:37, Jörn M. Horschig > wrote: Dear Marlies, if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: % For every (time,frequency)-element, it is calculated how many significant % neighbours .this channel has If a significant channel has less than minnbchan % significant neighbours, then this channel is removed from onoff. If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl ] On Behalf Of Marlies Vissers Sent: Friday, July 31, 2015 3:27 PM To: fieldtrip, donders > Subject: [FieldTrip] Effect of cfg.minnbchan Dear Fieldtrippers. I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. The code I used to run this analysis is pasted below. Thanks in advance! Best, Marlies Marlies Vissers PhD student University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl --- % Import the electrode labels from an EEGlab set elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); % Create matrix with TF data freqData.freq = frex; % Frequenies of TF matrix freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix freqData.dimord = 'subj_chan_freq_time'; freqData.label = elec.label; freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time % Create matrix with behavioral data, make sure the sizes match behav.freq = frex; behav.time = tx(TF_idx(1):TF_idx(2))./1000; behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix behav.label = elec.label; behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array % Set configuration for perm test % Create cfg and insert parameters cfg = []; cfg.latency = [0 1.250]; cfg.frequency = [2 30]; cfg.channel ='all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_intersubcorr'; cfg.type = ft_getopt(cfg, 'type', 'Spearman'); cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; cfg_neighb.method = 'template'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); % Create design mat subj = 31; design = zeros(2,2*subj); for i = 1:subj design(2,i) = i; end for i = 1:subj design(2,subj+i) = i; end design(1,1:subj) = 1; design(1,subj+1:2*subj) = 2; cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; % Run stats [stat] = ft_freqstatistics(cfg,freqData,behav); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Aug 5 15:11:05 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 5 Aug 2015 13:11:05 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 4 In-Reply-To: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> References: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> Message-ID: <431477C1-7C6F-4D4D-96F5-1C80729B3140@fcdonders.ru.nl> Hi Eric, Allow me to chime in to avoid any confusion from your side regarding point 2). I think that Marlies refers to a boolean spatial adjacency matrix that defines whether channels are neighbours, or not. In the code, this is referred to as a matrix named ‘connectivity’, which may not be the most obvious denomination. At some point in time we have made some low-level changes in the FieldTrip code, concerning the treatment of the spatial dimension for the clustering, which allows to treat spatial clustering along edges along a triangulated mesh (e.g. dipole locations defined on the cortical sheet) in the same way as spatial clustering on an extracranial channel array. Channel clustering is now a ‘special case’ where the cfg.neighbours structure array is converted into the boolean adjancency matrix, by the low-level channelconnectivity function, which is in fieldtrip/private. Best, Jan-Mathijs On Aug 5, 2015, at 2:54 PM, Maris, E.G.G. (Eric) > wrote: Dear Marlies, I did not go through all details of your correspondence with Jorn, but let me add a few remarks from a birds-eye perspective. 1. Your statfun is intersubjcorr, which evaluates the correlation over subjects between a neuronal and a behavioural variable, with the neuronal variable typically being high-dimensional, and thereby creating a multiple comparisons problem. Btw, I don’t like the name intersubjcorr, because the correlation is over subjects and not between (=inter). 2. I’m puzzled by where the connectivity matrix comes from, because your analysis does not involve between-channel quantities. In fact, from the perspective of the neuronal data, it is a typical univariate analysis in which every channel is treated separately. The only between-aspect in your study involves the relation between the (high-dimensional) neuronal variable and the (one-dimensional) behavioral variable. 3. Fieldtrip has no cluster-based statistics implemented that clusters channel-pairs, except for the trivial case in which you select a single reference channel for which you evaluate the coupling with all other channels (as in Maris, Schoffelen & Fries, 2007). best, Eric From: Marlies Vissers > Subject: Re: [FieldTrip] Effect of cfg.minnbchan Date: 4 Aug 2015 16:38:57 CEST To: FieldTrip discussion list > Reply-To: FieldTrip discussion list > Dear Jörn, Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error ‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’. If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? Thanks in advance! Best, Marlies On 3 August 2015 at 09:37, Jörn M. Horschig > wrote: Dear Marlies, if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: % For every (time,frequency)-element, it is calculated how many significant % neighbours .this channel has If a significant channel has less than minnbchan % significant neighbours, then this channel is removed from onoff. If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers Sent: Friday, July 31, 2015 3:27 PM To: fieldtrip, donders > Subject: [FieldTrip] Effect of cfg.minnbchan Dear Fieldtrippers. I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. The code I used to run this analysis is pasted below. Thanks in advance! Best, Marlies Marlies Vissers PhD student University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl --- % Import the electrode labels from an EEGlab set elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); % Create matrix with TF data freqData.freq = frex; % Frequenies of TF matrix freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix freqData.dimord = 'subj_chan_freq_time'; freqData.label = elec.label; freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time % Create matrix with behavioral data, make sure the sizes match behav.freq = frex; behav.time = tx(TF_idx(1):TF_idx(2))./1000; behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix behav.label = elec.label; behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array % Set configuration for perm test % Create cfg and insert parameters cfg = []; cfg.latency = [0 1.250]; cfg.frequency = [2 30]; cfg.channel ='all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_intersubcorr'; cfg.type = ft_getopt(cfg, 'type', 'Spearman'); cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; cfg_neighb.method = 'template'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); % Create design mat subj = 31; design = zeros(2,2*subj); for i = 1:subj design(2,i) = i; end for i = 1:subj design(2,subj+i) = i; end design(1,1:subj) = 1; design(1,subj+1:2*subj) = 2; cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; % Run stats [stat] = ft_freqstatistics(cfg,freqData,behav); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Wed Aug 5 16:45:06 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Wed, 5 Aug 2015 07:45:06 -0700 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 4 In-Reply-To: <431477C1-7C6F-4D4D-96F5-1C80729B3140@fcdonders.ru.nl> References: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> <431477C1-7C6F-4D4D-96F5-1C80729B3140@fcdonders.ru.nl> Message-ID: And to briefly chime in on point 1, i believe that statfun has changed its name to correlationT some time ago. Yours, Arjen > On Aug 5, 2015, at 6:11 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > > Hi Eric, > > Allow me to chime in to avoid any confusion from your side regarding point 2). I think that Marlies refers to a boolean spatial adjacency matrix that defines whether channels are neighbours, or not. In the code, this is referred to as a matrix named ‘connectivity’, which may not be the most obvious denomination. At some point in time we have made some low-level changes in the FieldTrip code, concerning the treatment of the spatial dimension for the clustering, which allows to treat spatial clustering along edges along a triangulated mesh (e.g. dipole locations defined on the cortical sheet) in the same way as spatial clustering on an extracranial channel array. Channel clustering is now a ‘special case’ where the cfg.neighbours structure array is converted into the boolean adjancency matrix, by the low-level channelconnectivity function, which is in fieldtrip/private. > > Best, > Jan-Mathijs > >> On Aug 5, 2015, at 2:54 PM, Maris, E.G.G. (Eric) wrote: >> >> Dear Marlies, >> >> I did not go through all details of your correspondence with Jorn, but let me add a few remarks from a birds-eye perspective. >> >> 1. Your statfun is intersubjcorr, which evaluates the correlation over subjects between a neuronal and a behavioural variable, with the neuronal variable typically being high-dimensional, and thereby creating a multiple comparisons problem. Btw, I don’t like the name intersubjcorr, because the correlation is over subjects and not between (=inter). >> 2. I’m puzzled by where the connectivity matrix comes from, because your analysis does not involve between-channel quantities. In fact, from the perspective of the neuronal data, it is a typical univariate analysis in which every channel is treated separately. The only between-aspect in your study involves the relation between the (high-dimensional) neuronal variable and the (one-dimensional) behavioral variable. >> 3. Fieldtrip has no cluster-based statistics implemented that clusters channel-pairs, except for the trivial case in which you select a single reference channel for which you evaluate the coupling with all other channels (as in Maris, Schoffelen & Fries, 2007). >> >> best, >> Eric >> >> >>> >>> >>> From: Marlies Vissers >>> Subject: Re: [FieldTrip] Effect of cfg.minnbchan >>> Date: 4 Aug 2015 16:38:57 CEST >>> To: FieldTrip discussion list >>> Reply-To: FieldTrip discussion list >>> >>> >>> Dear Jörn, >>> >>> Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. >>> However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. >>> Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. >>> E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. >>> >>> I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error ‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’. >>> If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. >>> >>> Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? >>> >>> Thanks in advance! >>> >>> Best, >>> Marlies >>> >>>> On 3 August 2015 at 09:37, Jörn M. Horschig wrote: >>>> Dear Marlies, >>>> >>>> if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: >>>> % For every (time,frequency)-element, it is calculated how many significant >>>> % neighbours .this channel has If a significant channel has less than minnbchan >>>> % significant neighbours, then this channel is removed from onoff. >>>> >>>> If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. >>>> >>>> Best, >>>> Jörn >>>> >>>> >>>> -- >>>> >>>> Jörn M. Horschig, PhD, Software Engineer >>>> Artinis Medical Systems | +31 481 350 980 >>>> >>>> From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers >>>> Sent: Friday, July 31, 2015 3:27 PM >>>> To: fieldtrip, donders >>>> Subject: [FieldTrip] Effect of cfg.minnbchan >>>> >>>> Dear Fieldtrippers. >>>> >>>> I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. >>>> >>>> I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. >>>> >>>> My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? >>>> >>>> I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. >>>> >>>> The code I used to run this analysis is pasted below. >>>> >>>> Thanks in advance! >>>> >>>> Best, >>>> Marlies >>>> >>>> Marlies Vissers >>>> PhD student >>>> >>>> University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory >>>> Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl >>>> >>>> --- >>>> >>>> % Import the electrode labels from an EEGlab set >>>> elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); >>>> >>>> % Create matrix with TF data >>>> freqData.freq = frex; % Frequenies of TF matrix >>>> freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix >>>> freqData.dimord = 'subj_chan_freq_time'; >>>> freqData.label = elec.label; >>>> freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time >>>> >>>> % Create matrix with behavioral data, make sure the sizes match >>>> behav.freq = frex; >>>> behav.time = tx(TF_idx(1):TF_idx(2))./1000; >>>> behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix >>>> behav.label = elec.label; >>>> behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array >>>> >>>> % Set configuration for perm test >>>> % Create cfg and insert parameters >>>> cfg = []; >>>> cfg.latency = [0 1.250]; >>>> cfg.frequency = [2 30]; >>>> cfg.channel ='all'; >>>> cfg.method = 'montecarlo'; >>>> cfg.statistic = 'ft_statfun_intersubcorr'; >>>> cfg.type = ft_getopt(cfg, 'type', 'Spearman'); >>>> cfg.correctm = 'cluster'; >>>> cfg.clusteralpha = 0.05; >>>> cfg.clusterstatistic = 'maxsum'; >>>> cfg.minnbchan = 2; >>>> cfg.tail = 0; >>>> cfg.clustertail = 0; >>>> cfg.alpha = 0.025; >>>> cfg.numrandomization = 1000; >>>> >>>> % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap >>>> cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; >>>> cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; >>>> cfg_neighb.method = 'template'; >>>> cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); >>>> >>>> % Create design mat >>>> subj = 31; >>>> design = zeros(2,2*subj); >>>> for i = 1:subj >>>> design(2,i) = i; >>>> end >>>> for i = 1:subj >>>> design(2,subj+i) = i; >>>> end >>>> design(1,1:subj) = 1; >>>> design(1,subj+1:2*subj) = 2; >>>> cfg.design = design; >>>> cfg.ivar = 1; >>>> cfg.uvar = 2; >>>> >>>> % Run stats >>>> [stat] = ft_freqstatistics(cfg,freqData,behav); >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Wed Aug 5 19:23:20 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Wed, 5 Aug 2015 19:23:20 +0200 Subject: [FieldTrip] EEG forward solution Message-ID: Hi all, I am working on constructing a forward model for source reconstruction using minimum-norm estimate. There are two tutorials on EEG forward solutions: http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate Each uses a somewhat different set of functions for calculating the source model and the volume conduction model but it is not clear whether these differences are real (i.e. yielding different outcomes) or only apparent (i.e. different ways of reaching the same result). Specifically, my question is: if I follow the tutorial http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg , all the way to the line... vol = ft_prepare_headmodel(cfg, bnd); ...to which I then add...: %source model cfg = [ ]; cfg.mri = mri_of_subject; sourceModel = ft_prepare_sourcemodel(cfg); % lead field cfg = [ ]; cfg.vol = vol; cfg.elec = electrode_positions; cfg.grid = sourceModel; leadfield = ft_prepare_leadfield(cfg); ...will this give me the same leadfield as the procedure outlined in http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate ? If these are both valid ways of calculating the leadfield, but they do not yield equivalent results, what - in general - should be my considerations when choosing between the two? Thanks! Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From assaf.harel at wright.edu Thu Aug 6 08:39:04 2015 From: assaf.harel at wright.edu (Harel, Assaf) Date: Thu, 6 Aug 2015 06:39:04 +0000 Subject: [FieldTrip] Postdoc fellow at the Human Neuroscience and Visual Cognition & ASTECCA Laboratories Message-ID: POSTDOCTORAL FELLOW Human Neuroscience and Visual Cognition & ASTECCA Laboratories, Department of Psychology, Wright State University We are seeking a postdoctoral fellow to take a leading role in our research on the neurocognitive correlates of attentional control and lapses of attention in semi-structured ecological settings. The goal of this project is to rigorously characterize the relationship between laboratory measures of attentional control and failures of attention in realistic task contexts. We specifically aim to combine cognitive behavioral studies, ERP experiments, and computational modeling to test the extent to which laboratory measures can predict individual differences in susceptibility to attentional failures. We will investigate how these combined measures can be used to identify which individuals are most likely to benefit from a cognitive training paradigm aimed at enhancing attentional control. The postdoctoral fellow will be responsible for designing the studies, programming the experimental paradigms, recruiting participants, and collecting the data. In addition, the fellow will be responsible for data analysis and reporting the research findings in peer-reviewed journals. The position is fully funded for three years. The successful candidate will hold a PhD in Cognitive Neuroscience, Cognitive Psychology, Computer Science, or any other related discipline by the start date of the position. Experience in computer programming, especially with Matlab, and familiarity with fMRI or EEG research are required. Experience in computational cognitive modeling will be considered a strong advantage. The Department of Psychology is housed in the College of Science and Mathematics, offers a Ph.D. in Human Factors and Industrial/ Organizational Psychology, and has 3 undergraduate concentration areas: (1) Cognition and Perception, (2) Industrial/ Organizational, and (3) Behavioral Neuroscience. Wright State University was recently ranked among the "Best in the Midwest" universities by The Princeton Review, listed among 260 Best National Universities in the annual "America's Best Colleges" rankings by U.S. News and World Report, and ranked fourth nationally among universities with limited numbers of doctoral programs in the Faculty Scholarly Productivity Index. Wright State University is an Equal Opportunity/Affirmative Action Employer. For more information on this position contact Assaf Harel, Ph.D. at assaf.harel at wright.edu or Ion Juvina, Ph.D. at ion.juvina at wright.edu. Applicants should visit the following link to upload CV and statement of research: . In addition, please have three letters of reference sent directly to Ion Juvina, Ph.D., Assistant Professor, Department of Psychology, 313G Fawcett Hall, 3640 Colonel Glenn Hwy, Wright State University, Dayton, OH 45435. Review of complete applications will begin August 8, 2015, and continue until the position is filled. All new hires must go through a criminal background check before they can be hired. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Thu Aug 6 16:32:10 2015 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Thu, 6 Aug 2015 14:32:10 +0000 Subject: [FieldTrip] Error in Cluster permutation tutorial? Message-ID: <1438871530409.50689@nin.knaw.nl> Dear FieldTrippers, I followed the tutorial on http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics?s[]=cluster&s[]=permutation at the very end, I wanted to do the ft_clusterplot but then I did not get topoplots as a function of time as in the tutorial and instead just got one plot. Is there something wrong in the way the parameters are set in the tutorial. The last part is as follows: % make a plot cfg = []; cfg.highlightsymbolseries = ['*','*','.','.','.']; cfg.layout = 'CTF151.lay'; cfg.contournum = 0; cfg.markersymbol = '.'; cfg.alpha = 0.05; cfg.parameter='stat'; cfg.zlim = [-5 5]; ft_clusterplot(cfg,stat); Any input will be very helpful. Thanks. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From ibjuslc at gmail.com Thu Aug 6 16:46:20 2015 From: ibjuslc at gmail.com (ishita basu) Date: Thu, 6 Aug 2015 10:46:20 -0400 Subject: [FieldTrip] custer based non parametric permutation test for coherence difference Message-ID: I am very interested in using your firldtrip code for doing nonparametric cluster based permutation testing for coherence differences. I tried reading through the fieldtrip tutorials on doing similar analysis on time-frequency spectral data, but could not find anything on coherence except for the coherence calculations for the cortico-muscular data (doesn’t involve any statistical testing). I also saw that the main function being used , i.e the ft_freqstatistics function requires input from ft_freqanalysis and not ft_connectivityanalysis (the one for calculating coherence). Another doubt I had was, it seems like I need some neighborhood information for doing the cluster analysis. If I wanted to cluster only in the time frequency grid and not spatially (I am using depth electrode data ) or I wanted the algorithm to find spatial clusters for me in the absence of prior knowledge, is that feasible ? Thanks Ishita -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.wieffering at gmail.com Thu Aug 6 16:50:55 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Thu, 6 Aug 2015 10:50:55 -0400 Subject: [FieldTrip] Granger Causality Analysis after Beamformer In-Reply-To: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> Message-ID: Hi again, Jan-Mathijs- Thanks again for your help. I have been following your suggestion and so far completed LCMV Beamformer on two regions of interest and gone on to construct two virtual channels from there, according to the connectivity tutorial. However, I receive an error when I compute ft_mvaranalysis and would be grateful if you could take a look: virtualchannel01 = label: {'source1'} time: {1x66 cell} trial: {1x66 cell} virtualchannel02 = label: {'source2'} time: {1x66 cell} trial: {1x66 cell} % append virtual channel datasets cfg = []; cfg.continuous = 'no'; data_both = ft_appenddata(cfg, virtualchannel01, virtualchannel02); % compute mvar analysis cfg = []; cfg.continuous = 'no'; cfg.toolbox = 'bsmart'; cfg.order = 5; cfg.channelcmb = ['source1'; 'source2']; mvardata = ft_mvaranalysis(cfg, data_both); *which outputs the following:* Warning: transposing channelcombination matrix > In ft_channelcombination (line 60) In ft_mvaranalysis (line 204) label = 'source1' 'source2' the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB preprocessing preprocessing trial 66 from 66 the call to "ft_preprocessing" took 0 seconds and required the additional allocation of an estimated 0 MB Index exceeds matrix dimensions. Error in ft_mvaranalysis (line 333) tmpcfg.toilim = timeaxis([begsample endsample]); I'm wondering where this error comes from - not sure how to go about fixing it. My present goal has been to practice these steps and experiment with connectivity analysis, and therefore the datasets I'm working with are relatively small - is it possible that's the issue here? Also, I wondered if FieldTrip (or the bsmart toolbox) offers any guidance on how to select a mvar model order, as I know this is an influential factor in Granger Causality. I've experimented with SIFT in the past and found their model-fitting guidance and validation very helpful - don't know if there's anything similar that's also compatible with FieldTrip. Once again, thanks for all your help!! Helen WIeffering Erika Nyhus Dept of Neuroscience Bowdoin College On Thu, Jul 30, 2015 at 5:08 PM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Helen, > > Yes, you can restrict yourself in the end to focus on a predefined > frequency band. Yet, for the computation, you need to compute the whole > frequency range. > Reason: for the parametric estimator, what’s in a name, you parametrize > the spectrum, so you get all frequencies for ‘free’. > for the non-parametric estimator, you need to whole spectrum to begin > with, in order to be able to decompose the cross-spectrum, using the > Wilson-Burg algorithm (as described in the 2008 Dhamala paper). > Best, > Jan-Mathijs > > > > On Jul 30, 2015, at 10:51 PM, Helen Wieffering > wrote: > > Hi Jan-Mathis, > > Thanks for your quick reply - this is very helpful. In fact, we've already > completed coherence measures on this data and pre-defined potential areas > of interest based on published literature - but we wanted to take that > further by looking into granger causality. > > I want to follow up on the first method you described (applying > ft_mvaranalysis to source-level data). We would like to limit our > connectivity analysis to the theta-band frequencies, which was why DICS > Beamformer was appealing. However, if I'm understanding correctly, the LCMV > filter is necessary for our connectivity analysis since granger causality > is computed in the time domain. I'm wondering, if we go back and compute > LCMV source reconstruction instead, will it be possible to later compute > granger causality for the specific frequencies we're studying? > > Thanks again! > > Helen Wieffering > Erika Nyhus > Dept. of Neuroscience > Bowdoin College > > On Thu, Jul 30, 2015 at 3:30 PM, Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl> wrote: > >> Dear Helen, >> >> There is no step-by-step guidance for this on the FieldTrip wiki. >> Personally, I would first go for a slightly less ambitious, i.e. not use >> Granger causality as the target connectivity measure, but first investigate >> the patterns in the data using plain good-old-fashioned (imaginary) >> coherence or so, which is a measure that can be easily computed given the >> pipeline you have executed so far. >> The estimation of Granger causality (in the frequency domain), or of one >> of its relatives such as PDC or DTF requires one of the following 2 >> approaches: >> >> -indeed you either need to get your spectral transfer matrix by >> parametric means, i.e. call ft_mvaranalysis (either on sensor-level or on >> source-level data), and proceed from there. If the coefficients are to be >> estimated on source-level data, you first need to apply a source >> reconstruction in the time domain, e.g. using an LCMV-beamformer, create a >> set of ‘virtual channels’ (there is some docu about this on the FT-wiki, I >> guess you will get there with the search term ‘virtual channel’. Once you >> are at the source level, you can either continue with ft_mvaranalysis on >> the virtual channel time courses, followed by ft_freqanalysis_mvar, >> followed by ft_connectivityanalysis, or you can follow the non-parametric >> route, where you would do an ft_freqanalysis (with ‘mtmfft’), followed by >> ft_connectivityanalysis. How this is done in practice is explained in one >> of the tutorials that are concerned with connectivity (in the example it is >> demonstrated with ‘channel’ data, but it would be straightforward to fool >> FieldTrip into swallowing ‘virtual channel’ data). A different route along >> the parametric-estimation path would be to fit the autoregressive model at >> the channel-level (in a PCA-reduced subspace), and project the coefficients >> of the model into source space. The idea behind this approach is explained >> and demonstrated in this paper: >> http://onlinelibrary.wiley.com/doi/10.1002/hbm.21482/full. >> -alternatively >> , >> you can estimate spectra non-parametrically (with mtmfft), and then compute >> a ‘broadband’ spatial filter with LCMV, using the covariance estimated from >> the same data epochs as the ones you will use for the spectral >> decomposition. Next, you can project the sensor level fourier-data into >> source space using the spatial filters (use cfg.keepfilter = ‘yes’ when >> calling ft_sourceanalysis) defined at your locations of interest. This is >> allowed because the spatial filtering is a linear step, as is the Fourier >> transformation, so the order of which shouldn’t matter for the result, >> although the computation may be more efficient in one order or the other. >> >> The difficult thing for you I guess would be a way to a priori define >> your locations of interest. This is an empirical question, but you could >> either use information from published literature, or preferably an >> experimental contrast from your data to identify regions-of-interest. >> >> Best wishes, >> >> Jan-Mathijs >> >> >> >> >> >> >> Jan-Mathijs Schoffelen, MD PhD, Senior researcher >> >> Max Planck Institute for Psycholinguistics >> Donders Centre for Cognitive Neuroimaging >> >> E-mail: j.schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> http://www.fieldtriptoolbox.org >> >> >> On Jul 30, 2015, at 8:31 PM, Helen Wieffering >> wrote: >> >> > Dear FieldTrip users, >> > >> > I am writing to ask for any available guidance on computing granger >> causality measures using ft_connectivity_analysis in FieldTrip. >> > >> > Our data comes from 128 EEG channels. So far we have: >> > - cleaned and preprocessed the data >> > - computed frequency analysis using 'mtmfft' at 6 Hz >> > - localized sources of 6hz activity to a normalized head model using >> Beamformer and method 'dics'. >> > >> > We would now like to compute connectivity analysis between the >> strongest sources, using granger causality. I have read through the >> FieldTrip tutorials, but am still not sure how to proceed. >> > >> > Mainly, my question is whether we should have first computed >> ft_mvaranalysis with our preprocessed data, and then done frequency >> analysis using cfg.method = 'mvar' and proceeded with source analysis >> (Beamformer) from there. Should we go back and complete those steps? I'm >> also wondering about the best method for selecting sources to use for >> connectivity analysis. >> > >> > If anyone has had success with this, I'd love to hear! >> > >> > Thanks in advance. >> > >> > Helen Wieffering >> > Erika Nyhus >> > Dept. of Neuroscience >> > Bowdoin College >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 6 20:59:03 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 6 Aug 2015 18:59:03 +0000 Subject: [FieldTrip] custer based non parametric permutation test for coherence difference In-Reply-To: References: Message-ID: Hi Ishita, I suggest that you search a bit through the archive of this discussion list, because your question has come up on several occasions in the past. Do you want to do statistics within a subject (unit-of-observation is trial), or across subjects (unit-of-observation is subject)? Another doubt I had was, it seems like I need some neighborhood information for doing the cluster analysis. If I wanted to cluster only in the time frequency grid and not spatially (I am using depth electrode data ) or I wanted the algorithm to find spatial clusters for me in the absence of prior knowledge, is that feasible if you specify cfg.neighbours = {}, the clustering will be done only in time and frequency. I don’t understand what you mean with ‘finding spatial clusters in the absence of prior knowledge’, but if you tell the function to not cluster in space, it will not do so :o). Best, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 6 21:03:18 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 6 Aug 2015 19:03:18 +0000 Subject: [FieldTrip] Granger Causality Analysis after Beamformer In-Reply-To: <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> Message-ID: <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> Hi Helen, forwarding to the list as well, Do you have an up-to-date version of FieldTrip? There were some issues regarding the error you get, but as far as I remember, these should have been resolved. I would start with downloading a new version. If the problem persists it could be that you need to ensure that the time axis of all trials is identical (and that all trials have the same number of samples). If the sample numbers match across trials, you could try data_both.time(2:end)=data_both.time(1): Best, Jan-Mathijs On Aug 6, 2015, at 4:50 PM, Helen Wieffering > wrote: Hi again, Jan-Mathijs- Thanks again for your help. I have been following your suggestion and so far completed LCMV Beamformer on two regions of interest and gone on to construct two virtual channels from there, according to the connectivity tutorial. However, I receive an error when I compute ft_mvaranalysis and would be grateful if you could take a look: virtualchannel01 = label: {'source1'} time: {1x66 cell} trial: {1x66 cell} virtualchannel02 = label: {'source2'} time: {1x66 cell} trial: {1x66 cell} % append virtual channel datasets cfg = []; cfg.continuous = 'no'; data_both = ft_appenddata(cfg, virtualchannel01, virtualchannel02); % compute mvar analysis cfg = []; cfg.continuous = 'no'; cfg.toolbox = 'bsmart'; cfg.order = 5; cfg.channelcmb = ['source1'; 'source2']; mvardata = ft_mvaranalysis(cfg, data_both); which outputs the following: Warning: transposing channelcombination matrix > In ft_channelcombination (line 60) In ft_mvaranalysis (line 204) label = 'source1' 'source2' the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB preprocessing preprocessing trial 66 from 66 the call to "ft_preprocessing" took 0 seconds and required the additional allocation of an estimated 0 MB Index exceeds matrix dimensions. Error in ft_mvaranalysis (line 333) tmpcfg.toilim = timeaxis([begsample endsample]); I'm wondering where this error comes from - not sure how to go about fixing it. My present goal has been to practice these steps and experiment with connectivity analysis, and therefore the datasets I'm working with are relatively small - is it possible that's the issue here? Also, I wondered if FieldTrip (or the bsmart toolbox) offers any guidance on how to select a mvar model order, as I know this is an influential factor in Granger Causality. I've experimented with SIFT in the past and found their model-fitting guidance and validation very helpful - don't know if there's anything similar that's also compatible with FieldTrip. Once again, thanks for all your help!! Helen WIeffering Erika Nyhus Dept of Neuroscience Bowdoin College On Thu, Jul 30, 2015 at 5:08 PM, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Helen, Yes, you can restrict yourself in the end to focus on a predefined frequency band. Yet, for the computation, you need to compute the whole frequency range. Reason: for the parametric estimator, what’s in a name, you parametrize the spectrum, so you get all frequencies for ‘free’. for the non-parametric estimator, you need to whole spectrum to begin with, in order to be able to decompose the cross-spectrum, using the Wilson-Burg algorithm (as described in the 2008 Dhamala paper). Best, Jan-Mathijs On Jul 30, 2015, at 10:51 PM, Helen Wieffering > wrote: Hi Jan-Mathis, Thanks for your quick reply - this is very helpful. In fact, we've already completed coherence measures on this data and pre-defined potential areas of interest based on published literature - but we wanted to take that further by looking into granger causality. I want to follow up on the first method you described (applying ft_mvaranalysis to source-level data). We would like to limit our connectivity analysis to the theta-band frequencies, which was why DICS Beamformer was appealing. However, if I'm understanding correctly, the LCMV filter is necessary for our connectivity analysis since granger causality is computed in the time domain. I'm wondering, if we go back and compute LCMV source reconstruction instead, will it be possible to later compute granger causality for the specific frequencies we're studying? Thanks again! Helen Wieffering Erika Nyhus Dept. of Neuroscience Bowdoin College On Thu, Jul 30, 2015 at 3:30 PM, Schoffelen, J.M. (Jan Mathijs) > wrote: Dear Helen, There is no step-by-step guidance for this on the FieldTrip wiki. Personally, I would first go for a slightly less ambitious, i.e. not use Granger causality as the target connectivity measure, but first investigate the patterns in the data using plain good-old-fashioned (imaginary) coherence or so, which is a measure that can be easily computed given the pipeline you have executed so far. The estimation of Granger causality (in the frequency domain), or of one of its relatives such as PDC or DTF requires one of the following 2 approaches: -indeed you either need to get your spectral transfer matrix by parametric means, i.e. call ft_mvaranalysis (either on sensor-level or on source-level data), and proceed from there. If the coefficients are to be estimated on source-level data, you first need to apply a source reconstruction in the time domain, e.g. using an LCMV-beamformer, create a set of ‘virtual channels’ (there is some docu about this on the FT-wiki, I guess you will get there with the search term ‘virtual channel’. Once you are at the source level, you can either continue with ft_mvaranalysis on the virtual channel time courses, followed by ft_freqanalysis_mvar, followed by ft_connectivityanalysis, or you can follow the non-parametric route, where you would do an ft_freqanalysis (with ‘mtmfft’), followed by ft_connectivityanalysis. How this is done in practice is explained in one of the tutorials that are concerned with connectivity (in the example it is demonstrated with ‘channel’ data, but it would be straightforward to fool FieldTrip into swallowing ‘virtual channel’ data). A different route along the parametric-estimation path would be to fit the autoregressive model at the channel-level (in a PCA-reduced subspace), and project the coefficients of the model into source space. The idea behind this approach is explained and demonstrated in this paper: http://onlinelibrary.wiley.com/doi/10.1002/hbm.21482/full. -alternatively, you can estimate spectra non-parametrically (with mtmfft), and then compute a ‘broadband’ spatial filter with LCMV, using the covariance estimated from the same data epochs as the ones you will use for the spectral decomposition. Next, you can project the sensor level fourier-data into source space using the spatial filters (use cfg.keepfilter = ‘yes’ when calling ft_sourceanalysis) defined at your locations of interest. This is allowed because the spatial filtering is a linear step, as is the Fourier transformation, so the order of which shouldn’t matter for the result, although the computation may be more efficient in one order or the other. The difficult thing for you I guess would be a way to a priori define your locations of interest. This is an empirical question, but you could either use information from published literature, or preferably an experimental contrast from your data to identify regions-of-interest. Best wishes, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org On Jul 30, 2015, at 8:31 PM, Helen Wieffering > wrote: > Dear FieldTrip users, > > I am writing to ask for any available guidance on computing granger causality measures using ft_connectivity_analysis in FieldTrip. > > Our data comes from 128 EEG channels. So far we have: > - cleaned and preprocessed the data > - computed frequency analysis using 'mtmfft' at 6 Hz > - localized sources of 6hz activity to a normalized head model using Beamformer and method 'dics'. > > We would now like to compute connectivity analysis between the strongest sources, using granger causality. I have read through the FieldTrip tutorials, but am still not sure how to proceed. > > Mainly, my question is whether we should have first computed ft_mvaranalysis with our preprocessed data, and then done frequency analysis using cfg.method = 'mvar' and proceeded with source analysis (Beamformer) from there. Should we go back and complete those steps? I'm also wondering about the best method for selecting sources to use for connectivity analysis. > > If anyone has had success with this, I'd love to hear! > > Thanks in advance. > > Helen Wieffering > Erika Nyhus > Dept. of Neuroscience > Bowdoin College > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Thu Aug 6 21:59:34 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 6 Aug 2015 21:59:34 +0200 Subject: [FieldTrip] Error in Cluster permutation tutorial? In-Reply-To: <1438871530409.50689@nin.knaw.nl> References: <1438871530409.50689@nin.knaw.nl> Message-ID: Hi Rajat, I was able to reproduce the problem. Would you please file a bug http://bugzilla.fieldtriptoolbox.org/ and we’ll take it from there. Thanks. Tzvetan > Dear FieldTrippers, > > I followed the tutorial on > http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics?s[]=cluster&s[]=permutation > > at the very end, I wanted to do the ft_clusterplot but then I did not get topoplots as a function of time as in the > tutorial and instead just got one plot. > > Is there something wrong in the way the parameters are set in the tutorial. > The last part is as follows: > % make a plot > cfg = []; > cfg.highlightsymbolseries = ['*','*','.','.','.']; > cfg.layout = 'CTF151.lay'; > cfg.contournum = 0; > cfg.markersymbol = '.'; > cfg.alpha = 0.05; > cfg.parameter='stat'; > cfg.zlim = [-5 5]; > ft_clusterplot(cfg,stat); > > Any input will be very helpful. > > Thanks. > > Rajat > > > Rajat Mani Thomas > Social Brain Lab > Netherlands Institute for Neuroscience > Amsterdam > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ervin.poljac at donders.ru.nl Thu Aug 6 23:59:16 2015 From: ervin.poljac at donders.ru.nl (Poljac, E. (Ervin)) Date: Thu, 6 Aug 2015 21:59:16 +0000 Subject: [FieldTrip] Undefined function or variable "lab" In-Reply-To: <77A6E025-667C-4255-BF8B-B22197BF3678@fcdonders.ru.nl> References: , <77A6E025-667C-4255-BF8B-B22197BF3678@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, Thanks for your answer, one of my colleagues indeed suggested that I should look at data.elec.label and it seems that there are two additional labels ('COMNT' and 'SCALE'. ), so after removing them, the ft_channelrepair function worked. Regards, Ervin -- Ervin Poljac, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition (DCC) Radboud University Nijmegen Room B.00.78A Montessorilaan 3 6500 HE Nijmegen T. 024 36 15457 ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Sent: Monday, August 03, 2015 9:56 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Undefined function or variable "lab" Hi Ervin, Given the information provided, it’s still hard to tell what might be going on. What version of FieldTrip are you using, and what does dataTarget.elec look like? What do your colleagues have to say about this? (The reason for the last question is, that they most likely have most hands-on experience with the quirks of the particular dataformat you are working with, and thus will be able to provide more specific input than the people who occasionally read posts on this list). Also, the statement that an ‘older version of fieldtrip works’ is quite unspecific (e.g. are your colleagues using a 2009-version of the code, or a more recent one :o)? Is there code totally unmodified, or did they made some code changes in order for it to work?), so I don’t think that this is going to bring you close to a solution. Yet, I think it is good diagnostic information to know that somewhere in the past ‘it’ seemed to work, either with or without local changes. Would it make sense for you to team up with your colleagues to find on what’s going on? Best, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org On Jul 31, 2015, at 2:00 PM, Poljac, E. (Ervin) > wrote: Anyone an idea of what might be wrong here? Much appreciated, Ervin ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Poljac, E. (Ervin) [ervin.poljac at donders.ru.nl] Sent: Monday, July 27, 2015 1:54 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Undefined function or variable "lab" Hello fieldtrippers, I am trying to prepare my EEG data for analysis. Among others, I identify bad channels and try to repair them. However, there is this annoying error: Undefined function or variable "lab". Error in channelposition (line 314) n = size(lab,2); Error in ft_datatype_sens (line 329) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_raw (line 146) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 225) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_channelrepair (line 102) data = ft_checkdata(data, 'datatype', 'raw', 'feedback', 'yes'); In the debug mode I see that the variable 'sens' has a correct value, the bad channel seems to be identified, but then for some reason, lab is not filled. I am copy-pasting that part of my code below. I hope someone has experience with this and how to solve it. Some of my colleagues use an older fieldtrip version that works (so, no error there), and I compared the filein s ft_checkdata, ft_datatype_sens and ft_datatype_sens, they are different, but it is not obvious to me what exactly is new, causing the error. Many thanks, Ervin My code: %% channel rejection, identifying bad channels for target condition cfg=[]; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = [50];% frequency band - foilim or just foi?? rejectedData=ft_freqanalysis(cfg,dataTarget); idx=unique([find(rejectedData.powspctrm>0.5*10^4)]); %this threshold might change for each recording neighbours=open('/Users/Ervin/Documents/MATLAB/biosemi64_neighb.mat'); neighbours=neighbours.neighbours; cfg = []; cfg.channel = rejectedData.label; cfg.layout = 'biosemi64.lay'; cfg.feedback = 'yes'; lay = ft_prepare_layout(cfg); if ~isempty(idx) badchannels=cell(numel(idx),1); [badchannels{1:numel(idx),1}] = deal(rejectedData.label{idx}); % Interpolation for rejected channels cfg=[]; cfg.layout=lay; cfg.badchannel=badchannels; dataTarget.elec.label = dataTarget.label; dataTarget.elec.pnt = lay.pos; cfg.neighbours=neighbours; dataTargetRepaired=ft_channelrepair(cfg, dataTarget); end -- Ervin Poljac, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition (DCC) Radboud University Nijmegen Room B.00.78A Montessorilaan 3 6500 HE Nijmegen T. 024 36 15457 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.wieffering at gmail.com Fri Aug 7 16:27:32 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Fri, 7 Aug 2015 10:27:32 -0400 Subject: [FieldTrip] Granger Causality Analysis after Beamformer In-Reply-To: <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> Message-ID: Thanks, Jan-Mathijs, you were correct about the error being related to sample info. After creating virtualchannel01 and virtualchannel02, I simply added the two lines below: virtualchannel01.fsample = 250; virtualchannel02.fsample = 250; Appending the datasets and computing ft_mvaranalysis has worked smoothly from there! Best, Helen -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaitanya.pro at gmail.com Fri Aug 7 16:38:32 2015 From: chaitanya.pro at gmail.com (Chaitanya Srinivas) Date: Fri, 7 Aug 2015 20:08:32 +0530 Subject: [FieldTrip] [k p or eoz] Granger Causality Analysis after Beamformer In-Reply-To: References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> Message-ID: Hhhhyybhrbyghh r ttttttttrzl sxs. Essssssse ssssss -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Aug 7 16:41:55 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 7 Aug 2015 14:41:55 +0000 Subject: [FieldTrip] Granger Causality Analysis after Beamformer In-Reply-To: References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> Message-ID: <3229622B-91FB-48B8-B840-CEC216230893@fcdonders.ru.nl> Hi Helen, I am glad it works now. Thanks for letting us know. Best wishes, Jan-Mathijs On Aug 7, 2015, at 4:27 PM, Helen Wieffering wrote: > Thanks, Jan-Mathijs, you were correct about the error being related to sample info. > > After creating virtualchannel01 and virtualchannel02, I simply added the two lines below: > virtualchannel01.fsample = 250; > virtualchannel02.fsample = 250; > > Appending the datasets and computing ft_mvaranalysis has worked smoothly from there! > > Best, > Helen > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From spa268 at nyu.edu Fri Aug 7 16:43:51 2015 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Fri, 7 Aug 2015 18:43:51 +0400 Subject: [FieldTrip] Error in Cluster permutation tutorial? Message-ID: FYI, I'm pretty sure the corresponding sample code at http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock is also several years out of date (I remember having problems with it in the past, it seems to be from before ft_clusterplot() existed, as it's just using ft_topoplotER). Of course I am as much to blame as anyone for not updating it. But if someone is going to update the other page then maybe this one can be done as well; I can take a crack at it if no one picks it up on bugzilla. Also, is it just me or is http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics#permutation_test_based_on_cluster_statistics essentially duplicating (with what looks like a more recent example and code) what's in http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock ? Would it be worthwhile to reconcile these two (and maybe replace one with a link to the other, so they don't get out of sync again)? Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ On Fri, Aug 7, 2015 at 2:00 PM, wrote: > > Message: 1 > Date: Thu, 6 Aug 2015 14:32:10 +0000 > From: Rajat Thomas > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Error in Cluster permutation tutorial? > Message-ID: <1438871530409.50689 at nin.knaw.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Dear FieldTrippers, > > > I followed the tutorial on > > > http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics?s[]=cluster&s[]=permutation > > at the very end, I wanted to do the ft_clusterplot but then I did not get > topoplots as a function of time as in the > tutorial and instead just got one plot. > > Is there something wrong in the way the parameters are set in the tutorial. > The last part is as follows: > > % make a plot > cfg = []; > cfg.highlightsymbolseries = ['*','*','.','.','.']; > cfg.layout = 'CTF151.lay'; > cfg.contournum = 0; > cfg.markersymbol = '.'; > cfg.alpha = 0.05; > cfg.parameter='stat'; > cfg.zlim< > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/zlim.html> = > [-5 5]; > ft_clusterplot(cfg,stat); > > Any input will be very helpful. > > Thanks. > > Rajat > > > Rajat Mani Thomas > Social Brain Lab > Netherlands Institute for Neuroscience > Amsterdam > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel.haehnke at lrz.tu-muenchen.de Wed Aug 12 14:30:46 2015 From: daniel.haehnke at lrz.tu-muenchen.de (=?utf-8?Q?Daniel_H=C3=A4hnke?=) Date: Wed, 12 Aug 2015 14:30:46 +0200 Subject: [FieldTrip] ft_spiketriggeredaverage & cfg.latency Message-ID: Dear FieldTrip community, I want to compute the spike triggered average at various epochs of a trial. I want to use ft_spiketriggeredaverage and cfg.latency for that (cfg.latency would specify the epoch). However, while cfg.latency is still in the help and the code of ft_spiketriggeredaverage, it seems like it is not supported anymore. I could of course simply cut out the epochs I am interested in and then run ft_spiketriggeredaverage on that, but I would miss LFPs at the edges of the epochs: e.g. if my STA is from -0.1 to 0.1 with respect to a spike and my epoch is from 1 to 1.5, I would only be able to incorporate LFPs from 1.1 to 1.4. Can anyone think of a workaround for this problem? Cheers, Daniel -- Technische Universität München Daniel Hähnke Institute of Neuroscience Translational NeuroCognition Laboratory Biedersteiner Straße 29, Bau 601 D-80802 München Tel.: +49 89 4140 3356 daniel.haehnke at lrz.tum.de www.ifn.me.tum.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From jk604 at cam.ac.uk Wed Aug 12 18:24:52 2015 From: jk604 at cam.ac.uk (Jana Klimova) Date: Wed, 12 Aug 2015 17:24:52 +0100 Subject: [FieldTrip] Error using ft_multiplotER (line 553), labels in data and labels in layout do not match Message-ID: <55CB7354.8030602@cam.ac.uk> Hello, I am using Fieldtrip interactive plotting under MEEGtools in SPM12 toolbox in MATLAB to plot ERP topography over a period of interest. It's working fine for magnetometers (MEG modality) but when I choose MEGCOMB modality, I get an error: 'Error using ft_multiplotER (line 553) labels in data and labels in layout do not match'. Has anyone got this error before and managed to figure out what's wrong? If I want to plot the same data using display function in SPM, I don't have any problems with MEGCOMB modality. It just doesn't allow me to average over time, that's why I decided to use Fieldtrip functions. Thanks a lot in advance for any suggestions. Kind regards, Jana From stephen.whitmarsh at ki.se Wed Aug 12 20:40:18 2015 From: stephen.whitmarsh at ki.se (Stephen Whitmarsh) Date: Wed, 12 Aug 2015 18:40:18 +0000 Subject: [FieldTrip] Error using ft_multiplotER (line 553), labels in data and labels in layout do not match In-Reply-To: <55CB7354.8030602@cam.ac.uk> References: <55CB7354.8030602@cam.ac.uk> Message-ID: Hi Jana, You'll need to have combined gradiometers in your data to be able to plot them. Use ft_combineplanar for that. Cheers, Stephen ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Jana Klimova [jk604 at cam.ac.uk] Sent: 12 August 2015 18:24 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Error using ft_multiplotER (line 553), labels in data and labels in layout do not match Hello, I am using Fieldtrip interactive plotting under MEEGtools in SPM12 toolbox in MATLAB to plot ERP topography over a period of interest. It's working fine for magnetometers (MEG modality) but when I choose MEGCOMB modality, I get an error: 'Error using ft_multiplotER (line 553) labels in data and labels in layout do not match'. Has anyone got this error before and managed to figure out what's wrong? If I want to plot the same data using display function in SPM, I don't have any problems with MEGCOMB modality. It just doesn't allow me to average over time, that's why I decided to use Fieldtrip functions. Thanks a lot in advance for any suggestions. Kind regards, Jana _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From plyons at udel.edu Wed Aug 12 22:35:26 2015 From: plyons at udel.edu (Peter Lyons) Date: Wed, 12 Aug 2015 16:35:26 -0400 Subject: [FieldTrip] (no subject) Message-ID: Hello Everyone, I'm working on a cluster-based permutation analysis on time-frequency EEG data. I was able to successfully run the ft_freqstatistics function after computing the grand average (ft_freqgrandaverage) for my two independent groups. I am, however, struggling with viewing the topography of my cluster output using the ft_clusterplot function. I suspect the case may be that I am missing a time dimension in my data set based on this error message that I received: "Attempted to access stat.time(15); index out of bounds because numel(stat.time)=0. Error in ft_clusterplot (line 248) time_perclus = [stat.time(ind_min) stat.time(ind_max)];" Is there a viable way to use the ft_clusterplot if the dimensions contained in my data set is "chan_freq"? Or, is there an alternative plotting function that would work just as well or better? I would greatly appreciate any assistance with this. Thank you! Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From samane.shojaie at gmail.com Thu Aug 13 07:21:10 2015 From: samane.shojaie at gmail.com (Seyedeh Samane Shojaei) Date: Thu, 13 Aug 2015 13:21:10 +0800 Subject: [FieldTrip] problem in pre-processing stage Message-ID: Dear all, I am a new user of FieldTrip, I got problem at the first stage of reading data. I am using Matlab R2011a, windows 7, 64 bit. when I run my code, the following problem appears: addpath('FielTrip\fieldtrip-lite-20150810\fieldtrip-20150810') addpath('FielTrip\Tutorial\ArtifactRemoval\ArtifactRemoval.ds') ft_defaults % ft_preprocessing of example dataset cfg = []; cfg.dataset = 'ArtifactRemoval.ds'; cfg.trialdef.eventtype = 'trial'; cfg = ft_definetrial(cfg); Warning: could not determine filetype of ArtifactRemoval.ds > In ft_filetype at 1221 In utilities\private\dataset2files at 42 In ft_checkconfig at 541 In ft_definetrial at 128 In ICAremoveEOG at 9 Warning: no trialfun was specified, using ft_trialfun_general > In ft_definetrial at 135 In ICAremoveEOG at 9 evaluating trialfunction 'ft_trialfun_general' ??? Error using ==> ft_read_header at 2053 unsupported header format (unknown) Error in ==> ft_trialfun_general at 78 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 174 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> ICAremoveEOG at 9 cfg = ft_definetrial(cfg); It is appreciated if you could help me. Regards, Samane -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomitbeker at gmail.com Thu Aug 13 07:59:04 2015 From: shlomitbeker at gmail.com (Shlomit Beker) Date: Thu, 13 Aug 2015 08:59:04 +0300 Subject: [FieldTrip] problem in pre-processing stage In-Reply-To: References: Message-ID: Double check the name and path defined in your script, that refer to your data. It tends to cause this kind of error. ‫ב-13 באוג 2015, בשעה 08:21, ‏Seyedeh Samane Shojaei כתב/ה:‬ > Dear all, > > I am a new user of FieldTrip, I got problem at the first stage of reading data. I am using Matlab R2011a, windows 7, 64 bit. when I run my code, the following problem appears: > > addpath('FielTrip\fieldtrip-lite-20150810\fieldtrip-20150810') > addpath('FielTrip\Tutorial\ArtifactRemoval\ArtifactRemoval.ds') > ft_defaults > % ft_preprocessing of example dataset > cfg = []; > cfg.dataset = 'ArtifactRemoval.ds'; > cfg.trialdef.eventtype = 'trial'; > cfg = ft_definetrial(cfg); > > Warning: could not determine filetype of ArtifactRemoval.ds > > In ft_filetype at 1221 > In utilities\private\dataset2files at 42 > In ft_checkconfig at 541 > In ft_definetrial at 128 > In ICAremoveEOG at 9 > Warning: no trialfun was specified, using ft_trialfun_general > > In ft_definetrial at 135 > In ICAremoveEOG at 9 > evaluating trialfunction 'ft_trialfun_general' > ??? Error using ==> ft_read_header at 2053 > unsupported header format (unknown) > > Error in ==> ft_trialfun_general at 78 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 174 > [trl, event] = feval(cfg.trialfun, cfg); > > Error in ==> ICAremoveEOG at 9 > cfg = ft_definetrial(cfg); > > It is appreciated if you could help me. > Regards, > Samane > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at ki.se Thu Aug 13 08:04:22 2015 From: stephen.whitmarsh at ki.se (Stephen Whitmarsh) Date: Thu, 13 Aug 2015 06:04:22 +0000 Subject: [FieldTrip] problem in pre-processing stage In-Reply-To: References: Message-ID: Hi Seyede, Have you tried providing the full path to the dataset, e.g. cfg.dataset = 'C:/data/MEG/ArtifactRemoval.ds'? Adding the dataset directory to the path as you did, doesn't make those files accessible to MATLAB when loading data etc. I would remove that. If its still doesn't work, try to work through the initial steps here, and see where it breaks: http://www.fieldtriptoolbox.org/getting_started/ctf Cheers, Stephen P.s. Of course you could run your script from the dataset directory but this is *highly* discouraged and will result in problems further down the line. ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Seyedeh Samane Shojaei [samane.shojaie at gmail.com] Sent: 13 August 2015 07:21 To: fieldtrip at science.ru.nl Subject: [FieldTrip] problem in pre-processing stage Dear all, I am a new user of FieldTrip, I got problem at the first stage of reading data. I am using Matlab R2011a, windows 7, 64 bit. when I run my code, the following problem appears: addpath('FielTrip\fieldtrip-lite-20150810\fieldtrip-20150810') addpath('FielTrip\Tutorial\ArtifactRemoval\ArtifactRemoval.ds') ft_defaults % ft_preprocessing of example dataset cfg = []; cfg.dataset = 'ArtifactRemoval.ds'; cfg.trialdef.eventtype = 'trial'; cfg = ft_definetrial(cfg); Warning: could not determine filetype of ArtifactRemoval.ds > In ft_filetype at 1221 In utilities\private\dataset2files at 42 In ft_checkconfig at 541 In ft_definetrial at 128 In ICAremoveEOG at 9 Warning: no trialfun was specified, using ft_trialfun_general > In ft_definetrial at 135 In ICAremoveEOG at 9 evaluating trialfunction 'ft_trialfun_general' ??? Error using ==> ft_read_header at 2053 unsupported header format (unknown) Error in ==> ft_trialfun_general at 78 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 174 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> ICAremoveEOG at 9 cfg = ft_definetrial(cfg); It is appreciated if you could help me. Regards, Samane -------------- next part -------------- An HTML attachment was scrubbed... URL: From samane.shojaie at gmail.com Thu Aug 13 08:21:47 2015 From: samane.shojaie at gmail.com (Seyedeh Samane Shojaei) Date: Thu, 13 Aug 2015 14:21:47 +0800 Subject: [FieldTrip] problem in pre-processing stage In-Reply-To: References: Message-ID: Dear Stephen, It is solved when I provided the full path to the dataset. Thanks a lot, Samane On Thu, Aug 13, 2015 at 2:04 PM, Stephen Whitmarsh wrote: > Hi Seyede, > > Have you tried providing the full path to the dataset, e.g. cfg.dataset = > 'C:/data/MEG/ArtifactRemoval.ds'? > Adding the dataset directory to the path as you did, doesn't make those > files accessible to MATLAB when loading data etc. I would remove that. > > If its still doesn't work, try to work through the initial steps here, and > see where it breaks: > http://www.fieldtriptoolbox.org/getting_started/ctf > > Cheers, > Stephen > > P.s. Of course you could run your script from the dataset directory but > this is *highly* discouraged and will result in problems further down the > line. > > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Seyedeh Samane Shojaei [samane.shojaie at gmail.com] > *Sent:* 13 August 2015 07:21 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] problem in pre-processing stage > > Dear all, > > I am a new user of FieldTrip, I got problem at the first stage of reading > data. I am using Matlab R2011a, windows 7, 64 bit. when I run my code, the > following problem appears: > > addpath('FielTrip\fieldtrip-lite-20150810\fieldtrip-20150810') > addpath('FielTrip\Tutorial\ArtifactRemoval\ArtifactRemoval.ds') > ft_defaults > % ft_preprocessing of example dataset > cfg = []; > cfg.dataset = 'ArtifactRemoval.ds'; > cfg.trialdef.eventtype = 'trial'; > cfg = ft_definetrial(cfg); > > Warning: could not determine filetype of ArtifactRemoval.ds > > In ft_filetype at 1221 > In utilities\private\dataset2files at 42 > In ft_checkconfig at 541 > In ft_definetrial at 128 > In ICAremoveEOG at 9 > Warning: no trialfun was specified, using ft_trialfun_general > > In ft_definetrial at 135 > In ICAremoveEOG at 9 > evaluating trialfunction 'ft_trialfun_general' > ??? Error using ==> ft_read_header at 2053 > unsupported header format (unknown) > > Error in ==> ft_trialfun_general at 78 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 174 > [trl, event] = feval(cfg.trialfun, cfg); > > Error in ==> ICAremoveEOG at 9 > cfg = ft_definetrial(cfg); > > It is appreciated if you could help me. > Regards, > Samane > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From krisappel at uos.de Thu Aug 13 10:32:35 2015 From: krisappel at uos.de (Kristoffer Appel) Date: Thu, 13 Aug 2015 10:32:35 +0200 Subject: [FieldTrip] EEG source localization: ft_sourcegrandaverage does not keep individual data Message-ID: <55CC5623.2090100@uos.de> Hi all, I analyze data from an EEG experiment. Within-subject design, 8 subjects each produced trial data in two conditions. I have used ft_sourceanalysis on the data from ft_freqanalysis for obtaining the source data for each subject and each conditon, which works (at least ft_sourceplot shows something which seems to make sense). I use ft_sourcegrandaverage on the data of one condition of all 8 subjects, and a grand average is computed. So far, so good. But: I specify cfg.keepindividual = 'yes'; However, the single subject data are not kept, so I can't use ft_sourcestatistics. What could I have done wrong? Kind regards Kristoffer -- Kristoffer Appel, M.Sc. Institut für Kognitionswissenschaft Universität Osnabrück Albrechtstraße 28, 49076 Osnabrück Raum: 31/405 Tel: +49-541-969-7090, Fax:+49-541-969-2246 Email: krisappel at uos.de From julian.keil at gmail.com Thu Aug 13 10:40:15 2015 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 13 Aug 2015 10:40:15 +0200 Subject: [FieldTrip] EEG source localization: ft_sourcegrandaverage does not keep individual data In-Reply-To: <55CC5623.2090100@uos.de> References: <55CC5623.2090100@uos.de> Message-ID: Hi Kristoffer, you don't have to average over subjects before computing the statistics. You can feed a cell structure with your source-level data into the ft_sourcestatistics function. E.g. stats = ft_sourcestatistics(cfg,data1{:},data2{:}) Good Luck Julian Am 13.08.2015 um 10:32 schrieb Kristoffer Appel: > Hi all, > > I analyze data from an EEG experiment. Within-subject design, 8 subjects each produced trial data in two conditions. > > I have used ft_sourceanalysis on the data from ft_freqanalysis for obtaining the source data for each subject and each conditon, which works (at least ft_sourceplot shows something which seems to make sense). > > I use ft_sourcegrandaverage on the data of one condition of all 8 subjects, and a grand average is computed. So far, so good. > > But: > I specify cfg.keepindividual = 'yes'; > However, the single subject data are not kept, so I can't use ft_sourcestatistics. > > What could I have done wrong? > > Kind regards > Kristoffer > > > > > -- > Kristoffer Appel, M.Sc. > > Institut für Kognitionswissenschaft > Universität Osnabrück > Albrechtstraße 28, 49076 Osnabrück > Raum: 31/405 > Tel: +49-541-969-7090, Fax:+49-541-969-2246 > Email: krisappel at uos.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From krisappel at uos.de Thu Aug 13 14:03:46 2015 From: krisappel at uos.de (Kristoffer Appel) Date: Thu, 13 Aug 2015 14:03:46 +0200 Subject: [FieldTrip] EEG source localization: ft_sourcegrandaverage does not keep individual data In-Reply-To: References: <55CC5623.2090100@uos.de> Message-ID: <55CC87A2.2070005@uos.de> Hi Julian, thank you. Seems to work! Cheers Kristoffer On 08/13/2015 10:40 AM, Julian Keil wrote: > Hi Kristoffer, > > you don't have to average over subjects before computing the statistics. > You can feed a cell structure with your source-level data into the ft_sourcestatistics function. > E.g. stats = ft_sourcestatistics(cfg,data1{:},data2{:}) > > Good Luck > > Julian > > Am 13.08.2015 um 10:32 schrieb Kristoffer Appel: > >> Hi all, >> >> I analyze data from an EEG experiment. Within-subject design, 8 subjects each produced trial data in two conditions. >> >> I have used ft_sourceanalysis on the data from ft_freqanalysis for obtaining the source data for each subject and each conditon, which works (at least ft_sourceplot shows something which seems to make sense). >> >> I use ft_sourcegrandaverage on the data of one condition of all 8 subjects, and a grand average is computed. So far, so good. >> >> But: >> I specify cfg.keepindividual = 'yes'; >> However, the single subject data are not kept, so I can't use ft_sourcestatistics. >> >> What could I have done wrong? >> >> Kind regards >> Kristoffer >> >> >> >> >> -- >> Kristoffer Appel, M.Sc. >> >> Institut für Kognitionswissenschaft >> Universität Osnabrück >> Albrechtstraße 28, 49076 Osnabrück >> Raum: 31/405 >> Tel: +49-541-969-7090, Fax:+49-541-969-2246 >> Email: krisappel at uos.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Kristoffer Appel, M.Sc. Institut für Kognitionswissenschaft Universität Osnabrück Albrechtstraße 28, 49076 Osnabrück Raum: 31/405 Tel: +49-541-969-7090, Fax:+49-541-969-2246 Email: krisappel at uos.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 13 14:13:27 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 13 Aug 2015 12:13:27 +0000 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <2CBD4370-2E33-4C78-9016-368FA21F4B57@fcdonders.ru.nl> Hi Peter, I cannot reproduce your problem. Are you using the latest version of fieldtrip. I very recently fixed a bug in ft_clusterplot, which could well explain your problem. If you are actually using the most recent FT-version, then my change might have introduced a bug :o). Best, Jan-Mathijs On Aug 12, 2015, at 10:35 PM, Peter Lyons wrote: > Hello Everyone, > > I'm working on a cluster-based permutation analysis on time-frequency EEG data. I was able to successfully run the ft_freqstatistics function after computing the grand average (ft_freqgrandaverage) for my two independent groups. > > I am, however, struggling with viewing the topography of my cluster output using the ft_clusterplot function. I suspect the case may be that I am missing a time dimension in my data set based on this error message that I received: > > "Attempted to access stat.time(15); index out of bounds because numel(stat.time)=0. > > Error in ft_clusterplot (line 248) > time_perclus = [stat.time(ind_min) stat.time(ind_max)];" > > > Is there a viable way to use the ft_clusterplot if the dimensions contained in my data set is "chan_freq"? > > Or, is there an alternative plotting function that would work just as well or better? > > I would greatly appreciate any assistance with this. > > Thank you! > > Peter > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From plyons at udel.edu Thu Aug 13 17:54:23 2015 From: plyons at udel.edu (Peter Lyons) Date: Thu, 13 Aug 2015 11:54:23 -0400 Subject: [FieldTrip] (no subject) In-Reply-To: <2CBD4370-2E33-4C78-9016-368FA21F4B57@fcdonders.ru.nl> References: <2CBD4370-2E33-4C78-9016-368FA21F4B57@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, I believe you may be correct. The error I had received was from a recent Fieldtrip download (20150810). I ran my script again on an older version (20150522) I have installed on another computer and the plot came out great. Thanks again for your help! Peter On Thu, Aug 13, 2015 at 8:13 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Peter, > I cannot reproduce your problem. Are you using the latest version of > fieldtrip. I very recently fixed a bug in ft_clusterplot, which could well > explain your problem. If you are actually using the most recent FT-version, > then my change might have introduced a bug :o). > > Best, > Jan-Mathijs > > On Aug 12, 2015, at 10:35 PM, Peter Lyons wrote: > > > Hello Everyone, > > > > I'm working on a cluster-based permutation analysis on time-frequency > EEG data. I was able to successfully run the ft_freqstatistics function > after computing the grand average (ft_freqgrandaverage) for my two > independent groups. > > > > I am, however, struggling with viewing the topography of my cluster > output using the ft_clusterplot function. I suspect the case may be that I > am missing a time dimension in my data set based on this error message that > I received: > > > > "Attempted to access stat.time(15); index out of bounds because > numel(stat.time)=0. > > > > Error in ft_clusterplot (line 248) > > time_perclus = [stat.time(ind_min) stat.time(ind_max)];" > > > > > > Is there a viable way to use the ft_clusterplot if the dimensions > contained in my data set is "chan_freq"? > > > > Or, is there an alternative plotting function that would work just as > well or better? > > > > I would greatly appreciate any assistance with this. > > > > Thank you! > > > > Peter > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 13 18:49:59 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 13 Aug 2015 16:49:59 +0000 Subject: [FieldTrip] (no subject) In-Reply-To: References: <2CBD4370-2E33-4C78-9016-368FA21F4B57@fcdonders.ru.nl> Message-ID: Hi Peter, https://code.google.com/p/fieldtrip/source/browse/trunk/ft_clusterplot.m My change was dated the 11th (see the above link). I believe that you just had the bad luck to have an FT copy that had a bug in it. I suggest to upgrade to the 20150812 version (just to be sure). Best, Jan-Mathijs On Aug 13, 2015, at 5:54 PM, Peter Lyons > wrote: Hi Jan-Mathijs, I believe you may be correct. The error I had received was from a recent Fieldtrip download (20150810). I ran my script again on an older version (20150522) I have installed on another computer and the plot came out great. Thanks again for your help! Peter On Thu, Aug 13, 2015 at 8:13 AM, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Peter, I cannot reproduce your problem. Are you using the latest version of fieldtrip. I very recently fixed a bug in ft_clusterplot, which could well explain your problem. If you are actually using the most recent FT-version, then my change might have introduced a bug :o). Best, Jan-Mathijs On Aug 12, 2015, at 10:35 PM, Peter Lyons > wrote: > Hello Everyone, > > I'm working on a cluster-based permutation analysis on time-frequency EEG data. I was able to successfully run the ft_freqstatistics function after computing the grand average (ft_freqgrandaverage) for my two independent groups. > > I am, however, struggling with viewing the topography of my cluster output using the ft_clusterplot function. I suspect the case may be that I am missing a time dimension in my data set based on this error message that I received: > > "Attempted to access stat.time(15); index out of bounds because numel(stat.time)=0. > > Error in ft_clusterplot (line 248) > time_perclus = [stat.time(ind_min) stat.time(ind_max)];" > > > Is there a viable way to use the ft_clusterplot if the dimensions contained in my data set is "chan_freq"? > > Or, is there an alternative plotting function that would work just as well or better? > > I would greatly appreciate any assistance with this. > > Thank you! > > Peter > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mick.lehmann at uzh.ch Fri Aug 14 15:40:33 2015 From: mick.lehmann at uzh.ch (Mick Lehmann) Date: Fri, 14 Aug 2015 15:40:33 +0200 Subject: [FieldTrip] Baseline Correction using 'relchange' or 'db' In-Reply-To: References: Message-ID: <251EF6AA-DC11-417E-B190-D4191F2FB2A5@uzh.ch> Dear Stephan and Anne, sorry that it took me so long. It was the main issue that the cfg was set too late and the cfg-settings were only defined for the following condition. Therefore, only one condition was baseline corrected while the other wasn't. This resulted in weird statistical analyses while the figures were fine since the baseline correction was applied in ft_multiplitTFR. Thank you very much for reading the script so carefully! All the best, Mick -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at ki.se Fri Aug 14 16:41:42 2015 From: stephen.whitmarsh at ki.se (Stephen Whitmarsh) Date: Fri, 14 Aug 2015 14:41:42 +0000 Subject: [FieldTrip] Baseline Correction using 'relchange' or 'db' In-Reply-To: <251EF6AA-DC11-417E-B190-D4191F2FB2A5@uzh.ch> References: , <251EF6AA-DC11-417E-B190-D4191F2FB2A5@uzh.ch> Message-ID: Great new Mick, good luck with the study! Stephen ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Mick Lehmann [mick.lehmann at uzh.ch] Sent: 14 August 2015 15:40 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Baseline Correction using 'relchange' or 'db' Dear Stephan and Anne, sorry that it took me so long. It was the main issue that the cfg was set too late and the cfg-settings were only defined for the following condition. Therefore, only one condition was baseline corrected while the other wasn't. This resulted in weird statistical analyses while the figures were fine since the baseline correction was applied in ft_multiplitTFR. Thank you very much for reading the script so carefully! All the best, Mick -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Sat Aug 15 11:43:55 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Sat, 15 Aug 2015 09:43:55 +0000 (UTC) Subject: [FieldTrip] realtime TMS-EEG In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB51857F@exprd01.hosting.ru.nl> References: <3D00B7615FB58D46A0B49B9AD67A33EB51857F@exprd01.hosting.ru.nl> Message-ID: <1567462124.2919460.1439631835989.JavaMail.yahoo@mail.yahoo.com> Hi, Thank you for answering my question. Sorry for my late reply.Actually it is work. I forgot to add the ft_defaults in matlab.I manage to view the signal.However,  the EEG signal is not moving in the plot. It only shows the last signal before stop. I mean it is realtime so I supposed to see the movement of the signal.What should I do in this matter? Thank you. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 On Tuesday, August 4, 2015 5:59 PM, "Herring, J.D. (Jim)" wrote: #yiv6304201544 #yiv6304201544 -- _filtered #yiv6304201544 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv6304201544 {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;} _filtered #yiv6304201544 {font-family:SimSun;panose-1:2 1 6 0 3 1 1 1 1 1;} _filtered #yiv6304201544 {font-family:SimSun;panose-1:2 1 6 0 3 1 1 1 1 1;} _filtered #yiv6304201544 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv6304201544 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;} _filtered #yiv6304201544 {panose-1:2 1 6 0 3 1 1 1 1 1;}#yiv6304201544 #yiv6304201544 p.yiv6304201544MsoNormal, #yiv6304201544 li.yiv6304201544MsoNormal, #yiv6304201544 div.yiv6304201544MsoNormal {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}#yiv6304201544 a:link, #yiv6304201544 span.yiv6304201544MsoHyperlink {color:blue;text-decoration:underline;}#yiv6304201544 a:visited, #yiv6304201544 span.yiv6304201544MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv6304201544 span.yiv6304201544EmailStyle17 {color:#1F497D;}#yiv6304201544 .yiv6304201544MsoChpDefault {font-size:10.0pt;} _filtered #yiv6304201544 {margin:72.0pt 72.0pt 72.0pt 72.0pt;}#yiv6304201544 div.yiv6304201544WordSection1 {}#yiv6304201544 _filtered #yiv6304201544 {} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;}#yiv6304201544 ol {margin-bottom:0cm;}#yiv6304201544 ul {margin-bottom:0cm;}#yiv6304201544 Dear Wan,   Please have a look at this page:http://www.fieldtriptoolbox.org/development/realtime (also specific to TMSi:http://www.fieldtriptoolbox.org/development/realtime/tmsi) The pages might not be fully up to date but they should help you get started. If you then run into problems please help us help you by supplying the following:   § The cfg you used § The fields of your data structure § The line you called that gave an error / that you would like to ask a question on § The exact error message you got   Best,   Jim       From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl]On Behalf Of wan amirah Wan azlan Sent: dinsdag 4 augustus 2015 11:32 To: fieldtrip at science.ru.nl Subject: [FieldTrip] realtime TMS-EEG   Hi,   I'm using TMSI Porti and I want to record the data in realtime. However, it is not working when I used the ft_realtime_signalviewer. Does I miss any step?  Any solution guys?   Thanks.   Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Sat Aug 15 19:02:34 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Sat, 15 Aug 2015 19:02:34 +0200 Subject: [FieldTrip] holes in head Message-ID: Dear Fieldtrip community, When plotting the head shape with ft_volumerealign (the input to the ft_volumerealign function being simpy the output produced by the ft_read_mri), some of the subjects show deep crater-like holes in the head surface. Images available here: https://goo.gl/photos/txeai9EfFXCn4hQ17 Does anyone have an idea what might have caused these 'holes'? If this is incomplete information to be able to answer the question, please ask so I can provide further details. Best wishes, Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Sun Aug 16 10:55:16 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Sun, 16 Aug 2015 08:55:16 +0000 (UTC) Subject: [FieldTrip] tmsidriver Message-ID: <956939491.3228363.1439715316045.JavaMail.yahoo@mail.yahoo.com> Hi, >From what I understand, to able to create the realtime EEg using TMSi porti is by opening the tmsidriver.exe. Is this correct? If so, where can I find it in the toolbox? because  I do not found the tmsidriver.exe.thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Sun Aug 16 11:16:08 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Sun, 16 Aug 2015 09:16:08 +0000 (UTC) Subject: [FieldTrip] tmsidriver In-Reply-To: <956939491.3228363.1439715316045.JavaMail.yahoo@mail.yahoo.com> References: <956939491.3228363.1439715316045.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1587713174.3378746.1439716568760.JavaMail.yahoo@mail.yahoo.com> Hi, I already found the driver.But why the screen is all black? Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 On Sunday, August 16, 2015 4:55 PM, wan amirah Wan azlan wrote: Hi, >From what I understand, to able to create the realtime EEg using TMSi porti is by opening the tmsidriver.exe. Is this correct? If so, where can I find it in the toolbox? because  I do not found the tmsidriver.exe.thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Mon Aug 17 11:46:38 2015 From: michelic72 at gmail.com (Cristiano Micheli) Date: Mon, 17 Aug 2015 11:46:38 +0200 Subject: [FieldTrip] holes in head In-Reply-To: References: Message-ID: Dear Maris I am heavily guessing here, but are the anatomical MRI images cut on top? I only encountered this in the case that the MRI slices covered an incomplete volume of the head. It might be something else, though this is easy to check... Good luck Cris On Sat, Aug 15, 2015 at 7:02 PM, Maris Skujevskis wrote: > Dear Fieldtrip community, > > When plotting the head shape with ft_volumerealign (the input to the > ft_volumerealign function being simpy the output produced by the > ft_read_mri), some of the subjects show deep crater-like holes in the head > surface. > Images available here: https://goo.gl/photos/txeai9EfFXCn4hQ17 > > Does anyone have an idea what might have caused these 'holes'? > > If this is incomplete information to be able to answer the question, > please ask so I can provide further details. > > Best wishes, > Maris > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Mon Aug 17 14:51:21 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Mon, 17 Aug 2015 14:51:21 +0200 Subject: [FieldTrip] holes in head Message-ID: Thanks for your suggestion, Cristiano. However, the anatomical images do cover the entire head! There seem to be two possibilities - either there is something wrong in how some lower level function employed by ft_volumerealign creates the head surface out of my MR files or there are some real deformities present in my MR images. Since I do not have a well-trained eye for this, could someone take a quick look at a couple of the original MR files of any of these subjects (same link as previously): https://goo.gl/photos/txeai9EfFXCn4hQ17 and say whether they look distorted in any way? Let me know and I will share the MR files. Best wishes, Maris > Date: Mon, 17 Aug 2015 11:46:38 +0200 > From: Cristiano Micheli > To: FieldTrip discussion list > Subject: Re: [FieldTrip] holes in head > Message-ID: > ZT2mdpTxePPwDT72z1hU9biQ7--ipA at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Dear Maris > > I am heavily guessing here, but are the anatomical MRI images cut on top? I > only encountered this in the case that the MRI slices covered an incomplete > volume of the head. > > It might be something else, though this is easy to check... > > Good luck > Cris > > > On Sat, Aug 15, 2015 at 7:02 PM, Maris Skujevskis > wrote: > > > Dear Fieldtrip community, > > > > When plotting the head shape with ft_volumerealign (the input to the > > ft_volumerealign function being simpy the output produced by the > > ft_read_mri), some of the subjects show deep crater-like holes in the > head > > surface. > > Images available here: https://goo.gl/photos/txeai9EfFXCn4hQ17 > > > > Does anyone have an idea what might have caused these 'holes'? > > > > If this is incomplete information to be able to answer the question, > > please ask so I can provide further details. > > > > Best wishes, > > Maris > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150817/b429c646/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 57, Issue 13 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Aug 17 15:20:59 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 17 Aug 2015 15:20:59 +0200 Subject: [FieldTrip] Error in Cluster permutation tutorial? In-Reply-To: References: Message-ID: <3A47A52D-41CB-44F1-ADF3-83F4574F5CE2@donders.ru.nl> Hi Rajat and Stephen Please see my inline reply below. On 06 Aug 2015, at 16:32, Rajat Thomas wrote: > I followed the tutorial on > http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics?s[]=cluster&s[]=permutation > > at the very end, I wanted to do the ft_clusterplot but then I did not get topoplots as a function of time as in the > tutorial and instead just got one plot. > > Is there something wrong in the way the parameters are set in the tutorial. The code for ft_clusterplot was recently extended to be able to handle more types of data, but apparently it broke for the existing type of data. I have fixed it (see https://code.google.com/p/fieldtrip/source/detail?r=10603), it now supports chan, chan_time, chan_freq and chan_freq_time (but only if either time or freq has length 1). The fixed version is available from github or svn, or this evening on ftp. On 07 Aug 2015, at 16:43, Stephen Politzer-Ahles wrote: > Also, is it just me or is http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics#permutation_test_based_on_cluster_statistics essentially duplicating (with what looks like a more recent example and code) what's in http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock ? Would it be worthwhile to reconcile these two (and maybe replace one with a link to the other, so they don't get out of sync again)? Content-wise they are similar, but we use the eventrelatedstatistics tutorial in training settings (e.g. workshops) as gentle introduction into statistics in general with only towards the end the clustering, whereas cluster_permutation_timelock goes more in depth. So they serve different goals. Since the code should now be working again for the 1st, I hope it also works for the 2nd. best regards, Robert From michelic72 at gmail.com Mon Aug 17 17:15:09 2015 From: michelic72 at gmail.com (Cristiano Micheli) Date: Mon, 17 Aug 2015 17:15:09 +0200 Subject: [FieldTrip] holes in head In-Reply-To: References: Message-ID: Hi Maris, it's interesting. I think there is no need (for now) to upload the data though. Could you attach the code that you used to generate the figures? There might be important information there, such as the coordinate system or the resolution of the MR scans (what is the FOV? What is the slice distance? etc...) It'd be great if you could patch the snippet of code. All the best! Cris On Mon, Aug 17, 2015 at 2:51 PM, Maris Skujevskis wrote: > Thanks for your suggestion, Cristiano. However, the anatomical images do > cover the entire head! > > There seem to be two possibilities - either there is something wrong in > how some lower level function employed by ft_volumerealign creates the head > surface out of my MR files or there are some real deformities present in my > MR images. > > Since I do not have a well-trained eye for this, could someone take a > quick look at a couple of the original MR files of any of these subjects > (same link as previously): https://goo.gl/photos/txeai9EfFXCn4hQ17 and > say whether they look distorted in any way? Let me know and I will share > the MR files. > > Best wishes, > Maris > > >> Date: Mon, 17 Aug 2015 11:46:38 +0200 >> From: Cristiano Micheli >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] holes in head >> Message-ID: >> > ZT2mdpTxePPwDT72z1hU9biQ7--ipA at mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> >> Dear Maris >> >> I am heavily guessing here, but are the anatomical MRI images cut on top? >> I >> only encountered this in the case that the MRI slices covered an >> incomplete >> volume of the head. >> >> It might be something else, though this is easy to check... >> >> Good luck >> Cris >> >> >> On Sat, Aug 15, 2015 at 7:02 PM, Maris Skujevskis > > >> wrote: >> >> > Dear Fieldtrip community, >> > >> > When plotting the head shape with ft_volumerealign (the input to the >> > ft_volumerealign function being simpy the output produced by the >> > ft_read_mri), some of the subjects show deep crater-like holes in the >> head >> > surface. >> > Images available here: https://goo.gl/photos/txeai9EfFXCn4hQ17 >> > >> > Does anyone have an idea what might have caused these 'holes'? >> > >> > If this is incomplete information to be able to answer the question, >> > please ask so I can provide further details. >> > >> > Best wishes, >> > Maris >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150817/b429c646/attachment-0001.html >> > >> >> ------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 57, Issue 13 >> ***************************************** >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.hipp at googlemail.com Tue Aug 18 11:20:37 2015 From: joerg.hipp at googlemail.com (Joerg Hipp) Date: Tue, 18 Aug 2015 11:20:37 +0200 Subject: [FieldTrip] Postdoc position: "EEG / MEG Biomarkers Development" at Roche in Basel Message-ID: Dear all, we are searching for a postdoctoral fellow at Roche in Basel, Switzerland. The aim is to identify, develop, and implement disease-related EEG / MEG biomarkers. Please find details here: http://www.roche.com/careers/jobs/jobsearch/job.htm?id=E-3103768353&locale=en&title=PostDoctoral%20Research%20Fellow%20-%20EEG%20/%20MEG%20Biomarkers%20development All the best, Joerg -- Joerg Hipp, PhD Biomarker and Experimental Medicine Leader F. Hoffmann-La Roche Ltd. Grenzacherstrasse 124 4070 Basel, Switzerland Email: joerg.hipp at roche.com https://scholar.google.ch/citations?user=oxsJ6q4AAAAJ&hl=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From aler1 at gmx.de Tue Aug 18 11:34:53 2015 From: aler1 at gmx.de (alla Brodski) Date: Tue, 18 Aug 2015 11:34:53 +0200 Subject: [FieldTrip] Postdoc position: "EEG / MEG Biomarkers Development" at Roche in Basel In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From marliesvissers at gmail.com Tue Aug 18 13:16:36 2015 From: marliesvissers at gmail.com (Marlies Vissers) Date: Tue, 18 Aug 2015 13:16:36 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 4 In-Reply-To: References: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> <431477C1-7C6F-4D4D-96F5-1C80729B3140@fcdonders.ru.nl> Message-ID: Dear Eric, Jan-Mathijs, Arjan, and Jorn, Thanks for your input on my questions. Jan-Mathijs’ reading of my post was correct: with the connectivity matrix I indeed intended to refer to the boolean matrix that defines the neighbour-structure of the channels. The analysis I plan to run is a cross-subject brain-behavior correlation (so over subjects) over my channel*time*frequency space, which should subsequently be cluster-corrected. Thanks Arjan for pointing out that the function I was using has been renamed! My problem was that I obtained strange cluster shapes with non-neighbouring electrodes only, while minnbchan was set to 2. It might be important to mention again that I imported my data to Fieldtrip for the permutation test, after running time-frequency composition with custom Matlab routines. I structured my data such that the format matches the format of data that was fully preprocessed and decomposed in Fieldtrip (at least I tried to). Jorn’s advice on how to run the low-level function channelconnectivity was helpful. When doing so (inputting the data structure as it was passed by ft_statistics_montecarlo), I noted that the boolean connectivity matrix representing the channel-neighbours did not resemble the spatial characteristics of the electrodes in my data. Furthermore, I noticed that the channel field in my output (stat.cfg.channel) displayed a different channel order than the one I constructed using ft_read_sens, which properly fits the organization of my data. I tried to solve this issue by manually hardcoding the correct channellabels in the private function channelconnectivity. This seems to work: my clusters now consist of neighbouring channels, and the channel order in my output is similar to my input as well. I am not sure whether my solution is valid, so I copied my edits below (line18-25 in the original channelconnectivty function). I commented out the line ‘chans = cfg.channel’, and hardcoded the channel locations instead. If one of you sees something that is absolutely not intended to happen, knows what might have gone wrong, or has any other advice or comments, please let me know! Thanks in advance, Marlies Edited code from the function channelconnectivity (orignal line chans=cfg.channel is now commented out) % check whether to use channels in the cfg or data if nargin < 2 && isfield(cfg, 'channel') %chans = cfg.channel; chans ={ 'Fp1' 'AF7' 'AF3' 'F1' 'F3' 'F5' 'F7' 'FT7' 'FC5' 'FC3' 'FC1' 'C1' 'C3' 'C5' 'T7' 'TP7' 'CP5' 'CP3' 'CP1' 'P1' 'P3' 'P5' 'P7' 'P9' 'PO7' 'PO3' 'O1' 'Iz' 'Oz' 'POz' 'Pz' 'CPz' 'Fpz' 'Fp2' 'AF8' 'AF4' 'AFz' 'Fz' 'F2' 'F4' 'F6' 'F8' 'FT8' 'FC6' 'FC4' 'FC2' 'FCz' 'Cz' 'C2' 'C4' 'C6' 'T8' 'TP8' 'CP6' 'CP4' 'CP2' 'P2' 'P4' 'P6' 'P8' 'P10' 'PO8' 'PO4' 'O2'}; elseif nargin == 2 chans = data.label; else error('either the cfg needs to have both cfg.channel and cfg.neighbours, or a second (data) input argument needs to be specified'); end On 5 August 2015 at 16:45, Arjen Stolk wrote: > And to briefly chime in on point 1, i believe that statfun has changed its > name to correlationT some time ago. > Yours, Arjen > > > > On Aug 5, 2015, at 6:11 AM, Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl> wrote: > > Hi Eric, > > Allow me to chime in to avoid any confusion from your side regarding point > 2). I think that Marlies refers to a boolean spatial adjacency matrix that > defines whether channels are neighbours, or not. In the code, this is > referred to as a matrix named ‘connectivity’, which may not be the most > obvious denomination. At some point in time we have made some low-level > changes in the FieldTrip code, concerning the treatment of the spatial > dimension for the clustering, which allows to treat spatial clustering > along edges along a triangulated mesh (e.g. dipole locations defined on the > cortical sheet) in the same way as spatial clustering on an extracranial > channel array. Channel clustering is now a ‘special case’ where the > cfg.neighbours structure array is converted into the boolean adjancency > matrix, by the low-level channelconnectivity function, which is in > fieldtrip/private. > > Best, > Jan-Mathijs > > On Aug 5, 2015, at 2:54 PM, Maris, E.G.G. (Eric) > wrote: > > Dear Marlies, > > I did not go through all details of your correspondence with Jorn, but let > me add a few remarks from a birds-eye perspective. > > 1. Your statfun is intersubjcorr, which evaluates the correlation over > subjects between a neuronal and a behavioural variable, with the neuronal > variable typically being high-dimensional, and thereby creating a multiple > comparisons problem. Btw, I don’t like the name *inter*subjcorr, because > the correlation is * over* subjects and not between (=inter). > 2. I’m puzzled by where the connectivity matrix comes from, because your > analysis does not involve between-channel quantities. In fact, from the > perspective of the neuronal data, it is a typical univariate analysis in > which every channel is treated separately. The only between-aspect in your > study involves the relation between the (high-dimensional) neuronal > variable and the (one-dimensional) behavioral variable. > 3. Fieldtrip has no cluster-based statistics implemented that clusters > channel-pairs, except for the trivial case in which you select a single > reference channel for which you evaluate the coupling with all other > channels (as in Maris, Schoffelen & Fries, 2007). > > best, > Eric > > > > > *From: *Marlies Vissers > *Subject: **Re: [FieldTrip] Effect of cfg.minnbchan* > *Date: *4 Aug 2015 16:38:57 CEST > *To: *FieldTrip discussion list > *Reply-To: *FieldTrip discussion list > > > Dear Jörn, > > > Thanks for your reply and suggestion! My neighbourhood-definitions look > fine according to ft_neighbourplot. > However, I am not sure whether the connectivity matrix in my output > (stat.cfg.connectivity) is correct. For example, I inspected which channels > are defined as neighbours of C5 in the connectivity matrix. Here, I assumed > the channel order in this matrix resembles the channel order defined by the > function ‘ft_read_sens’, as stored in the field elec.label. > Using this particular organization of electrodes, the pattern of spatially > neighbouring channels matches the strange spatial distribution of one of my > resulting clusters. > E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern > matches my strange result, where a cluster consisting of FC4, Cz, and C5, > survived cluster correction with minnbchan set to 2. > > > I am currently trying to establish whether my cfg.connectivity matrix is > indeed the problem, and where this problem arises. One thing I suspect > might be the cause is that the call to ‘channelconnectivity’ by > ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, > goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure > directly (but not when running ft_freqstatistics), I get the following error > *‘Undefined function 'channelconnectivity' for input arguments of type > 'struct'’*. > If channelconnectivity was not properly run, it could be that the > electrode ordering as defined by ft_read_sens is not adjusted to the order > used by cfg.neighbours before construction of the connectivity matrix. > However, when I just run ft_freqstatistics, I do not get an error that > suggests any problems with ‘channelconnectivity’, so I am not entirely sure > whether this error also occurs when running the analysis as a whole. > > > Could you (or anyone else) give me any advice on how to make sure that the > definition of neighbours in the connectivity matrix is constructed using > the properly reordered vector with channel indices (the variable sel2 in > channelconnectivity if I’m correct)? > > > Thanks in advance! > > > Best, > Marlies > > On 3 August 2015 at 09:37, Jörn M. Horschig wrote: > >> Dear Marlies, >> >> if I am not mistaken, the minnbchan option checks indeed if every >> channels in a cluster has at least the specified amount of channels in it >> and removes it otherwise. The code is documented as follows: >> % For every (time,frequency)-element, it is calculated how many >> significant >> % neighbours .this channel has If a significant channel has less than >> minnbchan >> % significant neighbours, then this channel is removed from onoff. >> >> If something went wrong is hard to tell – it also depends on how the >> neighbor structure looks like. If you do not have C3 or C1, then C5 can >> indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz >> could be called a neighbor of FC4. You can check how neighbors are defined >> by using ft_neighbourplot. That’s the first check I’d do. >> >> Best, >> Jörn >> >> >> *--* >> >> *Jörn M. Horschig, PhD*, Software Engineer >> Artinis Medical Systems | +31 481 350 980 >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Marlies Vissers >> *Sent:* Friday, July 31, 2015 3:27 PM >> *To:* fieldtrip, donders >> *Subject:* [FieldTrip] Effect of cfg.minnbchan >> >> Dear Fieldtrippers. >> >> I have a question about the effect of the tuning parameter cfg.minnbchan >> when performing cluster based permutation testing, since the spatial >> characteristics of my clusters differ from what I expected to find given >> the settings I used. >> >> I am running cross-subject correlations (n=31) between a behavioral >> variable and a subj*channel*time*frequency matrix with power data >> (preprocessed using EEGlab and decomposed outside of Fieldtrip), using >> ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd >> like to avoid finding clusters with difficult-to-interpret shapes, I set >> cfg.minnbchan to 2. >> >> My concern however, is that the resulting clusters do not always exist of >> neighbouring electrodes. For example, one of the resulting clusters is >> located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected >> through the other dimensions (time & frequency). In one of Eric Maris' >> previous replies to an older post about cfg.minnbchan, I read that the >> parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. >> Does this mean that any cluster without spatially neighbouring electrodes >> should have been rejected when minnbchan is set to 2? >> >> I would be very grateful if someone could let me know whether setting >> cfg.minnbchan to 2 can -in principle- still yield clusters with >> spatially-non-adjacent electrodes, or whether this result is likely due to >> an error in my code. If the latter, I'd very much appreciate advice on >> checks I could perform to detect the potential error. >> >> The code I used to run this analysis is pasted below. >> >> Thanks in advance! >> >> Best, >> Marlies >> >> Marlies Vissers >> PhD student >> >> University of Amsterdam | Department Brain and Cognition | Cognition and >> Plasticity Laboratory >> Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl >> >> --- >> >> % Import the electrode labels from an EEGlab set >> elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); >> >> % Create matrix with TF data >> freqData.freq = frex; % Frequenies >> of TF matrix >> freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF >> matrix >> freqData.dimord = 'subj_chan_freq_time'; >> freqData.label = elec.label; >> freqData.powspctrm = tempTF; % tempTF is matrix >> with subj*channels*freq*time >> >> % Create matrix with behavioral data, make sure the sizes match >> behav.freq = frex; >> behav.time = tx(TF_idx(1):TF_idx(2))./1000; >> behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is >> just behavioral data in this matrix >> behav.label = elec.label; >> behav.powspctrm = repmat(accEffect,[1 >> size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); >> % accEffect is 1*subj array >> >> % Set configuration for perm test >> % Create cfg and insert parameters >> cfg = []; >> cfg.latency = [0 1.250]; >> cfg.frequency = [2 30]; >> cfg.channel ='all'; >> cfg.method = 'montecarlo'; >> cfg.statistic = 'ft_statfun_intersubcorr'; >> cfg.type = ft_getopt(cfg, 'type', 'Spearman'); >> cfg.correctm = 'cluster'; >> cfg.clusteralpha = 0.05; >> cfg.clusterstatistic = 'maxsum'; >> cfg.minnbchan = 2; >> cfg.tail = 0; >> cfg.clustertail = 0; >> cfg.alpha = 0.025; >> cfg.numrandomization = 1000; >> >> % prepare_neighbours determines what sensors may form clusters: load >> Biosemi 64 channel cap >> cfg.template = [fieldtripdir thisSlash 'template' thisSlash >> 'neighbours' thisSlash 'biosemi64_neighb.mat']; >> cfg.layout = [fieldtripdir thisSlash 'template' >> thisSlash 'layout' thisSlash 'biosemi64.lay']; >> cfg_neighb.method = 'template'; >> cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); >> >> % Create design mat >> subj = 31; >> design = zeros(2,2*subj); >> for i = 1:subj >> design(2,i) = i; >> end >> for i = 1:subj >> design(2,subj+i) = i; >> end >> design(1,1:subj) = 1; >> design(1,subj+1:2*subj) = 2; >> cfg.design = design; >> cfg.ivar = 1; >> cfg.uvar = 2; >> >> % Run stats >> [stat] = ft_freqstatistics(cfg,freqData,behav); >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.vandenieuwenhuijzen at donders.ru.nl Tue Aug 18 16:29:55 2015 From: m.vandenieuwenhuijzen at donders.ru.nl (Nieuwenhuijzen, M.E. van de (Marieke)) Date: Tue, 18 Aug 2015 14:29:55 +0000 Subject: [FieldTrip] zlim in ft_plot_mesh & record-button in ft_sourcemovie Message-ID: Hi Fieldtrippers, I have two small questions on plotting MNE reconstructed source space data on a mesh. - The first question is about ft_plot_mesh. Is it possible to set the zlim somehow, such that if I want to compare two plots the colour scales of said plots are equal? - The second question is about ft_sourcemovie, and more specifically the Record-button. When I click this button, the Pause and Quit buttons seem to be ignored afterwards, so I can't stop the movie, nor can I quit the movie and close the window, which means I have to force-quit Matlab. Do you have any pointers on what could solve this issue? And where would this recorded movie be saved? Or do I misinterpret the function of the button? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at donders.ru.nl Tue Aug 18 17:29:49 2015 From: n.lam at donders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Tue, 18 Aug 2015 15:29:49 +0000 Subject: [FieldTrip] zlim in ft_plot_mesh & record-button in ft_sourcemovie In-Reply-To: References: Message-ID: Hey Marieke, For adjusting the zlim I use Cheers, Nietzsche ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Nieuwenhuijzen, M.E. van de (Marieke) [m.vandenieuwenhuijzen at donders.ru.nl] Sent: 18 August 2015 16:29 To: fieldtrip at science.ru.nl Subject: [FieldTrip] zlim in ft_plot_mesh & record-button in ft_sourcemovie Hi Fieldtrippers, I have two small questions on plotting MNE reconstructed source space data on a mesh. - The first question is about ft_plot_mesh. Is it possible to set the zlim somehow, such that if I want to compare two plots the colour scales of said plots are equal? - The second question is about ft_sourcemovie, and more specifically the Record-button. When I click this button, the Pause and Quit buttons seem to be ignored afterwards, so I can't stop the movie, nor can I quit the movie and close the window, which means I have to force-quit Matlab. Do you have any pointers on what could solve this issue? And where would this recorded movie be saved? Or do I misinterpret the function of the button? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Wed Aug 19 01:53:06 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Wed, 19 Aug 2015 01:53:06 +0200 Subject: [FieldTrip] "segmentation is not star-shaped" warning Message-ID: Dear Fieldtrip community, I am working on constructing an EEG volume conduction model. When running ft_prepare_mesh I get a warning message the meaning if which is not clear, hence I do not know how to fix it. Any help will be appreciated. Details below. Code executed: >mri = ft_read_mri(file_name_mri); >cfg = [ ]; >cfg.brainsmooth = 5; >cfg.scalpsmooth = 4; >cfg.brainthreshold = 0.5; >cfg.scalpthreshold = 0.1; >segm_mri = ft_volumesegment(cfg, mri); >cfg = [ ]; >cfg.method = 'projectmesh'; >cfg.tissue = {'brain','skull','scalp'}; >cfg.numvertices = [3000 2000 1000]; >surf_mesh = ft_prepare_mesh(cfg, segm_mri); The code executes till the end, but I get this message: >"Warning: the segmentation is not star-shaped, please check the surface mesh" When inspecting the mesh visually, I find no obvious abnormalities. The meshes that do get the warning look more or less the same as the meshes of other subjects that do not get the warning. What is most interesting, when I use a segmented Fieldtrip template ('~/matlab/fieldtrip/external/spm8/templates/T1.nii') as an input to ft_prepare_mesh, I also get the same warning. Here are 3 related questions: What could be another way of checking/another indicator that the surface meshes have been constructed incorrectly, since visually they seem ok? Could changing the smoothing and thresholding parameters improve the segmentation? (I haven't yet found values that do not produce the warning, though.) Is this an 'important' warning that signals that my subsequent source localization might not work or might work incorrectly (i.e., I should not just ignore it) ? Thanks in advance, Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From daphbd1994 at hotmail.com Wed Aug 19 17:18:42 2015 From: daphbd1994 at hotmail.com (=?iso-8859-1?B?RGFwaG7pIEJlcnRyYW5kLUR1Ym9pcw==?=) Date: Wed, 19 Aug 2015 13:18:42 -0200 Subject: [FieldTrip] Convert .mat to .ds Message-ID: Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander "But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version?Best regards,Daphné -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonas at obleser.de Wed Aug 19 23:05:35 2015 From: jonas at obleser.de (Jonas Obleser) Date: Wed, 19 Aug 2015 23:05:35 +0200 Subject: [FieldTrip] Pre-call for new post docs in the Obleser lab Message-ID: <6D62C565-634F-4C2B-90F3-6CF7A9AF80A9@obleser.de> Pre-call: The research group “Auditory Cognition” (headed by Prof. Dr. Jonas Obleser; auditorycognition.com ) in the recently established Department of Psychology, University of Lübeck, is seeking to soon hire several Postdoctoral Researchers starting by January 2016, initially for 3 years, with the option of a 2-year extension. These positions fall into the larger framework of an ERC Consolidator grant “The listening challenge: How ageing brains adapt” recently awarded to Jonas Obleser, and will allow the joint development of cognitive neuroscience and psychological research projects targeting adaptive control in the auditory modality of middle-aged adults. [About the ERC project: The auditory sensory modality poses an excellent, although under-utilised, research model to understand the cognitive adjustments to sensory change (here termed “adaptive control”), their neural basis, and their large variation amongst individuals. Hearing abilities begin to decline already in the fourth life decade, and our guiding hypothesis is that individuals differ in the extent to which they are neurally, cognitively, and psychologically equipped to adapt to this sensory decline.] We are looking for creative minds with a PhD degree and a promising track record in cognitive neuroscience, psychology, physics, or engineering. A strong background and interest in research methods is desirable. Prior experience with either human neuroscience methods (especially advanced EEG and/or fMRI analyses) or modeling of rich data sets (e.g., latent growth modeling) is expected. The University of Lübeck is a modern university specializing in Medicine, Computer Science, Molecular Biology, Biomathematics and Medical Engineering. Internationally renowned research and high standards of academic tutoring characterize the profile of the university. A new dedicated research building (Centre for Brain, Behaviour, and Metabolism – CBBM) housing also the Obleser lab will open in late 2015. Payment will follow salary group E13 TV-L (full time), if conditions based on German Public service regulations are satisfied. These positions will be announced officially later in autumn 2015, but interested candidates should be in touch now with Jonas Obleser, jonas.obleser at uni-luebeck.de http://auditorycognition.com http://uni-luebeck.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From samane.shojaie at gmail.com Thu Aug 20 06:06:54 2015 From: samane.shojaie at gmail.com (Seyedeh Samane Shojaei) Date: Thu, 20 Aug 2015 12:06:54 +0800 Subject: [FieldTrip] problem with surface & template files Message-ID: Dear all, May I know where the "surface files" is? I am running last part of "Localizing oscillatory sources using beamformer techniques" tutorial ( http://www.fieldtriptoolbox.org/tutorial/beamformer), but have a difficulty to find 'surface_white_both.mat'. my another problem is for running the code available for planar gradient calculation (http://www.fieldtriptoolbox.org/tutorial/eventrelatedaveraging). the error is because the template file is not found. ??? Error using ==> ft_prepare_neighbours at 140 Template file could not be found - please check spelling or see http://fieldtrip.fcdonders.nl/faq/how_can_i_define_my_own_neighbourhood_template (please consider sharing it with others via the FT mailing list) how to add the templates? when I use "addpath('template')", it is not recognized. your help will be appreciated, Samane -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Thu Aug 20 09:32:27 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 20 Aug 2015 07:32:27 +0000 Subject: [FieldTrip] problem with surface & template files In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B3036F@exprd01.hosting.ru.nl> Dear Samane, Please make sure you have downloaded the full version of fieldtrip and not the ‘lite’ version. Not all of the templates are included in the ‘lite’ version to save space. If you have done that, make sure that you have added the path to the fieldtrip folder (e.g. addpath(‘d:\fieldtrip’) and run ‘ft_defaults’. You should then be able to run the code in the beamformer and event-related averaging tutorial as fieldtrip automatically looks for the templates in the correct location (which is: fieldtrip\template\anatomy\...). Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Seyedeh Samane Shojaei Sent: donderdag 20 augustus 2015 6:07 To: FieldTrip discussion list Subject: [FieldTrip] problem with surface & template files Dear all, May I know where the "surface files" is? I am running last part of "Localizing oscillatory sources using beamformer techniques" tutorial (http://www.fieldtriptoolbox.org/tutorial/beamformer), but have a difficulty to find 'surface_white_both.mat'. my another problem is for running the code available for planar gradient calculation (http://www.fieldtriptoolbox.org/tutorial/eventrelatedaveraging). the error is because the template file is not found. ??? Error using ==> ft_prepare_neighbours at 140 Template file could not be found - please check spelling or see http://fieldtrip.fcdonders.nl/faq/how_can_i_define_my_own_neighbourhood_template (please consider sharing it with others via the FT mailing list) how to add the templates? when I use "addpath('template')", it is not recognized. your help will be appreciated, Samane -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Thu Aug 20 09:37:20 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 20 Aug 2015 07:37:20 +0000 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> Dear Daphne, I have checked for you and the newest available version of fieldtrip (also fieldtrip-lite) includes writeCTFds.m in the folder 'fieldtrip\external\ctf\'. I have also checked a version from 2010 and it was there back then as well. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: woensdag 19 augustus 2015 17:19 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Convert .mat to .ds Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander " But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? Best regards, Daphné -------------- next part -------------- An HTML attachment was scrubbed... URL: From samane.shojaie at gmail.com Thu Aug 20 10:20:54 2015 From: samane.shojaie at gmail.com (Seyedeh Samane Shojaei) Date: Thu, 20 Aug 2015 16:20:54 +0800 Subject: [FieldTrip] problem with surface & template files In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB12B3036F@exprd01.hosting.ru.nl> References: <3D00B7615FB58D46A0B49B9AD67A33EB12B3036F@exprd01.hosting.ru.nl> Message-ID: Dear Jim, Thank you so much. I was using "lite" version. now it is fixed. Regards, Samane On Thu, Aug 20, 2015 at 3:32 PM, Herring, J.D. (Jim) < j.herring at donders.ru.nl> wrote: > Dear Samane, > > > > Please make sure you have downloaded the full version of fieldtrip and not > the ‘lite’ version. Not all of the templates are included in the ‘lite’ > version to save space. If you have done that, make sure that you have added > the path to the fieldtrip folder (e.g. addpath(‘d:\fieldtrip’) and run > ‘ft_defaults’. > > > > You should then be able to run the code in the beamformer and > event-related averaging tutorial as fieldtrip automatically looks for the > templates in the correct location (which is: > fieldtrip\template\anatomy\...). > > > > Best, > > > > Jim > > > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Seyedeh Samane Shojaei > *Sent:* donderdag 20 augustus 2015 6:07 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] problem with surface & template files > > > > Dear all, > > > > May I know where the "surface files" is? I am running last part of "Localizing > oscillatory sources using beamformer techniques" tutorial ( > http://www.fieldtriptoolbox.org/tutorial/beamformer), but have a > difficulty to find 'surface_white_both.mat'. > > > > my another problem is for running the code available for planar gradient > calculation ( > http://www.fieldtriptoolbox.org/tutorial/eventrelatedaveraging). the > error is because the template file is not found. > > ??? Error using ==> ft_prepare_neighbours at 140 > > Template file could not be found - please check spelling or see > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_define_my_own_neighbourhood_template > > (please consider sharing it with others via the FT mailing list) > > > > how to add the templates? when I use "addpath('template')", it is > not recognized. > > > > > > > your help will be appreciated, > > Samane > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daphbd1994 at hotmail.com Thu Aug 20 16:13:38 2015 From: daphbd1994 at hotmail.com (=?Windows-1252?B?RGFwaG7pIEJlcnRyYW5kLUR1Ym9pcw==?=) Date: Thu, 20 Aug 2015 12:13:38 -0200 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> References: , <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> Message-ID: Thank you! It was my error : I downloaded an older version, the one on the top of the list! I am a little bit confused, it looks like if I need to put .ds as an input file. I just have .mat times-series that doesn't come from CTF so I cannot use readCTFds.m. Would it be possible to convert .mat times-series (nSensor x ntimes-series) to .ds? Best, Daphné From: j.herring at donders.ru.nl To: fieldtrip at science.ru.nl Date: Thu, 20 Aug 2015 07:37:20 +0000 Subject: Re: [FieldTrip] Convert .mat to .ds Dear Daphne, I have checked for you and the newest available version of fieldtrip (also fieldtrip-lite) includes writeCTFds.m in the folder ‘fieldtrip\external\ctf\’. I have also checked a version from 2010 and it was there back then as well. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: woensdag 19 augustus 2015 17:19 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Convert .mat to .ds Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander " But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? Best regards, Daphné _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Thu Aug 20 17:05:30 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 20 Aug 2015 15:05:30 +0000 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: References: , <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl> Dear Daphne, If you are trying to read your own data format into fieldtrip, perhaps you should have a look at this page: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat It would be easier to transform your data format to be used in Fieldtrip than to first convert it to a CTF format and then read it into Fieldtrip. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: donderdag 20 augustus 2015 16:14 To: FieldTrip discussion list Subject: Re: [FieldTrip] Convert .mat to .ds Thank you! It was my error : I downloaded an older version, the one on the top of the list! I am a little bit confused, it looks like if I need to put .ds as an input file. I just have .mat times-series that doesn't come from CTF so I cannot use readCTFds.m. Would it be possible to convert .mat times-series (nSensor x ntimes-series) to .ds? Best, Daphné ________________________________ From: j.herring at donders.ru.nl To: fieldtrip at science.ru.nl Date: Thu, 20 Aug 2015 07:37:20 +0000 Subject: Re: [FieldTrip] Convert .mat to .ds Dear Daphne, I have checked for you and the newest available version of fieldtrip (also fieldtrip-lite) includes writeCTFds.m in the folder 'fieldtrip\external\ctf\'. I have also checked a version from 2010 and it was there back then as well. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: woensdag 19 augustus 2015 17:19 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Convert .mat to .ds Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander " But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? Best regards, Daphné _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Aug 20 17:09:09 2015 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 20 Aug 2015 16:09:09 +0100 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl> References: <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl> Message-ID: Just to add to Jim's point, some ITAB formats are supported in Fieldtrip (I see itab_raw and itab_mhd). If you can get your data to be in one of those formats, things will be much easier for you. Best, Vladimir On Thu, Aug 20, 2015 at 4:05 PM, Herring, J.D. (Jim) < j.herring at donders.ru.nl> wrote: > Dear Daphne, > > > > If you are trying to read your own data format into fieldtrip, perhaps you > should have a look at this page: > http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat > > > > It would be easier to transform your data format to be used in Fieldtrip > than to first convert it to a CTF format and then read it into Fieldtrip. > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Daphné Bertrand-Dubois > *Sent:* donderdag 20 augustus 2015 16:14 > *To:* FieldTrip discussion list > > *Subject:* Re: [FieldTrip] Convert .mat to .ds > > > > Thank you! > > > > It was my error : I downloaded an older version, the one on the top of the > list! > > > > I am a little bit confused, it looks like if I need to put .ds as an input > file. I just have .mat times-series that doesn't come from CTF so I cannot > use readCTFds.m. Would it be possible to convert .mat times-series (nSensor > x ntimes-series) to .ds? > > > > Best, > > > > Daphné > > > ------------------------------ > > From: j.herring at donders.ru.nl > To: fieldtrip at science.ru.nl > Date: Thu, 20 Aug 2015 07:37:20 +0000 > Subject: Re: [FieldTrip] Convert .mat to .ds > > Dear Daphne, > > > > I have checked for you and the newest available version of fieldtrip (also > fieldtrip-lite) includes writeCTFds.m in the folder > ‘fieldtrip\external\ctf\’. I have also checked a version from 2010 and it > was there back then as well. > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [ > mailto:fieldtrip-bounces at science.ru.nl ] *On > Behalf Of *Daphné Bertrand-Dubois > *Sent:* woensdag 19 augustus 2015 17:19 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Convert .mat to .ds > > > > Hi, > > > > I have data (from the MEG at ITAB) that cannot be process by fieldtrip. > Howerver, we have convert them into .mat file and I would like them to be > in .ds format so I can process the data. > > > > I read this message: > > > > *" Hello z.imane* > > > > *To convert .mat to .ds, try using the function writeCTFds.m located in the* > > *fieldtrip folder /fieldtrip/external/ctf/* > > > > *Best* > > *Bankim Subhash Chander "* > > But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? > > Best regards, > > Daphné > > > _______________________________________________ fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daphbd1994 at hotmail.com Thu Aug 20 17:03:52 2015 From: daphbd1994 at hotmail.com (=?Windows-1252?B?RGFwaG7pIEJlcnRyYW5kLUR1Ym9pcw==?=) Date: Thu, 20 Aug 2015 13:03:52 -0200 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: References: , <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl>, , <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl>, Message-ID: Thank you! In fact, I wanted .ds because I wanted to use Brainstorm (and brainstorm doesn't read ITAB data format). If I can't that's ok, I will use Fieldtrip! I could find read_itab_mhd but I don't find read_itab_raw (mines are .raw from ITAB). I also found itab2grad. :) Best,Daphné Date: Thu, 20 Aug 2015 16:09:09 +0100 From: litvak.vladimir at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Convert .mat to .ds Just to add to Jim's point, some ITAB formats are supported in Fieldtrip (I see itab_raw and itab_mhd). If you can get your data to be in one of those formats, things will be much easier for you. Best, Vladimir On Thu, Aug 20, 2015 at 4:05 PM, Herring, J.D. (Jim) wrote: Dear Daphne, If you are trying to read your own data format into fieldtrip, perhaps you should have a look at this page: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat It would be easier to transform your data format to be used in Fieldtrip than to first convert it to a CTF format and then read it into Fieldtrip. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: donderdag 20 augustus 2015 16:14 To: FieldTrip discussion list Subject: Re: [FieldTrip] Convert .mat to .ds Thank you! It was my error : I downloaded an older version, the one on the top of the list! I am a little bit confused, it looks like if I need to put .ds as an input file. I just have .mat times-series that doesn't come from CTF so I cannot use readCTFds.m. Would it be possible to convert .mat times-series (nSensor x ntimes-series) to .ds? Best, Daphné From: j.herring at donders.ru.nl To: fieldtrip at science.ru.nl Date: Thu, 20 Aug 2015 07:37:20 +0000 Subject: Re: [FieldTrip] Convert .mat to .ds Dear Daphne, I have checked for you and the newest available version of fieldtrip (also fieldtrip-lite) includes writeCTFds.m in the folder ‘fieldtrip\external\ctf\’. I have also checked a version from 2010 and it was there back then as well. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: woensdag 19 augustus 2015 17:19 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Convert .mat to .ds Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander " But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? Best regards, Daphné _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Aug 20 17:41:49 2015 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 20 Aug 2015 16:41:49 +0100 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: References: <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl> Message-ID: itab_raw is supported directly in the code of ft_read_data. You should try reading your data with ft_preprocessing function as in the tutorials. If that works I suggest you contact Francoise Tadel and tell him that you have data that you can read with Fieldtrip and want to import it into Brainstorm. I'm sure he'll think of something easier than writing it out in the CTF format. Best, Vladimir On Thu, Aug 20, 2015 at 4:03 PM, Daphné Bertrand-Dubois < daphbd1994 at hotmail.com> wrote: > Thank you! > > In fact, I wanted .ds because I wanted to use Brainstorm (and brainstorm > doesn't read ITAB data format). If I can't that's ok, I will use Fieldtrip! > > I could find *read_itab_mhd* but I don't find *read_itab_raw* (mines are > .raw from ITAB). I also found *itab2grad. :)* > > Best, > Daphné > ------------------------------ > Date: Thu, 20 Aug 2015 16:09:09 +0100 > From: litvak.vladimir at gmail.com > To: fieldtrip at science.ru.nl > > Subject: Re: [FieldTrip] Convert .mat to .ds > > Just to add to Jim's point, some ITAB formats are supported in Fieldtrip > (I see itab_raw and itab_mhd). If you can get your data to be in one of > those formats, things will be much easier for you. > > Best, > > Vladimir > > On Thu, Aug 20, 2015 at 4:05 PM, Herring, J.D. (Jim) < > j.herring at donders.ru.nl> wrote: > > Dear Daphne, > > > > If you are trying to read your own data format into fieldtrip, perhaps you > should have a look at this page: > http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat > > > > It would be easier to transform your data format to be used in Fieldtrip > than to first convert it to a CTF format and then read it into Fieldtrip. > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Daphné Bertrand-Dubois > *Sent:* donderdag 20 augustus 2015 16:14 > *To:* FieldTrip discussion list > > *Subject:* Re: [FieldTrip] Convert .mat to .ds > > > > Thank you! > > > > It was my error : I downloaded an older version, the one on the top of the > list! > > > > I am a little bit confused, it looks like if I need to put .ds as an input > file. I just have .mat times-series that doesn't come from CTF so I cannot > use readCTFds.m. Would it be possible to convert .mat times-series (nSensor > x ntimes-series) to .ds? > > > > Best, > > > > Daphné > > > ------------------------------ > > From: j.herring at donders.ru.nl > To: fieldtrip at science.ru.nl > Date: Thu, 20 Aug 2015 07:37:20 +0000 > Subject: Re: [FieldTrip] Convert .mat to .ds > > Dear Daphne, > > > > I have checked for you and the newest available version of fieldtrip (also > fieldtrip-lite) includes writeCTFds.m in the folder > ‘fieldtrip\external\ctf\’. I have also checked a version from 2010 and it > was there back then as well. > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [ > mailto:fieldtrip-bounces at science.ru.nl ] *On > Behalf Of *Daphné Bertrand-Dubois > *Sent:* woensdag 19 augustus 2015 17:19 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Convert .mat to .ds > > > > Hi, > > > > I have data (from the MEG at ITAB) that cannot be process by fieldtrip. > Howerver, we have convert them into .mat file and I would like them to be > in .ds format so I can process the data. > > > > I read this message: > > > > *" Hello z.imane* > > > > *To convert .mat to .ds, try using the function writeCTFds.m located in the* > > *fieldtrip folder /fieldtrip/external/ctf/* > > > > *Best* > > *Bankim Subhash Chander "* > > But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? > > Best regards, > > Daphné > > > _______________________________________________ fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Fri Aug 21 03:31:19 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Fri, 21 Aug 2015 01:31:19 +0000 (UTC) Subject: [FieldTrip] TMSi Porti Message-ID: <2056941582.4864225.1440120679274.JavaMail.yahoo@mail.yahoo.com> Hi, I am using the TMSi Porti to record the EEG signal.So, I'm using the tmsidriver.exe so that there is signal shown.However, there is no signal display.Anyone can help me? Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Fri Aug 21 11:11:24 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 21 Aug 2015 09:11:24 +0000 Subject: [FieldTrip] TMSi Porti In-Reply-To: <2056941582.4864225.1440120679274.JavaMail.yahoo@mail.yahoo.com> References: <2056941582.4864225.1440120679274.JavaMail.yahoo@mail.yahoo.com> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B312B0@exprd01.hosting.ru.nl> Dear Wan, Please have a look here: http://www.fieldtriptoolbox.org/development/realtime/tmsi Perhaps specifying some of the configuration options or using the other available tool will help in proceeding. Also, note that the driver only writes the signal from the TMSi driver to the FieldTrip buffer. You will still need to read from the FieldTrip buffer using the various realtime functions. Best, Jim ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of wan amirah Wan azlan [wanamirahwanazlan at yahoo.com] Sent: Friday, August 21, 2015 3:31 AM To: FieldTrip Discussion List Subject: [FieldTrip] TMSi Porti Hi, I am using the TMSi Porti to record the EEG signal. So, I'm using the tmsidriver.exe so that there is signal shown. However, there is no signal display. Anyone can help me? Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Sun Aug 23 20:17:05 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sun, 23 Aug 2015 18:17:05 +0000 Subject: [FieldTrip] Distributed source simulation Message-ID: <731A3644-A7FB-4F76-9EB7-F845D5ADC34D@mailbox.sc.edu> Is there any way to use the distributed source map, e.g., from beamformer or eloreta/mne source analysis, to simulate data? I would like to use a whole-grid distributed source model in the simulation; wiith active dipoles places in an entire anatomical ROI, rather than just single (or small number of multiple) dipoles. Thanks, John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Aug 25 10:51:56 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 25 Aug 2015 10:51:56 +0200 Subject: [FieldTrip] data-deleting bug in FieldTrip (present for 9 hours during yesterday, now fixed) Message-ID: Dear FieldTrip users In SVN revision 10622 I changed this https://bitbucket.org/fieldtriptoolbox/fieldtrip/commits/0539a45d6bd609673a5c618c8ad6ad62de1c4013 to make the unzipping and subsequent cleaning up of *.gz, *.tgz and *.zip datasets more consistent (as I noticed that it was done in different manners), but did not realize that there would be an interaction between this and dataset2files, the helper function that deals with raw datasets that are split over multiple files. So in short, in the 9 hours between https://bitbucket.org/fieldtriptoolbox/fieldtrip/commits/0539a45d6bd609673a5c618c8ad6ad62de1c4013 and https://bitbucket.org/fieldtriptoolbox/fieldtrip/commits/7e872c328086c86da2a9ee3986aa3741a3325b2c we had a FT version that might have caused problems by deleting the raw data files that you were processing. The problem was due to the detection of the specified input file being different from the one that was actually read from, and if so, it would assume that it was unzipped and delete the file. But there are cases that were incorrectly detected (handled in private/dataset2files), e.g. in a CTF *.ds directory and a *.meg4 data file, or with brainvision vhdr/vmrk/eeg files. Please do not use SVN version 10622, nor the ftp download version “20150824”. That ftp version has now been deleted from our ftp server, but has been there for an hour or so. I am very sorry for the inconvenience that this may cause or may have caused. best regards, Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Aug 25 12:38:06 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 25 Aug 2015 12:38:06 +0200 Subject: [FieldTrip] FFT question In-Reply-To: References: Message-ID: <0F8D4C1E-306A-4B5F-846F-5C27368D144D@donders.ru.nl> On 25 Aug 2015, at 02:34, Ben Hutchinson wrote: > I was looking at your webpage on the FFT here http://www.fieldtriptoolbox.org/tutorial/fourier and noticed that the for an ordinary sinewave, like sin(x), the imaginary component of the FFT actually has a negative spike on the left side and a positive spike on the right side. Why is this? I thought that the left side of an FFT had the coefficient of the sinewave, and the right side of the FFT had the negative of that. So with a regular sinewave, (such as sin(x) which is actually the same as coef*sin(x) where coef=1) the left side of the imaginary part of the FFT is supposed to show that coefficient, meaning that it should have a spike of positive 1. But the FFT on this webpage instead shows a spike of -1 at that location. Why is that? Hi Ben from Matlab "help fft" For length N input vector x, the DFT is a length N vector X, with elements N X(k) = sum x(n)*exp(-j*2*pi*(k-1)*(n-1)/N), 1 <= k <= N. n=1 The inverse DFT (computed by IFFT) is given by N x(n) = (1/N) sum X(k)*exp( j*2*pi*(k-1)*(n-1)/N), 1 <= n <= N. k=1 Note the “-j” in the first equation. See page 158 in http://www.dspguide.com/CH8.PDF and specifically equation 8.3 on page 153, which explains it in more detail. I recommend the DSP guide as a general resource to learn more about digital signal processing. best regards, Robert PS please address future questions to the email discussion list (CC) so that other people can benefit from it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mehmetakifozcoban at gmail.com Tue Aug 25 16:40:57 2015 From: mehmetakifozcoban at gmail.com (=?UTF-8?B?TWVobWV0IEFraWYgw5Z6w6dvYmFu?=) Date: Tue, 25 Aug 2015 17:40:57 +0300 Subject: [FieldTrip] Dear fieldtrippers Message-ID: I have 55 eeg data but their extension is .tdt. .. have you know how can i open with fieldtrip M.akif Biomedical Researcher -------------- next part -------------- An HTML attachment was scrubbed... URL: From laurent.hugueville at upmc.fr Tue Aug 25 17:36:33 2015 From: laurent.hugueville at upmc.fr (Laurent Hugueville) Date: Tue, 25 Aug 2015 17:36:33 +0200 Subject: [FieldTrip] Dear fieldtrippers In-Reply-To: References: Message-ID: <55DC8B81.6070305@upmc.fr> Hi! Perhaps, you can use : http://sccn.ucsd.edu/wiki/EEGLAB_Extensions_details *TDT data import:* Adam Wilson at the NITRO Lab at the University of Wisconsin Madison (USA) offers an extension available for loading Tucker-Davis Technology format data into EEGLAB. Chears, Laurent. Le 25/08/2015 16:40, Mehmet Akif Özçoban a écrit : > > I have 55 eeg data but their extension is .tdt. .. have you know how > can i open with fieldtrip > > M.akif Biomedical Researcher > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Laurent Hugueville Tél. 01.57.27.46.38 Centre de Recherche de l'Institut du Cerveau et de la Moelle Epinière UPMC / INSERM UMRS975 / CNRS UMR 7225 47, Boulevard de l'Hôpital 75651 Paris cedex 13 -------------- next part -------------- An HTML attachment was scrubbed... URL: From voxxys at gmail.com Tue Aug 25 20:36:35 2015 From: voxxys at gmail.com (Ksenia Volkova) Date: Tue, 25 Aug 2015 21:36:35 +0300 Subject: [FieldTrip] Fitting dipole to a topography Message-ID: Dear fieldtrip users, I wonder if you can help me out. I have a relatively simple problem: having a topography matrix (where rows correspond to topographies, and columns correspond to channels) I want to fit a dipole to each topography. I have looked through tutorials and documentation and I've seen this example http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit. Still, I can't figure out how I should use the toolbox to solve my problem. What would be the right arguments to call ft_dipolefitting with in my case? If I have EEG data, topography matrix and channel locations, what would be the easiest way to fit a dipole to each topography? Thank you in advance for any help. Ksenia Volkova -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Wed Aug 26 07:47:38 2015 From: wanamirahwanazlan at yahoo.com (Wan Amirah W Azlan) Date: Wed, 26 Aug 2015 05:47:38 +0000 (UTC) Subject: [FieldTrip] Realtime TMSi Porti Message-ID: <1320276013.493924.1440568058141.JavaMail.yahoo@mail.yahoo.com> Hi, Does anyone here can help me how to connect the TMSi Porti in the fieldtrip? So that I am able to display the signal?This is because I have difficulty in connecting TMSI Porti. Is there ant steps that I'm missing? I already used the functions available such as ft_realtime_signalviewer and ft_read_data. But none of them are working.I am using windows 7 64 bit, but I also tried in windows XP 32 bits. However, also not working.Thanks.  Regards,Wan Amirah binti W Azlan,Postgraduate student,Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia.Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Wed Aug 26 08:27:31 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Wed, 26 Aug 2015 08:27:31 +0200 Subject: [FieldTrip] Fitting dipole to a topography In-Reply-To: References: Message-ID: <7B07EF02-6BE0-40EB-895F-075A3EA63C92@uni-konstanz.de> Dear Ksenia, I would first start with the organization of the data in a format FieldTrip can sense. data = []; data.trial ={[chan x time]} % this is your elec x topography matrix, where topography is observed on consecutive time points data.time = [vector-number of time points]; data.label = {‘elec1’,’elec2’ etc.} your electrode labels data.elec = this is key reflecting the position of the electrodes relative to the head Next, you have to compute a volume conduction model. How to do so is explained here: http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg?s[]=eeg&s[]=volume&s[]=conduction&s[]=model After this you can proceed with the dipole fitting which is explained for instance here: http://www.fieldtriptoolbox.org/tutorial/natmeg/dipolefitting#fit_a_dipole_model_to_the_meg_data Under cfg.latency you could specify the number of the topography you are interested in and under cfg.vol the BEM model you computed in the previous step. If you don#t have individual MRI you can use the standard BEM model located in the ~template/headmodel/standard_bem.mat. Note that before you do so you should coregister the headmodel with the electrodes using ft_electroderealign. Good luck tzvetan > Dear fieldtrip users, > > I wonder if you can help me out. I have a relatively simple problem: having a topography matrix (where rows correspond to topographies, and columns correspond to channels) I want to fit a dipole to each topography. I have looked through tutorials and documentation and I've seen this example http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit. Still, I can't figure out how I should use the toolbox to solve my problem. > > What would be the right arguments to call ft_dipolefitting with in my case? If I have EEG data, topography matrix and channel locations, what would be the easiest way to fit a dipole to each topography? > > Thank you in advance for any help. > > Ksenia Volkova > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Wed Aug 26 08:47:43 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Wed, 26 Aug 2015 08:47:43 +0200 Subject: [FieldTrip] Realtime TMSi Porti In-Reply-To: <1320276013.493924.1440568058141.JavaMail.yahoo@mail.yahoo.com> References: <1320276013.493924.1440568058141.JavaMail.yahoo@mail.yahoo.com> Message-ID: <005001d0dfcb$1c6cec80$5546c580$@artinis.com> Dear Wan Amirah, have you tried contacting the TMSi support? They have experience with this and should be able to help you. In any case, make sure to give a detailed description on what you are doing and what does not work (supported by code snippets and/or screenshots). Best of luck! Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wan Amirah W Azlan Sent: Wednesday, August 26, 2015 7:48 AM To: FieldTrip Discussion List Subject: [FieldTrip] Realtime TMSi Porti Hi, Does anyone here can help me how to connect the TMSi Porti in the fieldtrip? So that I am able to display the signal? This is because I have difficulty in connecting TMSI Porti. Is there ant steps that I'm missing? I already used the functions available such as ft_realtime_signalviewer and ft_read_data. But none of them are working. I am using windows 7 64 bit, but I also tried in windows XP 32 bits. However, also not working. Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Wed Aug 26 11:04:44 2015 From: wanamirahwanazlan at yahoo.com (Wan Amirah W Azlan) Date: Wed, 26 Aug 2015 09:04:44 +0000 (UTC) Subject: [FieldTrip] Realtime TMSi Porti In-Reply-To: <005001d0dfcb$1c6cec80$5546c580$@artinis.com> References: <005001d0dfcb$1c6cec80$5546c580$@artinis.com> Message-ID: <1028546645.547877.1440579885418.JavaMail.yahoo@mail.yahoo.com> Dear Mr. Jorn, Thank you for the reply.Actually, I want to do the realtime data processing of EEG signal from TMSi Porti. The online processing will be performed while recording the EEG signal. I am sorry  for not attach the error. Here I attach the error shown in Matlab. I am using Matlab2013. I attach the printscreen in word file.Hope you have any suggestion regarding the error. By the way, I already contact the TMSi support and waiting for their reply.However, in the meantime, I wish if there is any suggestion in from fieldtrip. Thank you.  Regards,Wan Amirah binti W Azlan,Postgraduate student,Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia.Tel (H/P): +60193702134 On Wednesday, August 26, 2015 2:47 PM, Jörn M. Horschig wrote: #yiv7566064489 #yiv7566064489 -- _filtered #yiv7566064489 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv7566064489 {panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv7566064489 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv7566064489 {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}#yiv7566064489 #yiv7566064489 p.yiv7566064489MsoNormal, #yiv7566064489 li.yiv7566064489MsoNormal, #yiv7566064489 div.yiv7566064489MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv7566064489 a:link, #yiv7566064489 span.yiv7566064489MsoHyperlink {color:#0563C1;text-decoration:underline;}#yiv7566064489 a:visited, #yiv7566064489 span.yiv7566064489MsoHyperlinkFollowed {color:#954F72;text-decoration:underline;}#yiv7566064489 span.yiv7566064489EmailStyle17 {color:#1F497D;}#yiv7566064489 .yiv7566064489MsoChpDefault {font-size:10.0pt;} _filtered #yiv7566064489 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv7566064489 div.yiv7566064489WordSection1 {}#yiv7566064489 Dear Wan Amirah,  have you tried contacting the TMSi support? They have experience with this and should be able to help you. In any case, make sure to give a detailed description on what you are doing and what does not work (supported by code snippets and/or screenshots). Best of luck!  Best,Jörn  --  Jörn M. Horschig, PhD, Software EngineerArtinis Medical Systems  |  +31 481 350 980  From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wan Amirah W Azlan Sent: Wednesday, August 26, 2015 7:48 AM To: FieldTrip Discussion List Subject: [FieldTrip] Realtime TMSi Porti  Hi,  Does anyone here can help me how to connect the TMSi Porti in the fieldtrip? So that I am able to display the signal?This is because I have difficulty in connecting TMSI Porti. Is there ant steps that I'm missing? I already used the functions available such as ft_realtime_signalviewer and ft_read_data. But none of them are working.I am using windows 7 64 bit, but I also tried in windows XP 32 bits. However, also not working.Thanks.  Regards,Wan Amirah binti W Azlan,Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 237247 bytes Desc: not available URL: From guillaume.dumas at pasteur.fr Wed Aug 26 11:43:04 2015 From: guillaume.dumas at pasteur.fr (Guillaume Dumas) Date: Wed, 26 Aug 2015 09:43:04 +0000 Subject: [FieldTrip] Degrees of freedom in Z-coherence transform Message-ID: Dear Fieldtripers, Following Maris et al. 2007 paper about "Nonparametric testing of coherence difference" I was hesitating regarding the number of degrees of freedom to use in the Z-coherence transform when coherence is calculated over N trials by averaging across M non-overlapping windows in each of them. Is the df equals to N or N*M then? I am a little confused since in Fieldtrip, this is even 2*N that appears to be used: http://fieldtrip.googlecode.com/svn/trunk/statfun/ft_statfun_indepsamplesZcoh.m Thanks for your time. Best, Guillaume -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Wed Aug 26 12:17:13 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Wed, 26 Aug 2015 10:17:13 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 21 In-Reply-To: References: Message-ID: <165710B3-40CE-466D-B67C-F895B9BA3687@donders.ru.nl> Hi Guillaume, Following Maris et al. 2007 paper about "Nonparametric testing of coherence difference" I was hesitating regarding the number of degrees of freedom to use in the Z-coherence transform when coherence is calculated over N trials by averaging across M non-overlapping windows in each of them. Is the df equals to N or N*M then? I am a little confused since in Fieldtrip, this is even 2*N that appears to be used: http://fieldtrip.googlecode.com/svn/trunk/statfun/ft_statfun_indepsamplesZcoh.m The degrees of freedom is equal to the number of tapers, and because you effectively use non-overlapping tapers (every window corresponds to one taper), your degrees of freedom is N*M. best, Eric Maris Thanks for your time. Best, Guillaume _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Wed Aug 26 12:42:49 2015 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Wed, 26 Aug 2015 12:42:49 +0200 Subject: [FieldTrip] MEG gradiometer leadfield units Message-ID: Hi all, I constructed a single-sphere leadfield in Fieldtrip for the CTF 275 MEG system, but am unsure about the units: If I assume that dipole moments are expressed in pAm and sensor signals in T, then a dipole moment of 10 nAm gives sensor signals in the range 10-100 fT, which is what one expects. Can anyone confirm the units I assumed for this leadfield? Thanks a lot, Rikkert Hindriks -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Wed Aug 26 20:16:20 2015 From: brungio at gmail.com (Bruno L. Giordano) Date: Wed, 26 Aug 2015 19:16:20 +0100 Subject: [FieldTrip] Much faster lcmv beamformer with mtimesx Message-ID: <55DE0274.5040201@gmail.com> Hello, I worked on optimizing the beamformer lcmv function, and got improvements that might be quite interesting. I am beamforming a 54k time points x 240 sensors signal on a 44k nodes grid. On a 16 cores machine it takes around 520 s to do it using the beamformer_lcmv function (fixedori = 'yes') , whereas it takes around 26 s to do it on the same machine using the optimized function. To achieve the speed up, I stack the filters on different pages of a 3D matrix, and use mtimesx to do the projection, with one single command, and no for loop across the grid nodes. Mtimesx is called in 'MATLAB' mode: more improvements are likely if it is called using one of the other faster options. I am also keeping the projection as one single matrix, instead of redistributing across a cell structure with one element per grid node (this operation also takes quite some time). Mtimesx can be downloaded here: http://uk.mathworks.com/matlabcentral/fileexchange/25977-mtimesx-fast-matrix-multiply-with-multi-dimensional-support If you are interested, I can share the hacked lcmv beamformer function. Best, Bruno -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bruno L. Giordano, PhD Institute of Neuroscience and Psychology 58 Hillhead Street, University of Glasgow Glasgow, G12 8QB, Scotland T +44 (0) 141 330 5484 Www: http://www.brunolgiordano.net Email charter: http://www.emailcharter.org/ From j.herring at donders.ru.nl Thu Aug 27 10:36:12 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 27 Aug 2015 08:36:12 +0000 Subject: [FieldTrip] Realtime TMSi Porti In-Reply-To: <1028546645.547877.1440579885418.JavaMail.yahoo@mail.yahoo.com> References: <005001d0dfcb$1c6cec80$5546c580$@artinis.com> <1028546645.547877.1440579885418.JavaMail.yahoo@mail.yahoo.com> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B3829E@exprd01.hosting.ru.nl> Dear Wan, From this error message it seems that you are not writing to the buffer, or reading from the wrong location. What are you specifically doing (which parameters, which functions, which drivers) to stream data from the TMSi device to the buffer? Are you running everything on a single computer or is the EEG recorded on a separate computer? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wan Amirah W Azlan Sent: woensdag 26 augustus 2015 11:05 To: Jörn M. Horschig; 'FieldTrip discussion list' Subject: Re: [FieldTrip] Realtime TMSi Porti Dear Mr. Jorn, Thank you for the reply. Actually, I want to do the realtime data processing of EEG signal from TMSi Porti. The online processing will be performed while recording the EEG signal. I am sorry for not attach the error. Here I attach the error shown in Matlab. I am using Matlab2013. I attach the printscreen in word file. Hope you have any suggestion regarding the error. By the way, I already contact the TMSi support and waiting for their reply. However, in the meantime, I wish if there is any suggestion in from fieldtrip. Thank you. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 On Wednesday, August 26, 2015 2:47 PM, Jörn M. Horschig > wrote: Dear Wan Amirah, have you tried contacting the TMSi support? They have experience with this and should be able to help you. In any case, make sure to give a detailed description on what you are doing and what does not work (supported by code snippets and/or screenshots). Best of luck! Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wan Amirah W Azlan Sent: Wednesday, August 26, 2015 7:48 AM To: FieldTrip Discussion List > Subject: [FieldTrip] Realtime TMSi Porti Hi, Does anyone here can help me how to connect the TMSi Porti in the fieldtrip? So that I am able to display the signal? This is because I have difficulty in connecting TMSI Porti. Is there ant steps that I'm missing? I already used the functions available such as ft_realtime_signalviewer and ft_read_data. But none of them are working. I am using windows 7 64 bit, but I also tried in windows XP 32 bits. However, also not working. Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel.haehnke at lrz.tu-muenchen.de Thu Aug 27 10:47:50 2015 From: daniel.haehnke at lrz.tu-muenchen.de (=?utf-8?Q?Daniel_H=C3=A4hnke?=) Date: Thu, 27 Aug 2015 10:47:50 +0200 Subject: [FieldTrip] Pairwise phase consistency: spikes and LFPs, minimum number of spikes Message-ID: <862C293A-1329-46A7-9B2D-4A5F51C2ED74@lrz.tum.de> Dear Fieldtrip community, I am currently analysing spike-LFP data using FT_SPIKETRIGGEREDSPECTRUM_STATS and a sliding window approach to calculate the pairwise phase consistency (PPC) between spikes and LFPs. However, some of my single units have very low firing rates which leads to artefacts in my results. So I guess I have to either use an approach that doesn’t use sliding windows and/or only select single units based on a threshold of minimum spiking rate. Is there a suggested number of spikes to use for PPC calculation? Womelsdorf et al., 2014, for example (Womelsdorf, T., Ardid, S., Everling, S., & Valiante, T. A. (2014). Burst firing synchronizes prefrontal and anterior cingulate cortex during attentional control. Current Biology : CB, 24(22), 2613–2621. http://doi.org/10.1016/j.cub.2014.09.046 ) used only those PPC values that were calculated from more than 30 spikes. I guess they do that because PPC’s variance becomes reasonably small at this value. They don’t use a sliding window approach, so I guess I would need that number of spikes for each time bin? Best wishes, Daniel -- Daniel Hähnke PhD student Technische Universität München Institute of Neuroscience Translational NeuroCognition Laboratory Biedersteiner Straße 29, Bau 601 80802 Munich Germany Email: daniel.haehnke at lrz.tum.de Phone: +49 89 4140 3356 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lauri.parkkonen at aalto.fi Thu Aug 27 14:35:00 2015 From: lauri.parkkonen at aalto.fi (Parkkonen Lauri) Date: Thu, 27 Aug 2015 12:35:00 +0000 Subject: [FieldTrip] Position for an early-stage researcher (doctoral student) at Elekta Message-ID: We are recruiting an early-stage researcher for the EU-funded ChildBrain project. In this project, we aim to develop and apply new brain research methods to study normal and atypical cognitive development of children. This specific position is for a methodologically-oriented person who wants to work towards improving the applicability of MEG to pediatric populations. Obtaining a PhD at the end of the project is a possibility but not a requirement for successful completion. Hence, we also invite more industrially-oriented applicants with an MEG and software-engineering interest to apply. The work will be carried out at Elekta Oy (Helsinki), one of the industrial partners in ChildBrain. Secondments to academic project partners are an integral part of the position. The work will be supervised by Dr. Lauri Parkkonen and Dr. Robert Oostenveld. Further information about the project, application procedure and eligibility criteria on www.childbrain.eu and about this particular position under ESR Projects / ESR15. Best regards, Lauri Parkkonen -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.nivethida at gmail.com Thu Aug 27 16:51:30 2015 From: dr.nivethida at gmail.com (nivethida t) Date: Thu, 27 Aug 2015 10:51:30 -0400 Subject: [FieldTrip] error with ft_redefinetrial Message-ID: Hi all, I am trying to segment my 5s long dataset into chunks of 500ms. cfg = []; cfg.length = 0.5; cfg.overlap = 0; data_imwr_rest_seg = ft_redefinetrial(cfg, data_imwr_rest); Some (not all) of the datasets give me the following error message: *Index exceeds matrix dimensions.* *Error in ft_fetch_data (line 104) count(trlbeg:trlend) = count(trlbeg:trlend) + 1;Error in ft_redefinetrial (line 246) data.trial{iTrl} = ft_fetch_data(dataold, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', 1:hdr.nChans, 'skipcheckdata', 1);Error in ft_redefinetrial (line 304) data = ft_redefinetrial(tmpcfg, data);* There is also a warning message that appears for all trials - *Warning: Size input contains non-integer values. This will error ina future release. Use FLOOR to convert to integer values. > In ft_fetch_data at 94 In ft_redefinetrial at 246 In ft_redefinetrial at 304 * Can anyone help me identify what the problem could be? Thanks, Nivethida -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc.lalancette at sickkids.ca Thu Aug 27 18:02:17 2015 From: marc.lalancette at sickkids.ca (Marc Lalancette) Date: Thu, 27 Aug 2015 16:02:17 +0000 Subject: [FieldTrip] MEG gradiometer leadfield units (HINDRIKS, RIKKERT) Message-ID: <2A2B6A5B8C4C174CBCCE0B45E548DEB22A0D6EEF@SKMBXX01.sickkids.ca> Hi Rikkert, I ran into the same question some time ago and eventually figured it out. Assuming the code has not changed, it depends on the units you use and I had to use a correction factor when using lengths in cm. See this thread for details: http://mailman.science.ru.nl/pipermail/fieldtrip/2014-September/008438.html By the way, there were open issues regarding units back then, you can search fieldtrip's Bugzilla to check the current status. Cheers, Marc Lalancette Lab Research Project Manager, Research MEG lab Department of Diagnostic Imaging, Program in Neurosciences and Mental Health The Hospital for Sick Children, 555 University Avenue, Room S742, Toronto, ON, M5G 1X8 416-813-7654 x201535 -----Original Message----- Date: Wed, 26 Aug 2015 12:42:49 +0200 From: "HINDRIKS, RIKKERT" To: fieldtrip at science.ru.nl Subject: [FieldTrip] MEG gradiometer leadfield units Message-ID: Content-Type: text/plain; charset="utf-8" Hi all, I constructed a single-sphere leadfield in Fieldtrip for the CTF 275 MEG system, but am unsure about the units: If I assume that dipole moments are expressed in pAm and sensor signals in T, then a dipole moment of 10 nAm gives sensor signals in the range 10-100 fT, which is what one expects. Can anyone confirm the units I assumed for this leadfield? Thanks a lot, Rikkert Hindriks ________________________________ This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. From dr.nivethida at gmail.com Thu Aug 27 22:08:00 2015 From: dr.nivethida at gmail.com (nivethida t) Date: Thu, 27 Aug 2015 20:08:00 +0000 Subject: [FieldTrip] error with ft_redefinetrial Message-ID: Hi all, I am trying to segment my 5s long dataset into chunks of 500ms. cfg = []; cfg.length = 0.5; cfg.overlap = 0; data_imwr_rest_seg = ft_redefinetrial(cfg, data_imwr_rest); Some (not all) of the datasets give me the following error message: Index exceeds matrix dimensions. Error in ft_fetch_data (line 104) count(trlbeg:trlend) = count(trlbeg:trlend) + 1; Error in ft_redefinetrial (line 246) data.trial{iTrl} = ft_fetch_data(dataold, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', 1:hdr.nChans, 'skipcheckdata', 1); Error in ft_redefinetrial (line 304) data = ft_redefinetrial(tmpcfg, data); There is also a warning message that appears for all trials - Warning: Size input contains non-integer values. This will error in a future release. Use FLOOR to convert to integer values. > In ft_fetch_data at 94 In ft_redefinetrial at 246 In ft_redefinetrial at 304 Can anyone help me identify what the problem could be? -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Fri Aug 28 13:38:29 2015 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Fri, 28 Aug 2015 13:38:29 +0200 Subject: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open Message-ID: Dear all, Aarhus University (IMC and Cfin) will be hosting a FieldTrip Course on EEG/MEG Analysis with Jim Herring and Luca Ambrogioni the 7.-9. of October 2015. Registration to the limited places is open now via the link below. Externals will be charged a fee of 150 Euro. http://interactingminds.au.dk/events/single-events/artikel/imc-bootcamp-default-mode-network/ Best Katrin Heimann, Postdoc IMC Aarhus University -------------- next part -------------- An HTML attachment was scrubbed... URL: From mehmetakifozcoban at gmail.com Fri Aug 28 13:53:24 2015 From: mehmetakifozcoban at gmail.com (=?UTF-8?B?TWVobWV0IEFraWYgw5Z6w6dvYmFu?=) Date: Fri, 28 Aug 2015 14:53:24 +0300 Subject: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open In-Reply-To: References: Message-ID: Could you upload videos youtube channel please 28 Ağu 2015 14:47 tarihinde "KatrinH Heimann" yazdı: > Dear all, > > Aarhus University (IMC and Cfin) will be hosting a FieldTrip Course on > EEG/MEG Analysis with Jim Herring and Luca Ambrogioni the 7.-9. of October > 2015. Registration to the limited places is open now via the link below. > Externals will be charged a fee of 150 Euro. > > > http://interactingminds.au.dk/events/single-events/artikel/imc-bootcamp-default-mode-network/ > > Best > Katrin Heimann, Postdoc IMC Aarhus University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Fri Aug 28 14:02:51 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Fri, 28 Aug 2015 12:02:51 +0000 Subject: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C17DC341F@exprd03.hosting.ru.nl> Dear Mehmet, Videos of the lectures of last spring’s FieldTrip Toolkit course held at the Donders institute/Radboud University have already been made available on the FieldTrip youtube-channel: https://www.youtube.com/user/FieldTripToolboxTV Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Mehmet Akif Özçoban Sent: vrijdag 28 augustus 2015 13:53 To: FieldTrip discussion list Subject: Re: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open Could you upload videos youtube channel please 28 Ağu 2015 14:47 tarihinde "KatrinH Heimann" > yazdı: Dear all, Aarhus University (IMC and Cfin) will be hosting a FieldTrip Course on EEG/MEG Analysis with Jim Herring and Luca Ambrogioni the 7.-9. of October 2015. Registration to the limited places is open now via the link below. Externals will be charged a fee of 150 Euro. http://interactingminds.au.dk/events/single-events/artikel/imc-bootcamp-default-mode-network/ Best Katrin Heimann, Postdoc IMC Aarhus University _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mehmetakifozcoban at gmail.com Fri Aug 28 14:35:26 2015 From: mehmetakifozcoban at gmail.com (=?UTF-8?B?TWVobWV0IEFraWYgw5Z6w6dvYmFu?=) Date: Fri, 28 Aug 2015 15:35:26 +0300 Subject: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C17DC341F@exprd03.hosting.ru.nl> References: <7CCA2706D7A4DA45931A892DF3C2894C17DC341F@exprd03.hosting.ru.nl> Message-ID: Thousands times thank you i saw that....I mean that could you upload lessons will have been in Aarhus too... 28 Ağu 2015 15:31 tarihinde "Pelt, S. van (Stan)" < stan.vanpelt at donders.ru.nl> yazdı: > Dear Mehmet, > > > > Videos of the lectures of last spring’s FieldTrip Toolkit course held at > the Donders institute/Radboud University have already been made available > on the FieldTrip youtube-channel: > https://www.youtube.com/user/FieldTripToolboxTV > > > > Best, > > Stan > > > > -- > > Stan van Pelt, PhD > > Donders Institute for Brain, Cognition and Behaviour > > Radboud University > > Montessorilaan 3, B.01.34 > > 6525 HR Nijmegen, the Netherlands > > tel: +31 24 3616288 > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Mehmet Akif Özçoban > *Sent:* vrijdag 28 augustus 2015 13:53 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] FieldTrip Course with Instructors from the > Donders Institute in Aarhus, Registration open > > > > Could you upload videos youtube channel please > > 28 Ağu 2015 14:47 tarihinde "KatrinH Heimann" > yazdı: > > Dear all, > > > > Aarhus University (IMC and Cfin) will be hosting a FieldTrip Course on > EEG/MEG Analysis with Jim Herring and Luca Ambrogioni the 7.-9. of October > 2015. Registration to the limited places is open now via the link below. > Externals will be charged a fee of 150 Euro. > > > > > http://interactingminds.au.dk/events/single-events/artikel/imc-bootcamp-default-mode-network/ > > > > Best > > Katrin Heimann, Postdoc IMC Aarhus University > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.fritsche at student.ru.nl Fri Aug 28 15:31:01 2015 From: m.fritsche at student.ru.nl (Fritsche, M. (Matthias)) Date: Fri, 28 Aug 2015 13:31:01 +0000 Subject: [FieldTrip] Two-way permutation test Message-ID: Dear Fieldtrip mailing list, my name is Matthias Fritsche and I'm a research intern in Floris de Lange's 'Prediction & Attention' group at the Donders Center for Cognitive Neuroimaging. I'm currently working on my Master's project and have got a question I hope you might be able to help me with. I'm currently at the data analysis stage of a behavioral experiment and wondered whether there is a possibility to conduct a two-way permutation test (ANOVA-style, but without actually using ANOVAs/F-values). My experiment has two independent variables, let’s call them A and B, and one dependent variable. Every participant was tested in all of the four conditions, A1B1, A2B1, A1B2 and A2B2. The dependent variable is a parameter of a model that is fit to the data. However, due to unstable fitting at the subject level, I can only obtain this parameter from the group-averaged data. When only interested in effects between two specific conditions, e.g. A1B1 vs A2B1, the test is straightforward. In order to create the null distribution, I randomly swap the condition labels, A1B1 and A2B1, for each participant and compute the resulting group test statistic (difference of the dependent variable between A1B1 and A2B1) for that permutation. One option would be to test the difference between every two conditions in this way. However, I wondered whether there is also a way to use a permutation test similar to a 2-way ANOVA, i.e. testing the main effects of factor A and factor B, as well as the interaction effect. For that purpose, there seem to be permutation tests that use ANOVAs to generate permutation distributions of F-values. However, I cannot use ANOVAs since I only have the dependent variable for the whole group and not for individual participants. Do you know of any method to solve this? Thanks for your help. Best, Matthias -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Fri Aug 28 16:20:46 2015 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Fri, 28 Aug 2015 16:20:46 +0200 Subject: [FieldTrip] FieldTrip Course in Aarhus, right link Message-ID: Dear all, apologies for sending the wrong link and thanks to everyone that noticed ;) Here the right one: http://interactingminds.au.dk/events/single-events/artikel/field-trip-workshop/ Katrin -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Fri Aug 28 17:08:55 2015 From: david.m.groppe at gmail.com (David Groppe) Date: Fri, 28 Aug 2015 11:08:55 -0400 Subject: [FieldTrip] Two-way permutation test In-Reply-To: References: Message-ID: Hi Matthias, If I understand you correctly, you can use a t-score based permutation test to solve your problem. This procedure can test for an effect of factor A, factor B, and their interaction as described here: http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox:_within-subject_t-tests cheers, -David On Fri, Aug 28, 2015 at 9:31 AM, Fritsche, M. (Matthias) < m.fritsche at student.ru.nl> wrote: > Dear Fieldtrip mailing list, > > my name is Matthias Fritsche and I'm a research intern in Floris de > Lange's 'Prediction & Attention' group at the Donders Center for Cognitive > Neuroimaging. I'm currently working on my Master's project and have got a > question I hope you might be able to help me with. > > I'm currently at the data analysis stage of a behavioral experiment and > wondered whether there is a possibility to conduct a two-way permutation > test (ANOVA-style, but without actually using ANOVAs/F-values). > > My experiment has two independent variables, let’s call them A and B, and > one dependent variable. Every participant was tested in all of the four > conditions, A1B1, A2B1, A1B2 and A2B2. The dependent variable is a > parameter of a model that is fit to the data. However, due to unstable > fitting at the subject level, I can only obtain this parameter from the > group-averaged data. > > When only interested in effects between two specific conditions, e.g. A1B1 > vs A2B1, the test is straightforward. In order to create the null > distribution, I randomly swap the condition labels, A1B1 and A2B1, for each > participant and compute the resulting group test statistic (difference of > the dependent variable between A1B1 and A2B1) for that permutation. One > option would be to test the difference between every two conditions in this > way. > > However, I wondered whether there is also a way to use a permutation test > similar to a 2-way ANOVA, i.e. testing the main effects of factor A and > factor B, as well as the interaction effect. For that purpose, there seem > to be permutation tests that use ANOVAs to generate permutation > distributions of F-values. However, I cannot use ANOVAs since I only have > the dependent variable for the whole group and not for individual > participants. Do you know of any method to solve this? > > Thanks for your help. > > Best, > Matthias > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rb643 at medschl.cam.ac.uk Fri Aug 28 19:02:52 2015 From: rb643 at medschl.cam.ac.uk (Richard Bethlehem) Date: Fri, 28 Aug 2015 17:02:52 +0000 Subject: [FieldTrip] WPLI for individual trials Message-ID: <3188FAB8621D294696F13E80A7BBC97EFF84D73C@me-mbx3.medschl.cam.ac.uk> Dear Fieldtrippers, Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? Cheers, Richard ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m From e.maris at donders.ru.nl Sat Aug 29 12:19:39 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Sat, 29 Aug 2015 10:19:39 +0000 Subject: [FieldTrip] Two-way permutation test In-Reply-To: References: Message-ID: Hi Matthias & David, You can find a brief explanation on the topic of permutation based interaction effect testing here: http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests It also give pointers to how to implement it in Fieldtrip, which you should be familiar with. (For David: Matthias is a student in our Master CNS program, and I pointed him to the FT discussion list. Btw the list has an archive that contains many discussions of the interaction effect issue.) best, Eric Maris From: David Groppe > Subject: Re: [FieldTrip] Two-way permutation test Date: 28 Aug 2015 17:08:55 CEST To: FieldTrip discussion list > Reply-To: FieldTrip discussion list > Hi Matthias, If I understand you correctly, you can use a t-score based permutation test to solve your problem. This procedure can test for an effect of factor A, factor B, and their interaction as described here: http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox:_within-subject_t-tests cheers, -David On Fri, Aug 28, 2015 at 9:31 AM, Fritsche, M. (Matthias) > wrote: Dear Fieldtrip mailing list, my name is Matthias Fritsche and I'm a research intern in Floris de Lange's 'Prediction & Attention' group at the Donders Center for Cognitive Neuroimaging. I'm currently working on my Master's project and have got a question I hope you might be able to help me with. I'm currently at the data analysis stage of a behavioral experiment and wondered whether there is a possibility to conduct a two-way permutation test (ANOVA-style, but without actually using ANOVAs/F-values). My experiment has two independent variables, let’s call them A and B, and one dependent variable. Every participant was tested in all of the four conditions, A1B1, A2B1, A1B2 and A2B2. The dependent variable is a parameter of a model that is fit to the data. However, due to unstable fitting at the subject level, I can only obtain this parameter from the group-averaged data. When only interested in effects between two specific conditions, e.g. A1B1 vs A2B1, the test is straightforward. In order to create the null distribution, I randomly swap the condition labels, A1B1 and A2B1, for each participant and compute the resulting group test statistic (difference of the dependent variable between A1B1 and A2B1) for that permutation. One option would be to test the difference between every two conditions in this way. However, I wondered whether there is also a way to use a permutation test similar to a 2-way ANOVA, i.e. testing the main effects of factor A and factor B, as well as the interaction effect. For that purpose, there seem to be permutation tests that use ANOVAs to generate permutation distributions of F-values. However, I cannot use ANOVAs since I only have the dependent variable for the whole group and not for individual participants. Do you know of any method to solve this? Thanks for your help. Best, Matthias _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From spa268 at nyu.edu Sat Aug 29 13:06:10 2015 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Sat, 29 Aug 2015 15:06:10 +0400 Subject: [FieldTrip] Two-way permutation test Message-ID: Hello Matthias, It is possible to do a factorial test in Fieldtrip, you just have to hack the data a little bit. See this post from Eric Maris: http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests (also http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html, which is an older message recommending the same procedure if I remember correctly) Best, Steve > Message: 7 > Date: Fri, 28 Aug 2015 11:08:55 -0400 > From: David Groppe > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Two-way permutation test > Message-ID: > B32PZbahoLy+T0w at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Matthias, > If I understand you correctly, you can use a t-score based permutation > test to solve your problem. This procedure can test for an effect of factor > A, factor B, and their interaction as described here: > > > http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox:_within-subject_t-tests > > cheers, > -David > > > On Fri, Aug 28, 2015 at 9:31 AM, Fritsche, M. (Matthias) < > m.fritsche at student.ru.nl> wrote: > > > Dear Fieldtrip mailing list, > > > > my name is Matthias Fritsche and I'm a research intern in Floris de > > Lange's 'Prediction & Attention' group at the Donders Center for > Cognitive > > Neuroimaging. I'm currently working on my Master's project and have got a > > question I hope you might be able to help me with. > > > > I'm currently at the data analysis stage of a behavioral experiment and > > wondered whether there is a possibility to conduct a two-way permutation > > test (ANOVA-style, but without actually using ANOVAs/F-values). > > > > My experiment has two independent variables, let?s call them A and B, and > > one dependent variable. Every participant was tested in all of the four > > conditions, A1B1, A2B1, A1B2 and A2B2. The dependent variable is a > > parameter of a model that is fit to the data. However, due to unstable > > fitting at the subject level, I can only obtain this parameter from the > > group-averaged data. > > > > When only interested in effects between two specific conditions, e.g. > A1B1 > > vs A2B1, the test is straightforward. In order to create the null > > distribution, I randomly swap the condition labels, A1B1 and A2B1, for > each > > participant and compute the resulting group test statistic (difference of > > the dependent variable between A1B1 and A2B1) for that permutation. One > > option would be to test the difference between every two conditions in > this > > way. > > > > However, I wondered whether there is also a way to use a permutation test > > similar to a 2-way ANOVA, i.e. testing the main effects of factor A and > > factor B, as well as the interaction effect. For that purpose, there seem > > to be permutation tests that use ANOVAs to generate permutation > > distributions of F-values. However, I cannot use ANOVAs since I only have > > the dependent variable for the whole group and not for individual > > participants. Do you know of any method to solve this? > > > > Thanks for your help. > > > > Best, > > Matthias > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150828/7f8230bf/attachment-0001.html > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Aug 30 17:40:46 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sun, 30 Aug 2015 15:40:46 +0000 Subject: [FieldTrip] WPLI for individual trials In-Reply-To: <3188FAB8621D294696F13E80A7BBC97EFF84D73C@me-mbx3.medschl.cam.ac.uk> References: <3188FAB8621D294696F13E80A7BBC97EFF84D73C@me-mbx3.medschl.cam.ac.uk> Message-ID: Hi Richard, In general it is not possible to obtain a ‘single observation’ phase synchrony metric, where this metric is based on the distributional properties (i.e. across observations) of the phase difference. This holds not only for quantities like coherence, but also for WPLI. This being said, one could resort to a leave-one-out strategy, called jackknifing, to get an estimate of how much an individual trial contributes to the overall connectivity estimate. This has been formally described in http://www.sciencedirect.com/science/article/pii/S1053811915003316. Note that in order for this to work, you still need to have multiple trials in your input data. FieldTrip used to support the cfg.jackknife option in ft_connectivityanalysis for the computation of coherence, but I don’t know to what extent this generalizes to WPLI. Also, it’s been a while that I used this (i.e. jackknife) option (for coherence), so I am not sure whether this is still operational in the current version of FieldTrip. (since this option is a bit obscure, we have not done our utmost best to maintain backward-compatibility of the code here, so things may have been broken by general improvements to the code base). If you would like to follow up on this, I suggest you to contact the first author on the paper mentioned (above), I am sure that Craig would be willing to point you into the right direction (as far as he is not yet reading along … Craig, do you copy, over?). Best, Jan-Mathijs On Aug 28, 2015, at 7:02 PM, Richard Bethlehem wrote: > Dear Fieldtrippers, > > Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? > > Cheers, > > Richard > > ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From rb643 at medschl.cam.ac.uk Mon Aug 31 13:00:06 2015 From: rb643 at medschl.cam.ac.uk (Richard Bethlehem) Date: Mon, 31 Aug 2015 11:00:06 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 26 Message-ID: <3188FAB8621D294696F13E80A7BBC97EFF869DA0@me-mbx3.medschl.cam.ac.uk> Hi Jan Mathijs, Thanks for the tip! I think I missed the cross-observational aspect of WPLI and assumed you could also compute it on a trial by trial basis. I will look into the paper and see if I can reproduce it. However... my data is resting-state that is simply segmented into smaller parts ('trials') to see if there is a metric that is consistent across segments I was interested in looking at individual trials. If WPLI depends on cross-observations this might not the be optimal measure to look at such data as the segments are actually part of a continuous recording. What would be the recommended alternative (that also somewhat tackles the conduction problem)? And more in general, what would be the recommended metric for looking at resting-state connectivity (where there are no real trials)? Cheers, Richard ---------------------------------------------------------------------- Message: 1 Date: Sun, 30 Aug 2015 15:40:46 +0000 From: "Schoffelen, J.M. (Jan Mathijs)" To: FieldTrip discussion list Subject: Re: [FieldTrip] WPLI for individual trials Message-ID: Content-Type: text/plain; charset="Windows-1252" Hi Richard, In general it is not possible to obtain a ?single observation? phase synchrony metric, where this metric is based on the distributional properties (i.e. across observations) of the phase difference. This holds not only for quantities like coherence, but also for WPLI. This being said, one could resort to a leave-one-out strategy, called jackknifing, to get an estimate of how much an individual trial contributes to the overall connectivity estimate. This has been formally described in http://www.sciencedirect.com/science/article/pii/S1053811915003316. Note that in order for this to work, you still need to have multiple trials in your input data. FieldTrip used to support the cfg.jackknife option in ft_connectivityanalysis for the computation of coherence, but I don?t know to what extent this generalizes to WPLI. Also, it?s been a while that I used this (i.e. jackknife) option (for coherence), so I am not sure whether this is still operational in the current version of FieldTrip. (since this option is a bit obscure, we have not done our utmost best to maintain backward-compatibility of the code here, so things may have been broken by general improvements to the code base). If you would like to follow up on this, I suggest you to contact the first author on the paper mentioned (above), I am sure that Craig would be willing to point you into the right direction (as far as he is not yet reading along ? Craig, do you copy, over?). Best, Jan-Mathijs On Aug 28, 2015, at 7:02 PM, Richard Bethlehem wrote: > Dear Fieldtrippers, > > Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? > > Cheers, > > Richard > > ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 57, Issue 26 ***************************************** From rb643 at medschl.cam.ac.uk Mon Aug 31 13:02:56 2015 From: rb643 at medschl.cam.ac.uk (Richard Bethlehem) Date: Mon, 31 Aug 2015 11:02:56 +0000 Subject: [FieldTrip] WPLI for individual trials Message-ID: <3188FAB8621D294696F13E80A7BBC97EFF869DBD@me-mbx3.medschl.cam.ac.uk> Hi Jan Mathijs, Thanks for the tip! I think I missed the cross-observational aspect of WPLI and assumed you could also compute it on a trial by trial basis. I will look into the paper and see if I can reproduce it. However... my data is resting-state that is simply segmented into smaller parts ('trials') to see if there is a metric that is consistent across segments I was interested in looking at individual trials. If WPLI depends on cross-observations this might not the be optimal measure to look at such data as the segments are actually part of a continuous recording. What would be the recommended alternative (that also somewhat tackles the conduction problem)? And more in general, what would be the recommended metric for looking at resting-state connectivity (where there are no real trials)? Cheers, Richard ---------------------------------------------------------------------- Message: 1 Date: Sun, 30 Aug 2015 15:40:46 +0000 From: "Schoffelen, J.M. (Jan Mathijs)" To: FieldTrip discussion list Subject: Re: [FieldTrip] WPLI for individual trials Message-ID: Content-Type: text/plain; charset="Windows-1252" Hi Richard, In general it is not possible to obtain a ?single observation? phase synchrony metric, where this metric is based on the distributional properties (i.e. across observations) of the phase difference. This holds not only for quantities like coherence, but also for WPLI. This being said, one could resort to a leave-one-out strategy, called jackknifing, to get an estimate of how much an individual trial contributes to the overall connectivity estimate. This has been formally described in http://www.sciencedirect.com/science/article/pii/S1053811915003316. Note that in order for this to work, you still need to have multiple trials in your input data. FieldTrip used to support the cfg.jackknife option in ft_connectivityanalysis for the computation of coherence, but I don?t know to what extent this generalizes to WPLI. Also, it?s been a while that I used this (i.e. jackknife) option (for coherence), so I am not sure whether this is still operational in the current version of FieldTrip. (since this option is a bit obscure, we have not done our utmost best to maintain backward-compatibility of the code here, so things may have been broken by general improvements to the code base). If you would like to follow up on this, I suggest you to contact the first author on the paper mentioned (above), I am sure that Craig would be willing to point you into the right direction (as far as he is not yet reading along ? Craig, do you copy, over?). Best, Jan-Mathijs On Aug 28, 2015, at 7:02 PM, Richard Bethlehem wrote: > Dear Fieldtrippers, > > Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? > > Cheers, > > Richard > > ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m > _______________________________________________ ***************************************** From markus.gschwind at gmail.com Mon Aug 31 13:56:35 2015 From: markus.gschwind at gmail.com (Markus Gschwind) Date: Mon, 31 Aug 2015 13:56:35 +0200 Subject: [FieldTrip] General matlab script for cluster based permutation testing? Message-ID: Dear all, I wonder if someone could guide me how to use the cluster-based permutation testing after (Maris & Oostenvidle, 2007) on non-fieldtrip data, for example on simple matrices in matlab. Or is there even a matlab script around? Thanks in advance, Markus -------------- next part -------------- An HTML attachment was scrubbed... URL: From craiggrichter at gmail.com Mon Aug 31 15:26:49 2015 From: craiggrichter at gmail.com (Craig Richter) Date: Mon, 31 Aug 2015 15:26:49 +0200 Subject: [FieldTrip] WPLI for individual trials In-Reply-To: References: <3188FAB8621D294696F13E80A7BBC97EFF84D73C@me-mbx3.medschl.cam.ac.uk> Message-ID: <6DB5AD8B-78D4-4A0B-A693-5527CB94545C@gmail.com> Hi Jan-Mathijs, I read you loud and clear. Richard, if you think the method Jan-Mathijs describes will work for your application, I can explain to you my method for computing it using FT. Best, C. > On 30 Aug 2015, at 17:40, Schoffelen, J.M. (Jan Mathijs) wrote: > > Hi Richard, > > In general it is not possible to obtain a ‘single observation’ phase synchrony metric, where this metric is based on the distributional properties (i.e. across observations) of the phase difference. This holds not only for quantities like coherence, but also for WPLI. This being said, one could resort to a leave-one-out strategy, called jackknifing, to get an estimate of how much an individual trial contributes to the overall connectivity estimate. This has been formally described in http://www.sciencedirect.com/science/article/pii/S1053811915003316. Note that in order for this to work, you still need to have multiple trials in your input data. FieldTrip used to support the cfg.jackknife option in ft_connectivityanalysis for the computation of coherence, but I don’t know to what extent this generalizes to WPLI. Also, it’s been a while that I used this (i.e. jackknife) option (for coherence), so I am not sure whether this is still operational in the current version of FieldTrip. (since this option is a bit obscure, we have not done our utmost best to maintain backward-compatibility of the code here, so things may have been broken by general improvements to the code base). If you would like to follow up on this, I suggest you to contact the first author on the paper mentioned (above), I am sure that Craig would be willing to point you into the right direction (as far as he is not yet reading along … Craig, do you copy, over?). > > Best, > Jan-Mathijs > > > > On Aug 28, 2015, at 7:02 PM, Richard Bethlehem wrote: > >> Dear Fieldtrippers, >> >> Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? >> >> Cheers, >> >> Richard >> >> ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From jia.wu at yale.edu Mon Aug 31 22:33:32 2015 From: jia.wu at yale.edu (Wu, Jia) Date: Mon, 31 Aug 2015 20:33:32 +0000 Subject: [FieldTrip] beamformer on EEG data Message-ID: Hi, I'm new to the community and fieldtrip. I'm trying to use beamformer to do oscillatory source localization on some EEG data. I thought I stumbled upon some tutorial specific on this top on the fieldtrip wiki, but I couldn't find it any more. Most source localization materials seem to be for MEG data. And I've been confused about the steps to build a correct headmodel, sourcemodel, leadfield based on only EEG information. Anybody has a quick link to the tutorial? If such tutorial doesn't exist I will email the group about my specific questions. best, -jia -------------- next part -------------- An HTML attachment was scrubbed... URL: From lindseyrtate at ou.edu Sat Aug 1 01:29:05 2015 From: lindseyrtate at ou.edu (Tate, Lindsey R.) Date: Fri, 31 Jul 2015 23:29:05 +0000 Subject: [FieldTrip] Virtual EOG Channel Message-ID: <69FCE2607D920B4D97BD3BA9941176E70166A300F4@it-osmium.sooner.net.ou.edu> Hello community, My name is Lindsey Tate, and I'm a PhD student at the University of Oklahoma. I'm starting work on a project analyzing data that my mentor collected previously at another institution. This data includes EEG and MEG during a saccade and anti-saccade task. My mentor previously used BESA which I have no access to currently but may have limited access to in the future. She explained that when they collected the data they didn't collect EOG channels to measure eye movements because these movements can be picked up by other channels, and in BESA there is a short process to creating a "virtual EOG" channel from the other/nearby channels. I can't find any documentation of someone doing this outside of BESA. Has anyone ever done this before in FieldTrip? If so, how did you do it and how were the results? If not, do you have ideas about how you could do such a thing? Thank you in advance for any help or advice you can offer, Lindsey -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Aug 3 08:02:16 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 3 Aug 2015 06:02:16 +0000 Subject: [FieldTrip] Virtual EOG Channel In-Reply-To: <69FCE2607D920B4D97BD3BA9941176E70166A300F4@it-osmium.sooner.net.ou.edu> References: <69FCE2607D920B4D97BD3BA9941176E70166A300F4@it-osmium.sooner.net.ou.edu> Message-ID: Hi Lindsey, You might want to have a look at some parts of the following page: http://www.fieldtriptoolbox.org/example/preprocessing_eeg?s[]=rereferencing I think it contains the information that you are looking for. Best wishes, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org On Aug 1, 2015, at 1:29 AM, Tate, Lindsey R. > wrote: Hello community, My name is Lindsey Tate, and I'm a PhD student at the University of Oklahoma. I'm starting work on a project analyzing data that my mentor collected previously at another institution. This data includes EEG and MEG during a saccade and anti-saccade task. My mentor previously used BESA which I have no access to currently but may have limited access to in the future. She explained that when they collected the data they didn't collect EOG channels to measure eye movements because these movements can be picked up by other channels, and in BESA there is a short process to creating a "virtual EOG" channel from the other/nearby channels. I can't find any documentation of someone doing this outside of BESA. Has anyone ever done this before in FieldTrip? If so, how did you do it and how were the results? If not, do you have ideas about how you could do such a thing? Thank you in advance for any help or advice you can offer, Lindsey _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Mon Aug 3 09:37:58 2015 From: jorn at artinis.com (=?iso-8859-1?Q?J=F6rn_M._Horschig?=) Date: Mon, 3 Aug 2015 09:37:58 +0200 Subject: [FieldTrip] Effect of cfg.minnbchan In-Reply-To: References: Message-ID: <007e01d0cdbf$51a83490$f4f89db0$@artinis.com> Dear Marlies, if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: % For every (time,frequency)-element, it is calculated how many significant % neighbours .this channel has If a significant channel has less than minnbchan % significant neighbours, then this channel is removed from onoff. If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers Sent: Friday, July 31, 2015 3:27 PM To: fieldtrip, donders Subject: [FieldTrip] Effect of cfg.minnbchan Dear Fieldtrippers. I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. The code I used to run this analysis is pasted below. Thanks in advance! Best, Marlies Marlies Vissers PhD student University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl --- % Import the electrode labels from an EEGlab set elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); % Create matrix with TF data freqData.freq = frex; % Frequenies of TF matrix freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix freqData.dimord = 'subj_chan_freq_time'; freqData.label = elec.label; freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time % Create matrix with behavioral data, make sure the sizes match behav.freq = frex; behav.time = tx(TF_idx(1):TF_idx(2))./1000; behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix behav.label = elec.label; behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctr m,4)]); % accEffect is 1*subj array % Set configuration for perm test % Create cfg and insert parameters cfg = []; cfg.latency = [0 1.250]; cfg.frequency = [2 30]; cfg.channel ='all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_intersubcorr'; cfg.type = ft_getopt(cfg, 'type', 'Spearman'); cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; cfg_neighb.method = 'template'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); % Create design mat subj = 31; design = zeros(2,2*subj); for i = 1:subj design(2,i) = i; end for i = 1:subj design(2,subj+i) = i; end design(1,1:subj) = 1; design(1,subj+1:2*subj) = 2; cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; % Run stats [stat] = ft_freqstatistics(cfg,freqData,behav); -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Mon Aug 3 09:56:41 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Mon, 3 Aug 2015 07:56:41 +0000 Subject: [FieldTrip] Undefined function or variable "lab" In-Reply-To: References: Message-ID: <77A6E025-667C-4255-BF8B-B22197BF3678@fcdonders.ru.nl> Hi Ervin, Given the information provided, it’s still hard to tell what might be going on. What version of FieldTrip are you using, and what does dataTarget.elec look like? What do your colleagues have to say about this? (The reason for the last question is, that they most likely have most hands-on experience with the quirks of the particular dataformat you are working with, and thus will be able to provide more specific input than the people who occasionally read posts on this list). Also, the statement that an ‘older version of fieldtrip works’ is quite unspecific (e.g. are your colleagues using a 2009-version of the code, or a more recent one :o)? Is there code totally unmodified, or did they made some code changes in order for it to work?), so I don’t think that this is going to bring you close to a solution. Yet, I think it is good diagnostic information to know that somewhere in the past ‘it’ seemed to work, either with or without local changes. Would it make sense for you to team up with your colleagues to find on what’s going on? Best, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org On Jul 31, 2015, at 2:00 PM, Poljac, E. (Ervin) > wrote: Anyone an idea of what might be wrong here? Much appreciated, Ervin ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Poljac, E. (Ervin) [ervin.poljac at donders.ru.nl] Sent: Monday, July 27, 2015 1:54 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Undefined function or variable "lab" Hello fieldtrippers, I am trying to prepare my EEG data for analysis. Among others, I identify bad channels and try to repair them. However, there is this annoying error: Undefined function or variable "lab". Error in channelposition (line 314) n = size(lab,2); Error in ft_datatype_sens (line 329) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_raw (line 146) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 225) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_channelrepair (line 102) data = ft_checkdata(data, 'datatype', 'raw', 'feedback', 'yes'); In the debug mode I see that the variable 'sens' has a correct value, the bad channel seems to be identified, but then for some reason, lab is not filled. I am copy-pasting that part of my code below. I hope someone has experience with this and how to solve it. Some of my colleagues use an older fieldtrip version that works (so, no error there), and I compared the filein s ft_checkdata, ft_datatype_sens and ft_datatype_sens, they are different, but it is not obvious to me what exactly is new, causing the error. Many thanks, Ervin My code: %% channel rejection, identifying bad channels for target condition cfg=[]; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = [50];% frequency band - foilim or just foi?? rejectedData=ft_freqanalysis(cfg,dataTarget); idx=unique([find(rejectedData.powspctrm>0.5*10^4)]); %this threshold might change for each recording neighbours=open('/Users/Ervin/Documents/MATLAB/biosemi64_neighb.mat'); neighbours=neighbours.neighbours; cfg = []; cfg.channel = rejectedData.label; cfg.layout = 'biosemi64.lay'; cfg.feedback = 'yes'; lay = ft_prepare_layout(cfg); if ~isempty(idx) badchannels=cell(numel(idx),1); [badchannels{1:numel(idx),1}] = deal(rejectedData.label{idx}); % Interpolation for rejected channels cfg=[]; cfg.layout=lay; cfg.badchannel=badchannels; dataTarget.elec.label = dataTarget.label; dataTarget.elec.pnt = lay.pos; cfg.neighbours=neighbours; dataTargetRepaired=ft_channelrepair(cfg, dataTarget); end -- Ervin Poljac, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition (DCC) Radboud University Nijmegen Room B.00.78A Montessorilaan 3 6500 HE Nijmegen T. 024 36 15457 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Mon Aug 3 12:29:22 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Mon, 3 Aug 2015 10:29:22 +0000 (UTC) Subject: [FieldTrip] ft_checkconfig Message-ID: <1647214019.423212.1438597762591.JavaMail.yahoo@mail.yahoo.com> Hi, I am new in fieldtrip. I am trying to create a realtime EEG data from bioamplifier.I call ft_realtime_signalviewer function and receives this error : cfg = ft_checkconfig(cfg,'dataset2files', 'yes'); I am using Matlab 2013, 64 bits windows 7. Any help is very helpful.  Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From elmeri.syrjanen at gmail.com Mon Aug 3 15:16:10 2015 From: elmeri.syrjanen at gmail.com (=?UTF-8?Q?Elmeri_Syrj=C3=A4nen?=) Date: Mon, 3 Aug 2015 15:16:10 +0200 Subject: [FieldTrip] Virtual EOG Channel In-Reply-To: References: <69FCE2607D920B4D97BD3BA9941176E70166A300F4@it-osmium.sooner.net.ou.edu> Message-ID: Hi, here is some code that works well for me: % Create a virtual channel of frontal electrodes for finding eye-blinks cfg = []; cfg.layout = 'biosemi128.lay'; cfg.channel = {'C30', 'C29', 'C17', 'C16', 'C8'}; EOGdata = ft_preprocessing(cfg, ERPdata); cfg = []; cfg.avgoverchan = 'yes'; EOGdata = ft_selectdata(cfg, EOGdata); EOGdata.label = {'EOG'}; /elmeri On Mon, Aug 3, 2015 at 8:02 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Lindsey, > > You might want to have a look at some parts of the following page: > http://www.fieldtriptoolbox.org/example/preprocessing_eeg?s[]=rereferencing > I think it contains the information that you are looking for. > > Best wishes, > Jan-Mathijs > > > Jan-Mathijs Schoffelen, MD PhD, Senior researcher > > Max Planck Institute for Psycholinguistics > Donders Centre for Cognitive Neuroimaging > > E-mail: j.schoffelen at donders.ru.nl > Telephone: +31-24-3614793 > > http://www.hettaligebrein.nl > http://www.fieldtriptoolbox.org > > > > On Aug 1, 2015, at 1:29 AM, Tate, Lindsey R. wrote: > > Hello community, > > My name is Lindsey Tate, and I'm a PhD student at the University of > Oklahoma. I'm starting work on a project analyzing data that my mentor > collected previously at another institution. This data includes EEG and MEG > during a saccade and anti-saccade task. My mentor previously used BESA > which I have no access to currently but may have limited access to in the > future. She explained that when they collected the data they didn't collect > EOG channels to measure eye movements because these movements can be picked > up by other channels, and in BESA there is a short process to creating a > "virtual EOG" channel from the other/nearby channels. I can't find any > documentation of someone doing this outside of BESA. > > Has anyone ever done this before in FieldTrip? If so, how did you do it > and how were the results? If not, do you have ideas about how you could do > such a thing? > > Thank you in advance for any help or advice you can offer, > Lindsey > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Tue Aug 4 11:31:52 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Tue, 4 Aug 2015 09:31:52 +0000 (UTC) Subject: [FieldTrip] realtime TMS-EEG Message-ID: <191681055.167105.1438680712821.JavaMail.yahoo@mail.yahoo.com> Hi, I'm using TMSI Porti and I want to record the data in realtime.However, it is not working when I used the ft_realtime_signalviewer.Does I miss any step? Any solution guys? Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Tue Aug 4 11:59:08 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Tue, 4 Aug 2015 09:59:08 +0000 Subject: [FieldTrip] realtime TMS-EEG In-Reply-To: <191681055.167105.1438680712821.JavaMail.yahoo@mail.yahoo.com> References: <191681055.167105.1438680712821.JavaMail.yahoo@mail.yahoo.com> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB51857F@exprd01.hosting.ru.nl> Dear Wan, Please have a look at this page: http://www.fieldtriptoolbox.org/development/realtime (also specific to TMSi: http://www.fieldtriptoolbox.org/development/realtime/tmsi) The pages might not be fully up to date but they should help you get started. If you then run into problems please help us help you by supplying the following: § The cfg you used § The fields of your data structure § The line you called that gave an error / that you would like to ask a question on § The exact error message you got Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of wan amirah Wan azlan Sent: dinsdag 4 augustus 2015 11:32 To: fieldtrip at science.ru.nl Subject: [FieldTrip] realtime TMS-EEG Hi, I'm using TMSI Porti and I want to record the data in realtime. However, it is not working when I used the ft_realtime_signalviewer. Does I miss any step? Any solution guys? Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bushra.riaz at gu.se Tue Aug 4 14:48:15 2015 From: bushra.riaz at gu.se (Bushra Riaz Syeda) Date: Tue, 4 Aug 2015 12:48:15 +0000 Subject: [FieldTrip] 2 days left! Post-doc position in MEG for children with brain cancer... Message-ID: Just a reminder since the deadline is approaching... ________________________________ From: Justin Schneiderman Subject: Post-doc position in MEG for children with brain cancer... Dear colleagues and friends, I'm pleased to announce an open position in our growing MEG group: Postdoctoral researcher in MEG for children with brain cancer at MedTech West (www.medtechwest.se) and the University of Gothenburg Institute of Neuroscienceand Physiology (http://neurophys.gu.se/english) in collaboration with the Sahlgrenska University Hospital, Queen Silvia Children's Hospital, and Sweden's MEG lab at Karolinska Institutet, NatMEG (www.natmeg.se). More information about the position and application procedure can be found here: http://www.gu.se/english/about_the_university/announcements-in-the-job-application-portal/?languageId=100001&disableRedirect=true&returnUrl=http%3A%2F%2Fwww.gu.se%2Fomuniversitetet%2Faktuellt%2Fledigaanstallningar%2F%3Fid%3D19144%26Dnr%3D712083%26Type%3DS&Dnr=712083&Type=S Please forward this to colleagues, soon-to-graduate PhD students, and others that might be interested. Application deadline is 6 AUG. Thanks! -Justin MedTech West http://www.medtechwest.se Institute of Neuroscience and Physiology Sahlgrenska Academy & University of Gothenburg? -------------- next part -------------- An HTML attachment was scrubbed... URL: From caspervanheck at gmail.com Tue Aug 4 16:36:49 2015 From: caspervanheck at gmail.com (Casper van Heck) Date: Tue, 4 Aug 2015 16:36:49 +0200 Subject: [FieldTrip] Fourier analysis units Message-ID: Dear fellow Fieldtrippers, I've made some Fourier analyses using *ft_freqanalysis* with *cfg.method = 'mtmfft'*, and found something worth reporting. However, Fieldtrip does not report the units. Looking at conversations in the Fieldtrip discussion archive, it would seem this question has either been sidestepped or not answered in the past, so I'd like to ask this question again. Does anybody know? Best regards, Casper -------------- next part -------------- An HTML attachment was scrubbed... URL: From marliesvissers at gmail.com Tue Aug 4 16:38:57 2015 From: marliesvissers at gmail.com (Marlies Vissers) Date: Tue, 4 Aug 2015 16:38:57 +0200 Subject: [FieldTrip] Effect of cfg.minnbchan In-Reply-To: <007e01d0cdbf$51a83490$f4f89db0$@artinis.com> References: <007e01d0cdbf$51a83490$f4f89db0$@artinis.com> Message-ID: Dear Jörn, Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error *‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’*. If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? Thanks in advance! Best, Marlies On 3 August 2015 at 09:37, Jörn M. Horschig wrote: > Dear Marlies, > > > > if I am not mistaken, the minnbchan option checks indeed if every channels > in a cluster has at least the specified amount of channels in it and > removes it otherwise. The code is documented as follows: > > % For every (time,frequency)-element, it is calculated how many > significant > > % neighbours .this channel has If a significant channel has less than > minnbchan > > % significant neighbours, then this channel is removed from onoff. > > > > If something went wrong is hard to tell – it also depends on how the > neighbor structure looks like. If you do not have C3 or C1, then C5 can > indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz > could be called a neighbor of FC4. You can check how neighbors are defined > by using ft_neighbourplot. That’s the first check I’d do. > > > > Best, > > Jörn > > > > > > *--* > > > > *Jörn M. Horschig, PhD*, Software Engineer > > Artinis Medical Systems | +31 481 350 980 > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Marlies Vissers > *Sent:* Friday, July 31, 2015 3:27 PM > *To:* fieldtrip, donders > *Subject:* [FieldTrip] Effect of cfg.minnbchan > > > > Dear Fieldtrippers. > > > > I have a question about the effect of the tuning parameter cfg.minnbchan > when performing cluster based permutation testing, since the spatial > characteristics of my clusters differ from what I expected to find given > the settings I used. > > > > I am running cross-subject correlations (n=31) between a behavioral > variable and a subj*channel*time*frequency matrix with power data > (preprocessed using EEGlab and decomposed outside of Fieldtrip), using > ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd > like to avoid finding clusters with difficult-to-interpret shapes, I set > cfg.minnbchan to 2. > > > > My concern however, is that the resulting clusters do not always exist of > neighbouring electrodes. For example, one of the resulting clusters is > located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected > through the other dimensions (time & frequency). In one of Eric Maris' > previous replies to an older post about cfg.minnbchan, I read that the > parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. > Does this mean that any cluster without spatially neighbouring electrodes > should have been rejected when minnbchan is set to 2? > > > > I would be very grateful if someone could let me know whether setting > cfg.minnbchan to 2 can -in principle- still yield clusters with > spatially-non-adjacent electrodes, or whether this result is likely due to > an error in my code. If the latter, I'd very much appreciate advice on > checks I could perform to detect the potential error. > > > > The code I used to run this analysis is pasted below. > > > > Thanks in advance! > > > > Best, > > Marlies > > > > Marlies Vissers > > PhD student > > > > University of Amsterdam | Department Brain and Cognition | Cognition and > Plasticity Laboratory > > Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl > > > > --- > > > > % Import the electrode labels from an EEGlab set > > elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); > > > > % Create matrix with TF data > > freqData.freq = frex; % Frequenies > of TF matrix > > freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix > > freqData.dimord = 'subj_chan_freq_time'; > > freqData.label = elec.label; > > freqData.powspctrm = tempTF; % tempTF is matrix with > subj*channels*freq*time > > > > % Create matrix with behavioral data, make sure the sizes match > > behav.freq = frex; > > behav.time = tx(TF_idx(1):TF_idx(2))./1000; > > behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is > just behavioral data in this matrix > > behav.label = elec.label; > > behav.powspctrm = repmat(accEffect,[1 > size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); > % accEffect is 1*subj array > > > > % Set configuration for perm test > > % Create cfg and insert parameters > > cfg = []; > > cfg.latency = [0 1.250]; > > cfg.frequency = [2 30]; > > cfg.channel ='all'; > > cfg.method = 'montecarlo'; > > cfg.statistic = 'ft_statfun_intersubcorr'; > > cfg.type = ft_getopt(cfg, 'type', 'Spearman'); > > cfg.correctm = 'cluster'; > > cfg.clusteralpha = 0.05; > > cfg.clusterstatistic = 'maxsum'; > > cfg.minnbchan = 2; > > cfg.tail = 0; > > cfg.clustertail = 0; > > cfg.alpha = 0.025; > > cfg.numrandomization = 1000; > > > > % prepare_neighbours determines what sensors may form clusters: load > Biosemi 64 channel cap > > cfg.template = [fieldtripdir thisSlash 'template' thisSlash > 'neighbours' thisSlash 'biosemi64_neighb.mat']; > > cfg.layout = [fieldtripdir thisSlash 'template' > thisSlash 'layout' thisSlash 'biosemi64.lay']; > > cfg_neighb.method = 'template'; > > cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); > > > > % Create design mat > > subj = 31; > > design = zeros(2,2*subj); > > for i = 1:subj > > design(2,i) = i; > > end > > for i = 1:subj > > design(2,subj+i) = i; > > end > > design(1,1:subj) = 1; > > design(1,subj+1:2*subj) = 2; > > cfg.design = design; > > cfg.ivar = 1; > > cfg.uvar = 2; > > > > % Run stats > > [stat] = ft_freqstatistics(cfg,freqData,behav); > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Wed Aug 5 09:13:25 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Wed, 5 Aug 2015 07:13:25 +0000 Subject: [FieldTrip] Fourier analysis units In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB519825@exprd01.hosting.ru.nl> Dear Casper, The units of the power spectrum depends on the units of your input data. For example, if your input data is in microvolts, the unit of the power spectrum is microvolts^2 (give that cfg.output=’pow’). Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Casper van Heck Sent: dinsdag 4 augustus 2015 16:37 To: FieldTrip discussion list Subject: [FieldTrip] Fourier analysis units Dear fellow Fieldtrippers, I've made some Fourier analyses using ft_freqanalysis with cfg.method = 'mtmfft', and found something worth reporting. However, Fieldtrip does not report the units. Looking at conversations in the Fieldtrip discussion archive, it would seem this question has either been sidestepped or not answered in the past, so I'd like to ask this question again. Does anybody know? Best regards, Casper -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Wed Aug 5 14:54:09 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Wed, 5 Aug 2015 12:54:09 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 4 In-Reply-To: References: Message-ID: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> Dear Marlies, I did not go through all details of your correspondence with Jorn, but let me add a few remarks from a birds-eye perspective. 1. Your statfun is intersubjcorr, which evaluates the correlation over subjects between a neuronal and a behavioural variable, with the neuronal variable typically being high-dimensional, and thereby creating a multiple comparisons problem. Btw, I don’t like the name intersubjcorr, because the correlation is over subjects and not between (=inter). 2. I’m puzzled by where the connectivity matrix comes from, because your analysis does not involve between-channel quantities. In fact, from the perspective of the neuronal data, it is a typical univariate analysis in which every channel is treated separately. The only between-aspect in your study involves the relation between the (high-dimensional) neuronal variable and the (one-dimensional) behavioral variable. 3. Fieldtrip has no cluster-based statistics implemented that clusters channel-pairs, except for the trivial case in which you select a single reference channel for which you evaluate the coupling with all other channels (as in Maris, Schoffelen & Fries, 2007). best, Eric From: Marlies Vissers > Subject: Re: [FieldTrip] Effect of cfg.minnbchan Date: 4 Aug 2015 16:38:57 CEST To: FieldTrip discussion list > Reply-To: FieldTrip discussion list > Dear Jörn, Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error ‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’. If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? Thanks in advance! Best, Marlies On 3 August 2015 at 09:37, Jörn M. Horschig > wrote: Dear Marlies, if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: % For every (time,frequency)-element, it is calculated how many significant % neighbours .this channel has If a significant channel has less than minnbchan % significant neighbours, then this channel is removed from onoff. If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers Sent: Friday, July 31, 2015 3:27 PM To: fieldtrip, donders > Subject: [FieldTrip] Effect of cfg.minnbchan Dear Fieldtrippers. I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. The code I used to run this analysis is pasted below. Thanks in advance! Best, Marlies Marlies Vissers PhD student University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl --- % Import the electrode labels from an EEGlab set elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); % Create matrix with TF data freqData.freq = frex; % Frequenies of TF matrix freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix freqData.dimord = 'subj_chan_freq_time'; freqData.label = elec.label; freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time % Create matrix with behavioral data, make sure the sizes match behav.freq = frex; behav.time = tx(TF_idx(1):TF_idx(2))./1000; behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix behav.label = elec.label; behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array % Set configuration for perm test % Create cfg and insert parameters cfg = []; cfg.latency = [0 1.250]; cfg.frequency = [2 30]; cfg.channel ='all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_intersubcorr'; cfg.type = ft_getopt(cfg, 'type', 'Spearman'); cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; cfg_neighb.method = 'template'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); % Create design mat subj = 31; design = zeros(2,2*subj); for i = 1:subj design(2,i) = i; end for i = 1:subj design(2,subj+i) = i; end design(1,1:subj) = 1; design(1,subj+1:2*subj) = 2; cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; % Run stats [stat] = ft_freqstatistics(cfg,freqData,behav); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Wed Aug 5 15:04:53 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Wed, 5 Aug 2015 15:04:53 +0200 Subject: [FieldTrip] Effect of cfg.minnbchan In-Reply-To: References: <007e01d0cdbf$51a83490$f4f89db0$@artinis.com> Message-ID: <00c701d0cf7f$520ec400$f62c4c00$@artinis.com> Dear Marlies, the channelconnectivity function is in a private directory, therefore not directly executable. If you are keen on pursuing this, you can copy it out or cd into that directory. However, check Eric’s response, from which it seems that you might on to something that is not intended to be happening ;) did you ever run into these problems with a “normal” test, say a depsampleT test as described in the FT tutorial? Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers Sent: Tuesday, August 4, 2015 4:39 PM To: FieldTrip discussion list Subject: Re: [FieldTrip] Effect of cfg.minnbchan Dear Jörn, Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error ‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’. If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? Thanks in advance! Best, Marlies On 3 August 2015 at 09:37, Jörn M. Horschig > wrote: Dear Marlies, if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: % For every (time,frequency)-element, it is calculated how many significant % neighbours .this channel has If a significant channel has less than minnbchan % significant neighbours, then this channel is removed from onoff. If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl ] On Behalf Of Marlies Vissers Sent: Friday, July 31, 2015 3:27 PM To: fieldtrip, donders > Subject: [FieldTrip] Effect of cfg.minnbchan Dear Fieldtrippers. I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. The code I used to run this analysis is pasted below. Thanks in advance! Best, Marlies Marlies Vissers PhD student University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl --- % Import the electrode labels from an EEGlab set elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); % Create matrix with TF data freqData.freq = frex; % Frequenies of TF matrix freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix freqData.dimord = 'subj_chan_freq_time'; freqData.label = elec.label; freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time % Create matrix with behavioral data, make sure the sizes match behav.freq = frex; behav.time = tx(TF_idx(1):TF_idx(2))./1000; behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix behav.label = elec.label; behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array % Set configuration for perm test % Create cfg and insert parameters cfg = []; cfg.latency = [0 1.250]; cfg.frequency = [2 30]; cfg.channel ='all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_intersubcorr'; cfg.type = ft_getopt(cfg, 'type', 'Spearman'); cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; cfg_neighb.method = 'template'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); % Create design mat subj = 31; design = zeros(2,2*subj); for i = 1:subj design(2,i) = i; end for i = 1:subj design(2,subj+i) = i; end design(1,1:subj) = 1; design(1,subj+1:2*subj) = 2; cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; % Run stats [stat] = ft_freqstatistics(cfg,freqData,behav); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Wed Aug 5 15:11:05 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 5 Aug 2015 13:11:05 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 4 In-Reply-To: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> References: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> Message-ID: <431477C1-7C6F-4D4D-96F5-1C80729B3140@fcdonders.ru.nl> Hi Eric, Allow me to chime in to avoid any confusion from your side regarding point 2). I think that Marlies refers to a boolean spatial adjacency matrix that defines whether channels are neighbours, or not. In the code, this is referred to as a matrix named ‘connectivity’, which may not be the most obvious denomination. At some point in time we have made some low-level changes in the FieldTrip code, concerning the treatment of the spatial dimension for the clustering, which allows to treat spatial clustering along edges along a triangulated mesh (e.g. dipole locations defined on the cortical sheet) in the same way as spatial clustering on an extracranial channel array. Channel clustering is now a ‘special case’ where the cfg.neighbours structure array is converted into the boolean adjancency matrix, by the low-level channelconnectivity function, which is in fieldtrip/private. Best, Jan-Mathijs On Aug 5, 2015, at 2:54 PM, Maris, E.G.G. (Eric) > wrote: Dear Marlies, I did not go through all details of your correspondence with Jorn, but let me add a few remarks from a birds-eye perspective. 1. Your statfun is intersubjcorr, which evaluates the correlation over subjects between a neuronal and a behavioural variable, with the neuronal variable typically being high-dimensional, and thereby creating a multiple comparisons problem. Btw, I don’t like the name intersubjcorr, because the correlation is over subjects and not between (=inter). 2. I’m puzzled by where the connectivity matrix comes from, because your analysis does not involve between-channel quantities. In fact, from the perspective of the neuronal data, it is a typical univariate analysis in which every channel is treated separately. The only between-aspect in your study involves the relation between the (high-dimensional) neuronal variable and the (one-dimensional) behavioral variable. 3. Fieldtrip has no cluster-based statistics implemented that clusters channel-pairs, except for the trivial case in which you select a single reference channel for which you evaluate the coupling with all other channels (as in Maris, Schoffelen & Fries, 2007). best, Eric From: Marlies Vissers > Subject: Re: [FieldTrip] Effect of cfg.minnbchan Date: 4 Aug 2015 16:38:57 CEST To: FieldTrip discussion list > Reply-To: FieldTrip discussion list > Dear Jörn, Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error ‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’. If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? Thanks in advance! Best, Marlies On 3 August 2015 at 09:37, Jörn M. Horschig > wrote: Dear Marlies, if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: % For every (time,frequency)-element, it is calculated how many significant % neighbours .this channel has If a significant channel has less than minnbchan % significant neighbours, then this channel is removed from onoff. If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers Sent: Friday, July 31, 2015 3:27 PM To: fieldtrip, donders > Subject: [FieldTrip] Effect of cfg.minnbchan Dear Fieldtrippers. I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. The code I used to run this analysis is pasted below. Thanks in advance! Best, Marlies Marlies Vissers PhD student University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl --- % Import the electrode labels from an EEGlab set elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); % Create matrix with TF data freqData.freq = frex; % Frequenies of TF matrix freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix freqData.dimord = 'subj_chan_freq_time'; freqData.label = elec.label; freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time % Create matrix with behavioral data, make sure the sizes match behav.freq = frex; behav.time = tx(TF_idx(1):TF_idx(2))./1000; behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix behav.label = elec.label; behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array % Set configuration for perm test % Create cfg and insert parameters cfg = []; cfg.latency = [0 1.250]; cfg.frequency = [2 30]; cfg.channel ='all'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_intersubcorr'; cfg.type = ft_getopt(cfg, 'type', 'Spearman'); cfg.correctm = 'cluster'; cfg.clusteralpha = 0.05; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.tail = 0; cfg.clustertail = 0; cfg.alpha = 0.025; cfg.numrandomization = 1000; % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; cfg_neighb.method = 'template'; cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); % Create design mat subj = 31; design = zeros(2,2*subj); for i = 1:subj design(2,i) = i; end for i = 1:subj design(2,subj+i) = i; end design(1,1:subj) = 1; design(1,subj+1:2*subj) = 2; cfg.design = design; cfg.ivar = 1; cfg.uvar = 2; % Run stats [stat] = ft_freqstatistics(cfg,freqData,behav); _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From a.stolk8 at gmail.com Wed Aug 5 16:45:06 2015 From: a.stolk8 at gmail.com (Arjen Stolk) Date: Wed, 5 Aug 2015 07:45:06 -0700 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 4 In-Reply-To: <431477C1-7C6F-4D4D-96F5-1C80729B3140@fcdonders.ru.nl> References: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> <431477C1-7C6F-4D4D-96F5-1C80729B3140@fcdonders.ru.nl> Message-ID: And to briefly chime in on point 1, i believe that statfun has changed its name to correlationT some time ago. Yours, Arjen > On Aug 5, 2015, at 6:11 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > > Hi Eric, > > Allow me to chime in to avoid any confusion from your side regarding point 2). I think that Marlies refers to a boolean spatial adjacency matrix that defines whether channels are neighbours, or not. In the code, this is referred to as a matrix named ‘connectivity’, which may not be the most obvious denomination. At some point in time we have made some low-level changes in the FieldTrip code, concerning the treatment of the spatial dimension for the clustering, which allows to treat spatial clustering along edges along a triangulated mesh (e.g. dipole locations defined on the cortical sheet) in the same way as spatial clustering on an extracranial channel array. Channel clustering is now a ‘special case’ where the cfg.neighbours structure array is converted into the boolean adjancency matrix, by the low-level channelconnectivity function, which is in fieldtrip/private. > > Best, > Jan-Mathijs > >> On Aug 5, 2015, at 2:54 PM, Maris, E.G.G. (Eric) wrote: >> >> Dear Marlies, >> >> I did not go through all details of your correspondence with Jorn, but let me add a few remarks from a birds-eye perspective. >> >> 1. Your statfun is intersubjcorr, which evaluates the correlation over subjects between a neuronal and a behavioural variable, with the neuronal variable typically being high-dimensional, and thereby creating a multiple comparisons problem. Btw, I don’t like the name intersubjcorr, because the correlation is over subjects and not between (=inter). >> 2. I’m puzzled by where the connectivity matrix comes from, because your analysis does not involve between-channel quantities. In fact, from the perspective of the neuronal data, it is a typical univariate analysis in which every channel is treated separately. The only between-aspect in your study involves the relation between the (high-dimensional) neuronal variable and the (one-dimensional) behavioral variable. >> 3. Fieldtrip has no cluster-based statistics implemented that clusters channel-pairs, except for the trivial case in which you select a single reference channel for which you evaluate the coupling with all other channels (as in Maris, Schoffelen & Fries, 2007). >> >> best, >> Eric >> >> >>> >>> >>> From: Marlies Vissers >>> Subject: Re: [FieldTrip] Effect of cfg.minnbchan >>> Date: 4 Aug 2015 16:38:57 CEST >>> To: FieldTrip discussion list >>> Reply-To: FieldTrip discussion list >>> >>> >>> Dear Jörn, >>> >>> Thanks for your reply and suggestion! My neighbourhood-definitions look fine according to ft_neighbourplot. >>> However, I am not sure whether the connectivity matrix in my output (stat.cfg.connectivity) is correct. For example, I inspected which channels are defined as neighbours of C5 in the connectivity matrix. Here, I assumed the channel order in this matrix resembles the channel order defined by the function ‘ft_read_sens’, as stored in the field elec.label. >>> Using this particular organization of electrodes, the pattern of spatially neighbouring channels matches the strange spatial distribution of one of my resulting clusters. >>> E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern matches my strange result, where a cluster consisting of FC4, Cz, and C5, survived cluster correction with minnbchan set to 2. >>> >>> I am currently trying to establish whether my cfg.connectivity matrix is indeed the problem, and where this problem arises. One thing I suspect might be the cause is that the call to ‘channelconnectivity’ by ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure directly (but not when running ft_freqstatistics), I get the following error ‘Undefined function 'channelconnectivity' for input arguments of type 'struct'’. >>> If channelconnectivity was not properly run, it could be that the electrode ordering as defined by ft_read_sens is not adjusted to the order used by cfg.neighbours before construction of the connectivity matrix. However, when I just run ft_freqstatistics, I do not get an error that suggests any problems with ‘channelconnectivity’, so I am not entirely sure whether this error also occurs when running the analysis as a whole. >>> >>> Could you (or anyone else) give me any advice on how to make sure that the definition of neighbours in the connectivity matrix is constructed using the properly reordered vector with channel indices (the variable sel2 in channelconnectivity if I’m correct)? >>> >>> Thanks in advance! >>> >>> Best, >>> Marlies >>> >>>> On 3 August 2015 at 09:37, Jörn M. Horschig wrote: >>>> Dear Marlies, >>>> >>>> if I am not mistaken, the minnbchan option checks indeed if every channels in a cluster has at least the specified amount of channels in it and removes it otherwise. The code is documented as follows: >>>> % For every (time,frequency)-element, it is calculated how many significant >>>> % neighbours .this channel has If a significant channel has less than minnbchan >>>> % significant neighbours, then this channel is removed from onoff. >>>> >>>> If something went wrong is hard to tell – it also depends on how the neighbor structure looks like. If you do not have C3 or C1, then C5 can indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz could be called a neighbor of FC4. You can check how neighbors are defined by using ft_neighbourplot. That’s the first check I’d do. >>>> >>>> Best, >>>> Jörn >>>> >>>> >>>> -- >>>> >>>> Jörn M. Horschig, PhD, Software Engineer >>>> Artinis Medical Systems | +31 481 350 980 >>>> >>>> From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Marlies Vissers >>>> Sent: Friday, July 31, 2015 3:27 PM >>>> To: fieldtrip, donders >>>> Subject: [FieldTrip] Effect of cfg.minnbchan >>>> >>>> Dear Fieldtrippers. >>>> >>>> I have a question about the effect of the tuning parameter cfg.minnbchan when performing cluster based permutation testing, since the spatial characteristics of my clusters differ from what I expected to find given the settings I used. >>>> >>>> I am running cross-subject correlations (n=31) between a behavioral variable and a subj*channel*time*frequency matrix with power data (preprocessed using EEGlab and decomposed outside of Fieldtrip), using ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd like to avoid finding clusters with difficult-to-interpret shapes, I set cfg.minnbchan to 2. >>>> >>>> My concern however, is that the resulting clusters do not always exist of neighbouring electrodes. For example, one of the resulting clusters is located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected through the other dimensions (time & frequency). In one of Eric Maris' previous replies to an older post about cfg.minnbchan, I read that the parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. Does this mean that any cluster without spatially neighbouring electrodes should have been rejected when minnbchan is set to 2? >>>> >>>> I would be very grateful if someone could let me know whether setting cfg.minnbchan to 2 can -in principle- still yield clusters with spatially-non-adjacent electrodes, or whether this result is likely due to an error in my code. If the latter, I'd very much appreciate advice on checks I could perform to detect the potential error. >>>> >>>> The code I used to run this analysis is pasted below. >>>> >>>> Thanks in advance! >>>> >>>> Best, >>>> Marlies >>>> >>>> Marlies Vissers >>>> PhD student >>>> >>>> University of Amsterdam | Department Brain and Cognition | Cognition and Plasticity Laboratory >>>> Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl >>>> >>>> --- >>>> >>>> % Import the electrode labels from an EEGlab set >>>> elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); >>>> >>>> % Create matrix with TF data >>>> freqData.freq = frex; % Frequenies of TF matrix >>>> freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF matrix >>>> freqData.dimord = 'subj_chan_freq_time'; >>>> freqData.label = elec.label; >>>> freqData.powspctrm = tempTF; % tempTF is matrix with subj*channels*freq*time >>>> >>>> % Create matrix with behavioral data, make sure the sizes match >>>> behav.freq = frex; >>>> behav.time = tx(TF_idx(1):TF_idx(2))./1000; >>>> behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is just behavioral data in this matrix >>>> behav.label = elec.label; >>>> behav.powspctrm = repmat(accEffect,[1 size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); % accEffect is 1*subj array >>>> >>>> % Set configuration for perm test >>>> % Create cfg and insert parameters >>>> cfg = []; >>>> cfg.latency = [0 1.250]; >>>> cfg.frequency = [2 30]; >>>> cfg.channel ='all'; >>>> cfg.method = 'montecarlo'; >>>> cfg.statistic = 'ft_statfun_intersubcorr'; >>>> cfg.type = ft_getopt(cfg, 'type', 'Spearman'); >>>> cfg.correctm = 'cluster'; >>>> cfg.clusteralpha = 0.05; >>>> cfg.clusterstatistic = 'maxsum'; >>>> cfg.minnbchan = 2; >>>> cfg.tail = 0; >>>> cfg.clustertail = 0; >>>> cfg.alpha = 0.025; >>>> cfg.numrandomization = 1000; >>>> >>>> % prepare_neighbours determines what sensors may form clusters: load Biosemi 64 channel cap >>>> cfg.template = [fieldtripdir thisSlash 'template' thisSlash 'neighbours' thisSlash 'biosemi64_neighb.mat']; >>>> cfg.layout = [fieldtripdir thisSlash 'template' thisSlash 'layout' thisSlash 'biosemi64.lay']; >>>> cfg_neighb.method = 'template'; >>>> cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); >>>> >>>> % Create design mat >>>> subj = 31; >>>> design = zeros(2,2*subj); >>>> for i = 1:subj >>>> design(2,i) = i; >>>> end >>>> for i = 1:subj >>>> design(2,subj+i) = i; >>>> end >>>> design(1,1:subj) = 1; >>>> design(1,subj+1:2*subj) = 2; >>>> cfg.design = design; >>>> cfg.ivar = 1; >>>> cfg.uvar = 2; >>>> >>>> % Run stats >>>> [stat] = ft_freqstatistics(cfg,freqData,behav); >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Wed Aug 5 19:23:20 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Wed, 5 Aug 2015 19:23:20 +0200 Subject: [FieldTrip] EEG forward solution Message-ID: Hi all, I am working on constructing a forward model for source reconstruction using minimum-norm estimate. There are two tutorials on EEG forward solutions: http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate Each uses a somewhat different set of functions for calculating the source model and the volume conduction model but it is not clear whether these differences are real (i.e. yielding different outcomes) or only apparent (i.e. different ways of reaching the same result). Specifically, my question is: if I follow the tutorial http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg , all the way to the line... vol = ft_prepare_headmodel(cfg, bnd); ...to which I then add...: %source model cfg = [ ]; cfg.mri = mri_of_subject; sourceModel = ft_prepare_sourcemodel(cfg); % lead field cfg = [ ]; cfg.vol = vol; cfg.elec = electrode_positions; cfg.grid = sourceModel; leadfield = ft_prepare_leadfield(cfg); ...will this give me the same leadfield as the procedure outlined in http://www.fieldtriptoolbox.org/tutorial/minimumnormestimate ? If these are both valid ways of calculating the leadfield, but they do not yield equivalent results, what - in general - should be my considerations when choosing between the two? Thanks! Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From assaf.harel at wright.edu Thu Aug 6 08:39:04 2015 From: assaf.harel at wright.edu (Harel, Assaf) Date: Thu, 6 Aug 2015 06:39:04 +0000 Subject: [FieldTrip] Postdoc fellow at the Human Neuroscience and Visual Cognition & ASTECCA Laboratories Message-ID: POSTDOCTORAL FELLOW Human Neuroscience and Visual Cognition & ASTECCA Laboratories, Department of Psychology, Wright State University We are seeking a postdoctoral fellow to take a leading role in our research on the neurocognitive correlates of attentional control and lapses of attention in semi-structured ecological settings. The goal of this project is to rigorously characterize the relationship between laboratory measures of attentional control and failures of attention in realistic task contexts. We specifically aim to combine cognitive behavioral studies, ERP experiments, and computational modeling to test the extent to which laboratory measures can predict individual differences in susceptibility to attentional failures. We will investigate how these combined measures can be used to identify which individuals are most likely to benefit from a cognitive training paradigm aimed at enhancing attentional control. The postdoctoral fellow will be responsible for designing the studies, programming the experimental paradigms, recruiting participants, and collecting the data. In addition, the fellow will be responsible for data analysis and reporting the research findings in peer-reviewed journals. The position is fully funded for three years. The successful candidate will hold a PhD in Cognitive Neuroscience, Cognitive Psychology, Computer Science, or any other related discipline by the start date of the position. Experience in computer programming, especially with Matlab, and familiarity with fMRI or EEG research are required. Experience in computational cognitive modeling will be considered a strong advantage. The Department of Psychology is housed in the College of Science and Mathematics, offers a Ph.D. in Human Factors and Industrial/ Organizational Psychology, and has 3 undergraduate concentration areas: (1) Cognition and Perception, (2) Industrial/ Organizational, and (3) Behavioral Neuroscience. Wright State University was recently ranked among the "Best in the Midwest" universities by The Princeton Review, listed among 260 Best National Universities in the annual "America's Best Colleges" rankings by U.S. News and World Report, and ranked fourth nationally among universities with limited numbers of doctoral programs in the Faculty Scholarly Productivity Index. Wright State University is an Equal Opportunity/Affirmative Action Employer. For more information on this position contact Assaf Harel, Ph.D. at assaf.harel at wright.edu or Ion Juvina, Ph.D. at ion.juvina at wright.edu. Applicants should visit the following link to upload CV and statement of research: . In addition, please have three letters of reference sent directly to Ion Juvina, Ph.D., Assistant Professor, Department of Psychology, 313G Fawcett Hall, 3640 Colonel Glenn Hwy, Wright State University, Dayton, OH 45435. Review of complete applications will begin August 8, 2015, and continue until the position is filled. All new hires must go through a criminal background check before they can be hired. -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.thomas at nin.knaw.nl Thu Aug 6 16:32:10 2015 From: r.thomas at nin.knaw.nl (Rajat Thomas) Date: Thu, 6 Aug 2015 14:32:10 +0000 Subject: [FieldTrip] Error in Cluster permutation tutorial? Message-ID: <1438871530409.50689@nin.knaw.nl> Dear FieldTrippers, I followed the tutorial on http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics?s[]=cluster&s[]=permutation at the very end, I wanted to do the ft_clusterplot but then I did not get topoplots as a function of time as in the tutorial and instead just got one plot. Is there something wrong in the way the parameters are set in the tutorial. The last part is as follows: % make a plot cfg = []; cfg.highlightsymbolseries = ['*','*','.','.','.']; cfg.layout = 'CTF151.lay'; cfg.contournum = 0; cfg.markersymbol = '.'; cfg.alpha = 0.05; cfg.parameter='stat'; cfg.zlim = [-5 5]; ft_clusterplot(cfg,stat); Any input will be very helpful. Thanks. Rajat Rajat Mani Thomas Social Brain Lab Netherlands Institute for Neuroscience Amsterdam -------------- next part -------------- An HTML attachment was scrubbed... URL: From ibjuslc at gmail.com Thu Aug 6 16:46:20 2015 From: ibjuslc at gmail.com (ishita basu) Date: Thu, 6 Aug 2015 10:46:20 -0400 Subject: [FieldTrip] custer based non parametric permutation test for coherence difference Message-ID: I am very interested in using your firldtrip code for doing nonparametric cluster based permutation testing for coherence differences. I tried reading through the fieldtrip tutorials on doing similar analysis on time-frequency spectral data, but could not find anything on coherence except for the coherence calculations for the cortico-muscular data (doesn’t involve any statistical testing). I also saw that the main function being used , i.e the ft_freqstatistics function requires input from ft_freqanalysis and not ft_connectivityanalysis (the one for calculating coherence). Another doubt I had was, it seems like I need some neighborhood information for doing the cluster analysis. If I wanted to cluster only in the time frequency grid and not spatially (I am using depth electrode data ) or I wanted the algorithm to find spatial clusters for me in the absence of prior knowledge, is that feasible ? Thanks Ishita -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.wieffering at gmail.com Thu Aug 6 16:50:55 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Thu, 6 Aug 2015 10:50:55 -0400 Subject: [FieldTrip] Granger Causality Analysis after Beamformer In-Reply-To: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> Message-ID: Hi again, Jan-Mathijs- Thanks again for your help. I have been following your suggestion and so far completed LCMV Beamformer on two regions of interest and gone on to construct two virtual channels from there, according to the connectivity tutorial. However, I receive an error when I compute ft_mvaranalysis and would be grateful if you could take a look: virtualchannel01 = label: {'source1'} time: {1x66 cell} trial: {1x66 cell} virtualchannel02 = label: {'source2'} time: {1x66 cell} trial: {1x66 cell} % append virtual channel datasets cfg = []; cfg.continuous = 'no'; data_both = ft_appenddata(cfg, virtualchannel01, virtualchannel02); % compute mvar analysis cfg = []; cfg.continuous = 'no'; cfg.toolbox = 'bsmart'; cfg.order = 5; cfg.channelcmb = ['source1'; 'source2']; mvardata = ft_mvaranalysis(cfg, data_both); *which outputs the following:* Warning: transposing channelcombination matrix > In ft_channelcombination (line 60) In ft_mvaranalysis (line 204) label = 'source1' 'source2' the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB preprocessing preprocessing trial 66 from 66 the call to "ft_preprocessing" took 0 seconds and required the additional allocation of an estimated 0 MB Index exceeds matrix dimensions. Error in ft_mvaranalysis (line 333) tmpcfg.toilim = timeaxis([begsample endsample]); I'm wondering where this error comes from - not sure how to go about fixing it. My present goal has been to practice these steps and experiment with connectivity analysis, and therefore the datasets I'm working with are relatively small - is it possible that's the issue here? Also, I wondered if FieldTrip (or the bsmart toolbox) offers any guidance on how to select a mvar model order, as I know this is an influential factor in Granger Causality. I've experimented with SIFT in the past and found their model-fitting guidance and validation very helpful - don't know if there's anything similar that's also compatible with FieldTrip. Once again, thanks for all your help!! Helen WIeffering Erika Nyhus Dept of Neuroscience Bowdoin College On Thu, Jul 30, 2015 at 5:08 PM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Helen, > > Yes, you can restrict yourself in the end to focus on a predefined > frequency band. Yet, for the computation, you need to compute the whole > frequency range. > Reason: for the parametric estimator, what’s in a name, you parametrize > the spectrum, so you get all frequencies for ‘free’. > for the non-parametric estimator, you need to whole spectrum to begin > with, in order to be able to decompose the cross-spectrum, using the > Wilson-Burg algorithm (as described in the 2008 Dhamala paper). > Best, > Jan-Mathijs > > > > On Jul 30, 2015, at 10:51 PM, Helen Wieffering > wrote: > > Hi Jan-Mathis, > > Thanks for your quick reply - this is very helpful. In fact, we've already > completed coherence measures on this data and pre-defined potential areas > of interest based on published literature - but we wanted to take that > further by looking into granger causality. > > I want to follow up on the first method you described (applying > ft_mvaranalysis to source-level data). We would like to limit our > connectivity analysis to the theta-band frequencies, which was why DICS > Beamformer was appealing. However, if I'm understanding correctly, the LCMV > filter is necessary for our connectivity analysis since granger causality > is computed in the time domain. I'm wondering, if we go back and compute > LCMV source reconstruction instead, will it be possible to later compute > granger causality for the specific frequencies we're studying? > > Thanks again! > > Helen Wieffering > Erika Nyhus > Dept. of Neuroscience > Bowdoin College > > On Thu, Jul 30, 2015 at 3:30 PM, Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl> wrote: > >> Dear Helen, >> >> There is no step-by-step guidance for this on the FieldTrip wiki. >> Personally, I would first go for a slightly less ambitious, i.e. not use >> Granger causality as the target connectivity measure, but first investigate >> the patterns in the data using plain good-old-fashioned (imaginary) >> coherence or so, which is a measure that can be easily computed given the >> pipeline you have executed so far. >> The estimation of Granger causality (in the frequency domain), or of one >> of its relatives such as PDC or DTF requires one of the following 2 >> approaches: >> >> -indeed you either need to get your spectral transfer matrix by >> parametric means, i.e. call ft_mvaranalysis (either on sensor-level or on >> source-level data), and proceed from there. If the coefficients are to be >> estimated on source-level data, you first need to apply a source >> reconstruction in the time domain, e.g. using an LCMV-beamformer, create a >> set of ‘virtual channels’ (there is some docu about this on the FT-wiki, I >> guess you will get there with the search term ‘virtual channel’. Once you >> are at the source level, you can either continue with ft_mvaranalysis on >> the virtual channel time courses, followed by ft_freqanalysis_mvar, >> followed by ft_connectivityanalysis, or you can follow the non-parametric >> route, where you would do an ft_freqanalysis (with ‘mtmfft’), followed by >> ft_connectivityanalysis. How this is done in practice is explained in one >> of the tutorials that are concerned with connectivity (in the example it is >> demonstrated with ‘channel’ data, but it would be straightforward to fool >> FieldTrip into swallowing ‘virtual channel’ data). A different route along >> the parametric-estimation path would be to fit the autoregressive model at >> the channel-level (in a PCA-reduced subspace), and project the coefficients >> of the model into source space. The idea behind this approach is explained >> and demonstrated in this paper: >> http://onlinelibrary.wiley.com/doi/10.1002/hbm.21482/full. >> -alternatively >> , >> you can estimate spectra non-parametrically (with mtmfft), and then compute >> a ‘broadband’ spatial filter with LCMV, using the covariance estimated from >> the same data epochs as the ones you will use for the spectral >> decomposition. Next, you can project the sensor level fourier-data into >> source space using the spatial filters (use cfg.keepfilter = ‘yes’ when >> calling ft_sourceanalysis) defined at your locations of interest. This is >> allowed because the spatial filtering is a linear step, as is the Fourier >> transformation, so the order of which shouldn’t matter for the result, >> although the computation may be more efficient in one order or the other. >> >> The difficult thing for you I guess would be a way to a priori define >> your locations of interest. This is an empirical question, but you could >> either use information from published literature, or preferably an >> experimental contrast from your data to identify regions-of-interest. >> >> Best wishes, >> >> Jan-Mathijs >> >> >> >> >> >> >> Jan-Mathijs Schoffelen, MD PhD, Senior researcher >> >> Max Planck Institute for Psycholinguistics >> Donders Centre for Cognitive Neuroimaging >> >> E-mail: j.schoffelen at donders.ru.nl >> Telephone: +31-24-3614793 >> >> http://www.hettaligebrein.nl >> http://www.fieldtriptoolbox.org >> >> >> On Jul 30, 2015, at 8:31 PM, Helen Wieffering >> wrote: >> >> > Dear FieldTrip users, >> > >> > I am writing to ask for any available guidance on computing granger >> causality measures using ft_connectivity_analysis in FieldTrip. >> > >> > Our data comes from 128 EEG channels. So far we have: >> > - cleaned and preprocessed the data >> > - computed frequency analysis using 'mtmfft' at 6 Hz >> > - localized sources of 6hz activity to a normalized head model using >> Beamformer and method 'dics'. >> > >> > We would now like to compute connectivity analysis between the >> strongest sources, using granger causality. I have read through the >> FieldTrip tutorials, but am still not sure how to proceed. >> > >> > Mainly, my question is whether we should have first computed >> ft_mvaranalysis with our preprocessed data, and then done frequency >> analysis using cfg.method = 'mvar' and proceeded with source analysis >> (Beamformer) from there. Should we go back and complete those steps? I'm >> also wondering about the best method for selecting sources to use for >> connectivity analysis. >> > >> > If anyone has had success with this, I'd love to hear! >> > >> > Thanks in advance. >> > >> > Helen Wieffering >> > Erika Nyhus >> > Dept. of Neuroscience >> > Bowdoin College >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 6 20:59:03 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 6 Aug 2015 18:59:03 +0000 Subject: [FieldTrip] custer based non parametric permutation test for coherence difference In-Reply-To: References: Message-ID: Hi Ishita, I suggest that you search a bit through the archive of this discussion list, because your question has come up on several occasions in the past. Do you want to do statistics within a subject (unit-of-observation is trial), or across subjects (unit-of-observation is subject)? Another doubt I had was, it seems like I need some neighborhood information for doing the cluster analysis. If I wanted to cluster only in the time frequency grid and not spatially (I am using depth electrode data ) or I wanted the algorithm to find spatial clusters for me in the absence of prior knowledge, is that feasible if you specify cfg.neighbours = {}, the clustering will be done only in time and frequency. I don’t understand what you mean with ‘finding spatial clusters in the absence of prior knowledge’, but if you tell the function to not cluster in space, it will not do so :o). Best, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 6 21:03:18 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 6 Aug 2015 19:03:18 +0000 Subject: [FieldTrip] Granger Causality Analysis after Beamformer In-Reply-To: <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> Message-ID: <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> Hi Helen, forwarding to the list as well, Do you have an up-to-date version of FieldTrip? There were some issues regarding the error you get, but as far as I remember, these should have been resolved. I would start with downloading a new version. If the problem persists it could be that you need to ensure that the time axis of all trials is identical (and that all trials have the same number of samples). If the sample numbers match across trials, you could try data_both.time(2:end)=data_both.time(1): Best, Jan-Mathijs On Aug 6, 2015, at 4:50 PM, Helen Wieffering > wrote: Hi again, Jan-Mathijs- Thanks again for your help. I have been following your suggestion and so far completed LCMV Beamformer on two regions of interest and gone on to construct two virtual channels from there, according to the connectivity tutorial. However, I receive an error when I compute ft_mvaranalysis and would be grateful if you could take a look: virtualchannel01 = label: {'source1'} time: {1x66 cell} trial: {1x66 cell} virtualchannel02 = label: {'source2'} time: {1x66 cell} trial: {1x66 cell} % append virtual channel datasets cfg = []; cfg.continuous = 'no'; data_both = ft_appenddata(cfg, virtualchannel01, virtualchannel02); % compute mvar analysis cfg = []; cfg.continuous = 'no'; cfg.toolbox = 'bsmart'; cfg.order = 5; cfg.channelcmb = ['source1'; 'source2']; mvardata = ft_mvaranalysis(cfg, data_both); which outputs the following: Warning: transposing channelcombination matrix > In ft_channelcombination (line 60) In ft_mvaranalysis (line 204) label = 'source1' 'source2' the call to "ft_selectdata" took 0 seconds and required the additional allocation of an estimated 0 MB preprocessing preprocessing trial 66 from 66 the call to "ft_preprocessing" took 0 seconds and required the additional allocation of an estimated 0 MB Index exceeds matrix dimensions. Error in ft_mvaranalysis (line 333) tmpcfg.toilim = timeaxis([begsample endsample]); I'm wondering where this error comes from - not sure how to go about fixing it. My present goal has been to practice these steps and experiment with connectivity analysis, and therefore the datasets I'm working with are relatively small - is it possible that's the issue here? Also, I wondered if FieldTrip (or the bsmart toolbox) offers any guidance on how to select a mvar model order, as I know this is an influential factor in Granger Causality. I've experimented with SIFT in the past and found their model-fitting guidance and validation very helpful - don't know if there's anything similar that's also compatible with FieldTrip. Once again, thanks for all your help!! Helen WIeffering Erika Nyhus Dept of Neuroscience Bowdoin College On Thu, Jul 30, 2015 at 5:08 PM, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Helen, Yes, you can restrict yourself in the end to focus on a predefined frequency band. Yet, for the computation, you need to compute the whole frequency range. Reason: for the parametric estimator, what’s in a name, you parametrize the spectrum, so you get all frequencies for ‘free’. for the non-parametric estimator, you need to whole spectrum to begin with, in order to be able to decompose the cross-spectrum, using the Wilson-Burg algorithm (as described in the 2008 Dhamala paper). Best, Jan-Mathijs On Jul 30, 2015, at 10:51 PM, Helen Wieffering > wrote: Hi Jan-Mathis, Thanks for your quick reply - this is very helpful. In fact, we've already completed coherence measures on this data and pre-defined potential areas of interest based on published literature - but we wanted to take that further by looking into granger causality. I want to follow up on the first method you described (applying ft_mvaranalysis to source-level data). We would like to limit our connectivity analysis to the theta-band frequencies, which was why DICS Beamformer was appealing. However, if I'm understanding correctly, the LCMV filter is necessary for our connectivity analysis since granger causality is computed in the time domain. I'm wondering, if we go back and compute LCMV source reconstruction instead, will it be possible to later compute granger causality for the specific frequencies we're studying? Thanks again! Helen Wieffering Erika Nyhus Dept. of Neuroscience Bowdoin College On Thu, Jul 30, 2015 at 3:30 PM, Schoffelen, J.M. (Jan Mathijs) > wrote: Dear Helen, There is no step-by-step guidance for this on the FieldTrip wiki. Personally, I would first go for a slightly less ambitious, i.e. not use Granger causality as the target connectivity measure, but first investigate the patterns in the data using plain good-old-fashioned (imaginary) coherence or so, which is a measure that can be easily computed given the pipeline you have executed so far. The estimation of Granger causality (in the frequency domain), or of one of its relatives such as PDC or DTF requires one of the following 2 approaches: -indeed you either need to get your spectral transfer matrix by parametric means, i.e. call ft_mvaranalysis (either on sensor-level or on source-level data), and proceed from there. If the coefficients are to be estimated on source-level data, you first need to apply a source reconstruction in the time domain, e.g. using an LCMV-beamformer, create a set of ‘virtual channels’ (there is some docu about this on the FT-wiki, I guess you will get there with the search term ‘virtual channel’. Once you are at the source level, you can either continue with ft_mvaranalysis on the virtual channel time courses, followed by ft_freqanalysis_mvar, followed by ft_connectivityanalysis, or you can follow the non-parametric route, where you would do an ft_freqanalysis (with ‘mtmfft’), followed by ft_connectivityanalysis. How this is done in practice is explained in one of the tutorials that are concerned with connectivity (in the example it is demonstrated with ‘channel’ data, but it would be straightforward to fool FieldTrip into swallowing ‘virtual channel’ data). A different route along the parametric-estimation path would be to fit the autoregressive model at the channel-level (in a PCA-reduced subspace), and project the coefficients of the model into source space. The idea behind this approach is explained and demonstrated in this paper: http://onlinelibrary.wiley.com/doi/10.1002/hbm.21482/full. -alternatively, you can estimate spectra non-parametrically (with mtmfft), and then compute a ‘broadband’ spatial filter with LCMV, using the covariance estimated from the same data epochs as the ones you will use for the spectral decomposition. Next, you can project the sensor level fourier-data into source space using the spatial filters (use cfg.keepfilter = ‘yes’ when calling ft_sourceanalysis) defined at your locations of interest. This is allowed because the spatial filtering is a linear step, as is the Fourier transformation, so the order of which shouldn’t matter for the result, although the computation may be more efficient in one order or the other. The difficult thing for you I guess would be a way to a priori define your locations of interest. This is an empirical question, but you could either use information from published literature, or preferably an experimental contrast from your data to identify regions-of-interest. Best wishes, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org On Jul 30, 2015, at 8:31 PM, Helen Wieffering > wrote: > Dear FieldTrip users, > > I am writing to ask for any available guidance on computing granger causality measures using ft_connectivity_analysis in FieldTrip. > > Our data comes from 128 EEG channels. So far we have: > - cleaned and preprocessed the data > - computed frequency analysis using 'mtmfft' at 6 Hz > - localized sources of 6hz activity to a normalized head model using Beamformer and method 'dics'. > > We would now like to compute connectivity analysis between the strongest sources, using granger causality. I have read through the FieldTrip tutorials, but am still not sure how to proceed. > > Mainly, my question is whether we should have first computed ft_mvaranalysis with our preprocessed data, and then done frequency analysis using cfg.method = 'mvar' and proceeded with source analysis (Beamformer) from there. Should we go back and complete those steps? I'm also wondering about the best method for selecting sources to use for connectivity analysis. > > If anyone has had success with this, I'd love to hear! > > Thanks in advance. > > Helen Wieffering > Erika Nyhus > Dept. of Neuroscience > Bowdoin College > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Thu Aug 6 21:59:34 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Thu, 6 Aug 2015 21:59:34 +0200 Subject: [FieldTrip] Error in Cluster permutation tutorial? In-Reply-To: <1438871530409.50689@nin.knaw.nl> References: <1438871530409.50689@nin.knaw.nl> Message-ID: Hi Rajat, I was able to reproduce the problem. Would you please file a bug http://bugzilla.fieldtriptoolbox.org/ and we’ll take it from there. Thanks. Tzvetan > Dear FieldTrippers, > > I followed the tutorial on > http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics?s[]=cluster&s[]=permutation > > at the very end, I wanted to do the ft_clusterplot but then I did not get topoplots as a function of time as in the > tutorial and instead just got one plot. > > Is there something wrong in the way the parameters are set in the tutorial. > The last part is as follows: > % make a plot > cfg = []; > cfg.highlightsymbolseries = ['*','*','.','.','.']; > cfg.layout = 'CTF151.lay'; > cfg.contournum = 0; > cfg.markersymbol = '.'; > cfg.alpha = 0.05; > cfg.parameter='stat'; > cfg.zlim = [-5 5]; > ft_clusterplot(cfg,stat); > > Any input will be very helpful. > > Thanks. > > Rajat > > > Rajat Mani Thomas > Social Brain Lab > Netherlands Institute for Neuroscience > Amsterdam > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From ervin.poljac at donders.ru.nl Thu Aug 6 23:59:16 2015 From: ervin.poljac at donders.ru.nl (Poljac, E. (Ervin)) Date: Thu, 6 Aug 2015 21:59:16 +0000 Subject: [FieldTrip] Undefined function or variable "lab" In-Reply-To: <77A6E025-667C-4255-BF8B-B22197BF3678@fcdonders.ru.nl> References: , <77A6E025-667C-4255-BF8B-B22197BF3678@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, Thanks for your answer, one of my colleagues indeed suggested that I should look at data.elec.label and it seems that there are two additional labels ('COMNT' and 'SCALE'. ), so after removing them, the ft_channelrepair function worked. Regards, Ervin -- Ervin Poljac, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition (DCC) Radboud University Nijmegen Room B.00.78A Montessorilaan 3 6500 HE Nijmegen T. 024 36 15457 ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Schoffelen, J.M. (Jan Mathijs) [jan.schoffelen at donders.ru.nl] Sent: Monday, August 03, 2015 9:56 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Undefined function or variable "lab" Hi Ervin, Given the information provided, it’s still hard to tell what might be going on. What version of FieldTrip are you using, and what does dataTarget.elec look like? What do your colleagues have to say about this? (The reason for the last question is, that they most likely have most hands-on experience with the quirks of the particular dataformat you are working with, and thus will be able to provide more specific input than the people who occasionally read posts on this list). Also, the statement that an ‘older version of fieldtrip works’ is quite unspecific (e.g. are your colleagues using a 2009-version of the code, or a more recent one :o)? Is there code totally unmodified, or did they made some code changes in order for it to work?), so I don’t think that this is going to bring you close to a solution. Yet, I think it is good diagnostic information to know that somewhere in the past ‘it’ seemed to work, either with or without local changes. Would it make sense for you to team up with your colleagues to find on what’s going on? Best, Jan-Mathijs Jan-Mathijs Schoffelen, MD PhD, Senior researcher Max Planck Institute for Psycholinguistics Donders Centre for Cognitive Neuroimaging E-mail: j.schoffelen at donders.ru.nl Telephone: +31-24-3614793 http://www.hettaligebrein.nl http://www.fieldtriptoolbox.org On Jul 31, 2015, at 2:00 PM, Poljac, E. (Ervin) > wrote: Anyone an idea of what might be wrong here? Much appreciated, Ervin ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Poljac, E. (Ervin) [ervin.poljac at donders.ru.nl] Sent: Monday, July 27, 2015 1:54 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Undefined function or variable "lab" Hello fieldtrippers, I am trying to prepare my EEG data for analysis. Among others, I identify bad channels and try to repair them. However, there is this annoying error: Undefined function or variable "lab". Error in channelposition (line 314) n = size(lab,2); Error in ft_datatype_sens (line 329) [chanpos, chanori, lab] = channelposition(sens); Error in ft_datatype_raw (line 146) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 225) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_channelrepair (line 102) data = ft_checkdata(data, 'datatype', 'raw', 'feedback', 'yes'); In the debug mode I see that the variable 'sens' has a correct value, the bad channel seems to be identified, but then for some reason, lab is not filled. I am copy-pasting that part of my code below. I hope someone has experience with this and how to solve it. Some of my colleagues use an older fieldtrip version that works (so, no error there), and I compared the filein s ft_checkdata, ft_datatype_sens and ft_datatype_sens, they are different, but it is not obvious to me what exactly is new, causing the error. Many thanks, Ervin My code: %% channel rejection, identifying bad channels for target condition cfg=[]; cfg.method = 'mtmfft'; cfg.output = 'pow'; cfg.taper = 'hanning'; cfg.foi = [50];% frequency band - foilim or just foi?? rejectedData=ft_freqanalysis(cfg,dataTarget); idx=unique([find(rejectedData.powspctrm>0.5*10^4)]); %this threshold might change for each recording neighbours=open('/Users/Ervin/Documents/MATLAB/biosemi64_neighb.mat'); neighbours=neighbours.neighbours; cfg = []; cfg.channel = rejectedData.label; cfg.layout = 'biosemi64.lay'; cfg.feedback = 'yes'; lay = ft_prepare_layout(cfg); if ~isempty(idx) badchannels=cell(numel(idx),1); [badchannels{1:numel(idx),1}] = deal(rejectedData.label{idx}); % Interpolation for rejected channels cfg=[]; cfg.layout=lay; cfg.badchannel=badchannels; dataTarget.elec.label = dataTarget.label; dataTarget.elec.pnt = lay.pos; cfg.neighbours=neighbours; dataTargetRepaired=ft_channelrepair(cfg, dataTarget); end -- Ervin Poljac, PhD Donders Institute for Brain, Cognition and Behaviour Centre for Cognition (DCC) Radboud University Nijmegen Room B.00.78A Montessorilaan 3 6500 HE Nijmegen T. 024 36 15457 _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From helen.wieffering at gmail.com Fri Aug 7 16:27:32 2015 From: helen.wieffering at gmail.com (Helen Wieffering) Date: Fri, 7 Aug 2015 10:27:32 -0400 Subject: [FieldTrip] Granger Causality Analysis after Beamformer In-Reply-To: <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> Message-ID: Thanks, Jan-Mathijs, you were correct about the error being related to sample info. After creating virtualchannel01 and virtualchannel02, I simply added the two lines below: virtualchannel01.fsample = 250; virtualchannel02.fsample = 250; Appending the datasets and computing ft_mvaranalysis has worked smoothly from there! Best, Helen -------------- next part -------------- An HTML attachment was scrubbed... URL: From chaitanya.pro at gmail.com Fri Aug 7 16:38:32 2015 From: chaitanya.pro at gmail.com (Chaitanya Srinivas) Date: Fri, 7 Aug 2015 20:08:32 +0530 Subject: [FieldTrip] [k p or eoz] Granger Causality Analysis after Beamformer In-Reply-To: References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> Message-ID: Hhhhyybhrbyghh r ttttttttrzl sxs. Essssssse ssssss -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Fri Aug 7 16:41:55 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 7 Aug 2015 14:41:55 +0000 Subject: [FieldTrip] Granger Causality Analysis after Beamformer In-Reply-To: References: <55C2717B-E725-4500-A2DC-D69E14731541@fcdonders.ru.nl> <518D137E-CDDF-4F03-82F2-04B911A6D977@fcdonders.ru.nl> <7BBF5F5D-2ECA-4D4C-A48D-59DD08B905FC@fcdonders.ru.nl> Message-ID: <3229622B-91FB-48B8-B840-CEC216230893@fcdonders.ru.nl> Hi Helen, I am glad it works now. Thanks for letting us know. Best wishes, Jan-Mathijs On Aug 7, 2015, at 4:27 PM, Helen Wieffering wrote: > Thanks, Jan-Mathijs, you were correct about the error being related to sample info. > > After creating virtualchannel01 and virtualchannel02, I simply added the two lines below: > virtualchannel01.fsample = 250; > virtualchannel02.fsample = 250; > > Appending the datasets and computing ft_mvaranalysis has worked smoothly from there! > > Best, > Helen > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From spa268 at nyu.edu Fri Aug 7 16:43:51 2015 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Fri, 7 Aug 2015 18:43:51 +0400 Subject: [FieldTrip] Error in Cluster permutation tutorial? Message-ID: FYI, I'm pretty sure the corresponding sample code at http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock is also several years out of date (I remember having problems with it in the past, it seems to be from before ft_clusterplot() existed, as it's just using ft_topoplotER). Of course I am as much to blame as anyone for not updating it. But if someone is going to update the other page then maybe this one can be done as well; I can take a crack at it if no one picks it up on bugzilla. Also, is it just me or is http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics#permutation_test_based_on_cluster_statistics essentially duplicating (with what looks like a more recent example and code) what's in http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock ? Would it be worthwhile to reconcile these two (and maybe replace one with a link to the other, so they don't get out of sync again)? Best, Steve Stephen Politzer-Ahles New York University, Abu Dhabi Neuroscience of Language Lab http://www.nyu.edu/projects/politzer-ahles/ On Fri, Aug 7, 2015 at 2:00 PM, wrote: > > Message: 1 > Date: Thu, 6 Aug 2015 14:32:10 +0000 > From: Rajat Thomas > To: "fieldtrip at science.ru.nl" > Subject: [FieldTrip] Error in Cluster permutation tutorial? > Message-ID: <1438871530409.50689 at nin.knaw.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Dear FieldTrippers, > > > I followed the tutorial on > > > http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics?s[]=cluster&s[]=permutation > > at the very end, I wanted to do the ft_clusterplot but then I did not get > topoplots as a function of time as in the > tutorial and instead just got one plot. > > Is there something wrong in the way the parameters are set in the tutorial. > The last part is as follows: > > % make a plot > cfg = []; > cfg.highlightsymbolseries = ['*','*','.','.','.']; > cfg.layout = 'CTF151.lay'; > cfg.contournum = 0; > cfg.markersymbol = '.'; > cfg.alpha = 0.05; > cfg.parameter='stat'; > cfg.zlim< > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/zlim.html> = > [-5 5]; > ft_clusterplot(cfg,stat); > > Any input will be very helpful. > > Thanks. > > Rajat > > > Rajat Mani Thomas > Social Brain Lab > Netherlands Institute for Neuroscience > Amsterdam > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel.haehnke at lrz.tu-muenchen.de Wed Aug 12 14:30:46 2015 From: daniel.haehnke at lrz.tu-muenchen.de (=?utf-8?Q?Daniel_H=C3=A4hnke?=) Date: Wed, 12 Aug 2015 14:30:46 +0200 Subject: [FieldTrip] ft_spiketriggeredaverage & cfg.latency Message-ID: Dear FieldTrip community, I want to compute the spike triggered average at various epochs of a trial. I want to use ft_spiketriggeredaverage and cfg.latency for that (cfg.latency would specify the epoch). However, while cfg.latency is still in the help and the code of ft_spiketriggeredaverage, it seems like it is not supported anymore. I could of course simply cut out the epochs I am interested in and then run ft_spiketriggeredaverage on that, but I would miss LFPs at the edges of the epochs: e.g. if my STA is from -0.1 to 0.1 with respect to a spike and my epoch is from 1 to 1.5, I would only be able to incorporate LFPs from 1.1 to 1.4. Can anyone think of a workaround for this problem? Cheers, Daniel -- Technische Universität München Daniel Hähnke Institute of Neuroscience Translational NeuroCognition Laboratory Biedersteiner Straße 29, Bau 601 D-80802 München Tel.: +49 89 4140 3356 daniel.haehnke at lrz.tum.de www.ifn.me.tum.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From jk604 at cam.ac.uk Wed Aug 12 18:24:52 2015 From: jk604 at cam.ac.uk (Jana Klimova) Date: Wed, 12 Aug 2015 17:24:52 +0100 Subject: [FieldTrip] Error using ft_multiplotER (line 553), labels in data and labels in layout do not match Message-ID: <55CB7354.8030602@cam.ac.uk> Hello, I am using Fieldtrip interactive plotting under MEEGtools in SPM12 toolbox in MATLAB to plot ERP topography over a period of interest. It's working fine for magnetometers (MEG modality) but when I choose MEGCOMB modality, I get an error: 'Error using ft_multiplotER (line 553) labels in data and labels in layout do not match'. Has anyone got this error before and managed to figure out what's wrong? If I want to plot the same data using display function in SPM, I don't have any problems with MEGCOMB modality. It just doesn't allow me to average over time, that's why I decided to use Fieldtrip functions. Thanks a lot in advance for any suggestions. Kind regards, Jana From stephen.whitmarsh at ki.se Wed Aug 12 20:40:18 2015 From: stephen.whitmarsh at ki.se (Stephen Whitmarsh) Date: Wed, 12 Aug 2015 18:40:18 +0000 Subject: [FieldTrip] Error using ft_multiplotER (line 553), labels in data and labels in layout do not match In-Reply-To: <55CB7354.8030602@cam.ac.uk> References: <55CB7354.8030602@cam.ac.uk> Message-ID: Hi Jana, You'll need to have combined gradiometers in your data to be able to plot them. Use ft_combineplanar for that. Cheers, Stephen ________________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Jana Klimova [jk604 at cam.ac.uk] Sent: 12 August 2015 18:24 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Error using ft_multiplotER (line 553), labels in data and labels in layout do not match Hello, I am using Fieldtrip interactive plotting under MEEGtools in SPM12 toolbox in MATLAB to plot ERP topography over a period of interest. It's working fine for magnetometers (MEG modality) but when I choose MEGCOMB modality, I get an error: 'Error using ft_multiplotER (line 553) labels in data and labels in layout do not match'. Has anyone got this error before and managed to figure out what's wrong? If I want to plot the same data using display function in SPM, I don't have any problems with MEGCOMB modality. It just doesn't allow me to average over time, that's why I decided to use Fieldtrip functions. Thanks a lot in advance for any suggestions. Kind regards, Jana _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From plyons at udel.edu Wed Aug 12 22:35:26 2015 From: plyons at udel.edu (Peter Lyons) Date: Wed, 12 Aug 2015 16:35:26 -0400 Subject: [FieldTrip] (no subject) Message-ID: Hello Everyone, I'm working on a cluster-based permutation analysis on time-frequency EEG data. I was able to successfully run the ft_freqstatistics function after computing the grand average (ft_freqgrandaverage) for my two independent groups. I am, however, struggling with viewing the topography of my cluster output using the ft_clusterplot function. I suspect the case may be that I am missing a time dimension in my data set based on this error message that I received: "Attempted to access stat.time(15); index out of bounds because numel(stat.time)=0. Error in ft_clusterplot (line 248) time_perclus = [stat.time(ind_min) stat.time(ind_max)];" Is there a viable way to use the ft_clusterplot if the dimensions contained in my data set is "chan_freq"? Or, is there an alternative plotting function that would work just as well or better? I would greatly appreciate any assistance with this. Thank you! Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From samane.shojaie at gmail.com Thu Aug 13 07:21:10 2015 From: samane.shojaie at gmail.com (Seyedeh Samane Shojaei) Date: Thu, 13 Aug 2015 13:21:10 +0800 Subject: [FieldTrip] problem in pre-processing stage Message-ID: Dear all, I am a new user of FieldTrip, I got problem at the first stage of reading data. I am using Matlab R2011a, windows 7, 64 bit. when I run my code, the following problem appears: addpath('FielTrip\fieldtrip-lite-20150810\fieldtrip-20150810') addpath('FielTrip\Tutorial\ArtifactRemoval\ArtifactRemoval.ds') ft_defaults % ft_preprocessing of example dataset cfg = []; cfg.dataset = 'ArtifactRemoval.ds'; cfg.trialdef.eventtype = 'trial'; cfg = ft_definetrial(cfg); Warning: could not determine filetype of ArtifactRemoval.ds > In ft_filetype at 1221 In utilities\private\dataset2files at 42 In ft_checkconfig at 541 In ft_definetrial at 128 In ICAremoveEOG at 9 Warning: no trialfun was specified, using ft_trialfun_general > In ft_definetrial at 135 In ICAremoveEOG at 9 evaluating trialfunction 'ft_trialfun_general' ??? Error using ==> ft_read_header at 2053 unsupported header format (unknown) Error in ==> ft_trialfun_general at 78 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 174 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> ICAremoveEOG at 9 cfg = ft_definetrial(cfg); It is appreciated if you could help me. Regards, Samane -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomitbeker at gmail.com Thu Aug 13 07:59:04 2015 From: shlomitbeker at gmail.com (Shlomit Beker) Date: Thu, 13 Aug 2015 08:59:04 +0300 Subject: [FieldTrip] problem in pre-processing stage In-Reply-To: References: Message-ID: Double check the name and path defined in your script, that refer to your data. It tends to cause this kind of error. ‫ב-13 באוג 2015, בשעה 08:21, ‏Seyedeh Samane Shojaei כתב/ה:‬ > Dear all, > > I am a new user of FieldTrip, I got problem at the first stage of reading data. I am using Matlab R2011a, windows 7, 64 bit. when I run my code, the following problem appears: > > addpath('FielTrip\fieldtrip-lite-20150810\fieldtrip-20150810') > addpath('FielTrip\Tutorial\ArtifactRemoval\ArtifactRemoval.ds') > ft_defaults > % ft_preprocessing of example dataset > cfg = []; > cfg.dataset = 'ArtifactRemoval.ds'; > cfg.trialdef.eventtype = 'trial'; > cfg = ft_definetrial(cfg); > > Warning: could not determine filetype of ArtifactRemoval.ds > > In ft_filetype at 1221 > In utilities\private\dataset2files at 42 > In ft_checkconfig at 541 > In ft_definetrial at 128 > In ICAremoveEOG at 9 > Warning: no trialfun was specified, using ft_trialfun_general > > In ft_definetrial at 135 > In ICAremoveEOG at 9 > evaluating trialfunction 'ft_trialfun_general' > ??? Error using ==> ft_read_header at 2053 > unsupported header format (unknown) > > Error in ==> ft_trialfun_general at 78 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 174 > [trl, event] = feval(cfg.trialfun, cfg); > > Error in ==> ICAremoveEOG at 9 > cfg = ft_definetrial(cfg); > > It is appreciated if you could help me. > Regards, > Samane > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at ki.se Thu Aug 13 08:04:22 2015 From: stephen.whitmarsh at ki.se (Stephen Whitmarsh) Date: Thu, 13 Aug 2015 06:04:22 +0000 Subject: [FieldTrip] problem in pre-processing stage In-Reply-To: References: Message-ID: Hi Seyede, Have you tried providing the full path to the dataset, e.g. cfg.dataset = 'C:/data/MEG/ArtifactRemoval.ds'? Adding the dataset directory to the path as you did, doesn't make those files accessible to MATLAB when loading data etc. I would remove that. If its still doesn't work, try to work through the initial steps here, and see where it breaks: http://www.fieldtriptoolbox.org/getting_started/ctf Cheers, Stephen P.s. Of course you could run your script from the dataset directory but this is *highly* discouraged and will result in problems further down the line. ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Seyedeh Samane Shojaei [samane.shojaie at gmail.com] Sent: 13 August 2015 07:21 To: fieldtrip at science.ru.nl Subject: [FieldTrip] problem in pre-processing stage Dear all, I am a new user of FieldTrip, I got problem at the first stage of reading data. I am using Matlab R2011a, windows 7, 64 bit. when I run my code, the following problem appears: addpath('FielTrip\fieldtrip-lite-20150810\fieldtrip-20150810') addpath('FielTrip\Tutorial\ArtifactRemoval\ArtifactRemoval.ds') ft_defaults % ft_preprocessing of example dataset cfg = []; cfg.dataset = 'ArtifactRemoval.ds'; cfg.trialdef.eventtype = 'trial'; cfg = ft_definetrial(cfg); Warning: could not determine filetype of ArtifactRemoval.ds > In ft_filetype at 1221 In utilities\private\dataset2files at 42 In ft_checkconfig at 541 In ft_definetrial at 128 In ICAremoveEOG at 9 Warning: no trialfun was specified, using ft_trialfun_general > In ft_definetrial at 135 In ICAremoveEOG at 9 evaluating trialfunction 'ft_trialfun_general' ??? Error using ==> ft_read_header at 2053 unsupported header format (unknown) Error in ==> ft_trialfun_general at 78 hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); Error in ==> ft_definetrial at 174 [trl, event] = feval(cfg.trialfun, cfg); Error in ==> ICAremoveEOG at 9 cfg = ft_definetrial(cfg); It is appreciated if you could help me. Regards, Samane -------------- next part -------------- An HTML attachment was scrubbed... URL: From samane.shojaie at gmail.com Thu Aug 13 08:21:47 2015 From: samane.shojaie at gmail.com (Seyedeh Samane Shojaei) Date: Thu, 13 Aug 2015 14:21:47 +0800 Subject: [FieldTrip] problem in pre-processing stage In-Reply-To: References: Message-ID: Dear Stephen, It is solved when I provided the full path to the dataset. Thanks a lot, Samane On Thu, Aug 13, 2015 at 2:04 PM, Stephen Whitmarsh wrote: > Hi Seyede, > > Have you tried providing the full path to the dataset, e.g. cfg.dataset = > 'C:/data/MEG/ArtifactRemoval.ds'? > Adding the dataset directory to the path as you did, doesn't make those > files accessible to MATLAB when loading data etc. I would remove that. > > If its still doesn't work, try to work through the initial steps here, and > see where it breaks: > http://www.fieldtriptoolbox.org/getting_started/ctf > > Cheers, > Stephen > > P.s. Of course you could run your script from the dataset directory but > this is *highly* discouraged and will result in problems further down the > line. > > ------------------------------ > *From:* fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] > on behalf of Seyedeh Samane Shojaei [samane.shojaie at gmail.com] > *Sent:* 13 August 2015 07:21 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] problem in pre-processing stage > > Dear all, > > I am a new user of FieldTrip, I got problem at the first stage of reading > data. I am using Matlab R2011a, windows 7, 64 bit. when I run my code, the > following problem appears: > > addpath('FielTrip\fieldtrip-lite-20150810\fieldtrip-20150810') > addpath('FielTrip\Tutorial\ArtifactRemoval\ArtifactRemoval.ds') > ft_defaults > % ft_preprocessing of example dataset > cfg = []; > cfg.dataset = 'ArtifactRemoval.ds'; > cfg.trialdef.eventtype = 'trial'; > cfg = ft_definetrial(cfg); > > Warning: could not determine filetype of ArtifactRemoval.ds > > In ft_filetype at 1221 > In utilities\private\dataset2files at 42 > In ft_checkconfig at 541 > In ft_definetrial at 128 > In ICAremoveEOG at 9 > Warning: no trialfun was specified, using ft_trialfun_general > > In ft_definetrial at 135 > In ICAremoveEOG at 9 > evaluating trialfunction 'ft_trialfun_general' > ??? Error using ==> ft_read_header at 2053 > unsupported header format (unknown) > > Error in ==> ft_trialfun_general at 78 > hdr = ft_read_header(cfg.headerfile, 'headerformat', cfg.headerformat); > > Error in ==> ft_definetrial at 174 > [trl, event] = feval(cfg.trialfun, cfg); > > Error in ==> ICAremoveEOG at 9 > cfg = ft_definetrial(cfg); > > It is appreciated if you could help me. > Regards, > Samane > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From krisappel at uos.de Thu Aug 13 10:32:35 2015 From: krisappel at uos.de (Kristoffer Appel) Date: Thu, 13 Aug 2015 10:32:35 +0200 Subject: [FieldTrip] EEG source localization: ft_sourcegrandaverage does not keep individual data Message-ID: <55CC5623.2090100@uos.de> Hi all, I analyze data from an EEG experiment. Within-subject design, 8 subjects each produced trial data in two conditions. I have used ft_sourceanalysis on the data from ft_freqanalysis for obtaining the source data for each subject and each conditon, which works (at least ft_sourceplot shows something which seems to make sense). I use ft_sourcegrandaverage on the data of one condition of all 8 subjects, and a grand average is computed. So far, so good. But: I specify cfg.keepindividual = 'yes'; However, the single subject data are not kept, so I can't use ft_sourcestatistics. What could I have done wrong? Kind regards Kristoffer -- Kristoffer Appel, M.Sc. Institut für Kognitionswissenschaft Universität Osnabrück Albrechtstraße 28, 49076 Osnabrück Raum: 31/405 Tel: +49-541-969-7090, Fax:+49-541-969-2246 Email: krisappel at uos.de From julian.keil at gmail.com Thu Aug 13 10:40:15 2015 From: julian.keil at gmail.com (Julian Keil) Date: Thu, 13 Aug 2015 10:40:15 +0200 Subject: [FieldTrip] EEG source localization: ft_sourcegrandaverage does not keep individual data In-Reply-To: <55CC5623.2090100@uos.de> References: <55CC5623.2090100@uos.de> Message-ID: Hi Kristoffer, you don't have to average over subjects before computing the statistics. You can feed a cell structure with your source-level data into the ft_sourcestatistics function. E.g. stats = ft_sourcestatistics(cfg,data1{:},data2{:}) Good Luck Julian Am 13.08.2015 um 10:32 schrieb Kristoffer Appel: > Hi all, > > I analyze data from an EEG experiment. Within-subject design, 8 subjects each produced trial data in two conditions. > > I have used ft_sourceanalysis on the data from ft_freqanalysis for obtaining the source data for each subject and each conditon, which works (at least ft_sourceplot shows something which seems to make sense). > > I use ft_sourcegrandaverage on the data of one condition of all 8 subjects, and a grand average is computed. So far, so good. > > But: > I specify cfg.keepindividual = 'yes'; > However, the single subject data are not kept, so I can't use ft_sourcestatistics. > > What could I have done wrong? > > Kind regards > Kristoffer > > > > > -- > Kristoffer Appel, M.Sc. > > Institut für Kognitionswissenschaft > Universität Osnabrück > Albrechtstraße 28, 49076 Osnabrück > Raum: 31/405 > Tel: +49-541-969-7090, Fax:+49-541-969-2246 > Email: krisappel at uos.de > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: From krisappel at uos.de Thu Aug 13 14:03:46 2015 From: krisappel at uos.de (Kristoffer Appel) Date: Thu, 13 Aug 2015 14:03:46 +0200 Subject: [FieldTrip] EEG source localization: ft_sourcegrandaverage does not keep individual data In-Reply-To: References: <55CC5623.2090100@uos.de> Message-ID: <55CC87A2.2070005@uos.de> Hi Julian, thank you. Seems to work! Cheers Kristoffer On 08/13/2015 10:40 AM, Julian Keil wrote: > Hi Kristoffer, > > you don't have to average over subjects before computing the statistics. > You can feed a cell structure with your source-level data into the ft_sourcestatistics function. > E.g. stats = ft_sourcestatistics(cfg,data1{:},data2{:}) > > Good Luck > > Julian > > Am 13.08.2015 um 10:32 schrieb Kristoffer Appel: > >> Hi all, >> >> I analyze data from an EEG experiment. Within-subject design, 8 subjects each produced trial data in two conditions. >> >> I have used ft_sourceanalysis on the data from ft_freqanalysis for obtaining the source data for each subject and each conditon, which works (at least ft_sourceplot shows something which seems to make sense). >> >> I use ft_sourcegrandaverage on the data of one condition of all 8 subjects, and a grand average is computed. So far, so good. >> >> But: >> I specify cfg.keepindividual = 'yes'; >> However, the single subject data are not kept, so I can't use ft_sourcestatistics. >> >> What could I have done wrong? >> >> Kind regards >> Kristoffer >> >> >> >> >> -- >> Kristoffer Appel, M.Sc. >> >> Institut für Kognitionswissenschaft >> Universität Osnabrück >> Albrechtstraße 28, 49076 Osnabrück >> Raum: 31/405 >> Tel: +49-541-969-7090, Fax:+49-541-969-2246 >> Email: krisappel at uos.de >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Kristoffer Appel, M.Sc. Institut für Kognitionswissenschaft Universität Osnabrück Albrechtstraße 28, 49076 Osnabrück Raum: 31/405 Tel: +49-541-969-7090, Fax:+49-541-969-2246 Email: krisappel at uos.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 13 14:13:27 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 13 Aug 2015 12:13:27 +0000 Subject: [FieldTrip] (no subject) In-Reply-To: References: Message-ID: <2CBD4370-2E33-4C78-9016-368FA21F4B57@fcdonders.ru.nl> Hi Peter, I cannot reproduce your problem. Are you using the latest version of fieldtrip. I very recently fixed a bug in ft_clusterplot, which could well explain your problem. If you are actually using the most recent FT-version, then my change might have introduced a bug :o). Best, Jan-Mathijs On Aug 12, 2015, at 10:35 PM, Peter Lyons wrote: > Hello Everyone, > > I'm working on a cluster-based permutation analysis on time-frequency EEG data. I was able to successfully run the ft_freqstatistics function after computing the grand average (ft_freqgrandaverage) for my two independent groups. > > I am, however, struggling with viewing the topography of my cluster output using the ft_clusterplot function. I suspect the case may be that I am missing a time dimension in my data set based on this error message that I received: > > "Attempted to access stat.time(15); index out of bounds because numel(stat.time)=0. > > Error in ft_clusterplot (line 248) > time_perclus = [stat.time(ind_min) stat.time(ind_max)];" > > > Is there a viable way to use the ft_clusterplot if the dimensions contained in my data set is "chan_freq"? > > Or, is there an alternative plotting function that would work just as well or better? > > I would greatly appreciate any assistance with this. > > Thank you! > > Peter > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From plyons at udel.edu Thu Aug 13 17:54:23 2015 From: plyons at udel.edu (Peter Lyons) Date: Thu, 13 Aug 2015 11:54:23 -0400 Subject: [FieldTrip] (no subject) In-Reply-To: <2CBD4370-2E33-4C78-9016-368FA21F4B57@fcdonders.ru.nl> References: <2CBD4370-2E33-4C78-9016-368FA21F4B57@fcdonders.ru.nl> Message-ID: Hi Jan-Mathijs, I believe you may be correct. The error I had received was from a recent Fieldtrip download (20150810). I ran my script again on an older version (20150522) I have installed on another computer and the plot came out great. Thanks again for your help! Peter On Thu, Aug 13, 2015 at 8:13 AM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Peter, > I cannot reproduce your problem. Are you using the latest version of > fieldtrip. I very recently fixed a bug in ft_clusterplot, which could well > explain your problem. If you are actually using the most recent FT-version, > then my change might have introduced a bug :o). > > Best, > Jan-Mathijs > > On Aug 12, 2015, at 10:35 PM, Peter Lyons wrote: > > > Hello Everyone, > > > > I'm working on a cluster-based permutation analysis on time-frequency > EEG data. I was able to successfully run the ft_freqstatistics function > after computing the grand average (ft_freqgrandaverage) for my two > independent groups. > > > > I am, however, struggling with viewing the topography of my cluster > output using the ft_clusterplot function. I suspect the case may be that I > am missing a time dimension in my data set based on this error message that > I received: > > > > "Attempted to access stat.time(15); index out of bounds because > numel(stat.time)=0. > > > > Error in ft_clusterplot (line 248) > > time_perclus = [stat.time(ind_min) stat.time(ind_max)];" > > > > > > Is there a viable way to use the ft_clusterplot if the dimensions > contained in my data set is "chan_freq"? > > > > Or, is there an alternative plotting function that would work just as > well or better? > > > > I would greatly appreciate any assistance with this. > > > > Thank you! > > > > Peter > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Aug 13 18:49:59 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 13 Aug 2015 16:49:59 +0000 Subject: [FieldTrip] (no subject) In-Reply-To: References: <2CBD4370-2E33-4C78-9016-368FA21F4B57@fcdonders.ru.nl> Message-ID: Hi Peter, https://code.google.com/p/fieldtrip/source/browse/trunk/ft_clusterplot.m My change was dated the 11th (see the above link). I believe that you just had the bad luck to have an FT copy that had a bug in it. I suggest to upgrade to the 20150812 version (just to be sure). Best, Jan-Mathijs On Aug 13, 2015, at 5:54 PM, Peter Lyons > wrote: Hi Jan-Mathijs, I believe you may be correct. The error I had received was from a recent Fieldtrip download (20150810). I ran my script again on an older version (20150522) I have installed on another computer and the plot came out great. Thanks again for your help! Peter On Thu, Aug 13, 2015 at 8:13 AM, Schoffelen, J.M. (Jan Mathijs) > wrote: Hi Peter, I cannot reproduce your problem. Are you using the latest version of fieldtrip. I very recently fixed a bug in ft_clusterplot, which could well explain your problem. If you are actually using the most recent FT-version, then my change might have introduced a bug :o). Best, Jan-Mathijs On Aug 12, 2015, at 10:35 PM, Peter Lyons > wrote: > Hello Everyone, > > I'm working on a cluster-based permutation analysis on time-frequency EEG data. I was able to successfully run the ft_freqstatistics function after computing the grand average (ft_freqgrandaverage) for my two independent groups. > > I am, however, struggling with viewing the topography of my cluster output using the ft_clusterplot function. I suspect the case may be that I am missing a time dimension in my data set based on this error message that I received: > > "Attempted to access stat.time(15); index out of bounds because numel(stat.time)=0. > > Error in ft_clusterplot (line 248) > time_perclus = [stat.time(ind_min) stat.time(ind_max)];" > > > Is there a viable way to use the ft_clusterplot if the dimensions contained in my data set is "chan_freq"? > > Or, is there an alternative plotting function that would work just as well or better? > > I would greatly appreciate any assistance with this. > > Thank you! > > Peter > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mick.lehmann at uzh.ch Fri Aug 14 15:40:33 2015 From: mick.lehmann at uzh.ch (Mick Lehmann) Date: Fri, 14 Aug 2015 15:40:33 +0200 Subject: [FieldTrip] Baseline Correction using 'relchange' or 'db' In-Reply-To: References: Message-ID: <251EF6AA-DC11-417E-B190-D4191F2FB2A5@uzh.ch> Dear Stephan and Anne, sorry that it took me so long. It was the main issue that the cfg was set too late and the cfg-settings were only defined for the following condition. Therefore, only one condition was baseline corrected while the other wasn't. This resulted in weird statistical analyses while the figures were fine since the baseline correction was applied in ft_multiplitTFR. Thank you very much for reading the script so carefully! All the best, Mick -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at ki.se Fri Aug 14 16:41:42 2015 From: stephen.whitmarsh at ki.se (Stephen Whitmarsh) Date: Fri, 14 Aug 2015 14:41:42 +0000 Subject: [FieldTrip] Baseline Correction using 'relchange' or 'db' In-Reply-To: <251EF6AA-DC11-417E-B190-D4191F2FB2A5@uzh.ch> References: , <251EF6AA-DC11-417E-B190-D4191F2FB2A5@uzh.ch> Message-ID: Great new Mick, good luck with the study! Stephen ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Mick Lehmann [mick.lehmann at uzh.ch] Sent: 14 August 2015 15:40 To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Baseline Correction using 'relchange' or 'db' Dear Stephan and Anne, sorry that it took me so long. It was the main issue that the cfg was set too late and the cfg-settings were only defined for the following condition. Therefore, only one condition was baseline corrected while the other wasn't. This resulted in weird statistical analyses while the figures were fine since the baseline correction was applied in ft_multiplitTFR. Thank you very much for reading the script so carefully! All the best, Mick -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Sat Aug 15 11:43:55 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Sat, 15 Aug 2015 09:43:55 +0000 (UTC) Subject: [FieldTrip] realtime TMS-EEG In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB51857F@exprd01.hosting.ru.nl> References: <3D00B7615FB58D46A0B49B9AD67A33EB51857F@exprd01.hosting.ru.nl> Message-ID: <1567462124.2919460.1439631835989.JavaMail.yahoo@mail.yahoo.com> Hi, Thank you for answering my question. Sorry for my late reply.Actually it is work. I forgot to add the ft_defaults in matlab.I manage to view the signal.However,  the EEG signal is not moving in the plot. It only shows the last signal before stop. I mean it is realtime so I supposed to see the movement of the signal.What should I do in this matter? Thank you. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 On Tuesday, August 4, 2015 5:59 PM, "Herring, J.D. (Jim)" wrote: #yiv6304201544 #yiv6304201544 -- _filtered #yiv6304201544 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv6304201544 {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;} _filtered #yiv6304201544 {font-family:SimSun;panose-1:2 1 6 0 3 1 1 1 1 1;} _filtered #yiv6304201544 {font-family:SimSun;panose-1:2 1 6 0 3 1 1 1 1 1;} _filtered #yiv6304201544 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv6304201544 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;} _filtered #yiv6304201544 {panose-1:2 1 6 0 3 1 1 1 1 1;}#yiv6304201544 #yiv6304201544 p.yiv6304201544MsoNormal, #yiv6304201544 li.yiv6304201544MsoNormal, #yiv6304201544 div.yiv6304201544MsoNormal {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}#yiv6304201544 a:link, #yiv6304201544 span.yiv6304201544MsoHyperlink {color:blue;text-decoration:underline;}#yiv6304201544 a:visited, #yiv6304201544 span.yiv6304201544MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv6304201544 span.yiv6304201544EmailStyle17 {color:#1F497D;}#yiv6304201544 .yiv6304201544MsoChpDefault {font-size:10.0pt;} _filtered #yiv6304201544 {margin:72.0pt 72.0pt 72.0pt 72.0pt;}#yiv6304201544 div.yiv6304201544WordSection1 {}#yiv6304201544 _filtered #yiv6304201544 {} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;} _filtered #yiv6304201544 {font-family:Wingdings;}#yiv6304201544 ol {margin-bottom:0cm;}#yiv6304201544 ul {margin-bottom:0cm;}#yiv6304201544 Dear Wan,   Please have a look at this page:http://www.fieldtriptoolbox.org/development/realtime (also specific to TMSi:http://www.fieldtriptoolbox.org/development/realtime/tmsi) The pages might not be fully up to date but they should help you get started. If you then run into problems please help us help you by supplying the following:   § The cfg you used § The fields of your data structure § The line you called that gave an error / that you would like to ask a question on § The exact error message you got   Best,   Jim       From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl]On Behalf Of wan amirah Wan azlan Sent: dinsdag 4 augustus 2015 11:32 To: fieldtrip at science.ru.nl Subject: [FieldTrip] realtime TMS-EEG   Hi,   I'm using TMSI Porti and I want to record the data in realtime. However, it is not working when I used the ft_realtime_signalviewer. Does I miss any step?  Any solution guys?   Thanks.   Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Sat Aug 15 19:02:34 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Sat, 15 Aug 2015 19:02:34 +0200 Subject: [FieldTrip] holes in head Message-ID: Dear Fieldtrip community, When plotting the head shape with ft_volumerealign (the input to the ft_volumerealign function being simpy the output produced by the ft_read_mri), some of the subjects show deep crater-like holes in the head surface. Images available here: https://goo.gl/photos/txeai9EfFXCn4hQ17 Does anyone have an idea what might have caused these 'holes'? If this is incomplete information to be able to answer the question, please ask so I can provide further details. Best wishes, Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Sun Aug 16 10:55:16 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Sun, 16 Aug 2015 08:55:16 +0000 (UTC) Subject: [FieldTrip] tmsidriver Message-ID: <956939491.3228363.1439715316045.JavaMail.yahoo@mail.yahoo.com> Hi, >From what I understand, to able to create the realtime EEg using TMSi porti is by opening the tmsidriver.exe. Is this correct? If so, where can I find it in the toolbox? because  I do not found the tmsidriver.exe.thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Sun Aug 16 11:16:08 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Sun, 16 Aug 2015 09:16:08 +0000 (UTC) Subject: [FieldTrip] tmsidriver In-Reply-To: <956939491.3228363.1439715316045.JavaMail.yahoo@mail.yahoo.com> References: <956939491.3228363.1439715316045.JavaMail.yahoo@mail.yahoo.com> Message-ID: <1587713174.3378746.1439716568760.JavaMail.yahoo@mail.yahoo.com> Hi, I already found the driver.But why the screen is all black? Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 On Sunday, August 16, 2015 4:55 PM, wan amirah Wan azlan wrote: Hi, >From what I understand, to able to create the realtime EEg using TMSi porti is by opening the tmsidriver.exe. Is this correct? If so, where can I find it in the toolbox? because  I do not found the tmsidriver.exe.thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From michelic72 at gmail.com Mon Aug 17 11:46:38 2015 From: michelic72 at gmail.com (Cristiano Micheli) Date: Mon, 17 Aug 2015 11:46:38 +0200 Subject: [FieldTrip] holes in head In-Reply-To: References: Message-ID: Dear Maris I am heavily guessing here, but are the anatomical MRI images cut on top? I only encountered this in the case that the MRI slices covered an incomplete volume of the head. It might be something else, though this is easy to check... Good luck Cris On Sat, Aug 15, 2015 at 7:02 PM, Maris Skujevskis wrote: > Dear Fieldtrip community, > > When plotting the head shape with ft_volumerealign (the input to the > ft_volumerealign function being simpy the output produced by the > ft_read_mri), some of the subjects show deep crater-like holes in the head > surface. > Images available here: https://goo.gl/photos/txeai9EfFXCn4hQ17 > > Does anyone have an idea what might have caused these 'holes'? > > If this is incomplete information to be able to answer the question, > please ask so I can provide further details. > > Best wishes, > Maris > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Mon Aug 17 14:51:21 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Mon, 17 Aug 2015 14:51:21 +0200 Subject: [FieldTrip] holes in head Message-ID: Thanks for your suggestion, Cristiano. However, the anatomical images do cover the entire head! There seem to be two possibilities - either there is something wrong in how some lower level function employed by ft_volumerealign creates the head surface out of my MR files or there are some real deformities present in my MR images. Since I do not have a well-trained eye for this, could someone take a quick look at a couple of the original MR files of any of these subjects (same link as previously): https://goo.gl/photos/txeai9EfFXCn4hQ17 and say whether they look distorted in any way? Let me know and I will share the MR files. Best wishes, Maris > Date: Mon, 17 Aug 2015 11:46:38 +0200 > From: Cristiano Micheli > To: FieldTrip discussion list > Subject: Re: [FieldTrip] holes in head > Message-ID: > ZT2mdpTxePPwDT72z1hU9biQ7--ipA at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Dear Maris > > I am heavily guessing here, but are the anatomical MRI images cut on top? I > only encountered this in the case that the MRI slices covered an incomplete > volume of the head. > > It might be something else, though this is easy to check... > > Good luck > Cris > > > On Sat, Aug 15, 2015 at 7:02 PM, Maris Skujevskis > wrote: > > > Dear Fieldtrip community, > > > > When plotting the head shape with ft_volumerealign (the input to the > > ft_volumerealign function being simpy the output produced by the > > ft_read_mri), some of the subjects show deep crater-like holes in the > head > > surface. > > Images available here: https://goo.gl/photos/txeai9EfFXCn4hQ17 > > > > Does anyone have an idea what might have caused these 'holes'? > > > > If this is incomplete information to be able to answer the question, > > please ask so I can provide further details. > > > > Best wishes, > > Maris > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150817/b429c646/attachment-0001.html > > > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 57, Issue 13 > ***************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Mon Aug 17 15:20:59 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 17 Aug 2015 15:20:59 +0200 Subject: [FieldTrip] Error in Cluster permutation tutorial? In-Reply-To: References: Message-ID: <3A47A52D-41CB-44F1-ADF3-83F4574F5CE2@donders.ru.nl> Hi Rajat and Stephen Please see my inline reply below. On 06 Aug 2015, at 16:32, Rajat Thomas wrote: > I followed the tutorial on > http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics?s[]=cluster&s[]=permutation > > at the very end, I wanted to do the ft_clusterplot but then I did not get topoplots as a function of time as in the > tutorial and instead just got one plot. > > Is there something wrong in the way the parameters are set in the tutorial. The code for ft_clusterplot was recently extended to be able to handle more types of data, but apparently it broke for the existing type of data. I have fixed it (see https://code.google.com/p/fieldtrip/source/detail?r=10603), it now supports chan, chan_time, chan_freq and chan_freq_time (but only if either time or freq has length 1). The fixed version is available from github or svn, or this evening on ftp. On 07 Aug 2015, at 16:43, Stephen Politzer-Ahles wrote: > Also, is it just me or is http://www.fieldtriptoolbox.org/tutorial/eventrelatedstatistics#permutation_test_based_on_cluster_statistics essentially duplicating (with what looks like a more recent example and code) what's in http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock ? Would it be worthwhile to reconcile these two (and maybe replace one with a link to the other, so they don't get out of sync again)? Content-wise they are similar, but we use the eventrelatedstatistics tutorial in training settings (e.g. workshops) as gentle introduction into statistics in general with only towards the end the clustering, whereas cluster_permutation_timelock goes more in depth. So they serve different goals. Since the code should now be working again for the 1st, I hope it also works for the 2nd. best regards, Robert From michelic72 at gmail.com Mon Aug 17 17:15:09 2015 From: michelic72 at gmail.com (Cristiano Micheli) Date: Mon, 17 Aug 2015 17:15:09 +0200 Subject: [FieldTrip] holes in head In-Reply-To: References: Message-ID: Hi Maris, it's interesting. I think there is no need (for now) to upload the data though. Could you attach the code that you used to generate the figures? There might be important information there, such as the coordinate system or the resolution of the MR scans (what is the FOV? What is the slice distance? etc...) It'd be great if you could patch the snippet of code. All the best! Cris On Mon, Aug 17, 2015 at 2:51 PM, Maris Skujevskis wrote: > Thanks for your suggestion, Cristiano. However, the anatomical images do > cover the entire head! > > There seem to be two possibilities - either there is something wrong in > how some lower level function employed by ft_volumerealign creates the head > surface out of my MR files or there are some real deformities present in my > MR images. > > Since I do not have a well-trained eye for this, could someone take a > quick look at a couple of the original MR files of any of these subjects > (same link as previously): https://goo.gl/photos/txeai9EfFXCn4hQ17 and > say whether they look distorted in any way? Let me know and I will share > the MR files. > > Best wishes, > Maris > > >> Date: Mon, 17 Aug 2015 11:46:38 +0200 >> From: Cristiano Micheli >> To: FieldTrip discussion list >> Subject: Re: [FieldTrip] holes in head >> Message-ID: >> > ZT2mdpTxePPwDT72z1hU9biQ7--ipA at mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> >> Dear Maris >> >> I am heavily guessing here, but are the anatomical MRI images cut on top? >> I >> only encountered this in the case that the MRI slices covered an >> incomplete >> volume of the head. >> >> It might be something else, though this is easy to check... >> >> Good luck >> Cris >> >> >> On Sat, Aug 15, 2015 at 7:02 PM, Maris Skujevskis > > >> wrote: >> >> > Dear Fieldtrip community, >> > >> > When plotting the head shape with ft_volumerealign (the input to the >> > ft_volumerealign function being simpy the output produced by the >> > ft_read_mri), some of the subjects show deep crater-like holes in the >> head >> > surface. >> > Images available here: https://goo.gl/photos/txeai9EfFXCn4hQ17 >> > >> > Does anyone have an idea what might have caused these 'holes'? >> > >> > If this is incomplete information to be able to answer the question, >> > please ask so I can provide further details. >> > >> > Best wishes, >> > Maris >> > >> > >> > _______________________________________________ >> > fieldtrip mailing list >> > fieldtrip at donders.ru.nl >> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: < >> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150817/b429c646/attachment-0001.html >> > >> >> ------------------------------ >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> End of fieldtrip Digest, Vol 57, Issue 13 >> ***************************************** >> > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joerg.hipp at googlemail.com Tue Aug 18 11:20:37 2015 From: joerg.hipp at googlemail.com (Joerg Hipp) Date: Tue, 18 Aug 2015 11:20:37 +0200 Subject: [FieldTrip] Postdoc position: "EEG / MEG Biomarkers Development" at Roche in Basel Message-ID: Dear all, we are searching for a postdoctoral fellow at Roche in Basel, Switzerland. The aim is to identify, develop, and implement disease-related EEG / MEG biomarkers. Please find details here: http://www.roche.com/careers/jobs/jobsearch/job.htm?id=E-3103768353&locale=en&title=PostDoctoral%20Research%20Fellow%20-%20EEG%20/%20MEG%20Biomarkers%20development All the best, Joerg -- Joerg Hipp, PhD Biomarker and Experimental Medicine Leader F. Hoffmann-La Roche Ltd. Grenzacherstrasse 124 4070 Basel, Switzerland Email: joerg.hipp at roche.com https://scholar.google.ch/citations?user=oxsJ6q4AAAAJ&hl=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From aler1 at gmx.de Tue Aug 18 11:34:53 2015 From: aler1 at gmx.de (alla Brodski) Date: Tue, 18 Aug 2015 11:34:53 +0200 Subject: [FieldTrip] Postdoc position: "EEG / MEG Biomarkers Development" at Roche in Basel In-Reply-To: References: Message-ID: An HTML attachment was scrubbed... URL: From marliesvissers at gmail.com Tue Aug 18 13:16:36 2015 From: marliesvissers at gmail.com (Marlies Vissers) Date: Tue, 18 Aug 2015 13:16:36 +0200 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 4 In-Reply-To: References: <44FE85B3-51D3-4FEF-9FD7-064CA8CE2D93@donders.ru.nl> <431477C1-7C6F-4D4D-96F5-1C80729B3140@fcdonders.ru.nl> Message-ID: Dear Eric, Jan-Mathijs, Arjan, and Jorn, Thanks for your input on my questions. Jan-Mathijs’ reading of my post was correct: with the connectivity matrix I indeed intended to refer to the boolean matrix that defines the neighbour-structure of the channels. The analysis I plan to run is a cross-subject brain-behavior correlation (so over subjects) over my channel*time*frequency space, which should subsequently be cluster-corrected. Thanks Arjan for pointing out that the function I was using has been renamed! My problem was that I obtained strange cluster shapes with non-neighbouring electrodes only, while minnbchan was set to 2. It might be important to mention again that I imported my data to Fieldtrip for the permutation test, after running time-frequency composition with custom Matlab routines. I structured my data such that the format matches the format of data that was fully preprocessed and decomposed in Fieldtrip (at least I tried to). Jorn’s advice on how to run the low-level function channelconnectivity was helpful. When doing so (inputting the data structure as it was passed by ft_statistics_montecarlo), I noted that the boolean connectivity matrix representing the channel-neighbours did not resemble the spatial characteristics of the electrodes in my data. Furthermore, I noticed that the channel field in my output (stat.cfg.channel) displayed a different channel order than the one I constructed using ft_read_sens, which properly fits the organization of my data. I tried to solve this issue by manually hardcoding the correct channellabels in the private function channelconnectivity. This seems to work: my clusters now consist of neighbouring channels, and the channel order in my output is similar to my input as well. I am not sure whether my solution is valid, so I copied my edits below (line18-25 in the original channelconnectivty function). I commented out the line ‘chans = cfg.channel’, and hardcoded the channel locations instead. If one of you sees something that is absolutely not intended to happen, knows what might have gone wrong, or has any other advice or comments, please let me know! Thanks in advance, Marlies Edited code from the function channelconnectivity (orignal line chans=cfg.channel is now commented out) % check whether to use channels in the cfg or data if nargin < 2 && isfield(cfg, 'channel') %chans = cfg.channel; chans ={ 'Fp1' 'AF7' 'AF3' 'F1' 'F3' 'F5' 'F7' 'FT7' 'FC5' 'FC3' 'FC1' 'C1' 'C3' 'C5' 'T7' 'TP7' 'CP5' 'CP3' 'CP1' 'P1' 'P3' 'P5' 'P7' 'P9' 'PO7' 'PO3' 'O1' 'Iz' 'Oz' 'POz' 'Pz' 'CPz' 'Fpz' 'Fp2' 'AF8' 'AF4' 'AFz' 'Fz' 'F2' 'F4' 'F6' 'F8' 'FT8' 'FC6' 'FC4' 'FC2' 'FCz' 'Cz' 'C2' 'C4' 'C6' 'T8' 'TP8' 'CP6' 'CP4' 'CP2' 'P2' 'P4' 'P6' 'P8' 'P10' 'PO8' 'PO4' 'O2'}; elseif nargin == 2 chans = data.label; else error('either the cfg needs to have both cfg.channel and cfg.neighbours, or a second (data) input argument needs to be specified'); end On 5 August 2015 at 16:45, Arjen Stolk wrote: > And to briefly chime in on point 1, i believe that statfun has changed its > name to correlationT some time ago. > Yours, Arjen > > > > On Aug 5, 2015, at 6:11 AM, Schoffelen, J.M. (Jan Mathijs) < > jan.schoffelen at donders.ru.nl> wrote: > > Hi Eric, > > Allow me to chime in to avoid any confusion from your side regarding point > 2). I think that Marlies refers to a boolean spatial adjacency matrix that > defines whether channels are neighbours, or not. In the code, this is > referred to as a matrix named ‘connectivity’, which may not be the most > obvious denomination. At some point in time we have made some low-level > changes in the FieldTrip code, concerning the treatment of the spatial > dimension for the clustering, which allows to treat spatial clustering > along edges along a triangulated mesh (e.g. dipole locations defined on the > cortical sheet) in the same way as spatial clustering on an extracranial > channel array. Channel clustering is now a ‘special case’ where the > cfg.neighbours structure array is converted into the boolean adjancency > matrix, by the low-level channelconnectivity function, which is in > fieldtrip/private. > > Best, > Jan-Mathijs > > On Aug 5, 2015, at 2:54 PM, Maris, E.G.G. (Eric) > wrote: > > Dear Marlies, > > I did not go through all details of your correspondence with Jorn, but let > me add a few remarks from a birds-eye perspective. > > 1. Your statfun is intersubjcorr, which evaluates the correlation over > subjects between a neuronal and a behavioural variable, with the neuronal > variable typically being high-dimensional, and thereby creating a multiple > comparisons problem. Btw, I don’t like the name *inter*subjcorr, because > the correlation is * over* subjects and not between (=inter). > 2. I’m puzzled by where the connectivity matrix comes from, because your > analysis does not involve between-channel quantities. In fact, from the > perspective of the neuronal data, it is a typical univariate analysis in > which every channel is treated separately. The only between-aspect in your > study involves the relation between the (high-dimensional) neuronal > variable and the (one-dimensional) behavioral variable. > 3. Fieldtrip has no cluster-based statistics implemented that clusters > channel-pairs, except for the trivial case in which you select a single > reference channel for which you evaluate the coupling with all other > channels (as in Maris, Schoffelen & Fries, 2007). > > best, > Eric > > > > > *From: *Marlies Vissers > *Subject: **Re: [FieldTrip] Effect of cfg.minnbchan* > *Date: *4 Aug 2015 16:38:57 CEST > *To: *FieldTrip discussion list > *Reply-To: *FieldTrip discussion list > > > Dear Jörn, > > > Thanks for your reply and suggestion! My neighbourhood-definitions look > fine according to ft_neighbourplot. > However, I am not sure whether the connectivity matrix in my output > (stat.cfg.connectivity) is correct. For example, I inspected which channels > are defined as neighbours of C5 in the connectivity matrix. Here, I assumed > the channel order in this matrix resembles the channel order defined by the > function ‘ft_read_sens’, as stored in the field elec.label. > Using this particular organization of electrodes, the pattern of spatially > neighbouring channels matches the strange spatial distribution of one of my > resulting clusters. > E.g., C5 seems to neighbour FC4 and Cz (among others). This pattern > matches my strange result, where a cluster consisting of FC4, Cz, and C5, > survived cluster correction with minnbchan set to 2. > > > I am currently trying to establish whether my cfg.connectivity matrix is > indeed the problem, and where this problem arises. One thing I suspect > might be the cause is that the call to ‘channelconnectivity’ by > ‘ft_statistics_montecarlo’ to construct the spatial neighbour structure, > goes wrong. When I try to apply ‘channelconnectivity’ on my cfg structure > directly (but not when running ft_freqstatistics), I get the following error > *‘Undefined function 'channelconnectivity' for input arguments of type > 'struct'’*. > If channelconnectivity was not properly run, it could be that the > electrode ordering as defined by ft_read_sens is not adjusted to the order > used by cfg.neighbours before construction of the connectivity matrix. > However, when I just run ft_freqstatistics, I do not get an error that > suggests any problems with ‘channelconnectivity’, so I am not entirely sure > whether this error also occurs when running the analysis as a whole. > > > Could you (or anyone else) give me any advice on how to make sure that the > definition of neighbours in the connectivity matrix is constructed using > the properly reordered vector with channel indices (the variable sel2 in > channelconnectivity if I’m correct)? > > > Thanks in advance! > > > Best, > Marlies > > On 3 August 2015 at 09:37, Jörn M. Horschig wrote: > >> Dear Marlies, >> >> if I am not mistaken, the minnbchan option checks indeed if every >> channels in a cluster has at least the specified amount of channels in it >> and removes it otherwise. The code is documented as follows: >> % For every (time,frequency)-element, it is calculated how many >> significant >> % neighbours .this channel has If a significant channel has less than >> minnbchan >> % significant neighbours, then this channel is removed from onoff. >> >> If something went wrong is hard to tell – it also depends on how the >> neighbor structure looks like. If you do not have C3 or C1, then C5 can >> indeed be defined as a neighbor of Cz, and if you do not have FC2, then Cz >> could be called a neighbor of FC4. You can check how neighbors are defined >> by using ft_neighbourplot. That’s the first check I’d do. >> >> Best, >> Jörn >> >> >> *--* >> >> *Jörn M. Horschig, PhD*, Software Engineer >> Artinis Medical Systems | +31 481 350 980 >> >> *From:* fieldtrip-bounces at science.ru.nl [mailto: >> fieldtrip-bounces at science.ru.nl] *On Behalf Of *Marlies Vissers >> *Sent:* Friday, July 31, 2015 3:27 PM >> *To:* fieldtrip, donders >> *Subject:* [FieldTrip] Effect of cfg.minnbchan >> >> Dear Fieldtrippers. >> >> I have a question about the effect of the tuning parameter cfg.minnbchan >> when performing cluster based permutation testing, since the spatial >> characteristics of my clusters differ from what I expected to find given >> the settings I used. >> >> I am running cross-subject correlations (n=31) between a behavioral >> variable and a subj*channel*time*frequency matrix with power data >> (preprocessed using EEGlab and decomposed outside of Fieldtrip), using >> ft_freqstatistics with the function 'ft_statfun_intersubcorr'. Since I'd >> like to avoid finding clusters with difficult-to-interpret shapes, I set >> cfg.minnbchan to 2. >> >> My concern however, is that the resulting clusters do not always exist of >> neighbouring electrodes. For example, one of the resulting clusters is >> located at channels C5, Cz & FC4 (EEG, 64 electrodes), which are connected >> through the other dimensions (time & frequency). In one of Eric Maris' >> previous replies to an older post about cfg.minnbchan, I read that the >> parameter cfg.minnbchan only concerns spatial (not time/freq) neighbours. >> Does this mean that any cluster without spatially neighbouring electrodes >> should have been rejected when minnbchan is set to 2? >> >> I would be very grateful if someone could let me know whether setting >> cfg.minnbchan to 2 can -in principle- still yield clusters with >> spatially-non-adjacent electrodes, or whether this result is likely due to >> an error in my code. If the latter, I'd very much appreciate advice on >> checks I could perform to detect the potential error. >> >> The code I used to run this analysis is pasted below. >> >> Thanks in advance! >> >> Best, >> Marlies >> >> Marlies Vissers >> PhD student >> >> University of Amsterdam | Department Brain and Cognition | Cognition and >> Plasticity Laboratory >> Weesperplein 4 | 1018 XA Amsterdam | 020 - 525 67 24 | M.E.Vissers at uva.nl >> >> --- >> >> % Import the electrode labels from an EEGlab set >> elec = ft_read_sens('template_64.set','fileformat','eeglab_set'); >> >> % Create matrix with TF data >> freqData.freq = frex; % Frequenies >> of TF matrix >> freqData.time = tx(TF_idx(1):TF_idx(2))./1000; % Time samples in TF >> matrix >> freqData.dimord = 'subj_chan_freq_time'; >> freqData.label = elec.label; >> freqData.powspctrm = tempTF; % tempTF is matrix >> with subj*channels*freq*time >> >> % Create matrix with behavioral data, make sure the sizes match >> behav.freq = frex; >> behav.time = tx(TF_idx(1):TF_idx(2))./1000; >> behav.dimord = 'subj_chan_freq_time'; % Trick FT: there is >> just behavioral data in this matrix >> behav.label = elec.label; >> behav.powspctrm = repmat(accEffect,[1 >> size(freqData.powspctrm,2),size(freqData.powspctrm,3),size(freqData.powspctrm,4)]); >> % accEffect is 1*subj array >> >> % Set configuration for perm test >> % Create cfg and insert parameters >> cfg = []; >> cfg.latency = [0 1.250]; >> cfg.frequency = [2 30]; >> cfg.channel ='all'; >> cfg.method = 'montecarlo'; >> cfg.statistic = 'ft_statfun_intersubcorr'; >> cfg.type = ft_getopt(cfg, 'type', 'Spearman'); >> cfg.correctm = 'cluster'; >> cfg.clusteralpha = 0.05; >> cfg.clusterstatistic = 'maxsum'; >> cfg.minnbchan = 2; >> cfg.tail = 0; >> cfg.clustertail = 0; >> cfg.alpha = 0.025; >> cfg.numrandomization = 1000; >> >> % prepare_neighbours determines what sensors may form clusters: load >> Biosemi 64 channel cap >> cfg.template = [fieldtripdir thisSlash 'template' thisSlash >> 'neighbours' thisSlash 'biosemi64_neighb.mat']; >> cfg.layout = [fieldtripdir thisSlash 'template' >> thisSlash 'layout' thisSlash 'biosemi64.lay']; >> cfg_neighb.method = 'template'; >> cfg.neighbours = ft_prepare_neighbours(cfg_neighb,freqData); >> >> % Create design mat >> subj = 31; >> design = zeros(2,2*subj); >> for i = 1:subj >> design(2,i) = i; >> end >> for i = 1:subj >> design(2,subj+i) = i; >> end >> design(1,1:subj) = 1; >> design(1,subj+1:2*subj) = 2; >> cfg.design = design; >> cfg.ivar = 1; >> cfg.uvar = 2; >> >> % Run stats >> [stat] = ft_freqstatistics(cfg,freqData,behav); >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.vandenieuwenhuijzen at donders.ru.nl Tue Aug 18 16:29:55 2015 From: m.vandenieuwenhuijzen at donders.ru.nl (Nieuwenhuijzen, M.E. van de (Marieke)) Date: Tue, 18 Aug 2015 14:29:55 +0000 Subject: [FieldTrip] zlim in ft_plot_mesh & record-button in ft_sourcemovie Message-ID: Hi Fieldtrippers, I have two small questions on plotting MNE reconstructed source space data on a mesh. - The first question is about ft_plot_mesh. Is it possible to set the zlim somehow, such that if I want to compare two plots the colour scales of said plots are equal? - The second question is about ft_sourcemovie, and more specifically the Record-button. When I click this button, the Pause and Quit buttons seem to be ignored afterwards, so I can't stop the movie, nor can I quit the movie and close the window, which means I have to force-quit Matlab. Do you have any pointers on what could solve this issue? And where would this recorded movie be saved? Or do I misinterpret the function of the button? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.lam at donders.ru.nl Tue Aug 18 17:29:49 2015 From: n.lam at donders.ru.nl (Lam, N.H.L. (Nietzsche)) Date: Tue, 18 Aug 2015 15:29:49 +0000 Subject: [FieldTrip] zlim in ft_plot_mesh & record-button in ft_sourcemovie In-Reply-To: References: Message-ID: Hey Marieke, For adjusting the zlim I use Cheers, Nietzsche ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Nieuwenhuijzen, M.E. van de (Marieke) [m.vandenieuwenhuijzen at donders.ru.nl] Sent: 18 August 2015 16:29 To: fieldtrip at science.ru.nl Subject: [FieldTrip] zlim in ft_plot_mesh & record-button in ft_sourcemovie Hi Fieldtrippers, I have two small questions on plotting MNE reconstructed source space data on a mesh. - The first question is about ft_plot_mesh. Is it possible to set the zlim somehow, such that if I want to compare two plots the colour scales of said plots are equal? - The second question is about ft_sourcemovie, and more specifically the Record-button. When I click this button, the Pause and Quit buttons seem to be ignored afterwards, so I can't stop the movie, nor can I quit the movie and close the window, which means I have to force-quit Matlab. Do you have any pointers on what could solve this issue? And where would this recorded movie be saved? Or do I misinterpret the function of the button? Best, Marieke -------------- next part -------------- An HTML attachment was scrubbed... URL: From icelandhouse at gmail.com Wed Aug 19 01:53:06 2015 From: icelandhouse at gmail.com (Maris Skujevskis) Date: Wed, 19 Aug 2015 01:53:06 +0200 Subject: [FieldTrip] "segmentation is not star-shaped" warning Message-ID: Dear Fieldtrip community, I am working on constructing an EEG volume conduction model. When running ft_prepare_mesh I get a warning message the meaning if which is not clear, hence I do not know how to fix it. Any help will be appreciated. Details below. Code executed: >mri = ft_read_mri(file_name_mri); >cfg = [ ]; >cfg.brainsmooth = 5; >cfg.scalpsmooth = 4; >cfg.brainthreshold = 0.5; >cfg.scalpthreshold = 0.1; >segm_mri = ft_volumesegment(cfg, mri); >cfg = [ ]; >cfg.method = 'projectmesh'; >cfg.tissue = {'brain','skull','scalp'}; >cfg.numvertices = [3000 2000 1000]; >surf_mesh = ft_prepare_mesh(cfg, segm_mri); The code executes till the end, but I get this message: >"Warning: the segmentation is not star-shaped, please check the surface mesh" When inspecting the mesh visually, I find no obvious abnormalities. The meshes that do get the warning look more or less the same as the meshes of other subjects that do not get the warning. What is most interesting, when I use a segmented Fieldtrip template ('~/matlab/fieldtrip/external/spm8/templates/T1.nii') as an input to ft_prepare_mesh, I also get the same warning. Here are 3 related questions: What could be another way of checking/another indicator that the surface meshes have been constructed incorrectly, since visually they seem ok? Could changing the smoothing and thresholding parameters improve the segmentation? (I haven't yet found values that do not produce the warning, though.) Is this an 'important' warning that signals that my subsequent source localization might not work or might work incorrectly (i.e., I should not just ignore it) ? Thanks in advance, Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From daphbd1994 at hotmail.com Wed Aug 19 17:18:42 2015 From: daphbd1994 at hotmail.com (=?iso-8859-1?B?RGFwaG7pIEJlcnRyYW5kLUR1Ym9pcw==?=) Date: Wed, 19 Aug 2015 13:18:42 -0200 Subject: [FieldTrip] Convert .mat to .ds Message-ID: Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander "But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version?Best regards,Daphné -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonas at obleser.de Wed Aug 19 23:05:35 2015 From: jonas at obleser.de (Jonas Obleser) Date: Wed, 19 Aug 2015 23:05:35 +0200 Subject: [FieldTrip] Pre-call for new post docs in the Obleser lab Message-ID: <6D62C565-634F-4C2B-90F3-6CF7A9AF80A9@obleser.de> Pre-call: The research group “Auditory Cognition” (headed by Prof. Dr. Jonas Obleser; auditorycognition.com ) in the recently established Department of Psychology, University of Lübeck, is seeking to soon hire several Postdoctoral Researchers starting by January 2016, initially for 3 years, with the option of a 2-year extension. These positions fall into the larger framework of an ERC Consolidator grant “The listening challenge: How ageing brains adapt” recently awarded to Jonas Obleser, and will allow the joint development of cognitive neuroscience and psychological research projects targeting adaptive control in the auditory modality of middle-aged adults. [About the ERC project: The auditory sensory modality poses an excellent, although under-utilised, research model to understand the cognitive adjustments to sensory change (here termed “adaptive control”), their neural basis, and their large variation amongst individuals. Hearing abilities begin to decline already in the fourth life decade, and our guiding hypothesis is that individuals differ in the extent to which they are neurally, cognitively, and psychologically equipped to adapt to this sensory decline.] We are looking for creative minds with a PhD degree and a promising track record in cognitive neuroscience, psychology, physics, or engineering. A strong background and interest in research methods is desirable. Prior experience with either human neuroscience methods (especially advanced EEG and/or fMRI analyses) or modeling of rich data sets (e.g., latent growth modeling) is expected. The University of Lübeck is a modern university specializing in Medicine, Computer Science, Molecular Biology, Biomathematics and Medical Engineering. Internationally renowned research and high standards of academic tutoring characterize the profile of the university. A new dedicated research building (Centre for Brain, Behaviour, and Metabolism – CBBM) housing also the Obleser lab will open in late 2015. Payment will follow salary group E13 TV-L (full time), if conditions based on German Public service regulations are satisfied. These positions will be announced officially later in autumn 2015, but interested candidates should be in touch now with Jonas Obleser, jonas.obleser at uni-luebeck.de http://auditorycognition.com http://uni-luebeck.de -------------- next part -------------- An HTML attachment was scrubbed... URL: From samane.shojaie at gmail.com Thu Aug 20 06:06:54 2015 From: samane.shojaie at gmail.com (Seyedeh Samane Shojaei) Date: Thu, 20 Aug 2015 12:06:54 +0800 Subject: [FieldTrip] problem with surface & template files Message-ID: Dear all, May I know where the "surface files" is? I am running last part of "Localizing oscillatory sources using beamformer techniques" tutorial ( http://www.fieldtriptoolbox.org/tutorial/beamformer), but have a difficulty to find 'surface_white_both.mat'. my another problem is for running the code available for planar gradient calculation (http://www.fieldtriptoolbox.org/tutorial/eventrelatedaveraging). the error is because the template file is not found. ??? Error using ==> ft_prepare_neighbours at 140 Template file could not be found - please check spelling or see http://fieldtrip.fcdonders.nl/faq/how_can_i_define_my_own_neighbourhood_template (please consider sharing it with others via the FT mailing list) how to add the templates? when I use "addpath('template')", it is not recognized. your help will be appreciated, Samane -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Thu Aug 20 09:32:27 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 20 Aug 2015 07:32:27 +0000 Subject: [FieldTrip] problem with surface & template files In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B3036F@exprd01.hosting.ru.nl> Dear Samane, Please make sure you have downloaded the full version of fieldtrip and not the ‘lite’ version. Not all of the templates are included in the ‘lite’ version to save space. If you have done that, make sure that you have added the path to the fieldtrip folder (e.g. addpath(‘d:\fieldtrip’) and run ‘ft_defaults’. You should then be able to run the code in the beamformer and event-related averaging tutorial as fieldtrip automatically looks for the templates in the correct location (which is: fieldtrip\template\anatomy\...). Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Seyedeh Samane Shojaei Sent: donderdag 20 augustus 2015 6:07 To: FieldTrip discussion list Subject: [FieldTrip] problem with surface & template files Dear all, May I know where the "surface files" is? I am running last part of "Localizing oscillatory sources using beamformer techniques" tutorial (http://www.fieldtriptoolbox.org/tutorial/beamformer), but have a difficulty to find 'surface_white_both.mat'. my another problem is for running the code available for planar gradient calculation (http://www.fieldtriptoolbox.org/tutorial/eventrelatedaveraging). the error is because the template file is not found. ??? Error using ==> ft_prepare_neighbours at 140 Template file could not be found - please check spelling or see http://fieldtrip.fcdonders.nl/faq/how_can_i_define_my_own_neighbourhood_template (please consider sharing it with others via the FT mailing list) how to add the templates? when I use "addpath('template')", it is not recognized. your help will be appreciated, Samane -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Thu Aug 20 09:37:20 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 20 Aug 2015 07:37:20 +0000 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: References: Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> Dear Daphne, I have checked for you and the newest available version of fieldtrip (also fieldtrip-lite) includes writeCTFds.m in the folder 'fieldtrip\external\ctf\'. I have also checked a version from 2010 and it was there back then as well. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: woensdag 19 augustus 2015 17:19 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Convert .mat to .ds Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander " But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? Best regards, Daphné -------------- next part -------------- An HTML attachment was scrubbed... URL: From samane.shojaie at gmail.com Thu Aug 20 10:20:54 2015 From: samane.shojaie at gmail.com (Seyedeh Samane Shojaei) Date: Thu, 20 Aug 2015 16:20:54 +0800 Subject: [FieldTrip] problem with surface & template files In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB12B3036F@exprd01.hosting.ru.nl> References: <3D00B7615FB58D46A0B49B9AD67A33EB12B3036F@exprd01.hosting.ru.nl> Message-ID: Dear Jim, Thank you so much. I was using "lite" version. now it is fixed. Regards, Samane On Thu, Aug 20, 2015 at 3:32 PM, Herring, J.D. (Jim) < j.herring at donders.ru.nl> wrote: > Dear Samane, > > > > Please make sure you have downloaded the full version of fieldtrip and not > the ‘lite’ version. Not all of the templates are included in the ‘lite’ > version to save space. If you have done that, make sure that you have added > the path to the fieldtrip folder (e.g. addpath(‘d:\fieldtrip’) and run > ‘ft_defaults’. > > > > You should then be able to run the code in the beamformer and > event-related averaging tutorial as fieldtrip automatically looks for the > templates in the correct location (which is: > fieldtrip\template\anatomy\...). > > > > Best, > > > > Jim > > > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Seyedeh Samane Shojaei > *Sent:* donderdag 20 augustus 2015 6:07 > *To:* FieldTrip discussion list > *Subject:* [FieldTrip] problem with surface & template files > > > > Dear all, > > > > May I know where the "surface files" is? I am running last part of "Localizing > oscillatory sources using beamformer techniques" tutorial ( > http://www.fieldtriptoolbox.org/tutorial/beamformer), but have a > difficulty to find 'surface_white_both.mat'. > > > > my another problem is for running the code available for planar gradient > calculation ( > http://www.fieldtriptoolbox.org/tutorial/eventrelatedaveraging). the > error is because the template file is not found. > > ??? Error using ==> ft_prepare_neighbours at 140 > > Template file could not be found - please check spelling or see > > > http://fieldtrip.fcdonders.nl/faq/how_can_i_define_my_own_neighbourhood_template > > (please consider sharing it with others via the FT mailing list) > > > > how to add the templates? when I use "addpath('template')", it is > not recognized. > > > > > > > your help will be appreciated, > > Samane > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daphbd1994 at hotmail.com Thu Aug 20 16:13:38 2015 From: daphbd1994 at hotmail.com (=?Windows-1252?B?RGFwaG7pIEJlcnRyYW5kLUR1Ym9pcw==?=) Date: Thu, 20 Aug 2015 12:13:38 -0200 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> References: , <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> Message-ID: Thank you! It was my error : I downloaded an older version, the one on the top of the list! I am a little bit confused, it looks like if I need to put .ds as an input file. I just have .mat times-series that doesn't come from CTF so I cannot use readCTFds.m. Would it be possible to convert .mat times-series (nSensor x ntimes-series) to .ds? Best, Daphné From: j.herring at donders.ru.nl To: fieldtrip at science.ru.nl Date: Thu, 20 Aug 2015 07:37:20 +0000 Subject: Re: [FieldTrip] Convert .mat to .ds Dear Daphne, I have checked for you and the newest available version of fieldtrip (also fieldtrip-lite) includes writeCTFds.m in the folder ‘fieldtrip\external\ctf\’. I have also checked a version from 2010 and it was there back then as well. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: woensdag 19 augustus 2015 17:19 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Convert .mat to .ds Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander " But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? Best regards, Daphné _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Thu Aug 20 17:05:30 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 20 Aug 2015 15:05:30 +0000 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: References: , <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl> Dear Daphne, If you are trying to read your own data format into fieldtrip, perhaps you should have a look at this page: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat It would be easier to transform your data format to be used in Fieldtrip than to first convert it to a CTF format and then read it into Fieldtrip. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: donderdag 20 augustus 2015 16:14 To: FieldTrip discussion list Subject: Re: [FieldTrip] Convert .mat to .ds Thank you! It was my error : I downloaded an older version, the one on the top of the list! I am a little bit confused, it looks like if I need to put .ds as an input file. I just have .mat times-series that doesn't come from CTF so I cannot use readCTFds.m. Would it be possible to convert .mat times-series (nSensor x ntimes-series) to .ds? Best, Daphné ________________________________ From: j.herring at donders.ru.nl To: fieldtrip at science.ru.nl Date: Thu, 20 Aug 2015 07:37:20 +0000 Subject: Re: [FieldTrip] Convert .mat to .ds Dear Daphne, I have checked for you and the newest available version of fieldtrip (also fieldtrip-lite) includes writeCTFds.m in the folder 'fieldtrip\external\ctf\'. I have also checked a version from 2010 and it was there back then as well. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: woensdag 19 augustus 2015 17:19 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Convert .mat to .ds Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander " But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? Best regards, Daphné _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Aug 20 17:09:09 2015 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 20 Aug 2015 16:09:09 +0100 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl> References: <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl> Message-ID: Just to add to Jim's point, some ITAB formats are supported in Fieldtrip (I see itab_raw and itab_mhd). If you can get your data to be in one of those formats, things will be much easier for you. Best, Vladimir On Thu, Aug 20, 2015 at 4:05 PM, Herring, J.D. (Jim) < j.herring at donders.ru.nl> wrote: > Dear Daphne, > > > > If you are trying to read your own data format into fieldtrip, perhaps you > should have a look at this page: > http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat > > > > It would be easier to transform your data format to be used in Fieldtrip > than to first convert it to a CTF format and then read it into Fieldtrip. > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Daphné Bertrand-Dubois > *Sent:* donderdag 20 augustus 2015 16:14 > *To:* FieldTrip discussion list > > *Subject:* Re: [FieldTrip] Convert .mat to .ds > > > > Thank you! > > > > It was my error : I downloaded an older version, the one on the top of the > list! > > > > I am a little bit confused, it looks like if I need to put .ds as an input > file. I just have .mat times-series that doesn't come from CTF so I cannot > use readCTFds.m. Would it be possible to convert .mat times-series (nSensor > x ntimes-series) to .ds? > > > > Best, > > > > Daphné > > > ------------------------------ > > From: j.herring at donders.ru.nl > To: fieldtrip at science.ru.nl > Date: Thu, 20 Aug 2015 07:37:20 +0000 > Subject: Re: [FieldTrip] Convert .mat to .ds > > Dear Daphne, > > > > I have checked for you and the newest available version of fieldtrip (also > fieldtrip-lite) includes writeCTFds.m in the folder > ‘fieldtrip\external\ctf\’. I have also checked a version from 2010 and it > was there back then as well. > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [ > mailto:fieldtrip-bounces at science.ru.nl ] *On > Behalf Of *Daphné Bertrand-Dubois > *Sent:* woensdag 19 augustus 2015 17:19 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Convert .mat to .ds > > > > Hi, > > > > I have data (from the MEG at ITAB) that cannot be process by fieldtrip. > Howerver, we have convert them into .mat file and I would like them to be > in .ds format so I can process the data. > > > > I read this message: > > > > *" Hello z.imane* > > > > *To convert .mat to .ds, try using the function writeCTFds.m located in the* > > *fieldtrip folder /fieldtrip/external/ctf/* > > > > *Best* > > *Bankim Subhash Chander "* > > But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? > > Best regards, > > Daphné > > > _______________________________________________ fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From daphbd1994 at hotmail.com Thu Aug 20 17:03:52 2015 From: daphbd1994 at hotmail.com (=?Windows-1252?B?RGFwaG7pIEJlcnRyYW5kLUR1Ym9pcw==?=) Date: Thu, 20 Aug 2015 13:03:52 -0200 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: References: , <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl>, , <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl>, Message-ID: Thank you! In fact, I wanted .ds because I wanted to use Brainstorm (and brainstorm doesn't read ITAB data format). If I can't that's ok, I will use Fieldtrip! I could find read_itab_mhd but I don't find read_itab_raw (mines are .raw from ITAB). I also found itab2grad. :) Best,Daphné Date: Thu, 20 Aug 2015 16:09:09 +0100 From: litvak.vladimir at gmail.com To: fieldtrip at science.ru.nl Subject: Re: [FieldTrip] Convert .mat to .ds Just to add to Jim's point, some ITAB formats are supported in Fieldtrip (I see itab_raw and itab_mhd). If you can get your data to be in one of those formats, things will be much easier for you. Best, Vladimir On Thu, Aug 20, 2015 at 4:05 PM, Herring, J.D. (Jim) wrote: Dear Daphne, If you are trying to read your own data format into fieldtrip, perhaps you should have a look at this page: http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat It would be easier to transform your data format to be used in Fieldtrip than to first convert it to a CTF format and then read it into Fieldtrip. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: donderdag 20 augustus 2015 16:14 To: FieldTrip discussion list Subject: Re: [FieldTrip] Convert .mat to .ds Thank you! It was my error : I downloaded an older version, the one on the top of the list! I am a little bit confused, it looks like if I need to put .ds as an input file. I just have .mat times-series that doesn't come from CTF so I cannot use readCTFds.m. Would it be possible to convert .mat times-series (nSensor x ntimes-series) to .ds? Best, Daphné From: j.herring at donders.ru.nl To: fieldtrip at science.ru.nl Date: Thu, 20 Aug 2015 07:37:20 +0000 Subject: Re: [FieldTrip] Convert .mat to .ds Dear Daphne, I have checked for you and the newest available version of fieldtrip (also fieldtrip-lite) includes writeCTFds.m in the folder ‘fieldtrip\external\ctf\’. I have also checked a version from 2010 and it was there back then as well. Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Daphné Bertrand-Dubois Sent: woensdag 19 augustus 2015 17:19 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Convert .mat to .ds Hi, I have data (from the MEG at ITAB) that cannot be process by fieldtrip. Howerver, we have convert them into .mat file and I would like them to be in .ds format so I can process the data. I read this message: " Hello z.imane To convert .mat to .ds, try using the function writeCTFds.m located in the fieldtrip folder /fieldtrip/external/ctf/ Best Bankim Subhash Chander " But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? Best regards, Daphné _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Thu Aug 20 17:41:49 2015 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Thu, 20 Aug 2015 16:41:49 +0100 Subject: [FieldTrip] Convert .mat to .ds In-Reply-To: References: <3D00B7615FB58D46A0B49B9AD67A33EB12B3037E@exprd01.hosting.ru.nl> <3D00B7615FB58D46A0B49B9AD67A33EB12B308CE@exprd01.hosting.ru.nl> Message-ID: itab_raw is supported directly in the code of ft_read_data. You should try reading your data with ft_preprocessing function as in the tutorials. If that works I suggest you contact Francoise Tadel and tell him that you have data that you can read with Fieldtrip and want to import it into Brainstorm. I'm sure he'll think of something easier than writing it out in the CTF format. Best, Vladimir On Thu, Aug 20, 2015 at 4:03 PM, Daphné Bertrand-Dubois < daphbd1994 at hotmail.com> wrote: > Thank you! > > In fact, I wanted .ds because I wanted to use Brainstorm (and brainstorm > doesn't read ITAB data format). If I can't that's ok, I will use Fieldtrip! > > I could find *read_itab_mhd* but I don't find *read_itab_raw* (mines are > .raw from ITAB). I also found *itab2grad. :)* > > Best, > Daphné > ------------------------------ > Date: Thu, 20 Aug 2015 16:09:09 +0100 > From: litvak.vladimir at gmail.com > To: fieldtrip at science.ru.nl > > Subject: Re: [FieldTrip] Convert .mat to .ds > > Just to add to Jim's point, some ITAB formats are supported in Fieldtrip > (I see itab_raw and itab_mhd). If you can get your data to be in one of > those formats, things will be much easier for you. > > Best, > > Vladimir > > On Thu, Aug 20, 2015 at 4:05 PM, Herring, J.D. (Jim) < > j.herring at donders.ru.nl> wrote: > > Dear Daphne, > > > > If you are trying to read your own data format into fieldtrip, perhaps you > should have a look at this page: > http://www.fieldtriptoolbox.org/faq/how_can_i_import_my_own_dataformat > > > > It would be easier to transform your data format to be used in Fieldtrip > than to first convert it to a CTF format and then read it into Fieldtrip. > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Daphné Bertrand-Dubois > *Sent:* donderdag 20 augustus 2015 16:14 > *To:* FieldTrip discussion list > > *Subject:* Re: [FieldTrip] Convert .mat to .ds > > > > Thank you! > > > > It was my error : I downloaded an older version, the one on the top of the > list! > > > > I am a little bit confused, it looks like if I need to put .ds as an input > file. I just have .mat times-series that doesn't come from CTF so I cannot > use readCTFds.m. Would it be possible to convert .mat times-series (nSensor > x ntimes-series) to .ds? > > > > Best, > > > > Daphné > > > ------------------------------ > > From: j.herring at donders.ru.nl > To: fieldtrip at science.ru.nl > Date: Thu, 20 Aug 2015 07:37:20 +0000 > Subject: Re: [FieldTrip] Convert .mat to .ds > > Dear Daphne, > > > > I have checked for you and the newest available version of fieldtrip (also > fieldtrip-lite) includes writeCTFds.m in the folder > ‘fieldtrip\external\ctf\’. I have also checked a version from 2010 and it > was there back then as well. > > > > Best, > > > > Jim > > > > *From:* fieldtrip-bounces at science.ru.nl [ > mailto:fieldtrip-bounces at science.ru.nl ] *On > Behalf Of *Daphné Bertrand-Dubois > *Sent:* woensdag 19 augustus 2015 17:19 > *To:* fieldtrip at science.ru.nl > *Subject:* [FieldTrip] Convert .mat to .ds > > > > Hi, > > > > I have data (from the MEG at ITAB) that cannot be process by fieldtrip. > Howerver, we have convert them into .mat file and I would like them to be > in .ds format so I can process the data. > > > > I read this message: > > > > *" Hello z.imane* > > > > *To convert .mat to .ds, try using the function writeCTFds.m located in the* > > *fieldtrip folder /fieldtrip/external/ctf/* > > > > *Best* > > *Bankim Subhash Chander "* > > But I did not find the "external" folder with the function writeCTFd.m inside. Maybe it is because I have the new version? > > Best regards, > > Daphné > > > _______________________________________________ fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Fri Aug 21 03:31:19 2015 From: wanamirahwanazlan at yahoo.com (wan amirah Wan azlan) Date: Fri, 21 Aug 2015 01:31:19 +0000 (UTC) Subject: [FieldTrip] TMSi Porti Message-ID: <2056941582.4864225.1440120679274.JavaMail.yahoo@mail.yahoo.com> Hi, I am using the TMSi Porti to record the EEG signal.So, I'm using the tmsidriver.exe so that there is signal shown.However, there is no signal display.Anyone can help me? Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.herring at donders.ru.nl Fri Aug 21 11:11:24 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 21 Aug 2015 09:11:24 +0000 Subject: [FieldTrip] TMSi Porti In-Reply-To: <2056941582.4864225.1440120679274.JavaMail.yahoo@mail.yahoo.com> References: <2056941582.4864225.1440120679274.JavaMail.yahoo@mail.yahoo.com> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B312B0@exprd01.hosting.ru.nl> Dear Wan, Please have a look here: http://www.fieldtriptoolbox.org/development/realtime/tmsi Perhaps specifying some of the configuration options or using the other available tool will help in proceeding. Also, note that the driver only writes the signal from the TMSi driver to the FieldTrip buffer. You will still need to read from the FieldTrip buffer using the various realtime functions. Best, Jim ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of wan amirah Wan azlan [wanamirahwanazlan at yahoo.com] Sent: Friday, August 21, 2015 3:31 AM To: FieldTrip Discussion List Subject: [FieldTrip] TMSi Porti Hi, I am using the TMSi Porti to record the EEG signal. So, I'm using the tmsidriver.exe so that there is signal shown. However, there is no signal display. Anyone can help me? Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Sun Aug 23 20:17:05 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Sun, 23 Aug 2015 18:17:05 +0000 Subject: [FieldTrip] Distributed source simulation Message-ID: <731A3644-A7FB-4F76-9EB7-F845D5ADC34D@mailbox.sc.edu> Is there any way to use the distributed source map, e.g., from beamformer or eloreta/mne source analysis, to simulate data? I would like to use a whole-grid distributed source model in the simulation; wiith active dipoles places in an entire anatomical ROI, rather than just single (or small number of multiple) dipoles. Thanks, John *********************************************** John E. Richards Carolina Distinguished Professor Department of Psychology University of South Carolina Columbia, SC 29208 Dept Phone: 803 777 2079 Fax: 803 777 9558 Email: richards-john at sc.edu HTTP: jerlab.psych.sc.edu *********************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Aug 25 10:51:56 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 25 Aug 2015 10:51:56 +0200 Subject: [FieldTrip] data-deleting bug in FieldTrip (present for 9 hours during yesterday, now fixed) Message-ID: Dear FieldTrip users In SVN revision 10622 I changed this https://bitbucket.org/fieldtriptoolbox/fieldtrip/commits/0539a45d6bd609673a5c618c8ad6ad62de1c4013 to make the unzipping and subsequent cleaning up of *.gz, *.tgz and *.zip datasets more consistent (as I noticed that it was done in different manners), but did not realize that there would be an interaction between this and dataset2files, the helper function that deals with raw datasets that are split over multiple files. So in short, in the 9 hours between https://bitbucket.org/fieldtriptoolbox/fieldtrip/commits/0539a45d6bd609673a5c618c8ad6ad62de1c4013 and https://bitbucket.org/fieldtriptoolbox/fieldtrip/commits/7e872c328086c86da2a9ee3986aa3741a3325b2c we had a FT version that might have caused problems by deleting the raw data files that you were processing. The problem was due to the detection of the specified input file being different from the one that was actually read from, and if so, it would assume that it was unzipped and delete the file. But there are cases that were incorrectly detected (handled in private/dataset2files), e.g. in a CTF *.ds directory and a *.meg4 data file, or with brainvision vhdr/vmrk/eeg files. Please do not use SVN version 10622, nor the ftp download version “20150824”. That ftp version has now been deleted from our ftp server, but has been there for an hour or so. I am very sorry for the inconvenience that this may cause or may have caused. best regards, Robert -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Aug 25 12:38:06 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 25 Aug 2015 12:38:06 +0200 Subject: [FieldTrip] FFT question In-Reply-To: References: Message-ID: <0F8D4C1E-306A-4B5F-846F-5C27368D144D@donders.ru.nl> On 25 Aug 2015, at 02:34, Ben Hutchinson wrote: > I was looking at your webpage on the FFT here http://www.fieldtriptoolbox.org/tutorial/fourier and noticed that the for an ordinary sinewave, like sin(x), the imaginary component of the FFT actually has a negative spike on the left side and a positive spike on the right side. Why is this? I thought that the left side of an FFT had the coefficient of the sinewave, and the right side of the FFT had the negative of that. So with a regular sinewave, (such as sin(x) which is actually the same as coef*sin(x) where coef=1) the left side of the imaginary part of the FFT is supposed to show that coefficient, meaning that it should have a spike of positive 1. But the FFT on this webpage instead shows a spike of -1 at that location. Why is that? Hi Ben from Matlab "help fft" For length N input vector x, the DFT is a length N vector X, with elements N X(k) = sum x(n)*exp(-j*2*pi*(k-1)*(n-1)/N), 1 <= k <= N. n=1 The inverse DFT (computed by IFFT) is given by N x(n) = (1/N) sum X(k)*exp( j*2*pi*(k-1)*(n-1)/N), 1 <= n <= N. k=1 Note the “-j” in the first equation. See page 158 in http://www.dspguide.com/CH8.PDF and specifically equation 8.3 on page 153, which explains it in more detail. I recommend the DSP guide as a general resource to learn more about digital signal processing. best regards, Robert PS please address future questions to the email discussion list (CC) so that other people can benefit from it. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mehmetakifozcoban at gmail.com Tue Aug 25 16:40:57 2015 From: mehmetakifozcoban at gmail.com (=?UTF-8?B?TWVobWV0IEFraWYgw5Z6w6dvYmFu?=) Date: Tue, 25 Aug 2015 17:40:57 +0300 Subject: [FieldTrip] Dear fieldtrippers Message-ID: I have 55 eeg data but their extension is .tdt. .. have you know how can i open with fieldtrip M.akif Biomedical Researcher -------------- next part -------------- An HTML attachment was scrubbed... URL: From laurent.hugueville at upmc.fr Tue Aug 25 17:36:33 2015 From: laurent.hugueville at upmc.fr (Laurent Hugueville) Date: Tue, 25 Aug 2015 17:36:33 +0200 Subject: [FieldTrip] Dear fieldtrippers In-Reply-To: References: Message-ID: <55DC8B81.6070305@upmc.fr> Hi! Perhaps, you can use : http://sccn.ucsd.edu/wiki/EEGLAB_Extensions_details *TDT data import:* Adam Wilson at the NITRO Lab at the University of Wisconsin Madison (USA) offers an extension available for loading Tucker-Davis Technology format data into EEGLAB. Chears, Laurent. Le 25/08/2015 16:40, Mehmet Akif Özçoban a écrit : > > I have 55 eeg data but their extension is .tdt. .. have you know how > can i open with fieldtrip > > M.akif Biomedical Researcher > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Laurent Hugueville Tél. 01.57.27.46.38 Centre de Recherche de l'Institut du Cerveau et de la Moelle Epinière UPMC / INSERM UMRS975 / CNRS UMR 7225 47, Boulevard de l'Hôpital 75651 Paris cedex 13 -------------- next part -------------- An HTML attachment was scrubbed... URL: From voxxys at gmail.com Tue Aug 25 20:36:35 2015 From: voxxys at gmail.com (Ksenia Volkova) Date: Tue, 25 Aug 2015 21:36:35 +0300 Subject: [FieldTrip] Fitting dipole to a topography Message-ID: Dear fieldtrip users, I wonder if you can help me out. I have a relatively simple problem: having a topography matrix (where rows correspond to topographies, and columns correspond to channels) I want to fit a dipole to each topography. I have looked through tutorials and documentation and I've seen this example http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit. Still, I can't figure out how I should use the toolbox to solve my problem. What would be the right arguments to call ft_dipolefitting with in my case? If I have EEG data, topography matrix and channel locations, what would be the easiest way to fit a dipole to each topography? Thank you in advance for any help. Ksenia Volkova -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Wed Aug 26 07:47:38 2015 From: wanamirahwanazlan at yahoo.com (Wan Amirah W Azlan) Date: Wed, 26 Aug 2015 05:47:38 +0000 (UTC) Subject: [FieldTrip] Realtime TMSi Porti Message-ID: <1320276013.493924.1440568058141.JavaMail.yahoo@mail.yahoo.com> Hi, Does anyone here can help me how to connect the TMSi Porti in the fieldtrip? So that I am able to display the signal?This is because I have difficulty in connecting TMSI Porti. Is there ant steps that I'm missing? I already used the functions available such as ft_realtime_signalviewer and ft_read_data. But none of them are working.I am using windows 7 64 bit, but I also tried in windows XP 32 bits. However, also not working.Thanks.  Regards,Wan Amirah binti W Azlan,Postgraduate student,Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia.Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Wed Aug 26 08:27:31 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Wed, 26 Aug 2015 08:27:31 +0200 Subject: [FieldTrip] Fitting dipole to a topography In-Reply-To: References: Message-ID: <7B07EF02-6BE0-40EB-895F-075A3EA63C92@uni-konstanz.de> Dear Ksenia, I would first start with the organization of the data in a format FieldTrip can sense. data = []; data.trial ={[chan x time]} % this is your elec x topography matrix, where topography is observed on consecutive time points data.time = [vector-number of time points]; data.label = {‘elec1’,’elec2’ etc.} your electrode labels data.elec = this is key reflecting the position of the electrodes relative to the head Next, you have to compute a volume conduction model. How to do so is explained here: http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg?s[]=eeg&s[]=volume&s[]=conduction&s[]=model After this you can proceed with the dipole fitting which is explained for instance here: http://www.fieldtriptoolbox.org/tutorial/natmeg/dipolefitting#fit_a_dipole_model_to_the_meg_data Under cfg.latency you could specify the number of the topography you are interested in and under cfg.vol the BEM model you computed in the previous step. If you don#t have individual MRI you can use the standard BEM model located in the ~template/headmodel/standard_bem.mat. Note that before you do so you should coregister the headmodel with the electrodes using ft_electroderealign. Good luck tzvetan > Dear fieldtrip users, > > I wonder if you can help me out. I have a relatively simple problem: having a topography matrix (where rows correspond to topographies, and columns correspond to channels) I want to fit a dipole to each topography. I have looked through tutorials and documentation and I've seen this example http://www.fieldtriptoolbox.org/example/compute_forward_simulated_data_and_apply_a_dipole_fit. Still, I can't figure out how I should use the toolbox to solve my problem. > > What would be the right arguments to call ft_dipolefitting with in my case? If I have EEG data, topography matrix and channel locations, what would be the easiest way to fit a dipole to each topography? > > Thank you in advance for any help. > > Ksenia Volkova > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jorn at artinis.com Wed Aug 26 08:47:43 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Wed, 26 Aug 2015 08:47:43 +0200 Subject: [FieldTrip] Realtime TMSi Porti In-Reply-To: <1320276013.493924.1440568058141.JavaMail.yahoo@mail.yahoo.com> References: <1320276013.493924.1440568058141.JavaMail.yahoo@mail.yahoo.com> Message-ID: <005001d0dfcb$1c6cec80$5546c580$@artinis.com> Dear Wan Amirah, have you tried contacting the TMSi support? They have experience with this and should be able to help you. In any case, make sure to give a detailed description on what you are doing and what does not work (supported by code snippets and/or screenshots). Best of luck! Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wan Amirah W Azlan Sent: Wednesday, August 26, 2015 7:48 AM To: FieldTrip Discussion List Subject: [FieldTrip] Realtime TMSi Porti Hi, Does anyone here can help me how to connect the TMSi Porti in the fieldtrip? So that I am able to display the signal? This is because I have difficulty in connecting TMSI Porti. Is there ant steps that I'm missing? I already used the functions available such as ft_realtime_signalviewer and ft_read_data. But none of them are working. I am using windows 7 64 bit, but I also tried in windows XP 32 bits. However, also not working. Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From wanamirahwanazlan at yahoo.com Wed Aug 26 11:04:44 2015 From: wanamirahwanazlan at yahoo.com (Wan Amirah W Azlan) Date: Wed, 26 Aug 2015 09:04:44 +0000 (UTC) Subject: [FieldTrip] Realtime TMSi Porti In-Reply-To: <005001d0dfcb$1c6cec80$5546c580$@artinis.com> References: <005001d0dfcb$1c6cec80$5546c580$@artinis.com> Message-ID: <1028546645.547877.1440579885418.JavaMail.yahoo@mail.yahoo.com> Dear Mr. Jorn, Thank you for the reply.Actually, I want to do the realtime data processing of EEG signal from TMSi Porti. The online processing will be performed while recording the EEG signal. I am sorry  for not attach the error. Here I attach the error shown in Matlab. I am using Matlab2013. I attach the printscreen in word file.Hope you have any suggestion regarding the error. By the way, I already contact the TMSi support and waiting for their reply.However, in the meantime, I wish if there is any suggestion in from fieldtrip. Thank you.  Regards,Wan Amirah binti W Azlan,Postgraduate student,Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia.Tel (H/P): +60193702134 On Wednesday, August 26, 2015 2:47 PM, Jörn M. Horschig wrote: #yiv7566064489 #yiv7566064489 -- _filtered #yiv7566064489 {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 2 2 4;} _filtered #yiv7566064489 {panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv7566064489 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv7566064489 {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}#yiv7566064489 #yiv7566064489 p.yiv7566064489MsoNormal, #yiv7566064489 li.yiv7566064489MsoNormal, #yiv7566064489 div.yiv7566064489MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv7566064489 a:link, #yiv7566064489 span.yiv7566064489MsoHyperlink {color:#0563C1;text-decoration:underline;}#yiv7566064489 a:visited, #yiv7566064489 span.yiv7566064489MsoHyperlinkFollowed {color:#954F72;text-decoration:underline;}#yiv7566064489 span.yiv7566064489EmailStyle17 {color:#1F497D;}#yiv7566064489 .yiv7566064489MsoChpDefault {font-size:10.0pt;} _filtered #yiv7566064489 {margin:1.0in 1.0in 1.0in 1.0in;}#yiv7566064489 div.yiv7566064489WordSection1 {}#yiv7566064489 Dear Wan Amirah,  have you tried contacting the TMSi support? They have experience with this and should be able to help you. In any case, make sure to give a detailed description on what you are doing and what does not work (supported by code snippets and/or screenshots). Best of luck!  Best,Jörn  --  Jörn M. Horschig, PhD, Software EngineerArtinis Medical Systems  |  +31 481 350 980  From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wan Amirah W Azlan Sent: Wednesday, August 26, 2015 7:48 AM To: FieldTrip Discussion List Subject: [FieldTrip] Realtime TMSi Porti  Hi,  Does anyone here can help me how to connect the TMSi Porti in the fieldtrip? So that I am able to display the signal?This is because I have difficulty in connecting TMSI Porti. Is there ant steps that I'm missing? I already used the functions available such as ft_realtime_signalviewer and ft_read_data. But none of them are working.I am using windows 7 64 bit, but I also tried in windows XP 32 bits. However, also not working.Thanks.  Regards,Wan Amirah binti W Azlan,Postgraduate student, Universiti Teknikal Malaysia Melaka,Hang Tuah Jaya, 76100 Durian Tunggal,  Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Error.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 237247 bytes Desc: not available URL: From guillaume.dumas at pasteur.fr Wed Aug 26 11:43:04 2015 From: guillaume.dumas at pasteur.fr (Guillaume Dumas) Date: Wed, 26 Aug 2015 09:43:04 +0000 Subject: [FieldTrip] Degrees of freedom in Z-coherence transform Message-ID: Dear Fieldtripers, Following Maris et al. 2007 paper about "Nonparametric testing of coherence difference" I was hesitating regarding the number of degrees of freedom to use in the Z-coherence transform when coherence is calculated over N trials by averaging across M non-overlapping windows in each of them. Is the df equals to N or N*M then? I am a little confused since in Fieldtrip, this is even 2*N that appears to be used: http://fieldtrip.googlecode.com/svn/trunk/statfun/ft_statfun_indepsamplesZcoh.m Thanks for your time. Best, Guillaume -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Wed Aug 26 12:17:13 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Wed, 26 Aug 2015 10:17:13 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 21 In-Reply-To: References: Message-ID: <165710B3-40CE-466D-B67C-F895B9BA3687@donders.ru.nl> Hi Guillaume, Following Maris et al. 2007 paper about "Nonparametric testing of coherence difference" I was hesitating regarding the number of degrees of freedom to use in the Z-coherence transform when coherence is calculated over N trials by averaging across M non-overlapping windows in each of them. Is the df equals to N or N*M then? I am a little confused since in Fieldtrip, this is even 2*N that appears to be used: http://fieldtrip.googlecode.com/svn/trunk/statfun/ft_statfun_indepsamplesZcoh.m The degrees of freedom is equal to the number of tapers, and because you effectively use non-overlapping tapers (every window corresponds to one taper), your degrees of freedom is N*M. best, Eric Maris Thanks for your time. Best, Guillaume _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From rikkert.hindriks at upf.edu Wed Aug 26 12:42:49 2015 From: rikkert.hindriks at upf.edu (HINDRIKS, RIKKERT) Date: Wed, 26 Aug 2015 12:42:49 +0200 Subject: [FieldTrip] MEG gradiometer leadfield units Message-ID: Hi all, I constructed a single-sphere leadfield in Fieldtrip for the CTF 275 MEG system, but am unsure about the units: If I assume that dipole moments are expressed in pAm and sensor signals in T, then a dipole moment of 10 nAm gives sensor signals in the range 10-100 fT, which is what one expects. Can anyone confirm the units I assumed for this leadfield? Thanks a lot, Rikkert Hindriks -------------- next part -------------- An HTML attachment was scrubbed... URL: From brungio at gmail.com Wed Aug 26 20:16:20 2015 From: brungio at gmail.com (Bruno L. Giordano) Date: Wed, 26 Aug 2015 19:16:20 +0100 Subject: [FieldTrip] Much faster lcmv beamformer with mtimesx Message-ID: <55DE0274.5040201@gmail.com> Hello, I worked on optimizing the beamformer lcmv function, and got improvements that might be quite interesting. I am beamforming a 54k time points x 240 sensors signal on a 44k nodes grid. On a 16 cores machine it takes around 520 s to do it using the beamformer_lcmv function (fixedori = 'yes') , whereas it takes around 26 s to do it on the same machine using the optimized function. To achieve the speed up, I stack the filters on different pages of a 3D matrix, and use mtimesx to do the projection, with one single command, and no for loop across the grid nodes. Mtimesx is called in 'MATLAB' mode: more improvements are likely if it is called using one of the other faster options. I am also keeping the projection as one single matrix, instead of redistributing across a cell structure with one element per grid node (this operation also takes quite some time). Mtimesx can be downloaded here: http://uk.mathworks.com/matlabcentral/fileexchange/25977-mtimesx-fast-matrix-multiply-with-multi-dimensional-support If you are interested, I can share the hacked lcmv beamformer function. Best, Bruno -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Bruno L. Giordano, PhD Institute of Neuroscience and Psychology 58 Hillhead Street, University of Glasgow Glasgow, G12 8QB, Scotland T +44 (0) 141 330 5484 Www: http://www.brunolgiordano.net Email charter: http://www.emailcharter.org/ From j.herring at donders.ru.nl Thu Aug 27 10:36:12 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Thu, 27 Aug 2015 08:36:12 +0000 Subject: [FieldTrip] Realtime TMSi Porti In-Reply-To: <1028546645.547877.1440579885418.JavaMail.yahoo@mail.yahoo.com> References: <005001d0dfcb$1c6cec80$5546c580$@artinis.com> <1028546645.547877.1440579885418.JavaMail.yahoo@mail.yahoo.com> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB12B3829E@exprd01.hosting.ru.nl> Dear Wan, From this error message it seems that you are not writing to the buffer, or reading from the wrong location. What are you specifically doing (which parameters, which functions, which drivers) to stream data from the TMSi device to the buffer? Are you running everything on a single computer or is the EEG recorded on a separate computer? Best, Jim From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wan Amirah W Azlan Sent: woensdag 26 augustus 2015 11:05 To: Jörn M. Horschig; 'FieldTrip discussion list' Subject: Re: [FieldTrip] Realtime TMSi Porti Dear Mr. Jorn, Thank you for the reply. Actually, I want to do the realtime data processing of EEG signal from TMSi Porti. The online processing will be performed while recording the EEG signal. I am sorry for not attach the error. Here I attach the error shown in Matlab. I am using Matlab2013. I attach the printscreen in word file. Hope you have any suggestion regarding the error. By the way, I already contact the TMSi support and waiting for their reply. However, in the meantime, I wish if there is any suggestion in from fieldtrip. Thank you. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 On Wednesday, August 26, 2015 2:47 PM, Jörn M. Horschig > wrote: Dear Wan Amirah, have you tried contacting the TMSi support? They have experience with this and should be able to help you. In any case, make sure to give a detailed description on what you are doing and what does not work (supported by code snippets and/or screenshots). Best of luck! Best, Jörn -- Jörn M. Horschig, PhD, Software Engineer Artinis Medical Systems | +31 481 350 980 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Wan Amirah W Azlan Sent: Wednesday, August 26, 2015 7:48 AM To: FieldTrip Discussion List > Subject: [FieldTrip] Realtime TMSi Porti Hi, Does anyone here can help me how to connect the TMSi Porti in the fieldtrip? So that I am able to display the signal? This is because I have difficulty in connecting TMSI Porti. Is there ant steps that I'm missing? I already used the functions available such as ft_realtime_signalviewer and ft_read_data. But none of them are working. I am using windows 7 64 bit, but I also tried in windows XP 32 bits. However, also not working. Thanks. Regards, Wan Amirah binti W Azlan, Postgraduate student, Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, 76100 Durian Tunggal, Melaka, Malaysia. Tel (H/P): +60193702134 -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel.haehnke at lrz.tu-muenchen.de Thu Aug 27 10:47:50 2015 From: daniel.haehnke at lrz.tu-muenchen.de (=?utf-8?Q?Daniel_H=C3=A4hnke?=) Date: Thu, 27 Aug 2015 10:47:50 +0200 Subject: [FieldTrip] Pairwise phase consistency: spikes and LFPs, minimum number of spikes Message-ID: <862C293A-1329-46A7-9B2D-4A5F51C2ED74@lrz.tum.de> Dear Fieldtrip community, I am currently analysing spike-LFP data using FT_SPIKETRIGGEREDSPECTRUM_STATS and a sliding window approach to calculate the pairwise phase consistency (PPC) between spikes and LFPs. However, some of my single units have very low firing rates which leads to artefacts in my results. So I guess I have to either use an approach that doesn’t use sliding windows and/or only select single units based on a threshold of minimum spiking rate. Is there a suggested number of spikes to use for PPC calculation? Womelsdorf et al., 2014, for example (Womelsdorf, T., Ardid, S., Everling, S., & Valiante, T. A. (2014). Burst firing synchronizes prefrontal and anterior cingulate cortex during attentional control. Current Biology : CB, 24(22), 2613–2621. http://doi.org/10.1016/j.cub.2014.09.046 ) used only those PPC values that were calculated from more than 30 spikes. I guess they do that because PPC’s variance becomes reasonably small at this value. They don’t use a sliding window approach, so I guess I would need that number of spikes for each time bin? Best wishes, Daniel -- Daniel Hähnke PhD student Technische Universität München Institute of Neuroscience Translational NeuroCognition Laboratory Biedersteiner Straße 29, Bau 601 80802 Munich Germany Email: daniel.haehnke at lrz.tum.de Phone: +49 89 4140 3356 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lauri.parkkonen at aalto.fi Thu Aug 27 14:35:00 2015 From: lauri.parkkonen at aalto.fi (Parkkonen Lauri) Date: Thu, 27 Aug 2015 12:35:00 +0000 Subject: [FieldTrip] Position for an early-stage researcher (doctoral student) at Elekta Message-ID: We are recruiting an early-stage researcher for the EU-funded ChildBrain project. In this project, we aim to develop and apply new brain research methods to study normal and atypical cognitive development of children. This specific position is for a methodologically-oriented person who wants to work towards improving the applicability of MEG to pediatric populations. Obtaining a PhD at the end of the project is a possibility but not a requirement for successful completion. Hence, we also invite more industrially-oriented applicants with an MEG and software-engineering interest to apply. The work will be carried out at Elekta Oy (Helsinki), one of the industrial partners in ChildBrain. Secondments to academic project partners are an integral part of the position. The work will be supervised by Dr. Lauri Parkkonen and Dr. Robert Oostenveld. Further information about the project, application procedure and eligibility criteria on www.childbrain.eu and about this particular position under ESR Projects / ESR15. Best regards, Lauri Parkkonen -------------- next part -------------- An HTML attachment was scrubbed... URL: From dr.nivethida at gmail.com Thu Aug 27 16:51:30 2015 From: dr.nivethida at gmail.com (nivethida t) Date: Thu, 27 Aug 2015 10:51:30 -0400 Subject: [FieldTrip] error with ft_redefinetrial Message-ID: Hi all, I am trying to segment my 5s long dataset into chunks of 500ms. cfg = []; cfg.length = 0.5; cfg.overlap = 0; data_imwr_rest_seg = ft_redefinetrial(cfg, data_imwr_rest); Some (not all) of the datasets give me the following error message: *Index exceeds matrix dimensions.* *Error in ft_fetch_data (line 104) count(trlbeg:trlend) = count(trlbeg:trlend) + 1;Error in ft_redefinetrial (line 246) data.trial{iTrl} = ft_fetch_data(dataold, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', 1:hdr.nChans, 'skipcheckdata', 1);Error in ft_redefinetrial (line 304) data = ft_redefinetrial(tmpcfg, data);* There is also a warning message that appears for all trials - *Warning: Size input contains non-integer values. This will error ina future release. Use FLOOR to convert to integer values. > In ft_fetch_data at 94 In ft_redefinetrial at 246 In ft_redefinetrial at 304 * Can anyone help me identify what the problem could be? Thanks, Nivethida -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From marc.lalancette at sickkids.ca Thu Aug 27 18:02:17 2015 From: marc.lalancette at sickkids.ca (Marc Lalancette) Date: Thu, 27 Aug 2015 16:02:17 +0000 Subject: [FieldTrip] MEG gradiometer leadfield units (HINDRIKS, RIKKERT) Message-ID: <2A2B6A5B8C4C174CBCCE0B45E548DEB22A0D6EEF@SKMBXX01.sickkids.ca> Hi Rikkert, I ran into the same question some time ago and eventually figured it out. Assuming the code has not changed, it depends on the units you use and I had to use a correction factor when using lengths in cm. See this thread for details: http://mailman.science.ru.nl/pipermail/fieldtrip/2014-September/008438.html By the way, there were open issues regarding units back then, you can search fieldtrip's Bugzilla to check the current status. Cheers, Marc Lalancette Lab Research Project Manager, Research MEG lab Department of Diagnostic Imaging, Program in Neurosciences and Mental Health The Hospital for Sick Children, 555 University Avenue, Room S742, Toronto, ON, M5G 1X8 416-813-7654 x201535 -----Original Message----- Date: Wed, 26 Aug 2015 12:42:49 +0200 From: "HINDRIKS, RIKKERT" To: fieldtrip at science.ru.nl Subject: [FieldTrip] MEG gradiometer leadfield units Message-ID: Content-Type: text/plain; charset="utf-8" Hi all, I constructed a single-sphere leadfield in Fieldtrip for the CTF 275 MEG system, but am unsure about the units: If I assume that dipole moments are expressed in pAm and sensor signals in T, then a dipole moment of 10 nAm gives sensor signals in the range 10-100 fT, which is what one expects. Can anyone confirm the units I assumed for this leadfield? Thanks a lot, Rikkert Hindriks ________________________________ This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. From dr.nivethida at gmail.com Thu Aug 27 22:08:00 2015 From: dr.nivethida at gmail.com (nivethida t) Date: Thu, 27 Aug 2015 20:08:00 +0000 Subject: [FieldTrip] error with ft_redefinetrial Message-ID: Hi all, I am trying to segment my 5s long dataset into chunks of 500ms. cfg = []; cfg.length = 0.5; cfg.overlap = 0; data_imwr_rest_seg = ft_redefinetrial(cfg, data_imwr_rest); Some (not all) of the datasets give me the following error message: Index exceeds matrix dimensions. Error in ft_fetch_data (line 104) count(trlbeg:trlend) = count(trlbeg:trlend) + 1; Error in ft_redefinetrial (line 246) data.trial{iTrl} = ft_fetch_data(dataold, 'header', hdr, 'begsample', begsample, 'endsample', endsample, 'chanindx', 1:hdr.nChans, 'skipcheckdata', 1); Error in ft_redefinetrial (line 304) data = ft_redefinetrial(tmpcfg, data); There is also a warning message that appears for all trials - Warning: Size input contains non-integer values. This will error in a future release. Use FLOOR to convert to integer values. > In ft_fetch_data at 94 In ft_redefinetrial at 246 In ft_redefinetrial at 304 Can anyone help me identify what the problem could be? -- Dr.Nivethida Thirugnanasambandam, Postdoctoral Visiting Fellow, Human Motor Control Section, National Institute of Neurological Disorders and Stroke, National Institutes of Health, Building 10, 7D42, 10 Center Drive, MSC 1428 Bethesda, MD 20892 - 1428 Ph: +1-301-402-6231 -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Fri Aug 28 13:38:29 2015 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Fri, 28 Aug 2015 13:38:29 +0200 Subject: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open Message-ID: Dear all, Aarhus University (IMC and Cfin) will be hosting a FieldTrip Course on EEG/MEG Analysis with Jim Herring and Luca Ambrogioni the 7.-9. of October 2015. Registration to the limited places is open now via the link below. Externals will be charged a fee of 150 Euro. http://interactingminds.au.dk/events/single-events/artikel/imc-bootcamp-default-mode-network/ Best Katrin Heimann, Postdoc IMC Aarhus University -------------- next part -------------- An HTML attachment was scrubbed... URL: From mehmetakifozcoban at gmail.com Fri Aug 28 13:53:24 2015 From: mehmetakifozcoban at gmail.com (=?UTF-8?B?TWVobWV0IEFraWYgw5Z6w6dvYmFu?=) Date: Fri, 28 Aug 2015 14:53:24 +0300 Subject: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open In-Reply-To: References: Message-ID: Could you upload videos youtube channel please 28 Ağu 2015 14:47 tarihinde "KatrinH Heimann" yazdı: > Dear all, > > Aarhus University (IMC and Cfin) will be hosting a FieldTrip Course on > EEG/MEG Analysis with Jim Herring and Luca Ambrogioni the 7.-9. of October > 2015. Registration to the limited places is open now via the link below. > Externals will be charged a fee of 150 Euro. > > > http://interactingminds.au.dk/events/single-events/artikel/imc-bootcamp-default-mode-network/ > > Best > Katrin Heimann, Postdoc IMC Aarhus University > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stan.vanpelt at donders.ru.nl Fri Aug 28 14:02:51 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Fri, 28 Aug 2015 12:02:51 +0000 Subject: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open In-Reply-To: References: Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C17DC341F@exprd03.hosting.ru.nl> Dear Mehmet, Videos of the lectures of last spring’s FieldTrip Toolkit course held at the Donders institute/Radboud University have already been made available on the FieldTrip youtube-channel: https://www.youtube.com/user/FieldTripToolboxTV Best, Stan -- Stan van Pelt, PhD Donders Institute for Brain, Cognition and Behaviour Radboud University Montessorilaan 3, B.01.34 6525 HR Nijmegen, the Netherlands tel: +31 24 3616288 From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Mehmet Akif Özçoban Sent: vrijdag 28 augustus 2015 13:53 To: FieldTrip discussion list Subject: Re: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open Could you upload videos youtube channel please 28 Ağu 2015 14:47 tarihinde "KatrinH Heimann" > yazdı: Dear all, Aarhus University (IMC and Cfin) will be hosting a FieldTrip Course on EEG/MEG Analysis with Jim Herring and Luca Ambrogioni the 7.-9. of October 2015. Registration to the limited places is open now via the link below. Externals will be charged a fee of 150 Euro. http://interactingminds.au.dk/events/single-events/artikel/imc-bootcamp-default-mode-network/ Best Katrin Heimann, Postdoc IMC Aarhus University _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From mehmetakifozcoban at gmail.com Fri Aug 28 14:35:26 2015 From: mehmetakifozcoban at gmail.com (=?UTF-8?B?TWVobWV0IEFraWYgw5Z6w6dvYmFu?=) Date: Fri, 28 Aug 2015 15:35:26 +0300 Subject: [FieldTrip] FieldTrip Course with Instructors from the Donders Institute in Aarhus, Registration open In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C17DC341F@exprd03.hosting.ru.nl> References: <7CCA2706D7A4DA45931A892DF3C2894C17DC341F@exprd03.hosting.ru.nl> Message-ID: Thousands times thank you i saw that....I mean that could you upload lessons will have been in Aarhus too... 28 Ağu 2015 15:31 tarihinde "Pelt, S. van (Stan)" < stan.vanpelt at donders.ru.nl> yazdı: > Dear Mehmet, > > > > Videos of the lectures of last spring’s FieldTrip Toolkit course held at > the Donders institute/Radboud University have already been made available > on the FieldTrip youtube-channel: > https://www.youtube.com/user/FieldTripToolboxTV > > > > Best, > > Stan > > > > -- > > Stan van Pelt, PhD > > Donders Institute for Brain, Cognition and Behaviour > > Radboud University > > Montessorilaan 3, B.01.34 > > 6525 HR Nijmegen, the Netherlands > > tel: +31 24 3616288 > > > > > > *From:* fieldtrip-bounces at science.ru.nl [mailto: > fieldtrip-bounces at science.ru.nl] *On Behalf Of *Mehmet Akif Özçoban > *Sent:* vrijdag 28 augustus 2015 13:53 > *To:* FieldTrip discussion list > *Subject:* Re: [FieldTrip] FieldTrip Course with Instructors from the > Donders Institute in Aarhus, Registration open > > > > Could you upload videos youtube channel please > > 28 Ağu 2015 14:47 tarihinde "KatrinH Heimann" > yazdı: > > Dear all, > > > > Aarhus University (IMC and Cfin) will be hosting a FieldTrip Course on > EEG/MEG Analysis with Jim Herring and Luca Ambrogioni the 7.-9. of October > 2015. Registration to the limited places is open now via the link below. > Externals will be charged a fee of 150 Euro. > > > > > http://interactingminds.au.dk/events/single-events/artikel/imc-bootcamp-default-mode-network/ > > > > Best > > Katrin Heimann, Postdoc IMC Aarhus University > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.fritsche at student.ru.nl Fri Aug 28 15:31:01 2015 From: m.fritsche at student.ru.nl (Fritsche, M. (Matthias)) Date: Fri, 28 Aug 2015 13:31:01 +0000 Subject: [FieldTrip] Two-way permutation test Message-ID: Dear Fieldtrip mailing list, my name is Matthias Fritsche and I'm a research intern in Floris de Lange's 'Prediction & Attention' group at the Donders Center for Cognitive Neuroimaging. I'm currently working on my Master's project and have got a question I hope you might be able to help me with. I'm currently at the data analysis stage of a behavioral experiment and wondered whether there is a possibility to conduct a two-way permutation test (ANOVA-style, but without actually using ANOVAs/F-values). My experiment has two independent variables, let’s call them A and B, and one dependent variable. Every participant was tested in all of the four conditions, A1B1, A2B1, A1B2 and A2B2. The dependent variable is a parameter of a model that is fit to the data. However, due to unstable fitting at the subject level, I can only obtain this parameter from the group-averaged data. When only interested in effects between two specific conditions, e.g. A1B1 vs A2B1, the test is straightforward. In order to create the null distribution, I randomly swap the condition labels, A1B1 and A2B1, for each participant and compute the resulting group test statistic (difference of the dependent variable between A1B1 and A2B1) for that permutation. One option would be to test the difference between every two conditions in this way. However, I wondered whether there is also a way to use a permutation test similar to a 2-way ANOVA, i.e. testing the main effects of factor A and factor B, as well as the interaction effect. For that purpose, there seem to be permutation tests that use ANOVAs to generate permutation distributions of F-values. However, I cannot use ANOVAs since I only have the dependent variable for the whole group and not for individual participants. Do you know of any method to solve this? Thanks for your help. Best, Matthias -------------- next part -------------- An HTML attachment was scrubbed... URL: From katrinheimann at gmail.com Fri Aug 28 16:20:46 2015 From: katrinheimann at gmail.com (KatrinH Heimann) Date: Fri, 28 Aug 2015 16:20:46 +0200 Subject: [FieldTrip] FieldTrip Course in Aarhus, right link Message-ID: Dear all, apologies for sending the wrong link and thanks to everyone that noticed ;) Here the right one: http://interactingminds.au.dk/events/single-events/artikel/field-trip-workshop/ Katrin -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Fri Aug 28 17:08:55 2015 From: david.m.groppe at gmail.com (David Groppe) Date: Fri, 28 Aug 2015 11:08:55 -0400 Subject: [FieldTrip] Two-way permutation test In-Reply-To: References: Message-ID: Hi Matthias, If I understand you correctly, you can use a t-score based permutation test to solve your problem. This procedure can test for an effect of factor A, factor B, and their interaction as described here: http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox:_within-subject_t-tests cheers, -David On Fri, Aug 28, 2015 at 9:31 AM, Fritsche, M. (Matthias) < m.fritsche at student.ru.nl> wrote: > Dear Fieldtrip mailing list, > > my name is Matthias Fritsche and I'm a research intern in Floris de > Lange's 'Prediction & Attention' group at the Donders Center for Cognitive > Neuroimaging. I'm currently working on my Master's project and have got a > question I hope you might be able to help me with. > > I'm currently at the data analysis stage of a behavioral experiment and > wondered whether there is a possibility to conduct a two-way permutation > test (ANOVA-style, but without actually using ANOVAs/F-values). > > My experiment has two independent variables, let’s call them A and B, and > one dependent variable. Every participant was tested in all of the four > conditions, A1B1, A2B1, A1B2 and A2B2. The dependent variable is a > parameter of a model that is fit to the data. However, due to unstable > fitting at the subject level, I can only obtain this parameter from the > group-averaged data. > > When only interested in effects between two specific conditions, e.g. A1B1 > vs A2B1, the test is straightforward. In order to create the null > distribution, I randomly swap the condition labels, A1B1 and A2B1, for each > participant and compute the resulting group test statistic (difference of > the dependent variable between A1B1 and A2B1) for that permutation. One > option would be to test the difference between every two conditions in this > way. > > However, I wondered whether there is also a way to use a permutation test > similar to a 2-way ANOVA, i.e. testing the main effects of factor A and > factor B, as well as the interaction effect. For that purpose, there seem > to be permutation tests that use ANOVAs to generate permutation > distributions of F-values. However, I cannot use ANOVAs since I only have > the dependent variable for the whole group and not for individual > participants. Do you know of any method to solve this? > > Thanks for your help. > > Best, > Matthias > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rb643 at medschl.cam.ac.uk Fri Aug 28 19:02:52 2015 From: rb643 at medschl.cam.ac.uk (Richard Bethlehem) Date: Fri, 28 Aug 2015 17:02:52 +0000 Subject: [FieldTrip] WPLI for individual trials Message-ID: <3188FAB8621D294696F13E80A7BBC97EFF84D73C@me-mbx3.medschl.cam.ac.uk> Dear Fieldtrippers, Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? Cheers, Richard ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m From e.maris at donders.ru.nl Sat Aug 29 12:19:39 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Sat, 29 Aug 2015 10:19:39 +0000 Subject: [FieldTrip] Two-way permutation test In-Reply-To: References: Message-ID: Hi Matthias & David, You can find a brief explanation on the topic of permutation based interaction effect testing here: http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests It also give pointers to how to implement it in Fieldtrip, which you should be familiar with. (For David: Matthias is a student in our Master CNS program, and I pointed him to the FT discussion list. Btw the list has an archive that contains many discussions of the interaction effect issue.) best, Eric Maris From: David Groppe > Subject: Re: [FieldTrip] Two-way permutation test Date: 28 Aug 2015 17:08:55 CEST To: FieldTrip discussion list > Reply-To: FieldTrip discussion list > Hi Matthias, If I understand you correctly, you can use a t-score based permutation test to solve your problem. This procedure can test for an effect of factor A, factor B, and their interaction as described here: http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox:_within-subject_t-tests cheers, -David On Fri, Aug 28, 2015 at 9:31 AM, Fritsche, M. (Matthias) > wrote: Dear Fieldtrip mailing list, my name is Matthias Fritsche and I'm a research intern in Floris de Lange's 'Prediction & Attention' group at the Donders Center for Cognitive Neuroimaging. I'm currently working on my Master's project and have got a question I hope you might be able to help me with. I'm currently at the data analysis stage of a behavioral experiment and wondered whether there is a possibility to conduct a two-way permutation test (ANOVA-style, but without actually using ANOVAs/F-values). My experiment has two independent variables, let’s call them A and B, and one dependent variable. Every participant was tested in all of the four conditions, A1B1, A2B1, A1B2 and A2B2. The dependent variable is a parameter of a model that is fit to the data. However, due to unstable fitting at the subject level, I can only obtain this parameter from the group-averaged data. When only interested in effects between two specific conditions, e.g. A1B1 vs A2B1, the test is straightforward. In order to create the null distribution, I randomly swap the condition labels, A1B1 and A2B1, for each participant and compute the resulting group test statistic (difference of the dependent variable between A1B1 and A2B1) for that permutation. One option would be to test the difference between every two conditions in this way. However, I wondered whether there is also a way to use a permutation test similar to a 2-way ANOVA, i.e. testing the main effects of factor A and factor B, as well as the interaction effect. For that purpose, there seem to be permutation tests that use ANOVAs to generate permutation distributions of F-values. However, I cannot use ANOVAs since I only have the dependent variable for the whole group and not for individual participants. Do you know of any method to solve this? Thanks for your help. Best, Matthias _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From spa268 at nyu.edu Sat Aug 29 13:06:10 2015 From: spa268 at nyu.edu (Stephen Politzer-Ahles) Date: Sat, 29 Aug 2015 15:06:10 +0400 Subject: [FieldTrip] Two-way permutation test Message-ID: Hello Matthias, It is possible to do a factorial test in Fieldtrip, you just have to hack the data a little bit. See this post from Eric Maris: http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests (also http://mailman.science.ru.nl/pipermail/fieldtrip/2011-January/003447.html, which is an older message recommending the same procedure if I remember correctly) Best, Steve > Message: 7 > Date: Fri, 28 Aug 2015 11:08:55 -0400 > From: David Groppe > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Two-way permutation test > Message-ID: > B32PZbahoLy+T0w at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Matthias, > If I understand you correctly, you can use a t-score based permutation > test to solve your problem. This procedure can test for an effect of factor > A, factor B, and their interaction as described here: > > > http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox:_within-subject_t-tests > > cheers, > -David > > > On Fri, Aug 28, 2015 at 9:31 AM, Fritsche, M. (Matthias) < > m.fritsche at student.ru.nl> wrote: > > > Dear Fieldtrip mailing list, > > > > my name is Matthias Fritsche and I'm a research intern in Floris de > > Lange's 'Prediction & Attention' group at the Donders Center for > Cognitive > > Neuroimaging. I'm currently working on my Master's project and have got a > > question I hope you might be able to help me with. > > > > I'm currently at the data analysis stage of a behavioral experiment and > > wondered whether there is a possibility to conduct a two-way permutation > > test (ANOVA-style, but without actually using ANOVAs/F-values). > > > > My experiment has two independent variables, let?s call them A and B, and > > one dependent variable. Every participant was tested in all of the four > > conditions, A1B1, A2B1, A1B2 and A2B2. The dependent variable is a > > parameter of a model that is fit to the data. However, due to unstable > > fitting at the subject level, I can only obtain this parameter from the > > group-averaged data. > > > > When only interested in effects between two specific conditions, e.g. > A1B1 > > vs A2B1, the test is straightforward. In order to create the null > > distribution, I randomly swap the condition labels, A1B1 and A2B1, for > each > > participant and compute the resulting group test statistic (difference of > > the dependent variable between A1B1 and A2B1) for that permutation. One > > option would be to test the difference between every two conditions in > this > > way. > > > > However, I wondered whether there is also a way to use a permutation test > > similar to a 2-way ANOVA, i.e. testing the main effects of factor A and > > factor B, as well as the interaction effect. For that purpose, there seem > > to be permutation tests that use ANOVAs to generate permutation > > distributions of F-values. However, I cannot use ANOVAs since I only have > > the dependent variable for the whole group and not for individual > > participants. Do you know of any method to solve this? > > > > Thanks for your help. > > > > Best, > > Matthias > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150828/7f8230bf/attachment-0001.html > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Sun Aug 30 17:40:46 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Sun, 30 Aug 2015 15:40:46 +0000 Subject: [FieldTrip] WPLI for individual trials In-Reply-To: <3188FAB8621D294696F13E80A7BBC97EFF84D73C@me-mbx3.medschl.cam.ac.uk> References: <3188FAB8621D294696F13E80A7BBC97EFF84D73C@me-mbx3.medschl.cam.ac.uk> Message-ID: Hi Richard, In general it is not possible to obtain a ‘single observation’ phase synchrony metric, where this metric is based on the distributional properties (i.e. across observations) of the phase difference. This holds not only for quantities like coherence, but also for WPLI. This being said, one could resort to a leave-one-out strategy, called jackknifing, to get an estimate of how much an individual trial contributes to the overall connectivity estimate. This has been formally described in http://www.sciencedirect.com/science/article/pii/S1053811915003316. Note that in order for this to work, you still need to have multiple trials in your input data. FieldTrip used to support the cfg.jackknife option in ft_connectivityanalysis for the computation of coherence, but I don’t know to what extent this generalizes to WPLI. Also, it’s been a while that I used this (i.e. jackknife) option (for coherence), so I am not sure whether this is still operational in the current version of FieldTrip. (since this option is a bit obscure, we have not done our utmost best to maintain backward-compatibility of the code here, so things may have been broken by general improvements to the code base). If you would like to follow up on this, I suggest you to contact the first author on the paper mentioned (above), I am sure that Craig would be willing to point you into the right direction (as far as he is not yet reading along … Craig, do you copy, over?). Best, Jan-Mathijs On Aug 28, 2015, at 7:02 PM, Richard Bethlehem wrote: > Dear Fieldtrippers, > > Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? > > Cheers, > > Richard > > ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From rb643 at medschl.cam.ac.uk Mon Aug 31 13:00:06 2015 From: rb643 at medschl.cam.ac.uk (Richard Bethlehem) Date: Mon, 31 Aug 2015 11:00:06 +0000 Subject: [FieldTrip] fieldtrip Digest, Vol 57, Issue 26 Message-ID: <3188FAB8621D294696F13E80A7BBC97EFF869DA0@me-mbx3.medschl.cam.ac.uk> Hi Jan Mathijs, Thanks for the tip! I think I missed the cross-observational aspect of WPLI and assumed you could also compute it on a trial by trial basis. I will look into the paper and see if I can reproduce it. However... my data is resting-state that is simply segmented into smaller parts ('trials') to see if there is a metric that is consistent across segments I was interested in looking at individual trials. If WPLI depends on cross-observations this might not the be optimal measure to look at such data as the segments are actually part of a continuous recording. What would be the recommended alternative (that also somewhat tackles the conduction problem)? And more in general, what would be the recommended metric for looking at resting-state connectivity (where there are no real trials)? Cheers, Richard ---------------------------------------------------------------------- Message: 1 Date: Sun, 30 Aug 2015 15:40:46 +0000 From: "Schoffelen, J.M. (Jan Mathijs)" To: FieldTrip discussion list Subject: Re: [FieldTrip] WPLI for individual trials Message-ID: Content-Type: text/plain; charset="Windows-1252" Hi Richard, In general it is not possible to obtain a ?single observation? phase synchrony metric, where this metric is based on the distributional properties (i.e. across observations) of the phase difference. This holds not only for quantities like coherence, but also for WPLI. This being said, one could resort to a leave-one-out strategy, called jackknifing, to get an estimate of how much an individual trial contributes to the overall connectivity estimate. This has been formally described in http://www.sciencedirect.com/science/article/pii/S1053811915003316. Note that in order for this to work, you still need to have multiple trials in your input data. FieldTrip used to support the cfg.jackknife option in ft_connectivityanalysis for the computation of coherence, but I don?t know to what extent this generalizes to WPLI. Also, it?s been a while that I used this (i.e. jackknife) option (for coherence), so I am not sure whether this is still operational in the current version of FieldTrip. (since this option is a bit obscure, we have not done our utmost best to maintain backward-compatibility of the code here, so things may have been broken by general improvements to the code base). If you would like to follow up on this, I suggest you to contact the first author on the paper mentioned (above), I am sure that Craig would be willing to point you into the right direction (as far as he is not yet reading along ? Craig, do you copy, over?). Best, Jan-Mathijs On Aug 28, 2015, at 7:02 PM, Richard Bethlehem wrote: > Dear Fieldtrippers, > > Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? > > Cheers, > > Richard > > ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 57, Issue 26 ***************************************** From rb643 at medschl.cam.ac.uk Mon Aug 31 13:02:56 2015 From: rb643 at medschl.cam.ac.uk (Richard Bethlehem) Date: Mon, 31 Aug 2015 11:02:56 +0000 Subject: [FieldTrip] WPLI for individual trials Message-ID: <3188FAB8621D294696F13E80A7BBC97EFF869DBD@me-mbx3.medschl.cam.ac.uk> Hi Jan Mathijs, Thanks for the tip! I think I missed the cross-observational aspect of WPLI and assumed you could also compute it on a trial by trial basis. I will look into the paper and see if I can reproduce it. However... my data is resting-state that is simply segmented into smaller parts ('trials') to see if there is a metric that is consistent across segments I was interested in looking at individual trials. If WPLI depends on cross-observations this might not the be optimal measure to look at such data as the segments are actually part of a continuous recording. What would be the recommended alternative (that also somewhat tackles the conduction problem)? And more in general, what would be the recommended metric for looking at resting-state connectivity (where there are no real trials)? Cheers, Richard ---------------------------------------------------------------------- Message: 1 Date: Sun, 30 Aug 2015 15:40:46 +0000 From: "Schoffelen, J.M. (Jan Mathijs)" To: FieldTrip discussion list Subject: Re: [FieldTrip] WPLI for individual trials Message-ID: Content-Type: text/plain; charset="Windows-1252" Hi Richard, In general it is not possible to obtain a ?single observation? phase synchrony metric, where this metric is based on the distributional properties (i.e. across observations) of the phase difference. This holds not only for quantities like coherence, but also for WPLI. This being said, one could resort to a leave-one-out strategy, called jackknifing, to get an estimate of how much an individual trial contributes to the overall connectivity estimate. This has been formally described in http://www.sciencedirect.com/science/article/pii/S1053811915003316. Note that in order for this to work, you still need to have multiple trials in your input data. FieldTrip used to support the cfg.jackknife option in ft_connectivityanalysis for the computation of coherence, but I don?t know to what extent this generalizes to WPLI. Also, it?s been a while that I used this (i.e. jackknife) option (for coherence), so I am not sure whether this is still operational in the current version of FieldTrip. (since this option is a bit obscure, we have not done our utmost best to maintain backward-compatibility of the code here, so things may have been broken by general improvements to the code base). If you would like to follow up on this, I suggest you to contact the first author on the paper mentioned (above), I am sure that Craig would be willing to point you into the right direction (as far as he is not yet reading along ? Craig, do you copy, over?). Best, Jan-Mathijs On Aug 28, 2015, at 7:02 PM, Richard Bethlehem wrote: > Dear Fieldtrippers, > > Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? > > Cheers, > > Richard > > ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m > _______________________________________________ ***************************************** From markus.gschwind at gmail.com Mon Aug 31 13:56:35 2015 From: markus.gschwind at gmail.com (Markus Gschwind) Date: Mon, 31 Aug 2015 13:56:35 +0200 Subject: [FieldTrip] General matlab script for cluster based permutation testing? Message-ID: Dear all, I wonder if someone could guide me how to use the cluster-based permutation testing after (Maris & Oostenvidle, 2007) on non-fieldtrip data, for example on simple matrices in matlab. Or is there even a matlab script around? Thanks in advance, Markus -------------- next part -------------- An HTML attachment was scrubbed... URL: From craiggrichter at gmail.com Mon Aug 31 15:26:49 2015 From: craiggrichter at gmail.com (Craig Richter) Date: Mon, 31 Aug 2015 15:26:49 +0200 Subject: [FieldTrip] WPLI for individual trials In-Reply-To: References: <3188FAB8621D294696F13E80A7BBC97EFF84D73C@me-mbx3.medschl.cam.ac.uk> Message-ID: <6DB5AD8B-78D4-4A0B-A693-5527CB94545C@gmail.com> Hi Jan-Mathijs, I read you loud and clear. Richard, if you think the method Jan-Mathijs describes will work for your application, I can explain to you my method for computing it using FT. Best, C. > On 30 Aug 2015, at 17:40, Schoffelen, J.M. (Jan Mathijs) wrote: > > Hi Richard, > > In general it is not possible to obtain a ‘single observation’ phase synchrony metric, where this metric is based on the distributional properties (i.e. across observations) of the phase difference. This holds not only for quantities like coherence, but also for WPLI. This being said, one could resort to a leave-one-out strategy, called jackknifing, to get an estimate of how much an individual trial contributes to the overall connectivity estimate. This has been formally described in http://www.sciencedirect.com/science/article/pii/S1053811915003316. Note that in order for this to work, you still need to have multiple trials in your input data. FieldTrip used to support the cfg.jackknife option in ft_connectivityanalysis for the computation of coherence, but I don’t know to what extent this generalizes to WPLI. Also, it’s been a while that I used this (i.e. jackknife) option (for coherence), so I am not sure whether this is still operational in the current version of FieldTrip. (since this option is a bit obscure, we have not done our utmost best to maintain backward-compatibility of the code here, so things may have been broken by general improvements to the code base). If you would like to follow up on this, I suggest you to contact the first author on the paper mentioned (above), I am sure that Craig would be willing to point you into the right direction (as far as he is not yet reading along … Craig, do you copy, over?). > > Best, > Jan-Mathijs > > > > On Aug 28, 2015, at 7:02 PM, Richard Bethlehem wrote: > >> Dear Fieldtrippers, >> >> Would anyone be able to tell me how ft_connectivity analysis handles the trials input? Is it possible to get a WPLI connectivity matrix for each individual trial? >> >> Cheers, >> >> Richard >> >> ps: code I am currently using is here: https://github.com/autism-research-centre/fieldtrip_restingState/blob/master/wpli_connectivity.m >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > From jia.wu at yale.edu Mon Aug 31 22:33:32 2015 From: jia.wu at yale.edu (Wu, Jia) Date: Mon, 31 Aug 2015 20:33:32 +0000 Subject: [FieldTrip] beamformer on EEG data Message-ID: Hi, I'm new to the community and fieldtrip. I'm trying to use beamformer to do oscillatory source localization on some EEG data. I thought I stumbled upon some tutorial specific on this top on the fieldtrip wiki, but I couldn't find it any more. Most source localization materials seem to be for MEG data. And I've been confused about the steps to build a correct headmodel, sourcemodel, leadfield based on only EEG information. Anybody has a quick link to the tutorial? If such tutorial doesn't exist I will email the group about my specific questions. best, -jia -------------- next part -------------- An HTML attachment was scrubbed... URL: