Software verification & validation report#
Project: Sentinel-2 MSI Synthetic Raw Data Generator (s2_msi_raw_generator) · DRD: ECSS-E-ST-40C Rev.1 (Software verification
report / validation report, SVR). Plan: plan.md. Requirements: ../srs.md.
1. Summary#
s2_msi_raw_generator runs a Sentinel-2B L1B backwards — the exact inverse of the
operational L0→L1B radiometric chain (invert offset, relative-response/PRNU, dark, un-bin, SWIR
re-stage, defective-pixel, crosstalk, on-board equalization) — to reconstruct L1A → L0plus
(CCSDS-122 ISP) → Synthetic L0. MTF-deconvolution is OFF, so PSF and noise are not re-applied. Success is
the Synthetic L0 versus the reference ESA L0 img (10/20 m bands ≤ ~4 DN); the L0plus codec
round-trip decode(L0plus) == L1A is bit-exact as a supporting check.
The automated test suite — 21 files, 201 tests at v0.3.0 —
passes in full (201 passed, 5 skipped), green in GitLab CI. The skips are the S2 L1B/eopf-gated tests, which
pass when S2_GIPP_DIR / S2_L1A_INPUT are supplied (verified on the operational GIPP and a
L1A). All realized requirements in the SRS are verified against the reverse-chain reconstruction.
2. Test inventory#
Test file |
#funcs |
Verifies |
|---|---|---|
|
11 |
Sensor model (13 bands, no PAN; gains; TDI = B03/B04/B11/B12); DN-domain gain/offset inversion exact; radiometric chain (offset, relative-response, dark, on-board-eq) exactly invertible (rtol 1e-9); quantize bounds ( |
|
11 |
|
|
4 |
Calibration sub-set recovery — derived dark within bound of truth, relative-response correlation > 0.9, \(\langle g \rangle = 1\) (±1e-6), \(A \approx\) |
|
3 |
Relative-response/PRNU inversion flattens FPN (equalization → < 0.3× raw) + recovers flat scene (atol 1e-6) |
|
3 |
|
|
5 |
R2EQOG cubic + bilinear parse (dark, gains); R2DEPI/BLINDP/R2PARA (−100/−1000)/R2CRCO (≈0); |
|
8 |
CCSDS primary-header round-trip; APID > 2047 rejected; CUC time coarse/fine; frame ISP header shape/seq/length; timestamps step by |
|
1 |
End-to-end reverse chain: S2 L1B → |
|
6 |
S4 offset; S5 un-bin (shape+mean); S8 SWIR re-arrangement (reverse) invertible; S9 crosstalk (coeff 0 = identity); S10 defects (dead→0/bit0, hot→4095/bit1); |
3. Quantitative results#
Quantity |
Verified bound (test) |
Typical observed |
Source |
|---|---|---|---|
Synthetic L0 vs reference ESA L0 |
≤ ~4 DN |
within bound |
|
Calibration dark recovery |
≤ 0.5 DN |
~0.05 DN |
|
Calibration relative-response correlation |
> 0.9 |
> 0.99 |
|
Calibration absolute coefficient |
±5 % of |
≈ |
|
FPN flattening by relative-response inversion |
corrected < 0.3× raw |
~0 (flat recovered) |
|
The relative-response inversion (FPN-flattening) effect was also confirmed visually on the
Synthetic L1A (B03 cloud imagery) via the pipeline’s figures phase, and the Synthetic L0
was compared against the reference ESA L0 img (10/20 m bands agreeing to ≤ ~4 DN).
4. Requirements verification status#
All realized SRS requirements are verified PASS by the cited method:
REQ-FUNC-001/003/005/010–013/015–020/022/030–034/044/045/046/047 — T (see the inventory and
../sdd/traceability.md). REQ-FUNC-015 (relative-response/PRNU) and REQ-FUNC-019 (dark) are verified as the reverse chain’s inversion of those steps, not a forward impress; REQ-FUNC-010 as DN-domain gain/offset inversion. REQ-FUNC-014 (PSF re-blur) and REQ-FUNC-021 (add noise) are cancelled (MTF-deconvolution OFF ⇒ PSF/noise not re-applied) and are not in this verification cycle.REQ-PERF-004 — T/A, calibration recovery within bounds (§3). REQ-PERF-005 — A, Synthetic L0 agrees with the reference ESA L0
imgwithin ≤ ~4 DN on the 10/20 m bands (§3). REQ-PERF-001/002/003 are cancelled (forward noise σ / SNR@Lref / L1A round-trip RMSE) and out of this cycle.REQ-IF-001/002/003 — I/T (L1A/L1B + GIPP inputs, L0 ICD output).
REQ-QUAL-001…004 — I/R/T (minimal deps; 201-test CI at v0.3.0; originality review; crc32 determinism).
REQ-FUNC-091/092 — T/I: PSFD naming round-trip, and CCSDS-122 bit-exact compression + ISP packet grammar. The reverse chain’s L0plus codec round-trip is verified bit-exact (
decode(L0plus) == L1A), and the reverse-chain L0plus lossless compression ratio is ~3.66×.Deferred / cancelled requirements (REQ-FUNC-043/053/062, REQ-FUNC-090) are out of this verification cycle.
5. Anomalies & observations#
Doc/test bound discrepancy (closed): the ATBD prose quotes calibration dark recovery
< 0.05 DNand correlation> 0.99; the committed unit tests assert the looser, robust bounds≤ 0.5 DNand> 0.9. The looser figures are the verified acceptance bounds; the tighter figures are the typical observed values. No action required.DN-scaled input: the S2B L1B (and the publicly available EOPF test L1A) is DN-scaled, not a physically-calibrated radiance product. Fidelity is therefore judged by the Synthetic L0 versus the reference ESA L0
img(10/20 m bands ≤ ~4 DN), together with the operational GIPP-derived cal-DB and the calibration-recovery results; the DN scaling does not affect these reverse-chain fidelity or calibration bounds.