particles.ClusterParticles.add_offsets#
- ClusterParticles.add_offsets(r_ctr, v_ctr, ptypes=None)[source]#
Add offsets in position and velocity to the cluster particles, which can be added to one or more particle types.
- Parameters:
r_ctr (
array-like
) – A 3-element list, NumPy array, or unyt_array of the coordinates of the new center of the particle distribution. If units are not given, they are assumed to be in kpc.v_ctr (
array-like
) – A 3-element list, NumPy array, or unyt_array of the coordinates of the new bulk velocity of the particle distribution. If units are not given, they are assumed to be in kpc/Myr.ptypes (
string
orlist
ofstrings
, optional) – A single string or list of strings indicating the particle type(s) to be offset. Default: None, meaning all of the particle types will be offset. This should not be used in normal circumstances.