Skip to main content

Module waveforms

Module waveforms 

Source
Expand description

Test waveforms as functions of time, following scipy.signal: sawtooth, square (with a duty cycle), gausspulse, chirp (linear, quadratic, logarithmic, hyperbolic), sweep_poly and unit_impulse.

See the book entry Partial fractions, zoom FFT and waveforms.

Structs§

GaussPulse
The in-phase part, quadrature part and envelope of a Gaussian-modulated sinusoid.

Enums§

ChirpMethod
How the frequency of a chirp moves from f0 at t = 0 to f1 at t = t1.

Functions§

chirp
A swept-frequency cosine cos(φ(t) + φ₀) (SciPy’s chirp, phi in degrees), where the phase φ(t) = 2π ∫₀ᵗ f(τ) dτ integrates the instantaneous frequency of the chosen sweep.
gausspulse
exp(−a t²) exp(2πi f_c t) (SciPy’s gausspulse), with a chosen so that the spectrum’s width at bwr dB (−6 by default) is the fraction bw of f_c.
gausspulse_cutoff
The time after which the envelope of gausspulse stays below tpr dB (SciPy’s gausspulse('cutoff', …)).
sawtooth
A sawtooth of period 2π rising from −1 to 1 over the first width · 2π and falling back over the rest (SciPy’s sawtooth); width = 0.5 gives a triangle wave. NaN for a width outside [0, 1].
square_wave
A square wave of period 2π: +1 for the first duty · 2π, −1 after (SciPy’s square).
sweep_poly
A cosine whose instantaneous frequency is the polynomial poly(t) (highest power first; SciPy’s sweep_poly): cos(2π ∫₀ᵗ poly + φ₀), phi in degrees.
unit_impulse
A unit impulse of length n at index idx (SciPy’s unit_impulse).