Cosmology tools
Project description
Toolscosmo
A Python package for cosmological calculations required to study large-scale structures. Full documentation (with examples, installation instructions and complete module description) can be found at readthedocs.
Note: Some modules in the package are still under active development. Please contact the authors if you encounter any issues.
Package details
The package provides tools to model standard cosmology and its extensions. Currently, Toolscosmo supports the following calculations:
-
Cosmological calculators: Various functions for cosmological calculations and conversions.
-
Matter power spectrum:
- Interface with Boltzmann solvers (e.g., CLASS and CAMB) to simulate the linear power spectrum.
- Model the non-linear power spectrum using the halo model.
-
Emulators: Machine learning-based models for:
- Fast simulation of the linear power spectrum.
-
Halo mass function: Probability distribution function of dark matter halo masses.
For detailed documentation and usage instructions, see the contents page.
Under Development
-
Dark matter merger trees: Analytical merger trees using the extended Press-Schechter formalism.
-
Initial Condition Generator: Lagrangian Perturbation Theory (LPT) based initial condition generator for cosmological numerical simulation frameworks.
INSTALLATION
To install the package from source, one should clone this package running the following::
git clone https://github.com/sambit-giri/toolscosmo.git
To install the package in the standard location, run the following in the root directory::
pip install .
One can also install the latest version using pip by running the following command::
pip install git+https://github.com/sambit-giri/toolscosmo.git
The dependencies should be installed automatically during the installation process. The list of required packages can be found in the pyproject.toml file present in the root directory.
Optional Dependencies
Some features require optional dependencies to be installed manually:
- classy: Install manually by running
pip install classy - PyTorch (Hardware Specific):
- For CUDA 11.8:
pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 -f https://download.pytorch.org/whl/torch_stable.html - For CPU-only:
pip install torch torchvision torchaudio
- For CUDA 11.8:
Tests
For testing, one can use pytest. To run all the test script, run the following::
python -m pytest tests
CONTRIBUTING
If you find any bugs or unexpected behavior in the code, please feel free to open a Github issue. The issue page is also good if you seek help or have suggestions for us. For more details, please see here.
CREDIT
This package uses the template provided at https://github.com/sambit-giri/SimplePythonPackageTemplate/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toolscosmo-0.2.0.tar.gz.
File metadata
- Download URL: toolscosmo-0.2.0.tar.gz
- Upload date:
- Size: 635.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fb552c7535f838aa5c25c0052f7b31ba95300f65fab0245d74822eb20cb8533
|
|
| MD5 |
b2d3ec53a414a903ddfebe19b7e4a0db
|
|
| BLAKE2b-256 |
a527ab7af57d6de17123ff98df3784ce03a4315f956fab1afb637ef4eddd8469
|
File details
Details for the file toolscosmo-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: toolscosmo-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 659.7 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
106719eb5def5d2447c03b9c293537ae356903be2622d32be6f9f26588f534dc
|
|
| MD5 |
cfaa51c44730b940bf1ebfc401340ba7
|
|
| BLAKE2b-256 |
3cbe42bfa9cca89d875d1adae9eadaa2b67391cc0e82aaf615bb21371fa1d5d1
|