Skip to content

Commit

Permalink
Remove overdensity
Browse files Browse the repository at this point in the history
  • Loading branch information
JBorrow committed Mar 16, 2024
1 parent 0052bd8 commit ec54956
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions swiftsimio/visualisation/power_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ec54956

Please sign in to comment.