bundles / scipy 1.17.1 / scipy / signal / _waveforms / gausspulse
function
scipy.signal._waveforms:gausspulse
source: /scipy/signal/_waveforms.py :154
Signature
def gausspulse ( t , fc = 1000 , bw = 0.5 , bwr = -6 , tpr = -60 , retquad = False , retenv = False ) Summary
Return a Gaussian modulated sinusoid:
Extended Summary
exp(-a t^2) exp(1j*2*pi*fc*t).
If retquad is True, then return the real and imaginary parts (in-phase and quadrature). If retenv is True, then return the envelope (unmodulated signal). Otherwise, return the real part of the modulated sinusoid.
Parameters
t: ndarray or the string 'cutoff'Input array.
fc: float, optionalCenter frequency (e.g. Hz). Default is 1000.
bw: float, optionalFractional bandwidth in frequency domain of pulse (e.g. Hz). Default is 0.5.
bwr: float, optionalReference level at which fractional bandwidth is calculated (dB). Default is -6.
tpr: float, optionalIf
tis 'cutoff', then the function returns the cutoff time for when the pulse amplitude falls belowtpr(in dB). Default is -60.retquad: bool, optionalIf True, return the quadrature (imaginary) as well as the real part of the signal. Default is False.
retenv: bool, optionalIf True, return the envelope of the signal. Default is False.
Returns
yI: ndarrayReal part of signal. Always returned.
yQ: ndarrayImaginary part of signal. Only returned if
retquadis True.yenv: ndarrayEnvelope of signal. Only returned if
retenvis True.
Notes
Array API Standard Support
gausspulse has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable SCIPY_ARRAY_API=1 and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.
==================== ==================== ==================== Library CPU GPU ==================== ==================== ==================== NumPy ✅ n/a CuPy n/a ⛔ PyTorch ⛔ ⛔ JAX ⛔ ⛔ Dask ⛔ n/a ==================== ==================== ====================
See
dev-arrayapifor more information.
Examples
Plot real component, imaginary component, and envelope for a 5 Hz pulse, sampled at 100 Hz for 2 seconds:import numpy as np from scipy import signal import matplotlib.pyplot as plt t = np.linspace(-1, 1, 2 * 100, endpoint=False) i, q, e = signal.gausspulse(t, fc=5, retquad=True, retenv=True)✓
plt.plot(t, i, t, q, t, e, '--')
✗Aliases
-
scipy.signal.gausspulse