ee_3d_one_two_halo_decomp¶
- halotools.mock_observables.ee_3d_one_two_halo_decomp(sample1, orientations1, sample1_host_halo_id, sample2, orientations2, sample2_host_halo_id, rbins, weights1=None, weights2=None, mask1=None, mask2=None, period=None, num_threads=1, approx_cell1_size=None, approx_cell2_size=None)[source]¶
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)\).
- Parameters:
- sample1array_like
Npts1 x 3 numpy array containing 3-D positions of points with associated orientations. See the Formatting your xyz coordinates for Mock Observables calculations documentation page, or the Examples section below, for instructions on how to transform your coordinate position arrays into the format accepted by the
sample1
andsample2
arguments. Length units are comoving and assumed to be in Mpc/h, here and throughout Halotools.- orientations1array_like
Npts1 x 2 numpy array containing projected orientation vectors for each point in
sample1
. these will be normalized if not already.- sample1_host_halo_idarray_like
len(sample1) integer array of host halo ids.
- sample2array_like, optional
Npts2 x 3 array containing 3-D positions of points.
- orientations2array_like
Npts1 x 3 numpy array containing orientation vectors for each point in
sample2
. these will be normalized if not already.- sample2_host_halo_idarray_like
len(sample2) integer array of host halo ids.
- rbinsarray_like
array of boundaries defining the radial bins in which pairs are counted. Length units are comoving and assumed to be in Mpc/h, here and throughout Halotools.
- weights1array_like, optional
Npts1 array of weghts. If this parameter is not specified, it is set to numpy.ones(Npts1).
- weights2array_like, optional
Npts2 array of weghts. If this parameter is not specified, it is set to numpy.ones(Npts2).
- periodarray_like, optional
Length-3 sequence defining the periodic boundary conditions in each dimension. If you instead provide a single scalar, Lbox, period is assumed to be the same in all Cartesian directions. If set to None (the default option), PBCs are set to infinity, in which case
randoms
must be provided. Length units are comoving and assumed to be in Mpc/h, here and throughout Halotools.- num_threadsint, optional
Number of threads to use in calculation, where parallelization is performed using the python
multiprocessing
module. Default is 1 for a purely serial calculation, in which case a multiprocessing Pool object will never be instantiated. A string ‘max’ may be used to indicate that the pair counters should use all available cores on the machine.- approx_cell1_sizearray_like, optional
Length-3 array serving as a guess for the optimal manner by how points will be apportioned into subvolumes of the simulation box. The optimum choice unavoidably depends on the specs of your machine. Default choice is to use Lbox/10 in each dimension, which will return reasonable result performance for most use-cases. Performance can vary sensitively with this parameter, so it is highly recommended that you experiment with this parameter when carrying out performance-critical calculations.
- approx_cell2_sizearray_like, optional
Analogous to
approx_cell1_size
, but for sample2. See comments forapprox_cell1_size
for details.
- Returns:
- correlation_functionnumpy.array
len(rbins)-1 length array containing the correlation function \(\eta(r)\) computed in each of the bins defined by input
rbins
.
Notes
The ellipticity-ellipticity correlation function is defined as:
\[\eta = \frac{\sum_{i \neq j}w_iw_j|\hat{e}_i \cdot \hat{e}_j|^2}{\sum_{i \neq j} w_i w_j} - \frac{1}{3}\]where e.g. \(\hat{e}_i\) is the orientation of the \(i\)-th galaxy. \(w_i\) and \(w_j\) are the weights associated with the \(i\)-th and \(j\)-th galaxy. The weights default to 1 if not set.