Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions autogalaxy/analysis/analysis/analysis.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 15 additions & 0 deletions autogalaxy/analysis/result.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading