PhysicsSphericalRepresentation¶
-
class
astropy.coordinates.PhysicsSphericalRepresentation(phi, theta, r, copy=True)[source] [edit on github]¶ Bases:
astropy.coordinates.BaseRepresentationRepresentation of points in 3D spherical coordinates (using the physics convention of using
phiandthetafor azimuth and inclination from the pole).Parameters: phi, theta :
Quantityor strThe azimuth and inclination of the point(s), in angular units. The inclination should be between 0 and 180 degrees, and the azimuth will be wrapped to an angle between 0 and 360 degrees. These can also be instances of
Angle. Ifcopyis False,phiwill be changed inplace if it is not between 0 and 360 degrees.r :
Quantitycopy : bool, optional
If True arrays will be copied rather than referenced.
Attributes Summary
attr_classesphiThe azimuth of the point(s). rThe distance from the origin to the point(s). recommended_unitsthetaThe elevation of the point(s). Methods Summary
from_cartesian(cart)Converts 3D rectangular cartesian coordinates to spherical polar coordinates. represent_as(other_class)to_cartesian()Converts spherical polar coordinates to 3D rectangular cartesian coordinates. Attributes Documentation
-
attr_classes= OrderedDict([(u'phi', <class 'astropy.coordinates.angles.Angle'>), (u'theta', <class 'astropy.coordinates.angles.Angle'>), (u'r', <class 'astropy.units.quantity.Quantity'>)])¶
-
phi¶ The azimuth of the point(s).
-
r¶ The distance from the origin to the point(s).
-
recommended_units= {u'theta': Unit("deg"), u'phi': Unit("deg")}¶
-
theta¶ The elevation of the point(s).
Methods Documentation
-
classmethod
from_cartesian(cart)[source] [edit on github]¶ Converts 3D rectangular cartesian coordinates to spherical polar coordinates.
-
represent_as(other_class)[source] [edit on github]¶
-
to_cartesian()[source] [edit on github]¶ Converts spherical polar coordinates to 3D rectangular cartesian coordinates.
-