UnitSphericalCosLatDifferential¶

class
astropy.coordinates.
UnitSphericalCosLatDifferential
(d_lon_coslat, d_lat=None, copy=True)[source]¶ Bases:
astropy.coordinates.BaseSphericalCosLatDifferential
Differential(s) of points on a unit sphere.
 Parameters
Attributes Summary
Component ‘d_lat’ of the Differential.
Component ‘d_lon_coslat’ of the Differential.
Methods Summary
from_cartesian
(other, base)Convert the differential from 3D rectangular cartesian coordinates to the desired class.
from_representation
(representation[, base])Create a new instance of this representation from another one.
represent_as
(other_class[, base])Convert coordinates to another representation.
to_cartesian
(base)Convert the differential to 3D rectangular cartesian coordinates.
transform
(matrix, base, transformed_base)Transform differential using a 3x3 matrix in a Cartesian basis.
Attributes Documentation

attr_classes
= {'d_lat': <class 'astropy.units.quantity.Quantity'>, 'd_lon_coslat': <class 'astropy.units.quantity.Quantity'>}¶

d_lat
¶ Component ‘d_lat’ of the Differential.

d_lon_coslat
¶ Component ‘d_lon_coslat’ of the Differential.
Methods Documentation

classmethod
from_cartesian
(other, base)[source]¶ Convert the differential from 3D rectangular cartesian coordinates to the desired class.
 Parameters
 other
The object to convert into this differential.
 base
BaseRepresentation
The points for which the differentials are to be converted: each of the components is multiplied by its unit vectors and scale factors. Will be converted to
cls.base_representation
if needed.
 Returns
BaseDifferential
subclass instanceA new differential object that is this class’ type.

classmethod
from_representation
(representation, base=None)[source]¶ Create a new instance of this representation from another one.
 Parameters
 representation
BaseRepresentation
instance The presentation that should be converted to this class.
 baseinstance of
cls.base_representation
The base relative to which the differentials will be defined. If the representation is a differential itself, the base will be converted to its
base_representation
to help convert it.
 representation

represent_as
(other_class, base=None)[source]¶ Convert coordinates to another representation.
If the instance is of the requested class, it is returned unmodified. By default, conversion is done via cartesian coordinates.
 Parameters
 other_class
BaseRepresentation
subclass The type of representation to turn the coordinates into.
 baseinstance of
self.base_representation
Base relative to which the differentials are defined. If the other class is a differential representation, the base will be converted to its
base_representation
.
 other_class

to_cartesian
(base)[source]¶ Convert the differential to 3D rectangular cartesian coordinates.
 Parameters
 baseinstance of
self.base_representation
The points for which the differentials are to be converted: each of the components is multiplied by its unit vectors and scale factors.
 baseinstance of
 Returns
CartesianDifferential
This object, converted.

transform
(matrix, base, transformed_base)[source]¶ Transform differential using a 3x3 matrix in a Cartesian basis.
This returns a new differential and does not modify the original one.
 Parameters
 matrix(3,3) array_like
A 3x3 (or stack thereof) matrix, such as a rotation matrix.
 baseinstance of
cls.base_representation
Base relative to which the differentials are defined. If the other class is a differential representation, the base will be converted to its
base_representation
. transformed_baseinstance of
cls.base_representation
Base relative to which the transformed differentials are defined. If the other class is a differential representation, the base will be converted to its
base_representation
.