conditional_pairwise_distance_no_pbc

halotools.mock_observables.pair_counters.marked_cpairs.conditional_pairwise_distance_no_pbc()

Calculate the conditional limited pairwise distance matrix, \(d_{ij}\).

calculate the distance between all pairs with sperations less than or equal to max_r if a conditon is met.

Parameters:
x_icell1numpy.array

array of x positions of length N1 (data1)

y_icell1numpy.array

array of y positions of length N1 (data1)

z_icell1numpy.array

array of z positions of length N1 (data1)

x_icell2numpy.array

array of x positions of length N2 (data2)

y_icell2numpy.array

array of y positions of length N2 (data2)

z_icell2numpy.array

array of z positions of length N2 (data2)

max_rfloat

maximum separation to record

w_icell1numpy.array

array of floats

w_icell2numpy.array

array of floats

cond_func_idint

integer ID of conditional function

Returns:
dnumpy.array

array of pairwise separation distances

inumpy.array

array of 0-indexed indices

jnumpy.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 separations less than 0.5 if the weight associated with the first point is larger than the second point:

>>> r_max = 0.5
>>> d,i,j = conditional_pairwise_distance_no_pbc(x,y,z,x,y,z,r_max,weights,weights,1)