From 712f33414638c2d6a6a7acb77b54988806eb4aaa Mon Sep 17 00:00:00 2001 From: Don Cross Date: Fri, 19 Jul 2019 20:57:20 -0400 Subject: [PATCH] Python: added documentation for class IlluminationInfo. --- generate/template/astronomy.py | 26 ++++++++++++++++++++++++++ source/python/README.md | 20 ++++++++++++++++++++ source/python/astronomy.py | 26 ++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) diff --git a/generate/template/astronomy.py b/generate/template/astronomy.py index 44c6c99d..95f5245f 100644 --- a/generate/template/astronomy.py +++ b/generate/template/astronomy.py @@ -2100,6 +2100,32 @@ def NextMoonQuarter(mq): class IlluminationInfo: + """Information about the brightness and illuminated shape of a celestial body. + + Returned by functions #Illumination and #SearchPeakMagnitude + to report the visual magnitude and illuminated fraction of a celestial + body at a given date and time. + + Attributes + ---------- + time : Time + The date and time of the observation. + mag : float + The visual magnitude of the body. Smaller values are brighter. + phase_angle : float + The angle in degrees between the Sun and the Earth, as seen from the body. + Indicates the body's phase as seen from the Earth. + phase_fraction : float + A value in the range [0.0, 1.0] indicating what fraction of the + body's apparent disc is illuminated, as seen from the Earth. + helio_dist : float + The distance between the Sun and the body at the observation time, in AU. + ring_tilt : float + For Saturn, the tilt angle in degrees of its rings as seen from Earth. + When the `ring_tilt` is very close to 0, it means the rings are edge-on + as seen from observers on the Earth, and are thus very difficult to see. + For bodies other than Saturn, `ring_tilt` is `None`. + """ def __init__(self, time, mag, phase, helio_dist, geo_dist, gc, hc, ring_tilt): self.time = time self.mag = mag diff --git a/source/python/README.md b/source/python/README.md index 09e1b59a..8d54133f 100644 --- a/source/python/README.md +++ b/source/python/README.md @@ -115,6 +115,26 @@ a celestial body crossing a certain hour angle as seen by a specified topocentri --- + +### class IlluminationInfo + +**Information about the brightness and illuminated shape of a celestial body.** + +Returned by functions #Illumination and #SearchPeakMagnitude +to report the visual magnitude and illuminated fraction of a celestial +body at a given date and time. + +| Type | Attribute | Description | +| --- | --- | --- | +| [`Time`](#Time) | `time` | The date and time of the observation. | +| `float` | `mag` | The visual magnitude of the body. Smaller values are brighter. | +| `float` | `phase_angle` | The angle in degrees between the Sun and the Earth, as seen from the body. Indicates the body's phase as seen from the Earth. | +| `float` | `phase_fraction` | A value in the range [0.0, 1.0] indicating what fraction of the body's apparent disc is illuminated, as seen from the Earth. | +| `float` | `helio_dist` | The distance between the Sun and the body at the observation time, in AU. | +| `float` | `ring_tilt` | For Saturn, the tilt angle in degrees of its rings as seen from Earth. When the `ring_tilt` is very close to 0, it means the rings are edge-on as seen from observers on the Earth, and are thus very difficult to see. For bodies other than Saturn, `ring_tilt` is `None`. | + +--- + ### class MoonQuarter diff --git a/source/python/astronomy.py b/source/python/astronomy.py index 1b3128ff..91997d13 100644 --- a/source/python/astronomy.py +++ b/source/python/astronomy.py @@ -4161,6 +4161,32 @@ def NextMoonQuarter(mq): class IlluminationInfo: + """Information about the brightness and illuminated shape of a celestial body. + + Returned by functions #Illumination and #SearchPeakMagnitude + to report the visual magnitude and illuminated fraction of a celestial + body at a given date and time. + + Attributes + ---------- + time : Time + The date and time of the observation. + mag : float + The visual magnitude of the body. Smaller values are brighter. + phase_angle : float + The angle in degrees between the Sun and the Earth, as seen from the body. + Indicates the body's phase as seen from the Earth. + phase_fraction : float + A value in the range [0.0, 1.0] indicating what fraction of the + body's apparent disc is illuminated, as seen from the Earth. + helio_dist : float + The distance between the Sun and the body at the observation time, in AU. + ring_tilt : float + For Saturn, the tilt angle in degrees of its rings as seen from Earth. + When the `ring_tilt` is very close to 0, it means the rings are edge-on + as seen from observers on the Earth, and are thus very difficult to see. + For bodies other than Saturn, `ring_tilt` is `None`. + """ def __init__(self, time, mag, phase, helio_dist, geo_dist, gc, hc, ring_tilt): self.time = time self.mag = mag