From adb3db82c98e59c9c0e8a0c63a2a14f2a2cd640a Mon Sep 17 00:00:00 2001 From: dboulware Date: Mon, 29 Jan 2024 12:52:14 -0700 Subject: [PATCH] Discover action types (#53) * Update scos-actions branch for testing * Add testing config * scos-actions branch testing. * Add noise-diode-off testing config * Add firmware and API version properties * Add new properties to unit tests * Bump minor version to 4.1.0 * Update required scos-actions version * Delete testing configs * Update nffts in SEA data product configs * add no filter cal action for testing. * Delete example calibration files * actions branch * expose signal_analyzer in discover. * Only load actions in discover. Use a setting for the device model. * Don't create sigan. * optional cals in sigan constructor. * remove bad import and use self.sensor_calibration. * Add optional switches dictionary to TekRSASigan and pass to power_cycle. * remove switches from power_cycle_and_connect call. * Instantiate signal_analyzer and expose in discover if not running migrations. * set sigan to None when running migration. * log running migrations. * load switches before creating tekrsa. * Don't create sigan. * Return to not initializing sigan for testing. * scos-actions 8.0.0 and remove switch_configs_dir setting. * Ran pre-commit. * Remove no filter cal action added for testing. * Remove calibration tests. Initialize signal analyzer for tests. Add DEVICE_GetFWVersion and DEVICE_GetAPIVersion to the mock rsa. * Major version update. * format. * remove attenuation-modified SEA action configs * remove reference to example cal files from README * use model property instead of device_name Consistency with base sigan interface --------- Co-authored-by: Anthony Romaniello --- README.md | 4 +- pyproject.toml | 2 +- src/scos_tekrsa/__init__.py | 2 +- .../CBRS_EXT_Calibrate_00dB_Attenuation.yml | 40 --- .../CBRS_EXT_Calibrate_02dB_Attenuation.yml | 74 ----- .../CBRS_EXT_Calibrate_04dB_Attenuation.yml | 74 ----- .../CBRS_EXT_Calibrate_06dB_Attenuation.yml | 74 ----- .../CBRS_EXT_Calibrate_08dB_Attenuation.yml | 74 ----- .../CBRS_EXT_Calibrate_10dB_Attenuation.yml | 74 ----- .../CBRS_EXT_Calibrate_12dB_Attenuation.yml | 74 ----- .../CBRS_EXT_Calibrate_14dB_Attenuation.yml | 74 ----- .../CBRS_EXT_Calibrate_16dB_Attenuation.yml | 74 ----- .../CBRS_EXT_Calibrate_18dB_Attenuation.yml | 74 ----- .../CBRS_EXT_Calibrate_20dB_Attenuation.yml | 74 ----- .../CBRS_EXT_Calibrate_22dB_Attenuation.yml | 74 ----- .../CBRS_EXT_DataProduct_00dB_Attenuation.yml | 44 --- .../CBRS_EXT_DataProduct_02dB_Attenuation.yml | 78 ------ .../CBRS_EXT_DataProduct_04dB_Attenuation.yml | 78 ------ .../CBRS_EXT_DataProduct_06dB_Attenuation.yml | 78 ------ .../CBRS_EXT_DataProduct_08dB_Attenuation.yml | 78 ------ .../CBRS_EXT_DataProduct_10dB_Attenuation.yml | 78 ------ .../CBRS_EXT_DataProduct_12dB_Attenuation.yml | 78 ------ .../CBRS_EXT_DataProduct_14dB_Attenuation.yml | 78 ------ .../CBRS_EXT_DataProduct_16dB_Attenuation.yml | 78 ------ .../CBRS_EXT_DataProduct_18dB_Attenuation.yml | 78 ------ .../CBRS_EXT_DataProduct_20dB_Attenuation.yml | 78 ------ .../CBRS_EXT_DataProduct_22dB_Attenuation.yml | 78 ------ ...on.yml => SEA_CBRS_Calibrate_Baseline.yml} | 2 +- ...tion.yml => SEA_CBRS_Measure_Baseline.yml} | 6 +- .../configs/sensor_calibration_example.json | 255 ------------------ .../configs/sigan_calibration_example.json | 61 ----- src/scos_tekrsa/discover/__init__.py | 61 ++--- src/scos_tekrsa/hardware/__init__.py | 16 -- src/scos_tekrsa/hardware/mocks/rsa_block.py | 6 + src/scos_tekrsa/hardware/tekrsa_sigan.py | 53 ++-- src/scos_tekrsa/settings.py | 17 +- tests/test_calibration.py | 36 --- tests/test_tekrsa_sigan.py | 33 ++- 38 files changed, 100 insertions(+), 2210 deletions(-) delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_00dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_02dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_04dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_06dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_08dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_10dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_12dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_14dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_16dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_18dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_20dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_22dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_00dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_02dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_04dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_06dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_08dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_10dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_12dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_14dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_16dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_18dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_20dB_Attenuation.yml delete mode 100644 src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_22dB_Attenuation.yml rename src/scos_tekrsa/configs/actions-500-600/{CBRS_Calibrate_00dB_Attenuation.yml => SEA_CBRS_Calibrate_Baseline.yml} (94%) rename src/scos_tekrsa/configs/actions-500-600/{CBRS_DataProduct_00dB_Attenuation.yml => SEA_CBRS_Measure_Baseline.yml} (92%) delete mode 100644 src/scos_tekrsa/configs/sensor_calibration_example.json delete mode 100644 src/scos_tekrsa/configs/sigan_calibration_example.json delete mode 100644 tests/test_calibration.py diff --git a/README.md b/README.md index f12fbe06..079cd4d2 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ For information on adding actions, see the [SCOS Actions Plugin documentation](h ## Overview of Repo Structure -- `scos_tekrsa/configs`: Contains example calibration files and the YAML files with the -parameters used to initialize the Tektronix RSA supported actions +- `scos_tekrsa/configs`: Contains YAML files with the parameters used to initialize the +Tektronix RSA supported actions - `scos_tekrsa/discover`: Includes the code to read YAML files and make actions available to `scos-sensor` - `scos_tekrsa/hardware`: Includes an implementation of the signal analyzer interface for diff --git a/pyproject.toml b/pyproject.toml index d40e60af..fab5f101 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ classifiers = [ dependencies = [ "environs>=9.5.0", "tekrsa-api-wrap>=1.3.2", - "scos_actions @ git+https://github.com/NTIA/scos-actions@7.0.0", + "scos_actions @ git+https://github.com/NTIA/scos-actions@8.0.0", ] [project.optional-dependencies] diff --git a/src/scos_tekrsa/__init__.py b/src/scos_tekrsa/__init__.py index ce1305bf..ba7be38e 100644 --- a/src/scos_tekrsa/__init__.py +++ b/src/scos_tekrsa/__init__.py @@ -1 +1 @@ -__version__ = "4.0.0" +__version__ = "5.0.0" diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_00dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_00dB_Attenuation.yml deleted file mode 100644 index f9c694b2..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_00dB_Attenuation.yml +++ /dev/null @@ -1,40 +0,0 @@ -y_factor_cal: - name: CBRS_EXT_Calibrate_00dB_Attenuation - # Preselector configuration - cal_source_idx: 0 - temp_sensor_idx: 2 - noise_diode_on: noise_diode_on - noise_diode_off: noise_diode_off - # Signal Analyzer Settings - preamp_enable: True - reference_level: -25 - attenuation: 0 - sample_rate: 14e6 - duration_ms: 1000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 - # IIR Filter Settings: - # Optionally apply a low-pass IIR filter before Y-Factor - iir_apply: True - iir_gpass_dB: 0.1 - iir_gstop_dB: 40 - iir_pb_edge_Hz: 5e6 - iir_sb_edge_Hz: 5.008e6 - iir_num_response_frequencies: 1000 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_02dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_02dB_Attenuation.yml deleted file mode 100644 index bc28fb88..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_02dB_Attenuation.yml +++ /dev/null @@ -1,74 +0,0 @@ -y_factor_cal: - name: CBRS_EXT_Calibrate_02dB_Attenuation - # Preselector configuration - cal_source_idx: 0 - temp_sensor_idx: 2 - noise_diode_on: noise_diode_on - noise_diode_off: noise_diode_off - # Signal Analyzer Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -23 - - -23 - - -23 - - -23 - - -23 - - -23 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - sample_rate: 14e6 - duration_ms: 1000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 - # IIR Filter Settings: - # Optionally apply a low-pass IIR filter before Y-Factor - iir_apply: True - iir_gpass_dB: 0.1 - iir_gstop_dB: 40 - iir_pb_edge_Hz: 5e6 - iir_sb_edge_Hz: 5.008e6 - iir_num_response_frequencies: 1000 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_04dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_04dB_Attenuation.yml deleted file mode 100644 index ebaf61dd..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_04dB_Attenuation.yml +++ /dev/null @@ -1,74 +0,0 @@ -y_factor_cal: - name: CBRS_EXT_Calibrate_04dB_Attenuation - # Preselector configuration - cal_source_idx: 0 - temp_sensor_idx: 2 - noise_diode_on: noise_diode_on - noise_diode_off: noise_diode_off - # Signal Analyzer Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -21 - - -21 - - -21 - - -21 - - -21 - - -21 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 4 - - 4 - - 4 - - 4 - - 4 - - 4 - sample_rate: 14e6 - duration_ms: 1000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 - # IIR Filter Settings: - # Optionally apply a low-pass IIR filter before Y-Factor - iir_apply: True - iir_gpass_dB: 0.1 - iir_gstop_dB: 40 - iir_pb_edge_Hz: 5e6 - iir_sb_edge_Hz: 5.008e6 - iir_num_response_frequencies: 1000 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_06dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_06dB_Attenuation.yml deleted file mode 100644 index c0a08f8b..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_06dB_Attenuation.yml +++ /dev/null @@ -1,74 +0,0 @@ -y_factor_cal: - name: CBRS_EXT_Calibrate_06dB_Attenuation - # Preselector configuration - cal_source_idx: 0 - temp_sensor_idx: 2 - noise_diode_on: noise_diode_on - noise_diode_off: noise_diode_off - # Signal Analyzer Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -19 - - -19 - - -19 - - -19 - - -19 - - -19 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 6 - - 6 - - 6 - - 6 - - 6 - - 6 - sample_rate: 14e6 - duration_ms: 1000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 - # IIR Filter Settings: - # Optionally apply a low-pass IIR filter before Y-Factor - iir_apply: True - iir_gpass_dB: 0.1 - iir_gstop_dB: 40 - iir_pb_edge_Hz: 5e6 - iir_sb_edge_Hz: 5.008e6 - iir_num_response_frequencies: 1000 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_08dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_08dB_Attenuation.yml deleted file mode 100644 index 5ade2c99..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_08dB_Attenuation.yml +++ /dev/null @@ -1,74 +0,0 @@ -y_factor_cal: - name: CBRS_EXT_Calibrate_08dB_Attenuation - # Preselector configuration - cal_source_idx: 0 - temp_sensor_idx: 2 - noise_diode_on: noise_diode_on - noise_diode_off: noise_diode_off - # Signal Analyzer Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -17 - - -17 - - -17 - - -17 - - -17 - - -17 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 8 - - 8 - - 8 - - 8 - - 8 - - 8 - sample_rate: 14e6 - duration_ms: 1000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 - # IIR Filter Settings: - # Optionally apply a low-pass IIR filter before Y-Factor - iir_apply: True - iir_gpass_dB: 0.1 - iir_gstop_dB: 40 - iir_pb_edge_Hz: 5e6 - iir_sb_edge_Hz: 5.008e6 - iir_num_response_frequencies: 1000 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_10dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_10dB_Attenuation.yml deleted file mode 100644 index 4dc3a707..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_10dB_Attenuation.yml +++ /dev/null @@ -1,74 +0,0 @@ -y_factor_cal: - name: CBRS_EXT_Calibrate_10dB_Attenuation - # Preselector configuration - cal_source_idx: 0 - temp_sensor_idx: 2 - noise_diode_on: noise_diode_on - noise_diode_off: noise_diode_off - # Signal Analyzer Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -15 - - -15 - - -15 - - -15 - - -15 - - -15 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - sample_rate: 14e6 - duration_ms: 1000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 - # IIR Filter Settings: - # Optionally apply a low-pass IIR filter before Y-Factor - iir_apply: True - iir_gpass_dB: 0.1 - iir_gstop_dB: 40 - iir_pb_edge_Hz: 5e6 - iir_sb_edge_Hz: 5.008e6 - iir_num_response_frequencies: 1000 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_12dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_12dB_Attenuation.yml deleted file mode 100644 index 82b88a2b..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_12dB_Attenuation.yml +++ /dev/null @@ -1,74 +0,0 @@ -y_factor_cal: - name: CBRS_EXT_Calibrate_12dB_Attenuation - # Preselector configuration - cal_source_idx: 0 - temp_sensor_idx: 2 - noise_diode_on: noise_diode_on - noise_diode_off: noise_diode_off - # Signal Analyzer Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -13 - - -13 - - -13 - - -13 - - -13 - - -13 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 12 - - 12 - - 12 - - 12 - - 12 - - 12 - sample_rate: 14e6 - duration_ms: 1000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 - # IIR Filter Settings: - # Optionally apply a low-pass IIR filter before Y-Factor - iir_apply: True - iir_gpass_dB: 0.1 - iir_gstop_dB: 40 - iir_pb_edge_Hz: 5e6 - iir_sb_edge_Hz: 5.008e6 - iir_num_response_frequencies: 1000 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_14dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_14dB_Attenuation.yml deleted file mode 100644 index b6e3686c..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_14dB_Attenuation.yml +++ /dev/null @@ -1,74 +0,0 @@ -y_factor_cal: - name: CBRS_EXT_Calibrate_14dB_Attenuation - # Preselector configuration - cal_source_idx: 0 - temp_sensor_idx: 2 - noise_diode_on: noise_diode_on - noise_diode_off: noise_diode_off - # Signal Analyzer Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -11 - - -11 - - -11 - - -11 - - -11 - - -11 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 14 - - 14 - - 14 - - 14 - - 14 - - 14 - sample_rate: 14e6 - duration_ms: 1000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 - # IIR Filter Settings: - # Optionally apply a low-pass IIR filter before Y-Factor - iir_apply: True - iir_gpass_dB: 0.1 - iir_gstop_dB: 40 - iir_pb_edge_Hz: 5e6 - iir_sb_edge_Hz: 5.008e6 - iir_num_response_frequencies: 1000 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_16dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_16dB_Attenuation.yml deleted file mode 100644 index 33d8d9f3..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_16dB_Attenuation.yml +++ /dev/null @@ -1,74 +0,0 @@ -y_factor_cal: - name: CBRS_EXT_Calibrate_16dB_Attenuation - # Preselector configuration - cal_source_idx: 0 - temp_sensor_idx: 2 - noise_diode_on: noise_diode_on - noise_diode_off: noise_diode_off - # Signal Analyzer Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -9 - - -9 - - -9 - - -9 - - -9 - - -9 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 16 - - 16 - - 16 - - 16 - - 16 - - 16 - sample_rate: 14e6 - duration_ms: 1000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 - # IIR Filter Settings: - # Optionally apply a low-pass IIR filter before Y-Factor - iir_apply: True - iir_gpass_dB: 0.1 - iir_gstop_dB: 40 - iir_pb_edge_Hz: 5e6 - iir_sb_edge_Hz: 5.008e6 - iir_num_response_frequencies: 1000 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_18dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_18dB_Attenuation.yml deleted file mode 100644 index 76c59bea..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_18dB_Attenuation.yml +++ /dev/null @@ -1,74 +0,0 @@ -y_factor_cal: - name: CBRS_EXT_Calibrate_18dB_Attenuation - # Preselector configuration - cal_source_idx: 0 - temp_sensor_idx: 2 - noise_diode_on: noise_diode_on - noise_diode_off: noise_diode_off - # Signal Analyzer Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -7 - - -7 - - -7 - - -7 - - -7 - - -7 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 18 - - 18 - - 18 - - 18 - - 18 - - 18 - sample_rate: 14e6 - duration_ms: 1000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 - # IIR Filter Settings: - # Optionally apply a low-pass IIR filter before Y-Factor - iir_apply: True - iir_gpass_dB: 0.1 - iir_gstop_dB: 40 - iir_pb_edge_Hz: 5e6 - iir_sb_edge_Hz: 5.008e6 - iir_num_response_frequencies: 1000 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_20dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_20dB_Attenuation.yml deleted file mode 100644 index d204e4a0..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_20dB_Attenuation.yml +++ /dev/null @@ -1,74 +0,0 @@ -y_factor_cal: - name: CBRS_EXT_Calibrate_20dB_Attenuation - # Preselector configuration - cal_source_idx: 0 - temp_sensor_idx: 2 - noise_diode_on: noise_diode_on - noise_diode_off: noise_diode_off - # Signal Analyzer Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -5 - - -5 - - -5 - - -5 - - -5 - - -5 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 20 - - 20 - - 20 - - 20 - - 20 - - 20 - sample_rate: 14e6 - duration_ms: 1000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 - # IIR Filter Settings: - # Optionally apply a low-pass IIR filter before Y-Factor - iir_apply: True - iir_gpass_dB: 0.1 - iir_gstop_dB: 40 - iir_pb_edge_Hz: 5e6 - iir_sb_edge_Hz: 5.008e6 - iir_num_response_frequencies: 1000 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_22dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_22dB_Attenuation.yml deleted file mode 100644 index ed5f8674..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_Calibrate_22dB_Attenuation.yml +++ /dev/null @@ -1,74 +0,0 @@ -y_factor_cal: - name: CBRS_EXT_Calibrate_22dB_Attenuation - # Preselector configuration - cal_source_idx: 0 - temp_sensor_idx: 2 - noise_diode_on: noise_diode_on - noise_diode_off: noise_diode_off - # Signal Analyzer Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -3 - - -3 - - -3 - - -3 - - -3 - - -3 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 22 - - 22 - - 22 - - 22 - - 22 - - 22 - sample_rate: 14e6 - duration_ms: 1000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 - # IIR Filter Settings: - # Optionally apply a low-pass IIR filter before Y-Factor - iir_apply: True - iir_gpass_dB: 0.1 - iir_gstop_dB: 40 - iir_pb_edge_Hz: 5e6 - iir_sb_edge_Hz: 5.008e6 - iir_num_response_frequencies: 1000 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_00dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_00dB_Attenuation.yml deleted file mode 100644 index 144e3e0d..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_00dB_Attenuation.yml +++ /dev/null @@ -1,44 +0,0 @@ -nasctn_sea_data_product: - name: CBRS_EXT_DataProduct_00dB_Attenuation - rf_path: antenna -# IIR filter settings - iir_gpass_dB: 0.1 # Max passband ripple below unity gain - iir_gstop_dB: 40 # Minimum stopband attenuation - iir_pb_edge_Hz: 5e6 # Passband edge frequency - iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 -# PFP frame - pfp_frame_period_ms: 10 -# APD downsampling settings - apd_bin_size_dB: 1.0 # Set to 0 or negative for no downsampling - apd_max_bin_dBm: -30 - apd_min_bin_dBm: -180 -# Time domain power statistics settings - td_bin_size_ms: 10 -# Sigan Settings - preamp_enable: True - reference_level: -25 - attenuation: 0 - sample_rate: 14e6 -# Acquisition settings (3540-3710 MHz in 10 MHz steps, each 4s long) - duration_ms: 4000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_02dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_02dB_Attenuation.yml deleted file mode 100644 index 4c0f9115..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_02dB_Attenuation.yml +++ /dev/null @@ -1,78 +0,0 @@ -nasctn_sea_data_product: - name: CBRS_EXT_DataProduct_02dB_Attenuation - rf_path: antenna -# IIR filter settings - iir_gpass_dB: 0.1 # Max passband ripple below unity gain - iir_gstop_dB: 40 # Minimum stopband attenuation - iir_pb_edge_Hz: 5e6 # Passband edge frequency - iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 -# PFP frame - pfp_frame_period_ms: 10 -# APD downsampling settings - apd_bin_size_dB: 1.0 # Set to 0 or negative for no downsampling - apd_max_bin_dBm: -30 - apd_min_bin_dBm: -180 -# Time domain power statistics settings - td_bin_size_ms: 10 -# Sigan Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -23 - - -23 - - -23 - - -23 - - -23 - - -23 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 2 - - 2 - - 2 - - 2 - - 2 - - 2 - sample_rate: 14e6 -# Acquisition settings (3540-3710 MHz in 10 MHz steps, each 4s long) - duration_ms: 4000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_04dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_04dB_Attenuation.yml deleted file mode 100644 index a6317b2c..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_04dB_Attenuation.yml +++ /dev/null @@ -1,78 +0,0 @@ -nasctn_sea_data_product: - name: CBRS_EXT_DataProduct_04dB_Attenuation - rf_path: antenna -# IIR filter settings - iir_gpass_dB: 0.1 # Max passband ripple below unity gain - iir_gstop_dB: 40 # Minimum stopband attenuation - iir_pb_edge_Hz: 5e6 # Passband edge frequency - iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 -# PFP frame - pfp_frame_period_ms: 10 -# APD downsampling settings - apd_bin_size_dB: 1.0 # Set to 0 or negative for no downsampling - apd_max_bin_dBm: -30 - apd_min_bin_dBm: -180 -# Time domain power statistics settings - td_bin_size_ms: 10 -# Sigan Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -21 - - -21 - - -21 - - -21 - - -21 - - -21 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 4 - - 4 - - 4 - - 4 - - 4 - - 4 - sample_rate: 14e6 -# Acquisition settings (3540-3710 MHz in 10 MHz steps, each 4s long) - duration_ms: 4000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_06dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_06dB_Attenuation.yml deleted file mode 100644 index 66120e49..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_06dB_Attenuation.yml +++ /dev/null @@ -1,78 +0,0 @@ -nasctn_sea_data_product: - name: CBRS_EXT_DataProduct_06dB_Attenuation - rf_path: antenna -# IIR filter settings - iir_gpass_dB: 0.1 # Max passband ripple below unity gain - iir_gstop_dB: 40 # Minimum stopband attenuation - iir_pb_edge_Hz: 5e6 # Passband edge frequency - iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 -# PFP frame - pfp_frame_period_ms: 10 -# APD downsampling settings - apd_bin_size_dB: 1.0 # Set to 0 or negative for no downsampling - apd_max_bin_dBm: -30 - apd_min_bin_dBm: -180 -# Time domain power statistics settings - td_bin_size_ms: 10 -# Sigan Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -19 - - -19 - - -19 - - -19 - - -19 - - -19 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 6 - - 6 - - 6 - - 6 - - 6 - - 6 - sample_rate: 14e6 -# Acquisition settings (3540-3710 MHz in 10 MHz steps, each 4s long) - duration_ms: 4000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_08dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_08dB_Attenuation.yml deleted file mode 100644 index 255d23ad..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_08dB_Attenuation.yml +++ /dev/null @@ -1,78 +0,0 @@ -nasctn_sea_data_product: - name: CBRS_EXT_DataProduct_08dB_Attenuation - rf_path: antenna -# IIR filter settings - iir_gpass_dB: 0.1 # Max passband ripple below unity gain - iir_gstop_dB: 40 # Minimum stopband attenuation - iir_pb_edge_Hz: 5e6 # Passband edge frequency - iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 -# PFP frame - pfp_frame_period_ms: 10 -# APD downsampling settings - apd_bin_size_dB: 1.0 # Set to 0 or negative for no downsampling - apd_max_bin_dBm: -30 - apd_min_bin_dBm: -180 -# Time domain power statistics settings - td_bin_size_ms: 10 -# Sigan Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -17 - - -17 - - -17 - - -17 - - -17 - - -17 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 8 - - 8 - - 8 - - 8 - - 8 - - 8 - sample_rate: 14e6 -# Acquisition settings (3540-3710 MHz in 10 MHz steps, each 4s long) - duration_ms: 4000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_10dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_10dB_Attenuation.yml deleted file mode 100644 index 8b237e04..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_10dB_Attenuation.yml +++ /dev/null @@ -1,78 +0,0 @@ -nasctn_sea_data_product: - name: CBRS_EXT_DataProduct_10dB_Attenuation - rf_path: antenna -# IIR filter settings - iir_gpass_dB: 0.1 # Max passband ripple below unity gain - iir_gstop_dB: 40 # Minimum stopband attenuation - iir_pb_edge_Hz: 5e6 # Passband edge frequency - iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 -# PFP frame - pfp_frame_period_ms: 10 -# APD downsampling settings - apd_bin_size_dB: 1.0 # Set to 0 or negative for no downsampling - apd_max_bin_dBm: -30 - apd_min_bin_dBm: -180 -# Time domain power statistics settings - td_bin_size_ms: 10 -# Sigan Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -15 - - -15 - - -15 - - -15 - - -15 - - -15 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 10 - - 10 - - 10 - - 10 - - 10 - - 10 - sample_rate: 14e6 -# Acquisition settings (3540-3710 MHz in 10 MHz steps, each 4s long) - duration_ms: 4000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_12dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_12dB_Attenuation.yml deleted file mode 100644 index 7319cca2..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_12dB_Attenuation.yml +++ /dev/null @@ -1,78 +0,0 @@ -nasctn_sea_data_product: - name: CBRS_EXT_DataProduct_12dB_Attenuation - rf_path: antenna -# IIR filter settings - iir_gpass_dB: 0.1 # Max passband ripple below unity gain - iir_gstop_dB: 40 # Minimum stopband attenuation - iir_pb_edge_Hz: 5e6 # Passband edge frequency - iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 -# PFP frame - pfp_frame_period_ms: 10 -# APD downsampling settings - apd_bin_size_dB: 1.0 # Set to 0 or negative for no downsampling - apd_max_bin_dBm: -30 - apd_min_bin_dBm: -180 -# Time domain power statistics settings - td_bin_size_ms: 10 -# Sigan Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -13 - - -13 - - -13 - - -13 - - -13 - - -13 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 12 - - 12 - - 12 - - 12 - - 12 - - 12 - sample_rate: 14e6 -# Acquisition settings (3540-3710 MHz in 10 MHz steps, each 4s long) - duration_ms: 4000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_14dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_14dB_Attenuation.yml deleted file mode 100644 index 693b81a4..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_14dB_Attenuation.yml +++ /dev/null @@ -1,78 +0,0 @@ -nasctn_sea_data_product: - name: CBRS_EXT_DataProduct_14dB_Attenuation - rf_path: antenna -# IIR filter settings - iir_gpass_dB: 0.1 # Max passband ripple below unity gain - iir_gstop_dB: 40 # Minimum stopband attenuation - iir_pb_edge_Hz: 5e6 # Passband edge frequency - iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 -# PFP frame - pfp_frame_period_ms: 10 -# APD downsampling settings - apd_bin_size_dB: 1.0 # Set to 0 or negative for no downsampling - apd_max_bin_dBm: -30 - apd_min_bin_dBm: -180 -# Time domain power statistics settings - td_bin_size_ms: 10 -# Sigan Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -11 - - -11 - - -11 - - -11 - - -11 - - -11 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 14 - - 14 - - 14 - - 14 - - 14 - - 14 - sample_rate: 14e6 -# Acquisition settings (3540-3710 MHz in 10 MHz steps, each 4s long) - duration_ms: 4000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_16dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_16dB_Attenuation.yml deleted file mode 100644 index 6a0b7fd3..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_16dB_Attenuation.yml +++ /dev/null @@ -1,78 +0,0 @@ -nasctn_sea_data_product: - name: CBRS_EXT_DataProduct_16dB_Attenuation - rf_path: antenna -# IIR filter settings - iir_gpass_dB: 0.1 # Max passband ripple below unity gain - iir_gstop_dB: 40 # Minimum stopband attenuation - iir_pb_edge_Hz: 5e6 # Passband edge frequency - iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 -# PFP frame - pfp_frame_period_ms: 10 -# APD downsampling settings - apd_bin_size_dB: 1.0 # Set to 0 or negative for no downsampling - apd_max_bin_dBm: -30 - apd_min_bin_dBm: -180 -# Time domain power statistics settings - td_bin_size_ms: 10 -# Sigan Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -9 - - -9 - - -9 - - -9 - - -9 - - -9 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 16 - - 16 - - 16 - - 16 - - 16 - - 16 - sample_rate: 14e6 -# Acquisition settings (3540-3710 MHz in 10 MHz steps, each 4s long) - duration_ms: 4000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_18dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_18dB_Attenuation.yml deleted file mode 100644 index 039bab87..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_18dB_Attenuation.yml +++ /dev/null @@ -1,78 +0,0 @@ -nasctn_sea_data_product: - name: CBRS_EXT_DataProduct_18dB_Attenuation - rf_path: antenna -# IIR filter settings - iir_gpass_dB: 0.1 # Max passband ripple below unity gain - iir_gstop_dB: 40 # Minimum stopband attenuation - iir_pb_edge_Hz: 5e6 # Passband edge frequency - iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 -# PFP frame - pfp_frame_period_ms: 10 -# APD downsampling settings - apd_bin_size_dB: 1.0 # Set to 0 or negative for no downsampling - apd_max_bin_dBm: -30 - apd_min_bin_dBm: -180 -# Time domain power statistics settings - td_bin_size_ms: 10 -# Sigan Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -7 - - -7 - - -7 - - -7 - - -7 - - -7 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 18 - - 18 - - 18 - - 18 - - 18 - - 18 - sample_rate: 14e6 -# Acquisition settings (3540-3710 MHz in 10 MHz steps, each 4s long) - duration_ms: 4000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_20dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_20dB_Attenuation.yml deleted file mode 100644 index 07913d6f..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_20dB_Attenuation.yml +++ /dev/null @@ -1,78 +0,0 @@ -nasctn_sea_data_product: - name: CBRS_EXT_DataProduct_20dB_Attenuation - rf_path: antenna -# IIR filter settings - iir_gpass_dB: 0.1 # Max passband ripple below unity gain - iir_gstop_dB: 40 # Minimum stopband attenuation - iir_pb_edge_Hz: 5e6 # Passband edge frequency - iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 -# PFP frame - pfp_frame_period_ms: 10 -# APD downsampling settings - apd_bin_size_dB: 1.0 # Set to 0 or negative for no downsampling - apd_max_bin_dBm: -30 - apd_min_bin_dBm: -180 -# Time domain power statistics settings - td_bin_size_ms: 10 -# Sigan Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -5 - - -5 - - -5 - - -5 - - -5 - - -5 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 20 - - 20 - - 20 - - 20 - - 20 - - 20 - sample_rate: 14e6 -# Acquisition settings (3540-3710 MHz in 10 MHz steps, each 4s long) - duration_ms: 4000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_22dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_22dB_Attenuation.yml deleted file mode 100644 index fd355247..00000000 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_EXT_DataProduct_22dB_Attenuation.yml +++ /dev/null @@ -1,78 +0,0 @@ -nasctn_sea_data_product: - name: CBRS_EXT_DataProduct_22dB_Attenuation - rf_path: antenna -# IIR filter settings - iir_gpass_dB: 0.1 # Max passband ripple below unity gain - iir_gstop_dB: 40 # Minimum stopband attenuation - iir_pb_edge_Hz: 5e6 # Passband edge frequency - iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 -# PFP frame - pfp_frame_period_ms: 10 -# APD downsampling settings - apd_bin_size_dB: 1.0 # Set to 0 or negative for no downsampling - apd_max_bin_dBm: -30 - apd_min_bin_dBm: -180 -# Time domain power statistics settings - td_bin_size_ms: 10 -# Sigan Settings - preamp_enable: True - reference_level: - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -25 - - -3 - - -3 - - -3 - - -3 - - -3 - - -3 - attenuation: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 22 - - 22 - - 22 - - 22 - - 22 - - 22 - sample_rate: 14e6 -# Acquisition settings (3540-3710 MHz in 10 MHz steps, each 4s long) - duration_ms: 4000 - nskip: 0 - frequency: - - 3545e6 - - 3555e6 - - 3565e6 - - 3575e6 - - 3585e6 - - 3595e6 - - 3605e6 - - 3615e6 - - 3625e6 - - 3635e6 - - 3645e6 - - 3655e6 - - 3665e6 - - 3675e6 - - 3685e6 - - 3695e6 - - 3705e6 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_Calibrate_00dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/SEA_CBRS_Calibrate_Baseline.yml similarity index 94% rename from src/scos_tekrsa/configs/actions-500-600/CBRS_Calibrate_00dB_Attenuation.yml rename to src/scos_tekrsa/configs/actions-500-600/SEA_CBRS_Calibrate_Baseline.yml index 6d82e3bd..926cf736 100644 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_Calibrate_00dB_Attenuation.yml +++ b/src/scos_tekrsa/configs/actions-500-600/SEA_CBRS_Calibrate_Baseline.yml @@ -1,5 +1,5 @@ y_factor_cal: - name: CBRS_Calibrate_00dB_Attenuation + name: SEA_CBRS_Calibrate_Baseline # Preselector configuration cal_source_idx: 0 temp_sensor_idx: 2 diff --git a/src/scos_tekrsa/configs/actions-500-600/CBRS_DataProduct_00dB_Attenuation.yml b/src/scos_tekrsa/configs/actions-500-600/SEA_CBRS_Measure_Baseline.yml similarity index 92% rename from src/scos_tekrsa/configs/actions-500-600/CBRS_DataProduct_00dB_Attenuation.yml rename to src/scos_tekrsa/configs/actions-500-600/SEA_CBRS_Measure_Baseline.yml index 1702881a..05cf6592 100644 --- a/src/scos_tekrsa/configs/actions-500-600/CBRS_DataProduct_00dB_Attenuation.yml +++ b/src/scos_tekrsa/configs/actions-500-600/SEA_CBRS_Measure_Baseline.yml @@ -1,13 +1,13 @@ nasctn_sea_data_product: - name: CBRS_DataProduct_00dB_Attenuation + name: SEA_CBRS_Measure_Baseline rf_path: antenna # IIR filter settings iir_gpass_dB: 0.1 # Max passband ripple below unity gain iir_gstop_dB: 40 # Minimum stopband attenuation iir_pb_edge_Hz: 5e6 # Passband edge frequency iir_sb_edge_Hz: 5.008e6 # Stopband edge frequency -# Mean/Max FFT settings - nffts: 64e3 +# FFT settings + nffts: 320e3 # PFP frame pfp_frame_period_ms: 10 # APD downsampling settings diff --git a/src/scos_tekrsa/configs/sensor_calibration_example.json b/src/scos_tekrsa/configs/sensor_calibration_example.json deleted file mode 100644 index 8a01b1d4..00000000 --- a/src/scos_tekrsa/configs/sensor_calibration_example.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "calibration_parameters": [ - "sample_rate", - "frequency", - "reference_level", - "preamp_enable", - "attenuation" - ], - "last_calibration_datetime": "1970-01-01T00:00:00.000000Z", - "calibration_data": { - "14000000.0":{ - "3545000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3555000000":{ - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3565000000":{ - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3575000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3585000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3595000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3605000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3615000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3625000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3635000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3645000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3655000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3665000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3675000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3685000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3695000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3705000000": { - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - } - } - }, - "clock_rate_lookup_by_sample_rate": [], - "calibration_frequency_divisions": [], - "sensor_uid": "EXAMPLE" -} diff --git a/src/scos_tekrsa/configs/sigan_calibration_example.json b/src/scos_tekrsa/configs/sigan_calibration_example.json deleted file mode 100644 index 9d017ba0..00000000 --- a/src/scos_tekrsa/configs/sigan_calibration_example.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "calibration_parameters": [ - "sample_rate", - "frequency", - "reference_level", - "preamp_enable", - "attenuation" - ], - "last_calibration_datetime": "1970-01-01T00:00:00.000000Z", - "calibration_data": { - "14000000.0":{ - "3555000000":{ - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - }, - "5": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - }, - "3565000000":{ - "-25":{ - "true": { - "0": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - }, - "5": { - "datetime": "1970-01-01T00:00:00.000000Z", - "gain": 30.0, - "noise_figure": 5.0, - "1db_compression_point": -12.0, - "enbw": 15723428.858731967, - "temperature": 20.0 - } - } - } - } - } - }, - "clock_rate_lookup_by_sample_rate": [], - "calibration_frequency_divisions": [], - "sigan_uid": "EXAMPLE" -} diff --git a/src/scos_tekrsa/discover/__init__.py b/src/scos_tekrsa/discover/__init__.py index c5ce5d69..b17a35a9 100644 --- a/src/scos_tekrsa/discover/__init__.py +++ b/src/scos_tekrsa/discover/__init__.py @@ -3,46 +3,35 @@ from scos_actions.actions.monitor_sigan import MonitorSignalAnalyzer from scos_actions.discover import init -from scos_tekrsa.hardware import sigan -from scos_tekrsa.settings import CONFIG_DIR +from scos_tekrsa.settings import CONFIG_DIR, DEVICE_MODEL logger = logging.getLogger(__name__) actions = {} logger.debug("scos-tekrsa: discovering actions") # Adjust ACTION_DEFINITIONS_DIR for specific Tektronix analyzer in use -if sigan: - logger.debug(f"Device Name: {sigan.device_name}") - if sigan.device_name in ["RSA306B", "RSA306"]: - ACTION_DEFINITIONS_DIR = CONFIG_DIR / "actions-300" - elif sigan.device_name in [ - "RSA503A", - "RSA507A", - "RSA513A", - "RSA518A", - "RSA603A", - "RSA607A", - ]: - ACTION_DEFINITIONS_DIR = CONFIG_DIR / "actions-500-600" - else: - logger.error( - "Unable to determine RSA model. Defaulting to use RSA500/600 action configs" - ) - ACTION_DEFINITIONS_DIR = CONFIG_DIR / "actions-500-600" - logger.debug(f"Action configs directory: {ACTION_DEFINITIONS_DIR}") - actions["monitor_tekrsa"] = MonitorSignalAnalyzer( - parameters={"name": "monitor_tekrsa"}, sigan=sigan - ) - logger.debug("Created Monitor SIGAN action") - # Pass new radio to existing action classes with new SDR specific yaml files - logger.debug("Initializing yaml actions") - yaml_actions, yaml_test_actions = init(sigan=sigan, yaml_dir=ACTION_DEFINITIONS_DIR) - logger.debug(f"Created {len(yaml_actions)} actions") - actions.update(yaml_actions) +logger.debug(f"Device Model: {DEVICE_MODEL}") +if DEVICE_MODEL in ["RSA306B", "RSA306"]: + ACTION_DEFINITIONS_DIR = CONFIG_DIR / "actions-300" +elif DEVICE_MODEL in [ + "RSA503A", + "RSA507A", + "RSA513A", + "RSA518A", + "RSA603A", + "RSA607A", +]: + ACTION_DEFINITIONS_DIR = CONFIG_DIR / "actions-500-600" else: - logger.warning("Sigan is None") - - -# Support status endpoint -def get_last_calibration_time(): - return sigan.last_calibration_time + logger.error( + "Unable to determine RSA model. Defaulting to use RSA500/600 action configs" + ) + ACTION_DEFINITIONS_DIR = CONFIG_DIR / "actions-500-600" +logger.debug(f"Action configs directory: {ACTION_DEFINITIONS_DIR}") +actions["monitor_tekrsa"] = MonitorSignalAnalyzer(parameters={"name": "monitor_tekrsa"}) +logger.debug("Created Monitor SIGAN action") +# Pass new radio to existing action classes with new SDR specific yaml files +logger.debug("Initializing yaml actions") +yaml_actions, yaml_test_actions = init(yaml_dir=ACTION_DEFINITIONS_DIR) +logger.debug(f"Created {len(yaml_actions)} actions") +actions.update(yaml_actions) diff --git a/src/scos_tekrsa/hardware/__init__.py b/src/scos_tekrsa/hardware/__init__.py index 8c1d7637..e69de29b 100644 --- a/src/scos_tekrsa/hardware/__init__.py +++ b/src/scos_tekrsa/hardware/__init__.py @@ -1,16 +0,0 @@ -import logging - -from scos_actions.signals import register_component_with_status - -from scos_tekrsa.hardware.tekrsa_sigan import TekRSASigan - -logger = logging.getLogger(__name__) -try: - logger.debug( - "*********************Creating TekRSASigan******************************" - ) - sigan = TekRSASigan() - register_component_with_status.send(sigan, component=sigan) -except Exception as err: - logger.error(f"Unable to create TekRSASigan: {err}") - sigan = None diff --git a/src/scos_tekrsa/hardware/mocks/rsa_block.py b/src/scos_tekrsa/hardware/mocks/rsa_block.py index dc919537..4c7a284d 100644 --- a/src/scos_tekrsa/hardware/mocks/rsa_block.py +++ b/src/scos_tekrsa/hardware/mocks/rsa_block.py @@ -129,3 +129,9 @@ def IQSTREAM_Acquire(self, dur_msec, return_status): def set_times_to_fail(self, n): self.times_to_fail = n self.times_failed = 0 + + def DEVICE_GetFWVersion(self): + return "mock_rsa" + + def DEVICE_GetAPIVersion(self): + return "mock_rsa" diff --git a/src/scos_tekrsa/hardware/tekrsa_sigan.py b/src/scos_tekrsa/hardware/tekrsa_sigan.py index 4f378bc0..c2a8fb10 100644 --- a/src/scos_tekrsa/hardware/tekrsa_sigan.py +++ b/src/scos_tekrsa/hardware/tekrsa_sigan.py @@ -1,11 +1,11 @@ import logging import threading +from typing import Dict, Optional +from its_preselector.web_relay import WebRelay from scos_actions import utils -from scos_actions.hardware.sigan_iface import ( - SignalAnalyzerInterface, - sensor_calibration, -) +from scos_actions.calibration.calibration import Calibration +from scos_actions.hardware.sigan_iface import SignalAnalyzerInterface import scos_tekrsa.hardware.tekrsa_constants as rsa_constants from scos_tekrsa import __version__ as SCOS_TEKRSA_VERSION @@ -18,9 +18,14 @@ class TekRSASigan(SignalAnalyzerInterface): - def __init__(self): + def __init__( + self, + sensor_cal: Calibration = None, + sigan_cal: Calibration = None, + switches: Optional[Dict[str, WebRelay]] = None, + ): try: - super().__init__() + super().__init__(sensor_cal, sigan_cal, switches) logger.debug("Initializing Tektronix RSA Signal Analyzer") self._plugin_version = SCOS_TEKRSA_VERSION @@ -87,16 +92,16 @@ def connect(self): self.rsa.DEVICE_SearchAndConnect() except Exception as e: self._is_available = False - self.device_name = "NONE: Failed to connect to TekRSA" + self._model = "NONE: Failed to connect to TekRSA" logger.exception("Unable to connect to TEKRSA") raise e # Finish setup with either real or Mock RSA device - self.device_name = self.rsa.DEVICE_GetNomenclature() + self._model = self.rsa.DEVICE_GetNomenclature() + self._firmware_version = self.rsa.DEVICE_GetFWVersion() + self._api_version = self.rsa.DEVICE_GetAPIVersion() self.get_constraints() logger.debug("Using the following Tektronix RSA device:") - logger.debug( - f"{self.device_name} ({self.min_frequency}-{self.max_frequency} Hz)" - ) + logger.debug(f"{self._model} ({self.min_frequency}-{self.max_frequency} Hz)") # Populate instance variables for parameters on connect self._preamp_enable = self.preamp_enable self._attenuation = self.attenuation @@ -106,15 +111,25 @@ def connect(self): self._is_available = True @property - def is_available(self): + def is_available(self) -> bool: """Returns True if initialized and ready for measurements""" return self._is_available @property - def plugin_version(self): + def plugin_version(self) -> str: """Returns the current version of scos-tekrsa.""" return self._plugin_version + @property + def firmware_version(self) -> str: + """Returns the current firmware version of the connected RSA device.""" + return self._firmware_version + + @property + def api_version(self) -> str: + """Returns the version of the Tektronix RSA API for Linux currently in use.""" + return self._api_version + @property def sample_rate(self): self._iq_bandwidth, self._sample_rate = self.rsa.IQSTREAM_GetAcqParameters() @@ -198,7 +213,7 @@ def reference_level(self, reference_level): @property def attenuation(self): - if self.device_name not in ["RSA306B", "RSA306"]: + if self._model not in ["RSA306B", "RSA306"]: # API returns attenuation as negative value. Convert to positive. self._attenuation = abs(self.rsa.CONFIG_GetRFAttenuator()) else: @@ -209,7 +224,7 @@ def attenuation(self): @attenuation.setter def attenuation(self, attenuation): """Set device attenuation, in dB, for RSA 500/600 series devices""" - if self.device_name not in ["RSA306B", "RSA306"]: + if self._model not in ["RSA306B", "RSA306"]: if self.min_attenuation <= abs(attenuation) <= self.max_attenuation: self.rsa.CONFIG_SetAutoAttenuationEnable(False) # API requires attenuation set as a negative number. Convert to negative. @@ -228,7 +243,7 @@ def attenuation(self, attenuation): @property def preamp_enable(self): - if self.device_name not in ["RSA306B", "RSA306"]: + if self._model not in ["RSA306B", "RSA306"]: self._preamp_enable = self.rsa.CONFIG_GetRFPreampEnable() else: logger.debug("Tektronix RSA 300 series device has no built-in preamp.") @@ -237,7 +252,7 @@ def preamp_enable(self): @preamp_enable.setter def preamp_enable(self, preamp_enable): - if self.device_name not in ["RSA306B", "RSA306"]: + if self._model not in ["RSA306B", "RSA306"]: if self.preamp_enable != preamp_enable: logger.debug("Switching preamp to " + str(preamp_enable)) self.rsa.CONFIG_SetRFPreampEnable(preamp_enable) @@ -278,7 +293,7 @@ def acquire_time_domain_samples( if cal_adjust: # Get calibration data for acquisition if not (settings.RUNNING_TESTS or settings.MOCK_SIGAN): - cal_params = sensor_calibration.calibration_parameters + cal_params = self.sensor_calibration.calibration_parameters else: # Make it work for mock sigan/testing. Just match frequency. cal_params = [vars(self)["_frequency"]] @@ -369,7 +384,7 @@ def acquire_time_domain_samples( "sample_rate": self.rsa.IQSTREAM_GetAcqParameters()[1], "capture_time": self._capture_time, } - if self.device_name not in ["RSA306B", "RSA306"]: + if self._model not in ["RSA306B", "RSA306"]: measurement_result["attenuation"] = self.attenuation measurement_result["preamp_enable"] = self.preamp_enable return measurement_result diff --git a/src/scos_tekrsa/settings.py b/src/scos_tekrsa/settings.py index f01878bc..5258c535 100644 --- a/src/scos_tekrsa/settings.py +++ b/src/scos_tekrsa/settings.py @@ -2,7 +2,6 @@ import sys from pathlib import Path -from django.conf import settings from environs import Env from scos_actions.settings import * @@ -13,15 +12,9 @@ __cmd = Path(sys.argv[0]).name RUNNING_TESTS = "test" in __cmd - -if not settings.configured or not hasattr(settings, "MOCK_SIGAN"): - MOCK_SIGAN = env.bool("MOCK_SIGAN", default=False) or RUNNING_TESTS -else: - MOCK_SIGAN = settings.MOCK_SIGAN -if not settings.configured or not hasattr(settings, "MOCK_SIGAN_RANDOM"): - MOCK_SIGAN_RANDOM = env.bool("MOCK_SIGAN_RANDOM", default=False) -else: - MOCK_SIGAN_RANDOM = settings.MOCK_SIGAN_RANDOM - -if not settings.configured: +DEVICE_MODEL = env("DEVICE_MODEL", default="RSA507A") +MOCK_SIGAN = env.bool("MOCK_SIGAN", default=False) or RUNNING_TESTS +MOCK_SIGAN_RANDOM = env.bool("MOCK_SIGAN_RANDOM", default=False) +RUNNING_MIGRATIONS = env.bool("RUNNING_MIGRATIONS", default=False) +if RUNNING_TESTS: logging.basicConfig(level=logging.DEBUG) diff --git a/tests/test_calibration.py b/tests/test_calibration.py deleted file mode 100644 index 677e32aa..00000000 --- a/tests/test_calibration.py +++ /dev/null @@ -1,36 +0,0 @@ -import pytest -from scos_actions.calibration import get_sensor_calibration, get_sigan_calibration - -from scos_tekrsa.settings import CONFIG_DIR - - -class TestCalibration: - def test_sigan_calibration(self): - sigan_calibration = get_sigan_calibration( - CONFIG_DIR / "sigan_calibration_example.json" - ) - assert sigan_calibration is not None - assert isinstance(sigan_calibration.calibration_data, dict) - assert isinstance(sigan_calibration.last_calibration_datetime, str) - assert isinstance(sigan_calibration.calibration_parameters, list) - assert ( - sigan_calibration.calibration_data["14000000.0"]["3555000000"]["-25"][ - "true" - ]["0"]["noise_figure"] - == 5.0 - ) - - def test_sensor_calibration(self): - sensor_calibration = get_sensor_calibration( - CONFIG_DIR / "sensor_calibration_example.json" - ) - assert sensor_calibration is not None - assert ( - sensor_calibration.calibration_data["14000000.0"]["3555000000"]["-25"][ - "true" - ]["0"]["noise_figure"] - == 5.0 - ) - assert isinstance(sensor_calibration.calibration_data, dict) - assert isinstance(sensor_calibration.last_calibration_datetime, str) - assert isinstance(sensor_calibration.calibration_parameters, list) diff --git a/tests/test_tekrsa_sigan.py b/tests/test_tekrsa_sigan.py index bbd8fe5a..c464f89b 100644 --- a/tests/test_tekrsa_sigan.py +++ b/tests/test_tekrsa_sigan.py @@ -6,7 +6,7 @@ import pytest import scos_tekrsa.hardware.tekrsa_constants as rsa_constants -from scos_tekrsa.hardware import sigan +from scos_tekrsa import __version__ as SCOS_TEKRSA_VERSION from scos_tekrsa.hardware.mocks.rsa_block import ( MAX_CENTER_FREQ, MAX_IQ_BW, @@ -14,6 +14,7 @@ MIN_IQ_BW, TIMES_TO_FAIL, ) +from scos_tekrsa.hardware.tekrsa_sigan import TekRSASigan class TestTekRSA: @@ -25,7 +26,7 @@ def setup_mock_tekrsa(self): """Create mock Tektronix RSA 507A""" if self.setup_complete: return - self.rx = sigan + self.rx = TekRSASigan() self.CORRECT_ALLOWED_SR = rsa_constants.IQSTREAM_ALLOWED_SR self.CORRECT_ALLOWED_BW = rsa_constants.IQSTREAM_ALLOWED_BW self.CORRECT_SR_BW_MAP = rsa_constants.IQSTREAM_SR_BW_MAP @@ -64,6 +65,16 @@ def test_is_available(self): assert self.rx.is_available == True assert isinstance(self.rx.is_available, bool) + def test_plugin_version(self): + assert isinstance(self.rx.plugin_version, str) + assert self.rx.plugin_version == SCOS_TEKRSA_VERSION + + def test_firmware_version(self): + assert isinstance(self.rx.firmware_version, str) + + def test_api_version(self): + assert isinstance(self.rx.api_version, str) + def test_sample_rate(self): assert isinstance(self.rx.sample_rate, (float, int)) @@ -122,12 +133,12 @@ def test_attenuation(self): setattr(self.rx, "attenuation", self.rx.max_attenuation + 1) # Test handling for RSA without manual attenuator - old_dev_name = self.rx.device_name - setattr(self.rx, "device_name", "RSA306B") + old_dev_name = self.rx.model + setattr(self.rx, "model", "RSA306B") assert self.rx.attenuation is None setattr(self.rx, "attenuation", 50) assert self.rx.attenuation is None - setattr(self.rx, "device_name", old_dev_name) + setattr(self.rx, "model", old_dev_name) def test_preamp_enable(self): assert isinstance(self.rx.preamp_enable, bool) @@ -138,12 +149,12 @@ def test_preamp_enable(self): assert self.rx.preamp_enable == True # Test handling for RSA without preamp - old_dev_name = self.rx.device_name - setattr(self.rx, "device_name", "RSA306B") + old_dev_name = self.rx.model + setattr(self.rx, "model", "RSA306B") assert self.rx.preamp_enable is None setattr(self.rx, "preamp_enable", False) assert self.rx.preamp_enable is None - setattr(self.rx, "device_name", old_dev_name) + setattr(self.rx, "model", old_dev_name) def test_acquire_samples_retry(self): # Not enough retries = acquisition should fail @@ -182,8 +193,8 @@ def test_acquire_samples(self): assert isinstance(r["capture_time"], str) # Can't predict this value # Attenuation/preamp keys should not exist for RSA30X - old_dev_name = self.rx.device_name - setattr(self.rx, "device_name", "RSA306B") + old_dev_name = self.rx.model + setattr(self.rx, "model", "RSA306B") r = self.rx.acquire_time_domain_samples( int(self.rx.iq_bandwidth * 0.001), cal_adjust=False ) @@ -191,7 +202,7 @@ def test_acquire_samples(self): _ = r["attenuation"] with pytest.raises(KeyError): _ = r["preamp_enable"] - setattr(self.rx, "device_name", old_dev_name) + setattr(self.rx, "model", old_dev_name) # Acquire n_samps resulting in integer number of milliseconds for duration_ms in [1, 2, 3, 7, 10]: