Skip to content

LEiDA vector

get_LEiDA(syncConnAux)

Obtain leading eigenvector for synchronicity matrices.

Parameters:

Name Type Description Default
syncConnAux ndarray

Synchronicty matrices for all parcels/voxels in the format [N, N, Tmax].

required

Returns:

Name Type Description
leidaArrayAux

Leading eigenvector of synchornicity matrix [Tmax, N].

References

.. [1] Cabral, J. et al. (2017). ‘Cognitive performance in healthy older adults relates to spontaneous switching between states of functional connectivity during rest’, Scientific Reports. Nature Publishing Group, 7(1), p. 5135. doi: 10.1038/s41598-017-05425-7.

.. [2] Lord et al,. (2019). Dynamical exploration of the repertoire of brain networks at rest is modulated by psilocybin. NeuroImage, 199(April), 127–142. https://doi.org/10.1016/j.neuroimage.2019.05.060

Source code in dynfc/get_LEiDA.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
def get_LEiDA(syncConnAux):
    """Obtain leading eigenvector for synchronicity matrices.

    Args:
        syncConnAux (ndarray): Synchronicty matrices for all parcels/voxels in the format [N, N, Tmax].

    Returns:
        leidaArrayAux : Leading eigenvector of synchornicity matrix [Tmax, N].

    References
    ----------

    .. [1] 
    Cabral, J. et al. (2017). ‘Cognitive performance in healthy 
    older adults relates to spontaneous switching between states 
    of functional connectivity during rest’, Scientific Reports. 
    Nature Publishing Group, 7(1), p. 5135. 
    doi: 10.1038/s41598-017-05425-7.

    .. [2] 
    Lord et al,. (2019). Dynamical exploration of the 
    repertoire of brain networks at rest is 
    modulated by psilocybin. NeuroImage, 199(April), 127–142. 
    https://doi.org/10.1016/j.neuroimage.2019.05.060

    """

    tPoints = syncConnAux.shape[2]

    leidaArrayAux = zeros([tPoints,  syncConnAux.shape[0]])

    for i in range(tPoints):

        matrix = syncConnAux[:, :, i]
        D, V = eigh(matrix)
        V1 = V[:, -1]

        if sum(V1) > 0:
            V1 = -V1

        leidaArrayAux[i, :] = V1

    return leidaArrayAux