UI updates

This commit is contained in:
Ayzen
2026-04-01 20:21:16 +03:00
parent 4abc95c372
commit 669205d8f8
43 changed files with 2055 additions and 973 deletions
@@ -66,6 +66,9 @@ PREPROCESS_ASSET_SPECS = {
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
REQUIRED_PREPROCESS_ASSET_KEYS = S21_PREPROCESS_ASSET_KEYS
def preprocess_asset_model(config: RunConfigModel, key: str) -> PreprocessAssetModel:
@@ -93,3 +96,25 @@ def preprocess_asset_display_name(key: str) -> str:
def preprocess_asset_channel(key: str) -> str:
"""Return associated trace channel for preprocess asset."""
return PREPROCESS_ASSET_SPECS[key].channel
def preprocess_asset_set_name(config: RunConfigModel, key: str) -> str:
"""Return normalized selected set name for one preprocess asset."""
return str(preprocess_asset_model(config, key).set_name).strip()
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)
has_full_s11_calibration = all(
preprocess_asset_set_name(config, key)
for key in S11_PREPROCESS_CALIBRATION_KEYS
)
if not has_full_s11_calibration:
return tuple(enabled_keys)
enabled_keys.extend(S11_PREPROCESS_CALIBRATION_KEYS)
if preprocess_asset_set_name(config, "s11_reference"):
enabled_keys.append("s11_reference")
return tuple(enabled_keys)