PTE connectivity on timeseries for volume models


SB suggested to try dPTE on my models, but as I'm interested in subcortical structures I generally used mixed or volume source models. I have been experimenting with first extracting time courses from scouts, but am uncertain as to whether there is yet an approved method concerning the parameters for extraction for the purposes of PTE analysis, for example would it make sense to use the 'norm of x,y,z' option? The norm is always positive, so does that mean I should be looking for my frequency of interest at 2x the original frequency? And that after mean or PCA for time series extraction?

Or alternatively, would it make sense to run the PTE on each of the three directions and then average them somehow afterwards?

And would the source wMNE depth weighting parameter affect the effectiveness of connectivity analyses for connectivity analyses such as these?

Any advice would be welcome !


@Sylvain: question for you

You don’t want to use the norm, which is a nonlinear transformation of the signal and alters the spectral contents tremendously.
I suggest PCA extraction across X Y Z to obtain one time series at each source location. The issue if you do this is the fact that the 1st PCA component may not detect the smaller contribution to signal variance from higher frequency signal elements. Yet, it has produced good results in Morillon & Baillet 2017 and a couple of recent studies under review. All have been performed with wMNE with default Brainstorm parameters.
We hace been experimenting with spectrally-whitened versions of the PCA to reduce the effect of biased signal variance towards low-frequency components: I will MP a code prototype that you can try if you want: feedback would be welcome!

Hi Sylvain,

Thanks for the advice.

Silly question though: if extract the time series of volume scouts as follows:

Pipeline editor > Extract > Scouts time series > Scout function: PCA, others like nrom unchecked

…I still get 3 timeseries per scout, so presumably the PCA there is being applied to extract the 3 directions from all of the points in the scout, which could alternatively use mean, max, etc. - this is not the relevant step for PCA application, though presumably it could be used here too.

So how do I do a PCA extraction across XYZ from volume scouts?

I’d be happy to compare the two PCAs on my dataset if it’s helpful!


Sounds like the PCA produces one principal component per source direction. You would need to apply another PCA on top of that to produce a single time series. I am sending you the code I was talking about: please give it a try and let me know if anything seems weird/encouraging.

Thanks, will do.

Does anyone know if there’s an easy way to do the 2nd PCA (that is, across the 3 directions that have been extracted from a scout) within the Brainstorm interface?
@Francois? (For some next steps I need the timeseries structures.)

Found it. Here, for posterity:

  • extract your scout data from your volume model using mean, max, pca or whatever, this will give you timeseries data with 3 directions for each scout
  • Process 1> Average > Average signals > Average by scout, temporal PCA
1 Like

Dear Brainstormers,

When I redid the dPTE analysis on the pca extracted single timeseries, I still seem to get exclusively positive dPTE values (I did make sure the absolute value option is not set on the display), and in fact some of them are greater than 1. Ideas? Is this function working correctly?

(Running my modified version of the imaginary portion of coherency on the same pca-extracted timeseries does give me both positive and negative values, so I think the ROI extraction is fine.)

Best regards,

Hello Emily,

I had a look at the code, I can confirm that the PTE function is being fed negative values when appropriate. However, the output is always between 0 and 1 which is expected from my understanding of PTE. For your information, this is not something we coded ourselves, we’re using the following published implementation: Your best bet is to contact the authors if you think there is a mistake in the implementation.

I hope this helps,

I also believe there is a “relative PTE” option that centers and scales the PTE values between -1 and 1. @Samiee (Soheila) would know better.

Hi Martin,

Thanks for your response. I’m looking at Sylvain’s paper with Benjamin (Morillon & Baillet, PNAS 2017) and see that they refer to the the same paper that the code references (Lobier et al.). In Morillon & Baillet it says they “normalized between -0.5 and 0.5, with the sign indicative of the dominant direction of functional connectivity”. dPTE is supposed to have a directionality, so I was puzzled why the values were only positive. In the code you sent, it refers to the Lobier et al. paper, but there’s a note saying, “Note that implementations differ in normalisation, as well as choices for binning and delay”

