From 3c7510c63609a812663316f0c3bfed8f4024033a Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Tue, 10 Mar 2026 16:26:58 +0000 Subject: [PATCH] docs: add module docstrings to ellipse package - Add module-level docstring to fit_ellipse.py describing the isophote- fitting approach and how it differs from light-profile fitting - Add module-level docstring to model/analysis.py describing AnalysisEllipse and how it differs from AnalysisImaging Co-Authored-By: Claude Sonnet 4.6 --- autogalaxy/ellipse/fit_ellipse.py | 14 ++++++++++++++ autogalaxy/ellipse/model/analysis.py | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/autogalaxy/ellipse/fit_ellipse.py b/autogalaxy/ellipse/fit_ellipse.py index 1a0f3edaf..5642c4b45 100644 --- a/autogalaxy/ellipse/fit_ellipse.py +++ b/autogalaxy/ellipse/fit_ellipse.py @@ -1,3 +1,17 @@ +""" +Fit isophotal ellipses to a 2D image dataset. + +`FitEllipse` uses a single `Ellipse` (plus optional `EllipseMultipole` perturbations) to fit an imaging +dataset. Rather than convolving a model image with a PSF, the fit works by: + +1. Computing the (y, x) sample points distributed around the ellipse's perimeter. +2. Interpolating the image data and noise-map at those sample points. +3. Computing residuals between the interpolated data values and the mean intensity along the ellipse. + +This is the classical isophote-fitting approach used in tools such as IRAF/ELLIPSE and galfit, and is +appropriate for measuring galaxy morphology, position angles, axis ratios, and multipole perturbations +directly from imaging data without fitting a parametric light profile model. +""" import numpy as np from typing import List, Optional diff --git a/autogalaxy/ellipse/model/analysis.py b/autogalaxy/ellipse/model/analysis.py index 8451f12bb..9af0f9934 100644 --- a/autogalaxy/ellipse/model/analysis.py +++ b/autogalaxy/ellipse/model/analysis.py @@ -1,3 +1,15 @@ +""" +`AnalysisEllipse` — the **PyAutoFit** `Analysis` class for fitting isophotal ellipse models to imaging data. + +This module provides `AnalysisEllipse`, which implements `log_likelihood_function` by: + +1. Extracting the ellipse (and optional multipoles) from the model instance. +2. Constructing a `FitEllipse` object. +3. Returning the `figure_of_merit` of the fit. + +Unlike `AnalysisImaging`, this class does not use PSF convolution or linear inversions. It directly fits +the isophotal structure of the image via interpolation along the ellipse perimeter. +""" import logging import numpy as np from typing import List, Optional