PMpp is a Python-based deep learning project designed for training in the field of cosmology. It uses a modified version of JaxPM, a library for efficient particle mesh computations.
This method is derived from the routines found in the jaxpm-paper.
The project simulates the evolution of dark matter particles in the universe using the Particle-Mesh (PM) method and follows the implementation as outlined in this paper. It's the code accompanying the paper.
The project includes the downsampled data for LH_0 and LH_100 from the CAMELS simulations. The SaveLHSims.py script provided can be used to prepare the downsampled data for further training or tests. The current models can be used in tandem with PMpp.py script. The ComputePK.py script provides a method to compute the power spectra and cross correlations, while Visualisation.py allows viewing the snapshots for the corrected and uncorrected simulations.
The Models.py script defines models that can be trained using the Training.py script.
The project implements a neural network using the JAX library that's capable of predicting particle positions in cosmological simulations based on starting conditions and cosmological parameters.
Before starting, ensure that you have Python 3.10 or more and pip installed.
-
Clone this repository to your local machine.
git clone https://github.com/rouzib/PMpp.git
-
Navigate to the project directory.
cd PMpp -
Install the necessary packages using the provided
requirements.txtfile.pip install -r requirements.txt
The main script used in this tool is PMpp.py, designed to train the model and save parameters after every iteration.
Before executing, ensure that the necessary constants are initialized correctly in the section clearly labelled "Defined Constants".
To execute:
python PMpp.pyThis project depends primarily on the following libraries:
However, this is not an exhaustive list of all the required libraries. For a complete list of dependencies, please refer to the requirements.txt file in the project directory.