From 0398e780a369394bfc4c50b08a7ddbedf30736e3 Mon Sep 17 00:00:00 2001 From: Kramer Date: Sun, 23 Feb 2025 15:02:57 +0100 Subject: [PATCH] docs: update module docstrings for physical apertures classes --- optiland/physical_apertures/base.py | 13 ++++++++----- optiland/physical_apertures/elliptical.py | 7 +++++++ optiland/physical_apertures/offset_radial.py | 8 ++++++++ optiland/physical_apertures/polygon.py | 9 +++++++++ optiland/physical_apertures/radial.py | 7 +++++++ optiland/physical_apertures/rectangular.py | 7 +++++++ 6 files changed, 46 insertions(+), 5 deletions(-) diff --git a/optiland/physical_apertures/base.py b/optiland/physical_apertures/base.py index 0aae9e03..0cad1dad 100644 --- a/optiland/physical_apertures/base.py +++ b/optiland/physical_apertures/base.py @@ -1,8 +1,11 @@ -"""Physical Apertures Module - -This module provides classes to define physical apertures on optical surfaces. -For example, a telescope primary mirror with a center hole can be represented -by a radial aperture that clips rays based on their distance from the origin. +"""Physical Apertures Base Module + +This module contains the base classes for physical apertures. The BaseAperture +class is an abstract base class that defines the interface for physical +apertures. The BaseBooleanAperture class is an abstract base class for boolean +operations on apertures. The UnionAperture, IntersectionAperture, and +DifferenceAperture classes are concrete classes that implement the union, +intersection, and difference of two apertures, respectively. Kramer Harrison, 2024 """ diff --git a/optiland/physical_apertures/elliptical.py b/optiland/physical_apertures/elliptical.py index f1b8659a..b26096ba 100644 --- a/optiland/physical_apertures/elliptical.py +++ b/optiland/physical_apertures/elliptical.py @@ -1,3 +1,10 @@ +"""Elliptical Aperture Module + +This module contains the EllipticalAperture class, which represents an +elliptical aperture that clips rays based on their position. + +Kramer Harrison, 2025 +""" from optiland.physical_apertures.base import BaseAperture diff --git a/optiland/physical_apertures/offset_radial.py b/optiland/physical_apertures/offset_radial.py index 6076d24f..c634ea4a 100644 --- a/optiland/physical_apertures/offset_radial.py +++ b/optiland/physical_apertures/offset_radial.py @@ -1,3 +1,11 @@ +"""Offset Radial Aperture Module + +This module contains the OffsetRadialAperture class, which represents a radial +aperture that clips rays based on their distance from the origin, with an +offset in the x and y directions. + +Kramer Harrison, 2025 +""" import numpy as np from optiland.physical_apertures.radial import RadialAperture diff --git a/optiland/physical_apertures/polygon.py b/optiland/physical_apertures/polygon.py index cd5d3bb2..f0177d87 100644 --- a/optiland/physical_apertures/polygon.py +++ b/optiland/physical_apertures/polygon.py @@ -1,3 +1,12 @@ +"""Polygon Aperture Module + +This module contains the PolygonAperture class, which represents a polygonal +aperture that clips rays based on a set of vertices. It also contains the +FileAperture class, which reads an aperture definition from a file and creates +a polygon-based aperture. + +Kramer Harrison, 2025 +""" import numpy as np from matplotlib.path import Path from optiland.physical_apertures.base import BaseAperture diff --git a/optiland/physical_apertures/radial.py b/optiland/physical_apertures/radial.py index f60d8050..fde8fb8b 100644 --- a/optiland/physical_apertures/radial.py +++ b/optiland/physical_apertures/radial.py @@ -1,3 +1,10 @@ +"""Radial Aperture Module + +This module contains the RadialAperture class, which represents a radial +aperture that clips rays based on their distance from the origin. + +Kramer Harrison, 2025 +""" from optiland.physical_apertures.base import BaseAperture diff --git a/optiland/physical_apertures/rectangular.py b/optiland/physical_apertures/rectangular.py index 9e759d43..8a9d1c92 100644 --- a/optiland/physical_apertures/rectangular.py +++ b/optiland/physical_apertures/rectangular.py @@ -1,3 +1,10 @@ +"""Rectangular Aperture Module + +This module contains the RectangularAperture class, which represents a +rectangular aperture that clips rays based on their position. + +Kramer Harrison, 2025 +""" from optiland.physical_apertures.base import BaseAperture