Skip to main content
https://travis-ci.org/steven-murray/mrpy.png?branch=master https://coveralls.io/repos/steven-murray/mrpy/badge.svg?branch=master&service=github https://api.codacy.com/project/badge/Grade/e5d5d9b72d024bd09e24ea833745c6da

A Python package for calculations with the MRP parameterisation of the Halo Mass Function.

See Murray, Robotham, Power 2016 (in prep.) for more details on what the MRP is.

Quick Start

Installation

Required packages are numpy, scipy, mpmath (for incomplete gamma functions), and cached_property. These should be automatically installed when installing mrpy.

To use the MCMC fitting features, emcee and pystan are needed. These are not installed automatically.

The simplest way to install is pip install mrpy. This should install the required dependencies automatically.

To get the bleeding edge, use pip install git+git://github.com/steven-murray/mrpy.git.

If for some reason pip is not an option, manually download the github repo and use python setup.py install.

Getting Started

There’s a lot of things that you can do with mrpy. What you require will depend on the problem at hand. We recommend looking at some of the examples, and the API itself for how to use the code.

Documentation

Read the docs.

Features

With mrpy you can:

  • Calculate basic statistics of the truncated generalised gamma distribution (TGGD) with the TGGD class: mean, mode, variance, skewness, pdf, cdf, generate random variates etc.

  • Generate MRP quantities with the MRP class: differential number counts, cumulative number counts, various methods for generating normalisations.

  • Generate the MRP-based halo mass function as a function of physical parameters via the mrp_b13 function.

  • Fit MRP parameters to data in the form of arbitrary curves with the get_fit_curve function.

  • Fit MRP parameters to data in the form of a sample of variates with the SimFit class: simulation data is supported with extra efficiency, simulation suites fitted simultaneously is also supported, arbitrary priors on parameters, log-normal uncertainties on variates supported.

  • Calculate analytic hessians, jacobians at any point (including the solution of a fit).

  • Use alternate parameterisations of the same form via the reparameterise module.

  • Work with a special entirely analytic model to understand the effects of various parameters in the analytic_model module.

Examples

There are several examples featured in the docs/examples directory of the github repository. These can also be found in the official documentation.

Metadata

Release files for mrpy 1.1.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 mrpy 1.1.0
File Size Uploaded
mrpy-1.1.0.tar.gz 29.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mrpy 1.1.0
File Interpreter ABI Platform
mrpy-1.1.0-py2-none-any.whl Python 2 none any Details

Total release size: 65.9 kB

Release files / mrpy-1.1.0.tar.gz

Download URL mrpy-1.1.0.tar.gz
Size 29.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b814cb14a8939aece512cd06528543f4e66f0c8ae996668b41999d9889cfb0bf
BLAKE2b-256 checksum
How to use checksums
6d2652a0aea60cd7f71d6e986a6d129cc2b2bce0be50b69f49be8d9eed96f6d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mrpy-1.1.0-py2-none-any.whl

Download URL mrpy-1.1.0-py2-none-any.whl
Size 36.7 kB
Tags Python 2
SHA-256 checksum
How to use checksums
c78d17e861afe1a676debf3aeabab78f37489b9067ce9e517de3f12efecd0252
BLAKE2b-256 checksum
How to use checksums
cc271f20c2e94565903f1e11771f95ac2b5ec26d9fc8f9c7140be5007263074a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.9.0

2 release files

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