diff --git a/lasp/__init__.py b/lasp/__init__.py index 54bf4e6..e69de29 100644 --- a/lasp/__init__.py +++ b/lasp/__init__.py @@ -1,3 +0,0 @@ -from .wrappers import * -from .lasp_tools import * -from .lasp_common import * \ No newline at end of file diff --git a/lasp/filter/__init__.py b/lasp/filter/__init__.py index e69de29..fbd1687 100644 --- a/lasp/filter/__init__.py +++ b/lasp/filter/__init__.py @@ -0,0 +1,4 @@ + +from .freqweighting_fir import A, C + +__all__ = ['A', 'Z'] diff --git a/lasp/filter/bandpass_fir.py b/lasp/filter/bandpass_fir.py index f7d7121..ce30654 100644 --- a/lasp/filter/bandpass_fir.py +++ b/lasp/filter/bandpass_fir.py @@ -84,6 +84,14 @@ class FilterBankDesigner: return frsp(fd, freq, fir) + def nominal_txt_tox(self, nom_txt): + """ + Returns the x-value corresponding to a certain nominal txt: '1k' -> 0 + """ + for x in self.xs: + if self.nominal_txt(x) == nom_txt: + return x + raise ValueError(f'Could not find an x-value corresponding to {nom_txt}.') class OctaveBankDesigner(FilterBankDesigner): """