eoio.readers.sentinel3_slstr.layout module#

eoio.readers.sentinel3_slstr.layout - Sentinel-3 SLSTR product layout helpers.

This module mirrors the style of sentinel3_olci.layout and provides a small helper class that knows where to find SLSTR-specific files inside an extracted SEN3 product directory.

class eoio.readers.sentinel3_slstr.layout.S3SLSTRLayout(path: str)[source]#

Bases: object

Representation of a Sentinel-3 SLSTR SEN3 product layout.

The class provides helpers to discover radiance/BT files, auxiliary files (geodetic, cartesian, indices, meteo, time, viscal, geometry) and the product manifest.

Parameters:

path – Filesystem path to the SEN3 directory (string or Path-like).

cartesian_path(grid: str) str | None[source]#

Return path to cartesian file for a given grid, or None if not present. :param grid: Grid ID (e.g. ‘an’). :returns: Path to cartesian file, or None if not present.

default_meas() list[source]#

Return default list of measurement variable stems available in the product. This is used as a fallback if no measurements are explicitly selected in the reader config. :returns: List of default measurement variable stems (e.g. [‘S1_an’, ‘S2_an’, …]).

flags_path(grid: str) str | None[source]#

Return path to flags file for a given grid, or None if not present. :param grid: Grid ID (e.g. ‘an’). :returns: Path to flags file, or None if not present.

geodetic_path(grid: str) str | None[source]#

Return path to geodetic file for a given grid, or None if not present. :param grid: Grid ID (e.g. ‘an’). :returns: Path to geodetic file, or None if not present.

geometry_tn_path() str | None[source]#

Return path to nadir geometry file :returns: Path to nadir geometry file, or None if not present

geometry_to_path() str | None[source]#

Return path to oblique geometry file :returns: Path to oblique geometry file, or None if not present

get_grid(band: str) str | None[source]#

Extract grid token from a band name (e.g. ‘S1_an’ -> ‘an’). :param band: Band tokens to extract the grid ID from

Returns:

Mapping from band token (e.g. ‘S1_an’) to grid (e.g. ‘an’).

get_grid_res(grid: str) int | None[source]#

Return nominal spatial resolution for a given grid token. :param grid: Grid ID

Returns:

Nominal spatial resolution in meters (e.g. 500), or None if grid is unrecognized.

indices_path(grid: str) str | None[source]#

Return path to indices file for a given grid, or None if not present. :param grid: Grid ID (e.g. ‘an’). :returns: Path to indices file, or None if not present.

manifest_path() Path | None[source]#

Return path to metadata manifest file (xfdumanifest.xml) :returns: Path to metadata manifest file, or None if not present

mask_to_var(mask: str) str | None[source]#

Map a requested mask name to the corresponding variable name to allow mapping of mask to a meas_path.

Parameters:

mask – Requested mask name (e.g. ‘S1_exception_an’).

Returns:

Corresponding variable name (e.g. “S1_radiance_an”), or None if the mask is not recognized.

meas_paths(bands: Sequence[str] | None = None) Dict[str, str][source]#

Return mapping of band name to radiance file path.

If bands is None, all available radiance or BT files under the SEN3 directory are discovered and returned. When bands is a sequence, only the requested band names are considered.

Parameters:

bands – Optional list of band tokens to filter by.

Returns:

Mapping from band token (e.g. ‘S1_an’) to absolute file path.

met_path() str | None[source]#

Return path to meteo file :returns: Path to meteo file, or None if not present.

path: str#
property proc_version: int#

Parse processing version from the SEN3 directory name.

This attempts to extract a numeric token from the directory name; callers should handle unexpected formats. :returns: Processing version as an integer, or 0 if it cannot be parsed.

requested_uncertainty_paths(bands: Sequence[str] | None = None) Dict[str, str][source]#

Return requested uncertainty paths for the given bands.

For now return an empty mapping; but can be implemented if in-product uncertainties become avaialable in future.

Returns:

Mapping from band token (e.g. ‘S1_an’) to uncertainty file path.

time_path(grid: str) str | None[source]#

Return path to time data file :param grid: Grid ID :returns: Path to time file, or None if not present

viscal_path() str | None[source]#

Return path to viscal data file :returns: Path to viscal file, or None if not present

exception eoio.readers.sentinel3_slstr.layout.S3SLSTRLayoutError[source]#

Bases: ValueError

Raised when a SEN3 folder is missing expected files/structure.