Skip to content
Snippets Groups Projects

Add WDF allpass generator

Merged Oscar Gustafsson requested to merge wdfgenerator into master
Files
3
+ 31
1
@@ -22,7 +22,37 @@ def wdf_allpass(
latency: Optional[int] = None,
latency_offsets: Optional[Dict[str, int]] = None,
execution_time: Optional[int] = None,
):
) -> SFG:
"""
Generate a signal flow graph of a WDF allpass section based on symmetric two-port adaptors.
Parameters
----------
coefficients : 1D-array
Coefficients to use for the allpass section
input_op : Input, optional
The Input to connect the SFG to. If not provided, one will be generated.
output : Output, optional
The Output to connect the SFG to. If not provided, one will be generated.
name : Name, optional
The name of the SFG. If None, "WDF allpass section".
latency : int, optional
Latency of the symmetric two-port adaptors.
latency_offsets : optional
Latency offsets of the symmetric two-port adaptors.
execution_time : int, optional
Execution time of the symmetric two-port adaptors.
Returns
-------
Signal flow graph
"""
np.asarray(coefficients)
coefficients = np.squeeze(coefficients)
if coefficients.ndim != 1:
Loading