diff --git a/autolens/interferometer/fit_interferometer.py b/autolens/interferometer/fit_interferometer.py index 76716d012..4e73477d2 100644 --- a/autolens/interferometer/fit_interferometer.py +++ b/autolens/interferometer/fit_interferometer.py @@ -1,3 +1,20 @@ +""" +Interferometer fit class for strong gravitational lens modeling in the uv-plane. + +``FitInterferometer`` extends the ``autogalaxy`` ``FitInterferometer`` base class to +work with a ``Tracer`` instead of a plain ``Galaxies`` collection. The fit pipeline +mirrors the imaging analogue but operates entirely in the visibility (uv) domain: + +1. Evaluate all light profiles of the tracer galaxies on the (ray-traced) real-space grid. +2. Apply the Fourier transform (DFT or NUFFT) to map the image to visibilities. +3. Subtract the predicted visibilities from the observed visibilities. +4. If the tracer contains linear light profiles or pixelizations, solve for their + amplitudes via a linear inversion of the residual visibilities. +5. Combine direct and inversion visibilities into the ``model_data``. +6. Compute residuals, chi-squared, and log likelihood (or log evidence). + +The ``TracerToInversion`` helper is used to assemble the linear system in step 4. +""" import numpy as np from typing import Dict, List, Optional diff --git a/autolens/interferometer/model/analysis.py b/autolens/interferometer/model/analysis.py index 50baad781..695c6b07b 100644 --- a/autolens/interferometer/model/analysis.py +++ b/autolens/interferometer/model/analysis.py @@ -1,3 +1,17 @@ +""" +Analysis class for fitting a ``Tracer`` lens model to an interferometer dataset. + +``AnalysisInterferometer`` implements the ``log_likelihood_function`` called by a +``PyAutoFit`` non-linear search at each iteration. It: + +1. Constructs a ``Tracer`` from the current model instance. +2. Optionally applies adaptive galaxy images to linear components. +3. Calls ``FitInterferometer`` to evaluate the log likelihood in the uv-plane. +4. Returns the figure of merit (log likelihood or log evidence). + +It also manages result output (``ResultInterferometer``), on-the-fly visualisation +(``VisualizerInterferometer``), and position-based priors via ``PositionsLH``. +""" import logging import numpy as np from typing import Optional diff --git a/autolens/interferometer/simulator.py b/autolens/interferometer/simulator.py index 0a46d973c..0385e1d58 100644 --- a/autolens/interferometer/simulator.py +++ b/autolens/interferometer/simulator.py @@ -1,3 +1,17 @@ +""" +Interferometer simulator for strong gravitational lens observations. + +``SimulatorInterferometer`` extends ``aa.SimulatorInterferometer`` with a +``via_tracer_from`` method that accepts a ``Tracer`` object and: + +1. Uses the tracer's mass profiles to ray-trace the real-space grid to the source plane. +2. Evaluates the light profiles of all galaxies on the (traced) grid. +3. Applies the Fourier transform to map the real-space image to complex visibilities. +4. Adds noise to the visibilities according to the noise-map stored in the simulator. + +This is the primary entry point for generating synthetic interferometer datasets for +testing, validation, and mock-data studies of ALMA or JVLA observations. +""" from typing import List import autoarray as aa