Skip to content

Commit

Permalink
Typo and doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Patarimi committed Jul 8, 2024
1 parent 0de5d40 commit 7aa7dd8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hades/models/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def prototype(order: int, style: str, ripple: float = 0.2):
"""
Compute a low pass filter prototype. The equations are from [source](https://ia803103.us.archive.org/15/items/MicrowaveFiltersImpedanceMatchingNetworksAndCouplingStructures/Microwave%20Filters%2C%20Impedance-Matching%20Networks%2C%20and%20Coupling%20Structures.pdf).
:param order: order of the filter
:param style: either "flat" for maximally flat filter or ripple for equal ripple (Tchebysheff) filter
:param style: either "flat" for maximally flat filter or ripple for equal ripple (Chebyshev) filter
:param ripple: in-band ripple in dB
:return: a list of coefficients
"""
Expand All @@ -35,13 +35,13 @@ def prototype(order: int, style: str, ripple: float = 0.2):
if order % 2 == 0:
g[order] = 1 / np.tanh(beta / 4) ** 2
return g
raise ValueError(f"Unkwon filter type {style}, available are flat, ripple")
raise ValueError(f"Unknown filter type {style}, available are flat, ripple")


def scaling(proto: np.ndarray, f: float, r_0: float):
"""
properly scale a low-pass filter prototype.
:param proto: list of coefficient of the prototype (see [prototype](#hades.devices.app_models.filter.prototype))
:param proto: list of coefficient of the prototype (see [prototype](filter.md#hades.models.filter.prototype))
:param f:
:param r_0:
:return:
Expand Down

0 comments on commit 7aa7dd8

Please sign in to comment.