Features#
Explore the modelling tools you can add to your analysis. Each introduction explains the scientific use cases and links to worked examples.
For your first dataset and starting notebook, use the New User Guide.
Conceptual illustrations, not measured data or guaranteed reconstructions.
Reconstruct the source#
Pixelizations
Reconstruct the background galaxy on a mesh to study spiral arms, star-forming clumps and irregular structure. Pixelization is a key tool for source science: measuring intrinsic flux, size and magnification alongside the lens mass.
Model foreground light and neighbours#

Multi Gaussian Expansion (MGE)
Model foreground lens light that overlaps the arcs using a sum of Gaussians. It can also describe a flexible smooth source. An MGE captures changes in shape with radius while solving component brightnesses together. Source examples include flux and magnification measurements.

Linear Light Profiles
Fit models with many light components using fewer sampled parameters. Component brightnesses are solved together at each likelihood evaluation, leaving the search to explore geometry and lens mass. Useful for lens light, source light and MGE models; solved brightnesses change with the model.

Extra Galaxies
Account for neighbours whose light blends with the arcs or whose gravity changes the lensing. Choose a light model, mass model or both for each companion. Masking its emission does not remove its gravitational effect.

No Lens Light
Fit the lens mass and source when foreground light is negligible or has already been subtracted. The lens still deflects light. For subtracted images, check how residuals and subtraction uncertainty affect the result.

Operated Light Profiles
Separate compact emission from extended galaxy light using a component that already includes the imaging PSF response. The surrounding galaxy still receives its appropriate instrumental response. Interferometer examples instead transform the compact sky emission into visibilities.
Advanced: ellipse fitting. Measure foreground-light shape with the ellipse introduction, then follow the maintained PyAutoGalaxy examples.
Measure lens mass#

Mass Models
Test how the assumed mass distribution affects the inferred lens and source. Choose total-mass profiles or separate stellar and dark components, and use multipoles to explore departures from elliptical symmetry. Angular structure can otherwise resemble a substructure signal.

Stellar + Dark Matter
Measure how stars and dark matter contribute to a lens galaxy’s mass. Combine a stellar component tied to observed light with a separate halo to infer mass-to-light ratios and aperture masses. Lensing measures their combined gravity, so the split depends on the model and priors.

Scaling Relations
Include a population of companion galaxies without fitting every mass independently. Tie mass normalizations to measured luminosities through a shared relation, while giving influential companions more freedom. The tied masses depend on that population assumption.

Multi-Galaxy Lenses, Groups and Clusters
Model systems with several deflectors: multi-galaxy lenses have co-dominant galaxies; groups can include a shared halo; clusters use multiple-image positions from many sources. Choose the scale and observables that match your data.

Double Source-Plane Lenses
Use two background galaxies at different redshifts to probe lens mass and reconstruct both sources. Their geometry can also constrain cosmological distance ratios. Multi-plane modelling includes the nearer source’s deflection of the farther one; the introductory fit keeps cosmology fixed.
Probe dark matter and build analyses#

Dark Matter Subhalos
Search for unseen halos through their perturbations to lensed arcs. Compare fits with and without a halo to identify candidates and infer their properties. Check candidates against lens-model flexibility and systematics, then use sensitivity mapping to interpret both detections and non-detections.
Continue to subhalo detection for the search workflow.

Line-of-Sight Halos
Simulate the combined effect of a halo population between observer and source. Multi-plane ray tracing includes halos in front of and behind the main lens, providing mock images for dark matter studies and tests of lens-redshift assumptions. These examples generate simulations, not population-inference results.

Sensitivity Mapping
Measure which halos your data and modelling procedure could detect. Inject a halo into simulated data, fit with and without it, and repeat across positions or masses. This calibrates non-detections as well as detections; the introductory example uses four positions at one injected mass.

Potential Correction
Investigate arc residuals by reconstructing small corrections to a smooth lensing potential alongside the source. This gravitational-imaging approach locates candidate mass structure without first choosing a halo profile. A reconstructed feature still needs physical modelling and systematic checks.

Automated Pipelines / SLaM
Build complex lens models through a sequence of simpler fits. The Source, Light and Mass pipelines use earlier results to initialize later searches, progressively refining the source, foreground light and mass model.
Extend the analysis across observations#

Point Sources
Add flux and time-delay constraints to a point-source lens model, or deblend compact images from foreground light before measuring them.

Interferometry
Extend radio and submillimetre modelling with flexible source light, pixelized reconstructions and source-science measurements while fitting the visibilities.

Data Cubes
Map a lensed source across a spectral line by reconstructing each channel with a shared lens model. Each channel keeps its own brightness, sampling and noise. These examples reconstruct emission; a dynamical interpretation needs an additional model.
All workspace links
Choose your dataset to browse every feature introduction.




