Skip to content

Commit bf68dba

Browse files
Jammy2211claude
authored andcommitted
docs(interferometer): add module-level docstrings to interferometer package
Add module-level docstrings to fit_interferometer.py (uv-plane 6-step lensing fit pipeline via Tracer), model/analysis.py (AnalysisInterferometer: log_likelihood_function, result, visualizer, position priors), and simulator.py (SimulatorInterferometer.via_tracer_from pipeline). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ee980f7 commit bf68dba

3 files changed

Lines changed: 45 additions & 0 deletions

File tree

autolens/interferometer/fit_interferometer.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
"""
2+
Interferometer fit class for strong gravitational lens modeling in the uv-plane.
3+
4+
``FitInterferometer`` extends the ``autogalaxy`` ``FitInterferometer`` base class to
5+
work with a ``Tracer`` instead of a plain ``Galaxies`` collection. The fit pipeline
6+
mirrors the imaging analogue but operates entirely in the visibility (uv) domain:
7+
8+
1. Evaluate all light profiles of the tracer galaxies on the (ray-traced) real-space grid.
9+
2. Apply the Fourier transform (DFT or NUFFT) to map the image to visibilities.
10+
3. Subtract the predicted visibilities from the observed visibilities.
11+
4. If the tracer contains linear light profiles or pixelizations, solve for their
12+
amplitudes via a linear inversion of the residual visibilities.
13+
5. Combine direct and inversion visibilities into the ``model_data``.
14+
6. Compute residuals, chi-squared, and log likelihood (or log evidence).
15+
16+
The ``TracerToInversion`` helper is used to assemble the linear system in step 4.
17+
"""
118
import numpy as np
219
from typing import Dict, List, Optional
320

autolens/interferometer/model/analysis.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
"""
2+
Analysis class for fitting a ``Tracer`` lens model to an interferometer dataset.
3+
4+
``AnalysisInterferometer`` implements the ``log_likelihood_function`` called by a
5+
``PyAutoFit`` non-linear search at 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 ``FitInterferometer`` to evaluate the log likelihood in the uv-plane.
10+
4. Returns the figure of merit (log likelihood or log evidence).
11+
12+
It also manages result output (``ResultInterferometer``), on-the-fly visualisation
13+
(``VisualizerInterferometer``), and position-based priors via ``PositionsLH``.
14+
"""
115
import logging
216
import numpy as np
317
from typing import Optional

autolens/interferometer/simulator.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
"""
2+
Interferometer simulator for strong gravitational lens observations.
3+
4+
``SimulatorInterferometer`` extends ``aa.SimulatorInterferometer`` with a
5+
``via_tracer_from`` method that accepts a ``Tracer`` object and:
6+
7+
1. Uses the tracer's mass profiles to ray-trace the real-space grid to the source plane.
8+
2. Evaluates the light profiles of all galaxies on the (traced) grid.
9+
3. Applies the Fourier transform to map the real-space image to complex visibilities.
10+
4. Adds noise to the visibilities according to the noise-map stored in the simulator.
11+
12+
This is the primary entry point for generating synthetic interferometer datasets for
13+
testing, validation, and mock-data studies of ALMA or JVLA observations.
14+
"""
115
from typing import List
216

317
import autoarray as aa

0 commit comments

Comments
 (0)