RadialRepresentation¶

class
astropy.coordinates.
RadialRepresentation
(distance, differentials=None, copy=True)[source]¶ Bases:
astropy.coordinates.BaseRepresentation
Representation of the distance of points from the origin.
Note that this is mostly intended as an internal helper representation. It can do little else but being used as a scale in multiplication.
 Parameters
 distance
Quantity
The distance of the point(s) from the origin.
 differentialsdict,
BaseDifferential
, optional Any differential classes that should be associated with this representation. The input must either be a single
BaseDifferential
instance (see_compatible_differentials
for valid types), 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.
 distance
Attributes Summary
The distance from the origin to the point(s).
Methods Summary
from_cartesian
(cart)Converts 3D rectangular cartesian coordinates to radial coordinate.
norm
()Vector norm.
Scale factors for each component’s direction.
Cannot convert radial representation to cartesian.
Cartesian unit vectors are undefined for radial representation.
Attributes Documentation

attr_classes
= {'distance': <class 'astropy.units.quantity.Quantity'>}¶

distance
¶ The distance from the origin to the point(s).
Methods Documentation

classmethod
from_cartesian
(cart)[source]¶ Converts 3D rectangular cartesian coordinates to radial coordinate.

norm
()[source]¶ Vector norm.
Just the distance itself.
 Returns
 norm
Quantity
Dimensionless ones, with the same shape as the representation.
 norm

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_factorsdict of
Quantity
The keys are the component names.
 scale_factorsdict of