profiley

profiley is an object-oriented implementation of some of the most common astrophysical profiles used to describe galaxies and clusters of galaxies.

Installation

profiley is available through the Python Package Index (PyPI), which means installation is as easy as

pip install profiley

Alternatively, you may download the development version by forking or cloning the Github repository.

Basic Usage

For example, to obtain the surface density profile of an NFW profile we simply need the following:

import numpy as np
from profiley.nfw import NFW

mass = 1e14
concentration = 5
z = 0.5
nfw = NFW(mass, concentration, z)

R = np.logspace(-1, 2, 10)
rho = nfw.projected(R)

profiley can handle np.ndarray objects of any shape, provided all the arguments can be multiplied without manipulation. For instance, we can define an nfw object as follows

mass = np.logspace(14, 15, 11)
concentration = np.linspace(4, 5, 3)[:,None]
z = np.linspace(0.2, 1, 5)[:,None,None]

nfw = NFW(mass, concentration, z)

whose profile methods will produce arrays of profiles with shape (R.size,5,3,11).

Examples

For more detailed usage, see the github examples.

Available profiles

The following profiles are available in profiley:

License

profiley is free software and is distributed with an MIT License. See License.