From 6e640cf67614ec4adf74549d1ce4a1b0b3645fec Mon Sep 17 00:00:00 2001 From: Emily Everetts Date: Fri, 20 Nov 2026 12:49:19 -0800 Subject: [PATCH 1/3] intake: the pixel area map's name, l2files.pixel_area_map and PAMREF, found from the file, CRDS or the store's index Flight L2 files name no pixel area map (meta.ref_file.area is INCOMPLETE), and pixel area varies by 2.5% (WFI01) to 3.3% (WFI16) across a detector. Intake records each file's map by its CRDS name so the alerts stage can correct fluxes in nJy; the maps are kept once each in a store, copied by scripts/copy_pixel_area_maps.py. - intake.md: the lookup as step 3, the section "The pixel area map's name", the l2files output and the [pixel_area_map] settings table. - datasets.md: flight's overlay turns the lookup on. - decisions.md: decision-pixel-area-map (Emily Everetts, 2026-11-20; the correction asked for by Jacob Jencson). - migration.md: l2files gains pixel_area_map. Implemented by rapid branch add-PAM-to-intake. Co-Authored-By: Claude Fable 5.2 --- system/datasets.md | 1 + system/decisions.md | 3 ++ system/intake.md | 74 ++++++++++++++++++++++++++++++++++++++++----- system/migration.md | 2 +- 4 files changed, 71 insertions(+), 9 deletions(-) diff --git a/system/datasets.md b/system/datasets.md index 0e215f0..8dc1be9 100644 --- a/system/datasets.md +++ b/system/datasets.md @@ -246,6 +246,7 @@ above and their manifest, which the bucket will not let anyone update. | WFI12 has a guide-window ghost the L2 DQ does not flag: a box of near-zero signal, about half its pixels JUMP_DET, at fixed columns 2647 to 2667 (2646 in part) in the guide window's rows moved up one row, wherever the window sits. In all 96 WFI12 cal files of programs 1043 (2026-09-20 to 10-03) and 1049 (2026-10-24), windows at x 968 to 3671 and y 196 to 3781, the box reads 0.02 of the background (at most 0.22) with 37% to 64% of its pixels JUMP_DET; the strips one pixel outside it are clean but column 2646 (half the files) and 2645 (2 files, mildly). No other SCA of program 1049's 288 files of 2026-10-24 shows one. The window is read out on every SCA, guiding or not: 1049's 76 files of SCAs without a guide star (`PGS00001`) show the same dark, JUMP_DET box at their reported, default window as its 212 guiding files at theirs, and 1043's 8 unguided WFI12 files carry the ghost at their window, so a WFI12 without a guide star is masked too | the overlay: `gw_ghost = [{sca = 12, columns = [2645, 2668], rows = [0, 2]}]`, the box padded one pixel each way, 432 pixels per WFI12 file set NaN ([intake](intake), Settings; {ref}`decisions `) | | The file names its ePSF, `roman_wfi_epsf_0239` (CRDS `roman_0077`), on all four files: stpsf 2.0.0's pre-flight simulation, pedigree SIMULATION, no jitter | the psf stage reduces it by name, as for the SOC files; the ePSF per file is met | | `meta.photometry` is present | the zero point is the file's, ZPTMAG 25.801 | +| 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 `) | | 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) | diff --git a/system/decisions.md b/system/decisions.md index 9c5a00b..8a86c2c 100644 --- a/system/decisions.md +++ b/system/decisions.md @@ -45,6 +45,9 @@ A ruling that closes one goes under Rulings and its line leaves. (decision-gw-ghost)= **The flight overlay masks WFI12's guide-window ghost at intake, `[intake] gw_ghost = [{sca = 12, columns = [2645, 2668], rows = [0, 2]}]`, and the base masks none** (not in `dev`): WFI12 shows a known ghost of its guide window, a box of near-zero signal at fixed columns in the window's rows moved up one row, which the L2 DQ does not flag (GW_AFFECTED_DATA covers the window's own columns only). Unmasked, its pixels enter every reference built from a WFI12 frame; it was found while tracing program 1049 alerts to their reference inputs. The box is set NaN as the DQ mask's pixels are, and no DQ bit is written: the SOC is expected to flag the ghost in a later calibration, and the overlay's box is dropped then. The measurement over 96 WFI12 files is on [datasets](datasets.md#flight-data). (Jacob Jencson, 2026-11-16) +(decision-pixel-area-map)= +**Intake records each flight file's pixel area map by its CRDS name, `l2files.pixel_area_map`, and the maps are kept once each in a store** (not in `dev`): a flux calibrated with the file's zero point alone assumes the detector's nominal pixel area, and the true area varies by 2.5% across WFI01 and 3.3% across WFI16, so fluxes in nJy are multiplied by STScI's pixel area map at the source's position, as STScI's aperture photometry tutorial does; the same holds for PSF-fit fluxes. The map itself is used, not a fit to it, so a later delivery that changes its shape is followed. Flight L2 files name no map (`meta.ref_file.area` is `INCOMPLETE`), so intake asks CRDS for the best `area` reference of the file's detector and exposure start, then the store's index, and records no name, with a warning, when neither answers: an intake never fails for this, and a file with no name is calibrated by its zero point alone, at most about 1.7% off. No area is derived from the WCS. CRDS serves one map per detector for every filter, 67 MB each, so the maps are copied once to `[pixel_area_map] store` by `scripts/copy_pixel_area_maps.py` and not written per file. The base's `lookup = false` asks nothing, so the simulations are unchanged. If CRDS fills the keyword, intake reads it first and the query can be retired. The lookup is on [intake](intake.md#the-pixel-area-maps-name). (Emily Everetts, 2026-11-20; the correction asked for by Jacob Jencson) + (decision-cutover-scope)= **The flight and HLWAS overlays publish SFFT's difference, its xsources and their packets, and nothing else**: each sets `[difference] skip_loading_sources_records = true`, `[difference.zogy] run_zogy = false` and `[difference.naive_diffimage] naive_diffimage_flag = false`, and the base keeps `dev`'s false, true and true. That is what commissioning publishes. No `sources` rows are loaded (the PSF-fit catalogs stay as files) and nothing is associated into `objects`, while the xsources still found their xobjects and the packets come from them ({ref}`ruling `); ZOGY's and the naive subtraction's products are diagnostics nothing published reads ({ref}`ruling `). The two are the cutover's datasets; flipping the base would be fewer lines and would change GBTDS, OpenUniverse and RimTimSim, which are outside the cutover. (The rebuild-migration plan's decision, Ben's go 2026-11-14 06:55 UTC; rapid e39b11bf) diff --git a/system/intake.md b/system/intake.md index 1872aaf..c47fbef 100644 --- a/system/intake.md +++ b/system/intake.md @@ -42,37 +42,85 @@ the calibrated file carries the same gWCS, fit results and metadata. exposure, SCA and filter, and check them against the file's own observation metadata and detector. A contradiction fails the job before any manifest. -3. Convert with `dev`'s `build_fits_file`: a 16-HDU FITS whose primary - header holds every scalar of the ASDF metadata as a `HIERARCH` card; +3. Under `[pixel_area_map] lookup`, find the name of the file's pixel + area map ([below](#the-pixel-area-maps-name)). +4. Convert with `dev`'s `build_fits_file`: a 16-HDU FITS whose primary + header holds every scalar of the ASDF metadata as a `HIERARCH` card, + and the pixel area map's name as `PAMREF` when one was found; the science array in DN with a degree-5 SIP distortion fitted to the gWCS, every coefficient to fifth order present; the other arrays scaled by their exposure-time exponent, half-precision arrays widened; and the tables as binary tables. The uncompressed file is made in a temporary directory and only the gzipped one is kept. -4. Gzip at `[intake] gzip_level`. -5. Check that the science PSF was made from this file's own ePSF +5. Gzip at `[intake] gzip_level`. +6. Check that the science PSF was made from this file's own ePSF reference: the basename of the file's `meta.ref_file.epsf` card must be the PSF file's `EPSFREF`, which the [psf](psf) stage writes and `dev`'s copied F146 files also carry. A mismatch fails the job before any manifest, naming both; a PSF or a file that names no reference is accepted. -6. Measure the limiting magnitude with the science PSF, as `import` +7. Measure the limiting magnitude with the science PSF, as `import` does. -7. Derive the image centre, corners, tessellation field, overlapping +8. Derive the image centre, corners, tessellation field, overlapping fields and HEALPix indexes, as `import` does. -8. Write the rows and the manifest. +9. Write the rows and the manifest. The fitted SIP reproduces the gWCS to well under the fit's own 0.1 pixel bound: on a real file, to below 1e-5 arcsec at the corners and the centre. The difference stage reformats the science image itself, so intake does not. +## The pixel area map's name + +The file's zero point assumes every pixel covers the detector's nominal +sky area. The true area varies across a detector, by 2.5% on WFI01 and +3.3% on WFI16 (measured 2026-11-19), and STScI's pixel area map, the +CRDS `area` reference, holds each pixel's area over the nominal one. +CRDS serves one map per detector, the same for every filter. The +[alerts](alerts) stage multiplies each flux by the map's value at the +source's position when it converts the flux to nJy, as STScI's aperture +photometry tutorial does. Not in `dev`. + +Intake does not fetch the map, 67 MB per detector. It records the +map's CRDS name, which CRDS never reuses for new content, so a new +delivery reaches new files under a new name and an older file keeps the +map it was calibrated with. The maps themselves are kept once each, +under their names, in the store `[pixel_area_map] store` names, copied there +by a script before any run, as the ePSF references are. + +Under `[pixel_area_map] lookup = true`, flight's overlay, intake takes the +name from the first of these that gives one: + +1. The file's own `meta.ref_file.area`. Flight L2 files carry + `INCOMPLETE` there (every file checked to 2026-11-20), so today this + gives none. +2. CRDS's best reference of type `area` for the file's detector and + exposure start time, asked of `[pixel_area_map] crds_server` under + `[pixel_area_map] crds_context`, with a short timeout and one retry. +3. The store's `index.json`, which the copying script writes: each + map's detector, useafter date and name. Intake takes its detector's + latest map at or before the exposure start, with a warning. The + index is as fresh as the script's last run. + +When none gives a name, intake records none, with a warning, and the +job succeeds: an unanswered CRDS query never fails an intake. + +The name is the converted file's `PAMREF` keyword and the `l2files` +row's `pixel_area_map`, null when no name was found. The manifest records +which of the three gave it. Under `lookup = false`, the base's value, +intake asks nothing and records none: a simulation's pixels are not the +flight detectors', and a query by date would hand it an on-orbit map. + +If CRDS fills `meta.ref_file.area` in flight L2 files, step 1 gives the +name with no change here, and steps 2 and 3 can be retired. The code +marks each place with `TODO(crds-area-keyword)`. + ## Declared outputs | Output | Key | Notes | |---|---|---| | the gzipped FITS | | under the attempt's prefix; the `l2files` row's `filename` is its URL | -| `l2files` | dataset, expid, sca, fid | the file's footprint, field, overlapping fields, HEALPix indexes, WCS columns and limiting magnitude | +| `l2files` | dataset, expid, sca, fid | the file's footprint, field, overlapping fields, HEALPix indexes, WCS columns, limiting magnitude and `pixel_area_map`, its pixel area map's CRDS name or null ([above](#the-pixel-area-maps-name)) | | `exposures` | dataset, expid | one per exposure: `exptime`, `program_id` (the setting below, or the file's own `PROGRAM` where the setting is `""`) and the converted header's Roman observation identifiers, `dev`'s columns (`execution_plan`, `pass`, `segment`, `observation`, `visit`, `exposure`, `visit_id`, `observation_id`), null for a reader whose files carry none | The manifest records the file's provenance: its observation @@ -132,6 +180,16 @@ The run's `[intake]` table, with `dev`'s hard-coded values as keys: | `rederive_wcs` | false | the file's gWCS; true re-derives it from the file's `wcsinfo` and the distortion reference it names, before the SIP fit | | `gaia_proper_motion` | false | the Gaia offset's stars at the catalog's `ref_epoch`, where the SOC simulations place them; true carries each star by its `pmra` and `pmdec` to the frame's mid-exposure (`MJD-OBS` plus half `EXPTIME`) with the packet stage's propagation, as flight data needs; `dev` has no such metric | +The run's `[pixel_area_map]` table, which the [alerts](alerts) stage +reads too. Not in `dev`: + +| Key | Value | Meaning | +|---|---|---| +| `lookup` | false | intake asks for no pixel area map and records none; true, flight's overlay, finds the map's name ([above](#the-pixel-area-maps-name)) | +| `store` | the run's overlay only | the URL prefix holding each map under its CRDS name, with `index.json`; filled by `scripts/copy_pixel_area_maps.py` before any run | +| `crds_server` | `"https://roman-crds.stsci.edu"` | the server asked for the best reference, the psf stage's | +| `crds_context` | `"roman-operational"` | the CRDS context the best reference is asked under | + Each dataset's values, and the measurement behind each, are on the [datasets](datasets) page. When the job names its dataset's Gaia `catalogs` input, as the loop does once one is official, it reads the diff --git a/system/migration.md b/system/migration.md index 75a5fbc..490cf1d 100644 --- a/system/migration.md +++ b/system/migration.md @@ -135,7 +135,7 @@ files beside it. | `surveys` | `surveys` | the same; rows -1 to -4 for the simulations (SOCSIMS GBTDS, OpenUniverse, RimTimSims, SOCSIMS HLWAS) and the twelve commissioning programs, 1049 among them, carried in `schema.sql` | as `filters` | | `fields` | `fields` | the same | as `filters` | | `exposures` | `exposures`, `exposures_official` | kept: `expid`, `dateobs`, `exptime`, `program_id`, `execution_plan` and the observation-id columns (`pass`, `segment`, `observation`, `visit`, `exposure`, `visit_id`, `observation_id`; null on rows written before 2026-10-26, no backfill); dropped: `field`, `hp6`, `hp9`, `fid`, `mjdobs`, `status`, `infobits`, `created` | the columns kept are the ones the team's queries read ([foundation](foundation.md#why-it-is-this-way)); the `expid` ([intake](intake.md#declared-outputs)) | -| `l2files` | `l2files`, `l2files_official` | dropped: `version`, `vbest`, `ctype1/2`, `cunit1/2`, the SIP orders and coefficients (the SIP stays in the FITS header), `equinox`, `paobsy`, `pafpa`, `skymean`; `l2filemeta`'s centre and corners folded in; `limmag` and `overlapfields` computed before publish; unique on (dataset, expid, sca, fid, job) | as `exposures`; backfilled columns are computed before publish ([foundation](foundation.md#why-it-is-this-way)) | +| `l2files` | `l2files`, `l2files_official` | dropped: `version`, `vbest`, `ctype1/2`, `cunit1/2`, the SIP orders and coefficients (the SIP stays in the FITS header), `equinox`, `paobsy`, `pafpa`, `skymean`; `l2filemeta`'s centre and corners folded in; `limmag` and `overlapfields` computed before publish; added: `pixel_area_map`, the CRDS name of the file's pixel area map, null when none ([intake](intake.md#the-pixel-area-maps-name)); unique on (dataset, expid, sca, fid, job) | as `exposures`; backfilled columns are computed before publish ([foundation](foundation.md#why-it-is-this-way)) | | `l2filemeta` | folded into `l2files` | `ra0` to `dec4`, `hp6`, `hp9`, `fid`, `sca`, `mjdobs` live on `l2files` | no recorded reason | | `refimages` | `refimages`, `refimages_official` | dropped: `ppid`, `version`, `vbest`, `hp6`, `hp9`, `svid`, `avid`, `archivestatus`; added from `refimmeta`: `nframes`, `cov5percent`; `status` and `infobits` carry `dev`'s grade | no `vbest`, no `version`, no `ppid` (`database/schema.sql` header); [reference](reference.md#declared-outputs) | | `refimmeta` | folded into `refimages` and `jobs.manifest` | kept: `nframes`, `cov5percent`; the rest dropped, some as manifest metrics in `job_metrics` | no recorded reason | From 09488ae8d1090005b1ce290b18e98926a80eff75 Mon Sep 17 00:00:00 2001 From: Emily Everetts Date: Fri, 20 Nov 2026 13:42:59 -0800 Subject: [PATCH 2/3] intake: the pixel area map's name is recorded now; the conversion that applies the map follows The intake page and the decision read as if the alerts stage already multiplied fluxes by the map. It does not yet: this change records each file's map name, and the conversion to nJy that reads it is its own change. Co-Authored-By: Claude Fable 5.2 --- system/decisions.md | 2 +- system/intake.md | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/system/decisions.md b/system/decisions.md index 8a86c2c..d15ed45 100644 --- a/system/decisions.md +++ b/system/decisions.md @@ -46,7 +46,7 @@ A ruling that closes one goes under Rulings and its line leaves. **The flight overlay masks WFI12's guide-window ghost at intake, `[intake] gw_ghost = [{sca = 12, columns = [2645, 2668], rows = [0, 2]}]`, and the base masks none** (not in `dev`): WFI12 shows a known ghost of its guide window, a box of near-zero signal at fixed columns in the window's rows moved up one row, which the L2 DQ does not flag (GW_AFFECTED_DATA covers the window's own columns only). Unmasked, its pixels enter every reference built from a WFI12 frame; it was found while tracing program 1049 alerts to their reference inputs. The box is set NaN as the DQ mask's pixels are, and no DQ bit is written: the SOC is expected to flag the ghost in a later calibration, and the overlay's box is dropped then. The measurement over 96 WFI12 files is on [datasets](datasets.md#flight-data). (Jacob Jencson, 2026-11-16) (decision-pixel-area-map)= -**Intake records each flight file's pixel area map by its CRDS name, `l2files.pixel_area_map`, and the maps are kept once each in a store** (not in `dev`): a flux calibrated with the file's zero point alone assumes the detector's nominal pixel area, and the true area varies by 2.5% across WFI01 and 3.3% across WFI16, so fluxes in nJy are multiplied by STScI's pixel area map at the source's position, as STScI's aperture photometry tutorial does; the same holds for PSF-fit fluxes. The map itself is used, not a fit to it, so a later delivery that changes its shape is followed. Flight L2 files name no map (`meta.ref_file.area` is `INCOMPLETE`), so intake asks CRDS for the best `area` reference of the file's detector and exposure start, then the store's index, and records no name, with a warning, when neither answers: an intake never fails for this, and a file with no name is calibrated by its zero point alone, at most about 1.7% off. No area is derived from the WCS. CRDS serves one map per detector for every filter, 67 MB each, so the maps are copied once to `[pixel_area_map] store` by `scripts/copy_pixel_area_maps.py` and not written per file. The base's `lookup = false` asks nothing, so the simulations are unchanged. If CRDS fills the keyword, intake reads it first and the query can be retired. The lookup is on [intake](intake.md#the-pixel-area-maps-name). (Emily Everetts, 2026-11-20; the correction asked for by Jacob Jencson) +**Intake records each flight file's pixel area map by its CRDS name, `l2files.pixel_area_map`, and the maps are kept once each in a store** (not in `dev`): a flux calibrated with the file's zero point alone assumes the detector's nominal pixel area, and the true area varies by 2.5% across WFI01 and 3.3% across WFI16, so fluxes in nJy are multiplied by STScI's pixel area map at the source's position, as STScI's aperture photometry tutorial does; the same holds for PSF-fit fluxes. The map itself is used, not a fit to it, so a later delivery that changes its shape is followed. Flight L2 files name no map (`meta.ref_file.area` is `INCOMPLETE`), so intake asks CRDS for the best `area` reference of the file's detector and exposure start, then the store's index, and records no name, with a warning, when neither answers: an intake never fails for this, and a file with no name is calibrated by its zero point alone, at most about 1.7% off. No area is derived from the WCS. CRDS serves one map per detector for every filter, 67 MB each, so the maps are copied once to `[pixel_area_map] store` by `scripts/copy_pixel_area_maps.py` and not written per file. The base's `lookup = false` asks nothing, so the simulations are unchanged. If CRDS fills the keyword, intake reads it first and the query can be retired. The lookup is on [intake](intake.md#the-pixel-area-maps-name); the recording of the name is in place, and the alerts stage's conversion to nJy, which applies the map, follows in its own change. (Emily Everetts, 2026-11-20; the correction asked for by Jacob Jencson) (decision-cutover-scope)= **The flight and HLWAS overlays publish SFFT's difference, its xsources and their packets, and nothing else**: each sets `[difference] skip_loading_sources_records = true`, `[difference.zogy] run_zogy = false` and `[difference.naive_diffimage] naive_diffimage_flag = false`, and the base keeps `dev`'s false, true and true. That is what commissioning publishes. No `sources` rows are loaded (the PSF-fit catalogs stay as files) and nothing is associated into `objects`, while the xsources still found their xobjects and the packets come from them ({ref}`ruling `); ZOGY's and the naive subtraction's products are diagnostics nothing published reads ({ref}`ruling `). The two are the cutover's datasets; flipping the base would be fewer lines and would change GBTDS, OpenUniverse and RimTimSim, which are outside the cutover. (The rebuild-migration plan's decision, Ben's go 2026-11-14 06:55 UTC; rapid e39b11bf) diff --git a/system/intake.md b/system/intake.md index c47fbef..ecf684f 100644 --- a/system/intake.md +++ b/system/intake.md @@ -77,9 +77,10 @@ sky area. The true area varies across a detector, by 2.5% on WFI01 and 3.3% on WFI16 (measured 2026-11-19), and STScI's pixel area map, the CRDS `area` reference, holds each pixel's area over the nominal one. CRDS serves one map per detector, the same for every filter. The -[alerts](alerts) stage multiplies each flux by the map's value at the -source's position when it converts the flux to nJy, as STScI's aperture -photometry tutorial does. Not in `dev`. +[alerts](alerts) stage is to multiply each flux by the map's value at +the source's position when it converts the flux to nJy, as STScI's +aperture photometry tutorial does; that conversion is not yet written, +and until it is the name is recorded and nothing reads it. Not in `dev`. Intake does not fetch the map, 67 MB per detector. It records the map's CRDS name, which CRDS never reuses for new content, so a new @@ -180,8 +181,8 @@ The run's `[intake]` table, with `dev`'s hard-coded values as keys: | `rederive_wcs` | false | the file's gWCS; true re-derives it from the file's `wcsinfo` and the distortion reference it names, before the SIP fit | | `gaia_proper_motion` | false | the Gaia offset's stars at the catalog's `ref_epoch`, where the SOC simulations place them; true carries each star by its `pmra` and `pmdec` to the frame's mid-exposure (`MJD-OBS` plus half `EXPTIME`) with the packet stage's propagation, as flight data needs; `dev` has no such metric | -The run's `[pixel_area_map]` table, which the [alerts](alerts) stage -reads too. Not in `dev`: +The run's `[pixel_area_map]` table, which the [alerts](alerts) stage is +to read too once it converts fluxes. Not in `dev`: | Key | Value | Meaning | |---|---|---| From 64c8ab06853d207c4837ff9fdaea377171f7ea4d Mon Sep 17 00:00:00 2001 From: Emily Everetts Date: Fri, 20 Nov 2026 13:52:51 -0800 Subject: [PATCH 3/3] intake: the stage that will apply the pixel area map is the packet stage, not the retired alerts page Co-Authored-By: Claude Fable 5.2 --- system/decisions.md | 2 +- system/intake.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/system/decisions.md b/system/decisions.md index d15ed45..9b1a30c 100644 --- a/system/decisions.md +++ b/system/decisions.md @@ -46,7 +46,7 @@ A ruling that closes one goes under Rulings and its line leaves. **The flight overlay masks WFI12's guide-window ghost at intake, `[intake] gw_ghost = [{sca = 12, columns = [2645, 2668], rows = [0, 2]}]`, and the base masks none** (not in `dev`): WFI12 shows a known ghost of its guide window, a box of near-zero signal at fixed columns in the window's rows moved up one row, which the L2 DQ does not flag (GW_AFFECTED_DATA covers the window's own columns only). Unmasked, its pixels enter every reference built from a WFI12 frame; it was found while tracing program 1049 alerts to their reference inputs. The box is set NaN as the DQ mask's pixels are, and no DQ bit is written: the SOC is expected to flag the ghost in a later calibration, and the overlay's box is dropped then. The measurement over 96 WFI12 files is on [datasets](datasets.md#flight-data). (Jacob Jencson, 2026-11-16) (decision-pixel-area-map)= -**Intake records each flight file's pixel area map by its CRDS name, `l2files.pixel_area_map`, and the maps are kept once each in a store** (not in `dev`): a flux calibrated with the file's zero point alone assumes the detector's nominal pixel area, and the true area varies by 2.5% across WFI01 and 3.3% across WFI16, so fluxes in nJy are multiplied by STScI's pixel area map at the source's position, as STScI's aperture photometry tutorial does; the same holds for PSF-fit fluxes. The map itself is used, not a fit to it, so a later delivery that changes its shape is followed. Flight L2 files name no map (`meta.ref_file.area` is `INCOMPLETE`), so intake asks CRDS for the best `area` reference of the file's detector and exposure start, then the store's index, and records no name, with a warning, when neither answers: an intake never fails for this, and a file with no name is calibrated by its zero point alone, at most about 1.7% off. No area is derived from the WCS. CRDS serves one map per detector for every filter, 67 MB each, so the maps are copied once to `[pixel_area_map] store` by `scripts/copy_pixel_area_maps.py` and not written per file. The base's `lookup = false` asks nothing, so the simulations are unchanged. If CRDS fills the keyword, intake reads it first and the query can be retired. The lookup is on [intake](intake.md#the-pixel-area-maps-name); the recording of the name is in place, and the alerts stage's conversion to nJy, which applies the map, follows in its own change. (Emily Everetts, 2026-11-20; the correction asked for by Jacob Jencson) +**Intake records each flight file's pixel area map by its CRDS name, `l2files.pixel_area_map`, and the maps are kept once each in a store** (not in `dev`): a flux calibrated with the file's zero point alone assumes the detector's nominal pixel area, and the true area varies by 2.5% across WFI01 and 3.3% across WFI16, so fluxes in nJy are multiplied by STScI's pixel area map at the source's position, as STScI's aperture photometry tutorial does; the same holds for PSF-fit fluxes. The map itself is used, not a fit to it, so a later delivery that changes its shape is followed. Flight L2 files name no map (`meta.ref_file.area` is `INCOMPLETE`), so intake asks CRDS for the best `area` reference of the file's detector and exposure start, then the store's index, and records no name, with a warning, when neither answers: an intake never fails for this, and a file with no name is calibrated by its zero point alone, at most about 1.7% off. No area is derived from the WCS. CRDS serves one map per detector for every filter, 67 MB each, so the maps are copied once to `[pixel_area_map] store` by `scripts/copy_pixel_area_maps.py` and not written per file. The base's `lookup = false` asks nothing, so the simulations are unchanged. If CRDS fills the keyword, intake reads it first and the query can be retired. The lookup is on [intake](intake.md#the-pixel-area-maps-name); the recording of the name is in place, and the packet stage's conversion to nJy, which applies the map, follows in its own change. (Emily Everetts, 2026-11-20; the correction asked for by Jacob Jencson) (decision-cutover-scope)= **The flight and HLWAS overlays publish SFFT's difference, its xsources and their packets, and nothing else**: each sets `[difference] skip_loading_sources_records = true`, `[difference.zogy] run_zogy = false` and `[difference.naive_diffimage] naive_diffimage_flag = false`, and the base keeps `dev`'s false, true and true. That is what commissioning publishes. No `sources` rows are loaded (the PSF-fit catalogs stay as files) and nothing is associated into `objects`, while the xsources still found their xobjects and the packets come from them ({ref}`ruling `); ZOGY's and the naive subtraction's products are diagnostics nothing published reads ({ref}`ruling `). The two are the cutover's datasets; flipping the base would be fewer lines and would change GBTDS, OpenUniverse and RimTimSim, which are outside the cutover. (The rebuild-migration plan's decision, Ben's go 2026-11-14 06:55 UTC; rapid e39b11bf) diff --git a/system/intake.md b/system/intake.md index ecf684f..016d62f 100644 --- a/system/intake.md +++ b/system/intake.md @@ -77,7 +77,7 @@ sky area. The true area varies across a detector, by 2.5% on WFI01 and 3.3% on WFI16 (measured 2026-11-19), and STScI's pixel area map, the CRDS `area` reference, holds each pixel's area over the nominal one. CRDS serves one map per detector, the same for every filter. The -[alerts](alerts) stage is to multiply each flux by the map's value at +packet stage is to multiply each flux by the map's value at the source's position when it converts the flux to nJy, as STScI's aperture photometry tutorial does; that conversion is not yet written, and until it is the name is recorded and nothing reads it. Not in `dev`. @@ -181,8 +181,8 @@ The run's `[intake]` table, with `dev`'s hard-coded values as keys: | `rederive_wcs` | false | the file's gWCS; true re-derives it from the file's `wcsinfo` and the distortion reference it names, before the SIP fit | | `gaia_proper_motion` | false | the Gaia offset's stars at the catalog's `ref_epoch`, where the SOC simulations place them; true carries each star by its `pmra` and `pmdec` to the frame's mid-exposure (`MJD-OBS` plus half `EXPTIME`) with the packet stage's propagation, as flight data needs; `dev` has no such metric | -The run's `[pixel_area_map]` table, which the [alerts](alerts) stage is -to read too once it converts fluxes. Not in `dev`: +The run's `[pixel_area_map]` table, which the packet stage is to read +too once it converts fluxes. Not in `dev`: | Key | Value | Meaning | |---|---|---|