diff --git a/autogalaxy/analysis/analysis/analysis.py b/autogalaxy/analysis/analysis/analysis.py index 2afd5978..daa42e3e 100644 --- a/autogalaxy/analysis/analysis/analysis.py +++ b/autogalaxy/analysis/analysis/analysis.py @@ -1,3 +1,18 @@ +""" +Abstract `Analysis` class providing shared functionality across all **PyAutoGalaxy** model-fitting analyses. + +This module provides `Analysis`, the root analysis class from which all dataset-specific analysis classes +inherit (`AnalysisImaging`, `AnalysisInterferometer`, `AnalysisEllipse`, `AnalysisQuantity`). + +`Analysis` itself inherits from `af.Analysis` (from **PyAutoFit**) and extends it with: + +- A cosmology instance (defaulting to Planck15). +- A `galaxies_via_instance_from` helper that extracts galaxies from a model instance, handling the + case where an `extra_galaxies` collection is also present. + +All subclasses call `super().__init__` to initialise the cosmology before implementing their own +`log_likelihood_function`. +""" import logging import numpy as np from typing import List, Optional diff --git a/autogalaxy/analysis/result.py b/autogalaxy/analysis/result.py index 36902073..0849c9ae 100644 --- a/autogalaxy/analysis/result.py +++ b/autogalaxy/analysis/result.py @@ -1,3 +1,18 @@ +""" +Result classes returned by **PyAutoGalaxy** model-fitting analyses. + +Each concrete analysis class (`AnalysisImaging`, `AnalysisInterferometer`, etc.) has a paired `Result*` +class (e.g. `ResultImaging`, `ResultInterferometer`) that inherits from the base `Result` class defined here. + +The `Result` class extends **PyAutoFit**'s `af.Result` with galaxy-specific convenience properties: + +- `max_log_likelihood_galaxies` — the list of galaxies at the maximum likelihood point. +- `path_galaxy_tuples` — (name, galaxy) pairs for inspecting which galaxy is which in the model. +- Adapt-image utilities for propagating model images between pipeline stages. + +Dataset-specific result classes (e.g. `ResultImaging`) additionally expose the maximum-likelihood fit +object (`max_log_likelihood_fit`) and other dataset-specific outputs. +""" from __future__ import annotations from typing import Dict, List, Optional, Tuple, Type, Union