- Python 100%
| examples | ||
| sbmy_control | ||
| .gitignore | ||
| README.md | ||
| setup.py | ||
SBMY CONTROL
SBMY control is a pipeline package for running N-body cosmological simulation based on the Simbelmynë code. It features:
- Generation of parameter files, time stepping
- Execution of Initial Conditions generation with monofonIC or Simbelmynë
- Execution of N-body simulation with Simbelmynë using the tCOLA or sCOLA frameworks or with Gadget-4
- Friends-of-friends halo finding with Rockstar
- Analysis of results (slices, power spectra, ...)
All of the codes can be run locally or submitted to slurm job scheduler.
Please check the git wiki for more details on the package.
Installation
git clone https://git.aquila-consortium.org/Aquila-Consortium/sbmy_control.git
pip install -e .
Requirements
Simbelmynë needs to be installed and reachable through the pysbmy package.
If wanted, Gadget-4 can be installed, and its source code should be specified with the argument --gadget_source_dir.
If wanted, monofonIC can be installed, and its binary executable can be specified with the argument --monofonic_binary. We recommend using this monofonIC which supports output of \delta,\phi_1,\phi_2 and of the particles snapshot.
If wanted, Rockstar can be installed, and its binary executable can be specified with the argument --rockstar_binary.
Standard python libraries: numpy, matplotlib, h5py, tqdm.
Pylians package needs to be installed if you want to compute bispectra.
Commands
SBMY Control
sbmy_control -c config.yaml
or
sbmy_control -d /your/path -M alltCOLA -E slurm -Np 256 -ic monofonic
Exemples of configuration files can be found in the directory examples/
Slices
slices -ref final_density_tCOLA.h5 -f final_density_sCOLA.h5 final_density_other.h5 -l "sCOLA" "Other" -log
The details of all options can be displayed with -h argument.
Power Spectra
power_spectrum -ref final_density_tCOLA.h5 -f final_density_sCOLA.h5 final_density_other.h5 -l "sCOLA" "Other" --kmax 2. --Gfile fourier_grid.h5 --pcbfile "power_spectrum" -ps -cc
API
Modules contains functions that can be imported, and that can happen to be useful. Notably the analysis functions can be used to make plots inside your jupyter notebooks or python scripts. Notably:
from sbmy_control.analysis import slices
from sbmy_control.analysis import power_spectrum
fig, ax = slices.plot_imshow_with_reference([your2D_data1,your2D_data2],titles=["Data 1", "Data 2", ],reference=your2D_ref,ref_label="True Data")
fig1, ax1 = power_spectrum.plot_power_spectra([your3D_data1,your3D_data2],Pk_ref=Pk_ref,labels=["Data 1", "Data 2",],L=L,ylims=None,yticks=None,)
These functions can be run with or without reference to compare to, and other functions are also available.