UnitSphericalDifferential

class astropy.coordinates.UnitSphericalDifferential(d_lon, d_lat, copy=True)[source]

Bases: astropy.coordinates.BaseSphericalDifferential

Differential(s) of points on a unit sphere.

Parameters
d_lon, d_latQuantity

The longitude and latitude of the differentials.

copybool, optional

If True (default), arrays will be copied rather than referenced.

Attributes Summary

attr_classes

d_lat

Component ‘d_lat’ of the Differential.

d_lon

Component ‘d_lon’ of the Differential.

Methods Summary

from_representation(representation[, base])

Create a new instance of this representation from another one.

represent_as(self, other_class[, base])

Convert coordinates to another representation.

to_cartesian(self, base)

Convert the differential to 3D rectangular cartesian coordinates.

Attributes Documentation

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

Component ‘d_lat’ of the Differential.

d_lon

Component ‘d_lon’ of the Differential.

Methods Documentation

classmethod from_representation(representation, base=None)[source]

Create a new instance of this representation from another one.

Parameters
representationBaseRepresentation 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.

represent_as(self, 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_classBaseRepresentation subclass

The type of representation to turn the coordinates into.

baseinstance of self.base_representation, optional

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.

to_cartesian(self, 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.

Returns
This object as a CartesianDifferential