hann_series
The Boulder Opal Toolkits are currently in beta phase of development. Breaking changes may be introduced.
- 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, \(c_n\). It must be a 1D array.
- Returns:
The Hann window functions series.
- Return type:
See also
signals.cosine_pulse()
Create a Signal object representing a cosine pulse.
signals.sinusoid()
Create a Signal object representing a sinusoidal oscillation.
signals.hann_series_pwc()
Graph operation to create a Pwc representing a sum of Hann window functions.
signals.hann_series_stf()
Graph operation to create an Stf representing a sum of Hann window functions.
Notes
The series is defined as
\[\mathop{\mathrm{Hann}}(t) = \sum_{n=1}^N c_n \sin^2 \left( \frac{\pi n t}{T} \right) ,\]where \(N\) is the number of coefficients.
Examples
Define a simple Hann series.
>>> signal = graph.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])