From 1080246fba8a74fd61933f1f1934cb55e4553be8 Mon Sep 17 00:00:00 2001
From: josidd <joseph.siddons@noc.ac.uk>
Date: Wed, 25 Sep 2024 13:59:47 +0100
Subject: [PATCH] docs: add docstrings for Ellipse classes

---
 GeoSpatialTools/octtree.py  | 29 ++++++++++++++++++++++++-----
 GeoSpatialTools/quadtree.py | 33 ++++++++++++++++++++++++---------
 2 files changed, 48 insertions(+), 14 deletions(-)

diff --git a/GeoSpatialTools/octtree.py b/GeoSpatialTools/octtree.py
index 28cee15..86785a4 100644
--- a/GeoSpatialTools/octtree.py
+++ b/GeoSpatialTools/octtree.py
@@ -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
diff --git a/GeoSpatialTools/quadtree.py b/GeoSpatialTools/quadtree.py
index b5f2088..92c2e37 100644
--- a/GeoSpatialTools/quadtree.py
+++ b/GeoSpatialTools/quadtree.py
@@ -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
-- 
GitLab