Skip to content
Open
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
16 changes: 16 additions & 0 deletions autolens/aggregator/fit_imaging.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
"""
Aggregator interface for loading ``FitImaging`` objects from lens model-fit results.

This module assembles ``FitImaging`` instances offline by combining the imaging dataset,
``Tracer``, dataset model, and adapt images stored in a ``PyAutoFit`` output directory or
SQLite database — reproducing exactly the fit that was evaluated during the original
non-linear search.

Two public objects are provided:

- ``_fit_imaging_from`` — a free function that accepts a single ``PyAutoFit`` ``Fit``
entry and returns a list of ``FitImaging`` objects (one per summed ``Analysis``).
- ``FitImagingAgg`` — a ``PyAutoFit`` ``AggBase`` subclass wrapping an ``Aggregator``
that exposes a generator of ``FitImaging`` objects, enabling memory-efficient iteration
over large result sets.
"""
from typing import Optional, List

import autofit as af
Expand Down
17 changes: 17 additions & 0 deletions autolens/aggregator/fit_interferometer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
"""
Aggregator interface for loading ``FitInterferometer`` objects from lens model-fit results.

This module assembles ``FitInterferometer`` instances offline by combining the
interferometer dataset, ``Tracer``, dataset model, and adapt images stored in a
``PyAutoFit`` output directory or SQLite database — reproducing exactly the fit that was
evaluated during the original non-linear search.

Two public objects are provided:

- ``_fit_interferometer_from`` — a free function that accepts a single ``PyAutoFit``
``Fit`` entry and returns a list of ``FitInterferometer`` objects (one per summed
``Analysis``).
- ``FitInterferometerAgg`` — a ``PyAutoFit`` ``AggBase`` subclass wrapping an
``Aggregator`` that exposes a generator of ``FitInterferometer`` objects, enabling
memory-efficient iteration over large result sets.
"""
from typing import Optional, List

import autofit as af
Expand Down
12 changes: 12 additions & 0 deletions autolens/aggregator/subhalo.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
"""
Aggregator interface for dark-matter subhalo grid-search results.

``SubhaloAgg`` wraps a ``PyAutoFit`` ``GridSearchAggregator`` to provide a convenient
interface for loading and comparing the results of a subhalo detection grid search.

A subhalo grid search runs an independent non-linear search in each cell of an image-plane
grid, with the subhalo's (y, x) centre confined to that cell's region. ``SubhaloAgg``
collates these per-cell results and exposes generators that yield ``FitImaging`` objects
for the best-fit model in each cell — both the "with subhalo" fit and (optionally) the
"no subhalo" baseline — enabling the per-cell log-evidence difference map to be computed.
"""
from typing import Optional

import autofit as af
Expand Down
16 changes: 16 additions & 0 deletions autolens/aggregator/tracer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
"""
Aggregator interface for loading ``Tracer`` objects from model-fit results.

After a **PyAutoLens** model-fit the best-fit galaxy model parameters are stored in the
output directory or SQLite database as part of the model JSON file. This module
reconstructs ``Tracer`` instances from those stored parameters so that the full
ray-tracing model can be re-evaluated and inspected without re-running the fit.

Two public objects are provided:

- ``_tracer_from`` — a free function that accepts a single ``PyAutoFit`` ``Fit`` entry
and returns the list of ``Tracer`` objects (one per summed ``Analysis``) for the
requested model instance.
- ``TracerAgg`` — a ``PyAutoFit`` ``AggBase`` subclass wrapping an ``Aggregator`` that
exposes a generator of tracer lists, one entry per stored model-fit.
"""
import logging
from typing import List, Optional

Expand Down
Loading