[FieldTrip] TRENTOOL bad channel combinations

Tyler Grummett tyler.grummett at flinders.edu.au
Mon Apr 14 06:37:45 CEST 2014


Hello Patricia,


To answer your questions, yes my sampling rate is 1000Hz.


Some additional details about my data:

I am analysing continuous data from 10 subjects (as a test). One of the tasks they did is approximately 3 minutes.

I have been marking out the data ( which breaks the data up into trials) and then taking a one second epoch from each of the trials.

What is the smallest length of data (in seconds) that transfer entropy can be run on?


​Should I leave it as one long length of data? The inherent problem with that is the various trial lengths, I am fairly sure that TEprepare

crashes if the trials are of a various length.


Interestingly, the function doesnt crash on data that I have artefact corrected (1-second trials) and on sources that explain more than 95% of the variance (after applying beamformer and PCA).

For example, if I had 1400 brain sources (after beamformer and virtual channel calculation), and only 12 of the brain sources explain up to 95% of the variance then I pick those 12 and

run TEprepare on it and it runs without issue. So I havent needed to change many of the configuration settings around after that. Its only the length of trial and the number of trials that concern me now.


One last note, is that there has been discussions on the eeglab discussion list about applying a 1-Hz highpass filter to your data. They think that it may

interfere with the 'future' of the signal, ultimately disrupting the transfer entropy calculation (or any other connectivity measure).


Tyler.


*************************

Tyler Grummett ( BBSc, BSc(Hons I))
PhD Candidate
Brain Signals Laboratory
Flinders University
Rm 5A301
Ext 66124
________________________________
From: fieldtrip-bounces at science.ru.nl <fieldtrip-bounces at science.ru.nl> on behalf of Patricia Wollstadt <Patricia.Wollstadt at gmx.de>
Sent: Saturday, 12 April 2014 1:06 AM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] TRENTOOL bad channel combinations

Hello Tyler,

okay, I'd say the script should run like this (regarding channel selection). Maybe it's really the data then. If you keep getting errors, you can send me those as well.

Regarding the number of data points: The error you are getting depends on a number of parameters TEprepare uses to determine the optimal embedding dimension and embedding delay. TEprepare checks whether you have enough samples in one trial after taking into account the ACT, cfg.actthrvalue, cfg.ragdim, cfg.ragtau and the assumed interaction delay (these parameters determine the maximum possible length, i.e. the worst case, of your embedding).

Could you tell me the sampling rate of your data? If your data was sampled at 1000Hz, 3/9th of 500 ms should give you about 167 sample points for cfg.repPred, which would be okay.

Otherwise, you may alter the parameters mentioned above, e.g. you can check whether you could lower the actthrvalue. The actthrvalue is used to exclude all trials with an ACT higher than the threshold. The value you put in there should be based on the filtering of the data prior to TE analysis (e.g. if you highpass filter your data at 10 Hz and have a sampling rate of 1000Hz, you shouldn't find any autocorrelation above 100 samples. In that case, you may use 100 as a threshold).

What values do you enter for the other parameters (assumed interaction delay u, specified in cfg.predicttimemin_u/cfg.predicttimemax_u, embedding parameters to be scanned in cfg.ragdim and cfg.ragtau)? Maybe you can adjust those as well, to be able to enter a higher value for .repPred.

Best, Patricia




On 04/11/2014 12:44 PM, Tyler Grummett wrote:

​Hello Patricia,


I have previously selected the channels that are EEG, I am not entering in 'EEG' or anything.


            cfgTEP = [];
            cfgTEP.Path2TSTOOL = fullfile( matlabrootpath, 'Matlab', 'OpenTSTOOL'); % dont add this to matlab path
            cfgTEP.toi = [ min( [vchan.time{ :}]), max( [vchan.time{ :}])];
            cfgTEP.channel = vchan.label( comps);​


After playing around with it for a bit I dont think it is the channel combinations, but the data.


If I can ask a separate question, what is an optimal length for the trials? My trials are about 500 ms long and it gives me the following error:


Error using TEprepare (line 710)
TRENTOOL ERROR: Not enough points in timeseries for current analysis settings: cfg.repPred too big, or
max(cfg.ragdim)*max(cfg.ragtaurange) too big, or maximum u to big

It is recommended that the cfgTEP.repPred is size(data.trial{1,1},2)*(3/4)

However it only works for me if it is size(data.trial{1,1},2)*(3/9)​ .

Then it runs fine, but Im worried about changing this.

Tyler



*************************

Tyler Grummett ( BBSc, BSc(Hons I))
PhD Candidate
Brain Signals Laboratory
Flinders University
Rm 5A301
Ext 66124
________________________________
From: fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl> <fieldtrip-bounces at science.ru.nl><mailto:fieldtrip-bounces at science.ru.nl> on behalf of Patricia Wollstadt <Patricia.Wollstadt at gmx.de><mailto:Patricia.Wollstadt at gmx.de>
Sent: Friday, 11 April 2014 6:42 PM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] TRENTOOL bad channel combinations

Hello Tyler,

TRENTOOL does not support the exclusion of channels like FieldTrip does (e.g.  {'all', '-MLx', '-EOG'}), you have to explicitly specify channels OR combinations of channels for analysis in the cfg structure passed to TEprepare:

%  cfg.sgncmb      = list of channelpairs cell array (Nx(source, target))
%  or
%  cfg.channel     = list of channels cell array - testing will be done all-by-all

If you provide a list of channel combinations in cfg.sgncmb, TRENTOOL will analyze these combinations only; if you provide a list of channels in cfg.channel, TEprepare will build all possible channel combinations from the list and TRENTOOL will analyze these combinations. (Also, channel names have to match the channel labels in data.label.)

So, a way to exclude bad channel combinations would be to provide a list of all channels that should be included in the analysis in cfg.channel and let TEprepare build the channel combinations from that.

I hope this answers your question. Please let me know if you encounter any more problems.

Best,
Patricia



On 04/11/2014 04:38 AM, Tyler Grummett wrote:

​Hello fieldtrip,


Has anyone worked out how to handle bad channel combinations in TRENTOOL using TEprepare?


In my experience it just crashes. I am hoping for a way to calculate the bad channel combinations before running TEprepare.


If anyone can help, that will be greatly appreciated!!


Tyler


*************************

Tyler Grummett ( BBSc, BSc(Hons I))
PhD Candidate
Brain Signals Laboratory
Flinders University
Rm 5A301
Ext 66124



_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

------------------------------------------------------------

Patricia Wollstadt, PhD Student

MEG Unit, Brain Imaging Center
Goethe University, Frankfurt, Germany

Heinrich Hoffmann Strasse 10, Haus 93 B
D - 60528 Frankfurt am Main



_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

--
------------------------------------------------------------

Patricia Wollstadt, PhD Student

MEG Unit, Brain Imaging Center
Goethe University, Frankfurt, Germany

Heinrich Hoffmann Strasse 10, Haus 93 B
D - 60528 Frankfurt am Main
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140414/2243aa88/attachment-0001.html>


More information about the fieldtrip mailing list