nigsp.operations.timeseries.spc_ts

nigsp.operations.timeseries.spc_ts(timeseries, globally=False)[source]

Express timeseries in signal percentage change.

It is assumed that time is encoded in the second dimension (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 is time.

globallybool, optional

If True, SPC timeseries across the first two axes (mainly for similarity with other functions.)

Returns:
numpy.ndarray

The timeseries in SPC if timeseries is not a 1D array. If timeseries is a 1D array, it is returned as is.