Skip to main content

A python package to predict halo concentration and shape parameter.

Project description

CASPER (Concentration And Shape Parameter Estimation Routine)

Casper is a python package aimed at predicting the concentration and shape parameter of dark matter haloes as a function of mass and redshift for a specified cosmology.

Requirements

The module requires the following:

  • python3.6 or higher

Installation

The easiest way to install Casper is using pip:

pip install py-casper [--user]

The --user flag may be required if you do not have root privileges. Alternatively for a more involved 'installation' that is also editable you can simply clone the github repository:

git clone https://github.com/Shaun-T-Brown/CASPER.git

and add the folder (specifically src) to your python path. This method will also require scipy and numpy to be installed. Using pip will automatically install all dependencies.

To use the main functionality of the package (i.e. to predict c and alpha) you will need to be able to generate the linear power spectra for a given cosmology. In principle this can be done using any reliable method. However, we recommend installing and using CAMB.

Usage

The best way to demonstrate how Casper can be used is with a few examples. An interactive jupyter notebook with all necessary modules available can be found on Binder. A static version of the same notebook can be found at the following github repository, specifically in the file example_script.ipynb.

The functionality of the package is relatively straightforward and is essentially a collection of useful functions centered around the density profiles of dark matter haloes. Basic documentation can be generated using pydoc.

import casper

help(casper)

Acknowledging the code

If the results of this code, particularly the predictions for halo concentration and the shape parameter, are used in any published work then please acknowledge and cite the original paper appropriately.

The following bibtex entry may be used:

@ARTICLE{2022MNRAS.509.5685B,
       author = {{Brown}, Shaun T. and {McCarthy}, Ian G. and {Stafford}, Sam G. and {Font}, Andreea S.},
        title = "{Towards a universal model for the density profiles of dark matter haloes}",
      journal = {\mnras},
     keywords = {methods: numerical, cosmology: theory, dark matter, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Astrophysics of Galaxies},
         year = 2022,
        month = feb,
       volume = {509},
       number = {4},
        pages = {5685-5701},
          doi = {10.1093/mnras/stab3394},
archivePrefix = {arXiv},
       eprint = {2110.01632},
 primaryClass = {astro-ph.CO},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2022MNRAS.509.5685B},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

For any questions and enquires please contact me via email at S.T.Brown@2018.ljmu.ac.uk

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

py-casper-1.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_casper-1.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file py-casper-1.1.0.tar.gz.

File metadata

  • Download URL: py-casper-1.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.46.0 importlib-metadata/4.6.1 keyring/23.0.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.9

File hashes

Hashes for py-casper-1.1.0.tar.gz
Algorithm Hash digest
SHA256 6134f0935b5ed5f2bf0179ea5af701f3c5f2d88a0284044ee97f197dd1c90c9f
MD5 73174f8adf7f613d9a421a4bc330f23b
BLAKE2b-256 59716672dea1706cf357a0a10114050324d9f7619226b8af59802c48cc46b65f

See more details on using hashes here.

File details

Details for the file py_casper-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: py_casper-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.46.0 importlib-metadata/4.6.1 keyring/23.0.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.9

File hashes

Hashes for py_casper-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7509b37075f1827685bdd8e4b99e0ea8980f21dd9496776d8d3204ac475dbdcc
MD5 f92782017da98636f79f7d4b4af1c81b
BLAKE2b-256 de92a82fbc157c7ee9bef2b3be7832cef8c7b4005a2544e6e60e0a724963c6c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page