diff --git a/system/datasets.md b/system/datasets.md index 0c5f325..67cadc4 100644 --- a/system/datasets.md +++ b/system/datasets.md @@ -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 `) | | 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 `) | | 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 `); 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 `) | | 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 `) | diff --git a/system/decisions.md b/system/decisions.md index 849cbb2..4fc4973 100644 --- a/system/decisions.md +++ b/system/decisions.md @@ -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 `). +- **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 `). - **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 @@ -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 `, {ref}`crossconv `), 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 `). `"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--` 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 ` ("there is no fallback"). (Azalee, 2026-11-13) diff --git a/system/foundation.md b/system/foundation.md index f22ea34..c748355 100644 --- a/system/foundation.md +++ b/system/foundation.md @@ -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 `). 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 @@ -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. @@ -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 `), 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--`; 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 `) | 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/--.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 | @@ -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 diff --git a/system/loop.md b/system/loop.md index f2dd3ba..7dbc031 100644 --- a/system/loop.md +++ b/system/loop.md @@ -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--`, each naming + the binding it replaces, so its measured PSF binds with it + ({ref}`ruling `). 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 @@ -402,7 +414,15 @@ the host or `job submit --job ` 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 `). 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 diff --git a/system/reference.md b/system/reference.md index d547dce..5a112b8 100644 --- a/system/reference.md +++ b/system/reference.md @@ -3,8 +3,9 @@ **Status: current** `reference` coadds the L2 images its job names into one reference image -for a field, filter and SCA, catalogs the mosaic with SExtractor, and -declares three tables for the publisher. It runs `dev`'s reference +for a field, filter and SCA, catalogs the mosaic with SExtractor and, +when the run turns it on, with Photutils, and declares its tables for the +publisher. It runs `dev`'s reference pipeline (`ppid` 12, `pipeline/referenceImageSubs.py`) in `dev`'s order under the foundation's `run(job)` contract: `rapidpipe/stages/reference.py` and `rapidpipe/science/reference/` on the pipeline repository's @@ -15,12 +16,18 @@ stage is. ## Scope and inputs The scope is `{"field", "fid", "sca"}`: the Roman tessellation tile, -the filter id and the first SCA among the frames. Every input is an -`input` row of product `l2files` whose key has the scope's filter, of -any SCA, each row read by its own key's SCA; any other product or -filter fails the job. The launcher chooses the frames and records them; the -stage reads exactly those rows and their files through -`prefix.get`, and never selects frames itself. +the filter id and the first SCA among the frames. The frames are `input` +rows of product `l2files` whose key has the scope's filter, of any SCA, +each row read by its own key's SCA. With `[reference.psfcat] enabled` the +job also names the `psfs` rows of its filter and scope SCA that +`[difference] reference_psf` calls for: the science row under +`"measured"` and `"science"`, the run's set's reference row under +`"precomputed"`, and both under `"measured"` with a `reference_psf_set` +named, the set's row being the measurement's fallback. Any other product, +filter or SCA, or a PSF the settings do not call for, fails the job. The +launcher chooses the frames and the rows and records them; the stage reads +exactly those rows and their files through `prefix.get`, and never +selects frames itself. Frames are coadded in order of `mjdobs`. Fewer than `min_frames` fails the job; frames past `max_frames` are left out and named in the @@ -65,15 +72,41 @@ Each step is a module of `rapidpipe.science.reference`: ({ref}`ruling `), and gives the catalog's FWHM statistics: the mode over point sources and the `fwhm_percentile` percentile of the same sample. -5. **The grade**: `dev`'s reference InfoBits and status (`dev` cb53d2c7, +5. **The reference PSF and the PSF-fit catalog**, with + `[reference.psfcat] enabled` only. The PSF follows `[difference] + reference_psf`, so the catalog uses the same kind of reference PSF as + differencing ({ref}`ruling `). + `"precomputed"` takes the set's row, its MD5 checked against the row, + its stamp an odd square with a positive sum; a per-filter set is + computed for any orientation, so it fits awaicgen's north-up mosaic. + `"science"` takes the science row. `"measured"` measures the PSF on the + mosaic's covered pixels with the difference stage's measurement, the + science row giving the stamp's size, the floor of a star's width and + the wings; any measurement error falls back to the set's row when the + run names one, and otherwise leaves no PSF and so no catalog. The + science PSF is in the detector frame and the mosaic north up, and it is + not rotated: under `"measured"` its width floor does not depend on the + roll, but its wings do, and under `"science"` the whole stamp does. A + set file that fails its checks, or a fallback that does, fails the job + with exit 65. The catalog is `dev`'s Photutils PSF-fit catalog, the + difference stage's catalog code run on the mosaic with its uncertainty + map under `[reference.psfcat]`: a text catalog, its finder catalog, the + joined Parquet and the fit's residual. With the PSF the stage also + computes the two limiting magnitudes at `maglim_snr` on the mosaic's + zero point, one from the median `flux_err` of the catalog's sources and + one from the mosaic's clipped background noise and the PSF's noise + pixels. +6. **The grade**: `dev`'s reference InfoBits and status (`dev` cb53d2c7, fdc7fa79), the bits defined in `cdf/infobitsref.txt` and their thresholds in `[reference.infobits]`. A bit is set when its condition holds; a metric that could not be computed sets none. Status is 0 - when a fatal bit (2, 5, 7, 8, 16) is set, else 1. The bits of the - Photutils catalog and the PSF (5, 6, 7, 16) are never set, because - this build makes neither: a catalog not attempted is not one that - failed. -6. **The header stamp** on the mosaic and its uncertainty map: `dev`'s + when a fatal bit (2, 5, 7, 8, 16) is set, else 1. With the catalog + attempted, its bits are live: 5 and 6 the two limiting magnitudes, 7 + its source count, which is 0 when it was not made, and 16 a catalog not + made, because there was no PSF or no source survived its finder. With + `[reference.psfcat] enabled` false the four bits are never set: a + catalog not attempted is not one that failed. +7. **The header stamp** on the mosaic and its uncertainty map: `dev`'s `BUNIT`, `FIELD`, `FILTER`, `COV5PERC`, `NFRAMES`, `JDSTART`, `JDEND`, `MAGZP`, `TOTEXPTM`, `INFOBITS` (its comment listing the set bits), `STATUS`, the `BIT`*nn* definitions in use and one @@ -104,25 +137,40 @@ job fails when awaicgen or SExtractor leaves no output, or when the catalog has no source with a usable FWHM, where `dev` checks no exit code. -A status-0 reference is published and differenced against. `dev`'s -science pipeline differences against the reference it has just built, -whatever its status, and never reuses a status-0 reference -(`get_best_reference_image` selects `status > 0`); the loop builds a -field's reference once, so here the status is a recorded verdict, not a -gate. +A status 0 reference is published with its grade but not made +official: its rows load, the stage refuses its own binding, and the job +fails with its fatal bits as the reason. No difference is made against +it, as `dev` and commissioning never use a status 0 reference +(`get_best_reference_image` selects `status > 0`). A person may still +accept it with `official change`, without a rerun +({ref}`ruling `). Whether a later run +builds it again is open; today a new run plans it again from the frames +it has then ({ref}`decision-open-questions`). ## Declared outputs The files go under `ref/` in the attempt's prefix: the mosaic, its coverage and uncertainty maps under awaicgen's names, and the -SExtractor catalog. The manifest declares four tables: +SExtractor catalog. With the PSF-fit catalog on, they also hold the PSF +the catalog used, `refimage_psf.fits`, and the catalog's +`refimage_psfcat.txt`, `refimage_psfcat_finder.txt`, +`refimage_psfcat.parquet` and `refimage_psfcat_residual.fits`. The +manifest declares these tables: | Table | Rows | |---|---| | `refimages` | one, keyed (dataset, field, fid); `nframes`, `cov5percent`, the grade's `status` and `infobits`, and the stamped mosaic's MD5 | | `refimimages` | one per coadded L2 row, (`rfid`, `rid`) | -| `refimcatalogs` | one, the mosaic catalog, `cattype` 1, which `packet` reads for reference-star matches | -| `refimmeta` | one, keyed by `rfid`: `dev`'s quality measurements under `dev`'s names, `hp6` and `hp9` of the reference's centre, `mjdobsmin` and `mjdobsmax` of the coadded frames, the mosaic's statistics, the catalog's FWHM and source count; `npucatsources` null, since no Photutils catalog of the reference is made ({ref}`ruling `) | +| `refimcatalogs` | the mosaic catalog, `cattype` 1, which `packet` reads for reference-star matches; and the PSF-fit catalog, `cattype` 2, when it was made | +| `refimmeta` | one, keyed by `rfid`: `dev`'s quality measurements under `dev`'s names, `hp6` and `hp9` of the reference's centre, `mjdobsmin` and `mjdobsmax` of the coadded frames, the mosaic's statistics, the catalog's FWHM and source count; `npucatsources` the PSF-fit catalog's source count, 0 when it could not be made and null with the catalog off ({ref}`ruling `) | +| `psfs` | under `"measured"`, when the measurement succeeded: 18 `reference` rows, one per SCA, sharing `refimage_psf.fits` and its MD5, with `psf_set` `refimage--` in Roman's filter spelling ({ref}`ruling `) | + +The `psfs` rows bind with the reference in one change group. The loop +expects their 18 keys of every `"measured"` reference, so a measurement +that fell back to the set writes none and the manifest's `unbound` +leaves those keys out of the binding. A status 0 reference's manifest +carries `refused` with its fatal bits, and its whole binding, `psfs` keys +included, is refused. The stage draws `rfid` from the `refimages` identity sequence while it reads its inputs, so the child rows carry it before publication. An @@ -131,7 +179,11 @@ value, and no `refimmeta` row. The manifest also records `dev`'s `refimmeta` mea JD range, the total exposure time, the zero point and `zptmag_source` (`header` or `nominal`, as `ZPSOURCE`), and under coverage selection `coverage`: the selected and skipped `rid`s, the estimate, its -decision and the measured fraction. +decision and the measured fraction. With the catalog on it also records +the catalog's source count, `npsfcatsources`, its `psfcat_flag`, and the +reference PSF's record `refpsf`: the mode, the set and row it read, and +under `"measured"` the stars it was built from, whether it fell back and +the measurement's error. ## Settings @@ -146,7 +198,7 @@ holds one subtable per `dev` ini section, with `dev`'s values: | `[reference.awaicgen]` | every awaicgen option `dev`'s launcher passes, the output names, and `zprefimg_` per filter with the scalar `zprefimg` 17.0 as fallback; `use_nominal_zptmag` false, commissioning's flag (8a4a172d): true scales each input by its filter's `[intake.nominal_zptmag]` value instead of its own `ZPTMAG` ([datasets](datasets): true in `flight.toml`); a run body stored before the flag has none and scales by `ZPTMAG` | | `[reference.sextractor_refimage]` | `dev`'s `SEXTRACTOR_REFIMAGE` section verbatim; its `sextractor_mag_zeropoint` 0.0 is replaced in the job's copy by `MAGZP` at run time ({ref}`ruling `) | | `[reference.paths]` | the repository and tool configuration paths of the pipeline image, the tools on `PATH`, and `work_subdirectory` `ref` | -| `[reference.psfcat]` | `enabled` false: `dev`'s Photutils reference catalog needs a reference PSF input and is not produced; true is refused | +| `[reference.psfcat]` | `enabled` false in the base, so the simulations' references are unchanged; true makes the PSF-fit catalog with the PSF `[difference] reference_psf` chooses. The finder's values are `dev`'s `PSFCAT_REFIMAGE`, `min_separation` 1.5 as the difference stage's; the flight overlay turns it on with `sharphi` 1.8 ({ref}`ruling `) | | `[reference.fake_sources]` | `inject_fake_sources_flag` false; fake-source injection is not ported, and true is refused | | `[reference.infobits]` | `dev`'s `REFIMAGE_INFOBITS` thresholds `t00` to `t10` (provisional, "loose enough that a normal reference image raises no bit"), `fwhm_percentile` 90, `maglim_snr` 5, `fatalinfobits` 2, 5, 7, 8, 16 | | `[reference.statistics]` | `clip_correction_seed` 0, pinned as the difference stage's so the same frames give the same catalog; a negative value reproduces `dev`'s unseeded draw for the clipped-statistics correction | @@ -192,8 +244,10 @@ all-source median under `fwhmmedpix`, status 1 and infobits 0. - When a reference is rebuilt. The loop never rebuilds a published one, and a reference job that failed, a coadd short of its coverage among them, holds its field's key until a person reruns it. -- The Photutils reference catalog, and where its PSF would come from. - `dev`'s reference pipeline makes one from a per-filter reference PSF - file; without it the grade's bits 5, 6, 7 and 16 stay unset. +- Whether a status 0 reference is built again, and when + ({ref}`decision-open-questions`). +- A reference PSF for a mosaic at a fixed position angle (a GBTDS + reference with a per-SCA set at that angle): the `psfs` rows per set, + filter and SCA allow it, but no overlay or set builds one. - The imported reference has no `refimimages` rows, since the source system's rows do not name its members. diff --git a/system/tool.md b/system/tool.md index 5303ed2..28ddd14 100644 --- a/system/tool.md +++ b/system/tool.md @@ -57,7 +57,7 @@ the [stage contract](stage-contract) page lists what `job run` returns. | Code | Meaning | |---|---| | 0 | Success; also a job published under a run that is not live, the refusal on its row and on standard error | -| 1 | A refused change group or a job published with its binding refused; `job wait` when a job failed; `loop`, `--once` included, when a job of the run failed or was published with its binding refused | +| 1 | A refused change group or a job published with its binding refused; `job wait` when a job failed; `loop`, `--once` included, when a job of the run failed or was published with its binding refused (a status 0 reference among them) | | 2 | `job wait`'s `--timeout` passed first | | 64 | Usage: every argparse parse failure (help exits 0), a missing run, job or group (the foundation's `NotFound`, no other lookup error), an unreadable file, `RAPIDPIPE_OUTPUTS_ROOT` unset, a database configuration error, and `loop` when its first pass finds no stem of the selection under the source root | | 65 | A declared input rejected by the stage reading it: difference, reference or import (`CommandExit: ` on the row) |