Tools for simulating count-rate non-linearity (CRNL) in the Roman Space Telescope's Wide Field Instrument (WFI) using lamp-on/lamp-off observations.
Clone the repository and install in editable mode:
pip install -e .Or with development dependencies:
pip install -e ".[dev]"- RomanWFIParams: Instrument parameters for Roman WFI
- CRNLModel: Power-law count-rate non-linearity model
- SceneGenerator: Generate synthetic astronomical scenes with stars and galaxies
- LampOnOffSimulator: Simulate lamp-on/lamp-off observations with realistic noise
- Visualization and FITS I/O utilities
- SourcePhotometry: Source detection and aperture/PSF photometry
- DS9 integration for interactive visualization
- Noise estimation and signal-to-noise calculations
from roman_lolo import (
RomanWFIParams,
CRNLModel,
SceneGenerator,
LampOnOffSimulator,
)
# Set up instrument and CRNL model
wfi = RomanWFIParams()
crnl = CRNLModel(alpha=1.005, s_cal=100.0)
# Generate a scene with stars and galaxies
scene_gen = SceneGenerator(wfi=wfi)
scene = scene_gen.render_scene(n_stars=200, n_galaxies=50)
# Simulate lamp-on/lamp-off observations
simulator = LampOnOffSimulator(wfi=wfi, crnl=crnl)
results = simulator.lamp_on_off_experiment(
scene=scene,
pedestal_rates=[50.0, 200.0, 500.0]
)roman-lolo/
├── src/
│ └── roman_lolo/
│ ├── __init__.py
│ ├── roman_crnl_sim.py # Main CRNL simulation code
│ └── romanphot.py # Photometry utilities
├── notebooks/
│ └── LOLO_clean.ipynb # Example analysis notebook
├── setup.py
├── pyproject.toml
└── README.md
See example notebooks in notebooks/ for detailed usage.
Maxime Rizzo
MIT