eoio.readers.constellr_skybee.masks module

eoio.readers.constellr_skybee.masks module#

eoio.readers.constellr_skybee.masks - Skybee QA mask reading

Every VNIR band ships a vnirNN_qa.tiff on the band’s own grid, with three binary (0/1) layers: blackfill_mask (no data), saturated_mask and untested_mask. To give one mask per flag, as the other readers do, they are read from the VNIR04 (red) QA raster – the 10 m band the product is georeferenced against – so they sit on the same x_10m/y_10m grid as B2, B3, B4 and B8. Pixels outside the ROI polygon are NaN, so the variables are float32 (as for the PlanetScope masks).

eoio.readers.constellr_skybee.masks.add_masks(*, ds: Dataset, masks: list[str], layout: ConstellrSkybeeLayout, subset: ResolvedROISubset | None, config: Any) → Dataset[source]#

Read the requested QA masks and add them to ds.

Parameters:
  • ds – dataset to add mask variables to.

  • masks – mask variable names to read (see MASK_OPTIONS).

  • layout – layout helper used to locate the QA file.

  • subset – resolved ROI subset to clip the masks to, or None.

  • config – resolved reader configuration.

Returns:

ds with the mask variables merged in.

Raises:

ValueError – if an unknown mask name is requested.

eoio.readers.constellr_skybee.masks.read_masks(*, ds: Dataset, masks: list[str], layout: ConstellrSkybeeLayout, subset: ResolvedROISubset | None = None, chunks: dict[str, int] | None = None, use_chunks: bool = False) → Dataset[source]#

Read QA layers from the VNIR04 QA raster into ds, on the 10 m grid.

Parameters:
  • ds – dataset to add mask variables to.

  • masks – mask variable names to read.

  • layout – layout helper used to locate the QA file.

  • subset – resolved ROI subset to clip the masks to, or None.

  • chunks – explicit dask chunk spec passed to rioxarray.

  • use_chunks – whether to open the raster lazily (chunked).

Returns:

ds with the mask variables merged in.