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, .
- amplitude (float or complex) – The amplitude of the Gaussian pulse, .
- width (float or None , optional) – The standard deviation of the Gaussian pulse, . Defaults to or if flat_duration is passed.
- center_time (float or None , optional) – The center of the Gaussian pulse, . Defaults to half of the given value of the duration, .
- 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, . 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
If the flat duration is zero (the default setting), this reduces to
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])