Skip to content

Commit 4305d59

Browse files
Jammy2211claude
authored andcommitted
docs: add module docstrings to interferometer package
- Add module-level docstring to fit_interferometer.py describing the uv-plane fitting pipeline - Add module-level docstring to simulator.py explaining galaxy-aware interferometer simulation - Add module-level docstring to model/analysis.py describing AnalysisInterferometer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d99d74b commit 4305d59

3 files changed

Lines changed: 32 additions & 0 deletions

File tree

autogalaxy/interferometer/fit_interferometer.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
"""
2+
Fit an interferometer (ALMA/JVLA uv-plane) dataset with a model consisting of one or more galaxies.
3+
4+
`FitInterferometer` mirrors `FitImaging` but works in the uv-plane:
5+
6+
1. Compute the sum of all galaxy light profile images.
7+
2. Fourier-transform that image to ``profile_visibilities`` using the dataset's transformer.
8+
3. Subtract from the observed visibilities to create ``profile_subtracted_visibilities``.
9+
4. If linear light profiles or a pixelization are present, fit the residual visibilities via a
10+
linear inversion.
11+
5. Combine the profile visibilities and inversion reconstruction into ``model_data``.
12+
6. Compute residuals, chi-squared, and log-likelihood (or log-evidence when an inversion is used).
13+
"""
114
import numpy as np
215
from typing import Dict, List, Optional
316

autogalaxy/interferometer/model/analysis.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
"""
2+
`AnalysisInterferometer` — the **PyAutoFit** `Analysis` class for fitting galaxy models to interferometer data.
3+
4+
This module provides `AnalysisInterferometer`, which implements `log_likelihood_function` by:
5+
6+
1. Extracting galaxies from the model instance.
7+
2. Constructing a `FitInterferometer` object from those galaxies and the stored `Interferometer` dataset.
8+
3. Returning the `figure_of_merit` of the fit (log-likelihood or log-evidence).
9+
10+
It also handles adapt images, visualization, and result wrapping into `ResultInterferometer`.
11+
"""
112
import logging
213
import numpy as np
314
from typing import Optional

autogalaxy/interferometer/simulator.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
"""
2+
Extends the **PyAutoArray** `SimulatorInterferometer` class with galaxy-aware simulation.
3+
4+
`SimulatorInterferometer` (from `autoarray`) handles the low-level simulation: applying a Fourier
5+
transform and adding visibility noise. This module adds a `via_galaxies_from` method that takes a list
6+
of `Galaxy` objects and a 2D grid, evaluates the galaxy images, and passes them to the parent
7+
simulation pipeline.
8+
"""
19
import numpy as np
210
from typing import List
311

0 commit comments

Comments
 (0)