curryer.correction.results¶
Structured result models for the correction pipeline.
Provides CorrectionResult and ParameterSetResult,
returned by run_correction().
Attributes¶
Classes¶
Results for a single parameter set in a correction sweep. |
|
Structured result from |
Functions¶
|
Build a |
Module Contents¶
- curryer.correction.results.logger¶
- class curryer.correction.results.ParameterSetResult(/, **data: Any)¶
Bases:
pydantic.BaseModelResults for a single parameter set in a correction sweep.
- index¶
Zero-based index of this parameter set in the sweep.
- Type:
int
- parameter_values¶
Parameter name → sampled value for this set.
- Type:
dict[str, float]
- mean_rms_m¶
Mean RMS geolocation error across all GCP pairs (meters).
- Type:
float
- best_pair_rms_m¶
RMS error of the best-performing GCP pair (meters).
- Type:
float
- worst_pair_rms_m¶
RMS error of the worst-performing GCP pair (meters).
- Type:
float
- index: int¶
- parameter_values: dict[str, float]¶
- mean_rms_m: float¶
- best_pair_rms_m: float¶
- worst_pair_rms_m: float¶
- class curryer.correction.results.CorrectionResult(/, **data: Any)¶
Bases:
pydantic.BaseModelStructured result from
run_correction().Provides the instrument engineer with a clear answer: what is the best parameter set, does it meet requirements, and what should they do next.
Serialisation¶
Most fields are JSON-serialisable via
model_dump()/model_dump_json(). Theresultsandnetcdf_datafields are excluded from serialisation by default because they contain non-JSON-serialisable types (xr.Dataset, numpy arrays). Access them directly on the object when raw data is needed:result = run_correction(setup, sweep, inputs, work_dir) result.best_parameter_set # dict[str, float] — use this result.results # raw per-iteration dicts — advanced use only result.netcdf_data # raw numpy arrays — advanced use only
- best_parameter_set¶
Parameter values that produced the lowest aggregate RMS.
- Type:
dict[str, float]
- best_rms_m¶
Best aggregate RMS achieved across all parameter sets (meters).
- Type:
float
- best_index¶
Index of the best parameter set (for cross-referencing with NetCDF output).
- Type:
int
- worst_rms_m¶
Worst aggregate RMS across all parameter sets (meters).
- Type:
float
- mean_rms_m¶
Mean of all aggregate RMS values (meters).
- Type:
float
- n_parameter_sets¶
Number of parameter sets tested in the sweep.
- Type:
int
- n_gcp_pairs¶
Number of GCP pairs used.
- Type:
int
- all_parameter_sets¶
All tested parameter sets sorted by mean RMS (ascending).
- Type:
list[ParameterSetResult]
- met_threshold¶
Whether the best parameter set met the mission performance requirements.
- Type:
bool
- recommendation¶
Human-readable next-step guidance for the instrument engineer.
- Type:
str
- summary_table¶
Human-readable ASCII table of the top results.
- Type:
str
- netcdf_path¶
Path to the saved NetCDF output file.
- Type:
Path or None
- config_snapshot¶
Key config values used, for reproducibility records.
- Type:
dict
- elapsed_time_s¶
Total wall-clock processing time in seconds.
- Type:
float
- timestamp¶
UTC time when the run completed.
- Type:
datetime
- model_config¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- best_parameter_set: dict[str, float]¶
- best_rms_m: float¶
- best_index: int¶
- worst_rms_m: float¶
- mean_rms_m: float¶
- n_parameter_sets: int¶
- n_gcp_pairs: int¶
- all_parameter_sets: list[ParameterSetResult]¶
- met_threshold: bool¶
- recommendation: str¶
- summary_table: str¶
- netcdf_path: pathlib.Path | None = None¶
- config_snapshot: dict = None¶
- elapsed_time_s: float = 0.0¶
- timestamp: datetime.datetime = None¶
- results: list = None¶
- netcdf_data: dict = None¶
- curryer.correction.results.build_correction_result(setup: curryer.correction.config.GeolocationSetup, sweep: curryer.correction.config.Sweep, netcdf_config: curryer.correction.config.NetCDFConfig, results: list, netcdf_data: dict, netcdf_path: pathlib.Path | None, elapsed_time_s: float) CorrectionResult¶
Build a
CorrectionResultfrom rawloop()outputs.- Parameters:
setup (GeolocationSetup) – The durable mission setup used for the run (requirements/thresholds).
sweep (Sweep) – The parameter-variation experiment (parameters, search strategy, seed).
netcdf_config (NetCDFConfig) – Resolved NetCDF metadata config (for parameter variable names).
results (list) – Per-iteration result dicts from
loop().netcdf_data (dict) – Raw NetCDF data dict from
loop().netcdf_path (Path or None) – Path to the saved NetCDF file, if any.
elapsed_time_s (float) – Total wall-clock time of the run in seconds.
- Return type: