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
1 change: 1 addition & 0 deletions system/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ above and their manifest, which the bucket will not let anyone update.
| The file names no pixel area map: `meta.ref_file.area` is `INCOMPLETE` on every file checked to 2026-11-20, though CRDS serves an on-orbit one per detector (WFI16's `roman_wfi_area_0085`, pedigree INFLIGHT, useafter 2026-10-13, spanning 0.982 to 1.015) | the overlay: `[pixel_area_map] lookup = true`, so intake asks CRDS for the map's name by detector and exposure start and records it as the `l2files` row's `pixel_area_map`; `store` names the maps' copies ([intake](intake.md#the-pixel-area-maps-name), {ref}`decisions <decision-pixel-area-map>`) |
| The per-frame zero point moves with the calibration context: commissioning's files under an older CRDS context run up to 0.29 mag off the rest | the overlay: `[reference.awaicgen] use_nominal_zptmag = true` scales each reference input by its filter's on-orbit `[intake.nominal_zptmag]` value, commissioning 687c93b2's table (the median over the 18 SCAs of the files' own zero points, 7,283 of 8,453 commissioning files; F062 26.04, F087 25.73, F106 25.78, F129 25.77, F146 27.01, F158 25.80, F184 25.34, F213 25.29); `ZPTMAG` and `zptmag_rms` stay the file's ({ref}`decisions <decision-nominal-zptmag>`) |
| A reference PSF measured from ten stars is not reliable, worst in crowded fields | the overlay: `[difference] reference_psf = "precomputed"` with the 1043 per-filter set, `reference_psf_set = "1043_20260928"`, computed for any orientation ({ref}`ruling <decision-reference-psf-precomputed>`); until the set is imported and official, a loop pass that would plan a difference stops and names the missing row |
| Three of the five fatal reference grades (InfoBits 5, 7 and 16) need the PSF-fit catalog, so without it a poor reference cannot be marked bad | the overlay: `[reference.psfcat] enabled = true`, the catalog made with the 1043 set's row, and `sharphi = "1.8"`, set from the OpenUniverse distribution of sharpness values, where 1.0 cut a significant fraction of it; a reference graded status 0 is published but not made official ({ref}`ruling <decision-reference-psfcat-sharphi>`) |
| At Gaia DR3's epoch 2016.0 the intake's Gaia offset reads (−0.08 to +0.16, −0.56 to −0.35) px, proper motion and not WCS | the overlay: `[intake] gaia_proper_motion = true` carries each star to the frame's mid-exposure; the offset reads dx −0.091 to −0.045, dy −0.060 to −0.038 px; no WCS key |
| The program number is real, and one flight dataset holds every program | the overlay: `program_id = ""`, so each file's own `PROGRAM` (1049 here), which must be positive, is its `exposures` row's `program_id` ([intake](intake), Settings) |
| The dithers, 0.04 deg apart, put the four centres in three tessellation fields | the loop builds e4's field reference from e1 to e3, every row before the bound whose `overlapfields` list the field, as `dev` ({ref}`decisions <decision-reference-by-field>`) |
Expand Down
16 changes: 16 additions & 0 deletions system/decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ A ruling that closes one goes under Rulings and its line leaves.
default only on false positives per epoch, 102.7 against 101.7
(rapid PRs 485, 486; Ben accepted that row, its reference differing,
{ref}`the SFFT default <decision-sfft-default>`).
- **A status 0 reference's retry**: whether a reference graded status 0
is built again. Today a new run plans it again from the frames it has
then, so with the same frames each run rebuilds the same bad reference
and fails again. The alternatives are never to try again until a person
acts (`official change` to accept it, or a reference from other
inputs), or to try again only when its frames change
({ref}`a status 0 reference <decision-reference-status-0>`).
- **SMDC's resources the rebuild may not need**: whether the alerts bucket,
MSK, the bulk lane, unused parameter leaves and authority records are
kept or removed. Open until the rebuild's publication and bulk
Expand Down Expand Up @@ -75,6 +82,15 @@ A ruling that closes one goes under Rulings and its line leaves.
(decision-flight-reference-psf)=
**The flight overlay sets `[difference] reference_psf = "science"`; `"measured"` stays the base's default and an option**: with ZOGY and SFFT's cross-convolution off on flight ({ref}`the scope <decision-cutover-scope>`, {ref}`crossconv <decision-flight-crossconv-off>`), nothing published reads the reference PSF, and under `"measured"` a field with fewer than ten measurable reference stars would fail its difference with exit 65 ({ref}`ruling <decision-reference-psf-measured>`). `"science"` measures nothing and takes the quality metrics' stars from the reference mosaic's catalog, as the GBTDS overlays do. Flight's science PSF is commissioning's `phavg` library until CRDS delivers flight ePSFs, so flight runs on those PSFs wherever a PSF is used. The precomputed reference PSF (port 7A) lands after the cutover, with the reference catalogue (7B), as its storage. To check on the first flight run: the packet gate's bounds were set from measured-star metrics on HLWAS. (Ben, 2026-11-14 07:00 UTC; rapid 497691b7)

(decision-reference-psf-stored)=
**The reference job's PSF follows `[difference] reference_psf`, and under `"measured"` it is measured on the job's own mosaic and stored**: with `[reference.psfcat] enabled` the reference job's PSF-fit catalog uses the same kind of reference PSF as differencing. Under `"precomputed"` it reads the run's set's row and under `"science"` the science row of its filter and scope SCA, and neither writes a `psfs` row. Under `"measured"` it measures the PSF with the difference stage's measurement on its own mosaic, after the mosaic and its SExtractor catalog and before the PSF-fit catalog, with the stamp size, width floor and wings of the official science row of its filter and scope SCA, the CRDS-derived PSF the `psf` stage stored, which the loop binds and the job reads. With no such row official the loop plans a `psf` job for the pair from one of the reference's files and holds the reference until the row is official. Any measurement error falls back to the run's set's row when `reference_psf_set` names one, which the loop then binds too; with none there is no catalog, InfoBit 16 is set and the reference is graded status 0. A measured PSF is stored as the reference PSF of its own set, `refimage-<field>-<filter>` with the filter in Roman's spelling (`refimage-12345-F158`), one `reference` row for each of the 18 SCAs sharing its one file and checksum, so it never collides with an imported set or another field's reference; the rows bind in the reference's own change group, so a status 0 reference's rows stay unbound with it and a rebuilt reference's rows replace them. A measurement that fell back stores none. The difference stage is unchanged: it measures its own reference PSF on each epoch's resampled reference and does not read these rows. (Azalee, 2026-11-13)

(decision-reference-status-0)=
**A status 0 reference is published but not official, and its job fails**, for every dataset: a reference whose grade sets a fatal InfoBit (2, 5, 7, 8 or 16) loads its `refimages`, `refimimages`, `refimcatalogs` and `refimmeta` rows and its files, and the stage refuses its own binding, its fatal bits the job's refusal. The job is `published` with the refusal, so the loop lists it under `failed`, holds its field and filter in the run, makes no difference against it and exits 1, the path every refused binding takes. Published, not left unpublished: the grade stays queryable in `refimages`, a person can still accept the reference with `official change` without a rerun, and it matches commissioning's status 0 `RefImages` rows, which its science launcher never uses. A status 0 reference is a verdict on a reference that was built, so it is a failure, not a hold. This reverses the reference page's "a recorded verdict, not a gate". Whether it is built again is open ({ref}`decision-open-questions`). (Azalee, 2026-11-10)

(decision-reference-psfcat-sharphi)=
**The flight overlay makes the reference's PSF-fit catalog, with `sharphi` 1.8**: it sets `[reference.psfcat] enabled = true`, so its references get the catalog and InfoBits 5, 6, 7 and 16, and `[reference.psfcat] sharphi = "1.8"`, set from the OpenUniverse distribution of DAOStarFinder sharpness values, where 1.0 cut a significant fraction of it. The base keeps `enabled` false and `sharphi` 1.0 for the simulations, as `dev`. (Azalee, 2026-11-10; the sharphi provenance corrected 2026-11-11)

(decision-reference-psf-fallback)=
**`"measured"` falls back to the run's reference PSF set on any measurement error, and a PSF's kind comes from the import call only**: with `[difference] reference_psf_set` named, a difference job whose reference PSF measurement raises anything (fewer than ten stars, or any other failure of the measurement) uses the set's bound row exactly as `"precomputed"` does, instead of failing; with no set named there is no fallback and the job fails as before, so the simulations, which name none, are unchanged. The fallback's own checks still apply, and a fallback that fails them fails the job with both errors in its log and reason. The loop binds the set's row to every such difference job, since the job learns only when it runs whether it needs it. Ten stars are too few for a reliable PSF, and a PSF built on the fly may not be reliable, worst in crowded fields. A `psfs` row's kind is the one the import's scope declares: the same file may serve more than one kind, so a `PSFKIND` header keyword is recorded in the manifest as it was and never checked, for both kinds, which retires the import's refusal of a file whose keyword named the other kind. This amends {ref}`the measured reference PSF <decision-reference-psf-measured>` ("there is no fallback"). (Azalee, 2026-11-13)

Expand Down
23 changes: 17 additions & 6 deletions system/foundation.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,20 @@ and returns. The publisher then, serialised on the job's row:
2. verifies every declared file against its checksum;
3. loads the attempt's declared rows, and writes the job's state,
published attempt and manifest;
4. inside a savepoint, attempts the automatic binding: if the job's run
4. inside a savepoint, attempts the automatic binding: if the stage did
not refuse it, the job's run
is live for its survey and dataset, and for each output key the open
binding is the one the job's `expects` row named, and each expected
product's table loaded at least one row (or the manifest's `empty_ok`
names it: a difference's `sources`, a packet set with no triggers), it
closes those and opens the job's; otherwise it rolls back to the
savepoint and records the refusal on the job;
savepoint and records the refusal on the job. A stage may refuse its
own binding with the manifest's `refused`, a reason: a reference graded
status 0 does, its fatal bits the reason
({ref}`ruling <decision-reference-status-0>`). A stage may also leave
out the expected keys of a table it did not produce this attempt with
the manifest's `unbound`, and the rest bind: a reference whose
measured PSF fell back to a set writes no `psfs` rows;
5. commits, all of the above in one short transaction, and runs
nothing after it. Autovacuum keeps the tables' statistics: an
`ANALYZE` holds its table's self-conflicting lock to the end of its
Expand All @@ -368,7 +375,9 @@ and returns. The publisher then, serialised on the job's row:
statistics (publish-analyze).

A refused job's rows stay published as an unbound candidate, visibly,
and a later change group can bind them. A retry finds its job published
and a later change group can bind them. The job counts as failed: the
loop lists it under `failed` and does not submit its key again in the
run. A retry finds its job published
and stops; a retry after a failed attempt writes a new attempt, so a
published prefix is never rewritten.

Expand Down Expand Up @@ -733,7 +742,7 @@ image. Each simplification keeps the shape of the full stage.
| `intake` | one L2 file under the run's source root, by the dataset's reader (SOC L2 or OpenUniverse ASDF, RimTimSim lite FITS); the science PSF of its filter and SCA | the gzipped 16-HDU FITS converted as `dev` converts it; `l2files`, and `exposures` when the job expects that key, with limiting magnitude, overlapping fields and sky indices computed | nothing for want of a PSF: every filter's is derived by `psf` |
| `import` | stored products for one field: L2 files, difference images with SFFT's PSF-fit and SExtractor catalogs, PSFs, the reference and its mosaic catalog, the Gaia mirror's prefix; the cap on sources per image | copies of the image files (the mirror is named, not copied); `exposures`, `l2files`, `diffimages`, `psfs`, `refimages`, `refimcatalogs`, `catalogs`, `sources` (from both PSF-fit catalogs, the brightest N of each sign by flux over its error, every source at the shipped -1) and `xsources` (from both SExtractor catalogs, as `dev`'s loader reads them; {ref}`ruling <decision-import-both-signs>`), with limiting magnitude, overlapping fields and sky indices computed; the source system's ids kept; provenance marked unknown | other fields and epochs; recovering provenance |
| `psf` | one L2 file's metadata and the CRDS ePSF reference it names (the dataset's overlay names it for RimTimSim; OpenUniverse's is drawn with galsim.roman) | the science PSF; one `psfs` row | a PSF per position on the detector |
| `reference` | the field's `l2files` rows for one filter and SCA, before the run's reference bound when it has one | the awaicgen mosaic with its coverage and uncertainty maps and SExtractor catalog; `refimages`, `refimimages` (one row per coadded L2 row) and `refimcatalogs` | the Photutils catalog, so the grade's bits from it and the PSF |
| `reference` | the field's `l2files` rows for one filter and SCA, before the run's reference bound when it has one; with `[reference.psfcat] enabled`, the `psfs` rows `[difference] reference_psf` calls for at its filter and scope SCA | the awaicgen mosaic with its coverage and uncertainty maps and SExtractor catalog; `refimages`, `refimimages` (one row per coadded L2 row) and `refimcatalogs`; with the catalog on, the Photutils PSF-fit catalog (`cattype` 2) and, under `"measured"`, the measured PSF's 18 `psfs` rows of set `refimage-<field>-<filter>`; a status 0 reference refuses its own binding | the Photutils catalog in the base settings, so there the grade's bits from it and the PSF |
| `difference` | one epoch's `l2files` row, a `refimages` row with its mosaic catalog, the science `psfs` row and, when the run names a reference PSF set, that set's reference `psfs` row; the dataset's objects and xobjects of every run in the fields its sources fall in and their neighbours, read at execution and recorded | SFFT's gzipped positive difference image, the only one registered, its uncertainty, the mask, both differencers' uncapped catalogs (ZOGY's unless `run_zogy` is false; SFFT's with `dev`'s sumrat, nneg and nbad) and the files `packet` reads beside the image, naive run only for its outcome bits; `diffimages` and the `sources` set, mapped exactly as the import maps `dev`'s, through the run's `[difference.sources_database_prefilter]`; `xsources`, `dev`'s from both SExtractor catalogs, uncapped; `objects` founded here and this epoch's `memberships`; `xobjects` founded here and this epoch's `xmemberships`, from its `xsources`; the RuBR-AT score of both signs' PSF-fit catalogs and the xsources ({ref}`ruling <decision-reliability-scored>`) | nothing |
| `packet` | the epoch's source set, the science PSF, the dataset's Gaia mirror, the reference and its mosaic catalog; read at execution and recorded: the triggers' xobjects and official xmembers (objects and members under `[packet] alert_catalog = "sources"`), their exposures, the window's difference and science images, the official `forced` rows and the mirror's leaves and row groups under the chip's cone | `packets/<expid>-<sca>-<fid>.avro` at schema 00.07, the `packets.parquet` index, `forced.parquet`, `external.parquet`; as its last act, the set on the Kafka topic | NED, NED-LVS and solar-system matches |
| reader, outside the pipeline | a packet set's Avro and its official index and forced rows | a validation report | nothing |
Expand Down Expand Up @@ -815,8 +824,10 @@ reference PSF set, which a run may name, is always imported.
### reference and difference

The [reference](reference) page states `reference`: its scope (field,
filter and SCA), the `l2files` rows it coadds in `dev`'s order, the
three tables it declares with the `rfid` it draws, and its settings.
filter and SCA), the `l2files` rows it coadds in `dev`'s order, the PSF
its Photutils catalog uses when the run turns the catalog on, the tables
it declares with the `rfid` it draws, its grade, a status 0 reference
published but not made official, and its settings.
The [difference](difference) page states `difference`: its scope (one
epoch's key), its inputs (the L2 row, a reference, the science PSF and,
when the run names a reference PSF set, that set's reference PSF), SFFT's positive difference image and source set with the
Expand Down
22 changes: 21 additions & 1 deletion system/loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,18 @@ Its order:
fraction of pixels at `min_coverage_depth` falls below
`min_coverage_fraction` less `coverage_estimate_tolerance` gets no job
and is held ([The reference bound](#the-reference-bound)).
With `[reference.psfcat] enabled` the job also names the PSF rows its
catalog needs at its filter and scope SCA, as `[difference]
reference_psf` says: the science row under `"measured"` and
`"science"`, the run's set's row under `"precomputed"` and under
`"measured"` with a set named. A missing set row stops the pass and
names it, as for a difference. A missing science row gets one psf job
for the pair, named by one of the reference's files unless a psf job of
the run already serves it, and the reference waits under `held` until
the row is official. Under `"measured"` the job also expects the 18
`psfs` keys of its own set, `refimage-<field>-<filter>`, each naming
the binding it replaces, so its measured PSF binds with it
({ref}`ruling <decision-reference-psf-stored>`).
With a reference bound set, the rules change as described under
[The reference bound](#the-reference-bound).
4. **difference**: one job per official L2 row whose field has an
Expand Down Expand Up @@ -402,7 +414,15 @@ the host or `job submit --job <id>` on Batch, and the loop then carries
on from it. `job submit --job` marks a failed row `launched` as it
records the new Batch id, so a loop restarted at once counts it
pending. A failed job holds only the work that depends on it: the loop
keeps passing until the rest of the selection drains around it. A
keeps passing until the rest of the selection drains around it. A job
published with its binding refused counts as failed the same way. A
reference graded status 0 is one: its rows are published, its binding
refused with its fatal bits as the reason, so it is listed under
`failed`, holds its field and filter for the run, gets no difference,
and makes the verb exit 1 once the rest drains
({ref}`ruling <decision-reference-status-0>`). A new run plans it again
from the frames it has then; whether it should is open
({ref}`decision-open-questions`). A
job whose Batch request itself raises (throttled, a queue that does not
exist) is marked `failed` with that error in its `refusal`, never left
`launched` with nothing on Batch, and the error ends the verb (75 when
Expand Down
Loading