calculate_satellite_radial_vector

halotools.utils.calculate_satellite_radial_vector(sat_hostid, sat_x, sat_y, sat_z, host_halo_id, host_halo_x, host_halo_y, host_halo_z, Lbox)[source] [edit on github]

For each satellite, calculate the radial vector pointing from the associated host halo to the satellite, accounting for periodic boundary conditions.

Parameters:

sat_hostid : ndarray

Numpy array of integers of shape (num_sats, )

sat_x : ndarray

Numpy array of shape (num_sats, )

sat_y : ndarray

Numpy array of shape (num_sats, )

sat_z : ndarray

Numpy array of shape (num_sats, )

host_halo_id : ndarray

Numpy array of unique integers of shape (num_hosts, )

host_halo_x : ndarray

Numpy array of shape (num_hosts, )

host_halo_y : ndarray

Numpy array of shape (num_hosts, )

host_halo_z : ndarray

Numpy array of shape (num_hosts, )

Lbox : scalar or 3-element tuple

periodic boundary conditions

Returns:

normalized_radial_vectors : ndarray

Numpy array of shape (num_sats, 3)

Sign convention is such that, for cases where PBCs are not operative, positive values correspond to satellite coordinates being larger than central coordinates, i.e., normalized_radial_vectors[i, 0] = xsat[i] - xcen[i], and so forth.

When PBCs are operative, and the host halo is at the left edge of the box, with the satellite at the right edge, the sign of normalized_radial_vectors will be negative.

radial_distances : ndarray

Numpy array of shape (num_sats, )