Gravitational Lensing Analysis Workflow
This workflow outlines a comprehensive pipeline for analyzing gravitational lensing data, from raw observations to cosmological inference. It is structured sequentially with branches for strong lensing (e.g., multiple images, arcs) vs. weak lensing (e.g., statistical shape distortions). Tools like lenstronomy, im3shape, pixellens, or PyAutoLens are commonly used, alongside MCMC samplers (e.g., emcee) for inference.
1. Data Preprocessing
Input : Raw imaging/spectroscopy (e.g., HST, JWST, Euclid, LSST); source catalogs; PSF models.
Steps :
Image Calibration : Flat-fielding, bias/dark subtraction, cosmic ray removal.
PSF Reconstruction : Measure and model point-spread function (e.g., via stars).
Source Detection & Cataloging : Identify lensed images/arcs (strong) or background galaxies (weak) using SExtractor or ProFound.
Multi-Band Alignment : Astrometric registration across filters.
Noise Modeling : Create variance maps, mask foregrounds (e.g., lens galaxy light).
Shear/Redshift Estimation (weak): Measure galaxy ellipticities (im2shape, DeepMass); photometric/spectroscopic redshifts.
Output : Clean images, image positions (strong), shear catalogs (weak), noise covariance.
2. Lens Modeling (Strong vs. Weak)
Aspect Strong Lensing Weak Lensing Goal Fit multiple images/arcs to lens potential Reconstruct convergence/shear field Models - Lens: SIE/PIXELATED mass + external shear.- Source: Parametric (Sérsic) or pixelated.- Light: Lens galaxy profile (e.g., CDM profiles). - Shear power spectrum or Kaiser-Squires inversion.- Mass: NFW halos or grid-based. Optimization Forward modeling: Ray-trace source → observed images; minimize χ² (e.g., lenstronomy). Quadratic estimator or Bayesian shear-shear correlations. Initial Guess Lens center from galaxy position; Einstein radius from images. From galaxy-galaxy lensing or cluster peaks.
Hybrid Approaches : Combine strong (inner) + weak (outer) for cluster-scale lenses.
Output : Best-fit lens potential ψ(θ), deflection angle α(θ), convergence κ(θ).
3. Mass Reconstruction Techniques
Strong Lensing :
Parametric: Fit analytic profiles (e.g., SIE, Einasto).
Free-form: Pixelated mass grids (pixellens, grale).
Weak Lensing :
Linear Inversion: Kaiser-Squires (FFT-based κ from γ).
Non-linear: Maximum a-posteriori (MAP) with priors (e.g., entropy regularization).
Bayesian: MCMC on mass profiles (Lenstool).
Advanced : Multi-plane lensing, line-of-sight integration (HMass).
Output : 2D/3D mass maps (κ, Σ_crit).
4. Degeneracy Handling
Common Degeneracies :
Degeneracy Description Mitigation Strategies Mass-Sheet (MSD) κ → λκ + (1-λ); source size scales. External priors (e.g., stellar dynamics, weak lensing outskirts); time delays. Source Position Radial/stellar profile ambiguity. Multi-wavelength data; source plane priors. Profile Slope Shallow vs. cuspy cores. Ensemble averaging; external shear constraints. 3D → 2D Projection LOS effects. Multi-lens planes; halo catalogs.
Methods :
Marginalization via MCMC.
Joint fitting with kinematics ( Jeans modeling).
Ensemble lens modeling (e.g., 1000 realizations).
Output : Degeneracy-broken posterior distributions.
5. Uncertainty Estimation
Sources : Shape noise, cosmic variance, systematics (PSF errors, photo-z biases).
Techniques :
Parametric : Fisher matrix or Hessian from optimization.
Non-Parametric : Bootstrap resampling of images/shears.
Bayesian : MCMC/Nested Sampling (bilby, dynesty) for full posteriors.
Ensemble : Null tests on simulations (e.g., GLee mocks).
Covariance : Analytic (e.g., lensing power spectrum) or empirical.
Output : Error bars on κ(θ), mass (M_{200}), profiles (ΔΣ).
6. Cosmological Parameter Inference
Probes :
Strong Lensing Weak Lensing Time delays → H_0 (TDCOSMO).Ensemble distances → Ω_m. Cosmic shear → σ_8(Ω_m/0.3)^{0.5}.Galaxy-galaxy → halo properties.
Steps :
Distance Ratios : D_{ls}/D_s from lens modeling.
Population-Level : Stack lenses; likelihood for ΛCDM params (Ω_m, σ_8, w).
Joint Analysis : Combine with CMB (Planck), BAO, SNe.
Inference : CosmoMC, cobaya with custom lensing likelihoods.
Output : Constraints on H_0, Ω_m, σ_8, dark energy params.
7. Validation
Internal :
Reduced χ² ≈ 1; residuals inspection.
Source-plane parity tests.
External :
Test Type Method Simulations End-to-end mocks (e.g., ThreeLittleFishies); recovery tests. Cross-Checks Compare mass from lensing vs. dynamics/X-ray. Null Tests B-modes in shear (E/B decomposition). Blind Challenges e.g., LensPop, CAMELS suites. Systematics Multi-probe residuals (e.g., IA mitigation).
Success Criteria : Biases < 1σ; scatter < 5-10% on mass.
Output : Validation report; publication-ready figures (mass profiles, H_0 contours).
Workflow Diagram (Text-Based)
code Copy code
Raw Data → [Preprocessing] → [Lens Modeling: Strong ∨ Weak]
↓
[Mass Reconstruction] → [Degeneracy Handling] → [Uncertainty Estimation]
↓
[Cosmological Inference] → [Validation] → Final Results (e.g., H_0 = 70 ± 2 km/s/Mpc)
Tips : Automate with pipelines (e.g., slacs for strong lenses). Scale with HPC for large surveys (LSST). Iterate steps 2-5 as needed for convergence. For code examples, see lenstronomy tutorials.