Skip to content

Hilbert transform

doHilbert(N, Tmax, timeseries)

Hilbert transform of BOLD signal form all parcels/voxels.

This fuction returns the phase time series for all parcels/voxels of the input.

Parameters:

Name Type Description Default
N int

Number of parcels/voxels of the input array.

required
Tmax int

BOLD signal samples count.

required
timeseries double

Bold signal array for all parcels/voxels in the format [N, Tmax].

required

Returns:

Name Type Description
PhasesAux

Phases array for all parcels/voxels in the format [N, Tmax].

Source code in dynfc/doHilbert.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
def doHilbert(N, Tmax, timeseries):
    """Hilbert transform of BOLD signal form all parcels/voxels.

    This fuction returns the phase time series for all parcels/voxels
    of the input.

    Args:
        N (int): Number of parcels/voxels of the input array.
        Tmax (int): BOLD signal samples count.
        timeseries (double): Bold signal array for all parcels/voxels in the format [N, Tmax].

    Returns:
        PhasesAux : Phases array for all parcels/voxels in the format [N, Tmax].

    """

    PhasesAux = zeros([N, Tmax])

    for seed in range(0, N):
        Xanalytic = hilbert(timeseries[seed, :] - timeseries[seed, :].mean())
        PhasesAux[seed, :] = angle(Xanalytic)


    return PhasesAux