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

docs: add docstrings for Ellipse classes

...@@ -97,7 +97,7 @@ class SpaceTimeRectangle: ...@@ -97,7 +97,7 @@ class SpaceTimeRectangle:
h : float h : float
Height of the rectangle (latitude range). Height of the rectangle (latitude range).
dt : timedelta dt : timedelta
Time extent of the rectangle. time extent of the rectangle.
""" """
def __init__( def __init__(
...@@ -218,16 +218,35 @@ class SpaceTimeRectangle: ...@@ -218,16 +218,35 @@ class SpaceTimeRectangle:
class SpaceTimeEllipse: 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__( def __init__(
self, self,
a: float,
b: float,
lon: float, lon: float,
lat: float, lat: float,
theta: float,
datetime: datetime, datetime: datetime,
a: float,
b: float,
theta: float,
dt: timedelta, dt: timedelta,
) -> None: ) -> None:
self.a = a self.a = a
......
...@@ -14,9 +14,9 @@ class Record: ...@@ -14,9 +14,9 @@ class Record:
Parameters Parameters
---------- ----------
x : float lon : float
Horizontal coordinate Horizontal coordinate
y : float lat : float
Vertical coordinate Vertical coordinate
datetime : datetime | None datetime : datetime | None
Datetime of the record Datetime of the record
...@@ -59,13 +59,13 @@ class Rectangle: ...@@ -59,13 +59,13 @@ class Rectangle:
Parameters Parameters
---------- ----------
x : float lon : float
Horizontal centre of the rectangle Horizontal centre of the rectangle
y : float lat : float
Vertical centre of the rectangle Vertical centre of the rectangle
w : float lon_range : float
Width of the rectangle Width of the rectangle
h : float lat_range : float
Height of the rectangle Height of the rectangle
""" """
...@@ -146,14 +146,29 @@ class Rectangle: ...@@ -146,14 +146,29 @@ class Rectangle:
class Ellipse: 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__( def __init__(
self, self,
a: float,
b: float,
lon: float, lon: float,
lat: float, lat: float,
a: float,
b: float,
theta: float, theta: float,
) -> None: ) -> None:
self.a = a 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