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 HMFcalc, the online hmf calculator at hmf.icrar.org
INSTALLATION
---------------------------------------------------------------------------------------
---- Install Requirements ------
1. Install Python
2. Install numpy, scipy, scitools,cosmolopy (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 --------------
>>> pip install hmf
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
>>> pert = Perturbations()
>>> mass_func = pert.dndlnm
>>> mass_variance = pert.sigma
>>> ...
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()
To change the parameters (cosmological or otherwise), one should use the update() method,
if a Perturbations() object already exists. For example
>>> pert = Perturbations()
>>> pert.update(omegab = 0.05,z=10) #update baryon density and redshift
>>> cumulative_mass_func = pert.ngtm
Check the docstring of Perturbations() for all arguments allowed.
HISTORY
---------------------------------------------------------------------------------------
1.1.1 - July 02, 2013
Corrections to Watson fitting function from latest update on arXiv
** Fixed units for k and transfer function **
Improved docstring for Perturbations class
Added Eisenstein-Hu fit to the transfer function
1.1.0 - June 27, 2013
Massive overhaul of structure
Now dependencies are tracked throughout the program, making updates even faster
1.0.10- June 24, 2013
Added dependence on Delta_vir to Tinker
1.0.9 - June 19, 2013
Fixed an error with an extra ln(10) in the mass function (quoted as dn/dlnM but actually outputting dn/dlog10M)
1.0.8 - June 19, 2013
Took out log10 from cumulative mass functions
Better cumulative mass function logic
1.0.6 - June 19, 2013
Fixed cumulative mass functions (extra factor of M was in there)
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.
---------------------------------------------------------------------------------------
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 HMFcalc, the online hmf calculator at hmf.icrar.org
INSTALLATION
---------------------------------------------------------------------------------------
---- Install Requirements ------
1. Install Python
2. Install numpy, scipy, scitools,cosmolopy (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 --------------
>>> pip install hmf
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
>>> pert = Perturbations()
>>> mass_func = pert.dndlnm
>>> mass_variance = pert.sigma
>>> ...
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()
To change the parameters (cosmological or otherwise), one should use the update() method,
if a Perturbations() object already exists. For example
>>> pert = Perturbations()
>>> pert.update(omegab = 0.05,z=10) #update baryon density and redshift
>>> cumulative_mass_func = pert.ngtm
Check the docstring of Perturbations() for all arguments allowed.
HISTORY
---------------------------------------------------------------------------------------
1.1.1 - July 02, 2013
Corrections to Watson fitting function from latest update on arXiv
** Fixed units for k and transfer function **
Improved docstring for Perturbations class
Added Eisenstein-Hu fit to the transfer function
1.1.0 - June 27, 2013
Massive overhaul of structure
Now dependencies are tracked throughout the program, making updates even faster
1.0.10- June 24, 2013
Added dependence on Delta_vir to Tinker
1.0.9 - June 19, 2013
Fixed an error with an extra ln(10) in the mass function (quoted as dn/dlnM but actually outputting dn/dlog10M)
1.0.8 - June 19, 2013
Took out log10 from cumulative mass functions
Better cumulative mass function logic
1.0.6 - June 19, 2013
Fixed cumulative mass functions (extra factor of M was in there)
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
Release history Release notifications | RSS feed
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.1.1.tar.gz
(18.9 kB
view details)
Built Distribution
hmf-1.1.1-py2.7.egg
(73.6 kB
view details)
File details
Details for the file hmf-1.1.1.tar.gz
.
File metadata
- Download URL: hmf-1.1.1.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d20cb3bdad7470346549cf176a8e886711e1fed2a76fc2b1424ed288f687080b |
|
MD5 | fabeda333b7914dd91b821cdc1edf527 |
|
BLAKE2b-256 | 0e1d104f400a8c63c0d634cb2603e52f45bf68d243e1b0e7c3b2b2dc51812db9 |
Provenance
File details
Details for the file hmf-1.1.1-py2.7.egg
.
File metadata
- Download URL: hmf-1.1.1-py2.7.egg
- Upload date:
- Size: 73.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3a312a195962599e3123634450cdf848c5f70f96461fa777eb668e12365ba41 |
|
MD5 | bef801b509f202733aec645cc2fa6d76 |
|
BLAKE2b-256 | a3d4f0e3d227797eca96a3d76a8ba7b12ac0d44eec82ff5d427800c223eb096c |