mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-03-06 15:47:58 -05:00
Python: include documentation about function return values in Markdown.
This commit is contained in:
@@ -143,7 +143,7 @@ def BodyCode(name):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Body
|
||||
#Body
|
||||
If `name` is a valid body name, returns the enumeration
|
||||
value associated with that body.
|
||||
Otherwise, returns `Body.Invalid`.
|
||||
@@ -432,6 +432,7 @@ class Time:
|
||||
|
||||
Returns
|
||||
-------
|
||||
#Time
|
||||
"""
|
||||
micro = round(math.fmod(second, 1.0) * 1000000)
|
||||
second = math.floor(second - micro/1000000)
|
||||
@@ -2086,7 +2087,7 @@ def GeoMoon(time):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Vector
|
||||
#Vector
|
||||
The Moon's position as a vector in J2000 Cartesian equatorial coordinates.
|
||||
|
||||
"""
|
||||
@@ -3207,7 +3208,7 @@ def GeoVector(body, time, aberration):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Vector
|
||||
#Vector
|
||||
A geocentric position vector of the center of the given body.
|
||||
"""
|
||||
if body == Body.Moon:
|
||||
@@ -3289,7 +3290,7 @@ def Equator(body, time, observer, ofdate, aberration):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Equatorial
|
||||
#EquatorialCoordinates
|
||||
Equatorial coordinates in the specified frame of reference.
|
||||
"""
|
||||
gc_observer = _geo_pos(time, observer)
|
||||
@@ -3377,7 +3378,7 @@ def Horizon(time, observer, ra, dec, refraction):
|
||||
|
||||
Returns
|
||||
-------
|
||||
HorizontalCoordinates
|
||||
#HorizontalCoordinates
|
||||
The horizontal coordinates (altitude and azimuth), along with
|
||||
equatorial coordinates (right ascension and declination), all
|
||||
optionally corrected for atmospheric refraction. See remarks above
|
||||
@@ -3542,7 +3543,7 @@ def SunPosition(time):
|
||||
|
||||
Returns
|
||||
-------
|
||||
EclipticCoordinates
|
||||
#EclipticCoordinates
|
||||
The ecliptic coordinates of the Sun using the Earth's true equator of date.
|
||||
"""
|
||||
# Correct for light travel time from the Sun.
|
||||
@@ -3571,7 +3572,7 @@ def Ecliptic(equ):
|
||||
|
||||
Returns
|
||||
-------
|
||||
EclipticCoordinates
|
||||
#EclipticCoordinates
|
||||
Ecliptic coordinates in the J2000 frame of reference.
|
||||
"""
|
||||
# Based on NOVAS functions equ2ecl() and equ2ecl_vec().
|
||||
@@ -3596,7 +3597,7 @@ def EclipticLongitude(body, time):
|
||||
|
||||
Returns
|
||||
-------
|
||||
float
|
||||
`float`
|
||||
An angular value in degrees indicating the ecliptic longitude of the body.
|
||||
"""
|
||||
if body == Body.Sun:
|
||||
@@ -3622,7 +3623,7 @@ def AngleFromSun(body, time):
|
||||
|
||||
Returns
|
||||
-------
|
||||
float
|
||||
`float`
|
||||
A numeric value indicating the angle in degrees between the Sun
|
||||
and the specified body as seen from the center of the Earth.
|
||||
"""
|
||||
@@ -3666,7 +3667,7 @@ def LongitudeFromSun(body, time):
|
||||
|
||||
Returns
|
||||
-------
|
||||
float
|
||||
`float`
|
||||
An angle in degrees in the range [0, 360).
|
||||
"""
|
||||
if body == Body.Earth:
|
||||
@@ -3741,7 +3742,7 @@ def Elongation(body, time):
|
||||
|
||||
Returns
|
||||
-------
|
||||
ElongationEvent
|
||||
#ElongationEvent
|
||||
"""
|
||||
angle = LongitudeFromSun(body, time)
|
||||
if angle > 180.0:
|
||||
@@ -3807,7 +3808,7 @@ def SearchRelativeLongitude(body, targetRelLon, startTime):
|
||||
|
||||
Returns
|
||||
-------
|
||||
Time
|
||||
#Time
|
||||
The date and time of the relative longitude event.
|
||||
"""
|
||||
if body == Body.Earth:
|
||||
|
||||
Reference in New Issue
Block a user