Skip to content

Qa Metrics

Module: spectralbridge.qa_metrics.

Direct-module reference; consult the linked workflow for processing context.

API glossary ยท Workflow / scientific context

Signatures and documentation below are collected from the current source. Advanced objects are not newly declared stable by inclusion here.

Audience: advanced.

HeaderReport dataclass

HeaderReport(keys_present: List[str], keys_missing: List[str], wavelength_unit: Optional[str], n_bands: int, n_wavelengths_finite: int, first_nm: Optional[float], last_nm: Optional[float], wavelengths_monotonic: Optional[bool], wavelength_source: str)

Store legacy ENVI header QA findings and metadata.

Audience: advanced.

MaskReport dataclass

MaskReport(n_total: int, n_valid: int, valid_pct: float)

Store legacy validity-mask QA findings.

Audience: advanced.

CorrectionReport dataclass

CorrectionReport(delta_median: List[float], delta_iqr: List[float], delta_q10: List[float], delta_q25: List[float], delta_q75: List[float], delta_q90: List[float], delta_abs_median: List[float], largest_delta_indices: List[int])

Store legacy correction QA diagnostics.

Audience: advanced.

ConvolutionReport dataclass

ConvolutionReport(sensor: str, rmse: List[float], sam: Optional[float])

Store legacy target-sensor convolution QA diagnostics.

Audience: advanced.

Provenance dataclass

Provenance(flightline_id: str, created_utc: str, package_version: str, git_sha: str, input_hashes: Dict[str, str])

Store source and execution metadata accompanying a legacy QA report.

Audience: advanced.

QAMetrics dataclass

QAMetrics(provenance: Provenance, header: HeaderReport, mask: MaskReport, correction: Optional[CorrectionReport], convolution: List[ConvolutionReport], negatives_pct: float, overbright_pct: float, issues: List[str], brightness_coefficients: Dict[str, Dict[int, float]] = dict(), brightness_summary: Dict[str, List[Dict[str, float]]] = dict())

Group legacy header, mask, correction, convolution and provenance QA records.

to_json

to_json() -> str

Audience: advanced.

write_json

write_json(metrics: QAMetrics, out_path: Path) -> Path

Serialize legacy QAMetrics to JSON, creating the destination parent directory.