msi_processor.exceptions package#

Exception and warning vocabulary of msi-processor.

The typed MsiProcessorError hierarchy (SDD <5.4.1>) is re-exported here for convenient import.

Submodules#

msi_processor.exceptions.errors module#

Typed exception hierarchy — the fault-containment vocabulary of SDD <5.2>g.

A pure core raises a typed MsiProcessorError subclass on a precondition / acceptance violation; the EOProcessingUnit wrapper catches it, attaches the relevant QAFlag and report fields, and re-raises to the chain runner, which applies fail-stop (REQ-F-DEP-01). Observational deviations (a QA metric out of tolerance) are warnings, never exceptions.

The class set mirrors SDD <5.4.1>. MsiProcessorError carries .stage, .qa_flag and .report_fields for structured reporting.

exception msi_processor.exceptions.errors.AdfResolutionError(message='', *, stage=None, qa_flag=None, report_fields=None)#

Bases: MsiProcessorError

Missing or validity-mismatched ADF (REQ-S-04; C-COM-ADF).

exception msi_processor.exceptions.errors.AtmosphericError(message='', *, stage=None, qa_flag=None, report_fields=None)#

Bases: MsiProcessorError

Atmospheric-correction failure (REQ-F-ATM-*).

exception msi_processor.exceptions.errors.CoregistrationError(message='', *, stage=None, qa_flag=None, report_fields=None)#

Bases: MsiProcessorError

Insufficient matches / residual out of acceptance (REQ-F-COR-03).

exception msi_processor.exceptions.errors.GeolocationError(message='', *, stage=None, qa_flag=None, report_fields=None)#

Bases: MsiProcessorError

Missing DEM / viewing-model coverage (REQ-F-GEO-*).

exception msi_processor.exceptions.errors.InputValidationError(message='', *, stage=None, qa_flag=None, report_fields=None)#

Bases: MsiProcessorError

Malformed / mismatched input product (REQ-F-L0-03, REQ-DAT-03).

exception msi_processor.exceptions.errors.L0DecodeError(message='', *, stage=None, qa_flag=None, report_fields=None)#

Bases: MsiProcessorError

Level-0 decode failure / sensor-private decode body unavailable (REQ-F-L0-*).

Raised by the public scaffolding when the source-packet decode cannot be performed because the sensor/NDA-specific decode body is a private [impl] backend not present in this distribution, or when a decoded open-container frame fails Level-0 legality (REQ-F-L0-03).

exception msi_processor.exceptions.errors.MsiProcessorError(message='', *, stage=None, qa_flag=None, report_fields=None)#

Bases: Exception

Base class of all msi-processor typed errors (SDD <5.2>g, <5.4.1>).

Parameters:
message:

Human-readable description of the failure.

stage:

The processing stage that raised the error (e.g. "radiometric"), used in the structured processing report.

qa_flag:

The QA bit to attach to affected pixels, if any.

report_fields:

Extra machine-readable fields for the processing report (ICD-IF-DIAG); never contains private calibration values.

exception msi_processor.exceptions.errors.MyError#

Bases: Exception

Raised when an error occurs.

Retained from the project template for backward compatibility; new code should raise a MsiProcessorError subclass instead.

exception msi_processor.exceptions.errors.PansharpenError(message='', *, stage=None, qa_flag=None, report_fields=None)#

Bases: MsiProcessorError

Pan-sharpening failure / unimplemented fusion method (REQ-F-PAN-*).

exception msi_processor.exceptions.errors.ProductWriteError(message='', *, stage=None, qa_flag=None, report_fields=None)#

Bases: MsiProcessorError

Product store / write failure (REQ-F-PRD-01; C-COM-PRODUCT).

exception msi_processor.exceptions.errors.ProfileValidationError(message='', *, stage=None, qa_flag=None, report_fields=None)#

Bases: MsiProcessorError

Invalid / incomplete sensor profile (REQ-DAT-03; C-COM-PROFILE).

exception msi_processor.exceptions.errors.RadiometricError(message='', *, stage=None, qa_flag=None, report_fields=None)#

Bases: MsiProcessorError

Radiometric-stage failure (REQ-F-RAD-*).

msi_processor.exceptions.warnings module#

exception msi_processor.exceptions.warnings.MyWarning#

Bases: Warning

Raised when an alert should be displayed.