diff --git a/lasp/lasp_octavefilter.py b/lasp/lasp_octavefilter.py index c8e6857..5f29fde 100644 --- a/lasp/lasp_octavefilter.py +++ b/lasp/lasp_octavefilter.py @@ -228,6 +228,11 @@ class SosFilterBank: xmin: Minimum value for the bands xmax: Maximum value for the bands """ + if xmin is None: + xmin = self.designer.xs[0] + if xmax is None: + xmax = self.designer.xs[-1] + self.fs = fs self.xs = list(range(xmin, xmax + 1)) nfilt = len(self.xs) @@ -290,10 +295,6 @@ class SosThirdOctaveFilterBank(SosFilterBank): xmax: Maximum value for the bands """ self.designer = ThirdOctaveBankDesigner(fs) - if xmin is None: - xmin = self.designer.xs[0] - if xmax is None: - xmax = self.designer.xs[-1] SosFilterBank.__init__(self, fs, xmin, xmax) @@ -313,10 +314,6 @@ class SosOctaveFilterBank(SosFilterBank): xmax: Maximum value for the bands, if not specified, use maximum """ self.designer = OctaveBankDesigner(fs) - if xmin is None: - xmin = self.designer.xs[0] - if xmax is None: - xmax = self.designer.xs[-1] SosFilterBank.__init__(self, fs, xmin, xmax) diff --git a/lasp/lasp_slm.py b/lasp/lasp_slm.py index fa0ab43..08058a2 100644 --- a/lasp/lasp_slm.py +++ b/lasp/lasp_slm.py @@ -149,7 +149,7 @@ class SLM: 'data': levels[:, [i]], 'x': x} if self.include_overall and self.fbdesigner is not None: - output['overall'] = {'t': t, 'data': levels[:, i+1], 'x': 0} + output['overall'] = {'t': t, 'data': levels[:, [i+1]], 'x': 0} return output