Product¶
- class datacube.model.Product(metadata_type, definition, id_=None)[source]¶
Product definition
- Parameters:
metadata_type (MetadataType)
definition (dict)
Methods:
canonical_measurement(measurement)resolve measurement alias into canonical name
Returns dictionary with keys compatible with
dc.load(..)named arguments: :rtype:Dict[str,Any]lookup_measurements([measurements])Find measurements by name
to_dict()Convert to a dictionary representation of the available fields
validate_extra_dims(definition)Validate 3D metadata in the product definition.
Attributes:
product definition document
List of dimension labels for data in this product
Dictionary of metadata for the third dimension.
Grid specification for this product
Dictionary of measurements in this product
- canonical_measurement(measurement)[source]¶
resolve measurement alias into canonical name
- Return type:
- definition¶
product definition document
- property extra_dimensions: ExtraDimensions¶
Dictionary of metadata for the third dimension.
- grid_spec¶
Grid specification for this product
- load_hints()[source]¶
Returns dictionary with keys compatible with
dc.load(..)named arguments: :rtype:Dict[str,Any]output_crs - CRS resolution - Tuple[float, float] align - Tuple[float, float] (if defined)
Returns {} if load hints are not defined on this product, or defined with errors.
- property measurements: Mapping[str, Measurement]¶
Dictionary of measurements in this product
- static validate_extra_dims(definition)[source]¶
Validate 3D metadata in the product definition.
- Perform some basic checks for validity of the 3D dataset product definition:
Checks extra_dimensions section exists
For each 3D measurement, check if the required dimension is defined
If the 3D spectral_definition is defined: - Check there’s one entry per coordinate. - Check that wavelength and response are the same length.