From e405ab8eeae65fe276562090027aaad589ab80b2 Mon Sep 17 00:00:00 2001 From: Casper Date: Tue, 8 Nov 2022 14:27:16 +0100 Subject: [PATCH] Bugfix in lasp_measurement.py/CPS() --- src/lasp/lasp_measurement.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lasp/lasp_measurement.py b/src/lasp/lasp_measurement.py index 587e421..fc5364c 100644 --- a/src/lasp/lasp_measurement.py +++ b/src/lasp/lasp_measurement.py @@ -50,7 +50,7 @@ from .lasp_config import LASP_NUMPY_FLOAT_TYPE from scipy.io import wavfile import os, time, wave, logging from .lasp_common import SIQtys, Qty, getFreq -from .lasp_cpp import Window, DaqChannel, LASP_VERSION_MAJOR +from .lasp_cpp import Window, DaqChannel, LASP_VERSION_MAJOR, AvPowerSpectra from typing import List @@ -480,18 +480,18 @@ class Measurement: """ nfft = kwargs.pop('nfft', 2048) - window = kwargs.pop('window', Window.hann) + window = kwargs.pop('windowType', Window.WindowType.Hann) overlap = kwargs.pop('overlap', 50.0) if channels is None: channels = list(range(self.nchannels)) nchannels = len(channels) - aps = AvPowerSpectra(nfft, nchannels, overlap, window) + aps = AvPowerSpectra(nfft, window, overlap) freq = getFreq(self.samplerate, nfft) for data in self.iterData(channels, **kwargs): - CS = aps.addTimeData(data) + CS = aps.compute(data) return freq, CS