Skip to content
SR-Forge

Descriptors

MultiSpectralDescriptor

Bases: ABC

Base class for static descriptors for multispectral imagery data. Subclasses MUST override all of these class getters to provide the necessary metadata for the specific sensor or dataset.

bands() -> List[str] abstractmethod classmethod

Returns a list of all band names for the sensor.

Returns:

Type Description
List[str]

List[str]: A list of band names, e.g., ['b1', 'b2', 'b3'].

band_indices() -> Dict[str, int] abstractmethod classmethod

Gets a dictionary mapping band names to their integer indices.

This is useful for selecting specific bands from a tensor by name.

Returns:

Type Description
Dict[str, int]

Dict[str, int]: A dictionary where keys are band names and values are their corresponding zero-based indices.

gsd() -> Dict[str, float] abstractmethod classmethod

Gets the Ground Sample Distance (GSD) for each band.

Returns:

Type Description
Dict[str, float]

Dict[str, float]: A dictionary mapping band names to their GSD in meters.

wavelengths() -> Dict[str, Tuple[float, float]] abstractmethod classmethod

Gets the wavelength range for each band.

Returns:

Type Description
Dict[str, Tuple[float, float]]

Dict[str, Tuple[float, float]]: A dictionary mapping band names to a (min, max) tuple of their wavelength range in nanometers.

bit_depth() -> int abstractmethod classmethod

Gets the radiometric resolution (bit depth) of the sensor.

Returns:

Name Type Description
int int

The bit depth of the sensor data (e.g., 12 for 12-bit data).

gsd_groups() -> Dict[float, List[str]] classmethod

Groups bands by their Ground Sample Distance (GSD).

This is a convenience method that inverts the gsd mapping.

Returns:

Type Description
Dict[float, List[str]]

Dict[float, List[str]]: A dictionary where keys are GSD values (in meters) and values are lists of band names sharing that GSD.

__repr__()

Return a concise string representation including name and band count.

Sentinel2Descriptor

Bases: MultiSpectralDescriptor

Descriptor for the Sentinel-2 MSI sensor.

name() -> str classmethod

Returns the official name of the sensor.

description() -> str classmethod

Returns a brief description of the sensor.

bands() -> List[str] classmethod

Returns the list of all band names for Sentinel-2.

band_indices() -> Dict[str, int] classmethod

Returns a mapping of band names to their integer indices.

gsd() -> Dict[str, float] classmethod

Returns the Ground Sample Distance (GSD) in meters for each band.

wavelengths() -> Dict[str, Tuple[float, float]] classmethod

Returns the wavelength range in nanometers for each band.

bit_depth() -> int classmethod

Returns the radiometric resolution (bit depth) for the sensor.

Sentinel1SARDescriptor

Bases: MultiSpectralDescriptor

Descriptor for the Sentinel-1 C-band SAR sensor.

name() -> str classmethod

Returns the official name of the sensor.

description() -> str classmethod

Returns a brief description of the sensor.

bands() -> List[str] classmethod

Returns the list of available polarimetric channels.

band_indices() -> Dict[str, int] classmethod

Returns a mapping of band names to their integer indices.

gsd() -> Dict[str, float] classmethod

Returns the typical Ground Sample Distance (GSD) in meters.

wavelengths() -> Dict[str, Tuple[float, float]] classmethod

Returns the wavelength for the C-band sensor.

bit_depth() -> int classmethod

Returns the typical bit depth for the stored data.