filter¶
- photonforge.abstract.filter(*, family='rc', shape='lp', f_cutoff=20e9, order=1, ripple=0, window='hann', a=(1.0,), b=(), taps=101, insertion_loss=0)[source]¶
Abstract filter for electrical signals.
Based on
photonforge.FilterTimeStepper.- Parameters:
family (Literal['digital', 'rc', 'butterworth', 'bessel', 'cheby1', 'rectangular', 'gaussian']) – Filter family.
shape (Literal['lp', 'hp', 'bp', 'bs']) – Filter shape.
f_cutoff (Annotated[float, minimum=0, units='Hz'] | Annotated[Sequence[Annotated[float, minimum=0, units='Hz']], maxItems=2, minItems=2]) – Cutoff frequency for low- and high-pass filter shapes. For
family=="tunable_lp_rc", this can be anphotonforge.Interpolatorto provide the dependency with the input voltage. For band-pass and band-stop shapes, this is a 2-value sequence with low and high cutoff frequencies.order (Annotated[int, exclusiveMinimum=0]) – Filter order.
ripple (Annotated[float, minimum=0, units='dB']) – Maximum ripple for Chebyshev filters.
window (str | tuple[str, float] | tuple[str, float, float] | tuple[str, Sequence[float]]) – Window specification for rectangular filters. Please consult the help for
scipy.signal.firwinfor valid options.a (Sequence[complex]) – Recursive (denominator) coefficients for a digital IIR filter.
b (Sequence[complex]) – Direct (numerator) coefficients for a digital FIR or IIR filter.
taps (Annotated[int, exclusiveMinimum=0]) – Length of rectangular or Gaussian filters.
insertion_loss (Annotated[float, minimum=0, units='dB']) – Insertion loss added to the filter response.
- Return type: