CylindricalRepresentation¶
- class astropy.coordinates.CylindricalRepresentation(rho, phi=None, z=None, differentials=None, copy=True)[source]¶
Bases:
BaseRepresentation
Representation of points in 3D cylindrical coordinates.
- Parameters:
- rho
Quantity
The distance from the z axis to the point(s).
- phi
Quantity
orpython:str
The azimuth of the point(s), in angular units, which will be wrapped to an angle between 0 and 360 degrees. This can also be instances of
Angle
,- z
Quantity
The z coordinate(s) of the point(s)
- differentials
python:dict
,CylindricalDifferential
, optional Any differential classes that should be associated with this representation. The input must either be a single
CylindricalDifferential
instance, or a dictionary of of differential instances with keys set to a string representation of the SI unit with which the differential (derivative) is taken. For example, for a velocity differential on a positional representation, the key would be's'
for seconds, indicating that the derivative is a time derivative.- copybool, optional
If
True
(default), arrays will be copied. IfFalse
, arrays will be references, though possibly broadcast to ensure matching shapes.
- rho
Attributes Summary
The azimuth of the point(s).
The distance of the point(s) from the z-axis.
The height of the point(s).
Methods Summary
from_cartesian
(cart)Converts 3D rectangular cartesian coordinates to cylindrical polar coordinates.
Scale factors for each component's direction.
Converts cylindrical polar coordinates to 3D rectangular cartesian coordinates.
Cartesian unit vectors in the direction of each component.
Attributes Documentation
- attr_classes = {'phi': <class 'astropy.coordinates.angles.Angle'>, 'rho': <class 'astropy.units.quantity.Quantity'>, 'z': <class 'astropy.units.quantity.Quantity'>}¶
- phi¶
The azimuth of the point(s).
- rho¶
The distance of the point(s) from the z-axis.
- z¶
The height of the point(s).
Methods Documentation
- classmethod from_cartesian(cart)[source]¶
Converts 3D rectangular cartesian coordinates to cylindrical polar coordinates.
- scale_factors()[source]¶
Scale factors for each component’s direction.
Given unit vectors \(\hat{e}_c\) and scale factors \(f_c\), a change in one component of \(\delta c\) corresponds to a change in representation of \(\delta c \times f_c \times \hat{e}_c\).
- Returns:
- scale_factors
python:dict
ofQuantity
The keys are the component names.
- scale_factors
- to_cartesian()[source]¶
Converts cylindrical polar coordinates to 3D rectangular cartesian coordinates.
- unit_vectors()[source]¶
Cartesian unit vectors in the direction of each component.
Given unit vectors \(\hat{e}_c\) and scale factors \(f_c\), a change in one component of \(\delta c\) corresponds to a change in representation of \(\delta c \times f_c \times \hat{e}_c\).
- Returns:
- unit_vectors
python:dict
ofCartesianRepresentation
The keys are the component names.
- unit_vectors