How jarodgr12/lenspipe works
lenspipe turns calibrated multi-epoch UV-FITS visits into per-image spectra, flux ratios, and science plots through three project-directory stages. Users can drive the same workflow from the CLI or local web console; a separate CASA module can prepare Stage 1 inputs. The graph preserves the documented analysis, combined-visit, and console capabilities. Some internal stage and UI wiring is inferred only from documented responsibilities and paths because those implementations were not sampled.
Main entry points: cli.py CLI commands · stage2.py Stage 2 spectra · analysis.py Stage 3 analysis · stage1.py Stage 1 calibration
Components 26
Project and control
- CLI commands
src/lenspipe/cli.py - Project layout
src/lenspipe/project.py - Configuration
src/lenspipe/config.py - Job management
src/lenspipe/jobs.py
Calibration and stages
- CASA calibration
casa/calibration.py - Stage 1 calibration
src/lenspipe/stage1.py - Stage 2 spectra
src/lenspipe/stage2.py - Stage 2 shards
src/lenspipe/stage2_shards.py - Quick-look plots
src/lenspipe/stage2_quicklook.py - DifMAP execution
src/lenspipe/difmap/runner.py - DifMAP log parsing
src/lenspipe/difmap/logparse.py - UV-FITS handling
src/lenspipe/uvfits.py
Science products
- Stage 3 analysis
src/lenspipe/stage3/analysis.py - Spectral fitting
src/lenspipe/stage3/fitting.py - Multi-visit summaries
src/lenspipe/stage3/combined.py - Publication plots
src/lenspipe/stage3/plotting.py
Web console
- Local web app
src/lenspipe/ui/app.py - Console state
src/lenspipe/ui/state.py - Console pages
src/lenspipe/ui/pages_results.py - Interactive figures
src/lenspipe/ui/interactive.py
Other components
- Researcher
- UV-FITS and model inputs
- Spectra and metadata
- Science tables and figures
- Project products
- DifMAP
Connections 29
- Researcher → CLI commands: runs commands
- CLI commands → Project layout: opens project
- CLI commands → Configuration: loads settings
- Researcher → CASA calibration: calibrates data
- CASA calibration → UV-FITS and model inputs: exports inputs
- UV-FITS and model inputs → Stage 1 calibration: provides data
- CLI commands → Stage 1 calibration: runs stage
- CLI commands → Stage 2 spectra: runs stage
- CLI commands → Stage 3 analysis: runs stage
- Stage 1 calibration → DifMAP execution: runs scripts
- Stage 1 calibration → UV-FITS handling: reads data
- Stage 1 calibration → Project products: writes calibrated products
- Stage 2 spectra → Stage 2 shards: splits fit ranges
- Stage 2 spectra → DifMAP execution: runs fits
- Stage 2 spectra → DifMAP log parsing: parses logs
- Stage 2 spectra → Quick-look plots: makes diagnostics
- Stage 2 spectra → Project products: writes spectra
- Project products → Stage 3 analysis: provides spectra
- Stage 3 analysis → Spectral fitting: fits spectra
- Stage 3 analysis → Multi-visit summaries: summarizes visits
- Stage 3 analysis → Publication plots: renders figures
- Stage 3 analysis → Project products: writes products
- CLI commands → Local web app: starts console
- Local web app → Console state: serves state
- Console state → Job management: manages jobs
- Console pages → Console state: uses state
- Console pages → Interactive figures: builds plots
- Interactive figures → Project products: reads metadata
- DifMAP execution → DifMAP: invokes