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, T.
- coefficients (np.ndarray) – The coefficients for the different Hann window functions, cn. It must be a 1D array.
Returns
The Hann window functions series.
Return type
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=1∑Ncnsin2(Tπnt),where N is the number of coefficients.
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])