From 0b7c6085f061766810653fdcc95760c97ba3ae5d Mon Sep 17 00:00:00 2001 From: jupfi Date: Fri, 7 Jun 2024 16:48:27 +0200 Subject: [PATCH] Fixed bug with multiple datasets. --- src/quackseq/measurement.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/quackseq/measurement.py b/src/quackseq/measurement.py index 4dd3bae..b6d0c3a 100644 --- a/src/quackseq/measurement.py +++ b/src/quackseq/measurement.py @@ -56,8 +56,8 @@ class Measurement: self.fdy = [fdy] self.fits = [] - def add_data(self, tdx: np.array, tdy: np.array) -> None: - """Adds data to the measurement. + def add_dataset(self, tdx: np.array, tdy: np.array) -> None: + """Adds dataset to the measurement. Args: tdx (np.array): Time axis for the x axis of the measurement data. @@ -65,7 +65,9 @@ class Measurement: """ self.tdx.append(tdx) self.tdy.append(tdy) - self.fdx, self.fdy = sp.fft(tdx, tdy, self.frequency_shift) + fdx, fdy = sp.fft(tdx, tdy, self.frequency_shift) + self.fdx.append(fdx) + self.fdy.append(fdy) def apodization(self, function: Function) -> "Measurement": """Applies apodization to the measurement data.