Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ summary and README.md has the detail.
| `c/` | `bkgest`'s source (`c/src/bkgest`) and the two RAPID C libraries it links (`c/common/nan`, `c/common/numericalrecipes`), built into the base image's `rapid-cmodules` RPM from a pinned commit; the pipeline image does not copy `c/`. |
| `containers/` | The pipeline image recipe (`rapid-pipeline/build.sh`, `Containerfile`). |
| `tests/` | `unit/`, `db/` (with `db/proof/`, the procedure proof's synthetic steps in CI; the by-hand `thin_proof.py` retired with the associate stage, 2026-10-24), `cli/` and `fixtures/<stage>/`. |
| `scripts/` | `check-public-safety.sh`, `science-drift.sh` and its watch list, `read_packets.py` (the packet reader: a packet set's validation report, outside the pipeline), `consume_packets.py` (a run's packet sets read back at their recorded offsets, counted, and one set per field compared byte for byte with the outbox), `copy_epsf.py` (CRDS ePSF references copied by name under the prefix a run's `[psf] epsf_cache` names, once), `import_psf_set.py` (a reference PSF set's directory imported as one `import` job, keys from the file names, bound keys skipped unless `--force`), `copy_pixel_area_maps.py` (CRDS's pixel area map of each detector copied by name under the prefix a run's `[pixel_area_map] store` names, with the `index.json` intake reads when CRDS does not answer; once, and again after a CRDS delivery), `schema_diagram.py` (`database/schema.sql` drawn as `database/schema.dot` and, with Graphviz, `schema.svg`; rerun on a schema change), `stream_l2_files.py` (a program's guided WFI L2 files copied from MAST to `<source_root><stem>_cal.asdf`, before any run; `--source-root` is validated by `rapidpipe.products.storage.split_source_root`, as the loop's), `check_run.sh` (a run's three checks, `validate_run.py`, `read_packets.py` over its bound sets and `consume_packets.py`, and one verdict line), `compute_wfi_zeropoints.py` (each SCA's AB zero point, C and K per filter, outside the pipeline, from the Roman Technical Information Repository's per-SCA effective-area tables and the gain and area references CRDS recommends for a date, the gain divided by `--ipc-factor` (1.10, the factor CRDS photom implies); K is printed beside photom's `photmjsr`; it first checks its data folder against GitHub and CRDS and asks before continuing past anything missing or out of date, `--yes` to continue unasked). |
| `scripts/` | `check-public-safety.sh`, `science-drift.sh` and its watch list, `read_packets.py` (the packet reader: a packet set's validation report, outside the pipeline), `consume_packets.py` (a run's packet sets read back at their recorded offsets, counted, and one set per field compared byte for byte with the outbox), `copy_epsf.py` (CRDS ePSF references copied by name under the prefix a run's `[psf] epsf_cache` names, once), `import_psf_set.py` (a reference PSF set's directory imported as one `import` job, keys from the file names, bound keys skipped unless `--force`), `copy_pixel_area_maps.py` (CRDS's pixel area map of each detector copied by name under the prefix a run's `[pixel_area_map] store` names, with the `index.json` intake reads when CRDS does not answer; once, and again after a CRDS delivery), `schema_diagram.py` (`database/schema.sql` drawn as `database/schema.dot` and, with Graphviz, `schema.svg`; rerun on a schema change), `stream_l2_files.py` (a program's guided WFI L2 files copied from MAST to `<source_root><stem>_cal.asdf`, before any run; `--source-root` is validated by `rapidpipe.products.storage.split_source_root`, as the loop's), `check_run.sh` (a run's three checks, `validate_run.py`, `read_packets.py` over its bound sets and `consume_packets.py`, and one verdict line), `compute_wfi_zeropoints.py` (each SCA's AB zero point, C and K per filter, outside the pipeline, from the Roman Technical Information Repository's per-SCA effective-area tables and the gain and area references CRDS recommends for a date, the gain divided by `--ipc-factor` (1.10, the factor CRDS photom implies); K is printed beside photom's `photmjsr`; it first checks its data folder against GitHub and CRDS and asks before continuing past anything missing or out of date, `--yes` to continue unasked), `reference_coverage.py` (a run's reference jobs, or a dataset's or a program's official references, as a table, each reference's coverage map beside its full possible depth from the `l2files` corners, and per filter the L2 depth before the bound on the sky with the references outlined; outside the pipeline), `difference_coverage.py` (its companion: per filter, the sky under a difference image filled, each failed difference job's frame outlined in red and the references outlined). |
| `docs/` | `foundation-smdc-step.md`, the SMDC runbook. The readthedocs site is built from `rapid_docs`; `dev`'s Sphinx source stays on `dev`. |

`dev`'s `pipeline/`, `alerts/`, `aws/`, `soc/`, `sims/`, `docker/`,
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ The database is built by `psql -v ON_ERROR_STOP=1 -f database/schema.sql` on an

`python scripts/read_packets.py [--job N ...] [--out FILE]` reads published packet sets back (the Avro, `packets_official`, `forced_official`) and writes a validation report, exiting non-zero on any failure; a packet job sends its own official set to the Kafka topic its run's `[kafka]` table names as its last act, one message per packet keyed by the dataset with the set and sid in its `rapid-set` and `rapid-sid` headers, stamping `jobs.kafka_published_at` and the partition and first and last offsets after every acknowledgement; `rapidpipe publish --run N [--settings FILE]` sends the run's official sets not yet stamped (the re-publication verb and the recovery sweep, run beside a loop, which does not send), and `python scripts/consume_packets.py --run N` reads each set's recorded range back, counts its packets and compares the bytes of one set per field with the outbox; `scripts/check_run.sh --run N [--settings F]` runs a run's three checks (`validate_run.py`, `read_packets.py` over its bound packet sets eight processes at a time, `consume_packets.py`) and prints one line, `Check run N: CLEAN|FAIL validate ... reader ... consumer ...` with each one's count and seconds, exiting non-zero on any failure; `rapidpipe loop --run N [--filters F146] [--scas 8] [--pointings VVV_EEEE,...] [--passes P,...] [--exposures PREFIX,...] [--programs P,...] [--stems STEM,...] [--mjd LO-HI | --dates LO..HI] (--job-definition D [--job-queue Q] | --local | --dry-run) [--stage NAME] [--once] [--max-intake N] [--interval S]` (every selection term `all` when left out, `--dates` and `--mjd` included; each term's `--help` says whether it bounds the files taken in, the official L2 rows, or both, and a first pass that admits no file is refused naming the term that admits none) lists the run's `[intake] source_root`, submits every ready job of the selection one stage forward on Batch (intake, reference, difference, which associates its own sources and xsources with the objects and xobjects of their fields as they stand, then a packet per official source set, in any order) and ends each pass with `publish`, printing one summary line per pass and repeating every `--interval` seconds (120 by default) until a pass finds the selection drained (exit 0) or a job of the run has failed or was published with its binding refused (exit 1); a pass whose `publish` cannot send reports the error as `send_error` and the sets left as `sets_unsent` and the loop goes on building, exiting 1 if its last pass still has a set unsent that the quality gate does not hold; `loop --local` runs each planned job here instead, as `job local` runs one, with no Batch and no job definition, passes repeating at once; `loop --dry-run` prints one pass's plan as JSON and does nothing; `--stage NAME` keeps one stage's jobs and implies `--once` ([the loop page](https://roman-rapid.readthedocs.io/en/latest/system/loop.html)); `database/queries.sql` holds the read queries the official views answer.

`python scripts/reference_coverage.py (--run R | --dataset D [--program P]) --out DIR [--filter NAME ...] [--before-mjd MJD] [--no-maps] [--json]` reports which references a run, a dataset or a program has and how they cover the sky its L2 files do, outside the pipeline: `DIR/references.md` (one row per reference, its outcome, the frames it coadded beside those it could have, and the fields with rows to difference and no reference), `DIR/ref-run-<run>-<field>-<filter>-j<job>.png` (the run being the reference job's own; the reference's coverage map beside its full possible depth, replayed from the `l2files` corners with no stop at `max_frames`) and `DIR/overview-<scope>-<filter>.png` (its scope `run-<id>`, `dataset-<name>` or `dataset-<name>-program-<id>`; the depth of the L2 footprints before the bound, each reference outlined by its outcome). The bound is `--before-mjd`, else the run's `[reference.selection] before_mjd`; `--no-maps` reads no coverage map and `--max-maps N` those of the first N references only (by field, filter and job); `--filter` takes a filter's RAPID or Roman name (`R062` or `F062`).

`python scripts/difference_coverage.py (--run R | --dataset D [--program P]) --out DIR [--filter NAME ...] [--json]` maps where a run, a dataset or a program has difference images, outside the pipeline: `DIR/differences-<scope>-<filter>.png` fills the sky under any difference image (a run's jobs', or a dataset's official ones), outlines in red the L2 frame of each failed difference job whose frame has no difference image in the scope, and outlines each reference's mosaic, solid when bound and dashed when not. `--json` prints each filter's counts: the images, the failed jobs outlined, those whose frame another job differenced (`recovered`) and those that name no `l2files` input and cannot be drawn (`unplaced`).

`python scripts/stream_l2_files.py PROGRAM --source-root s3://<bucket>/<prefix>/` copies a program's guided WFI L2 files from MAST to `<prefix><stem>_cal.asdf`, outside the pipeline and before any run (`--filter`, `--detector`, `--pass`, `--segment`, `--visit`, `--mjdmin` and `--mjdmax` cut the search, `--unguided` keeps unguided exposures, `--dryrun` copies nothing, `--workers N` copies N at a time; each file is one conditional PUT, so nothing under the root is overwritten); it reads the MAST token from `MAST_API_TOKEN`. The loop reads the same prefix as the run's `intake.source_root`, so one shell variable connects them:

```sh
Expand Down
Loading
Loading