neurodsp.sim.cycles.sim_exp_cos_cycle

neurodsp.sim.cycles.sim_exp_cos_cycle(n_seconds, fs, exp, scale=2, shift=1)[source]

Simulate an exponential cosine cycle.

Parameters
n_secondsfloat

Length of cycle window in seconds.

fsfloat

Sampling frequency of the cycle simulation.

expfloat

Exponent controlling the amplitude asymmetry of peaks relative to the troughs.

  • exp=0 : zeros

  • exp=.5: wide peaks, narrow troughs

  • exp=1.: symmetrical peaks and troughs (sine wave)

  • exp=5.: wide troughs, narrow peaks

scalefloat, optional, default: 2

Rescales the amplitude of the signal.

shiftfloat, optional, default: 1

Translate the signal along the y-axis.

Returns
cycle1d array

Simulated exponential cosine cycle.

Notes

  • This exponential cosine cycle is implemented as Equation 9 of [1].

..math:

cycle = ((cos(2\pi ft) + 1) / 2)^{exp}

References

1

Lozano-Soldevilla, D., Huurne, N. T., & Oostenveld, R. (2016). Neuronal Oscillations with Non-sinusoidal Morphology Produce Spurious Phase-to-Amplitude Coupling and Directionality. Frontiers in Computational Neuroscience, 10. DOI: https://doi.org/10.3389/fncom.2016.00087

Examples

Simulate a cycle of an exponential cosine wave:

>>> cycle = sim_exp_cos_cycle(1, 500, exp=2)