Skip to main content

A halo mass function calculator

Project description

THIS IS THE README FOR hmf
---------------------------------------------------------------------------------------

hmf is a python application that provides a flexible and simple way to calculate the
Halo Mass Function for any input cosmology, redshift, dark matter model, virial
overdensity or several other variables. Addition of further variables should be simple.

It is also the backend to humf, the online hmf calculator at hmf.icrar.org


INSTALLATION
---------------------------------------------------------------------------------------
---- Install Requirements ------
1. Install Python
2. Install numpy, scipy, scitools (easiest way is to pip install)
3. Install pycamb:
>>> cd <Directory that pycamb source will live in>
>>> git clone https://github.com/joezuntz/pycamb
>>> cd pycamb
>>> sh extract_camb.sh
>>> [sudo] python setup.py install --nonstop ** Only use --nonstop if using gfortran **

---- Install hmf --------------
>>> cd <Directory that hmf source will live in>
>>> git clone https://github.com/steven-murray/hmf
>>> cd hmf
>>> [sudo] python setup.py install


USAGE
---------------------------------------------------------------------------------------
hmf can be used interactively (for instance in ipython) or in a script.
To use interactively, in ipython do something like the following:

>>> from hmf import Perturbations
>>> import numpy as np
>>> M = np.arange(10,15,0.01)
>>> pert_object = Perturbations(M=M)
>>> mass_func = pert_object.MassFunction()

This will return a Sheth-Tormen mass function between 10^10 and 10^15 M_sun, at redshift 0
for a default cosmology. Cosmological parameters may be passed to the initialiser, Perturbations().

Check the docstring of Perturbations() for arguments allowed.


HISTORY
---------------------------------------------------------------------------------------
1.0.4 - June 6, 2013
Added Bhattacharya fitting function
Fixed concatenation of list and dict issue

1.0.2 - May 21, 2013
Fixed some warnings for non-updated variables passed to update()

1.0.1 - May 20, 2013
Added better warnings for non-updated variables passed to update()
Made default cosmology WMAP7

0.9.99- May 10, 2013
Added warning for k*R limits
Couple of minor bugfixes
**Important** Angulo fitting function corrected (arXiv version had a typo).

0.9.97- April 15, 2013
Urgent Bugfix for updating cosmology (for transfer functions)

0.9.96- April 11, 2013
Few bugfixes

0.9.95- April 09, 2013
Added cascading variable changes for optimization
Added this README
Added update() function to simply change parameters using cascading approach

0.9.9 - April 08, 2013
First version in its own package
Added pycamb integration
Removed fitting function from being a class variable
Removed overdensity form being a class variable

0.9.7 - March 18, 2013
Modified set_z() so it only does calculations necessary when z changes
Made calculation of dlnsdlnM in init since it is same for all z
Removed mean density redshift dependence

0.9.5 - March 10, 2013
The class has been in the works for almost a year now, but it currently
will calculate a mass function based on any of several fitting functions.

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

hmf-1.0.5.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

hmf-1.0.5-py2.7.egg (30.3 kB view details)

Uploaded Source

File details

Details for the file hmf-1.0.5.tar.gz.

File metadata

  • Download URL: hmf-1.0.5.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for hmf-1.0.5.tar.gz
Algorithm Hash digest
SHA256 ea723d81f487e3e16c8f38df3de2737a0474fce7d30125d039e88de19f468c89
MD5 f5ecd7a9b0e6479639504023b06c71c9
BLAKE2b-256 4fe08b69663b66fd2eabb1ad46475c4f6b739fdb0b96773c7f821f726384a809

See more details on using hashes here.

File details

Details for the file hmf-1.0.5-py2.7.egg.

File metadata

  • Download URL: hmf-1.0.5-py2.7.egg
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for hmf-1.0.5-py2.7.egg
Algorithm Hash digest
SHA256 03f210950cd2d16e90892eb69c41759ebea0c8c45f470ba9493dd8907000103f
MD5 59bca31e3dc1b9c234cbdafb5a8cd937
BLAKE2b-256 2ac9b5735df8c54ac6a01708b69b8a5ec61616746cd12ec8e8e73f1be30ae3e2

See more details on using hashes here.

Supported by

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