The relevant normalization calculation seems to be:
tmp = triu(PTE) + tril(PTE)’;
dPTE = [triu(PTE./tmp,1) + tril(PTE./tmp’,-1)];

However, it doesn’t seem like that should only yield positive responses. I tried the Brainstorm code on some different data structures, with the following results:

EEG channels (sensor space): behaves as expected, values are between -0.5 and 0.5
MEG channels (sensor space): values are between 0 and 1-ish…
MEG ROI timeseries: between 0 and 1+ ish…


Hi Sylvain,

Oh, yes there’s a ‘return normalized phase transfer entropy’ box, which I had checked on the EEG analysis but not on the MEG for some reason (different protocols). That seems to be the trick. Thank you!


1 Like

Hi Emily,

As you said there are different ways for normalizing PTE values, and the way it is done in Benjamin’s paper is different from the one suggested by PTE paper authors (called dPTE).

As far as I remember in Benjamin paper it was normalized with this method (A-B)/ (A+B) and then brought to [-0.5 0.5] interval.
I would suggest, you first decide about how you want to do the normalization, and then do it in your script rather than using default normalizing option marked in brainstorm.
Different approaches could lead to slightly different results, because if you have more than one pair of regions the comparison of connections will be different if you normalize each pair to the sum of the two (Benjamin’s approach) or not (dPTE).

This is a very basic for loop to extract dPTE from PTE values:

for ifile=1:length(sFiles)
pte = in_bst_timefreq(fullfile(p,sFiles{ifile}), 1, ‘TF’);
pte = reshape(squeeze(pte.TF),[nPairs, nPairs, nFreq]);
for iFreq=1:nFreq
tmp = squeeze(pte(:,:,iFreq));
dpte = (triu(tmp)’- tril(tmp));
dpte_mat(ifile,:,iFreq) = dpte(dpte~=0);

(Sorry this forum does not keep the indentations)

Let me know if it is not clear or I can help further with anything,


Hi Saimee,

I believe as I have lots of pairs of regions it might be better to do it afterwards as you suggest. So in that case I would get the PTE from the output of the brainstorm function without the normalization box checked and then run this calculation for dPTE? Did I understand correctly?

Thank you!


Hi all
I read the above mentioned forum. But I'm confused about normalization.
Wang, 2019 ( who used BS for PTE, showed normalization equation and processing "The values of dPTEx→y were further subtracted by 0.5, and said "Positive values indicate that information flowed preferentially from X to Y ".
Is this 'return normalized phase transfer entropy' option process?

I got the positive values with 'return normalized phase transfer entropy' box checked, and positive and negative values without option. Could you give me more information about normalization in BS?
I want to try to compute the PTE between two scouts each with 20 vertices.

Any advice and comment would be welcome !


Hi Junichi,

It should be the opposite of what you got: if "Return normalized phase transfer entropy" is checked, your values should be between -0.5 and 0.5, with the sign indicating the direction of the flow like you said, whereas if it is not checked, your values should only be positive. I just quickly tested this and it's working as intended.

What happens when you choose to normalize is that dPTE is computed from the PTE (see Soheila's code snippet above), and then 0.5 is subtracted from the result to center it around zero, resulting in values between -0.5 and 0.5. I believe that is what Wang, 2019 reports.

I hope this clarifies a bit,

hi Martin,
Thank you for quick reply.
I understand what is happen when option box is checked. I will try again.


I read all of the messages here.
I used PTE for measuring connectivity between 12 ROIs(source localized EEG data).

For each subject I have connectivity matrix.
As I got from what you said , when there is no flow between to scouts , the value of the dPTE should be Zero . Then why in the connectivity matrix the value of a scout to itself is -0.5 ?

Furthermore Can I add 0.5 to the result of BS matrix to have value like Lobier et all paper?

Best regards