Skip to content

S1 RTC: discover_s1tiling_acquisitions returns 0 for multi-frame products (masked acq timestamp) #183

Description

@lhoupert

Summary (F1)

discover_s1tiling_acquisitions silently discovers 0 acquisitions for multi-frame S1Tiling products, because their GeoTIFF filenames carry a masked acquisition time (…txxxxxx) that the filename regex rejects.

Surfaced by the 32TLR staging e2e (data-pipeline tracker #226, item F1). data-pipeline shipped a workaround in #237 (ingest_all rewrites …txxxxxx… names from the GeoTIFF ACQUISITION_DATETIME tag before discovery). This issue tracks the durable upstream fix so that workaround can be removed.

Root cause

src/eopf_geozarr/conversion/s1_ingest.py:

S1TILING_FILENAME_PATTERN = re.compile(
    ...
    r"(?P<acq_stamp>\d{8}t\d{6})_"   # requires 6 time digits
    ...
)

A multi-frame product names the time portion txxxxxx (e.g. s1a_32TLR_vv_DES_037_20260521txxxxxx_GammaNaughtRTC.tif) because the frame spans acquisitions without a single shared timestamp. \d{6} fails to match xxxxxx, so:

  1. parse_s1tiling_filename() returns None,
  2. discover_s1tiling_acquisitions() skips the file,
  3. discovery returns an empty list — no error, just 0 acquisitions.

Reproduce

Point discover_s1tiling_acquisitions(input_dir) at a directory whose GeoTIFFs have a masked …txxxxxx stamp → returns [].

Proposed fix (durable)

The real timestamp is already available in the GeoTIFF metadata — extract_geotiff_metadata() reads the ACQUISITION_DATETIME tag (s1_ingest.py:148). So:

  1. Relax acq_stamp to also accept a masked time, e.g. (?P<acq_stamp>\d{8}t(?:\d{6}|x{6})).
  2. When the stamp is masked, resolve the real acq_stamp from the GeoTIFF ACQUISITION_DATETIME tag and use that for grouping (so the per-acquisition key + downstream STAC datetime are correct).

This moves the data-pipeline #237 normalization into discovery, where it belongs, and lets that workaround be retired.

Acceptance

  • A masked-stamp multi-frame bundle is discovered as a complete acquisition (vv/vh/masks grouped), with acq_stamp resolved from ACQUISITION_DATETIME.
  • Unmasked single-frame products are unchanged (regression-tested).
  • data-pipeline #237 workaround can be removed once this lands.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions