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, T.
- amplitude (float or complex) – The amplitude of the Gaussian pulse, A.
- width (float or None , optional) – The standard deviation of the Gaussian pulse, σ. Defaults to T/10 or (T−tflat)/10 if flat_duration is passed.
- center_time (float or None , optional) – The center of the Gaussian pulse, t0. Defaults to half of the given value of the duration, T/2.
- drag (float , optional) – The DRAG parameter, β. Defaults to 0, in which case there is no DRAG correction.
- flat_duration (float , optional) – The amount of time to remain constant after the peak of the Gaussian, tflat. If passed, it must be nonnegative and less than the duration. Defaults to 0, in which case no constant part is added to the Gaussian pulse.
Returns
The Gaussian pulse.
Return type
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(1−σ2iβ(t−t1))exp(−2σ2(t−t1)2)AA(1−σ2iβ(t−t2))exp(−2σ2(t−t2)2)ift<t1=t0−tflat/2ift0−tflat/2≤t<t0+tflat/2ift>t2=t0+tflat/2.If the flat duration is zero (the default setting), this reduces to
Gaussian(t)=A(1−σ2iβ(t−t0))exp(−2σ2(t−t0)2).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])