Skip to content

Commit 7ddbd16

Browse files
authored
Merge pull request #299 from Jammy2211/docs/quantity
docs: add module docstrings to quantity package
2 parents 8577fa7 + b005e98 commit 7ddbd16

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

autogalaxy/quantity/dataset_quantity.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
"""
2+
`DatasetQuantity` — a dataset wrapper for derived lensing quantities.
3+
4+
This module provides `DatasetQuantity`, which wraps an arbitrary array-valued quantity (e.g. convergence,
5+
deflection angles, surface brightness) together with a noise-map, so that the quantity can be treated as
6+
a dataset and fitted via `FitQuantity` and `AnalysisQuantity`.
7+
8+
The noise-map enables the computation of chi-squared values and log-likelihoods, turning a pure
9+
comparison of model quantities into a statistically principled goodness-of-fit metric.
10+
"""
111
import logging
212
import numpy as np
313
from pathlib import Path

autogalaxy/quantity/fit_quantity.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
"""
2+
Fit a `DatasetQuantity` object with model quantities computed from light or mass profiles.
3+
4+
`FitQuantity` provides a general-purpose fitting framework for derived lensing quantities (e.g. convergence,
5+
deflection angles, surface brightness). Given a `DatasetQuantity` (which contains a target quantity array and
6+
a noise-map), `FitQuantity` evaluates the same quantity from a model object and computes the likelihood of
7+
the model matching the target.
8+
9+
This is useful for, for example:
10+
11+
- Matching the convergence of a power-law model to the convergence of an NFW profile.
12+
- Comparing deflection angles from two different mass distributions.
13+
- Fitting a pixelized reconstruction to a separately computed model quantity.
14+
15+
The `AnalysisQuantity` class uses `FitQuantity` internally to enable non-linear fitting of these quantities.
16+
"""
117
from typing import List, Optional, Union
218

319
import autoarray as aa

0 commit comments

Comments
 (0)