pactools.simulate_pac

pactools.simulate_pac(n_points, fs, high_fq, low_fq, low_fq_width, noise_level, high_fq_amp=0.5, low_fq_amp=0.5, random_state=None, sigmoid_sharpness=6, phi_0=0.0, delay=0.0, return_driver=False)[source]

Simulate a 1D signal with artificial phase amplitude coupling (PAC).

Parameters
n_pointsint

Number of points in the signal

fsfloat

Sampling frequency of the signal

high_fqfloat

Frequency of the fast oscillation which is modulated in amplitude

low_fqfloat

Center frequency of the slow oscillation which controls the modulation

low_fq_widthfloat

Bandwidth of the slow oscillation which controls the modulation

noise_levelfloat

Level of the Gaussian additive white noise

high_fq_ampfloat

Amplitude of the fast oscillation

low_fq_ampfloat

Amplitude of the slow oscillation

random_stateint seed, RandomState instance, or None (default)

The seed of the pseudo random number generator.

sigmoid_sharpnessfloat

Sharpness of the sigmoid used to define the modulation

phi_0float

Preferred phase of the coupling: phase of the slow oscillation which corresponds to the maximum amplitude of the fast oscillations

delayfloat

Delay between the slow oscillation and the modulation

return_driverboolean

If True, return the complex driver instead of the full signal

Returns
signalarray, shape (n_points, )

Signal with artifical PAC