conditional_pairwise_xy_z_distance_no_pbc

halotools.mock_observables.pair_counters.marked_cpairs.conditional_pairwise_xy_z_distance_no_pbc()

Calculate the conditional limited pairwise distance matrices, \(d_{{\perp}ij}\) and \(d_{{\parallel}ij}\).

Calculate the perpendicular and parallel distance between all pairs with separations less than or equal to max_rp and max_pi wrt to the z-direction, repsectively, if a conditon is met.

Parameters:

x_icell1 : numpy.array

array of x positions of length N1 (data1)

y_icell1 : numpy.array

array of y positions of length N1 (data1)

z_icell1 : numpy.array

array of z positions of length N1 (data1)

x_icell2 : numpy.array

array of x positions of length N2 (data2)

y_icell2 : numpy.array

array of y positions of length N2 (data2)

z_icell2 : numpy.array

array of z positions of length N2 (data2)

max_rp : float

maximum perpendicular separation to record

max_pi : float

maximum parallel separation to record

w_icell1 : numpy.array

array of floats

w_icell2 : numpy.array

array of floats

cond_func_id : int

integer ID of conditional function

Returns:

d_perp : numpy.array

array of perpendicular pairwise separation distances

d_para : numpy.array

array of parallel pairwise separation distances

i : numpy.array

array of 0-indexed indices

j : numpy.array

array of 0-indexed indices

Examples

For demonstration purposes we create a randomly distributed set of points within a unit cube.

>>> Npts = 1000
>>> x = np.random.random(Npts)
>>> y = np.random.random(Npts)
>>> z = np.random.random(Npts)
>>> weights = np.random.random(Npts)

Calculate the distance between all pairs with perpednicular separations less than 0.25 and parallel sperations of 0.5:

>>> max_rp = 0.25
>>> max_pi = 0.5
>>> d_perp,d_para,i,j = conditional_pairwise_xy_z_distance_no_pbc(x,y,z,x,y,z,max_rp,max_para,weights,weights,1)