synthesise_matched#

hypercoil.neuro.synth.synthesise_matched(reference: Tensor, use_mean: bool = False, *, key: PRNGKey) Tensor[source]#

Create a synthetic signal matched in spectrum and covariance to a reference.

The synthetic signal will be drawn from a stationary Gaussian process. After sampling i.i.d. from a standard normal distribution, the synthetic data are transformed to match the reference.

Dimension:
reference : \((D, N)\)

D denotes dimension of the multivariate signal and N denotes the number of observations per channel.

output : \((D, N)\)

As above.

Parameters:
referencetensor

Reference signal.

use_meanbool (default False)

Indicates that, instead of matching the spectrum of the corresponding channel in the reference signal, all channels are matched to the mean spectrum across all reference channels.

Returns:
tensor

Synthetic data matched in spectrum and covariance to the reference.