pynbody.analysis.angmom.sideon

Contents

pynbody.analysis.angmom.sideon#

pynbody.analysis.angmom.sideon(h, **kwargs)[source]#

Reposition and rotate the ancestor of h to place the disk edge-on (i.e. into the x-z plane).

Since pynbody’s imaging routines project along the z direction, one can get a side-on view of a disk or other rotationally-supported structure by calling this routine first.

For details of how the transformation is calculated, see the documentation for the underlying align() routine.

Parameters:
  • h (SimSnap) – The portion of the simulation from which to extract a centre and orientation. Typically this is a galaxy halo.

  • disk_size (str | float, optional) – The size of the disk to use for calculating the angular momentum vector. Default is “5 kpc”.

  • move_all (bool, optional) – If True, the ancestor simulation of h is transformed. If False, only h is moved. Default is True.

  • already_centered (bool, optional) – If True, the simulation is assumed to be already centered. Default is False.

  • center_kwargs (dict, optional) – Dictionary of additional keyword arguments to pass to the centering routine.