enforce_periodicity_of_box

halotools.empirical_models.enforce_periodicity_of_box(coords, box_length, check_multiple_box_lengths=False, **kwargs)[source]

Function used to apply periodic boundary conditions of the simulation, so that mock galaxies all lie in the range [0, Lbox].

Parameters:
coordsarray_like

float or ndarray containing a set of points with values ranging between [-box_length, 2*box_length]

box_lengthfloat

the size of simulation box (currently hard-coded to be Mpc/h units)

velocityarray_like, optional

velocity in the same dimension as the input coords.

check_multiple_box_lengthsbool, optional

If True, an exception will be raised if the points span a range of more than 2Lbox. Default is False.

Returns:
periodic_coordsarray_like

array with values and shape equal to input coords, but with periodic boundary conditions enforced