Skip to content

Commit 47cd70d

Browse files
authored
Merge pull request #300 from Jammy2211/docs/analysis
docs: add module docstrings to analysis package
2 parents 7ddbd16 + 7996e3d commit 47cd70d

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

autogalaxy/analysis/analysis/analysis.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
"""
2+
Abstract `Analysis` class providing shared functionality across all **PyAutoGalaxy** model-fitting analyses.
3+
4+
This module provides `Analysis`, the root analysis class from which all dataset-specific analysis classes
5+
inherit (`AnalysisImaging`, `AnalysisInterferometer`, `AnalysisEllipse`, `AnalysisQuantity`).
6+
7+
`Analysis` itself inherits from `af.Analysis` (from **PyAutoFit**) and extends it with:
8+
9+
- A cosmology instance (defaulting to Planck15).
10+
- A `galaxies_via_instance_from` helper that extracts galaxies from a model instance, handling the
11+
case where an `extra_galaxies` collection is also present.
12+
13+
All subclasses call `super().__init__` to initialise the cosmology before implementing their own
14+
`log_likelihood_function`.
15+
"""
116
import logging
217
import numpy as np
318
from typing import List, Optional

autogalaxy/analysis/result.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
"""
2+
Result classes returned by **PyAutoGalaxy** model-fitting analyses.
3+
4+
Each concrete analysis class (`AnalysisImaging`, `AnalysisInterferometer`, etc.) has a paired `Result*`
5+
class (e.g. `ResultImaging`, `ResultInterferometer`) that inherits from the base `Result` class defined here.
6+
7+
The `Result` class extends **PyAutoFit**'s `af.Result` with galaxy-specific convenience properties:
8+
9+
- `max_log_likelihood_galaxies` — the list of galaxies at the maximum likelihood point.
10+
- `path_galaxy_tuples` — (name, galaxy) pairs for inspecting which galaxy is which in the model.
11+
- Adapt-image utilities for propagating model images between pipeline stages.
12+
13+
Dataset-specific result classes (e.g. `ResultImaging`) additionally expose the maximum-likelihood fit
14+
object (`max_log_likelihood_fit`) and other dataset-specific outputs.
15+
"""
116
from __future__ import annotations
217

318
from typing import Dict, List, Optional, Tuple, Type, Union

0 commit comments

Comments
 (0)