eoio.readers.gistda_theos.metadata module#

eoio.readers.gistda_theos.metadata - extractor class for GISTDA THEOS metadata.

class eoio.readers.gistda_theos.metadata.GISTDATHEOSMetadataExtractor(reader)[source]#

Bases: BaseMetadataExtractor

Metadata helper for GISTDA THEOS MS scene products.

get_basic_metadata() → dict[source]#

Extract basic metadata from the dataset, to be used in other tools in MetEOR.

Returns:

Basic metadata dictionary.

get_central_wavelength(var: str) → float[source]#

var’s band centre wavelength (nm) – THEOS-1 MS payload spec: B1 (blue) 483, B2 (green) 565, B3 (red) 659, B4 (NIR) 830. Used as the stack processor’s dim_coord_attr (product_metadata.band_central_wavelength), matching S2/Landsat’s own convention, so the band dimension coordinate carries real wavelengths (with band codes kept alongside as band_name) instead of falling back to band codes as the sole coordinate.

get_earth_sun_distance() → float[source]#

Earth-Sun distance (AU) on this product’s own acquisition date – see _earth_sun_distance_au().

Raises:

GISTDATHEOSMetadataExtractorError – IMAGING_DATE is missing or unparseable, since reflectance can’t be correctly computed without it (unlike a missing solar zenith angle, which is tolerated – see _solar_zenith_from_elevation() – there’s no equivalently honest “unset” value for a multiplicative distance-squared term).

get_product_metadata() → dict[source]#

Extract product metadata from the dataset.

Returns:

Product metadata dictionary.

get_solar_irradiance(var: str) → float[source]#
get_variable_basic_metadata(var: str) → dict[source]#

Extract basic variable metadata from the dataset.

Parameters:

var – Variable name for which metadata should be extracted.

Returns:

Variable metadata dictionary.

get_variable_product_metadata(var: str) → dict[source]#

Extract variable metadata from the dataset.

Parameters:

var – Variable name for which metadata should be extracted.

Returns:

Variable metadata dictionary.

read_metadata_dim() → dict[source]#

METADATA.DIM as a dict. Parsed once – it is asked for per band, and again for the Earth-Sun distance and the basic metadata.

exception eoio.readers.gistda_theos.metadata.GISTDATHEOSMetadataExtractorError[source]#

Bases: ValueError