From shlomitbeker at gmail.com Sun Mar 1 11:38:04 2015 From: shlomitbeker at gmail.com (shlomit beker) Date: Sun, 1 Mar 2015 12:38:04 +0200 Subject: [FieldTrip] Fwd: interpolation In-Reply-To: References: Message-ID: Hi Fieldtrippers, We would like to use the ft_channelrepair(cfg, data) function. However we don't understand how to load or convert the electrode positions into FieldTrip. We tried FT_READ_SENS and we looked in FT_DATATYPE_SENS, however there are two positions variables described in this structure: The structure for EEG or ECoG channels contains sens.label = Mx1 cell-array with channel labels sens.chanpos = Mx3 matrix with channel positions sens.tra = MxN matrix to combine electrodes into channels sens.elecpos = Nx3 matrix with electrode positions what do the third field mean? what is the difference between the second and the fourth? our format is the attached. Thanks a lot! Omer and Shlomit -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- Name,X,Y,Z Nas,10.761088,100.987892,90.000000 Fid1,8.695332,115.625073,176.681312 Fid2,8.695332,115.625073,3.318688 E1,9.068730,103.978420,37.707197 E2,9.114712,90.880337,44.644806 E3,9.361927,78.971692,51.666010 E4,9.843311,68.234033,58.246154 E5,9.968636,56.448903,64.170813 E6,9.762819,44.501384,70.779258 E7,9.736243,33.341175,77.164587 E8,9.461169,22.339155,90.000000 E9,9.393823,11.688124,127.306400 E10,9.596665,99.083916,51.181915 E11,9.799699,87.625858,58.772025 E12,10.150354,75.650698,66.764771 E13,10.329451,64.842882,73.805812 E14,10.204397,53.557241,81.358250 E15,9.971271,43.089788,90.000000 E16,9.736243,33.341175,102.835413 E17,9.327410,23.433595,128.232998 E18,10.285052,94.969684,66.627057 E19,10.451891,85.323609,74.020032 E20,10.554640,74.345445,81.959600 E21,10.493970,63.646916,90.000000 E22,10.204397,53.557241,98.641750 E23,9.762819,44.501384,109.220742 E24,9.460075,35.802015,127.184539 E25,10.761203,93.256919,82.537006 E26,10.737137,84.626981,90.000000 E27,10.554640,74.345445,98.040400 E28,10.329451,64.842882,106.194188 E29,9.968636,56.448903,115.829187 E30,9.542844,48.782128,128.803911 E31,10.761088,100.987892,90.000000 E32,10.761203,93.256919,97.462994 E33,10.451891,85.323609,105.979968 E34,10.150354,75.650698,113.235229 E35,9.843311,68.234033,121.753846 E36,9.489548,59.767036,128.506861 E37,10.285052,94.969684,113.372943 E38,9.799699,87.625858,121.227975 E39,9.361927,78.971692,128.333990 E40,9.289732,69.218001,135.265515 E41,9.174187,58.028484,140.607176 E42,9.110028,46.015012,144.545390 E43,9.194459,35.248893,151.004325 E44,9.245175,23.565055,163.150912 E45,9.519999,12.655780,-162.995385 E46,9.596665,99.083916,128.818085 E47,9.114712,90.880337,135.355194 E48,8.888349,81.541526,142.505900 E49,8.766982,70.553645,149.196493 E50,8.937092,57.757292,155.268609 E51,8.948103,45.798798,162.376857 E52,9.201641,35.533103,173.549301 E53,9.429451,24.404072,-162.897520 E54,9.068730,103.978420,142.292803 E55,8.544581,94.102449,149.140746 E56,8.407718,82.866049,156.727661 E57,8.448040,70.514560,163.198903 E58,8.789435,58.413164,169.661560 E59,9.158021,47.049896,179.486799 E60,9.362286,37.036840,-163.384897 E61,8.516790,107.206103,157.957711 E62,8.080266,95.733921,165.130055 E63,8.118717,83.114481,171.384465 E64,8.543094,70.969564,177.153328 E65,8.908092,58.914546,-175.727138 E66,9.241572,50.079575,-164.070749 E67,8.927417,117.929963,167.252636 E68,8.197103,107.541586,172.257951 E69,7.996945,96.966345,179.478854 E70,8.068305,84.010193,-174.621726 E71,8.652928,71.346909,-169.436606 E72,9.004535,61.451643,-163.008828 E73,9.628421,128.245098,174.452905 E74,8.036446,96.625147,-166.664055 E75,8.330712,82.410129,-160.681967 E76,8.754403,70.242276,-154.914699 E77,9.248635,58.051265,-151.084656 E78,9.448291,46.355151,-145.769307 E79,9.636802,34.372686,-139.298073 E80,9.664407,22.564014,-127.091178 E81,9.655237,11.581130,-90.000000 E82,10.250036,135.807463,-176.052657 E83,8.452797,104.970004,-154.643174 E84,8.398554,93.510940,-153.804656 E85,8.697863,79.951488,-146.625956 E86,8.986969,67.266726,-141.514246 E87,9.523079,54.708062,-135.357926 E88,9.662776,43.194025,-127.629054 E89,9.873964,33.093355,-115.196067 E90,9.772684,22.513364,-90.000000 E91,11.209512,140.858593,-164.724066 E92,9.953439,132.677283,-157.091965 E93,9.345515,122.472442,-149.362984 E94,9.048487,113.092378,-147.673636 E95,8.809199,102.376386,-144.333841 E96,8.802170,89.333825,-139.329298 E97,9.076291,77.056949,-132.433685 E98,9.328702,65.143177,-127.120079 E99,9.510178,53.647360,-119.332693 E100,9.737640,43.061469,-108.855494 E101,9.974535,45.796457,-90.000000 E102,11.070044,137.842245,-149.017953 E103,10.126681,129.903495,-143.484820 E104,9.515842,119.452381,-137.378714 E105,9.308613,110.495171,-136.400673 E106,9.127194,98.843252,-131.569691 E107,9.220070,87.101247,-124.662235 E108,9.482746,75.436770,-117.873771 E109,9.736341,64.313078,-111.689838 E110,9.683126,53.985361,-102.774215 E111,11.202016,133.765789,-134.159266 E112,10.424872,126.267465,-129.861499 E113,9.908772,115.854503,-124.751714 E114,9.581553,107.460011,-125.232011 E115,9.611033,96.242245,-115.653419 E116,9.693262,85.154510,-108.929065 E117,9.794087,74.475751,-101.894590 E118,9.732708,64.838287,-97.128130 E119,9.695185,56.572691,-90.000000 E120,11.444011,131.143470,-123.097866 E121,10.622781,123.374443,-118.289050 E122,10.164092,113.435521,-112.856727 E123,10.118012,101.166200,-107.755713 E124,9.976019,93.664171,-102.775604 E125,9.816153,84.418877,-95.974152 E126,9.576882,74.578215,-90.000000 E127,9.732708,64.838287,-82.871870 E128,9.683126,53.985361,-77.225785 E129,9.737640,43.061469,-71.144506 E130,9.873964,33.093355,-64.803933 E131,9.664407,22.564014,-52.908822 E132,9.519999,12.655780,-17.004615 E133,11.491151,126.446312,-111.956693 E134,10.874564,120.711204,-106.883216 E135,10.366114,109.439090,-101.998030 E136,9.920603,102.874904,-95.451838 E137,9.626237,95.282718,-90.000000 E138,9.816153,84.418877,-84.025848 E139,9.794087,74.475751,-78.105410 E140,9.736341,64.313078,-68.310162 E141,9.510178,53.647360,-60.667307 E142,9.662776,43.194025,-52.370946 E143,9.636802,34.372686,-40.701927 E144,9.429451,24.404072,-17.102480 E145,11.610060,125.845626,-101.556299 E146,11.034271,119.617688,-96.350943 E147,10.232012,112.054734,-90.000000 E148,9.920603,102.874904,-84.548162 E149,9.976019,93.664171,-77.224396 E150,9.693262,85.154510,-71.070935 E151,9.482746,75.436770,-62.126229 E152,9.328702,65.143177,-52.879921 E153,9.523079,54.708062,-44.642074 E154,9.448291,46.355151,-34.230693 E155,9.362286,37.036840,-16.615103 E156,11.034271,119.617688,-83.649057 E157,10.366114,109.439090,-78.001970 E158,10.118012,101.166200,-72.244287 E159,9.611033,96.242245,-64.346581 E160,9.220070,87.101247,-55.337765 E161,9.076291,77.056949,-47.566315 E162,8.986969,67.266726,-38.485754 E163,9.248635,58.051265,-28.915344 E164,9.241572,50.079575,-15.929251 E165,11.610060,125.845626,-78.443701 E166,10.874564,120.711204,-73.116784 E167,10.164092,113.435521,-67.143273 E168,9.581553,107.460011,-54.767989 E169,9.127194,98.843252,-48.430309 E170,8.802170,89.333825,-40.670702 E171,8.697863,79.951488,-33.374044 E172,8.754403,70.242276,-25.085301 E173,9.004535,61.451643,-16.991172 E174,11.491151,126.446312,-68.043307 E175,10.622781,123.374443,-61.710950 E176,9.908772,115.854503,-55.248286 E177,9.308613,110.495171,-43.599327 E178,8.809199,102.376386,-35.666159 E179,8.398554,93.510940,-26.195344 E180,8.330712,82.410129,-19.318033 E181,8.652928,71.346909,-10.563394 E182,8.908092,58.914546,-4.272862 E183,9.158021,47.049896,0.513201 E184,9.201641,35.533103,6.450699 E185,9.245175,23.565055,16.849088 E186,9.393823,11.688124,52.693600 E187,11.444011,131.143470,-56.902134 E188,10.424872,126.267465,-50.138501 E189,9.515842,119.452381,-42.621286 E190,9.048487,113.092378,-32.326364 E191,8.452797,104.970004,-25.356826 E192,8.036446,96.625147,-13.335945 E193,8.068305,84.010193,-5.378274 E194,8.543094,70.969564,2.846672 E195,8.789435,58.413164,10.338440 E196,8.948103,45.798798,17.623143 E197,9.194459,35.248893,28.995675 E198,9.327410,23.433595,51.767002 E199,11.202016,133.765789,-45.840734 E200,10.126681,129.903495,-36.515180 E201,9.345515,122.472442,-30.637016 E202,7.996945,96.966345,0.521146 E203,8.118717,83.114481,8.615535 E204,8.448040,70.514560,16.801097 E205,8.937092,57.757292,24.731391 E206,9.110028,46.015012,35.454610 E207,9.460075,35.802015,52.815461 E208,11.070044,137.842245,-30.982047 E209,9.953439,132.677283,-22.908035 E210,8.197103,107.541586,7.742049 E211,8.080266,95.733921,14.869945 E212,8.407718,82.866049,23.272339 E213,8.766982,70.553645,30.803507 E214,9.174187,58.028484,39.392824 E215,9.542844,48.782128,51.196089 E216,11.209512,140.858593,-15.275934 E217,10.250036,135.807463,-3.947343 E218,9.628421,128.245098,5.547095 E219,8.927417,117.929963,12.747364 E220,8.516790,107.206103,22.042289 E221,8.544581,94.102449,30.859254 E222,8.888349,81.541526,37.494100 E223,9.289732,69.218001,44.734485 E224,9.489548,59.767036,51.493139 E225,9.386988,117.986216,23.067153 E226,9.914260,118.773022,33.537707 E227,10.138285,128.200139,18.488186 E228,10.859314,136.288567,10.421742 E229,11.436798,143.127527,-1.181902 E230,10.740471,122.891301,41.625351 E231,10.810450,129.588582,29.865612 E232,11.618695,136.605959,23.606353 E233,12.188049,143.300385,13.229683 E234,11.391064,125.084251,50.830892 E235,11.610218,131.264058,40.265246 E236,12.186819,137.818542,34.408687 E237,12.749106,144.638185,26.892952 E238,11.649067,125.608531,60.306669 E239,12.241244,134.962899,47.841310 E240,12.715155,140.516322,41.625035 E241,11.649067,125.608531,119.693331 E242,12.241244,134.962899,132.158690 E243,12.715155,140.516322,138.374965 E244,11.391064,125.084251,129.169108 E245,11.610218,131.264058,139.734754 E246,12.186819,137.818542,145.591313 E247,12.749106,144.638185,153.107048 E248,10.740471,122.891301,138.374649 E249,10.810450,129.588582,150.134388 E250,11.618695,136.605959,156.393647 E251,12.188049,143.300385,166.770317 E252,9.914260,118.773022,146.462293 E253,9.386988,117.986216,156.932847 E254,10.138285,128.200139,161.511814 E255,10.859314,136.288567,169.578258 E256,11.436798,143.127527,-178.818098 E257,9.683080,0.000000,0.000000 From tzvetan.popov at uni-konstanz.de Sun Mar 1 11:45:44 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Sun, 1 Mar 2015 11:45:44 +0100 Subject: [FieldTrip] ft_connectivityplot axis lables In-Reply-To: References: Message-ID: <3DD4868F-03AB-481E-A105-EBDCB796FE61@uni-konstanz.de> Hi Daria, please go to: http://fieldtrip.fcdonders.nl/tutorial/connectivity and scroll to the middle of that page. Up to the line that reads “Instead of plotting it with ft_connectivityplot, you can use the following low-level Matlab plotting code which gives a better understanding of the numerical representation of the results.” The code snipped there is probably what you need. > New to FieldTrip - I am trying to plot the output of ft_connectivityanalysis using ft_connectivityplot but cannot find a way to include values on the axes. I only get the first and last value, but nothing in-between (image attached). I’d also like to get an overall connectivity value, but am not sure how to do so. I appreciate any help/suggestions. I’m not sure what you mean by overall connectivity value. You could compute the mean of the two spectra and mean over frequencies yet this doesn't make much sense. best tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From dboratyn at u.northwestern.edu Sun Mar 1 23:54:26 2015 From: dboratyn at u.northwestern.edu (Daria Boratyn) Date: Sun, 1 Mar 2015 16:54:26 -0600 Subject: [FieldTrip] ft_connectivityplot axis lables Message-ID: Thanks, Tzvetan. In terms of connectivity value, I’m looking for a coherence value. Since it is calculated between 0 and 1, I imagine there is a way of getting the specific value for each correlation. Thank you, Daria Hi Daria, please go to: http://fieldtrip.fcdonders.nl/tutorial/connectivity and scroll to the middle of that page. Up to the line that reads ?Instead of plotting it with ft_connectivityplot, you can use the following low-level Matlab plotting code which gives a better understanding of the numerical representation of the results.? The code snipped there is probably what you need. > New to FieldTrip - I am trying to plot the output of ft_connectivityanalysis using ft_connectivityplot but cannot find a way to include values on the axes. I only get the first and last value, but nothing in-between (image attached). I?d also like to get an overall connectivity value, but am not sure how to do so. I appreciate any help/suggestions. I?m not sure what you mean by overall connectivity value. You could compute the mean of the two spectra and mean over frequencies yet this doesn't make much sense. best tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Mon Mar 2 06:27:25 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 2 Mar 2015 06:27:25 +0100 Subject: [FieldTrip] ft_connectivityplot axis lables In-Reply-To: References: Message-ID: HI Daria, if you specify cfg.method = ‘coh’; you will end up with a subfield in your output data structure: data.cohspctrm (in the tutorial two steps further above). Please pay attention to the subfield ”dimord”, which is always outputted by FieldTrip. It says that your coherence matrix is channel by channel by frequency matrix. I assume you are interested at the coherence values in data.cohspctrm(1,2,:) reflective for coherence between EEG009 and EEG028. If your data has a frequency resolution of 1 Hz, data.cohspctrm(1,2,5) will be the coherence value of 10 Hz in your case. For plotting you could use ft_singleplotER after you reduce the cohspctrm subfield to two dimensions. Alternatively, low level matlab function will work too, i.e. figure; plot(data.freq, squeeze(data.cohspctrm(1,2,:))). best tzvetan > Thanks, Tzvetan. In terms of connectivity value, I’m looking for a coherence value. Since it is calculated between 0 and 1, I imagine there is a way of getting the specific value for each correlation. > > Thank you, > Daria > > Hi Daria, > please go to: http://fieldtrip.fcdonders.nl/tutorial/connectivity > > and scroll to the middle of that page. Up to the line that reads > ?Instead of plotting it with ft_connectivityplot, you can use the following low-level Matlab plotting code which gives a better understanding of the numerical representation of the results.? > > The code snipped there is probably what you need. > >> New to FieldTrip - I am trying to plot the output of ft_connectivityanalysis using ft_connectivityplot but cannot find a way to include values on the axes. I only get the first and last value, but nothing in-between (image attached). I?d also like to get an overall connectivity value, but am not sure how to do so. I appreciate any help/suggestions. > I?m not sure what you mean by overall connectivity value. You could compute the mean of the two spectra and mean over frequencies yet this doesn't make much sense. > > best > tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From catia_barbosa at live.fr Mon Mar 2 09:29:15 2015 From: catia_barbosa at live.fr (catia barbosa) Date: Mon, 2 Mar 2015 09:29:15 +0100 Subject: [FieldTrip] Just a small question about resegmenting epoched data... Message-ID: Dear community, I'll start by thanking you for spending your time trying to answer my question. I'm having some trouble with my script. I have filter and do my ICA rejection in my epoched data already. But know I'm thinking, that it would be more interesting and efficient to do it in a more segmented data. But I don't want to waste time redoing all the preprocessing all over again. So I resegmented the already epoched data in many subepochs. Even so I'm not satisfied, I would like to know if there is a simple and elegant way of doing it in fieldtrip, better than mine (here above): SOA = 390; BL = 500; sr = 678.17; SOA = round(SOA*sr/1000); BL = round(BL*sr/1000); adjust_sample=[0 1 1 2 2 3 3 4 4 5 5 6 6]; %adjusting for rounding SOA %constructing begsample and endsample beg_begspl = BL; end_begspl = SOA*12 + BL; begsample = [beg_begspl:SOA:end_begspl]; begsample=begsample+adjust_sample; beg_endspl = SOA*4 + BL; end_endspl = SOA*16 + BL; endsample = [beg_endspl:SOA:end_endspl]; endsample = endsample + adjust_sample; cte = (endsample(1)- begsample(1))/2; %creating new epochs cfg = []; cfg.begsample = begsample(1); cfg.endsample = endsample(1); tmp_data1= ft_redefinetrial(cfg, data); cfg = []; cfg.offset = [-(0*SOA)-(cte)]; tmp_data1 = ft_redefinetrial(cfg, tmp_data1); .... cfg = []; cfg.begsample = begsample(13); cfg.endsample = endsample(13); tmp_data13= ft_redefinetrial(cfg, data); cfg = []; cfg.offset = [-(12*SOA)-(cte)]; tmp_data13 = ft_redefinetrial(cfg, tmp_data13); %concatenating data cfg = []; tmp_data = ft_appenddata(cfg, tmp_data1, tmp_data2, tmp_data3, tmp_data4, tmp_data5, tmp_data6, tmp_data7, tmp_data8, tmp_data9 , tmp_data10, tmp_data11, tmp_data12, tmp_data13); Once again, thank you Barbosa Catia INSERM U 1106 /Institut de neurosciences des systèmes (FRANCE) -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Mar 2 10:13:39 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 2 Mar 2015 10:13:39 +0100 Subject: [FieldTrip] Fwd: interpolation In-Reply-To: <0a61201b8b1547449c6aa889f3960ced@EXPRD01.hosting.ru.nl> References: <0a61201b8b1547449c6aa889f3960ced@EXPRD01.hosting.ru.nl> Message-ID: Dear Omer and Shlomit, Data matrices (e.g. each element of a data.trial{} cell-array) correspond to activity measured in *channels* over time. A channel in a data matrix does not necessarily correspond to an electrode (or gradiometer/magnetometer) which was present during the recording session. For instance, an EEG dataset can be expressed as a bipolar montage, which means that each channel corresponds to the difference between two electrodes. The positions of the physical electrodes are stored in sens.elecpos; these don't change with referencing. The sens.tra matrix describes how to convert from physical electrodes into data channels. If no rereferencing is applied to the data, sens.tra will typically be the identity matrix. In that case, sens.chanpos should also be identical to sens.elecpos. For the case of e.g. a bipolar montage, sens.elecpos will not change, while sens.chanpos might be updated to reflect points halfway two electrodes (and sens.tra will then be different from identity). Having access to the physical sensors' positions and the sens.tra matrix is needed for accurate source modelling, while sens.chanpos is used in other cases such as determining neighbours or creating a layout for topoplots. Best, Eelke On 1 March 2015 at 11:38, shlomit beker wrote: > > Hi Fieldtrippers, > > We would like to use the ft_channelrepair(cfg, data) function. > However we don't understand how to load or convert the electrode positions > into FieldTrip. > > We tried FT_READ_SENS and we looked in FT_DATATYPE_SENS, however there are > two positions variables described in this structure: > > The structure for EEG or ECoG channels contains > sens.label = Mx1 cell-array with channel labels > sens.chanpos = Mx3 matrix with channel positions > sens.tra = MxN matrix to combine electrodes into channels > sens.elecpos = Nx3 matrix with electrode positions > > what do the third field mean? what is the difference between the second and > the fourth? > > > our format is the attached. > > Thanks a lot! > > Omer and Shlomit > > From jeanmarclina at gmail.com Tue Mar 3 16:37:06 2015 From: jeanmarclina at gmail.com (Jean-marc Lina) Date: Tue, 3 Mar 2015 10:37:06 -0500 Subject: [FieldTrip] coherence and group analyses Message-ID: Involved in source analyses from MEG/EEG data, I am going through your papers related to statistical testing (Nonparametric stat testing of coherence differences, 2007 and stat testing in electrophys studies, 2012). Mostly concerned with coherence and coherency (either topography or tomography), I have some questions related to nonparametric statistical testing in the case where we have 2 groups (one group per condition, N subjects in each group) of individuals (n trials for each subjects). I will greatly appreciated some information that could help clarifying the followings: - how do we design the null distribution? permutations are among all subjects? How do we handle fixed/random effects? - Can we reproduce stricto sensu the Monte-Carlo approach described in the 2007 publication at the level of subjects (each subject being a UO) ? - Can we use the stat defined as the difference of the imaginary part of the coherence ? (averaged over the subjects in a group?) With my anticipated thanks, Best JM Lina -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Mar 3 21:54:55 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 3 Mar 2015 21:54:55 +0100 Subject: [FieldTrip] Magnetic dipole fit vs Equiv. Current dipole fit In-Reply-To: <54EE4147.9090408@candoosys.com> References: <54EE4147.9090408@candoosys.com> Message-ID: <063154D1-6549-463C-BCAA-AA42A78026EC@donders.ru.nl> Hi Jim You can do an inverse solution with any method (including dipole fitting) by specifying cfg.vol=[] in the corresponding high-level function (e.g. ft_prepare_leadfield, ft_dipolefitting or ft_sourceanalysis). This causes the forward model to be computed with a magnetic dipole. If you want to track this down to the lower lever code, have a look at these lines in the code “forward/ft_voltype.m" line 115 of 138 --83%-- col 11 “forward/ft_compute_leadfield.m" line 280 of 611 --45%-- col 12 My appologies for this not being documented better. I have been using this myself to check on the localization of the headcoils in the CTF “hz.ds” datasets, which worked fine. I hope you can get it to work for the Sandia Labs system. For the CTF system it is not needed to do these computations in MATLAB, since the CTF electronics does this in (alomst) real-time and the positions are streamed along with the MEG channel data. That makes this this http://fieldtrip.fcdonders.nl/getting_started/realtime_headlocalizer easy for the system we have in Nijmegen. Arjen and I have also been working on making it work for the Elekta system where the fitting has to be done in MATLAB, but have not been able sofar to get it to work robustly. You can find the experiences and (still open) report at http://bugzilla.fcdonders.nl/show_bug.cgi?id=1792. best regards Robert On 25 Feb 2015, at 22:40, Jim McKay wrote: > Hello Fieldtrippers, > > I am consulting with the Sandia Labs on development of an atomic magnetometer based MEG system prototype. One of the areas I am working on is head localization, so I was looking at the code for the realtime head localization in Fieldtrip. I was surprised to see that although the comments talk about using a magnetic dipole forward solution, it actually used the FT dipolefit code which is based on an equivalent current dipole, as far as I can tell. > > There should be a significant difference in the forward solutions between MD and ECD, so how does this work? Or am I just missing something? > > Cheers, > > Jim > > -- > Jim McKay > Candoo Systems Inc. - Magnetic field sensors, systems, and site surveys > Tel. 778-840-0361 > jim.mckay at candoosys.com > www.candoosys.com > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Mar 3 22:14:42 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 3 Mar 2015 22:14:42 +0100 Subject: [FieldTrip] inconsistent chanunit for Neuromag data In-Reply-To: References: Message-ID: <52410612-CB41-4734-A5E9-B45E7F22916B@donders.ru.nl> Hi Steve The grad.chanunit pertains to the units that would be computed as the forward solution. The hdr.chanunit pertains to the units of the channel-level data. Using the ft_convert_units helper function you could convert the units of the gradiometer definition from cm to mm or m. This changes the baseline of the planar gradiometers with a factor of 10 or 100. However, the planar gradient chanel data is not updated simultaneously and remains in the same units (fieldstrength per distance). So it can happen that grad.chanunit and hdr.chanunit are inconsistent. The consequence (which many people on the list will have noticed, but might not have understood) is that the forward solution - and therefore the inverse solution - for the Elekta planar gradiometer channels can easily be incorrect: due to the data being in T/m and the forward solution in T/cm (or some other units, I don’t know the typical units from the top of my head). As long as you always use the same pipeline on hte planar gradiometers, you will most likely not notice since you will be interpreting the sourc estimates in “arbitrary units” anyway. But if you were to combine the planar channels with the magnetometers, the planar channels (fieldstrength per distance) would be affected differently than the manetometer channels (fieldstrength) by your choise of geometrical units. Using the ft_datatype_sens helper function you can ensure that the scaling of the grad structure (which affects the “coilpos" field but also the rows of the “tra" field that correspond to the planar channels) is consistent with your channel level data. If you specify all your data in SI units (T, m, V, etc.) the units of the forward computations will be correct and hence the units of the inverse estimates will also be consistent in SI units (e.g. dipole moment in A/m). The thing is that the different fieldtrip import functions (which come from various origins) return data in non-SI units more often than not :-( If you work with channel level data, SI units are often not nice. ERFs in Tesla are very small (10^-12). ERPs are usually expressed in uV. Also for anatomcial MRIs it is not convenient to express data in SI units (m) and mm is common. The CTF system by default expresses geometrical distance in cm. Etc… So all systems by themselves made their own “convenient” choices. But if all the data comes together with the physical model, it becomes a mess. The logical choice to solve the inconsistencies is to express it in SI units. I hope this helps in clarifying the situation. best regards, Robert PS if you search on bugzilla, you can see some (still open) bugs that pertain to this On 27 Feb 2015, at 03:53, Steve Patterson wrote: > Hello, > > I noticed that fieldtrip produces inconsistent channel units when I > read in Neuromag (vectorview) data. > > For example: > > %%%%%%%%%%%%%%%%%%%%%%%% > > cfg = []; > cfg.dataset = 'example.fif'; > cfg.trialfun = 'ft_trialfun_general'; > cfg.trialdef.eventtype = 'STI101'; > cfg.trialdef.eventvalue = [17 18 20]; > cfg.trialdef.prestim = 0.500; > cfg.trialdef.poststim = 1.000; > cfg = ft_definetrial(cfg); > data = ft_preprocessing(cfg); > > disp(data.hdr.chanunit(1:6)); > 'T/m' > 'T/m' > 'T' > 'T/m' > 'T/m' > 'T' > > disp(data.grad.chanunit(1:6)); > 'T' > 'T' > 'T' > 'T' > 'T' > 'T' > > %%%%%%%%%%%%%%%%%%%%%%%% > > data.hdr.chanunit is correct and data.grad.chanunit is wrong. > > data.grad.chanunit must take precedence in further analysis, because > I've noticed this causes problems downstream. > > For example, when using ft_dipolesimulation, the simulated data on the > gradiometer channels is too small in amplitude by a factor of > 1/(16.8E-3) (the distance between the gradiometer coil pair in > meters). > > This is reflected in the grad.tra matrix, whose non-zero values are > all 1's and -1's, whereas they should be 1's (magnetometers), and +/- > 1/16.8E-3 (gradiometers). > > If you could fix this, it would be much appreciated! > > thanks, > > Steve > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue Mar 3 22:18:34 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 3 Mar 2015 22:18:34 +0100 Subject: [FieldTrip] eeglab2fieldtrip - Fieldtrip vs EEGLAB version In-Reply-To: References: Message-ID: Hi Omar, The eeglab2fieldtrip.m function lives on the boudary between the two projects. We (i.e. Arno and me) have decided to maintain it on the EEGLAB side and copy it to FieldTrip whenever needed. That is why it is in fieldtrip/external/eeglab. If you go to https://code.google.com/p/fieldtrip/source/list?path=/trunk/external/eeglab/eeglab2fieldtrip.m&start=10122 you can see the history. See also http://bugzilla.fcdonders.nl/show_bug.cgi?id=2770 In general for (almost) all code in fieldtrip/external it is being maintained externally, and often by people that are not directly related to the fieldtrip project. best Robert On 16 Feb 2015, at 16:38, Mian, Omar wrote: > Hello, > > There seem to be differences between the eeglab2fieldtrip.m when the Fieldtrip and EEGLAB versions are compared. > > Is this an oversight? > Which one is “better” ? > > data.cfg.version.id contains a later date in the Fieldtrip version, but the file properties modified date is later in the EEGLAB version. > > The versions I am comparing are: > \fieldtrip-20150109\external\eeglab\eeglab2fieldtrip.m > \eeglab13_4_4b\plugins\dipfit2.3\eeglab2fieldtrip.m > > Thanks > > Omar > > --------------------------- > Omar Mian, Phd > Research Fellow > > School of Applied Sciences > London South Bank University > 103 Borough Road > London SE1 0AA > Copyright in this email and in any attachments belongs to London South Bank University. This email, and its attachments if any, may be confidential or legally privileged and is intended to be seen only by the person to whom it is addressed. If you are not the intended recipient, please note the following: (1) You should take immediate action to notify the sender and delete the original email and all copies from your computer systems; (2) You should not read copy or use the contents of the email nor disclose it or its existence to anyone else. The views expressed herein are those of the author(s) and should not be taken as those of London South Bank University, unless this is specifically stated. London South Bank University is a company limited by guarantee registered in England and Wales. The following details apply to London South Bank University: Company number - 00986761; Registered office and trading address - 103 Borough Road London SE1 0AA; VAT number - 778 1116 17 Email address - LSBUinfo at lsbu.ac.uk _______________________________________________ > 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 tolgaozkurt at gmail.com Wed Mar 4 09:54:53 2015 From: tolgaozkurt at gmail.com (Tolga Ozkurt) Date: Wed, 4 Mar 2015 10:54:53 +0200 Subject: [FieldTrip] Visualization of Channels for Human Connectome Project MEG data Message-ID: Dear Fieldtrip list, I was seeing the MEG files uploaded by “Human Connectome Project”, which seem to be pre-processed by Fieldtrip. The resting data were collected in supine position with 4D Neuromag 248 channels. When I use the standard command for layout cfg.layout = '4D248.lay'; the channel locations do not seem to fit. (Please see the attached figure). I do not quite know the channel distribution of the system; but it seems some channels are out of the head. Could you give me an idea to project the channel layout properly? Thank you. Tolga -- Tolga Esat Özkurt, PhD *Department of Health InformaticsMiddle East Technical University* http://www.metu.edu.tr/~ozkurt/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: alpha_resting_data_example.jpg Type: image/jpeg Size: 64893 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Wed Mar 4 11:34:27 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 4 Mar 2015 10:34:27 +0000 Subject: [FieldTrip] Visualization of Channels for Human Connectome Project MEG data In-Reply-To: References: Message-ID: Hi Tolga, There’s a layout that ‘better fits’ the projected channel locations, and which you can obtain from the megconnectome software that accompanies the HCP MEG data. The software can be obtained from here: humanconnectome.org/documentation/MEG1/meg-pipeline.html If you download one of the packages and unzip it, you’ll find a ‘template’ directory. Inside, there’s a 4D248.mat file (note that you need the ‘4D248.mat’ in cfg.layout in that case), which you can use as a layout for visualization. Best wishes, Jan-Mathijs On Mar 4, 2015, at 9:54 AM, Tolga Ozkurt > wrote: Dear Fieldtrip list, I was seeing the MEG files uploaded by “Human Connectome Project”, which seem to be pre-processed by Fieldtrip. The resting data were collected in supine position with 4D Neuromag 248 channels. When I use the standard command for layout cfg.layout = '4D248.lay'; the channel locations do not seem to fit. (Please see the attached figure). I do not quite know the channel distribution of the system; but it seems some channels are out of the head. Could you give me an idea to project the channel layout properly? Thank you. Tolga -- Tolga Esat Özkurt, PhD Department of Health Informatics Middle East Technical University http://www.metu.edu.tr/~ozkurt/ _______________________________________________ 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 tolgaozkurt at gmail.com Wed Mar 4 14:46:21 2015 From: tolgaozkurt at gmail.com (Tolga Ozkurt) Date: Wed, 4 Mar 2015 15:46:21 +0200 Subject: [FieldTrip] Visualization of Channels for Human Connectome Project MEG data In-Reply-To: References: Message-ID: Thanks a lot for the tip, Jan-Mathijs. I started downloading it now. Best, Tolga On Wed, Mar 4, 2015 at 12:34 PM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Tolga, > > There’s a layout that ‘better fits’ the projected channel locations, and > which you can obtain from the megconnectome software that accompanies the > HCP MEG data. The software can be obtained from here: > humanconnectome.org/documentation/MEG1/meg-pipeline.html > If you download one of the packages and unzip it, you’ll find a ‘template’ > directory. Inside, there’s a 4D248.mat file (note that you need the > ‘4D248.mat’ in cfg.layout in that case), which you can use as a layout for > visualization. > > Best wishes, > Jan-Mathijs > > > On Mar 4, 2015, at 9:54 AM, Tolga Ozkurt wrote: > > Dear Fieldtrip list, > > > I was seeing the MEG files uploaded by “Human Connectome Project”, which > seem to be pre-processed by Fieldtrip. The resting data were collected in > supine position with 4D Neuromag 248 channels. > > > When I use the standard command for layout > > > cfg.layout = '4D248.lay'; > > > the channel locations do not seem to fit. (Please see the attached > figure). I do not quite know the channel distribution of the system; but it > seems some channels are out of the head. > > > Could you give me an idea to project the channel layout properly? > > > Thank you. > > > Tolga > > -- > Tolga Esat Özkurt, PhD > > *Department of Health Informatics Middle East Technical University* > http://www.metu.edu.tr/~ozkurt/ > > > _______________________________________________ > 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 jim.mckay at candoosys.com Wed Mar 4 20:28:42 2015 From: jim.mckay at candoosys.com (Jim McKay) Date: Wed, 04 Mar 2015 11:28:42 -0800 Subject: [FieldTrip] Magnetic dipole fit vs Equiv. Current dipole fit In-Reply-To: <063154D1-6549-463C-BCAA-AA42A78026EC@donders.ru.nl> References: <54EE4147.9090408@candoosys.com> <063154D1-6549-463C-BCAA-AA42A78026EC@donders.ru.nl> Message-ID: <54F75CEA.4020801@candoosys.com> An HTML attachment was scrubbed... URL: From ghanson0 at ku.edu Thu Mar 5 05:01:45 2015 From: ghanson0 at ku.edu (Hanson, Gavin Keith) Date: Thu, 5 Mar 2015 04:01:45 +0000 Subject: [FieldTrip] When/how do you bring together data from multiple blocks within a single participant. Message-ID: This is undoubted a straightforward issue, but I can’t seem to find any reference to it in the fieldtrip documentation. Our scanning protocol for each participant involved 6 runs of around 8 minutes in length, each of which is saved as a separate CTF dataset, and each of which begins with head localization (no continuous head position data). My main question is, when do I bring these blocks together into a single participant dataset? Do I just clean the data, then append it all together before launching in on the time-frequency analysis? Do I perform a time-frequency analysis within each block and then bring it all together later? How do I “align" my data to a specific head position that can hold for all blocks within a participant prior to topographical plotting / source reconstruction? If anyone can point me to where these answers may be, I would be very grateful, but I can’t find an answer to this anywhere. If it matters, our ultimate goal is to use beamforming to localize task-associated oscillatory responses during a cognitive task. Thanks in advance for your help, and let me know if you require further information. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Gavin Hanson, B.S. Research Assistant Department of Psychology University of Kansas 1415 Jayhawk Blvd., 534 Fraser Hall Lawrence, KS 66045 From Claudio.Georgii at stud.sbg.ac.at Thu Mar 5 13:25:34 2015 From: Claudio.Georgii at stud.sbg.ac.at (Claudio Georgii) Date: Thu, 5 Mar 2015 13:25:34 +0100 Subject: [FieldTrip] Phd or Post-doctoral position at the University of Salzburg Message-ID: Dear ladies and gentlemen, the clinical department (in particular the Clinical Stress and Emotion Lab and the Center for Cognitive Neuroscience) at the University of Salzburg is offering a Ph.D (3 years) or post-doc (4 years) position (depending on career stage/experience) for applicants with basic or advanced knowledge in EEG/fMRI/MEG methods. The focus of research will be analysis of ERPs, oscillatory EEG (on the surface and in source space) as well as connectivity analyses. We are funded by a starting grant of the European Research Council, running for the coming 5 years and a project funded by the Austrian Science Foundation in collaboration with the National Research Fund of Luxembourg (3 years). Please take more detailed information about the proposed position from the attached .pdf-file. We are looking forward to your application! Kind regards, Claudio Georgii -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ERCundFWFProjekt - neurocognitive.pdf Type: application/pdf Size: 216369 bytes Desc: not available URL: From r.oostenveld at donders.ru.nl Thu Mar 5 14:32:00 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 5 Mar 2015 14:32:00 +0100 Subject: [FieldTrip] Tenure Track Position "Neuropsychology of Language and Language Disorders" References: Message-ID: Tenure Track Position "Neuropsychology of Language and Language Disorders" Application deadline: 17 May 2015 Responsibilities The research consortium Language in Interaction invites applications for a tenure track position, offered with a view to long-term embedding of neuropsychological research in a clinical setting, and enhancement of collaborative research in the field of language-related disorders. The specific focus of the position is on the neuropsychology of language, bridging gaps at the clinical /non-clinical intersection (e.g. language-related disorders). This integration can be achieved using a varied set of methods, such as behavioural experimentation, functional neuroimaging (fMRI, EEG, MEG), transcranial magnetic stimulation (TMS), and formal computational modelling of language processes. You will head an independent research group to be established to promote the interaction between clinical and pre-clinical researchers. You will be expected to conduct research in one or more research areas relevant to theposition. Supervision of BSc, MSc and PhD projects will be part of your responsibilities. Administrative duties will include local and/or national committee memberships. With a view to continuation, the position may be expanded to include teaching and clinical work. You will be provided with budgetary resources, a PhD student or technician, materials and consumables. Work environment The Netherlands has an outstanding track record in the language sciences. The Language in Interaction consortium, sponsored by a Gravitation grant from the Netherlands Organization for Scientific research (NWO), brings together many of the excellent research groups in the Netherlands in a research programme on the foundations of language. Excellence in the domain of language and related relevant fields of cognition is combined with state-of-the-art research facilities and a research team with ample experience in complex research methods and utilization. This position is equally shared by two research centres within Donders Institute for Brain, Cognition and Behaviour, Radboud University and RadboudUMC. The Donders Institute is a world-class research centre devoted to understanding the mechanistic underpinnings of human cognition and behaviour. The institute conducts research in an international setting with more than 600 researchers from 35 countries. English is the lingua franca. In 2013, the Donders Institute was assessed by an international evaluation committee as excellent and recognized as a ‘very stimulating environment for top researchers, as well as for young talent'. What we expect from you You should be a creative and talented researcher, a strong experimenter in the neuropsychology of language, and have a clinical background and experience with patient studies. Other requirements are: − a PhD degree in a field relevant to the position concerned; − an established international reputation; − strong track record of peer-reviewed international publications; − experience with successfully applying for external funding; − experience with (co-)supervision of PhD students; − management skills required for academic leadership. What we have to offer - full time position - a maximum gross monthly salary of € 5,171 based on a 38-hour working week; starting salary depends on qualifications and experience; - you will be appointed for a period of 48 months; after 4 years, a permanent position will be offered if your performance is evaluated positively. Are you interested? Check this link for more information on this job offer and how to apply: http://www.ru.nl/overons/werken-radboud/details-0/details_vacature_0?recid=547039 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dboratyn at u.northwestern.edu Fri Mar 6 00:27:13 2015 From: dboratyn at u.northwestern.edu (Daria Boratyn) Date: Thu, 5 Mar 2015 17:27:13 -0600 Subject: [FieldTrip] ft_apply_montage Message-ID: I'm attempting to create a bipolar montage for a grouping of electrodes and am hving trouble figuring out the correct inputs. The setup I have: bipolar.labelorg = {'EEG 030', 'EEG 028', 'EEG 040', 'EEG 020' 'EEG 018' 'EEG 038'} bipolar.labelnew = {'EEG 030-EEG 028', 'EEG 030-EEG 040', 'EEG 030-EEG 020', 'EEG 028-EEG 018', 'EEG 028-EEG 038'} bipolar.tra = [ +1 -1 0 0 0 0 +1 0 -1 0 0 0 +1 0 0 -1 0 0 0 +1 0 0 -1 0 0 +1 0 0 0 -1 ]; freq_bipolar = ft_apply_montage(freq_continuous, ); I'm not sure which inputs ft_apply_montage wants and mostly get this error: Attempt to reference field of non-structure array. Error in ft_apply_montage (line 86) montage.chantypeorg = repmat({'unknown'}, size(montage.labelorg)); I would like to have an output that computes the subtraction of signals for the pairings specified. Any suggests would be greatly appreciated! Thank you, Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.staudigl at uni-konstanz.de Fri Mar 6 13:02:33 2015 From: tobias.staudigl at uni-konstanz.de (Tobias Staudigl) Date: Fri, 06 Mar 2015 13:02:33 +0100 Subject: [FieldTrip] imag plv In-Reply-To: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> References: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> Message-ID: <54F99759.8030302@uni-konstanz.de> Dear ft community, I am looking for an equivalent of imaginary coherence (Nolte, 2004), based on the phase-locking value (Lachaux, 1999) rather than coherence. Fieldtrip supports the following function, which would be exactly what I needed: cfg=[]; cfg.method = 'plv'; cfg.complex = 'imag'; iplv=ft_connectivityanalysis(cfg,freq); However, I did not find any documentation or reference, and was wondering whether it is feasible to use 'imag' together with 'plv'? Sadaghiani et al. (2012; J Neurosci) calculated imaginary plv in their paper like this: Is this what the ft code effectively does? Any help appreciated, thanks a lot! best, Tobias -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ihbaaegh.png Type: image/png Size: 4003 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Fri Mar 6 13:33:05 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 6 Mar 2015 12:33:05 +0000 Subject: [FieldTrip] imag plv In-Reply-To: <54F99759.8030302@uni-konstanz.de> References: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> <54F99759.8030302@uni-konstanz.de> Message-ID: <4F1BA098-10EB-41FD-8B65-21FB6F044854@fcdonders.ru.nl> Hi Tobias, However, I did not find any documentation or reference, and was wondering whether it is feasible to use 'imag' together with 'plv'? Sadaghiani et al. (2012; J Neurosci) calculated imaginary plv in their paper like this: [cid:0471C70F-48E6-4C72-9F25-A67474534898 at home] Is this what the ft code effectively does? Yes, it does. Best wishes, Jan-Mathijs -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ihbaaegh.png Type: image/png Size: 4003 bytes Desc: ihbaaegh.png URL: From v.piai.research at gmail.com Mon Mar 9 04:58:41 2015 From: v.piai.research at gmail.com (=?UTF-8?B?Vml0w7NyaWEgUGlhaQ==?=) Date: Sun, 08 Mar 2015 20:58:41 -0700 Subject: [FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline' Message-ID: <54FD1A71.3070508@gmail.com> Hi all, I'm interested in using Laplacian transformation prior to computing TFRs. I still haven't read anything about the three methods implemented in FieldTrip, I must confess, but I think my question is independent of that. I'm using FT version: fieldtrip-20140801 on Matlab2014a. If I use the method 'spline', I can subsequently run ft_freqanalysis (or ft_timelockanalysis for that matter). However, with either 'hjorth' or 'finite', I get an error when running ft_freqanalysis/ft_timelockanalysis: My cfg: cfgn.method = 'template'; cfgn.layout = 'biosemi64.lay'; cfg.neighbours = ft_prepare_neighbours(cfgn, dat); cfg.method = 'hjorth'; %'finite', 'spline' cfg.elec = ft_read_sens('standard_1005.elc'); lpc = ft_scalpcurrentdensity(cfg, dat); % Then after that, a commonly used cfg for ft_freqanalysis Error using ft_datatype_sens (line 375) inconsistent number of channels in sensor description Error in ft_datatype_raw (line 138) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 219) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_freqanalysis (line 211) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); I understand that the "inconsistent number of channels in sensor description" is coming from these two other implementations, but should that be the case? The help on ft_scalpcurrentdensity says " The output data has the same format as the input and can be used in combination with most other FieldTrip functions". So I'm wondering whether there's something special intrinsic to these implementations, I'm using a too old FT version, my config isn't right, or this is an issue that has gone unnoticed because those implementations are not used often. Thanks a lot! Cheers from Berkeley, Vitoria From munsif.jatoi at gmail.com Mon Mar 9 11:31:24 2015 From: munsif.jatoi at gmail.com (Munsif Jatoi) Date: Mon, 9 Mar 2015 18:31:24 +0800 Subject: [FieldTrip] Source Analysis @ EEG data. Message-ID: Dear All, I hope you are fine. Sir, I am working for the completion of my PhD thesis in the field of EEG source localization by using various methods such as eLORETA, MUSIC, Min Norm etc. For this, I have been using SPM and Fieldtrip to first simulate EEG data and then use inverse methods to localize the sources. I have simulated the data by using two head models that are BEM and FEM. For BEM, I have used SPM+ Fieldtrip. However, for FEM I have purely used Fieldtrip SIMBIO command line. Now, I want to use the inverse methods for localization. For this, I have gone through the tutorials available at the fieldtrip website http://fieldtrip.fcdonders.nl/example . There, I found that there are following methods which are used for inverse problem: *1) *linear constrained minimum variance beamformer (LCMV) *2) *synthetic aperture magnetometry (SAM) *3) *dynamic imaging of coherent sources (DICS) *4) *partial cannonical correlation/coherence (PCC) *5) *minimum norm estimation (MNE) *6) *minimum norm estimation with smoothness constraint (LORETA) *7) *multiple signal classification (MUSIC) *8) *scan residual variance with single dipole (RV) *9) *multivariate Laplace source localization (MVL) However, I want to apply min norm, LORETA and MUSIC only for my data. As I studied MUSIC for applying on EEG data, I found that the code is developed by going through the research article of J.C. Mosher et. al. “Multiple dipole modelling and localization from spatiotemporal MEG data,” IEEE Trans. Biomed. Engg., pp. 541-557, June 1992. Though the basic definitions are understandable, however, I am confused in implementation for *EEG* data. For this, I have following questions: 1) What is *numcomponent* variable? I mean how it can be used for EEG data? 2) What is *dip* variable? From where we can generate it for an EEG data? 3) If we have computed leadfield by using BEM and FEM, how we can introduce in the programme provided at https://github.com/fieldtrip/fieldtrip/blob/master/inverse/music.m ? I hope you shall answer my questions. Thanks for your time. Kind Regards, Munsif. -- Munsif Ali H.Jatoi, Ph D Scholar, Centre for Intelligent Signals and Imaging Research, Universiti Teknologi PETRONAS, Malaysia. http://scholar.google.com.my/citations?user=Y6g6jOAAAAAJ&hl=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Mar 9 18:28:29 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 9 Mar 2015 17:28:29 +0000 Subject: [FieldTrip] Quick question about STAT (error and weird output) Message-ID: Dear all, I am trying to look at ERPs stats with my EGI cap (I have 16 subjects - within subjects design). According to the code I use, I get in the order, an ERROR or I see something weird and I wish to have an opinion. See the script below: Here is my script: % ERPs grandaverage calculation for 4 conditions cfg = []; cfg.keepindividual = 'yes'; ERPs_FP_grandavg = ft_timelockgrandaverage(cfg, FP_block{:}); ERPs_FS_grandavg = ft_timelockgrandaverage(cfg, FS_block{:}); ERPs_HP_grandavg = ft_timelockgrandaverage(cfg, HP_block{:}); ERPs_HS_grandavg = ft_timelockgrandaverage(cfg, HS_block{:}); % t-tests cfg = []; cfg.method = 'triangulation'; cfg.layout = 'GSN-HydroCel-128.sfp'; cfg.neighbourdist = 2; cfg.senstype = 'EEG'; neighbours_EEG = ft_prepare_neighbours(cfg, ERPs_FP_grandavg); cfg = []; cfg.channel = 'EEG'; cfg.minnbchan = 2; cfg.neighbours = neighbours_EEG; cfg.latency = [1.17 1.25]; cfg.avgovertime = 'no'; cfg.parameter = 'avg'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.correctm = 'cluster'; cfg.correcttail = 'prob'; cfg.numrandomization = 1000; cfg.tail = 0; cfg.clustertail = 0; Nsub = length(names); cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number IF I USE THIS CODE: stat = ft_timelockstatistics(cfg,ERPs_FP_grandavg,ERPs_FS_grandavg); I GET TE ERROR: Reference to non-existent field 'dat'. Error in prepare_timefreq_data>forcedimord (line 531) Nrepl = size(output.dat, repldim); Error in prepare_timefreq_data (line 87) [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in statistics_wrapper (line 235) [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ft_timelockstatistics (line 113) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); - Note that this worked in very earlier versions of FT IF I USE THIS CODE stat = ft_timelockstatistics(cfg,FP_block{:},FS_block{:}); IT RUNS, BUT I GET SOMETHING WEIRD WITH T-VALUES BELOW 1 and 4 clusters (see attched figure). What I am doing wrong? Any advice would be great. Many thanks, Davide -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: stat_plot.tif Type: image/tiff Size: 199807 bytes Desc: stat_plot.tif URL: From r.oostenveld at donders.ru.nl Mon Mar 9 19:52:21 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 9 Mar 2015 19:52:21 +0100 Subject: [FieldTrip] Quick question about STAT (error and weird output) In-Reply-To: References: Message-ID: <60EC3D7C-9D72-436A-AF90-DA39BDEFF28C@donders.ru.nl> Hi Davide The details of the error messages reveal that you are using an old version of FieldTrip. Some of the low level functions it shows do not exist any more. Please update to the latest version and try again. Robert > On 9 mrt. 2015, at 18:28, Davide Rivolta wrote: > > Dear all, > > I am trying to look at ERPs stats with my EGI cap (I have 16 subjects - within subjects design). > According to the code I use, I get in the order, an ERROR or I see something weird and I wish to have an opinion. > See the script below: > > Here is my script: > % ERPs grandaverage calculation for 4 conditions > cfg = []; > cfg.keepindividual = 'yes'; > ERPs_FP_grandavg = ft_timelockgrandaverage(cfg, FP_block{:}); > ERPs_FS_grandavg = ft_timelockgrandaverage(cfg, FS_block{:}); > ERPs_HP_grandavg = ft_timelockgrandaverage(cfg, HP_block{:}); > ERPs_HS_grandavg = ft_timelockgrandaverage(cfg, HS_block{:}); > > % t-tests > cfg = []; > cfg.method = 'triangulation'; > cfg.layout = 'GSN-HydroCel-128.sfp'; > cfg.neighbourdist = 2; > cfg.senstype = 'EEG'; > neighbours_EEG = ft_prepare_neighbours(cfg, ERPs_FP_grandavg); > > cfg = []; > cfg.channel = 'EEG'; > cfg.minnbchan = 2; > cfg.neighbours = neighbours_EEG; > cfg.latency = [1.17 1.25]; > cfg.avgovertime = 'no'; > cfg.parameter = 'avg'; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.alpha = 0.05; > cfg.clusteralpha = 0.05; > cfg.correctm = 'cluster'; > cfg.correcttail = 'prob'; > cfg.numrandomization = 1000; > cfg.tail = 0; > cfg.clustertail = 0; > > Nsub = length(names); > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable > cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number > > IF I USE THIS CODE: > stat = ft_timelockstatistics(cfg,ERPs_FP_grandavg,ERPs_FS_grandavg); > > I GET TE ERROR: > Reference to non-existent field 'dat'. > > Error in prepare_timefreq_data>forcedimord (line 531) > Nrepl = size(output.dat, repldim); > > Error in prepare_timefreq_data (line 87) > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); > > Error in statistics_wrapper (line 235) > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); > > Error in ft_timelockstatistics (line 113) > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > - Note that this worked in very earlier versions of FT > > > > IF I USE THIS CODE > stat = ft_timelockstatistics(cfg,FP_block{:},FS_block{:}); > > IT RUNS, BUT I GET SOMETHING WEIRD WITH T-VALUES BELOW 1 and 4 clusters (see attched figure). > > > What I am doing wrong? Any advice would be great. > > > Many thanks, > Davide > > > > -- > Davide Rivolta, PhD > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From drivolta81 at gmail.com Mon Mar 9 21:10:04 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 9 Mar 2015 20:10:04 +0000 Subject: [FieldTrip] Quick question about STAT (error and weird output) In-Reply-To: <60EC3D7C-9D72-436A-AF90-DA39BDEFF28C@donders.ru.nl> References: <60EC3D7C-9D72-436A-AF90-DA39BDEFF28C@donders.ru.nl> Message-ID: Dear Robert, thanks for the prompt reply. I was using the 20150113 version. I have now downloaded the most recent version (20150308). As you predicted the last error disappeared, but after running the same script, I got this one: Error using getdimord (line 15) field "avg" not present in data Error in ft_timelockstatistics (line 114) dimord = getdimord(varargin{1}, cfg.parameter); It is weird that it is looking for "avg" since I had to indicate keepindividual='yes' in the ft_timelockgrandaverage step. I am sure it is something silly, but if someone is willing to help me out here, I would be grateful. Many thanks, Davide On Mon, Mar 9, 2015 at 6:52 PM, Robert Oostenveld < r.oostenveld at donders.ru.nl> wrote: > Hi Davide > > The details of the error messages reveal that you are using an old version > of FieldTrip. Some of the low level functions it shows do not exist any > more. > > Please update to the latest version and try again. > > Robert > > > > On 9 mrt. 2015, at 18:28, Davide Rivolta wrote: > > > > Dear all, > > > > I am trying to look at ERPs stats with my EGI cap (I have 16 subjects - > within subjects design). > > According to the code I use, I get in the order, an ERROR or I see > something weird and I wish to have an opinion. > > See the script below: > > > > Here is my script: > > % ERPs grandaverage calculation for 4 conditions > > cfg = []; > > cfg.keepindividual = 'yes'; > > ERPs_FP_grandavg = ft_timelockgrandaverage(cfg, FP_block{:}); > > ERPs_FS_grandavg = ft_timelockgrandaverage(cfg, FS_block{:}); > > ERPs_HP_grandavg = ft_timelockgrandaverage(cfg, HP_block{:}); > > ERPs_HS_grandavg = ft_timelockgrandaverage(cfg, HS_block{:}); > > > > % t-tests > > cfg = []; > > cfg.method = 'triangulation'; > > cfg.layout = 'GSN-HydroCel-128.sfp'; > > cfg.neighbourdist = 2; > > cfg.senstype = 'EEG'; > > neighbours_EEG = ft_prepare_neighbours(cfg, ERPs_FP_grandavg); > > > > cfg = []; > > cfg.channel = 'EEG'; > > cfg.minnbchan = 2; > > cfg.neighbours = neighbours_EEG; > > cfg.latency = [1.17 1.25]; > > cfg.avgovertime = 'no'; > > cfg.parameter = 'avg'; > > cfg.method = 'montecarlo'; > > cfg.statistic = 'ft_statfun_depsamplesT'; > > cfg.alpha = 0.05; > > cfg.clusteralpha = 0.05; > > cfg.correctm = 'cluster'; > > cfg.correcttail = 'prob'; > > cfg.numrandomization = 1000; > > cfg.tail = 0; > > cfg.clustertail = 0; > > > > Nsub = length(names); > > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > > cfg.ivar = 1; % the 1st row in cfg.design contains the > independent variable > > cfg.uvar = 2; % the 2nd row in cfg.design contains the > subject number > > > > IF I USE THIS CODE: > > stat = ft_timelockstatistics(cfg,ERPs_FP_grandavg,ERPs_FS_grandavg); > > > > I GET TE ERROR: > > Reference to non-existent field 'dat'. > > > > Error in prepare_timefreq_data>forcedimord (line 531) > > Nrepl = size(output.dat, repldim); > > > > Error in prepare_timefreq_data (line 87) > > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); > > > > Error in statistics_wrapper (line 235) > > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); > > > > Error in ft_timelockstatistics (line 113) > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > > > - Note that this worked in very earlier versions of FT > > > > > > > > IF I USE THIS CODE > > stat = ft_timelockstatistics(cfg,FP_block{:},FS_block{:}); > > > > IT RUNS, BUT I GET SOMETHING WEIRD WITH T-VALUES BELOW 1 and 4 clusters > (see attched figure). > > > > > > What I am doing wrong? Any advice would be great. > > > > > > Many thanks, > > Davide > > > > > > > > -- > > Davide Rivolta, PhD > > > > _______________________________________________ > > 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 > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Tue Mar 10 11:42:15 2015 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Tue, 10 Mar 2015 10:42:15 +0000 Subject: [FieldTrip] Looking up for right MNI coords and label Message-ID: Dear all, I've estimated the sources of two conditions using individual MRIs with warped grid from a template (1cm spacing). I ran a cluster-based permutation to find the significant voxels and I'm choosing the voxel where the difference is bigger. I've had some problems defining what that voxel is. I've used two options: giving the position to the atlas_lookup function, and giving the index to an interpolated tissue matrix from an atlas. Given that grid occupies the brain volume (in the BEM model with 3 layers), I also created a mask to restrict the voxels of interest to the cortex from the atlas. I seem to get different results with these and I don't understand why. All matrices are in cm. This is part of the code: Note: The variables are atlas = ft_read_atlas('...\fieldtrip-20141023\template\atlas\aal\ROI_MNI_V4.nii'); % then converted to 'cm' sourcemodel = grid with 1cm spacing from template stat = structure from ft_sourcestatistics % Create mask from atlas cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'tissue'; sourcemodel2 = ft_sourceinterpolate(cfg,atlas,sourcemodel); atlas_one= sourcemodel2.tissue > 0; % Logical matrix with points with an anatomical label %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 1)Look for labels with atlas mask [val ind_max] = max(stat.stat(:).* atlas_one(:)); % 1.a)-------------------------------------- % Atlas_lookup pos = stat.pos(ind_max,:); atlas_lookup(atlas, pos, 'inputcoord', 'mni') % Results % MNI coordinates: 4 -1 2 % Label: Rolandic_Oper_R % 1.b)-------------------------------------- % Interpolated tissue from atlas [xi yi zi] = ind2sub(stat.dim, ind_max); atlas.tissuelabel{sourcemodel2.tissue(xi, yi, zi)} % Results % Voxel coordinates: 12 10 10 % Label: Rolandic_Oper_R %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 2)Look for labels without atlas mask [val ind_max] = max(stat.stat(:)); % 2.a)-------------------------------------- % Atlas_lookup % Results % MNI coordinates: 4 -1 3 % Label: Postcentral_R % 2.b)-------------------------------------- % Interpolated tissue from atlas % Results % Voxel coordinates: 12 10 11 % Label: None What is it that I'm missing? Thank you in advance for any help! Best regards, Laura Rueda Delgado PhD student Department of Kinesiology- Motor Control and Neural Plasticity Research Group KU Leuven Tervuursevest 101 bus 1501 3001 Leuven, Belgium tel. +32 16 37 64 78 -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Tue Mar 10 12:56:03 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Tue, 10 Mar 2015 11:56:03 +0000 Subject: [FieldTrip] Electrode plots below the equator Message-ID: I am using EGIs electrodes, and am trying to plot data on the topo plot. The electrodes below the horizontal equator plot on top of the other electrodes. I have tried all of the types. With the orthographic I get the best results for the interior and superior electrodes (center of head), the the ones below the horizon appear to plot on top of the ones above the horizon. For example the topo plot at http://sccn.ucsd.edu/eeglab/allfunctions/topoplot.html. Can this be done with ft plots? EEGLab topoplot: "By default, channel locations below head center (arc_length 0.5) are shown in a 'skirt' outside the cartoon head (see 'plotrad' and 'headrad' options below)². This is my code, I have tried all the options for projection. cfg=[]; cfg.rotate=0; cfg.elec=elec; cfg.projection='orthographic'; lay=ft_prepare_layout(cfg); 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 *********************************************** > From marijkebeulen at gmail.com Tue Mar 10 13:13:31 2015 From: marijkebeulen at gmail.com (Marijke Beulen) Date: Tue, 10 Mar 2015 13:13:31 +0100 Subject: [FieldTrip] Pre-stimulus baseline correction for response-locked ERPs In-Reply-To: References: Message-ID: <54FEDFEB.2080904@gmail.com> Dear all, I was wondering if anyone knows how to define a stimulus-locked baseline period to correct a response-locked ERP using ft_timelockbaseline. So far, I've been plotting stimulus-locked ERPs and using ft_timelockbaseline with the 300ms before stimulus onset for baseline correction. I've tried other methods to do baseline correction manually, but so far, ft_timelockbaseline has given me the best results. However, now I also want to plot response-locked ERPs. To keep things comparable, I would like to use the same 300ms pre-stimulus interval for baseline correction, but my trials have different lengths. This means that after response-locking the data, the time stamp of that interval is different on every trial. Is there any way to e.g. define separate baseline windows for each trial or to give FieldTrip another (stimulus-locked) dataset to use as a baseline in ft_timelockbaseline? I've already searched through FieldTrip's documentation, but I haven't been able to find a solution. Any advice on how to do this would be much appreciated! Sincerely, Marijke Beulen -- M.A. Beulen, MSc. PhD student at University of Groningen, dept. Artificial Intelligence Bernoulliborg, room 320 Nijenborgh 9 9747 AG Groningen The Netherlands Phone: +31 50 363 6915 m.a.beulen at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Mar 10 15:05:18 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 10 Mar 2015 15:05:18 +0100 (CET) Subject: [FieldTrip] channel order changes after ft_channelrepair In-Reply-To: <654280552.938467.1425994592940.JavaMail.root@bcbl.eu> Message-ID: <604599468.938937.1425996318048.JavaMail.root@bcbl.eu> Dear all, I just noted that after calling ft_channelrepair the order of channel labels in my Neuromag 306 data has changed. The code I am using is as follows (fieldtrip-20150115): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % get the labels from the reference layout cfg = []; cfg.layout = 'neuromag306planar.lay'; [ref_lay] = ft_prepare_layout(cfg); % eliminate COMNT and SCALE labels ref_lay.label = ref_lay.label(1:204); % get the labels of channels present in the data orig_label = meg_data.label; % compare labels from reference layout with original data idx = zeros(length(ref_lay.label),1); for it = 1:length(ref_lay.label) idx(it) = any(strcmp(ref_lay.label(it),orig_label)); end; % load the template neighbourhood structure from fieldtrip load('neuromag306planar_neighb.mat'); cfg = []; cfg.neighbours = neighbours; cfg.missingchannel = find(idx==0); cfg.method = 'spline'; [meg_data] = ft_channelrepair(cfg,meg_data); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% When I then look at meg_data.label I can see that the missing channels were added at the end of the channel label list instead of being integrated in the list at the position where they would be found in the channel list of the template layout. For instance meg_data.label(end) = 'MEG1133'; and ref_lay.label(end) = 'MEG2643'; Does anyone know why this happens and how this can be avoided or compensated? I am guessing that later on in the analysis pipeline this can become problematic as the mapping between the new labels and the spatial coordinates does not correspond anymore. Any help or suggestions would be highly appreciated! Thanks, Fred -- Frédéric Roux Postdoctoral Scientist f.roux at bcbl.eu Tel: +34 943 309 300 Ext 211 Fax: +34 943 309 052 Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer --------------------------------------------------------------------------- From jorn at artinis.com Tue Mar 10 15:16:30 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Tue, 10 Mar 2015 15:16:30 +0100 Subject: [FieldTrip] channel order changes after ft_channelrepair In-Reply-To: <604599468.938937.1425996318048.JavaMail.root@bcbl.eu> References: <654280552.938467.1425994592940.JavaMail.root@bcbl.eu> <604599468.938937.1425996318048.JavaMail.root@bcbl.eu> Message-ID: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> Hi Fred, back then when I implemented different options for channel interpolation, we decided that there is no "natural" order of channels in any sense. For MEG systems it might seem like that, because afaik there is a single acquisition software per system, which is always returning channels in the same order. However, this order is arbitrary and can be other rationales equally valid than the one used by the acquisition software. For your specific case, I imagine that a sensor is broken and thus turned off: it will not be in the list of channels anymore. FieldTrip does not know where the 'natural' position of that channel is, as FT is not maintaining fixed channel lists. But this shouldn't be a problem anyhow, as channel labels can be easily matched. If I recall the latest developments correctly, by now all FieldTrip functions are taking care of the channel order - even when computing leadfields ;) If you do not like this due to aesthetical reasons or because you want to have the channel order being consistent across subjects, you can simply reorder them manually. As said, FieldTrip does not care about the order. Just be sure that if you are reordering the label-field, you also need to reorder the channel dimension(s) of all data. If you encounter any problems with this concatenation, feel free send out notification. Best, Jörn PS: if the channel is already in your data and you want to just repair it because it suffers from a lot of artifacts, you could try using cfg.badchannel instead of cfg.missingchannel. If I recall correctly, missing channels are always concatenated, bad channels are kept in order if already present. But it's been a while, so I am not sure and right now, too lazy to check the code ;) -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Frédéric Roux > Sent: Tuesday, March 10, 2015 3:05 PM > To: FieldTrip discussion list > Subject: [FieldTrip] channel order changes after ft_channelrepair > > Dear all, > > I just noted that after calling ft_channelrepair the order of channel labels in > my Neuromag 306 data has changed. > > The code I am using is as follows (fieldtrip-20150115): > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % get the labels from the reference layout cfg = []; cfg.layout = > 'neuromag306planar.lay'; > > [ref_lay] = ft_prepare_layout(cfg); > > % eliminate COMNT and SCALE labels > ref_lay.label = ref_lay.label(1:204); > > % get the labels of channels present in the data orig_label = meg_data.label; > > % compare labels from reference layout with original data idx = > zeros(length(ref_lay.label),1); for it = 1:length(ref_lay.label) > idx(it) = any(strcmp(ref_lay.label(it),orig_label)); > end; > > % load the template neighbourhood structure from fieldtrip > load('neuromag306planar_neighb.mat'); > > cfg = []; > cfg.neighbours = neighbours; > cfg.missingchannel = find(idx==0); > cfg.method = 'spline'; > > [meg_data] = ft_channelrepair(cfg,meg_data); > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > When I then look at meg_data.label I can see that the missing channels were > added at the end of the channel label list instead of being integrated in the > list at the position where they would be found in the channel list of the > template layout. > > For instance > > meg_data.label(end) = 'MEG1133'; > > and > > ref_lay.label(end) = 'MEG2643'; > > > Does anyone know why this happens and how this can be avoided or > compensated? I am guessing that later on in the analysis pipeline this can > become problematic as the mapping between the new labels and the spatial > coordinates does not correspond anymore. > > Any help or suggestions would be highly appreciated! > > Thanks, > Fred > > -- > Frédéric Roux > Postdoctoral Scientist > f.roux at bcbl.eu > Tel: +34 943 309 300 Ext 211 > Fax: +34 943 309 052 > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > --------------------------------------------------------------------------- > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From f.roux at bcbl.eu Tue Mar 10 15:37:02 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 10 Mar 2015 15:37:02 +0100 (CET) Subject: [FieldTrip] channel order changes after ft_channelrepair In-Reply-To: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> Message-ID: <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> Dear Joern, thanks for the quick and very helpful reply. My goal is indeed to keep the channel order consistent across different participants. After MF-preprocessing some of the channels are missing in certain participants but this is not consistent so I would like to interpolate the missing channels for those participants for which the channels were turned off. I am guessing that the fields that I need to adjust if I want to manually re-order the info of the channels according to the template are meg_data.label and meg_data.trial Do you see anything else that would need to be adjusted ? Best, Fred -- FR ----- Original Message ----- From: "Jörn M. Horschig" To: "FieldTrip discussion list" Sent: Tuesday, March 10, 2015 3:16:30 PM Subject: Re: [FieldTrip] channel order changes after ft_channelrepair Hi Fred, back then when I implemented different options for channel interpolation, we decided that there is no "natural" order of channels in any sense. For MEG systems it might seem like that, because afaik there is a single acquisition software per system, which is always returning channels in the same order. However, this order is arbitrary and can be other rationales equally valid than the one used by the acquisition software. For your specific case, I imagine that a sensor is broken and thus turned off: it will not be in the list of channels anymore. FieldTrip does not know where the 'natural' position of that channel is, as FT is not maintaining fixed channel lists. But this shouldn't be a problem anyhow, as channel labels can be easily matched. If I recall the latest developments correctly, by now all FieldTrip functions are taking care of the channel order - even when computing leadfields ;) If you do not like this due to aesthetical reasons or because you want to have the channel order being consistent across subjects, you can simply reorder them manually. As said, FieldTrip does not care about the order. Just be sure that if you are reordering the label-field, you also need to reorder the channel dimension(s) of all data. If you encounter any problems with this concatenation, feel free send out notification. Best, Jörn PS: if the channel is already in your data and you want to just repair it because it suffers from a lot of artifacts, you could try using cfg.badchannel instead of cfg.missingchannel. If I recall correctly, missing channels are always concatenated, bad channels are kept in order if already present. But it's been a while, so I am not sure and right now, too lazy to check the code ;) -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Frédéric Roux > Sent: Tuesday, March 10, 2015 3:05 PM > To: FieldTrip discussion list > Subject: [FieldTrip] channel order changes after ft_channelrepair > > Dear all, > > I just noted that after calling ft_channelrepair the order of channel labels in > my Neuromag 306 data has changed. > > The code I am using is as follows (fieldtrip-20150115): > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % get the labels from the reference layout cfg = []; cfg.layout = > 'neuromag306planar.lay'; > > [ref_lay] = ft_prepare_layout(cfg); > > % eliminate COMNT and SCALE labels > ref_lay.label = ref_lay.label(1:204); > > % get the labels of channels present in the data orig_label = meg_data.label; > > % compare labels from reference layout with original data idx = > zeros(length(ref_lay.label),1); for it = 1:length(ref_lay.label) > idx(it) = any(strcmp(ref_lay.label(it),orig_label)); > end; > > % load the template neighbourhood structure from fieldtrip > load('neuromag306planar_neighb.mat'); > > cfg = []; > cfg.neighbours = neighbours; > cfg.missingchannel = find(idx==0); > cfg.method = 'spline'; > > [meg_data] = ft_channelrepair(cfg,meg_data); > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > When I then look at meg_data.label I can see that the missing channels were > added at the end of the channel label list instead of being integrated in the > list at the position where they would be found in the channel list of the > template layout. > > For instance > > meg_data.label(end) = 'MEG1133'; > > and > > ref_lay.label(end) = 'MEG2643'; > > > Does anyone know why this happens and how this can be avoided or > compensated? I am guessing that later on in the analysis pipeline this can > become problematic as the mapping between the new labels and the spatial > coordinates does not correspond anymore. > > Any help or suggestions would be highly appreciated! > > Thanks, > Fred > > -- > Frédéric Roux > Postdoctoral Scientist > f.roux at bcbl.eu > Tel: +34 943 309 300 Ext 211 > Fax: +34 943 309 052 > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > --------------------------------------------------------------------------- > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jorn at artinis.com Tue Mar 10 16:04:25 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Tue, 10 Mar 2015 16:04:25 +0100 Subject: [FieldTrip] channel order changes after ft_channelrepair In-Reply-To: <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> Message-ID: <003101d05b43$801dd6c0$80598440$@artinis.com> Hi Fred, yes, immediately after preprocessing it should be only those two fields. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Frédéric Roux > Sent: Tuesday, March 10, 2015 3:37 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] channel order changes after ft_channelrepair > > Dear Joern, > > thanks for the quick and very helpful reply. > > My goal is indeed to keep the channel order consistent across different > participants. > > After MF-preprocessing some of the channels are missing in certain > participants but this is not consistent so I would like to interpolate the missing > channels for those participants for which the channels were turned off. > > I am guessing that the fields that I need to adjust if I want to manually re- > order the info of the channels according to the template are > > meg_data.label > and > meg_data.trial > > Do you see anything else that would need to be adjusted ? > > Best, > Fred > > -- > FR > > ----- Original Message ----- > From: "Jörn M. Horschig" > To: "FieldTrip discussion list" > Sent: Tuesday, March 10, 2015 3:16:30 PM > Subject: Re: [FieldTrip] channel order changes after ft_channelrepair > > Hi Fred, > > back then when I implemented different options for channel interpolation, > we decided that there is no "natural" order of channels in any sense. For > MEG systems it might seem like that, because afaik there is a single > acquisition software per system, which is always returning channels in the > same order. However, this order is arbitrary and can be other rationales > equally valid than the one used by the acquisition software. > > For your specific case, I imagine that a sensor is broken and thus turned off: it > will not be in the list of channels anymore. FieldTrip does not know where > the 'natural' position of that channel is, as FT is not maintaining fixed channel > lists. But this shouldn't be a problem anyhow, as channel labels can be easily > matched. If I recall the latest developments correctly, by now all FieldTrip > functions are taking care of the channel order - even when computing > leadfields ;) > > If you do not like this due to aesthetical reasons or because you want to have > the channel order being consistent across subjects, you can simply reorder > them manually. As said, FieldTrip does not care about the order. Just be sure > that if you are reordering the label-field, you also need to reorder the > channel dimension(s) of all data. > > If you encounter any problems with this concatenation, feel free send out > notification. > > Best, > Jörn > > PS: if the channel is already in your data and you want to just repair it > because it suffers from a lot of artifacts, you could try using cfg.badchannel > instead of cfg.missingchannel. If I recall correctly, missing channels are always > concatenated, bad channels are kept in order if already present. But it's been > a while, so I am not sure and right now, too lazy to check the code ;) > > -- > > Jörn M. Horschig, Software Engineer > Artinis Medical Systems | +31 481 350 980 > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > > bounces at science.ru.nl] On Behalf Of Frédéric Roux > > Sent: Tuesday, March 10, 2015 3:05 PM > > To: FieldTrip discussion list > > Subject: [FieldTrip] channel order changes after ft_channelrepair > > > > Dear all, > > > > I just noted that after calling ft_channelrepair the order of channel > > labels in my Neuromag 306 data has changed. > > > > The code I am using is as follows (fieldtrip-20150115): > > > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > % get the labels from the reference layout cfg = []; cfg.layout = > > 'neuromag306planar.lay'; > > > > [ref_lay] = ft_prepare_layout(cfg); > > > > % eliminate COMNT and SCALE labels > > ref_lay.label = ref_lay.label(1:204); > > > > % get the labels of channels present in the data orig_label = > > meg_data.label; > > > > % compare labels from reference layout with original data idx = > > zeros(length(ref_lay.label),1); for it = 1:length(ref_lay.label) > > idx(it) = any(strcmp(ref_lay.label(it),orig_label)); > > end; > > > > % load the template neighbourhood structure from fieldtrip > > load('neuromag306planar_neighb.mat'); > > > > cfg = []; > > cfg.neighbours = neighbours; > > cfg.missingchannel = find(idx==0); > > cfg.method = 'spline'; > > > > [meg_data] = ft_channelrepair(cfg,meg_data); > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > When I then look at meg_data.label I can see that the missing channels > > were added at the end of the channel label list instead of being > > integrated in the list at the position where they would be found in > > the channel list of the template layout. > > > > For instance > > > > meg_data.label(end) = 'MEG1133'; > > > > and > > > > ref_lay.label(end) = 'MEG2643'; > > > > > > Does anyone know why this happens and how this can be avoided or > > compensated? I am guessing that later on in the analysis pipeline this > > can become problematic as the mapping between the new labels and the > > spatial coordinates does not correspond anymore. > > > > Any help or suggestions would be highly appreciated! > > > > Thanks, > > Fred > > > > -- > > Frédéric Roux > > Postdoctoral Scientist > > f.roux at bcbl.eu > > Tel: +34 943 309 300 Ext 211 > > Fax: +34 943 309 052 > > > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > > ---------------------------------------------------------------------- > > ----- > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From michelic72 at gmail.com Tue Mar 10 17:23:26 2015 From: michelic72 at gmail.com (Cristiano Micheli) Date: Tue, 10 Mar 2015 17:23:26 +0100 Subject: [FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline' In-Reply-To: <54FD1A71.3070508@gmail.com> References: <54FD1A71.3070508@gmail.com> Message-ID: Dear Vitoria, how are you? The problem seems to lie in the definition of the sensors (first error message, which is encapsulated by the subsequent ones). What I noticed (but I fear I can't be more precise due to lack of information) is that you use two cfg definitions (cfg and cfgn) and that might create problems. On top of that I would always clean the actual cfg by nulling it at the beginning of every function call (cfg=[]). This avoids to carry around incompatible fields in sequential calls of different functions (which also require different cfg options). It would also help a lot if you included the call to ft_freqanalysis (again with an eye of regard of nulling the cfg beforehand). I hope this helps! Greetings from Oldenburg Cris On Mon, Mar 9, 2015 at 4:58 AM, Vitória Piai wrote: > Hi all, > > I'm interested in using Laplacian transformation prior to computing TFRs. > I still haven't read anything about the three methods implemented in > FieldTrip, I must confess, but I think my question is independent of that. > I'm using FT version: fieldtrip-20140801 on Matlab2014a. > > If I use the method 'spline', I can subsequently run ft_freqanalysis (or > ft_timelockanalysis for that matter). However, with either 'hjorth' or > 'finite', I get an error when running ft_freqanalysis/ft_timelockanalysis: > My cfg: > > cfgn.method = 'template'; > cfgn.layout = 'biosemi64.lay'; > cfg.neighbours = ft_prepare_neighbours(cfgn, dat); > > cfg.method = 'hjorth'; %'finite', 'spline' > cfg.elec = ft_read_sens('standard_1005.elc'); > lpc = ft_scalpcurrentdensity(cfg, dat); > % Then after that, a commonly used cfg for ft_freqanalysis > > Error using ft_datatype_sens (line 375) > inconsistent number of channels in sensor description > > Error in ft_datatype_raw (line 138) > data.elec = ft_datatype_sens(data.elec); > > Error in ft_checkdata (line 219) > data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); > > Error in ft_freqanalysis (line 211) > data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, > 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); > > I understand that the "inconsistent number of channels in sensor > description" is coming from these two other implementations, but should > that be the case? The help on ft_scalpcurrentdensity says " The output data > has the same format as the input and can be used in combination with most > other FieldTrip functions". So I'm wondering whether there's something > special intrinsic to these implementations, I'm using a too old FT version, > my config isn't right, or this is an issue that has gone unnoticed because > those implementations are not used often. > > Thanks a lot! > Cheers from Berkeley, > Vitoria > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Tue Mar 10 20:56:55 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Tue, 10 Mar 2015 12:56:55 -0700 Subject: [FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline' In-Reply-To: References: <54FD1A71.3070508@gmail.com> Message-ID: <54FF4C87.5030402@gmail.com> Thank you, Cris. > What I noticed (but I fear I can't be more precise due to lack of > information) is that you use two cfg definitions (cfg and cfgn) and > that might create problems. One of them (cfgn) is only being used to define neighbours, so I don't think that matters. > On top of that I would always clean the actual cfg by nulling it at > the beginning of every function call (cfg=[]). I always do this, only didn't paste that part of my code to have it occupying less space. So that isn't the problem either. > It would also help a lot if you included the call to ft_freqanalysis > (again with an eye of regard of nulling the cfg beforehand). I doubt it's the cfg in ft_freqanalysis that is causing the problem - it's the same cfg I've been using for 5 years now, and in line with the one shown in the tutorial. So unfortunately, not the solution either. The key is in the computation of the scd depending on the method. The error only occurs with 'hjorth' and 'finite', but not with 'spline'. Maybe I should just read more on these three methods before I try to advance any further. Thanks anyways, Vitoria > On Mon, Mar 9, 2015 at 4:58 AM, Vitória Piai > > wrote: > > Hi all, > > I'm interested in using Laplacian transformation prior to > computing TFRs. > I still haven't read anything about the three methods implemented > in FieldTrip, I must confess, but I think my question is > independent of that. I'm using FT version: fieldtrip-20140801 on > Matlab2014a. > > If I use the method 'spline', I can subsequently run > ft_freqanalysis (or ft_timelockanalysis for that matter). However, > with either 'hjorth' or 'finite', I get an error when running > ft_freqanalysis/ft_timelockanalysis: > My cfg: > > cfgn.method = 'template'; > cfgn.layout = 'biosemi64.lay'; > cfg.neighbours = ft_prepare_neighbours(cfgn, dat); > > cfg.method = 'hjorth'; %'finite', 'spline' > cfg.elec = ft_read_sens('standard_1005.elc'); > lpc = ft_scalpcurrentdensity(cfg, dat); > % Then after that, a commonly used cfg for ft_freqanalysis > > Error using ft_datatype_sens (line 375) > inconsistent number of channels in sensor description > > Error in ft_datatype_raw (line 138) > data.elec = ft_datatype_sens(data.elec); > > Error in ft_checkdata (line 219) > data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); > > Error in ft_freqanalysis (line 211) > data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, > 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); > > I understand that the "inconsistent number of channels in sensor > description" is coming from these two other implementations, but > should that be the case? The help on ft_scalpcurrentdensity says " > The output data has the same format as the input and can be used > in combination with most other FieldTrip functions". So I'm > wondering whether there's something special intrinsic to these > implementations, I'm using a too old FT version, my config isn't > right, or this is an issue that has gone unnoticed because those > implementations are not used often. > > Thanks a lot! > Cheers from Berkeley, > Vitoria > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Mar 10 21:47:47 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 10 Mar 2015 20:47:47 +0000 Subject: [FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline' In-Reply-To: <54FF4C87.5030402@gmail.com> References: <54FD1A71.3070508@gmail.com> <54FF4C87.5030402@gmail.com> Message-ID: <9906653C-1E7B-4EEA-907D-C3EC1EC7EC0D@fcdonders.ru.nl> Hi Vitoria, Could you first download a newer version of FieldTrip, e.g. 20150309 :-), and see if the problem is replicated with this version? I think it will persist, but it would be good to know for sure, otherwise we may be tackling problems that are not problems anymore. Note that the low level function ft_datatype_sens throws an informative error, occurring on line 375. You may want to try to do a ‘dbstop if error’ to investigate it in a bit more detail. I suspect an ‘inconsistent number of channels in the sensor description’ :-). The reason why it may fail with the ‘spline’ method, and not with the other methods is probably that the former requires a description of the electrode positions, whereas the the latter methods only need a description of the neighbours for each electrode. Best, Jan-Mathijs On Mar 10, 2015, at 8:56 PM, Vitoria Piai > wrote: Thank you, Cris. What I noticed (but I fear I can't be more precise due to lack of information) is that you use two cfg definitions (cfg and cfgn) and that might create problems. One of them (cfgn) is only being used to define neighbours, so I don't think that matters. On top of that I would always clean the actual cfg by nulling it at the beginning of every function call (cfg=[]). I always do this, only didn't paste that part of my code to have it occupying less space. So that isn't the problem either. It would also help a lot if you included the call to ft_freqanalysis (again with an eye of regard of nulling the cfg beforehand). I doubt it's the cfg in ft_freqanalysis that is causing the problem - it's the same cfg I've been using for 5 years now, and in line with the one shown in the tutorial. So unfortunately, not the solution either. The key is in the computation of the scd depending on the method. The error only occurs with 'hjorth' and 'finite', but not with 'spline'. Maybe I should just read more on these three methods before I try to advance any further. Thanks anyways, Vitoria On Mon, Mar 9, 2015 at 4:58 AM, Vitória Piai > wrote: Hi all, I'm interested in using Laplacian transformation prior to computing TFRs. I still haven't read anything about the three methods implemented in FieldTrip, I must confess, but I think my question is independent of that. I'm using FT version: fieldtrip-20140801 on Matlab2014a. If I use the method 'spline', I can subsequently run ft_freqanalysis (or ft_timelockanalysis for that matter). However, with either 'hjorth' or 'finite', I get an error when running ft_freqanalysis/ft_timelockanalysis: My cfg: cfgn.method = 'template'; cfgn.layout = 'biosemi64.lay'; cfg.neighbours = ft_prepare_neighbours(cfgn, dat); cfg.method = 'hjorth'; %'finite', 'spline' cfg.elec = ft_read_sens('standard_1005.elc'); lpc = ft_scalpcurrentdensity(cfg, dat); % Then after that, a commonly used cfg for ft_freqanalysis Error using ft_datatype_sens (line 375) inconsistent number of channels in sensor description Error in ft_datatype_raw (line 138) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 219) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_freqanalysis (line 211) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); I understand that the "inconsistent number of channels in sensor description" is coming from these two other implementations, but should that be the case? The help on ft_scalpcurrentdensity says " The output data has the same format as the input and can be used in combination with most other FieldTrip functions". So I'm wondering whether there's something special intrinsic to these implementations, I'm using a too old FT version, my config isn't right, or this is an issue that has gone unnoticed because those implementations are not used often. Thanks a lot! Cheers from Berkeley, Vitoria _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ 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 elam4hcp at gmail.com Tue Mar 10 22:54:24 2015 From: elam4hcp at gmail.com (Jennifer Elam) Date: Tue, 10 Mar 2015 16:54:24 -0500 Subject: [FieldTrip] 2015 HCP Course: Faculty, Schedule, and Flyer available now Message-ID: Faculty listings and the full schedule of covered topics are now available for the 2015 HCP Course: “Exploring the Human Connectome”, to be held June 8-12 at the Marriott Resort Waikiki Beach, in Honolulu, Hawaii, USA. This 5-day intensive course is designed for those interested in: - using data being collected and distributed by HCP - acquiring and analyzing HCP-style imaging and behavioral data at your own institution - processing your own non-HCP data using HCP pipelines and methods - learning to use Connectome Workbench tools and the CIFTI connectivity data format - learning HCP multi-modal neuroimaging analysis methods, including those that combine MEG and MRI data - positioning yourself to capitalize on HCP-style data from forthcoming large-scale projects (e.g., Lifespan HCP and Connectomes Related to Human Disease Please share with your colleagues and visit the HCP Course website to register and download a course flyer for posting. We hope to see you in Hawaii! Best, 2015 HCP Course Organizers -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Tue Mar 10 23:58:36 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Tue, 10 Mar 2015 15:58:36 -0700 Subject: [FieldTrip] ft_channelrepair only for certain trials: repaired data only contain those certain trials In-Reply-To: <003101d05b43$801dd6c0$80598440$@artinis.com> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> Message-ID: <54FF771C.70905@gmail.com> Hi all, I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 09:33:28Z) to repair bad channels. I wanted to do it only for certain trials, and when I saw the option cfg.trials, I was really happy. However, if I pass cfg.trials with a vector rather than 'all', then the function does: ft_selectdata (lines 104, 108), then from line 352 onwards, things are converted back to normal. But if the cfg contained only some trials (as I'm trying to use it for), these are not restored back, and so I'm left with a data structure that only has as many trials as my cfg had. I was just wondering whether that is the expected behaviour of ft_channelrepair and that I should restore things myself (presumably with ft_append-like functions). If so, it would be nice if the help on this function would say that... If I'm simply using a too old version, my apologies. (I should start working with github, I know!!) Thanks a lot, Vitoria From russgport at gmail.com Wed Mar 11 02:40:57 2015 From: russgport at gmail.com (russ port) Date: Tue, 10 Mar 2015 21:40:57 -0400 Subject: [FieldTrip] low rank for post MaxFilter'd data Message-ID: <7AC9465A-FC5B-45F0-8156-085180D79DA5@gmail.com> Dear Fieldtrippers I have question about post MaxFiltered data and ICA analysis. Following the excellent chain http://mailman.science.ru.nl/pipermail/fieldtrip/2013-March/006270.html I used the command rank(squeeze(data.trial{1}) * squeeze(data.trial{1})') my result is 6 (not the 60 I would normally expect out of Max Filter’d data While I am using slightly different settings than default on MaxFilter (TSSS, .9 correlation and 10 second buffer, removing of popping channels), I am not sure that this would account for the issue. Has anyone else ran into a similar problem/am I doing something that would easily account for this. As for fieldtrip, I have simply read in the data and rejected jumping or muscle artifacts. - Best, Russ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Mar 11 08:32:12 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 11 Mar 2015 08:32:12 +0100 Subject: [FieldTrip] ft_channelrepair only for certain trials: repaired data only contain those certain trials In-Reply-To: <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitoria, Yes, that is the expected behaviour of ft_channelrepair, because that is consistent with all other functions supporting a cfg.trials-option (i.e. select first, then do the work on what remains). It should be quite straightforward to do something like: cfg = []; cfg.trials = goodtrials; dat1 = ft_selectdata(cfg, data); cfg = []; ... cfg.trials = badtrials; dat2 = ft_channelrepair(cfg, data); datcmb = ft_appenddata([], dat1, dat2); to achieve what you want. Groetjes, Eelke On 10 March 2015 at 23:58, Vitoria Piai wrote: > Hi all, > > I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 > 09:33:28Z) to repair bad channels. I wanted to do it only for certain > trials, and when I saw the option cfg.trials, I was really happy. > However, if I pass cfg.trials with a vector rather than 'all', then the > function does: > ft_selectdata (lines 104, 108), > then from line 352 onwards, things are converted back to normal. > But if the cfg contained only some trials (as I'm trying to use it for), > these are not restored back, and so I'm left with a data structure that > only has as many trials as my cfg had. > > I was just wondering whether that is the expected behaviour of > ft_channelrepair and that I should restore things myself (presumably > with ft_append-like functions). If so, it would be nice if the help on > this function would say that... > If I'm simply using a too old version, my apologies. (I should start > working with github, I know!!) > > Thanks a lot, > Vitoria > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From berryv.dberg at gmail.com Wed Mar 11 10:45:07 2015 From: berryv.dberg at gmail.com (berry van den berg) Date: Wed, 11 Mar 2015 10:45:07 +0100 Subject: [FieldTrip] Pre-stimulus baseline correction for response-locked ERPs In-Reply-To: <54FEDFEB.2080904@gmail.com> References: <54FEDFEB.2080904@gmail.com> Message-ID: Dear Marijke, I dont think there is a fiedltrip function to do this but I could be wrong. There are two alternatives that you can do. First, the easy solution, which might not work for your paradigm: if I make a response locked ERP I usually ensure that only trials with an RT between 200 and 1200ms (for a lot of tasks this is a reasonable criteria - 200ms is unreasonable fast and 1200 is way too slow). You can then do a baseline correction of [-1.4-1.2], which would ensure that there is no stimulus evoked activity in your baseline period. The second solution requires looping over your trials and subtracting a custom baseline for each trial, something like this: % rts is a 1*ntrials matrix containing the rt for each trial in seconds for iTrial = 1:length(rts) % take the mean of the data for each channel prior to stimulus onset (based on rts), replicate this matrix until the size of your original data and subtract these mean values from your original epoch tmp = repmat(mean(data.trial{iTrial}(:,data.time{iTrial}<-1*rts(iTrail) & data.time{iTrial}>-1*rts(iTrail)-0.2),2),1,length(data.time{iTrial})) data.trial{iTrial} = data.trial{iTrial} - tmp; end I hope that this helps! Berry van den Berg On 10 March 2015 at 13:13, Marijke Beulen wrote: > Dear all, > > I was wondering if anyone knows how to define a stimulus-locked baseline period to correct a response-locked ERP using ft_timelockbaseline. > > So far, I've been plotting stimulus-locked ERPs and using ft_timelockbaseline with the 300ms before stimulus onset for baseline correction. I've tried other methods to do baseline correction manually, but so far, ft_timelockbaseline has given me the best results. However, now I also want to plot response-locked ERPs. To keep things comparable, I would like to use the same 300ms pre-stimulus interval for baseline correction, but my trials have different lengths. This means that after response-locking the data, the time stamp of that interval is different on every trial. Is there any way to e.g. define separate baseline windows for each trial or to give FieldTrip another (stimulus-locked) dataset to use as a baseline in ft_timelockbaseline? > > I've already searched through FieldTrip's documentation, but I haven't been able to find a solution. Any advice on how to do this would be much appreciated! > > Sincerely, > > Marijke Beulen > > -- > M.A. Beulen, MSc. > PhD student at University of Groningen, dept. Artificial Intelligence > Bernoulliborg, room 320 > Nijenborgh 9 > 9747 AG Groningen > The Netherlands > Phone: +31 50 363 6915m.a.beulen at rug.nl > > > _______________________________________________ > 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 cmuehl at gmail.com Wed Mar 11 16:39:01 2015 From: cmuehl at gmail.com (Christian Muehl) Date: Wed, 11 Mar 2015 15:39:01 +0000 Subject: [FieldTrip] Call for Papers - 4th Workshop on Affective Brain-Computer Interfaces @ ACII2015 Message-ID: <21b626aaf0b94fa0924944d11a05fd9f@EXPRD01.hosting.ru.nl> ** Call for Papers ** 4th Workshop on Affective Brain-Computer Interfaces (aBCI) Workshop at ACII 2015 (September 21-24), Xi'an, China, September 21, 2015 http://www.affective-sciences.org/aBCI2015 http://www.acii2015.org/ The goal of the aBCI workshop series is to connect researchers from the communities of affective computing, social signal processing, brain-computer interfacing, neuro-ergonomics, and neuroscience around the federating theme of affective brain computer interfaces (aBCI). Affective BCI aim at the development of human-computer interfaces able to react and adapt to users' emotions and related cognitive states as measured from neurophysiological signals. Besides the general solicitation of work toward adaptive HCI applications based on aBCI, this 4th edition of the workshop will focus on two specific aspects of aBCI. Firstly, we welcome papers on ways to alleviate current aBCI limitations, through work on the physiological basis of aBCI, innovative applications resilient to classification error, and methods to increase the robustness of aBCI. Secondly, we would like to explore the social aspects and applications of aBCI by welcoming submissions on topics such as multi-user aBCI and the assessment of social processes from brain signals. The workshop topics include, but are not limited to, * effective emotion elicitation and data collection in social settings; * identification of robust and specific markers of emotional, cognitive and social processes; * methods for the assessment of emotions, cognitive states and social interactions; * methods to measure and process multiple people physiological activity; * applications of central and peripheral signal processing to social situations; * innovative concepts for adaptive interfaces and affective BCI; * demos of affective BCI systems. Submission Instructions: * The papers should feature original empirical work, theoretical work, or a well defendable but arguable position of the authors. * Papers will be published electronically in the proceedings of ACII 2015 by IEEE Xplore. Papers should be limited to 6 pages+1page references. The review is double blind - please remove all author information from the manuscripts. * Further details about the submission instructions and format can be found on the website of ACII 2015. Important Dates: June 5, 2015: Submission of manuscripts July 3, 2015: Acceptance/Rejection notification July 24, 2015: Submission of camera-ready papers September 21, 2015: Date of the Workshop For further information, see our website or contact abci at ewi.utwente.nl Programme Chairs: * Fabien Lotte, Inria Sud-Ouest, Bordeaux, France * Guilliaume Chanel, Swiss Center for Affective Sciences, Geneva, Switzerland * Christian Mühl, German Aerospace Center, Cologne, Germany * Anton Nijholt, Universiteit Twente, the Netherlands Programme Committee: Egon L. van den Broek, University of Utrecht, the Netherlands Anne-Marie Brouwer, TNO Perceptual and Cognitive Systems, Soesterberg, the Netherlands Stephen Dunne, Starlab Barcelona, Spain Touradj Ebrahimi, École polytechnique fédérale de Lausanne, Switzerland Stephen Fairclough, John Moores University, Liverpool, UK Tiago H. Falk, Institut National de la Recherche Scientifique (INRS), Montreal, Canada Hayrettin Gürkök, University of Twente, Enschede, the Netherlands Dominic Heger, Karlsruhe Institute of Technology, Germany Klaas Ihme, German Aerospace Center, Brunswick, Germany Jonghwa Kim, University of Augsburg, Germany Brent Lance, Army Research Laboratory/TNB, Aberdeen Proving Ground, USA, Grace Leslie, MIT Media Lab, Boston, USA Giulia Liberati, Université catholique de Louvain, Belgium Gary Garcia Molina, Philips Research North America, Briarcliff, USA Scott Makeig, University of California San Diego, USA Tim Mullen, University of California San Diego, USA Domen Novak, University of Wyoming, Laramie, USA Ioannis Patras, Queen Mary University, London, UK Evan Peck, Bucknell University, Lewisburg, USA Mannes Poel, University of Twente, Enschede, the Netherlands Thierry Pun, University of Geneva, Switzerland Erin Solovey, Drexel University, Philadelphia, USA Mohammad Soleymani, University of Geneva, Switzerland Aureli Soria-Frisch, Starlab Barcelona, Spain Olga Sourina, NanYang Technological University, Singapore Aleksander Valjamae, Linköping University, Sweden Jan van Erp, University of Twente, Enschede, the Netherlands Chi Thanh Vi, University of Bristol, UK Thorsten Zander, Technische Universität Berlin, Germany From emr37 at cam.ac.uk Thu Mar 12 09:42:45 2015 From: emr37 at cam.ac.uk (Emily Ruzich) Date: Thu, 12 Mar 2015 08:42:45 +0000 Subject: [FieldTrip] Creative use of ft_multiplotER? Message-ID: Hi All, PhD student and first-time fieldtripper here. I have a question about plotting grand averages using multiplot. I've done a bit of a cheat (I think), as I'm actually interested in measures of complexity, and so for each of my subjects I've taken the timecourse data for a 60-second interval and performed an MSE calculation before overwriting the data.time and data.trial matrices. These plot just fine using: cfg = []; cfg.layout = 'biosemi64.lay'; figure(1); clf; ft_multiplotER(cfg, data); But I'm running into trouble when I try to perform some group comparisons. I'm able to average across subjects (using the standard matlab mean function; I've tried timelockgrandaverage and timelockanalysis, but I think as this isn't actually timelock data, I get errors), and I am able to plot one group average using the same code as above, but when I try overlaying an additional group to the plotting function, I get the following error: ft_multiplotER(cfg, data, data2); Error using horzcat Dimensions of matrices being concatenated are not consistent. Error in ft_multiplotER (line 516) xmin = min([xmin varargin{i}.(xparam)]); This is the case even when the two "data" inputs are identical (eg: ft_multiplotER(cfg, data2, data2)). I've also tried using "hold on" but haven't had success with this either. I would very much appreciate it if you could please let me know if what I am trying to accomplish is even possible using ft (or at least, that it is not strongly discouraged) - I hope this question is not overly trivial! Please let me know if there is any additional information I can provide. Thank you very much for your time. Best, Emily --- Emily M Ruzich PhD Candidate Department of Psychiatry University of Cambridge Douglas House 18b Trumpington Rd Cambridge CB2 8AH Tel: 01223 746 123 Mobile: 07761 010 091 Email: emr37 at cam.ac.uk | emily.ruzich at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From yanina.prystauka at studenti.unitn.it Fri Mar 13 04:44:16 2015 From: yanina.prystauka at studenti.unitn.it (Yanina Prystauka) Date: Fri, 13 Mar 2015 04:44:16 +0100 Subject: [FieldTrip] ft_artifact_threshold Message-ID: Dear all, I would like to automatically remove trials in which the min or max of the signal exceeds 100 uv/T. So I am planning to use the ft_artifact_threshold on the preprocessed data. After running the following code cfg = []; cfg.continuous = 'no'; cfg.trl = 'dataRejBrows.sampleinfo'; * %I am not sure how to specify the cfg.trl since I already have the epochs I am interested in; someone on the mailing list has suggested earlier to use the .sampleinfo parameter.* cfg.artfctdef.threshold.min = -100; cfg.artfctdef.threshold.max = 100; [cfg, artifact] = ft_artifact_threshold(cfg, dataRejBrows); I get the following error message: Index exceeds matrix dimensions. Error in ft_artifact_threshold (line 149) dat = ft_fetch_data(data, 'header', hdr, 'begsample', cfg.trl(trlop,1), 'endsample', cfg.trl(trlop,2), 'chanindx', channelindx, 'checkboundary', strcmp(cfg.continuous, 'no')); Error in reject_artifacts (line 59) [cfg, withinhundred] = ft_artifact_threshold(cfg, dataAllRight); I will appreciate any suggestions on how to proceed with this function! Kind regards, Yanina -------------- next part -------------- An HTML attachment was scrubbed... URL: From christophe.grova at mcgill.ca Fri Mar 13 14:25:52 2015 From: christophe.grova at mcgill.ca (Christophe Grova) Date: Fri, 13 Mar 2015 13:25:52 +0000 Subject: [FieldTrip] Call For Papers: Special issue: Simulation and Validation in Brain Image Analysis to appear in Computational Intelligence and Neuroscience Message-ID: <9E1647EDA3EBB44AADA162CEC4C4222E750DBE80@exmbx2010-9.campus.MCGILL.CA> Call for papers Special issue: Simulation and Validation in Brain Image Analysis to appear in Computational Intelligence and Neuroscience http://www.hindawi.com/journals/cin/si/980531/cfp/ Manuscript Due Friday, 10 July 2015 First Round of Reviews Friday, 2 October 2015 Publication Date Friday, 27 November 2015 This special issue seeks to solicit original research articles as well as review articles on the development of advanced validation methodologies for brain imaging (fMRI, MRI, EEG, MEG, and PET) as well as the applications of such methodologies to evaluate data analysis algorithms. It also covers image databases for method validation purposes and computational (neuroinformatics) aspects of the method validation. Potential topics include, but are not limited to: * Brain image simulation in PET, EEG, MEG, fMRI, and MRI * Modeling ground-truth in image simulation and the development of valid and realistic simulation models * Methodologies for method validation in brain imaging (not necessarily to be simulation-based) * Databases for method validation (with a demonstration of their potential usage) * Validation studies of data analysis methods in brain imaging * Studies demonstrating the value of quantitative validation in brain imaging Authors can submit their manuscripts via the Manuscript Tracking System at http://mts.hindawi.com/submit/journals/cin/vabi/. Lead Guest Editor * Jussi Tohka, Universidad Carlos III de Madrid, Spain; Tampere University of Technology, Tampere, Finland Guest Editors * Pierre L. Bellec, Universite de Montreal, Montreal, Canada * Christophe Grova, Concordia University, Montreal, Canada * Anthonin Reilhac, CERMEP, Bron, France *************************** Christophe Grova, PhD Assistant Professor, Physics Dpt, Concordia University PERFORM centre, Concordia University Adjunct Prof in Biomedical Engineering, and Neurology and Neurosurgery Dpt, McGill University Multimodal Functional Imaging Lab (Multi FunkIm) Montreal Neurological Institute - epilepsy group Centre de Recherches en Mathématiques Physics Dpt Concordia University - Loyola Campus - Office SP 365.12 7141 Sherbrooke Street West, Montreal, QC H4B 1R6 Phone: (514) 848-2424 ext.4221 Biomedical Engineering Department McGill University - Room 304 3775 University Street, Montreal, Quebec, Canada, H3A 2B4 Phone : (514) 398 2516 Fax : (514) 398 7461 email : christophe.grova at concordia.ca , christophe.grova at mcgill.ca web: Physics, Concordia University: http://physics.concordia.ca/facultyandresearch/bios/grova.php McGill University: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/PeopleChristophe MultiFunkIm Lab: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/HomePage *************************** [X] -------------- next part -------------- An HTML attachment was scrubbed... URL: From emr37 at cam.ac.uk Fri Mar 13 14:27:14 2015 From: emr37 at cam.ac.uk (Emily Ruzich) Date: Fri, 13 Mar 2015 13:27:14 +0000 Subject: [FieldTrip] question about using ft_multiplot for my own needs Message-ID: <4bc220415d904cd98d5242bb66eb4d95@EXPRD01.hosting.ru.nl> Hello, Apologies, I've just come across a question you asked to the FieldTrip list several years ago and was wondering if you ever got a solution to customisation of multiplot? Thanks! Best, Emily --- Emily M Ruzich PhD Candidate Department of Psychiatry University of Cambridge Douglas House 18b Trumpington Rd Cambridge CB2 8AH Tel: 01223 746 123 Mobile: 07761 010 091 Email: emr37 at cam.ac.uk | emily.ruzich at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Fri Mar 13 16:35:05 2015 From: v.piai.research at gmail.com (=?windows-1252?Q?Vit=F3ria_Piai?=) Date: Fri, 13 Mar 2015 08:35:05 -0700 Subject: [FieldTrip] ft_channelrepair only for certain trials: repaired data only contain those certain trials In-Reply-To: References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> Message-ID: <550303A9.5070705@gmail.com> Thanks, Eelke! I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. Thanks a lot, Hope all is well in Nijmegen!! On 3/11/2015 12:32 AM, Eelke Spaak wrote: > Hi Vitoria, > > Yes, that is the expected behaviour of ft_channelrepair, because that > is consistent with all other functions supporting a cfg.trials-option > (i.e. select first, then do the work on what remains). > > It should be quite straightforward to do something like: > > cfg = []; > cfg.trials = goodtrials; > dat1 = ft_selectdata(cfg, data); > > cfg = []; > ... > cfg.trials = badtrials; > dat2 = ft_channelrepair(cfg, data); > > datcmb = ft_appenddata([], dat1, dat2); > > to achieve what you want. > > Groetjes, > Eelke > > On 10 March 2015 at 23:58, Vitoria Piai wrote: >> Hi all, >> >> I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 >> 09:33:28Z) to repair bad channels. I wanted to do it only for certain >> trials, and when I saw the option cfg.trials, I was really happy. >> However, if I pass cfg.trials with a vector rather than 'all', then the >> function does: >> ft_selectdata (lines 104, 108), >> then from line 352 onwards, things are converted back to normal. >> But if the cfg contained only some trials (as I'm trying to use it for), >> these are not restored back, and so I'm left with a data structure that >> only has as many trials as my cfg had. >> >> I was just wondering whether that is the expected behaviour of >> ft_channelrepair and that I should restore things myself (presumably >> with ft_append-like functions). If so, it would be nice if the help on >> this function would say that... >> If I'm simply using a too old version, my apologies. (I should start >> working with github, I know!!) >> >> Thanks a lot, >> Vitoria >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From widmann at uni-leipzig.de Fri Mar 13 14:04:22 2015 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Fri, 13 Mar 2015 14:04:22 +0100 Subject: [FieldTrip] [MMN 2015] Reminder - Abstract Submission Deadline: March 31 Message-ID: <60D9B9F9-DCC2-4ECD-BF75-F4C00AA4D765@uni-leipzig.de> Dear Colleague, This is a reminder that the deadline for abstract submission and early-bird registration for the MMN 2015 is March 31. The conference, "Error Signals from the Brain - 7th Mismatch Negativity Conference (MMN 2015)", will be held at the University of Leipzig, Germany, from 8-11 September 2015. The preliminary program is now available and can be viewed in the attached flyer and on the webpage. The conference will feature experts from the field of MMN research and beyond. Three Keynote Lectures (http://event.uni-leipzig.de/mmn2015/program/keynotes.php) and 13 Symposia (http://event.uni-leipzig.de/mmn2015/program/symposia.php) will cover a broad range of topics from attention, perception, and language to computational models, clinical applications, and development. There will be two hands-on pre-conference workshops on methodological aspects of MMN research and on the visual MMN. Further it is a great opportunity to visit Leipzig - a European city which is rich in intellectual, musical, and architectural heritage. Poster abstract submission and early-bird registration will be possible until 31 March 2015 here: https://event.uni-leipzig.de/mmn2015/ We look forward to welcoming you in Leipzig for an inspiring MMN 2015 conference. Kind regards, Erich Schröger and the organization team -- Error Signals from the Brain - 7th Mismatch Negativity Conference (MMN 2015) University of Leipzig, 8-11 September 2015 Web: https://event.uni-leipzig.de/mmn2015/ Email: mmn2015 at uni-leipzig.de _______________________________________________________________________________ Important dates: Abstract Submission deadline: March 31, 2015 Early-bird Registration deadline: March 31, 2015 _______________________________________________________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: Flyer_MMN2015.pdf Type: application/pdf Size: 825090 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Fri Mar 13 17:08:35 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 13 Mar 2015 16:08:35 +0000 Subject: [FieldTrip] ft_channelrepair only for certain trials: repaired data only contain those certain trials In-Reply-To: <550303A9.5070705@gmail.com> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> <550303A9.5070705@gmail.com> Message-ID: Hi V, Note that you can use the trialinfo field in your data for bookkeeping, e.g. (assuming there is already such field in your data) data.trialinfo(:,end+1) = (1:numel(data.trial))’; cfg = []; cfg.trials = sel_to_be_repaired; cfg.etc data1 = ft_channelrepair(cfg,data); cfg = []; cfg.trials = sel_to_be_unrepaired data2 = ft_selectdata(cfg, data); data = ft_appenddata([],data1,data2); Although the order has now been changed, you’ll see that the last column of the trialinfo field still pertains to your original trial indices. JM On Mar 13, 2015, at 4:35 PM, Vitória Piai wrote: > Thanks, Eelke! > > I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. > > Thanks a lot, > Hope all is well in Nijmegen!! > > On 3/11/2015 12:32 AM, Eelke Spaak wrote: >> Hi Vitoria, >> >> Yes, that is the expected behaviour of ft_channelrepair, because that >> is consistent with all other functions supporting a cfg.trials-option >> (i.e. select first, then do the work on what remains). >> >> It should be quite straightforward to do something like: >> >> cfg = []; >> cfg.trials = goodtrials; >> dat1 = ft_selectdata(cfg, data); >> >> cfg = []; >> ... >> cfg.trials = badtrials; >> dat2 = ft_channelrepair(cfg, data); >> >> datcmb = ft_appenddata([], dat1, dat2); >> >> to achieve what you want. >> >> Groetjes, >> Eelke >> >> On 10 March 2015 at 23:58, Vitoria Piai wrote: >>> Hi all, >>> >>> I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 >>> 09:33:28Z) to repair bad channels. I wanted to do it only for certain >>> trials, and when I saw the option cfg.trials, I was really happy. >>> However, if I pass cfg.trials with a vector rather than 'all', then the >>> function does: >>> ft_selectdata (lines 104, 108), >>> then from line 352 onwards, things are converted back to normal. >>> But if the cfg contained only some trials (as I'm trying to use it for), >>> these are not restored back, and so I'm left with a data structure that >>> only has as many trials as my cfg had. >>> >>> I was just wondering whether that is the expected behaviour of >>> ft_channelrepair and that I should restore things myself (presumably >>> with ft_append-like functions). If so, it would be nice if the help on >>> this function would say that... >>> If I'm simply using a too old version, my apologies. (I should start >>> working with github, I know!!) >>> >>> Thanks a lot, >>> Vitoria >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From vahidgerami.mse at gmail.com Sun Mar 15 19:16:16 2015 From: vahidgerami.mse at gmail.com (vahid gerami) Date: Sun, 15 Mar 2015 21:46:16 +0330 Subject: [FieldTrip] ERP extraction from EDF file Message-ID: hello every body. i have recorded a 12 channel eeg signals as EDF file. now i want to extract the ERP's and show them as a vector. can anybody help me doing ? any idea's? regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From elaine.astrand at mdh.se Mon Mar 16 08:56:09 2015 From: elaine.astrand at mdh.se (=?iso-8859-1?Q?Elaine_=C5strand?=) Date: Mon, 16 Mar 2015 07:56:09 +0000 Subject: [FieldTrip] Problem with retrieving the data and events in fieldtrip RDA interface of Brainvision recorder Message-ID: Hello all, I'm trying to stream EEG-data from Brainvision recorder software into the fieltrip buffer. While the data is transferred, the events are not transferred at all. I'm using "ft_realtime_brainampproxy.m" I noticed two things in the script: 1. Line 195 states 'Should I apply the calibration here?' What does this mean? Does this create a problem in retrieving the data? The data in the field trip buffer does not have the same range as in the recorder software. 2. Line 198-200. Here the events are not stored in the event-structure. So this is why the events are not transferred. Has anyone noticed the same problem? How did you implement the event structure? Thanks in advance. Kind regards, Elaine Åstrand, PhD Postdoc at University of Mälardalen Västerås, Sweden -------------- next part -------------- An HTML attachment was scrubbed... URL: From zsoltturi at gmail.com Mon Mar 16 10:08:53 2015 From: zsoltturi at gmail.com (Zsolt Turi) Date: Mon, 16 Mar 2015 10:08:53 +0100 Subject: [FieldTrip] how to add trigger values to cfg.trl Message-ID: Dear Fieldtrippers, I use ft_defintrial function to perform triger-based trial segmentation of cnt files recorded from the ANT EEG system. In the earlier version of FieldTrip (e.g., 20140123) the resulted cfg.trl matrix has a size of n x 4, where the last column represents trigger values. In the newer version of FT (e.g., 20150310), the resulted trl matrix contains only 3 columns and the 4th column about trigger values is missing. To note but maybe it is not important but I do not use the most recent version of Matlab (8.1.0.604, R2013a, student licence). Could anyone give me a hint how can I add the trigger values to the cfg.trl matrix (ie. to the 4th column)? My code is: cfg = []; cfg.dataset = '20150302_1454.cnt'; cfg.trialfun = 'ft_trialfun_general'; cfg.trialdef.prestim = 1.5; cfg.trialdef.poststim = 2.0; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'2','3'}; cfg = ft_definetrial(cfg); Many thanks in advance! Zsolt -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Mon Mar 16 12:04:13 2015 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Mon, 16 Mar 2015 11:04:13 +0000 Subject: [FieldTrip] Fwd: [SPM] SPM course for MEG/EEG in London: May 11-13 In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Bernadette van Wijk Date: Sat, Mar 14, 2015 at 3:10 PM Subject: [SPM] SPM course for MEG/EEG in London: May 11-13 To: SPM at jiscmail.ac.uk Dear all, We are pleased to announce that our annual *SPM course for MEG/EEG* will take place this year from *Monday May 11* to *Wednesday May 13 2015*. Hosted by University College London, the course will be held at Queen Square, a very central location in London (UK). The course will present instruction on the analysis of MEG and EEG data. The first two days will combine theoretical presentations with practical demonstrations of the different data analysis methods implemented in SPM. On the last day participants will have the opportunity to work on SPM tutorial data sets under the supervision of the course faculty. We also invite students to bring their own data for analysis. The course is suitable for both beginners and more advanced users. The topics that will be covered range from pre-processing and statistical analysis to source localization and dynamic causal modelling. The program is listed below. Registration is now open. We offer a reduced rate when attending both the MEG/EEG course and the fMRI course during the second half of the week. For full details of both courses see 'Statistical Parametric Mapping short courses' at http://www.ucl.ac.uk/ion/courses-viewer where you can also register. Available places are limited so please register as early as possible if you would like to attend! *Monday May 11th * 9.00 - 9.30 Registration 9.30 - 9.45 SPM introduction and resources *Guillaume Flandin* 9.45 - 10.30 What are we measuring with M/EEG? *Stefan Kiebel* 10.30 - 11.15 Data pre-processing *Holly Rossiter* *Coffee* 11.45 - 12.30 Data pre-processing - demo *Deborah Talmi, Megumi Fukuda* 12.30 - 13.15 General linear model and classical inference *Christophe Phillips* *Lunch* 14.15 - 15.00 Multiple comparisons problem and solutions *Gareth Barnes* 15.00 - 15.45 Bayesian inference *Chris Mathys* *Coffee* 16.15 - 18.00 Tutorial on group M/EEG dataset analysis *Vladimir Litvak, Jason Taylor* *Tuesday May 12th * 9.30 - 10.15 M/EEG source analysis *Saskia Helbling* 10.15 - 11.15 M/EEG source analysis - demo *Jose Lopez, Jason Taylor, Sofie Meyer* *Coffee* 11.45 - 12.30 The principles of DCM *Ryszard Auksztulewicz* 12.30 - 13.15 DCM for evoked responses *Harriet Brown* *Lunch* 14.15 - 15.00 DCM for steady state responses *Rosalyn Moran* 15.00 - 15.45 DCM for time-frequency responses *Bernadette van Wijk* 15.45 - 16.30 DCM - demo *Andre Marreiros, Martin Dietz * *Coffee* 17.00 - 17.45 Bayesian model selection and averaging *Will Penny* 17.45 - 18.45 Clinic - Questions & Answers session *Karl Friston* 19.00 onwards - Social Event *Wednesday May 13th* 9.30 – 17.00 Practical hands-on session in UCL computer class rooms. Participants can either work on SPM tutorial datasets or on their own data with the help of the faculty. There will also be an opportunity to ask questions in small tutorial groups for further discussions on the topics of the lectures. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivano_triggiani at yahoo.it Mon Mar 16 17:07:31 2015 From: ivano_triggiani at yahoo.it (Ivano Triggiani) Date: Mon, 16 Mar 2015 16:07:31 +0000 (UTC) Subject: [FieldTrip] ERP extraction from EDF file In-Reply-To: References: Message-ID: <528586820.779615.1426522051894.JavaMail.yahoo@mail.yahoo.com> Dear Vahid we need more details. First, are that channels triggered? In this case, the trigger is another channel (with a square wave, or sinilar?). In that case you need, for instance, a personal function to segment the data into epoches. I can help you to write such a function, but I need information about the trigger.On the other hand, to export the ERP, maybe you will need another function to identify latency and amplitude, but this is a later step. Ivano ------------------------------------------------------------------------ "No man can wear one face to himself and another to the multitude, without finally getting bewildered as to which one is true." Nathaniel Hawthorne Il Lunedì 16 Marzo 2015 12:09, "fieldtrip-request at science.ru.nl" ha scritto: Send fieldtrip mailing list submissions to     fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit     http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to     fieldtrip-request at science.ru.nl You can reach the person managing the list at     fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics:   1. ERP extraction from EDF file (vahid gerami)   2. Problem with retrieving the data and events in fieldtrip RDA       interface of Brainvision recorder (Elaine ?strand)   3. how to add trigger values to cfg.trl (Zsolt Turi) ---------------------------------------------------------------------- Message: 1 Date: Sun, 15 Mar 2015 21:46:16 +0330 From: vahid gerami To: fieldtrip at science.ru.nl Subject: [FieldTrip] ERP extraction from EDF file Message-ID:     Content-Type: text/plain; charset="utf-8" hello every body. i have recorded a 12 channel eeg signals as EDF file. now i want to extract the ERP's and show them as a vector. can anybody help me doing ? any idea's? regards -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Mon, 16 Mar 2015 07:56:09 +0000 From: Elaine ?strand To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] Problem with retrieving the data and events in     fieldtrip RDA interface of Brainvision recorder Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hello all, I'm trying to stream EEG-data from Brainvision recorder software into the fieltrip buffer. While the data is transferred, the events are not transferred at all. I'm using "ft_realtime_brainampproxy.m" I noticed two things in the script: 1. Line 195 states 'Should I apply the calibration here?' What does this mean? Does this create a problem in retrieving the data? The data in the field trip buffer does not have the same range as in the recorder software. 2. Line 198-200. Here the events are not stored in the event-structure. So this is why the events are not transferred. Has anyone noticed the same problem? How did you implement the event structure? Thanks in advance. Kind regards, Elaine ?strand, PhD Postdoc at University of M?lardalen V?ster?s, Sweden -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Mon, 16 Mar 2015 10:08:53 +0100 From: Zsolt Turi To: fieldtrip at science.ru.nl Subject: [FieldTrip] how to add trigger values to cfg.trl Message-ID:     Content-Type: text/plain; charset="utf-8" Dear Fieldtrippers, I use ft_defintrial function to perform triger-based trial segmentation of cnt files recorded from the ANT EEG system. In the earlier version of FieldTrip (e.g., 20140123) the resulted cfg.trl matrix has a size of n x 4, where the last column represents trigger values. In the newer version of FT (e.g., 20150310), the resulted trl matrix contains only 3 columns and the 4th column about trigger values is missing. To note but maybe it is not important but I do not use the most recent version of Matlab (8.1.0.604, R2013a, student licence). Could anyone give me a hint how can I add the trigger values to the cfg.trl matrix (ie. to the 4th column)? My code is: cfg                                  = []; cfg.dataset                      = '20150302_1454.cnt'; cfg.trialfun                      = 'ft_trialfun_general'; cfg.trialdef.prestim          = 1.5; cfg.trialdef.poststim        = 2.0; cfg.trialdef.eventtype        = 'trigger'; cfg.trialdef.eventvalue      = {'2','3'}; cfg                                  = ft_definetrial(cfg); Many thanks in advance! Zsolt -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 52, Issue 16 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Mar 17 11:15:33 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 17 Mar 2015 11:15:33 +0100 Subject: [FieldTrip] website, ftp and bugzilla downtime Message-ID: Dear FieldTrip users As part of the renovation of the Donders building, the server room will be moved to another floor. The consequence is that the servers that are running the FieldTrip wiki, ftp and bugzilla will be switched off, disconnected, moved and switched on again. The move does not only involve the server hosting our website, but also our compute cluster, the large storage system and a whole bunch of other equipment, i.e. it involves moving about ten full-height 19” racks full with computers. You can imagine this to be quite some work for our ICT team. The exact downtime is hard to predict, but the whole procedure is planned for next Monday (23 March 7:00 CET) to next Wednesday. I realize that the lack of availability of the fieldtrip wiki and ftp server is inconvenient, hence we will try to keep them up and running by temporarily migrating these services to another location (outside the Donders building). Also this might come with a little bit of downtime, but it should be so short that hopefully you won't notice. We will also use the move to initiate the transition to a new domain “fieldtriptoolbox.org" which better reflects the contributions of all stakeholders to the project (not only the DCCN, which once started off as the F.C. Donders centre). The old addresses will continue to work for the time being, so you can use either the old fieldtrip.fcdonders.nl or the new www.fieldtriptoolbox.org. The FTP (for releases and tutorial data) will move from ftp.fcdonders.nl to ftp.fieldtriptoolbox.org. The bugzilla.fcdonders.nl and the svn.fcdonders.nl servers will NOT be kept running and will be down for a few days. Although FTP will continue to be available on ftp.fieldtriptoolbox.org, the updating of the daily releases will not happen for a few days. In case you need the latest version, you can always get them from svn or git (see 1). Also the editing capabilities on the wiki will have to be temporarily disabled during the actual migrations, which means that there is no “edit this page option” in the menu. best regards, Robert 1) http://www.fieldtriptoolbox.org/faq/i_am_having_problems_downloading_from_the_ftp_server From drivolta81 at gmail.com Tue Mar 17 14:30:17 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 17 Mar 2015 13:30:17 +0000 Subject: [FieldTrip] Sournce - stat (beamforming) z-coordinates? Message-ID: <6d74f0aca4ea4d0da5457be7d393170f@EXPRD02.hosting.ru.nl> Dear all, I would have a quick question. How can I find out the z-coordinates of my figure as saved after running ft_sourceplot with 16 slices? See figure attached for an example where colors indicate t-values. Many thanks, Davide [Inline image 2] -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Source_stat.jpg Type: image/jpeg Size: 56842 bytes Desc: Source_stat.jpg URL: From dboratyn at u.northwestern.edu Tue Mar 17 16:41:36 2015 From: dboratyn at u.northwestern.edu (Daria Boratyn) Date: Tue, 17 Mar 2015 10:41:36 -0500 Subject: [FieldTrip] Decreased coherence at 60Hz? References: <2398393D-92D6-4BAF-8439-A4842B3A368B@u.northwestern.edu> Message-ID: Hi all, Using FieldTrip, I created bipolar montages on each hemisphere and then calculated the coherence between those. I am getting an odd result and seeing a decrease in coherence at 60Hz for some of my runs. My understanding is that 60 cycle noise should be picked up by every electrode and would therefore have high coherence values across the board. Would anyone have a suggestions as to what could be causing this? I’ve attached a screenshot of what I’m seeing. Thank you, Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: coh.tiff Type: image/tiff Size: 129298 bytes Desc: not available URL: From stan.vanpelt at donders.ru.nl Tue Mar 17 17:02:53 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Tue, 17 Mar 2015 16:02:53 +0000 Subject: [FieldTrip] Decreased coherence at 60Hz? In-Reply-To: References: <2398393D-92D6-4BAF-8439-A4842B3A368B@u.northwestern.edu> Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C178C767D@exprd02.hosting.ru.nl> Hi Daria, As far as I know, signal power influences coherence measures. So, in your case, it might be that you have relatively large power and/or SNR differences between your electrodes, that might underlie your results. You might consider using a notch filter to filter the 60 Hz signal out, or stratifying your trials to compensate for SNR differences. 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 Daria Boratyn Sent: dinsdag 17 maart 2015 16:42 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Decreased coherence at 60Hz? Hi all, Using FieldTrip, I created bipolar montages on each hemisphere and then calculated the coherence between those. I am getting an odd result and seeing a decrease in coherence at 60Hz for some of my runs. My understanding is that 60 cycle noise should be picked up by every electrode and would therefore have high coherence values across the board. Would anyone have a suggestions as to what could be causing this? I've attached a screenshot of what I'm seeing. Thank you, Daria [cid:image001.png at 01D060D4.35440D90] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 64465 bytes Desc: image001.png URL: From hgould at memphis.edu Tue Mar 17 17:45:36 2015 From: hgould at memphis.edu (Herbert J Gould (hgould)) Date: Tue, 17 Mar 2015 16:45:36 +0000 Subject: [FieldTrip] Decreased coherence at 60Hz? In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C178C767D@exprd02.hosting.ru.nl> References: <2398393D-92D6-4BAF-8439-A4842B3A368B@u.northwestern.edu> <7CCA2706D7A4DA45931A892DF3C2894C178C767D@exprd02.hosting.ru.nl> Message-ID: Using a steeply notched filter will distort your waveforms this looks like you might have had a significant impedance mismatch on several of your electrodes. Herbert jay Gould, Ph.D. School of Communication Sciences and Disorders The University of Memphis From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Pelt, S. van (Stan) Sent: Tuesday, March 17, 2015 11:03 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Decreased coherence at 60Hz? Hi Daria, As far as I know, signal power influences coherence measures. So, in your case, it might be that you have relatively large power and/or SNR differences between your electrodes, that might underlie your results. You might consider using a notch filter to filter the 60 Hz signal out, or stratifying your trials to compensate for SNR differences. 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 Daria Boratyn Sent: dinsdag 17 maart 2015 16:42 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Decreased coherence at 60Hz? Hi all, Using FieldTrip, I created bipolar montages on each hemisphere and then calculated the coherence between those. I am getting an odd result and seeing a decrease in coherence at 60Hz for some of my runs. My understanding is that 60 cycle noise should be picked up by every electrode and would therefore have high coherence values across the board. Would anyone have a suggestions as to what could be causing this? I've attached a screenshot of what I'm seeing. Thank you, Daria [cid:image001.png at 01D060A8.18FB77D0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 64465 bytes Desc: image001.png URL: From doriana.demarco at gmail.com Tue Mar 17 19:31:20 2015 From: doriana.demarco at gmail.com (Doriana De Marco) Date: Tue, 17 Mar 2015 19:31:20 +0100 Subject: [FieldTrip] source analysis on component data Message-ID: Dear community, I am new user of Fieldtrip and I'm dealing with source analysis. I have no problem with timelocked or frequency data but I want to try to do source analysis of component data after ICA computing with the component topographies (comp.topo in a comp structure). I don't have MRI for every subject and I'm using the Standard_BEM model with the coordinates of EGI template realigning the electrodes in the interactive mode. After computing the source analysis, I have trouble with interpolation. I report the partial code: %% SOURCE MODELING % create source model cfg = []; cfg.method = 'eloreta'; cfg.grid = grid; cfg.elec = ft_read_sens('GSN-HydroCel-128.sfp'); cfg.vol = template_vol; source = ft_sourceanalysis(cfg, comp); disp (source) dim: [15 18 15] pos: [4050x3 double] inside: [1x2020 double] outside: [1x2030 double] cfg: [1x1 struct] comp is the structure with components. I don't know what I have to set in cfg.parameter in ft_sourceinterpolate and successive plotting. What can be the problem? Many thanks for your help. Doriana -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.rossi76 at yahoo.it Wed Mar 18 14:31:06 2015 From: martina.rossi76 at yahoo.it (Martina Rossi) Date: Wed, 18 Mar 2015 13:31:06 +0000 (UTC) Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions Message-ID: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Dear All, I would like to get some feedback from the community about a statistical analysis problem I need to tackle with my study.I want to apply the cluster-based permutation tests on time-frequency data considering two conditions (correct vs error).Unfortunately, these two conditions have different sizes (correct >> error).Right now, I am only considering subjects having a ratio "error/correct" bigger than 1/5, yet this is only an arbitrary threshold I set.The question is the following:is there a formal way to identify a threshold by which two conditions can be realiably compared with the cluster-based permutation tests?If the cluster-based approach is not suitable in this scenario, is there any other approach you would suggest?I shall perhaps point out that I am working on EEG data recorded with a 32 channel system (impedance levels < 10 kΩ). Looking forward to hear your feedback :) Kind Regards,Martina Rossi -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Wed Mar 18 14:51:33 2015 From: joramvandriel at gmail.com (Joram van Driel) Date: Wed, 18 Mar 2015 14:51:33 +0100 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> References: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Martina, In general, I'd advice to do some kind of trial-selection procedure when comparing error versus correct trials, in order to trial-count-match the two conditions. Otherwise you run into problems considering: SNR (higher for the correct condition), and RT (errors are usually faster, resulting in a time-on-task confound). What I always do is pick from the correct condition a similar number of trials that are close to the RT distribution of the error trials (i.e. the faster correct trials). That way you solve both problems at once (and probably the cluster-based permutation test in field trip will work as well, as a bonus ;)). Best, Joram On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi wrote: > Dear All, > > I would like to get some feedback from the community about a statistical > analysis problem I need to tackle with my study. > I want to apply the cluster-based permutation tests on time-frequency data > considering two conditions (correct vs error). > Unfortunately, these two conditions have different sizes (correct >> > error). > Right now, I am only considering subjects having a ratio "error/correct" > bigger than 1/5, yet this is only an arbitrary threshold I set. > The question is the following: > is there a formal way to identify a threshold by which two conditions can > be realiably compared with the cluster-based permutation tests? > If the cluster-based approach is not suitable in this scenario, is there > any other approach you would suggest? > I shall perhaps point out that I am working on EEG data recorded with a 32 > channel system (impedance levels < 10 kΩ). > > Looking forward to hear your feedback :) > > Kind Regards, > Martina Rossi > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From noahertz6 at gmail.com Wed Mar 18 15:43:32 2015 From: noahertz6 at gmail.com (Noa Hertz) Date: Wed, 18 Mar 2015 16:43:32 +0200 Subject: [FieldTrip] No 'pow' is generated when using ft_sourcedescriptives Message-ID: Hi all, I am performing PCC beamforming on resting-state data. Up till now I was using the function ft_sourcedescriptives, and received a structure containing the field avg.pow. Recently I updated my fieldtrip version to the latest release (2015), and now no 'avg.pow is generated. I get mom, but this is a complex number. Am I doing something wrong? Is there a simple way to compute pow, like abs(mom)? If so, should I do it before or after source descriptives? Thanks in advance, Noa This is the script I’m using: %%% performs source analysis cfg = []; cfg.method='pcc'; cfg.frequency = 10; cfg.lambda = 0; cfg.vol = vol; cfg.grid = grid; cfg.feedback = 'textbar'; cfg.keepfilter='yes'; source1 = ft_sourceanalysis(cfg, freqClosed); %%% creates power value in each virtual sensor cfg = []; cfg.projectmom = 'yes'; sd_close = ft_sourcedescriptives(cfg, source1);% gives power to each VS -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Mar 18 19:20:17 2015 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 18 Mar 2015 19:20:17 +0100 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Message-ID: Dear Martina, It might help to distinguish two aspects of cluster-based statistic. 1) the statistical approuch that you will use to determine whether a time-channel-datapoint / time-frequency-channel-datapoint / time-frequency-voxel-datapoint is considered significant different between conditions. 2) the statistical approuch that you will use to determine whether *a cluster of* time-channel-datapoints / time-frequency-channel-datapoints / time-frequency-voxel-datapoints is considered significantly different between conditions. When you talk about *cluster statistics*, you probably think about the second part. But this might not be what you should initially be concerned with when thinking about e.g. different numbers of trials between conditions. Rather, consider what statistical tests you (can) use to compare your time-frequency values between conditions *(within subjects).* This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any test, for that matter. As far as my limited knowledge of statistics goes, in most simple and non-extreme cases, unequal number of trials that does not have to increase your chance of type I errors, rather that of type 2 (you'll be insensitive to differences if you don't have enough observations in one condition due to noisy estimate of means/distribution). But in any case it's a simple question to google or ask a statistician. Now, after you are happy with and confident about the between conditions statistical test, consider how the cluster statistics might help you. First of all, how does it determine whether a cluster is significantly different between conditions? There are different options, but the gist is that it takes your significant statistical numbers of step (1), adds them up when they belong to the same cluster (based on whether they are neigbourings in time/freq/space with other significant numbers), takes the maximum of these summed up clusters (there might be more than one cluster), and then compares this one value to the same taken from a*(non-parametric) monte-carlo distribution *of the null hypothesis based on permuting the values over conditions (and then calculating the maximum sum). The Maris and Oostenveld paper explains it in more detail. The reason for doing cluster-statistics is that its a smart way of dealing with multiple comparisons over many time x frequency x channels (or space). The method is blind for your decisions about how its computed for each point in time x frequency x channels (or space). I find the FieldTrip statistics functions, their configurations etc., and the way they interact confusing at times, but I hope this helps to clear it up a bit. Long story short - I think your question does not limit itself to cluster statistics and at the same time is much simpler. It's all about (1). Best wishes, Stephen There are two separate steps cluster statistics (as implemented in FieldTrip, but in general as well). On 18 March 2015 at 14:51, Joram van Driel wrote: > Hi Martina, > > In general, I'd advice to do some kind of trial-selection procedure when > comparing error versus correct trials, in order to trial-count-match the > two conditions. Otherwise you run into problems considering: SNR (higher > for the correct condition), and RT (errors are usually faster, resulting in > a time-on-task confound). What I always do is pick from the correct > condition a similar number of trials that are close to the RT distribution > of the error trials (i.e. the faster correct trials). That way you solve > both problems at once (and probably the cluster-based permutation test in > field trip will work as well, as a bonus ;)). > > Best, > Joram > > On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi > wrote: > >> Dear All, >> >> I would like to get some feedback from the community about a statistical >> analysis problem I need to tackle with my study. >> I want to apply the cluster-based permutation tests on time-frequency >> data considering two conditions (correct vs error). >> Unfortunately, these two conditions have different sizes (correct >> >> error). >> Right now, I am only considering subjects having a ratio "error/correct" >> bigger than 1/5, yet this is only an arbitrary threshold I set. >> The question is the following: >> is there a formal way to identify a threshold by which two conditions can >> be realiably compared with the cluster-based permutation tests? >> If the cluster-based approach is not suitable in this scenario, is there >> any other approach you would suggest? >> I shall perhaps point out that I am working on EEG data recorded with a >> 32 channel system (impedance levels < 10 kΩ). >> >> Looking forward to hear your feedback :) >> >> Kind Regards, >> Martina Rossi >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Joram van Driel > Postdoc @ Vrije Universiteit Amsterdam > Cognitive Psychology > > > _______________________________________________ > 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 gmail.com Wed Mar 18 19:33:39 2015 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 18 Mar 2015 19:33:39 +0100 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Message-ID: I should add that (1) is typically done *within *subjects, and (2) *over * subjects. Cheers, Stephen On 18 March 2015 at 19:20, Stephen Whitmarsh wrote: > Dear Martina, > > It might help to distinguish two aspects of cluster-based statistic. > > 1) the statistical approuch that you will use to determine whether a > time-channel-datapoint / time-frequency-channel-datapoint / > time-frequency-voxel-datapoint is considered significant different between > conditions. > 2) the statistical approuch that you will use to determine whether *a > cluster of* time-channel-datapoints / time-frequency-channel-datapoints / > time-frequency-voxel-datapoints is considered significantly different > between conditions. > > When you talk about *cluster statistics*, you probably think about the > second part. But this might not be what you should initially be concerned > with when thinking about e.g. different numbers of trials between > conditions. Rather, consider what statistical tests you (can) use to > compare your time-frequency values between conditions *(within subjects).* > This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any > test, for that matter. As far as my limited knowledge of statistics goes, > in most simple and non-extreme cases, unequal number of trials that does > not have to increase your chance of type I errors, rather that of type 2 > (you'll be insensitive to differences if you don't have enough observations > in one condition due to noisy estimate of means/distribution). But in any > case it's a simple question to google or ask a statistician. > > Now, after you are happy with and confident about the between conditions > statistical test, consider how the cluster statistics might help you. > First of all, how does it determine whether a cluster is significantly > different between conditions? There are different options, but the gist is > that it takes your significant statistical numbers of step (1), adds them > up when they belong to the same cluster (based on whether they are > neigbourings in time/freq/space with other significant numbers), takes the > maximum of these summed up clusters (there might be more than one cluster), > and then compares this one value to the same taken from a*(non-parametric) > monte-carlo distribution *of the null hypothesis based on permuting the > values over conditions (and then calculating the maximum sum). The Maris > and Oostenveld paper explains it in more detail. > > The reason for doing cluster-statistics is that its a smart way of dealing > with multiple comparisons over many time x frequency x channels (or space). > The method is blind for your decisions about how its computed for each > point in time x frequency x channels (or space). > > I find the FieldTrip statistics functions, their configurations etc., and > the way they interact confusing at times, but I hope this helps to clear it > up a bit. > > Long story short - I think your question does not limit itself to cluster > statistics and at the same time is much simpler. It's all about (1). > > Best wishes, > Stephen > > > > > > > > > > > > > > > > There are two separate steps cluster statistics (as implemented in > FieldTrip, but in general as well). > > > > > On 18 March 2015 at 14:51, Joram van Driel > wrote: > >> Hi Martina, >> >> In general, I'd advice to do some kind of trial-selection procedure when >> comparing error versus correct trials, in order to trial-count-match the >> two conditions. Otherwise you run into problems considering: SNR (higher >> for the correct condition), and RT (errors are usually faster, resulting in >> a time-on-task confound). What I always do is pick from the correct >> condition a similar number of trials that are close to the RT distribution >> of the error trials (i.e. the faster correct trials). That way you solve >> both problems at once (and probably the cluster-based permutation test in >> field trip will work as well, as a bonus ;)). >> >> Best, >> Joram >> >> On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi >> wrote: >> >>> Dear All, >>> >>> I would like to get some feedback from the community about a statistical >>> analysis problem I need to tackle with my study. >>> I want to apply the cluster-based permutation tests on time-frequency >>> data considering two conditions (correct vs error). >>> Unfortunately, these two conditions have different sizes (correct >> >>> error). >>> Right now, I am only considering subjects having a ratio "error/correct" >>> bigger than 1/5, yet this is only an arbitrary threshold I set. >>> The question is the following: >>> is there a formal way to identify a threshold by which two conditions >>> can be realiably compared with the cluster-based permutation tests? >>> If the cluster-based approach is not suitable in this scenario, is there >>> any other approach you would suggest? >>> I shall perhaps point out that I am working on EEG data recorded with a >>> 32 channel system (impedance levels < 10 kΩ). >>> >>> Looking forward to hear your feedback :) >>> >>> Kind Regards, >>> Martina Rossi >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Joram van Driel >> Postdoc @ Vrije Universiteit Amsterdam >> Cognitive Psychology >> >> >> _______________________________________________ >> 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 gmail.com Wed Mar 18 19:43:01 2015 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 18 Mar 2015 19:43:01 +0100 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Message-ID: You can also check out this video of Robert. Apologies for the quality - not of the talk, but of the recording :-) At 14:45 he actually mentions unequal number of trials between conditions. https://www.youtube.com/watch?v=vOSfabsDUNg Cheers, Stephen On 18 March 2015 at 19:33, Stephen Whitmarsh wrote: > I should add that (1) is typically done *within *subjects, and (2) *over * > subjects. > > Cheers, > Stephen > > On 18 March 2015 at 19:20, Stephen Whitmarsh > wrote: > >> Dear Martina, >> >> It might help to distinguish two aspects of cluster-based statistic. >> >> 1) the statistical approuch that you will use to determine whether a >> time-channel-datapoint / time-frequency-channel-datapoint / >> time-frequency-voxel-datapoint is considered significant different between >> conditions. >> 2) the statistical approuch that you will use to determine whether *a >> cluster of* time-channel-datapoints / time-frequency-channel-datapoints >> / time-frequency-voxel-datapoints is considered significantly different >> between conditions. >> >> When you talk about *cluster statistics*, you probably think about the >> second part. But this might not be what you should initially be concerned >> with when thinking about e.g. different numbers of trials between >> conditions. Rather, consider what statistical tests you (can) use to >> compare your time-frequency values between conditions *(within >> subjects).* This can be, e.g., a t-test, a nonparametric (e.g. >> montecarlo) test, or any test, for that matter. As far as my limited >> knowledge of statistics goes, in most simple and non-extreme cases, unequal >> number of trials that does not have to increase your chance of type I >> errors, rather that of type 2 (you'll be insensitive to differences if you >> don't have enough observations in one condition due to noisy estimate of >> means/distribution). But in any case it's a simple question to google or >> ask a statistician. >> >> Now, after you are happy with and confident about the between conditions >> statistical test, consider how the cluster statistics might help you. >> First of all, how does it determine whether a cluster is significantly >> different between conditions? There are different options, but the gist is >> that it takes your significant statistical numbers of step (1), adds them >> up when they belong to the same cluster (based on whether they are >> neigbourings in time/freq/space with other significant numbers), takes the >> maximum of these summed up clusters (there might be more than one cluster), >> and then compares this one value to the same taken from a*(non-parametric) >> monte-carlo distribution *of the null hypothesis based on permuting the >> values over conditions (and then calculating the maximum sum). The Maris >> and Oostenveld paper explains it in more detail. >> >> The reason for doing cluster-statistics is that its a smart way of >> dealing with multiple comparisons over many time x frequency x channels (or >> space). The method is blind for your decisions about how its computed for >> each point in time x frequency x channels (or space). >> >> I find the FieldTrip statistics functions, their configurations etc., and >> the way they interact confusing at times, but I hope this helps to clear it >> up a bit. >> >> Long story short - I think your question does not limit itself to cluster >> statistics and at the same time is much simpler. It's all about (1). >> >> Best wishes, >> Stephen >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> There are two separate steps cluster statistics (as implemented in >> FieldTrip, but in general as well). >> >> >> >> >> On 18 March 2015 at 14:51, Joram van Driel >> wrote: >> >>> Hi Martina, >>> >>> In general, I'd advice to do some kind of trial-selection procedure when >>> comparing error versus correct trials, in order to trial-count-match the >>> two conditions. Otherwise you run into problems considering: SNR (higher >>> for the correct condition), and RT (errors are usually faster, resulting in >>> a time-on-task confound). What I always do is pick from the correct >>> condition a similar number of trials that are close to the RT distribution >>> of the error trials (i.e. the faster correct trials). That way you solve >>> both problems at once (and probably the cluster-based permutation test in >>> field trip will work as well, as a bonus ;)). >>> >>> Best, >>> Joram >>> >>> On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi >> > wrote: >>> >>>> Dear All, >>>> >>>> I would like to get some feedback from the community about a >>>> statistical analysis problem I need to tackle with my study. >>>> I want to apply the cluster-based permutation tests on time-frequency >>>> data considering two conditions (correct vs error). >>>> Unfortunately, these two conditions have different sizes (correct >> >>>> error). >>>> Right now, I am only considering subjects having a ratio >>>> "error/correct" bigger than 1/5, yet this is only an arbitrary threshold I >>>> set. >>>> The question is the following: >>>> is there a formal way to identify a threshold by which two conditions >>>> can be realiably compared with the cluster-based permutation tests? >>>> If the cluster-based approach is not suitable in this scenario, is >>>> there any other approach you would suggest? >>>> I shall perhaps point out that I am working on EEG data recorded with a >>>> 32 channel system (impedance levels < 10 kΩ). >>>> >>>> Looking forward to hear your feedback :) >>>> >>>> Kind Regards, >>>> Martina Rossi >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> >>> -- >>> Joram van Driel >>> Postdoc @ Vrije Universiteit Amsterdam >>> Cognitive Psychology >>> >>> >>> _______________________________________________ >>> 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 mitka3 at uniba.sk Wed Mar 18 21:54:39 2015 From: mitka3 at uniba.sk (Milan Mitka) Date: Wed, 18 Mar 2015 21:54:39 +0100 Subject: [FieldTrip] =?utf-8?q?Easycap_M10_coregistration_with_head_model_?= =?utf-8?q?=E2=80=93_no_fiducials?= Message-ID: <9C6D6E44-F63A-40A1-8A19-A71D7184FFCD@uniba.sk> Greetings, I'm having difficulties with aligning easycap M10 electrodes with a head model. I'm following this tutorial: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg#align_the_electrodes The problem as I see it is that the file FieldTrip/template/electrode/easycap-M10.txt that I'm using istead of standard_1020.elc doesn't include fiducials and can therefore not be properly aligned with the head model automatically. How can I properly align M10 electrodes defined in spherical coordinates or convert MNI cartesian coordinates to the head model coordinates which appear to use CTF, please? Yours faithfully Milan Mitka -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.rossi76 at yahoo.it Thu Mar 19 09:06:47 2015 From: martina.rossi76 at yahoo.it (Martina Rossi) Date: Thu, 19 Mar 2015 08:06:47 +0000 (UTC) Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: Message-ID: <245197442.364305.1426752407463.JavaMail.yahoo@mail.yahoo.com> Dear Stephen and Joram, Thank so much for your feedback,I will check out the suggested material, Best,Martina Il Mercoledì 18 Marzo 2015 20:43, Stephen Whitmarsh ha scritto: You can also check out this video of Robert. Apologies for the quality - not of the talk, but of the recording :-) At 14:45 he actually mentions unequal number of trials between conditions. https://www.youtube.com/watch?v=vOSfabsDUNg Cheers, Stephen On 18 March 2015 at 19:33, Stephen Whitmarsh wrote: I should add that (1) is typically done within subjects, and (2) over subjects. Cheers, Stephen  On 18 March 2015 at 19:20, Stephen Whitmarsh wrote: Dear Martina, It might help to distinguish two aspects of cluster-based statistic. 1) the statistical approuch that you will use to determine whether a time-channel-datapoint / time-frequency-channel-datapoint / time-frequency-voxel-datapoint is considered significant different between conditions. 2) the statistical approuch that you will use to determine whether a cluster of time-channel-datapoints / time-frequency-channel-datapoints / time-frequency-voxel-datapoints is considered significantly different between conditions. When you talk about cluster statistics, you probably think about the second part. But this might not be what you should initially be concerned with when thinking about e.g. different numbers of trials between conditions. Rather, consider what statistical tests you (can) use to compare your time-frequency values between conditions (within subjects). This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any test, for that matter. As far as my limited knowledge of statistics goes, in most simple and non-extreme cases, unequal number of trials that does not have to increase your chance of type I errors, rather that of type 2 (you'll be insensitive to differences if you don't have enough observations in one condition due to noisy estimate of means/distribution). But in any case it's a simple question to google or ask a statistician. Now, after you are happy with and confident about the between conditions statistical test, consider how the cluster statistics might help you. First of all, how does it determine whether a cluster is significantly different between conditions? There are different options, but the gist is that it takes your significant statistical numbers of step (1), adds them up when they belong to the same cluster (based on whether they are neigbourings in time/freq/space with other significant numbers), takes the maximum of these summed up clusters (there might be more than one cluster), and then compares this one value to the same taken from a(non-parametric) monte-carlo distribution of the null hypothesis based on permuting the values over conditions (and then calculating the maximum sum). The Maris and Oostenveld paper explains it in more detail. The reason for doing cluster-statistics is that its a smart way of dealing with multiple comparisons over many time x frequency x channels (or space). The method is blind for your decisions about how its computed for each point in time x frequency x channels (or space). I find the FieldTrip statistics functions, their configurations etc., and the way they interact confusing at times, but I hope this helps to clear it up a bit. Long story short - I think your question does not limit itself to cluster statistics and at the same time is much simpler. It's all about (1).  Best wishes, Stephen There are two separate steps cluster statistics (as implemented in FieldTrip, but in general as well). On 18 March 2015 at 14:51, Joram van Driel wrote: Hi Martina, In general, I'd advice to do some kind of trial-selection procedure when comparing error versus correct trials, in order to trial-count-match the two conditions. Otherwise you run into problems considering: SNR (higher for the correct condition), and RT (errors are usually faster, resulting in a time-on-task confound). What I always do is pick from the correct condition a similar number of trials that are close to the RT distribution of the error trials (i.e. the faster correct trials). That way you solve both problems at once (and probably the cluster-based permutation test in field trip will work as well, as a bonus ;)). Best,Joram On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi wrote: Dear All, I would like to get some feedback from the community about a statistical analysis problem I need to tackle with my study.I want to apply the cluster-based permutation tests on time-frequency data considering two conditions (correct vs error).Unfortunately, these two conditions have different sizes (correct >> error).Right now, I am only considering subjects having a ratio "error/correct" bigger than 1/5, yet this is only an arbitrary threshold I set.The question is the following:is there a formal way to identify a threshold by which two conditions can be realiably compared with the cluster-based permutation tests?If the cluster-based approach is not suitable in this scenario, is there any other approach you would suggest?I shall perhaps point out that I am working on EEG data recorded with a 32 channel system (impedance levels < 10 kΩ). Looking forward to hear your feedback :) Kind Regards,Martina Rossi _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Joram van DrielPostdoc @ Vrije Universiteit AmsterdamCognitive Psychology _______________________________________________ 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.goeldi at psychologie.uzh.ch Thu Mar 19 12:34:43 2015 From: m.goeldi at psychologie.uzh.ch (m.goeldi at psychologie.uzh.ch) Date: Thu, 19 Mar 2015 12:34:43 +0100 Subject: [FieldTrip] strange leadfield for beamforming from template files Message-ID: Hi all I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. Unfortunately this is not the case. The vectors are all over the place. See figure. The red circle is the electrode location (Cz). The field looks (qualitatively) just as wrong for any other electrode. Below is the code I used to generate & visualize the lead field. I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. There the result is as expected, so I think the problem lies not in the visualization. I am using fieldtrip-20150118 I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. My question is, am I doing anything wrong in generating the lead field? Am I expecting something wrong (i.e. is this a realistidc lead field?) Does anyones lead field look the same/different when using the template files? I would appreciate any help with this problem. Thanks for your thoughts Cheers Maurice %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load mri load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') % load template sourcemodel template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); % compute source model cfg                = []; cfg.grid.warpmni   = 'yes'; cfg.grid.template  = template.sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.grid.resolution = 6; cfg.mri            = mri; sourcemodel        = ft_prepare_sourcemodel(cfg); sourcemodel = ft_convert_units(sourcemodel, 'cm'); % make head model load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); vol = ft_convert_units(vol, 'cm'); %% electrode layout elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); [elec] = removeelectrodes(elec,data.label);    % remove the electrodes that are not in my data elec = ft_convert_units(elec,'cm'); % lead field cfg                 = []; cfg.grid            = sourcemodel; cfg.elec            = elec; cfg.vol             = vol; cfg.channel         = 'all'; [grid] = ft_prepare_leadfield(cfg,freqC1); grid = ft_convert_units(grid, 'cm'); %%%% visualize leadfield %%%% channel = 'Cz'; %% electrode position elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); %% leadfield positions leadfieldpos = grid.pos(grid.inside,:); %% extract leadfield npts = numel(grid.leadfield); lead = grid.leadfield(grid.inside); nchan = find(strcmp(grid.cfg.channel,channel)); for i = 1:numel(lead)     leadVect(i,:) = lead{i}(nchan,:); end figure; hold on     % plot all objects in one figure ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); alpha 0.3 scale = 30; quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) plot3(elecpos(1),elecpos(2),elecpos(3),'ro') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Mar 19 22:18:38 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 19 Mar 2015 21:18:38 +0000 Subject: [FieldTrip] strange leadfield for beamforming from template files In-Reply-To: References: Message-ID: <47A755CA-A6B5-4B56-AD75-866D2329B4F7@fcdonders.ru.nl> Hi Maurice, The way in which you visualize the leadfield vectors it is hard to see in which locations the arrows are big. My suspicion is (unless otherwise proven) that you are suffering from numerical problems at dipole positions close to the inner boundary. Best, Jan-Mathijs On Mar 19, 2015, at 12:34 PM, m.goeldi at psychologie.uzh.ch wrote: Hi all I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. Unfortunately this is not the case. The vectors are all over the place. See figure. [X] The red circle is the electrode location (Cz). The field looks (qualitatively) just as wrong for any other electrode. Below is the code I used to generate & visualize the lead field. I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. There the result is as expected, so I think the problem lies not in the visualization. I am using fieldtrip-20150118 I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. My question is, am I doing anything wrong in generating the lead field? Am I expecting something wrong (i.e. is this a realistidc lead field?) Does anyones lead field look the same/different when using the template files? I would appreciate any help with this problem. Thanks for your thoughts Cheers Maurice %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load mri load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') % load template sourcemodel template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); % compute source model cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template.sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.grid.resolution = 6; cfg.mri = mri; sourcemodel = ft_prepare_sourcemodel(cfg); sourcemodel = ft_convert_units(sourcemodel, 'cm'); % make head model load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); vol = ft_convert_units(vol, 'cm'); %% electrode layout elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); [elec] = removeelectrodes(elec,data.label); % remove the electrodes that are not in my data elec = ft_convert_units(elec,'cm'); % lead field cfg = []; cfg.grid = sourcemodel; cfg.elec = elec; cfg.vol = vol; cfg.channel = 'all'; [grid] = ft_prepare_leadfield(cfg,freqC1); grid = ft_convert_units(grid, 'cm'); %%%% visualize leadfield %%%% channel = 'Cz'; %% electrode position elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); %% leadfield positions leadfieldpos = grid.pos(grid.inside,:); %% extract leadfield npts = numel(grid.leadfield); lead = grid.leadfield(grid.inside); nchan = find(strcmp(grid.cfg.channel,channel)); for i = 1:numel(lead) leadVect(i,:) = lead{i}(nchan,:); end figure; hold on % plot all objects in one figure ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); alpha 0.3 scale = 30; quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) plot3(elecpos(1),elecpos(2),elecpos(3),'ro') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch _______________________________________________ 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 Fri Mar 20 10:29:40 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 20 Mar 2015 09:29:40 +0000 Subject: [FieldTrip] =?windows-1252?q?Easycap_M10_coregistration_with_head?= =?windows-1252?q?_model_=96_no_fiducials?= In-Reply-To: <9C6D6E44-F63A-40A1-8A19-A71D7184FFCD@uniba.sk> References: <9C6D6E44-F63A-40A1-8A19-A71D7184FFCD@uniba.sk> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB1892CB@exprd01.hosting.ru.nl> Dear Milan, If you have not recorded the electrode positions yourself using, for example, a Polhemus or Localite system you will always end-up with a suboptimal alignment (fiducials, or not). That being said, you can skip the step of automatic realignment in the tutorial and immediately use ft_electroderealign with cfg.method = 'interactive', to manually rotate, translate, and scale the electrode positions to make it fit as well as possible to your headmodel. Best, Jim ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Milan Mitka [mitka3 at uniba.sk] Sent: Wednesday, March 18, 2015 9:54 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Easycap M10 coregistration with head model – no fiducials Greetings, I'm having difficulties with aligning easycap M10 electrodes with a head model. I'm following this tutorial: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg#align_the_electrodes The problem as I see it is that the file FieldTrip/template/electrode/easycap-M10.txt that I'm using istead of standard_1020.elc doesn't include fiducials and can therefore not be properly aligned with the head model automatically. How can I properly align M10 electrodes defined in spherical coordinates or convert MNI cartesian coordinates to the head model coordinates which appear to use CTF, please? Yours faithfully Milan Mitka -------------- next part -------------- An HTML attachment was scrubbed... URL: From e163581 at gmail.com Fri Mar 20 10:58:26 2015 From: e163581 at gmail.com (Natalia Melnik) Date: Fri, 20 Mar 2015 11:58:26 +0200 Subject: [FieldTrip] A paper mentioned in "Non-parametric cluster-based statistical testing of MEG/EEG data" video on FieldtripTV channel Message-ID: Dear all, in the "Non-parametric cluster-based statistical testing of MEG/EEG data" video on FieldtripTV channel ((https://youtu.be/vOSfabsDUNg?t=17m34s) ), Dr. Oostenveld mentiones (at 17:38) a paper which tested some of the parameters of the statistic methods. Do you know which paper is it? Cheers, Natalia. From nick.peatfield at gmail.com Fri Mar 20 11:48:24 2015 From: nick.peatfield at gmail.com (Nicholas A. Peatfield) Date: Fri, 20 Mar 2015 11:48:24 +0100 Subject: [FieldTrip] A paper mentioned in "Non-parametric cluster-based statistical testing of MEG/EEG data" video on FieldtripTV channel In-Reply-To: References: Message-ID: Not sure if this is the one. But it seems as such: http://www.sciencedirect.com/science/article/pii/S0165027014002878 Pernet, C.R., Latinus, M. , Nichols, T.E., and Rousselet, G.A. (2014) Cluster-based computational methods for mass univariate analyses of event-related brain potentials/fields: A simulation study. *Journal of Neuroscience Methods * . (doi: 10.1016/j.jneumeth.2014.08.003 ) (Early Online Publication) On 20 March 2015 at 10:58, Natalia Melnik wrote: > Dear all, > in the "Non-parametric cluster-based statistical testing of MEG/EEG > data" video on FieldtripTV channel > ((https://youtu.be/vOSfabsDUNg?t=17m34s) ), Dr. Oostenveld mentiones > (at 17:38) a paper which tested some of the parameters of the > statistic methods. Do you know which paper is it? > > Cheers, > Natalia. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Nicholas Peatfield, PhD Centro Interdipartimentale Mente/Cervello- CIMEC Assegnista di ricerca - Research Fellow Via delle Regole, 101 - 38060 Mattarello +39 0461 283086 -------------- next part -------------- An HTML attachment was scrubbed... URL: From omerxsharon at gmail.com Fri Mar 20 12:49:11 2015 From: omerxsharon at gmail.com (Omer Sharon) Date: Fri, 20 Mar 2015 13:49:11 +0200 Subject: [FieldTrip] downsample while loading Message-ID: Hi everybody Thanks for answering, I'm reading through most of the answers here and it's very helpful. I'm having trouble with loading of single (and several) channel sampled in 1000 Hz, but for about 8 hours - I get "out of memory" (from the ft_preprocessing) Is there a way to downsample the data while loading? (before preprocessing) or alternatively to load it in several parts (in the time dimension), downsample and then concatenate. Thanks a lot Omer -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.caspar at ucl.ac.uk Fri Mar 20 13:14:07 2015 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Fri, 20 Mar 2015 12:14:07 +0000 Subject: [FieldTrip] downsample while loading In-Reply-To: References: Message-ID: <8959A2B9-139C-4BDF-A86B-A59949D9E42F@live.ucl.ac.uk> Hi Omer, Maybe this can help. It filters and epochs before downsampling. It should be faster. However, that highly depends on the computer you have. I tried this with two different computer, with exactly the same characteristics. One was almost full, the other not. It took 15 minutes for 64 electrodes on the new one, and 40 minutes on the full one. cfgp = []; cfgp.dataset = [ file.name]; cfgr = []; cfgr.resamplefs = 256; cfgr.detrend = 'yes'; %% epochs before filtering cfg1 = []; cfg1.dataset = [ file.name]; cfg1.trialdef.eventtype = 'STATUS'; cfg1.trialdef.eventvalue = [65]; cfg1.trialdef.prestim = abs(windows(1)); cfg1.trialdef.poststim = windows(2); cfg1 = ft_definetrial(cfg1); %% filtres downsampling for i=1:nchans cfg1.channel = i; cfg1.bpfilter = 'yes'; cfg1.bpfreq=[0.9 30];%filtres datp = ft_preprocessing(cfg1); singlechan{i} = ft_resampledata(cfgr, datp); clear datp end cfg = []; datall = ft_appenddata(cfg, singlechan{:}); --------------------------------------------- Emilie Caspar Aspirante FNRS - Ph.D. Student Consciousness, Cognition & Computation Group (CO3) Centre de Recherche Cognition et Neurosciences (CRCN) ULB Neurosciences Institute (UNI) Université Libre de Bruxelles Av. F.-D. Roosevelt, 50 1050 Bruxelles BELGIUM Voice : +32 2 650 32 95 mail : ecaspar at ulb.ac.be office: DB10-138 On 20 mars 2015, at 12:49, Omer Sharon > wrote: Hi everybody Thanks for answering, I'm reading through most of the answers here and it's very helpful. I'm having trouble with loading of single (and several) channel sampled in 1000 Hz, but for about 8 hours - I get "out of memory" (from the ft_preprocessing) Is there a way to downsample the data while loading? (before preprocessing) or alternatively to load it in several parts (in the time dimension), downsample and then concatenate. Thanks a lot Omer _______________________________________________ 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 andrea.brovelli at univ-amu.fr Fri Mar 20 15:14:29 2015 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Fri, 20 Mar 2015 15:14:29 +0100 (CET) Subject: [FieldTrip] Possible BUG in ft_redefinetrial using the cfg.trl option Message-ID: <1818288071.36715.1426860868961.JavaMail.root@bureau-frontal3.univ-amu.fr> Dear all, The bugzilla server seems to be down for maintenance. So I post it here. I noticed a possible bug in ft_redefinetrial: if I realign my data on a different event using the cfg.trl option, the output data is corretly aligned, BUT the output data structure contains ONLY the first trial of the input data structure, repeated for the exact number of trials. % In other words, if you do this... cfg = []; cfg.trl = trl; % N x 3 matrix = [ sample_start sample_end sample_offset ] data_out = ft_redefinetrial(cfg, data_in); % And then plot the first 3 trials for the first channel.... plot(data_out.time{1},data_out.trial{1}(1,:),'b') hold on plot(data_out.time{2},data_out.trial{2}(1,:),'r') plot(data_out.time{3},data_out.trial{3}(1,:),'k') ... you will notice that you are plotting the first trial in the original data_in but shifted in time. Could you also check please ? I used the latest version of Fieldtrip fieldtrip-20150318 Thanks Andrea From e163581 at gmail.com Fri Mar 20 17:31:17 2015 From: e163581 at gmail.com (Natalia Melnik) Date: Fri, 20 Mar 2015 18:31:17 +0200 Subject: [FieldTrip] A paper mentioned in "Non-parametric cluster-based > statistical testing of MEG/EEG data" video on FieldtripTV channel Message-ID: Yeah, it seems to be the paper! Thank you very much! Cheers, Natalia On 20 March 2015 at 13:00, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: strange leadfield for beamforming from template files > (Schoffelen, J.M. (Jan Mathijs)) > 2. Re: Easycap M10 coregistration with head model ? no fiducials > (Herring, J.D. (Jim)) > 3. A paper mentioned in "Non-parametric cluster-based > statistical testing of MEG/EEG data" video on FieldtripTV channel > (Natalia Melnik) > 4. Re: A paper mentioned in "Non-parametric cluster-based > statistical testing of MEG/EEG data" video on FieldtripTV channel > (Nicholas A. Peatfield) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 19 Mar 2015 21:18:38 +0000 > From: "Schoffelen, J.M. (Jan Mathijs)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] strange leadfield for beamforming from > template files > Message-ID: <47A755CA-A6B5-4B56-AD75-866D2329B4F7 at fcdonders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Hi Maurice, > The way in which you visualize the leadfield vectors it is hard to see in which locations the arrows are big. My suspicion is (unless otherwise proven) that you are suffering from numerical problems at dipole positions close to the inner boundary. > Best, > Jan-Mathijs > > > > On Mar 19, 2015, at 12:34 PM, m.goeldi at psychologie.uzh.ch wrote: > > > Hi all > > I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. > Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. > Unfortunately this is not the case. The vectors are all over the place. See figure. > > > [X] > The red circle is the electrode location (Cz). > The field looks (qualitatively) just as wrong for any other electrode. > > Below is the code I used to generate & visualize the lead field. > > I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. > There the result is as expected, so I think the problem lies not in the visualization. > > I am using fieldtrip-20150118 > > I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. > > My question is, am I doing anything wrong in generating the lead field? > Am I expecting something wrong (i.e. is this a realistidc lead field?) > Does anyones lead field look the same/different when using the template files? > > I would appreciate any help with this problem. > > > Thanks for your thoughts > > Cheers > Maurice > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > % load mri > load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') > > % load template sourcemodel > template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); > > % compute source model > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template.sourcemodel; > cfg.grid.nonlinear = 'yes'; % use non-linear normalization > cfg.grid.resolution = 6; > cfg.mri = mri; > sourcemodel = ft_prepare_sourcemodel(cfg); > sourcemodel = ft_convert_units(sourcemodel, 'cm'); > > % make head model > load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); > vol = ft_convert_units(vol, 'cm'); > > %% electrode layout > elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); > [elec] = removeelectrodes(elec,data.label); % remove the electrodes that are not in my data > elec = ft_convert_units(elec,'cm'); > > % lead field > cfg = []; > cfg.grid = sourcemodel; > cfg.elec = elec; > cfg.vol = vol; > cfg.channel = 'all'; > [grid] = ft_prepare_leadfield(cfg,freqC1); > grid = ft_convert_units(grid, 'cm'); > > > > %%%% visualize leadfield %%%% > channel = 'Cz'; > > %% electrode position > elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); > > %% leadfield positions > leadfieldpos = grid.pos(grid.inside,:); > > %% extract leadfield > npts = numel(grid.leadfield); > lead = grid.leadfield(grid.inside); > > nchan = find(strcmp(grid.cfg.channel,channel)); > for i = 1:numel(lead) > leadVect(i,:) = lead{i}(nchan,:); > end > > figure; hold on % plot all objects in one figure > ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); > ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); > alpha 0.3 > scale = 30; > quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) > plot3(elecpos(1),elecpos(2),elecpos(3),'ro') > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > --- > University of Z?rich > Maurice G?ldi > Department of Psychology > Biopsychology > Binzm?hlestr. 14 / Box 5 > CH - 8050 Z?rich > > Tel. +41 (0)44 635 74 55 > www.psychologie.uzh.ch > maurice.goeldi at uzh.ch > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Fri, 20 Mar 2015 09:29:40 +0000 > From: "Herring, J.D. (Jim)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Easycap M10 coregistration with head model ? > no fiducials > Message-ID: > <3D00B7615FB58D46A0B49B9AD67A33EB1892CB at exprd01.hosting.ru.nl> > Content-Type: text/plain; charset="windows-1252" > > Dear Milan, > > If you have not recorded the electrode positions yourself using, for example, a Polhemus or Localite system you will always end-up with a suboptimal alignment (fiducials, or not). > > That being said, you can skip the step of automatic realignment in the tutorial and immediately use ft_electroderealign with cfg.method = 'interactive', to manually rotate, translate, and scale the electrode positions to make it fit as well as possible to your headmodel. > > Best, > > Jim > ________________________________ > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Milan Mitka [mitka3 at uniba.sk] > Sent: Wednesday, March 18, 2015 9:54 PM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Easycap M10 coregistration with head model ? no fiducials > > Greetings, > > I'm having difficulties with aligning easycap M10 electrodes with a head model. I'm following this tutorial: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg#align_the_electrodes > > The problem as I see it is that the file FieldTrip/template/electrode/easycap-M10.txt that I'm using istead of standard_1020.elc doesn't include fiducials and can therefore not be properly aligned with the head model automatically. > > How can I properly align M10 electrodes defined in spherical coordinates or convert MNI cartesian coordinates to the head model coordinates which appear to use CTF, please? > > Yours faithfully > Milan Mitka > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 3 > Date: Fri, 20 Mar 2015 11:58:26 +0200 > From: Natalia Melnik > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] A paper mentioned in "Non-parametric > cluster-based statistical testing of MEG/EEG data" video on > FieldtripTV channel > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Dear all, > in the "Non-parametric cluster-based statistical testing of MEG/EEG > data" video on FieldtripTV channel > ((https://youtu.be/vOSfabsDUNg?t=17m34s) ), Dr. Oostenveld mentiones > (at 17:38) a paper which tested some of the parameters of the > statistic methods. Do you know which paper is it? > > Cheers, > Natalia. > > > ------------------------------ > > Message: 4 > Date: Fri, 20 Mar 2015 11:48:24 +0100 > From: "Nicholas A. Peatfield" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] A paper mentioned in "Non-parametric > cluster-based statistical testing of MEG/EEG data" video on > FieldtripTV channel > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Not sure if this is the one. But it seems as such: > > http://www.sciencedirect.com/science/article/pii/S0165027014002878 > > Pernet, C.R., Latinus, M. , > Nichols, T.E., and Rousselet, G.A. > (2014) Cluster-based > computational methods for mass univariate analyses of event-related brain > potentials/fields: A simulation study. *Journal of Neuroscience Methods > * > . (doi: > > 10.1016/j.jneumeth.2014.08.003 > ) (Early Online > Publication) > > > > On 20 March 2015 at 10:58, Natalia Melnik wrote: > >> Dear all, >> in the "Non-parametric cluster-based statistical testing of MEG/EEG >> data" video on FieldtripTV channel >> ((https://youtu.be/vOSfabsDUNg?t=17m34s) ), Dr. Oostenveld mentiones >> (at 17:38) a paper which tested some of the parameters of the >> statistic methods. Do you know which paper is it? >> >> Cheers, >> Natalia. >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Nicholas Peatfield, PhD > Centro Interdipartimentale Mente/Cervello- CIMEC > > Assegnista di ricerca - Research Fellow > Via delle Regole, 101 - 38060 Mattarello > +39 0461 283086 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 52, Issue 22 > ***************************************** From m.goeldi at psychologie.uzh.ch Fri Mar 20 18:05:46 2015 From: m.goeldi at psychologie.uzh.ch (m.goeldi at psychologie.uzh.ch) Date: Fri, 20 Mar 2015 18:05:46 +0100 Subject: [FieldTrip] Antwort: Re: strange leadfield for beamforming from template files In-Reply-To: <47A755CA-A6B5-4B56-AD75-866D2329B4F7@fcdonders.ru.nl> References: <47A755CA-A6B5-4B56-AD75-866D2329B4F7@fcdonders.ru.nl>, Message-ID: Hi Jan-Mathijs Thanks for your quick reply. How would I prove it is not a numerical problem? The big arrows are all close to the boundary. I created my own head models according to the ft-tutorial, but the problem persists. To solve this issue is it feasible to simply remove the points closest to the boundary? (Or a bit more sophisticated, remove those points where the vector is missaligned wrt. its neighbours.) If this happens with the template files, I guess this will also happen routinely with any other (i.e. individual) scans I would use. Is there a standard ft approach to adress this issue? Cheers Maurice --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -----fieldtrip-bounces at science.ru.nl schrieb: ----- An: FieldTrip discussion list Von: "Schoffelen, J.M. (Jan Mathijs)" Gesendet von: fieldtrip-bounces at science.ru.nl Datum: 19.03.2015 22:30 Betreff: Re: [FieldTrip] strange leadfield for beamforming from template files Hi Maurice, The way in which you visualize the leadfield vectors it is hard to see in which locations the arrows are big. My suspicion is (unless otherwise proven) that you are suffering from numerical problems at dipole positions close to the inner boundary. Best, Jan-Mathijs On Mar 19, 2015, at 12:34 PM, m.goeldi at psychologie.uzh.ch wrote: Hi all I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. Unfortunately this is not the case. The vectors are all over the place. See figure. The red circle is the electrode location (Cz). The field looks (qualitatively) just as wrong for any other electrode. Below is the code I used to generate & visualize the lead field. I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. There the result is as expected, so I think the problem lies not in the visualization. I am using fieldtrip-20150118 I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. My question is, am I doing anything wrong in generating the lead field? Am I expecting something wrong (i.e. is this a realistidc lead field?) Does anyones lead field look the same/different when using the template files? I would appreciate any help with this problem. Thanks for your thoughts Cheers Maurice %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load mri load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') % load template sourcemodel template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); % compute source model cfg                = []; cfg.grid.warpmni   = 'yes'; cfg.grid.template  = template.sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.grid.resolution = 6; cfg.mri            = mri; sourcemodel        = ft_prepare_sourcemodel(cfg); sourcemodel = ft_convert_units(sourcemodel, 'cm'); % make head model load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); vol = ft_convert_units(vol, 'cm'); %% electrode layout elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); [elec] = removeelectrodes(elec,data.label);    % remove the electrodes that are not in my data elec = ft_convert_units(elec,'cm'); % lead field cfg                 = []; cfg.grid            = sourcemodel; cfg.elec            = elec; cfg.vol             = vol; cfg.channel         = 'all'; [grid] = ft_prepare_leadfield(cfg,freqC1); grid = ft_convert_units(grid, 'cm'); %%%% visualize leadfield %%%% channel = 'Cz'; %% electrode position elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); %% leadfield positions leadfieldpos = grid.pos(grid.inside,:); %% extract leadfield npts = numel(grid.leadfield); lead = grid.leadfield(grid.inside); nchan = find(strcmp(grid.cfg.channel,channel)); for i = 1:numel(lead)     leadVect(i,:) = lead{i}(nchan,:); end figure; hold on     % plot all objects in one figure ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); alpha 0.3 scale = 30; quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) plot3(elecpos(1),elecpos(2),elecpos(3),'ro') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch _______________________________________________ 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.goeldi at psychologie.uzh.ch Fri Mar 20 21:20:19 2015 From: m.goeldi at psychologie.uzh.ch (m.goeldi at psychologie.uzh.ch) Date: Fri, 20 Mar 2015 21:20:19 +0100 Subject: [FieldTrip] Antwort: Re: strange leadfield for beamforming from template files In-Reply-To: References: , <47A755CA-A6B5-4B56-AD75-866D2329B4F7@fcdonders.ru.nl>, Message-ID: Hi I have now removed all outer points. This has removed some of the large arrows, but there are still many large ones left coming from deep inside the brain. If it is a numerical problem, is there a way around it? Could it be anything else? Cheers Maurice --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -----fieldtrip-bounces at science.ru.nl schrieb: ----- An: FieldTrip discussion list Von: m.goeldi at psychologie.uzh.ch Gesendet von: fieldtrip-bounces at science.ru.nl Datum: 20.03.2015 18:15 Betreff: [FieldTrip] Antwort: Re: strange leadfield for beamforming from template files Hi Jan-Mathijs Thanks for your quick reply. How would I prove it is not a numerical problem? The big arrows are all close to the boundary. I created my own head models according to the ft-tutorial, but the problem persists. To solve this issue is it feasible to simply remove the points closest to the boundary? (Or a bit more sophisticated, remove those points where the vector is missaligned wrt. its neighbours.) If this happens with the template files, I guess this will also happen routinely with any other (i.e. individual) scans I would use. Is there a standard ft approach to adress this issue? Cheers Maurice --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -----fieldtrip-bounces at science.ru.nl schrieb: ----- An: FieldTrip discussion list Von: "Schoffelen, J.M. (Jan Mathijs)" Gesendet von: fieldtrip-bounces at science.ru.nl Datum: 19.03.2015 22:30 Betreff: Re: [FieldTrip] strange leadfield for beamforming from template files Hi Maurice, The way in which you visualize the leadfield vectors it is hard to see in which locations the arrows are big. My suspicion is (unless otherwise proven) that you are suffering from numerical problems at dipole positions close to the inner boundary. Best, Jan-Mathijs On Mar 19, 2015, at 12:34 PM, m.goeldi at psychologie.uzh.ch wrote: Hi all I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. Unfortunately this is not the case. The vectors are all over the place. See figure. The red circle is the electrode location (Cz). The field looks (qualitatively) just as wrong for any other electrode. Below is the code I used to generate & visualize the lead field. I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. There the result is as expected, so I think the problem lies not in the visualization. I am using fieldtrip-20150118 I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. My question is, am I doing anything wrong in generating the lead field? Am I expecting something wrong (i.e. is this a realistidc lead field?) Does anyones lead field look the same/different when using the template files? I would appreciate any help with this problem. Thanks for your thoughts Cheers Maurice %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load mri load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') % load template sourcemodel template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); % compute source model cfg                = []; cfg.grid.warpmni   = 'yes'; cfg.grid.template  = template.sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.grid.resolution = 6; cfg.mri            = mri; sourcemodel        = ft_prepare_sourcemodel(cfg); sourcemodel = ft_convert_units(sourcemodel, 'cm'); % make head model load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); vol = ft_convert_units(vol, 'cm'); %% electrode layout elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); [elec] = removeelectrodes(elec,data.label);    % remove the electrodes that are not in my data elec = ft_convert_units(elec,'cm'); % lead field cfg                 = []; cfg.grid            = sourcemodel; cfg.elec            = elec; cfg.vol             = vol; cfg.channel         = 'all'; [grid] = ft_prepare_leadfield(cfg,freqC1); grid = ft_convert_units(grid, 'cm'); %%%% visualize leadfield %%%% channel = 'Cz'; %% electrode position elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); %% leadfield positions leadfieldpos = grid.pos(grid.inside,:); %% extract leadfield npts = numel(grid.leadfield); lead = grid.leadfield(grid.inside); nchan = find(strcmp(grid.cfg.channel,channel)); for i = 1:numel(lead)     leadVect(i,:) = lead{i}(nchan,:); end figure; hold on     % plot all objects in one figure ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); alpha 0.3 scale = 30; quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) plot3(elecpos(1),elecpos(2),elecpos(3),'ro') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- University of Z�rich Maurice G�ldi Department of Psychology Biopsychology Binzm�hlestr. 14 / Box 5 CH - 8050 Z�rich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch _______________________________________________ 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 v.piai.research at gmail.com Sat Mar 21 01:35:24 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Fri, 20 Mar 2015 17:35:24 -0700 Subject: [FieldTrip] ft_channelrepair increases the size of the data file In-Reply-To: References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> <550303A9.5070705@gmail.com> Message-ID: <550CBCCC.1060000@gmail.com> Hi FT-ers, I think I won't be able to figure out this problem by diving into the ft_channelrepair code. So if you can shed any light to what could be going on, I'd be *very *thankful!! I followed Eelke's and JM's advice to split the data, fix some channels only for certain trials, then put the data together. All fine, except for the following. If I apply this procedure a large number of times (haven't figured out what the threshold is yet), the file size increases by a considerable amount. For example, when I fixed one channel for all trials, and then 7 channels for a couple of trials, the file went from 1GB to almost 3GB. Then Matlab slows down and eventually hangs, and the data (saved with '-v7.3') is "corrupted" once I try to load it to my workspace again. It seems to me that ft_channelrepair is keeping information in a 'previous' field such that every call to it will just keep adding bytes, is that the case? I'm planning to delete everything that is in cfg.previous and just keep the .trl field for later. Can you foresee I will run into unrepairable trouble later because of this? Is there any other field within the cfg.previous I should keep besides the .trl? Thanks a lot again!! Have a nice weekend, Vitória On 3/13/2015 9:08 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > Hi V, > Note that you can use the trialinfo field in your data for bookkeeping, e.g. (assuming there is already such field in your data) > > data.trialinfo(:,end+1) = (1:numel(data.trial))’; > cfg = []; > cfg.trials = sel_to_be_repaired; > cfg.etc > data1 = ft_channelrepair(cfg,data); > > cfg = []; > cfg.trials = sel_to_be_unrepaired > data2 = ft_selectdata(cfg, data); > > data = ft_appenddata([],data1,data2); > > Although the order has now been changed, you’ll see that the last column of the trialinfo field still pertains to your original trial indices. > > JM > > > > On Mar 13, 2015, at 4:35 PM, Vitória Piai wrote: > >> Thanks, Eelke! >> >> I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. >> >> Thanks a lot, >> Hope all is well in Nijmegen!! >> >> On 3/11/2015 12:32 AM, Eelke Spaak wrote: >>> Hi Vitoria, >>> >>> Yes, that is the expected behaviour of ft_channelrepair, because that >>> is consistent with all other functions supporting a cfg.trials-option >>> (i.e. select first, then do the work on what remains). >>> >>> It should be quite straightforward to do something like: >>> >>> cfg = []; >>> cfg.trials = goodtrials; >>> dat1 = ft_selectdata(cfg, data); >>> >>> cfg = []; >>> ... >>> cfg.trials = badtrials; >>> dat2 = ft_channelrepair(cfg, data); >>> >>> datcmb = ft_appenddata([], dat1, dat2); >>> >>> to achieve what you want. >>> >>> Groetjes, >>> Eelke >>> >>> On 10 March 2015 at 23:58, Vitoria Piai wrote: >>>> Hi all, >>>> >>>> I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 >>>> 09:33:28Z) to repair bad channels. I wanted to do it only for certain >>>> trials, and when I saw the option cfg.trials, I was really happy. >>>> However, if I pass cfg.trials with a vector rather than 'all', then the >>>> function does: >>>> ft_selectdata (lines 104, 108), >>>> then from line 352 onwards, things are converted back to normal. >>>> But if the cfg contained only some trials (as I'm trying to use it for), >>>> these are not restored back, and so I'm left with a data structure that >>>> only has as many trials as my cfg had. >>>> >>>> I was just wondering whether that is the expected behaviour of >>>> ft_channelrepair and that I should restore things myself (presumably >>>> with ft_append-like functions). If so, it would be nice if the help on >>>> this function would say that... >>>> If I'm simply using a too old version, my apologies. (I should start >>>> working with github, I know!!) >>>> >>>> Thanks a lot, >>>> Vitoria >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> 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 eelke.spaak at donders.ru.nl Sat Mar 21 02:52:05 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sat, 21 Mar 2015 02:52:05 +0100 Subject: [FieldTrip] ft_channelrepair increases the size of the data file In-Reply-To: <8468aced403e44edb130570e4f13d10e@EXPRD01.hosting.ru.nl> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> <550303A9.5070705@gmail.com> <8468aced403e44edb130570e4f13d10e@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitória, It should be perfectly safe to delete cfg.previous (or data.cfg); no FieldTrip functions depend on it. Note that you won't be able to run ft_analysisprotocol on those data anymore, but that should be the only limitation. Best, Eelke Op 21 mrt. 2015 01:38 schreef "Vitoria Piai" : > Hi FT-ers, > > I think I won't be able to figure out this problem by diving into the > ft_channelrepair code. So if you can shed any light to what could be going > on, I'd be *very *thankful!! > > I followed Eelke's and JM's advice to split the data, fix some channels > only for certain trials, then put the data together. All fine, except for > the following. If I apply this procedure a large number of times (haven't > figured out what the threshold is yet), the file size increases by a > considerable amount. For example, when I fixed one channel for all trials, > and then 7 channels for a couple of trials, the file went from 1GB to > almost 3GB. Then Matlab slows down and eventually hangs, and the data > (saved with '-v7.3') is "corrupted" once I try to load it to my workspace > again. > > It seems to me that ft_channelrepair is keeping information in a > 'previous' field such that every call to it will just keep adding bytes, is > that the case? I'm planning to delete everything that is in cfg.previous > and just keep the .trl field for later. Can you foresee I will run into > unrepairable trouble later because of this? Is there any other field within > the cfg.previous I should keep besides the .trl? > > Thanks a lot again!! > Have a nice weekend, > Vitória > > On 3/13/2015 9:08 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > > Hi V, > Note that you can use the trialinfo field in your data for bookkeeping, e.g. (assuming there is already such field in your data) > > data.trialinfo(:,end+1) = (1:numel(data.trial))’; > cfg = []; > cfg.trials = sel_to_be_repaired; > cfg.etc > data1 = ft_channelrepair(cfg,data); > > cfg = []; > cfg.trials = sel_to_be_unrepaired > data2 = ft_selectdata(cfg, data); > > data = ft_appenddata([],data1,data2); > > Although the order has now been changed, you’ll see that the last column of the trialinfo field still pertains to your original trial indices. > > JM > > > > On Mar 13, 2015, at 4:35 PM, Vitória Piai wrote: > > > Thanks, Eelke! > > I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. > > Thanks a lot, > Hope all is well in Nijmegen!! > > On 3/11/2015 12:32 AM, Eelke Spaak wrote: > > Hi Vitoria, > > Yes, that is the expected behaviour of ft_channelrepair, because that > is consistent with all other functions supporting a cfg.trials-option > (i.e. select first, then do the work on what remains). > > It should be quite straightforward to do something like: > > cfg = []; > cfg.trials = goodtrials; > dat1 = ft_selectdata(cfg, data); > > cfg = []; > ... > cfg.trials = badtrials; > dat2 = ft_channelrepair(cfg, data); > > datcmb = ft_appenddata([], dat1, dat2); > > to achieve what you want. > > Groetjes, > Eelke > > On 10 March 2015 at 23:58, Vitoria Piai wrote: > > Hi all, > > I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 > 09:33:28Z) to repair bad channels. I wanted to do it only for certain > trials, and when I saw the option cfg.trials, I was really happy. > However, if I pass cfg.trials with a vector rather than 'all', then the > function does: > ft_selectdata (lines 104, 108), > then from line 352 onwards, things are converted back to normal. > But if the cfg contained only some trials (as I'm trying to use it for), > these are not restored back, and so I'm left with a data structure that > only has as many trials as my cfg had. > > I was just wondering whether that is the expected behaviour of > ft_channelrepair and that I should restore things myself (presumably > with ft_append-like functions). If so, it would be nice if the help on > this function would say that... > If I'm simply using a too old version, my apologies. (I should start > working with github, I know!!) > > Thanks a lot, > Vitoria > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mitka3 at uniba.sk Sat Mar 21 22:24:16 2015 From: mitka3 at uniba.sk (Milan Mitka) Date: Sat, 21 Mar 2015 22:24:16 +0100 Subject: [FieldTrip] =?utf-8?q?Easycap_M10_coregistration_with_head_model_?= =?utf-8?q?=E2=80=93_no_fiducials?= In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB1892CB@exprd01.hosting.ru.nl> References: <9C6D6E44-F63A-40A1-8A19-A71D7184FFCD@uniba.sk> <3D00B7615FB58D46A0B49B9AD67A33EB1892CB@exprd01.hosting.ru.nl> Message-ID: Dear Jim, thank you for your reply. I realise that it's not the best setup but it's mostly for learning purposes and should suffice as is. The thing that still confuses me though is that the 10-20 template set does include fiducials whilst the M10 does not. I've tried manual interactive alignment before but to no avail since the head model doesn't make it very easy to find landmarks. I've also encountered errors when attempting to perform non-linear transformations regardless of the cfg.warp setting. Anyway, I've solved the issue by utilising a template MRI from SPM which used the MNI coordinate system as a basis for the head model and transformed electrode positions to MNI as well. It appears to be rather tidy so for now all is good. Yours sincerely, Milan > On 20.3.2015, at 10:29, Herring, J.D. (Jim) wrote: > > Dear Milan, > > If you have not recorded the electrode positions yourself using, for example, a Polhemus or Localite system you will always end-up with a suboptimal alignment (fiducials, or not). > > That being said, you can skip the step of automatic realignment in the tutorial and immediately use ft_electroderealign with cfg.method = 'interactive', to manually rotate, translate, and scale the electrode positions to make it fit as well as possible to your headmodel. > > Best, > > Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From doriana.demarco at gmail.com Sun Mar 22 18:22:23 2015 From: doriana.demarco at gmail.com (Doriana De Marco) Date: Sun, 22 Mar 2015 18:22:23 +0100 Subject: [FieldTrip] source analysis- NaN in leadfield matrices Message-ID: Dear Fieldtrip members, I’m dealing with source analysis and I have a big problem that I can’t resolve… Filedtrip gives me an error after launching of ft_sourceanalysis: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> rank at 15 s = svd(A); Error in ==> ft_eloreta at 132 rank_lf(i) = rank(dip.leadfield{i}); Error in ==> ft_sourceanalysis at 850 dip(i) = ft_eloreta(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); In my leadfield computation there are in fact many NaN points. I report my script below because I can’t find where the error can be. I used standard_mri template to prepare head model. %% 1. PREPARING HEAD MODEL %METHOD 1 %if you have a structural mri and you want to create headmodel %load headmodel – mri load ('C:\Users\DorianaNote\Documents\MATLAB\fieldtrip-20140424\fieldtrip-20140424\template\headmodel\standard_mri'); cfg = []; cfg.output = {'brain','skull','scalp'}; template_seg = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'bemcp'; template_vol = ft_prepare_headmodel(cfg, template_seg); elec = ft_read_sens('GSN-HydroCel-128.sfp'); template_vol = ft_convert_units(template_vol, elec.unit); cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = template_vol.bnd(3); elec_aligned = ft_electroderealign(cfg); cfg = []; cfg.grid.unit = template_vol.unit; cfg.elec = elec_aligned; cfg.mri = mri; cfg.vol = template_vol; grid = ft_prepare_sourcemodel(cfg) cfg = []; cfg.elec = elec_aligned; cfg.vol = template_vol; cfg.reducerank = 3; cfg.grid = grid; cfg.channel = {'all'}; cfg.grid.unit = 'cm'; [grid] = ft_prepare_leadfield(cfg, data); cfg = []; cfg.method = 'eloreta'; cfg.grid = grid; cfg.elec = elec_aligned; cfg.vol = template_vol; source = ft_sourceanalysis(cfg, data); I’m trying to analyze component data in order to localize comp.topo parameter. I used the function comp2timelocked to transform data in a timelock-like structure... I don’t know if it can be a problem. I sincerely hope someone of you can help me Many thanks ---------------- Doriana De Marco, Ph.D. Student -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Mon Mar 23 04:02:57 2015 From: david.m.groppe at gmail.com (David Groppe) Date: Sun, 22 Mar 2015 23:02:57 -0400 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: <245197442.364305.1426752407463.JavaMail.yahoo@mail.yahoo.com> References: <245197442.364305.1426752407463.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Martina, Balanced sample sizes are typically recommended for conventional parametric independent samples tests (e.g., t-tests, ANOVAs) because it makes the tests less sensitive to differences in variation between the populations being compared. If the populations being compared differ in variance, having more observations from the population with less variability will make these tests overly permissive (i.e., the true false positive rate will be greater than your nominal alpha level). If you have more observations from the population with greater variability, the tests become overly conservative. A few years ago, my colleagues and I simulated some EEG data and found that permutation tests exhibit a qualitatively similar sensitivity to differences in variance between populations (see below). If you're concerned about such a difference in your data you could do as has already been suggested and use a subset of data so that the number of observations between samples is the same. Alternatively you could use a permutation test based on variants of the t-statistic that are less sensitive to differences in variance. In our paper below, we investigated two variants, Welch's t and t_dif. Welch's t proved a bit less sensitive to differences in variance and was only slightly less powerful than the conventional t-statistic. t_dif was markedly insensitive to differences in variance but was significantly less powerful. However, I would guess that using t_dif or Welch's t are likely more powerful than discarding trials (though we didn't investigate that option in the paper). cheers, -David Groppe, D.M., Urbach, T.P., & Kutas, M. (2011) *Mass univariate analysis of event-related brain potentials/fields II: Simulation studies*. *Psychophysiology*, 48(12) pp. 1726-1737, DOI: 10.1111/j.1469-8986.2011.01272.x. www.cogsci.ucsd.edu/~dgroppe/PUBLICATIONS/mass_uni_preprint2.pdf On Thu, Mar 19, 2015 at 4:06 AM, Martina Rossi wrote: > Dear Stephen and Joram, > > Thank so much for your feedback, > I will check out the suggested material, > > Best, > Martina > > > Il Mercoledì 18 Marzo 2015 20:43, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> ha scritto: > > > You can also check out this video of Robert. Apologies for the quality - > not of the talk, but of the recording :-) > > At 14:45 he actually mentions unequal number of trials between conditions. > > https://www.youtube.com/watch?v=vOSfabsDUNg > > Cheers, > Stephen > > > > > On 18 March 2015 at 19:33, Stephen Whitmarsh > wrote: > > I should add that (1) is typically done *within *subjects, and (2) *over * > subjects. > > Cheers, > Stephen > > On 18 March 2015 at 19:20, Stephen Whitmarsh > wrote: > > Dear Martina, > > It might help to distinguish two aspects of cluster-based statistic. > > 1) the statistical approuch that you will use to determine whether a > time-channel-datapoint / time-frequency-channel-datapoint / > time-frequency-voxel-datapoint is considered significant different between > conditions. > 2) the statistical approuch that you will use to determine whether *a > cluster of* time-channel-datapoints / time-frequency-channel-datapoints / > time-frequency-voxel-datapoints is considered significantly different > between conditions. > > When you talk about *cluster statistics*, you probably think about the > second part. But this might not be what you should initially be concerned > with when thinking about e.g. different numbers of trials between > conditions. Rather, consider what statistical tests you (can) use to > compare your time-frequency values between conditions *(within subjects).* > This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any > test, for that matter. As far as my limited knowledge of statistics goes, > in most simple and non-extreme cases, unequal number of trials that does > not have to increase your chance of type I errors, rather that of type 2 > (you'll be insensitive to differences if you don't have enough observations > in one condition due to noisy estimate of means/distribution). But in any > case it's a simple question to google or ask a statistician. > > Now, after you are happy with and confident about the between conditions > statistical test, consider how the cluster statistics might help you. > First of all, how does it determine whether a cluster is significantly > different between conditions? There are different options, but the gist is > that it takes your significant statistical numbers of step (1), adds them > up when they belong to the same cluster (based on whether they are > neigbourings in time/freq/space with other significant numbers), takes the > maximum of these summed up clusters (there might be more than one cluster), > and then compares this one value to the same taken from a*(non-parametric) > monte-carlo distribution *of the null hypothesis based on permuting the > values over conditions (and then calculating the maximum sum). The Maris > and Oostenveld paper explains it in more detail. > > The reason for doing cluster-statistics is that its a smart way of dealing > with multiple comparisons over many time x frequency x channels (or space). > The method is blind for your decisions about how its computed for each > point in time x frequency x channels (or space). > > I find the FieldTrip statistics functions, their configurations etc., and > the way they interact confusing at times, but I hope this helps to clear it > up a bit. > > Long story short - I think your question does not limit itself to cluster > statistics and at the same time is much simpler. It's all about (1). > > Best wishes, > Stephen > > > > > > > > > > > > > > > > There are two separate steps cluster statistics (as implemented in > FieldTrip, but in general as well). > > > > > On 18 March 2015 at 14:51, Joram van Driel > wrote: > > Hi Martina, > > In general, I'd advice to do some kind of trial-selection procedure when > comparing error versus correct trials, in order to trial-count-match the > two conditions. Otherwise you run into problems considering: SNR (higher > for the correct condition), and RT (errors are usually faster, resulting in > a time-on-task confound). What I always do is pick from the correct > condition a similar number of trials that are close to the RT distribution > of the error trials (i.e. the faster correct trials). That way you solve > both problems at once (and probably the cluster-based permutation test in > field trip will work as well, as a bonus ;)). > > Best, > Joram > > On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi > wrote: > > Dear All, > > I would like to get some feedback from the community about a statistical > analysis problem I need to tackle with my study. > I want to apply the cluster-based permutation tests on time-frequency data > considering two conditions (correct vs error). > Unfortunately, these two conditions have different sizes (correct >> > error). > Right now, I am only considering subjects having a ratio "error/correct" > bigger than 1/5, yet this is only an arbitrary threshold I set. > The question is the following: > is there a formal way to identify a threshold by which two conditions can > be realiably compared with the cluster-based permutation tests? > If the cluster-based approach is not suitable in this scenario, is there > any other approach you would suggest? > I shall perhaps point out that I am working on EEG data recorded with a 32 > channel system (impedance levels < 10 kΩ). > > Looking forward to hear your feedback :) > > Kind Regards, > Martina Rossi > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Joram van Driel > Postdoc @ Vrije Universiteit Amsterdam > Cognitive Psychology > > > _______________________________________________ > 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 johanna.zumer at gmail.com Mon Mar 23 12:18:00 2015 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Mon, 23 Mar 2015 11:18:00 +0000 Subject: [FieldTrip] source analysis- NaN in leadfield matrices In-Reply-To: References: Message-ID: Hi Doriana, It looks like you're using a FieldTrip verison from 20140424. There was a problem last year with bemcp causing NaNs, but that has been fixed. Could you try updating to a recent version and see if that solves it? Cheers, Johanna On 22 Mar 2015 17:22, "Doriana De Marco" wrote: > Dear Fieldtrip members, > > I’m dealing with source analysis and I have a big problem that I can’t > resolve… > > Filedtrip gives me an error after launching of ft_sourceanalysis: > > ??? Error using ==> svd > > Input to SVD must not contain NaN or Inf. > > Error in ==> rank at 15 > > s = svd(A); > > Error in ==> ft_eloreta at 132 > > rank_lf(i) = rank(dip.leadfield{i}); > > Error in ==> ft_sourceanalysis at 850 > > dip(i) = ft_eloreta(grid, sens, vol, squeeze(avg(i,:,:)), > squeeze(Cy(i,:,:)), > > optarg{:}); > > In my leadfield computation there are in fact many NaN points. I report > my script below because I can’t find where the error can be. I used > standard_mri template to prepare head model. > > %% 1. PREPARING HEAD MODEL > > %METHOD 1 > > %if you have a structural mri and you want to create headmodel > > > > %load headmodel – mri > > load > ('C:\Users\DorianaNote\Documents\MATLAB\fieldtrip-20140424\fieldtrip-20140424\template\headmodel\standard_mri'); > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > template_seg = ft_volumesegment(cfg, mri); > > > > cfg = []; > > cfg.method = 'bemcp'; > > template_vol = ft_prepare_headmodel(cfg, template_seg); > > > > elec = ft_read_sens('GSN-HydroCel-128.sfp'); > > template_vol = ft_convert_units(template_vol, elec.unit); > > > > cfg = []; > > cfg.method = 'interactive'; > > cfg.elec = elec; > > cfg.headshape = template_vol.bnd(3); > > elec_aligned = ft_electroderealign(cfg); > > > > cfg = []; > > cfg.grid.unit = template_vol.unit; > > cfg.elec = elec_aligned; > > cfg.mri = mri; > > cfg.vol = template_vol; > > grid = ft_prepare_sourcemodel(cfg) > > > > cfg = []; > > cfg.elec = elec_aligned; > > cfg.vol = template_vol; > > cfg.reducerank = 3; > > cfg.grid = grid; > > cfg.channel = {'all'}; > > cfg.grid.unit = 'cm'; > > [grid] = ft_prepare_leadfield(cfg, data); > > > > cfg = []; > > cfg.method = 'eloreta'; > > cfg.grid = grid; > > cfg.elec = elec_aligned; > > cfg.vol = template_vol; > > source = ft_sourceanalysis(cfg, data); > > > > I’m trying to analyze component data in order to localize comp.topo > parameter. I used the function comp2timelocked to transform data in a > timelock-like structure... I don’t know if it can be a problem. > > > I sincerely hope someone of you can help me > > Many thanks > > ---------------- > > Doriana De Marco, Ph.D. Student > > > _______________________________________________ > 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 elia.valentini at uniroma1.it Tue Mar 24 16:10:49 2015 From: elia.valentini at uniroma1.it (Elia Valentini) Date: Tue, 24 Mar 2015 16:10:49 +0100 Subject: [FieldTrip] CALL for PhD positions in Cognitive Social and Affective Neurosciences (CoSAN) in Rome Message-ID: Please forgive cross posting! Dear Colleagues, this is to inform you about the Foreign Nationals Educated Abroad Ph.D. scholarship awarded by “Sapienza” University of Rome. This is a very prestigious and competitive scholarship for non-Italian students who graduated abroad (please note that a Master Degree is required). There is the chance that one of the awarded students will be selected for the Psychology and Social Neuroscience Ph.D. program (international curriculum CoSAN http://w3.uniroma1.it/cosan/). We are seeking highly talented applicants and we would really appreciate if you could forward this to the students you think may be eligible. The *deadline is* next *April, 26th. Details about the call can be found at* : http://www.cosanphd.com/index.php?page=default_templates *http://www.uniroma1.it/didattica/offerta-formativa/dottorati * The successful candidate will receive a bursary of € 19.800,00 per year before taxes: national insurance contributions (INPS) that fellowship recipients are required to pay (10,57% for 2015). Research will be performed at the Social and Cognitive Neuroscience laboratory (*http://* agliotilab.org). While the selection is mainly based on dossier (Evaluation of qualifications, publications and certificates) applicants should also include a skype address and express their availability to be contacted for a video interview if necessary For more info please contact: 1) for administrative enquiries: Dr. Paola Trussardi (organizational manager) -paola.trussardi at uniroma1.it; 2) For scientific enquiries: Dr Elia Valentini elia.valentini at uniroma1.it or Salvatore M. Aglioti - salvatoremaria.aglioti at uniroma1.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From gamaliel.ghu at hotmail.com Tue Mar 24 21:00:55 2015 From: gamaliel.ghu at hotmail.com (gamaliel huerta urrea) Date: Tue, 24 Mar 2015 16:00:55 -0400 Subject: [FieldTrip] Can I simulate multiple dipoles in realistic head model? Message-ID: HiI need simulate dipolar sources in a realistic head model, however I want know if can import surfaces from freesurfer or brainstorm.I have problems to performs the segmentation and the electrodes alignment, Finally I would like to know how could simulate multiple dipoles on different parts of realistic head model to evaluate the location later.regards Gamaliel Huerta UrreaEstudiante Ingeniería Civil BiomédicaUniversidad de Valparaíso -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Mar 25 13:27:21 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 25 Mar 2015 13:27:21 +0100 Subject: [FieldTrip] Possible BUG in ft_redefinetrial using the cfg.trl option In-Reply-To: References: Message-ID: Hi Andrea, I cannot reproduce the error you mention: %% create some data data = []; data.label = {'a'}; for k = 1:3 data.sampleinfo(k,:) = [1+(k-1)*1000 k*1000]; data.time{k} = 1:1000; data.trial{k} = ones(1,1000) .* k; end %% redefine cfg = []; cfg.trl = [500 600 0; 800 1200 0; 2500 2700 0]; data_out = ft_redefinetrial(cfg, data); %% check assert(all(data_out.trial{1}(:) == 1)); assert(sum(data_out.trial{2}(:) == 1) == 201); assert(sum(data_out.trial{2}(:) == 2) == 200); assert(all(data_out.trial{3}(:) == 3)); Could it be something else? Best, Eelke On 20 March 2015 at 15:14, andrea brovelli wrote: > Dear all, > > The bugzilla server seems to be down for maintenance. So I post it here. > > I noticed a possible bug in ft_redefinetrial: if I realign my data on a different event using the cfg.trl option, the output data is corretly aligned, BUT the output data structure contains ONLY the first trial of the input data structure, repeated for the exact number of trials. > > % In other words, if you do this... > cfg = []; > cfg.trl = trl; % N x 3 matrix = [ sample_start sample_end sample_offset ] > data_out = ft_redefinetrial(cfg, data_in); > > % And then plot the first 3 trials for the first channel.... > plot(data_out.time{1},data_out.trial{1}(1,:),'b') > hold on > plot(data_out.time{2},data_out.trial{2}(1,:),'r') > plot(data_out.time{3},data_out.trial{3}(1,:),'k') > > ... you will notice that you are plotting the first trial in the original data_in but shifted in time. > > Could you also check please ? > > I used the latest version of Fieldtrip fieldtrip-20150318 > > Thanks > > Andrea > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mor2451 at gmail.com Wed Mar 25 16:21:02 2015 From: mor2451 at gmail.com (moran abilea) Date: Wed, 25 Mar 2015 17:21:02 +0200 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? Message-ID: hi there, my name is Moran Abilea, i'm a student from Israel who studies Software Engeenering and my final project is about EEG Speller. i want to use FieldTrip in my project, but when i tried to use ft_realtime funcions such as ft_realtime_signal proxy i couldn't use it becuase it isn't found in the version i downloaded from 2015 March 18. in fact, the whole Realtime folder isn't in this version so i can't use any of those functions what should i do? can someone pliz send me the folder with the source code? thanks, Moran -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Mar 25 16:54:40 2015 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 25 Mar 2015 16:54:40 +0100 Subject: [FieldTrip] ft_channelrepair increases the size of the data file In-Reply-To: References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> <550303A9.5070705@gmail.com> <8468aced403e44edb130570e4f13d10e@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitória, To add on Eelke's advice: you can also just temporarily save it in a different variable, and put it back in your datastructure when done with your channelrepair. Cheers, Stephen On 21 March 2015 at 02:52, Eelke Spaak wrote: > Hi Vitória, > > It should be perfectly safe to delete cfg.previous (or data.cfg); no > FieldTrip functions depend on it. Note that you won't be able to run > ft_analysisprotocol on those data anymore, but that should be the only > limitation. > > Best, > Eelke > Op 21 mrt. 2015 01:38 schreef "Vitoria Piai" : > > Hi FT-ers, >> >> I think I won't be able to figure out this problem by diving into the >> ft_channelrepair code. So if you can shed any light to what could be going >> on, I'd be *very *thankful!! >> >> I followed Eelke's and JM's advice to split the data, fix some channels >> only for certain trials, then put the data together. All fine, except for >> the following. If I apply this procedure a large number of times (haven't >> figured out what the threshold is yet), the file size increases by a >> considerable amount. For example, when I fixed one channel for all trials, >> and then 7 channels for a couple of trials, the file went from 1GB to >> almost 3GB. Then Matlab slows down and eventually hangs, and the data >> (saved with '-v7.3') is "corrupted" once I try to load it to my workspace >> again. >> >> It seems to me that ft_channelrepair is keeping information in a >> 'previous' field such that every call to it will just keep adding bytes, is >> that the case? I'm planning to delete everything that is in cfg.previous >> and just keep the .trl field for later. Can you foresee I will run into >> unrepairable trouble later because of this? Is there any other field within >> the cfg.previous I should keep besides the .trl? >> >> Thanks a lot again!! >> Have a nice weekend, >> Vitória >> >> On 3/13/2015 9:08 AM, Schoffelen, J.M. (Jan Mathijs) wrote: >> >> Hi V, >> Note that you can use the trialinfo field in your data for bookkeeping, e.g. (assuming there is already such field in your data) >> >> data.trialinfo(:,end+1) = (1:numel(data.trial))’; >> cfg = []; >> cfg.trials = sel_to_be_repaired; >> cfg.etc >> data1 = ft_channelrepair(cfg,data); >> >> cfg = []; >> cfg.trials = sel_to_be_unrepaired >> data2 = ft_selectdata(cfg, data); >> >> data = ft_appenddata([],data1,data2); >> >> Although the order has now been changed, you’ll see that the last column of the trialinfo field still pertains to your original trial indices. >> >> JM >> >> >> >> On Mar 13, 2015, at 4:35 PM, Vitória Piai wrote: >> >> >> Thanks, Eelke! >> >> I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. >> >> Thanks a lot, >> Hope all is well in Nijmegen!! >> >> On 3/11/2015 12:32 AM, Eelke Spaak wrote: >> >> Hi Vitoria, >> >> Yes, that is the expected behaviour of ft_channelrepair, because that >> is consistent with all other functions supporting a cfg.trials-option >> (i.e. select first, then do the work on what remains). >> >> It should be quite straightforward to do something like: >> >> cfg = []; >> cfg.trials = goodtrials; >> dat1 = ft_selectdata(cfg, data); >> >> cfg = []; >> ... >> cfg.trials = badtrials; >> dat2 = ft_channelrepair(cfg, data); >> >> datcmb = ft_appenddata([], dat1, dat2); >> >> to achieve what you want. >> >> Groetjes, >> Eelke >> >> On 10 March 2015 at 23:58, Vitoria Piai wrote: >> >> Hi all, >> >> I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 >> 09:33:28Z) to repair bad channels. I wanted to do it only for certain >> trials, and when I saw the option cfg.trials, I was really happy. >> However, if I pass cfg.trials with a vector rather than 'all', then the >> function does: >> ft_selectdata (lines 104, 108), >> then from line 352 onwards, things are converted back to normal. >> But if the cfg contained only some trials (as I'm trying to use it for), >> these are not restored back, and so I'm left with a data structure that >> only has as many trials as my cfg had. >> >> I was just wondering whether that is the expected behaviour of >> ft_channelrepair and that I should restore things myself (presumably >> with ft_append-like functions). If so, it would be nice if the help on >> this function would say that... >> If I'm simply using a too old version, my apologies. (I should start >> working with github, I know!!) >> >> Thanks a lot, >> Vitoria >> >> >> >> _______________________________________________ >> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://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 jhouck at mrn.org Wed Mar 25 17:03:26 2015 From: jhouck at mrn.org (Jon Houck) Date: Wed, 25 Mar 2015 10:03:26 -0600 Subject: [FieldTrip] Please distribute: 3 postdoctoral positions at the University of New Mexico Message-ID: The UNM Center on Alcoholism, Substance Abuse, and Addictions (CASAA) announces three new postdoctoral positions on our NIAAA Institutional Research Training grant. The goal of the grant is to prepare future NIH scientists to conduct research to (1) elucidate the processes of change in drinking behavior, (2) develop and test effective methods to effect change through self-change, treatment and indicated prevention, and (3) develop and test models to disseminate knowledge of effective interventions to diverse populations. Postdoctoral fellows work with one of the core training faculty: Barbara S. McCrady (PI and training program director), Eric Claus, Jon Houck, Theresa Moyers, Matthew Pearson, J. Scott Tonigan, Kamilla Venner, Katie Witkiewitz, or W. Gill Woodall. In anticipation of renewal funding, *we have three openings to support postdoctoral fellows in the 2015-2016 academic year*. Applicants must meet the following criteria: (1) demonstrated interest in the alcohol field as evidenced by prior coursework, research, and/or clinical experience; (2) a record of research productivity as evidenced by research presentations and peer-reviewed publications; and (3) a commitment to a career in alcohol research. All fellows must be US citizens or permanent resident aliens. As part of the training program, fellows must be engaged in full-time research training, participate in a weekly Addictions seminar, define a training plan and achieve specific competencies during each year, and limit outside employment. For continued support post-doctoral fellows will be expected to prepare and successfully submit an NIH grant application. The training program provides a NIH-defined stipend (based on years since doctoral degree), tuition remission, support for professional travel up to $2000 per year, and support for training- and research-related expenses. Interested applicants should submit a curriculum vitae, 3 letters of recommendation, 1-page statement of interest, letter stating their qualifications for and interest in the training grant, and their graduate transcripts to Barbara McCrady. Applications will be reviewed on a rolling basis. Submit all materials electronically to: Barbara S. McCrady, Ph.D. Distinguished Professor of Psychology Director, Center on Alcoholism, Substance Abuse, and Addictions (CASAA) University of New Mexico 2650 Yale Blvd. SE Albuquerque, NM 87106 bmccrady at unm.edu See http://casaa.unm.edu/traininggrant.html for more information about the training program -- Jon M. Houck, Ph.D. Assistant Professor of Translational Neuroscience Mind Research Network Research Assistant Professor Department of Psychology Center on Alcoholism, Substance Abuse, and Addictions University of New Mexico -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Mar 26 08:12:55 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 26 Mar 2015 08:12:55 +0100 Subject: [FieldTrip] BIH @ Imperial College London: Bring the Human Brain Projects of the world to one place References: Message-ID: Begin forwarded message: > From: Caroline Li > > Co-Chaired by Prof Karl Friston & Prof Yike Guo @ Imperial College London (Aug 31 – Sep2, 2015), BIH’15 crosses the disciplines of neuroscience, cognitive science, computer science, signal processing, and neuroimaging. It also draws special attention to informatics for brain science, human behaviour and health. > > It involves leaders from three of the biggest brain initiatives in the world. BIH’15 accepts full paper submission or abstract only submission. Please allow me to send call for paper here: > Keynote Speakers > · Allan Jones, CEO, Allen Institute for Brain Science, USA; > > · Henry Markram, Director, Blue Brain Project; Coordinator, Human Brain Project, EPFL, Switzerland; > > · David Van Essen, PI, Human Connectome Project, Washington University School of Medicine, USA; > > Feature Speakers > · Giorgio Ascoli, (Founding Director, Center for Neural Informatics, George Mason University, USA); > > · Henry Kennedy, (Director of Research, Stem-cell and Brain Research Institute, France); > > · Barbara Sahakian, (University of Cambridge, UK); > > · Nelson Spruston, (Scientific Program Director, Howard Hughes Medical Institute (HHMI), USA); > > · Paul Verschure, (Director, the Lab of SPECS at Universitat Pompeu Fabra (UPF), Spain); > > ===================================================== > General Chairs: > · Karl Friston, (Scientific Director, Wellcome Trust Centre for Neuroimaging, University College London, UK); > · Yike Guo, (Director of Data Science Institute, Imperial College London, UK); > > > Program Chairs: > > · Aldo Faisal, Imperial College London & MRC Clinical Sciences Centre, UK, > · Sean Hill, EPFL, Switzerland, > · Hanchuan Peng, Allen Institute for Brain Science, USA; > > > Workshop/Special-Session Chairs: > > · Andreas Holzinger, Medical University Graz & Graz University of Technology, Austria; Zhisheng Huang, Vrije University of Amsterdam, Netherlands, David Powers, Flinders University of South Australia, Australia; > > > Publicity Chairs: > > · Jessica Turner, Georgia State University, USA; Juan D. Velasquez, University of Chile, Chile; Yi Zeng, Institute of Automation, Chinese Academy of Sciences, China; > > > Local Organizing Chairs: > > · Thomas Henis, Imperial College London, UK; Kai Sun, Imperial College London, UK; Chao Wu, Imperial College London, UK; > > > Exhibition/Sponsorship Chair: > > · Caroline Li, University Kent, UK; > > > Steering Committee Co-Chairs: > > · Ning Zhong, Maebashi Institute of Technology, Japan; Jiming Liu, Hong Kong Baptist University, Hong Kong. > > > > ***************** > > Conference Theme: > > Brain informatics has emerged as a distinct field of research. It crosses the disciplines of neuroscience, cognitive science, computer science, signal processing, and neuroimaging technologies. The data driven nature of brain research made brain informatics an important field of data science. Following the success of past conferences in this series, BIH’15 will take place at Imperial College London, in UK. For the first time, BIH gathers the researchers from major international brain research projects to form a forum for reviewing the progress of brain informatics research and its applications to human health and building up international collaboration. The conference will also organise an exhibition from industrial and research community. > > > > BIH’15 draws special attention to informatics for brain science, human behaviour and health. BIH’15 will address informatics approaches to both the brain and behaviour research with a strong emphasis on emerging trends of big data analysis and management technology for brain research, behaviour learning, and real-world applications of brain science in human health and wellbeing. > > > > BIH’15 welcomes paper submissions (full paper), abstract only submissions. Both research and application papers are solicited. All submitted papers will be reviewed on the basis of technical quality, relevance, significance and clarity. Accepted full papers will be included in the proceedings by Springer LNCS/LNAI. > > > > Tutorial, Satellite symposium (workshop) and Special-Session proposals and Industry/Demo-Track papers are also welcome. > > > > ***************** > > IMPORTANT DATES: > > ***************** > > Satellite symposium proposal submission: March 15, 2015/ > > Notification of satellite symposium acceptance: March 30, 2015/ > > Submission of full papers: April 19, 2015/ > Submission of abstracts: May 20, 2015/ > > Submission of satellite symposium papers: May 20, 2015/ > > Notification of full paper acceptance: May 25, 2015/ > > Notification of abstract acceptance: June 10, 2015/ > > Notification of satellite symposium paper acceptance: June 10, 2015/ > > Tutorial proposal submission: May 15, 2015/ > > Satellite symposiums: August 30, 2015/ > > > > ================================= > > PAPER SUBMISSIONS & PUBLICATIONS: > > > > TYPE-I (Full Paper Submissions; Submission Deadline: April 5, 2015): > We accept full paper submissions with a maximum paper length of up to 10 pages, in Springer LNCS format: > > http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0. > All full length papers accepted (and all special sessions’ full length papers) will be published by Springer as a volume of the series of LNCS/LNAI. > > > > TYPE-II (Abstract Submissions; Submission Deadline: May 20, 2015): > > > > Each abstract is limited to 500 words. Experimental research is particularly welcome. Accepted abstract submissions will be included in the conference program, and will be published as a single, collective proceedings volume. > > > > Title: Include in the title of the abstract all words critical for a subject index. Write your title in sentence case (first letter is capitalized; remaining letters are lower case). Do not bold or italicize your full title. > > > > Author: List all authors who contributed to the work discussed in the abstract. The presenting author must be listed in the first author slot of the list. Be prepared to submit contact information as well as conflict of interest information for each author listed. > > > > Abstract: Enter the body of the abstract and attach any applicable graphic files or tables here. Do not re-enter the title, author, support, or other information that is collected in other steps of the submission form. > > > > Presentation Preference: Authors may select from three presentation formats when submitting an abstract: “poster only,”, “talk preferred” or “no preference.” The “talk preferred” selection indicates that you would like to give a talk, but will accept a poster format if necessary. Marking “poster only” indicates that you would not like to be considered for an oral-presentation session. Selecting “no preference” indicates the author’s willingness to be placed in the best format for the program. > > > > Each paper or abstract requires one sponsoring attendee (i.e. someone who registered and is attending the conference). A single attendee can not sponsor more than two abstracts or papers. > > > > Oral presentations will be selected from both full length papers and abstracts. > > > > *** Post-Conference Journal Publication *** > > > > The BIH conferences have the formal ties with Brain Informatics journal (Springer, http://www.springer.com/40708). Accepted papers from the conference, including their Best Paper Award papers, will be expended and revised for possible inclusion in the Brain Informatics journal each year. It is fully sponsored and no any article-processing fee charged for BIH authors. > > > Selected submissions will be considered for publication in special issues of international journals after their papers are extended to a full-length paper and pass a review process. More information can be found at http://www.bih-amt.com/publications/ > > > *** Topics and Areas *** > > > > Please find the topics and areas of interest of the 2015 International Conference on Brain Informatics and Health (BIH’15) at http://www.bih-amt.com/call-for-papers/topics/ > > > *** AMT’15 Session *** > > > > The advance of wearable sensor technology makes the monitoring of human behavior and life style becomes feasible. This development gives the active media technology a new dimension which is more closely related to the healthcare and cognitive studies. Following the success of past conferences in this series, AMT’15 will be jointly held with > > BIH’15 as a special session. > > > > *** Contact Information *** > > > > Chao Wu, Imperial College London, UK > > > > > Aldo Faisal, Imperial College London, UK > > For sponsorship, please contact: > Caroline Li (Ph.D)|Tel: +44(0)1634 202987 | E-Mail : c.li at kent.ac.uk > ==================================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.rossi76 at yahoo.it Thu Mar 26 08:48:38 2015 From: martina.rossi76 at yahoo.it (Martina Rossi) Date: Thu, 26 Mar 2015 07:48:38 +0000 (UTC) Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: Message-ID: <1202116823.2558923.1427356118074.JavaMail.yahoo@mail.yahoo.com> Hi David, Thank so much for the reference and all the useful details, indeed very helpful :) Best,Martina Il Lunedì 23 Marzo 2015 5:03, David Groppe ha scritto: Hi Martina,    Balanced sample sizes are typically recommended for conventional parametric independent samples tests (e.g., t-tests, ANOVAs) because it makes the tests less sensitive to differences in variation between the populations being compared. If the populations being compared differ in variance, having more observations from the population with less variability will make these tests overly permissive (i.e., the true false positive rate will be greater than your nominal alpha level). If you have more observations from the population with greater variability, the tests become overly conservative.    A few years ago, my colleagues and I simulated some EEG data and found that permutation tests exhibit a qualitatively similar sensitivity to differences in variance between populations (see below). If you're concerned about such a difference in your data you could do as has already been suggested and use a subset of data so that the number of observations between samples is the same. Alternatively you could use a permutation test based on variants of the t-statistic that are less sensitive to differences in variance. In our paper below, we investigated two variants, Welch's t and t_dif. Welch's t proved a bit less sensitive to differences in variance and was only slightly less powerful than the conventional t-statistic. t_dif was markedly insensitive to differences in variance but was significantly less powerful. However, I would guess that using t_dif or Welch's t are likely more powerful than discarding trials (though we didn't investigate that option in the paper).       cheers,          -David Groppe, D.M., Urbach, T.P., & Kutas, M. (2011) Mass univariate analysis of event-related brain potentials/fields II: Simulation studies. Psychophysiology, 48(12) pp. 1726-1737, DOI: 10.1111/j.1469-8986.2011.01272.x. www.cogsci.ucsd.edu/~dgroppe/PUBLICATIONS/mass_uni_preprint2.pdf On Thu, Mar 19, 2015 at 4:06 AM, Martina Rossi wrote: Dear Stephen and Joram, Thank so much for your feedback,I will check out the suggested material, Best,Martina Il Mercoledì 18 Marzo 2015 20:43, Stephen Whitmarsh ha scritto: You can also check out this video of Robert. Apologies for the quality - not of the talk, but of the recording :-) At 14:45 he actually mentions unequal number of trials between conditions. https://www.youtube.com/watch?v=vOSfabsDUNg Cheers, Stephen On 18 March 2015 at 19:33, Stephen Whitmarsh wrote: I should add that (1) is typically done within subjects, and (2) over subjects. Cheers, Stephen  On 18 March 2015 at 19:20, Stephen Whitmarsh wrote: Dear Martina, It might help to distinguish two aspects of cluster-based statistic. 1) the statistical approuch that you will use to determine whether a time-channel-datapoint / time-frequency-channel-datapoint / time-frequency-voxel-datapoint is considered significant different between conditions. 2) the statistical approuch that you will use to determine whether a cluster of time-channel-datapoints / time-frequency-channel-datapoints / time-frequency-voxel-datapoints is considered significantly different between conditions. When you talk about cluster statistics, you probably think about the second part. But this might not be what you should initially be concerned with when thinking about e.g. different numbers of trials between conditions. Rather, consider what statistical tests you (can) use to compare your time-frequency values between conditions (within subjects). This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any test, for that matter. As far as my limited knowledge of statistics goes, in most simple and non-extreme cases, unequal number of trials that does not have to increase your chance of type I errors, rather that of type 2 (you'll be insensitive to differences if you don't have enough observations in one condition due to noisy estimate of means/distribution). But in any case it's a simple question to google or ask a statistician. Now, after you are happy with and confident about the between conditions statistical test, consider how the cluster statistics might help you. First of all, how does it determine whether a cluster is significantly different between conditions? There are different options, but the gist is that it takes your significant statistical numbers of step (1), adds them up when they belong to the same cluster (based on whether they are neigbourings in time/freq/space with other significant numbers), takes the maximum of these summed up clusters (there might be more than one cluster), and then compares this one value to the same taken from a(non-parametric) monte-carlo distribution of the null hypothesis based on permuting the values over conditions (and then calculating the maximum sum). The Maris and Oostenveld paper explains it in more detail. The reason for doing cluster-statistics is that its a smart way of dealing with multiple comparisons over many time x frequency x channels (or space). The method is blind for your decisions about how its computed for each point in time x frequency x channels (or space). I find the FieldTrip statistics functions, their configurations etc., and the way they interact confusing at times, but I hope this helps to clear it up a bit. Long story short - I think your question does not limit itself to cluster statistics and at the same time is much simpler. It's all about (1).  Best wishes, Stephen There are two separate steps cluster statistics (as implemented in FieldTrip, but in general as well). On 18 March 2015 at 14:51, Joram van Driel wrote: Hi Martina, In general, I'd advice to do some kind of trial-selection procedure when comparing error versus correct trials, in order to trial-count-match the two conditions. Otherwise you run into problems considering: SNR (higher for the correct condition), and RT (errors are usually faster, resulting in a time-on-task confound). What I always do is pick from the correct condition a similar number of trials that are close to the RT distribution of the error trials (i.e. the faster correct trials). That way you solve both problems at once (and probably the cluster-based permutation test in field trip will work as well, as a bonus ;)). Best,Joram On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi wrote: Dear All, I would like to get some feedback from the community about a statistical analysis problem I need to tackle with my study.I want to apply the cluster-based permutation tests on time-frequency data considering two conditions (correct vs error).Unfortunately, these two conditions have different sizes (correct >> error).Right now, I am only considering subjects having a ratio "error/correct" bigger than 1/5, yet this is only an arbitrary threshold I set.The question is the following:is there a formal way to identify a threshold by which two conditions can be realiably compared with the cluster-based permutation tests?If the cluster-based approach is not suitable in this scenario, is there any other approach you would suggest?I shall perhaps point out that I am working on EEG data recorded with a 32 channel system (impedance levels < 10 kΩ). Looking forward to hear your feedback :) Kind Regards,Martina Rossi _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Joram van DrielPostdoc @ Vrije Universiteit AmsterdamCognitive Psychology _______________________________________________ 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 caspervanheck at gmail.com Thu Mar 26 11:23:13 2015 From: caspervanheck at gmail.com (Casper van Heck) Date: Thu, 26 Mar 2015 11:23:13 +0100 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? In-Reply-To: References: Message-ID: You probably downloaded the 'lite' version or something. Check the Fieldtrip site, especially the download page ; there are multiple options. You should make sure you download the whole thing; just putting a single function in might give odd behaviour. On Wed, Mar 25, 2015 at 4:21 PM, moran abilea wrote: > hi there, > my name is Moran Abilea, i'm a student from Israel who studies Software > Engeenering and my final project is about EEG Speller. > i want to use FieldTrip in my project, but when i tried to use ft_realtime > funcions such as ft_realtime_signal proxy i couldn't use it becuase it > isn't found in the version i downloaded from 2015 March 18. > in fact, the whole Realtime folder isn't in this version so i can't use > any of those functions > what should i do? > can someone pliz send me the folder with the source code? > thanks, > Moran > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjordanov at besa.de Thu Mar 26 11:49:35 2015 From: tjordanov at besa.de (tjordanov at besa.de) Date: Thu, 26 Mar 2015 11:49:35 +0100 Subject: [FieldTrip] Can I simulate multiple dipoles in realistic head model? In-Reply-To: References: Message-ID: <001801d067b2$8c9ec780$a5dc5680$@de> Hi Gamaliel, I don’t know how this works within FieldTrip, however, we have a free tool for simulating data also with realistic head models. If you want to try it out you could download it here: http://www.besa.de/downloads/besa-simulator/ There is an option to use realistic FEM approximations or to load your own models. However, the program is optimized to work with models generated with BESA MRI and if you want to load models generated with other tools you have to save the models in the required format. I am not sure that it is easy to adapt your models for that program but you can try. Best regards, Todor From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of gamaliel huerta urrea Sent: Dienstag, 24. März 2015 21:01 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Can I simulate multiple dipoles in realistic head model? Hi I need simulate dipolar sources in a realistic head model, however I want know if can import surfaces from freesurfer or brainstorm. I have problems to performs the segmentation and the electrodes alignment, Finally I would like to know how could simulate multiple dipoles on different parts of realistic head model to evaluate the location later. regards Gamaliel Huerta Urrea Estudiante Ingeniería Civil Biomédica Universidad de Valparaíso -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Thu Mar 26 12:27:17 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Thu, 26 Mar 2015 11:27:17 +0000 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions Message-ID: Dear colleagues, I would like to reply to this post by David: Hi Martina, Balanced sample sizes are typically recommended for conventional parametric independent samples tests (e.g., t-tests, ANOVAs) because it makes the tests less sensitive to differences in variation between the populations being compared. If the populations being compared differ in variance, having more observations from the population with less variability will make these tests overly permissive (i.e., the true false positive rate will be greater than your nominal alpha level). If you have more observations from the population with greater variability, the tests become overly conservative. A few years ago, my colleagues and I simulated some EEG data and found that permutation tests exhibit a qualitatively similar sensitivity to differences in variance between populations (see below). If you're concerned about such a difference in your data you could do as has already been suggested and use a subset of data so that the number of observations between samples is the same. Alternatively you could use a permutation test based on variants of the t-statistic that are less sensitive to differences in variance. In our paper below, we investigated two variants, Welch's t and t_dif. Welch's t proved a bit less sensitive to differences in variance and was only slightly less powerful than the conventional t-statistic. t_dif was markedly insensitive to differences in variance but was significantly less powerful. However, I would guess that using t_dif or Welch's t are likely more powerful than discarding trials (though we didn't investigate that option in the paper). cheers, -David I agree with David that the main issue with unequal sizes of the experimental conditions reduces your statistical sensitivity (as compared to the situation where the number of subjects is distributed equally over the conditions; the equal-n case). However, one should NEVER remove subjects from one experimental condition in order to obtain this equal-n case, at least not when a permutation test is being used. A permutation test controls the false alarm rate regardless of how the subjects/trials are distributed across the experimental conditions. So, the permutation test is not less sensitive, as mentioned by David, but it is completely INSENSITIVE to aspect of your design, at least when it comes to false alarm rate control. However, for every statistical test I know of, its statistical sensitivity (power) IS sensitive (notice the different meaning of the word sensitive in this second occurrence) to how the subjects/trials are distributed over the conditions. best, Eric Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcpiastra at libero.it Thu Mar 26 06:11:20 2015 From: mcpiastra at libero.it (mcpiastra) Date: Wed, 26 Mar 2015 05:11:20 +0000 Subject: [FieldTrip] =?iso-8859-1?q?mcpiastra=40libero=2Eit?= Message-ID: <8A6EE31E29158472446E98CC49F1D47D@hirojin.univnet.jp> Oilà! Ma... è da un sacco che non ci sentiamo!, http://shqiponja.net/kf/xvqagodvmdzbdqwcsrlblfdwteadhlm.kcjssufpkqnqwrbby 3/26/2015 5:11:20 PM -------------- next part -------------- An HTML attachment was scrubbed... URL: From mor2451 at gmail.com Fri Mar 27 15:44:28 2015 From: mor2451 at gmail.com (moran abilea) Date: Fri, 27 Mar 2015 17:44:28 +0300 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? In-Reply-To: References: Message-ID: maybe... can you pliz send me the "full version" rar? i can't get into the download page for a week and i don't know why that's so annoying to know that i can't get into the "download page" :( thanks for all the help and i hope the problem will be fixed very soon moran abilea On Thu, Mar 26, 2015 at 1:23 PM, Casper van Heck wrote: > You probably downloaded the 'lite' version or something. Check the > Fieldtrip site, especially the download page > ; there are multiple options. > You should make sure you download the whole thing; just putting a single > function in might give odd behaviour. > > On Wed, Mar 25, 2015 at 4:21 PM, moran abilea wrote: > >> hi there, >> my name is Moran Abilea, i'm a student from Israel who studies Software >> Engeenering and my final project is about EEG Speller. >> i want to use FieldTrip in my project, but when i tried to use >> ft_realtime funcions such as ft_realtime_signal proxy i couldn't use it >> becuase it isn't found in the version i downloaded from 2015 March 18. >> in fact, the whole Realtime folder isn't in this version so i can't use >> any of those functions >> what should i do? >> can someone pliz send me the folder with the source code? >> thanks, >> Moran >> >> _______________________________________________ >> 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 Fri Mar 27 16:22:04 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 27 Mar 2015 15:22:04 +0000 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? In-Reply-To: References: Message-ID: Moran, As was notified on this discussion list and as is mentioned on the FieldTrip website, there was anticipated downtime of the ftp-server this week due to physical migration of our lab’s compute facilities. See http://www.fieldtriptoolbox.org, and the first link that you can follow in the red banner that says: "Please be aware that there will be some website, ftp and bugzilla downtime. I expect services to be up and running again soon. Best wishes, Jan-Mathijs On Mar 27, 2015, at 3:44 PM, moran abilea > wrote: maybe... can you pliz send me the "full version" rar? i can't get into the download page for a week and i don't know why that's so annoying to know that i can't get into the "download page" :( thanks for all the help and i hope the problem will be fixed very soon moran abilea On Thu, Mar 26, 2015 at 1:23 PM, Casper van Heck > wrote: You probably downloaded the 'lite' version or something. Check the Fieldtrip site, especially the download page; there are multiple options. You should make sure you download the whole thing; just putting a single function in might give odd behaviour. On Wed, Mar 25, 2015 at 4:21 PM, moran abilea > wrote: hi there, my name is Moran Abilea, i'm a student from Israel who studies Software Engeenering and my final project is about EEG Speller. i want to use FieldTrip in my project, but when i tried to use ft_realtime funcions such as ft_realtime_signal proxy i couldn't use it becuase it isn't found in the version i downloaded from 2015 March 18. in fact, the whole Realtime folder isn't in this version so i can't use any of those functions what should i do? can someone pliz send me the folder with the source code? thanks, Moran _______________________________________________ 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 mor2451 at gmail.com Fri Mar 27 16:28:36 2015 From: mor2451 at gmail.com (moran abilea) Date: Fri, 27 Mar 2015 15:28:36 +0000 Subject: [FieldTrip] general questions about the FieldTrip Message-ID: hi again, i have another question/s, but this time they are genra. but first let me explain what i need from field trip: i'm working for extracting from 14 channels EPOC Emotive the EEG raw data as contious data, send trigger if i want to display the raw data or not and then process the data with SVM. all this process is for creating EEG speller in Matlab. so my questions are: 1. i assume the field trip has constant "delay", the delay i reffer to is between the time of view the signal and the real time data transfer in the buffer. does anyone knows what is the delay time somehow? 2. where can i find how to open stream for a file? 3. using triggers: can i send time stamp in my configuration in order to know when to display the data that i need for the EEG speller? 4. what to do in order to use the EPOC Emotive? do i need to set some new configurations for matlab? to download any SDK? etc any kind of help will be welcomed, Moran Abilea -------------- next part -------------- An HTML attachment was scrubbed... URL: From mor2451 at gmail.com Fri Mar 27 16:30:31 2015 From: mor2451 at gmail.com (moran abilea) Date: Fri, 27 Mar 2015 18:30:31 +0300 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? In-Reply-To: References: Message-ID: yeah i noticed that, i just forgot when this will be ended thanks, Moran Abilea On Fri, Mar 27, 2015 at 6:22 PM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Moran, > > As was notified on this discussion list and as is mentioned on the > FieldTrip website, there was anticipated downtime of the ftp-server this > week due to physical migration of our lab’s compute facilities. > See http://www.fieldtriptoolbox.org, and the first link that you can > follow in the red banner that says: "Please be aware that there will be > some website, ftp and bugzilla downtime. > I expect services to be up and running again soon. > > Best wishes, > Jan-Mathijs > > > > > On Mar 27, 2015, at 3:44 PM, moran abilea wrote: > > maybe... > can you pliz send me the "full version" rar? i can't get into the download > page for a week and i don't know why that's so annoying to know that i > can't get into the "download page" :( > thanks for all the help and i hope the problem will be fixed very soon > moran abilea > > On Thu, Mar 26, 2015 at 1:23 PM, Casper van Heck > wrote: > >> You probably downloaded the 'lite' version or something. Check the >> Fieldtrip site, especially the download page >> ; there are multiple options. >> You should make sure you download the whole thing; just putting a single >> function in might give odd behaviour. >> >> On Wed, Mar 25, 2015 at 4:21 PM, moran abilea wrote: >> >>> hi there, >>> my name is Moran Abilea, i'm a student from Israel who studies Software >>> Engeenering and my final project is about EEG Speller. >>> i want to use FieldTrip in my project, but when i tried to use >>> ft_realtime funcions such as ft_realtime_signal proxy i couldn't use it >>> becuase it isn't found in the version i downloaded from 2015 March 18. >>> in fact, the whole Realtime folder isn't in this version so i can't use >>> any of those functions >>> what should i do? >>> can someone pliz send me the folder with the source code? >>> thanks, >>> Moran >>> >>> _______________________________________________ >>> 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 r.oostenveld at donders.ru.nl Fri Mar 27 16:53:34 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 27 Mar 2015 16:53:34 +0100 Subject: [FieldTrip] general questions about the FieldTrip In-Reply-To: References: Message-ID: Hi Moran 1) The fieldtrip buffer by itself has a delay that can be as small as 5ms. But the actual delay in the data stream from the electronics to the MATLAB side of the buffer depends on quite a number of parameters and can be much larger. Sending data in blocks (i.e. multiple samples are bufferend and sent in one go), bluetooth and USB all cause delays before you are able to process the samples in the data block. Even the USB connection and whether you are sharing it with another device (i.e. mouse or USB hard drive on the same USB hubor port) can affect the delay and can cause jitter (variation in the delay). I suggest you look at http://www.fieldtriptoolbox.org/example/measuring_the_timing_delay_and_jitter_for_a_real-time_application for a demonstration how you can quantify the That page has data for our CTF MEG system, which has a blocksize of ~100ms and does some online processing (head localization) prior to forwarding the data, hence the delay of 150ms that we see here makes sense. 2) On http://www.fieldtriptoolbox.org/getting_started/realtime you can find some getting started instructions. Reading data from a file rather than from a realitme buffer just means that you specify the name of the file. If you look at http://www.fieldtriptoolbox.org/example/ft_realtime_signalviewer you can see how you can simulate a real time data stream. Just replace cfg.dataset with an EEG file name in ft_realtime_signalviewer and you are not plotting real time data, but data from file. 3) your P300 application can send events to the fieldtrip buffer and the signal processing application can read them and act upon the data referred to in the events. You can also make a single application that does both, or make two applications that communicate events separate from the data stream. 4) I recall that some emotiv software needed to be installed, but don’t know whether that requires the full SDK to be installed. I don’t have an emotiv epoc myself. Please see http://www.fieldtriptoolbox.org/development/realtime/emotiv and feel free to add your findings to that (wiki) page. best regards, Robert On 27 Mar 2015, at 16:28, moran abilea wrote: > hi again, > > i have another question/s, but this time they are genra. > but first let me explain what i need from field trip: i'm working for extracting from 14 channels EPOC Emotive the EEG raw data as contious data, send trigger if i want to display the raw data or not and then process the data with SVM. all this process is for creating EEG speller in Matlab. > > so my questions are: > > 1. i assume the field trip has constant "delay", the delay i reffer to is between the time of view the signal and the real time data transfer in the buffer. does anyone knows what is the delay time somehow? > > 2. where can i find how to open stream for a file? > > 3. using triggers: can i send time stamp in my configuration in order to know when to display the data that i need for the EEG speller? > > 4. what to do in order to use the EPOC Emotive? do i need to set some new configurations for matlab? to download any SDK? etc > > any kind of help will be welcomed, > Moran Abilea > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From S.Pizzamiglio at uel.ac.uk Sat Mar 28 14:04:44 2015 From: S.Pizzamiglio at uel.ac.uk (Sara Pizzamiglio) Date: Sat, 28 Mar 2015 13:04:44 +0000 Subject: [FieldTrip] Missing channel repair through triangulation - *.sfp files Message-ID: <023526F16D67EC43A4FE7F302F5A2D0E1C93F9F1@ST-EXMB1.uel.ac.uk> Dear all, I am trying to reconstruct two missing channels from my dataset through the function channelrepair and the triangulation method. In order to do that the electrode layout has to be specified in the structure: cfg.layout = '*.sfp'; I am recording data through an ANT system (ASA 4.5 software) and I am using a 128 channels + HEOG and VEOG WaveGuard cap from ant-neuro, which should be a 10-10 layout. Which *.sfp file should I use to represent my electrodes layout and reconstruct my missing channels?! Thank you :) --------------------------------------------------------------------------------------- This email has been scanned for email related threats and delivered safely by Mimecast. For more information please visit http://www.mimecast.com --------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From tamaonvaliaikainenmaili at gmail.com Sat Mar 28 14:54:13 2015 From: tamaonvaliaikainenmaili at gmail.com (hm ham) Date: Sat, 28 Mar 2015 15:54:13 +0200 Subject: [FieldTrip] EEG MNE with standard_bem and statistics sanity Message-ID: Hello fellow fieldtrippers, I'm using fieldtrip to do a MNE for EEG data with no subject MRIs and I have a few questions to which I can't get a straight answer from tutorials or from mailing list history. I guess this is sort of a sanity check. First, I'm wondering about the correct sourcemodel, as loading the standard_bem and setting the third mesh as the source points in ft_prepare_leadfield gives an error: Warning: dipole lies on boundary of volume model. Code: % Electrodes, vol, sourcemodel all set in same scale with ft_convert_units vol = load('standard_bem'); cfg = []; cfg.elec = elec_aligned; % electrodes aligned to skin surface cfg.grid.pos = vol.bnd(3).pnt; % source points cfg.grid.inside = 1:size(vol.bnd(3).pnt,1); cfg.vol = vol; cfg.reducerank = 3; leadfield = ft_prepare_leadfield(cfg); Using the code below works: vol = load('standard_bem'); sourcemodel = ft_read_headshape('cortex_8196.surf.gii'); cfg = []; cfg.elec = elec_aligned; % electrodes aligned to skin surface cfg.grid.pos = sourcemodel; % source points cfg.grid.inside = 1:size(sourcemodel,1); cfg.vol = vol; cfg.reducerank = 3; leadfield = ft_prepare_leadfield(cfg); But as the http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg seems to suggest the third mesh in vol should be the brain? Or is the third compartment there just for conduction calculations? As using the sourcemodel 'cortex_8196.surf.gii' at least gave an output I went forward with those for now, to see what other problems I'd encounter. Running the MNE: cfg = []; cfg.elec = elec_aligned; cfg.method = 'mne'; cfg.grid = leadfield; cfg.vol = vol; cfg.mne.prewhiten = 'yes'; cfg.mne.lambda = 60; %Hmmm? cfg.mne.scalesourcecov = 'yes'; cfg.mne.normalize = 'yes'; cfg.channel = 'all'; cond_12_source{subject_id} = ft_sourceanalysis(cfg,cond_12{subject_id}); So secondly, I'm concerned with the lambda value, as different tutorials give very different advice ranging from 3 to 1e8. Running the MNE with 3 seems to give very unstable results when comparing the results between subjects or conditions. The data is somewhat contaminated with leftover eye-movement artefacts (removed with ICA). And that 3 is from the tutorial where the data is from MEG. So a bigger lambda is in order, but how big? Or just let the minimumnormestimate.m calculate it from the data? I have to point out that the eye-movements are somewhat spread around the trial durations and not present in the calculation window of the .cov field from ft_timelockanalysis. Should I maybe calculate the .cov field from the whole trial? Third, there has been talk of MNE statistics in the mailing list, and it seems that the ft_timelockstatistics will do the job if a neighbours structure is provided. I build the neighbours structure from the sourcemodel mesh like this: sourcemodel = ft_read_headshape('cortex_8196.surf.gii'); nsources = length(sourcemodel.pnt); neighbours=struct; for i=1:nsources neighbours(i).label = num2str(i); neighb_nodes = sourcemodel.tri((sourcemodel.tri(:,1)==i | sourcemodel.tri(:,2)==i | sourcemodel.tri(:,3)==i),:); neighb_nodes = unique(neighb_nodes)'; idx = (neighb_nodes ~= i); neighb_nodes = neighb_nodes(idx); for k=1:length(neighb_nodes) neighbours(i).neighblabel{k} = num2str(neighb_nodes(k)); end end This seemed to give reasonable neighbours and just going by distance gave some sources that were on the other side of a gyrus. Although now the distances are not uniform. I also had to tweak the data structures a little bit, labels and such. Then I ran the tests with: cfg=[]; cfg.parameter = 'avg.pow'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg'; cfg.correctm = 'cluster'; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.numrandomization = 1000; cfg.tail = 1; cfg.correcttail ='alpha'; cfg.alpha = 0.05; cfg.latency = [0.4 0.5]; cfg.avgovertime = 'yes'; cfg.neighbours = neighbours; cfg.design = [1:15 1:15;ones(1,15), ones(1,15)*2]; cfg.uvar = 1; cfg.ivar = 2; cond1_stat = ft_timelockstatistics(cfg, cond_11_source{:}, cond_12_source{:}); Looking at the resulting clusters from ft_timelockstatistics there were clusters that when plotted showed disconnected sources. For example, plotted like this for the first cluster: paint = ones(8196,3); indx = find(cond1_stat.posclusterslabelmat == 1); paint(indx,2) = 0; ft_plot_mesh(sourcemodel,'vertexcolor',paint); Gave the output in the attachment, in that case the third source is atleast close, but still not a neighbour to the two next to it. Is there maybe something I'm missing with using the ft_timelockstatistics like this? I hope someone can clarify some of these issues. Thank you already in advance! Tatu -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: disconnected_cluster.png Type: image/png Size: 83016 bytes Desc: not available URL: From mor2451 at gmail.com Sun Mar 29 14:11:38 2015 From: mor2451 at gmail.com (moran abilea) Date: Sun, 29 Mar 2015 15:11:38 +0300 Subject: [FieldTrip] general questions about the FieldTrip In-Reply-To: References: Message-ID: thanks a lot Robert one more question if i may: are there any spesific set of functions on Matlab FieldTrip or even a sequence of algorithms in order to make P300 extractions for my p300 speller? best regards, Moran Abilea On Fri, Mar 27, 2015 at 6:53 PM, Robert Oostenveld < r.oostenveld at donders.ru.nl> wrote: > Hi Moran > > 1) The fieldtrip buffer by itself has a delay that can be as small as 5ms. > But the actual delay in the data stream from the electronics to the MATLAB > side of the buffer depends on quite a number of parameters and can be much > larger. Sending data in blocks (i.e. multiple samples are bufferend and > sent in one go), bluetooth and USB all cause delays before you are able to > process the samples in the data block. Even the USB connection and whether > you are sharing it with another device (i.e. mouse or USB hard drive on the > same USB hubor port) can affect the delay and can cause jitter (variation > in the delay). I suggest you look at > http://www.fieldtriptoolbox.org/example/measuring_the_timing_delay_and_jitter_for_a_real-time_application > for a demonstration how you can quantify the That page has data for our CTF > MEG system, which has a blocksize of ~100ms and does some online processing > (head localization) prior to forwarding the data, hence the delay of 150ms > that we see here makes sense. > > 2) On http://www.fieldtriptoolbox.org/getting_started/realtime you can > find some getting started instructions. Reading data from a file rather > than from a realitme buffer just means that you specify the name of the > file. If you look at > http://www.fieldtriptoolbox.org/example/ft_realtime_signalviewer you can > see how you can simulate a real time data stream. Just replace cfg.dataset > with an EEG file name in ft_realtime_signalviewer and you are not plotting > real time data, but data from file. > > 3) your P300 application can send events to the fieldtrip buffer and the > signal processing application can read them and act upon the data referred > to in the events. You can also make a single application that does both, or > make two applications that communicate events separate from the data stream. > > 4) I recall that some emotiv software needed to be installed, but don’t > know whether that requires the full SDK to be installed. I don’t have an > emotiv epoc myself. Please see > http://www.fieldtriptoolbox.org/development/realtime/emotiv and feel free > to add your findings to that (wiki) page. > > best regards, > Robert > > > > On 27 Mar 2015, at 16:28, moran abilea wrote: > > > hi again, > > > > i have another question/s, but this time they are genra. > > but first let me explain what i need from field trip: i'm working for > extracting from 14 channels EPOC Emotive the EEG raw data as contious data, > send trigger if i want to display the raw data or not and then process the > data with SVM. all this process is for creating EEG speller in Matlab. > > > > so my questions are: > > > > 1. i assume the field trip has constant "delay", the delay i reffer to > is between the time of view the signal and the real time data transfer in > the buffer. does anyone knows what is the delay time somehow? > > > > 2. where can i find how to open stream for a file? > > > > 3. using triggers: can i send time stamp in my configuration in order to > know when to display the data that i need for the EEG speller? > > > > 4. what to do in order to use the EPOC Emotive? do i need to set some > new configurations for matlab? to download any SDK? etc > > > > any kind of help will be welcomed, > > Moran Abilea > > _______________________________________________ > > 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 Caroline.Lustenberger at kispi.uzh.ch Mon Mar 30 20:12:30 2015 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Mon, 30 Mar 2015 18:12:30 +0000 Subject: [FieldTrip] Postdoctoral Position at UNC-Chapel Hill in Human Electrophysiology (EEG, tDCS/tACS, TMS) Message-ID: <7C66D90E0C18014E85B44B560D4D5BC8E46F91D0@EXZH2VM.kispi.int> Postdoctoral Position at UNC-Chapel Hill in Human Electrophysiology (EEG, tDCS/tACS, TMS) We are seeking to fill one postdoctoral position in human electrophysiology in the Frohlich Lab (www.frohlichlab.org) at the University of North Carolina at Chapel Hill. We are a rapidly growing lab that aims to understand how cortical network dynamics emerge and how these dynamics can be modulated with brain stimulation. We have received grant funding to further grow our human electrophysiology team in the lab. In particular, we are interested in understanding how (feedback) non-invasive brain stimulation alters cortical network dynamics that mediate cognition. The successful applicant will employ tDCS/tACS, EEG, TMS, and cognitive testing for elucidating the functional role of cortical oscillations in cognition and for the development of novel strategies to enhance brain function and treat cognitive deficits in psychiatric disorders such as schizophrenia and autism. The successful candidate has a PhD in neuroscience or related discipline and a track record of first class science demonstrated by first-author, peer-reviewed scientific articles in the area of human neurophysiology. Documented skills in EEG and cognitive assays are a prerequisite; programming and data analysis skills are essential. We will provide training in non-invasive brain stimulation methods. Please send your CV and a brief statement of research interest to flavio_frohlich at med.unc.edu . Also, please have two letters of recommendation directly submitted to the same email address. We are looking forward to meeting passionate and hard-working applicants who are ready for cutting-edge human neuroscience research. The Frohlich Lab takes pride in its high-quality science, productive work environment, and culture of mentoring and collaboration. The Frohlich aims to be a leading force in the emerging field of network neuroscience. The Frohlich Lab is a unique environment due to the vertical integration of computer simulations, slice electrophysiology, in vivo electrophysiology, human EEG and brain stimulation studies, and clinical trials. Applications will be immediately reviewed until the position is filled. Start date is flexible but the earlier the better. From orionblue8 at gmail.com Mon Mar 30 20:17:18 2015 From: orionblue8 at gmail.com (Orion) Date: Mon, 30 Mar 2015 13:17:18 -0500 Subject: [FieldTrip] discussion about how gamma power is calculated Message-ID: Hi This is not really a question about how to use Fieldtrip but I was wondering if anyone in the Fieldtrip community likes to calculate the "running gamma power"? This is what I call the parameter that I got after doing a power analysis on each trial, and then to simplify the data by one dimension (and rather than make a time-frequency plot), I averaged the bins within the 35-45 Hz or 30-94 Hz band. With a plot of the running gamma power, I can see where the "gamma power goes up or down as a function of time" to say it very roughly. Does anyone look at running gamma power or other running EEG parameters? Orion -------------- next part -------------- An HTML attachment was scrubbed... URL: From joscha.schmiedt at esi-frankfurt.de Tue Mar 31 15:09:43 2015 From: joscha.schmiedt at esi-frankfurt.de (Schmiedt, Joscha) Date: Tue, 31 Mar 2015 13:09:43 +0000 Subject: [FieldTrip] A Fieldtrip data format? Message-ID: <5548CAB3-F9A2-4C6B-B958-3CF27CF2C27F@esi-frankfurt.de> Hi, When working with Fieldtrip it is very convenient to store the data and analyses using MATLAB’s save and load functions. However, for large and/or complex data with many channels (>2GB) MATLAB enforces compression, which is pretty useless for electrophysiology data and slows down the load and save performance by a factor of up to 8 (see e.g. http://undocumentedmatlab.com/blog/improving-save-performance). The MATLAB file format is based on HDF5, which is generally an open and future-proof data format, but unfortunately MATLAB doesn’t allow you to disable the compression. An option to overcome this could be to develop a simple data format for Fieldtrip data that is also based on HDF5. Is or has there been any development going into that direction? Would there be any interest? Of course, creating yet another data format is almost never a good idea (https://xkcd.com/927/), but since HDF5 is well-documented and readable with almost any software, it might be worth thinking about it. I’d be happy to hear your thoughts. Joscha --------------------------------- Joscha Schmiedt PhD Student Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstraße 46 60528 Frankfurt am Main Germany Tel.: +49 (0)69 96769 241 Sitz der Gesellschaft: Frankfurt am Main Registergericht: Amtsgericht Frankfurt - HRB 84266 Geschäftsführer: Prof. Dr. Pascal Fries -------------- next part -------------- An HTML attachment was scrubbed... URL: From pjstienen at gmail.com Tue Mar 31 17:52:20 2015 From: pjstienen at gmail.com (Peter Stienen) Date: Tue, 31 Mar 2015 17:52:20 +0200 Subject: [FieldTrip] jack estimates of the standard error of the debiased wpli Message-ID: Hi users, I read in some papers that to test whether the debiased wpli significantly exceeds from zero, computing the jack-knife estimates of the standard error of the debiased wpli can be used. I can calculate the dbwpli/jack-knife estimates. However, does someone know what steps need to be followed to calculate the p-value from these estimates with regard to the normal distribution? Thanks in advance, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From gio at gpiantoni.com Tue Mar 31 22:39:52 2015 From: gio at gpiantoni.com (Gio Piantoni) Date: Tue, 31 Mar 2015 16:39:52 -0400 Subject: [FieldTrip] A Fieldtrip data format? In-Reply-To: <5548CAB3-F9A2-4C6B-B958-3CF27CF2C27F@esi-frankfurt.de> References: <5548CAB3-F9A2-4C6B-B958-3CF27CF2C27F@esi-frankfurt.de> Message-ID: Hi Joscha, FieldTrip already has its own simple uncompressed file format. fcdc_matbin "It is not an official file format, but was invented here at the FCDC. It consists of two files: a *.mat matlab file that contains the header (and optionally the events) and a *.bin binary file that contains the data." http://www.fieldtriptoolbox.org/faq/reading_is_slow_can_i_write_my_raw_data_to_a_more_efficient_file_format If you want to look at the code: https://github.com/fieldtrip/fieldtrip/blob/master/fileio/ft_write_data.m#L275 You should be able to read it as usual with ft_preprocessing. You can convert your files to the fcdc_matbin using ft_preprocessing as well: https://github.com/fieldtrip/fieldtrip/blob/master/ft_preprocessing.m#L581 Be careful about not losing precision though. The only catch is that, as far as I know, you cannot export your preprocessed data through ft_preprocessing at the moment, because ft_write_data is now inside this if-part: https://github.com/fieldtrip/fieldtrip/blob/master/ft_preprocessing.m#L252 but it's only a matter of adapting that to your needs. Would this work for you? -g On Tue, Mar 31, 2015 at 9:09 AM, Schmiedt, Joscha wrote: > Hi, > > When working with Fieldtrip it is very convenient to store the data and > analyses using MATLAB’s save and load functions. However, for large and/or > complex data with many channels (>2GB) MATLAB enforces compression, which is > pretty useless for electrophysiology data and slows down the load and save > performance by a factor of up to 8 (see e.g. > http://undocumentedmatlab.com/blog/improving-save-performance). The MATLAB > file format is based on HDF5, which is generally an open and future-proof > data format, but unfortunately MATLAB doesn’t allow you to disable the > compression. > > An option to overcome this could be to develop a simple data format for > Fieldtrip data that is also based on HDF5. Is or has there been any > development going into that direction? Would there be any interest? Of > course, creating yet another data format is almost never a good idea > (https://xkcd.com/927/), but since HDF5 is well-documented and readable with > almost any software, it might be worth thinking about it. > > I’d be happy to hear your thoughts. > > Joscha > > --------------------------------- > Joscha Schmiedt > PhD Student > > Ernst Strüngmann Institute (ESI) for Neuroscience > in Cooperation with Max Planck Society > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > Tel.: +49 (0)69 96769 241 > > Sitz der Gesellschaft: Frankfurt am Main > Registergericht: Amtsgericht Frankfurt - HRB 84266 > Geschäftsführer: Prof. Dr. Pascal Fries > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From shlomitbeker at gmail.com Sun Mar 1 11:38:04 2015 From: shlomitbeker at gmail.com (shlomit beker) Date: Sun, 1 Mar 2015 12:38:04 +0200 Subject: [FieldTrip] Fwd: interpolation In-Reply-To: References: Message-ID: Hi Fieldtrippers, We would like to use the ft_channelrepair(cfg, data) function. However we don't understand how to load or convert the electrode positions into FieldTrip. We tried FT_READ_SENS and we looked in FT_DATATYPE_SENS, however there are two positions variables described in this structure: The structure for EEG or ECoG channels contains sens.label = Mx1 cell-array with channel labels sens.chanpos = Mx3 matrix with channel positions sens.tra = MxN matrix to combine electrodes into channels sens.elecpos = Nx3 matrix with electrode positions what do the third field mean? what is the difference between the second and the fourth? our format is the attached. Thanks a lot! Omer and Shlomit -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- Name,X,Y,Z Nas,10.761088,100.987892,90.000000 Fid1,8.695332,115.625073,176.681312 Fid2,8.695332,115.625073,3.318688 E1,9.068730,103.978420,37.707197 E2,9.114712,90.880337,44.644806 E3,9.361927,78.971692,51.666010 E4,9.843311,68.234033,58.246154 E5,9.968636,56.448903,64.170813 E6,9.762819,44.501384,70.779258 E7,9.736243,33.341175,77.164587 E8,9.461169,22.339155,90.000000 E9,9.393823,11.688124,127.306400 E10,9.596665,99.083916,51.181915 E11,9.799699,87.625858,58.772025 E12,10.150354,75.650698,66.764771 E13,10.329451,64.842882,73.805812 E14,10.204397,53.557241,81.358250 E15,9.971271,43.089788,90.000000 E16,9.736243,33.341175,102.835413 E17,9.327410,23.433595,128.232998 E18,10.285052,94.969684,66.627057 E19,10.451891,85.323609,74.020032 E20,10.554640,74.345445,81.959600 E21,10.493970,63.646916,90.000000 E22,10.204397,53.557241,98.641750 E23,9.762819,44.501384,109.220742 E24,9.460075,35.802015,127.184539 E25,10.761203,93.256919,82.537006 E26,10.737137,84.626981,90.000000 E27,10.554640,74.345445,98.040400 E28,10.329451,64.842882,106.194188 E29,9.968636,56.448903,115.829187 E30,9.542844,48.782128,128.803911 E31,10.761088,100.987892,90.000000 E32,10.761203,93.256919,97.462994 E33,10.451891,85.323609,105.979968 E34,10.150354,75.650698,113.235229 E35,9.843311,68.234033,121.753846 E36,9.489548,59.767036,128.506861 E37,10.285052,94.969684,113.372943 E38,9.799699,87.625858,121.227975 E39,9.361927,78.971692,128.333990 E40,9.289732,69.218001,135.265515 E41,9.174187,58.028484,140.607176 E42,9.110028,46.015012,144.545390 E43,9.194459,35.248893,151.004325 E44,9.245175,23.565055,163.150912 E45,9.519999,12.655780,-162.995385 E46,9.596665,99.083916,128.818085 E47,9.114712,90.880337,135.355194 E48,8.888349,81.541526,142.505900 E49,8.766982,70.553645,149.196493 E50,8.937092,57.757292,155.268609 E51,8.948103,45.798798,162.376857 E52,9.201641,35.533103,173.549301 E53,9.429451,24.404072,-162.897520 E54,9.068730,103.978420,142.292803 E55,8.544581,94.102449,149.140746 E56,8.407718,82.866049,156.727661 E57,8.448040,70.514560,163.198903 E58,8.789435,58.413164,169.661560 E59,9.158021,47.049896,179.486799 E60,9.362286,37.036840,-163.384897 E61,8.516790,107.206103,157.957711 E62,8.080266,95.733921,165.130055 E63,8.118717,83.114481,171.384465 E64,8.543094,70.969564,177.153328 E65,8.908092,58.914546,-175.727138 E66,9.241572,50.079575,-164.070749 E67,8.927417,117.929963,167.252636 E68,8.197103,107.541586,172.257951 E69,7.996945,96.966345,179.478854 E70,8.068305,84.010193,-174.621726 E71,8.652928,71.346909,-169.436606 E72,9.004535,61.451643,-163.008828 E73,9.628421,128.245098,174.452905 E74,8.036446,96.625147,-166.664055 E75,8.330712,82.410129,-160.681967 E76,8.754403,70.242276,-154.914699 E77,9.248635,58.051265,-151.084656 E78,9.448291,46.355151,-145.769307 E79,9.636802,34.372686,-139.298073 E80,9.664407,22.564014,-127.091178 E81,9.655237,11.581130,-90.000000 E82,10.250036,135.807463,-176.052657 E83,8.452797,104.970004,-154.643174 E84,8.398554,93.510940,-153.804656 E85,8.697863,79.951488,-146.625956 E86,8.986969,67.266726,-141.514246 E87,9.523079,54.708062,-135.357926 E88,9.662776,43.194025,-127.629054 E89,9.873964,33.093355,-115.196067 E90,9.772684,22.513364,-90.000000 E91,11.209512,140.858593,-164.724066 E92,9.953439,132.677283,-157.091965 E93,9.345515,122.472442,-149.362984 E94,9.048487,113.092378,-147.673636 E95,8.809199,102.376386,-144.333841 E96,8.802170,89.333825,-139.329298 E97,9.076291,77.056949,-132.433685 E98,9.328702,65.143177,-127.120079 E99,9.510178,53.647360,-119.332693 E100,9.737640,43.061469,-108.855494 E101,9.974535,45.796457,-90.000000 E102,11.070044,137.842245,-149.017953 E103,10.126681,129.903495,-143.484820 E104,9.515842,119.452381,-137.378714 E105,9.308613,110.495171,-136.400673 E106,9.127194,98.843252,-131.569691 E107,9.220070,87.101247,-124.662235 E108,9.482746,75.436770,-117.873771 E109,9.736341,64.313078,-111.689838 E110,9.683126,53.985361,-102.774215 E111,11.202016,133.765789,-134.159266 E112,10.424872,126.267465,-129.861499 E113,9.908772,115.854503,-124.751714 E114,9.581553,107.460011,-125.232011 E115,9.611033,96.242245,-115.653419 E116,9.693262,85.154510,-108.929065 E117,9.794087,74.475751,-101.894590 E118,9.732708,64.838287,-97.128130 E119,9.695185,56.572691,-90.000000 E120,11.444011,131.143470,-123.097866 E121,10.622781,123.374443,-118.289050 E122,10.164092,113.435521,-112.856727 E123,10.118012,101.166200,-107.755713 E124,9.976019,93.664171,-102.775604 E125,9.816153,84.418877,-95.974152 E126,9.576882,74.578215,-90.000000 E127,9.732708,64.838287,-82.871870 E128,9.683126,53.985361,-77.225785 E129,9.737640,43.061469,-71.144506 E130,9.873964,33.093355,-64.803933 E131,9.664407,22.564014,-52.908822 E132,9.519999,12.655780,-17.004615 E133,11.491151,126.446312,-111.956693 E134,10.874564,120.711204,-106.883216 E135,10.366114,109.439090,-101.998030 E136,9.920603,102.874904,-95.451838 E137,9.626237,95.282718,-90.000000 E138,9.816153,84.418877,-84.025848 E139,9.794087,74.475751,-78.105410 E140,9.736341,64.313078,-68.310162 E141,9.510178,53.647360,-60.667307 E142,9.662776,43.194025,-52.370946 E143,9.636802,34.372686,-40.701927 E144,9.429451,24.404072,-17.102480 E145,11.610060,125.845626,-101.556299 E146,11.034271,119.617688,-96.350943 E147,10.232012,112.054734,-90.000000 E148,9.920603,102.874904,-84.548162 E149,9.976019,93.664171,-77.224396 E150,9.693262,85.154510,-71.070935 E151,9.482746,75.436770,-62.126229 E152,9.328702,65.143177,-52.879921 E153,9.523079,54.708062,-44.642074 E154,9.448291,46.355151,-34.230693 E155,9.362286,37.036840,-16.615103 E156,11.034271,119.617688,-83.649057 E157,10.366114,109.439090,-78.001970 E158,10.118012,101.166200,-72.244287 E159,9.611033,96.242245,-64.346581 E160,9.220070,87.101247,-55.337765 E161,9.076291,77.056949,-47.566315 E162,8.986969,67.266726,-38.485754 E163,9.248635,58.051265,-28.915344 E164,9.241572,50.079575,-15.929251 E165,11.610060,125.845626,-78.443701 E166,10.874564,120.711204,-73.116784 E167,10.164092,113.435521,-67.143273 E168,9.581553,107.460011,-54.767989 E169,9.127194,98.843252,-48.430309 E170,8.802170,89.333825,-40.670702 E171,8.697863,79.951488,-33.374044 E172,8.754403,70.242276,-25.085301 E173,9.004535,61.451643,-16.991172 E174,11.491151,126.446312,-68.043307 E175,10.622781,123.374443,-61.710950 E176,9.908772,115.854503,-55.248286 E177,9.308613,110.495171,-43.599327 E178,8.809199,102.376386,-35.666159 E179,8.398554,93.510940,-26.195344 E180,8.330712,82.410129,-19.318033 E181,8.652928,71.346909,-10.563394 E182,8.908092,58.914546,-4.272862 E183,9.158021,47.049896,0.513201 E184,9.201641,35.533103,6.450699 E185,9.245175,23.565055,16.849088 E186,9.393823,11.688124,52.693600 E187,11.444011,131.143470,-56.902134 E188,10.424872,126.267465,-50.138501 E189,9.515842,119.452381,-42.621286 E190,9.048487,113.092378,-32.326364 E191,8.452797,104.970004,-25.356826 E192,8.036446,96.625147,-13.335945 E193,8.068305,84.010193,-5.378274 E194,8.543094,70.969564,2.846672 E195,8.789435,58.413164,10.338440 E196,8.948103,45.798798,17.623143 E197,9.194459,35.248893,28.995675 E198,9.327410,23.433595,51.767002 E199,11.202016,133.765789,-45.840734 E200,10.126681,129.903495,-36.515180 E201,9.345515,122.472442,-30.637016 E202,7.996945,96.966345,0.521146 E203,8.118717,83.114481,8.615535 E204,8.448040,70.514560,16.801097 E205,8.937092,57.757292,24.731391 E206,9.110028,46.015012,35.454610 E207,9.460075,35.802015,52.815461 E208,11.070044,137.842245,-30.982047 E209,9.953439,132.677283,-22.908035 E210,8.197103,107.541586,7.742049 E211,8.080266,95.733921,14.869945 E212,8.407718,82.866049,23.272339 E213,8.766982,70.553645,30.803507 E214,9.174187,58.028484,39.392824 E215,9.542844,48.782128,51.196089 E216,11.209512,140.858593,-15.275934 E217,10.250036,135.807463,-3.947343 E218,9.628421,128.245098,5.547095 E219,8.927417,117.929963,12.747364 E220,8.516790,107.206103,22.042289 E221,8.544581,94.102449,30.859254 E222,8.888349,81.541526,37.494100 E223,9.289732,69.218001,44.734485 E224,9.489548,59.767036,51.493139 E225,9.386988,117.986216,23.067153 E226,9.914260,118.773022,33.537707 E227,10.138285,128.200139,18.488186 E228,10.859314,136.288567,10.421742 E229,11.436798,143.127527,-1.181902 E230,10.740471,122.891301,41.625351 E231,10.810450,129.588582,29.865612 E232,11.618695,136.605959,23.606353 E233,12.188049,143.300385,13.229683 E234,11.391064,125.084251,50.830892 E235,11.610218,131.264058,40.265246 E236,12.186819,137.818542,34.408687 E237,12.749106,144.638185,26.892952 E238,11.649067,125.608531,60.306669 E239,12.241244,134.962899,47.841310 E240,12.715155,140.516322,41.625035 E241,11.649067,125.608531,119.693331 E242,12.241244,134.962899,132.158690 E243,12.715155,140.516322,138.374965 E244,11.391064,125.084251,129.169108 E245,11.610218,131.264058,139.734754 E246,12.186819,137.818542,145.591313 E247,12.749106,144.638185,153.107048 E248,10.740471,122.891301,138.374649 E249,10.810450,129.588582,150.134388 E250,11.618695,136.605959,156.393647 E251,12.188049,143.300385,166.770317 E252,9.914260,118.773022,146.462293 E253,9.386988,117.986216,156.932847 E254,10.138285,128.200139,161.511814 E255,10.859314,136.288567,169.578258 E256,11.436798,143.127527,-178.818098 E257,9.683080,0.000000,0.000000 From tzvetan.popov at uni-konstanz.de Sun Mar 1 11:45:44 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Sun, 1 Mar 2015 11:45:44 +0100 Subject: [FieldTrip] ft_connectivityplot axis lables In-Reply-To: References: Message-ID: <3DD4868F-03AB-481E-A105-EBDCB796FE61@uni-konstanz.de> Hi Daria, please go to: http://fieldtrip.fcdonders.nl/tutorial/connectivity and scroll to the middle of that page. Up to the line that reads “Instead of plotting it with ft_connectivityplot, you can use the following low-level Matlab plotting code which gives a better understanding of the numerical representation of the results.” The code snipped there is probably what you need. > New to FieldTrip - I am trying to plot the output of ft_connectivityanalysis using ft_connectivityplot but cannot find a way to include values on the axes. I only get the first and last value, but nothing in-between (image attached). I’d also like to get an overall connectivity value, but am not sure how to do so. I appreciate any help/suggestions. I’m not sure what you mean by overall connectivity value. You could compute the mean of the two spectra and mean over frequencies yet this doesn't make much sense. best tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From dboratyn at u.northwestern.edu Sun Mar 1 23:54:26 2015 From: dboratyn at u.northwestern.edu (Daria Boratyn) Date: Sun, 1 Mar 2015 16:54:26 -0600 Subject: [FieldTrip] ft_connectivityplot axis lables Message-ID: Thanks, Tzvetan. In terms of connectivity value, I’m looking for a coherence value. Since it is calculated between 0 and 1, I imagine there is a way of getting the specific value for each correlation. Thank you, Daria Hi Daria, please go to: http://fieldtrip.fcdonders.nl/tutorial/connectivity and scroll to the middle of that page. Up to the line that reads ?Instead of plotting it with ft_connectivityplot, you can use the following low-level Matlab plotting code which gives a better understanding of the numerical representation of the results.? The code snipped there is probably what you need. > New to FieldTrip - I am trying to plot the output of ft_connectivityanalysis using ft_connectivityplot but cannot find a way to include values on the axes. I only get the first and last value, but nothing in-between (image attached). I?d also like to get an overall connectivity value, but am not sure how to do so. I appreciate any help/suggestions. I?m not sure what you mean by overall connectivity value. You could compute the mean of the two spectra and mean over frequencies yet this doesn't make much sense. best tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Mon Mar 2 06:27:25 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 2 Mar 2015 06:27:25 +0100 Subject: [FieldTrip] ft_connectivityplot axis lables In-Reply-To: References: Message-ID: HI Daria, if you specify cfg.method = ‘coh’; you will end up with a subfield in your output data structure: data.cohspctrm (in the tutorial two steps further above). Please pay attention to the subfield ”dimord”, which is always outputted by FieldTrip. It says that your coherence matrix is channel by channel by frequency matrix. I assume you are interested at the coherence values in data.cohspctrm(1,2,:) reflective for coherence between EEG009 and EEG028. If your data has a frequency resolution of 1 Hz, data.cohspctrm(1,2,5) will be the coherence value of 10 Hz in your case. For plotting you could use ft_singleplotER after you reduce the cohspctrm subfield to two dimensions. Alternatively, low level matlab function will work too, i.e. figure; plot(data.freq, squeeze(data.cohspctrm(1,2,:))). best tzvetan > Thanks, Tzvetan. In terms of connectivity value, I’m looking for a coherence value. Since it is calculated between 0 and 1, I imagine there is a way of getting the specific value for each correlation. > > Thank you, > Daria > > Hi Daria, > please go to: http://fieldtrip.fcdonders.nl/tutorial/connectivity > > and scroll to the middle of that page. Up to the line that reads > ?Instead of plotting it with ft_connectivityplot, you can use the following low-level Matlab plotting code which gives a better understanding of the numerical representation of the results.? > > The code snipped there is probably what you need. > >> New to FieldTrip - I am trying to plot the output of ft_connectivityanalysis using ft_connectivityplot but cannot find a way to include values on the axes. I only get the first and last value, but nothing in-between (image attached). I?d also like to get an overall connectivity value, but am not sure how to do so. I appreciate any help/suggestions. > I?m not sure what you mean by overall connectivity value. You could compute the mean of the two spectra and mean over frequencies yet this doesn't make much sense. > > best > tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From catia_barbosa at live.fr Mon Mar 2 09:29:15 2015 From: catia_barbosa at live.fr (catia barbosa) Date: Mon, 2 Mar 2015 09:29:15 +0100 Subject: [FieldTrip] Just a small question about resegmenting epoched data... Message-ID: Dear community, I'll start by thanking you for spending your time trying to answer my question. I'm having some trouble with my script. I have filter and do my ICA rejection in my epoched data already. But know I'm thinking, that it would be more interesting and efficient to do it in a more segmented data. But I don't want to waste time redoing all the preprocessing all over again. So I resegmented the already epoched data in many subepochs. Even so I'm not satisfied, I would like to know if there is a simple and elegant way of doing it in fieldtrip, better than mine (here above): SOA = 390; BL = 500; sr = 678.17; SOA = round(SOA*sr/1000); BL = round(BL*sr/1000); adjust_sample=[0 1 1 2 2 3 3 4 4 5 5 6 6]; %adjusting for rounding SOA %constructing begsample and endsample beg_begspl = BL; end_begspl = SOA*12 + BL; begsample = [beg_begspl:SOA:end_begspl]; begsample=begsample+adjust_sample; beg_endspl = SOA*4 + BL; end_endspl = SOA*16 + BL; endsample = [beg_endspl:SOA:end_endspl]; endsample = endsample + adjust_sample; cte = (endsample(1)- begsample(1))/2; %creating new epochs cfg = []; cfg.begsample = begsample(1); cfg.endsample = endsample(1); tmp_data1= ft_redefinetrial(cfg, data); cfg = []; cfg.offset = [-(0*SOA)-(cte)]; tmp_data1 = ft_redefinetrial(cfg, tmp_data1); .... cfg = []; cfg.begsample = begsample(13); cfg.endsample = endsample(13); tmp_data13= ft_redefinetrial(cfg, data); cfg = []; cfg.offset = [-(12*SOA)-(cte)]; tmp_data13 = ft_redefinetrial(cfg, tmp_data13); %concatenating data cfg = []; tmp_data = ft_appenddata(cfg, tmp_data1, tmp_data2, tmp_data3, tmp_data4, tmp_data5, tmp_data6, tmp_data7, tmp_data8, tmp_data9 , tmp_data10, tmp_data11, tmp_data12, tmp_data13); Once again, thank you Barbosa Catia INSERM U 1106 /Institut de neurosciences des systèmes (FRANCE) -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Mar 2 10:13:39 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 2 Mar 2015 10:13:39 +0100 Subject: [FieldTrip] Fwd: interpolation In-Reply-To: <0a61201b8b1547449c6aa889f3960ced@EXPRD01.hosting.ru.nl> References: <0a61201b8b1547449c6aa889f3960ced@EXPRD01.hosting.ru.nl> Message-ID: Dear Omer and Shlomit, Data matrices (e.g. each element of a data.trial{} cell-array) correspond to activity measured in *channels* over time. A channel in a data matrix does not necessarily correspond to an electrode (or gradiometer/magnetometer) which was present during the recording session. For instance, an EEG dataset can be expressed as a bipolar montage, which means that each channel corresponds to the difference between two electrodes. The positions of the physical electrodes are stored in sens.elecpos; these don't change with referencing. The sens.tra matrix describes how to convert from physical electrodes into data channels. If no rereferencing is applied to the data, sens.tra will typically be the identity matrix. In that case, sens.chanpos should also be identical to sens.elecpos. For the case of e.g. a bipolar montage, sens.elecpos will not change, while sens.chanpos might be updated to reflect points halfway two electrodes (and sens.tra will then be different from identity). Having access to the physical sensors' positions and the sens.tra matrix is needed for accurate source modelling, while sens.chanpos is used in other cases such as determining neighbours or creating a layout for topoplots. Best, Eelke On 1 March 2015 at 11:38, shlomit beker wrote: > > Hi Fieldtrippers, > > We would like to use the ft_channelrepair(cfg, data) function. > However we don't understand how to load or convert the electrode positions > into FieldTrip. > > We tried FT_READ_SENS and we looked in FT_DATATYPE_SENS, however there are > two positions variables described in this structure: > > The structure for EEG or ECoG channels contains > sens.label = Mx1 cell-array with channel labels > sens.chanpos = Mx3 matrix with channel positions > sens.tra = MxN matrix to combine electrodes into channels > sens.elecpos = Nx3 matrix with electrode positions > > what do the third field mean? what is the difference between the second and > the fourth? > > > our format is the attached. > > Thanks a lot! > > Omer and Shlomit > > From jeanmarclina at gmail.com Tue Mar 3 16:37:06 2015 From: jeanmarclina at gmail.com (Jean-marc Lina) Date: Tue, 3 Mar 2015 10:37:06 -0500 Subject: [FieldTrip] coherence and group analyses Message-ID: Involved in source analyses from MEG/EEG data, I am going through your papers related to statistical testing (Nonparametric stat testing of coherence differences, 2007 and stat testing in electrophys studies, 2012). Mostly concerned with coherence and coherency (either topography or tomography), I have some questions related to nonparametric statistical testing in the case where we have 2 groups (one group per condition, N subjects in each group) of individuals (n trials for each subjects). I will greatly appreciated some information that could help clarifying the followings: - how do we design the null distribution? permutations are among all subjects? How do we handle fixed/random effects? - Can we reproduce stricto sensu the Monte-Carlo approach described in the 2007 publication at the level of subjects (each subject being a UO) ? - Can we use the stat defined as the difference of the imaginary part of the coherence ? (averaged over the subjects in a group?) With my anticipated thanks, Best JM Lina -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Mar 3 21:54:55 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 3 Mar 2015 21:54:55 +0100 Subject: [FieldTrip] Magnetic dipole fit vs Equiv. Current dipole fit In-Reply-To: <54EE4147.9090408@candoosys.com> References: <54EE4147.9090408@candoosys.com> Message-ID: <063154D1-6549-463C-BCAA-AA42A78026EC@donders.ru.nl> Hi Jim You can do an inverse solution with any method (including dipole fitting) by specifying cfg.vol=[] in the corresponding high-level function (e.g. ft_prepare_leadfield, ft_dipolefitting or ft_sourceanalysis). This causes the forward model to be computed with a magnetic dipole. If you want to track this down to the lower lever code, have a look at these lines in the code “forward/ft_voltype.m" line 115 of 138 --83%-- col 11 “forward/ft_compute_leadfield.m" line 280 of 611 --45%-- col 12 My appologies for this not being documented better. I have been using this myself to check on the localization of the headcoils in the CTF “hz.ds” datasets, which worked fine. I hope you can get it to work for the Sandia Labs system. For the CTF system it is not needed to do these computations in MATLAB, since the CTF electronics does this in (alomst) real-time and the positions are streamed along with the MEG channel data. That makes this this http://fieldtrip.fcdonders.nl/getting_started/realtime_headlocalizer easy for the system we have in Nijmegen. Arjen and I have also been working on making it work for the Elekta system where the fitting has to be done in MATLAB, but have not been able sofar to get it to work robustly. You can find the experiences and (still open) report at http://bugzilla.fcdonders.nl/show_bug.cgi?id=1792. best regards Robert On 25 Feb 2015, at 22:40, Jim McKay wrote: > Hello Fieldtrippers, > > I am consulting with the Sandia Labs on development of an atomic magnetometer based MEG system prototype. One of the areas I am working on is head localization, so I was looking at the code for the realtime head localization in Fieldtrip. I was surprised to see that although the comments talk about using a magnetic dipole forward solution, it actually used the FT dipolefit code which is based on an equivalent current dipole, as far as I can tell. > > There should be a significant difference in the forward solutions between MD and ECD, so how does this work? Or am I just missing something? > > Cheers, > > Jim > > -- > Jim McKay > Candoo Systems Inc. - Magnetic field sensors, systems, and site surveys > Tel. 778-840-0361 > jim.mckay at candoosys.com > www.candoosys.com > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Mar 3 22:14:42 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 3 Mar 2015 22:14:42 +0100 Subject: [FieldTrip] inconsistent chanunit for Neuromag data In-Reply-To: References: Message-ID: <52410612-CB41-4734-A5E9-B45E7F22916B@donders.ru.nl> Hi Steve The grad.chanunit pertains to the units that would be computed as the forward solution. The hdr.chanunit pertains to the units of the channel-level data. Using the ft_convert_units helper function you could convert the units of the gradiometer definition from cm to mm or m. This changes the baseline of the planar gradiometers with a factor of 10 or 100. However, the planar gradient chanel data is not updated simultaneously and remains in the same units (fieldstrength per distance). So it can happen that grad.chanunit and hdr.chanunit are inconsistent. The consequence (which many people on the list will have noticed, but might not have understood) is that the forward solution - and therefore the inverse solution - for the Elekta planar gradiometer channels can easily be incorrect: due to the data being in T/m and the forward solution in T/cm (or some other units, I don’t know the typical units from the top of my head). As long as you always use the same pipeline on hte planar gradiometers, you will most likely not notice since you will be interpreting the sourc estimates in “arbitrary units” anyway. But if you were to combine the planar channels with the magnetometers, the planar channels (fieldstrength per distance) would be affected differently than the manetometer channels (fieldstrength) by your choise of geometrical units. Using the ft_datatype_sens helper function you can ensure that the scaling of the grad structure (which affects the “coilpos" field but also the rows of the “tra" field that correspond to the planar channels) is consistent with your channel level data. If you specify all your data in SI units (T, m, V, etc.) the units of the forward computations will be correct and hence the units of the inverse estimates will also be consistent in SI units (e.g. dipole moment in A/m). The thing is that the different fieldtrip import functions (which come from various origins) return data in non-SI units more often than not :-( If you work with channel level data, SI units are often not nice. ERFs in Tesla are very small (10^-12). ERPs are usually expressed in uV. Also for anatomcial MRIs it is not convenient to express data in SI units (m) and mm is common. The CTF system by default expresses geometrical distance in cm. Etc… So all systems by themselves made their own “convenient” choices. But if all the data comes together with the physical model, it becomes a mess. The logical choice to solve the inconsistencies is to express it in SI units. I hope this helps in clarifying the situation. best regards, Robert PS if you search on bugzilla, you can see some (still open) bugs that pertain to this On 27 Feb 2015, at 03:53, Steve Patterson wrote: > Hello, > > I noticed that fieldtrip produces inconsistent channel units when I > read in Neuromag (vectorview) data. > > For example: > > %%%%%%%%%%%%%%%%%%%%%%%% > > cfg = []; > cfg.dataset = 'example.fif'; > cfg.trialfun = 'ft_trialfun_general'; > cfg.trialdef.eventtype = 'STI101'; > cfg.trialdef.eventvalue = [17 18 20]; > cfg.trialdef.prestim = 0.500; > cfg.trialdef.poststim = 1.000; > cfg = ft_definetrial(cfg); > data = ft_preprocessing(cfg); > > disp(data.hdr.chanunit(1:6)); > 'T/m' > 'T/m' > 'T' > 'T/m' > 'T/m' > 'T' > > disp(data.grad.chanunit(1:6)); > 'T' > 'T' > 'T' > 'T' > 'T' > 'T' > > %%%%%%%%%%%%%%%%%%%%%%%% > > data.hdr.chanunit is correct and data.grad.chanunit is wrong. > > data.grad.chanunit must take precedence in further analysis, because > I've noticed this causes problems downstream. > > For example, when using ft_dipolesimulation, the simulated data on the > gradiometer channels is too small in amplitude by a factor of > 1/(16.8E-3) (the distance between the gradiometer coil pair in > meters). > > This is reflected in the grad.tra matrix, whose non-zero values are > all 1's and -1's, whereas they should be 1's (magnetometers), and +/- > 1/16.8E-3 (gradiometers). > > If you could fix this, it would be much appreciated! > > thanks, > > Steve > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue Mar 3 22:18:34 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 3 Mar 2015 22:18:34 +0100 Subject: [FieldTrip] eeglab2fieldtrip - Fieldtrip vs EEGLAB version In-Reply-To: References: Message-ID: Hi Omar, The eeglab2fieldtrip.m function lives on the boudary between the two projects. We (i.e. Arno and me) have decided to maintain it on the EEGLAB side and copy it to FieldTrip whenever needed. That is why it is in fieldtrip/external/eeglab. If you go to https://code.google.com/p/fieldtrip/source/list?path=/trunk/external/eeglab/eeglab2fieldtrip.m&start=10122 you can see the history. See also http://bugzilla.fcdonders.nl/show_bug.cgi?id=2770 In general for (almost) all code in fieldtrip/external it is being maintained externally, and often by people that are not directly related to the fieldtrip project. best Robert On 16 Feb 2015, at 16:38, Mian, Omar wrote: > Hello, > > There seem to be differences between the eeglab2fieldtrip.m when the Fieldtrip and EEGLAB versions are compared. > > Is this an oversight? > Which one is “better” ? > > data.cfg.version.id contains a later date in the Fieldtrip version, but the file properties modified date is later in the EEGLAB version. > > The versions I am comparing are: > \fieldtrip-20150109\external\eeglab\eeglab2fieldtrip.m > \eeglab13_4_4b\plugins\dipfit2.3\eeglab2fieldtrip.m > > Thanks > > Omar > > --------------------------- > Omar Mian, Phd > Research Fellow > > School of Applied Sciences > London South Bank University > 103 Borough Road > London SE1 0AA > Copyright in this email and in any attachments belongs to London South Bank University. This email, and its attachments if any, may be confidential or legally privileged and is intended to be seen only by the person to whom it is addressed. If you are not the intended recipient, please note the following: (1) You should take immediate action to notify the sender and delete the original email and all copies from your computer systems; (2) You should not read copy or use the contents of the email nor disclose it or its existence to anyone else. The views expressed herein are those of the author(s) and should not be taken as those of London South Bank University, unless this is specifically stated. London South Bank University is a company limited by guarantee registered in England and Wales. The following details apply to London South Bank University: Company number - 00986761; Registered office and trading address - 103 Borough Road London SE1 0AA; VAT number - 778 1116 17 Email address - LSBUinfo at lsbu.ac.uk _______________________________________________ > 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 tolgaozkurt at gmail.com Wed Mar 4 09:54:53 2015 From: tolgaozkurt at gmail.com (Tolga Ozkurt) Date: Wed, 4 Mar 2015 10:54:53 +0200 Subject: [FieldTrip] Visualization of Channels for Human Connectome Project MEG data Message-ID: Dear Fieldtrip list, I was seeing the MEG files uploaded by “Human Connectome Project”, which seem to be pre-processed by Fieldtrip. The resting data were collected in supine position with 4D Neuromag 248 channels. When I use the standard command for layout cfg.layout = '4D248.lay'; the channel locations do not seem to fit. (Please see the attached figure). I do not quite know the channel distribution of the system; but it seems some channels are out of the head. Could you give me an idea to project the channel layout properly? Thank you. Tolga -- Tolga Esat Özkurt, PhD *Department of Health InformaticsMiddle East Technical University* http://www.metu.edu.tr/~ozkurt/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: alpha_resting_data_example.jpg Type: image/jpeg Size: 64893 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Wed Mar 4 11:34:27 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 4 Mar 2015 10:34:27 +0000 Subject: [FieldTrip] Visualization of Channels for Human Connectome Project MEG data In-Reply-To: References: Message-ID: Hi Tolga, There’s a layout that ‘better fits’ the projected channel locations, and which you can obtain from the megconnectome software that accompanies the HCP MEG data. The software can be obtained from here: humanconnectome.org/documentation/MEG1/meg-pipeline.html If you download one of the packages and unzip it, you’ll find a ‘template’ directory. Inside, there’s a 4D248.mat file (note that you need the ‘4D248.mat’ in cfg.layout in that case), which you can use as a layout for visualization. Best wishes, Jan-Mathijs On Mar 4, 2015, at 9:54 AM, Tolga Ozkurt > wrote: Dear Fieldtrip list, I was seeing the MEG files uploaded by “Human Connectome Project”, which seem to be pre-processed by Fieldtrip. The resting data were collected in supine position with 4D Neuromag 248 channels. When I use the standard command for layout cfg.layout = '4D248.lay'; the channel locations do not seem to fit. (Please see the attached figure). I do not quite know the channel distribution of the system; but it seems some channels are out of the head. Could you give me an idea to project the channel layout properly? Thank you. Tolga -- Tolga Esat Özkurt, PhD Department of Health Informatics Middle East Technical University http://www.metu.edu.tr/~ozkurt/ _______________________________________________ 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 tolgaozkurt at gmail.com Wed Mar 4 14:46:21 2015 From: tolgaozkurt at gmail.com (Tolga Ozkurt) Date: Wed, 4 Mar 2015 15:46:21 +0200 Subject: [FieldTrip] Visualization of Channels for Human Connectome Project MEG data In-Reply-To: References: Message-ID: Thanks a lot for the tip, Jan-Mathijs. I started downloading it now. Best, Tolga On Wed, Mar 4, 2015 at 12:34 PM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Tolga, > > There’s a layout that ‘better fits’ the projected channel locations, and > which you can obtain from the megconnectome software that accompanies the > HCP MEG data. The software can be obtained from here: > humanconnectome.org/documentation/MEG1/meg-pipeline.html > If you download one of the packages and unzip it, you’ll find a ‘template’ > directory. Inside, there’s a 4D248.mat file (note that you need the > ‘4D248.mat’ in cfg.layout in that case), which you can use as a layout for > visualization. > > Best wishes, > Jan-Mathijs > > > On Mar 4, 2015, at 9:54 AM, Tolga Ozkurt wrote: > > Dear Fieldtrip list, > > > I was seeing the MEG files uploaded by “Human Connectome Project”, which > seem to be pre-processed by Fieldtrip. The resting data were collected in > supine position with 4D Neuromag 248 channels. > > > When I use the standard command for layout > > > cfg.layout = '4D248.lay'; > > > the channel locations do not seem to fit. (Please see the attached > figure). I do not quite know the channel distribution of the system; but it > seems some channels are out of the head. > > > Could you give me an idea to project the channel layout properly? > > > Thank you. > > > Tolga > > -- > Tolga Esat Özkurt, PhD > > *Department of Health Informatics Middle East Technical University* > http://www.metu.edu.tr/~ozkurt/ > > > _______________________________________________ > 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 jim.mckay at candoosys.com Wed Mar 4 20:28:42 2015 From: jim.mckay at candoosys.com (Jim McKay) Date: Wed, 04 Mar 2015 11:28:42 -0800 Subject: [FieldTrip] Magnetic dipole fit vs Equiv. Current dipole fit In-Reply-To: <063154D1-6549-463C-BCAA-AA42A78026EC@donders.ru.nl> References: <54EE4147.9090408@candoosys.com> <063154D1-6549-463C-BCAA-AA42A78026EC@donders.ru.nl> Message-ID: <54F75CEA.4020801@candoosys.com> An HTML attachment was scrubbed... URL: From ghanson0 at ku.edu Thu Mar 5 05:01:45 2015 From: ghanson0 at ku.edu (Hanson, Gavin Keith) Date: Thu, 5 Mar 2015 04:01:45 +0000 Subject: [FieldTrip] When/how do you bring together data from multiple blocks within a single participant. Message-ID: This is undoubted a straightforward issue, but I can’t seem to find any reference to it in the fieldtrip documentation. Our scanning protocol for each participant involved 6 runs of around 8 minutes in length, each of which is saved as a separate CTF dataset, and each of which begins with head localization (no continuous head position data). My main question is, when do I bring these blocks together into a single participant dataset? Do I just clean the data, then append it all together before launching in on the time-frequency analysis? Do I perform a time-frequency analysis within each block and then bring it all together later? How do I “align" my data to a specific head position that can hold for all blocks within a participant prior to topographical plotting / source reconstruction? If anyone can point me to where these answers may be, I would be very grateful, but I can’t find an answer to this anywhere. If it matters, our ultimate goal is to use beamforming to localize task-associated oscillatory responses during a cognitive task. Thanks in advance for your help, and let me know if you require further information. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Gavin Hanson, B.S. Research Assistant Department of Psychology University of Kansas 1415 Jayhawk Blvd., 534 Fraser Hall Lawrence, KS 66045 From Claudio.Georgii at stud.sbg.ac.at Thu Mar 5 13:25:34 2015 From: Claudio.Georgii at stud.sbg.ac.at (Claudio Georgii) Date: Thu, 5 Mar 2015 13:25:34 +0100 Subject: [FieldTrip] Phd or Post-doctoral position at the University of Salzburg Message-ID: Dear ladies and gentlemen, the clinical department (in particular the Clinical Stress and Emotion Lab and the Center for Cognitive Neuroscience) at the University of Salzburg is offering a Ph.D (3 years) or post-doc (4 years) position (depending on career stage/experience) for applicants with basic or advanced knowledge in EEG/fMRI/MEG methods. The focus of research will be analysis of ERPs, oscillatory EEG (on the surface and in source space) as well as connectivity analyses. We are funded by a starting grant of the European Research Council, running for the coming 5 years and a project funded by the Austrian Science Foundation in collaboration with the National Research Fund of Luxembourg (3 years). Please take more detailed information about the proposed position from the attached .pdf-file. We are looking forward to your application! Kind regards, Claudio Georgii -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ERCundFWFProjekt - neurocognitive.pdf Type: application/pdf Size: 216369 bytes Desc: not available URL: From r.oostenveld at donders.ru.nl Thu Mar 5 14:32:00 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 5 Mar 2015 14:32:00 +0100 Subject: [FieldTrip] Tenure Track Position "Neuropsychology of Language and Language Disorders" References: Message-ID: Tenure Track Position "Neuropsychology of Language and Language Disorders" Application deadline: 17 May 2015 Responsibilities The research consortium Language in Interaction invites applications for a tenure track position, offered with a view to long-term embedding of neuropsychological research in a clinical setting, and enhancement of collaborative research in the field of language-related disorders. The specific focus of the position is on the neuropsychology of language, bridging gaps at the clinical /non-clinical intersection (e.g. language-related disorders). This integration can be achieved using a varied set of methods, such as behavioural experimentation, functional neuroimaging (fMRI, EEG, MEG), transcranial magnetic stimulation (TMS), and formal computational modelling of language processes. You will head an independent research group to be established to promote the interaction between clinical and pre-clinical researchers. You will be expected to conduct research in one or more research areas relevant to theposition. Supervision of BSc, MSc and PhD projects will be part of your responsibilities. Administrative duties will include local and/or national committee memberships. With a view to continuation, the position may be expanded to include teaching and clinical work. You will be provided with budgetary resources, a PhD student or technician, materials and consumables. Work environment The Netherlands has an outstanding track record in the language sciences. The Language in Interaction consortium, sponsored by a Gravitation grant from the Netherlands Organization for Scientific research (NWO), brings together many of the excellent research groups in the Netherlands in a research programme on the foundations of language. Excellence in the domain of language and related relevant fields of cognition is combined with state-of-the-art research facilities and a research team with ample experience in complex research methods and utilization. This position is equally shared by two research centres within Donders Institute for Brain, Cognition and Behaviour, Radboud University and RadboudUMC. The Donders Institute is a world-class research centre devoted to understanding the mechanistic underpinnings of human cognition and behaviour. The institute conducts research in an international setting with more than 600 researchers from 35 countries. English is the lingua franca. In 2013, the Donders Institute was assessed by an international evaluation committee as excellent and recognized as a ‘very stimulating environment for top researchers, as well as for young talent'. What we expect from you You should be a creative and talented researcher, a strong experimenter in the neuropsychology of language, and have a clinical background and experience with patient studies. Other requirements are: − a PhD degree in a field relevant to the position concerned; − an established international reputation; − strong track record of peer-reviewed international publications; − experience with successfully applying for external funding; − experience with (co-)supervision of PhD students; − management skills required for academic leadership. What we have to offer - full time position - a maximum gross monthly salary of € 5,171 based on a 38-hour working week; starting salary depends on qualifications and experience; - you will be appointed for a period of 48 months; after 4 years, a permanent position will be offered if your performance is evaluated positively. Are you interested? Check this link for more information on this job offer and how to apply: http://www.ru.nl/overons/werken-radboud/details-0/details_vacature_0?recid=547039 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dboratyn at u.northwestern.edu Fri Mar 6 00:27:13 2015 From: dboratyn at u.northwestern.edu (Daria Boratyn) Date: Thu, 5 Mar 2015 17:27:13 -0600 Subject: [FieldTrip] ft_apply_montage Message-ID: I'm attempting to create a bipolar montage for a grouping of electrodes and am hving trouble figuring out the correct inputs. The setup I have: bipolar.labelorg = {'EEG 030', 'EEG 028', 'EEG 040', 'EEG 020' 'EEG 018' 'EEG 038'} bipolar.labelnew = {'EEG 030-EEG 028', 'EEG 030-EEG 040', 'EEG 030-EEG 020', 'EEG 028-EEG 018', 'EEG 028-EEG 038'} bipolar.tra = [ +1 -1 0 0 0 0 +1 0 -1 0 0 0 +1 0 0 -1 0 0 0 +1 0 0 -1 0 0 +1 0 0 0 -1 ]; freq_bipolar = ft_apply_montage(freq_continuous, ); I'm not sure which inputs ft_apply_montage wants and mostly get this error: Attempt to reference field of non-structure array. Error in ft_apply_montage (line 86) montage.chantypeorg = repmat({'unknown'}, size(montage.labelorg)); I would like to have an output that computes the subtraction of signals for the pairings specified. Any suggests would be greatly appreciated! Thank you, Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.staudigl at uni-konstanz.de Fri Mar 6 13:02:33 2015 From: tobias.staudigl at uni-konstanz.de (Tobias Staudigl) Date: Fri, 06 Mar 2015 13:02:33 +0100 Subject: [FieldTrip] imag plv In-Reply-To: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> References: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> Message-ID: <54F99759.8030302@uni-konstanz.de> Dear ft community, I am looking for an equivalent of imaginary coherence (Nolte, 2004), based on the phase-locking value (Lachaux, 1999) rather than coherence. Fieldtrip supports the following function, which would be exactly what I needed: cfg=[]; cfg.method = 'plv'; cfg.complex = 'imag'; iplv=ft_connectivityanalysis(cfg,freq); However, I did not find any documentation or reference, and was wondering whether it is feasible to use 'imag' together with 'plv'? Sadaghiani et al. (2012; J Neurosci) calculated imaginary plv in their paper like this: Is this what the ft code effectively does? Any help appreciated, thanks a lot! best, Tobias -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ihbaaegh.png Type: image/png Size: 4003 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Fri Mar 6 13:33:05 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 6 Mar 2015 12:33:05 +0000 Subject: [FieldTrip] imag plv In-Reply-To: <54F99759.8030302@uni-konstanz.de> References: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> <54F99759.8030302@uni-konstanz.de> Message-ID: <4F1BA098-10EB-41FD-8B65-21FB6F044854@fcdonders.ru.nl> Hi Tobias, However, I did not find any documentation or reference, and was wondering whether it is feasible to use 'imag' together with 'plv'? Sadaghiani et al. (2012; J Neurosci) calculated imaginary plv in their paper like this: [cid:0471C70F-48E6-4C72-9F25-A67474534898 at home] Is this what the ft code effectively does? Yes, it does. Best wishes, Jan-Mathijs -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ihbaaegh.png Type: image/png Size: 4003 bytes Desc: ihbaaegh.png URL: From v.piai.research at gmail.com Mon Mar 9 04:58:41 2015 From: v.piai.research at gmail.com (=?UTF-8?B?Vml0w7NyaWEgUGlhaQ==?=) Date: Sun, 08 Mar 2015 20:58:41 -0700 Subject: [FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline' Message-ID: <54FD1A71.3070508@gmail.com> Hi all, I'm interested in using Laplacian transformation prior to computing TFRs. I still haven't read anything about the three methods implemented in FieldTrip, I must confess, but I think my question is independent of that. I'm using FT version: fieldtrip-20140801 on Matlab2014a. If I use the method 'spline', I can subsequently run ft_freqanalysis (or ft_timelockanalysis for that matter). However, with either 'hjorth' or 'finite', I get an error when running ft_freqanalysis/ft_timelockanalysis: My cfg: cfgn.method = 'template'; cfgn.layout = 'biosemi64.lay'; cfg.neighbours = ft_prepare_neighbours(cfgn, dat); cfg.method = 'hjorth'; %'finite', 'spline' cfg.elec = ft_read_sens('standard_1005.elc'); lpc = ft_scalpcurrentdensity(cfg, dat); % Then after that, a commonly used cfg for ft_freqanalysis Error using ft_datatype_sens (line 375) inconsistent number of channels in sensor description Error in ft_datatype_raw (line 138) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 219) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_freqanalysis (line 211) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); I understand that the "inconsistent number of channels in sensor description" is coming from these two other implementations, but should that be the case? The help on ft_scalpcurrentdensity says " The output data has the same format as the input and can be used in combination with most other FieldTrip functions". So I'm wondering whether there's something special intrinsic to these implementations, I'm using a too old FT version, my config isn't right, or this is an issue that has gone unnoticed because those implementations are not used often. Thanks a lot! Cheers from Berkeley, Vitoria From munsif.jatoi at gmail.com Mon Mar 9 11:31:24 2015 From: munsif.jatoi at gmail.com (Munsif Jatoi) Date: Mon, 9 Mar 2015 18:31:24 +0800 Subject: [FieldTrip] Source Analysis @ EEG data. Message-ID: Dear All, I hope you are fine. Sir, I am working for the completion of my PhD thesis in the field of EEG source localization by using various methods such as eLORETA, MUSIC, Min Norm etc. For this, I have been using SPM and Fieldtrip to first simulate EEG data and then use inverse methods to localize the sources. I have simulated the data by using two head models that are BEM and FEM. For BEM, I have used SPM+ Fieldtrip. However, for FEM I have purely used Fieldtrip SIMBIO command line. Now, I want to use the inverse methods for localization. For this, I have gone through the tutorials available at the fieldtrip website http://fieldtrip.fcdonders.nl/example . There, I found that there are following methods which are used for inverse problem: *1) *linear constrained minimum variance beamformer (LCMV) *2) *synthetic aperture magnetometry (SAM) *3) *dynamic imaging of coherent sources (DICS) *4) *partial cannonical correlation/coherence (PCC) *5) *minimum norm estimation (MNE) *6) *minimum norm estimation with smoothness constraint (LORETA) *7) *multiple signal classification (MUSIC) *8) *scan residual variance with single dipole (RV) *9) *multivariate Laplace source localization (MVL) However, I want to apply min norm, LORETA and MUSIC only for my data. As I studied MUSIC for applying on EEG data, I found that the code is developed by going through the research article of J.C. Mosher et. al. “Multiple dipole modelling and localization from spatiotemporal MEG data,” IEEE Trans. Biomed. Engg., pp. 541-557, June 1992. Though the basic definitions are understandable, however, I am confused in implementation for *EEG* data. For this, I have following questions: 1) What is *numcomponent* variable? I mean how it can be used for EEG data? 2) What is *dip* variable? From where we can generate it for an EEG data? 3) If we have computed leadfield by using BEM and FEM, how we can introduce in the programme provided at https://github.com/fieldtrip/fieldtrip/blob/master/inverse/music.m ? I hope you shall answer my questions. Thanks for your time. Kind Regards, Munsif. -- Munsif Ali H.Jatoi, Ph D Scholar, Centre for Intelligent Signals and Imaging Research, Universiti Teknologi PETRONAS, Malaysia. http://scholar.google.com.my/citations?user=Y6g6jOAAAAAJ&hl=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Mar 9 18:28:29 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 9 Mar 2015 17:28:29 +0000 Subject: [FieldTrip] Quick question about STAT (error and weird output) Message-ID: Dear all, I am trying to look at ERPs stats with my EGI cap (I have 16 subjects - within subjects design). According to the code I use, I get in the order, an ERROR or I see something weird and I wish to have an opinion. See the script below: Here is my script: % ERPs grandaverage calculation for 4 conditions cfg = []; cfg.keepindividual = 'yes'; ERPs_FP_grandavg = ft_timelockgrandaverage(cfg, FP_block{:}); ERPs_FS_grandavg = ft_timelockgrandaverage(cfg, FS_block{:}); ERPs_HP_grandavg = ft_timelockgrandaverage(cfg, HP_block{:}); ERPs_HS_grandavg = ft_timelockgrandaverage(cfg, HS_block{:}); % t-tests cfg = []; cfg.method = 'triangulation'; cfg.layout = 'GSN-HydroCel-128.sfp'; cfg.neighbourdist = 2; cfg.senstype = 'EEG'; neighbours_EEG = ft_prepare_neighbours(cfg, ERPs_FP_grandavg); cfg = []; cfg.channel = 'EEG'; cfg.minnbchan = 2; cfg.neighbours = neighbours_EEG; cfg.latency = [1.17 1.25]; cfg.avgovertime = 'no'; cfg.parameter = 'avg'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.correctm = 'cluster'; cfg.correcttail = 'prob'; cfg.numrandomization = 1000; cfg.tail = 0; cfg.clustertail = 0; Nsub = length(names); cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number IF I USE THIS CODE: stat = ft_timelockstatistics(cfg,ERPs_FP_grandavg,ERPs_FS_grandavg); I GET TE ERROR: Reference to non-existent field 'dat'. Error in prepare_timefreq_data>forcedimord (line 531) Nrepl = size(output.dat, repldim); Error in prepare_timefreq_data (line 87) [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in statistics_wrapper (line 235) [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ft_timelockstatistics (line 113) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); - Note that this worked in very earlier versions of FT IF I USE THIS CODE stat = ft_timelockstatistics(cfg,FP_block{:},FS_block{:}); IT RUNS, BUT I GET SOMETHING WEIRD WITH T-VALUES BELOW 1 and 4 clusters (see attched figure). What I am doing wrong? Any advice would be great. Many thanks, Davide -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: stat_plot.tif Type: image/tiff Size: 199807 bytes Desc: stat_plot.tif URL: From r.oostenveld at donders.ru.nl Mon Mar 9 19:52:21 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 9 Mar 2015 19:52:21 +0100 Subject: [FieldTrip] Quick question about STAT (error and weird output) In-Reply-To: References: Message-ID: <60EC3D7C-9D72-436A-AF90-DA39BDEFF28C@donders.ru.nl> Hi Davide The details of the error messages reveal that you are using an old version of FieldTrip. Some of the low level functions it shows do not exist any more. Please update to the latest version and try again. Robert > On 9 mrt. 2015, at 18:28, Davide Rivolta wrote: > > Dear all, > > I am trying to look at ERPs stats with my EGI cap (I have 16 subjects - within subjects design). > According to the code I use, I get in the order, an ERROR or I see something weird and I wish to have an opinion. > See the script below: > > Here is my script: > % ERPs grandaverage calculation for 4 conditions > cfg = []; > cfg.keepindividual = 'yes'; > ERPs_FP_grandavg = ft_timelockgrandaverage(cfg, FP_block{:}); > ERPs_FS_grandavg = ft_timelockgrandaverage(cfg, FS_block{:}); > ERPs_HP_grandavg = ft_timelockgrandaverage(cfg, HP_block{:}); > ERPs_HS_grandavg = ft_timelockgrandaverage(cfg, HS_block{:}); > > % t-tests > cfg = []; > cfg.method = 'triangulation'; > cfg.layout = 'GSN-HydroCel-128.sfp'; > cfg.neighbourdist = 2; > cfg.senstype = 'EEG'; > neighbours_EEG = ft_prepare_neighbours(cfg, ERPs_FP_grandavg); > > cfg = []; > cfg.channel = 'EEG'; > cfg.minnbchan = 2; > cfg.neighbours = neighbours_EEG; > cfg.latency = [1.17 1.25]; > cfg.avgovertime = 'no'; > cfg.parameter = 'avg'; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.alpha = 0.05; > cfg.clusteralpha = 0.05; > cfg.correctm = 'cluster'; > cfg.correcttail = 'prob'; > cfg.numrandomization = 1000; > cfg.tail = 0; > cfg.clustertail = 0; > > Nsub = length(names); > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable > cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number > > IF I USE THIS CODE: > stat = ft_timelockstatistics(cfg,ERPs_FP_grandavg,ERPs_FS_grandavg); > > I GET TE ERROR: > Reference to non-existent field 'dat'. > > Error in prepare_timefreq_data>forcedimord (line 531) > Nrepl = size(output.dat, repldim); > > Error in prepare_timefreq_data (line 87) > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); > > Error in statistics_wrapper (line 235) > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); > > Error in ft_timelockstatistics (line 113) > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > - Note that this worked in very earlier versions of FT > > > > IF I USE THIS CODE > stat = ft_timelockstatistics(cfg,FP_block{:},FS_block{:}); > > IT RUNS, BUT I GET SOMETHING WEIRD WITH T-VALUES BELOW 1 and 4 clusters (see attched figure). > > > What I am doing wrong? Any advice would be great. > > > Many thanks, > Davide > > > > -- > Davide Rivolta, PhD > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From drivolta81 at gmail.com Mon Mar 9 21:10:04 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 9 Mar 2015 20:10:04 +0000 Subject: [FieldTrip] Quick question about STAT (error and weird output) In-Reply-To: <60EC3D7C-9D72-436A-AF90-DA39BDEFF28C@donders.ru.nl> References: <60EC3D7C-9D72-436A-AF90-DA39BDEFF28C@donders.ru.nl> Message-ID: Dear Robert, thanks for the prompt reply. I was using the 20150113 version. I have now downloaded the most recent version (20150308). As you predicted the last error disappeared, but after running the same script, I got this one: Error using getdimord (line 15) field "avg" not present in data Error in ft_timelockstatistics (line 114) dimord = getdimord(varargin{1}, cfg.parameter); It is weird that it is looking for "avg" since I had to indicate keepindividual='yes' in the ft_timelockgrandaverage step. I am sure it is something silly, but if someone is willing to help me out here, I would be grateful. Many thanks, Davide On Mon, Mar 9, 2015 at 6:52 PM, Robert Oostenveld < r.oostenveld at donders.ru.nl> wrote: > Hi Davide > > The details of the error messages reveal that you are using an old version > of FieldTrip. Some of the low level functions it shows do not exist any > more. > > Please update to the latest version and try again. > > Robert > > > > On 9 mrt. 2015, at 18:28, Davide Rivolta wrote: > > > > Dear all, > > > > I am trying to look at ERPs stats with my EGI cap (I have 16 subjects - > within subjects design). > > According to the code I use, I get in the order, an ERROR or I see > something weird and I wish to have an opinion. > > See the script below: > > > > Here is my script: > > % ERPs grandaverage calculation for 4 conditions > > cfg = []; > > cfg.keepindividual = 'yes'; > > ERPs_FP_grandavg = ft_timelockgrandaverage(cfg, FP_block{:}); > > ERPs_FS_grandavg = ft_timelockgrandaverage(cfg, FS_block{:}); > > ERPs_HP_grandavg = ft_timelockgrandaverage(cfg, HP_block{:}); > > ERPs_HS_grandavg = ft_timelockgrandaverage(cfg, HS_block{:}); > > > > % t-tests > > cfg = []; > > cfg.method = 'triangulation'; > > cfg.layout = 'GSN-HydroCel-128.sfp'; > > cfg.neighbourdist = 2; > > cfg.senstype = 'EEG'; > > neighbours_EEG = ft_prepare_neighbours(cfg, ERPs_FP_grandavg); > > > > cfg = []; > > cfg.channel = 'EEG'; > > cfg.minnbchan = 2; > > cfg.neighbours = neighbours_EEG; > > cfg.latency = [1.17 1.25]; > > cfg.avgovertime = 'no'; > > cfg.parameter = 'avg'; > > cfg.method = 'montecarlo'; > > cfg.statistic = 'ft_statfun_depsamplesT'; > > cfg.alpha = 0.05; > > cfg.clusteralpha = 0.05; > > cfg.correctm = 'cluster'; > > cfg.correcttail = 'prob'; > > cfg.numrandomization = 1000; > > cfg.tail = 0; > > cfg.clustertail = 0; > > > > Nsub = length(names); > > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > > cfg.ivar = 1; % the 1st row in cfg.design contains the > independent variable > > cfg.uvar = 2; % the 2nd row in cfg.design contains the > subject number > > > > IF I USE THIS CODE: > > stat = ft_timelockstatistics(cfg,ERPs_FP_grandavg,ERPs_FS_grandavg); > > > > I GET TE ERROR: > > Reference to non-existent field 'dat'. > > > > Error in prepare_timefreq_data>forcedimord (line 531) > > Nrepl = size(output.dat, repldim); > > > > Error in prepare_timefreq_data (line 87) > > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); > > > > Error in statistics_wrapper (line 235) > > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); > > > > Error in ft_timelockstatistics (line 113) > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > > > - Note that this worked in very earlier versions of FT > > > > > > > > IF I USE THIS CODE > > stat = ft_timelockstatistics(cfg,FP_block{:},FS_block{:}); > > > > IT RUNS, BUT I GET SOMETHING WEIRD WITH T-VALUES BELOW 1 and 4 clusters > (see attched figure). > > > > > > What I am doing wrong? Any advice would be great. > > > > > > Many thanks, > > Davide > > > > > > > > -- > > Davide Rivolta, PhD > > > > _______________________________________________ > > 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 > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Tue Mar 10 11:42:15 2015 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Tue, 10 Mar 2015 10:42:15 +0000 Subject: [FieldTrip] Looking up for right MNI coords and label Message-ID: Dear all, I've estimated the sources of two conditions using individual MRIs with warped grid from a template (1cm spacing). I ran a cluster-based permutation to find the significant voxels and I'm choosing the voxel where the difference is bigger. I've had some problems defining what that voxel is. I've used two options: giving the position to the atlas_lookup function, and giving the index to an interpolated tissue matrix from an atlas. Given that grid occupies the brain volume (in the BEM model with 3 layers), I also created a mask to restrict the voxels of interest to the cortex from the atlas. I seem to get different results with these and I don't understand why. All matrices are in cm. This is part of the code: Note: The variables are atlas = ft_read_atlas('...\fieldtrip-20141023\template\atlas\aal\ROI_MNI_V4.nii'); % then converted to 'cm' sourcemodel = grid with 1cm spacing from template stat = structure from ft_sourcestatistics % Create mask from atlas cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'tissue'; sourcemodel2 = ft_sourceinterpolate(cfg,atlas,sourcemodel); atlas_one= sourcemodel2.tissue > 0; % Logical matrix with points with an anatomical label %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 1)Look for labels with atlas mask [val ind_max] = max(stat.stat(:).* atlas_one(:)); % 1.a)-------------------------------------- % Atlas_lookup pos = stat.pos(ind_max,:); atlas_lookup(atlas, pos, 'inputcoord', 'mni') % Results % MNI coordinates: 4 -1 2 % Label: Rolandic_Oper_R % 1.b)-------------------------------------- % Interpolated tissue from atlas [xi yi zi] = ind2sub(stat.dim, ind_max); atlas.tissuelabel{sourcemodel2.tissue(xi, yi, zi)} % Results % Voxel coordinates: 12 10 10 % Label: Rolandic_Oper_R %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 2)Look for labels without atlas mask [val ind_max] = max(stat.stat(:)); % 2.a)-------------------------------------- % Atlas_lookup % Results % MNI coordinates: 4 -1 3 % Label: Postcentral_R % 2.b)-------------------------------------- % Interpolated tissue from atlas % Results % Voxel coordinates: 12 10 11 % Label: None What is it that I'm missing? Thank you in advance for any help! Best regards, Laura Rueda Delgado PhD student Department of Kinesiology- Motor Control and Neural Plasticity Research Group KU Leuven Tervuursevest 101 bus 1501 3001 Leuven, Belgium tel. +32 16 37 64 78 -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Tue Mar 10 12:56:03 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Tue, 10 Mar 2015 11:56:03 +0000 Subject: [FieldTrip] Electrode plots below the equator Message-ID: I am using EGIs electrodes, and am trying to plot data on the topo plot. The electrodes below the horizontal equator plot on top of the other electrodes. I have tried all of the types. With the orthographic I get the best results for the interior and superior electrodes (center of head), the the ones below the horizon appear to plot on top of the ones above the horizon. For example the topo plot at http://sccn.ucsd.edu/eeglab/allfunctions/topoplot.html. Can this be done with ft plots? EEGLab topoplot: "By default, channel locations below head center (arc_length 0.5) are shown in a 'skirt' outside the cartoon head (see 'plotrad' and 'headrad' options below)². This is my code, I have tried all the options for projection. cfg=[]; cfg.rotate=0; cfg.elec=elec; cfg.projection='orthographic'; lay=ft_prepare_layout(cfg); 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 *********************************************** > From marijkebeulen at gmail.com Tue Mar 10 13:13:31 2015 From: marijkebeulen at gmail.com (Marijke Beulen) Date: Tue, 10 Mar 2015 13:13:31 +0100 Subject: [FieldTrip] Pre-stimulus baseline correction for response-locked ERPs In-Reply-To: References: Message-ID: <54FEDFEB.2080904@gmail.com> Dear all, I was wondering if anyone knows how to define a stimulus-locked baseline period to correct a response-locked ERP using ft_timelockbaseline. So far, I've been plotting stimulus-locked ERPs and using ft_timelockbaseline with the 300ms before stimulus onset for baseline correction. I've tried other methods to do baseline correction manually, but so far, ft_timelockbaseline has given me the best results. However, now I also want to plot response-locked ERPs. To keep things comparable, I would like to use the same 300ms pre-stimulus interval for baseline correction, but my trials have different lengths. This means that after response-locking the data, the time stamp of that interval is different on every trial. Is there any way to e.g. define separate baseline windows for each trial or to give FieldTrip another (stimulus-locked) dataset to use as a baseline in ft_timelockbaseline? I've already searched through FieldTrip's documentation, but I haven't been able to find a solution. Any advice on how to do this would be much appreciated! Sincerely, Marijke Beulen -- M.A. Beulen, MSc. PhD student at University of Groningen, dept. Artificial Intelligence Bernoulliborg, room 320 Nijenborgh 9 9747 AG Groningen The Netherlands Phone: +31 50 363 6915 m.a.beulen at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Mar 10 15:05:18 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 10 Mar 2015 15:05:18 +0100 (CET) Subject: [FieldTrip] channel order changes after ft_channelrepair In-Reply-To: <654280552.938467.1425994592940.JavaMail.root@bcbl.eu> Message-ID: <604599468.938937.1425996318048.JavaMail.root@bcbl.eu> Dear all, I just noted that after calling ft_channelrepair the order of channel labels in my Neuromag 306 data has changed. The code I am using is as follows (fieldtrip-20150115): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % get the labels from the reference layout cfg = []; cfg.layout = 'neuromag306planar.lay'; [ref_lay] = ft_prepare_layout(cfg); % eliminate COMNT and SCALE labels ref_lay.label = ref_lay.label(1:204); % get the labels of channels present in the data orig_label = meg_data.label; % compare labels from reference layout with original data idx = zeros(length(ref_lay.label),1); for it = 1:length(ref_lay.label) idx(it) = any(strcmp(ref_lay.label(it),orig_label)); end; % load the template neighbourhood structure from fieldtrip load('neuromag306planar_neighb.mat'); cfg = []; cfg.neighbours = neighbours; cfg.missingchannel = find(idx==0); cfg.method = 'spline'; [meg_data] = ft_channelrepair(cfg,meg_data); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% When I then look at meg_data.label I can see that the missing channels were added at the end of the channel label list instead of being integrated in the list at the position where they would be found in the channel list of the template layout. For instance meg_data.label(end) = 'MEG1133'; and ref_lay.label(end) = 'MEG2643'; Does anyone know why this happens and how this can be avoided or compensated? I am guessing that later on in the analysis pipeline this can become problematic as the mapping between the new labels and the spatial coordinates does not correspond anymore. Any help or suggestions would be highly appreciated! Thanks, Fred -- Frédéric Roux Postdoctoral Scientist f.roux at bcbl.eu Tel: +34 943 309 300 Ext 211 Fax: +34 943 309 052 Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer --------------------------------------------------------------------------- From jorn at artinis.com Tue Mar 10 15:16:30 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Tue, 10 Mar 2015 15:16:30 +0100 Subject: [FieldTrip] channel order changes after ft_channelrepair In-Reply-To: <604599468.938937.1425996318048.JavaMail.root@bcbl.eu> References: <654280552.938467.1425994592940.JavaMail.root@bcbl.eu> <604599468.938937.1425996318048.JavaMail.root@bcbl.eu> Message-ID: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> Hi Fred, back then when I implemented different options for channel interpolation, we decided that there is no "natural" order of channels in any sense. For MEG systems it might seem like that, because afaik there is a single acquisition software per system, which is always returning channels in the same order. However, this order is arbitrary and can be other rationales equally valid than the one used by the acquisition software. For your specific case, I imagine that a sensor is broken and thus turned off: it will not be in the list of channels anymore. FieldTrip does not know where the 'natural' position of that channel is, as FT is not maintaining fixed channel lists. But this shouldn't be a problem anyhow, as channel labels can be easily matched. If I recall the latest developments correctly, by now all FieldTrip functions are taking care of the channel order - even when computing leadfields ;) If you do not like this due to aesthetical reasons or because you want to have the channel order being consistent across subjects, you can simply reorder them manually. As said, FieldTrip does not care about the order. Just be sure that if you are reordering the label-field, you also need to reorder the channel dimension(s) of all data. If you encounter any problems with this concatenation, feel free send out notification. Best, Jörn PS: if the channel is already in your data and you want to just repair it because it suffers from a lot of artifacts, you could try using cfg.badchannel instead of cfg.missingchannel. If I recall correctly, missing channels are always concatenated, bad channels are kept in order if already present. But it's been a while, so I am not sure and right now, too lazy to check the code ;) -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Frédéric Roux > Sent: Tuesday, March 10, 2015 3:05 PM > To: FieldTrip discussion list > Subject: [FieldTrip] channel order changes after ft_channelrepair > > Dear all, > > I just noted that after calling ft_channelrepair the order of channel labels in > my Neuromag 306 data has changed. > > The code I am using is as follows (fieldtrip-20150115): > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % get the labels from the reference layout cfg = []; cfg.layout = > 'neuromag306planar.lay'; > > [ref_lay] = ft_prepare_layout(cfg); > > % eliminate COMNT and SCALE labels > ref_lay.label = ref_lay.label(1:204); > > % get the labels of channels present in the data orig_label = meg_data.label; > > % compare labels from reference layout with original data idx = > zeros(length(ref_lay.label),1); for it = 1:length(ref_lay.label) > idx(it) = any(strcmp(ref_lay.label(it),orig_label)); > end; > > % load the template neighbourhood structure from fieldtrip > load('neuromag306planar_neighb.mat'); > > cfg = []; > cfg.neighbours = neighbours; > cfg.missingchannel = find(idx==0); > cfg.method = 'spline'; > > [meg_data] = ft_channelrepair(cfg,meg_data); > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > When I then look at meg_data.label I can see that the missing channels were > added at the end of the channel label list instead of being integrated in the > list at the position where they would be found in the channel list of the > template layout. > > For instance > > meg_data.label(end) = 'MEG1133'; > > and > > ref_lay.label(end) = 'MEG2643'; > > > Does anyone know why this happens and how this can be avoided or > compensated? I am guessing that later on in the analysis pipeline this can > become problematic as the mapping between the new labels and the spatial > coordinates does not correspond anymore. > > Any help or suggestions would be highly appreciated! > > Thanks, > Fred > > -- > Frédéric Roux > Postdoctoral Scientist > f.roux at bcbl.eu > Tel: +34 943 309 300 Ext 211 > Fax: +34 943 309 052 > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > --------------------------------------------------------------------------- > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From f.roux at bcbl.eu Tue Mar 10 15:37:02 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 10 Mar 2015 15:37:02 +0100 (CET) Subject: [FieldTrip] channel order changes after ft_channelrepair In-Reply-To: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> Message-ID: <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> Dear Joern, thanks for the quick and very helpful reply. My goal is indeed to keep the channel order consistent across different participants. After MF-preprocessing some of the channels are missing in certain participants but this is not consistent so I would like to interpolate the missing channels for those participants for which the channels were turned off. I am guessing that the fields that I need to adjust if I want to manually re-order the info of the channels according to the template are meg_data.label and meg_data.trial Do you see anything else that would need to be adjusted ? Best, Fred -- FR ----- Original Message ----- From: "Jörn M. Horschig" To: "FieldTrip discussion list" Sent: Tuesday, March 10, 2015 3:16:30 PM Subject: Re: [FieldTrip] channel order changes after ft_channelrepair Hi Fred, back then when I implemented different options for channel interpolation, we decided that there is no "natural" order of channels in any sense. For MEG systems it might seem like that, because afaik there is a single acquisition software per system, which is always returning channels in the same order. However, this order is arbitrary and can be other rationales equally valid than the one used by the acquisition software. For your specific case, I imagine that a sensor is broken and thus turned off: it will not be in the list of channels anymore. FieldTrip does not know where the 'natural' position of that channel is, as FT is not maintaining fixed channel lists. But this shouldn't be a problem anyhow, as channel labels can be easily matched. If I recall the latest developments correctly, by now all FieldTrip functions are taking care of the channel order - even when computing leadfields ;) If you do not like this due to aesthetical reasons or because you want to have the channel order being consistent across subjects, you can simply reorder them manually. As said, FieldTrip does not care about the order. Just be sure that if you are reordering the label-field, you also need to reorder the channel dimension(s) of all data. If you encounter any problems with this concatenation, feel free send out notification. Best, Jörn PS: if the channel is already in your data and you want to just repair it because it suffers from a lot of artifacts, you could try using cfg.badchannel instead of cfg.missingchannel. If I recall correctly, missing channels are always concatenated, bad channels are kept in order if already present. But it's been a while, so I am not sure and right now, too lazy to check the code ;) -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Frédéric Roux > Sent: Tuesday, March 10, 2015 3:05 PM > To: FieldTrip discussion list > Subject: [FieldTrip] channel order changes after ft_channelrepair > > Dear all, > > I just noted that after calling ft_channelrepair the order of channel labels in > my Neuromag 306 data has changed. > > The code I am using is as follows (fieldtrip-20150115): > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % get the labels from the reference layout cfg = []; cfg.layout = > 'neuromag306planar.lay'; > > [ref_lay] = ft_prepare_layout(cfg); > > % eliminate COMNT and SCALE labels > ref_lay.label = ref_lay.label(1:204); > > % get the labels of channels present in the data orig_label = meg_data.label; > > % compare labels from reference layout with original data idx = > zeros(length(ref_lay.label),1); for it = 1:length(ref_lay.label) > idx(it) = any(strcmp(ref_lay.label(it),orig_label)); > end; > > % load the template neighbourhood structure from fieldtrip > load('neuromag306planar_neighb.mat'); > > cfg = []; > cfg.neighbours = neighbours; > cfg.missingchannel = find(idx==0); > cfg.method = 'spline'; > > [meg_data] = ft_channelrepair(cfg,meg_data); > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > When I then look at meg_data.label I can see that the missing channels were > added at the end of the channel label list instead of being integrated in the > list at the position where they would be found in the channel list of the > template layout. > > For instance > > meg_data.label(end) = 'MEG1133'; > > and > > ref_lay.label(end) = 'MEG2643'; > > > Does anyone know why this happens and how this can be avoided or > compensated? I am guessing that later on in the analysis pipeline this can > become problematic as the mapping between the new labels and the spatial > coordinates does not correspond anymore. > > Any help or suggestions would be highly appreciated! > > Thanks, > Fred > > -- > Frédéric Roux > Postdoctoral Scientist > f.roux at bcbl.eu > Tel: +34 943 309 300 Ext 211 > Fax: +34 943 309 052 > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > --------------------------------------------------------------------------- > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jorn at artinis.com Tue Mar 10 16:04:25 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Tue, 10 Mar 2015 16:04:25 +0100 Subject: [FieldTrip] channel order changes after ft_channelrepair In-Reply-To: <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> Message-ID: <003101d05b43$801dd6c0$80598440$@artinis.com> Hi Fred, yes, immediately after preprocessing it should be only those two fields. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Frédéric Roux > Sent: Tuesday, March 10, 2015 3:37 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] channel order changes after ft_channelrepair > > Dear Joern, > > thanks for the quick and very helpful reply. > > My goal is indeed to keep the channel order consistent across different > participants. > > After MF-preprocessing some of the channels are missing in certain > participants but this is not consistent so I would like to interpolate the missing > channels for those participants for which the channels were turned off. > > I am guessing that the fields that I need to adjust if I want to manually re- > order the info of the channels according to the template are > > meg_data.label > and > meg_data.trial > > Do you see anything else that would need to be adjusted ? > > Best, > Fred > > -- > FR > > ----- Original Message ----- > From: "Jörn M. Horschig" > To: "FieldTrip discussion list" > Sent: Tuesday, March 10, 2015 3:16:30 PM > Subject: Re: [FieldTrip] channel order changes after ft_channelrepair > > Hi Fred, > > back then when I implemented different options for channel interpolation, > we decided that there is no "natural" order of channels in any sense. For > MEG systems it might seem like that, because afaik there is a single > acquisition software per system, which is always returning channels in the > same order. However, this order is arbitrary and can be other rationales > equally valid than the one used by the acquisition software. > > For your specific case, I imagine that a sensor is broken and thus turned off: it > will not be in the list of channels anymore. FieldTrip does not know where > the 'natural' position of that channel is, as FT is not maintaining fixed channel > lists. But this shouldn't be a problem anyhow, as channel labels can be easily > matched. If I recall the latest developments correctly, by now all FieldTrip > functions are taking care of the channel order - even when computing > leadfields ;) > > If you do not like this due to aesthetical reasons or because you want to have > the channel order being consistent across subjects, you can simply reorder > them manually. As said, FieldTrip does not care about the order. Just be sure > that if you are reordering the label-field, you also need to reorder the > channel dimension(s) of all data. > > If you encounter any problems with this concatenation, feel free send out > notification. > > Best, > Jörn > > PS: if the channel is already in your data and you want to just repair it > because it suffers from a lot of artifacts, you could try using cfg.badchannel > instead of cfg.missingchannel. If I recall correctly, missing channels are always > concatenated, bad channels are kept in order if already present. But it's been > a while, so I am not sure and right now, too lazy to check the code ;) > > -- > > Jörn M. Horschig, Software Engineer > Artinis Medical Systems | +31 481 350 980 > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > > bounces at science.ru.nl] On Behalf Of Frédéric Roux > > Sent: Tuesday, March 10, 2015 3:05 PM > > To: FieldTrip discussion list > > Subject: [FieldTrip] channel order changes after ft_channelrepair > > > > Dear all, > > > > I just noted that after calling ft_channelrepair the order of channel > > labels in my Neuromag 306 data has changed. > > > > The code I am using is as follows (fieldtrip-20150115): > > > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > % get the labels from the reference layout cfg = []; cfg.layout = > > 'neuromag306planar.lay'; > > > > [ref_lay] = ft_prepare_layout(cfg); > > > > % eliminate COMNT and SCALE labels > > ref_lay.label = ref_lay.label(1:204); > > > > % get the labels of channels present in the data orig_label = > > meg_data.label; > > > > % compare labels from reference layout with original data idx = > > zeros(length(ref_lay.label),1); for it = 1:length(ref_lay.label) > > idx(it) = any(strcmp(ref_lay.label(it),orig_label)); > > end; > > > > % load the template neighbourhood structure from fieldtrip > > load('neuromag306planar_neighb.mat'); > > > > cfg = []; > > cfg.neighbours = neighbours; > > cfg.missingchannel = find(idx==0); > > cfg.method = 'spline'; > > > > [meg_data] = ft_channelrepair(cfg,meg_data); > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > When I then look at meg_data.label I can see that the missing channels > > were added at the end of the channel label list instead of being > > integrated in the list at the position where they would be found in > > the channel list of the template layout. > > > > For instance > > > > meg_data.label(end) = 'MEG1133'; > > > > and > > > > ref_lay.label(end) = 'MEG2643'; > > > > > > Does anyone know why this happens and how this can be avoided or > > compensated? I am guessing that later on in the analysis pipeline this > > can become problematic as the mapping between the new labels and the > > spatial coordinates does not correspond anymore. > > > > Any help or suggestions would be highly appreciated! > > > > Thanks, > > Fred > > > > -- > > Frédéric Roux > > Postdoctoral Scientist > > f.roux at bcbl.eu > > Tel: +34 943 309 300 Ext 211 > > Fax: +34 943 309 052 > > > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > > ---------------------------------------------------------------------- > > ----- > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From michelic72 at gmail.com Tue Mar 10 17:23:26 2015 From: michelic72 at gmail.com (Cristiano Micheli) Date: Tue, 10 Mar 2015 17:23:26 +0100 Subject: [FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline' In-Reply-To: <54FD1A71.3070508@gmail.com> References: <54FD1A71.3070508@gmail.com> Message-ID: Dear Vitoria, how are you? The problem seems to lie in the definition of the sensors (first error message, which is encapsulated by the subsequent ones). What I noticed (but I fear I can't be more precise due to lack of information) is that you use two cfg definitions (cfg and cfgn) and that might create problems. On top of that I would always clean the actual cfg by nulling it at the beginning of every function call (cfg=[]). This avoids to carry around incompatible fields in sequential calls of different functions (which also require different cfg options). It would also help a lot if you included the call to ft_freqanalysis (again with an eye of regard of nulling the cfg beforehand). I hope this helps! Greetings from Oldenburg Cris On Mon, Mar 9, 2015 at 4:58 AM, Vitória Piai wrote: > Hi all, > > I'm interested in using Laplacian transformation prior to computing TFRs. > I still haven't read anything about the three methods implemented in > FieldTrip, I must confess, but I think my question is independent of that. > I'm using FT version: fieldtrip-20140801 on Matlab2014a. > > If I use the method 'spline', I can subsequently run ft_freqanalysis (or > ft_timelockanalysis for that matter). However, with either 'hjorth' or > 'finite', I get an error when running ft_freqanalysis/ft_timelockanalysis: > My cfg: > > cfgn.method = 'template'; > cfgn.layout = 'biosemi64.lay'; > cfg.neighbours = ft_prepare_neighbours(cfgn, dat); > > cfg.method = 'hjorth'; %'finite', 'spline' > cfg.elec = ft_read_sens('standard_1005.elc'); > lpc = ft_scalpcurrentdensity(cfg, dat); > % Then after that, a commonly used cfg for ft_freqanalysis > > Error using ft_datatype_sens (line 375) > inconsistent number of channels in sensor description > > Error in ft_datatype_raw (line 138) > data.elec = ft_datatype_sens(data.elec); > > Error in ft_checkdata (line 219) > data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); > > Error in ft_freqanalysis (line 211) > data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, > 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); > > I understand that the "inconsistent number of channels in sensor > description" is coming from these two other implementations, but should > that be the case? The help on ft_scalpcurrentdensity says " The output data > has the same format as the input and can be used in combination with most > other FieldTrip functions". So I'm wondering whether there's something > special intrinsic to these implementations, I'm using a too old FT version, > my config isn't right, or this is an issue that has gone unnoticed because > those implementations are not used often. > > Thanks a lot! > Cheers from Berkeley, > Vitoria > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Tue Mar 10 20:56:55 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Tue, 10 Mar 2015 12:56:55 -0700 Subject: [FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline' In-Reply-To: References: <54FD1A71.3070508@gmail.com> Message-ID: <54FF4C87.5030402@gmail.com> Thank you, Cris. > What I noticed (but I fear I can't be more precise due to lack of > information) is that you use two cfg definitions (cfg and cfgn) and > that might create problems. One of them (cfgn) is only being used to define neighbours, so I don't think that matters. > On top of that I would always clean the actual cfg by nulling it at > the beginning of every function call (cfg=[]). I always do this, only didn't paste that part of my code to have it occupying less space. So that isn't the problem either. > It would also help a lot if you included the call to ft_freqanalysis > (again with an eye of regard of nulling the cfg beforehand). I doubt it's the cfg in ft_freqanalysis that is causing the problem - it's the same cfg I've been using for 5 years now, and in line with the one shown in the tutorial. So unfortunately, not the solution either. The key is in the computation of the scd depending on the method. The error only occurs with 'hjorth' and 'finite', but not with 'spline'. Maybe I should just read more on these three methods before I try to advance any further. Thanks anyways, Vitoria > On Mon, Mar 9, 2015 at 4:58 AM, Vitória Piai > > wrote: > > Hi all, > > I'm interested in using Laplacian transformation prior to > computing TFRs. > I still haven't read anything about the three methods implemented > in FieldTrip, I must confess, but I think my question is > independent of that. I'm using FT version: fieldtrip-20140801 on > Matlab2014a. > > If I use the method 'spline', I can subsequently run > ft_freqanalysis (or ft_timelockanalysis for that matter). However, > with either 'hjorth' or 'finite', I get an error when running > ft_freqanalysis/ft_timelockanalysis: > My cfg: > > cfgn.method = 'template'; > cfgn.layout = 'biosemi64.lay'; > cfg.neighbours = ft_prepare_neighbours(cfgn, dat); > > cfg.method = 'hjorth'; %'finite', 'spline' > cfg.elec = ft_read_sens('standard_1005.elc'); > lpc = ft_scalpcurrentdensity(cfg, dat); > % Then after that, a commonly used cfg for ft_freqanalysis > > Error using ft_datatype_sens (line 375) > inconsistent number of channels in sensor description > > Error in ft_datatype_raw (line 138) > data.elec = ft_datatype_sens(data.elec); > > Error in ft_checkdata (line 219) > data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); > > Error in ft_freqanalysis (line 211) > data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, > 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); > > I understand that the "inconsistent number of channels in sensor > description" is coming from these two other implementations, but > should that be the case? The help on ft_scalpcurrentdensity says " > The output data has the same format as the input and can be used > in combination with most other FieldTrip functions". So I'm > wondering whether there's something special intrinsic to these > implementations, I'm using a too old FT version, my config isn't > right, or this is an issue that has gone unnoticed because those > implementations are not used often. > > Thanks a lot! > Cheers from Berkeley, > Vitoria > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Mar 10 21:47:47 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 10 Mar 2015 20:47:47 +0000 Subject: [FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline' In-Reply-To: <54FF4C87.5030402@gmail.com> References: <54FD1A71.3070508@gmail.com> <54FF4C87.5030402@gmail.com> Message-ID: <9906653C-1E7B-4EEA-907D-C3EC1EC7EC0D@fcdonders.ru.nl> Hi Vitoria, Could you first download a newer version of FieldTrip, e.g. 20150309 :-), and see if the problem is replicated with this version? I think it will persist, but it would be good to know for sure, otherwise we may be tackling problems that are not problems anymore. Note that the low level function ft_datatype_sens throws an informative error, occurring on line 375. You may want to try to do a ‘dbstop if error’ to investigate it in a bit more detail. I suspect an ‘inconsistent number of channels in the sensor description’ :-). The reason why it may fail with the ‘spline’ method, and not with the other methods is probably that the former requires a description of the electrode positions, whereas the the latter methods only need a description of the neighbours for each electrode. Best, Jan-Mathijs On Mar 10, 2015, at 8:56 PM, Vitoria Piai > wrote: Thank you, Cris. What I noticed (but I fear I can't be more precise due to lack of information) is that you use two cfg definitions (cfg and cfgn) and that might create problems. One of them (cfgn) is only being used to define neighbours, so I don't think that matters. On top of that I would always clean the actual cfg by nulling it at the beginning of every function call (cfg=[]). I always do this, only didn't paste that part of my code to have it occupying less space. So that isn't the problem either. It would also help a lot if you included the call to ft_freqanalysis (again with an eye of regard of nulling the cfg beforehand). I doubt it's the cfg in ft_freqanalysis that is causing the problem - it's the same cfg I've been using for 5 years now, and in line with the one shown in the tutorial. So unfortunately, not the solution either. The key is in the computation of the scd depending on the method. The error only occurs with 'hjorth' and 'finite', but not with 'spline'. Maybe I should just read more on these three methods before I try to advance any further. Thanks anyways, Vitoria On Mon, Mar 9, 2015 at 4:58 AM, Vitória Piai > wrote: Hi all, I'm interested in using Laplacian transformation prior to computing TFRs. I still haven't read anything about the three methods implemented in FieldTrip, I must confess, but I think my question is independent of that. I'm using FT version: fieldtrip-20140801 on Matlab2014a. If I use the method 'spline', I can subsequently run ft_freqanalysis (or ft_timelockanalysis for that matter). However, with either 'hjorth' or 'finite', I get an error when running ft_freqanalysis/ft_timelockanalysis: My cfg: cfgn.method = 'template'; cfgn.layout = 'biosemi64.lay'; cfg.neighbours = ft_prepare_neighbours(cfgn, dat); cfg.method = 'hjorth'; %'finite', 'spline' cfg.elec = ft_read_sens('standard_1005.elc'); lpc = ft_scalpcurrentdensity(cfg, dat); % Then after that, a commonly used cfg for ft_freqanalysis Error using ft_datatype_sens (line 375) inconsistent number of channels in sensor description Error in ft_datatype_raw (line 138) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 219) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_freqanalysis (line 211) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); I understand that the "inconsistent number of channels in sensor description" is coming from these two other implementations, but should that be the case? The help on ft_scalpcurrentdensity says " The output data has the same format as the input and can be used in combination with most other FieldTrip functions". So I'm wondering whether there's something special intrinsic to these implementations, I'm using a too old FT version, my config isn't right, or this is an issue that has gone unnoticed because those implementations are not used often. Thanks a lot! Cheers from Berkeley, Vitoria _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ 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 elam4hcp at gmail.com Tue Mar 10 22:54:24 2015 From: elam4hcp at gmail.com (Jennifer Elam) Date: Tue, 10 Mar 2015 16:54:24 -0500 Subject: [FieldTrip] 2015 HCP Course: Faculty, Schedule, and Flyer available now Message-ID: Faculty listings and the full schedule of covered topics are now available for the 2015 HCP Course: “Exploring the Human Connectome”, to be held June 8-12 at the Marriott Resort Waikiki Beach, in Honolulu, Hawaii, USA. This 5-day intensive course is designed for those interested in: - using data being collected and distributed by HCP - acquiring and analyzing HCP-style imaging and behavioral data at your own institution - processing your own non-HCP data using HCP pipelines and methods - learning to use Connectome Workbench tools and the CIFTI connectivity data format - learning HCP multi-modal neuroimaging analysis methods, including those that combine MEG and MRI data - positioning yourself to capitalize on HCP-style data from forthcoming large-scale projects (e.g., Lifespan HCP and Connectomes Related to Human Disease Please share with your colleagues and visit the HCP Course website to register and download a course flyer for posting. We hope to see you in Hawaii! Best, 2015 HCP Course Organizers -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Tue Mar 10 23:58:36 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Tue, 10 Mar 2015 15:58:36 -0700 Subject: [FieldTrip] ft_channelrepair only for certain trials: repaired data only contain those certain trials In-Reply-To: <003101d05b43$801dd6c0$80598440$@artinis.com> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> Message-ID: <54FF771C.70905@gmail.com> Hi all, I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 09:33:28Z) to repair bad channels. I wanted to do it only for certain trials, and when I saw the option cfg.trials, I was really happy. However, if I pass cfg.trials with a vector rather than 'all', then the function does: ft_selectdata (lines 104, 108), then from line 352 onwards, things are converted back to normal. But if the cfg contained only some trials (as I'm trying to use it for), these are not restored back, and so I'm left with a data structure that only has as many trials as my cfg had. I was just wondering whether that is the expected behaviour of ft_channelrepair and that I should restore things myself (presumably with ft_append-like functions). If so, it would be nice if the help on this function would say that... If I'm simply using a too old version, my apologies. (I should start working with github, I know!!) Thanks a lot, Vitoria From russgport at gmail.com Wed Mar 11 02:40:57 2015 From: russgport at gmail.com (russ port) Date: Tue, 10 Mar 2015 21:40:57 -0400 Subject: [FieldTrip] low rank for post MaxFilter'd data Message-ID: <7AC9465A-FC5B-45F0-8156-085180D79DA5@gmail.com> Dear Fieldtrippers I have question about post MaxFiltered data and ICA analysis. Following the excellent chain http://mailman.science.ru.nl/pipermail/fieldtrip/2013-March/006270.html I used the command rank(squeeze(data.trial{1}) * squeeze(data.trial{1})') my result is 6 (not the 60 I would normally expect out of Max Filter’d data While I am using slightly different settings than default on MaxFilter (TSSS, .9 correlation and 10 second buffer, removing of popping channels), I am not sure that this would account for the issue. Has anyone else ran into a similar problem/am I doing something that would easily account for this. As for fieldtrip, I have simply read in the data and rejected jumping or muscle artifacts. - Best, Russ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Mar 11 08:32:12 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 11 Mar 2015 08:32:12 +0100 Subject: [FieldTrip] ft_channelrepair only for certain trials: repaired data only contain those certain trials In-Reply-To: <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitoria, Yes, that is the expected behaviour of ft_channelrepair, because that is consistent with all other functions supporting a cfg.trials-option (i.e. select first, then do the work on what remains). It should be quite straightforward to do something like: cfg = []; cfg.trials = goodtrials; dat1 = ft_selectdata(cfg, data); cfg = []; ... cfg.trials = badtrials; dat2 = ft_channelrepair(cfg, data); datcmb = ft_appenddata([], dat1, dat2); to achieve what you want. Groetjes, Eelke On 10 March 2015 at 23:58, Vitoria Piai wrote: > Hi all, > > I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 > 09:33:28Z) to repair bad channels. I wanted to do it only for certain > trials, and when I saw the option cfg.trials, I was really happy. > However, if I pass cfg.trials with a vector rather than 'all', then the > function does: > ft_selectdata (lines 104, 108), > then from line 352 onwards, things are converted back to normal. > But if the cfg contained only some trials (as I'm trying to use it for), > these are not restored back, and so I'm left with a data structure that > only has as many trials as my cfg had. > > I was just wondering whether that is the expected behaviour of > ft_channelrepair and that I should restore things myself (presumably > with ft_append-like functions). If so, it would be nice if the help on > this function would say that... > If I'm simply using a too old version, my apologies. (I should start > working with github, I know!!) > > Thanks a lot, > Vitoria > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From berryv.dberg at gmail.com Wed Mar 11 10:45:07 2015 From: berryv.dberg at gmail.com (berry van den berg) Date: Wed, 11 Mar 2015 10:45:07 +0100 Subject: [FieldTrip] Pre-stimulus baseline correction for response-locked ERPs In-Reply-To: <54FEDFEB.2080904@gmail.com> References: <54FEDFEB.2080904@gmail.com> Message-ID: Dear Marijke, I dont think there is a fiedltrip function to do this but I could be wrong. There are two alternatives that you can do. First, the easy solution, which might not work for your paradigm: if I make a response locked ERP I usually ensure that only trials with an RT between 200 and 1200ms (for a lot of tasks this is a reasonable criteria - 200ms is unreasonable fast and 1200 is way too slow). You can then do a baseline correction of [-1.4-1.2], which would ensure that there is no stimulus evoked activity in your baseline period. The second solution requires looping over your trials and subtracting a custom baseline for each trial, something like this: % rts is a 1*ntrials matrix containing the rt for each trial in seconds for iTrial = 1:length(rts) % take the mean of the data for each channel prior to stimulus onset (based on rts), replicate this matrix until the size of your original data and subtract these mean values from your original epoch tmp = repmat(mean(data.trial{iTrial}(:,data.time{iTrial}<-1*rts(iTrail) & data.time{iTrial}>-1*rts(iTrail)-0.2),2),1,length(data.time{iTrial})) data.trial{iTrial} = data.trial{iTrial} - tmp; end I hope that this helps! Berry van den Berg On 10 March 2015 at 13:13, Marijke Beulen wrote: > Dear all, > > I was wondering if anyone knows how to define a stimulus-locked baseline period to correct a response-locked ERP using ft_timelockbaseline. > > So far, I've been plotting stimulus-locked ERPs and using ft_timelockbaseline with the 300ms before stimulus onset for baseline correction. I've tried other methods to do baseline correction manually, but so far, ft_timelockbaseline has given me the best results. However, now I also want to plot response-locked ERPs. To keep things comparable, I would like to use the same 300ms pre-stimulus interval for baseline correction, but my trials have different lengths. This means that after response-locking the data, the time stamp of that interval is different on every trial. Is there any way to e.g. define separate baseline windows for each trial or to give FieldTrip another (stimulus-locked) dataset to use as a baseline in ft_timelockbaseline? > > I've already searched through FieldTrip's documentation, but I haven't been able to find a solution. Any advice on how to do this would be much appreciated! > > Sincerely, > > Marijke Beulen > > -- > M.A. Beulen, MSc. > PhD student at University of Groningen, dept. Artificial Intelligence > Bernoulliborg, room 320 > Nijenborgh 9 > 9747 AG Groningen > The Netherlands > Phone: +31 50 363 6915m.a.beulen at rug.nl > > > _______________________________________________ > 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 cmuehl at gmail.com Wed Mar 11 16:39:01 2015 From: cmuehl at gmail.com (Christian Muehl) Date: Wed, 11 Mar 2015 15:39:01 +0000 Subject: [FieldTrip] Call for Papers - 4th Workshop on Affective Brain-Computer Interfaces @ ACII2015 Message-ID: <21b626aaf0b94fa0924944d11a05fd9f@EXPRD01.hosting.ru.nl> ** Call for Papers ** 4th Workshop on Affective Brain-Computer Interfaces (aBCI) Workshop at ACII 2015 (September 21-24), Xi'an, China, September 21, 2015 http://www.affective-sciences.org/aBCI2015 http://www.acii2015.org/ The goal of the aBCI workshop series is to connect researchers from the communities of affective computing, social signal processing, brain-computer interfacing, neuro-ergonomics, and neuroscience around the federating theme of affective brain computer interfaces (aBCI). Affective BCI aim at the development of human-computer interfaces able to react and adapt to users' emotions and related cognitive states as measured from neurophysiological signals. Besides the general solicitation of work toward adaptive HCI applications based on aBCI, this 4th edition of the workshop will focus on two specific aspects of aBCI. Firstly, we welcome papers on ways to alleviate current aBCI limitations, through work on the physiological basis of aBCI, innovative applications resilient to classification error, and methods to increase the robustness of aBCI. Secondly, we would like to explore the social aspects and applications of aBCI by welcoming submissions on topics such as multi-user aBCI and the assessment of social processes from brain signals. The workshop topics include, but are not limited to, * effective emotion elicitation and data collection in social settings; * identification of robust and specific markers of emotional, cognitive and social processes; * methods for the assessment of emotions, cognitive states and social interactions; * methods to measure and process multiple people physiological activity; * applications of central and peripheral signal processing to social situations; * innovative concepts for adaptive interfaces and affective BCI; * demos of affective BCI systems. Submission Instructions: * The papers should feature original empirical work, theoretical work, or a well defendable but arguable position of the authors. * Papers will be published electronically in the proceedings of ACII 2015 by IEEE Xplore. Papers should be limited to 6 pages+1page references. The review is double blind - please remove all author information from the manuscripts. * Further details about the submission instructions and format can be found on the website of ACII 2015. Important Dates: June 5, 2015: Submission of manuscripts July 3, 2015: Acceptance/Rejection notification July 24, 2015: Submission of camera-ready papers September 21, 2015: Date of the Workshop For further information, see our website or contact abci at ewi.utwente.nl Programme Chairs: * Fabien Lotte, Inria Sud-Ouest, Bordeaux, France * Guilliaume Chanel, Swiss Center for Affective Sciences, Geneva, Switzerland * Christian Mühl, German Aerospace Center, Cologne, Germany * Anton Nijholt, Universiteit Twente, the Netherlands Programme Committee: Egon L. van den Broek, University of Utrecht, the Netherlands Anne-Marie Brouwer, TNO Perceptual and Cognitive Systems, Soesterberg, the Netherlands Stephen Dunne, Starlab Barcelona, Spain Touradj Ebrahimi, École polytechnique fédérale de Lausanne, Switzerland Stephen Fairclough, John Moores University, Liverpool, UK Tiago H. Falk, Institut National de la Recherche Scientifique (INRS), Montreal, Canada Hayrettin Gürkök, University of Twente, Enschede, the Netherlands Dominic Heger, Karlsruhe Institute of Technology, Germany Klaas Ihme, German Aerospace Center, Brunswick, Germany Jonghwa Kim, University of Augsburg, Germany Brent Lance, Army Research Laboratory/TNB, Aberdeen Proving Ground, USA, Grace Leslie, MIT Media Lab, Boston, USA Giulia Liberati, Université catholique de Louvain, Belgium Gary Garcia Molina, Philips Research North America, Briarcliff, USA Scott Makeig, University of California San Diego, USA Tim Mullen, University of California San Diego, USA Domen Novak, University of Wyoming, Laramie, USA Ioannis Patras, Queen Mary University, London, UK Evan Peck, Bucknell University, Lewisburg, USA Mannes Poel, University of Twente, Enschede, the Netherlands Thierry Pun, University of Geneva, Switzerland Erin Solovey, Drexel University, Philadelphia, USA Mohammad Soleymani, University of Geneva, Switzerland Aureli Soria-Frisch, Starlab Barcelona, Spain Olga Sourina, NanYang Technological University, Singapore Aleksander Valjamae, Linköping University, Sweden Jan van Erp, University of Twente, Enschede, the Netherlands Chi Thanh Vi, University of Bristol, UK Thorsten Zander, Technische Universität Berlin, Germany From emr37 at cam.ac.uk Thu Mar 12 09:42:45 2015 From: emr37 at cam.ac.uk (Emily Ruzich) Date: Thu, 12 Mar 2015 08:42:45 +0000 Subject: [FieldTrip] Creative use of ft_multiplotER? Message-ID: Hi All, PhD student and first-time fieldtripper here. I have a question about plotting grand averages using multiplot. I've done a bit of a cheat (I think), as I'm actually interested in measures of complexity, and so for each of my subjects I've taken the timecourse data for a 60-second interval and performed an MSE calculation before overwriting the data.time and data.trial matrices. These plot just fine using: cfg = []; cfg.layout = 'biosemi64.lay'; figure(1); clf; ft_multiplotER(cfg, data); But I'm running into trouble when I try to perform some group comparisons. I'm able to average across subjects (using the standard matlab mean function; I've tried timelockgrandaverage and timelockanalysis, but I think as this isn't actually timelock data, I get errors), and I am able to plot one group average using the same code as above, but when I try overlaying an additional group to the plotting function, I get the following error: ft_multiplotER(cfg, data, data2); Error using horzcat Dimensions of matrices being concatenated are not consistent. Error in ft_multiplotER (line 516) xmin = min([xmin varargin{i}.(xparam)]); This is the case even when the two "data" inputs are identical (eg: ft_multiplotER(cfg, data2, data2)). I've also tried using "hold on" but haven't had success with this either. I would very much appreciate it if you could please let me know if what I am trying to accomplish is even possible using ft (or at least, that it is not strongly discouraged) - I hope this question is not overly trivial! Please let me know if there is any additional information I can provide. Thank you very much for your time. Best, Emily --- Emily M Ruzich PhD Candidate Department of Psychiatry University of Cambridge Douglas House 18b Trumpington Rd Cambridge CB2 8AH Tel: 01223 746 123 Mobile: 07761 010 091 Email: emr37 at cam.ac.uk | emily.ruzich at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From yanina.prystauka at studenti.unitn.it Fri Mar 13 04:44:16 2015 From: yanina.prystauka at studenti.unitn.it (Yanina Prystauka) Date: Fri, 13 Mar 2015 04:44:16 +0100 Subject: [FieldTrip] ft_artifact_threshold Message-ID: Dear all, I would like to automatically remove trials in which the min or max of the signal exceeds 100 uv/T. So I am planning to use the ft_artifact_threshold on the preprocessed data. After running the following code cfg = []; cfg.continuous = 'no'; cfg.trl = 'dataRejBrows.sampleinfo'; * %I am not sure how to specify the cfg.trl since I already have the epochs I am interested in; someone on the mailing list has suggested earlier to use the .sampleinfo parameter.* cfg.artfctdef.threshold.min = -100; cfg.artfctdef.threshold.max = 100; [cfg, artifact] = ft_artifact_threshold(cfg, dataRejBrows); I get the following error message: Index exceeds matrix dimensions. Error in ft_artifact_threshold (line 149) dat = ft_fetch_data(data, 'header', hdr, 'begsample', cfg.trl(trlop,1), 'endsample', cfg.trl(trlop,2), 'chanindx', channelindx, 'checkboundary', strcmp(cfg.continuous, 'no')); Error in reject_artifacts (line 59) [cfg, withinhundred] = ft_artifact_threshold(cfg, dataAllRight); I will appreciate any suggestions on how to proceed with this function! Kind regards, Yanina -------------- next part -------------- An HTML attachment was scrubbed... URL: From christophe.grova at mcgill.ca Fri Mar 13 14:25:52 2015 From: christophe.grova at mcgill.ca (Christophe Grova) Date: Fri, 13 Mar 2015 13:25:52 +0000 Subject: [FieldTrip] Call For Papers: Special issue: Simulation and Validation in Brain Image Analysis to appear in Computational Intelligence and Neuroscience Message-ID: <9E1647EDA3EBB44AADA162CEC4C4222E750DBE80@exmbx2010-9.campus.MCGILL.CA> Call for papers Special issue: Simulation and Validation in Brain Image Analysis to appear in Computational Intelligence and Neuroscience http://www.hindawi.com/journals/cin/si/980531/cfp/ Manuscript Due Friday, 10 July 2015 First Round of Reviews Friday, 2 October 2015 Publication Date Friday, 27 November 2015 This special issue seeks to solicit original research articles as well as review articles on the development of advanced validation methodologies for brain imaging (fMRI, MRI, EEG, MEG, and PET) as well as the applications of such methodologies to evaluate data analysis algorithms. It also covers image databases for method validation purposes and computational (neuroinformatics) aspects of the method validation. Potential topics include, but are not limited to: * Brain image simulation in PET, EEG, MEG, fMRI, and MRI * Modeling ground-truth in image simulation and the development of valid and realistic simulation models * Methodologies for method validation in brain imaging (not necessarily to be simulation-based) * Databases for method validation (with a demonstration of their potential usage) * Validation studies of data analysis methods in brain imaging * Studies demonstrating the value of quantitative validation in brain imaging Authors can submit their manuscripts via the Manuscript Tracking System at http://mts.hindawi.com/submit/journals/cin/vabi/. Lead Guest Editor * Jussi Tohka, Universidad Carlos III de Madrid, Spain; Tampere University of Technology, Tampere, Finland Guest Editors * Pierre L. Bellec, Universite de Montreal, Montreal, Canada * Christophe Grova, Concordia University, Montreal, Canada * Anthonin Reilhac, CERMEP, Bron, France *************************** Christophe Grova, PhD Assistant Professor, Physics Dpt, Concordia University PERFORM centre, Concordia University Adjunct Prof in Biomedical Engineering, and Neurology and Neurosurgery Dpt, McGill University Multimodal Functional Imaging Lab (Multi FunkIm) Montreal Neurological Institute - epilepsy group Centre de Recherches en Mathématiques Physics Dpt Concordia University - Loyola Campus - Office SP 365.12 7141 Sherbrooke Street West, Montreal, QC H4B 1R6 Phone: (514) 848-2424 ext.4221 Biomedical Engineering Department McGill University - Room 304 3775 University Street, Montreal, Quebec, Canada, H3A 2B4 Phone : (514) 398 2516 Fax : (514) 398 7461 email : christophe.grova at concordia.ca , christophe.grova at mcgill.ca web: Physics, Concordia University: http://physics.concordia.ca/facultyandresearch/bios/grova.php McGill University: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/PeopleChristophe MultiFunkIm Lab: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/HomePage *************************** [X] -------------- next part -------------- An HTML attachment was scrubbed... URL: From emr37 at cam.ac.uk Fri Mar 13 14:27:14 2015 From: emr37 at cam.ac.uk (Emily Ruzich) Date: Fri, 13 Mar 2015 13:27:14 +0000 Subject: [FieldTrip] question about using ft_multiplot for my own needs Message-ID: <4bc220415d904cd98d5242bb66eb4d95@EXPRD01.hosting.ru.nl> Hello, Apologies, I've just come across a question you asked to the FieldTrip list several years ago and was wondering if you ever got a solution to customisation of multiplot? Thanks! Best, Emily --- Emily M Ruzich PhD Candidate Department of Psychiatry University of Cambridge Douglas House 18b Trumpington Rd Cambridge CB2 8AH Tel: 01223 746 123 Mobile: 07761 010 091 Email: emr37 at cam.ac.uk | emily.ruzich at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Fri Mar 13 16:35:05 2015 From: v.piai.research at gmail.com (=?windows-1252?Q?Vit=F3ria_Piai?=) Date: Fri, 13 Mar 2015 08:35:05 -0700 Subject: [FieldTrip] ft_channelrepair only for certain trials: repaired data only contain those certain trials In-Reply-To: References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> Message-ID: <550303A9.5070705@gmail.com> Thanks, Eelke! I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. Thanks a lot, Hope all is well in Nijmegen!! On 3/11/2015 12:32 AM, Eelke Spaak wrote: > Hi Vitoria, > > Yes, that is the expected behaviour of ft_channelrepair, because that > is consistent with all other functions supporting a cfg.trials-option > (i.e. select first, then do the work on what remains). > > It should be quite straightforward to do something like: > > cfg = []; > cfg.trials = goodtrials; > dat1 = ft_selectdata(cfg, data); > > cfg = []; > ... > cfg.trials = badtrials; > dat2 = ft_channelrepair(cfg, data); > > datcmb = ft_appenddata([], dat1, dat2); > > to achieve what you want. > > Groetjes, > Eelke > > On 10 March 2015 at 23:58, Vitoria Piai wrote: >> Hi all, >> >> I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 >> 09:33:28Z) to repair bad channels. I wanted to do it only for certain >> trials, and when I saw the option cfg.trials, I was really happy. >> However, if I pass cfg.trials with a vector rather than 'all', then the >> function does: >> ft_selectdata (lines 104, 108), >> then from line 352 onwards, things are converted back to normal. >> But if the cfg contained only some trials (as I'm trying to use it for), >> these are not restored back, and so I'm left with a data structure that >> only has as many trials as my cfg had. >> >> I was just wondering whether that is the expected behaviour of >> ft_channelrepair and that I should restore things myself (presumably >> with ft_append-like functions). If so, it would be nice if the help on >> this function would say that... >> If I'm simply using a too old version, my apologies. (I should start >> working with github, I know!!) >> >> Thanks a lot, >> Vitoria >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From widmann at uni-leipzig.de Fri Mar 13 14:04:22 2015 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Fri, 13 Mar 2015 14:04:22 +0100 Subject: [FieldTrip] [MMN 2015] Reminder - Abstract Submission Deadline: March 31 Message-ID: <60D9B9F9-DCC2-4ECD-BF75-F4C00AA4D765@uni-leipzig.de> Dear Colleague, This is a reminder that the deadline for abstract submission and early-bird registration for the MMN 2015 is March 31. The conference, "Error Signals from the Brain - 7th Mismatch Negativity Conference (MMN 2015)", will be held at the University of Leipzig, Germany, from 8-11 September 2015. The preliminary program is now available and can be viewed in the attached flyer and on the webpage. The conference will feature experts from the field of MMN research and beyond. Three Keynote Lectures (http://event.uni-leipzig.de/mmn2015/program/keynotes.php) and 13 Symposia (http://event.uni-leipzig.de/mmn2015/program/symposia.php) will cover a broad range of topics from attention, perception, and language to computational models, clinical applications, and development. There will be two hands-on pre-conference workshops on methodological aspects of MMN research and on the visual MMN. Further it is a great opportunity to visit Leipzig - a European city which is rich in intellectual, musical, and architectural heritage. Poster abstract submission and early-bird registration will be possible until 31 March 2015 here: https://event.uni-leipzig.de/mmn2015/ We look forward to welcoming you in Leipzig for an inspiring MMN 2015 conference. Kind regards, Erich Schröger and the organization team -- Error Signals from the Brain - 7th Mismatch Negativity Conference (MMN 2015) University of Leipzig, 8-11 September 2015 Web: https://event.uni-leipzig.de/mmn2015/ Email: mmn2015 at uni-leipzig.de _______________________________________________________________________________ Important dates: Abstract Submission deadline: March 31, 2015 Early-bird Registration deadline: March 31, 2015 _______________________________________________________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: Flyer_MMN2015.pdf Type: application/pdf Size: 825090 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Fri Mar 13 17:08:35 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 13 Mar 2015 16:08:35 +0000 Subject: [FieldTrip] ft_channelrepair only for certain trials: repaired data only contain those certain trials In-Reply-To: <550303A9.5070705@gmail.com> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> <550303A9.5070705@gmail.com> Message-ID: Hi V, Note that you can use the trialinfo field in your data for bookkeeping, e.g. (assuming there is already such field in your data) data.trialinfo(:,end+1) = (1:numel(data.trial))’; cfg = []; cfg.trials = sel_to_be_repaired; cfg.etc data1 = ft_channelrepair(cfg,data); cfg = []; cfg.trials = sel_to_be_unrepaired data2 = ft_selectdata(cfg, data); data = ft_appenddata([],data1,data2); Although the order has now been changed, you’ll see that the last column of the trialinfo field still pertains to your original trial indices. JM On Mar 13, 2015, at 4:35 PM, Vitória Piai wrote: > Thanks, Eelke! > > I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. > > Thanks a lot, > Hope all is well in Nijmegen!! > > On 3/11/2015 12:32 AM, Eelke Spaak wrote: >> Hi Vitoria, >> >> Yes, that is the expected behaviour of ft_channelrepair, because that >> is consistent with all other functions supporting a cfg.trials-option >> (i.e. select first, then do the work on what remains). >> >> It should be quite straightforward to do something like: >> >> cfg = []; >> cfg.trials = goodtrials; >> dat1 = ft_selectdata(cfg, data); >> >> cfg = []; >> ... >> cfg.trials = badtrials; >> dat2 = ft_channelrepair(cfg, data); >> >> datcmb = ft_appenddata([], dat1, dat2); >> >> to achieve what you want. >> >> Groetjes, >> Eelke >> >> On 10 March 2015 at 23:58, Vitoria Piai wrote: >>> Hi all, >>> >>> I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 >>> 09:33:28Z) to repair bad channels. I wanted to do it only for certain >>> trials, and when I saw the option cfg.trials, I was really happy. >>> However, if I pass cfg.trials with a vector rather than 'all', then the >>> function does: >>> ft_selectdata (lines 104, 108), >>> then from line 352 onwards, things are converted back to normal. >>> But if the cfg contained only some trials (as I'm trying to use it for), >>> these are not restored back, and so I'm left with a data structure that >>> only has as many trials as my cfg had. >>> >>> I was just wondering whether that is the expected behaviour of >>> ft_channelrepair and that I should restore things myself (presumably >>> with ft_append-like functions). If so, it would be nice if the help on >>> this function would say that... >>> If I'm simply using a too old version, my apologies. (I should start >>> working with github, I know!!) >>> >>> Thanks a lot, >>> Vitoria >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From vahidgerami.mse at gmail.com Sun Mar 15 19:16:16 2015 From: vahidgerami.mse at gmail.com (vahid gerami) Date: Sun, 15 Mar 2015 21:46:16 +0330 Subject: [FieldTrip] ERP extraction from EDF file Message-ID: hello every body. i have recorded a 12 channel eeg signals as EDF file. now i want to extract the ERP's and show them as a vector. can anybody help me doing ? any idea's? regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From elaine.astrand at mdh.se Mon Mar 16 08:56:09 2015 From: elaine.astrand at mdh.se (=?iso-8859-1?Q?Elaine_=C5strand?=) Date: Mon, 16 Mar 2015 07:56:09 +0000 Subject: [FieldTrip] Problem with retrieving the data and events in fieldtrip RDA interface of Brainvision recorder Message-ID: Hello all, I'm trying to stream EEG-data from Brainvision recorder software into the fieltrip buffer. While the data is transferred, the events are not transferred at all. I'm using "ft_realtime_brainampproxy.m" I noticed two things in the script: 1. Line 195 states 'Should I apply the calibration here?' What does this mean? Does this create a problem in retrieving the data? The data in the field trip buffer does not have the same range as in the recorder software. 2. Line 198-200. Here the events are not stored in the event-structure. So this is why the events are not transferred. Has anyone noticed the same problem? How did you implement the event structure? Thanks in advance. Kind regards, Elaine Åstrand, PhD Postdoc at University of Mälardalen Västerås, Sweden -------------- next part -------------- An HTML attachment was scrubbed... URL: From zsoltturi at gmail.com Mon Mar 16 10:08:53 2015 From: zsoltturi at gmail.com (Zsolt Turi) Date: Mon, 16 Mar 2015 10:08:53 +0100 Subject: [FieldTrip] how to add trigger values to cfg.trl Message-ID: Dear Fieldtrippers, I use ft_defintrial function to perform triger-based trial segmentation of cnt files recorded from the ANT EEG system. In the earlier version of FieldTrip (e.g., 20140123) the resulted cfg.trl matrix has a size of n x 4, where the last column represents trigger values. In the newer version of FT (e.g., 20150310), the resulted trl matrix contains only 3 columns and the 4th column about trigger values is missing. To note but maybe it is not important but I do not use the most recent version of Matlab (8.1.0.604, R2013a, student licence). Could anyone give me a hint how can I add the trigger values to the cfg.trl matrix (ie. to the 4th column)? My code is: cfg = []; cfg.dataset = '20150302_1454.cnt'; cfg.trialfun = 'ft_trialfun_general'; cfg.trialdef.prestim = 1.5; cfg.trialdef.poststim = 2.0; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'2','3'}; cfg = ft_definetrial(cfg); Many thanks in advance! Zsolt -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Mon Mar 16 12:04:13 2015 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Mon, 16 Mar 2015 11:04:13 +0000 Subject: [FieldTrip] Fwd: [SPM] SPM course for MEG/EEG in London: May 11-13 In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Bernadette van Wijk Date: Sat, Mar 14, 2015 at 3:10 PM Subject: [SPM] SPM course for MEG/EEG in London: May 11-13 To: SPM at jiscmail.ac.uk Dear all, We are pleased to announce that our annual *SPM course for MEG/EEG* will take place this year from *Monday May 11* to *Wednesday May 13 2015*. Hosted by University College London, the course will be held at Queen Square, a very central location in London (UK). The course will present instruction on the analysis of MEG and EEG data. The first two days will combine theoretical presentations with practical demonstrations of the different data analysis methods implemented in SPM. On the last day participants will have the opportunity to work on SPM tutorial data sets under the supervision of the course faculty. We also invite students to bring their own data for analysis. The course is suitable for both beginners and more advanced users. The topics that will be covered range from pre-processing and statistical analysis to source localization and dynamic causal modelling. The program is listed below. Registration is now open. We offer a reduced rate when attending both the MEG/EEG course and the fMRI course during the second half of the week. For full details of both courses see 'Statistical Parametric Mapping short courses' at http://www.ucl.ac.uk/ion/courses-viewer where you can also register. Available places are limited so please register as early as possible if you would like to attend! *Monday May 11th * 9.00 - 9.30 Registration 9.30 - 9.45 SPM introduction and resources *Guillaume Flandin* 9.45 - 10.30 What are we measuring with M/EEG? *Stefan Kiebel* 10.30 - 11.15 Data pre-processing *Holly Rossiter* *Coffee* 11.45 - 12.30 Data pre-processing - demo *Deborah Talmi, Megumi Fukuda* 12.30 - 13.15 General linear model and classical inference *Christophe Phillips* *Lunch* 14.15 - 15.00 Multiple comparisons problem and solutions *Gareth Barnes* 15.00 - 15.45 Bayesian inference *Chris Mathys* *Coffee* 16.15 - 18.00 Tutorial on group M/EEG dataset analysis *Vladimir Litvak, Jason Taylor* *Tuesday May 12th * 9.30 - 10.15 M/EEG source analysis *Saskia Helbling* 10.15 - 11.15 M/EEG source analysis - demo *Jose Lopez, Jason Taylor, Sofie Meyer* *Coffee* 11.45 - 12.30 The principles of DCM *Ryszard Auksztulewicz* 12.30 - 13.15 DCM for evoked responses *Harriet Brown* *Lunch* 14.15 - 15.00 DCM for steady state responses *Rosalyn Moran* 15.00 - 15.45 DCM for time-frequency responses *Bernadette van Wijk* 15.45 - 16.30 DCM - demo *Andre Marreiros, Martin Dietz * *Coffee* 17.00 - 17.45 Bayesian model selection and averaging *Will Penny* 17.45 - 18.45 Clinic - Questions & Answers session *Karl Friston* 19.00 onwards - Social Event *Wednesday May 13th* 9.30 – 17.00 Practical hands-on session in UCL computer class rooms. Participants can either work on SPM tutorial datasets or on their own data with the help of the faculty. There will also be an opportunity to ask questions in small tutorial groups for further discussions on the topics of the lectures. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivano_triggiani at yahoo.it Mon Mar 16 17:07:31 2015 From: ivano_triggiani at yahoo.it (Ivano Triggiani) Date: Mon, 16 Mar 2015 16:07:31 +0000 (UTC) Subject: [FieldTrip] ERP extraction from EDF file In-Reply-To: References: Message-ID: <528586820.779615.1426522051894.JavaMail.yahoo@mail.yahoo.com> Dear Vahid we need more details. First, are that channels triggered? In this case, the trigger is another channel (with a square wave, or sinilar?). In that case you need, for instance, a personal function to segment the data into epoches. I can help you to write such a function, but I need information about the trigger.On the other hand, to export the ERP, maybe you will need another function to identify latency and amplitude, but this is a later step. Ivano ------------------------------------------------------------------------ "No man can wear one face to himself and another to the multitude, without finally getting bewildered as to which one is true." Nathaniel Hawthorne Il Lunedì 16 Marzo 2015 12:09, "fieldtrip-request at science.ru.nl" ha scritto: Send fieldtrip mailing list submissions to     fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit     http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to     fieldtrip-request at science.ru.nl You can reach the person managing the list at     fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics:   1. ERP extraction from EDF file (vahid gerami)   2. Problem with retrieving the data and events in fieldtrip RDA       interface of Brainvision recorder (Elaine ?strand)   3. how to add trigger values to cfg.trl (Zsolt Turi) ---------------------------------------------------------------------- Message: 1 Date: Sun, 15 Mar 2015 21:46:16 +0330 From: vahid gerami To: fieldtrip at science.ru.nl Subject: [FieldTrip] ERP extraction from EDF file Message-ID:     Content-Type: text/plain; charset="utf-8" hello every body. i have recorded a 12 channel eeg signals as EDF file. now i want to extract the ERP's and show them as a vector. can anybody help me doing ? any idea's? regards -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Mon, 16 Mar 2015 07:56:09 +0000 From: Elaine ?strand To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] Problem with retrieving the data and events in     fieldtrip RDA interface of Brainvision recorder Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hello all, I'm trying to stream EEG-data from Brainvision recorder software into the fieltrip buffer. While the data is transferred, the events are not transferred at all. I'm using "ft_realtime_brainampproxy.m" I noticed two things in the script: 1. Line 195 states 'Should I apply the calibration here?' What does this mean? Does this create a problem in retrieving the data? The data in the field trip buffer does not have the same range as in the recorder software. 2. Line 198-200. Here the events are not stored in the event-structure. So this is why the events are not transferred. Has anyone noticed the same problem? How did you implement the event structure? Thanks in advance. Kind regards, Elaine ?strand, PhD Postdoc at University of M?lardalen V?ster?s, Sweden -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Mon, 16 Mar 2015 10:08:53 +0100 From: Zsolt Turi To: fieldtrip at science.ru.nl Subject: [FieldTrip] how to add trigger values to cfg.trl Message-ID:     Content-Type: text/plain; charset="utf-8" Dear Fieldtrippers, I use ft_defintrial function to perform triger-based trial segmentation of cnt files recorded from the ANT EEG system. In the earlier version of FieldTrip (e.g., 20140123) the resulted cfg.trl matrix has a size of n x 4, where the last column represents trigger values. In the newer version of FT (e.g., 20150310), the resulted trl matrix contains only 3 columns and the 4th column about trigger values is missing. To note but maybe it is not important but I do not use the most recent version of Matlab (8.1.0.604, R2013a, student licence). Could anyone give me a hint how can I add the trigger values to the cfg.trl matrix (ie. to the 4th column)? My code is: cfg                                  = []; cfg.dataset                      = '20150302_1454.cnt'; cfg.trialfun                      = 'ft_trialfun_general'; cfg.trialdef.prestim          = 1.5; cfg.trialdef.poststim        = 2.0; cfg.trialdef.eventtype        = 'trigger'; cfg.trialdef.eventvalue      = {'2','3'}; cfg                                  = ft_definetrial(cfg); Many thanks in advance! Zsolt -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 52, Issue 16 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Mar 17 11:15:33 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 17 Mar 2015 11:15:33 +0100 Subject: [FieldTrip] website, ftp and bugzilla downtime Message-ID: Dear FieldTrip users As part of the renovation of the Donders building, the server room will be moved to another floor. The consequence is that the servers that are running the FieldTrip wiki, ftp and bugzilla will be switched off, disconnected, moved and switched on again. The move does not only involve the server hosting our website, but also our compute cluster, the large storage system and a whole bunch of other equipment, i.e. it involves moving about ten full-height 19” racks full with computers. You can imagine this to be quite some work for our ICT team. The exact downtime is hard to predict, but the whole procedure is planned for next Monday (23 March 7:00 CET) to next Wednesday. I realize that the lack of availability of the fieldtrip wiki and ftp server is inconvenient, hence we will try to keep them up and running by temporarily migrating these services to another location (outside the Donders building). Also this might come with a little bit of downtime, but it should be so short that hopefully you won't notice. We will also use the move to initiate the transition to a new domain “fieldtriptoolbox.org" which better reflects the contributions of all stakeholders to the project (not only the DCCN, which once started off as the F.C. Donders centre). The old addresses will continue to work for the time being, so you can use either the old fieldtrip.fcdonders.nl or the new www.fieldtriptoolbox.org. The FTP (for releases and tutorial data) will move from ftp.fcdonders.nl to ftp.fieldtriptoolbox.org. The bugzilla.fcdonders.nl and the svn.fcdonders.nl servers will NOT be kept running and will be down for a few days. Although FTP will continue to be available on ftp.fieldtriptoolbox.org, the updating of the daily releases will not happen for a few days. In case you need the latest version, you can always get them from svn or git (see 1). Also the editing capabilities on the wiki will have to be temporarily disabled during the actual migrations, which means that there is no “edit this page option” in the menu. best regards, Robert 1) http://www.fieldtriptoolbox.org/faq/i_am_having_problems_downloading_from_the_ftp_server From drivolta81 at gmail.com Tue Mar 17 14:30:17 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 17 Mar 2015 13:30:17 +0000 Subject: [FieldTrip] Sournce - stat (beamforming) z-coordinates? Message-ID: <6d74f0aca4ea4d0da5457be7d393170f@EXPRD02.hosting.ru.nl> Dear all, I would have a quick question. How can I find out the z-coordinates of my figure as saved after running ft_sourceplot with 16 slices? See figure attached for an example where colors indicate t-values. Many thanks, Davide [Inline image 2] -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Source_stat.jpg Type: image/jpeg Size: 56842 bytes Desc: Source_stat.jpg URL: From dboratyn at u.northwestern.edu Tue Mar 17 16:41:36 2015 From: dboratyn at u.northwestern.edu (Daria Boratyn) Date: Tue, 17 Mar 2015 10:41:36 -0500 Subject: [FieldTrip] Decreased coherence at 60Hz? References: <2398393D-92D6-4BAF-8439-A4842B3A368B@u.northwestern.edu> Message-ID: Hi all, Using FieldTrip, I created bipolar montages on each hemisphere and then calculated the coherence between those. I am getting an odd result and seeing a decrease in coherence at 60Hz for some of my runs. My understanding is that 60 cycle noise should be picked up by every electrode and would therefore have high coherence values across the board. Would anyone have a suggestions as to what could be causing this? I’ve attached a screenshot of what I’m seeing. Thank you, Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: coh.tiff Type: image/tiff Size: 129298 bytes Desc: not available URL: From stan.vanpelt at donders.ru.nl Tue Mar 17 17:02:53 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Tue, 17 Mar 2015 16:02:53 +0000 Subject: [FieldTrip] Decreased coherence at 60Hz? In-Reply-To: References: <2398393D-92D6-4BAF-8439-A4842B3A368B@u.northwestern.edu> Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C178C767D@exprd02.hosting.ru.nl> Hi Daria, As far as I know, signal power influences coherence measures. So, in your case, it might be that you have relatively large power and/or SNR differences between your electrodes, that might underlie your results. You might consider using a notch filter to filter the 60 Hz signal out, or stratifying your trials to compensate for SNR differences. 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 Daria Boratyn Sent: dinsdag 17 maart 2015 16:42 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Decreased coherence at 60Hz? Hi all, Using FieldTrip, I created bipolar montages on each hemisphere and then calculated the coherence between those. I am getting an odd result and seeing a decrease in coherence at 60Hz for some of my runs. My understanding is that 60 cycle noise should be picked up by every electrode and would therefore have high coherence values across the board. Would anyone have a suggestions as to what could be causing this? I've attached a screenshot of what I'm seeing. Thank you, Daria [cid:image001.png at 01D060D4.35440D90] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 64465 bytes Desc: image001.png URL: From hgould at memphis.edu Tue Mar 17 17:45:36 2015 From: hgould at memphis.edu (Herbert J Gould (hgould)) Date: Tue, 17 Mar 2015 16:45:36 +0000 Subject: [FieldTrip] Decreased coherence at 60Hz? In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C178C767D@exprd02.hosting.ru.nl> References: <2398393D-92D6-4BAF-8439-A4842B3A368B@u.northwestern.edu> <7CCA2706D7A4DA45931A892DF3C2894C178C767D@exprd02.hosting.ru.nl> Message-ID: Using a steeply notched filter will distort your waveforms this looks like you might have had a significant impedance mismatch on several of your electrodes. Herbert jay Gould, Ph.D. School of Communication Sciences and Disorders The University of Memphis From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Pelt, S. van (Stan) Sent: Tuesday, March 17, 2015 11:03 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Decreased coherence at 60Hz? Hi Daria, As far as I know, signal power influences coherence measures. So, in your case, it might be that you have relatively large power and/or SNR differences between your electrodes, that might underlie your results. You might consider using a notch filter to filter the 60 Hz signal out, or stratifying your trials to compensate for SNR differences. 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 Daria Boratyn Sent: dinsdag 17 maart 2015 16:42 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Decreased coherence at 60Hz? Hi all, Using FieldTrip, I created bipolar montages on each hemisphere and then calculated the coherence between those. I am getting an odd result and seeing a decrease in coherence at 60Hz for some of my runs. My understanding is that 60 cycle noise should be picked up by every electrode and would therefore have high coherence values across the board. Would anyone have a suggestions as to what could be causing this? I've attached a screenshot of what I'm seeing. Thank you, Daria [cid:image001.png at 01D060A8.18FB77D0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 64465 bytes Desc: image001.png URL: From doriana.demarco at gmail.com Tue Mar 17 19:31:20 2015 From: doriana.demarco at gmail.com (Doriana De Marco) Date: Tue, 17 Mar 2015 19:31:20 +0100 Subject: [FieldTrip] source analysis on component data Message-ID: Dear community, I am new user of Fieldtrip and I'm dealing with source analysis. I have no problem with timelocked or frequency data but I want to try to do source analysis of component data after ICA computing with the component topographies (comp.topo in a comp structure). I don't have MRI for every subject and I'm using the Standard_BEM model with the coordinates of EGI template realigning the electrodes in the interactive mode. After computing the source analysis, I have trouble with interpolation. I report the partial code: %% SOURCE MODELING % create source model cfg = []; cfg.method = 'eloreta'; cfg.grid = grid; cfg.elec = ft_read_sens('GSN-HydroCel-128.sfp'); cfg.vol = template_vol; source = ft_sourceanalysis(cfg, comp); disp (source) dim: [15 18 15] pos: [4050x3 double] inside: [1x2020 double] outside: [1x2030 double] cfg: [1x1 struct] comp is the structure with components. I don't know what I have to set in cfg.parameter in ft_sourceinterpolate and successive plotting. What can be the problem? Many thanks for your help. Doriana -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.rossi76 at yahoo.it Wed Mar 18 14:31:06 2015 From: martina.rossi76 at yahoo.it (Martina Rossi) Date: Wed, 18 Mar 2015 13:31:06 +0000 (UTC) Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions Message-ID: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Dear All, I would like to get some feedback from the community about a statistical analysis problem I need to tackle with my study.I want to apply the cluster-based permutation tests on time-frequency data considering two conditions (correct vs error).Unfortunately, these two conditions have different sizes (correct >> error).Right now, I am only considering subjects having a ratio "error/correct" bigger than 1/5, yet this is only an arbitrary threshold I set.The question is the following:is there a formal way to identify a threshold by which two conditions can be realiably compared with the cluster-based permutation tests?If the cluster-based approach is not suitable in this scenario, is there any other approach you would suggest?I shall perhaps point out that I am working on EEG data recorded with a 32 channel system (impedance levels < 10 kΩ). Looking forward to hear your feedback :) Kind Regards,Martina Rossi -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Wed Mar 18 14:51:33 2015 From: joramvandriel at gmail.com (Joram van Driel) Date: Wed, 18 Mar 2015 14:51:33 +0100 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> References: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Martina, In general, I'd advice to do some kind of trial-selection procedure when comparing error versus correct trials, in order to trial-count-match the two conditions. Otherwise you run into problems considering: SNR (higher for the correct condition), and RT (errors are usually faster, resulting in a time-on-task confound). What I always do is pick from the correct condition a similar number of trials that are close to the RT distribution of the error trials (i.e. the faster correct trials). That way you solve both problems at once (and probably the cluster-based permutation test in field trip will work as well, as a bonus ;)). Best, Joram On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi wrote: > Dear All, > > I would like to get some feedback from the community about a statistical > analysis problem I need to tackle with my study. > I want to apply the cluster-based permutation tests on time-frequency data > considering two conditions (correct vs error). > Unfortunately, these two conditions have different sizes (correct >> > error). > Right now, I am only considering subjects having a ratio "error/correct" > bigger than 1/5, yet this is only an arbitrary threshold I set. > The question is the following: > is there a formal way to identify a threshold by which two conditions can > be realiably compared with the cluster-based permutation tests? > If the cluster-based approach is not suitable in this scenario, is there > any other approach you would suggest? > I shall perhaps point out that I am working on EEG data recorded with a 32 > channel system (impedance levels < 10 kΩ). > > Looking forward to hear your feedback :) > > Kind Regards, > Martina Rossi > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From noahertz6 at gmail.com Wed Mar 18 15:43:32 2015 From: noahertz6 at gmail.com (Noa Hertz) Date: Wed, 18 Mar 2015 16:43:32 +0200 Subject: [FieldTrip] No 'pow' is generated when using ft_sourcedescriptives Message-ID: Hi all, I am performing PCC beamforming on resting-state data. Up till now I was using the function ft_sourcedescriptives, and received a structure containing the field avg.pow. Recently I updated my fieldtrip version to the latest release (2015), and now no 'avg.pow is generated. I get mom, but this is a complex number. Am I doing something wrong? Is there a simple way to compute pow, like abs(mom)? If so, should I do it before or after source descriptives? Thanks in advance, Noa This is the script I’m using: %%% performs source analysis cfg = []; cfg.method='pcc'; cfg.frequency = 10; cfg.lambda = 0; cfg.vol = vol; cfg.grid = grid; cfg.feedback = 'textbar'; cfg.keepfilter='yes'; source1 = ft_sourceanalysis(cfg, freqClosed); %%% creates power value in each virtual sensor cfg = []; cfg.projectmom = 'yes'; sd_close = ft_sourcedescriptives(cfg, source1);% gives power to each VS -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Mar 18 19:20:17 2015 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 18 Mar 2015 19:20:17 +0100 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Message-ID: Dear Martina, It might help to distinguish two aspects of cluster-based statistic. 1) the statistical approuch that you will use to determine whether a time-channel-datapoint / time-frequency-channel-datapoint / time-frequency-voxel-datapoint is considered significant different between conditions. 2) the statistical approuch that you will use to determine whether *a cluster of* time-channel-datapoints / time-frequency-channel-datapoints / time-frequency-voxel-datapoints is considered significantly different between conditions. When you talk about *cluster statistics*, you probably think about the second part. But this might not be what you should initially be concerned with when thinking about e.g. different numbers of trials between conditions. Rather, consider what statistical tests you (can) use to compare your time-frequency values between conditions *(within subjects).* This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any test, for that matter. As far as my limited knowledge of statistics goes, in most simple and non-extreme cases, unequal number of trials that does not have to increase your chance of type I errors, rather that of type 2 (you'll be insensitive to differences if you don't have enough observations in one condition due to noisy estimate of means/distribution). But in any case it's a simple question to google or ask a statistician. Now, after you are happy with and confident about the between conditions statistical test, consider how the cluster statistics might help you. First of all, how does it determine whether a cluster is significantly different between conditions? There are different options, but the gist is that it takes your significant statistical numbers of step (1), adds them up when they belong to the same cluster (based on whether they are neigbourings in time/freq/space with other significant numbers), takes the maximum of these summed up clusters (there might be more than one cluster), and then compares this one value to the same taken from a*(non-parametric) monte-carlo distribution *of the null hypothesis based on permuting the values over conditions (and then calculating the maximum sum). The Maris and Oostenveld paper explains it in more detail. The reason for doing cluster-statistics is that its a smart way of dealing with multiple comparisons over many time x frequency x channels (or space). The method is blind for your decisions about how its computed for each point in time x frequency x channels (or space). I find the FieldTrip statistics functions, their configurations etc., and the way they interact confusing at times, but I hope this helps to clear it up a bit. Long story short - I think your question does not limit itself to cluster statistics and at the same time is much simpler. It's all about (1). Best wishes, Stephen There are two separate steps cluster statistics (as implemented in FieldTrip, but in general as well). On 18 March 2015 at 14:51, Joram van Driel wrote: > Hi Martina, > > In general, I'd advice to do some kind of trial-selection procedure when > comparing error versus correct trials, in order to trial-count-match the > two conditions. Otherwise you run into problems considering: SNR (higher > for the correct condition), and RT (errors are usually faster, resulting in > a time-on-task confound). What I always do is pick from the correct > condition a similar number of trials that are close to the RT distribution > of the error trials (i.e. the faster correct trials). That way you solve > both problems at once (and probably the cluster-based permutation test in > field trip will work as well, as a bonus ;)). > > Best, > Joram > > On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi > wrote: > >> Dear All, >> >> I would like to get some feedback from the community about a statistical >> analysis problem I need to tackle with my study. >> I want to apply the cluster-based permutation tests on time-frequency >> data considering two conditions (correct vs error). >> Unfortunately, these two conditions have different sizes (correct >> >> error). >> Right now, I am only considering subjects having a ratio "error/correct" >> bigger than 1/5, yet this is only an arbitrary threshold I set. >> The question is the following: >> is there a formal way to identify a threshold by which two conditions can >> be realiably compared with the cluster-based permutation tests? >> If the cluster-based approach is not suitable in this scenario, is there >> any other approach you would suggest? >> I shall perhaps point out that I am working on EEG data recorded with a >> 32 channel system (impedance levels < 10 kΩ). >> >> Looking forward to hear your feedback :) >> >> Kind Regards, >> Martina Rossi >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Joram van Driel > Postdoc @ Vrije Universiteit Amsterdam > Cognitive Psychology > > > _______________________________________________ > 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 gmail.com Wed Mar 18 19:33:39 2015 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 18 Mar 2015 19:33:39 +0100 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Message-ID: I should add that (1) is typically done *within *subjects, and (2) *over * subjects. Cheers, Stephen On 18 March 2015 at 19:20, Stephen Whitmarsh wrote: > Dear Martina, > > It might help to distinguish two aspects of cluster-based statistic. > > 1) the statistical approuch that you will use to determine whether a > time-channel-datapoint / time-frequency-channel-datapoint / > time-frequency-voxel-datapoint is considered significant different between > conditions. > 2) the statistical approuch that you will use to determine whether *a > cluster of* time-channel-datapoints / time-frequency-channel-datapoints / > time-frequency-voxel-datapoints is considered significantly different > between conditions. > > When you talk about *cluster statistics*, you probably think about the > second part. But this might not be what you should initially be concerned > with when thinking about e.g. different numbers of trials between > conditions. Rather, consider what statistical tests you (can) use to > compare your time-frequency values between conditions *(within subjects).* > This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any > test, for that matter. As far as my limited knowledge of statistics goes, > in most simple and non-extreme cases, unequal number of trials that does > not have to increase your chance of type I errors, rather that of type 2 > (you'll be insensitive to differences if you don't have enough observations > in one condition due to noisy estimate of means/distribution). But in any > case it's a simple question to google or ask a statistician. > > Now, after you are happy with and confident about the between conditions > statistical test, consider how the cluster statistics might help you. > First of all, how does it determine whether a cluster is significantly > different between conditions? There are different options, but the gist is > that it takes your significant statistical numbers of step (1), adds them > up when they belong to the same cluster (based on whether they are > neigbourings in time/freq/space with other significant numbers), takes the > maximum of these summed up clusters (there might be more than one cluster), > and then compares this one value to the same taken from a*(non-parametric) > monte-carlo distribution *of the null hypothesis based on permuting the > values over conditions (and then calculating the maximum sum). The Maris > and Oostenveld paper explains it in more detail. > > The reason for doing cluster-statistics is that its a smart way of dealing > with multiple comparisons over many time x frequency x channels (or space). > The method is blind for your decisions about how its computed for each > point in time x frequency x channels (or space). > > I find the FieldTrip statistics functions, their configurations etc., and > the way they interact confusing at times, but I hope this helps to clear it > up a bit. > > Long story short - I think your question does not limit itself to cluster > statistics and at the same time is much simpler. It's all about (1). > > Best wishes, > Stephen > > > > > > > > > > > > > > > > There are two separate steps cluster statistics (as implemented in > FieldTrip, but in general as well). > > > > > On 18 March 2015 at 14:51, Joram van Driel > wrote: > >> Hi Martina, >> >> In general, I'd advice to do some kind of trial-selection procedure when >> comparing error versus correct trials, in order to trial-count-match the >> two conditions. Otherwise you run into problems considering: SNR (higher >> for the correct condition), and RT (errors are usually faster, resulting in >> a time-on-task confound). What I always do is pick from the correct >> condition a similar number of trials that are close to the RT distribution >> of the error trials (i.e. the faster correct trials). That way you solve >> both problems at once (and probably the cluster-based permutation test in >> field trip will work as well, as a bonus ;)). >> >> Best, >> Joram >> >> On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi >> wrote: >> >>> Dear All, >>> >>> I would like to get some feedback from the community about a statistical >>> analysis problem I need to tackle with my study. >>> I want to apply the cluster-based permutation tests on time-frequency >>> data considering two conditions (correct vs error). >>> Unfortunately, these two conditions have different sizes (correct >> >>> error). >>> Right now, I am only considering subjects having a ratio "error/correct" >>> bigger than 1/5, yet this is only an arbitrary threshold I set. >>> The question is the following: >>> is there a formal way to identify a threshold by which two conditions >>> can be realiably compared with the cluster-based permutation tests? >>> If the cluster-based approach is not suitable in this scenario, is there >>> any other approach you would suggest? >>> I shall perhaps point out that I am working on EEG data recorded with a >>> 32 channel system (impedance levels < 10 kΩ). >>> >>> Looking forward to hear your feedback :) >>> >>> Kind Regards, >>> Martina Rossi >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Joram van Driel >> Postdoc @ Vrije Universiteit Amsterdam >> Cognitive Psychology >> >> >> _______________________________________________ >> 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 gmail.com Wed Mar 18 19:43:01 2015 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 18 Mar 2015 19:43:01 +0100 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Message-ID: You can also check out this video of Robert. Apologies for the quality - not of the talk, but of the recording :-) At 14:45 he actually mentions unequal number of trials between conditions. https://www.youtube.com/watch?v=vOSfabsDUNg Cheers, Stephen On 18 March 2015 at 19:33, Stephen Whitmarsh wrote: > I should add that (1) is typically done *within *subjects, and (2) *over * > subjects. > > Cheers, > Stephen > > On 18 March 2015 at 19:20, Stephen Whitmarsh > wrote: > >> Dear Martina, >> >> It might help to distinguish two aspects of cluster-based statistic. >> >> 1) the statistical approuch that you will use to determine whether a >> time-channel-datapoint / time-frequency-channel-datapoint / >> time-frequency-voxel-datapoint is considered significant different between >> conditions. >> 2) the statistical approuch that you will use to determine whether *a >> cluster of* time-channel-datapoints / time-frequency-channel-datapoints >> / time-frequency-voxel-datapoints is considered significantly different >> between conditions. >> >> When you talk about *cluster statistics*, you probably think about the >> second part. But this might not be what you should initially be concerned >> with when thinking about e.g. different numbers of trials between >> conditions. Rather, consider what statistical tests you (can) use to >> compare your time-frequency values between conditions *(within >> subjects).* This can be, e.g., a t-test, a nonparametric (e.g. >> montecarlo) test, or any test, for that matter. As far as my limited >> knowledge of statistics goes, in most simple and non-extreme cases, unequal >> number of trials that does not have to increase your chance of type I >> errors, rather that of type 2 (you'll be insensitive to differences if you >> don't have enough observations in one condition due to noisy estimate of >> means/distribution). But in any case it's a simple question to google or >> ask a statistician. >> >> Now, after you are happy with and confident about the between conditions >> statistical test, consider how the cluster statistics might help you. >> First of all, how does it determine whether a cluster is significantly >> different between conditions? There are different options, but the gist is >> that it takes your significant statistical numbers of step (1), adds them >> up when they belong to the same cluster (based on whether they are >> neigbourings in time/freq/space with other significant numbers), takes the >> maximum of these summed up clusters (there might be more than one cluster), >> and then compares this one value to the same taken from a*(non-parametric) >> monte-carlo distribution *of the null hypothesis based on permuting the >> values over conditions (and then calculating the maximum sum). The Maris >> and Oostenveld paper explains it in more detail. >> >> The reason for doing cluster-statistics is that its a smart way of >> dealing with multiple comparisons over many time x frequency x channels (or >> space). The method is blind for your decisions about how its computed for >> each point in time x frequency x channels (or space). >> >> I find the FieldTrip statistics functions, their configurations etc., and >> the way they interact confusing at times, but I hope this helps to clear it >> up a bit. >> >> Long story short - I think your question does not limit itself to cluster >> statistics and at the same time is much simpler. It's all about (1). >> >> Best wishes, >> Stephen >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> There are two separate steps cluster statistics (as implemented in >> FieldTrip, but in general as well). >> >> >> >> >> On 18 March 2015 at 14:51, Joram van Driel >> wrote: >> >>> Hi Martina, >>> >>> In general, I'd advice to do some kind of trial-selection procedure when >>> comparing error versus correct trials, in order to trial-count-match the >>> two conditions. Otherwise you run into problems considering: SNR (higher >>> for the correct condition), and RT (errors are usually faster, resulting in >>> a time-on-task confound). What I always do is pick from the correct >>> condition a similar number of trials that are close to the RT distribution >>> of the error trials (i.e. the faster correct trials). That way you solve >>> both problems at once (and probably the cluster-based permutation test in >>> field trip will work as well, as a bonus ;)). >>> >>> Best, >>> Joram >>> >>> On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi >> > wrote: >>> >>>> Dear All, >>>> >>>> I would like to get some feedback from the community about a >>>> statistical analysis problem I need to tackle with my study. >>>> I want to apply the cluster-based permutation tests on time-frequency >>>> data considering two conditions (correct vs error). >>>> Unfortunately, these two conditions have different sizes (correct >> >>>> error). >>>> Right now, I am only considering subjects having a ratio >>>> "error/correct" bigger than 1/5, yet this is only an arbitrary threshold I >>>> set. >>>> The question is the following: >>>> is there a formal way to identify a threshold by which two conditions >>>> can be realiably compared with the cluster-based permutation tests? >>>> If the cluster-based approach is not suitable in this scenario, is >>>> there any other approach you would suggest? >>>> I shall perhaps point out that I am working on EEG data recorded with a >>>> 32 channel system (impedance levels < 10 kΩ). >>>> >>>> Looking forward to hear your feedback :) >>>> >>>> Kind Regards, >>>> Martina Rossi >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> >>> -- >>> Joram van Driel >>> Postdoc @ Vrije Universiteit Amsterdam >>> Cognitive Psychology >>> >>> >>> _______________________________________________ >>> 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 mitka3 at uniba.sk Wed Mar 18 21:54:39 2015 From: mitka3 at uniba.sk (Milan Mitka) Date: Wed, 18 Mar 2015 21:54:39 +0100 Subject: [FieldTrip] =?utf-8?q?Easycap_M10_coregistration_with_head_model_?= =?utf-8?q?=E2=80=93_no_fiducials?= Message-ID: <9C6D6E44-F63A-40A1-8A19-A71D7184FFCD@uniba.sk> Greetings, I'm having difficulties with aligning easycap M10 electrodes with a head model. I'm following this tutorial: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg#align_the_electrodes The problem as I see it is that the file FieldTrip/template/electrode/easycap-M10.txt that I'm using istead of standard_1020.elc doesn't include fiducials and can therefore not be properly aligned with the head model automatically. How can I properly align M10 electrodes defined in spherical coordinates or convert MNI cartesian coordinates to the head model coordinates which appear to use CTF, please? Yours faithfully Milan Mitka -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.rossi76 at yahoo.it Thu Mar 19 09:06:47 2015 From: martina.rossi76 at yahoo.it (Martina Rossi) Date: Thu, 19 Mar 2015 08:06:47 +0000 (UTC) Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: Message-ID: <245197442.364305.1426752407463.JavaMail.yahoo@mail.yahoo.com> Dear Stephen and Joram, Thank so much for your feedback,I will check out the suggested material, Best,Martina Il Mercoledì 18 Marzo 2015 20:43, Stephen Whitmarsh ha scritto: You can also check out this video of Robert. Apologies for the quality - not of the talk, but of the recording :-) At 14:45 he actually mentions unequal number of trials between conditions. https://www.youtube.com/watch?v=vOSfabsDUNg Cheers, Stephen On 18 March 2015 at 19:33, Stephen Whitmarsh wrote: I should add that (1) is typically done within subjects, and (2) over subjects. Cheers, Stephen  On 18 March 2015 at 19:20, Stephen Whitmarsh wrote: Dear Martina, It might help to distinguish two aspects of cluster-based statistic. 1) the statistical approuch that you will use to determine whether a time-channel-datapoint / time-frequency-channel-datapoint / time-frequency-voxel-datapoint is considered significant different between conditions. 2) the statistical approuch that you will use to determine whether a cluster of time-channel-datapoints / time-frequency-channel-datapoints / time-frequency-voxel-datapoints is considered significantly different between conditions. When you talk about cluster statistics, you probably think about the second part. But this might not be what you should initially be concerned with when thinking about e.g. different numbers of trials between conditions. Rather, consider what statistical tests you (can) use to compare your time-frequency values between conditions (within subjects). This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any test, for that matter. As far as my limited knowledge of statistics goes, in most simple and non-extreme cases, unequal number of trials that does not have to increase your chance of type I errors, rather that of type 2 (you'll be insensitive to differences if you don't have enough observations in one condition due to noisy estimate of means/distribution). But in any case it's a simple question to google or ask a statistician. Now, after you are happy with and confident about the between conditions statistical test, consider how the cluster statistics might help you. First of all, how does it determine whether a cluster is significantly different between conditions? There are different options, but the gist is that it takes your significant statistical numbers of step (1), adds them up when they belong to the same cluster (based on whether they are neigbourings in time/freq/space with other significant numbers), takes the maximum of these summed up clusters (there might be more than one cluster), and then compares this one value to the same taken from a(non-parametric) monte-carlo distribution of the null hypothesis based on permuting the values over conditions (and then calculating the maximum sum). The Maris and Oostenveld paper explains it in more detail. The reason for doing cluster-statistics is that its a smart way of dealing with multiple comparisons over many time x frequency x channels (or space). The method is blind for your decisions about how its computed for each point in time x frequency x channels (or space). I find the FieldTrip statistics functions, their configurations etc., and the way they interact confusing at times, but I hope this helps to clear it up a bit. Long story short - I think your question does not limit itself to cluster statistics and at the same time is much simpler. It's all about (1).  Best wishes, Stephen There are two separate steps cluster statistics (as implemented in FieldTrip, but in general as well). On 18 March 2015 at 14:51, Joram van Driel wrote: Hi Martina, In general, I'd advice to do some kind of trial-selection procedure when comparing error versus correct trials, in order to trial-count-match the two conditions. Otherwise you run into problems considering: SNR (higher for the correct condition), and RT (errors are usually faster, resulting in a time-on-task confound). What I always do is pick from the correct condition a similar number of trials that are close to the RT distribution of the error trials (i.e. the faster correct trials). That way you solve both problems at once (and probably the cluster-based permutation test in field trip will work as well, as a bonus ;)). Best,Joram On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi wrote: Dear All, I would like to get some feedback from the community about a statistical analysis problem I need to tackle with my study.I want to apply the cluster-based permutation tests on time-frequency data considering two conditions (correct vs error).Unfortunately, these two conditions have different sizes (correct >> error).Right now, I am only considering subjects having a ratio "error/correct" bigger than 1/5, yet this is only an arbitrary threshold I set.The question is the following:is there a formal way to identify a threshold by which two conditions can be realiably compared with the cluster-based permutation tests?If the cluster-based approach is not suitable in this scenario, is there any other approach you would suggest?I shall perhaps point out that I am working on EEG data recorded with a 32 channel system (impedance levels < 10 kΩ). Looking forward to hear your feedback :) Kind Regards,Martina Rossi _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Joram van DrielPostdoc @ Vrije Universiteit AmsterdamCognitive Psychology _______________________________________________ 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.goeldi at psychologie.uzh.ch Thu Mar 19 12:34:43 2015 From: m.goeldi at psychologie.uzh.ch (m.goeldi at psychologie.uzh.ch) Date: Thu, 19 Mar 2015 12:34:43 +0100 Subject: [FieldTrip] strange leadfield for beamforming from template files Message-ID: Hi all I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. Unfortunately this is not the case. The vectors are all over the place. See figure. The red circle is the electrode location (Cz). The field looks (qualitatively) just as wrong for any other electrode. Below is the code I used to generate & visualize the lead field. I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. There the result is as expected, so I think the problem lies not in the visualization. I am using fieldtrip-20150118 I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. My question is, am I doing anything wrong in generating the lead field? Am I expecting something wrong (i.e. is this a realistidc lead field?) Does anyones lead field look the same/different when using the template files? I would appreciate any help with this problem. Thanks for your thoughts Cheers Maurice %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load mri load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') % load template sourcemodel template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); % compute source model cfg                = []; cfg.grid.warpmni   = 'yes'; cfg.grid.template  = template.sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.grid.resolution = 6; cfg.mri            = mri; sourcemodel        = ft_prepare_sourcemodel(cfg); sourcemodel = ft_convert_units(sourcemodel, 'cm'); % make head model load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); vol = ft_convert_units(vol, 'cm'); %% electrode layout elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); [elec] = removeelectrodes(elec,data.label);    % remove the electrodes that are not in my data elec = ft_convert_units(elec,'cm'); % lead field cfg                 = []; cfg.grid            = sourcemodel; cfg.elec            = elec; cfg.vol             = vol; cfg.channel         = 'all'; [grid] = ft_prepare_leadfield(cfg,freqC1); grid = ft_convert_units(grid, 'cm'); %%%% visualize leadfield %%%% channel = 'Cz'; %% electrode position elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); %% leadfield positions leadfieldpos = grid.pos(grid.inside,:); %% extract leadfield npts = numel(grid.leadfield); lead = grid.leadfield(grid.inside); nchan = find(strcmp(grid.cfg.channel,channel)); for i = 1:numel(lead)     leadVect(i,:) = lead{i}(nchan,:); end figure; hold on     % plot all objects in one figure ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); alpha 0.3 scale = 30; quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) plot3(elecpos(1),elecpos(2),elecpos(3),'ro') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Mar 19 22:18:38 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 19 Mar 2015 21:18:38 +0000 Subject: [FieldTrip] strange leadfield for beamforming from template files In-Reply-To: References: Message-ID: <47A755CA-A6B5-4B56-AD75-866D2329B4F7@fcdonders.ru.nl> Hi Maurice, The way in which you visualize the leadfield vectors it is hard to see in which locations the arrows are big. My suspicion is (unless otherwise proven) that you are suffering from numerical problems at dipole positions close to the inner boundary. Best, Jan-Mathijs On Mar 19, 2015, at 12:34 PM, m.goeldi at psychologie.uzh.ch wrote: Hi all I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. Unfortunately this is not the case. The vectors are all over the place. See figure. [X] The red circle is the electrode location (Cz). The field looks (qualitatively) just as wrong for any other electrode. Below is the code I used to generate & visualize the lead field. I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. There the result is as expected, so I think the problem lies not in the visualization. I am using fieldtrip-20150118 I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. My question is, am I doing anything wrong in generating the lead field? Am I expecting something wrong (i.e. is this a realistidc lead field?) Does anyones lead field look the same/different when using the template files? I would appreciate any help with this problem. Thanks for your thoughts Cheers Maurice %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load mri load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') % load template sourcemodel template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); % compute source model cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template.sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.grid.resolution = 6; cfg.mri = mri; sourcemodel = ft_prepare_sourcemodel(cfg); sourcemodel = ft_convert_units(sourcemodel, 'cm'); % make head model load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); vol = ft_convert_units(vol, 'cm'); %% electrode layout elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); [elec] = removeelectrodes(elec,data.label); % remove the electrodes that are not in my data elec = ft_convert_units(elec,'cm'); % lead field cfg = []; cfg.grid = sourcemodel; cfg.elec = elec; cfg.vol = vol; cfg.channel = 'all'; [grid] = ft_prepare_leadfield(cfg,freqC1); grid = ft_convert_units(grid, 'cm'); %%%% visualize leadfield %%%% channel = 'Cz'; %% electrode position elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); %% leadfield positions leadfieldpos = grid.pos(grid.inside,:); %% extract leadfield npts = numel(grid.leadfield); lead = grid.leadfield(grid.inside); nchan = find(strcmp(grid.cfg.channel,channel)); for i = 1:numel(lead) leadVect(i,:) = lead{i}(nchan,:); end figure; hold on % plot all objects in one figure ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); alpha 0.3 scale = 30; quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) plot3(elecpos(1),elecpos(2),elecpos(3),'ro') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch _______________________________________________ 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 Fri Mar 20 10:29:40 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 20 Mar 2015 09:29:40 +0000 Subject: [FieldTrip] =?windows-1252?q?Easycap_M10_coregistration_with_head?= =?windows-1252?q?_model_=96_no_fiducials?= In-Reply-To: <9C6D6E44-F63A-40A1-8A19-A71D7184FFCD@uniba.sk> References: <9C6D6E44-F63A-40A1-8A19-A71D7184FFCD@uniba.sk> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB1892CB@exprd01.hosting.ru.nl> Dear Milan, If you have not recorded the electrode positions yourself using, for example, a Polhemus or Localite system you will always end-up with a suboptimal alignment (fiducials, or not). That being said, you can skip the step of automatic realignment in the tutorial and immediately use ft_electroderealign with cfg.method = 'interactive', to manually rotate, translate, and scale the electrode positions to make it fit as well as possible to your headmodel. Best, Jim ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Milan Mitka [mitka3 at uniba.sk] Sent: Wednesday, March 18, 2015 9:54 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Easycap M10 coregistration with head model – no fiducials Greetings, I'm having difficulties with aligning easycap M10 electrodes with a head model. I'm following this tutorial: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg#align_the_electrodes The problem as I see it is that the file FieldTrip/template/electrode/easycap-M10.txt that I'm using istead of standard_1020.elc doesn't include fiducials and can therefore not be properly aligned with the head model automatically. How can I properly align M10 electrodes defined in spherical coordinates or convert MNI cartesian coordinates to the head model coordinates which appear to use CTF, please? Yours faithfully Milan Mitka -------------- next part -------------- An HTML attachment was scrubbed... URL: From e163581 at gmail.com Fri Mar 20 10:58:26 2015 From: e163581 at gmail.com (Natalia Melnik) Date: Fri, 20 Mar 2015 11:58:26 +0200 Subject: [FieldTrip] A paper mentioned in "Non-parametric cluster-based statistical testing of MEG/EEG data" video on FieldtripTV channel Message-ID: Dear all, in the "Non-parametric cluster-based statistical testing of MEG/EEG data" video on FieldtripTV channel ((https://youtu.be/vOSfabsDUNg?t=17m34s) ), Dr. Oostenveld mentiones (at 17:38) a paper which tested some of the parameters of the statistic methods. Do you know which paper is it? Cheers, Natalia. From nick.peatfield at gmail.com Fri Mar 20 11:48:24 2015 From: nick.peatfield at gmail.com (Nicholas A. Peatfield) Date: Fri, 20 Mar 2015 11:48:24 +0100 Subject: [FieldTrip] A paper mentioned in "Non-parametric cluster-based statistical testing of MEG/EEG data" video on FieldtripTV channel In-Reply-To: References: Message-ID: Not sure if this is the one. But it seems as such: http://www.sciencedirect.com/science/article/pii/S0165027014002878 Pernet, C.R., Latinus, M. , Nichols, T.E., and Rousselet, G.A. (2014) Cluster-based computational methods for mass univariate analyses of event-related brain potentials/fields: A simulation study. *Journal of Neuroscience Methods * . (doi: 10.1016/j.jneumeth.2014.08.003 ) (Early Online Publication) On 20 March 2015 at 10:58, Natalia Melnik wrote: > Dear all, > in the "Non-parametric cluster-based statistical testing of MEG/EEG > data" video on FieldtripTV channel > ((https://youtu.be/vOSfabsDUNg?t=17m34s) ), Dr. Oostenveld mentiones > (at 17:38) a paper which tested some of the parameters of the > statistic methods. Do you know which paper is it? > > Cheers, > Natalia. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Nicholas Peatfield, PhD Centro Interdipartimentale Mente/Cervello- CIMEC Assegnista di ricerca - Research Fellow Via delle Regole, 101 - 38060 Mattarello +39 0461 283086 -------------- next part -------------- An HTML attachment was scrubbed... URL: From omerxsharon at gmail.com Fri Mar 20 12:49:11 2015 From: omerxsharon at gmail.com (Omer Sharon) Date: Fri, 20 Mar 2015 13:49:11 +0200 Subject: [FieldTrip] downsample while loading Message-ID: Hi everybody Thanks for answering, I'm reading through most of the answers here and it's very helpful. I'm having trouble with loading of single (and several) channel sampled in 1000 Hz, but for about 8 hours - I get "out of memory" (from the ft_preprocessing) Is there a way to downsample the data while loading? (before preprocessing) or alternatively to load it in several parts (in the time dimension), downsample and then concatenate. Thanks a lot Omer -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.caspar at ucl.ac.uk Fri Mar 20 13:14:07 2015 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Fri, 20 Mar 2015 12:14:07 +0000 Subject: [FieldTrip] downsample while loading In-Reply-To: References: Message-ID: <8959A2B9-139C-4BDF-A86B-A59949D9E42F@live.ucl.ac.uk> Hi Omer, Maybe this can help. It filters and epochs before downsampling. It should be faster. However, that highly depends on the computer you have. I tried this with two different computer, with exactly the same characteristics. One was almost full, the other not. It took 15 minutes for 64 electrodes on the new one, and 40 minutes on the full one. cfgp = []; cfgp.dataset = [ file.name]; cfgr = []; cfgr.resamplefs = 256; cfgr.detrend = 'yes'; %% epochs before filtering cfg1 = []; cfg1.dataset = [ file.name]; cfg1.trialdef.eventtype = 'STATUS'; cfg1.trialdef.eventvalue = [65]; cfg1.trialdef.prestim = abs(windows(1)); cfg1.trialdef.poststim = windows(2); cfg1 = ft_definetrial(cfg1); %% filtres downsampling for i=1:nchans cfg1.channel = i; cfg1.bpfilter = 'yes'; cfg1.bpfreq=[0.9 30];%filtres datp = ft_preprocessing(cfg1); singlechan{i} = ft_resampledata(cfgr, datp); clear datp end cfg = []; datall = ft_appenddata(cfg, singlechan{:}); --------------------------------------------- Emilie Caspar Aspirante FNRS - Ph.D. Student Consciousness, Cognition & Computation Group (CO3) Centre de Recherche Cognition et Neurosciences (CRCN) ULB Neurosciences Institute (UNI) Université Libre de Bruxelles Av. F.-D. Roosevelt, 50 1050 Bruxelles BELGIUM Voice : +32 2 650 32 95 mail : ecaspar at ulb.ac.be office: DB10-138 On 20 mars 2015, at 12:49, Omer Sharon > wrote: Hi everybody Thanks for answering, I'm reading through most of the answers here and it's very helpful. I'm having trouble with loading of single (and several) channel sampled in 1000 Hz, but for about 8 hours - I get "out of memory" (from the ft_preprocessing) Is there a way to downsample the data while loading? (before preprocessing) or alternatively to load it in several parts (in the time dimension), downsample and then concatenate. Thanks a lot Omer _______________________________________________ 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 andrea.brovelli at univ-amu.fr Fri Mar 20 15:14:29 2015 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Fri, 20 Mar 2015 15:14:29 +0100 (CET) Subject: [FieldTrip] Possible BUG in ft_redefinetrial using the cfg.trl option Message-ID: <1818288071.36715.1426860868961.JavaMail.root@bureau-frontal3.univ-amu.fr> Dear all, The bugzilla server seems to be down for maintenance. So I post it here. I noticed a possible bug in ft_redefinetrial: if I realign my data on a different event using the cfg.trl option, the output data is corretly aligned, BUT the output data structure contains ONLY the first trial of the input data structure, repeated for the exact number of trials. % In other words, if you do this... cfg = []; cfg.trl = trl; % N x 3 matrix = [ sample_start sample_end sample_offset ] data_out = ft_redefinetrial(cfg, data_in); % And then plot the first 3 trials for the first channel.... plot(data_out.time{1},data_out.trial{1}(1,:),'b') hold on plot(data_out.time{2},data_out.trial{2}(1,:),'r') plot(data_out.time{3},data_out.trial{3}(1,:),'k') ... you will notice that you are plotting the first trial in the original data_in but shifted in time. Could you also check please ? I used the latest version of Fieldtrip fieldtrip-20150318 Thanks Andrea From e163581 at gmail.com Fri Mar 20 17:31:17 2015 From: e163581 at gmail.com (Natalia Melnik) Date: Fri, 20 Mar 2015 18:31:17 +0200 Subject: [FieldTrip] A paper mentioned in "Non-parametric cluster-based > statistical testing of MEG/EEG data" video on FieldtripTV channel Message-ID: Yeah, it seems to be the paper! Thank you very much! Cheers, Natalia On 20 March 2015 at 13:00, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: strange leadfield for beamforming from template files > (Schoffelen, J.M. (Jan Mathijs)) > 2. Re: Easycap M10 coregistration with head model ? no fiducials > (Herring, J.D. (Jim)) > 3. A paper mentioned in "Non-parametric cluster-based > statistical testing of MEG/EEG data" video on FieldtripTV channel > (Natalia Melnik) > 4. Re: A paper mentioned in "Non-parametric cluster-based > statistical testing of MEG/EEG data" video on FieldtripTV channel > (Nicholas A. Peatfield) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 19 Mar 2015 21:18:38 +0000 > From: "Schoffelen, J.M. (Jan Mathijs)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] strange leadfield for beamforming from > template files > Message-ID: <47A755CA-A6B5-4B56-AD75-866D2329B4F7 at fcdonders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Hi Maurice, > The way in which you visualize the leadfield vectors it is hard to see in which locations the arrows are big. My suspicion is (unless otherwise proven) that you are suffering from numerical problems at dipole positions close to the inner boundary. > Best, > Jan-Mathijs > > > > On Mar 19, 2015, at 12:34 PM, m.goeldi at psychologie.uzh.ch wrote: > > > Hi all > > I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. > Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. > Unfortunately this is not the case. The vectors are all over the place. See figure. > > > [X] > The red circle is the electrode location (Cz). > The field looks (qualitatively) just as wrong for any other electrode. > > Below is the code I used to generate & visualize the lead field. > > I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. > There the result is as expected, so I think the problem lies not in the visualization. > > I am using fieldtrip-20150118 > > I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. > > My question is, am I doing anything wrong in generating the lead field? > Am I expecting something wrong (i.e. is this a realistidc lead field?) > Does anyones lead field look the same/different when using the template files? > > I would appreciate any help with this problem. > > > Thanks for your thoughts > > Cheers > Maurice > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > % load mri > load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') > > % load template sourcemodel > template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); > > % compute source model > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template.sourcemodel; > cfg.grid.nonlinear = 'yes'; % use non-linear normalization > cfg.grid.resolution = 6; > cfg.mri = mri; > sourcemodel = ft_prepare_sourcemodel(cfg); > sourcemodel = ft_convert_units(sourcemodel, 'cm'); > > % make head model > load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); > vol = ft_convert_units(vol, 'cm'); > > %% electrode layout > elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); > [elec] = removeelectrodes(elec,data.label); % remove the electrodes that are not in my data > elec = ft_convert_units(elec,'cm'); > > % lead field > cfg = []; > cfg.grid = sourcemodel; > cfg.elec = elec; > cfg.vol = vol; > cfg.channel = 'all'; > [grid] = ft_prepare_leadfield(cfg,freqC1); > grid = ft_convert_units(grid, 'cm'); > > > > %%%% visualize leadfield %%%% > channel = 'Cz'; > > %% electrode position > elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); > > %% leadfield positions > leadfieldpos = grid.pos(grid.inside,:); > > %% extract leadfield > npts = numel(grid.leadfield); > lead = grid.leadfield(grid.inside); > > nchan = find(strcmp(grid.cfg.channel,channel)); > for i = 1:numel(lead) > leadVect(i,:) = lead{i}(nchan,:); > end > > figure; hold on % plot all objects in one figure > ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); > ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); > alpha 0.3 > scale = 30; > quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) > plot3(elecpos(1),elecpos(2),elecpos(3),'ro') > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > --- > University of Z?rich > Maurice G?ldi > Department of Psychology > Biopsychology > Binzm?hlestr. 14 / Box 5 > CH - 8050 Z?rich > > Tel. +41 (0)44 635 74 55 > www.psychologie.uzh.ch > maurice.goeldi at uzh.ch > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Fri, 20 Mar 2015 09:29:40 +0000 > From: "Herring, J.D. (Jim)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Easycap M10 coregistration with head model ? > no fiducials > Message-ID: > <3D00B7615FB58D46A0B49B9AD67A33EB1892CB at exprd01.hosting.ru.nl> > Content-Type: text/plain; charset="windows-1252" > > Dear Milan, > > If you have not recorded the electrode positions yourself using, for example, a Polhemus or Localite system you will always end-up with a suboptimal alignment (fiducials, or not). > > That being said, you can skip the step of automatic realignment in the tutorial and immediately use ft_electroderealign with cfg.method = 'interactive', to manually rotate, translate, and scale the electrode positions to make it fit as well as possible to your headmodel. > > Best, > > Jim > ________________________________ > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Milan Mitka [mitka3 at uniba.sk] > Sent: Wednesday, March 18, 2015 9:54 PM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Easycap M10 coregistration with head model ? no fiducials > > Greetings, > > I'm having difficulties with aligning easycap M10 electrodes with a head model. I'm following this tutorial: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg#align_the_electrodes > > The problem as I see it is that the file FieldTrip/template/electrode/easycap-M10.txt that I'm using istead of standard_1020.elc doesn't include fiducials and can therefore not be properly aligned with the head model automatically. > > How can I properly align M10 electrodes defined in spherical coordinates or convert MNI cartesian coordinates to the head model coordinates which appear to use CTF, please? > > Yours faithfully > Milan Mitka > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 3 > Date: Fri, 20 Mar 2015 11:58:26 +0200 > From: Natalia Melnik > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] A paper mentioned in "Non-parametric > cluster-based statistical testing of MEG/EEG data" video on > FieldtripTV channel > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Dear all, > in the "Non-parametric cluster-based statistical testing of MEG/EEG > data" video on FieldtripTV channel > ((https://youtu.be/vOSfabsDUNg?t=17m34s) ), Dr. Oostenveld mentiones > (at 17:38) a paper which tested some of the parameters of the > statistic methods. Do you know which paper is it? > > Cheers, > Natalia. > > > ------------------------------ > > Message: 4 > Date: Fri, 20 Mar 2015 11:48:24 +0100 > From: "Nicholas A. Peatfield" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] A paper mentioned in "Non-parametric > cluster-based statistical testing of MEG/EEG data" video on > FieldtripTV channel > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Not sure if this is the one. But it seems as such: > > http://www.sciencedirect.com/science/article/pii/S0165027014002878 > > Pernet, C.R., Latinus, M. , > Nichols, T.E., and Rousselet, G.A. > (2014) Cluster-based > computational methods for mass univariate analyses of event-related brain > potentials/fields: A simulation study. *Journal of Neuroscience Methods > * > . (doi: > > 10.1016/j.jneumeth.2014.08.003 > ) (Early Online > Publication) > > > > On 20 March 2015 at 10:58, Natalia Melnik wrote: > >> Dear all, >> in the "Non-parametric cluster-based statistical testing of MEG/EEG >> data" video on FieldtripTV channel >> ((https://youtu.be/vOSfabsDUNg?t=17m34s) ), Dr. Oostenveld mentiones >> (at 17:38) a paper which tested some of the parameters of the >> statistic methods. Do you know which paper is it? >> >> Cheers, >> Natalia. >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Nicholas Peatfield, PhD > Centro Interdipartimentale Mente/Cervello- CIMEC > > Assegnista di ricerca - Research Fellow > Via delle Regole, 101 - 38060 Mattarello > +39 0461 283086 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 52, Issue 22 > ***************************************** From m.goeldi at psychologie.uzh.ch Fri Mar 20 18:05:46 2015 From: m.goeldi at psychologie.uzh.ch (m.goeldi at psychologie.uzh.ch) Date: Fri, 20 Mar 2015 18:05:46 +0100 Subject: [FieldTrip] Antwort: Re: strange leadfield for beamforming from template files In-Reply-To: <47A755CA-A6B5-4B56-AD75-866D2329B4F7@fcdonders.ru.nl> References: <47A755CA-A6B5-4B56-AD75-866D2329B4F7@fcdonders.ru.nl>, Message-ID: Hi Jan-Mathijs Thanks for your quick reply. How would I prove it is not a numerical problem? The big arrows are all close to the boundary. I created my own head models according to the ft-tutorial, but the problem persists. To solve this issue is it feasible to simply remove the points closest to the boundary? (Or a bit more sophisticated, remove those points where the vector is missaligned wrt. its neighbours.) If this happens with the template files, I guess this will also happen routinely with any other (i.e. individual) scans I would use. Is there a standard ft approach to adress this issue? Cheers Maurice --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -----fieldtrip-bounces at science.ru.nl schrieb: ----- An: FieldTrip discussion list Von: "Schoffelen, J.M. (Jan Mathijs)" Gesendet von: fieldtrip-bounces at science.ru.nl Datum: 19.03.2015 22:30 Betreff: Re: [FieldTrip] strange leadfield for beamforming from template files Hi Maurice, The way in which you visualize the leadfield vectors it is hard to see in which locations the arrows are big. My suspicion is (unless otherwise proven) that you are suffering from numerical problems at dipole positions close to the inner boundary. Best, Jan-Mathijs On Mar 19, 2015, at 12:34 PM, m.goeldi at psychologie.uzh.ch wrote: Hi all I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. Unfortunately this is not the case. The vectors are all over the place. See figure. The red circle is the electrode location (Cz). The field looks (qualitatively) just as wrong for any other electrode. Below is the code I used to generate & visualize the lead field. I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. There the result is as expected, so I think the problem lies not in the visualization. I am using fieldtrip-20150118 I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. My question is, am I doing anything wrong in generating the lead field? Am I expecting something wrong (i.e. is this a realistidc lead field?) Does anyones lead field look the same/different when using the template files? I would appreciate any help with this problem. Thanks for your thoughts Cheers Maurice %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load mri load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') % load template sourcemodel template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); % compute source model cfg                = []; cfg.grid.warpmni   = 'yes'; cfg.grid.template  = template.sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.grid.resolution = 6; cfg.mri            = mri; sourcemodel        = ft_prepare_sourcemodel(cfg); sourcemodel = ft_convert_units(sourcemodel, 'cm'); % make head model load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); vol = ft_convert_units(vol, 'cm'); %% electrode layout elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); [elec] = removeelectrodes(elec,data.label);    % remove the electrodes that are not in my data elec = ft_convert_units(elec,'cm'); % lead field cfg                 = []; cfg.grid            = sourcemodel; cfg.elec            = elec; cfg.vol             = vol; cfg.channel         = 'all'; [grid] = ft_prepare_leadfield(cfg,freqC1); grid = ft_convert_units(grid, 'cm'); %%%% visualize leadfield %%%% channel = 'Cz'; %% electrode position elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); %% leadfield positions leadfieldpos = grid.pos(grid.inside,:); %% extract leadfield npts = numel(grid.leadfield); lead = grid.leadfield(grid.inside); nchan = find(strcmp(grid.cfg.channel,channel)); for i = 1:numel(lead)     leadVect(i,:) = lead{i}(nchan,:); end figure; hold on     % plot all objects in one figure ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); alpha 0.3 scale = 30; quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) plot3(elecpos(1),elecpos(2),elecpos(3),'ro') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch _______________________________________________ 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.goeldi at psychologie.uzh.ch Fri Mar 20 21:20:19 2015 From: m.goeldi at psychologie.uzh.ch (m.goeldi at psychologie.uzh.ch) Date: Fri, 20 Mar 2015 21:20:19 +0100 Subject: [FieldTrip] Antwort: Re: strange leadfield for beamforming from template files In-Reply-To: References: , <47A755CA-A6B5-4B56-AD75-866D2329B4F7@fcdonders.ru.nl>, Message-ID: Hi I have now removed all outer points. This has removed some of the large arrows, but there are still many large ones left coming from deep inside the brain. If it is a numerical problem, is there a way around it? Could it be anything else? Cheers Maurice --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -----fieldtrip-bounces at science.ru.nl schrieb: ----- An: FieldTrip discussion list Von: m.goeldi at psychologie.uzh.ch Gesendet von: fieldtrip-bounces at science.ru.nl Datum: 20.03.2015 18:15 Betreff: [FieldTrip] Antwort: Re: strange leadfield for beamforming from template files Hi Jan-Mathijs Thanks for your quick reply. How would I prove it is not a numerical problem? The big arrows are all close to the boundary. I created my own head models according to the ft-tutorial, but the problem persists. To solve this issue is it feasible to simply remove the points closest to the boundary? (Or a bit more sophisticated, remove those points where the vector is missaligned wrt. its neighbours.) If this happens with the template files, I guess this will also happen routinely with any other (i.e. individual) scans I would use. Is there a standard ft approach to adress this issue? Cheers Maurice --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -----fieldtrip-bounces at science.ru.nl schrieb: ----- An: FieldTrip discussion list Von: "Schoffelen, J.M. (Jan Mathijs)" Gesendet von: fieldtrip-bounces at science.ru.nl Datum: 19.03.2015 22:30 Betreff: Re: [FieldTrip] strange leadfield for beamforming from template files Hi Maurice, The way in which you visualize the leadfield vectors it is hard to see in which locations the arrows are big. My suspicion is (unless otherwise proven) that you are suffering from numerical problems at dipole positions close to the inner boundary. Best, Jan-Mathijs On Mar 19, 2015, at 12:34 PM, m.goeldi at psychologie.uzh.ch wrote: Hi all I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. Unfortunately this is not the case. The vectors are all over the place. See figure. The red circle is the electrode location (Cz). The field looks (qualitatively) just as wrong for any other electrode. Below is the code I used to generate & visualize the lead field. I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. There the result is as expected, so I think the problem lies not in the visualization. I am using fieldtrip-20150118 I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. My question is, am I doing anything wrong in generating the lead field? Am I expecting something wrong (i.e. is this a realistidc lead field?) Does anyones lead field look the same/different when using the template files? I would appreciate any help with this problem. Thanks for your thoughts Cheers Maurice %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load mri load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') % load template sourcemodel template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); % compute source model cfg                = []; cfg.grid.warpmni   = 'yes'; cfg.grid.template  = template.sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.grid.resolution = 6; cfg.mri            = mri; sourcemodel        = ft_prepare_sourcemodel(cfg); sourcemodel = ft_convert_units(sourcemodel, 'cm'); % make head model load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); vol = ft_convert_units(vol, 'cm'); %% electrode layout elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); [elec] = removeelectrodes(elec,data.label);    % remove the electrodes that are not in my data elec = ft_convert_units(elec,'cm'); % lead field cfg                 = []; cfg.grid            = sourcemodel; cfg.elec            = elec; cfg.vol             = vol; cfg.channel         = 'all'; [grid] = ft_prepare_leadfield(cfg,freqC1); grid = ft_convert_units(grid, 'cm'); %%%% visualize leadfield %%%% channel = 'Cz'; %% electrode position elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); %% leadfield positions leadfieldpos = grid.pos(grid.inside,:); %% extract leadfield npts = numel(grid.leadfield); lead = grid.leadfield(grid.inside); nchan = find(strcmp(grid.cfg.channel,channel)); for i = 1:numel(lead)     leadVect(i,:) = lead{i}(nchan,:); end figure; hold on     % plot all objects in one figure ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); alpha 0.3 scale = 30; quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) plot3(elecpos(1),elecpos(2),elecpos(3),'ro') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- University of Z�rich Maurice G�ldi Department of Psychology Biopsychology Binzm�hlestr. 14 / Box 5 CH - 8050 Z�rich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch _______________________________________________ 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 v.piai.research at gmail.com Sat Mar 21 01:35:24 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Fri, 20 Mar 2015 17:35:24 -0700 Subject: [FieldTrip] ft_channelrepair increases the size of the data file In-Reply-To: References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> <550303A9.5070705@gmail.com> Message-ID: <550CBCCC.1060000@gmail.com> Hi FT-ers, I think I won't be able to figure out this problem by diving into the ft_channelrepair code. So if you can shed any light to what could be going on, I'd be *very *thankful!! I followed Eelke's and JM's advice to split the data, fix some channels only for certain trials, then put the data together. All fine, except for the following. If I apply this procedure a large number of times (haven't figured out what the threshold is yet), the file size increases by a considerable amount. For example, when I fixed one channel for all trials, and then 7 channels for a couple of trials, the file went from 1GB to almost 3GB. Then Matlab slows down and eventually hangs, and the data (saved with '-v7.3') is "corrupted" once I try to load it to my workspace again. It seems to me that ft_channelrepair is keeping information in a 'previous' field such that every call to it will just keep adding bytes, is that the case? I'm planning to delete everything that is in cfg.previous and just keep the .trl field for later. Can you foresee I will run into unrepairable trouble later because of this? Is there any other field within the cfg.previous I should keep besides the .trl? Thanks a lot again!! Have a nice weekend, Vitória On 3/13/2015 9:08 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > Hi V, > Note that you can use the trialinfo field in your data for bookkeeping, e.g. (assuming there is already such field in your data) > > data.trialinfo(:,end+1) = (1:numel(data.trial))’; > cfg = []; > cfg.trials = sel_to_be_repaired; > cfg.etc > data1 = ft_channelrepair(cfg,data); > > cfg = []; > cfg.trials = sel_to_be_unrepaired > data2 = ft_selectdata(cfg, data); > > data = ft_appenddata([],data1,data2); > > Although the order has now been changed, you’ll see that the last column of the trialinfo field still pertains to your original trial indices. > > JM > > > > On Mar 13, 2015, at 4:35 PM, Vitória Piai wrote: > >> Thanks, Eelke! >> >> I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. >> >> Thanks a lot, >> Hope all is well in Nijmegen!! >> >> On 3/11/2015 12:32 AM, Eelke Spaak wrote: >>> Hi Vitoria, >>> >>> Yes, that is the expected behaviour of ft_channelrepair, because that >>> is consistent with all other functions supporting a cfg.trials-option >>> (i.e. select first, then do the work on what remains). >>> >>> It should be quite straightforward to do something like: >>> >>> cfg = []; >>> cfg.trials = goodtrials; >>> dat1 = ft_selectdata(cfg, data); >>> >>> cfg = []; >>> ... >>> cfg.trials = badtrials; >>> dat2 = ft_channelrepair(cfg, data); >>> >>> datcmb = ft_appenddata([], dat1, dat2); >>> >>> to achieve what you want. >>> >>> Groetjes, >>> Eelke >>> >>> On 10 March 2015 at 23:58, Vitoria Piai wrote: >>>> Hi all, >>>> >>>> I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 >>>> 09:33:28Z) to repair bad channels. I wanted to do it only for certain >>>> trials, and when I saw the option cfg.trials, I was really happy. >>>> However, if I pass cfg.trials with a vector rather than 'all', then the >>>> function does: >>>> ft_selectdata (lines 104, 108), >>>> then from line 352 onwards, things are converted back to normal. >>>> But if the cfg contained only some trials (as I'm trying to use it for), >>>> these are not restored back, and so I'm left with a data structure that >>>> only has as many trials as my cfg had. >>>> >>>> I was just wondering whether that is the expected behaviour of >>>> ft_channelrepair and that I should restore things myself (presumably >>>> with ft_append-like functions). If so, it would be nice if the help on >>>> this function would say that... >>>> If I'm simply using a too old version, my apologies. (I should start >>>> working with github, I know!!) >>>> >>>> Thanks a lot, >>>> Vitoria >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> 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 eelke.spaak at donders.ru.nl Sat Mar 21 02:52:05 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sat, 21 Mar 2015 02:52:05 +0100 Subject: [FieldTrip] ft_channelrepair increases the size of the data file In-Reply-To: <8468aced403e44edb130570e4f13d10e@EXPRD01.hosting.ru.nl> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> <550303A9.5070705@gmail.com> <8468aced403e44edb130570e4f13d10e@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitória, It should be perfectly safe to delete cfg.previous (or data.cfg); no FieldTrip functions depend on it. Note that you won't be able to run ft_analysisprotocol on those data anymore, but that should be the only limitation. Best, Eelke Op 21 mrt. 2015 01:38 schreef "Vitoria Piai" : > Hi FT-ers, > > I think I won't be able to figure out this problem by diving into the > ft_channelrepair code. So if you can shed any light to what could be going > on, I'd be *very *thankful!! > > I followed Eelke's and JM's advice to split the data, fix some channels > only for certain trials, then put the data together. All fine, except for > the following. If I apply this procedure a large number of times (haven't > figured out what the threshold is yet), the file size increases by a > considerable amount. For example, when I fixed one channel for all trials, > and then 7 channels for a couple of trials, the file went from 1GB to > almost 3GB. Then Matlab slows down and eventually hangs, and the data > (saved with '-v7.3') is "corrupted" once I try to load it to my workspace > again. > > It seems to me that ft_channelrepair is keeping information in a > 'previous' field such that every call to it will just keep adding bytes, is > that the case? I'm planning to delete everything that is in cfg.previous > and just keep the .trl field for later. Can you foresee I will run into > unrepairable trouble later because of this? Is there any other field within > the cfg.previous I should keep besides the .trl? > > Thanks a lot again!! > Have a nice weekend, > Vitória > > On 3/13/2015 9:08 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > > Hi V, > Note that you can use the trialinfo field in your data for bookkeeping, e.g. (assuming there is already such field in your data) > > data.trialinfo(:,end+1) = (1:numel(data.trial))’; > cfg = []; > cfg.trials = sel_to_be_repaired; > cfg.etc > data1 = ft_channelrepair(cfg,data); > > cfg = []; > cfg.trials = sel_to_be_unrepaired > data2 = ft_selectdata(cfg, data); > > data = ft_appenddata([],data1,data2); > > Although the order has now been changed, you’ll see that the last column of the trialinfo field still pertains to your original trial indices. > > JM > > > > On Mar 13, 2015, at 4:35 PM, Vitória Piai wrote: > > > Thanks, Eelke! > > I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. > > Thanks a lot, > Hope all is well in Nijmegen!! > > On 3/11/2015 12:32 AM, Eelke Spaak wrote: > > Hi Vitoria, > > Yes, that is the expected behaviour of ft_channelrepair, because that > is consistent with all other functions supporting a cfg.trials-option > (i.e. select first, then do the work on what remains). > > It should be quite straightforward to do something like: > > cfg = []; > cfg.trials = goodtrials; > dat1 = ft_selectdata(cfg, data); > > cfg = []; > ... > cfg.trials = badtrials; > dat2 = ft_channelrepair(cfg, data); > > datcmb = ft_appenddata([], dat1, dat2); > > to achieve what you want. > > Groetjes, > Eelke > > On 10 March 2015 at 23:58, Vitoria Piai wrote: > > Hi all, > > I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 > 09:33:28Z) to repair bad channels. I wanted to do it only for certain > trials, and when I saw the option cfg.trials, I was really happy. > However, if I pass cfg.trials with a vector rather than 'all', then the > function does: > ft_selectdata (lines 104, 108), > then from line 352 onwards, things are converted back to normal. > But if the cfg contained only some trials (as I'm trying to use it for), > these are not restored back, and so I'm left with a data structure that > only has as many trials as my cfg had. > > I was just wondering whether that is the expected behaviour of > ft_channelrepair and that I should restore things myself (presumably > with ft_append-like functions). If so, it would be nice if the help on > this function would say that... > If I'm simply using a too old version, my apologies. (I should start > working with github, I know!!) > > Thanks a lot, > Vitoria > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mitka3 at uniba.sk Sat Mar 21 22:24:16 2015 From: mitka3 at uniba.sk (Milan Mitka) Date: Sat, 21 Mar 2015 22:24:16 +0100 Subject: [FieldTrip] =?utf-8?q?Easycap_M10_coregistration_with_head_model_?= =?utf-8?q?=E2=80=93_no_fiducials?= In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB1892CB@exprd01.hosting.ru.nl> References: <9C6D6E44-F63A-40A1-8A19-A71D7184FFCD@uniba.sk> <3D00B7615FB58D46A0B49B9AD67A33EB1892CB@exprd01.hosting.ru.nl> Message-ID: Dear Jim, thank you for your reply. I realise that it's not the best setup but it's mostly for learning purposes and should suffice as is. The thing that still confuses me though is that the 10-20 template set does include fiducials whilst the M10 does not. I've tried manual interactive alignment before but to no avail since the head model doesn't make it very easy to find landmarks. I've also encountered errors when attempting to perform non-linear transformations regardless of the cfg.warp setting. Anyway, I've solved the issue by utilising a template MRI from SPM which used the MNI coordinate system as a basis for the head model and transformed electrode positions to MNI as well. It appears to be rather tidy so for now all is good. Yours sincerely, Milan > On 20.3.2015, at 10:29, Herring, J.D. (Jim) wrote: > > Dear Milan, > > If you have not recorded the electrode positions yourself using, for example, a Polhemus or Localite system you will always end-up with a suboptimal alignment (fiducials, or not). > > That being said, you can skip the step of automatic realignment in the tutorial and immediately use ft_electroderealign with cfg.method = 'interactive', to manually rotate, translate, and scale the electrode positions to make it fit as well as possible to your headmodel. > > Best, > > Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From doriana.demarco at gmail.com Sun Mar 22 18:22:23 2015 From: doriana.demarco at gmail.com (Doriana De Marco) Date: Sun, 22 Mar 2015 18:22:23 +0100 Subject: [FieldTrip] source analysis- NaN in leadfield matrices Message-ID: Dear Fieldtrip members, I’m dealing with source analysis and I have a big problem that I can’t resolve… Filedtrip gives me an error after launching of ft_sourceanalysis: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> rank at 15 s = svd(A); Error in ==> ft_eloreta at 132 rank_lf(i) = rank(dip.leadfield{i}); Error in ==> ft_sourceanalysis at 850 dip(i) = ft_eloreta(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); In my leadfield computation there are in fact many NaN points. I report my script below because I can’t find where the error can be. I used standard_mri template to prepare head model. %% 1. PREPARING HEAD MODEL %METHOD 1 %if you have a structural mri and you want to create headmodel %load headmodel – mri load ('C:\Users\DorianaNote\Documents\MATLAB\fieldtrip-20140424\fieldtrip-20140424\template\headmodel\standard_mri'); cfg = []; cfg.output = {'brain','skull','scalp'}; template_seg = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'bemcp'; template_vol = ft_prepare_headmodel(cfg, template_seg); elec = ft_read_sens('GSN-HydroCel-128.sfp'); template_vol = ft_convert_units(template_vol, elec.unit); cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = template_vol.bnd(3); elec_aligned = ft_electroderealign(cfg); cfg = []; cfg.grid.unit = template_vol.unit; cfg.elec = elec_aligned; cfg.mri = mri; cfg.vol = template_vol; grid = ft_prepare_sourcemodel(cfg) cfg = []; cfg.elec = elec_aligned; cfg.vol = template_vol; cfg.reducerank = 3; cfg.grid = grid; cfg.channel = {'all'}; cfg.grid.unit = 'cm'; [grid] = ft_prepare_leadfield(cfg, data); cfg = []; cfg.method = 'eloreta'; cfg.grid = grid; cfg.elec = elec_aligned; cfg.vol = template_vol; source = ft_sourceanalysis(cfg, data); I’m trying to analyze component data in order to localize comp.topo parameter. I used the function comp2timelocked to transform data in a timelock-like structure... I don’t know if it can be a problem. I sincerely hope someone of you can help me Many thanks ---------------- Doriana De Marco, Ph.D. Student -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Mon Mar 23 04:02:57 2015 From: david.m.groppe at gmail.com (David Groppe) Date: Sun, 22 Mar 2015 23:02:57 -0400 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: <245197442.364305.1426752407463.JavaMail.yahoo@mail.yahoo.com> References: <245197442.364305.1426752407463.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Martina, Balanced sample sizes are typically recommended for conventional parametric independent samples tests (e.g., t-tests, ANOVAs) because it makes the tests less sensitive to differences in variation between the populations being compared. If the populations being compared differ in variance, having more observations from the population with less variability will make these tests overly permissive (i.e., the true false positive rate will be greater than your nominal alpha level). If you have more observations from the population with greater variability, the tests become overly conservative. A few years ago, my colleagues and I simulated some EEG data and found that permutation tests exhibit a qualitatively similar sensitivity to differences in variance between populations (see below). If you're concerned about such a difference in your data you could do as has already been suggested and use a subset of data so that the number of observations between samples is the same. Alternatively you could use a permutation test based on variants of the t-statistic that are less sensitive to differences in variance. In our paper below, we investigated two variants, Welch's t and t_dif. Welch's t proved a bit less sensitive to differences in variance and was only slightly less powerful than the conventional t-statistic. t_dif was markedly insensitive to differences in variance but was significantly less powerful. However, I would guess that using t_dif or Welch's t are likely more powerful than discarding trials (though we didn't investigate that option in the paper). cheers, -David Groppe, D.M., Urbach, T.P., & Kutas, M. (2011) *Mass univariate analysis of event-related brain potentials/fields II: Simulation studies*. *Psychophysiology*, 48(12) pp. 1726-1737, DOI: 10.1111/j.1469-8986.2011.01272.x. www.cogsci.ucsd.edu/~dgroppe/PUBLICATIONS/mass_uni_preprint2.pdf On Thu, Mar 19, 2015 at 4:06 AM, Martina Rossi wrote: > Dear Stephen and Joram, > > Thank so much for your feedback, > I will check out the suggested material, > > Best, > Martina > > > Il Mercoledì 18 Marzo 2015 20:43, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> ha scritto: > > > You can also check out this video of Robert. Apologies for the quality - > not of the talk, but of the recording :-) > > At 14:45 he actually mentions unequal number of trials between conditions. > > https://www.youtube.com/watch?v=vOSfabsDUNg > > Cheers, > Stephen > > > > > On 18 March 2015 at 19:33, Stephen Whitmarsh > wrote: > > I should add that (1) is typically done *within *subjects, and (2) *over * > subjects. > > Cheers, > Stephen > > On 18 March 2015 at 19:20, Stephen Whitmarsh > wrote: > > Dear Martina, > > It might help to distinguish two aspects of cluster-based statistic. > > 1) the statistical approuch that you will use to determine whether a > time-channel-datapoint / time-frequency-channel-datapoint / > time-frequency-voxel-datapoint is considered significant different between > conditions. > 2) the statistical approuch that you will use to determine whether *a > cluster of* time-channel-datapoints / time-frequency-channel-datapoints / > time-frequency-voxel-datapoints is considered significantly different > between conditions. > > When you talk about *cluster statistics*, you probably think about the > second part. But this might not be what you should initially be concerned > with when thinking about e.g. different numbers of trials between > conditions. Rather, consider what statistical tests you (can) use to > compare your time-frequency values between conditions *(within subjects).* > This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any > test, for that matter. As far as my limited knowledge of statistics goes, > in most simple and non-extreme cases, unequal number of trials that does > not have to increase your chance of type I errors, rather that of type 2 > (you'll be insensitive to differences if you don't have enough observations > in one condition due to noisy estimate of means/distribution). But in any > case it's a simple question to google or ask a statistician. > > Now, after you are happy with and confident about the between conditions > statistical test, consider how the cluster statistics might help you. > First of all, how does it determine whether a cluster is significantly > different between conditions? There are different options, but the gist is > that it takes your significant statistical numbers of step (1), adds them > up when they belong to the same cluster (based on whether they are > neigbourings in time/freq/space with other significant numbers), takes the > maximum of these summed up clusters (there might be more than one cluster), > and then compares this one value to the same taken from a*(non-parametric) > monte-carlo distribution *of the null hypothesis based on permuting the > values over conditions (and then calculating the maximum sum). The Maris > and Oostenveld paper explains it in more detail. > > The reason for doing cluster-statistics is that its a smart way of dealing > with multiple comparisons over many time x frequency x channels (or space). > The method is blind for your decisions about how its computed for each > point in time x frequency x channels (or space). > > I find the FieldTrip statistics functions, their configurations etc., and > the way they interact confusing at times, but I hope this helps to clear it > up a bit. > > Long story short - I think your question does not limit itself to cluster > statistics and at the same time is much simpler. It's all about (1). > > Best wishes, > Stephen > > > > > > > > > > > > > > > > There are two separate steps cluster statistics (as implemented in > FieldTrip, but in general as well). > > > > > On 18 March 2015 at 14:51, Joram van Driel > wrote: > > Hi Martina, > > In general, I'd advice to do some kind of trial-selection procedure when > comparing error versus correct trials, in order to trial-count-match the > two conditions. Otherwise you run into problems considering: SNR (higher > for the correct condition), and RT (errors are usually faster, resulting in > a time-on-task confound). What I always do is pick from the correct > condition a similar number of trials that are close to the RT distribution > of the error trials (i.e. the faster correct trials). That way you solve > both problems at once (and probably the cluster-based permutation test in > field trip will work as well, as a bonus ;)). > > Best, > Joram > > On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi > wrote: > > Dear All, > > I would like to get some feedback from the community about a statistical > analysis problem I need to tackle with my study. > I want to apply the cluster-based permutation tests on time-frequency data > considering two conditions (correct vs error). > Unfortunately, these two conditions have different sizes (correct >> > error). > Right now, I am only considering subjects having a ratio "error/correct" > bigger than 1/5, yet this is only an arbitrary threshold I set. > The question is the following: > is there a formal way to identify a threshold by which two conditions can > be realiably compared with the cluster-based permutation tests? > If the cluster-based approach is not suitable in this scenario, is there > any other approach you would suggest? > I shall perhaps point out that I am working on EEG data recorded with a 32 > channel system (impedance levels < 10 kΩ). > > Looking forward to hear your feedback :) > > Kind Regards, > Martina Rossi > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Joram van Driel > Postdoc @ Vrije Universiteit Amsterdam > Cognitive Psychology > > > _______________________________________________ > 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 johanna.zumer at gmail.com Mon Mar 23 12:18:00 2015 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Mon, 23 Mar 2015 11:18:00 +0000 Subject: [FieldTrip] source analysis- NaN in leadfield matrices In-Reply-To: References: Message-ID: Hi Doriana, It looks like you're using a FieldTrip verison from 20140424. There was a problem last year with bemcp causing NaNs, but that has been fixed. Could you try updating to a recent version and see if that solves it? Cheers, Johanna On 22 Mar 2015 17:22, "Doriana De Marco" wrote: > Dear Fieldtrip members, > > I’m dealing with source analysis and I have a big problem that I can’t > resolve… > > Filedtrip gives me an error after launching of ft_sourceanalysis: > > ??? Error using ==> svd > > Input to SVD must not contain NaN or Inf. > > Error in ==> rank at 15 > > s = svd(A); > > Error in ==> ft_eloreta at 132 > > rank_lf(i) = rank(dip.leadfield{i}); > > Error in ==> ft_sourceanalysis at 850 > > dip(i) = ft_eloreta(grid, sens, vol, squeeze(avg(i,:,:)), > squeeze(Cy(i,:,:)), > > optarg{:}); > > In my leadfield computation there are in fact many NaN points. I report > my script below because I can’t find where the error can be. I used > standard_mri template to prepare head model. > > %% 1. PREPARING HEAD MODEL > > %METHOD 1 > > %if you have a structural mri and you want to create headmodel > > > > %load headmodel – mri > > load > ('C:\Users\DorianaNote\Documents\MATLAB\fieldtrip-20140424\fieldtrip-20140424\template\headmodel\standard_mri'); > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > template_seg = ft_volumesegment(cfg, mri); > > > > cfg = []; > > cfg.method = 'bemcp'; > > template_vol = ft_prepare_headmodel(cfg, template_seg); > > > > elec = ft_read_sens('GSN-HydroCel-128.sfp'); > > template_vol = ft_convert_units(template_vol, elec.unit); > > > > cfg = []; > > cfg.method = 'interactive'; > > cfg.elec = elec; > > cfg.headshape = template_vol.bnd(3); > > elec_aligned = ft_electroderealign(cfg); > > > > cfg = []; > > cfg.grid.unit = template_vol.unit; > > cfg.elec = elec_aligned; > > cfg.mri = mri; > > cfg.vol = template_vol; > > grid = ft_prepare_sourcemodel(cfg) > > > > cfg = []; > > cfg.elec = elec_aligned; > > cfg.vol = template_vol; > > cfg.reducerank = 3; > > cfg.grid = grid; > > cfg.channel = {'all'}; > > cfg.grid.unit = 'cm'; > > [grid] = ft_prepare_leadfield(cfg, data); > > > > cfg = []; > > cfg.method = 'eloreta'; > > cfg.grid = grid; > > cfg.elec = elec_aligned; > > cfg.vol = template_vol; > > source = ft_sourceanalysis(cfg, data); > > > > I’m trying to analyze component data in order to localize comp.topo > parameter. I used the function comp2timelocked to transform data in a > timelock-like structure... I don’t know if it can be a problem. > > > I sincerely hope someone of you can help me > > Many thanks > > ---------------- > > Doriana De Marco, Ph.D. Student > > > _______________________________________________ > 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 elia.valentini at uniroma1.it Tue Mar 24 16:10:49 2015 From: elia.valentini at uniroma1.it (Elia Valentini) Date: Tue, 24 Mar 2015 16:10:49 +0100 Subject: [FieldTrip] CALL for PhD positions in Cognitive Social and Affective Neurosciences (CoSAN) in Rome Message-ID: Please forgive cross posting! Dear Colleagues, this is to inform you about the Foreign Nationals Educated Abroad Ph.D. scholarship awarded by “Sapienza” University of Rome. This is a very prestigious and competitive scholarship for non-Italian students who graduated abroad (please note that a Master Degree is required). There is the chance that one of the awarded students will be selected for the Psychology and Social Neuroscience Ph.D. program (international curriculum CoSAN http://w3.uniroma1.it/cosan/). We are seeking highly talented applicants and we would really appreciate if you could forward this to the students you think may be eligible. The *deadline is* next *April, 26th. Details about the call can be found at* : http://www.cosanphd.com/index.php?page=default_templates *http://www.uniroma1.it/didattica/offerta-formativa/dottorati * The successful candidate will receive a bursary of € 19.800,00 per year before taxes: national insurance contributions (INPS) that fellowship recipients are required to pay (10,57% for 2015). Research will be performed at the Social and Cognitive Neuroscience laboratory (*http://* agliotilab.org). While the selection is mainly based on dossier (Evaluation of qualifications, publications and certificates) applicants should also include a skype address and express their availability to be contacted for a video interview if necessary For more info please contact: 1) for administrative enquiries: Dr. Paola Trussardi (organizational manager) -paola.trussardi at uniroma1.it; 2) For scientific enquiries: Dr Elia Valentini elia.valentini at uniroma1.it or Salvatore M. Aglioti - salvatoremaria.aglioti at uniroma1.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From gamaliel.ghu at hotmail.com Tue Mar 24 21:00:55 2015 From: gamaliel.ghu at hotmail.com (gamaliel huerta urrea) Date: Tue, 24 Mar 2015 16:00:55 -0400 Subject: [FieldTrip] Can I simulate multiple dipoles in realistic head model? Message-ID: HiI need simulate dipolar sources in a realistic head model, however I want know if can import surfaces from freesurfer or brainstorm.I have problems to performs the segmentation and the electrodes alignment, Finally I would like to know how could simulate multiple dipoles on different parts of realistic head model to evaluate the location later.regards Gamaliel Huerta UrreaEstudiante Ingeniería Civil BiomédicaUniversidad de Valparaíso -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Mar 25 13:27:21 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 25 Mar 2015 13:27:21 +0100 Subject: [FieldTrip] Possible BUG in ft_redefinetrial using the cfg.trl option In-Reply-To: References: Message-ID: Hi Andrea, I cannot reproduce the error you mention: %% create some data data = []; data.label = {'a'}; for k = 1:3 data.sampleinfo(k,:) = [1+(k-1)*1000 k*1000]; data.time{k} = 1:1000; data.trial{k} = ones(1,1000) .* k; end %% redefine cfg = []; cfg.trl = [500 600 0; 800 1200 0; 2500 2700 0]; data_out = ft_redefinetrial(cfg, data); %% check assert(all(data_out.trial{1}(:) == 1)); assert(sum(data_out.trial{2}(:) == 1) == 201); assert(sum(data_out.trial{2}(:) == 2) == 200); assert(all(data_out.trial{3}(:) == 3)); Could it be something else? Best, Eelke On 20 March 2015 at 15:14, andrea brovelli wrote: > Dear all, > > The bugzilla server seems to be down for maintenance. So I post it here. > > I noticed a possible bug in ft_redefinetrial: if I realign my data on a different event using the cfg.trl option, the output data is corretly aligned, BUT the output data structure contains ONLY the first trial of the input data structure, repeated for the exact number of trials. > > % In other words, if you do this... > cfg = []; > cfg.trl = trl; % N x 3 matrix = [ sample_start sample_end sample_offset ] > data_out = ft_redefinetrial(cfg, data_in); > > % And then plot the first 3 trials for the first channel.... > plot(data_out.time{1},data_out.trial{1}(1,:),'b') > hold on > plot(data_out.time{2},data_out.trial{2}(1,:),'r') > plot(data_out.time{3},data_out.trial{3}(1,:),'k') > > ... you will notice that you are plotting the first trial in the original data_in but shifted in time. > > Could you also check please ? > > I used the latest version of Fieldtrip fieldtrip-20150318 > > Thanks > > Andrea > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mor2451 at gmail.com Wed Mar 25 16:21:02 2015 From: mor2451 at gmail.com (moran abilea) Date: Wed, 25 Mar 2015 17:21:02 +0200 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? Message-ID: hi there, my name is Moran Abilea, i'm a student from Israel who studies Software Engeenering and my final project is about EEG Speller. i want to use FieldTrip in my project, but when i tried to use ft_realtime funcions such as ft_realtime_signal proxy i couldn't use it becuase it isn't found in the version i downloaded from 2015 March 18. in fact, the whole Realtime folder isn't in this version so i can't use any of those functions what should i do? can someone pliz send me the folder with the source code? thanks, Moran -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Mar 25 16:54:40 2015 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 25 Mar 2015 16:54:40 +0100 Subject: [FieldTrip] ft_channelrepair increases the size of the data file In-Reply-To: References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> <550303A9.5070705@gmail.com> <8468aced403e44edb130570e4f13d10e@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitória, To add on Eelke's advice: you can also just temporarily save it in a different variable, and put it back in your datastructure when done with your channelrepair. Cheers, Stephen On 21 March 2015 at 02:52, Eelke Spaak wrote: > Hi Vitória, > > It should be perfectly safe to delete cfg.previous (or data.cfg); no > FieldTrip functions depend on it. Note that you won't be able to run > ft_analysisprotocol on those data anymore, but that should be the only > limitation. > > Best, > Eelke > Op 21 mrt. 2015 01:38 schreef "Vitoria Piai" : > > Hi FT-ers, >> >> I think I won't be able to figure out this problem by diving into the >> ft_channelrepair code. So if you can shed any light to what could be going >> on, I'd be *very *thankful!! >> >> I followed Eelke's and JM's advice to split the data, fix some channels >> only for certain trials, then put the data together. All fine, except for >> the following. If I apply this procedure a large number of times (haven't >> figured out what the threshold is yet), the file size increases by a >> considerable amount. For example, when I fixed one channel for all trials, >> and then 7 channels for a couple of trials, the file went from 1GB to >> almost 3GB. Then Matlab slows down and eventually hangs, and the data >> (saved with '-v7.3') is "corrupted" once I try to load it to my workspace >> again. >> >> It seems to me that ft_channelrepair is keeping information in a >> 'previous' field such that every call to it will just keep adding bytes, is >> that the case? I'm planning to delete everything that is in cfg.previous >> and just keep the .trl field for later. Can you foresee I will run into >> unrepairable trouble later because of this? Is there any other field within >> the cfg.previous I should keep besides the .trl? >> >> Thanks a lot again!! >> Have a nice weekend, >> Vitória >> >> On 3/13/2015 9:08 AM, Schoffelen, J.M. (Jan Mathijs) wrote: >> >> Hi V, >> Note that you can use the trialinfo field in your data for bookkeeping, e.g. (assuming there is already such field in your data) >> >> data.trialinfo(:,end+1) = (1:numel(data.trial))’; >> cfg = []; >> cfg.trials = sel_to_be_repaired; >> cfg.etc >> data1 = ft_channelrepair(cfg,data); >> >> cfg = []; >> cfg.trials = sel_to_be_unrepaired >> data2 = ft_selectdata(cfg, data); >> >> data = ft_appenddata([],data1,data2); >> >> Although the order has now been changed, you’ll see that the last column of the trialinfo field still pertains to your original trial indices. >> >> JM >> >> >> >> On Mar 13, 2015, at 4:35 PM, Vitória Piai wrote: >> >> >> Thanks, Eelke! >> >> I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. >> >> Thanks a lot, >> Hope all is well in Nijmegen!! >> >> On 3/11/2015 12:32 AM, Eelke Spaak wrote: >> >> Hi Vitoria, >> >> Yes, that is the expected behaviour of ft_channelrepair, because that >> is consistent with all other functions supporting a cfg.trials-option >> (i.e. select first, then do the work on what remains). >> >> It should be quite straightforward to do something like: >> >> cfg = []; >> cfg.trials = goodtrials; >> dat1 = ft_selectdata(cfg, data); >> >> cfg = []; >> ... >> cfg.trials = badtrials; >> dat2 = ft_channelrepair(cfg, data); >> >> datcmb = ft_appenddata([], dat1, dat2); >> >> to achieve what you want. >> >> Groetjes, >> Eelke >> >> On 10 March 2015 at 23:58, Vitoria Piai wrote: >> >> Hi all, >> >> I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 >> 09:33:28Z) to repair bad channels. I wanted to do it only for certain >> trials, and when I saw the option cfg.trials, I was really happy. >> However, if I pass cfg.trials with a vector rather than 'all', then the >> function does: >> ft_selectdata (lines 104, 108), >> then from line 352 onwards, things are converted back to normal. >> But if the cfg contained only some trials (as I'm trying to use it for), >> these are not restored back, and so I'm left with a data structure that >> only has as many trials as my cfg had. >> >> I was just wondering whether that is the expected behaviour of >> ft_channelrepair and that I should restore things myself (presumably >> with ft_append-like functions). If so, it would be nice if the help on >> this function would say that... >> If I'm simply using a too old version, my apologies. (I should start >> working with github, I know!!) >> >> Thanks a lot, >> Vitoria >> >> >> >> _______________________________________________ >> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://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 jhouck at mrn.org Wed Mar 25 17:03:26 2015 From: jhouck at mrn.org (Jon Houck) Date: Wed, 25 Mar 2015 10:03:26 -0600 Subject: [FieldTrip] Please distribute: 3 postdoctoral positions at the University of New Mexico Message-ID: The UNM Center on Alcoholism, Substance Abuse, and Addictions (CASAA) announces three new postdoctoral positions on our NIAAA Institutional Research Training grant. The goal of the grant is to prepare future NIH scientists to conduct research to (1) elucidate the processes of change in drinking behavior, (2) develop and test effective methods to effect change through self-change, treatment and indicated prevention, and (3) develop and test models to disseminate knowledge of effective interventions to diverse populations. Postdoctoral fellows work with one of the core training faculty: Barbara S. McCrady (PI and training program director), Eric Claus, Jon Houck, Theresa Moyers, Matthew Pearson, J. Scott Tonigan, Kamilla Venner, Katie Witkiewitz, or W. Gill Woodall. In anticipation of renewal funding, *we have three openings to support postdoctoral fellows in the 2015-2016 academic year*. Applicants must meet the following criteria: (1) demonstrated interest in the alcohol field as evidenced by prior coursework, research, and/or clinical experience; (2) a record of research productivity as evidenced by research presentations and peer-reviewed publications; and (3) a commitment to a career in alcohol research. All fellows must be US citizens or permanent resident aliens. As part of the training program, fellows must be engaged in full-time research training, participate in a weekly Addictions seminar, define a training plan and achieve specific competencies during each year, and limit outside employment. For continued support post-doctoral fellows will be expected to prepare and successfully submit an NIH grant application. The training program provides a NIH-defined stipend (based on years since doctoral degree), tuition remission, support for professional travel up to $2000 per year, and support for training- and research-related expenses. Interested applicants should submit a curriculum vitae, 3 letters of recommendation, 1-page statement of interest, letter stating their qualifications for and interest in the training grant, and their graduate transcripts to Barbara McCrady. Applications will be reviewed on a rolling basis. Submit all materials electronically to: Barbara S. McCrady, Ph.D. Distinguished Professor of Psychology Director, Center on Alcoholism, Substance Abuse, and Addictions (CASAA) University of New Mexico 2650 Yale Blvd. SE Albuquerque, NM 87106 bmccrady at unm.edu See http://casaa.unm.edu/traininggrant.html for more information about the training program -- Jon M. Houck, Ph.D. Assistant Professor of Translational Neuroscience Mind Research Network Research Assistant Professor Department of Psychology Center on Alcoholism, Substance Abuse, and Addictions University of New Mexico -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Mar 26 08:12:55 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 26 Mar 2015 08:12:55 +0100 Subject: [FieldTrip] BIH @ Imperial College London: Bring the Human Brain Projects of the world to one place References: Message-ID: Begin forwarded message: > From: Caroline Li > > Co-Chaired by Prof Karl Friston & Prof Yike Guo @ Imperial College London (Aug 31 – Sep2, 2015), BIH’15 crosses the disciplines of neuroscience, cognitive science, computer science, signal processing, and neuroimaging. It also draws special attention to informatics for brain science, human behaviour and health. > > It involves leaders from three of the biggest brain initiatives in the world. BIH’15 accepts full paper submission or abstract only submission. Please allow me to send call for paper here: > Keynote Speakers > · Allan Jones, CEO, Allen Institute for Brain Science, USA; > > · Henry Markram, Director, Blue Brain Project; Coordinator, Human Brain Project, EPFL, Switzerland; > > · David Van Essen, PI, Human Connectome Project, Washington University School of Medicine, USA; > > Feature Speakers > · Giorgio Ascoli, (Founding Director, Center for Neural Informatics, George Mason University, USA); > > · Henry Kennedy, (Director of Research, Stem-cell and Brain Research Institute, France); > > · Barbara Sahakian, (University of Cambridge, UK); > > · Nelson Spruston, (Scientific Program Director, Howard Hughes Medical Institute (HHMI), USA); > > · Paul Verschure, (Director, the Lab of SPECS at Universitat Pompeu Fabra (UPF), Spain); > > ===================================================== > General Chairs: > · Karl Friston, (Scientific Director, Wellcome Trust Centre for Neuroimaging, University College London, UK); > · Yike Guo, (Director of Data Science Institute, Imperial College London, UK); > > > Program Chairs: > > · Aldo Faisal, Imperial College London & MRC Clinical Sciences Centre, UK, > · Sean Hill, EPFL, Switzerland, > · Hanchuan Peng, Allen Institute for Brain Science, USA; > > > Workshop/Special-Session Chairs: > > · Andreas Holzinger, Medical University Graz & Graz University of Technology, Austria; Zhisheng Huang, Vrije University of Amsterdam, Netherlands, David Powers, Flinders University of South Australia, Australia; > > > Publicity Chairs: > > · Jessica Turner, Georgia State University, USA; Juan D. Velasquez, University of Chile, Chile; Yi Zeng, Institute of Automation, Chinese Academy of Sciences, China; > > > Local Organizing Chairs: > > · Thomas Henis, Imperial College London, UK; Kai Sun, Imperial College London, UK; Chao Wu, Imperial College London, UK; > > > Exhibition/Sponsorship Chair: > > · Caroline Li, University Kent, UK; > > > Steering Committee Co-Chairs: > > · Ning Zhong, Maebashi Institute of Technology, Japan; Jiming Liu, Hong Kong Baptist University, Hong Kong. > > > > ***************** > > Conference Theme: > > Brain informatics has emerged as a distinct field of research. It crosses the disciplines of neuroscience, cognitive science, computer science, signal processing, and neuroimaging technologies. The data driven nature of brain research made brain informatics an important field of data science. Following the success of past conferences in this series, BIH’15 will take place at Imperial College London, in UK. For the first time, BIH gathers the researchers from major international brain research projects to form a forum for reviewing the progress of brain informatics research and its applications to human health and building up international collaboration. The conference will also organise an exhibition from industrial and research community. > > > > BIH’15 draws special attention to informatics for brain science, human behaviour and health. BIH’15 will address informatics approaches to both the brain and behaviour research with a strong emphasis on emerging trends of big data analysis and management technology for brain research, behaviour learning, and real-world applications of brain science in human health and wellbeing. > > > > BIH’15 welcomes paper submissions (full paper), abstract only submissions. Both research and application papers are solicited. All submitted papers will be reviewed on the basis of technical quality, relevance, significance and clarity. Accepted full papers will be included in the proceedings by Springer LNCS/LNAI. > > > > Tutorial, Satellite symposium (workshop) and Special-Session proposals and Industry/Demo-Track papers are also welcome. > > > > ***************** > > IMPORTANT DATES: > > ***************** > > Satellite symposium proposal submission: March 15, 2015/ > > Notification of satellite symposium acceptance: March 30, 2015/ > > Submission of full papers: April 19, 2015/ > Submission of abstracts: May 20, 2015/ > > Submission of satellite symposium papers: May 20, 2015/ > > Notification of full paper acceptance: May 25, 2015/ > > Notification of abstract acceptance: June 10, 2015/ > > Notification of satellite symposium paper acceptance: June 10, 2015/ > > Tutorial proposal submission: May 15, 2015/ > > Satellite symposiums: August 30, 2015/ > > > > ================================= > > PAPER SUBMISSIONS & PUBLICATIONS: > > > > TYPE-I (Full Paper Submissions; Submission Deadline: April 5, 2015): > We accept full paper submissions with a maximum paper length of up to 10 pages, in Springer LNCS format: > > http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0. > All full length papers accepted (and all special sessions’ full length papers) will be published by Springer as a volume of the series of LNCS/LNAI. > > > > TYPE-II (Abstract Submissions; Submission Deadline: May 20, 2015): > > > > Each abstract is limited to 500 words. Experimental research is particularly welcome. Accepted abstract submissions will be included in the conference program, and will be published as a single, collective proceedings volume. > > > > Title: Include in the title of the abstract all words critical for a subject index. Write your title in sentence case (first letter is capitalized; remaining letters are lower case). Do not bold or italicize your full title. > > > > Author: List all authors who contributed to the work discussed in the abstract. The presenting author must be listed in the first author slot of the list. Be prepared to submit contact information as well as conflict of interest information for each author listed. > > > > Abstract: Enter the body of the abstract and attach any applicable graphic files or tables here. Do not re-enter the title, author, support, or other information that is collected in other steps of the submission form. > > > > Presentation Preference: Authors may select from three presentation formats when submitting an abstract: “poster only,”, “talk preferred” or “no preference.” The “talk preferred” selection indicates that you would like to give a talk, but will accept a poster format if necessary. Marking “poster only” indicates that you would not like to be considered for an oral-presentation session. Selecting “no preference” indicates the author’s willingness to be placed in the best format for the program. > > > > Each paper or abstract requires one sponsoring attendee (i.e. someone who registered and is attending the conference). A single attendee can not sponsor more than two abstracts or papers. > > > > Oral presentations will be selected from both full length papers and abstracts. > > > > *** Post-Conference Journal Publication *** > > > > The BIH conferences have the formal ties with Brain Informatics journal (Springer, http://www.springer.com/40708). Accepted papers from the conference, including their Best Paper Award papers, will be expended and revised for possible inclusion in the Brain Informatics journal each year. It is fully sponsored and no any article-processing fee charged for BIH authors. > > > Selected submissions will be considered for publication in special issues of international journals after their papers are extended to a full-length paper and pass a review process. More information can be found at http://www.bih-amt.com/publications/ > > > *** Topics and Areas *** > > > > Please find the topics and areas of interest of the 2015 International Conference on Brain Informatics and Health (BIH’15) at http://www.bih-amt.com/call-for-papers/topics/ > > > *** AMT’15 Session *** > > > > The advance of wearable sensor technology makes the monitoring of human behavior and life style becomes feasible. This development gives the active media technology a new dimension which is more closely related to the healthcare and cognitive studies. Following the success of past conferences in this series, AMT’15 will be jointly held with > > BIH’15 as a special session. > > > > *** Contact Information *** > > > > Chao Wu, Imperial College London, UK > > > > > Aldo Faisal, Imperial College London, UK > > For sponsorship, please contact: > Caroline Li (Ph.D)|Tel: +44(0)1634 202987 | E-Mail : c.li at kent.ac.uk > ==================================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.rossi76 at yahoo.it Thu Mar 26 08:48:38 2015 From: martina.rossi76 at yahoo.it (Martina Rossi) Date: Thu, 26 Mar 2015 07:48:38 +0000 (UTC) Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: Message-ID: <1202116823.2558923.1427356118074.JavaMail.yahoo@mail.yahoo.com> Hi David, Thank so much for the reference and all the useful details, indeed very helpful :) Best,Martina Il Lunedì 23 Marzo 2015 5:03, David Groppe ha scritto: Hi Martina,    Balanced sample sizes are typically recommended for conventional parametric independent samples tests (e.g., t-tests, ANOVAs) because it makes the tests less sensitive to differences in variation between the populations being compared. If the populations being compared differ in variance, having more observations from the population with less variability will make these tests overly permissive (i.e., the true false positive rate will be greater than your nominal alpha level). If you have more observations from the population with greater variability, the tests become overly conservative.    A few years ago, my colleagues and I simulated some EEG data and found that permutation tests exhibit a qualitatively similar sensitivity to differences in variance between populations (see below). If you're concerned about such a difference in your data you could do as has already been suggested and use a subset of data so that the number of observations between samples is the same. Alternatively you could use a permutation test based on variants of the t-statistic that are less sensitive to differences in variance. In our paper below, we investigated two variants, Welch's t and t_dif. Welch's t proved a bit less sensitive to differences in variance and was only slightly less powerful than the conventional t-statistic. t_dif was markedly insensitive to differences in variance but was significantly less powerful. However, I would guess that using t_dif or Welch's t are likely more powerful than discarding trials (though we didn't investigate that option in the paper).       cheers,          -David Groppe, D.M., Urbach, T.P., & Kutas, M. (2011) Mass univariate analysis of event-related brain potentials/fields II: Simulation studies. Psychophysiology, 48(12) pp. 1726-1737, DOI: 10.1111/j.1469-8986.2011.01272.x. www.cogsci.ucsd.edu/~dgroppe/PUBLICATIONS/mass_uni_preprint2.pdf On Thu, Mar 19, 2015 at 4:06 AM, Martina Rossi wrote: Dear Stephen and Joram, Thank so much for your feedback,I will check out the suggested material, Best,Martina Il Mercoledì 18 Marzo 2015 20:43, Stephen Whitmarsh ha scritto: You can also check out this video of Robert. Apologies for the quality - not of the talk, but of the recording :-) At 14:45 he actually mentions unequal number of trials between conditions. https://www.youtube.com/watch?v=vOSfabsDUNg Cheers, Stephen On 18 March 2015 at 19:33, Stephen Whitmarsh wrote: I should add that (1) is typically done within subjects, and (2) over subjects. Cheers, Stephen  On 18 March 2015 at 19:20, Stephen Whitmarsh wrote: Dear Martina, It might help to distinguish two aspects of cluster-based statistic. 1) the statistical approuch that you will use to determine whether a time-channel-datapoint / time-frequency-channel-datapoint / time-frequency-voxel-datapoint is considered significant different between conditions. 2) the statistical approuch that you will use to determine whether a cluster of time-channel-datapoints / time-frequency-channel-datapoints / time-frequency-voxel-datapoints is considered significantly different between conditions. When you talk about cluster statistics, you probably think about the second part. But this might not be what you should initially be concerned with when thinking about e.g. different numbers of trials between conditions. Rather, consider what statistical tests you (can) use to compare your time-frequency values between conditions (within subjects). This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any test, for that matter. As far as my limited knowledge of statistics goes, in most simple and non-extreme cases, unequal number of trials that does not have to increase your chance of type I errors, rather that of type 2 (you'll be insensitive to differences if you don't have enough observations in one condition due to noisy estimate of means/distribution). But in any case it's a simple question to google or ask a statistician. Now, after you are happy with and confident about the between conditions statistical test, consider how the cluster statistics might help you. First of all, how does it determine whether a cluster is significantly different between conditions? There are different options, but the gist is that it takes your significant statistical numbers of step (1), adds them up when they belong to the same cluster (based on whether they are neigbourings in time/freq/space with other significant numbers), takes the maximum of these summed up clusters (there might be more than one cluster), and then compares this one value to the same taken from a(non-parametric) monte-carlo distribution of the null hypothesis based on permuting the values over conditions (and then calculating the maximum sum). The Maris and Oostenveld paper explains it in more detail. The reason for doing cluster-statistics is that its a smart way of dealing with multiple comparisons over many time x frequency x channels (or space). The method is blind for your decisions about how its computed for each point in time x frequency x channels (or space). I find the FieldTrip statistics functions, their configurations etc., and the way they interact confusing at times, but I hope this helps to clear it up a bit. Long story short - I think your question does not limit itself to cluster statistics and at the same time is much simpler. It's all about (1).  Best wishes, Stephen There are two separate steps cluster statistics (as implemented in FieldTrip, but in general as well). On 18 March 2015 at 14:51, Joram van Driel wrote: Hi Martina, In general, I'd advice to do some kind of trial-selection procedure when comparing error versus correct trials, in order to trial-count-match the two conditions. Otherwise you run into problems considering: SNR (higher for the correct condition), and RT (errors are usually faster, resulting in a time-on-task confound). What I always do is pick from the correct condition a similar number of trials that are close to the RT distribution of the error trials (i.e. the faster correct trials). That way you solve both problems at once (and probably the cluster-based permutation test in field trip will work as well, as a bonus ;)). Best,Joram On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi wrote: Dear All, I would like to get some feedback from the community about a statistical analysis problem I need to tackle with my study.I want to apply the cluster-based permutation tests on time-frequency data considering two conditions (correct vs error).Unfortunately, these two conditions have different sizes (correct >> error).Right now, I am only considering subjects having a ratio "error/correct" bigger than 1/5, yet this is only an arbitrary threshold I set.The question is the following:is there a formal way to identify a threshold by which two conditions can be realiably compared with the cluster-based permutation tests?If the cluster-based approach is not suitable in this scenario, is there any other approach you would suggest?I shall perhaps point out that I am working on EEG data recorded with a 32 channel system (impedance levels < 10 kΩ). Looking forward to hear your feedback :) Kind Regards,Martina Rossi _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Joram van DrielPostdoc @ Vrije Universiteit AmsterdamCognitive Psychology _______________________________________________ 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 caspervanheck at gmail.com Thu Mar 26 11:23:13 2015 From: caspervanheck at gmail.com (Casper van Heck) Date: Thu, 26 Mar 2015 11:23:13 +0100 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? In-Reply-To: References: Message-ID: You probably downloaded the 'lite' version or something. Check the Fieldtrip site, especially the download page ; there are multiple options. You should make sure you download the whole thing; just putting a single function in might give odd behaviour. On Wed, Mar 25, 2015 at 4:21 PM, moran abilea wrote: > hi there, > my name is Moran Abilea, i'm a student from Israel who studies Software > Engeenering and my final project is about EEG Speller. > i want to use FieldTrip in my project, but when i tried to use ft_realtime > funcions such as ft_realtime_signal proxy i couldn't use it becuase it > isn't found in the version i downloaded from 2015 March 18. > in fact, the whole Realtime folder isn't in this version so i can't use > any of those functions > what should i do? > can someone pliz send me the folder with the source code? > thanks, > Moran > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjordanov at besa.de Thu Mar 26 11:49:35 2015 From: tjordanov at besa.de (tjordanov at besa.de) Date: Thu, 26 Mar 2015 11:49:35 +0100 Subject: [FieldTrip] Can I simulate multiple dipoles in realistic head model? In-Reply-To: References: Message-ID: <001801d067b2$8c9ec780$a5dc5680$@de> Hi Gamaliel, I don’t know how this works within FieldTrip, however, we have a free tool for simulating data also with realistic head models. If you want to try it out you could download it here: http://www.besa.de/downloads/besa-simulator/ There is an option to use realistic FEM approximations or to load your own models. However, the program is optimized to work with models generated with BESA MRI and if you want to load models generated with other tools you have to save the models in the required format. I am not sure that it is easy to adapt your models for that program but you can try. Best regards, Todor From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of gamaliel huerta urrea Sent: Dienstag, 24. März 2015 21:01 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Can I simulate multiple dipoles in realistic head model? Hi I need simulate dipolar sources in a realistic head model, however I want know if can import surfaces from freesurfer or brainstorm. I have problems to performs the segmentation and the electrodes alignment, Finally I would like to know how could simulate multiple dipoles on different parts of realistic head model to evaluate the location later. regards Gamaliel Huerta Urrea Estudiante Ingeniería Civil Biomédica Universidad de Valparaíso -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Thu Mar 26 12:27:17 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Thu, 26 Mar 2015 11:27:17 +0000 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions Message-ID: Dear colleagues, I would like to reply to this post by David: Hi Martina, Balanced sample sizes are typically recommended for conventional parametric independent samples tests (e.g., t-tests, ANOVAs) because it makes the tests less sensitive to differences in variation between the populations being compared. If the populations being compared differ in variance, having more observations from the population with less variability will make these tests overly permissive (i.e., the true false positive rate will be greater than your nominal alpha level). If you have more observations from the population with greater variability, the tests become overly conservative. A few years ago, my colleagues and I simulated some EEG data and found that permutation tests exhibit a qualitatively similar sensitivity to differences in variance between populations (see below). If you're concerned about such a difference in your data you could do as has already been suggested and use a subset of data so that the number of observations between samples is the same. Alternatively you could use a permutation test based on variants of the t-statistic that are less sensitive to differences in variance. In our paper below, we investigated two variants, Welch's t and t_dif. Welch's t proved a bit less sensitive to differences in variance and was only slightly less powerful than the conventional t-statistic. t_dif was markedly insensitive to differences in variance but was significantly less powerful. However, I would guess that using t_dif or Welch's t are likely more powerful than discarding trials (though we didn't investigate that option in the paper). cheers, -David I agree with David that the main issue with unequal sizes of the experimental conditions reduces your statistical sensitivity (as compared to the situation where the number of subjects is distributed equally over the conditions; the equal-n case). However, one should NEVER remove subjects from one experimental condition in order to obtain this equal-n case, at least not when a permutation test is being used. A permutation test controls the false alarm rate regardless of how the subjects/trials are distributed across the experimental conditions. So, the permutation test is not less sensitive, as mentioned by David, but it is completely INSENSITIVE to aspect of your design, at least when it comes to false alarm rate control. However, for every statistical test I know of, its statistical sensitivity (power) IS sensitive (notice the different meaning of the word sensitive in this second occurrence) to how the subjects/trials are distributed over the conditions. best, Eric Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcpiastra at libero.it Thu Mar 26 06:11:20 2015 From: mcpiastra at libero.it (mcpiastra) Date: Wed, 26 Mar 2015 05:11:20 +0000 Subject: [FieldTrip] =?iso-8859-1?q?mcpiastra=40libero=2Eit?= Message-ID: <8A6EE31E29158472446E98CC49F1D47D@hirojin.univnet.jp> Oilà! Ma... è da un sacco che non ci sentiamo!, http://shqiponja.net/kf/xvqagodvmdzbdqwcsrlblfdwteadhlm.kcjssufpkqnqwrbby 3/26/2015 5:11:20 PM -------------- next part -------------- An HTML attachment was scrubbed... URL: From mor2451 at gmail.com Fri Mar 27 15:44:28 2015 From: mor2451 at gmail.com (moran abilea) Date: Fri, 27 Mar 2015 17:44:28 +0300 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? In-Reply-To: References: Message-ID: maybe... can you pliz send me the "full version" rar? i can't get into the download page for a week and i don't know why that's so annoying to know that i can't get into the "download page" :( thanks for all the help and i hope the problem will be fixed very soon moran abilea On Thu, Mar 26, 2015 at 1:23 PM, Casper van Heck wrote: > You probably downloaded the 'lite' version or something. Check the > Fieldtrip site, especially the download page > ; there are multiple options. > You should make sure you download the whole thing; just putting a single > function in might give odd behaviour. > > On Wed, Mar 25, 2015 at 4:21 PM, moran abilea wrote: > >> hi there, >> my name is Moran Abilea, i'm a student from Israel who studies Software >> Engeenering and my final project is about EEG Speller. >> i want to use FieldTrip in my project, but when i tried to use >> ft_realtime funcions such as ft_realtime_signal proxy i couldn't use it >> becuase it isn't found in the version i downloaded from 2015 March 18. >> in fact, the whole Realtime folder isn't in this version so i can't use >> any of those functions >> what should i do? >> can someone pliz send me the folder with the source code? >> thanks, >> Moran >> >> _______________________________________________ >> 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 Fri Mar 27 16:22:04 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 27 Mar 2015 15:22:04 +0000 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? In-Reply-To: References: Message-ID: Moran, As was notified on this discussion list and as is mentioned on the FieldTrip website, there was anticipated downtime of the ftp-server this week due to physical migration of our lab’s compute facilities. See http://www.fieldtriptoolbox.org, and the first link that you can follow in the red banner that says: "Please be aware that there will be some website, ftp and bugzilla downtime. I expect services to be up and running again soon. Best wishes, Jan-Mathijs On Mar 27, 2015, at 3:44 PM, moran abilea > wrote: maybe... can you pliz send me the "full version" rar? i can't get into the download page for a week and i don't know why that's so annoying to know that i can't get into the "download page" :( thanks for all the help and i hope the problem will be fixed very soon moran abilea On Thu, Mar 26, 2015 at 1:23 PM, Casper van Heck > wrote: You probably downloaded the 'lite' version or something. Check the Fieldtrip site, especially the download page; there are multiple options. You should make sure you download the whole thing; just putting a single function in might give odd behaviour. On Wed, Mar 25, 2015 at 4:21 PM, moran abilea > wrote: hi there, my name is Moran Abilea, i'm a student from Israel who studies Software Engeenering and my final project is about EEG Speller. i want to use FieldTrip in my project, but when i tried to use ft_realtime funcions such as ft_realtime_signal proxy i couldn't use it becuase it isn't found in the version i downloaded from 2015 March 18. in fact, the whole Realtime folder isn't in this version so i can't use any of those functions what should i do? can someone pliz send me the folder with the source code? thanks, Moran _______________________________________________ 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 mor2451 at gmail.com Fri Mar 27 16:28:36 2015 From: mor2451 at gmail.com (moran abilea) Date: Fri, 27 Mar 2015 15:28:36 +0000 Subject: [FieldTrip] general questions about the FieldTrip Message-ID: hi again, i have another question/s, but this time they are genra. but first let me explain what i need from field trip: i'm working for extracting from 14 channels EPOC Emotive the EEG raw data as contious data, send trigger if i want to display the raw data or not and then process the data with SVM. all this process is for creating EEG speller in Matlab. so my questions are: 1. i assume the field trip has constant "delay", the delay i reffer to is between the time of view the signal and the real time data transfer in the buffer. does anyone knows what is the delay time somehow? 2. where can i find how to open stream for a file? 3. using triggers: can i send time stamp in my configuration in order to know when to display the data that i need for the EEG speller? 4. what to do in order to use the EPOC Emotive? do i need to set some new configurations for matlab? to download any SDK? etc any kind of help will be welcomed, Moran Abilea -------------- next part -------------- An HTML attachment was scrubbed... URL: From mor2451 at gmail.com Fri Mar 27 16:30:31 2015 From: mor2451 at gmail.com (moran abilea) Date: Fri, 27 Mar 2015 18:30:31 +0300 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? In-Reply-To: References: Message-ID: yeah i noticed that, i just forgot when this will be ended thanks, Moran Abilea On Fri, Mar 27, 2015 at 6:22 PM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Moran, > > As was notified on this discussion list and as is mentioned on the > FieldTrip website, there was anticipated downtime of the ftp-server this > week due to physical migration of our lab’s compute facilities. > See http://www.fieldtriptoolbox.org, and the first link that you can > follow in the red banner that says: "Please be aware that there will be > some website, ftp and bugzilla downtime. > I expect services to be up and running again soon. > > Best wishes, > Jan-Mathijs > > > > > On Mar 27, 2015, at 3:44 PM, moran abilea wrote: > > maybe... > can you pliz send me the "full version" rar? i can't get into the download > page for a week and i don't know why that's so annoying to know that i > can't get into the "download page" :( > thanks for all the help and i hope the problem will be fixed very soon > moran abilea > > On Thu, Mar 26, 2015 at 1:23 PM, Casper van Heck > wrote: > >> You probably downloaded the 'lite' version or something. Check the >> Fieldtrip site, especially the download page >> ; there are multiple options. >> You should make sure you download the whole thing; just putting a single >> function in might give odd behaviour. >> >> On Wed, Mar 25, 2015 at 4:21 PM, moran abilea wrote: >> >>> hi there, >>> my name is Moran Abilea, i'm a student from Israel who studies Software >>> Engeenering and my final project is about EEG Speller. >>> i want to use FieldTrip in my project, but when i tried to use >>> ft_realtime funcions such as ft_realtime_signal proxy i couldn't use it >>> becuase it isn't found in the version i downloaded from 2015 March 18. >>> in fact, the whole Realtime folder isn't in this version so i can't use >>> any of those functions >>> what should i do? >>> can someone pliz send me the folder with the source code? >>> thanks, >>> Moran >>> >>> _______________________________________________ >>> 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 r.oostenveld at donders.ru.nl Fri Mar 27 16:53:34 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 27 Mar 2015 16:53:34 +0100 Subject: [FieldTrip] general questions about the FieldTrip In-Reply-To: References: Message-ID: Hi Moran 1) The fieldtrip buffer by itself has a delay that can be as small as 5ms. But the actual delay in the data stream from the electronics to the MATLAB side of the buffer depends on quite a number of parameters and can be much larger. Sending data in blocks (i.e. multiple samples are bufferend and sent in one go), bluetooth and USB all cause delays before you are able to process the samples in the data block. Even the USB connection and whether you are sharing it with another device (i.e. mouse or USB hard drive on the same USB hubor port) can affect the delay and can cause jitter (variation in the delay). I suggest you look at http://www.fieldtriptoolbox.org/example/measuring_the_timing_delay_and_jitter_for_a_real-time_application for a demonstration how you can quantify the That page has data for our CTF MEG system, which has a blocksize of ~100ms and does some online processing (head localization) prior to forwarding the data, hence the delay of 150ms that we see here makes sense. 2) On http://www.fieldtriptoolbox.org/getting_started/realtime you can find some getting started instructions. Reading data from a file rather than from a realitme buffer just means that you specify the name of the file. If you look at http://www.fieldtriptoolbox.org/example/ft_realtime_signalviewer you can see how you can simulate a real time data stream. Just replace cfg.dataset with an EEG file name in ft_realtime_signalviewer and you are not plotting real time data, but data from file. 3) your P300 application can send events to the fieldtrip buffer and the signal processing application can read them and act upon the data referred to in the events. You can also make a single application that does both, or make two applications that communicate events separate from the data stream. 4) I recall that some emotiv software needed to be installed, but don’t know whether that requires the full SDK to be installed. I don’t have an emotiv epoc myself. Please see http://www.fieldtriptoolbox.org/development/realtime/emotiv and feel free to add your findings to that (wiki) page. best regards, Robert On 27 Mar 2015, at 16:28, moran abilea wrote: > hi again, > > i have another question/s, but this time they are genra. > but first let me explain what i need from field trip: i'm working for extracting from 14 channels EPOC Emotive the EEG raw data as contious data, send trigger if i want to display the raw data or not and then process the data with SVM. all this process is for creating EEG speller in Matlab. > > so my questions are: > > 1. i assume the field trip has constant "delay", the delay i reffer to is between the time of view the signal and the real time data transfer in the buffer. does anyone knows what is the delay time somehow? > > 2. where can i find how to open stream for a file? > > 3. using triggers: can i send time stamp in my configuration in order to know when to display the data that i need for the EEG speller? > > 4. what to do in order to use the EPOC Emotive? do i need to set some new configurations for matlab? to download any SDK? etc > > any kind of help will be welcomed, > Moran Abilea > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From S.Pizzamiglio at uel.ac.uk Sat Mar 28 14:04:44 2015 From: S.Pizzamiglio at uel.ac.uk (Sara Pizzamiglio) Date: Sat, 28 Mar 2015 13:04:44 +0000 Subject: [FieldTrip] Missing channel repair through triangulation - *.sfp files Message-ID: <023526F16D67EC43A4FE7F302F5A2D0E1C93F9F1@ST-EXMB1.uel.ac.uk> Dear all, I am trying to reconstruct two missing channels from my dataset through the function channelrepair and the triangulation method. In order to do that the electrode layout has to be specified in the structure: cfg.layout = '*.sfp'; I am recording data through an ANT system (ASA 4.5 software) and I am using a 128 channels + HEOG and VEOG WaveGuard cap from ant-neuro, which should be a 10-10 layout. Which *.sfp file should I use to represent my electrodes layout and reconstruct my missing channels?! Thank you :) --------------------------------------------------------------------------------------- This email has been scanned for email related threats and delivered safely by Mimecast. For more information please visit http://www.mimecast.com --------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From tamaonvaliaikainenmaili at gmail.com Sat Mar 28 14:54:13 2015 From: tamaonvaliaikainenmaili at gmail.com (hm ham) Date: Sat, 28 Mar 2015 15:54:13 +0200 Subject: [FieldTrip] EEG MNE with standard_bem and statistics sanity Message-ID: Hello fellow fieldtrippers, I'm using fieldtrip to do a MNE for EEG data with no subject MRIs and I have a few questions to which I can't get a straight answer from tutorials or from mailing list history. I guess this is sort of a sanity check. First, I'm wondering about the correct sourcemodel, as loading the standard_bem and setting the third mesh as the source points in ft_prepare_leadfield gives an error: Warning: dipole lies on boundary of volume model. Code: % Electrodes, vol, sourcemodel all set in same scale with ft_convert_units vol = load('standard_bem'); cfg = []; cfg.elec = elec_aligned; % electrodes aligned to skin surface cfg.grid.pos = vol.bnd(3).pnt; % source points cfg.grid.inside = 1:size(vol.bnd(3).pnt,1); cfg.vol = vol; cfg.reducerank = 3; leadfield = ft_prepare_leadfield(cfg); Using the code below works: vol = load('standard_bem'); sourcemodel = ft_read_headshape('cortex_8196.surf.gii'); cfg = []; cfg.elec = elec_aligned; % electrodes aligned to skin surface cfg.grid.pos = sourcemodel; % source points cfg.grid.inside = 1:size(sourcemodel,1); cfg.vol = vol; cfg.reducerank = 3; leadfield = ft_prepare_leadfield(cfg); But as the http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg seems to suggest the third mesh in vol should be the brain? Or is the third compartment there just for conduction calculations? As using the sourcemodel 'cortex_8196.surf.gii' at least gave an output I went forward with those for now, to see what other problems I'd encounter. Running the MNE: cfg = []; cfg.elec = elec_aligned; cfg.method = 'mne'; cfg.grid = leadfield; cfg.vol = vol; cfg.mne.prewhiten = 'yes'; cfg.mne.lambda = 60; %Hmmm? cfg.mne.scalesourcecov = 'yes'; cfg.mne.normalize = 'yes'; cfg.channel = 'all'; cond_12_source{subject_id} = ft_sourceanalysis(cfg,cond_12{subject_id}); So secondly, I'm concerned with the lambda value, as different tutorials give very different advice ranging from 3 to 1e8. Running the MNE with 3 seems to give very unstable results when comparing the results between subjects or conditions. The data is somewhat contaminated with leftover eye-movement artefacts (removed with ICA). And that 3 is from the tutorial where the data is from MEG. So a bigger lambda is in order, but how big? Or just let the minimumnormestimate.m calculate it from the data? I have to point out that the eye-movements are somewhat spread around the trial durations and not present in the calculation window of the .cov field from ft_timelockanalysis. Should I maybe calculate the .cov field from the whole trial? Third, there has been talk of MNE statistics in the mailing list, and it seems that the ft_timelockstatistics will do the job if a neighbours structure is provided. I build the neighbours structure from the sourcemodel mesh like this: sourcemodel = ft_read_headshape('cortex_8196.surf.gii'); nsources = length(sourcemodel.pnt); neighbours=struct; for i=1:nsources neighbours(i).label = num2str(i); neighb_nodes = sourcemodel.tri((sourcemodel.tri(:,1)==i | sourcemodel.tri(:,2)==i | sourcemodel.tri(:,3)==i),:); neighb_nodes = unique(neighb_nodes)'; idx = (neighb_nodes ~= i); neighb_nodes = neighb_nodes(idx); for k=1:length(neighb_nodes) neighbours(i).neighblabel{k} = num2str(neighb_nodes(k)); end end This seemed to give reasonable neighbours and just going by distance gave some sources that were on the other side of a gyrus. Although now the distances are not uniform. I also had to tweak the data structures a little bit, labels and such. Then I ran the tests with: cfg=[]; cfg.parameter = 'avg.pow'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg'; cfg.correctm = 'cluster'; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.numrandomization = 1000; cfg.tail = 1; cfg.correcttail ='alpha'; cfg.alpha = 0.05; cfg.latency = [0.4 0.5]; cfg.avgovertime = 'yes'; cfg.neighbours = neighbours; cfg.design = [1:15 1:15;ones(1,15), ones(1,15)*2]; cfg.uvar = 1; cfg.ivar = 2; cond1_stat = ft_timelockstatistics(cfg, cond_11_source{:}, cond_12_source{:}); Looking at the resulting clusters from ft_timelockstatistics there were clusters that when plotted showed disconnected sources. For example, plotted like this for the first cluster: paint = ones(8196,3); indx = find(cond1_stat.posclusterslabelmat == 1); paint(indx,2) = 0; ft_plot_mesh(sourcemodel,'vertexcolor',paint); Gave the output in the attachment, in that case the third source is atleast close, but still not a neighbour to the two next to it. Is there maybe something I'm missing with using the ft_timelockstatistics like this? I hope someone can clarify some of these issues. Thank you already in advance! Tatu -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: disconnected_cluster.png Type: image/png Size: 83016 bytes Desc: not available URL: From mor2451 at gmail.com Sun Mar 29 14:11:38 2015 From: mor2451 at gmail.com (moran abilea) Date: Sun, 29 Mar 2015 15:11:38 +0300 Subject: [FieldTrip] general questions about the FieldTrip In-Reply-To: References: Message-ID: thanks a lot Robert one more question if i may: are there any spesific set of functions on Matlab FieldTrip or even a sequence of algorithms in order to make P300 extractions for my p300 speller? best regards, Moran Abilea On Fri, Mar 27, 2015 at 6:53 PM, Robert Oostenveld < r.oostenveld at donders.ru.nl> wrote: > Hi Moran > > 1) The fieldtrip buffer by itself has a delay that can be as small as 5ms. > But the actual delay in the data stream from the electronics to the MATLAB > side of the buffer depends on quite a number of parameters and can be much > larger. Sending data in blocks (i.e. multiple samples are bufferend and > sent in one go), bluetooth and USB all cause delays before you are able to > process the samples in the data block. Even the USB connection and whether > you are sharing it with another device (i.e. mouse or USB hard drive on the > same USB hubor port) can affect the delay and can cause jitter (variation > in the delay). I suggest you look at > http://www.fieldtriptoolbox.org/example/measuring_the_timing_delay_and_jitter_for_a_real-time_application > for a demonstration how you can quantify the That page has data for our CTF > MEG system, which has a blocksize of ~100ms and does some online processing > (head localization) prior to forwarding the data, hence the delay of 150ms > that we see here makes sense. > > 2) On http://www.fieldtriptoolbox.org/getting_started/realtime you can > find some getting started instructions. Reading data from a file rather > than from a realitme buffer just means that you specify the name of the > file. If you look at > http://www.fieldtriptoolbox.org/example/ft_realtime_signalviewer you can > see how you can simulate a real time data stream. Just replace cfg.dataset > with an EEG file name in ft_realtime_signalviewer and you are not plotting > real time data, but data from file. > > 3) your P300 application can send events to the fieldtrip buffer and the > signal processing application can read them and act upon the data referred > to in the events. You can also make a single application that does both, or > make two applications that communicate events separate from the data stream. > > 4) I recall that some emotiv software needed to be installed, but don’t > know whether that requires the full SDK to be installed. I don’t have an > emotiv epoc myself. Please see > http://www.fieldtriptoolbox.org/development/realtime/emotiv and feel free > to add your findings to that (wiki) page. > > best regards, > Robert > > > > On 27 Mar 2015, at 16:28, moran abilea wrote: > > > hi again, > > > > i have another question/s, but this time they are genra. > > but first let me explain what i need from field trip: i'm working for > extracting from 14 channels EPOC Emotive the EEG raw data as contious data, > send trigger if i want to display the raw data or not and then process the > data with SVM. all this process is for creating EEG speller in Matlab. > > > > so my questions are: > > > > 1. i assume the field trip has constant "delay", the delay i reffer to > is between the time of view the signal and the real time data transfer in > the buffer. does anyone knows what is the delay time somehow? > > > > 2. where can i find how to open stream for a file? > > > > 3. using triggers: can i send time stamp in my configuration in order to > know when to display the data that i need for the EEG speller? > > > > 4. what to do in order to use the EPOC Emotive? do i need to set some > new configurations for matlab? to download any SDK? etc > > > > any kind of help will be welcomed, > > Moran Abilea > > _______________________________________________ > > 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 Caroline.Lustenberger at kispi.uzh.ch Mon Mar 30 20:12:30 2015 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Mon, 30 Mar 2015 18:12:30 +0000 Subject: [FieldTrip] Postdoctoral Position at UNC-Chapel Hill in Human Electrophysiology (EEG, tDCS/tACS, TMS) Message-ID: <7C66D90E0C18014E85B44B560D4D5BC8E46F91D0@EXZH2VM.kispi.int> Postdoctoral Position at UNC-Chapel Hill in Human Electrophysiology (EEG, tDCS/tACS, TMS) We are seeking to fill one postdoctoral position in human electrophysiology in the Frohlich Lab (www.frohlichlab.org) at the University of North Carolina at Chapel Hill. We are a rapidly growing lab that aims to understand how cortical network dynamics emerge and how these dynamics can be modulated with brain stimulation. We have received grant funding to further grow our human electrophysiology team in the lab. In particular, we are interested in understanding how (feedback) non-invasive brain stimulation alters cortical network dynamics that mediate cognition. The successful applicant will employ tDCS/tACS, EEG, TMS, and cognitive testing for elucidating the functional role of cortical oscillations in cognition and for the development of novel strategies to enhance brain function and treat cognitive deficits in psychiatric disorders such as schizophrenia and autism. The successful candidate has a PhD in neuroscience or related discipline and a track record of first class science demonstrated by first-author, peer-reviewed scientific articles in the area of human neurophysiology. Documented skills in EEG and cognitive assays are a prerequisite; programming and data analysis skills are essential. We will provide training in non-invasive brain stimulation methods. Please send your CV and a brief statement of research interest to flavio_frohlich at med.unc.edu . Also, please have two letters of recommendation directly submitted to the same email address. We are looking forward to meeting passionate and hard-working applicants who are ready for cutting-edge human neuroscience research. The Frohlich Lab takes pride in its high-quality science, productive work environment, and culture of mentoring and collaboration. The Frohlich aims to be a leading force in the emerging field of network neuroscience. The Frohlich Lab is a unique environment due to the vertical integration of computer simulations, slice electrophysiology, in vivo electrophysiology, human EEG and brain stimulation studies, and clinical trials. Applications will be immediately reviewed until the position is filled. Start date is flexible but the earlier the better. From orionblue8 at gmail.com Mon Mar 30 20:17:18 2015 From: orionblue8 at gmail.com (Orion) Date: Mon, 30 Mar 2015 13:17:18 -0500 Subject: [FieldTrip] discussion about how gamma power is calculated Message-ID: Hi This is not really a question about how to use Fieldtrip but I was wondering if anyone in the Fieldtrip community likes to calculate the "running gamma power"? This is what I call the parameter that I got after doing a power analysis on each trial, and then to simplify the data by one dimension (and rather than make a time-frequency plot), I averaged the bins within the 35-45 Hz or 30-94 Hz band. With a plot of the running gamma power, I can see where the "gamma power goes up or down as a function of time" to say it very roughly. Does anyone look at running gamma power or other running EEG parameters? Orion -------------- next part -------------- An HTML attachment was scrubbed... URL: From joscha.schmiedt at esi-frankfurt.de Tue Mar 31 15:09:43 2015 From: joscha.schmiedt at esi-frankfurt.de (Schmiedt, Joscha) Date: Tue, 31 Mar 2015 13:09:43 +0000 Subject: [FieldTrip] A Fieldtrip data format? Message-ID: <5548CAB3-F9A2-4C6B-B958-3CF27CF2C27F@esi-frankfurt.de> Hi, When working with Fieldtrip it is very convenient to store the data and analyses using MATLAB’s save and load functions. However, for large and/or complex data with many channels (>2GB) MATLAB enforces compression, which is pretty useless for electrophysiology data and slows down the load and save performance by a factor of up to 8 (see e.g. http://undocumentedmatlab.com/blog/improving-save-performance). The MATLAB file format is based on HDF5, which is generally an open and future-proof data format, but unfortunately MATLAB doesn’t allow you to disable the compression. An option to overcome this could be to develop a simple data format for Fieldtrip data that is also based on HDF5. Is or has there been any development going into that direction? Would there be any interest? Of course, creating yet another data format is almost never a good idea (https://xkcd.com/927/), but since HDF5 is well-documented and readable with almost any software, it might be worth thinking about it. I’d be happy to hear your thoughts. Joscha --------------------------------- Joscha Schmiedt PhD Student Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstraße 46 60528 Frankfurt am Main Germany Tel.: +49 (0)69 96769 241 Sitz der Gesellschaft: Frankfurt am Main Registergericht: Amtsgericht Frankfurt - HRB 84266 Geschäftsführer: Prof. Dr. Pascal Fries -------------- next part -------------- An HTML attachment was scrubbed... URL: From pjstienen at gmail.com Tue Mar 31 17:52:20 2015 From: pjstienen at gmail.com (Peter Stienen) Date: Tue, 31 Mar 2015 17:52:20 +0200 Subject: [FieldTrip] jack estimates of the standard error of the debiased wpli Message-ID: Hi users, I read in some papers that to test whether the debiased wpli significantly exceeds from zero, computing the jack-knife estimates of the standard error of the debiased wpli can be used. I can calculate the dbwpli/jack-knife estimates. However, does someone know what steps need to be followed to calculate the p-value from these estimates with regard to the normal distribution? Thanks in advance, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From gio at gpiantoni.com Tue Mar 31 22:39:52 2015 From: gio at gpiantoni.com (Gio Piantoni) Date: Tue, 31 Mar 2015 16:39:52 -0400 Subject: [FieldTrip] A Fieldtrip data format? In-Reply-To: <5548CAB3-F9A2-4C6B-B958-3CF27CF2C27F@esi-frankfurt.de> References: <5548CAB3-F9A2-4C6B-B958-3CF27CF2C27F@esi-frankfurt.de> Message-ID: Hi Joscha, FieldTrip already has its own simple uncompressed file format. fcdc_matbin "It is not an official file format, but was invented here at the FCDC. It consists of two files: a *.mat matlab file that contains the header (and optionally the events) and a *.bin binary file that contains the data." http://www.fieldtriptoolbox.org/faq/reading_is_slow_can_i_write_my_raw_data_to_a_more_efficient_file_format If you want to look at the code: https://github.com/fieldtrip/fieldtrip/blob/master/fileio/ft_write_data.m#L275 You should be able to read it as usual with ft_preprocessing. You can convert your files to the fcdc_matbin using ft_preprocessing as well: https://github.com/fieldtrip/fieldtrip/blob/master/ft_preprocessing.m#L581 Be careful about not losing precision though. The only catch is that, as far as I know, you cannot export your preprocessed data through ft_preprocessing at the moment, because ft_write_data is now inside this if-part: https://github.com/fieldtrip/fieldtrip/blob/master/ft_preprocessing.m#L252 but it's only a matter of adapting that to your needs. Would this work for you? -g On Tue, Mar 31, 2015 at 9:09 AM, Schmiedt, Joscha wrote: > Hi, > > When working with Fieldtrip it is very convenient to store the data and > analyses using MATLAB’s save and load functions. However, for large and/or > complex data with many channels (>2GB) MATLAB enforces compression, which is > pretty useless for electrophysiology data and slows down the load and save > performance by a factor of up to 8 (see e.g. > http://undocumentedmatlab.com/blog/improving-save-performance). The MATLAB > file format is based on HDF5, which is generally an open and future-proof > data format, but unfortunately MATLAB doesn’t allow you to disable the > compression. > > An option to overcome this could be to develop a simple data format for > Fieldtrip data that is also based on HDF5. Is or has there been any > development going into that direction? Would there be any interest? Of > course, creating yet another data format is almost never a good idea > (https://xkcd.com/927/), but since HDF5 is well-documented and readable with > almost any software, it might be worth thinking about it. > > I’d be happy to hear your thoughts. > > Joscha > > --------------------------------- > Joscha Schmiedt > PhD Student > > Ernst Strüngmann Institute (ESI) for Neuroscience > in Cooperation with Max Planck Society > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > Tel.: +49 (0)69 96769 241 > > Sitz der Gesellschaft: Frankfurt am Main > Registergericht: Amtsgericht Frankfurt - HRB 84266 > Geschäftsführer: Prof. Dr. Pascal Fries > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From shlomitbeker at gmail.com Sun Mar 1 11:38:04 2015 From: shlomitbeker at gmail.com (shlomit beker) Date: Sun, 1 Mar 2015 12:38:04 +0200 Subject: [FieldTrip] Fwd: interpolation In-Reply-To: References: Message-ID: Hi Fieldtrippers, We would like to use the ft_channelrepair(cfg, data) function. However we don't understand how to load or convert the electrode positions into FieldTrip. We tried FT_READ_SENS and we looked in FT_DATATYPE_SENS, however there are two positions variables described in this structure: The structure for EEG or ECoG channels contains sens.label = Mx1 cell-array with channel labels sens.chanpos = Mx3 matrix with channel positions sens.tra = MxN matrix to combine electrodes into channels sens.elecpos = Nx3 matrix with electrode positions what do the third field mean? what is the difference between the second and the fourth? our format is the attached. Thanks a lot! Omer and Shlomit -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- Name,X,Y,Z Nas,10.761088,100.987892,90.000000 Fid1,8.695332,115.625073,176.681312 Fid2,8.695332,115.625073,3.318688 E1,9.068730,103.978420,37.707197 E2,9.114712,90.880337,44.644806 E3,9.361927,78.971692,51.666010 E4,9.843311,68.234033,58.246154 E5,9.968636,56.448903,64.170813 E6,9.762819,44.501384,70.779258 E7,9.736243,33.341175,77.164587 E8,9.461169,22.339155,90.000000 E9,9.393823,11.688124,127.306400 E10,9.596665,99.083916,51.181915 E11,9.799699,87.625858,58.772025 E12,10.150354,75.650698,66.764771 E13,10.329451,64.842882,73.805812 E14,10.204397,53.557241,81.358250 E15,9.971271,43.089788,90.000000 E16,9.736243,33.341175,102.835413 E17,9.327410,23.433595,128.232998 E18,10.285052,94.969684,66.627057 E19,10.451891,85.323609,74.020032 E20,10.554640,74.345445,81.959600 E21,10.493970,63.646916,90.000000 E22,10.204397,53.557241,98.641750 E23,9.762819,44.501384,109.220742 E24,9.460075,35.802015,127.184539 E25,10.761203,93.256919,82.537006 E26,10.737137,84.626981,90.000000 E27,10.554640,74.345445,98.040400 E28,10.329451,64.842882,106.194188 E29,9.968636,56.448903,115.829187 E30,9.542844,48.782128,128.803911 E31,10.761088,100.987892,90.000000 E32,10.761203,93.256919,97.462994 E33,10.451891,85.323609,105.979968 E34,10.150354,75.650698,113.235229 E35,9.843311,68.234033,121.753846 E36,9.489548,59.767036,128.506861 E37,10.285052,94.969684,113.372943 E38,9.799699,87.625858,121.227975 E39,9.361927,78.971692,128.333990 E40,9.289732,69.218001,135.265515 E41,9.174187,58.028484,140.607176 E42,9.110028,46.015012,144.545390 E43,9.194459,35.248893,151.004325 E44,9.245175,23.565055,163.150912 E45,9.519999,12.655780,-162.995385 E46,9.596665,99.083916,128.818085 E47,9.114712,90.880337,135.355194 E48,8.888349,81.541526,142.505900 E49,8.766982,70.553645,149.196493 E50,8.937092,57.757292,155.268609 E51,8.948103,45.798798,162.376857 E52,9.201641,35.533103,173.549301 E53,9.429451,24.404072,-162.897520 E54,9.068730,103.978420,142.292803 E55,8.544581,94.102449,149.140746 E56,8.407718,82.866049,156.727661 E57,8.448040,70.514560,163.198903 E58,8.789435,58.413164,169.661560 E59,9.158021,47.049896,179.486799 E60,9.362286,37.036840,-163.384897 E61,8.516790,107.206103,157.957711 E62,8.080266,95.733921,165.130055 E63,8.118717,83.114481,171.384465 E64,8.543094,70.969564,177.153328 E65,8.908092,58.914546,-175.727138 E66,9.241572,50.079575,-164.070749 E67,8.927417,117.929963,167.252636 E68,8.197103,107.541586,172.257951 E69,7.996945,96.966345,179.478854 E70,8.068305,84.010193,-174.621726 E71,8.652928,71.346909,-169.436606 E72,9.004535,61.451643,-163.008828 E73,9.628421,128.245098,174.452905 E74,8.036446,96.625147,-166.664055 E75,8.330712,82.410129,-160.681967 E76,8.754403,70.242276,-154.914699 E77,9.248635,58.051265,-151.084656 E78,9.448291,46.355151,-145.769307 E79,9.636802,34.372686,-139.298073 E80,9.664407,22.564014,-127.091178 E81,9.655237,11.581130,-90.000000 E82,10.250036,135.807463,-176.052657 E83,8.452797,104.970004,-154.643174 E84,8.398554,93.510940,-153.804656 E85,8.697863,79.951488,-146.625956 E86,8.986969,67.266726,-141.514246 E87,9.523079,54.708062,-135.357926 E88,9.662776,43.194025,-127.629054 E89,9.873964,33.093355,-115.196067 E90,9.772684,22.513364,-90.000000 E91,11.209512,140.858593,-164.724066 E92,9.953439,132.677283,-157.091965 E93,9.345515,122.472442,-149.362984 E94,9.048487,113.092378,-147.673636 E95,8.809199,102.376386,-144.333841 E96,8.802170,89.333825,-139.329298 E97,9.076291,77.056949,-132.433685 E98,9.328702,65.143177,-127.120079 E99,9.510178,53.647360,-119.332693 E100,9.737640,43.061469,-108.855494 E101,9.974535,45.796457,-90.000000 E102,11.070044,137.842245,-149.017953 E103,10.126681,129.903495,-143.484820 E104,9.515842,119.452381,-137.378714 E105,9.308613,110.495171,-136.400673 E106,9.127194,98.843252,-131.569691 E107,9.220070,87.101247,-124.662235 E108,9.482746,75.436770,-117.873771 E109,9.736341,64.313078,-111.689838 E110,9.683126,53.985361,-102.774215 E111,11.202016,133.765789,-134.159266 E112,10.424872,126.267465,-129.861499 E113,9.908772,115.854503,-124.751714 E114,9.581553,107.460011,-125.232011 E115,9.611033,96.242245,-115.653419 E116,9.693262,85.154510,-108.929065 E117,9.794087,74.475751,-101.894590 E118,9.732708,64.838287,-97.128130 E119,9.695185,56.572691,-90.000000 E120,11.444011,131.143470,-123.097866 E121,10.622781,123.374443,-118.289050 E122,10.164092,113.435521,-112.856727 E123,10.118012,101.166200,-107.755713 E124,9.976019,93.664171,-102.775604 E125,9.816153,84.418877,-95.974152 E126,9.576882,74.578215,-90.000000 E127,9.732708,64.838287,-82.871870 E128,9.683126,53.985361,-77.225785 E129,9.737640,43.061469,-71.144506 E130,9.873964,33.093355,-64.803933 E131,9.664407,22.564014,-52.908822 E132,9.519999,12.655780,-17.004615 E133,11.491151,126.446312,-111.956693 E134,10.874564,120.711204,-106.883216 E135,10.366114,109.439090,-101.998030 E136,9.920603,102.874904,-95.451838 E137,9.626237,95.282718,-90.000000 E138,9.816153,84.418877,-84.025848 E139,9.794087,74.475751,-78.105410 E140,9.736341,64.313078,-68.310162 E141,9.510178,53.647360,-60.667307 E142,9.662776,43.194025,-52.370946 E143,9.636802,34.372686,-40.701927 E144,9.429451,24.404072,-17.102480 E145,11.610060,125.845626,-101.556299 E146,11.034271,119.617688,-96.350943 E147,10.232012,112.054734,-90.000000 E148,9.920603,102.874904,-84.548162 E149,9.976019,93.664171,-77.224396 E150,9.693262,85.154510,-71.070935 E151,9.482746,75.436770,-62.126229 E152,9.328702,65.143177,-52.879921 E153,9.523079,54.708062,-44.642074 E154,9.448291,46.355151,-34.230693 E155,9.362286,37.036840,-16.615103 E156,11.034271,119.617688,-83.649057 E157,10.366114,109.439090,-78.001970 E158,10.118012,101.166200,-72.244287 E159,9.611033,96.242245,-64.346581 E160,9.220070,87.101247,-55.337765 E161,9.076291,77.056949,-47.566315 E162,8.986969,67.266726,-38.485754 E163,9.248635,58.051265,-28.915344 E164,9.241572,50.079575,-15.929251 E165,11.610060,125.845626,-78.443701 E166,10.874564,120.711204,-73.116784 E167,10.164092,113.435521,-67.143273 E168,9.581553,107.460011,-54.767989 E169,9.127194,98.843252,-48.430309 E170,8.802170,89.333825,-40.670702 E171,8.697863,79.951488,-33.374044 E172,8.754403,70.242276,-25.085301 E173,9.004535,61.451643,-16.991172 E174,11.491151,126.446312,-68.043307 E175,10.622781,123.374443,-61.710950 E176,9.908772,115.854503,-55.248286 E177,9.308613,110.495171,-43.599327 E178,8.809199,102.376386,-35.666159 E179,8.398554,93.510940,-26.195344 E180,8.330712,82.410129,-19.318033 E181,8.652928,71.346909,-10.563394 E182,8.908092,58.914546,-4.272862 E183,9.158021,47.049896,0.513201 E184,9.201641,35.533103,6.450699 E185,9.245175,23.565055,16.849088 E186,9.393823,11.688124,52.693600 E187,11.444011,131.143470,-56.902134 E188,10.424872,126.267465,-50.138501 E189,9.515842,119.452381,-42.621286 E190,9.048487,113.092378,-32.326364 E191,8.452797,104.970004,-25.356826 E192,8.036446,96.625147,-13.335945 E193,8.068305,84.010193,-5.378274 E194,8.543094,70.969564,2.846672 E195,8.789435,58.413164,10.338440 E196,8.948103,45.798798,17.623143 E197,9.194459,35.248893,28.995675 E198,9.327410,23.433595,51.767002 E199,11.202016,133.765789,-45.840734 E200,10.126681,129.903495,-36.515180 E201,9.345515,122.472442,-30.637016 E202,7.996945,96.966345,0.521146 E203,8.118717,83.114481,8.615535 E204,8.448040,70.514560,16.801097 E205,8.937092,57.757292,24.731391 E206,9.110028,46.015012,35.454610 E207,9.460075,35.802015,52.815461 E208,11.070044,137.842245,-30.982047 E209,9.953439,132.677283,-22.908035 E210,8.197103,107.541586,7.742049 E211,8.080266,95.733921,14.869945 E212,8.407718,82.866049,23.272339 E213,8.766982,70.553645,30.803507 E214,9.174187,58.028484,39.392824 E215,9.542844,48.782128,51.196089 E216,11.209512,140.858593,-15.275934 E217,10.250036,135.807463,-3.947343 E218,9.628421,128.245098,5.547095 E219,8.927417,117.929963,12.747364 E220,8.516790,107.206103,22.042289 E221,8.544581,94.102449,30.859254 E222,8.888349,81.541526,37.494100 E223,9.289732,69.218001,44.734485 E224,9.489548,59.767036,51.493139 E225,9.386988,117.986216,23.067153 E226,9.914260,118.773022,33.537707 E227,10.138285,128.200139,18.488186 E228,10.859314,136.288567,10.421742 E229,11.436798,143.127527,-1.181902 E230,10.740471,122.891301,41.625351 E231,10.810450,129.588582,29.865612 E232,11.618695,136.605959,23.606353 E233,12.188049,143.300385,13.229683 E234,11.391064,125.084251,50.830892 E235,11.610218,131.264058,40.265246 E236,12.186819,137.818542,34.408687 E237,12.749106,144.638185,26.892952 E238,11.649067,125.608531,60.306669 E239,12.241244,134.962899,47.841310 E240,12.715155,140.516322,41.625035 E241,11.649067,125.608531,119.693331 E242,12.241244,134.962899,132.158690 E243,12.715155,140.516322,138.374965 E244,11.391064,125.084251,129.169108 E245,11.610218,131.264058,139.734754 E246,12.186819,137.818542,145.591313 E247,12.749106,144.638185,153.107048 E248,10.740471,122.891301,138.374649 E249,10.810450,129.588582,150.134388 E250,11.618695,136.605959,156.393647 E251,12.188049,143.300385,166.770317 E252,9.914260,118.773022,146.462293 E253,9.386988,117.986216,156.932847 E254,10.138285,128.200139,161.511814 E255,10.859314,136.288567,169.578258 E256,11.436798,143.127527,-178.818098 E257,9.683080,0.000000,0.000000 From tzvetan.popov at uni-konstanz.de Sun Mar 1 11:45:44 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Sun, 1 Mar 2015 11:45:44 +0100 Subject: [FieldTrip] ft_connectivityplot axis lables In-Reply-To: References: Message-ID: <3DD4868F-03AB-481E-A105-EBDCB796FE61@uni-konstanz.de> Hi Daria, please go to: http://fieldtrip.fcdonders.nl/tutorial/connectivity and scroll to the middle of that page. Up to the line that reads “Instead of plotting it with ft_connectivityplot, you can use the following low-level Matlab plotting code which gives a better understanding of the numerical representation of the results.” The code snipped there is probably what you need. > New to FieldTrip - I am trying to plot the output of ft_connectivityanalysis using ft_connectivityplot but cannot find a way to include values on the axes. I only get the first and last value, but nothing in-between (image attached). I’d also like to get an overall connectivity value, but am not sure how to do so. I appreciate any help/suggestions. I’m not sure what you mean by overall connectivity value. You could compute the mean of the two spectra and mean over frequencies yet this doesn't make much sense. best tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From dboratyn at u.northwestern.edu Sun Mar 1 23:54:26 2015 From: dboratyn at u.northwestern.edu (Daria Boratyn) Date: Sun, 1 Mar 2015 16:54:26 -0600 Subject: [FieldTrip] ft_connectivityplot axis lables Message-ID: Thanks, Tzvetan. In terms of connectivity value, I’m looking for a coherence value. Since it is calculated between 0 and 1, I imagine there is a way of getting the specific value for each correlation. Thank you, Daria Hi Daria, please go to: http://fieldtrip.fcdonders.nl/tutorial/connectivity and scroll to the middle of that page. Up to the line that reads ?Instead of plotting it with ft_connectivityplot, you can use the following low-level Matlab plotting code which gives a better understanding of the numerical representation of the results.? The code snipped there is probably what you need. > New to FieldTrip - I am trying to plot the output of ft_connectivityanalysis using ft_connectivityplot but cannot find a way to include values on the axes. I only get the first and last value, but nothing in-between (image attached). I?d also like to get an overall connectivity value, but am not sure how to do so. I appreciate any help/suggestions. I?m not sure what you mean by overall connectivity value. You could compute the mean of the two spectra and mean over frequencies yet this doesn't make much sense. best tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From tzvetan.popov at uni-konstanz.de Mon Mar 2 06:27:25 2015 From: tzvetan.popov at uni-konstanz.de (Tzvetan Popov) Date: Mon, 2 Mar 2015 06:27:25 +0100 Subject: [FieldTrip] ft_connectivityplot axis lables In-Reply-To: References: Message-ID: HI Daria, if you specify cfg.method = ‘coh’; you will end up with a subfield in your output data structure: data.cohspctrm (in the tutorial two steps further above). Please pay attention to the subfield ”dimord”, which is always outputted by FieldTrip. It says that your coherence matrix is channel by channel by frequency matrix. I assume you are interested at the coherence values in data.cohspctrm(1,2,:) reflective for coherence between EEG009 and EEG028. If your data has a frequency resolution of 1 Hz, data.cohspctrm(1,2,5) will be the coherence value of 10 Hz in your case. For plotting you could use ft_singleplotER after you reduce the cohspctrm subfield to two dimensions. Alternatively, low level matlab function will work too, i.e. figure; plot(data.freq, squeeze(data.cohspctrm(1,2,:))). best tzvetan > Thanks, Tzvetan. In terms of connectivity value, I’m looking for a coherence value. Since it is calculated between 0 and 1, I imagine there is a way of getting the specific value for each correlation. > > Thank you, > Daria > > Hi Daria, > please go to: http://fieldtrip.fcdonders.nl/tutorial/connectivity > > and scroll to the middle of that page. Up to the line that reads > ?Instead of plotting it with ft_connectivityplot, you can use the following low-level Matlab plotting code which gives a better understanding of the numerical representation of the results.? > > The code snipped there is probably what you need. > >> New to FieldTrip - I am trying to plot the output of ft_connectivityanalysis using ft_connectivityplot but cannot find a way to include values on the axes. I only get the first and last value, but nothing in-between (image attached). I?d also like to get an overall connectivity value, but am not sure how to do so. I appreciate any help/suggestions. > I?m not sure what you mean by overall connectivity value. You could compute the mean of the two spectra and mean over frequencies yet this doesn't make much sense. > > best > tzvetan -------------- next part -------------- An HTML attachment was scrubbed... URL: From catia_barbosa at live.fr Mon Mar 2 09:29:15 2015 From: catia_barbosa at live.fr (catia barbosa) Date: Mon, 2 Mar 2015 09:29:15 +0100 Subject: [FieldTrip] Just a small question about resegmenting epoched data... Message-ID: Dear community, I'll start by thanking you for spending your time trying to answer my question. I'm having some trouble with my script. I have filter and do my ICA rejection in my epoched data already. But know I'm thinking, that it would be more interesting and efficient to do it in a more segmented data. But I don't want to waste time redoing all the preprocessing all over again. So I resegmented the already epoched data in many subepochs. Even so I'm not satisfied, I would like to know if there is a simple and elegant way of doing it in fieldtrip, better than mine (here above): SOA = 390; BL = 500; sr = 678.17; SOA = round(SOA*sr/1000); BL = round(BL*sr/1000); adjust_sample=[0 1 1 2 2 3 3 4 4 5 5 6 6]; %adjusting for rounding SOA %constructing begsample and endsample beg_begspl = BL; end_begspl = SOA*12 + BL; begsample = [beg_begspl:SOA:end_begspl]; begsample=begsample+adjust_sample; beg_endspl = SOA*4 + BL; end_endspl = SOA*16 + BL; endsample = [beg_endspl:SOA:end_endspl]; endsample = endsample + adjust_sample; cte = (endsample(1)- begsample(1))/2; %creating new epochs cfg = []; cfg.begsample = begsample(1); cfg.endsample = endsample(1); tmp_data1= ft_redefinetrial(cfg, data); cfg = []; cfg.offset = [-(0*SOA)-(cte)]; tmp_data1 = ft_redefinetrial(cfg, tmp_data1); .... cfg = []; cfg.begsample = begsample(13); cfg.endsample = endsample(13); tmp_data13= ft_redefinetrial(cfg, data); cfg = []; cfg.offset = [-(12*SOA)-(cte)]; tmp_data13 = ft_redefinetrial(cfg, tmp_data13); %concatenating data cfg = []; tmp_data = ft_appenddata(cfg, tmp_data1, tmp_data2, tmp_data3, tmp_data4, tmp_data5, tmp_data6, tmp_data7, tmp_data8, tmp_data9 , tmp_data10, tmp_data11, tmp_data12, tmp_data13); Once again, thank you Barbosa Catia INSERM U 1106 /Institut de neurosciences des systèmes (FRANCE) -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Mon Mar 2 10:13:39 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Mon, 2 Mar 2015 10:13:39 +0100 Subject: [FieldTrip] Fwd: interpolation In-Reply-To: <0a61201b8b1547449c6aa889f3960ced@EXPRD01.hosting.ru.nl> References: <0a61201b8b1547449c6aa889f3960ced@EXPRD01.hosting.ru.nl> Message-ID: Dear Omer and Shlomit, Data matrices (e.g. each element of a data.trial{} cell-array) correspond to activity measured in *channels* over time. A channel in a data matrix does not necessarily correspond to an electrode (or gradiometer/magnetometer) which was present during the recording session. For instance, an EEG dataset can be expressed as a bipolar montage, which means that each channel corresponds to the difference between two electrodes. The positions of the physical electrodes are stored in sens.elecpos; these don't change with referencing. The sens.tra matrix describes how to convert from physical electrodes into data channels. If no rereferencing is applied to the data, sens.tra will typically be the identity matrix. In that case, sens.chanpos should also be identical to sens.elecpos. For the case of e.g. a bipolar montage, sens.elecpos will not change, while sens.chanpos might be updated to reflect points halfway two electrodes (and sens.tra will then be different from identity). Having access to the physical sensors' positions and the sens.tra matrix is needed for accurate source modelling, while sens.chanpos is used in other cases such as determining neighbours or creating a layout for topoplots. Best, Eelke On 1 March 2015 at 11:38, shlomit beker wrote: > > Hi Fieldtrippers, > > We would like to use the ft_channelrepair(cfg, data) function. > However we don't understand how to load or convert the electrode positions > into FieldTrip. > > We tried FT_READ_SENS and we looked in FT_DATATYPE_SENS, however there are > two positions variables described in this structure: > > The structure for EEG or ECoG channels contains > sens.label = Mx1 cell-array with channel labels > sens.chanpos = Mx3 matrix with channel positions > sens.tra = MxN matrix to combine electrodes into channels > sens.elecpos = Nx3 matrix with electrode positions > > what do the third field mean? what is the difference between the second and > the fourth? > > > our format is the attached. > > Thanks a lot! > > Omer and Shlomit > > From jeanmarclina at gmail.com Tue Mar 3 16:37:06 2015 From: jeanmarclina at gmail.com (Jean-marc Lina) Date: Tue, 3 Mar 2015 10:37:06 -0500 Subject: [FieldTrip] coherence and group analyses Message-ID: Involved in source analyses from MEG/EEG data, I am going through your papers related to statistical testing (Nonparametric stat testing of coherence differences, 2007 and stat testing in electrophys studies, 2012). Mostly concerned with coherence and coherency (either topography or tomography), I have some questions related to nonparametric statistical testing in the case where we have 2 groups (one group per condition, N subjects in each group) of individuals (n trials for each subjects). I will greatly appreciated some information that could help clarifying the followings: - how do we design the null distribution? permutations are among all subjects? How do we handle fixed/random effects? - Can we reproduce stricto sensu the Monte-Carlo approach described in the 2007 publication at the level of subjects (each subject being a UO) ? - Can we use the stat defined as the difference of the imaginary part of the coherence ? (averaged over the subjects in a group?) With my anticipated thanks, Best JM Lina -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Mar 3 21:54:55 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 3 Mar 2015 21:54:55 +0100 Subject: [FieldTrip] Magnetic dipole fit vs Equiv. Current dipole fit In-Reply-To: <54EE4147.9090408@candoosys.com> References: <54EE4147.9090408@candoosys.com> Message-ID: <063154D1-6549-463C-BCAA-AA42A78026EC@donders.ru.nl> Hi Jim You can do an inverse solution with any method (including dipole fitting) by specifying cfg.vol=[] in the corresponding high-level function (e.g. ft_prepare_leadfield, ft_dipolefitting or ft_sourceanalysis). This causes the forward model to be computed with a magnetic dipole. If you want to track this down to the lower lever code, have a look at these lines in the code “forward/ft_voltype.m" line 115 of 138 --83%-- col 11 “forward/ft_compute_leadfield.m" line 280 of 611 --45%-- col 12 My appologies for this not being documented better. I have been using this myself to check on the localization of the headcoils in the CTF “hz.ds” datasets, which worked fine. I hope you can get it to work for the Sandia Labs system. For the CTF system it is not needed to do these computations in MATLAB, since the CTF electronics does this in (alomst) real-time and the positions are streamed along with the MEG channel data. That makes this this http://fieldtrip.fcdonders.nl/getting_started/realtime_headlocalizer easy for the system we have in Nijmegen. Arjen and I have also been working on making it work for the Elekta system where the fitting has to be done in MATLAB, but have not been able sofar to get it to work robustly. You can find the experiences and (still open) report at http://bugzilla.fcdonders.nl/show_bug.cgi?id=1792. best regards Robert On 25 Feb 2015, at 22:40, Jim McKay wrote: > Hello Fieldtrippers, > > I am consulting with the Sandia Labs on development of an atomic magnetometer based MEG system prototype. One of the areas I am working on is head localization, so I was looking at the code for the realtime head localization in Fieldtrip. I was surprised to see that although the comments talk about using a magnetic dipole forward solution, it actually used the FT dipolefit code which is based on an equivalent current dipole, as far as I can tell. > > There should be a significant difference in the forward solutions between MD and ECD, so how does this work? Or am I just missing something? > > Cheers, > > Jim > > -- > Jim McKay > Candoo Systems Inc. - Magnetic field sensors, systems, and site surveys > Tel. 778-840-0361 > jim.mckay at candoosys.com > www.candoosys.com > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Mar 3 22:14:42 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 3 Mar 2015 22:14:42 +0100 Subject: [FieldTrip] inconsistent chanunit for Neuromag data In-Reply-To: References: Message-ID: <52410612-CB41-4734-A5E9-B45E7F22916B@donders.ru.nl> Hi Steve The grad.chanunit pertains to the units that would be computed as the forward solution. The hdr.chanunit pertains to the units of the channel-level data. Using the ft_convert_units helper function you could convert the units of the gradiometer definition from cm to mm or m. This changes the baseline of the planar gradiometers with a factor of 10 or 100. However, the planar gradient chanel data is not updated simultaneously and remains in the same units (fieldstrength per distance). So it can happen that grad.chanunit and hdr.chanunit are inconsistent. The consequence (which many people on the list will have noticed, but might not have understood) is that the forward solution - and therefore the inverse solution - for the Elekta planar gradiometer channels can easily be incorrect: due to the data being in T/m and the forward solution in T/cm (or some other units, I don’t know the typical units from the top of my head). As long as you always use the same pipeline on hte planar gradiometers, you will most likely not notice since you will be interpreting the sourc estimates in “arbitrary units” anyway. But if you were to combine the planar channels with the magnetometers, the planar channels (fieldstrength per distance) would be affected differently than the manetometer channels (fieldstrength) by your choise of geometrical units. Using the ft_datatype_sens helper function you can ensure that the scaling of the grad structure (which affects the “coilpos" field but also the rows of the “tra" field that correspond to the planar channels) is consistent with your channel level data. If you specify all your data in SI units (T, m, V, etc.) the units of the forward computations will be correct and hence the units of the inverse estimates will also be consistent in SI units (e.g. dipole moment in A/m). The thing is that the different fieldtrip import functions (which come from various origins) return data in non-SI units more often than not :-( If you work with channel level data, SI units are often not nice. ERFs in Tesla are very small (10^-12). ERPs are usually expressed in uV. Also for anatomcial MRIs it is not convenient to express data in SI units (m) and mm is common. The CTF system by default expresses geometrical distance in cm. Etc… So all systems by themselves made their own “convenient” choices. But if all the data comes together with the physical model, it becomes a mess. The logical choice to solve the inconsistencies is to express it in SI units. I hope this helps in clarifying the situation. best regards, Robert PS if you search on bugzilla, you can see some (still open) bugs that pertain to this On 27 Feb 2015, at 03:53, Steve Patterson wrote: > Hello, > > I noticed that fieldtrip produces inconsistent channel units when I > read in Neuromag (vectorview) data. > > For example: > > %%%%%%%%%%%%%%%%%%%%%%%% > > cfg = []; > cfg.dataset = 'example.fif'; > cfg.trialfun = 'ft_trialfun_general'; > cfg.trialdef.eventtype = 'STI101'; > cfg.trialdef.eventvalue = [17 18 20]; > cfg.trialdef.prestim = 0.500; > cfg.trialdef.poststim = 1.000; > cfg = ft_definetrial(cfg); > data = ft_preprocessing(cfg); > > disp(data.hdr.chanunit(1:6)); > 'T/m' > 'T/m' > 'T' > 'T/m' > 'T/m' > 'T' > > disp(data.grad.chanunit(1:6)); > 'T' > 'T' > 'T' > 'T' > 'T' > 'T' > > %%%%%%%%%%%%%%%%%%%%%%%% > > data.hdr.chanunit is correct and data.grad.chanunit is wrong. > > data.grad.chanunit must take precedence in further analysis, because > I've noticed this causes problems downstream. > > For example, when using ft_dipolesimulation, the simulated data on the > gradiometer channels is too small in amplitude by a factor of > 1/(16.8E-3) (the distance between the gradiometer coil pair in > meters). > > This is reflected in the grad.tra matrix, whose non-zero values are > all 1's and -1's, whereas they should be 1's (magnetometers), and +/- > 1/16.8E-3 (gradiometers). > > If you could fix this, it would be much appreciated! > > thanks, > > Steve > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From r.oostenveld at donders.ru.nl Tue Mar 3 22:18:34 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 3 Mar 2015 22:18:34 +0100 Subject: [FieldTrip] eeglab2fieldtrip - Fieldtrip vs EEGLAB version In-Reply-To: References: Message-ID: Hi Omar, The eeglab2fieldtrip.m function lives on the boudary between the two projects. We (i.e. Arno and me) have decided to maintain it on the EEGLAB side and copy it to FieldTrip whenever needed. That is why it is in fieldtrip/external/eeglab. If you go to https://code.google.com/p/fieldtrip/source/list?path=/trunk/external/eeglab/eeglab2fieldtrip.m&start=10122 you can see the history. See also http://bugzilla.fcdonders.nl/show_bug.cgi?id=2770 In general for (almost) all code in fieldtrip/external it is being maintained externally, and often by people that are not directly related to the fieldtrip project. best Robert On 16 Feb 2015, at 16:38, Mian, Omar wrote: > Hello, > > There seem to be differences between the eeglab2fieldtrip.m when the Fieldtrip and EEGLAB versions are compared. > > Is this an oversight? > Which one is “better” ? > > data.cfg.version.id contains a later date in the Fieldtrip version, but the file properties modified date is later in the EEGLAB version. > > The versions I am comparing are: > \fieldtrip-20150109\external\eeglab\eeglab2fieldtrip.m > \eeglab13_4_4b\plugins\dipfit2.3\eeglab2fieldtrip.m > > Thanks > > Omar > > --------------------------- > Omar Mian, Phd > Research Fellow > > School of Applied Sciences > London South Bank University > 103 Borough Road > London SE1 0AA > Copyright in this email and in any attachments belongs to London South Bank University. This email, and its attachments if any, may be confidential or legally privileged and is intended to be seen only by the person to whom it is addressed. If you are not the intended recipient, please note the following: (1) You should take immediate action to notify the sender and delete the original email and all copies from your computer systems; (2) You should not read copy or use the contents of the email nor disclose it or its existence to anyone else. The views expressed herein are those of the author(s) and should not be taken as those of London South Bank University, unless this is specifically stated. London South Bank University is a company limited by guarantee registered in England and Wales. The following details apply to London South Bank University: Company number - 00986761; Registered office and trading address - 103 Borough Road London SE1 0AA; VAT number - 778 1116 17 Email address - LSBUinfo at lsbu.ac.uk _______________________________________________ > 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 tolgaozkurt at gmail.com Wed Mar 4 09:54:53 2015 From: tolgaozkurt at gmail.com (Tolga Ozkurt) Date: Wed, 4 Mar 2015 10:54:53 +0200 Subject: [FieldTrip] Visualization of Channels for Human Connectome Project MEG data Message-ID: Dear Fieldtrip list, I was seeing the MEG files uploaded by “Human Connectome Project”, which seem to be pre-processed by Fieldtrip. The resting data were collected in supine position with 4D Neuromag 248 channels. When I use the standard command for layout cfg.layout = '4D248.lay'; the channel locations do not seem to fit. (Please see the attached figure). I do not quite know the channel distribution of the system; but it seems some channels are out of the head. Could you give me an idea to project the channel layout properly? Thank you. Tolga -- Tolga Esat Özkurt, PhD *Department of Health InformaticsMiddle East Technical University* http://www.metu.edu.tr/~ozkurt/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: alpha_resting_data_example.jpg Type: image/jpeg Size: 64893 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Wed Mar 4 11:34:27 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Wed, 4 Mar 2015 10:34:27 +0000 Subject: [FieldTrip] Visualization of Channels for Human Connectome Project MEG data In-Reply-To: References: Message-ID: Hi Tolga, There’s a layout that ‘better fits’ the projected channel locations, and which you can obtain from the megconnectome software that accompanies the HCP MEG data. The software can be obtained from here: humanconnectome.org/documentation/MEG1/meg-pipeline.html If you download one of the packages and unzip it, you’ll find a ‘template’ directory. Inside, there’s a 4D248.mat file (note that you need the ‘4D248.mat’ in cfg.layout in that case), which you can use as a layout for visualization. Best wishes, Jan-Mathijs On Mar 4, 2015, at 9:54 AM, Tolga Ozkurt > wrote: Dear Fieldtrip list, I was seeing the MEG files uploaded by “Human Connectome Project”, which seem to be pre-processed by Fieldtrip. The resting data were collected in supine position with 4D Neuromag 248 channels. When I use the standard command for layout cfg.layout = '4D248.lay'; the channel locations do not seem to fit. (Please see the attached figure). I do not quite know the channel distribution of the system; but it seems some channels are out of the head. Could you give me an idea to project the channel layout properly? Thank you. Tolga -- Tolga Esat Özkurt, PhD Department of Health Informatics Middle East Technical University http://www.metu.edu.tr/~ozkurt/ _______________________________________________ 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 tolgaozkurt at gmail.com Wed Mar 4 14:46:21 2015 From: tolgaozkurt at gmail.com (Tolga Ozkurt) Date: Wed, 4 Mar 2015 15:46:21 +0200 Subject: [FieldTrip] Visualization of Channels for Human Connectome Project MEG data In-Reply-To: References: Message-ID: Thanks a lot for the tip, Jan-Mathijs. I started downloading it now. Best, Tolga On Wed, Mar 4, 2015 at 12:34 PM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Hi Tolga, > > There’s a layout that ‘better fits’ the projected channel locations, and > which you can obtain from the megconnectome software that accompanies the > HCP MEG data. The software can be obtained from here: > humanconnectome.org/documentation/MEG1/meg-pipeline.html > If you download one of the packages and unzip it, you’ll find a ‘template’ > directory. Inside, there’s a 4D248.mat file (note that you need the > ‘4D248.mat’ in cfg.layout in that case), which you can use as a layout for > visualization. > > Best wishes, > Jan-Mathijs > > > On Mar 4, 2015, at 9:54 AM, Tolga Ozkurt wrote: > > Dear Fieldtrip list, > > > I was seeing the MEG files uploaded by “Human Connectome Project”, which > seem to be pre-processed by Fieldtrip. The resting data were collected in > supine position with 4D Neuromag 248 channels. > > > When I use the standard command for layout > > > cfg.layout = '4D248.lay'; > > > the channel locations do not seem to fit. (Please see the attached > figure). I do not quite know the channel distribution of the system; but it > seems some channels are out of the head. > > > Could you give me an idea to project the channel layout properly? > > > Thank you. > > > Tolga > > -- > Tolga Esat Özkurt, PhD > > *Department of Health Informatics Middle East Technical University* > http://www.metu.edu.tr/~ozkurt/ > > > _______________________________________________ > 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 jim.mckay at candoosys.com Wed Mar 4 20:28:42 2015 From: jim.mckay at candoosys.com (Jim McKay) Date: Wed, 04 Mar 2015 11:28:42 -0800 Subject: [FieldTrip] Magnetic dipole fit vs Equiv. Current dipole fit In-Reply-To: <063154D1-6549-463C-BCAA-AA42A78026EC@donders.ru.nl> References: <54EE4147.9090408@candoosys.com> <063154D1-6549-463C-BCAA-AA42A78026EC@donders.ru.nl> Message-ID: <54F75CEA.4020801@candoosys.com> An HTML attachment was scrubbed... URL: From ghanson0 at ku.edu Thu Mar 5 05:01:45 2015 From: ghanson0 at ku.edu (Hanson, Gavin Keith) Date: Thu, 5 Mar 2015 04:01:45 +0000 Subject: [FieldTrip] When/how do you bring together data from multiple blocks within a single participant. Message-ID: This is undoubted a straightforward issue, but I can’t seem to find any reference to it in the fieldtrip documentation. Our scanning protocol for each participant involved 6 runs of around 8 minutes in length, each of which is saved as a separate CTF dataset, and each of which begins with head localization (no continuous head position data). My main question is, when do I bring these blocks together into a single participant dataset? Do I just clean the data, then append it all together before launching in on the time-frequency analysis? Do I perform a time-frequency analysis within each block and then bring it all together later? How do I “align" my data to a specific head position that can hold for all blocks within a participant prior to topographical plotting / source reconstruction? If anyone can point me to where these answers may be, I would be very grateful, but I can’t find an answer to this anywhere. If it matters, our ultimate goal is to use beamforming to localize task-associated oscillatory responses during a cognitive task. Thanks in advance for your help, and let me know if you require further information. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Gavin Hanson, B.S. Research Assistant Department of Psychology University of Kansas 1415 Jayhawk Blvd., 534 Fraser Hall Lawrence, KS 66045 From Claudio.Georgii at stud.sbg.ac.at Thu Mar 5 13:25:34 2015 From: Claudio.Georgii at stud.sbg.ac.at (Claudio Georgii) Date: Thu, 5 Mar 2015 13:25:34 +0100 Subject: [FieldTrip] Phd or Post-doctoral position at the University of Salzburg Message-ID: Dear ladies and gentlemen, the clinical department (in particular the Clinical Stress and Emotion Lab and the Center for Cognitive Neuroscience) at the University of Salzburg is offering a Ph.D (3 years) or post-doc (4 years) position (depending on career stage/experience) for applicants with basic or advanced knowledge in EEG/fMRI/MEG methods. The focus of research will be analysis of ERPs, oscillatory EEG (on the surface and in source space) as well as connectivity analyses. We are funded by a starting grant of the European Research Council, running for the coming 5 years and a project funded by the Austrian Science Foundation in collaboration with the National Research Fund of Luxembourg (3 years). Please take more detailed information about the proposed position from the attached .pdf-file. We are looking forward to your application! Kind regards, Claudio Georgii -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ERCundFWFProjekt - neurocognitive.pdf Type: application/pdf Size: 216369 bytes Desc: not available URL: From r.oostenveld at donders.ru.nl Thu Mar 5 14:32:00 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 5 Mar 2015 14:32:00 +0100 Subject: [FieldTrip] Tenure Track Position "Neuropsychology of Language and Language Disorders" References: Message-ID: Tenure Track Position "Neuropsychology of Language and Language Disorders" Application deadline: 17 May 2015 Responsibilities The research consortium Language in Interaction invites applications for a tenure track position, offered with a view to long-term embedding of neuropsychological research in a clinical setting, and enhancement of collaborative research in the field of language-related disorders. The specific focus of the position is on the neuropsychology of language, bridging gaps at the clinical /non-clinical intersection (e.g. language-related disorders). This integration can be achieved using a varied set of methods, such as behavioural experimentation, functional neuroimaging (fMRI, EEG, MEG), transcranial magnetic stimulation (TMS), and formal computational modelling of language processes. You will head an independent research group to be established to promote the interaction between clinical and pre-clinical researchers. You will be expected to conduct research in one or more research areas relevant to theposition. Supervision of BSc, MSc and PhD projects will be part of your responsibilities. Administrative duties will include local and/or national committee memberships. With a view to continuation, the position may be expanded to include teaching and clinical work. You will be provided with budgetary resources, a PhD student or technician, materials and consumables. Work environment The Netherlands has an outstanding track record in the language sciences. The Language in Interaction consortium, sponsored by a Gravitation grant from the Netherlands Organization for Scientific research (NWO), brings together many of the excellent research groups in the Netherlands in a research programme on the foundations of language. Excellence in the domain of language and related relevant fields of cognition is combined with state-of-the-art research facilities and a research team with ample experience in complex research methods and utilization. This position is equally shared by two research centres within Donders Institute for Brain, Cognition and Behaviour, Radboud University and RadboudUMC. The Donders Institute is a world-class research centre devoted to understanding the mechanistic underpinnings of human cognition and behaviour. The institute conducts research in an international setting with more than 600 researchers from 35 countries. English is the lingua franca. In 2013, the Donders Institute was assessed by an international evaluation committee as excellent and recognized as a ‘very stimulating environment for top researchers, as well as for young talent'. What we expect from you You should be a creative and talented researcher, a strong experimenter in the neuropsychology of language, and have a clinical background and experience with patient studies. Other requirements are: − a PhD degree in a field relevant to the position concerned; − an established international reputation; − strong track record of peer-reviewed international publications; − experience with successfully applying for external funding; − experience with (co-)supervision of PhD students; − management skills required for academic leadership. What we have to offer - full time position - a maximum gross monthly salary of € 5,171 based on a 38-hour working week; starting salary depends on qualifications and experience; - you will be appointed for a period of 48 months; after 4 years, a permanent position will be offered if your performance is evaluated positively. Are you interested? Check this link for more information on this job offer and how to apply: http://www.ru.nl/overons/werken-radboud/details-0/details_vacature_0?recid=547039 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dboratyn at u.northwestern.edu Fri Mar 6 00:27:13 2015 From: dboratyn at u.northwestern.edu (Daria Boratyn) Date: Thu, 5 Mar 2015 17:27:13 -0600 Subject: [FieldTrip] ft_apply_montage Message-ID: I'm attempting to create a bipolar montage for a grouping of electrodes and am hving trouble figuring out the correct inputs. The setup I have: bipolar.labelorg = {'EEG 030', 'EEG 028', 'EEG 040', 'EEG 020' 'EEG 018' 'EEG 038'} bipolar.labelnew = {'EEG 030-EEG 028', 'EEG 030-EEG 040', 'EEG 030-EEG 020', 'EEG 028-EEG 018', 'EEG 028-EEG 038'} bipolar.tra = [ +1 -1 0 0 0 0 +1 0 -1 0 0 0 +1 0 0 -1 0 0 0 +1 0 0 -1 0 0 +1 0 0 0 -1 ]; freq_bipolar = ft_apply_montage(freq_continuous, ); I'm not sure which inputs ft_apply_montage wants and mostly get this error: Attempt to reference field of non-structure array. Error in ft_apply_montage (line 86) montage.chantypeorg = repmat({'unknown'}, size(montage.labelorg)); I would like to have an output that computes the subtraction of signals for the pairings specified. Any suggests would be greatly appreciated! Thank you, Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobias.staudigl at uni-konstanz.de Fri Mar 6 13:02:33 2015 From: tobias.staudigl at uni-konstanz.de (Tobias Staudigl) Date: Fri, 06 Mar 2015 13:02:33 +0100 Subject: [FieldTrip] imag plv In-Reply-To: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> References: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> Message-ID: <54F99759.8030302@uni-konstanz.de> Dear ft community, I am looking for an equivalent of imaginary coherence (Nolte, 2004), based on the phase-locking value (Lachaux, 1999) rather than coherence. Fieldtrip supports the following function, which would be exactly what I needed: cfg=[]; cfg.method = 'plv'; cfg.complex = 'imag'; iplv=ft_connectivityanalysis(cfg,freq); However, I did not find any documentation or reference, and was wondering whether it is feasible to use 'imag' together with 'plv'? Sadaghiani et al. (2012; J Neurosci) calculated imaginary plv in their paper like this: Is this what the ft code effectively does? Any help appreciated, thanks a lot! best, Tobias -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ihbaaegh.png Type: image/png Size: 4003 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Fri Mar 6 13:33:05 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 6 Mar 2015 12:33:05 +0000 Subject: [FieldTrip] imag plv In-Reply-To: <54F99759.8030302@uni-konstanz.de> References: <1479700333.612059.1424192589126.JavaMail.root@bcbl.eu> <54F99759.8030302@uni-konstanz.de> Message-ID: <4F1BA098-10EB-41FD-8B65-21FB6F044854@fcdonders.ru.nl> Hi Tobias, However, I did not find any documentation or reference, and was wondering whether it is feasible to use 'imag' together with 'plv'? Sadaghiani et al. (2012; J Neurosci) calculated imaginary plv in their paper like this: [cid:0471C70F-48E6-4C72-9F25-A67474534898 at home] Is this what the ft code effectively does? Yes, it does. Best wishes, Jan-Mathijs -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ihbaaegh.png Type: image/png Size: 4003 bytes Desc: ihbaaegh.png URL: From v.piai.research at gmail.com Mon Mar 9 04:58:41 2015 From: v.piai.research at gmail.com (=?UTF-8?B?Vml0w7NyaWEgUGlhaQ==?=) Date: Sun, 08 Mar 2015 20:58:41 -0700 Subject: [FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline' Message-ID: <54FD1A71.3070508@gmail.com> Hi all, I'm interested in using Laplacian transformation prior to computing TFRs. I still haven't read anything about the three methods implemented in FieldTrip, I must confess, but I think my question is independent of that. I'm using FT version: fieldtrip-20140801 on Matlab2014a. If I use the method 'spline', I can subsequently run ft_freqanalysis (or ft_timelockanalysis for that matter). However, with either 'hjorth' or 'finite', I get an error when running ft_freqanalysis/ft_timelockanalysis: My cfg: cfgn.method = 'template'; cfgn.layout = 'biosemi64.lay'; cfg.neighbours = ft_prepare_neighbours(cfgn, dat); cfg.method = 'hjorth'; %'finite', 'spline' cfg.elec = ft_read_sens('standard_1005.elc'); lpc = ft_scalpcurrentdensity(cfg, dat); % Then after that, a commonly used cfg for ft_freqanalysis Error using ft_datatype_sens (line 375) inconsistent number of channels in sensor description Error in ft_datatype_raw (line 138) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 219) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_freqanalysis (line 211) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); I understand that the "inconsistent number of channels in sensor description" is coming from these two other implementations, but should that be the case? The help on ft_scalpcurrentdensity says " The output data has the same format as the input and can be used in combination with most other FieldTrip functions". So I'm wondering whether there's something special intrinsic to these implementations, I'm using a too old FT version, my config isn't right, or this is an issue that has gone unnoticed because those implementations are not used often. Thanks a lot! Cheers from Berkeley, Vitoria From munsif.jatoi at gmail.com Mon Mar 9 11:31:24 2015 From: munsif.jatoi at gmail.com (Munsif Jatoi) Date: Mon, 9 Mar 2015 18:31:24 +0800 Subject: [FieldTrip] Source Analysis @ EEG data. Message-ID: Dear All, I hope you are fine. Sir, I am working for the completion of my PhD thesis in the field of EEG source localization by using various methods such as eLORETA, MUSIC, Min Norm etc. For this, I have been using SPM and Fieldtrip to first simulate EEG data and then use inverse methods to localize the sources. I have simulated the data by using two head models that are BEM and FEM. For BEM, I have used SPM+ Fieldtrip. However, for FEM I have purely used Fieldtrip SIMBIO command line. Now, I want to use the inverse methods for localization. For this, I have gone through the tutorials available at the fieldtrip website http://fieldtrip.fcdonders.nl/example . There, I found that there are following methods which are used for inverse problem: *1) *linear constrained minimum variance beamformer (LCMV) *2) *synthetic aperture magnetometry (SAM) *3) *dynamic imaging of coherent sources (DICS) *4) *partial cannonical correlation/coherence (PCC) *5) *minimum norm estimation (MNE) *6) *minimum norm estimation with smoothness constraint (LORETA) *7) *multiple signal classification (MUSIC) *8) *scan residual variance with single dipole (RV) *9) *multivariate Laplace source localization (MVL) However, I want to apply min norm, LORETA and MUSIC only for my data. As I studied MUSIC for applying on EEG data, I found that the code is developed by going through the research article of J.C. Mosher et. al. “Multiple dipole modelling and localization from spatiotemporal MEG data,” IEEE Trans. Biomed. Engg., pp. 541-557, June 1992. Though the basic definitions are understandable, however, I am confused in implementation for *EEG* data. For this, I have following questions: 1) What is *numcomponent* variable? I mean how it can be used for EEG data? 2) What is *dip* variable? From where we can generate it for an EEG data? 3) If we have computed leadfield by using BEM and FEM, how we can introduce in the programme provided at https://github.com/fieldtrip/fieldtrip/blob/master/inverse/music.m ? I hope you shall answer my questions. Thanks for your time. Kind Regards, Munsif. -- Munsif Ali H.Jatoi, Ph D Scholar, Centre for Intelligent Signals and Imaging Research, Universiti Teknologi PETRONAS, Malaysia. http://scholar.google.com.my/citations?user=Y6g6jOAAAAAJ&hl=en -------------- next part -------------- An HTML attachment was scrubbed... URL: From drivolta81 at gmail.com Mon Mar 9 18:28:29 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 9 Mar 2015 17:28:29 +0000 Subject: [FieldTrip] Quick question about STAT (error and weird output) Message-ID: Dear all, I am trying to look at ERPs stats with my EGI cap (I have 16 subjects - within subjects design). According to the code I use, I get in the order, an ERROR or I see something weird and I wish to have an opinion. See the script below: Here is my script: % ERPs grandaverage calculation for 4 conditions cfg = []; cfg.keepindividual = 'yes'; ERPs_FP_grandavg = ft_timelockgrandaverage(cfg, FP_block{:}); ERPs_FS_grandavg = ft_timelockgrandaverage(cfg, FS_block{:}); ERPs_HP_grandavg = ft_timelockgrandaverage(cfg, HP_block{:}); ERPs_HS_grandavg = ft_timelockgrandaverage(cfg, HS_block{:}); % t-tests cfg = []; cfg.method = 'triangulation'; cfg.layout = 'GSN-HydroCel-128.sfp'; cfg.neighbourdist = 2; cfg.senstype = 'EEG'; neighbours_EEG = ft_prepare_neighbours(cfg, ERPs_FP_grandavg); cfg = []; cfg.channel = 'EEG'; cfg.minnbchan = 2; cfg.neighbours = neighbours_EEG; cfg.latency = [1.17 1.25]; cfg.avgovertime = 'no'; cfg.parameter = 'avg'; cfg.method = 'montecarlo'; cfg.statistic = 'ft_statfun_depsamplesT'; cfg.alpha = 0.05; cfg.clusteralpha = 0.05; cfg.correctm = 'cluster'; cfg.correcttail = 'prob'; cfg.numrandomization = 1000; cfg.tail = 0; cfg.clustertail = 0; Nsub = length(names); cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number IF I USE THIS CODE: stat = ft_timelockstatistics(cfg,ERPs_FP_grandavg,ERPs_FS_grandavg); I GET TE ERROR: Reference to non-existent field 'dat'. Error in prepare_timefreq_data>forcedimord (line 531) Nrepl = size(output.dat, repldim); Error in prepare_timefreq_data (line 87) [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); Error in statistics_wrapper (line 235) [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); Error in ft_timelockstatistics (line 113) [stat, cfg] = statistics_wrapper(cfg, varargin{:}); - Note that this worked in very earlier versions of FT IF I USE THIS CODE stat = ft_timelockstatistics(cfg,FP_block{:},FS_block{:}); IT RUNS, BUT I GET SOMETHING WEIRD WITH T-VALUES BELOW 1 and 4 clusters (see attched figure). What I am doing wrong? Any advice would be great. Many thanks, Davide -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: stat_plot.tif Type: image/tiff Size: 199807 bytes Desc: stat_plot.tif URL: From r.oostenveld at donders.ru.nl Mon Mar 9 19:52:21 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Mon, 9 Mar 2015 19:52:21 +0100 Subject: [FieldTrip] Quick question about STAT (error and weird output) In-Reply-To: References: Message-ID: <60EC3D7C-9D72-436A-AF90-DA39BDEFF28C@donders.ru.nl> Hi Davide The details of the error messages reveal that you are using an old version of FieldTrip. Some of the low level functions it shows do not exist any more. Please update to the latest version and try again. Robert > On 9 mrt. 2015, at 18:28, Davide Rivolta wrote: > > Dear all, > > I am trying to look at ERPs stats with my EGI cap (I have 16 subjects - within subjects design). > According to the code I use, I get in the order, an ERROR or I see something weird and I wish to have an opinion. > See the script below: > > Here is my script: > % ERPs grandaverage calculation for 4 conditions > cfg = []; > cfg.keepindividual = 'yes'; > ERPs_FP_grandavg = ft_timelockgrandaverage(cfg, FP_block{:}); > ERPs_FS_grandavg = ft_timelockgrandaverage(cfg, FS_block{:}); > ERPs_HP_grandavg = ft_timelockgrandaverage(cfg, HP_block{:}); > ERPs_HS_grandavg = ft_timelockgrandaverage(cfg, HS_block{:}); > > % t-tests > cfg = []; > cfg.method = 'triangulation'; > cfg.layout = 'GSN-HydroCel-128.sfp'; > cfg.neighbourdist = 2; > cfg.senstype = 'EEG'; > neighbours_EEG = ft_prepare_neighbours(cfg, ERPs_FP_grandavg); > > cfg = []; > cfg.channel = 'EEG'; > cfg.minnbchan = 2; > cfg.neighbours = neighbours_EEG; > cfg.latency = [1.17 1.25]; > cfg.avgovertime = 'no'; > cfg.parameter = 'avg'; > cfg.method = 'montecarlo'; > cfg.statistic = 'ft_statfun_depsamplesT'; > cfg.alpha = 0.05; > cfg.clusteralpha = 0.05; > cfg.correctm = 'cluster'; > cfg.correcttail = 'prob'; > cfg.numrandomization = 1000; > cfg.tail = 0; > cfg.clustertail = 0; > > Nsub = length(names); > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > cfg.ivar = 1; % the 1st row in cfg.design contains the independent variable > cfg.uvar = 2; % the 2nd row in cfg.design contains the subject number > > IF I USE THIS CODE: > stat = ft_timelockstatistics(cfg,ERPs_FP_grandavg,ERPs_FS_grandavg); > > I GET TE ERROR: > Reference to non-existent field 'dat'. > > Error in prepare_timefreq_data>forcedimord (line 531) > Nrepl = size(output.dat, repldim); > > Error in prepare_timefreq_data (line 87) > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); > > Error in statistics_wrapper (line 235) > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); > > Error in ft_timelockstatistics (line 113) > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > - Note that this worked in very earlier versions of FT > > > > IF I USE THIS CODE > stat = ft_timelockstatistics(cfg,FP_block{:},FS_block{:}); > > IT RUNS, BUT I GET SOMETHING WEIRD WITH T-VALUES BELOW 1 and 4 clusters (see attched figure). > > > What I am doing wrong? Any advice would be great. > > > Many thanks, > Davide > > > > -- > Davide Rivolta, PhD > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From drivolta81 at gmail.com Mon Mar 9 21:10:04 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Mon, 9 Mar 2015 20:10:04 +0000 Subject: [FieldTrip] Quick question about STAT (error and weird output) In-Reply-To: <60EC3D7C-9D72-436A-AF90-DA39BDEFF28C@donders.ru.nl> References: <60EC3D7C-9D72-436A-AF90-DA39BDEFF28C@donders.ru.nl> Message-ID: Dear Robert, thanks for the prompt reply. I was using the 20150113 version. I have now downloaded the most recent version (20150308). As you predicted the last error disappeared, but after running the same script, I got this one: Error using getdimord (line 15) field "avg" not present in data Error in ft_timelockstatistics (line 114) dimord = getdimord(varargin{1}, cfg.parameter); It is weird that it is looking for "avg" since I had to indicate keepindividual='yes' in the ft_timelockgrandaverage step. I am sure it is something silly, but if someone is willing to help me out here, I would be grateful. Many thanks, Davide On Mon, Mar 9, 2015 at 6:52 PM, Robert Oostenveld < r.oostenveld at donders.ru.nl> wrote: > Hi Davide > > The details of the error messages reveal that you are using an old version > of FieldTrip. Some of the low level functions it shows do not exist any > more. > > Please update to the latest version and try again. > > Robert > > > > On 9 mrt. 2015, at 18:28, Davide Rivolta wrote: > > > > Dear all, > > > > I am trying to look at ERPs stats with my EGI cap (I have 16 subjects - > within subjects design). > > According to the code I use, I get in the order, an ERROR or I see > something weird and I wish to have an opinion. > > See the script below: > > > > Here is my script: > > % ERPs grandaverage calculation for 4 conditions > > cfg = []; > > cfg.keepindividual = 'yes'; > > ERPs_FP_grandavg = ft_timelockgrandaverage(cfg, FP_block{:}); > > ERPs_FS_grandavg = ft_timelockgrandaverage(cfg, FS_block{:}); > > ERPs_HP_grandavg = ft_timelockgrandaverage(cfg, HP_block{:}); > > ERPs_HS_grandavg = ft_timelockgrandaverage(cfg, HS_block{:}); > > > > % t-tests > > cfg = []; > > cfg.method = 'triangulation'; > > cfg.layout = 'GSN-HydroCel-128.sfp'; > > cfg.neighbourdist = 2; > > cfg.senstype = 'EEG'; > > neighbours_EEG = ft_prepare_neighbours(cfg, ERPs_FP_grandavg); > > > > cfg = []; > > cfg.channel = 'EEG'; > > cfg.minnbchan = 2; > > cfg.neighbours = neighbours_EEG; > > cfg.latency = [1.17 1.25]; > > cfg.avgovertime = 'no'; > > cfg.parameter = 'avg'; > > cfg.method = 'montecarlo'; > > cfg.statistic = 'ft_statfun_depsamplesT'; > > cfg.alpha = 0.05; > > cfg.clusteralpha = 0.05; > > cfg.correctm = 'cluster'; > > cfg.correcttail = 'prob'; > > cfg.numrandomization = 1000; > > cfg.tail = 0; > > cfg.clustertail = 0; > > > > Nsub = length(names); > > cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)]; > > cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub]; > > cfg.ivar = 1; % the 1st row in cfg.design contains the > independent variable > > cfg.uvar = 2; % the 2nd row in cfg.design contains the > subject number > > > > IF I USE THIS CODE: > > stat = ft_timelockstatistics(cfg,ERPs_FP_grandavg,ERPs_FS_grandavg); > > > > I GET TE ERROR: > > Reference to non-existent field 'dat'. > > > > Error in prepare_timefreq_data>forcedimord (line 531) > > Nrepl = size(output.dat, repldim); > > > > Error in prepare_timefreq_data (line 87) > > [remember{c}, hascrsspctrm] = forcedimord(varargin{c}); > > > > Error in statistics_wrapper (line 235) > > [cfg, data] = prepare_timefreq_data(cfg, varargin{:}); > > > > Error in ft_timelockstatistics (line 113) > > [stat, cfg] = statistics_wrapper(cfg, varargin{:}); > > > > > > - Note that this worked in very earlier versions of FT > > > > > > > > IF I USE THIS CODE > > stat = ft_timelockstatistics(cfg,FP_block{:},FS_block{:}); > > > > IT RUNS, BUT I GET SOMETHING WEIRD WITH T-VALUES BELOW 1 and 4 clusters > (see attched figure). > > > > > > What I am doing wrong? Any advice would be great. > > > > > > Many thanks, > > Davide > > > > > > > > -- > > Davide Rivolta, PhD > > > > _______________________________________________ > > 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 > -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: From Laura.Rueda at faber.kuleuven.be Tue Mar 10 11:42:15 2015 From: Laura.Rueda at faber.kuleuven.be (Laura Rueda Delgado) Date: Tue, 10 Mar 2015 10:42:15 +0000 Subject: [FieldTrip] Looking up for right MNI coords and label Message-ID: Dear all, I've estimated the sources of two conditions using individual MRIs with warped grid from a template (1cm spacing). I ran a cluster-based permutation to find the significant voxels and I'm choosing the voxel where the difference is bigger. I've had some problems defining what that voxel is. I've used two options: giving the position to the atlas_lookup function, and giving the index to an interpolated tissue matrix from an atlas. Given that grid occupies the brain volume (in the BEM model with 3 layers), I also created a mask to restrict the voxels of interest to the cortex from the atlas. I seem to get different results with these and I don't understand why. All matrices are in cm. This is part of the code: Note: The variables are atlas = ft_read_atlas('...\fieldtrip-20141023\template\atlas\aal\ROI_MNI_V4.nii'); % then converted to 'cm' sourcemodel = grid with 1cm spacing from template stat = structure from ft_sourcestatistics % Create mask from atlas cfg = []; cfg.interpmethod = 'nearest'; cfg.parameter = 'tissue'; sourcemodel2 = ft_sourceinterpolate(cfg,atlas,sourcemodel); atlas_one= sourcemodel2.tissue > 0; % Logical matrix with points with an anatomical label %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 1)Look for labels with atlas mask [val ind_max] = max(stat.stat(:).* atlas_one(:)); % 1.a)-------------------------------------- % Atlas_lookup pos = stat.pos(ind_max,:); atlas_lookup(atlas, pos, 'inputcoord', 'mni') % Results % MNI coordinates: 4 -1 2 % Label: Rolandic_Oper_R % 1.b)-------------------------------------- % Interpolated tissue from atlas [xi yi zi] = ind2sub(stat.dim, ind_max); atlas.tissuelabel{sourcemodel2.tissue(xi, yi, zi)} % Results % Voxel coordinates: 12 10 10 % Label: Rolandic_Oper_R %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 2)Look for labels without atlas mask [val ind_max] = max(stat.stat(:)); % 2.a)-------------------------------------- % Atlas_lookup % Results % MNI coordinates: 4 -1 3 % Label: Postcentral_R % 2.b)-------------------------------------- % Interpolated tissue from atlas % Results % Voxel coordinates: 12 10 11 % Label: None What is it that I'm missing? Thank you in advance for any help! Best regards, Laura Rueda Delgado PhD student Department of Kinesiology- Motor Control and Neural Plasticity Research Group KU Leuven Tervuursevest 101 bus 1501 3001 Leuven, Belgium tel. +32 16 37 64 78 -------------- next part -------------- An HTML attachment was scrubbed... URL: From RICHARDS at mailbox.sc.edu Tue Mar 10 12:56:03 2015 From: RICHARDS at mailbox.sc.edu (RICHARDS, JOHN) Date: Tue, 10 Mar 2015 11:56:03 +0000 Subject: [FieldTrip] Electrode plots below the equator Message-ID: I am using EGIs electrodes, and am trying to plot data on the topo plot. The electrodes below the horizontal equator plot on top of the other electrodes. I have tried all of the types. With the orthographic I get the best results for the interior and superior electrodes (center of head), the the ones below the horizon appear to plot on top of the ones above the horizon. For example the topo plot at http://sccn.ucsd.edu/eeglab/allfunctions/topoplot.html. Can this be done with ft plots? EEGLab topoplot: "By default, channel locations below head center (arc_length 0.5) are shown in a 'skirt' outside the cartoon head (see 'plotrad' and 'headrad' options below)². This is my code, I have tried all the options for projection. cfg=[]; cfg.rotate=0; cfg.elec=elec; cfg.projection='orthographic'; lay=ft_prepare_layout(cfg); 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 *********************************************** > From marijkebeulen at gmail.com Tue Mar 10 13:13:31 2015 From: marijkebeulen at gmail.com (Marijke Beulen) Date: Tue, 10 Mar 2015 13:13:31 +0100 Subject: [FieldTrip] Pre-stimulus baseline correction for response-locked ERPs In-Reply-To: References: Message-ID: <54FEDFEB.2080904@gmail.com> Dear all, I was wondering if anyone knows how to define a stimulus-locked baseline period to correct a response-locked ERP using ft_timelockbaseline. So far, I've been plotting stimulus-locked ERPs and using ft_timelockbaseline with the 300ms before stimulus onset for baseline correction. I've tried other methods to do baseline correction manually, but so far, ft_timelockbaseline has given me the best results. However, now I also want to plot response-locked ERPs. To keep things comparable, I would like to use the same 300ms pre-stimulus interval for baseline correction, but my trials have different lengths. This means that after response-locking the data, the time stamp of that interval is different on every trial. Is there any way to e.g. define separate baseline windows for each trial or to give FieldTrip another (stimulus-locked) dataset to use as a baseline in ft_timelockbaseline? I've already searched through FieldTrip's documentation, but I haven't been able to find a solution. Any advice on how to do this would be much appreciated! Sincerely, Marijke Beulen -- M.A. Beulen, MSc. PhD student at University of Groningen, dept. Artificial Intelligence Bernoulliborg, room 320 Nijenborgh 9 9747 AG Groningen The Netherlands Phone: +31 50 363 6915 m.a.beulen at rug.nl -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.roux at bcbl.eu Tue Mar 10 15:05:18 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 10 Mar 2015 15:05:18 +0100 (CET) Subject: [FieldTrip] channel order changes after ft_channelrepair In-Reply-To: <654280552.938467.1425994592940.JavaMail.root@bcbl.eu> Message-ID: <604599468.938937.1425996318048.JavaMail.root@bcbl.eu> Dear all, I just noted that after calling ft_channelrepair the order of channel labels in my Neuromag 306 data has changed. The code I am using is as follows (fieldtrip-20150115): %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % get the labels from the reference layout cfg = []; cfg.layout = 'neuromag306planar.lay'; [ref_lay] = ft_prepare_layout(cfg); % eliminate COMNT and SCALE labels ref_lay.label = ref_lay.label(1:204); % get the labels of channels present in the data orig_label = meg_data.label; % compare labels from reference layout with original data idx = zeros(length(ref_lay.label),1); for it = 1:length(ref_lay.label) idx(it) = any(strcmp(ref_lay.label(it),orig_label)); end; % load the template neighbourhood structure from fieldtrip load('neuromag306planar_neighb.mat'); cfg = []; cfg.neighbours = neighbours; cfg.missingchannel = find(idx==0); cfg.method = 'spline'; [meg_data] = ft_channelrepair(cfg,meg_data); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% When I then look at meg_data.label I can see that the missing channels were added at the end of the channel label list instead of being integrated in the list at the position where they would be found in the channel list of the template layout. For instance meg_data.label(end) = 'MEG1133'; and ref_lay.label(end) = 'MEG2643'; Does anyone know why this happens and how this can be avoided or compensated? I am guessing that later on in the analysis pipeline this can become problematic as the mapping between the new labels and the spatial coordinates does not correspond anymore. Any help or suggestions would be highly appreciated! Thanks, Fred -- Frédéric Roux Postdoctoral Scientist f.roux at bcbl.eu Tel: +34 943 309 300 Ext 211 Fax: +34 943 309 052 Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer --------------------------------------------------------------------------- From jorn at artinis.com Tue Mar 10 15:16:30 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Tue, 10 Mar 2015 15:16:30 +0100 Subject: [FieldTrip] channel order changes after ft_channelrepair In-Reply-To: <604599468.938937.1425996318048.JavaMail.root@bcbl.eu> References: <654280552.938467.1425994592940.JavaMail.root@bcbl.eu> <604599468.938937.1425996318048.JavaMail.root@bcbl.eu> Message-ID: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> Hi Fred, back then when I implemented different options for channel interpolation, we decided that there is no "natural" order of channels in any sense. For MEG systems it might seem like that, because afaik there is a single acquisition software per system, which is always returning channels in the same order. However, this order is arbitrary and can be other rationales equally valid than the one used by the acquisition software. For your specific case, I imagine that a sensor is broken and thus turned off: it will not be in the list of channels anymore. FieldTrip does not know where the 'natural' position of that channel is, as FT is not maintaining fixed channel lists. But this shouldn't be a problem anyhow, as channel labels can be easily matched. If I recall the latest developments correctly, by now all FieldTrip functions are taking care of the channel order - even when computing leadfields ;) If you do not like this due to aesthetical reasons or because you want to have the channel order being consistent across subjects, you can simply reorder them manually. As said, FieldTrip does not care about the order. Just be sure that if you are reordering the label-field, you also need to reorder the channel dimension(s) of all data. If you encounter any problems with this concatenation, feel free send out notification. Best, Jörn PS: if the channel is already in your data and you want to just repair it because it suffers from a lot of artifacts, you could try using cfg.badchannel instead of cfg.missingchannel. If I recall correctly, missing channels are always concatenated, bad channels are kept in order if already present. But it's been a while, so I am not sure and right now, too lazy to check the code ;) -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Frédéric Roux > Sent: Tuesday, March 10, 2015 3:05 PM > To: FieldTrip discussion list > Subject: [FieldTrip] channel order changes after ft_channelrepair > > Dear all, > > I just noted that after calling ft_channelrepair the order of channel labels in > my Neuromag 306 data has changed. > > The code I am using is as follows (fieldtrip-20150115): > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % get the labels from the reference layout cfg = []; cfg.layout = > 'neuromag306planar.lay'; > > [ref_lay] = ft_prepare_layout(cfg); > > % eliminate COMNT and SCALE labels > ref_lay.label = ref_lay.label(1:204); > > % get the labels of channels present in the data orig_label = meg_data.label; > > % compare labels from reference layout with original data idx = > zeros(length(ref_lay.label),1); for it = 1:length(ref_lay.label) > idx(it) = any(strcmp(ref_lay.label(it),orig_label)); > end; > > % load the template neighbourhood structure from fieldtrip > load('neuromag306planar_neighb.mat'); > > cfg = []; > cfg.neighbours = neighbours; > cfg.missingchannel = find(idx==0); > cfg.method = 'spline'; > > [meg_data] = ft_channelrepair(cfg,meg_data); > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > When I then look at meg_data.label I can see that the missing channels were > added at the end of the channel label list instead of being integrated in the > list at the position where they would be found in the channel list of the > template layout. > > For instance > > meg_data.label(end) = 'MEG1133'; > > and > > ref_lay.label(end) = 'MEG2643'; > > > Does anyone know why this happens and how this can be avoided or > compensated? I am guessing that later on in the analysis pipeline this can > become problematic as the mapping between the new labels and the spatial > coordinates does not correspond anymore. > > Any help or suggestions would be highly appreciated! > > Thanks, > Fred > > -- > Frédéric Roux > Postdoctoral Scientist > f.roux at bcbl.eu > Tel: +34 943 309 300 Ext 211 > Fax: +34 943 309 052 > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > --------------------------------------------------------------------------- > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From f.roux at bcbl.eu Tue Mar 10 15:37:02 2015 From: f.roux at bcbl.eu (=?utf-8?B?RnLDqWTDqXJpYw==?= Roux) Date: Tue, 10 Mar 2015 15:37:02 +0100 (CET) Subject: [FieldTrip] channel order changes after ft_channelrepair In-Reply-To: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> Message-ID: <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> Dear Joern, thanks for the quick and very helpful reply. My goal is indeed to keep the channel order consistent across different participants. After MF-preprocessing some of the channels are missing in certain participants but this is not consistent so I would like to interpolate the missing channels for those participants for which the channels were turned off. I am guessing that the fields that I need to adjust if I want to manually re-order the info of the channels according to the template are meg_data.label and meg_data.trial Do you see anything else that would need to be adjusted ? Best, Fred -- FR ----- Original Message ----- From: "Jörn M. Horschig" To: "FieldTrip discussion list" Sent: Tuesday, March 10, 2015 3:16:30 PM Subject: Re: [FieldTrip] channel order changes after ft_channelrepair Hi Fred, back then when I implemented different options for channel interpolation, we decided that there is no "natural" order of channels in any sense. For MEG systems it might seem like that, because afaik there is a single acquisition software per system, which is always returning channels in the same order. However, this order is arbitrary and can be other rationales equally valid than the one used by the acquisition software. For your specific case, I imagine that a sensor is broken and thus turned off: it will not be in the list of channels anymore. FieldTrip does not know where the 'natural' position of that channel is, as FT is not maintaining fixed channel lists. But this shouldn't be a problem anyhow, as channel labels can be easily matched. If I recall the latest developments correctly, by now all FieldTrip functions are taking care of the channel order - even when computing leadfields ;) If you do not like this due to aesthetical reasons or because you want to have the channel order being consistent across subjects, you can simply reorder them manually. As said, FieldTrip does not care about the order. Just be sure that if you are reordering the label-field, you also need to reorder the channel dimension(s) of all data. If you encounter any problems with this concatenation, feel free send out notification. Best, Jörn PS: if the channel is already in your data and you want to just repair it because it suffers from a lot of artifacts, you could try using cfg.badchannel instead of cfg.missingchannel. If I recall correctly, missing channels are always concatenated, bad channels are kept in order if already present. But it's been a while, so I am not sure and right now, too lazy to check the code ;) -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Frédéric Roux > Sent: Tuesday, March 10, 2015 3:05 PM > To: FieldTrip discussion list > Subject: [FieldTrip] channel order changes after ft_channelrepair > > Dear all, > > I just noted that after calling ft_channelrepair the order of channel labels in > my Neuromag 306 data has changed. > > The code I am using is as follows (fieldtrip-20150115): > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > % get the labels from the reference layout cfg = []; cfg.layout = > 'neuromag306planar.lay'; > > [ref_lay] = ft_prepare_layout(cfg); > > % eliminate COMNT and SCALE labels > ref_lay.label = ref_lay.label(1:204); > > % get the labels of channels present in the data orig_label = meg_data.label; > > % compare labels from reference layout with original data idx = > zeros(length(ref_lay.label),1); for it = 1:length(ref_lay.label) > idx(it) = any(strcmp(ref_lay.label(it),orig_label)); > end; > > % load the template neighbourhood structure from fieldtrip > load('neuromag306planar_neighb.mat'); > > cfg = []; > cfg.neighbours = neighbours; > cfg.missingchannel = find(idx==0); > cfg.method = 'spline'; > > [meg_data] = ft_channelrepair(cfg,meg_data); > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > When I then look at meg_data.label I can see that the missing channels were > added at the end of the channel label list instead of being integrated in the > list at the position where they would be found in the channel list of the > template layout. > > For instance > > meg_data.label(end) = 'MEG1133'; > > and > > ref_lay.label(end) = 'MEG2643'; > > > Does anyone know why this happens and how this can be avoided or > compensated? I am guessing that later on in the analysis pipeline this can > become problematic as the mapping between the new labels and the spatial > coordinates does not correspond anymore. > > Any help or suggestions would be highly appreciated! > > Thanks, > Fred > > -- > Frédéric Roux > Postdoctoral Scientist > f.roux at bcbl.eu > Tel: +34 943 309 300 Ext 211 > Fax: +34 943 309 052 > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > --------------------------------------------------------------------------- > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From jorn at artinis.com Tue Mar 10 16:04:25 2015 From: jorn at artinis.com (=?UTF-8?Q?J=C3=B6rn_M._Horschig?=) Date: Tue, 10 Mar 2015 16:04:25 +0100 Subject: [FieldTrip] channel order changes after ft_channelrepair In-Reply-To: <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> Message-ID: <003101d05b43$801dd6c0$80598440$@artinis.com> Hi Fred, yes, immediately after preprocessing it should be only those two fields. Best, Jörn -- Jörn M. Horschig, Software Engineer Artinis Medical Systems | +31 481 350 980 > -----Original Message----- > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > bounces at science.ru.nl] On Behalf Of Frédéric Roux > Sent: Tuesday, March 10, 2015 3:37 PM > To: FieldTrip discussion list > Subject: Re: [FieldTrip] channel order changes after ft_channelrepair > > Dear Joern, > > thanks for the quick and very helpful reply. > > My goal is indeed to keep the channel order consistent across different > participants. > > After MF-preprocessing some of the channels are missing in certain > participants but this is not consistent so I would like to interpolate the missing > channels for those participants for which the channels were turned off. > > I am guessing that the fields that I need to adjust if I want to manually re- > order the info of the channels according to the template are > > meg_data.label > and > meg_data.trial > > Do you see anything else that would need to be adjusted ? > > Best, > Fred > > -- > FR > > ----- Original Message ----- > From: "Jörn M. Horschig" > To: "FieldTrip discussion list" > Sent: Tuesday, March 10, 2015 3:16:30 PM > Subject: Re: [FieldTrip] channel order changes after ft_channelrepair > > Hi Fred, > > back then when I implemented different options for channel interpolation, > we decided that there is no "natural" order of channels in any sense. For > MEG systems it might seem like that, because afaik there is a single > acquisition software per system, which is always returning channels in the > same order. However, this order is arbitrary and can be other rationales > equally valid than the one used by the acquisition software. > > For your specific case, I imagine that a sensor is broken and thus turned off: it > will not be in the list of channels anymore. FieldTrip does not know where > the 'natural' position of that channel is, as FT is not maintaining fixed channel > lists. But this shouldn't be a problem anyhow, as channel labels can be easily > matched. If I recall the latest developments correctly, by now all FieldTrip > functions are taking care of the channel order - even when computing > leadfields ;) > > If you do not like this due to aesthetical reasons or because you want to have > the channel order being consistent across subjects, you can simply reorder > them manually. As said, FieldTrip does not care about the order. Just be sure > that if you are reordering the label-field, you also need to reorder the > channel dimension(s) of all data. > > If you encounter any problems with this concatenation, feel free send out > notification. > > Best, > Jörn > > PS: if the channel is already in your data and you want to just repair it > because it suffers from a lot of artifacts, you could try using cfg.badchannel > instead of cfg.missingchannel. If I recall correctly, missing channels are always > concatenated, bad channels are kept in order if already present. But it's been > a while, so I am not sure and right now, too lazy to check the code ;) > > -- > > Jörn M. Horschig, Software Engineer > Artinis Medical Systems | +31 481 350 980 > > > -----Original Message----- > > From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip- > > bounces at science.ru.nl] On Behalf Of Frédéric Roux > > Sent: Tuesday, March 10, 2015 3:05 PM > > To: FieldTrip discussion list > > Subject: [FieldTrip] channel order changes after ft_channelrepair > > > > Dear all, > > > > I just noted that after calling ft_channelrepair the order of channel > > labels in my Neuromag 306 data has changed. > > > > The code I am using is as follows (fieldtrip-20150115): > > > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > % get the labels from the reference layout cfg = []; cfg.layout = > > 'neuromag306planar.lay'; > > > > [ref_lay] = ft_prepare_layout(cfg); > > > > % eliminate COMNT and SCALE labels > > ref_lay.label = ref_lay.label(1:204); > > > > % get the labels of channels present in the data orig_label = > > meg_data.label; > > > > % compare labels from reference layout with original data idx = > > zeros(length(ref_lay.label),1); for it = 1:length(ref_lay.label) > > idx(it) = any(strcmp(ref_lay.label(it),orig_label)); > > end; > > > > % load the template neighbourhood structure from fieldtrip > > load('neuromag306planar_neighb.mat'); > > > > cfg = []; > > cfg.neighbours = neighbours; > > cfg.missingchannel = find(idx==0); > > cfg.method = 'spline'; > > > > [meg_data] = ft_channelrepair(cfg,meg_data); > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > When I then look at meg_data.label I can see that the missing channels > > were added at the end of the channel label list instead of being > > integrated in the list at the position where they would be found in > > the channel list of the template layout. > > > > For instance > > > > meg_data.label(end) = 'MEG1133'; > > > > and > > > > ref_lay.label(end) = 'MEG2643'; > > > > > > Does anyone know why this happens and how this can be avoided or > > compensated? I am guessing that later on in the analysis pipeline this > > can become problematic as the mapping between the new labels and the > > spatial coordinates does not correspond anymore. > > > > Any help or suggestions would be highly appreciated! > > > > Thanks, > > Fred > > > > -- > > Frédéric Roux > > Postdoctoral Scientist > > f.roux at bcbl.eu > > Tel: +34 943 309 300 Ext 211 > > Fax: +34 943 309 052 > > > > Legal disclaimer/Aviso legal/Lege-oharra: www.bcbl.eu/legal-disclaimer > > ---------------------------------------------------------------------- > > ----- > > > > > > > > _______________________________________________ > > fieldtrip mailing list > > fieldtrip at donders.ru.nl > > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From michelic72 at gmail.com Tue Mar 10 17:23:26 2015 From: michelic72 at gmail.com (Cristiano Micheli) Date: Tue, 10 Mar 2015 17:23:26 +0100 Subject: [FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline' In-Reply-To: <54FD1A71.3070508@gmail.com> References: <54FD1A71.3070508@gmail.com> Message-ID: Dear Vitoria, how are you? The problem seems to lie in the definition of the sensors (first error message, which is encapsulated by the subsequent ones). What I noticed (but I fear I can't be more precise due to lack of information) is that you use two cfg definitions (cfg and cfgn) and that might create problems. On top of that I would always clean the actual cfg by nulling it at the beginning of every function call (cfg=[]). This avoids to carry around incompatible fields in sequential calls of different functions (which also require different cfg options). It would also help a lot if you included the call to ft_freqanalysis (again with an eye of regard of nulling the cfg beforehand). I hope this helps! Greetings from Oldenburg Cris On Mon, Mar 9, 2015 at 4:58 AM, Vitória Piai wrote: > Hi all, > > I'm interested in using Laplacian transformation prior to computing TFRs. > I still haven't read anything about the three methods implemented in > FieldTrip, I must confess, but I think my question is independent of that. > I'm using FT version: fieldtrip-20140801 on Matlab2014a. > > If I use the method 'spline', I can subsequently run ft_freqanalysis (or > ft_timelockanalysis for that matter). However, with either 'hjorth' or > 'finite', I get an error when running ft_freqanalysis/ft_timelockanalysis: > My cfg: > > cfgn.method = 'template'; > cfgn.layout = 'biosemi64.lay'; > cfg.neighbours = ft_prepare_neighbours(cfgn, dat); > > cfg.method = 'hjorth'; %'finite', 'spline' > cfg.elec = ft_read_sens('standard_1005.elc'); > lpc = ft_scalpcurrentdensity(cfg, dat); > % Then after that, a commonly used cfg for ft_freqanalysis > > Error using ft_datatype_sens (line 375) > inconsistent number of channels in sensor description > > Error in ft_datatype_raw (line 138) > data.elec = ft_datatype_sens(data.elec); > > Error in ft_checkdata (line 219) > data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); > > Error in ft_freqanalysis (line 211) > data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, > 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); > > I understand that the "inconsistent number of channels in sensor > description" is coming from these two other implementations, but should > that be the case? The help on ft_scalpcurrentdensity says " The output data > has the same format as the input and can be used in combination with most > other FieldTrip functions". So I'm wondering whether there's something > special intrinsic to these implementations, I'm using a too old FT version, > my config isn't right, or this is an issue that has gone unnoticed because > those implementations are not used often. > > Thanks a lot! > Cheers from Berkeley, > Vitoria > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Tue Mar 10 20:56:55 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Tue, 10 Mar 2015 12:56:55 -0700 Subject: [FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline' In-Reply-To: References: <54FD1A71.3070508@gmail.com> Message-ID: <54FF4C87.5030402@gmail.com> Thank you, Cris. > What I noticed (but I fear I can't be more precise due to lack of > information) is that you use two cfg definitions (cfg and cfgn) and > that might create problems. One of them (cfgn) is only being used to define neighbours, so I don't think that matters. > On top of that I would always clean the actual cfg by nulling it at > the beginning of every function call (cfg=[]). I always do this, only didn't paste that part of my code to have it occupying less space. So that isn't the problem either. > It would also help a lot if you included the call to ft_freqanalysis > (again with an eye of regard of nulling the cfg beforehand). I doubt it's the cfg in ft_freqanalysis that is causing the problem - it's the same cfg I've been using for 5 years now, and in line with the one shown in the tutorial. So unfortunately, not the solution either. The key is in the computation of the scd depending on the method. The error only occurs with 'hjorth' and 'finite', but not with 'spline'. Maybe I should just read more on these three methods before I try to advance any further. Thanks anyways, Vitoria > On Mon, Mar 9, 2015 at 4:58 AM, Vitória Piai > > wrote: > > Hi all, > > I'm interested in using Laplacian transformation prior to > computing TFRs. > I still haven't read anything about the three methods implemented > in FieldTrip, I must confess, but I think my question is > independent of that. I'm using FT version: fieldtrip-20140801 on > Matlab2014a. > > If I use the method 'spline', I can subsequently run > ft_freqanalysis (or ft_timelockanalysis for that matter). However, > with either 'hjorth' or 'finite', I get an error when running > ft_freqanalysis/ft_timelockanalysis: > My cfg: > > cfgn.method = 'template'; > cfgn.layout = 'biosemi64.lay'; > cfg.neighbours = ft_prepare_neighbours(cfgn, dat); > > cfg.method = 'hjorth'; %'finite', 'spline' > cfg.elec = ft_read_sens('standard_1005.elc'); > lpc = ft_scalpcurrentdensity(cfg, dat); > % Then after that, a commonly used cfg for ft_freqanalysis > > Error using ft_datatype_sens (line 375) > inconsistent number of channels in sensor description > > Error in ft_datatype_raw (line 138) > data.elec = ft_datatype_sens(data.elec); > > Error in ft_checkdata (line 219) > data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); > > Error in ft_freqanalysis (line 211) > data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, > 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); > > I understand that the "inconsistent number of channels in sensor > description" is coming from these two other implementations, but > should that be the case? The help on ft_scalpcurrentdensity says " > The output data has the same format as the input and can be used > in combination with most other FieldTrip functions". So I'm > wondering whether there's something special intrinsic to these > implementations, I'm using a too old FT version, my config isn't > right, or this is an issue that has gone unnoticed because those > implementations are not used often. > > Thanks a lot! > Cheers from Berkeley, > Vitoria > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Tue Mar 10 21:47:47 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Tue, 10 Mar 2015 20:47:47 +0000 Subject: [FieldTrip] ft_scalpcurrentdensity methods + error if method is not 'spline' In-Reply-To: <54FF4C87.5030402@gmail.com> References: <54FD1A71.3070508@gmail.com> <54FF4C87.5030402@gmail.com> Message-ID: <9906653C-1E7B-4EEA-907D-C3EC1EC7EC0D@fcdonders.ru.nl> Hi Vitoria, Could you first download a newer version of FieldTrip, e.g. 20150309 :-), and see if the problem is replicated with this version? I think it will persist, but it would be good to know for sure, otherwise we may be tackling problems that are not problems anymore. Note that the low level function ft_datatype_sens throws an informative error, occurring on line 375. You may want to try to do a ‘dbstop if error’ to investigate it in a bit more detail. I suspect an ‘inconsistent number of channels in the sensor description’ :-). The reason why it may fail with the ‘spline’ method, and not with the other methods is probably that the former requires a description of the electrode positions, whereas the the latter methods only need a description of the neighbours for each electrode. Best, Jan-Mathijs On Mar 10, 2015, at 8:56 PM, Vitoria Piai > wrote: Thank you, Cris. What I noticed (but I fear I can't be more precise due to lack of information) is that you use two cfg definitions (cfg and cfgn) and that might create problems. One of them (cfgn) is only being used to define neighbours, so I don't think that matters. On top of that I would always clean the actual cfg by nulling it at the beginning of every function call (cfg=[]). I always do this, only didn't paste that part of my code to have it occupying less space. So that isn't the problem either. It would also help a lot if you included the call to ft_freqanalysis (again with an eye of regard of nulling the cfg beforehand). I doubt it's the cfg in ft_freqanalysis that is causing the problem - it's the same cfg I've been using for 5 years now, and in line with the one shown in the tutorial. So unfortunately, not the solution either. The key is in the computation of the scd depending on the method. The error only occurs with 'hjorth' and 'finite', but not with 'spline'. Maybe I should just read more on these three methods before I try to advance any further. Thanks anyways, Vitoria On Mon, Mar 9, 2015 at 4:58 AM, Vitória Piai > wrote: Hi all, I'm interested in using Laplacian transformation prior to computing TFRs. I still haven't read anything about the three methods implemented in FieldTrip, I must confess, but I think my question is independent of that. I'm using FT version: fieldtrip-20140801 on Matlab2014a. If I use the method 'spline', I can subsequently run ft_freqanalysis (or ft_timelockanalysis for that matter). However, with either 'hjorth' or 'finite', I get an error when running ft_freqanalysis/ft_timelockanalysis: My cfg: cfgn.method = 'template'; cfgn.layout = 'biosemi64.lay'; cfg.neighbours = ft_prepare_neighbours(cfgn, dat); cfg.method = 'hjorth'; %'finite', 'spline' cfg.elec = ft_read_sens('standard_1005.elc'); lpc = ft_scalpcurrentdensity(cfg, dat); % Then after that, a commonly used cfg for ft_freqanalysis Error using ft_datatype_sens (line 375) inconsistent number of channels in sensor description Error in ft_datatype_raw (line 138) data.elec = ft_datatype_sens(data.elec); Error in ft_checkdata (line 219) data = ft_datatype_raw(data, 'hassampleinfo', hassampleinfo); Error in ft_freqanalysis (line 211) data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'}, 'feedback', cfg.feedback, 'hassampleinfo', 'yes'); I understand that the "inconsistent number of channels in sensor description" is coming from these two other implementations, but should that be the case? The help on ft_scalpcurrentdensity says " The output data has the same format as the input and can be used in combination with most other FieldTrip functions". So I'm wondering whether there's something special intrinsic to these implementations, I'm using a too old FT version, my config isn't right, or this is an issue that has gone unnoticed because those implementations are not used often. Thanks a lot! Cheers from Berkeley, Vitoria _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip _______________________________________________ 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 elam4hcp at gmail.com Tue Mar 10 22:54:24 2015 From: elam4hcp at gmail.com (Jennifer Elam) Date: Tue, 10 Mar 2015 16:54:24 -0500 Subject: [FieldTrip] 2015 HCP Course: Faculty, Schedule, and Flyer available now Message-ID: Faculty listings and the full schedule of covered topics are now available for the 2015 HCP Course: “Exploring the Human Connectome”, to be held June 8-12 at the Marriott Resort Waikiki Beach, in Honolulu, Hawaii, USA. This 5-day intensive course is designed for those interested in: - using data being collected and distributed by HCP - acquiring and analyzing HCP-style imaging and behavioral data at your own institution - processing your own non-HCP data using HCP pipelines and methods - learning to use Connectome Workbench tools and the CIFTI connectivity data format - learning HCP multi-modal neuroimaging analysis methods, including those that combine MEG and MRI data - positioning yourself to capitalize on HCP-style data from forthcoming large-scale projects (e.g., Lifespan HCP and Connectomes Related to Human Disease Please share with your colleagues and visit the HCP Course website to register and download a course flyer for posting. We hope to see you in Hawaii! Best, 2015 HCP Course Organizers -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Tue Mar 10 23:58:36 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Tue, 10 Mar 2015 15:58:36 -0700 Subject: [FieldTrip] ft_channelrepair only for certain trials: repaired data only contain those certain trials In-Reply-To: <003101d05b43$801dd6c0$80598440$@artinis.com> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> Message-ID: <54FF771C.70905@gmail.com> Hi all, I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 09:33:28Z) to repair bad channels. I wanted to do it only for certain trials, and when I saw the option cfg.trials, I was really happy. However, if I pass cfg.trials with a vector rather than 'all', then the function does: ft_selectdata (lines 104, 108), then from line 352 onwards, things are converted back to normal. But if the cfg contained only some trials (as I'm trying to use it for), these are not restored back, and so I'm left with a data structure that only has as many trials as my cfg had. I was just wondering whether that is the expected behaviour of ft_channelrepair and that I should restore things myself (presumably with ft_append-like functions). If so, it would be nice if the help on this function would say that... If I'm simply using a too old version, my apologies. (I should start working with github, I know!!) Thanks a lot, Vitoria From russgport at gmail.com Wed Mar 11 02:40:57 2015 From: russgport at gmail.com (russ port) Date: Tue, 10 Mar 2015 21:40:57 -0400 Subject: [FieldTrip] low rank for post MaxFilter'd data Message-ID: <7AC9465A-FC5B-45F0-8156-085180D79DA5@gmail.com> Dear Fieldtrippers I have question about post MaxFiltered data and ICA analysis. Following the excellent chain http://mailman.science.ru.nl/pipermail/fieldtrip/2013-March/006270.html I used the command rank(squeeze(data.trial{1}) * squeeze(data.trial{1})') my result is 6 (not the 60 I would normally expect out of Max Filter’d data While I am using slightly different settings than default on MaxFilter (TSSS, .9 correlation and 10 second buffer, removing of popping channels), I am not sure that this would account for the issue. Has anyone else ran into a similar problem/am I doing something that would easily account for this. As for fieldtrip, I have simply read in the data and rejected jumping or muscle artifacts. - Best, Russ -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Mar 11 08:32:12 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 11 Mar 2015 08:32:12 +0100 Subject: [FieldTrip] ft_channelrepair only for certain trials: repaired data only contain those certain trials In-Reply-To: <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitoria, Yes, that is the expected behaviour of ft_channelrepair, because that is consistent with all other functions supporting a cfg.trials-option (i.e. select first, then do the work on what remains). It should be quite straightforward to do something like: cfg = []; cfg.trials = goodtrials; dat1 = ft_selectdata(cfg, data); cfg = []; ... cfg.trials = badtrials; dat2 = ft_channelrepair(cfg, data); datcmb = ft_appenddata([], dat1, dat2); to achieve what you want. Groetjes, Eelke On 10 March 2015 at 23:58, Vitoria Piai wrote: > Hi all, > > I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 > 09:33:28Z) to repair bad channels. I wanted to do it only for certain > trials, and when I saw the option cfg.trials, I was really happy. > However, if I pass cfg.trials with a vector rather than 'all', then the > function does: > ft_selectdata (lines 104, 108), > then from line 352 onwards, things are converted back to normal. > But if the cfg contained only some trials (as I'm trying to use it for), > these are not restored back, and so I'm left with a data structure that > only has as many trials as my cfg had. > > I was just wondering whether that is the expected behaviour of > ft_channelrepair and that I should restore things myself (presumably > with ft_append-like functions). If so, it would be nice if the help on > this function would say that... > If I'm simply using a too old version, my apologies. (I should start > working with github, I know!!) > > Thanks a lot, > Vitoria > > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From berryv.dberg at gmail.com Wed Mar 11 10:45:07 2015 From: berryv.dberg at gmail.com (berry van den berg) Date: Wed, 11 Mar 2015 10:45:07 +0100 Subject: [FieldTrip] Pre-stimulus baseline correction for response-locked ERPs In-Reply-To: <54FEDFEB.2080904@gmail.com> References: <54FEDFEB.2080904@gmail.com> Message-ID: Dear Marijke, I dont think there is a fiedltrip function to do this but I could be wrong. There are two alternatives that you can do. First, the easy solution, which might not work for your paradigm: if I make a response locked ERP I usually ensure that only trials with an RT between 200 and 1200ms (for a lot of tasks this is a reasonable criteria - 200ms is unreasonable fast and 1200 is way too slow). You can then do a baseline correction of [-1.4-1.2], which would ensure that there is no stimulus evoked activity in your baseline period. The second solution requires looping over your trials and subtracting a custom baseline for each trial, something like this: % rts is a 1*ntrials matrix containing the rt for each trial in seconds for iTrial = 1:length(rts) % take the mean of the data for each channel prior to stimulus onset (based on rts), replicate this matrix until the size of your original data and subtract these mean values from your original epoch tmp = repmat(mean(data.trial{iTrial}(:,data.time{iTrial}<-1*rts(iTrail) & data.time{iTrial}>-1*rts(iTrail)-0.2),2),1,length(data.time{iTrial})) data.trial{iTrial} = data.trial{iTrial} - tmp; end I hope that this helps! Berry van den Berg On 10 March 2015 at 13:13, Marijke Beulen wrote: > Dear all, > > I was wondering if anyone knows how to define a stimulus-locked baseline period to correct a response-locked ERP using ft_timelockbaseline. > > So far, I've been plotting stimulus-locked ERPs and using ft_timelockbaseline with the 300ms before stimulus onset for baseline correction. I've tried other methods to do baseline correction manually, but so far, ft_timelockbaseline has given me the best results. However, now I also want to plot response-locked ERPs. To keep things comparable, I would like to use the same 300ms pre-stimulus interval for baseline correction, but my trials have different lengths. This means that after response-locking the data, the time stamp of that interval is different on every trial. Is there any way to e.g. define separate baseline windows for each trial or to give FieldTrip another (stimulus-locked) dataset to use as a baseline in ft_timelockbaseline? > > I've already searched through FieldTrip's documentation, but I haven't been able to find a solution. Any advice on how to do this would be much appreciated! > > Sincerely, > > Marijke Beulen > > -- > M.A. Beulen, MSc. > PhD student at University of Groningen, dept. Artificial Intelligence > Bernoulliborg, room 320 > Nijenborgh 9 > 9747 AG Groningen > The Netherlands > Phone: +31 50 363 6915m.a.beulen at rug.nl > > > _______________________________________________ > 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 cmuehl at gmail.com Wed Mar 11 16:39:01 2015 From: cmuehl at gmail.com (Christian Muehl) Date: Wed, 11 Mar 2015 15:39:01 +0000 Subject: [FieldTrip] Call for Papers - 4th Workshop on Affective Brain-Computer Interfaces @ ACII2015 Message-ID: <21b626aaf0b94fa0924944d11a05fd9f@EXPRD01.hosting.ru.nl> ** Call for Papers ** 4th Workshop on Affective Brain-Computer Interfaces (aBCI) Workshop at ACII 2015 (September 21-24), Xi'an, China, September 21, 2015 http://www.affective-sciences.org/aBCI2015 http://www.acii2015.org/ The goal of the aBCI workshop series is to connect researchers from the communities of affective computing, social signal processing, brain-computer interfacing, neuro-ergonomics, and neuroscience around the federating theme of affective brain computer interfaces (aBCI). Affective BCI aim at the development of human-computer interfaces able to react and adapt to users' emotions and related cognitive states as measured from neurophysiological signals. Besides the general solicitation of work toward adaptive HCI applications based on aBCI, this 4th edition of the workshop will focus on two specific aspects of aBCI. Firstly, we welcome papers on ways to alleviate current aBCI limitations, through work on the physiological basis of aBCI, innovative applications resilient to classification error, and methods to increase the robustness of aBCI. Secondly, we would like to explore the social aspects and applications of aBCI by welcoming submissions on topics such as multi-user aBCI and the assessment of social processes from brain signals. The workshop topics include, but are not limited to, * effective emotion elicitation and data collection in social settings; * identification of robust and specific markers of emotional, cognitive and social processes; * methods for the assessment of emotions, cognitive states and social interactions; * methods to measure and process multiple people physiological activity; * applications of central and peripheral signal processing to social situations; * innovative concepts for adaptive interfaces and affective BCI; * demos of affective BCI systems. Submission Instructions: * The papers should feature original empirical work, theoretical work, or a well defendable but arguable position of the authors. * Papers will be published electronically in the proceedings of ACII 2015 by IEEE Xplore. Papers should be limited to 6 pages+1page references. The review is double blind - please remove all author information from the manuscripts. * Further details about the submission instructions and format can be found on the website of ACII 2015. Important Dates: June 5, 2015: Submission of manuscripts July 3, 2015: Acceptance/Rejection notification July 24, 2015: Submission of camera-ready papers September 21, 2015: Date of the Workshop For further information, see our website or contact abci at ewi.utwente.nl Programme Chairs: * Fabien Lotte, Inria Sud-Ouest, Bordeaux, France * Guilliaume Chanel, Swiss Center for Affective Sciences, Geneva, Switzerland * Christian Mühl, German Aerospace Center, Cologne, Germany * Anton Nijholt, Universiteit Twente, the Netherlands Programme Committee: Egon L. van den Broek, University of Utrecht, the Netherlands Anne-Marie Brouwer, TNO Perceptual and Cognitive Systems, Soesterberg, the Netherlands Stephen Dunne, Starlab Barcelona, Spain Touradj Ebrahimi, École polytechnique fédérale de Lausanne, Switzerland Stephen Fairclough, John Moores University, Liverpool, UK Tiago H. Falk, Institut National de la Recherche Scientifique (INRS), Montreal, Canada Hayrettin Gürkök, University of Twente, Enschede, the Netherlands Dominic Heger, Karlsruhe Institute of Technology, Germany Klaas Ihme, German Aerospace Center, Brunswick, Germany Jonghwa Kim, University of Augsburg, Germany Brent Lance, Army Research Laboratory/TNB, Aberdeen Proving Ground, USA, Grace Leslie, MIT Media Lab, Boston, USA Giulia Liberati, Université catholique de Louvain, Belgium Gary Garcia Molina, Philips Research North America, Briarcliff, USA Scott Makeig, University of California San Diego, USA Tim Mullen, University of California San Diego, USA Domen Novak, University of Wyoming, Laramie, USA Ioannis Patras, Queen Mary University, London, UK Evan Peck, Bucknell University, Lewisburg, USA Mannes Poel, University of Twente, Enschede, the Netherlands Thierry Pun, University of Geneva, Switzerland Erin Solovey, Drexel University, Philadelphia, USA Mohammad Soleymani, University of Geneva, Switzerland Aureli Soria-Frisch, Starlab Barcelona, Spain Olga Sourina, NanYang Technological University, Singapore Aleksander Valjamae, Linköping University, Sweden Jan van Erp, University of Twente, Enschede, the Netherlands Chi Thanh Vi, University of Bristol, UK Thorsten Zander, Technische Universität Berlin, Germany From emr37 at cam.ac.uk Thu Mar 12 09:42:45 2015 From: emr37 at cam.ac.uk (Emily Ruzich) Date: Thu, 12 Mar 2015 08:42:45 +0000 Subject: [FieldTrip] Creative use of ft_multiplotER? Message-ID: Hi All, PhD student and first-time fieldtripper here. I have a question about plotting grand averages using multiplot. I've done a bit of a cheat (I think), as I'm actually interested in measures of complexity, and so for each of my subjects I've taken the timecourse data for a 60-second interval and performed an MSE calculation before overwriting the data.time and data.trial matrices. These plot just fine using: cfg = []; cfg.layout = 'biosemi64.lay'; figure(1); clf; ft_multiplotER(cfg, data); But I'm running into trouble when I try to perform some group comparisons. I'm able to average across subjects (using the standard matlab mean function; I've tried timelockgrandaverage and timelockanalysis, but I think as this isn't actually timelock data, I get errors), and I am able to plot one group average using the same code as above, but when I try overlaying an additional group to the plotting function, I get the following error: ft_multiplotER(cfg, data, data2); Error using horzcat Dimensions of matrices being concatenated are not consistent. Error in ft_multiplotER (line 516) xmin = min([xmin varargin{i}.(xparam)]); This is the case even when the two "data" inputs are identical (eg: ft_multiplotER(cfg, data2, data2)). I've also tried using "hold on" but haven't had success with this either. I would very much appreciate it if you could please let me know if what I am trying to accomplish is even possible using ft (or at least, that it is not strongly discouraged) - I hope this question is not overly trivial! Please let me know if there is any additional information I can provide. Thank you very much for your time. Best, Emily --- Emily M Ruzich PhD Candidate Department of Psychiatry University of Cambridge Douglas House 18b Trumpington Rd Cambridge CB2 8AH Tel: 01223 746 123 Mobile: 07761 010 091 Email: emr37 at cam.ac.uk | emily.ruzich at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From yanina.prystauka at studenti.unitn.it Fri Mar 13 04:44:16 2015 From: yanina.prystauka at studenti.unitn.it (Yanina Prystauka) Date: Fri, 13 Mar 2015 04:44:16 +0100 Subject: [FieldTrip] ft_artifact_threshold Message-ID: Dear all, I would like to automatically remove trials in which the min or max of the signal exceeds 100 uv/T. So I am planning to use the ft_artifact_threshold on the preprocessed data. After running the following code cfg = []; cfg.continuous = 'no'; cfg.trl = 'dataRejBrows.sampleinfo'; * %I am not sure how to specify the cfg.trl since I already have the epochs I am interested in; someone on the mailing list has suggested earlier to use the .sampleinfo parameter.* cfg.artfctdef.threshold.min = -100; cfg.artfctdef.threshold.max = 100; [cfg, artifact] = ft_artifact_threshold(cfg, dataRejBrows); I get the following error message: Index exceeds matrix dimensions. Error in ft_artifact_threshold (line 149) dat = ft_fetch_data(data, 'header', hdr, 'begsample', cfg.trl(trlop,1), 'endsample', cfg.trl(trlop,2), 'chanindx', channelindx, 'checkboundary', strcmp(cfg.continuous, 'no')); Error in reject_artifacts (line 59) [cfg, withinhundred] = ft_artifact_threshold(cfg, dataAllRight); I will appreciate any suggestions on how to proceed with this function! Kind regards, Yanina -------------- next part -------------- An HTML attachment was scrubbed... URL: From christophe.grova at mcgill.ca Fri Mar 13 14:25:52 2015 From: christophe.grova at mcgill.ca (Christophe Grova) Date: Fri, 13 Mar 2015 13:25:52 +0000 Subject: [FieldTrip] Call For Papers: Special issue: Simulation and Validation in Brain Image Analysis to appear in Computational Intelligence and Neuroscience Message-ID: <9E1647EDA3EBB44AADA162CEC4C4222E750DBE80@exmbx2010-9.campus.MCGILL.CA> Call for papers Special issue: Simulation and Validation in Brain Image Analysis to appear in Computational Intelligence and Neuroscience http://www.hindawi.com/journals/cin/si/980531/cfp/ Manuscript Due Friday, 10 July 2015 First Round of Reviews Friday, 2 October 2015 Publication Date Friday, 27 November 2015 This special issue seeks to solicit original research articles as well as review articles on the development of advanced validation methodologies for brain imaging (fMRI, MRI, EEG, MEG, and PET) as well as the applications of such methodologies to evaluate data analysis algorithms. It also covers image databases for method validation purposes and computational (neuroinformatics) aspects of the method validation. Potential topics include, but are not limited to: * Brain image simulation in PET, EEG, MEG, fMRI, and MRI * Modeling ground-truth in image simulation and the development of valid and realistic simulation models * Methodologies for method validation in brain imaging (not necessarily to be simulation-based) * Databases for method validation (with a demonstration of their potential usage) * Validation studies of data analysis methods in brain imaging * Studies demonstrating the value of quantitative validation in brain imaging Authors can submit their manuscripts via the Manuscript Tracking System at http://mts.hindawi.com/submit/journals/cin/vabi/. Lead Guest Editor * Jussi Tohka, Universidad Carlos III de Madrid, Spain; Tampere University of Technology, Tampere, Finland Guest Editors * Pierre L. Bellec, Universite de Montreal, Montreal, Canada * Christophe Grova, Concordia University, Montreal, Canada * Anthonin Reilhac, CERMEP, Bron, France *************************** Christophe Grova, PhD Assistant Professor, Physics Dpt, Concordia University PERFORM centre, Concordia University Adjunct Prof in Biomedical Engineering, and Neurology and Neurosurgery Dpt, McGill University Multimodal Functional Imaging Lab (Multi FunkIm) Montreal Neurological Institute - epilepsy group Centre de Recherches en Mathématiques Physics Dpt Concordia University - Loyola Campus - Office SP 365.12 7141 Sherbrooke Street West, Montreal, QC H4B 1R6 Phone: (514) 848-2424 ext.4221 Biomedical Engineering Department McGill University - Room 304 3775 University Street, Montreal, Quebec, Canada, H3A 2B4 Phone : (514) 398 2516 Fax : (514) 398 7461 email : christophe.grova at concordia.ca , christophe.grova at mcgill.ca web: Physics, Concordia University: http://physics.concordia.ca/facultyandresearch/bios/grova.php McGill University: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/PeopleChristophe MultiFunkIm Lab: http://www.bic.mni.mcgill.ca/ResearchLabsMFIL/HomePage *************************** [X] -------------- next part -------------- An HTML attachment was scrubbed... URL: From emr37 at cam.ac.uk Fri Mar 13 14:27:14 2015 From: emr37 at cam.ac.uk (Emily Ruzich) Date: Fri, 13 Mar 2015 13:27:14 +0000 Subject: [FieldTrip] question about using ft_multiplot for my own needs Message-ID: <4bc220415d904cd98d5242bb66eb4d95@EXPRD01.hosting.ru.nl> Hello, Apologies, I've just come across a question you asked to the FieldTrip list several years ago and was wondering if you ever got a solution to customisation of multiplot? Thanks! Best, Emily --- Emily M Ruzich PhD Candidate Department of Psychiatry University of Cambridge Douglas House 18b Trumpington Rd Cambridge CB2 8AH Tel: 01223 746 123 Mobile: 07761 010 091 Email: emr37 at cam.ac.uk | emily.ruzich at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.piai.research at gmail.com Fri Mar 13 16:35:05 2015 From: v.piai.research at gmail.com (=?windows-1252?Q?Vit=F3ria_Piai?=) Date: Fri, 13 Mar 2015 08:35:05 -0700 Subject: [FieldTrip] ft_channelrepair only for certain trials: repaired data only contain those certain trials In-Reply-To: References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> Message-ID: <550303A9.5070705@gmail.com> Thanks, Eelke! I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. Thanks a lot, Hope all is well in Nijmegen!! On 3/11/2015 12:32 AM, Eelke Spaak wrote: > Hi Vitoria, > > Yes, that is the expected behaviour of ft_channelrepair, because that > is consistent with all other functions supporting a cfg.trials-option > (i.e. select first, then do the work on what remains). > > It should be quite straightforward to do something like: > > cfg = []; > cfg.trials = goodtrials; > dat1 = ft_selectdata(cfg, data); > > cfg = []; > ... > cfg.trials = badtrials; > dat2 = ft_channelrepair(cfg, data); > > datcmb = ft_appenddata([], dat1, dat2); > > to achieve what you want. > > Groetjes, > Eelke > > On 10 March 2015 at 23:58, Vitoria Piai wrote: >> Hi all, >> >> I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 >> 09:33:28Z) to repair bad channels. I wanted to do it only for certain >> trials, and when I saw the option cfg.trials, I was really happy. >> However, if I pass cfg.trials with a vector rather than 'all', then the >> function does: >> ft_selectdata (lines 104, 108), >> then from line 352 onwards, things are converted back to normal. >> But if the cfg contained only some trials (as I'm trying to use it for), >> these are not restored back, and so I'm left with a data structure that >> only has as many trials as my cfg had. >> >> I was just wondering whether that is the expected behaviour of >> ft_channelrepair and that I should restore things myself (presumably >> with ft_append-like functions). If so, it would be nice if the help on >> this function would say that... >> If I'm simply using a too old version, my apologies. (I should start >> working with github, I know!!) >> >> Thanks a lot, >> Vitoria >> >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From widmann at uni-leipzig.de Fri Mar 13 14:04:22 2015 From: widmann at uni-leipzig.de (Andreas Widmann) Date: Fri, 13 Mar 2015 14:04:22 +0100 Subject: [FieldTrip] [MMN 2015] Reminder - Abstract Submission Deadline: March 31 Message-ID: <60D9B9F9-DCC2-4ECD-BF75-F4C00AA4D765@uni-leipzig.de> Dear Colleague, This is a reminder that the deadline for abstract submission and early-bird registration for the MMN 2015 is March 31. The conference, "Error Signals from the Brain - 7th Mismatch Negativity Conference (MMN 2015)", will be held at the University of Leipzig, Germany, from 8-11 September 2015. The preliminary program is now available and can be viewed in the attached flyer and on the webpage. The conference will feature experts from the field of MMN research and beyond. Three Keynote Lectures (http://event.uni-leipzig.de/mmn2015/program/keynotes.php) and 13 Symposia (http://event.uni-leipzig.de/mmn2015/program/symposia.php) will cover a broad range of topics from attention, perception, and language to computational models, clinical applications, and development. There will be two hands-on pre-conference workshops on methodological aspects of MMN research and on the visual MMN. Further it is a great opportunity to visit Leipzig - a European city which is rich in intellectual, musical, and architectural heritage. Poster abstract submission and early-bird registration will be possible until 31 March 2015 here: https://event.uni-leipzig.de/mmn2015/ We look forward to welcoming you in Leipzig for an inspiring MMN 2015 conference. Kind regards, Erich Schröger and the organization team -- Error Signals from the Brain - 7th Mismatch Negativity Conference (MMN 2015) University of Leipzig, 8-11 September 2015 Web: https://event.uni-leipzig.de/mmn2015/ Email: mmn2015 at uni-leipzig.de _______________________________________________________________________________ Important dates: Abstract Submission deadline: March 31, 2015 Early-bird Registration deadline: March 31, 2015 _______________________________________________________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: Flyer_MMN2015.pdf Type: application/pdf Size: 825090 bytes Desc: not available URL: From jan.schoffelen at donders.ru.nl Fri Mar 13 17:08:35 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 13 Mar 2015 16:08:35 +0000 Subject: [FieldTrip] ft_channelrepair only for certain trials: repaired data only contain those certain trials In-Reply-To: <550303A9.5070705@gmail.com> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> <550303A9.5070705@gmail.com> Message-ID: Hi V, Note that you can use the trialinfo field in your data for bookkeeping, e.g. (assuming there is already such field in your data) data.trialinfo(:,end+1) = (1:numel(data.trial))’; cfg = []; cfg.trials = sel_to_be_repaired; cfg.etc data1 = ft_channelrepair(cfg,data); cfg = []; cfg.trials = sel_to_be_unrepaired data2 = ft_selectdata(cfg, data); data = ft_appenddata([],data1,data2); Although the order has now been changed, you’ll see that the last column of the trialinfo field still pertains to your original trial indices. JM On Mar 13, 2015, at 4:35 PM, Vitória Piai wrote: > Thanks, Eelke! > > I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. > > Thanks a lot, > Hope all is well in Nijmegen!! > > On 3/11/2015 12:32 AM, Eelke Spaak wrote: >> Hi Vitoria, >> >> Yes, that is the expected behaviour of ft_channelrepair, because that >> is consistent with all other functions supporting a cfg.trials-option >> (i.e. select first, then do the work on what remains). >> >> It should be quite straightforward to do something like: >> >> cfg = []; >> cfg.trials = goodtrials; >> dat1 = ft_selectdata(cfg, data); >> >> cfg = []; >> ... >> cfg.trials = badtrials; >> dat2 = ft_channelrepair(cfg, data); >> >> datcmb = ft_appenddata([], dat1, dat2); >> >> to achieve what you want. >> >> Groetjes, >> Eelke >> >> On 10 March 2015 at 23:58, Vitoria Piai wrote: >>> Hi all, >>> >>> I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 >>> 09:33:28Z) to repair bad channels. I wanted to do it only for certain >>> trials, and when I saw the option cfg.trials, I was really happy. >>> However, if I pass cfg.trials with a vector rather than 'all', then the >>> function does: >>> ft_selectdata (lines 104, 108), >>> then from line 352 onwards, things are converted back to normal. >>> But if the cfg contained only some trials (as I'm trying to use it for), >>> these are not restored back, and so I'm left with a data structure that >>> only has as many trials as my cfg had. >>> >>> I was just wondering whether that is the expected behaviour of >>> ft_channelrepair and that I should restore things myself (presumably >>> with ft_append-like functions). If so, it would be nice if the help on >>> this function would say that... >>> If I'm simply using a too old version, my apologies. (I should start >>> working with github, I know!!) >>> >>> Thanks a lot, >>> Vitoria >>> >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From vahidgerami.mse at gmail.com Sun Mar 15 19:16:16 2015 From: vahidgerami.mse at gmail.com (vahid gerami) Date: Sun, 15 Mar 2015 21:46:16 +0330 Subject: [FieldTrip] ERP extraction from EDF file Message-ID: hello every body. i have recorded a 12 channel eeg signals as EDF file. now i want to extract the ERP's and show them as a vector. can anybody help me doing ? any idea's? regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From elaine.astrand at mdh.se Mon Mar 16 08:56:09 2015 From: elaine.astrand at mdh.se (=?iso-8859-1?Q?Elaine_=C5strand?=) Date: Mon, 16 Mar 2015 07:56:09 +0000 Subject: [FieldTrip] Problem with retrieving the data and events in fieldtrip RDA interface of Brainvision recorder Message-ID: Hello all, I'm trying to stream EEG-data from Brainvision recorder software into the fieltrip buffer. While the data is transferred, the events are not transferred at all. I'm using "ft_realtime_brainampproxy.m" I noticed two things in the script: 1. Line 195 states 'Should I apply the calibration here?' What does this mean? Does this create a problem in retrieving the data? The data in the field trip buffer does not have the same range as in the recorder software. 2. Line 198-200. Here the events are not stored in the event-structure. So this is why the events are not transferred. Has anyone noticed the same problem? How did you implement the event structure? Thanks in advance. Kind regards, Elaine Åstrand, PhD Postdoc at University of Mälardalen Västerås, Sweden -------------- next part -------------- An HTML attachment was scrubbed... URL: From zsoltturi at gmail.com Mon Mar 16 10:08:53 2015 From: zsoltturi at gmail.com (Zsolt Turi) Date: Mon, 16 Mar 2015 10:08:53 +0100 Subject: [FieldTrip] how to add trigger values to cfg.trl Message-ID: Dear Fieldtrippers, I use ft_defintrial function to perform triger-based trial segmentation of cnt files recorded from the ANT EEG system. In the earlier version of FieldTrip (e.g., 20140123) the resulted cfg.trl matrix has a size of n x 4, where the last column represents trigger values. In the newer version of FT (e.g., 20150310), the resulted trl matrix contains only 3 columns and the 4th column about trigger values is missing. To note but maybe it is not important but I do not use the most recent version of Matlab (8.1.0.604, R2013a, student licence). Could anyone give me a hint how can I add the trigger values to the cfg.trl matrix (ie. to the 4th column)? My code is: cfg = []; cfg.dataset = '20150302_1454.cnt'; cfg.trialfun = 'ft_trialfun_general'; cfg.trialdef.prestim = 1.5; cfg.trialdef.poststim = 2.0; cfg.trialdef.eventtype = 'trigger'; cfg.trialdef.eventvalue = {'2','3'}; cfg = ft_definetrial(cfg); Many thanks in advance! Zsolt -------------- next part -------------- An HTML attachment was scrubbed... URL: From litvak.vladimir at gmail.com Mon Mar 16 12:04:13 2015 From: litvak.vladimir at gmail.com (Vladimir Litvak) Date: Mon, 16 Mar 2015 11:04:13 +0000 Subject: [FieldTrip] Fwd: [SPM] SPM course for MEG/EEG in London: May 11-13 In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Bernadette van Wijk Date: Sat, Mar 14, 2015 at 3:10 PM Subject: [SPM] SPM course for MEG/EEG in London: May 11-13 To: SPM at jiscmail.ac.uk Dear all, We are pleased to announce that our annual *SPM course for MEG/EEG* will take place this year from *Monday May 11* to *Wednesday May 13 2015*. Hosted by University College London, the course will be held at Queen Square, a very central location in London (UK). The course will present instruction on the analysis of MEG and EEG data. The first two days will combine theoretical presentations with practical demonstrations of the different data analysis methods implemented in SPM. On the last day participants will have the opportunity to work on SPM tutorial data sets under the supervision of the course faculty. We also invite students to bring their own data for analysis. The course is suitable for both beginners and more advanced users. The topics that will be covered range from pre-processing and statistical analysis to source localization and dynamic causal modelling. The program is listed below. Registration is now open. We offer a reduced rate when attending both the MEG/EEG course and the fMRI course during the second half of the week. For full details of both courses see 'Statistical Parametric Mapping short courses' at http://www.ucl.ac.uk/ion/courses-viewer where you can also register. Available places are limited so please register as early as possible if you would like to attend! *Monday May 11th * 9.00 - 9.30 Registration 9.30 - 9.45 SPM introduction and resources *Guillaume Flandin* 9.45 - 10.30 What are we measuring with M/EEG? *Stefan Kiebel* 10.30 - 11.15 Data pre-processing *Holly Rossiter* *Coffee* 11.45 - 12.30 Data pre-processing - demo *Deborah Talmi, Megumi Fukuda* 12.30 - 13.15 General linear model and classical inference *Christophe Phillips* *Lunch* 14.15 - 15.00 Multiple comparisons problem and solutions *Gareth Barnes* 15.00 - 15.45 Bayesian inference *Chris Mathys* *Coffee* 16.15 - 18.00 Tutorial on group M/EEG dataset analysis *Vladimir Litvak, Jason Taylor* *Tuesday May 12th * 9.30 - 10.15 M/EEG source analysis *Saskia Helbling* 10.15 - 11.15 M/EEG source analysis - demo *Jose Lopez, Jason Taylor, Sofie Meyer* *Coffee* 11.45 - 12.30 The principles of DCM *Ryszard Auksztulewicz* 12.30 - 13.15 DCM for evoked responses *Harriet Brown* *Lunch* 14.15 - 15.00 DCM for steady state responses *Rosalyn Moran* 15.00 - 15.45 DCM for time-frequency responses *Bernadette van Wijk* 15.45 - 16.30 DCM - demo *Andre Marreiros, Martin Dietz * *Coffee* 17.00 - 17.45 Bayesian model selection and averaging *Will Penny* 17.45 - 18.45 Clinic - Questions & Answers session *Karl Friston* 19.00 onwards - Social Event *Wednesday May 13th* 9.30 – 17.00 Practical hands-on session in UCL computer class rooms. Participants can either work on SPM tutorial datasets or on their own data with the help of the faculty. There will also be an opportunity to ask questions in small tutorial groups for further discussions on the topics of the lectures. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivano_triggiani at yahoo.it Mon Mar 16 17:07:31 2015 From: ivano_triggiani at yahoo.it (Ivano Triggiani) Date: Mon, 16 Mar 2015 16:07:31 +0000 (UTC) Subject: [FieldTrip] ERP extraction from EDF file In-Reply-To: References: Message-ID: <528586820.779615.1426522051894.JavaMail.yahoo@mail.yahoo.com> Dear Vahid we need more details. First, are that channels triggered? In this case, the trigger is another channel (with a square wave, or sinilar?). In that case you need, for instance, a personal function to segment the data into epoches. I can help you to write such a function, but I need information about the trigger.On the other hand, to export the ERP, maybe you will need another function to identify latency and amplitude, but this is a later step. Ivano ------------------------------------------------------------------------ "No man can wear one face to himself and another to the multitude, without finally getting bewildered as to which one is true." Nathaniel Hawthorne Il Lunedì 16 Marzo 2015 12:09, "fieldtrip-request at science.ru.nl" ha scritto: Send fieldtrip mailing list submissions to     fieldtrip at science.ru.nl To subscribe or unsubscribe via the World Wide Web, visit     http://mailman.science.ru.nl/mailman/listinfo/fieldtrip or, via email, send a message with subject or body 'help' to     fieldtrip-request at science.ru.nl You can reach the person managing the list at     fieldtrip-owner at science.ru.nl When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..." Today's Topics:   1. ERP extraction from EDF file (vahid gerami)   2. Problem with retrieving the data and events in fieldtrip RDA       interface of Brainvision recorder (Elaine ?strand)   3. how to add trigger values to cfg.trl (Zsolt Turi) ---------------------------------------------------------------------- Message: 1 Date: Sun, 15 Mar 2015 21:46:16 +0330 From: vahid gerami To: fieldtrip at science.ru.nl Subject: [FieldTrip] ERP extraction from EDF file Message-ID:     Content-Type: text/plain; charset="utf-8" hello every body. i have recorded a 12 channel eeg signals as EDF file. now i want to extract the ERP's and show them as a vector. can anybody help me doing ? any idea's? regards -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 2 Date: Mon, 16 Mar 2015 07:56:09 +0000 From: Elaine ?strand To: "fieldtrip at science.ru.nl" Subject: [FieldTrip] Problem with retrieving the data and events in     fieldtrip RDA interface of Brainvision recorder Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hello all, I'm trying to stream EEG-data from Brainvision recorder software into the fieltrip buffer. While the data is transferred, the events are not transferred at all. I'm using "ft_realtime_brainampproxy.m" I noticed two things in the script: 1. Line 195 states 'Should I apply the calibration here?' What does this mean? Does this create a problem in retrieving the data? The data in the field trip buffer does not have the same range as in the recorder software. 2. Line 198-200. Here the events are not stored in the event-structure. So this is why the events are not transferred. Has anyone noticed the same problem? How did you implement the event structure? Thanks in advance. Kind regards, Elaine ?strand, PhD Postdoc at University of M?lardalen V?ster?s, Sweden -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ Message: 3 Date: Mon, 16 Mar 2015 10:08:53 +0100 From: Zsolt Turi To: fieldtrip at science.ru.nl Subject: [FieldTrip] how to add trigger values to cfg.trl Message-ID:     Content-Type: text/plain; charset="utf-8" Dear Fieldtrippers, I use ft_defintrial function to perform triger-based trial segmentation of cnt files recorded from the ANT EEG system. In the earlier version of FieldTrip (e.g., 20140123) the resulted cfg.trl matrix has a size of n x 4, where the last column represents trigger values. In the newer version of FT (e.g., 20150310), the resulted trl matrix contains only 3 columns and the 4th column about trigger values is missing. To note but maybe it is not important but I do not use the most recent version of Matlab (8.1.0.604, R2013a, student licence). Could anyone give me a hint how can I add the trigger values to the cfg.trl matrix (ie. to the 4th column)? My code is: cfg                                  = []; cfg.dataset                      = '20150302_1454.cnt'; cfg.trialfun                      = 'ft_trialfun_general'; cfg.trialdef.prestim          = 1.5; cfg.trialdef.poststim        = 2.0; cfg.trialdef.eventtype        = 'trigger'; cfg.trialdef.eventvalue      = {'2','3'}; cfg                                  = ft_definetrial(cfg); Many thanks in advance! Zsolt -------------- next part -------------- An HTML attachment was scrubbed... URL: ------------------------------ _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip End of fieldtrip Digest, Vol 52, Issue 16 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Tue Mar 17 11:15:33 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Tue, 17 Mar 2015 11:15:33 +0100 Subject: [FieldTrip] website, ftp and bugzilla downtime Message-ID: Dear FieldTrip users As part of the renovation of the Donders building, the server room will be moved to another floor. The consequence is that the servers that are running the FieldTrip wiki, ftp and bugzilla will be switched off, disconnected, moved and switched on again. The move does not only involve the server hosting our website, but also our compute cluster, the large storage system and a whole bunch of other equipment, i.e. it involves moving about ten full-height 19” racks full with computers. You can imagine this to be quite some work for our ICT team. The exact downtime is hard to predict, but the whole procedure is planned for next Monday (23 March 7:00 CET) to next Wednesday. I realize that the lack of availability of the fieldtrip wiki and ftp server is inconvenient, hence we will try to keep them up and running by temporarily migrating these services to another location (outside the Donders building). Also this might come with a little bit of downtime, but it should be so short that hopefully you won't notice. We will also use the move to initiate the transition to a new domain “fieldtriptoolbox.org" which better reflects the contributions of all stakeholders to the project (not only the DCCN, which once started off as the F.C. Donders centre). The old addresses will continue to work for the time being, so you can use either the old fieldtrip.fcdonders.nl or the new www.fieldtriptoolbox.org. The FTP (for releases and tutorial data) will move from ftp.fcdonders.nl to ftp.fieldtriptoolbox.org. The bugzilla.fcdonders.nl and the svn.fcdonders.nl servers will NOT be kept running and will be down for a few days. Although FTP will continue to be available on ftp.fieldtriptoolbox.org, the updating of the daily releases will not happen for a few days. In case you need the latest version, you can always get them from svn or git (see 1). Also the editing capabilities on the wiki will have to be temporarily disabled during the actual migrations, which means that there is no “edit this page option” in the menu. best regards, Robert 1) http://www.fieldtriptoolbox.org/faq/i_am_having_problems_downloading_from_the_ftp_server From drivolta81 at gmail.com Tue Mar 17 14:30:17 2015 From: drivolta81 at gmail.com (Davide Rivolta) Date: Tue, 17 Mar 2015 13:30:17 +0000 Subject: [FieldTrip] Sournce - stat (beamforming) z-coordinates? Message-ID: <6d74f0aca4ea4d0da5457be7d393170f@EXPRD02.hosting.ru.nl> Dear all, I would have a quick question. How can I find out the z-coordinates of my figure as saved after running ft_sourceplot with 16 slices? See figure attached for an example where colors indicate t-values. Many thanks, Davide [Inline image 2] -- Davide Rivolta, PhD -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Source_stat.jpg Type: image/jpeg Size: 56842 bytes Desc: Source_stat.jpg URL: From dboratyn at u.northwestern.edu Tue Mar 17 16:41:36 2015 From: dboratyn at u.northwestern.edu (Daria Boratyn) Date: Tue, 17 Mar 2015 10:41:36 -0500 Subject: [FieldTrip] Decreased coherence at 60Hz? References: <2398393D-92D6-4BAF-8439-A4842B3A368B@u.northwestern.edu> Message-ID: Hi all, Using FieldTrip, I created bipolar montages on each hemisphere and then calculated the coherence between those. I am getting an odd result and seeing a decrease in coherence at 60Hz for some of my runs. My understanding is that 60 cycle noise should be picked up by every electrode and would therefore have high coherence values across the board. Would anyone have a suggestions as to what could be causing this? I’ve attached a screenshot of what I’m seeing. Thank you, Daria -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: coh.tiff Type: image/tiff Size: 129298 bytes Desc: not available URL: From stan.vanpelt at donders.ru.nl Tue Mar 17 17:02:53 2015 From: stan.vanpelt at donders.ru.nl (Pelt, S. van (Stan)) Date: Tue, 17 Mar 2015 16:02:53 +0000 Subject: [FieldTrip] Decreased coherence at 60Hz? In-Reply-To: References: <2398393D-92D6-4BAF-8439-A4842B3A368B@u.northwestern.edu> Message-ID: <7CCA2706D7A4DA45931A892DF3C2894C178C767D@exprd02.hosting.ru.nl> Hi Daria, As far as I know, signal power influences coherence measures. So, in your case, it might be that you have relatively large power and/or SNR differences between your electrodes, that might underlie your results. You might consider using a notch filter to filter the 60 Hz signal out, or stratifying your trials to compensate for SNR differences. 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 Daria Boratyn Sent: dinsdag 17 maart 2015 16:42 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Decreased coherence at 60Hz? Hi all, Using FieldTrip, I created bipolar montages on each hemisphere and then calculated the coherence between those. I am getting an odd result and seeing a decrease in coherence at 60Hz for some of my runs. My understanding is that 60 cycle noise should be picked up by every electrode and would therefore have high coherence values across the board. Would anyone have a suggestions as to what could be causing this? I've attached a screenshot of what I'm seeing. Thank you, Daria [cid:image001.png at 01D060D4.35440D90] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 64465 bytes Desc: image001.png URL: From hgould at memphis.edu Tue Mar 17 17:45:36 2015 From: hgould at memphis.edu (Herbert J Gould (hgould)) Date: Tue, 17 Mar 2015 16:45:36 +0000 Subject: [FieldTrip] Decreased coherence at 60Hz? In-Reply-To: <7CCA2706D7A4DA45931A892DF3C2894C178C767D@exprd02.hosting.ru.nl> References: <2398393D-92D6-4BAF-8439-A4842B3A368B@u.northwestern.edu> <7CCA2706D7A4DA45931A892DF3C2894C178C767D@exprd02.hosting.ru.nl> Message-ID: Using a steeply notched filter will distort your waveforms this looks like you might have had a significant impedance mismatch on several of your electrodes. Herbert jay Gould, Ph.D. School of Communication Sciences and Disorders The University of Memphis From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of Pelt, S. van (Stan) Sent: Tuesday, March 17, 2015 11:03 AM To: FieldTrip discussion list Subject: Re: [FieldTrip] Decreased coherence at 60Hz? Hi Daria, As far as I know, signal power influences coherence measures. So, in your case, it might be that you have relatively large power and/or SNR differences between your electrodes, that might underlie your results. You might consider using a notch filter to filter the 60 Hz signal out, or stratifying your trials to compensate for SNR differences. 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 Daria Boratyn Sent: dinsdag 17 maart 2015 16:42 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Decreased coherence at 60Hz? Hi all, Using FieldTrip, I created bipolar montages on each hemisphere and then calculated the coherence between those. I am getting an odd result and seeing a decrease in coherence at 60Hz for some of my runs. My understanding is that 60 cycle noise should be picked up by every electrode and would therefore have high coherence values across the board. Would anyone have a suggestions as to what could be causing this? I've attached a screenshot of what I'm seeing. Thank you, Daria [cid:image001.png at 01D060A8.18FB77D0] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 64465 bytes Desc: image001.png URL: From doriana.demarco at gmail.com Tue Mar 17 19:31:20 2015 From: doriana.demarco at gmail.com (Doriana De Marco) Date: Tue, 17 Mar 2015 19:31:20 +0100 Subject: [FieldTrip] source analysis on component data Message-ID: Dear community, I am new user of Fieldtrip and I'm dealing with source analysis. I have no problem with timelocked or frequency data but I want to try to do source analysis of component data after ICA computing with the component topographies (comp.topo in a comp structure). I don't have MRI for every subject and I'm using the Standard_BEM model with the coordinates of EGI template realigning the electrodes in the interactive mode. After computing the source analysis, I have trouble with interpolation. I report the partial code: %% SOURCE MODELING % create source model cfg = []; cfg.method = 'eloreta'; cfg.grid = grid; cfg.elec = ft_read_sens('GSN-HydroCel-128.sfp'); cfg.vol = template_vol; source = ft_sourceanalysis(cfg, comp); disp (source) dim: [15 18 15] pos: [4050x3 double] inside: [1x2020 double] outside: [1x2030 double] cfg: [1x1 struct] comp is the structure with components. I don't know what I have to set in cfg.parameter in ft_sourceinterpolate and successive plotting. What can be the problem? Many thanks for your help. Doriana -- -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.rossi76 at yahoo.it Wed Mar 18 14:31:06 2015 From: martina.rossi76 at yahoo.it (Martina Rossi) Date: Wed, 18 Mar 2015 13:31:06 +0000 (UTC) Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions Message-ID: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Dear All, I would like to get some feedback from the community about a statistical analysis problem I need to tackle with my study.I want to apply the cluster-based permutation tests on time-frequency data considering two conditions (correct vs error).Unfortunately, these two conditions have different sizes (correct >> error).Right now, I am only considering subjects having a ratio "error/correct" bigger than 1/5, yet this is only an arbitrary threshold I set.The question is the following:is there a formal way to identify a threshold by which two conditions can be realiably compared with the cluster-based permutation tests?If the cluster-based approach is not suitable in this scenario, is there any other approach you would suggest?I shall perhaps point out that I am working on EEG data recorded with a 32 channel system (impedance levels < 10 kΩ). Looking forward to hear your feedback :) Kind Regards,Martina Rossi -------------- next part -------------- An HTML attachment was scrubbed... URL: From joramvandriel at gmail.com Wed Mar 18 14:51:33 2015 From: joramvandriel at gmail.com (Joram van Driel) Date: Wed, 18 Mar 2015 14:51:33 +0100 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> References: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Martina, In general, I'd advice to do some kind of trial-selection procedure when comparing error versus correct trials, in order to trial-count-match the two conditions. Otherwise you run into problems considering: SNR (higher for the correct condition), and RT (errors are usually faster, resulting in a time-on-task confound). What I always do is pick from the correct condition a similar number of trials that are close to the RT distribution of the error trials (i.e. the faster correct trials). That way you solve both problems at once (and probably the cluster-based permutation test in field trip will work as well, as a bonus ;)). Best, Joram On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi wrote: > Dear All, > > I would like to get some feedback from the community about a statistical > analysis problem I need to tackle with my study. > I want to apply the cluster-based permutation tests on time-frequency data > considering two conditions (correct vs error). > Unfortunately, these two conditions have different sizes (correct >> > error). > Right now, I am only considering subjects having a ratio "error/correct" > bigger than 1/5, yet this is only an arbitrary threshold I set. > The question is the following: > is there a formal way to identify a threshold by which two conditions can > be realiably compared with the cluster-based permutation tests? > If the cluster-based approach is not suitable in this scenario, is there > any other approach you would suggest? > I shall perhaps point out that I am working on EEG data recorded with a 32 > channel system (impedance levels < 10 kΩ). > > Looking forward to hear your feedback :) > > Kind Regards, > Martina Rossi > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Joram van Driel Postdoc @ Vrije Universiteit Amsterdam Cognitive Psychology -------------- next part -------------- An HTML attachment was scrubbed... URL: From noahertz6 at gmail.com Wed Mar 18 15:43:32 2015 From: noahertz6 at gmail.com (Noa Hertz) Date: Wed, 18 Mar 2015 16:43:32 +0200 Subject: [FieldTrip] No 'pow' is generated when using ft_sourcedescriptives Message-ID: Hi all, I am performing PCC beamforming on resting-state data. Up till now I was using the function ft_sourcedescriptives, and received a structure containing the field avg.pow. Recently I updated my fieldtrip version to the latest release (2015), and now no 'avg.pow is generated. I get mom, but this is a complex number. Am I doing something wrong? Is there a simple way to compute pow, like abs(mom)? If so, should I do it before or after source descriptives? Thanks in advance, Noa This is the script I’m using: %%% performs source analysis cfg = []; cfg.method='pcc'; cfg.frequency = 10; cfg.lambda = 0; cfg.vol = vol; cfg.grid = grid; cfg.feedback = 'textbar'; cfg.keepfilter='yes'; source1 = ft_sourceanalysis(cfg, freqClosed); %%% creates power value in each virtual sensor cfg = []; cfg.projectmom = 'yes'; sd_close = ft_sourcedescriptives(cfg, source1);% gives power to each VS -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Mar 18 19:20:17 2015 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 18 Mar 2015 19:20:17 +0100 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Message-ID: Dear Martina, It might help to distinguish two aspects of cluster-based statistic. 1) the statistical approuch that you will use to determine whether a time-channel-datapoint / time-frequency-channel-datapoint / time-frequency-voxel-datapoint is considered significant different between conditions. 2) the statistical approuch that you will use to determine whether *a cluster of* time-channel-datapoints / time-frequency-channel-datapoints / time-frequency-voxel-datapoints is considered significantly different between conditions. When you talk about *cluster statistics*, you probably think about the second part. But this might not be what you should initially be concerned with when thinking about e.g. different numbers of trials between conditions. Rather, consider what statistical tests you (can) use to compare your time-frequency values between conditions *(within subjects).* This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any test, for that matter. As far as my limited knowledge of statistics goes, in most simple and non-extreme cases, unequal number of trials that does not have to increase your chance of type I errors, rather that of type 2 (you'll be insensitive to differences if you don't have enough observations in one condition due to noisy estimate of means/distribution). But in any case it's a simple question to google or ask a statistician. Now, after you are happy with and confident about the between conditions statistical test, consider how the cluster statistics might help you. First of all, how does it determine whether a cluster is significantly different between conditions? There are different options, but the gist is that it takes your significant statistical numbers of step (1), adds them up when they belong to the same cluster (based on whether they are neigbourings in time/freq/space with other significant numbers), takes the maximum of these summed up clusters (there might be more than one cluster), and then compares this one value to the same taken from a*(non-parametric) monte-carlo distribution *of the null hypothesis based on permuting the values over conditions (and then calculating the maximum sum). The Maris and Oostenveld paper explains it in more detail. The reason for doing cluster-statistics is that its a smart way of dealing with multiple comparisons over many time x frequency x channels (or space). The method is blind for your decisions about how its computed for each point in time x frequency x channels (or space). I find the FieldTrip statistics functions, their configurations etc., and the way they interact confusing at times, but I hope this helps to clear it up a bit. Long story short - I think your question does not limit itself to cluster statistics and at the same time is much simpler. It's all about (1). Best wishes, Stephen There are two separate steps cluster statistics (as implemented in FieldTrip, but in general as well). On 18 March 2015 at 14:51, Joram van Driel wrote: > Hi Martina, > > In general, I'd advice to do some kind of trial-selection procedure when > comparing error versus correct trials, in order to trial-count-match the > two conditions. Otherwise you run into problems considering: SNR (higher > for the correct condition), and RT (errors are usually faster, resulting in > a time-on-task confound). What I always do is pick from the correct > condition a similar number of trials that are close to the RT distribution > of the error trials (i.e. the faster correct trials). That way you solve > both problems at once (and probably the cluster-based permutation test in > field trip will work as well, as a bonus ;)). > > Best, > Joram > > On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi > wrote: > >> Dear All, >> >> I would like to get some feedback from the community about a statistical >> analysis problem I need to tackle with my study. >> I want to apply the cluster-based permutation tests on time-frequency >> data considering two conditions (correct vs error). >> Unfortunately, these two conditions have different sizes (correct >> >> error). >> Right now, I am only considering subjects having a ratio "error/correct" >> bigger than 1/5, yet this is only an arbitrary threshold I set. >> The question is the following: >> is there a formal way to identify a threshold by which two conditions can >> be realiably compared with the cluster-based permutation tests? >> If the cluster-based approach is not suitable in this scenario, is there >> any other approach you would suggest? >> I shall perhaps point out that I am working on EEG data recorded with a >> 32 channel system (impedance levels < 10 kΩ). >> >> Looking forward to hear your feedback :) >> >> Kind Regards, >> Martina Rossi >> >> >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Joram van Driel > Postdoc @ Vrije Universiteit Amsterdam > Cognitive Psychology > > > _______________________________________________ > 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 gmail.com Wed Mar 18 19:33:39 2015 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 18 Mar 2015 19:33:39 +0100 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Message-ID: I should add that (1) is typically done *within *subjects, and (2) *over * subjects. Cheers, Stephen On 18 March 2015 at 19:20, Stephen Whitmarsh wrote: > Dear Martina, > > It might help to distinguish two aspects of cluster-based statistic. > > 1) the statistical approuch that you will use to determine whether a > time-channel-datapoint / time-frequency-channel-datapoint / > time-frequency-voxel-datapoint is considered significant different between > conditions. > 2) the statistical approuch that you will use to determine whether *a > cluster of* time-channel-datapoints / time-frequency-channel-datapoints / > time-frequency-voxel-datapoints is considered significantly different > between conditions. > > When you talk about *cluster statistics*, you probably think about the > second part. But this might not be what you should initially be concerned > with when thinking about e.g. different numbers of trials between > conditions. Rather, consider what statistical tests you (can) use to > compare your time-frequency values between conditions *(within subjects).* > This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any > test, for that matter. As far as my limited knowledge of statistics goes, > in most simple and non-extreme cases, unequal number of trials that does > not have to increase your chance of type I errors, rather that of type 2 > (you'll be insensitive to differences if you don't have enough observations > in one condition due to noisy estimate of means/distribution). But in any > case it's a simple question to google or ask a statistician. > > Now, after you are happy with and confident about the between conditions > statistical test, consider how the cluster statistics might help you. > First of all, how does it determine whether a cluster is significantly > different between conditions? There are different options, but the gist is > that it takes your significant statistical numbers of step (1), adds them > up when they belong to the same cluster (based on whether they are > neigbourings in time/freq/space with other significant numbers), takes the > maximum of these summed up clusters (there might be more than one cluster), > and then compares this one value to the same taken from a*(non-parametric) > monte-carlo distribution *of the null hypothesis based on permuting the > values over conditions (and then calculating the maximum sum). The Maris > and Oostenveld paper explains it in more detail. > > The reason for doing cluster-statistics is that its a smart way of dealing > with multiple comparisons over many time x frequency x channels (or space). > The method is blind for your decisions about how its computed for each > point in time x frequency x channels (or space). > > I find the FieldTrip statistics functions, their configurations etc., and > the way they interact confusing at times, but I hope this helps to clear it > up a bit. > > Long story short - I think your question does not limit itself to cluster > statistics and at the same time is much simpler. It's all about (1). > > Best wishes, > Stephen > > > > > > > > > > > > > > > > There are two separate steps cluster statistics (as implemented in > FieldTrip, but in general as well). > > > > > On 18 March 2015 at 14:51, Joram van Driel > wrote: > >> Hi Martina, >> >> In general, I'd advice to do some kind of trial-selection procedure when >> comparing error versus correct trials, in order to trial-count-match the >> two conditions. Otherwise you run into problems considering: SNR (higher >> for the correct condition), and RT (errors are usually faster, resulting in >> a time-on-task confound). What I always do is pick from the correct >> condition a similar number of trials that are close to the RT distribution >> of the error trials (i.e. the faster correct trials). That way you solve >> both problems at once (and probably the cluster-based permutation test in >> field trip will work as well, as a bonus ;)). >> >> Best, >> Joram >> >> On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi >> wrote: >> >>> Dear All, >>> >>> I would like to get some feedback from the community about a statistical >>> analysis problem I need to tackle with my study. >>> I want to apply the cluster-based permutation tests on time-frequency >>> data considering two conditions (correct vs error). >>> Unfortunately, these two conditions have different sizes (correct >> >>> error). >>> Right now, I am only considering subjects having a ratio "error/correct" >>> bigger than 1/5, yet this is only an arbitrary threshold I set. >>> The question is the following: >>> is there a formal way to identify a threshold by which two conditions >>> can be realiably compared with the cluster-based permutation tests? >>> If the cluster-based approach is not suitable in this scenario, is there >>> any other approach you would suggest? >>> I shall perhaps point out that I am working on EEG data recorded with a >>> 32 channel system (impedance levels < 10 kΩ). >>> >>> Looking forward to hear your feedback :) >>> >>> Kind Regards, >>> Martina Rossi >>> >>> >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> >> >> >> >> -- >> Joram van Driel >> Postdoc @ Vrije Universiteit Amsterdam >> Cognitive Psychology >> >> >> _______________________________________________ >> 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 gmail.com Wed Mar 18 19:43:01 2015 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 18 Mar 2015 19:43:01 +0100 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: <1137131541.851290.1426685466131.JavaMail.yahoo@mail.yahoo.com> Message-ID: You can also check out this video of Robert. Apologies for the quality - not of the talk, but of the recording :-) At 14:45 he actually mentions unequal number of trials between conditions. https://www.youtube.com/watch?v=vOSfabsDUNg Cheers, Stephen On 18 March 2015 at 19:33, Stephen Whitmarsh wrote: > I should add that (1) is typically done *within *subjects, and (2) *over * > subjects. > > Cheers, > Stephen > > On 18 March 2015 at 19:20, Stephen Whitmarsh > wrote: > >> Dear Martina, >> >> It might help to distinguish two aspects of cluster-based statistic. >> >> 1) the statistical approuch that you will use to determine whether a >> time-channel-datapoint / time-frequency-channel-datapoint / >> time-frequency-voxel-datapoint is considered significant different between >> conditions. >> 2) the statistical approuch that you will use to determine whether *a >> cluster of* time-channel-datapoints / time-frequency-channel-datapoints >> / time-frequency-voxel-datapoints is considered significantly different >> between conditions. >> >> When you talk about *cluster statistics*, you probably think about the >> second part. But this might not be what you should initially be concerned >> with when thinking about e.g. different numbers of trials between >> conditions. Rather, consider what statistical tests you (can) use to >> compare your time-frequency values between conditions *(within >> subjects).* This can be, e.g., a t-test, a nonparametric (e.g. >> montecarlo) test, or any test, for that matter. As far as my limited >> knowledge of statistics goes, in most simple and non-extreme cases, unequal >> number of trials that does not have to increase your chance of type I >> errors, rather that of type 2 (you'll be insensitive to differences if you >> don't have enough observations in one condition due to noisy estimate of >> means/distribution). But in any case it's a simple question to google or >> ask a statistician. >> >> Now, after you are happy with and confident about the between conditions >> statistical test, consider how the cluster statistics might help you. >> First of all, how does it determine whether a cluster is significantly >> different between conditions? There are different options, but the gist is >> that it takes your significant statistical numbers of step (1), adds them >> up when they belong to the same cluster (based on whether they are >> neigbourings in time/freq/space with other significant numbers), takes the >> maximum of these summed up clusters (there might be more than one cluster), >> and then compares this one value to the same taken from a*(non-parametric) >> monte-carlo distribution *of the null hypothesis based on permuting the >> values over conditions (and then calculating the maximum sum). The Maris >> and Oostenveld paper explains it in more detail. >> >> The reason for doing cluster-statistics is that its a smart way of >> dealing with multiple comparisons over many time x frequency x channels (or >> space). The method is blind for your decisions about how its computed for >> each point in time x frequency x channels (or space). >> >> I find the FieldTrip statistics functions, their configurations etc., and >> the way they interact confusing at times, but I hope this helps to clear it >> up a bit. >> >> Long story short - I think your question does not limit itself to cluster >> statistics and at the same time is much simpler. It's all about (1). >> >> Best wishes, >> Stephen >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> There are two separate steps cluster statistics (as implemented in >> FieldTrip, but in general as well). >> >> >> >> >> On 18 March 2015 at 14:51, Joram van Driel >> wrote: >> >>> Hi Martina, >>> >>> In general, I'd advice to do some kind of trial-selection procedure when >>> comparing error versus correct trials, in order to trial-count-match the >>> two conditions. Otherwise you run into problems considering: SNR (higher >>> for the correct condition), and RT (errors are usually faster, resulting in >>> a time-on-task confound). What I always do is pick from the correct >>> condition a similar number of trials that are close to the RT distribution >>> of the error trials (i.e. the faster correct trials). That way you solve >>> both problems at once (and probably the cluster-based permutation test in >>> field trip will work as well, as a bonus ;)). >>> >>> Best, >>> Joram >>> >>> On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi >> > wrote: >>> >>>> Dear All, >>>> >>>> I would like to get some feedback from the community about a >>>> statistical analysis problem I need to tackle with my study. >>>> I want to apply the cluster-based permutation tests on time-frequency >>>> data considering two conditions (correct vs error). >>>> Unfortunately, these two conditions have different sizes (correct >> >>>> error). >>>> Right now, I am only considering subjects having a ratio >>>> "error/correct" bigger than 1/5, yet this is only an arbitrary threshold I >>>> set. >>>> The question is the following: >>>> is there a formal way to identify a threshold by which two conditions >>>> can be realiably compared with the cluster-based permutation tests? >>>> If the cluster-based approach is not suitable in this scenario, is >>>> there any other approach you would suggest? >>>> I shall perhaps point out that I am working on EEG data recorded with a >>>> 32 channel system (impedance levels < 10 kΩ). >>>> >>>> Looking forward to hear your feedback :) >>>> >>>> Kind Regards, >>>> Martina Rossi >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>>> >>> >>> >>> >>> -- >>> Joram van Driel >>> Postdoc @ Vrije Universiteit Amsterdam >>> Cognitive Psychology >>> >>> >>> _______________________________________________ >>> 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 mitka3 at uniba.sk Wed Mar 18 21:54:39 2015 From: mitka3 at uniba.sk (Milan Mitka) Date: Wed, 18 Mar 2015 21:54:39 +0100 Subject: [FieldTrip] =?utf-8?q?Easycap_M10_coregistration_with_head_model_?= =?utf-8?q?=E2=80=93_no_fiducials?= Message-ID: <9C6D6E44-F63A-40A1-8A19-A71D7184FFCD@uniba.sk> Greetings, I'm having difficulties with aligning easycap M10 electrodes with a head model. I'm following this tutorial: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg#align_the_electrodes The problem as I see it is that the file FieldTrip/template/electrode/easycap-M10.txt that I'm using istead of standard_1020.elc doesn't include fiducials and can therefore not be properly aligned with the head model automatically. How can I properly align M10 electrodes defined in spherical coordinates or convert MNI cartesian coordinates to the head model coordinates which appear to use CTF, please? Yours faithfully Milan Mitka -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.rossi76 at yahoo.it Thu Mar 19 09:06:47 2015 From: martina.rossi76 at yahoo.it (Martina Rossi) Date: Thu, 19 Mar 2015 08:06:47 +0000 (UTC) Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: Message-ID: <245197442.364305.1426752407463.JavaMail.yahoo@mail.yahoo.com> Dear Stephen and Joram, Thank so much for your feedback,I will check out the suggested material, Best,Martina Il Mercoledì 18 Marzo 2015 20:43, Stephen Whitmarsh ha scritto: You can also check out this video of Robert. Apologies for the quality - not of the talk, but of the recording :-) At 14:45 he actually mentions unequal number of trials between conditions. https://www.youtube.com/watch?v=vOSfabsDUNg Cheers, Stephen On 18 March 2015 at 19:33, Stephen Whitmarsh wrote: I should add that (1) is typically done within subjects, and (2) over subjects. Cheers, Stephen  On 18 March 2015 at 19:20, Stephen Whitmarsh wrote: Dear Martina, It might help to distinguish two aspects of cluster-based statistic. 1) the statistical approuch that you will use to determine whether a time-channel-datapoint / time-frequency-channel-datapoint / time-frequency-voxel-datapoint is considered significant different between conditions. 2) the statistical approuch that you will use to determine whether a cluster of time-channel-datapoints / time-frequency-channel-datapoints / time-frequency-voxel-datapoints is considered significantly different between conditions. When you talk about cluster statistics, you probably think about the second part. But this might not be what you should initially be concerned with when thinking about e.g. different numbers of trials between conditions. Rather, consider what statistical tests you (can) use to compare your time-frequency values between conditions (within subjects). This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any test, for that matter. As far as my limited knowledge of statistics goes, in most simple and non-extreme cases, unequal number of trials that does not have to increase your chance of type I errors, rather that of type 2 (you'll be insensitive to differences if you don't have enough observations in one condition due to noisy estimate of means/distribution). But in any case it's a simple question to google or ask a statistician. Now, after you are happy with and confident about the between conditions statistical test, consider how the cluster statistics might help you. First of all, how does it determine whether a cluster is significantly different between conditions? There are different options, but the gist is that it takes your significant statistical numbers of step (1), adds them up when they belong to the same cluster (based on whether they are neigbourings in time/freq/space with other significant numbers), takes the maximum of these summed up clusters (there might be more than one cluster), and then compares this one value to the same taken from a(non-parametric) monte-carlo distribution of the null hypothesis based on permuting the values over conditions (and then calculating the maximum sum). The Maris and Oostenveld paper explains it in more detail. The reason for doing cluster-statistics is that its a smart way of dealing with multiple comparisons over many time x frequency x channels (or space). The method is blind for your decisions about how its computed for each point in time x frequency x channels (or space). I find the FieldTrip statistics functions, their configurations etc., and the way they interact confusing at times, but I hope this helps to clear it up a bit. Long story short - I think your question does not limit itself to cluster statistics and at the same time is much simpler. It's all about (1).  Best wishes, Stephen There are two separate steps cluster statistics (as implemented in FieldTrip, but in general as well). On 18 March 2015 at 14:51, Joram van Driel wrote: Hi Martina, In general, I'd advice to do some kind of trial-selection procedure when comparing error versus correct trials, in order to trial-count-match the two conditions. Otherwise you run into problems considering: SNR (higher for the correct condition), and RT (errors are usually faster, resulting in a time-on-task confound). What I always do is pick from the correct condition a similar number of trials that are close to the RT distribution of the error trials (i.e. the faster correct trials). That way you solve both problems at once (and probably the cluster-based permutation test in field trip will work as well, as a bonus ;)). Best,Joram On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi wrote: Dear All, I would like to get some feedback from the community about a statistical analysis problem I need to tackle with my study.I want to apply the cluster-based permutation tests on time-frequency data considering two conditions (correct vs error).Unfortunately, these two conditions have different sizes (correct >> error).Right now, I am only considering subjects having a ratio "error/correct" bigger than 1/5, yet this is only an arbitrary threshold I set.The question is the following:is there a formal way to identify a threshold by which two conditions can be realiably compared with the cluster-based permutation tests?If the cluster-based approach is not suitable in this scenario, is there any other approach you would suggest?I shall perhaps point out that I am working on EEG data recorded with a 32 channel system (impedance levels < 10 kΩ). Looking forward to hear your feedback :) Kind Regards,Martina Rossi _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Joram van DrielPostdoc @ Vrije Universiteit AmsterdamCognitive Psychology _______________________________________________ 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.goeldi at psychologie.uzh.ch Thu Mar 19 12:34:43 2015 From: m.goeldi at psychologie.uzh.ch (m.goeldi at psychologie.uzh.ch) Date: Thu, 19 Mar 2015 12:34:43 +0100 Subject: [FieldTrip] strange leadfield for beamforming from template files Message-ID: Hi all I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. Unfortunately this is not the case. The vectors are all over the place. See figure. The red circle is the electrode location (Cz). The field looks (qualitatively) just as wrong for any other electrode. Below is the code I used to generate & visualize the lead field. I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. There the result is as expected, so I think the problem lies not in the visualization. I am using fieldtrip-20150118 I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. My question is, am I doing anything wrong in generating the lead field? Am I expecting something wrong (i.e. is this a realistidc lead field?) Does anyones lead field look the same/different when using the template files? I would appreciate any help with this problem. Thanks for your thoughts Cheers Maurice %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load mri load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') % load template sourcemodel template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); % compute source model cfg                = []; cfg.grid.warpmni   = 'yes'; cfg.grid.template  = template.sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.grid.resolution = 6; cfg.mri            = mri; sourcemodel        = ft_prepare_sourcemodel(cfg); sourcemodel = ft_convert_units(sourcemodel, 'cm'); % make head model load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); vol = ft_convert_units(vol, 'cm'); %% electrode layout elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); [elec] = removeelectrodes(elec,data.label);    % remove the electrodes that are not in my data elec = ft_convert_units(elec,'cm'); % lead field cfg                 = []; cfg.grid            = sourcemodel; cfg.elec            = elec; cfg.vol             = vol; cfg.channel         = 'all'; [grid] = ft_prepare_leadfield(cfg,freqC1); grid = ft_convert_units(grid, 'cm'); %%%% visualize leadfield %%%% channel = 'Cz'; %% electrode position elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); %% leadfield positions leadfieldpos = grid.pos(grid.inside,:); %% extract leadfield npts = numel(grid.leadfield); lead = grid.leadfield(grid.inside); nchan = find(strcmp(grid.cfg.channel,channel)); for i = 1:numel(lead)     leadVect(i,:) = lead{i}(nchan,:); end figure; hold on     % plot all objects in one figure ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); alpha 0.3 scale = 30; quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) plot3(elecpos(1),elecpos(2),elecpos(3),'ro') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -------------- next part -------------- An HTML attachment was scrubbed... URL: From jan.schoffelen at donders.ru.nl Thu Mar 19 22:18:38 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Thu, 19 Mar 2015 21:18:38 +0000 Subject: [FieldTrip] strange leadfield for beamforming from template files In-Reply-To: References: Message-ID: <47A755CA-A6B5-4B56-AD75-866D2329B4F7@fcdonders.ru.nl> Hi Maurice, The way in which you visualize the leadfield vectors it is hard to see in which locations the arrows are big. My suspicion is (unless otherwise proven) that you are suffering from numerical problems at dipole positions close to the inner boundary. Best, Jan-Mathijs On Mar 19, 2015, at 12:34 PM, m.goeldi at psychologie.uzh.ch wrote: Hi all I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. Unfortunately this is not the case. The vectors are all over the place. See figure. [X] The red circle is the electrode location (Cz). The field looks (qualitatively) just as wrong for any other electrode. Below is the code I used to generate & visualize the lead field. I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. There the result is as expected, so I think the problem lies not in the visualization. I am using fieldtrip-20150118 I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. My question is, am I doing anything wrong in generating the lead field? Am I expecting something wrong (i.e. is this a realistidc lead field?) Does anyones lead field look the same/different when using the template files? I would appreciate any help with this problem. Thanks for your thoughts Cheers Maurice %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load mri load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') % load template sourcemodel template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); % compute source model cfg = []; cfg.grid.warpmni = 'yes'; cfg.grid.template = template.sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.grid.resolution = 6; cfg.mri = mri; sourcemodel = ft_prepare_sourcemodel(cfg); sourcemodel = ft_convert_units(sourcemodel, 'cm'); % make head model load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); vol = ft_convert_units(vol, 'cm'); %% electrode layout elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); [elec] = removeelectrodes(elec,data.label); % remove the electrodes that are not in my data elec = ft_convert_units(elec,'cm'); % lead field cfg = []; cfg.grid = sourcemodel; cfg.elec = elec; cfg.vol = vol; cfg.channel = 'all'; [grid] = ft_prepare_leadfield(cfg,freqC1); grid = ft_convert_units(grid, 'cm'); %%%% visualize leadfield %%%% channel = 'Cz'; %% electrode position elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); %% leadfield positions leadfieldpos = grid.pos(grid.inside,:); %% extract leadfield npts = numel(grid.leadfield); lead = grid.leadfield(grid.inside); nchan = find(strcmp(grid.cfg.channel,channel)); for i = 1:numel(lead) leadVect(i,:) = lead{i}(nchan,:); end figure; hold on % plot all objects in one figure ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); alpha 0.3 scale = 30; quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) plot3(elecpos(1),elecpos(2),elecpos(3),'ro') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch _______________________________________________ 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 Fri Mar 20 10:29:40 2015 From: j.herring at donders.ru.nl (Herring, J.D. (Jim)) Date: Fri, 20 Mar 2015 09:29:40 +0000 Subject: [FieldTrip] =?windows-1252?q?Easycap_M10_coregistration_with_head?= =?windows-1252?q?_model_=96_no_fiducials?= In-Reply-To: <9C6D6E44-F63A-40A1-8A19-A71D7184FFCD@uniba.sk> References: <9C6D6E44-F63A-40A1-8A19-A71D7184FFCD@uniba.sk> Message-ID: <3D00B7615FB58D46A0B49B9AD67A33EB1892CB@exprd01.hosting.ru.nl> Dear Milan, If you have not recorded the electrode positions yourself using, for example, a Polhemus or Localite system you will always end-up with a suboptimal alignment (fiducials, or not). That being said, you can skip the step of automatic realignment in the tutorial and immediately use ft_electroderealign with cfg.method = 'interactive', to manually rotate, translate, and scale the electrode positions to make it fit as well as possible to your headmodel. Best, Jim ________________________________ From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Milan Mitka [mitka3 at uniba.sk] Sent: Wednesday, March 18, 2015 9:54 PM To: fieldtrip at science.ru.nl Subject: [FieldTrip] Easycap M10 coregistration with head model – no fiducials Greetings, I'm having difficulties with aligning easycap M10 electrodes with a head model. I'm following this tutorial: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg#align_the_electrodes The problem as I see it is that the file FieldTrip/template/electrode/easycap-M10.txt that I'm using istead of standard_1020.elc doesn't include fiducials and can therefore not be properly aligned with the head model automatically. How can I properly align M10 electrodes defined in spherical coordinates or convert MNI cartesian coordinates to the head model coordinates which appear to use CTF, please? Yours faithfully Milan Mitka -------------- next part -------------- An HTML attachment was scrubbed... URL: From e163581 at gmail.com Fri Mar 20 10:58:26 2015 From: e163581 at gmail.com (Natalia Melnik) Date: Fri, 20 Mar 2015 11:58:26 +0200 Subject: [FieldTrip] A paper mentioned in "Non-parametric cluster-based statistical testing of MEG/EEG data" video on FieldtripTV channel Message-ID: Dear all, in the "Non-parametric cluster-based statistical testing of MEG/EEG data" video on FieldtripTV channel ((https://youtu.be/vOSfabsDUNg?t=17m34s) ), Dr. Oostenveld mentiones (at 17:38) a paper which tested some of the parameters of the statistic methods. Do you know which paper is it? Cheers, Natalia. From nick.peatfield at gmail.com Fri Mar 20 11:48:24 2015 From: nick.peatfield at gmail.com (Nicholas A. Peatfield) Date: Fri, 20 Mar 2015 11:48:24 +0100 Subject: [FieldTrip] A paper mentioned in "Non-parametric cluster-based statistical testing of MEG/EEG data" video on FieldtripTV channel In-Reply-To: References: Message-ID: Not sure if this is the one. But it seems as such: http://www.sciencedirect.com/science/article/pii/S0165027014002878 Pernet, C.R., Latinus, M. , Nichols, T.E., and Rousselet, G.A. (2014) Cluster-based computational methods for mass univariate analyses of event-related brain potentials/fields: A simulation study. *Journal of Neuroscience Methods * . (doi: 10.1016/j.jneumeth.2014.08.003 ) (Early Online Publication) On 20 March 2015 at 10:58, Natalia Melnik wrote: > Dear all, > in the "Non-parametric cluster-based statistical testing of MEG/EEG > data" video on FieldtripTV channel > ((https://youtu.be/vOSfabsDUNg?t=17m34s) ), Dr. Oostenveld mentiones > (at 17:38) a paper which tested some of the parameters of the > statistic methods. Do you know which paper is it? > > Cheers, > Natalia. > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -- Nicholas Peatfield, PhD Centro Interdipartimentale Mente/Cervello- CIMEC Assegnista di ricerca - Research Fellow Via delle Regole, 101 - 38060 Mattarello +39 0461 283086 -------------- next part -------------- An HTML attachment was scrubbed... URL: From omerxsharon at gmail.com Fri Mar 20 12:49:11 2015 From: omerxsharon at gmail.com (Omer Sharon) Date: Fri, 20 Mar 2015 13:49:11 +0200 Subject: [FieldTrip] downsample while loading Message-ID: Hi everybody Thanks for answering, I'm reading through most of the answers here and it's very helpful. I'm having trouble with loading of single (and several) channel sampled in 1000 Hz, but for about 8 hours - I get "out of memory" (from the ft_preprocessing) Is there a way to downsample the data while loading? (before preprocessing) or alternatively to load it in several parts (in the time dimension), downsample and then concatenate. Thanks a lot Omer -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.caspar at ucl.ac.uk Fri Mar 20 13:14:07 2015 From: e.caspar at ucl.ac.uk (Caspar, Emilie) Date: Fri, 20 Mar 2015 12:14:07 +0000 Subject: [FieldTrip] downsample while loading In-Reply-To: References: Message-ID: <8959A2B9-139C-4BDF-A86B-A59949D9E42F@live.ucl.ac.uk> Hi Omer, Maybe this can help. It filters and epochs before downsampling. It should be faster. However, that highly depends on the computer you have. I tried this with two different computer, with exactly the same characteristics. One was almost full, the other not. It took 15 minutes for 64 electrodes on the new one, and 40 minutes on the full one. cfgp = []; cfgp.dataset = [ file.name]; cfgr = []; cfgr.resamplefs = 256; cfgr.detrend = 'yes'; %% epochs before filtering cfg1 = []; cfg1.dataset = [ file.name]; cfg1.trialdef.eventtype = 'STATUS'; cfg1.trialdef.eventvalue = [65]; cfg1.trialdef.prestim = abs(windows(1)); cfg1.trialdef.poststim = windows(2); cfg1 = ft_definetrial(cfg1); %% filtres downsampling for i=1:nchans cfg1.channel = i; cfg1.bpfilter = 'yes'; cfg1.bpfreq=[0.9 30];%filtres datp = ft_preprocessing(cfg1); singlechan{i} = ft_resampledata(cfgr, datp); clear datp end cfg = []; datall = ft_appenddata(cfg, singlechan{:}); --------------------------------------------- Emilie Caspar Aspirante FNRS - Ph.D. Student Consciousness, Cognition & Computation Group (CO3) Centre de Recherche Cognition et Neurosciences (CRCN) ULB Neurosciences Institute (UNI) Université Libre de Bruxelles Av. F.-D. Roosevelt, 50 1050 Bruxelles BELGIUM Voice : +32 2 650 32 95 mail : ecaspar at ulb.ac.be office: DB10-138 On 20 mars 2015, at 12:49, Omer Sharon > wrote: Hi everybody Thanks for answering, I'm reading through most of the answers here and it's very helpful. I'm having trouble with loading of single (and several) channel sampled in 1000 Hz, but for about 8 hours - I get "out of memory" (from the ft_preprocessing) Is there a way to downsample the data while loading? (before preprocessing) or alternatively to load it in several parts (in the time dimension), downsample and then concatenate. Thanks a lot Omer _______________________________________________ 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 andrea.brovelli at univ-amu.fr Fri Mar 20 15:14:29 2015 From: andrea.brovelli at univ-amu.fr (andrea brovelli) Date: Fri, 20 Mar 2015 15:14:29 +0100 (CET) Subject: [FieldTrip] Possible BUG in ft_redefinetrial using the cfg.trl option Message-ID: <1818288071.36715.1426860868961.JavaMail.root@bureau-frontal3.univ-amu.fr> Dear all, The bugzilla server seems to be down for maintenance. So I post it here. I noticed a possible bug in ft_redefinetrial: if I realign my data on a different event using the cfg.trl option, the output data is corretly aligned, BUT the output data structure contains ONLY the first trial of the input data structure, repeated for the exact number of trials. % In other words, if you do this... cfg = []; cfg.trl = trl; % N x 3 matrix = [ sample_start sample_end sample_offset ] data_out = ft_redefinetrial(cfg, data_in); % And then plot the first 3 trials for the first channel.... plot(data_out.time{1},data_out.trial{1}(1,:),'b') hold on plot(data_out.time{2},data_out.trial{2}(1,:),'r') plot(data_out.time{3},data_out.trial{3}(1,:),'k') ... you will notice that you are plotting the first trial in the original data_in but shifted in time. Could you also check please ? I used the latest version of Fieldtrip fieldtrip-20150318 Thanks Andrea From e163581 at gmail.com Fri Mar 20 17:31:17 2015 From: e163581 at gmail.com (Natalia Melnik) Date: Fri, 20 Mar 2015 18:31:17 +0200 Subject: [FieldTrip] A paper mentioned in "Non-parametric cluster-based > statistical testing of MEG/EEG data" video on FieldtripTV channel Message-ID: Yeah, it seems to be the paper! Thank you very much! Cheers, Natalia On 20 March 2015 at 13:00, wrote: > Send fieldtrip mailing list submissions to > fieldtrip at science.ru.nl > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > or, via email, send a message with subject or body 'help' to > fieldtrip-request at science.ru.nl > > You can reach the person managing the list at > fieldtrip-owner at science.ru.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fieldtrip digest..." > > > Today's Topics: > > 1. Re: strange leadfield for beamforming from template files > (Schoffelen, J.M. (Jan Mathijs)) > 2. Re: Easycap M10 coregistration with head model ? no fiducials > (Herring, J.D. (Jim)) > 3. A paper mentioned in "Non-parametric cluster-based > statistical testing of MEG/EEG data" video on FieldtripTV channel > (Natalia Melnik) > 4. Re: A paper mentioned in "Non-parametric cluster-based > statistical testing of MEG/EEG data" video on FieldtripTV channel > (Nicholas A. Peatfield) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 19 Mar 2015 21:18:38 +0000 > From: "Schoffelen, J.M. (Jan Mathijs)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] strange leadfield for beamforming from > template files > Message-ID: <47A755CA-A6B5-4B56-AD75-866D2329B4F7 at fcdonders.ru.nl> > Content-Type: text/plain; charset="iso-8859-1" > > Hi Maurice, > The way in which you visualize the leadfield vectors it is hard to see in which locations the arrows are big. My suspicion is (unless otherwise proven) that you are suffering from numerical problems at dipole positions close to the inner boundary. > Best, > Jan-Mathijs > > > > On Mar 19, 2015, at 12:34 PM, m.goeldi at psychologie.uzh.ch wrote: > > > Hi all > > I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. > Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. > Unfortunately this is not the case. The vectors are all over the place. See figure. > > > [X] > The red circle is the electrode location (Cz). > The field looks (qualitatively) just as wrong for any other electrode. > > Below is the code I used to generate & visualize the lead field. > > I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. > There the result is as expected, so I think the problem lies not in the visualization. > > I am using fieldtrip-20150118 > > I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. > > My question is, am I doing anything wrong in generating the lead field? > Am I expecting something wrong (i.e. is this a realistidc lead field?) > Does anyones lead field look the same/different when using the template files? > > I would appreciate any help with this problem. > > > Thanks for your thoughts > > Cheers > Maurice > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > % load mri > load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') > > % load template sourcemodel > template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); > > % compute source model > cfg = []; > cfg.grid.warpmni = 'yes'; > cfg.grid.template = template.sourcemodel; > cfg.grid.nonlinear = 'yes'; % use non-linear normalization > cfg.grid.resolution = 6; > cfg.mri = mri; > sourcemodel = ft_prepare_sourcemodel(cfg); > sourcemodel = ft_convert_units(sourcemodel, 'cm'); > > % make head model > load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); > vol = ft_convert_units(vol, 'cm'); > > %% electrode layout > elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); > [elec] = removeelectrodes(elec,data.label); % remove the electrodes that are not in my data > elec = ft_convert_units(elec,'cm'); > > % lead field > cfg = []; > cfg.grid = sourcemodel; > cfg.elec = elec; > cfg.vol = vol; > cfg.channel = 'all'; > [grid] = ft_prepare_leadfield(cfg,freqC1); > grid = ft_convert_units(grid, 'cm'); > > > > %%%% visualize leadfield %%%% > channel = 'Cz'; > > %% electrode position > elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); > > %% leadfield positions > leadfieldpos = grid.pos(grid.inside,:); > > %% extract leadfield > npts = numel(grid.leadfield); > lead = grid.leadfield(grid.inside); > > nchan = find(strcmp(grid.cfg.channel,channel)); > for i = 1:numel(lead) > leadVect(i,:) = lead{i}(nchan,:); > end > > figure; hold on % plot all objects in one figure > ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); > ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); > alpha 0.3 > scale = 30; > quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) > plot3(elecpos(1),elecpos(2),elecpos(3),'ro') > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > > --- > University of Z?rich > Maurice G?ldi > Department of Psychology > Biopsychology > Binzm?hlestr. 14 / Box 5 > CH - 8050 Z?rich > > Tel. +41 (0)44 635 74 55 > www.psychologie.uzh.ch > maurice.goeldi at uzh.ch > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Fri, 20 Mar 2015 09:29:40 +0000 > From: "Herring, J.D. (Jim)" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] Easycap M10 coregistration with head model ? > no fiducials > Message-ID: > <3D00B7615FB58D46A0B49B9AD67A33EB1892CB at exprd01.hosting.ru.nl> > Content-Type: text/plain; charset="windows-1252" > > Dear Milan, > > If you have not recorded the electrode positions yourself using, for example, a Polhemus or Localite system you will always end-up with a suboptimal alignment (fiducials, or not). > > That being said, you can skip the step of automatic realignment in the tutorial and immediately use ft_electroderealign with cfg.method = 'interactive', to manually rotate, translate, and scale the electrode positions to make it fit as well as possible to your headmodel. > > Best, > > Jim > ________________________________ > From: fieldtrip-bounces at science.ru.nl [fieldtrip-bounces at science.ru.nl] on behalf of Milan Mitka [mitka3 at uniba.sk] > Sent: Wednesday, March 18, 2015 9:54 PM > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] Easycap M10 coregistration with head model ? no fiducials > > Greetings, > > I'm having difficulties with aligning easycap M10 electrodes with a head model. I'm following this tutorial: http://fieldtrip.fcdonders.nl/tutorial/headmodel_eeg#align_the_electrodes > > The problem as I see it is that the file FieldTrip/template/electrode/easycap-M10.txt that I'm using istead of standard_1020.elc doesn't include fiducials and can therefore not be properly aligned with the head model automatically. > > How can I properly align M10 electrodes defined in spherical coordinates or convert MNI cartesian coordinates to the head model coordinates which appear to use CTF, please? > > Yours faithfully > Milan Mitka > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 3 > Date: Fri, 20 Mar 2015 11:58:26 +0200 > From: Natalia Melnik > To: fieldtrip at science.ru.nl > Subject: [FieldTrip] A paper mentioned in "Non-parametric > cluster-based statistical testing of MEG/EEG data" video on > FieldtripTV channel > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Dear all, > in the "Non-parametric cluster-based statistical testing of MEG/EEG > data" video on FieldtripTV channel > ((https://youtu.be/vOSfabsDUNg?t=17m34s) ), Dr. Oostenveld mentiones > (at 17:38) a paper which tested some of the parameters of the > statistic methods. Do you know which paper is it? > > Cheers, > Natalia. > > > ------------------------------ > > Message: 4 > Date: Fri, 20 Mar 2015 11:48:24 +0100 > From: "Nicholas A. Peatfield" > To: FieldTrip discussion list > Subject: Re: [FieldTrip] A paper mentioned in "Non-parametric > cluster-based statistical testing of MEG/EEG data" video on > FieldtripTV channel > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > Not sure if this is the one. But it seems as such: > > http://www.sciencedirect.com/science/article/pii/S0165027014002878 > > Pernet, C.R., Latinus, M. , > Nichols, T.E., and Rousselet, G.A. > (2014) Cluster-based > computational methods for mass univariate analyses of event-related brain > potentials/fields: A simulation study. *Journal of Neuroscience Methods > * > . (doi: > > 10.1016/j.jneumeth.2014.08.003 > ) (Early Online > Publication) > > > > On 20 March 2015 at 10:58, Natalia Melnik wrote: > >> Dear all, >> in the "Non-parametric cluster-based statistical testing of MEG/EEG >> data" video on FieldtripTV channel >> ((https://youtu.be/vOSfabsDUNg?t=17m34s) ), Dr. Oostenveld mentiones >> (at 17:38) a paper which tested some of the parameters of the >> statistic methods. Do you know which paper is it? >> >> Cheers, >> Natalia. >> _______________________________________________ >> fieldtrip mailing list >> fieldtrip at donders.ru.nl >> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> > > > > -- > Nicholas Peatfield, PhD > Centro Interdipartimentale Mente/Cervello- CIMEC > > Assegnista di ricerca - Research Fellow > Via delle Regole, 101 - 38060 Mattarello > +39 0461 283086 > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > End of fieldtrip Digest, Vol 52, Issue 22 > ***************************************** From m.goeldi at psychologie.uzh.ch Fri Mar 20 18:05:46 2015 From: m.goeldi at psychologie.uzh.ch (m.goeldi at psychologie.uzh.ch) Date: Fri, 20 Mar 2015 18:05:46 +0100 Subject: [FieldTrip] Antwort: Re: strange leadfield for beamforming from template files In-Reply-To: <47A755CA-A6B5-4B56-AD75-866D2329B4F7@fcdonders.ru.nl> References: <47A755CA-A6B5-4B56-AD75-866D2329B4F7@fcdonders.ru.nl>, Message-ID: Hi Jan-Mathijs Thanks for your quick reply. How would I prove it is not a numerical problem? The big arrows are all close to the boundary. I created my own head models according to the ft-tutorial, but the problem persists. To solve this issue is it feasible to simply remove the points closest to the boundary? (Or a bit more sophisticated, remove those points where the vector is missaligned wrt. its neighbours.) If this happens with the template files, I guess this will also happen routinely with any other (i.e. individual) scans I would use. Is there a standard ft approach to adress this issue? Cheers Maurice --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -----fieldtrip-bounces at science.ru.nl schrieb: ----- An: FieldTrip discussion list Von: "Schoffelen, J.M. (Jan Mathijs)" Gesendet von: fieldtrip-bounces at science.ru.nl Datum: 19.03.2015 22:30 Betreff: Re: [FieldTrip] strange leadfield for beamforming from template files Hi Maurice, The way in which you visualize the leadfield vectors it is hard to see in which locations the arrows are big. My suspicion is (unless otherwise proven) that you are suffering from numerical problems at dipole positions close to the inner boundary. Best, Jan-Mathijs On Mar 19, 2015, at 12:34 PM, m.goeldi at psychologie.uzh.ch wrote: Hi all I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. Unfortunately this is not the case. The vectors are all over the place. See figure. The red circle is the electrode location (Cz). The field looks (qualitatively) just as wrong for any other electrode. Below is the code I used to generate & visualize the lead field. I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. There the result is as expected, so I think the problem lies not in the visualization. I am using fieldtrip-20150118 I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. My question is, am I doing anything wrong in generating the lead field? Am I expecting something wrong (i.e. is this a realistidc lead field?) Does anyones lead field look the same/different when using the template files? I would appreciate any help with this problem. Thanks for your thoughts Cheers Maurice %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load mri load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') % load template sourcemodel template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); % compute source model cfg                = []; cfg.grid.warpmni   = 'yes'; cfg.grid.template  = template.sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.grid.resolution = 6; cfg.mri            = mri; sourcemodel        = ft_prepare_sourcemodel(cfg); sourcemodel = ft_convert_units(sourcemodel, 'cm'); % make head model load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); vol = ft_convert_units(vol, 'cm'); %% electrode layout elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); [elec] = removeelectrodes(elec,data.label);    % remove the electrodes that are not in my data elec = ft_convert_units(elec,'cm'); % lead field cfg                 = []; cfg.grid            = sourcemodel; cfg.elec            = elec; cfg.vol             = vol; cfg.channel         = 'all'; [grid] = ft_prepare_leadfield(cfg,freqC1); grid = ft_convert_units(grid, 'cm'); %%%% visualize leadfield %%%% channel = 'Cz'; %% electrode position elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); %% leadfield positions leadfieldpos = grid.pos(grid.inside,:); %% extract leadfield npts = numel(grid.leadfield); lead = grid.leadfield(grid.inside); nchan = find(strcmp(grid.cfg.channel,channel)); for i = 1:numel(lead)     leadVect(i,:) = lead{i}(nchan,:); end figure; hold on     % plot all objects in one figure ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); alpha 0.3 scale = 30; quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) plot3(elecpos(1),elecpos(2),elecpos(3),'ro') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch _______________________________________________ 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.goeldi at psychologie.uzh.ch Fri Mar 20 21:20:19 2015 From: m.goeldi at psychologie.uzh.ch (m.goeldi at psychologie.uzh.ch) Date: Fri, 20 Mar 2015 21:20:19 +0100 Subject: [FieldTrip] Antwort: Re: strange leadfield for beamforming from template files In-Reply-To: References: , <47A755CA-A6B5-4B56-AD75-866D2329B4F7@fcdonders.ru.nl>, Message-ID: Hi I have now removed all outer points. This has removed some of the large arrows, but there are still many large ones left coming from deep inside the brain. If it is a numerical problem, is there a way around it? Could it be anything else? Cheers Maurice --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -----fieldtrip-bounces at science.ru.nl schrieb: ----- An: FieldTrip discussion list Von: m.goeldi at psychologie.uzh.ch Gesendet von: fieldtrip-bounces at science.ru.nl Datum: 20.03.2015 18:15 Betreff: [FieldTrip] Antwort: Re: strange leadfield for beamforming from template files Hi Jan-Mathijs Thanks for your quick reply. How would I prove it is not a numerical problem? The big arrows are all close to the boundary. I created my own head models according to the ft-tutorial, but the problem persists. To solve this issue is it feasible to simply remove the points closest to the boundary? (Or a bit more sophisticated, remove those points where the vector is missaligned wrt. its neighbours.) If this happens with the template files, I guess this will also happen routinely with any other (i.e. individual) scans I would use. Is there a standard ft approach to adress this issue? Cheers Maurice --- University of Zürich Maurice Göldi Department of Psychology Biopsychology Binzmühlestr. 14 / Box 5 CH - 8050 Zürich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch -----fieldtrip-bounces at science.ru.nl schrieb: ----- An: FieldTrip discussion list Von: "Schoffelen, J.M. (Jan Mathijs)" Gesendet von: fieldtrip-bounces at science.ru.nl Datum: 19.03.2015 22:30 Betreff: Re: [FieldTrip] strange leadfield for beamforming from template files Hi Maurice, The way in which you visualize the leadfield vectors it is hard to see in which locations the arrows are big. My suspicion is (unless otherwise proven) that you are suffering from numerical problems at dipole positions close to the inner boundary. Best, Jan-Mathijs On Mar 19, 2015, at 12:34 PM, m.goeldi at psychologie.uzh.ch wrote: Hi all I am trying to do beamforming with my EEG data. I am using the template headmodel etc provided in fieldtrip to compute the leadfield. Since my data looks strange I have visualized the leadfield expecting grid points close to the electrode to have a larger leadfield. Unfortunately this is not the case. The vectors are all over the place. See figure. The red circle is the electrode location (Cz). The field looks (qualitatively) just as wrong for any other electrode. Below is the code I used to generate & visualize the lead field. I have used the same code to visualize the leadfield from a example MEG file from the fieldtrip page. There the result is as expected, so I think the problem lies not in the visualization. I am using fieldtrip-20150118 I have tried all the standard_sourcemodel3d*mm files. Qualitatively the error remains the same. My question is, am I doing anything wrong in generating the lead field? Am I expecting something wrong (i.e. is this a realistidc lead field?) Does anyones lead field look the same/different when using the template files? I would appreciate any help with this problem. Thanks for your thoughts Cheers Maurice %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % load mri load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_mri.mat') % load template sourcemodel template = load('C:\Program Files\MATLAB\fieldtrip-20150118\template\sourcemodel\standard_sourcemodel3d8mm'); % compute source model cfg                = []; cfg.grid.warpmni   = 'yes'; cfg.grid.template  = template.sourcemodel; cfg.grid.nonlinear = 'yes'; % use non-linear normalization cfg.grid.resolution = 6; cfg.mri            = mri; sourcemodel        = ft_prepare_sourcemodel(cfg); sourcemodel = ft_convert_units(sourcemodel, 'cm'); % make head model load('C:\Program Files\MATLAB\fieldtrip-20150118\template\headmodel\standard_bem.mat'); vol = ft_convert_units(vol, 'cm'); %% electrode layout elec = ft_read_sens('C:\Program Files\MATLAB\spm12\EEGtemplates\egi128_GSN_HydroCel.sfp'); [elec] = removeelectrodes(elec,data.label);    % remove the electrodes that are not in my data elec = ft_convert_units(elec,'cm'); % lead field cfg                 = []; cfg.grid            = sourcemodel; cfg.elec            = elec; cfg.vol             = vol; cfg.channel         = 'all'; [grid] = ft_prepare_leadfield(cfg,freqC1); grid = ft_convert_units(grid, 'cm'); %%%% visualize leadfield %%%% channel = 'Cz'; %% electrode position elecpos = grid.cfg.elec.elecpos(strcmp(grid.cfg.elec.label,channel),:); %% leadfield positions leadfieldpos = grid.pos(grid.inside,:); %% extract leadfield npts = numel(grid.leadfield); lead = grid.leadfield(grid.inside); nchan = find(strcmp(grid.cfg.channel,channel)); for i = 1:numel(lead)     leadVect(i,:) = lead{i}(nchan,:); end figure; hold on     % plot all objects in one figure ft_plot_mesh(vol.bnd(3), 'edgecolor','none','facealpha',0.8,'facecolor',[0.6 0.6 0.8]); ft_plot_mesh(vol.bnd(2), 'edgecolor','none','facealpha',0.8,'facecolor','y'); alpha 0.3 scale = 30; quiver3(leadfieldpos(:,1),leadfieldpos(:,2),leadfieldpos(:,3),leadVect(:,1),leadVect(:,2),leadVect(:,3),scale) plot3(elecpos(1),elecpos(2),elecpos(3),'ro') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --- University of Z�rich Maurice G�ldi Department of Psychology Biopsychology Binzm�hlestr. 14 / Box 5 CH - 8050 Z�rich Tel. +41 (0)44 635 74 55 www.psychologie.uzh.ch maurice.goeldi at uzh.ch _______________________________________________ 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 v.piai.research at gmail.com Sat Mar 21 01:35:24 2015 From: v.piai.research at gmail.com (Vitoria Piai) Date: Fri, 20 Mar 2015 17:35:24 -0700 Subject: [FieldTrip] ft_channelrepair increases the size of the data file In-Reply-To: References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> <550303A9.5070705@gmail.com> Message-ID: <550CBCCC.1060000@gmail.com> Hi FT-ers, I think I won't be able to figure out this problem by diving into the ft_channelrepair code. So if you can shed any light to what could be going on, I'd be *very *thankful!! I followed Eelke's and JM's advice to split the data, fix some channels only for certain trials, then put the data together. All fine, except for the following. If I apply this procedure a large number of times (haven't figured out what the threshold is yet), the file size increases by a considerable amount. For example, when I fixed one channel for all trials, and then 7 channels for a couple of trials, the file went from 1GB to almost 3GB. Then Matlab slows down and eventually hangs, and the data (saved with '-v7.3') is "corrupted" once I try to load it to my workspace again. It seems to me that ft_channelrepair is keeping information in a 'previous' field such that every call to it will just keep adding bytes, is that the case? I'm planning to delete everything that is in cfg.previous and just keep the .trl field for later. Can you foresee I will run into unrepairable trouble later because of this? Is there any other field within the cfg.previous I should keep besides the .trl? Thanks a lot again!! Have a nice weekend, Vitória On 3/13/2015 9:08 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > Hi V, > Note that you can use the trialinfo field in your data for bookkeeping, e.g. (assuming there is already such field in your data) > > data.trialinfo(:,end+1) = (1:numel(data.trial))’; > cfg = []; > cfg.trials = sel_to_be_repaired; > cfg.etc > data1 = ft_channelrepair(cfg,data); > > cfg = []; > cfg.trials = sel_to_be_unrepaired > data2 = ft_selectdata(cfg, data); > > data = ft_appenddata([],data1,data2); > > Although the order has now been changed, you’ll see that the last column of the trialinfo field still pertains to your original trial indices. > > JM > > > > On Mar 13, 2015, at 4:35 PM, Vitória Piai wrote: > >> Thanks, Eelke! >> >> I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. >> >> Thanks a lot, >> Hope all is well in Nijmegen!! >> >> On 3/11/2015 12:32 AM, Eelke Spaak wrote: >>> Hi Vitoria, >>> >>> Yes, that is the expected behaviour of ft_channelrepair, because that >>> is consistent with all other functions supporting a cfg.trials-option >>> (i.e. select first, then do the work on what remains). >>> >>> It should be quite straightforward to do something like: >>> >>> cfg = []; >>> cfg.trials = goodtrials; >>> dat1 = ft_selectdata(cfg, data); >>> >>> cfg = []; >>> ... >>> cfg.trials = badtrials; >>> dat2 = ft_channelrepair(cfg, data); >>> >>> datcmb = ft_appenddata([], dat1, dat2); >>> >>> to achieve what you want. >>> >>> Groetjes, >>> Eelke >>> >>> On 10 March 2015 at 23:58, Vitoria Piai wrote: >>>> Hi all, >>>> >>>> I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 >>>> 09:33:28Z) to repair bad channels. I wanted to do it only for certain >>>> trials, and when I saw the option cfg.trials, I was really happy. >>>> However, if I pass cfg.trials with a vector rather than 'all', then the >>>> function does: >>>> ft_selectdata (lines 104, 108), >>>> then from line 352 onwards, things are converted back to normal. >>>> But if the cfg contained only some trials (as I'm trying to use it for), >>>> these are not restored back, and so I'm left with a data structure that >>>> only has as many trials as my cfg had. >>>> >>>> I was just wondering whether that is the expected behaviour of >>>> ft_channelrepair and that I should restore things myself (presumably >>>> with ft_append-like functions). If so, it would be nice if the help on >>>> this function would say that... >>>> If I'm simply using a too old version, my apologies. (I should start >>>> working with github, I know!!) >>>> >>>> Thanks a lot, >>>> Vitoria >>>> >>>> >>>> >>>> _______________________________________________ >>>> fieldtrip mailing list >>>> fieldtrip at donders.ru.nl >>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >>> _______________________________________________ >>> fieldtrip mailing list >>> fieldtrip at donders.ru.nl >>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> _______________________________________________ >> 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 eelke.spaak at donders.ru.nl Sat Mar 21 02:52:05 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Sat, 21 Mar 2015 02:52:05 +0100 Subject: [FieldTrip] ft_channelrepair increases the size of the data file In-Reply-To: <8468aced403e44edb130570e4f13d10e@EXPRD01.hosting.ru.nl> References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> <550303A9.5070705@gmail.com> <8468aced403e44edb130570e4f13d10e@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitória, It should be perfectly safe to delete cfg.previous (or data.cfg); no FieldTrip functions depend on it. Note that you won't be able to run ft_analysisprotocol on those data anymore, but that should be the only limitation. Best, Eelke Op 21 mrt. 2015 01:38 schreef "Vitoria Piai" : > Hi FT-ers, > > I think I won't be able to figure out this problem by diving into the > ft_channelrepair code. So if you can shed any light to what could be going > on, I'd be *very *thankful!! > > I followed Eelke's and JM's advice to split the data, fix some channels > only for certain trials, then put the data together. All fine, except for > the following. If I apply this procedure a large number of times (haven't > figured out what the threshold is yet), the file size increases by a > considerable amount. For example, when I fixed one channel for all trials, > and then 7 channels for a couple of trials, the file went from 1GB to > almost 3GB. Then Matlab slows down and eventually hangs, and the data > (saved with '-v7.3') is "corrupted" once I try to load it to my workspace > again. > > It seems to me that ft_channelrepair is keeping information in a > 'previous' field such that every call to it will just keep adding bytes, is > that the case? I'm planning to delete everything that is in cfg.previous > and just keep the .trl field for later. Can you foresee I will run into > unrepairable trouble later because of this? Is there any other field within > the cfg.previous I should keep besides the .trl? > > Thanks a lot again!! > Have a nice weekend, > Vitória > > On 3/13/2015 9:08 AM, Schoffelen, J.M. (Jan Mathijs) wrote: > > Hi V, > Note that you can use the trialinfo field in your data for bookkeeping, e.g. (assuming there is already such field in your data) > > data.trialinfo(:,end+1) = (1:numel(data.trial))’; > cfg = []; > cfg.trials = sel_to_be_repaired; > cfg.etc > data1 = ft_channelrepair(cfg,data); > > cfg = []; > cfg.trials = sel_to_be_unrepaired > data2 = ft_selectdata(cfg, data); > > data = ft_appenddata([],data1,data2); > > Although the order has now been changed, you’ll see that the last column of the trialinfo field still pertains to your original trial indices. > > JM > > > > On Mar 13, 2015, at 4:35 PM, Vitória Piai wrote: > > > Thanks, Eelke! > > I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. > > Thanks a lot, > Hope all is well in Nijmegen!! > > On 3/11/2015 12:32 AM, Eelke Spaak wrote: > > Hi Vitoria, > > Yes, that is the expected behaviour of ft_channelrepair, because that > is consistent with all other functions supporting a cfg.trials-option > (i.e. select first, then do the work on what remains). > > It should be quite straightforward to do something like: > > cfg = []; > cfg.trials = goodtrials; > dat1 = ft_selectdata(cfg, data); > > cfg = []; > ... > cfg.trials = badtrials; > dat2 = ft_channelrepair(cfg, data); > > datcmb = ft_appenddata([], dat1, dat2); > > to achieve what you want. > > Groetjes, > Eelke > > On 10 March 2015 at 23:58, Vitoria Piai wrote: > > Hi all, > > I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 > 09:33:28Z) to repair bad channels. I wanted to do it only for certain > trials, and when I saw the option cfg.trials, I was really happy. > However, if I pass cfg.trials with a vector rather than 'all', then the > function does: > ft_selectdata (lines 104, 108), > then from line 352 onwards, things are converted back to normal. > But if the cfg contained only some trials (as I'm trying to use it for), > these are not restored back, and so I'm left with a data structure that > only has as many trials as my cfg had. > > I was just wondering whether that is the expected behaviour of > ft_channelrepair and that I should restore things myself (presumably > with ft_append-like functions). If so, it would be nice if the help on > this function would say that... > If I'm simply using a too old version, my apologies. (I should start > working with github, I know!!) > > Thanks a lot, > Vitoria > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > _______________________________________________ > fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mitka3 at uniba.sk Sat Mar 21 22:24:16 2015 From: mitka3 at uniba.sk (Milan Mitka) Date: Sat, 21 Mar 2015 22:24:16 +0100 Subject: [FieldTrip] =?utf-8?q?Easycap_M10_coregistration_with_head_model_?= =?utf-8?q?=E2=80=93_no_fiducials?= In-Reply-To: <3D00B7615FB58D46A0B49B9AD67A33EB1892CB@exprd01.hosting.ru.nl> References: <9C6D6E44-F63A-40A1-8A19-A71D7184FFCD@uniba.sk> <3D00B7615FB58D46A0B49B9AD67A33EB1892CB@exprd01.hosting.ru.nl> Message-ID: Dear Jim, thank you for your reply. I realise that it's not the best setup but it's mostly for learning purposes and should suffice as is. The thing that still confuses me though is that the 10-20 template set does include fiducials whilst the M10 does not. I've tried manual interactive alignment before but to no avail since the head model doesn't make it very easy to find landmarks. I've also encountered errors when attempting to perform non-linear transformations regardless of the cfg.warp setting. Anyway, I've solved the issue by utilising a template MRI from SPM which used the MNI coordinate system as a basis for the head model and transformed electrode positions to MNI as well. It appears to be rather tidy so for now all is good. Yours sincerely, Milan > On 20.3.2015, at 10:29, Herring, J.D. (Jim) wrote: > > Dear Milan, > > If you have not recorded the electrode positions yourself using, for example, a Polhemus or Localite system you will always end-up with a suboptimal alignment (fiducials, or not). > > That being said, you can skip the step of automatic realignment in the tutorial and immediately use ft_electroderealign with cfg.method = 'interactive', to manually rotate, translate, and scale the electrode positions to make it fit as well as possible to your headmodel. > > Best, > > Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From doriana.demarco at gmail.com Sun Mar 22 18:22:23 2015 From: doriana.demarco at gmail.com (Doriana De Marco) Date: Sun, 22 Mar 2015 18:22:23 +0100 Subject: [FieldTrip] source analysis- NaN in leadfield matrices Message-ID: Dear Fieldtrip members, I’m dealing with source analysis and I have a big problem that I can’t resolve… Filedtrip gives me an error after launching of ft_sourceanalysis: ??? Error using ==> svd Input to SVD must not contain NaN or Inf. Error in ==> rank at 15 s = svd(A); Error in ==> ft_eloreta at 132 rank_lf(i) = rank(dip.leadfield{i}); Error in ==> ft_sourceanalysis at 850 dip(i) = ft_eloreta(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); In my leadfield computation there are in fact many NaN points. I report my script below because I can’t find where the error can be. I used standard_mri template to prepare head model. %% 1. PREPARING HEAD MODEL %METHOD 1 %if you have a structural mri and you want to create headmodel %load headmodel – mri load ('C:\Users\DorianaNote\Documents\MATLAB\fieldtrip-20140424\fieldtrip-20140424\template\headmodel\standard_mri'); cfg = []; cfg.output = {'brain','skull','scalp'}; template_seg = ft_volumesegment(cfg, mri); cfg = []; cfg.method = 'bemcp'; template_vol = ft_prepare_headmodel(cfg, template_seg); elec = ft_read_sens('GSN-HydroCel-128.sfp'); template_vol = ft_convert_units(template_vol, elec.unit); cfg = []; cfg.method = 'interactive'; cfg.elec = elec; cfg.headshape = template_vol.bnd(3); elec_aligned = ft_electroderealign(cfg); cfg = []; cfg.grid.unit = template_vol.unit; cfg.elec = elec_aligned; cfg.mri = mri; cfg.vol = template_vol; grid = ft_prepare_sourcemodel(cfg) cfg = []; cfg.elec = elec_aligned; cfg.vol = template_vol; cfg.reducerank = 3; cfg.grid = grid; cfg.channel = {'all'}; cfg.grid.unit = 'cm'; [grid] = ft_prepare_leadfield(cfg, data); cfg = []; cfg.method = 'eloreta'; cfg.grid = grid; cfg.elec = elec_aligned; cfg.vol = template_vol; source = ft_sourceanalysis(cfg, data); I’m trying to analyze component data in order to localize comp.topo parameter. I used the function comp2timelocked to transform data in a timelock-like structure... I don’t know if it can be a problem. I sincerely hope someone of you can help me Many thanks ---------------- Doriana De Marco, Ph.D. Student -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.m.groppe at gmail.com Mon Mar 23 04:02:57 2015 From: david.m.groppe at gmail.com (David Groppe) Date: Sun, 22 Mar 2015 23:02:57 -0400 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: <245197442.364305.1426752407463.JavaMail.yahoo@mail.yahoo.com> References: <245197442.364305.1426752407463.JavaMail.yahoo@mail.yahoo.com> Message-ID: Hi Martina, Balanced sample sizes are typically recommended for conventional parametric independent samples tests (e.g., t-tests, ANOVAs) because it makes the tests less sensitive to differences in variation between the populations being compared. If the populations being compared differ in variance, having more observations from the population with less variability will make these tests overly permissive (i.e., the true false positive rate will be greater than your nominal alpha level). If you have more observations from the population with greater variability, the tests become overly conservative. A few years ago, my colleagues and I simulated some EEG data and found that permutation tests exhibit a qualitatively similar sensitivity to differences in variance between populations (see below). If you're concerned about such a difference in your data you could do as has already been suggested and use a subset of data so that the number of observations between samples is the same. Alternatively you could use a permutation test based on variants of the t-statistic that are less sensitive to differences in variance. In our paper below, we investigated two variants, Welch's t and t_dif. Welch's t proved a bit less sensitive to differences in variance and was only slightly less powerful than the conventional t-statistic. t_dif was markedly insensitive to differences in variance but was significantly less powerful. However, I would guess that using t_dif or Welch's t are likely more powerful than discarding trials (though we didn't investigate that option in the paper). cheers, -David Groppe, D.M., Urbach, T.P., & Kutas, M. (2011) *Mass univariate analysis of event-related brain potentials/fields II: Simulation studies*. *Psychophysiology*, 48(12) pp. 1726-1737, DOI: 10.1111/j.1469-8986.2011.01272.x. www.cogsci.ucsd.edu/~dgroppe/PUBLICATIONS/mass_uni_preprint2.pdf On Thu, Mar 19, 2015 at 4:06 AM, Martina Rossi wrote: > Dear Stephen and Joram, > > Thank so much for your feedback, > I will check out the suggested material, > > Best, > Martina > > > Il Mercoledì 18 Marzo 2015 20:43, Stephen Whitmarsh < > stephen.whitmarsh at gmail.com> ha scritto: > > > You can also check out this video of Robert. Apologies for the quality - > not of the talk, but of the recording :-) > > At 14:45 he actually mentions unequal number of trials between conditions. > > https://www.youtube.com/watch?v=vOSfabsDUNg > > Cheers, > Stephen > > > > > On 18 March 2015 at 19:33, Stephen Whitmarsh > wrote: > > I should add that (1) is typically done *within *subjects, and (2) *over * > subjects. > > Cheers, > Stephen > > On 18 March 2015 at 19:20, Stephen Whitmarsh > wrote: > > Dear Martina, > > It might help to distinguish two aspects of cluster-based statistic. > > 1) the statistical approuch that you will use to determine whether a > time-channel-datapoint / time-frequency-channel-datapoint / > time-frequency-voxel-datapoint is considered significant different between > conditions. > 2) the statistical approuch that you will use to determine whether *a > cluster of* time-channel-datapoints / time-frequency-channel-datapoints / > time-frequency-voxel-datapoints is considered significantly different > between conditions. > > When you talk about *cluster statistics*, you probably think about the > second part. But this might not be what you should initially be concerned > with when thinking about e.g. different numbers of trials between > conditions. Rather, consider what statistical tests you (can) use to > compare your time-frequency values between conditions *(within subjects).* > This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any > test, for that matter. As far as my limited knowledge of statistics goes, > in most simple and non-extreme cases, unequal number of trials that does > not have to increase your chance of type I errors, rather that of type 2 > (you'll be insensitive to differences if you don't have enough observations > in one condition due to noisy estimate of means/distribution). But in any > case it's a simple question to google or ask a statistician. > > Now, after you are happy with and confident about the between conditions > statistical test, consider how the cluster statistics might help you. > First of all, how does it determine whether a cluster is significantly > different between conditions? There are different options, but the gist is > that it takes your significant statistical numbers of step (1), adds them > up when they belong to the same cluster (based on whether they are > neigbourings in time/freq/space with other significant numbers), takes the > maximum of these summed up clusters (there might be more than one cluster), > and then compares this one value to the same taken from a*(non-parametric) > monte-carlo distribution *of the null hypothesis based on permuting the > values over conditions (and then calculating the maximum sum). The Maris > and Oostenveld paper explains it in more detail. > > The reason for doing cluster-statistics is that its a smart way of dealing > with multiple comparisons over many time x frequency x channels (or space). > The method is blind for your decisions about how its computed for each > point in time x frequency x channels (or space). > > I find the FieldTrip statistics functions, their configurations etc., and > the way they interact confusing at times, but I hope this helps to clear it > up a bit. > > Long story short - I think your question does not limit itself to cluster > statistics and at the same time is much simpler. It's all about (1). > > Best wishes, > Stephen > > > > > > > > > > > > > > > > There are two separate steps cluster statistics (as implemented in > FieldTrip, but in general as well). > > > > > On 18 March 2015 at 14:51, Joram van Driel > wrote: > > Hi Martina, > > In general, I'd advice to do some kind of trial-selection procedure when > comparing error versus correct trials, in order to trial-count-match the > two conditions. Otherwise you run into problems considering: SNR (higher > for the correct condition), and RT (errors are usually faster, resulting in > a time-on-task confound). What I always do is pick from the correct > condition a similar number of trials that are close to the RT distribution > of the error trials (i.e. the faster correct trials). That way you solve > both problems at once (and probably the cluster-based permutation test in > field trip will work as well, as a bonus ;)). > > Best, > Joram > > On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi > wrote: > > Dear All, > > I would like to get some feedback from the community about a statistical > analysis problem I need to tackle with my study. > I want to apply the cluster-based permutation tests on time-frequency data > considering two conditions (correct vs error). > Unfortunately, these two conditions have different sizes (correct >> > error). > Right now, I am only considering subjects having a ratio "error/correct" > bigger than 1/5, yet this is only an arbitrary threshold I set. > The question is the following: > is there a formal way to identify a threshold by which two conditions can > be realiably compared with the cluster-based permutation tests? > If the cluster-based approach is not suitable in this scenario, is there > any other approach you would suggest? > I shall perhaps point out that I am working on EEG data recorded with a 32 > channel system (impedance levels < 10 kΩ). > > Looking forward to hear your feedback :) > > Kind Regards, > Martina Rossi > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > > > > > -- > Joram van Driel > Postdoc @ Vrije Universiteit Amsterdam > Cognitive Psychology > > > _______________________________________________ > 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 johanna.zumer at gmail.com Mon Mar 23 12:18:00 2015 From: johanna.zumer at gmail.com (Johanna Zumer) Date: Mon, 23 Mar 2015 11:18:00 +0000 Subject: [FieldTrip] source analysis- NaN in leadfield matrices In-Reply-To: References: Message-ID: Hi Doriana, It looks like you're using a FieldTrip verison from 20140424. There was a problem last year with bemcp causing NaNs, but that has been fixed. Could you try updating to a recent version and see if that solves it? Cheers, Johanna On 22 Mar 2015 17:22, "Doriana De Marco" wrote: > Dear Fieldtrip members, > > I’m dealing with source analysis and I have a big problem that I can’t > resolve… > > Filedtrip gives me an error after launching of ft_sourceanalysis: > > ??? Error using ==> svd > > Input to SVD must not contain NaN or Inf. > > Error in ==> rank at 15 > > s = svd(A); > > Error in ==> ft_eloreta at 132 > > rank_lf(i) = rank(dip.leadfield{i}); > > Error in ==> ft_sourceanalysis at 850 > > dip(i) = ft_eloreta(grid, sens, vol, squeeze(avg(i,:,:)), > squeeze(Cy(i,:,:)), > > optarg{:}); > > In my leadfield computation there are in fact many NaN points. I report > my script below because I can’t find where the error can be. I used > standard_mri template to prepare head model. > > %% 1. PREPARING HEAD MODEL > > %METHOD 1 > > %if you have a structural mri and you want to create headmodel > > > > %load headmodel – mri > > load > ('C:\Users\DorianaNote\Documents\MATLAB\fieldtrip-20140424\fieldtrip-20140424\template\headmodel\standard_mri'); > > cfg = []; > > cfg.output = {'brain','skull','scalp'}; > > template_seg = ft_volumesegment(cfg, mri); > > > > cfg = []; > > cfg.method = 'bemcp'; > > template_vol = ft_prepare_headmodel(cfg, template_seg); > > > > elec = ft_read_sens('GSN-HydroCel-128.sfp'); > > template_vol = ft_convert_units(template_vol, elec.unit); > > > > cfg = []; > > cfg.method = 'interactive'; > > cfg.elec = elec; > > cfg.headshape = template_vol.bnd(3); > > elec_aligned = ft_electroderealign(cfg); > > > > cfg = []; > > cfg.grid.unit = template_vol.unit; > > cfg.elec = elec_aligned; > > cfg.mri = mri; > > cfg.vol = template_vol; > > grid = ft_prepare_sourcemodel(cfg) > > > > cfg = []; > > cfg.elec = elec_aligned; > > cfg.vol = template_vol; > > cfg.reducerank = 3; > > cfg.grid = grid; > > cfg.channel = {'all'}; > > cfg.grid.unit = 'cm'; > > [grid] = ft_prepare_leadfield(cfg, data); > > > > cfg = []; > > cfg.method = 'eloreta'; > > cfg.grid = grid; > > cfg.elec = elec_aligned; > > cfg.vol = template_vol; > > source = ft_sourceanalysis(cfg, data); > > > > I’m trying to analyze component data in order to localize comp.topo > parameter. I used the function comp2timelocked to transform data in a > timelock-like structure... I don’t know if it can be a problem. > > > I sincerely hope someone of you can help me > > Many thanks > > ---------------- > > Doriana De Marco, Ph.D. Student > > > _______________________________________________ > 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 elia.valentini at uniroma1.it Tue Mar 24 16:10:49 2015 From: elia.valentini at uniroma1.it (Elia Valentini) Date: Tue, 24 Mar 2015 16:10:49 +0100 Subject: [FieldTrip] CALL for PhD positions in Cognitive Social and Affective Neurosciences (CoSAN) in Rome Message-ID: Please forgive cross posting! Dear Colleagues, this is to inform you about the Foreign Nationals Educated Abroad Ph.D. scholarship awarded by “Sapienza” University of Rome. This is a very prestigious and competitive scholarship for non-Italian students who graduated abroad (please note that a Master Degree is required). There is the chance that one of the awarded students will be selected for the Psychology and Social Neuroscience Ph.D. program (international curriculum CoSAN http://w3.uniroma1.it/cosan/). We are seeking highly talented applicants and we would really appreciate if you could forward this to the students you think may be eligible. The *deadline is* next *April, 26th. Details about the call can be found at* : http://www.cosanphd.com/index.php?page=default_templates *http://www.uniroma1.it/didattica/offerta-formativa/dottorati * The successful candidate will receive a bursary of € 19.800,00 per year before taxes: national insurance contributions (INPS) that fellowship recipients are required to pay (10,57% for 2015). Research will be performed at the Social and Cognitive Neuroscience laboratory (*http://* agliotilab.org). While the selection is mainly based on dossier (Evaluation of qualifications, publications and certificates) applicants should also include a skype address and express their availability to be contacted for a video interview if necessary For more info please contact: 1) for administrative enquiries: Dr. Paola Trussardi (organizational manager) -paola.trussardi at uniroma1.it; 2) For scientific enquiries: Dr Elia Valentini elia.valentini at uniroma1.it or Salvatore M. Aglioti - salvatoremaria.aglioti at uniroma1.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From gamaliel.ghu at hotmail.com Tue Mar 24 21:00:55 2015 From: gamaliel.ghu at hotmail.com (gamaliel huerta urrea) Date: Tue, 24 Mar 2015 16:00:55 -0400 Subject: [FieldTrip] Can I simulate multiple dipoles in realistic head model? Message-ID: HiI need simulate dipolar sources in a realistic head model, however I want know if can import surfaces from freesurfer or brainstorm.I have problems to performs the segmentation and the electrodes alignment, Finally I would like to know how could simulate multiple dipoles on different parts of realistic head model to evaluate the location later.regards Gamaliel Huerta UrreaEstudiante Ingeniería Civil BiomédicaUniversidad de Valparaíso -------------- next part -------------- An HTML attachment was scrubbed... URL: From eelke.spaak at donders.ru.nl Wed Mar 25 13:27:21 2015 From: eelke.spaak at donders.ru.nl (Eelke Spaak) Date: Wed, 25 Mar 2015 13:27:21 +0100 Subject: [FieldTrip] Possible BUG in ft_redefinetrial using the cfg.trl option In-Reply-To: References: Message-ID: Hi Andrea, I cannot reproduce the error you mention: %% create some data data = []; data.label = {'a'}; for k = 1:3 data.sampleinfo(k,:) = [1+(k-1)*1000 k*1000]; data.time{k} = 1:1000; data.trial{k} = ones(1,1000) .* k; end %% redefine cfg = []; cfg.trl = [500 600 0; 800 1200 0; 2500 2700 0]; data_out = ft_redefinetrial(cfg, data); %% check assert(all(data_out.trial{1}(:) == 1)); assert(sum(data_out.trial{2}(:) == 1) == 201); assert(sum(data_out.trial{2}(:) == 2) == 200); assert(all(data_out.trial{3}(:) == 3)); Could it be something else? Best, Eelke On 20 March 2015 at 15:14, andrea brovelli wrote: > Dear all, > > The bugzilla server seems to be down for maintenance. So I post it here. > > I noticed a possible bug in ft_redefinetrial: if I realign my data on a different event using the cfg.trl option, the output data is corretly aligned, BUT the output data structure contains ONLY the first trial of the input data structure, repeated for the exact number of trials. > > % In other words, if you do this... > cfg = []; > cfg.trl = trl; % N x 3 matrix = [ sample_start sample_end sample_offset ] > data_out = ft_redefinetrial(cfg, data_in); > > % And then plot the first 3 trials for the first channel.... > plot(data_out.time{1},data_out.trial{1}(1,:),'b') > hold on > plot(data_out.time{2},data_out.trial{2}(1,:),'r') > plot(data_out.time{3},data_out.trial{3}(1,:),'k') > > ... you will notice that you are plotting the first trial in the original data_in but shifted in time. > > Could you also check please ? > > I used the latest version of Fieldtrip fieldtrip-20150318 > > Thanks > > Andrea > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From mor2451 at gmail.com Wed Mar 25 16:21:02 2015 From: mor2451 at gmail.com (moran abilea) Date: Wed, 25 Mar 2015 17:21:02 +0200 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? Message-ID: hi there, my name is Moran Abilea, i'm a student from Israel who studies Software Engeenering and my final project is about EEG Speller. i want to use FieldTrip in my project, but when i tried to use ft_realtime funcions such as ft_realtime_signal proxy i couldn't use it becuase it isn't found in the version i downloaded from 2015 March 18. in fact, the whole Realtime folder isn't in this version so i can't use any of those functions what should i do? can someone pliz send me the folder with the source code? thanks, Moran -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephen.whitmarsh at gmail.com Wed Mar 25 16:54:40 2015 From: stephen.whitmarsh at gmail.com (Stephen Whitmarsh) Date: Wed, 25 Mar 2015 16:54:40 +0100 Subject: [FieldTrip] ft_channelrepair increases the size of the data file In-Reply-To: References: <002e01d05b3c$ce2c27b0$6a847710$@artinis.com> <659575409.939647.1425998222025.JavaMail.root@bcbl.eu> <003101d05b43$801dd6c0$80598440$@artinis.com> <21c1225818bd41b4b986588b34567574@EXPRD01.hosting.ru.nl> <550303A9.5070705@gmail.com> <8468aced403e44edb130570e4f13d10e@EXPRD01.hosting.ru.nl> Message-ID: Hi Vitória, To add on Eelke's advice: you can also just temporarily save it in a different variable, and put it back in your datastructure when done with your channelrepair. Cheers, Stephen On 21 March 2015 at 02:52, Eelke Spaak wrote: > Hi Vitória, > > It should be perfectly safe to delete cfg.previous (or data.cfg); no > FieldTrip functions depend on it. Note that you won't be able to run > ft_analysisprotocol on those data anymore, but that should be the only > limitation. > > Best, > Eelke > Op 21 mrt. 2015 01:38 schreef "Vitoria Piai" : > > Hi FT-ers, >> >> I think I won't be able to figure out this problem by diving into the >> ft_channelrepair code. So if you can shed any light to what could be going >> on, I'd be *very *thankful!! >> >> I followed Eelke's and JM's advice to split the data, fix some channels >> only for certain trials, then put the data together. All fine, except for >> the following. If I apply this procedure a large number of times (haven't >> figured out what the threshold is yet), the file size increases by a >> considerable amount. For example, when I fixed one channel for all trials, >> and then 7 channels for a couple of trials, the file went from 1GB to >> almost 3GB. Then Matlab slows down and eventually hangs, and the data >> (saved with '-v7.3') is "corrupted" once I try to load it to my workspace >> again. >> >> It seems to me that ft_channelrepair is keeping information in a >> 'previous' field such that every call to it will just keep adding bytes, is >> that the case? I'm planning to delete everything that is in cfg.previous >> and just keep the .trl field for later. Can you foresee I will run into >> unrepairable trouble later because of this? Is there any other field within >> the cfg.previous I should keep besides the .trl? >> >> Thanks a lot again!! >> Have a nice weekend, >> Vitória >> >> On 3/13/2015 9:08 AM, Schoffelen, J.M. (Jan Mathijs) wrote: >> >> Hi V, >> Note that you can use the trialinfo field in your data for bookkeeping, e.g. (assuming there is already such field in your data) >> >> data.trialinfo(:,end+1) = (1:numel(data.trial))’; >> cfg = []; >> cfg.trials = sel_to_be_repaired; >> cfg.etc >> data1 = ft_channelrepair(cfg,data); >> >> cfg = []; >> cfg.trials = sel_to_be_unrepaired >> data2 = ft_selectdata(cfg, data); >> >> data = ft_appenddata([],data1,data2); >> >> Although the order has now been changed, you’ll see that the last column of the trialinfo field still pertains to your original trial indices. >> >> JM >> >> >> >> On Mar 13, 2015, at 4:35 PM, Vitória Piai wrote: >> >> >> Thanks, Eelke! >> >> I had already done what you suggested. The issue is that ft_appenddata appends (;-) ) the data rather than restoring it back to normal. Since I defined all trials to repair at the very beginning, none of the indexes for those trials make sense anymore after the first call to ft_appenddata. I guess I'll work around it by keeping values rather than indices for the trials I need to repair. >> >> Thanks a lot, >> Hope all is well in Nijmegen!! >> >> On 3/11/2015 12:32 AM, Eelke Spaak wrote: >> >> Hi Vitoria, >> >> Yes, that is the expected behaviour of ft_channelrepair, because that >> is consistent with all other functions supporting a cfg.trials-option >> (i.e. select first, then do the work on what remains). >> >> It should be quite straightforward to do something like: >> >> cfg = []; >> cfg.trials = goodtrials; >> dat1 = ft_selectdata(cfg, data); >> >> cfg = []; >> ... >> cfg.trials = badtrials; >> dat2 = ft_channelrepair(cfg, data); >> >> datcmb = ft_appenddata([], dat1, dat2); >> >> to achieve what you want. >> >> Groetjes, >> Eelke >> >> On 10 March 2015 at 23:58, Vitoria Piai wrote: >> >> Hi all, >> >> I'm using ft_channelrepair, ($Id: ft_channelrepair.m 9520 2014-05-14 >> 09:33:28Z) to repair bad channels. I wanted to do it only for certain >> trials, and when I saw the option cfg.trials, I was really happy. >> However, if I pass cfg.trials with a vector rather than 'all', then the >> function does: >> ft_selectdata (lines 104, 108), >> then from line 352 onwards, things are converted back to normal. >> But if the cfg contained only some trials (as I'm trying to use it for), >> these are not restored back, and so I'm left with a data structure that >> only has as many trials as my cfg had. >> >> I was just wondering whether that is the expected behaviour of >> ft_channelrepair and that I should restore things myself (presumably >> with ft_append-like functions). If so, it would be nice if the help on >> this function would say that... >> If I'm simply using a too old version, my apologies. (I should start >> working with github, I know!!) >> >> Thanks a lot, >> Vitoria >> >> >> >> _______________________________________________ >> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> _______________________________________________ >> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://mailman.science.ru.nl/mailman/listinfo/fieldtrip >> >> >> _______________________________________________ >> fieldtrip mailing listfieldtrip at donders.ru.nlhttp://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 jhouck at mrn.org Wed Mar 25 17:03:26 2015 From: jhouck at mrn.org (Jon Houck) Date: Wed, 25 Mar 2015 10:03:26 -0600 Subject: [FieldTrip] Please distribute: 3 postdoctoral positions at the University of New Mexico Message-ID: The UNM Center on Alcoholism, Substance Abuse, and Addictions (CASAA) announces three new postdoctoral positions on our NIAAA Institutional Research Training grant. The goal of the grant is to prepare future NIH scientists to conduct research to (1) elucidate the processes of change in drinking behavior, (2) develop and test effective methods to effect change through self-change, treatment and indicated prevention, and (3) develop and test models to disseminate knowledge of effective interventions to diverse populations. Postdoctoral fellows work with one of the core training faculty: Barbara S. McCrady (PI and training program director), Eric Claus, Jon Houck, Theresa Moyers, Matthew Pearson, J. Scott Tonigan, Kamilla Venner, Katie Witkiewitz, or W. Gill Woodall. In anticipation of renewal funding, *we have three openings to support postdoctoral fellows in the 2015-2016 academic year*. Applicants must meet the following criteria: (1) demonstrated interest in the alcohol field as evidenced by prior coursework, research, and/or clinical experience; (2) a record of research productivity as evidenced by research presentations and peer-reviewed publications; and (3) a commitment to a career in alcohol research. All fellows must be US citizens or permanent resident aliens. As part of the training program, fellows must be engaged in full-time research training, participate in a weekly Addictions seminar, define a training plan and achieve specific competencies during each year, and limit outside employment. For continued support post-doctoral fellows will be expected to prepare and successfully submit an NIH grant application. The training program provides a NIH-defined stipend (based on years since doctoral degree), tuition remission, support for professional travel up to $2000 per year, and support for training- and research-related expenses. Interested applicants should submit a curriculum vitae, 3 letters of recommendation, 1-page statement of interest, letter stating their qualifications for and interest in the training grant, and their graduate transcripts to Barbara McCrady. Applications will be reviewed on a rolling basis. Submit all materials electronically to: Barbara S. McCrady, Ph.D. Distinguished Professor of Psychology Director, Center on Alcoholism, Substance Abuse, and Addictions (CASAA) University of New Mexico 2650 Yale Blvd. SE Albuquerque, NM 87106 bmccrady at unm.edu See http://casaa.unm.edu/traininggrant.html for more information about the training program -- Jon M. Houck, Ph.D. Assistant Professor of Translational Neuroscience Mind Research Network Research Assistant Professor Department of Psychology Center on Alcoholism, Substance Abuse, and Addictions University of New Mexico -------------- next part -------------- An HTML attachment was scrubbed... URL: From r.oostenveld at donders.ru.nl Thu Mar 26 08:12:55 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Thu, 26 Mar 2015 08:12:55 +0100 Subject: [FieldTrip] BIH @ Imperial College London: Bring the Human Brain Projects of the world to one place References: Message-ID: Begin forwarded message: > From: Caroline Li > > Co-Chaired by Prof Karl Friston & Prof Yike Guo @ Imperial College London (Aug 31 – Sep2, 2015), BIH’15 crosses the disciplines of neuroscience, cognitive science, computer science, signal processing, and neuroimaging. It also draws special attention to informatics for brain science, human behaviour and health. > > It involves leaders from three of the biggest brain initiatives in the world. BIH’15 accepts full paper submission or abstract only submission. Please allow me to send call for paper here: > Keynote Speakers > · Allan Jones, CEO, Allen Institute for Brain Science, USA; > > · Henry Markram, Director, Blue Brain Project; Coordinator, Human Brain Project, EPFL, Switzerland; > > · David Van Essen, PI, Human Connectome Project, Washington University School of Medicine, USA; > > Feature Speakers > · Giorgio Ascoli, (Founding Director, Center for Neural Informatics, George Mason University, USA); > > · Henry Kennedy, (Director of Research, Stem-cell and Brain Research Institute, France); > > · Barbara Sahakian, (University of Cambridge, UK); > > · Nelson Spruston, (Scientific Program Director, Howard Hughes Medical Institute (HHMI), USA); > > · Paul Verschure, (Director, the Lab of SPECS at Universitat Pompeu Fabra (UPF), Spain); > > ===================================================== > General Chairs: > · Karl Friston, (Scientific Director, Wellcome Trust Centre for Neuroimaging, University College London, UK); > · Yike Guo, (Director of Data Science Institute, Imperial College London, UK); > > > Program Chairs: > > · Aldo Faisal, Imperial College London & MRC Clinical Sciences Centre, UK, > · Sean Hill, EPFL, Switzerland, > · Hanchuan Peng, Allen Institute for Brain Science, USA; > > > Workshop/Special-Session Chairs: > > · Andreas Holzinger, Medical University Graz & Graz University of Technology, Austria; Zhisheng Huang, Vrije University of Amsterdam, Netherlands, David Powers, Flinders University of South Australia, Australia; > > > Publicity Chairs: > > · Jessica Turner, Georgia State University, USA; Juan D. Velasquez, University of Chile, Chile; Yi Zeng, Institute of Automation, Chinese Academy of Sciences, China; > > > Local Organizing Chairs: > > · Thomas Henis, Imperial College London, UK; Kai Sun, Imperial College London, UK; Chao Wu, Imperial College London, UK; > > > Exhibition/Sponsorship Chair: > > · Caroline Li, University Kent, UK; > > > Steering Committee Co-Chairs: > > · Ning Zhong, Maebashi Institute of Technology, Japan; Jiming Liu, Hong Kong Baptist University, Hong Kong. > > > > ***************** > > Conference Theme: > > Brain informatics has emerged as a distinct field of research. It crosses the disciplines of neuroscience, cognitive science, computer science, signal processing, and neuroimaging technologies. The data driven nature of brain research made brain informatics an important field of data science. Following the success of past conferences in this series, BIH’15 will take place at Imperial College London, in UK. For the first time, BIH gathers the researchers from major international brain research projects to form a forum for reviewing the progress of brain informatics research and its applications to human health and building up international collaboration. The conference will also organise an exhibition from industrial and research community. > > > > BIH’15 draws special attention to informatics for brain science, human behaviour and health. BIH’15 will address informatics approaches to both the brain and behaviour research with a strong emphasis on emerging trends of big data analysis and management technology for brain research, behaviour learning, and real-world applications of brain science in human health and wellbeing. > > > > BIH’15 welcomes paper submissions (full paper), abstract only submissions. Both research and application papers are solicited. All submitted papers will be reviewed on the basis of technical quality, relevance, significance and clarity. Accepted full papers will be included in the proceedings by Springer LNCS/LNAI. > > > > Tutorial, Satellite symposium (workshop) and Special-Session proposals and Industry/Demo-Track papers are also welcome. > > > > ***************** > > IMPORTANT DATES: > > ***************** > > Satellite symposium proposal submission: March 15, 2015/ > > Notification of satellite symposium acceptance: March 30, 2015/ > > Submission of full papers: April 19, 2015/ > Submission of abstracts: May 20, 2015/ > > Submission of satellite symposium papers: May 20, 2015/ > > Notification of full paper acceptance: May 25, 2015/ > > Notification of abstract acceptance: June 10, 2015/ > > Notification of satellite symposium paper acceptance: June 10, 2015/ > > Tutorial proposal submission: May 15, 2015/ > > Satellite symposiums: August 30, 2015/ > > > > ================================= > > PAPER SUBMISSIONS & PUBLICATIONS: > > > > TYPE-I (Full Paper Submissions; Submission Deadline: April 5, 2015): > We accept full paper submissions with a maximum paper length of up to 10 pages, in Springer LNCS format: > > http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0. > All full length papers accepted (and all special sessions’ full length papers) will be published by Springer as a volume of the series of LNCS/LNAI. > > > > TYPE-II (Abstract Submissions; Submission Deadline: May 20, 2015): > > > > Each abstract is limited to 500 words. Experimental research is particularly welcome. Accepted abstract submissions will be included in the conference program, and will be published as a single, collective proceedings volume. > > > > Title: Include in the title of the abstract all words critical for a subject index. Write your title in sentence case (first letter is capitalized; remaining letters are lower case). Do not bold or italicize your full title. > > > > Author: List all authors who contributed to the work discussed in the abstract. The presenting author must be listed in the first author slot of the list. Be prepared to submit contact information as well as conflict of interest information for each author listed. > > > > Abstract: Enter the body of the abstract and attach any applicable graphic files or tables here. Do not re-enter the title, author, support, or other information that is collected in other steps of the submission form. > > > > Presentation Preference: Authors may select from three presentation formats when submitting an abstract: “poster only,”, “talk preferred” or “no preference.” The “talk preferred” selection indicates that you would like to give a talk, but will accept a poster format if necessary. Marking “poster only” indicates that you would not like to be considered for an oral-presentation session. Selecting “no preference” indicates the author’s willingness to be placed in the best format for the program. > > > > Each paper or abstract requires one sponsoring attendee (i.e. someone who registered and is attending the conference). A single attendee can not sponsor more than two abstracts or papers. > > > > Oral presentations will be selected from both full length papers and abstracts. > > > > *** Post-Conference Journal Publication *** > > > > The BIH conferences have the formal ties with Brain Informatics journal (Springer, http://www.springer.com/40708). Accepted papers from the conference, including their Best Paper Award papers, will be expended and revised for possible inclusion in the Brain Informatics journal each year. It is fully sponsored and no any article-processing fee charged for BIH authors. > > > Selected submissions will be considered for publication in special issues of international journals after their papers are extended to a full-length paper and pass a review process. More information can be found at http://www.bih-amt.com/publications/ > > > *** Topics and Areas *** > > > > Please find the topics and areas of interest of the 2015 International Conference on Brain Informatics and Health (BIH’15) at http://www.bih-amt.com/call-for-papers/topics/ > > > *** AMT’15 Session *** > > > > The advance of wearable sensor technology makes the monitoring of human behavior and life style becomes feasible. This development gives the active media technology a new dimension which is more closely related to the healthcare and cognitive studies. Following the success of past conferences in this series, AMT’15 will be jointly held with > > BIH’15 as a special session. > > > > *** Contact Information *** > > > > Chao Wu, Imperial College London, UK > > > > > Aldo Faisal, Imperial College London, UK > > For sponsorship, please contact: > Caroline Li (Ph.D)|Tel: +44(0)1634 202987 | E-Mail : c.li at kent.ac.uk > ==================================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From martina.rossi76 at yahoo.it Thu Mar 26 08:48:38 2015 From: martina.rossi76 at yahoo.it (Martina Rossi) Date: Thu, 26 Mar 2015 07:48:38 +0000 (UTC) Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions In-Reply-To: References: Message-ID: <1202116823.2558923.1427356118074.JavaMail.yahoo@mail.yahoo.com> Hi David, Thank so much for the reference and all the useful details, indeed very helpful :) Best,Martina Il Lunedì 23 Marzo 2015 5:03, David Groppe ha scritto: Hi Martina,    Balanced sample sizes are typically recommended for conventional parametric independent samples tests (e.g., t-tests, ANOVAs) because it makes the tests less sensitive to differences in variation between the populations being compared. If the populations being compared differ in variance, having more observations from the population with less variability will make these tests overly permissive (i.e., the true false positive rate will be greater than your nominal alpha level). If you have more observations from the population with greater variability, the tests become overly conservative.    A few years ago, my colleagues and I simulated some EEG data and found that permutation tests exhibit a qualitatively similar sensitivity to differences in variance between populations (see below). If you're concerned about such a difference in your data you could do as has already been suggested and use a subset of data so that the number of observations between samples is the same. Alternatively you could use a permutation test based on variants of the t-statistic that are less sensitive to differences in variance. In our paper below, we investigated two variants, Welch's t and t_dif. Welch's t proved a bit less sensitive to differences in variance and was only slightly less powerful than the conventional t-statistic. t_dif was markedly insensitive to differences in variance but was significantly less powerful. However, I would guess that using t_dif or Welch's t are likely more powerful than discarding trials (though we didn't investigate that option in the paper).       cheers,          -David Groppe, D.M., Urbach, T.P., & Kutas, M. (2011) Mass univariate analysis of event-related brain potentials/fields II: Simulation studies. Psychophysiology, 48(12) pp. 1726-1737, DOI: 10.1111/j.1469-8986.2011.01272.x. www.cogsci.ucsd.edu/~dgroppe/PUBLICATIONS/mass_uni_preprint2.pdf On Thu, Mar 19, 2015 at 4:06 AM, Martina Rossi wrote: Dear Stephen and Joram, Thank so much for your feedback,I will check out the suggested material, Best,Martina Il Mercoledì 18 Marzo 2015 20:43, Stephen Whitmarsh ha scritto: You can also check out this video of Robert. Apologies for the quality - not of the talk, but of the recording :-) At 14:45 he actually mentions unequal number of trials between conditions. https://www.youtube.com/watch?v=vOSfabsDUNg Cheers, Stephen On 18 March 2015 at 19:33, Stephen Whitmarsh wrote: I should add that (1) is typically done within subjects, and (2) over subjects. Cheers, Stephen  On 18 March 2015 at 19:20, Stephen Whitmarsh wrote: Dear Martina, It might help to distinguish two aspects of cluster-based statistic. 1) the statistical approuch that you will use to determine whether a time-channel-datapoint / time-frequency-channel-datapoint / time-frequency-voxel-datapoint is considered significant different between conditions. 2) the statistical approuch that you will use to determine whether a cluster of time-channel-datapoints / time-frequency-channel-datapoints / time-frequency-voxel-datapoints is considered significantly different between conditions. When you talk about cluster statistics, you probably think about the second part. But this might not be what you should initially be concerned with when thinking about e.g. different numbers of trials between conditions. Rather, consider what statistical tests you (can) use to compare your time-frequency values between conditions (within subjects). This can be, e.g., a t-test, a nonparametric (e.g. montecarlo) test, or any test, for that matter. As far as my limited knowledge of statistics goes, in most simple and non-extreme cases, unequal number of trials that does not have to increase your chance of type I errors, rather that of type 2 (you'll be insensitive to differences if you don't have enough observations in one condition due to noisy estimate of means/distribution). But in any case it's a simple question to google or ask a statistician. Now, after you are happy with and confident about the between conditions statistical test, consider how the cluster statistics might help you. First of all, how does it determine whether a cluster is significantly different between conditions? There are different options, but the gist is that it takes your significant statistical numbers of step (1), adds them up when they belong to the same cluster (based on whether they are neigbourings in time/freq/space with other significant numbers), takes the maximum of these summed up clusters (there might be more than one cluster), and then compares this one value to the same taken from a(non-parametric) monte-carlo distribution of the null hypothesis based on permuting the values over conditions (and then calculating the maximum sum). The Maris and Oostenveld paper explains it in more detail. The reason for doing cluster-statistics is that its a smart way of dealing with multiple comparisons over many time x frequency x channels (or space). The method is blind for your decisions about how its computed for each point in time x frequency x channels (or space). I find the FieldTrip statistics functions, their configurations etc., and the way they interact confusing at times, but I hope this helps to clear it up a bit. Long story short - I think your question does not limit itself to cluster statistics and at the same time is much simpler. It's all about (1).  Best wishes, Stephen There are two separate steps cluster statistics (as implemented in FieldTrip, but in general as well). On 18 March 2015 at 14:51, Joram van Driel wrote: Hi Martina, In general, I'd advice to do some kind of trial-selection procedure when comparing error versus correct trials, in order to trial-count-match the two conditions. Otherwise you run into problems considering: SNR (higher for the correct condition), and RT (errors are usually faster, resulting in a time-on-task confound). What I always do is pick from the correct condition a similar number of trials that are close to the RT distribution of the error trials (i.e. the faster correct trials). That way you solve both problems at once (and probably the cluster-based permutation test in field trip will work as well, as a bonus ;)). Best,Joram On Wed, Mar 18, 2015 at 2:31 PM, Martina Rossi wrote: Dear All, I would like to get some feedback from the community about a statistical analysis problem I need to tackle with my study.I want to apply the cluster-based permutation tests on time-frequency data considering two conditions (correct vs error).Unfortunately, these two conditions have different sizes (correct >> error).Right now, I am only considering subjects having a ratio "error/correct" bigger than 1/5, yet this is only an arbitrary threshold I set.The question is the following:is there a formal way to identify a threshold by which two conditions can be realiably compared with the cluster-based permutation tests?If the cluster-based approach is not suitable in this scenario, is there any other approach you would suggest?I shall perhaps point out that I am working on EEG data recorded with a 32 channel system (impedance levels < 10 kΩ). Looking forward to hear your feedback :) Kind Regards,Martina Rossi _______________________________________________ fieldtrip mailing list fieldtrip at donders.ru.nl http://mailman.science.ru.nl/mailman/listinfo/fieldtrip -- Joram van DrielPostdoc @ Vrije Universiteit AmsterdamCognitive Psychology _______________________________________________ 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 caspervanheck at gmail.com Thu Mar 26 11:23:13 2015 From: caspervanheck at gmail.com (Casper van Heck) Date: Thu, 26 Mar 2015 11:23:13 +0100 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? In-Reply-To: References: Message-ID: You probably downloaded the 'lite' version or something. Check the Fieldtrip site, especially the download page ; there are multiple options. You should make sure you download the whole thing; just putting a single function in might give odd behaviour. On Wed, Mar 25, 2015 at 4:21 PM, moran abilea wrote: > hi there, > my name is Moran Abilea, i'm a student from Israel who studies Software > Engeenering and my final project is about EEG Speller. > i want to use FieldTrip in my project, but when i tried to use ft_realtime > funcions such as ft_realtime_signal proxy i couldn't use it becuase it > isn't found in the version i downloaded from 2015 March 18. > in fact, the whole Realtime folder isn't in this version so i can't use > any of those functions > what should i do? > can someone pliz send me the folder with the source code? > thanks, > Moran > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjordanov at besa.de Thu Mar 26 11:49:35 2015 From: tjordanov at besa.de (tjordanov at besa.de) Date: Thu, 26 Mar 2015 11:49:35 +0100 Subject: [FieldTrip] Can I simulate multiple dipoles in realistic head model? In-Reply-To: References: Message-ID: <001801d067b2$8c9ec780$a5dc5680$@de> Hi Gamaliel, I don’t know how this works within FieldTrip, however, we have a free tool for simulating data also with realistic head models. If you want to try it out you could download it here: http://www.besa.de/downloads/besa-simulator/ There is an option to use realistic FEM approximations or to load your own models. However, the program is optimized to work with models generated with BESA MRI and if you want to load models generated with other tools you have to save the models in the required format. I am not sure that it is easy to adapt your models for that program but you can try. Best regards, Todor From: fieldtrip-bounces at science.ru.nl [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of gamaliel huerta urrea Sent: Dienstag, 24. März 2015 21:01 To: fieldtrip at science.ru.nl Subject: [FieldTrip] Can I simulate multiple dipoles in realistic head model? Hi I need simulate dipolar sources in a realistic head model, however I want know if can import surfaces from freesurfer or brainstorm. I have problems to performs the segmentation and the electrodes alignment, Finally I would like to know how could simulate multiple dipoles on different parts of realistic head model to evaluate the location later. regards Gamaliel Huerta Urrea Estudiante Ingeniería Civil Biomédica Universidad de Valparaíso -------------- next part -------------- An HTML attachment was scrubbed... URL: From e.maris at donders.ru.nl Thu Mar 26 12:27:17 2015 From: e.maris at donders.ru.nl (Maris, E.G.G. (Eric)) Date: Thu, 26 Mar 2015 11:27:17 +0000 Subject: [FieldTrip] Cluster-based permutation tests on time-frequency and size of conditions Message-ID: Dear colleagues, I would like to reply to this post by David: Hi Martina, Balanced sample sizes are typically recommended for conventional parametric independent samples tests (e.g., t-tests, ANOVAs) because it makes the tests less sensitive to differences in variation between the populations being compared. If the populations being compared differ in variance, having more observations from the population with less variability will make these tests overly permissive (i.e., the true false positive rate will be greater than your nominal alpha level). If you have more observations from the population with greater variability, the tests become overly conservative. A few years ago, my colleagues and I simulated some EEG data and found that permutation tests exhibit a qualitatively similar sensitivity to differences in variance between populations (see below). If you're concerned about such a difference in your data you could do as has already been suggested and use a subset of data so that the number of observations between samples is the same. Alternatively you could use a permutation test based on variants of the t-statistic that are less sensitive to differences in variance. In our paper below, we investigated two variants, Welch's t and t_dif. Welch's t proved a bit less sensitive to differences in variance and was only slightly less powerful than the conventional t-statistic. t_dif was markedly insensitive to differences in variance but was significantly less powerful. However, I would guess that using t_dif or Welch's t are likely more powerful than discarding trials (though we didn't investigate that option in the paper). cheers, -David I agree with David that the main issue with unequal sizes of the experimental conditions reduces your statistical sensitivity (as compared to the situation where the number of subjects is distributed equally over the conditions; the equal-n case). However, one should NEVER remove subjects from one experimental condition in order to obtain this equal-n case, at least not when a permutation test is being used. A permutation test controls the false alarm rate regardless of how the subjects/trials are distributed across the experimental conditions. So, the permutation test is not less sensitive, as mentioned by David, but it is completely INSENSITIVE to aspect of your design, at least when it comes to false alarm rate control. However, for every statistical test I know of, its statistical sensitivity (power) IS sensitive (notice the different meaning of the word sensitive in this second occurrence) to how the subjects/trials are distributed over the conditions. best, Eric Maris -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcpiastra at libero.it Thu Mar 26 06:11:20 2015 From: mcpiastra at libero.it (mcpiastra) Date: Wed, 26 Mar 2015 05:11:20 +0000 Subject: [FieldTrip] =?iso-8859-1?q?mcpiastra=40libero=2Eit?= Message-ID: <8A6EE31E29158472446E98CC49F1D47D@hirojin.univnet.jp> Oilà! Ma... è da un sacco che non ci sentiamo!, http://shqiponja.net/kf/xvqagodvmdzbdqwcsrlblfdwteadhlm.kcjssufpkqnqwrbby 3/26/2015 5:11:20 PM -------------- next part -------------- An HTML attachment was scrubbed... URL: From mor2451 at gmail.com Fri Mar 27 15:44:28 2015 From: mor2451 at gmail.com (moran abilea) Date: Fri, 27 Mar 2015 17:44:28 +0300 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? In-Reply-To: References: Message-ID: maybe... can you pliz send me the "full version" rar? i can't get into the download page for a week and i don't know why that's so annoying to know that i can't get into the "download page" :( thanks for all the help and i hope the problem will be fixed very soon moran abilea On Thu, Mar 26, 2015 at 1:23 PM, Casper van Heck wrote: > You probably downloaded the 'lite' version or something. Check the > Fieldtrip site, especially the download page > ; there are multiple options. > You should make sure you download the whole thing; just putting a single > function in might give odd behaviour. > > On Wed, Mar 25, 2015 at 4:21 PM, moran abilea wrote: > >> hi there, >> my name is Moran Abilea, i'm a student from Israel who studies Software >> Engeenering and my final project is about EEG Speller. >> i want to use FieldTrip in my project, but when i tried to use >> ft_realtime funcions such as ft_realtime_signal proxy i couldn't use it >> becuase it isn't found in the version i downloaded from 2015 March 18. >> in fact, the whole Realtime folder isn't in this version so i can't use >> any of those functions >> what should i do? >> can someone pliz send me the folder with the source code? >> thanks, >> Moran >> >> _______________________________________________ >> 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 Fri Mar 27 16:22:04 2015 From: jan.schoffelen at donders.ru.nl (Schoffelen, J.M. (Jan Mathijs)) Date: Fri, 27 Mar 2015 15:22:04 +0000 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? In-Reply-To: References: Message-ID: Moran, As was notified on this discussion list and as is mentioned on the FieldTrip website, there was anticipated downtime of the ftp-server this week due to physical migration of our lab’s compute facilities. See http://www.fieldtriptoolbox.org, and the first link that you can follow in the red banner that says: "Please be aware that there will be some website, ftp and bugzilla downtime. I expect services to be up and running again soon. Best wishes, Jan-Mathijs On Mar 27, 2015, at 3:44 PM, moran abilea > wrote: maybe... can you pliz send me the "full version" rar? i can't get into the download page for a week and i don't know why that's so annoying to know that i can't get into the "download page" :( thanks for all the help and i hope the problem will be fixed very soon moran abilea On Thu, Mar 26, 2015 at 1:23 PM, Casper van Heck > wrote: You probably downloaded the 'lite' version or something. Check the Fieldtrip site, especially the download page; there are multiple options. You should make sure you download the whole thing; just putting a single function in might give odd behaviour. On Wed, Mar 25, 2015 at 4:21 PM, moran abilea > wrote: hi there, my name is Moran Abilea, i'm a student from Israel who studies Software Engeenering and my final project is about EEG Speller. i want to use FieldTrip in my project, but when i tried to use ft_realtime funcions such as ft_realtime_signal proxy i couldn't use it becuase it isn't found in the version i downloaded from 2015 March 18. in fact, the whole Realtime folder isn't in this version so i can't use any of those functions what should i do? can someone pliz send me the folder with the source code? thanks, Moran _______________________________________________ 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 mor2451 at gmail.com Fri Mar 27 16:28:36 2015 From: mor2451 at gmail.com (moran abilea) Date: Fri, 27 Mar 2015 15:28:36 +0000 Subject: [FieldTrip] general questions about the FieldTrip Message-ID: hi again, i have another question/s, but this time they are genra. but first let me explain what i need from field trip: i'm working for extracting from 14 channels EPOC Emotive the EEG raw data as contious data, send trigger if i want to display the raw data or not and then process the data with SVM. all this process is for creating EEG speller in Matlab. so my questions are: 1. i assume the field trip has constant "delay", the delay i reffer to is between the time of view the signal and the real time data transfer in the buffer. does anyone knows what is the delay time somehow? 2. where can i find how to open stream for a file? 3. using triggers: can i send time stamp in my configuration in order to know when to display the data that i need for the EEG speller? 4. what to do in order to use the EPOC Emotive? do i need to set some new configurations for matlab? to download any SDK? etc any kind of help will be welcomed, Moran Abilea -------------- next part -------------- An HTML attachment was scrubbed... URL: From mor2451 at gmail.com Fri Mar 27 16:30:31 2015 From: mor2451 at gmail.com (moran abilea) Date: Fri, 27 Mar 2015 18:30:31 +0300 Subject: [FieldTrip] i don't have the functions of ft_realtime what to do? In-Reply-To: References: Message-ID: yeah i noticed that, i just forgot when this will be ended thanks, Moran Abilea On Fri, Mar 27, 2015 at 6:22 PM, Schoffelen, J.M. (Jan Mathijs) < jan.schoffelen at donders.ru.nl> wrote: > Moran, > > As was notified on this discussion list and as is mentioned on the > FieldTrip website, there was anticipated downtime of the ftp-server this > week due to physical migration of our lab’s compute facilities. > See http://www.fieldtriptoolbox.org, and the first link that you can > follow in the red banner that says: "Please be aware that there will be > some website, ftp and bugzilla downtime. > I expect services to be up and running again soon. > > Best wishes, > Jan-Mathijs > > > > > On Mar 27, 2015, at 3:44 PM, moran abilea wrote: > > maybe... > can you pliz send me the "full version" rar? i can't get into the download > page for a week and i don't know why that's so annoying to know that i > can't get into the "download page" :( > thanks for all the help and i hope the problem will be fixed very soon > moran abilea > > On Thu, Mar 26, 2015 at 1:23 PM, Casper van Heck > wrote: > >> You probably downloaded the 'lite' version or something. Check the >> Fieldtrip site, especially the download page >> ; there are multiple options. >> You should make sure you download the whole thing; just putting a single >> function in might give odd behaviour. >> >> On Wed, Mar 25, 2015 at 4:21 PM, moran abilea wrote: >> >>> hi there, >>> my name is Moran Abilea, i'm a student from Israel who studies Software >>> Engeenering and my final project is about EEG Speller. >>> i want to use FieldTrip in my project, but when i tried to use >>> ft_realtime funcions such as ft_realtime_signal proxy i couldn't use it >>> becuase it isn't found in the version i downloaded from 2015 March 18. >>> in fact, the whole Realtime folder isn't in this version so i can't use >>> any of those functions >>> what should i do? >>> can someone pliz send me the folder with the source code? >>> thanks, >>> Moran >>> >>> _______________________________________________ >>> 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 r.oostenveld at donders.ru.nl Fri Mar 27 16:53:34 2015 From: r.oostenveld at donders.ru.nl (Robert Oostenveld) Date: Fri, 27 Mar 2015 16:53:34 +0100 Subject: [FieldTrip] general questions about the FieldTrip In-Reply-To: References: Message-ID: Hi Moran 1) The fieldtrip buffer by itself has a delay that can be as small as 5ms. But the actual delay in the data stream from the electronics to the MATLAB side of the buffer depends on quite a number of parameters and can be much larger. Sending data in blocks (i.e. multiple samples are bufferend and sent in one go), bluetooth and USB all cause delays before you are able to process the samples in the data block. Even the USB connection and whether you are sharing it with another device (i.e. mouse or USB hard drive on the same USB hubor port) can affect the delay and can cause jitter (variation in the delay). I suggest you look at http://www.fieldtriptoolbox.org/example/measuring_the_timing_delay_and_jitter_for_a_real-time_application for a demonstration how you can quantify the That page has data for our CTF MEG system, which has a blocksize of ~100ms and does some online processing (head localization) prior to forwarding the data, hence the delay of 150ms that we see here makes sense. 2) On http://www.fieldtriptoolbox.org/getting_started/realtime you can find some getting started instructions. Reading data from a file rather than from a realitme buffer just means that you specify the name of the file. If you look at http://www.fieldtriptoolbox.org/example/ft_realtime_signalviewer you can see how you can simulate a real time data stream. Just replace cfg.dataset with an EEG file name in ft_realtime_signalviewer and you are not plotting real time data, but data from file. 3) your P300 application can send events to the fieldtrip buffer and the signal processing application can read them and act upon the data referred to in the events. You can also make a single application that does both, or make two applications that communicate events separate from the data stream. 4) I recall that some emotiv software needed to be installed, but don’t know whether that requires the full SDK to be installed. I don’t have an emotiv epoc myself. Please see http://www.fieldtriptoolbox.org/development/realtime/emotiv and feel free to add your findings to that (wiki) page. best regards, Robert On 27 Mar 2015, at 16:28, moran abilea wrote: > hi again, > > i have another question/s, but this time they are genra. > but first let me explain what i need from field trip: i'm working for extracting from 14 channels EPOC Emotive the EEG raw data as contious data, send trigger if i want to display the raw data or not and then process the data with SVM. all this process is for creating EEG speller in Matlab. > > so my questions are: > > 1. i assume the field trip has constant "delay", the delay i reffer to is between the time of view the signal and the real time data transfer in the buffer. does anyone knows what is the delay time somehow? > > 2. where can i find how to open stream for a file? > > 3. using triggers: can i send time stamp in my configuration in order to know when to display the data that i need for the EEG speller? > > 4. what to do in order to use the EPOC Emotive? do i need to set some new configurations for matlab? to download any SDK? etc > > any kind of help will be welcomed, > Moran Abilea > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip From S.Pizzamiglio at uel.ac.uk Sat Mar 28 14:04:44 2015 From: S.Pizzamiglio at uel.ac.uk (Sara Pizzamiglio) Date: Sat, 28 Mar 2015 13:04:44 +0000 Subject: [FieldTrip] Missing channel repair through triangulation - *.sfp files Message-ID: <023526F16D67EC43A4FE7F302F5A2D0E1C93F9F1@ST-EXMB1.uel.ac.uk> Dear all, I am trying to reconstruct two missing channels from my dataset through the function channelrepair and the triangulation method. In order to do that the electrode layout has to be specified in the structure: cfg.layout = '*.sfp'; I am recording data through an ANT system (ASA 4.5 software) and I am using a 128 channels + HEOG and VEOG WaveGuard cap from ant-neuro, which should be a 10-10 layout. Which *.sfp file should I use to represent my electrodes layout and reconstruct my missing channels?! Thank you :) --------------------------------------------------------------------------------------- This email has been scanned for email related threats and delivered safely by Mimecast. For more information please visit http://www.mimecast.com --------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From tamaonvaliaikainenmaili at gmail.com Sat Mar 28 14:54:13 2015 From: tamaonvaliaikainenmaili at gmail.com (hm ham) Date: Sat, 28 Mar 2015 15:54:13 +0200 Subject: [FieldTrip] EEG MNE with standard_bem and statistics sanity Message-ID: Hello fellow fieldtrippers, I'm using fieldtrip to do a MNE for EEG data with no subject MRIs and I have a few questions to which I can't get a straight answer from tutorials or from mailing list history. I guess this is sort of a sanity check. First, I'm wondering about the correct sourcemodel, as loading the standard_bem and setting the third mesh as the source points in ft_prepare_leadfield gives an error: Warning: dipole lies on boundary of volume model. Code: % Electrodes, vol, sourcemodel all set in same scale with ft_convert_units vol = load('standard_bem'); cfg = []; cfg.elec = elec_aligned; % electrodes aligned to skin surface cfg.grid.pos = vol.bnd(3).pnt; % source points cfg.grid.inside = 1:size(vol.bnd(3).pnt,1); cfg.vol = vol; cfg.reducerank = 3; leadfield = ft_prepare_leadfield(cfg); Using the code below works: vol = load('standard_bem'); sourcemodel = ft_read_headshape('cortex_8196.surf.gii'); cfg = []; cfg.elec = elec_aligned; % electrodes aligned to skin surface cfg.grid.pos = sourcemodel; % source points cfg.grid.inside = 1:size(sourcemodel,1); cfg.vol = vol; cfg.reducerank = 3; leadfield = ft_prepare_leadfield(cfg); But as the http://www.fieldtriptoolbox.org/tutorial/headmodel_eeg seems to suggest the third mesh in vol should be the brain? Or is the third compartment there just for conduction calculations? As using the sourcemodel 'cortex_8196.surf.gii' at least gave an output I went forward with those for now, to see what other problems I'd encounter. Running the MNE: cfg = []; cfg.elec = elec_aligned; cfg.method = 'mne'; cfg.grid = leadfield; cfg.vol = vol; cfg.mne.prewhiten = 'yes'; cfg.mne.lambda = 60; %Hmmm? cfg.mne.scalesourcecov = 'yes'; cfg.mne.normalize = 'yes'; cfg.channel = 'all'; cond_12_source{subject_id} = ft_sourceanalysis(cfg,cond_12{subject_id}); So secondly, I'm concerned with the lambda value, as different tutorials give very different advice ranging from 3 to 1e8. Running the MNE with 3 seems to give very unstable results when comparing the results between subjects or conditions. The data is somewhat contaminated with leftover eye-movement artefacts (removed with ICA). And that 3 is from the tutorial where the data is from MEG. So a bigger lambda is in order, but how big? Or just let the minimumnormestimate.m calculate it from the data? I have to point out that the eye-movements are somewhat spread around the trial durations and not present in the calculation window of the .cov field from ft_timelockanalysis. Should I maybe calculate the .cov field from the whole trial? Third, there has been talk of MNE statistics in the mailing list, and it seems that the ft_timelockstatistics will do the job if a neighbours structure is provided. I build the neighbours structure from the sourcemodel mesh like this: sourcemodel = ft_read_headshape('cortex_8196.surf.gii'); nsources = length(sourcemodel.pnt); neighbours=struct; for i=1:nsources neighbours(i).label = num2str(i); neighb_nodes = sourcemodel.tri((sourcemodel.tri(:,1)==i | sourcemodel.tri(:,2)==i | sourcemodel.tri(:,3)==i),:); neighb_nodes = unique(neighb_nodes)'; idx = (neighb_nodes ~= i); neighb_nodes = neighb_nodes(idx); for k=1:length(neighb_nodes) neighbours(i).neighblabel{k} = num2str(neighb_nodes(k)); end end This seemed to give reasonable neighbours and just going by distance gave some sources that were on the other side of a gyrus. Although now the distances are not uniform. I also had to tweak the data structures a little bit, labels and such. Then I ran the tests with: cfg=[]; cfg.parameter = 'avg.pow'; cfg.method = 'montecarlo'; cfg.statistic = 'depsamplesT'; cfg.parameter = 'avg'; cfg.correctm = 'cluster'; cfg.clusterstatistic = 'maxsum'; cfg.minnbchan = 2; cfg.numrandomization = 1000; cfg.tail = 1; cfg.correcttail ='alpha'; cfg.alpha = 0.05; cfg.latency = [0.4 0.5]; cfg.avgovertime = 'yes'; cfg.neighbours = neighbours; cfg.design = [1:15 1:15;ones(1,15), ones(1,15)*2]; cfg.uvar = 1; cfg.ivar = 2; cond1_stat = ft_timelockstatistics(cfg, cond_11_source{:}, cond_12_source{:}); Looking at the resulting clusters from ft_timelockstatistics there were clusters that when plotted showed disconnected sources. For example, plotted like this for the first cluster: paint = ones(8196,3); indx = find(cond1_stat.posclusterslabelmat == 1); paint(indx,2) = 0; ft_plot_mesh(sourcemodel,'vertexcolor',paint); Gave the output in the attachment, in that case the third source is atleast close, but still not a neighbour to the two next to it. Is there maybe something I'm missing with using the ft_timelockstatistics like this? I hope someone can clarify some of these issues. Thank you already in advance! Tatu -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: disconnected_cluster.png Type: image/png Size: 83016 bytes Desc: not available URL: From mor2451 at gmail.com Sun Mar 29 14:11:38 2015 From: mor2451 at gmail.com (moran abilea) Date: Sun, 29 Mar 2015 15:11:38 +0300 Subject: [FieldTrip] general questions about the FieldTrip In-Reply-To: References: Message-ID: thanks a lot Robert one more question if i may: are there any spesific set of functions on Matlab FieldTrip or even a sequence of algorithms in order to make P300 extractions for my p300 speller? best regards, Moran Abilea On Fri, Mar 27, 2015 at 6:53 PM, Robert Oostenveld < r.oostenveld at donders.ru.nl> wrote: > Hi Moran > > 1) The fieldtrip buffer by itself has a delay that can be as small as 5ms. > But the actual delay in the data stream from the electronics to the MATLAB > side of the buffer depends on quite a number of parameters and can be much > larger. Sending data in blocks (i.e. multiple samples are bufferend and > sent in one go), bluetooth and USB all cause delays before you are able to > process the samples in the data block. Even the USB connection and whether > you are sharing it with another device (i.e. mouse or USB hard drive on the > same USB hubor port) can affect the delay and can cause jitter (variation > in the delay). I suggest you look at > http://www.fieldtriptoolbox.org/example/measuring_the_timing_delay_and_jitter_for_a_real-time_application > for a demonstration how you can quantify the That page has data for our CTF > MEG system, which has a blocksize of ~100ms and does some online processing > (head localization) prior to forwarding the data, hence the delay of 150ms > that we see here makes sense. > > 2) On http://www.fieldtriptoolbox.org/getting_started/realtime you can > find some getting started instructions. Reading data from a file rather > than from a realitme buffer just means that you specify the name of the > file. If you look at > http://www.fieldtriptoolbox.org/example/ft_realtime_signalviewer you can > see how you can simulate a real time data stream. Just replace cfg.dataset > with an EEG file name in ft_realtime_signalviewer and you are not plotting > real time data, but data from file. > > 3) your P300 application can send events to the fieldtrip buffer and the > signal processing application can read them and act upon the data referred > to in the events. You can also make a single application that does both, or > make two applications that communicate events separate from the data stream. > > 4) I recall that some emotiv software needed to be installed, but don’t > know whether that requires the full SDK to be installed. I don’t have an > emotiv epoc myself. Please see > http://www.fieldtriptoolbox.org/development/realtime/emotiv and feel free > to add your findings to that (wiki) page. > > best regards, > Robert > > > > On 27 Mar 2015, at 16:28, moran abilea wrote: > > > hi again, > > > > i have another question/s, but this time they are genra. > > but first let me explain what i need from field trip: i'm working for > extracting from 14 channels EPOC Emotive the EEG raw data as contious data, > send trigger if i want to display the raw data or not and then process the > data with SVM. all this process is for creating EEG speller in Matlab. > > > > so my questions are: > > > > 1. i assume the field trip has constant "delay", the delay i reffer to > is between the time of view the signal and the real time data transfer in > the buffer. does anyone knows what is the delay time somehow? > > > > 2. where can i find how to open stream for a file? > > > > 3. using triggers: can i send time stamp in my configuration in order to > know when to display the data that i need for the EEG speller? > > > > 4. what to do in order to use the EPOC Emotive? do i need to set some > new configurations for matlab? to download any SDK? etc > > > > any kind of help will be welcomed, > > Moran Abilea > > _______________________________________________ > > 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 Caroline.Lustenberger at kispi.uzh.ch Mon Mar 30 20:12:30 2015 From: Caroline.Lustenberger at kispi.uzh.ch (Lustenberger Caroline) Date: Mon, 30 Mar 2015 18:12:30 +0000 Subject: [FieldTrip] Postdoctoral Position at UNC-Chapel Hill in Human Electrophysiology (EEG, tDCS/tACS, TMS) Message-ID: <7C66D90E0C18014E85B44B560D4D5BC8E46F91D0@EXZH2VM.kispi.int> Postdoctoral Position at UNC-Chapel Hill in Human Electrophysiology (EEG, tDCS/tACS, TMS) We are seeking to fill one postdoctoral position in human electrophysiology in the Frohlich Lab (www.frohlichlab.org) at the University of North Carolina at Chapel Hill. We are a rapidly growing lab that aims to understand how cortical network dynamics emerge and how these dynamics can be modulated with brain stimulation. We have received grant funding to further grow our human electrophysiology team in the lab. In particular, we are interested in understanding how (feedback) non-invasive brain stimulation alters cortical network dynamics that mediate cognition. The successful applicant will employ tDCS/tACS, EEG, TMS, and cognitive testing for elucidating the functional role of cortical oscillations in cognition and for the development of novel strategies to enhance brain function and treat cognitive deficits in psychiatric disorders such as schizophrenia and autism. The successful candidate has a PhD in neuroscience or related discipline and a track record of first class science demonstrated by first-author, peer-reviewed scientific articles in the area of human neurophysiology. Documented skills in EEG and cognitive assays are a prerequisite; programming and data analysis skills are essential. We will provide training in non-invasive brain stimulation methods. Please send your CV and a brief statement of research interest to flavio_frohlich at med.unc.edu . Also, please have two letters of recommendation directly submitted to the same email address. We are looking forward to meeting passionate and hard-working applicants who are ready for cutting-edge human neuroscience research. The Frohlich Lab takes pride in its high-quality science, productive work environment, and culture of mentoring and collaboration. The Frohlich aims to be a leading force in the emerging field of network neuroscience. The Frohlich Lab is a unique environment due to the vertical integration of computer simulations, slice electrophysiology, in vivo electrophysiology, human EEG and brain stimulation studies, and clinical trials. Applications will be immediately reviewed until the position is filled. Start date is flexible but the earlier the better. From orionblue8 at gmail.com Mon Mar 30 20:17:18 2015 From: orionblue8 at gmail.com (Orion) Date: Mon, 30 Mar 2015 13:17:18 -0500 Subject: [FieldTrip] discussion about how gamma power is calculated Message-ID: Hi This is not really a question about how to use Fieldtrip but I was wondering if anyone in the Fieldtrip community likes to calculate the "running gamma power"? This is what I call the parameter that I got after doing a power analysis on each trial, and then to simplify the data by one dimension (and rather than make a time-frequency plot), I averaged the bins within the 35-45 Hz or 30-94 Hz band. With a plot of the running gamma power, I can see where the "gamma power goes up or down as a function of time" to say it very roughly. Does anyone look at running gamma power or other running EEG parameters? Orion -------------- next part -------------- An HTML attachment was scrubbed... URL: From joscha.schmiedt at esi-frankfurt.de Tue Mar 31 15:09:43 2015 From: joscha.schmiedt at esi-frankfurt.de (Schmiedt, Joscha) Date: Tue, 31 Mar 2015 13:09:43 +0000 Subject: [FieldTrip] A Fieldtrip data format? Message-ID: <5548CAB3-F9A2-4C6B-B958-3CF27CF2C27F@esi-frankfurt.de> Hi, When working with Fieldtrip it is very convenient to store the data and analyses using MATLAB’s save and load functions. However, for large and/or complex data with many channels (>2GB) MATLAB enforces compression, which is pretty useless for electrophysiology data and slows down the load and save performance by a factor of up to 8 (see e.g. http://undocumentedmatlab.com/blog/improving-save-performance). The MATLAB file format is based on HDF5, which is generally an open and future-proof data format, but unfortunately MATLAB doesn’t allow you to disable the compression. An option to overcome this could be to develop a simple data format for Fieldtrip data that is also based on HDF5. Is or has there been any development going into that direction? Would there be any interest? Of course, creating yet another data format is almost never a good idea (https://xkcd.com/927/), but since HDF5 is well-documented and readable with almost any software, it might be worth thinking about it. I’d be happy to hear your thoughts. Joscha --------------------------------- Joscha Schmiedt PhD Student Ernst Strüngmann Institute (ESI) for Neuroscience in Cooperation with Max Planck Society Deutschordenstraße 46 60528 Frankfurt am Main Germany Tel.: +49 (0)69 96769 241 Sitz der Gesellschaft: Frankfurt am Main Registergericht: Amtsgericht Frankfurt - HRB 84266 Geschäftsführer: Prof. Dr. Pascal Fries -------------- next part -------------- An HTML attachment was scrubbed... URL: From pjstienen at gmail.com Tue Mar 31 17:52:20 2015 From: pjstienen at gmail.com (Peter Stienen) Date: Tue, 31 Mar 2015 17:52:20 +0200 Subject: [FieldTrip] jack estimates of the standard error of the debiased wpli Message-ID: Hi users, I read in some papers that to test whether the debiased wpli significantly exceeds from zero, computing the jack-knife estimates of the standard error of the debiased wpli can be used. I can calculate the dbwpli/jack-knife estimates. However, does someone know what steps need to be followed to calculate the p-value from these estimates with regard to the normal distribution? Thanks in advance, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From gio at gpiantoni.com Tue Mar 31 22:39:52 2015 From: gio at gpiantoni.com (Gio Piantoni) Date: Tue, 31 Mar 2015 16:39:52 -0400 Subject: [FieldTrip] A Fieldtrip data format? In-Reply-To: <5548CAB3-F9A2-4C6B-B958-3CF27CF2C27F@esi-frankfurt.de> References: <5548CAB3-F9A2-4C6B-B958-3CF27CF2C27F@esi-frankfurt.de> Message-ID: Hi Joscha, FieldTrip already has its own simple uncompressed file format. fcdc_matbin "It is not an official file format, but was invented here at the FCDC. It consists of two files: a *.mat matlab file that contains the header (and optionally the events) and a *.bin binary file that contains the data." http://www.fieldtriptoolbox.org/faq/reading_is_slow_can_i_write_my_raw_data_to_a_more_efficient_file_format If you want to look at the code: https://github.com/fieldtrip/fieldtrip/blob/master/fileio/ft_write_data.m#L275 You should be able to read it as usual with ft_preprocessing. You can convert your files to the fcdc_matbin using ft_preprocessing as well: https://github.com/fieldtrip/fieldtrip/blob/master/ft_preprocessing.m#L581 Be careful about not losing precision though. The only catch is that, as far as I know, you cannot export your preprocessed data through ft_preprocessing at the moment, because ft_write_data is now inside this if-part: https://github.com/fieldtrip/fieldtrip/blob/master/ft_preprocessing.m#L252 but it's only a matter of adapting that to your needs. Would this work for you? -g On Tue, Mar 31, 2015 at 9:09 AM, Schmiedt, Joscha wrote: > Hi, > > When working with Fieldtrip it is very convenient to store the data and > analyses using MATLAB’s save and load functions. However, for large and/or > complex data with many channels (>2GB) MATLAB enforces compression, which is > pretty useless for electrophysiology data and slows down the load and save > performance by a factor of up to 8 (see e.g. > http://undocumentedmatlab.com/blog/improving-save-performance). The MATLAB > file format is based on HDF5, which is generally an open and future-proof > data format, but unfortunately MATLAB doesn’t allow you to disable the > compression. > > An option to overcome this could be to develop a simple data format for > Fieldtrip data that is also based on HDF5. Is or has there been any > development going into that direction? Would there be any interest? Of > course, creating yet another data format is almost never a good idea > (https://xkcd.com/927/), but since HDF5 is well-documented and readable with > almost any software, it might be worth thinking about it. > > I’d be happy to hear your thoughts. > > Joscha > > --------------------------------- > Joscha Schmiedt > PhD Student > > Ernst Strüngmann Institute (ESI) for Neuroscience > in Cooperation with Max Planck Society > Deutschordenstraße 46 > 60528 Frankfurt am Main > Germany > > Tel.: +49 (0)69 96769 241 > > Sitz der Gesellschaft: Frankfurt am Main > Registergericht: Amtsgericht Frankfurt - HRB 84266 > Geschäftsführer: Prof. Dr. Pascal Fries > > > _______________________________________________ > fieldtrip mailing list > fieldtrip at donders.ru.nl > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip