From ec549565928604e7d477e093b124a011b764be17 Mon Sep 17 00:00:00 2001 From: Josh Borrow Date: Fri, 15 Mar 2024 22:20:21 -0400 Subject: [PATCH] Remove overdensity --- swiftsimio/visualisation/power_spectrum.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/swiftsimio/visualisation/power_spectrum.py b/swiftsimio/visualisation/power_spectrum.py index 00ff9535..26217c6e 100644 --- a/swiftsimio/visualisation/power_spectrum.py +++ b/swiftsimio/visualisation/power_spectrum.py @@ -290,11 +290,7 @@ def deposition_to_power_spectrum( box_size = box_size[0] / folding npix = deposition.shape[0] - # Convert to overdensity - mean_deposition = np.mean(deposition.v) - overdensity = (deposition.v - mean_deposition) / mean_deposition - - fft = np.fft.fftn(overdensity / np.prod(deposition.shape)) + fft = np.fft.fftn(deposition.v / np.prod(deposition.shape)) fourier_amplitudes = (fft * fft.conj()).real * box_size ** 3 # Calculate k-value spacing (centered FFT)