GaussianSmoothedSquare

GaussianSmoothedSquare#

class iqm.models.playlist.waveforms.GaussianSmoothedSquare(n_samples, square_width, gaussian_sigma, center_offset=0.0)#

Bases: Waveform

Convolution of a square pulse and a gaussian pulse.

One can think of it as a square pulse smoothed with a gaussian one, or vice versa.

\[f(t) = \frac{1}{2} \left[ \text{erf}\left(\frac{t - (c - s / 2)}{\sqrt{2 \sigma^2}}\right) - \text{erf}\left(\frac{t - (c + s / 2)}{\sqrt{2 \sigma^2}}\right) \right],\]

where \(\text{erf}\) is the error function, \(c\) is center_offset, \(s\) is square_width, and \(\sigma\) is gaussian_sigma.

Its values are in \((0, 1)\).

Parameters:
  • square_width (float) – square pulse width

  • gaussian_sigma (float) – gaussian pulse standard deviation

  • center_offset (float) – The waveform is centered at this offset from the midpoint of the sampling window.

  • n_samples (int)

Module: iqm.models.playlist.waveforms

Attributes

center_offset

square_width

gaussian_sigma

n_samples

Requested number of samples for the waveform.

Methods