eoio.readers.sentinel3_olci.masks module#
- eoio.readers.sentinel3_olci.masks.add_masks(*, ds: Dataset, masks: list[str], layout: S3OLCILayout, subset: ResolvedROISubset | None, config: Any)[source]#
Read quality masks and add them to an xarray Dataset.
This function delegates to
read_maskswhich performs the actual IO and decoding; here we perform a small validation of selected masks before calling the helper.- Parameters:
ds – Dataset to which quality mask variables will be added.
masks – List of requested mask names to read and add to the dataset.
layout – Layout helper for locating the relevant mask file.
subset – Resolved ROI subset for subsetting the mask data, or
None.config – Resolved reader configuration containing parameters used by the reader.
- Returns:
Dataset with mask variables merged in.
- eoio.readers.sentinel3_olci.masks.read_masks(*, ds: Dataset, masks: List[str], layout: S3OLCILayout, subset: ResolvedROISubset | None = None, config: ReaderConfig, chunks: Dict[str, int] | None = None, use_chunks: bool = False) Dataset[source]#
Read quality masks and add to dataset.
Reads quality mask data from the appropriate file via rioxarray and adds the mask variables to the dataset with appropriate metadata. This function is used when the user has requested any quality masks (e.g. cloud mask).
- Parameters:
ds – Dataset to which quality mask variables will be added.
masks – List of requested mask names to read and add to the dataset.
layout – Layout helper for locating the relevant mask file.
subset – Optional resolved ROI subset; not currently used but included for potential future use in subsetting mask data.
config – Reader configuration object containing variable selection and other parameters.
chunks – Optional chunking specification for raster reads.
use_chunks – Whether to compute and apply chunking heuristics.
- Returns:
Updated dataset with quality mask variables added.