eoio.readers.sentinel3_slstr.data_io module#
I/O helpers for Sentinel-3 SLSTR reader.
This module provides standalone functions that operate on the existing
SLSTRL1Reader instance. They were factored out of the large reader
implementation to mirror the sentinel3_olci package layout.
- eoio.readers.sentinel3_slstr.data_io.read_bands_into_dataset(*, ds: Dataset, layout: S3SLSTRLayout, meas: List[str], subset: Dict[str, Any], mtd: S3SLSTRMetadataExtractor, clip_boxes: Dict[str, Tuple[float, float, float, float]] | None = None, chunks: Dict[str, int] | None = None, use_chunks: bool = False) Dataset[source]#
Read radiance bands into an xarray
Dataset.- Parameters:
ds – Base dataset to which band variables will be added. The dataset is mutated and returned.
layout – Layout helper used to locate band files on disk.
meas – Sequence of band tokens to read (e.g.
['S1_an']).subset – Optional resolved ROI subset object; when present and containing a
clip_boxattribute the band arrays will be clipped to that box.mtd – Metadata extractor used to retrieve band-specific metadata.
chunks – Optional chunking specification passed to the raster reader.
use_chunks – Whether to compute and apply chunking heuristics.
- Returns:
The dataset with the requested bands attached.
- eoio.readers.sentinel3_slstr.data_io.read_lat_lon_coordinates(*, ds: Dataset, layout, grids, subset=None, config=None, chunks=None, use_chunks: bool = False)[source]#
Read SLSTR geodetic coordinate files for requested grids and attach latitude/longitude coordinates to
ds.- Parameters:
ds – Base dataset to which coordinates will be added. The dataset is mutated and returned.
layout – Layout object for handling file paths and grid information.
grids – List of grids for which to read coordinates.
subset – Optional subset configuration for ROI clipping.
config – Configuration object for handling variable selections and other settings.
chunks – Chunking configuration for reading files.
use_chunks – Whether to use chunking when reading files.
- Returns:
Tuple of (updated dataset, clip_boxes) where
clip_boxesis a dict with optional keys ‘lat_lon’ and ‘tie’ suitable for downstream readers.