Skip to main content

Toolscosmo

License GitHub Repository CI Status PyPI version

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

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/ 

Metadata

Release files for toolscosmo 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toolscosmo 0.3.0
File Size Uploaded Provenance Actions
toolscosmo-0.3.0.tar.gz 824.5 kB Without provenance Details for toolscosmo-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for toolscosmo 0.3.0
File Interpreter ABI Platform Actions
toolscosmo-0.3.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for toolscosmo-0.3.0-cp311-cp311-macosx_11_0_arm64.whl

Total release size: 1.7 MB

Release files / toolscosmo-0.3.0.tar.gz

Download URL toolscosmo-0.3.0.tar.gz
Size 824.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2e2f18b0bc2dcb0628e4230779a6092b3fc9e5cc21a731f90690599af78f8fb3
BLAKE2b-256 checksum
How to use checksums
388aa5cd93683c0d37bb1c718099d914823c24d3cf9892c47cf3e31bfbc22eb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / toolscosmo-0.3.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL toolscosmo-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Size 903.2 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a7ba8f1fc9e1f213a2dd5b82d623d6204c7c32962f16a3a375d79a69df62cead
BLAKE2b-256 checksum
How to use checksums
cc75927ac5c60e399751dd5c3ea549a7e2d6c03d257b1c52e0b38317d1383a7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Security for toolscosmo 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page