CartesianDifferential¶
-
class
astropy.coordinates.CartesianDifferential(d_x, d_y=None, d_z=None, unit=None, xyz_axis=None, copy=True)[source] [edit on github]¶ Bases:
astropy.coordinates.BaseDifferentialDifferentials in of points in 3D cartesian coordinates.
Parameters: d_x, d_y, d_z :
Quantityor arrayThe x, y, and z coordinates of the differentials. If
d_x,d_y, andd_zhave different shapes, they should be broadcastable. If not quantities,unitshould be set. If onlyd_xis given, it is assumed that it contains an array with the 3 coordinates stored alongxyz_axis.unit :
Unitor strIf given, the differentials will be converted to this unit (or taken to be in this unit if not given.
xyz_axis : int, optional
The axis along which the coordinates are stored when a single array is provided instead of distinct
d_x,d_y, andd_z(default: 0).copy : bool, optional
If
True(default), arrays will be copied rather than referenced.Attributes Summary
attr_classesd_xComponent ‘d_x’ of the Differential. d_xyzReturn a vector array of the x, y, and z coordinates. d_yComponent ‘d_y’ of the Differential. d_zComponent ‘d_z’ of the Differential. Methods Summary
from_cartesian(other[, base])get_d_xyz([xyz_axis])Return a vector array of the x, y, and z coordinates. to_cartesian([base])Convert the differential to 3D rectangular cartesian coordinates. Attributes Documentation
-
attr_classes= {'d_x': <class 'astropy.units.quantity.Quantity'>, 'd_y': <class 'astropy.units.quantity.Quantity'>, 'd_z': <class 'astropy.units.quantity.Quantity'>}¶
-
d_x¶ Component ‘d_x’ of the Differential.
-
d_xyz¶ Return a vector array of the x, y, and z coordinates.
Parameters: xyz_axis : int, optional
The axis in the final array along which the x, y, z components should be stored (default: 0).
Returns: xyz :
QuantityWith dimension 3 along
xyz_axis.
-
d_y¶ Component ‘d_y’ of the Differential.
-
d_z¶ Component ‘d_z’ of the Differential.
Methods Documentation
-
classmethod
from_cartesian(other, base=None)[source] [edit on github]¶
-
get_d_xyz(xyz_axis=0)[source] [edit on github]¶ Return a vector array of the x, y, and z coordinates.
Parameters: xyz_axis : int, optional
The axis in the final array along which the x, y, z components should be stored (default: 0).
Returns: xyz :
QuantityWith dimension 3 along
xyz_axis.
-
to_cartesian(base=None)[source] [edit on github]¶ Convert the differential to 3D rectangular cartesian coordinates.
Parameters: base : instance of
self.base_representationThe 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
-