Add object calibration

This commit is contained in:
Ayzen
2026-10-05 17:39:40 +03:00
parent 8f097dfa2e
commit 552cdc688a
33 changed files with 3141 additions and 517 deletions
@@ -20,6 +20,7 @@ class PreprocessAssetSpec:
PREPROCESS_ASSET_SPECS = {
"s21_calibration": PreprocessAssetSpec("S21 Calibration", "s21_calibration", "s21_calibration_bundle.bin", "s21"),
"s21_reference": PreprocessAssetSpec("S21 Reference", "s21_reference", "s21_reference_bundle.bin", "s21"),
"s21_object_calibration": PreprocessAssetSpec("Object Calibration", "s21_object_calibration", "s21_object_calibration_bundle.bin", "s21"),
"s11_open": PreprocessAssetSpec("S11 Open", "s11_open", "s11_open_calibration_bundle.bin", "s11"),
"s11_short": PreprocessAssetSpec("S11 Short", "s11_short", "s11_short_calibration_bundle.bin", "s11"),
"s11_load": PreprocessAssetSpec("S11 Load", "s11_load", "s11_load_calibration_bundle.bin", "s11"),
@@ -30,7 +31,8 @@ PREPROCESS_ASSET_KEYS = tuple(PREPROCESS_ASSET_SPECS.keys())
S21_PREPROCESS_ASSET_KEYS = ("s21_calibration", "s21_reference")
S11_PREPROCESS_ASSET_KEYS = ("s11_open", "s11_short", "s11_load", "s11_reference")
S11_PREPROCESS_CALIBRATION_KEYS = ("s11_open", "s11_short", "s11_load")
VISIBLE_PREPROCESS_ASSET_KEYS = S21_PREPROCESS_ASSET_KEYS
VISIBLE_PREPROCESS_ASSET_KEYS = (*S21_PREPROCESS_ASSET_KEYS, "s21_object_calibration")
CAPTURABLE_PREPROCESS_ASSET_KEYS = S21_PREPROCESS_ASSET_KEYS
REQUIRED_PREPROCESS_ASSET_KEYS = S21_PREPROCESS_ASSET_KEYS
@@ -40,6 +42,8 @@ def preprocess_asset_model(config: RunConfigModel, key: str) -> PreprocessAssetM
return config.preprocess.s21.calibration
if key == "s21_reference":
return config.preprocess.s21.reference
if key == "s21_object_calibration":
return config.preprocess.s21.object_calibration
if key == "s11_open":
return config.preprocess.s11.calibration.open
if key == "s11_short":
@@ -68,7 +72,9 @@ def preprocess_asset_set_name(config: RunConfigModel, key: str) -> str:
def runtime_preprocess_asset_keys(config: RunConfigModel) -> tuple[str, ...]:
"""Return preprocess assets that should be exported and validated for runtime."""
enabled_keys = list(REQUIRED_PREPROCESS_ASSET_KEYS)
enabled_keys: list[str] = list(REQUIRED_PREPROCESS_ASSET_KEYS)
if preprocess_asset_set_name(config, "s21_object_calibration"):
enabled_keys.append("s21_object_calibration")
has_full_s11_calibration = all(
preprocess_asset_set_name(config, key)