This subpackage owns the per-instrument configuration dicts that drive both the simulators and the profiling cells. Two modules:
instruments.imaging—INSTRUMENTSfor imaging (hst, jwst, ao, euclid).instruments.interferometer—INSTRUMENTSfor interferometer (sma, alma, alma_high, jvla).
The INSTRUMENTS dicts used to live inside simulators/imaging.py and
simulators/interferometer.py. As the repo grew, multiple consumers ended
up reading them:
simulators/*.py— drives dataset simulation.likelihood_runtime/{imaging,interferometer,datacube}/*.py— readspixel_scale,mask_radius,real_space_shape,transformer_chunk_sizefor setting up the profiling fit.likelihood_breakdown/{imaging,interferometer,datacube}/*.py— same.vram/config.py— uses the instrument keys to index theVMAP_BATCHlookup table.
Splitting the dicts into a dedicated home means:
- Each consumer imports from one canonical location.
- Adding a new instrument is one row in one file (plus a probe + a
VMAP_BATCHentry). - Helpers like
mask_radius_pixels(instrument)can centralise math that was previously inlined across multiple files.
| Field | Type | Meaning |
|---|---|---|
pixel_scale |
float | arcsec / pixel |
mask_radius |
float | arcsec (circular mask) |
psf_shape |
tuple[int, int] | PSF kernel shape (n_y, n_x) |
psf_sigma |
float | Gaussian PSF width (arcsec) |
seed |
int | RNG seed for noise generation |
| Field | Type | Meaning |
|---|---|---|
pixel_scale |
float | arcsec / pixel |
real_space_shape |
tuple[int, int] | (n_y, n_x) real-space image grid |
mask_radius |
float | arcsec (circular mask) |
n_visibilities |
int | number of (u, v) baselines |
uv_scale |
float | RNG sampling scale for (u, v) |
noise_sigma |
float | noise per visibility |
seed |
int | RNG seed |
transformer |
"dft" or "nufft" | transformer class |
transformer_chunk_size |
int or None | NUFFT gather-buffer cap |
imaging.mask_radius_pixels(instrument) -> int— mask radius / pixel_scale, rounded.imaging.shape_native(instrument) -> tuple[int, int]— data grid shape derived from mask.interferometer.mask_radius_pixels(instrument) -> int— same math, on interferometer.interferometer.transformer_chunk_size_for(instrument) -> int | None— convenience accessor.
The legacy import paths still work:
from simulators.imaging import INSTRUMENTS # still valid
from simulators.interferometer import INSTRUMENTS # still validThese re-export from instruments.{imaging,interferometer} so existing
consumers don't have to migrate. New code should prefer
from instruments.imaging import INSTRUMENTS.
- Add a row to the appropriate
INSTRUMENTSdict. - Simulate the dataset by running
python simulators/<imaging|interferometer>.py --instrument <name>. - Run a
vram/probe job (seevram/README.md) on the A100. - Add the resulting
VMAP_BATCHentry tovram/config.py. - Re-run the regular profile sweep to confirm vmap holds at steady state.