msi_processor.sensors package#
Sensor adaptation layer (C-SENSORS).
Externalises all sensor-specific data (band set, radiometric depth, GSD, ADF bindings) so the generic processing chain stays sensor-agnostic: a new sensor is a new profile plus private ADFs, with no core change (REQ-AD-01, REQ-D-07). This package contains no instrument constants in code and no algorithm code (REQ-D-04); private calibration values live only in the ADFs, which the profile references by URI (REQ-S-01/05).
Submodules#
msi_processor.sensors.profile module#
Typed sensor profile (C-SENSORS; SDD <5.4.12>, ICD <5.3.6>).
A minimal, schema-validated SensorProfile specialising the generic
chain for one instrument. It carries references to the private
calibration ADFs (by id → URI) and never embeds private calibration values
(REQ-AD-01, REQ-S-01/05). The loader load_profile() reads a profile
JSON instance and validates it.
Trace: REQ-AD-01..04, REQ-DAT-03; ICD-IF-PROF-*.
- class msi_processor.sensors.profile.BandSpec(**data)#
Bases:
BaseModelOne spectral band of the sensor (data only, no private values).
- Attributes:
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])- rtype:
Self
model_dump(*[, mode, include, exclude, ...])- rtype:
dict[str,Any]
model_dump_json(*[, indent, ensure_ascii, ...])- rtype:
str
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])- rtype:
Self
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- center_wavelength_nm: Optional[float]#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str#
- class msi_processor.sensors.profile.SensorProfile(**data)#
Bases:
BaseModelPer-sensor configuration (SDD <5.4.12>).
- Parameters:
- profile_id, profile_version, sensor_id:
Identity of the profile instance.
- bands:
Ordered list of
BandSpec(at least one).- bit_depth:
Sensor radiometric depth; valid DN range
[0, 2**bit_depth - 1](DPM-PRM-GEN-01, default 12).- gsd:
Nominal ground sampling distance in metres.
- adf_bindings:
Mapping of ADF id → URI reference. Private calibration content is resolved from these URIs at run time and is never stored in the profile (REQ-S-01/05).
- Attributes:
band_namesReturn the band ids in declaration order.
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
Methods
copy(*[, include, exclude, update, deep])Returns a copy of the model.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])- rtype:
Self
model_dump(*[, mode, include, exclude, ...])- rtype:
dict[str,Any]
model_dump_json(*[, indent, ensure_ascii, ...])- rtype:
str
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])- rtype:
Self
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- adf_bindings: dict[str, str]#
- property band_names: list[str]#
Return the band ids in declaration order.
- bands: list[BandSpec]#
- bit_depth: int#
- gsd: float#
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- profile_id: str#
- profile_version: str#
- sensor_id: str#
- msi_processor.sensors.profile.load_profile(path)#
Load and validate a sensor profile JSON instance.
- Return type:
- Parameters:
- path:
Filesystem path to the profile JSON.
- Returns:
- SensorProfile
The validated, typed profile.
- Raises:
- ProfileValidationError
If the file is missing, not valid JSON, or fails schema validation (REQ-DAT-03).