cylindrical_to_cartesian

gala.coordinates.cylindrical_to_cartesian(pos, vel)[source]

Convert a velocity in Spherical coordinates to Cylindrical coordinates. This follows the naming convention used in astropy.coordinates: cylindrical coordinates consist of a radius, \(\rho\), an azimuthal angle, \(\phi\), in the range [0, 360] deg, and a z coordinate, \(z\).

The components of the output velocity all have units of velocity, i.e., this is not used for transforming from a cartesian velocity to angular velocities, but rather the velocity vector components in Eq. 2 below.

\[\begin{split}\boldsymbol{v} &= v_x\boldsymbol{\hat{x}} + v_y\boldsymbol{\hat{y}} + v_z\boldsymbol{\hat{z}}\\\\ &= v_\rho\boldsymbol{\hat{\rho}} + v_\phi\boldsymbol{\hat{\phi}} + v_z\boldsymbol{\hat{z}}\\\\ &= \dot{\rho}\boldsymbol{\hat{\rho}} + \rho\dot{\phi}\boldsymbol{\hat{\phi}} + \dot{z}\boldsymbol{\hat{\theta}}\end{split}\]
Parameters:

pos : Quantity, BaseCoordinateFrame, BaseRepresentation

Input position or positions as one of the allowed types. You may pass in a Quantity with dimensionless_unscaled units if you are working in natural units.

vel : Quantity

Input velocity or velocities as one of the allowed types. You may pass in a Quantity with dimensionless_unscaled units if you are working in natural units. axis=0 is assumed to be the dimensionality axis, e.g., vx,vy,vz = vel should work.

Returns:

vxyz : Quantity

Array of Cartesian velocity components. Will have the same shape as the input velocity.