pynbody.analysis.angmom.faceon

Contents

pynbody.analysis.angmom.faceon#

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

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

Since pynbody’s imaging routines project along the z direction, one can get a face-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.