sech_pulse_stf

signals.sech_pulse_stf(amplitude, width, center_time)

Create an Stf representing a hyperbolic secant pulse.

Parameters

  • amplitude (float or complex or Tensor) – The amplitude of the pulse, AA. It must either be a scalar or contain a single element.
  • width (float or Tensor) – The characteristic time for the hyperbolic secant pulse, tpulset_\mathrm{pulse}. It must either be a scalar or contain a single element.
  • center_time (float or Tensor) – The time at which the pulse peaks, tpeakt_\mathrm{peak}. It must either be a scalar or contain a single element.

Returns

The sampleable hyperbolic secant pulse.

Return type

Stf

SEE ALSO

Graph.signals.gaussian_pulse_stf : Create an Stf representing a Gaussian pulse.

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

Graph.signals.sech_pulse_pwc : Corresponding operation with Pwc output.

Notes

The hyperbolic secant pulse is defined as

$$ \mathop{\mathrm{Sech}}(t) = \frac{A}{\cosh\left((t - t_\mathrm{peak}) / t_\mathrm{pulse} \right)} . $$

$$

The full width at half maximum of the pulse is about 2.634tpulse2.634 t_\mathrm{pulse}.

Examples

Define a sampleable sech pulse.

>>> sech = graph.signals.sech_pulse_stf(
...     amplitude=1.0, width=0.1, center_time=0.5
... )
>>> graph.discretize_stf(stf=sech, duration=1.2, segment_count=5, name="sech")
<Pwc: name="sech", operation_name="discretize_stf", value_shape=(), batch_shape=()>
>>> result = bo.execute_graph(graph=graph, output_node_names="sech")
>>> result["output"]["sech"]
{'durations': array([0.24, 0.24, 0.24, 0.24, 0.24]),
'values': array([0.04471916, 0.46492199, 0.64805427, 0.06667228, 0.00605505]),
'time_dimension': 0}

Define a sampleable sech pulse with optimizable parameters.

>>> amplitude = graph.optimizable_scalar(
...     lower_bound=0, upper_bound=2.*np.pi, name="amplitude"
... )
>>> width = graph.optimizable_scalar(
...     lower_bound=0.1, upper_bound=0.5, name="width"
... )
>>> center_time = graph.optimizable_scalar(
...     lower_bound=0.2, upper_bound=0.8, name="center_time"
... )
>>> graph.signals.sech_pulse_stf(
...     amplitude=amplitude, width=width, center_time=center_time
... )
<Stf: operation_name="truediv", value_shape=(), batch_shape=()>

Was this useful?