nigsp.operations.timeseries.graph_fourier_transform

nigsp.operations.timeseries.graph_fourier_transform(timeseries, eigenvec, energy=False, mean=False)[source]

Project a graph decomposition onto the timeseries.

It returns the result of the projection or the energy of the spectral density of the projection.

If mean is true and the timeseries has 3 dimensions, it returns the mean across the last dimension.

It is assumed that time is encoded in the second dimension of timeseries (axis 1), e.g. for 90 voxels and 300 timepoints, shape is [90, 300].

Parameters:
timeseriesnumpy.ndarray

The input timeseries. It is assumed that the second dimension (axis 1) is time.

eigenvecnumpy.ndarray

The eigenvector resulting from the Laplacian decomposition.

energybool, optional

If True, returns the energy (power) of the spectral density instead of the projection.

meanbool, optional

If True and timeseries has 3 dimensions, returns the mean across axis 1 (time).

Returns:
np.ndarray

Returns either the projection of the graph on the timeseries, or its energy.