gaussian_pulse

boulderopal.signals.gaussian_pulse(duration, amplitude, width=None, center_time=None, drag=0.0, flat_duration=0.0)

Create a Signal object representing a Gaussian pulse.

Parameters

  • duration (float) – The duration of the signal, TT
  • amplitude (float or complex) – The amplitude of the Gaussian pulse, AA
  • width (float or None , optional) – The standard deviation of the Gaussian pulse, σ\sigma. Defaults to T/10T/10 or (Ttflat)/10(T-t_\mathrm{flat})/10
  • center_time (float or None , optional) – The center of the Gaussian pulse, t0t_0. Defaults to half of the given value of the duration, T/2T/2
  • drag (float , optional) – The DRAG parameter, β\beta
  • flat_duration (float , optional) – The amount of time to remain constant after the peak of the Gaussian, tflatt_\mathrm{flat}

Returns

The Gaussian pulse.

Return type

Signal

SEE ALSO

boulderopal.signals.cosine_pulse : Create a Signal object representing a cosine pulse.

Graph.signals.gaussian_pulse_pwc : Graph operation to create a Pwc representing a Gaussian pulse.

Graph.signals.gaussian_pulse_stf : Graph operation to create a Stf representing a Gaussian pulse.

boulderopal.signals.sech_pulse : Create a Signal object representing a hyperbolic secant pulse.

boulderopal.signals.square_pulse : Create a Signal object representing a square pulse.

Notes

The Gaussian pulse is defined as

Gaussian(t)={A(1iβ(tt1)σ2)exp((tt1)22σ2)ift<t1=t0tflat/2Aift0tflat/2t<t0+tflat/2A(1iβ(tt2)σ2)exp((tt2)22σ2)ift>t2=t0+tflat/2. \mathop{\mathrm{Gaussian}}(t) = \begin{cases} A \left(1-\frac{i\beta (t-t_1)}{\sigma^2}\right) \exp \left(- \frac{(t-t_1)^2}{2\sigma^2} \right) &\mathrm{if} \quad t < t_1=t_0- t_\mathrm{flat}/2\\ A &\mathrm{if} \quad t_0-t_\mathrm{flat}/2 \le t < t_0+t_\mathrm{flat}/2 \\ A \left(1-\frac{i\beta (t-t_2)}{\sigma^2}\right) \exp \left(- \frac{(t-t_2)^2}{2\sigma^2} \right) &\mathrm{if} \quad t > t_2=t_0+t_\mathrm{flat}/2 \end{cases} .

If the flat duration is zero (the default setting), this reduces to

Gaussian(t)=A(1iβ(tt0)σ2)exp((tt0)22σ2). \mathop{\mathrm{Gaussian}}(t) = A \left(1-\frac{i\beta (t-t_0)}{\sigma^2}\right) \exp \left(- \frac{(t-t_0)^2}{2\sigma^2} \right) .

Examples

Define a Gaussian pulse.

>>> pulse = bo.signals.gaussian_pulse(duration=2.0, amplitude=1.0)
>>> pulse.export_with_time_step(time_step=0.2)
array([4.00652974e-05+0.j, 2.18749112e-03+0.j, 4.39369336e-02+0.j,
   3.24652467e-01+0.j, 8.82496903e-01+0.j, 8.82496903e-01+0.j,
   3.24652467e-01+0.j, 4.39369336e-02+0.j, 2.18749112e-03+0.j,
   4.00652974e-05+0.j])

Define a flat-top Gaussian pulse with a DRAG correction.

>>> pulse = bo.signals.gaussian_pulse(
...     duration=1.0,
...     amplitude=1.0,
...     width=0.2,
...     center_time=0.6,
...     drag=0.1,
...     flat_duration=0.2,
... )
>>> pulse.export_with_sampling_rate(sampling_rate=10.)
array([0.07955951+0.08950445j, 0.21626517+0.18923202j,
   0.45783336+0.28614585j, 0.7548396 +0.28306485j,
   0.96923323+0.12115415j, 1.        +0.j        ,
   1.        +0.j        , 0.96923323-0.12115415j,
   0.7548396 -0.28306485j, 0.45783336-0.28614585j])

Was this useful?