From fbdb2393a90c54f1540cbc8206c1f72df2678be8 Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Thu, 23 May 2024 02:33:20 +0200 Subject: [PATCH] Restore what should work --- datasets/raise/fft/remove_period_patterns.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/datasets/raise/fft/remove_period_patterns.py b/datasets/raise/fft/remove_period_patterns.py index ad7a24c..1868bac 100644 --- a/datasets/raise/fft/remove_period_patterns.py +++ b/datasets/raise/fft/remove_period_patterns.py @@ -52,13 +52,14 @@ def removePeriodicPatterns(fft1Part): realFixedImage = removePeriodicPatterns(np.real(fft1).copy()) imaginaryFixedImage = removePeriodicPatterns(np.imag(fft1).copy()) fixedImage = realFixedImage + 1j * imaginaryFixedImage -fixedImage = imaginaryFixedImage +#plt.imsave('second_image.png', np.log10(1 + abs(fixedImage))) +fixedImage = removePeriodicPatterns(abs(fft1)) figure, axes = plt.subplots(1, 2, sharex = True, sharey = True) plt.suptitle('Attenuating FFT significant lines') axes[0].set_title('Original FFT') -firstImage = np.log10(1 + abs(np.real(originalFft1))) +firstImage = np.log10(1 + abs(originalFft1)) secondImage = np.log10(1 + abs(fixedImage)) images = [firstImage, secondImage] vMin = np.min(images)