Rotate-and-tilt wrapper potential¶
- class galpy.potential.RotateAndTiltWrapperPotential(amp=1.0, inclination=None, galaxy_pa=None, sky_pa=None, zvec=None, offset=None, pot=None, ro=None, vo=None)[source]¶
Potential wrapper that allows a potential to be rotated in 3D according to three orientation angles. These angles can either be specified using:
A rotation around the original z-axis (galaxy_pa) and the new direction of the z-axis (zvec) or
A rotation around the original z-axis (galaxy_pa), the inclination, and a rotation around the new z axis (sky_pa).
The second option allows one to specify the inclination and sky position angle (measured from North) in the usual manner in extragalactic observations, that is, the relation between the observed coordinates \((x',y',z')\) and the intrinsic coordinates \((x,y,z)\) is given by
\[\begin{split}\begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} \phantom{-}\cos(\text{PA}_\text{gal}) & \sin(\text{PA}_\text{gal}) & 0 \\ -\sin(\text{PA}_\text{gal}) & \cos(\text{PA}_\text{gal}) & 0 \\ 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0 & 0 \\ 0 & \phantom{-}\cos i & \sin i \\ 0 & -\sin i & \cos i \end{pmatrix} \begin{pmatrix} \sin(\text{PA}_\text{sky}) & -\cos(\text{PA}_\text{sky}) & 0 \\ \cos(\text{PA}_\text{sky}) & \phantom{-}\sin(\text{PA}_\text{sky}) & 0 \\ 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} x' \\ y' \\ z' \end{pmatrix}\,,\end{split}\]A final offset option allows one to apply a static offset in Cartesian coordinate space to be applied to the potential following the rotation and tilt.
- __init__(amp=1.0, inclination=None, galaxy_pa=None, sky_pa=None, zvec=None, offset=None, pot=None, ro=None, vo=None)[source]¶
A potential that rotates and tilts another potential.
- Parameters:
amp (float, optional) – Overall amplitude to apply to the potential. Default is 1.0.
inclination (float or Quantity, optional) – Usual inclination angle (with the line-of-sight being the z axis).
galaxy_pa (float or Quantity, optional) – Rotation angle of the original potential around the original z axis.
sky_pa (float or Quantity, optional) – Rotation angle around the inclined z axis (usual sky position angle measured from North).
zvec (numpy.ndarray, optional) – 3D vector specifying the direction of the rotated z axis.
offset (numpy.ndarray or Quantity, optional) – Static offset in Cartesian coordinates.
pot (Potential instance or list thereof) – The Potential instance or list thereof to rotate and tilt.
ro (float or Quantity, optional) – Distance scale for translation into internal units (default from configuration file).
vo (float or Quantity, optional) – Velocity scale for translation into internal units (default from configuration file).
Notes
2021-03-29 - Started - Mackereth (UofT)
2021-04-18 - Added inclination, sky_pa, galaxy_pa setup - Bovy (UofT)
2022-03-14 - added offset kwarg - Mackereth (UofT)