Skip to content

abstract.filter

filter(
*,
family: Literal[
'digital',
'rc',
'butterworth',
'bessel',
'cheby1',
'rectangular',
'gaussian',
] = 'rc',
shape: Literal['lp', 'hp', 'bp', 'bs'] = 'lp',
f_cutoff: Annotated[float, minimum=0, units='Hz']
| Annotated[
collections.abc.Sequence[Annotated[float, minimum=0, units='Hz']],
maxItems=2,
minItems=2,
] = 20000000000.0,
order: Annotated[int, exclusiveMinimum=0] = 1,
ripple: Annotated[float, minimum=0, units='dB'] = 0,
window: str
| tuple[str, float]
| tuple[str, float, float]
| tuple[str, collections.abc.Sequence[float]] = 'hann',
a: collections.abc.Sequence[complex] = (1.0,),
b: collections.abc.Sequence[complex] = (),
taps: Annotated[int, exclusiveMinimum=0] = 101,
insertion_loss: Annotated[float, minimum=0, units='dB'] = 0,
) -> photonforge.Component

Abstract filter for electrical signals.

Based on FilterTimeStepper.

Args

  • family: Filter family.
  • shape: Filter shape.
  • f_cutoff: Cutoff frequency for low- and high-pass filter shapes. For family=="tunable_lp_rc", this can be an Interpolator to 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: Filter order.
  • ripple: Maximum ripple for Chebyshev filters.
  • window: Window specification for rectangular filters. Please consult the help for scipy.signal.firwin for valid options.
  • a: Recursive (denominator) coefficients for a digital IIR filter.
  • b: Direct (numerator) coefficients for a digital FIR or IIR filter.
  • taps: Length of rectangular or Gaussian filters.
  • insertion_loss: Insertion loss added to the filter response.