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:

@misc{brown2021universal,
      title={Towards a universal model for the density profiles of dark matter haloes}, 
      author={Shaun T. Brown and Ian G. McCarthy and Sam G. Stafford and Andreea S. Font},
      year={2021},
      eprint={2110.01632},
      archivePrefix={arXiv},
      primaryClass={astro-ph.CO}
}

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.0.0.tar.gz (5.2 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.0.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py-casper-1.0.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

File hashes

Hashes for py-casper-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c7583a3297aed4fff71b1b42d05e6ab6666ae1b8b6bc0dc068037a085660853e
MD5 8c5006c3fed8210086f35549adc198d0
BLAKE2b-256 343e23c2856f927f1d4dd1d3763c7b8860e3bab9b99b5eedb758406020c1568d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_casper-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.9

File hashes

Hashes for py_casper-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c90811f1b8fa598c3cd0898ac370bae22c56a17367b3850c797bc500e89fb476
MD5 c1fed313511c36196451770dfbadf154
BLAKE2b-256 7257a94d037f08de625e957d046468268a3fa80bf787e66c26651e41007f1eec

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