File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ """
2+ Imaging fit class for strong gravitational lens modeling.
3+
4+ ``FitImaging`` extends the ``autogalaxy`` ``FitImaging`` base class to work with a
5+ ``Tracer`` instead of a plain ``Galaxies`` collection. The fit pipeline is the same
6+ six-step process as the base class, with the critical addition that light profiles from
7+ source galaxies are evaluated *after* ray-tracing their image-plane grid through the
8+ lens mass distribution:
9+
10+ 1. Evaluate all light profiles of the tracer galaxies on the (ray-traced) grid.
11+ 2. Blur the summed image with the imaging PSF.
12+ 3. Subtract the blurred image from the data to form the profile-subtracted image.
13+ 4. If the tracer contains linear light profiles or pixelizations, solve for their
14+ amplitudes / reconstructed source via an inversion of the profile-subtracted image.
15+ 5. Combine blurred image and inversion reconstruction into the ``model_data``.
16+ 6. Compute residuals, chi-squared, and log likelihood (or log evidence when an inversion
17+ is present).
18+
19+ The ``TracerToInversion`` helper is used to assemble the linear system in step 4.
20+ """
121import copy
222import numpy as np
323from typing import Dict , List , Optional
Original file line number Diff line number Diff line change 1+ """
2+ Analysis class for fitting a ``Tracer`` lens model to an imaging dataset.
3+
4+ ``AnalysisImaging`` implements the ``log_likelihood_function`` that a ``PyAutoFit``
5+ non-linear search calls on each iteration. It:
6+
7+ 1. Constructs a ``Tracer`` from the current model instance.
8+ 2. Optionally applies adaptive galaxy images to linear components.
9+ 3. Calls ``FitImaging`` to evaluate the log likelihood.
10+ 4. Returns the figure of merit (log likelihood or log evidence).
11+
12+ It also manages result output (``ResultImaging``), on-the-fly visualisation
13+ (``VisualizerImaging``), and position-based priors via ``PositionLikelihood``.
14+ """
115import logging
216
317import autofit as af
Original file line number Diff line number Diff line change 1+ """
2+ Imaging simulator for strong gravitational lens observations.
3+
4+ ``SimulatorImaging`` extends ``aa.SimulatorImaging`` with a ``via_tracer_from`` method
5+ that accepts a ``Tracer`` object and:
6+
7+ 1. Uses the tracer's mass profiles to ray-trace the image-plane grid to the source plane.
8+ 2. Evaluates the light profiles of all galaxies on the (traced) grid.
9+ 3. Passes the result through the standard ``SimulatorImaging`` pipeline: PSF convolution,
10+ background sky addition, and Poisson noise realisation.
11+
12+ This is the primary entry point for generating synthetic lens datasets for testing,
13+ validation, and mock-data studies.
14+ """
115import numpy as np
216from typing import List
317
You can’t perform that action at this time.
0 commit comments