meegsim.coupling.constant_phase_shift#

meegsim.coupling.constant_phase_shift(waveform, sfreq, phase_lag, m=1, n=1, random_state=None)[source]#

Generate a time series that is phase coupled to the input time series with a constant phase lag.

This function can be used to set up both within-frequency (1:1, default) and cross-frequency (n:m) coupling.

Parameters:
waveformarray

The input signal to be processed. It can be a real or complex time series.

sfreqfloat

Sampling frequency of the signal, in Hz. This argument is not used in this function but is accepted for consistency with other coupling methods.

phase_lagfloat

Constant phase lag to apply to the waveform in radians.

mint, optional

Multiplier for the base frequency of the output oscillation, default is 1.

nint, optional

Multiplier for the base frequency of the input oscillation, default is 1.

random_stateNone, optional

This parameter is accepted for consistency with other coupling functions but not used since no randomness is involved.

Returns:
outarray, shape (n_times,)

The phase-coupled waveform with the same amplitude envelope as the input one.