SWIFTSIM / swiftsimio

Python library for reading SWIFT data. Uses unyt and h5py.
GNU Lesser General Public License v3.0
16 stars 13 forks source link

Added initial power spec version #186

Closed JBorrow closed 3 months ago

JBorrow commented 6 months ago

I don't understand why this isn't working. This version has significant dependences on the number of pixels used for voxelization of the underlying particle data, and as a function of folding:

dark_matter_power_spectrum

This plot is made with cosmo_volume_example.hdf5 that we have hosted on IOExamples.

JBorrow commented 6 months ago

So I took a mesh from nbodykit, and tried to run it through our power spectrum code:

Nbodykit:

Screenshot 2024-03-14 at 2 07 00 PM

Ours:

dark_matter_power_spectrum_mesh_from_nbodykit

JBorrow commented 6 months ago

Ok, I got them to overlap more with the current code version... dark_matter_power_spectrum_mesh_from_nbodykit

JBorrow commented 6 months ago

dark_matter_power_spectrum

About a factor of 1e6 off but this looks a bit better

JBorrow commented 6 months ago

Working!

dark_matter_power_spectrum

JBorrow commented 6 months ago

Aside from not handling shot noise correctly, we are looking very good w.r.t. SWIFT!

spectra_comparison

JBorrow commented 5 months ago

Now added docs and the auto-fold version.

dark_matter_power_spectrum

Power Spectra — SWIFTsimIO 7.0.3 documentation.pdf

JBorrow commented 3 months ago

Auto-folding is now in the codebase, and allows for better transitions between folds (seems our averaging scheme doesn't really work):

power_spectrum

power_spectrum

JBorrow commented 3 months ago

power_spectrum Fixed divots. Happy to merge.