Rename kamil_adc to rph_radar and fix its data path
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
Applying these sets leaves measurements unchanged and satisfies pipeline asset
|
||||
validation before physical calibration is available. The shortcut is enabled for
|
||||
verified frequency axes: Kamil ADC, multi-device LibreVNA and single-device mock.
|
||||
verified frequency axes: RadioPhotonic radar (RPH), multi-device LibreVNA and single-device mock.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -12,10 +12,7 @@ import time
|
||||
|
||||
import numpy as np
|
||||
|
||||
from python_app.hardware_full.kamil_adc import (
|
||||
KamilAdcProcessingParams,
|
||||
KamilAdcSweepProcessor,
|
||||
)
|
||||
from python_app.hardware_full.rph_radar.processing import RphRadarSweepProcessor
|
||||
from python_app.models.dataset_model import ComboKey, SweepCollection, TraceData
|
||||
from python_app.models.run_config_schema import ComboModel, RunConfigModel
|
||||
|
||||
@@ -24,19 +21,16 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
def supports_neutral_preprocess_sets(config: RunConfigModel) -> bool:
|
||||
"""Enable the shortcut only when the emitted frequency grid is verified."""
|
||||
return bool(config.is_kamil_adc or config.is_multi_device or (
|
||||
return bool(config.is_rph_radar or config.is_multi_device or (
|
||||
config.radar.model == RunConfigModel.LIBREVNA_MODEL and config.radar.driver_mode == "mock"
|
||||
))
|
||||
|
||||
|
||||
def neutral_frequency_grid_hz(config: RunConfigModel) -> np.ndarray:
|
||||
"""Derive the neutral axis; the preprocessor verifies it against measured data."""
|
||||
if config.is_kamil_adc:
|
||||
if config.is_rph_radar:
|
||||
# Single source of truth for the axis: the same grid the processor emits.
|
||||
processor = KamilAdcSweepProcessor(
|
||||
KamilAdcProcessingParams.from_kamil_model(config.radar.kamil_adc)
|
||||
)
|
||||
return processor.grid_hz
|
||||
return RphRadarSweepProcessor(config.radar.rph_radar).grid_hz
|
||||
|
||||
points = int(config.radar.sweep.points)
|
||||
if points < 1:
|
||||
|
||||
Reference in New Issue
Block a user