sech_pulse_pwc

signals.sech_pulse_pwc(duration, segment_count, amplitude, width=None, center_time=None, *, name=None)

Create a Pwc representing a hyperbolic secant pulse.

Parameters

  • duration (float) – The duration of the signal, TT.
  • segment_count (int) – The number of segments in the PWC.
  • 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 or None , optional) – The characteristic time for the hyperbolic secant pulse, tpulset_\mathrm{pulse}. If passed, it must either be a scalar or contain a single element. Defaults to T/12T/12, giving the pulse a full width at half maximum (FWHM) of 0.22T0.22 T.
  • center_time (float or Tensor or None , optional) – The time at which the pulse peaks, tpeakt_\mathrm{peak}. If passed, it must either be a scalar or contain a single element. Defaults to T/2T/2.
  • name (str or None , optional) – The name of the node.

Returns

The sampled hyperbolic secant pulse.

Return type

Pwc

SEE ALSO

Graph.signals.cosine_pulse_pwc : Create a Pwc representing a cosine pulse.

Graph.signals.gaussian_pulse_pwc : Create a Pwc representing a Gaussian pulse.

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

Graph.signals.sech_pulse_stf : Corresponding operation with Stf output.

Graph.signals.square_pulse_pwc : Create a Pwc representing a square pulse.

Notes

The hyperbolic secant pulse is defined as

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

The FWHM of the pulse is about 2.634tpulse2.634 t_\mathrm{pulse}.

Examples

Define a simple sech PWC pulse.

>>> graph.signals.sech_pulse_pwc(
...     duration=5, segment_count=50, amplitude=1, 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.1, 0.1, ..., 0.1, 0.1]),
    'values': array([0.00558953, 0.00710565, ..., 0.00710565, 0.00558953]),
    'time_dimension': 0
}

Define a displaced sech PWC pulse.

>>> graph.signals.sech_pulse_pwc(
...     duration=3e-6,
...     segment_count=60,
...     amplitude=20e6,
...     width=0.15e-6,
...     center_time=1e-6,
...     name="displaced",
... )
<Pwc: name="displaced", operation_name="discretize_stf", value_shape=(), batch_shape=()>
>>> result = bo.execute_graph(graph=graph, output_node_names="sech_displaced")
>>> result["output"]["sech_displaced"]
{
    'durations': array([5.e-08, 5.e-08, ..., 5.e-08, 5.e-08]),
    'values': array([6.01374318e+04, 8.39283672e+04, ..., 1.06810547e+02, 7.65331014e+01]),
    'time_dimension': 0
}

Define a sech pulse with optimizable parameters.

>>> amplitude = graph.optimizable_scalar(
...     lower_bound=0, upper_bound=10e6, name="amplitude"
... )
>>> width = graph.optimizable_scalar(
...     lower_bound=0.1e-6, upper_bound=0.5e-6, name="width"
... )
>>> center_time = graph.optimizable_scalar(
...     lower_bound=1e-6, upper_bound=2e-6, name="center_time"
... )
>>> graph.signals.sech_pulse_pwc(
...     duration=3e-6,
...     segment_count=32,
...     amplitude=amplitude,
...     width=width,
...     center_time=center_time,
...     name="sech_pulse",
... )
<Pwc: name="sech_pulse", operation_name="discretize_stf", value_shape=(), batch_shape=()>

Was this useful?