Bulk Results¶
Module: spectralbridge.bulk.results.
Interpret completed bulk translations from compact result tables only.
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: public. Also exported as spectralbridge.bulk.BulkResultsConfig.
BulkResultsConfig
dataclass
¶
BulkResultsConfig(representative_source_value: float | None = None, r2_review_threshold: float = 0.9, absolute_correction_review_threshold_pct: float = 20.0, weighting_slope_spread_review_threshold: float = 0.05, flightline_slope_iqr_review_threshold: float = 0.05, site_slope_range_review_threshold: float = 0.05, loso_r2_review_threshold: float = 0.8, correction_denominator_floor: float = 1e-08, figure_dpi: int = 150)
Configurable review criteria for compact bulk translation results.
Thresholds are report-screening defaults, not scientific acceptance criteria. A result that triggers no warning is not automatically approved for universal calibration or extrapolation beyond the evaluated domain.
Attributes:
| Name | Type | Description |
|---|---|---|
representative_source_value |
float | None, default=None
|
Source reflectance value at which relative correction magnitude is reported; use the same reflectance units as the fitted coefficients. |
r2_review_threshold |
float, default=0.9
|
R-squared screening threshold for descriptive/held-site attention flags; not a universal acceptance criterion. |
absolute_correction_review_threshold_pct |
float, default=20.0
|
Absolute predicted correction review bound in percent at representative_source_value. |
weighting_slope_spread_review_threshold |
float, default=0.05
|
Dimensionless slope heterogeneity screening threshold for weighting, flightline or site comparisons; flags require scientific interpretation. |
flightline_slope_iqr_review_threshold |
float, default=0.05
|
Dimensionless slope heterogeneity screening threshold for weighting, flightline or site comparisons; flags require scientific interpretation. |
site_slope_range_review_threshold |
float, default=0.05
|
Dimensionless slope heterogeneity screening threshold for weighting, flightline or site comparisons; flags require scientific interpretation. |
loso_r2_review_threshold |
float, default=0.8
|
R-squared screening threshold for descriptive/held-site attention flags; not a universal acceptance criterion. |
correction_denominator_floor |
float, default=1e-08
|
Positive denominator floor in reflectance units used to avoid unstable relative correction percentages near zero. |
figure_dpi |
int, default=150
|
Positive output rendering resolution in dots per inch; rasterization controls file size without changing analytical summaries. |
validate ¶
validate() -> None
Validate configuration ranges and supported option combinations.
Returns:
| Type | Description |
|---|---|
None
|
No return value; validation raises on unsupported configuration and directory creation persists the canonical hierarchy. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If option values violate the configuration or relationship-selection contract. |
Audience: public. Also exported as spectralbridge.bulk.BulkResultsPaths.
BulkResultsPaths
dataclass
¶
BulkResultsPaths(bulk_output: Path)
Canonical compact inputs and interpretation outputs for one bulk run.
Attributes:
| Name | Type | Description |
|---|---|---|
bulk_output |
Path
|
Root of an existing completed bulk run, containing its manifest and compact model tables. |
manifest
property
¶
manifest: Path
Resolve the canonical manifest location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
candidates
property
¶
candidates: Path
Resolve the canonical candidates location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
per_flightline
property
¶
per_flightline: Path
Resolve the canonical per flightline location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
per_site
property
¶
per_site: Path
Resolve the canonical per site location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
loso
property
¶
loso: Path
Resolve the canonical loso location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
analysis_dir
property
¶
analysis_dir: Path
Resolve the canonical analysis dir location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
figures_dir
property
¶
figures_dir: Path
Resolve the canonical figures dir location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
diagnostics_dir
property
¶
diagnostics_dir: Path
Resolve the canonical diagnostics dir location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
publication_dir
property
¶
publication_dir: Path
Resolve the canonical publication dir location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
summary_dir
property
¶
summary_dir: Path
Resolve the canonical summary dir location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
report_dir
property
¶
report_dir: Path
Resolve the canonical report dir location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
pair_band_summary
property
¶
pair_band_summary: Path
Resolve the canonical pair band summary location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
weighting_comparison
property
¶
weighting_comparison: Path
Resolve the canonical weighting comparison location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
flightline_stability
property
¶
flightline_stability: Path
Resolve the canonical flightline stability location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
site_stability
property
¶
site_stability: Path
Resolve the canonical site stability location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
loso_transferability
property
¶
loso_transferability: Path
Resolve the canonical loso transferability location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
attention_flags
property
¶
attention_flags: Path
Resolve the canonical attention flags location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
metadata
property
¶
metadata: Path
Resolve the canonical metadata location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
coefficient_figure
property
¶
coefficient_figure: Path
Resolve the canonical coefficient figure location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
correction_figure
property
¶
correction_figure: Path
Resolve the canonical correction figure location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
transferability_figure
property
¶
transferability_figure: Path
Resolve the canonical transferability figure location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
summary_figure_stem
property
¶
summary_figure_stem: Path
Resolve the canonical summary figure stem location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
publication_stems
property
¶
publication_stems: tuple[Path, ...]
Resolve the canonical publication stems location.
Returns:
| Type | Description |
|---|---|
tuple[Path, ...]
|
Path computed as |
report
property
¶
report: Path
Resolve the canonical report location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
report_pdf
property
¶
report_pdf: Path
Resolve the canonical report pdf location.
Returns:
| Type | Description |
|---|---|
Path
|
Path computed as |
required_inputs
property
¶
required_inputs: tuple[Path, ...]
Resolve the canonical required inputs location.
Returns:
| Type | Description |
|---|---|
tuple[Path, ...]
|
Path computed as |
Audience: public. Also exported as spectralbridge.bulk.summarize_bulk_results, spectralbridge.summarize_bulk_results.
summarize_bulk_results ¶
summarize_bulk_results(bulk_output: str | Path, *, config: BulkResultsConfig | None = None, make_figures: bool = True, make_report: bool = True, force: bool = False) -> dict[str, Any]
Summarize completed translation results without the source archive.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bulk_output
|
str | Path
|
Root of an existing completed bulk run, containing its manifest and compact model tables. |
required |
config
|
BulkResultsConfig | None
|
Configuration object for this workflow; None selects the documented defaults of its configuration class. |
None
|
make_figures
|
bool
|
Render interpretation figures from completed compact results. |
True
|
make_report
|
bool
|
Write the human-readable interpretation report alongside machine-readable summaries. |
True
|
force
|
bool
|
Regenerate the requested outputs instead of reusing an otherwise valid checkpoint or report. |
False
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
Created/reused interpretation metadata, attention flags, compact summaries and enabled figure/report paths. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If a required source or completed artifact is absent. |
ValueError
|
If the supplied options, dimensions, support or provenance violate the input contract. |
Notes
Only the completed bulk manifest and compact model-result Parquets are read. Source rasters, sufficient-statistics checkpoints, diagnostic pixel samples, and observation datasets are neither required nor opened.
See Also
spectralbridge.pipelines.bulk.run_bulk_pipeline : Related source-derived API contract.
Examples:
Use the directory returned by a completed bulk run; original rasters are not needed.
>>> from spectralbridge import summarize_bulk_results
>>> result = summarize_bulk_results(completed_bulk_dir, make_figures=False)
Explicitly exported constants and type aliases¶
These values describe package metadata, schemas or configuration; they are not observations from a production dataset.
| Name | Source expression |
|---|---|
BULK_RESULTS_SCHEMA_VERSION |
3 |