b_asic.sfg_generators
¶
B-ASIC signal flow graph generators.
This module contains a number of functions generating SFGs for specific functions.
- b_asic.sfg_generators.direct_form_fir(coefficients: Sequence[complex], name: str | None = None, mult_properties: Dict[str, int] | Dict[str, Dict[str, int]] | None = None, add_properties: Dict[str, int] | Dict[str, Dict[str, int]] | None = None) SFG ¶
Generate a signal flow graph of a direct form FIR filter.
The coefficients parameter is a sequence of impulse response values:
coefficients = [h0, h1, h2, ..., hN]
Leading to the transfer function:
\[\sum_{i=0}^N h_iz^{-i}\]- Parameters:
- coefficients1D-array
Coefficients to use for the FIR filter section.
- nameName, optional
The name of the SFG. If None, “Direct-form FIR filter”.
- mult_propertiesdictionary, optional
Properties passed to
ConstantMultiplication
.- add_propertiesdictionary, optional
Properties passed to
Addition
.
- Returns:
- Signal flow graph
See also
- b_asic.sfg_generators.transposed_direct_form_fir(coefficients: Sequence[complex], name: str | None = None, mult_properties: Dict[str, int] | Dict[str, Dict[str, int]] | None = None, add_properties: Dict[str, int] | Dict[str, Dict[str, int]] | None = None) SFG ¶
Generate a signal flow graph of a transposed direct form FIR filter.
The coefficients parameter is a sequence of impulse response values:
coefficients = [h0, h1, h2, ..., hN]
Leading to the transfer function:
\[\sum_{i=0}^N h_iz^{-i}\]- Parameters:
- coefficients1D-array
Coefficients to use for the FIR filter section.
- nameName, optional
The name of the SFG. If None, “Transposed direct-form FIR filter”.
- mult_propertiesdictionary, optional
Properties passed to
ConstantMultiplication
.- add_propertiesdictionary, optional
Properties passed to
Addition
.
- Returns:
- Signal flow graph
See also
- b_asic.sfg_generators.wdf_allpass(coefficients: Sequence[float], name: str | None = None, latency: int | None = None, latency_offsets: Dict[str, int] | None = None, execution_time: int | None = None) SFG ¶
Generate a signal flow graph of a WDF allpass section based on symmetric two-port adaptors.
Simplifies the SFG in case an adaptor operation is 0.
- Parameters:
- coefficients1D-array
Coefficients to use for the allpass section.
- nameName, optional
The name of the SFG. If None, “WDF allpass section”.
- latencyint, optional
Latency of the symmetric two-port adaptors.
- latency_offsetsoptional
Latency offsets of the symmetric two-port adaptors.
- execution_timeint, optional
Execution time of the symmetric two-port adaptors.
- Returns:
- Signal flow graph