From a7990382cd185c447155aa8b58bf65803d05aaab Mon Sep 17 00:00:00 2001 From: Jacob Jencson Date: Wed, 25 Nov 2026 11:05:17 -0800 Subject: [PATCH 1/3] decisions, psf, difference, photometry, foundation: flight's PSF fits use the oversampled ePSF stamp New ruling decision-flight-psf-fit-oversampled: [psf] fit_model is "oversampled" in flight.toml and "native" in the base. Under it SFFT's two PSF-fit catalogs, the fit at each xsource and the packet's forced photometry model each source with commissioning's epsf_os3 stamp, imported beside the science PSF as _oversampled.fits, through photutils' ImagePSF at its oversampling. Every other reader of the science PSF keeps the phase-averaged stamp. Refused with crossconv_flag true; a missing companion rejects the job (exit 65). psf.md gains the setting's row, foundation.md the import's optional "oversampled" path, difference.md and photometry.md where it applies (forced photometry normalises the stamp to the square of its oversampling, as ImagePSF expects). Co-Authored-By: Claude Opus 5.5 --- system/decisions.md | 3 +++ system/difference.md | 14 ++++++++++++++ system/foundation.md | 10 +++++++++- system/photometry.md | 4 ++++ system/psf.md | 1 + 5 files changed, 31 insertions(+), 1 deletion(-) diff --git a/system/decisions.md b/system/decisions.md index 0e155b9..e8cc7b4 100644 --- a/system/decisions.md +++ b/system/decisions.md @@ -90,6 +90,9 @@ A ruling that closes one goes under Rulings and its line leaves. (decision-flight-crossconv-off)= **The flight overlay, `flight.toml`, sets `[difference.sfft] crossconv_flag` false** (a divergence from {ref}`the base block ` for flight data only): the commissioning pipeline's `[SFFT]` value (its commit a7778505's settings), which is `dev`'s socsims setting (025e42b3, Russ Laher, 2026-05-29) carried onto commissioning, not a flight measurement. SFFT runs without `--crossconv --refpsf`, so its difference PSF is the science PSF and the published differencer does not use the reference PSF; the block's other keys stay the base's, `sfft_use_segmentation` included, since the base sets it explicitly. The base stays true, so no simulation changes; GBTDS and RimTimSim carry false on their own overlays already. Not measured on the rebuild. (Azalee, 2026-11-10) +(decision-flight-psf-fit-oversampled)= +**Flight's PSF fits use commissioning's oversampled ePSF stamp, not the phase-averaged science PSF**: `[psf] fit_model` is `"oversampled"` in `flight.toml` and `"native"` in the base, so no simulation changes. Under it SFFT's two PSF-fit catalogs, the fit at each xsource and the packet's forced photometry model each source with the library's `epsf_os3__scaNN.fits` (oversampling 3, the stamp the phase-averaged science PSF is made from), imported beside the science PSF as `_oversampled.fits`, through photutils' `ImagePSF` at that oversampling, so the fit follows the source's sub-pixel phase. The phase-averaged stamp is the oversampled one averaged over the phases of a field's stars, which a single source does not have: on program 1062's frames with 1043's 09-28 library, the phase-averaged fit reads 2% to 4.5% high on bright injected sources and the oversampled fit 0.99 to 1.01. The injections were drawn from the oversampled stamp, which favours it; the stars, out of the library's sample, are the independent measure: reduced chi-square 1.0 to 1.4 to S/N 100 against 1.5 to 3.7, and 2.4 to 3.2 at S/N 100 to 300 against 18 to 19 (H158, R062). Every other reader of the science PSF keeps the phase-averaged stamp: SFFT itself and the difference PSF it publishes, the reference PSF under `reference_psf = "science"`, and ZOGY where it runs; and SFFT's difference PSF is the science PSF only with cross-convolution off ({ref}`ruling `), so `"oversampled"` is refused with `crossconv_flag` true. A job under `"oversampled"` whose companion is missing is rejected (exit 65), never fitted with the phase-averaged stamp. The fit's chi-square and flags are real/bogus inputs and shift with the model; the classifier was trained on earlier simulations and is retrained after, not before. (Jacob, 2026-11-25) + (decision-nominal-zptmag)= **Flight reference inputs are scaled by the on-orbit nominal zero point of their filter, not their own `ZPTMAG`**: `[reference.awaicgen] use_nominal_zptmag`, commissioning's flag (8a4a172d), is true in `flight.toml` and false in the base, so the simulations are unchanged. Under it each frame's scale factor uses its filter's value in the run's `[intake.nominal_zptmag]`, the one table intake also falls back to, and the flight overlay carries commissioning 687c93b2's on-orbit values (the median over 18 SCAs of the files' own zero points). The frame's header `ZPTMAG` still feeds `zptmag_rms`, and the reference records `ZPSOURCE` `nominal`. Commissioning ships the flag false, and IMSS's req26 runs it true; flight data takes it on because its per-frame calibration still moves with the CRDS context, and a run can turn it off with `--set` ([reference](reference)). (Azalee, 2026-11-05) diff --git a/system/difference.md b/system/difference.md index 82ab7b1..79889fb 100644 --- a/system/difference.md +++ b/system/difference.md @@ -173,6 +173,20 @@ about 4 px, and passing the mask alone does not change that. A star whose own peak pixel is masked is still missed ({ref}`ruling `). +Under `[psf] fit_model = "oversampled"` ([psf](psf)), SFFT's PSF fits, +its two PSF-fit catalogs and the fit at each xsource, model the source +with the oversampled stamp kept beside the science PSF +(`_oversampled.fits`, `OVERSAMP` 3 for commissioning's +library) in place of the science PSF itself, as photutils' `ImagePSF` +with that oversampling, so each source is fitted at its own sub-pixel +phase. A missing companion rejects the job (exit 65), and the setting is +refused with `crossconv_flag` true, where SFFT's difference PSF is no +longer the science PSF. Every other reader of the science PSF keeps the +phase-averaged stamp: SFFT itself and the difference PSF it publishes, the +reference PSF under `reference_psf = "science"`, and ZOGY, whose +catalogs keep its own difference PSF +({ref}`ruling `). + **`dev`'s pixel columns.** On every row of both SFFT PSF-fit catalogs, before the cap and whichever differencer is published, the job measures `dev`'s `sumrat` (`sum(p) / sum(|p|)` over a 5 x 5 stamp after a 3 x 3 diff --git a/system/foundation.md b/system/foundation.md index af0a657..2c4d176 100644 --- a/system/foundation.md +++ b/system/foundation.md @@ -755,7 +755,15 @@ imports under the declared kind, and the manifest says so. A PSF's SCA is its file's `SCA` card, else its `DETECTOR` card (`WFI08` is 8), the only one commissioning's `phavg` science PSFs carry; flight's science PSF is that library, imported one file at a time, until CRDS delivers -flight ePSFs (Ben, 2026-11-14 06:58 UTC). +flight ePSFs (Ben, 2026-11-14 06:58 UTC). A `psf` scope may also name +the same filter and SCA's oversampled stamp (`"oversampled": ""`, +commissioning's `epsf_os3__scaNN.fits`); the stage checks its +`FILTER` and SCA against the science PSF's and that its `OVERSAMP` card +is above 1, and copies it under the same prefix as +`_oversampled.fits`, where the PSF fits find it under +`[psf] fit_model = "oversampled"`. It has no row of its own; the +manifest records its URL, checksum and oversampling +({ref}`ruling `). ### intake diff --git a/system/photometry.md b/system/photometry.md index 478ca43..eeba54b 100644 --- a/system/photometry.md +++ b/system/photometry.md @@ -12,6 +12,10 @@ with `dev`'s algorithm, and publishes the rows as its packet set's `forced.parquet`. The [foundation](foundation) page states the design: a packet job names the window's images and its predecessor packet sets' forced rows as inputs, and measures only what those do not hold. +Each image's fit uses its science PSF, or under `[psf] fit_model = +"oversampled"` the oversampled stamp kept beside it, normalised to sum +to the square of its oversampling as photutils' `ImagePSF` expects +({ref}`ruling `). `dev`'s standalone script, `pipeline/forcedPhotometryForField.py`, takes a field and a CSV of `reqid, ra, dec` sky positions. It has no diff --git a/system/psf.md b/system/psf.md index 559e58d..93f7280 100644 --- a/system/psf.md +++ b/system/psf.md @@ -109,6 +109,7 @@ reference, or a file that names none, is accepted. |---|---|---| | `[psf] crds_server` | `https://roman-crds.stsci.edu` | the CRDS server the reference is fetched from, the public server by default | | `[psf] size` | 61 | the stamp's side in detector pixels, the `NAXIS1` of `dev`'s copied F146 science PSF | +| `[psf] fit_model` | `"native"` | the model the PSF fits use: `"native"`, the science PSF; `"oversampled"`, the oversampled stamp the import keeps beside it, for SFFT's PSF-fit catalogs, the xsources and the packet's forced photometry ([difference](difference), [forced photometry](photometry)); the flight overlay sets `"oversampled"` ({ref}`ruling `) | | `[batch.memory_mib] psf` | 2,048 | the stage's memory ask on Batch | The focus, the spectral type, the position and the block are not From b48eeb29c0c0303a109d78a1ca4e09a74f13888f Mon Sep 17 00:00:00 2001 From: Jacob Jencson Date: Wed, 25 Nov 2026 11:39:15 -0800 Subject: [PATCH 2/3] decisions, psf, foundation: flight stays "native" until its science PSFs are re-imported; the companion records its psf_set flight.toml carries [psf] fit_model = "native" until flight's science PSFs are imported again with their oversampled companions, since a job under "oversampled" without one is rejected; the switch is then that one value. The companion is named as the precomputed set's stamp (psf_set 1043_20260928, the term of rapid PR 653) and the import records its psf_set in the manifest. Co-Authored-By: Claude Opus 5.5 --- system/decisions.md | 2 +- system/foundation.md | 5 +++-- system/psf.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/system/decisions.md b/system/decisions.md index e8cc7b4..2cf8045 100644 --- a/system/decisions.md +++ b/system/decisions.md @@ -91,7 +91,7 @@ A ruling that closes one goes under Rulings and its line leaves. **The flight overlay, `flight.toml`, sets `[difference.sfft] crossconv_flag` false** (a divergence from {ref}`the base block ` for flight data only): the commissioning pipeline's `[SFFT]` value (its commit a7778505's settings), which is `dev`'s socsims setting (025e42b3, Russ Laher, 2026-05-29) carried onto commissioning, not a flight measurement. SFFT runs without `--crossconv --refpsf`, so its difference PSF is the science PSF and the published differencer does not use the reference PSF; the block's other keys stay the base's, `sfft_use_segmentation` included, since the base sets it explicitly. The base stays true, so no simulation changes; GBTDS and RimTimSim carry false on their own overlays already. Not measured on the rebuild. (Azalee, 2026-11-10) (decision-flight-psf-fit-oversampled)= -**Flight's PSF fits use commissioning's oversampled ePSF stamp, not the phase-averaged science PSF**: `[psf] fit_model` is `"oversampled"` in `flight.toml` and `"native"` in the base, so no simulation changes. Under it SFFT's two PSF-fit catalogs, the fit at each xsource and the packet's forced photometry model each source with the library's `epsf_os3__scaNN.fits` (oversampling 3, the stamp the phase-averaged science PSF is made from), imported beside the science PSF as `_oversampled.fits`, through photutils' `ImagePSF` at that oversampling, so the fit follows the source's sub-pixel phase. The phase-averaged stamp is the oversampled one averaged over the phases of a field's stars, which a single source does not have: on program 1062's frames with 1043's 09-28 library, the phase-averaged fit reads 2% to 4.5% high on bright injected sources and the oversampled fit 0.99 to 1.01. The injections were drawn from the oversampled stamp, which favours it; the stars, out of the library's sample, are the independent measure: reduced chi-square 1.0 to 1.4 to S/N 100 against 1.5 to 3.7, and 2.4 to 3.2 at S/N 100 to 300 against 18 to 19 (H158, R062). Every other reader of the science PSF keeps the phase-averaged stamp: SFFT itself and the difference PSF it publishes, the reference PSF under `reference_psf = "science"`, and ZOGY where it runs; and SFFT's difference PSF is the science PSF only with cross-convolution off ({ref}`ruling `), so `"oversampled"` is refused with `crossconv_flag` true. A job under `"oversampled"` whose companion is missing is rejected (exit 65), never fitted with the phase-averaged stamp. The fit's chi-square and flags are real/bogus inputs and shift with the model; the classifier was trained on earlier simulations and is retrained after, not before. (Jacob, 2026-11-25) +**Flight's PSF fits use commissioning's oversampled ePSF stamp, not the phase-averaged science PSF**: `[psf] fit_model = "oversampled"` is flight's setting, and the base keeps `"native"`, so no simulation changes. `flight.toml` carries `"native"` until flight's science PSFs are imported again with their companions, since a job under `"oversampled"` without one is rejected; the switch is then that one value. Under it SFFT's two PSF-fit catalogs, the fit at each xsource and the packet's forced photometry model each source with the precomputed set's `epsf_os3__scaNN.fits` (`psf_set` `1043_20260928`, oversampling 3, the stamp the phase-averaged science PSF is made from), imported beside the science PSF as `_oversampled.fits`, through photutils' `ImagePSF` at that oversampling, so the fit follows the source's sub-pixel phase. The phase-averaged stamp is the oversampled one averaged over the phases of a field's stars, which a single source does not have: on program 1062's frames with 1043's 09-28 library, the phase-averaged fit reads 2% to 4.5% high on bright injected sources and the oversampled fit 0.99 to 1.01. The injections were drawn from the oversampled stamp, which favours it; the stars, out of the library's sample, are the independent measure: reduced chi-square 1.0 to 1.4 to S/N 100 against 1.5 to 3.7, and 2.4 to 3.2 at S/N 100 to 300 against 18 to 19 (H158, R062). Every other reader of the science PSF keeps the phase-averaged stamp: SFFT itself and the difference PSF it publishes, the reference PSF under `reference_psf = "science"`, and ZOGY where it runs; and SFFT's difference PSF is the science PSF only with cross-convolution off ({ref}`ruling `), so `"oversampled"` is refused with `crossconv_flag` true. A job under `"oversampled"` whose companion is missing is rejected (exit 65), never fitted with the phase-averaged stamp. The fit's chi-square and flags are real/bogus inputs and shift with the model; the classifier was trained on earlier simulations and is retrained after, not before. (Jacob, 2026-11-25) (decision-nominal-zptmag)= **Flight reference inputs are scaled by the on-orbit nominal zero point of their filter, not their own `ZPTMAG`**: `[reference.awaicgen] use_nominal_zptmag`, commissioning's flag (8a4a172d), is true in `flight.toml` and false in the base, so the simulations are unchanged. Under it each frame's scale factor uses its filter's value in the run's `[intake.nominal_zptmag]`, the one table intake also falls back to, and the flight overlay carries commissioning 687c93b2's on-orbit values (the median over 18 SCAs of the files' own zero points). The frame's header `ZPTMAG` still feeds `zptmag_rms`, and the reference records `ZPSOURCE` `nominal`. Commissioning ships the flag false, and IMSS's req26 runs it true; flight data takes it on because its per-frame calibration still moves with the CRDS context, and a run can turn it off with `--set` ([reference](reference)). (Azalee, 2026-11-05) diff --git a/system/foundation.md b/system/foundation.md index 2c4d176..31ba1d9 100644 --- a/system/foundation.md +++ b/system/foundation.md @@ -757,12 +757,13 @@ only one commissioning's `phavg` science PSFs carry; flight's science PSF is that library, imported one file at a time, until CRDS delivers flight ePSFs (Ben, 2026-11-14 06:58 UTC). A `psf` scope may also name the same filter and SCA's oversampled stamp (`"oversampled": ""`, -commissioning's `epsf_os3__scaNN.fits`); the stage checks its +commissioning's `epsf_os3__scaNN.fits`, with the precomputed set +it comes from as `"psf_set"`); the stage checks its `FILTER` and SCA against the science PSF's and that its `OVERSAMP` card is above 1, and copies it under the same prefix as `_oversampled.fits`, where the PSF fits find it under `[psf] fit_model = "oversampled"`. It has no row of its own; the -manifest records its URL, checksum and oversampling +manifest records its URL, checksum, oversampling and `psf_set` ({ref}`ruling `). ### intake diff --git a/system/psf.md b/system/psf.md index 93f7280..4eca42c 100644 --- a/system/psf.md +++ b/system/psf.md @@ -109,7 +109,7 @@ reference, or a file that names none, is accepted. |---|---|---| | `[psf] crds_server` | `https://roman-crds.stsci.edu` | the CRDS server the reference is fetched from, the public server by default | | `[psf] size` | 61 | the stamp's side in detector pixels, the `NAXIS1` of `dev`'s copied F146 science PSF | -| `[psf] fit_model` | `"native"` | the model the PSF fits use: `"native"`, the science PSF; `"oversampled"`, the oversampled stamp the import keeps beside it, for SFFT's PSF-fit catalogs, the xsources and the packet's forced photometry ([difference](difference), [forced photometry](photometry)); the flight overlay sets `"oversampled"` ({ref}`ruling `) | +| `[psf] fit_model` | `"native"` | the model the PSF fits use: `"native"`, the science PSF; `"oversampled"`, the oversampled stamp the import keeps beside it, for SFFT's PSF-fit catalogs, the xsources and the packet's forced photometry ([difference](difference), [forced photometry](photometry)); flight's value, which `flight.toml` takes once its science PSFs are imported again with their companions ({ref}`ruling `) | | `[batch.memory_mib] psf` | 2,048 | the stage's memory ask on Batch | The focus, the spectral type, the position and the block are not From e1ad488f260752357674193d9980bd4d38c7740b Mon Sep 17 00:00:00 2001 From: Jacob Jencson Date: Wed, 25 Nov 2026 11:56:38 -0800 Subject: [PATCH 3/3] decisions: flight.toml keeps the base's "native" (an overlay holds only keys that differ) Co-Authored-By: Claude Opus 5.5 --- system/decisions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/decisions.md b/system/decisions.md index 2cf8045..de11260 100644 --- a/system/decisions.md +++ b/system/decisions.md @@ -91,7 +91,7 @@ A ruling that closes one goes under Rulings and its line leaves. **The flight overlay, `flight.toml`, sets `[difference.sfft] crossconv_flag` false** (a divergence from {ref}`the base block ` for flight data only): the commissioning pipeline's `[SFFT]` value (its commit a7778505's settings), which is `dev`'s socsims setting (025e42b3, Russ Laher, 2026-05-29) carried onto commissioning, not a flight measurement. SFFT runs without `--crossconv --refpsf`, so its difference PSF is the science PSF and the published differencer does not use the reference PSF; the block's other keys stay the base's, `sfft_use_segmentation` included, since the base sets it explicitly. The base stays true, so no simulation changes; GBTDS and RimTimSim carry false on their own overlays already. Not measured on the rebuild. (Azalee, 2026-11-10) (decision-flight-psf-fit-oversampled)= -**Flight's PSF fits use commissioning's oversampled ePSF stamp, not the phase-averaged science PSF**: `[psf] fit_model = "oversampled"` is flight's setting, and the base keeps `"native"`, so no simulation changes. `flight.toml` carries `"native"` until flight's science PSFs are imported again with their companions, since a job under `"oversampled"` without one is rejected; the switch is then that one value. Under it SFFT's two PSF-fit catalogs, the fit at each xsource and the packet's forced photometry model each source with the precomputed set's `epsf_os3__scaNN.fits` (`psf_set` `1043_20260928`, oversampling 3, the stamp the phase-averaged science PSF is made from), imported beside the science PSF as `_oversampled.fits`, through photutils' `ImagePSF` at that oversampling, so the fit follows the source's sub-pixel phase. The phase-averaged stamp is the oversampled one averaged over the phases of a field's stars, which a single source does not have: on program 1062's frames with 1043's 09-28 library, the phase-averaged fit reads 2% to 4.5% high on bright injected sources and the oversampled fit 0.99 to 1.01. The injections were drawn from the oversampled stamp, which favours it; the stars, out of the library's sample, are the independent measure: reduced chi-square 1.0 to 1.4 to S/N 100 against 1.5 to 3.7, and 2.4 to 3.2 at S/N 100 to 300 against 18 to 19 (H158, R062). Every other reader of the science PSF keeps the phase-averaged stamp: SFFT itself and the difference PSF it publishes, the reference PSF under `reference_psf = "science"`, and ZOGY where it runs; and SFFT's difference PSF is the science PSF only with cross-convolution off ({ref}`ruling `), so `"oversampled"` is refused with `crossconv_flag` true. A job under `"oversampled"` whose companion is missing is rejected (exit 65), never fitted with the phase-averaged stamp. The fit's chi-square and flags are real/bogus inputs and shift with the model; the classifier was trained on earlier simulations and is retrained after, not before. (Jacob, 2026-11-25) +**Flight's PSF fits use commissioning's oversampled ePSF stamp, not the phase-averaged science PSF**: `[psf] fit_model = "oversampled"` is flight's setting, and the base keeps `"native"`, so no simulation changes. `flight.toml` keeps the base's `"native"` until flight's science PSFs are imported again with their companions, since a job under `"oversampled"` without one is rejected; the switch is then that one value in the overlay. Under it SFFT's two PSF-fit catalogs, the fit at each xsource and the packet's forced photometry model each source with the precomputed set's `epsf_os3__scaNN.fits` (`psf_set` `1043_20260928`, oversampling 3, the stamp the phase-averaged science PSF is made from), imported beside the science PSF as `_oversampled.fits`, through photutils' `ImagePSF` at that oversampling, so the fit follows the source's sub-pixel phase. The phase-averaged stamp is the oversampled one averaged over the phases of a field's stars, which a single source does not have: on program 1062's frames with 1043's 09-28 library, the phase-averaged fit reads 2% to 4.5% high on bright injected sources and the oversampled fit 0.99 to 1.01. The injections were drawn from the oversampled stamp, which favours it; the stars, out of the library's sample, are the independent measure: reduced chi-square 1.0 to 1.4 to S/N 100 against 1.5 to 3.7, and 2.4 to 3.2 at S/N 100 to 300 against 18 to 19 (H158, R062). Every other reader of the science PSF keeps the phase-averaged stamp: SFFT itself and the difference PSF it publishes, the reference PSF under `reference_psf = "science"`, and ZOGY where it runs; and SFFT's difference PSF is the science PSF only with cross-convolution off ({ref}`ruling `), so `"oversampled"` is refused with `crossconv_flag` true. A job under `"oversampled"` whose companion is missing is rejected (exit 65), never fitted with the phase-averaged stamp. The fit's chi-square and flags are real/bogus inputs and shift with the model; the classifier was trained on earlier simulations and is retrained after, not before. (Jacob, 2026-11-25) (decision-nominal-zptmag)= **Flight reference inputs are scaled by the on-orbit nominal zero point of their filter, not their own `ZPTMAG`**: `[reference.awaicgen] use_nominal_zptmag`, commissioning's flag (8a4a172d), is true in `flight.toml` and false in the base, so the simulations are unchanged. Under it each frame's scale factor uses its filter's value in the run's `[intake.nominal_zptmag]`, the one table intake also falls back to, and the flight overlay carries commissioning 687c93b2's on-orbit values (the median over 18 SCAs of the files' own zero points). The frame's header `ZPTMAG` still feeds `zptmag_rms`, and the reference records `ZPSOURCE` `nominal`. Commissioning ships the flag false, and IMSS's req26 runs it true; flight data takes it on because its per-frame calibration still moves with the CRDS context, and a run can turn it off with `--set` ([reference](reference)). (Azalee, 2026-11-05)