ed_projected¶
- halotools.mock_observables.ed_projected(sample1, orientations1, sample2, rp_bins, pi_max, weights1=None, weights2=None, period=None, num_threads=1, approx_cell1_size=None, approx_cell2_size=None)[source]¶
Calculate the ellipticity-direction projected correlation function (ED), \(\omega(r_p)\).
- 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.- sample2array_like, optional
Npts2 x 3 array containing 3-D positions of points.
- rp_binsarray_like
array of boundaries defining the radial bins perpendicular to the LOS in which pairs are counted. Length units are comoving and assumed to be in Mpc/h, here and throughout Halotools.
- pi_maxfloat
maximum LOS distance defining the projection integral length-scale in the z-dimension. 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(rp_bins)-1 length array containing the correlation function \(\omega(r_p)\) computed in each of the bins defined by input
rp_bins
.
Notes
The ellipticity-direction projected correlation function is defined as:
\[\omega = \frac{\sum_{i \neq j}w_iw_j|\hat{e}_i \cdot \hat{r}_{ij}|^2}{\sum_{i \neq j} w_iw_j} - \frac{1}{2}\]where e.g. \(\hat{e}_i\) is the orientation of the \(i\)-th galaxy, and \(\hat{r}_{ij}\) is the normalized vector in the direction of the \(j\)-th galaxy from 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.