Comprehensive Halotools Reference/API¶
halotools.empirical_models Package¶
Functions¶
|
Dictionary that can be passed to the |
|
Function used to ensure that a keyword argument passed to the constructor of an orthogonal mix-in class is not already an attribute bound to self. |
|
Dictionary to build an CLF-style model based on Cacciato et al. (2009), arXiv:0807.4932. |
|
Function driving the selection of subhalos during HOD mock population. |
|
Given a set of input points with primary property |
|
Function used to model a correlation between two variables, |
|
Find the union of the dtypes in the input list, and return a composite dtype after verifying consistency of typing of possibly repeated fields. |
|
Incomplete gamma function. |
|
Convenience wrapper around |
|
Kernel underlying the bin-free implementation of conditional abundance matching. |
|
The virial overdensity in units of the critical density, using the fitting formula of Bryan & Norman 1998, assuming \(\Omega_{\Lambda} = 0.\) |
|
The threshold density for a given spherical-overdensity mass definition. |
|
Function used to apply periodic boundary conditions of the simulation, so that mock galaxies all lie in the range [0, Lbox]. |
|
For the input mass definition, return the string used to access halo table column storing the halo radius. |
|
For the input mass definition, return the string used to access halo table column storing the halo mass. |
|
Spherical overdensity radius as a function of the input mass. |
|
The circular velocity evaluated at the halo boundary, \(V_{\rm vir} \equiv \sqrt{GM_{\rm halo}/R_{\rm halo}}\). |
|
Spherical overdensity mass as a function of the input radius. |
|
Dictionary to build an HOD-style model in which central and satellite occupations statistics are assembly-biased. |
|
Dictionary to build an HOD-style based on Leauthaud et al. (2011), arXiv:1103.2077. |
|
Starting from an input array storing the rank-order percentile of some quantity, add noise to these percentiles to achieve the desired Spearman rank-order correlation coefficient between |
|
Method to evaluate an input polynomial at the input_abscissa. |
|
Function randomizes the entries of |
Dictionary to build a subhalo-based model for both stellar mass and star-formation rate. |
|
|
Solves for coefficients of the unique, minimum-degree polynomial that passes through the input abscissa and attains values equal the input ordinates. |
|
Dictionary to build an HOD-style based on Tinker et al. (2013), arXiv:1308.2974. |
|
Dictionary for an HOD-style based on Zheng et al. (2007), arXiv:0703457. |
Dictionary to build an HOD-style based on Zu & Mandelbaum et al. (2015), arXiv:1505.02781. |
|
Dictionary to build an HOD-style based on Zu & Mandelbaum et al. (2016), arXiv:1509.06758. |
Classes¶
|
Container class for any analytical radial profile model. |
|
Assembly-biased modulation of |
|
Assembly-biased modulation of |
|
Power law model for the occupation statistics of satellite galaxies, introduced in Kravtsov et al. 2004, arXiv:0308519. |
|
HOD-style model for a central galaxy occupation that derives from two distinct active/quiescent stellar-to-halo-mass relations. |
|
Assembly-biased modulation of |
|
Assembly-biased modulation of |
|
Stellar-to-halo-mass relation based on Behroozi et al 2010. |
|
Model for the phase space distribution of galaxies in isotropic Jeans equilibrium in an NFW halo profile, based on Navarro, Frenk and White (1995), where the concentration of the tracers is permitted to differ from the host halo concentration. |
|
Component model for any binary-valued galaxy property whose assignment is determined by interpolating between points on a grid. |
|
Container class for any component model of a binary-valued galaxy property. |
|
CLF-style model for the central galaxy occupation. |
|
CLF-style model for the satellite galaxy occupation. |
|
alignment model for central galaxies in host-halos |
|
A Dimroth-Watson distribution of :math:`cos(theta)' |
model for the stregth of alignment for centrals |
|
|
Model for the quiescent fraction as a function of halo mass defined by interpolating between a set of input control points. |
|
Class used as an orthogonal mix-in to introduce step function-style assembly-biased behavior into any component model. |
|
Class responsible for populating a simulation with a population of mock galaxies based on an HOD-style model built by the |
|
Class used to build HOD-style models of the galaxy-halo connection. |
|
HOD-style model for any central galaxy occupation that derives from a stellar-to-halo-mass relation. |
|
HOD-style model for any satellite galaxy occupation that derives from a stellar-to-halo-mass relation. |
|
Simple model used to generate log-normal scatter in a stellar-to-halo-mass type relation. |
|
Power law model for the occupation statistics of satellite galaxies, introduced in Kravtsov et al. 2004, arXiv:0308519. |
|
Abstract base class responsible for populating a simulation with a synthetic galaxy population. |
|
Abstract container class used to build any composite model of the galaxy-halo connection. |
Orthogonal mix-in class used to turn an analytical phase space model (e.g., |
|
|
Stellar-to-halo-mass relation based on Moster et al. (2013), arXiv:1205.5807. |
|
Model for the phase space distribution of mass and/or galaxies in isotropic Jeans equilibrium in an NFW halo profile, based on Navarro, Frenk and White (1995), where the concentration of the galaxies is the same as the concentration of the parent halo |
|
Model for the spatial distribution of mass and/or galaxies residing in an NFW halo profile, based on Navarro, Frenk and White (1995), arXiv:9508025. |
|
Abstract base class of any occupation model. |
|
Factory class providing instances of |
|
Factory class providing instances of |
|
Assembly-biased modulation of |
|
Assembly-biased modulation of |
|
No positional arguments accepted; all argument are strictly keyword arguments. |
|
Abstract container class for models connecting table to their primary galaxy property, e.g., stellar mass or luminosity. |
|
radial alignment model for satellite galaxies |
model for the stregth of alignment of satellites |
|
|
class to model random galaxy orientations |
|
Model for the phase space distribution of galaxies in isotropic Jeans equilibrium in an NFW halo profile, based on Navarro, Frenk and White (1995), where the concentration of the tracers is permitted to differ from the host halo concentration, independently for red and blue galaxies. |
|
alignment model for satellite galaxies in sub-halos |
|
alignment model for satellite galaxies in sub-halos aligning with their respective subhalos most of the functionality here is copied from SatelltieAlignment by Duncan Campbell. |
|
Class responsible for populating a simulation with a population of mock galaxies based on models generated by |
|
Class used to build models of the galaxy-halo connection in which galaxies live at the centers of subhalos. |
|
Class using subhalo information to model the phase space of satellite galaxies. |
|
HOD-style model for a central galaxy occupation that derives from two distinct active/active stellar-to-halo-mass relations. |
|
HOD-style model for a central galaxy occupation that derives from two distinct active/quiescent stellar-to-halo-mass relations. |
|
HOD-style model for a central galaxy occupation that derives from two distinct active/quiescent stellar-to-halo-mass relations. |
|
Profile of central galaxies residing at the exact center of their host halo with the exact same velocity as the halo velocity. |
|
Profile of dark matter halos with all their mass concentrated at exactly the halo center. |
|
|
|
Power law model for the occupation statistics of satellite galaxies, introduced in Kravtsov et al. 2004, arXiv:0308519. |
|
HOD-style model for any central galaxy occupation that derives from a stellar-to-halo-mass relation. |
|
HOD-style model for a satellite galaxy occupation based on Zu & Mandelbaum 2015. |
|
Stellar-to-halo-mass relation based on Zu and Mandelbaum 2015. |
|
Model for the quiescent fraction of centrals as a function of halo mass defined by an exponential function of halo mass. |
|
Model for the quiescent fraction of satellites as a function of halo mass defined by an exponential function of halo mass. |
Class Inheritance Diagram¶
halotools.empirical_models.model_defaults Module¶
Module expressing various default settings of the empirical modeling sub-package.
Functions¶
|
For the input mass definition, return the string used to access halo table column storing the halo radius. |
|
For the input mass definition, return the string used to access halo table column storing the halo mass. |
halotools.custom_exceptions Module¶
Classes for all Halotools-specific exceptions.
Classes¶
|
Base class of all Halotools-specific exceptions. |
|
Base class of all Halotools-specific exceptions. |
Class Inheritance Diagram¶
halotools.sim_manager Package¶
The sim_manager
sub-package is responsible
for downloading halo catalogs, reading ascii data,
storing hdf5 binaries and keeping a persistent memory
of their location on disk and associated metadata.
Classes¶
|
Container class for the halo catalogs and particle data that are stored in the Halotools cache log. |
Class used to scrape the web for simulation data and cache the downloaded catalogs. |
|
|
Fake simulation data used in the test suite of |
|
Object providing a collection of halo catalogs for use with Halotools. |
|
Object providing a collection of particle catalogs for use with Halotools. |
|
The |
|
Class providing a memory-efficient algorithm for reading a very large ascii file that stores tabular data of a data type that is known in advance. |
|
Class used to transform a user-provided halo catalog into the standard form recognized by Halotools. |
|
Class used to transform a user-provided particle catalog into the standard form recognized by Halotools. |
Class Inheritance Diagram¶
halotools.sim_manager.sim_defaults Module¶
Module expressing various default settings of the simulation manager sub-package.
All values hard-coded here appear as unique variables throughout the entire Halotools code base.
This allows you to customize your default settings and be guaranteed that whatever changes you make
will correctly propagate to all relevant behavior. See the in-line comments in the
halotools/sim_manager/sim_defaults.py
source code for
descriptions of the purpose of each variable defined in this module.
halotools.utils Package¶
This module contains helper functions used throughout the Halotools package.
Functions¶
|
Function creates a new column |
|
Calculate the angle between a collection of n-dimensional vectors |
|
Method determines whether an input array is monotonic. |
|
Replace the values in |
|
Calculate a property of the host of a group system and broadcast that property to all group members, e.g., calculate host halo mass. |
|
Compute a lookup table for the cumulative distribution function specified by the input set of |
|
Given an array of possible hostids, and a sorted array of (possibly repeated) hostids, return the number of appearances of each hostid. |
|
Given an integer array with possibly repeated entries in ascending order, return the indices of the first appearance of each unique value. |
|
Given an integer array with possibly repeated entries in ascending order, return the indices of the last appearance of each unique value. |
|
Calculate chord distance on a unit sphere given an angular distance between two points. |
|
For every ID in unique_halo_ids, calculate the number of times the ID appears in halo_id_of_galaxies. |
|
Calculate uber_hostid of every UM galaxy. |
|
Finds where the elements of |
|
Simple method to return a zero-valued 1-D numpy array with the length of the input x. |
|
Calcuate a set of indices that will resample (with replacement) |
|
Function to download a file from the web to a specific location, and print a progress bar along the way. |
|
Calculate the dot product between each pair of elements in two input lists of n-dimensional points. |
Calculate the normalization of each element in a list of n-dimensional points. |
|
|
|
|
Method returns the index where the input array is closest to the input value. |
|
Function assigns each element of the input array |
|
Generator used to loop over grouped data and yield requested properties of members of a group. |
|
Randomly draw a set of |
|
Return a unit-vector for each n-dimensional vector in the input list of n-dimensional points. |
|
Given a collection of vectors, x1 and x2, project each vector in x1 onto the plane normal to the corresponding vector x2. |
|
Given two equal-length arrays, with |
|
Method returns a length-num_downsample random downsampling of the input array. |
Return the rank-order percentile of the values of an input distribution |
|
|
Return the indices that resample |
|
Given a collection of rotation matrices and a collection of n-dimensional vectors, apply an asscoiated matrix to rotate corresponding vector(s). |
|
Randomly sample the sky. |
|
Estimate the cumulative distribution function Prob(< y | x). |
|
Calculate cartesian coordinates on a unit sphere given two angular coordinates. |
|
Given an array of values |
|
Return the indexing array that inverts |
|
Given a collection of 3d vectors x and y, return a collection of 3d unit-vectors that are orthogonal to x and y. |
Classes¶
Container class for commonly used sample selections. |
Class Inheritance Diagram¶
halotools.mock_observables Package¶
This sub-package contains the functions used to make astronomical observations on mock galaxy populations, and also analyze halo catalogs and other point data in periodic cubes.
Functions¶
|
Calculate the angular two-point correlation function, \(w(\theta)\). |
|
Apply redshift-space distortions to the comoving simulation coordinate, optionally accounting for periodic boundary conditions. |
|
Determine whether a set of points, |
|
Determine whether a set of points, |
|
Function counts the number of points in |
|
Return integer labels indicating which cubical subvolume of a larger cubical volume a set of points occupy. |
|
Determine whether a set of points, |
|
Calculate the 3-D ellipticity-direction correlation function (ED), \(\omega(r)\). |
|
Calculate the one and two halo componenents of the 3-D ellipticity-direction correlation function (ED), \(\omega_{\rm 1h}(r)\), and \(\omega_{\rm 2h}(r)\). |
|
Calculate the ellipticity-direction projected correlation function (ED), \(\omega(r_p)\). |
|
Calculate the 3-D ellipticity-ellipticity correlation function (EE), \(\eta(r)\). |
|
Calculate the one and two halo componenents of the 3-D ellipticity-ellipticity correlation function (EE), \(\eta_{\rm 1h}(r)\), and \(\eta_{\rm 2h}(r)\). |
|
Calculate the projected ellipticity-ellipticity projected correlation function (EE), \(\eta(r_p)\). |
|
Determine the halo property in |
|
Calculate the 3-D gravitational shear-intrinsic ellipticity correlation function (GI), \(\xi_{g-}(r)\). |
|
Calculate the projected gravitational shear-intrinsic ellipticity correlation function (GI), \(w_{g-}(r_p)\), where \(r_p\) is the separation perpendicular to the line-of-sight (LOS) between two galaxies. |
|
Calculate the 3-D gravitational shear-intrinsic ellipticity correlation function (GI), \(\xi_{g+}(r_p)\). |
|
Calculate the projected gravitational shear-intrinsic ellipticity correlation function (GI), \(w_{g+}(r_p)\), where \(r_p\) is the separation perpendicular to the line-of-sight (LOS) between two galaxies. |
|
Calculate the HOD of a mock galaxy sample. |
|
Calculate the intrinsic ellipticity-ellipticity correlation function (II), \(\xi_{--}(r)\). |
|
Calculate the projected intrinsic ellipticity-ellipticity correlation function (II), \(w_{--}(r_p)\), where \(r_p\) is the separation perpendicular to the line-of-sight (LOS) between two galaxies. |
|
Calculate the intrinsic ellipticity-ellipticity correlation function (II), \(\xi_{++}(r)\). |
|
Calculate the projected intrinsic ellipticity-ellipticity correlation function (II), \(w_{++}(r_p)\), where \(r_p\) is the separation perpendicular to the line-of-sight (LOS) between two galaxies. |
|
For each point in |
|
Calculate the mean density of the input |
|
Calculate the mean density of the input |
|
Calculate the pairwise line-of-sight (LOS) velocity dispersion (PVD), as a function of radial distance from |
|
Calculate the weighted number of pairs with separations less than or equal to the input |
|
Calculate the number of weighted pairs with separations greater than or equal to \(r_{\perp}\) and \(r_{\parallel}\), \(W(>r_{\perp},>r_{\parallel})\). |
|
Calculate the real space marked two-point correlation function, \(\mathcal{M}(r)\). |
|
Calculate \(\Delta\Sigma(r_p)\), the galaxy-galaxy lensing signal as a function of projected distance. |
|
Calculate the mean pairwise line-of-sight (LOS) velocity as a function of projected separation, \(\bar{v}_{z,12}(r_p)\). |
|
Calculate the mean pairwise velocity, \(\bar{v}_{12}(r)\). |
|
Estimate the mean value of the property y as a function of x for an input sample of galaxies/halos, optionally returning an error estimate. |
|
Function counts the number of pairs of points separated by a three-dimensional distance smaller than the input |
|
Function counts the number of pairs of points with separation in the xy-plane less than the input |
|
Function counts the number of pairs of points with separation in the xy-plane less than the input |
Calculate the principal eigenvector of each of the input inertia tensors. |
|
|
Calculate the ra, dec, and redshift assuming an observer placed at (0,0,0). |
|
Calculate the radial distance between the positions of a set of satellites and their centrals, accounting for periodic boundary conditions. |
|
Calculate the radial distance between the positions of a set of satellites and their centrals, accounting for periodic boundary conditions. |
|
Function used to calculate the mean value of some quantity in |
|
Calculate the pairwise radial velocity dispersion as a function of absolute distance, or as a function of \(s = r / R_{\rm vir}\). |
|
Return the vector pointing from x2 towards x1, that is, x1 - x2, accounting for periodic boundary conditions. |
|
Returns a Numpy array of shape (Npts, 3) storing the xyz-positions in the format used throughout the |
|
Calculate the redshift space correlation function, \(\xi(r_{p}, \pi)\) |
|
redshift space correlation function, \(\xi(r_{p}, \pi)\) and the covariance matrix, \({C}_{ij}\), between ith and jth bin. |
|
Calculate the redshift space correlation function, \(\xi(s, \mu)\) |
|
Return the sign of the unit vector pointing from x2 towards x1, that is, the sign of (x1 - x2), accounting for periodic boundary conditions. |
|
Determine whether a set of points, |
|
Calculate the sphericity \(\mathcal{S}_{\rm i}\) of each of the \(i=1,\dots,N_{\rm points}\) mass distributions defined by the input inertia tensors \(\mathcal{I}_{\rm i}\). |
|
Calculate the total mass enclosed in a set of cylinders of infinite length. |
|
Calculate the real space two-point correlation function, \(\xi(r)\). |
|
Calculate the two-point correlation function, \(\xi(r)\) and the covariance matrix, \({C}_{ij}\), between ith and jth radial bin. |
|
Calculate the multipoles of the two point correlation function after first computing |
|
Calculate the real space one-halo and two-halo decomposed two-point correlation functions, \(\xi^{1h}(r)\) and \(\xi^{2h}(r)\). |
|
Calculate the triaxility \(\mathcal{T}_{\rm i}\) of each of the \(i=1,\dots,N_{\rm points}\) mass distributions defined by the input inertia tensors \(\mathcal{I}_{\rm i}\). |
|
Calculate the underdensity probability function (UPF), \(P_U(r)\). |
|
Calculate the void probability function (VPF), \(P_0(r)\), defined as the probability that a random sphere of radius r contains zero points in the input sample. |
|
Calculate the projected two point correlation function, \(w_{p}(r_p)\), where \(r_p\) is the separation perpendicular to the line-of-sight (LOS). |
|
Calculate the projected two-point correlation function, \(w_p(r_p)\) and the covariance matrix, \({C}_{ij}\), between ith and jth projected radial bin. |
Classes¶
|
Friends-of-friends (FoF) groups class. |
Class Inheritance Diagram¶
halotools.mock_observables.pair_counters Package¶
Functions¶
|
Calculate the weighted number of pairs with separations less than or equal to the input |
|
Calculate the number of weighted pairs with separations greater than or equal to \(r_{\perp}\) and \(r_{\parallel}\), \(W(>r_{\perp},>r_{\parallel})\). |
|
Function counts the number of pairs of points separated by a three-dimensional distance smaller than the input |
|
Pair counter used to make jackknife error estimates of real-space pair counter |
|
Pair counter used to make jackknife error estimates of redshift-space pair counter |
|
Function counts the number of points in |
|
Function counts the number of pairs of points with separation in the xy-plane less than the input |
|
Function counts the number of pairs of points separated by less than radial separation, \(s\), given by |
|
Function counts the number of pairs of points with separation in the xy-plane less than the input |
|
Function returns pairs of points separated by a three-dimensional distance smaller than or equal to the input |
|
Function returns pairs of points separated by a xy-projected distance smaller than or equal to the input |
|
Calculate the number of weighted pairs with separations greater than or equal to r, \(W(>r)\), where the weight of each pair is given by soe function of a N-d array stored in each input weight and the separation vector of the pair. |
|
Calculate the number of weighted pairs with separations greater than or equal to \(r_{\perp}\) and \(r_{\parallel}\), \(W(>r_{\perp},>r_{\parallel})\). |
|
Function performs a weighted count of the number of pairs of points separated by less than distance r:math: |
Classes¶
|
Fundamental data structure of the |
|
Fundamental data structure of the |
Class Inheritance Diagram¶
halotools.mock_observables.pair_counters.marked_cpairs Package¶
Functions¶
Calculate the conditional limited pairwise distance matrix, \(d_{ij}\). |
|
Calculate the conditional limited pairwise distance matrices, \(d_{{\perp}ij}\) and \(d_{{\parallel}ij}\). |
|
|
Cython engine for counting pairs of points as a function of three-dimensional separation. |
|
Cython engine for counting pairs of points as a function of three-dimensional separation. |
Cython engine for counting pairs of points as a function of three-dimensional separation. |
|
Cython engine for counting pairs of points as a function of three-dimensional separation. |