What to build
Execute ADR 0001 from #76: make the package the canonical home for the production hourly-epoch coadd by absorbing production mosaic_day behavior into dsa110_continuum.mosaic, then make scripts/batch_pipeline.py call that package entry point instead of importing scripts/mosaic_day.py for coadd construction.
Current production call site:
scripts/batch_pipeline.py imports mosaic_day as _md and calls _md.build_common_wcs(...) + _md.coadd_tiles(...) around the epoch mosaic build.
scripts/mosaic_day.py currently owns PB_CUTOFF = 0.2, group_tiles_by_ra(...), build_common_wcs(...), and coadd_tiles(...).
dsa110_continuum.mosaic.builder.build_mosaic is the package Quicklook builder and owns the existing RA-wrap regression behavior, but it must not be promoted as-is because it does not implement the production beam-map blanking / strip-grouping semantics.
Concrete ADR-derived behavior to implement:
- Canonical entry point: create or designate a package entry under
dsa110_continuum.mosaic for production hourly-epoch coadds. It may wrap/refactor existing builder.build_mosaic, but it must be callable by scripts/batch_pipeline.py without importing scripts/mosaic_day.py.
- Primary-beam blanking: preserve production blanking at
PB_CUTOFF = 0.2 before coadd when WSClean *-beam-0.fits companions exist. This is not the package builder's compute_pb_correction_map(pb_cutoff=0.1) floor; keep those concepts separate.
- Primary-beam model source: production batch coadds must use WSClean's per-tile beam model from disk when available. The analytic Airy-disk model can remain a fallback/Quicklook/simulation path, but it is not the production beam source.
- Strip grouping: preserve 10-degree RA gap strip grouping for day-batch and UTC-hour batch inputs so disjoint tile sets do not produce oversized mosaics. Sliding-window streaming inputs may bypass this only when the trigger has already selected a single contiguous Dec strip window.
- RA wrap: preserve the circular-mean WCS behavior from the package builder / existing regression. Tile sets crossing 0 deg RA must produce a compact output centre, not an arithmetic-mean centre.
Acceptance criteria
Blocked by
Pointers for a fresh agent
- ADR:
docs/adr/0001-canonical-hourly-epoch-coadd.md.
- Current production call site:
scripts/batch_pipeline.py epoch mosaic build around the _md.build_common_wcs(...) / _md.coadd_tiles(...) calls.
- Legacy behavior to absorb:
scripts/mosaic_day.py::PB_CUTOFF, group_tiles_by_ra, build_common_wcs, coadd_tiles.
- Package builder and RA-wrap baseline:
dsa110_continuum/mosaic/builder.py::build_mosaic, compute_optimal_wcs, tests/test_mosaic_ra_wrap.py.
- Use the casa6 env on H17:
PYTHONPATH=/data/dsa110-continuum /opt/miniforge/envs/casa6/bin/python -m pytest ....
What to build
Execute ADR 0001 from #76: make the package the canonical home for the production hourly-epoch coadd by absorbing production
mosaic_daybehavior intodsa110_continuum.mosaic, then makescripts/batch_pipeline.pycall that package entry point instead of importingscripts/mosaic_day.pyfor coadd construction.Current production call site:
scripts/batch_pipeline.pyimportsmosaic_day as _mdand calls_md.build_common_wcs(...)+_md.coadd_tiles(...)around the epoch mosaic build.scripts/mosaic_day.pycurrently ownsPB_CUTOFF = 0.2,group_tiles_by_ra(...),build_common_wcs(...), andcoadd_tiles(...).dsa110_continuum.mosaic.builder.build_mosaicis the package Quicklook builder and owns the existing RA-wrap regression behavior, but it must not be promoted as-is because it does not implement the production beam-map blanking / strip-grouping semantics.Concrete ADR-derived behavior to implement:
dsa110_continuum.mosaicfor production hourly-epoch coadds. It may wrap/refactor existingbuilder.build_mosaic, but it must be callable byscripts/batch_pipeline.pywithout importingscripts/mosaic_day.py.PB_CUTOFF = 0.2before coadd when WSClean*-beam-0.fitscompanions exist. This is not the package builder'scompute_pb_correction_map(pb_cutoff=0.1)floor; keep those concepts separate.Acceptance criteria
scripts/batch_pipeline.pyno longer imports or callsscripts/mosaic_day.pyfor epoch coadd construction (build_common_wcs,coadd_tiles, orgroup_tiles_by_ra).batch_pipeline.pycalls) on synthetic tiles and asserts it goes through the canonical package entry rather thanmosaic_day.coadd_tiles.tests/test_mosaic_ra_wrap.pystill passes.scripts/batch_pipeline.py --dry-run --date 2026-01-25 --start-hour 22 --end-hour 23 --quarantine-after-failures 3succeeds on H17 with the casa6 env.scripts/mosaic_day.pyto a thin compatibility wrapper around the package entry, or keep it only as a legacy standalone CLI after verifying callers withrg "mosaic_day|coadd_tiles|group_tiles_by_ra".CONTEXT.mdStrip grouping (legacy day-batch)entry is updated ifscripts/mosaic_day.pyno longer owns that behavior after migration.Blocked by
Pointers for a fresh agent
docs/adr/0001-canonical-hourly-epoch-coadd.md.scripts/batch_pipeline.pyepoch mosaic build around the_md.build_common_wcs(...)/_md.coadd_tiles(...)calls.scripts/mosaic_day.py::PB_CUTOFF,group_tiles_by_ra,build_common_wcs,coadd_tiles.dsa110_continuum/mosaic/builder.py::build_mosaic,compute_optimal_wcs,tests/test_mosaic_ra_wrap.py.PYTHONPATH=/data/dsa110-continuum /opt/miniforge/envs/casa6/bin/python -m pytest ....