From 45f5eb9befeabdcd0a4f1f108d9c26616ca6739c Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Thu, 2 Nov 2023 13:05:18 +0000 Subject: [PATCH] Update src/gui_qt/data/container.py phase correction should be done when users wants it; closes #129 --- src/gui_qt/data/container.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/gui_qt/data/container.py b/src/gui_qt/data/container.py index 3a38aba..71bf9f4 100644 --- a/src/gui_qt/data/container.py +++ b/src/gui_qt/data/container.py @@ -777,12 +777,18 @@ class SignalContainer(ExperimentContainer): if apod[0] is not None: self._data.apod(*apod) - if fourier[0] is not None: - if fourier[0]: - if phase[0] is not None: - self._data.manual_phase(*phase) - self.fourier() - else: - self.fourier() - if phase[0] is not None: - self._data.manual_phase(*phase) + # ft with three options: None, True, False + if fourier[0] is None: + # ft None -> only phase correct + if phase[0] is not None: + self._data.manual_phase(*phase) + elif fourier[0] == True: + # ft True -> first phase correct then fft + if phase[0] is not None: + self._data.manual_phase(*phase) + self.fourier() + else: + # ft False -> first fft then phase correct + self.fourier() + if phase[0] is not None: + self._data.manual_phase(*phase) \ No newline at end of file