Commit 1080246f authored by Joseph Siddons's avatar Joseph Siddons
Browse files

docs: add docstrings for Ellipse classes

parent ff50a10e
......@@ -97,7 +97,7 @@ class SpaceTimeRectangle:
h : float
Height of the rectangle (latitude range).
dt : timedelta
Time extent of the rectangle.
time extent of the rectangle.
"""
def __init__(
......@@ -218,16 +218,35 @@ class SpaceTimeRectangle:
class SpaceTimeEllipse:
"""A simple Ellipse Class for an ellipse on the surface of a sphere."""
"""
A simple Ellipse Class for an ellipse on the surface of a sphere.
Parameters
----------
lon : float
Horizontal centre of the ellipse
lat : float
Vertical centre of the ellipse
datetime : datetime
Datetime centre of the ellipse.
a : float
Length of the semi-major axis
b : float
Length of the semi-minor axis
theta : float
Angle of the semi-major axis from horizontal anti-clockwise in radians
dt : timedelta
(full) time extent of the ellipse.
"""
def __init__(
self,
a: float,
b: float,
lon: float,
lat: float,
theta: float,
datetime: datetime,
a: float,
b: float,
theta: float,
dt: timedelta,
) -> None:
self.a = a
......
......@@ -14,9 +14,9 @@ class Record:
Parameters
----------
x : float
lon : float
Horizontal coordinate
y : float
lat : float
Vertical coordinate
datetime : datetime | None
Datetime of the record
......@@ -59,13 +59,13 @@ class Rectangle:
Parameters
----------
x : float
lon : float
Horizontal centre of the rectangle
y : float
lat : float
Vertical centre of the rectangle
w : float
lon_range : float
Width of the rectangle
h : float
lat_range : float
Height of the rectangle
"""
......@@ -146,14 +146,29 @@ class Rectangle:
class Ellipse:
"""A simple Ellipse Class for an ellipse on the surface of a sphere."""
"""
A simple Ellipse Class for an ellipse on the surface of a sphere.
Parameters
----------
lon : float
Horizontal centre of the ellipse
lat : float
Vertical centre of the ellipse
a : float
Length of the semi-major axis
b : float
Length of the semi-minor axis
theta : float
Angle of the semi-major axis from horizontal anti-clockwise in radians
"""
def __init__(
self,
a: float,
b: float,
lon: float,
lat: float,
a: float,
b: float,
theta: float,
) -> None:
self.a = a
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment