hann_series

boulderopal.signals.hann_series(duration, coefficients)

Create a Signal object representing a sum of Hann window functions.

Parameters

  • duration (float) – The duration of the signal, TT
  • coefficients (np.ndarray) – The coefficients for the different Hann window functions, cnc_n

Returns

The Hann window functions series.

Return type

Signal

SEE ALSO

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

boulderopal.signals.sinusoid : Create a Signal object representing a sinusoidal oscillation.

Graph.signals.hann_series_pwc : Graph operation to create a Pwc representing a sum of Hann window functions.

Graph.signals.hann_series_stf : Graph operation to create an Stf representing a sum of Hann window functions.

Notes

The series is defined as

Hann(t)=n=1Ncnsin2(πntT), \mathop{\mathrm{Hann}}(t) = \sum_{n=1}^N c_n \sin^2 \left( \frac{\pi n t}{T} \right) ,

where NN

Examples

Define a simple Hann series.

>>> signal = bo.signals.hann_series(
...     duration=5.0,
...     coefficients=np.array([0.5, 1, 0.25]),
... )
>>> signal.export_with_time_step(time_step=0.5)
array([0.15925422, 1.00144425, 1.375     , 1.05757275, 0.78172879,
   0.78172879, 1.05757275, 1.375     , 1.00144425, 0.15925422])

Was this useful?