Skip to content

Commit

Permalink
♻️ Reload python instances from metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
daquintero committed Aug 12, 2024
1 parent 37fa2e6 commit f571cbc
Show file tree
Hide file tree
Showing 61 changed files with 15,862 additions and 276 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def two_port_measurement_configuration(

# Now, we can create the experiment in there:

propagation_delay_experiment_directory = pe.construct_experiment_directories(
vna_self_calibration_experiment_directory = pe.construct_experiment_directories(
experiment=rf_vna_self_calibration,
parent_directory=experiment_data_directory,
)
Expand All @@ -363,10 +363,39 @@ def two_port_measurement_configuration(

rf_vna_self_calibration_data = pe.extract_data_from_experiment(
experiment=rf_vna_self_calibration,
experiment_directory=propagation_delay_experiment_directory,
experiment_directory=vna_self_calibration_experiment_directory,
)
rf_vna_self_calibration_data.data

# ```python
# [VNASParameterMeasurementData(name='through_port_12', network=2-Port Network: 'through_port_12', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j]),
# VNASParameterMeasurementData(name='open_port_1', network=2-Port Network: 'open_port_1', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j]),
# VNASParameterMeasurementData(name='open_port_2', network=2-Port Network: 'open_port_2', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j]),
# VNASParameterMeasurementData(name='load_port_1', network=2-Port Network: 'load_port_1', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j]),
# VNASParameterMeasurementData(name='load_port_2', network=2-Port Network: 'load_port_2', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j]),
# VNASParameterMeasurementData(name='short_port_1', network=2-Port Network: 'short_port_1', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j]),
# VNASParameterMeasurementData(name='short_port_2', network=2-Port Network: 'short_port_2', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j])]
# ```

# We could simply skip all of this and extract the data directly from the directory. Note that we don't always have to work from the same python instance as we can reload the classes (with some caveats) from the metadata.

reinstantiated_vna_self_calibration_experiment_data = (
pe.load_experiment_data_from_directory(
experiment_directory=vna_self_calibration_experiment_directory,
)
)
reinstantiated_vna_self_calibration_experiment_data.data

# ```python
# [VNASParameterMeasurementData(name='through_port_12', network=2-Port Network: 'through_port_12', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j]),
# VNASParameterMeasurementData(name='open_port_1', network=2-Port Network: 'open_port_1', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j]),
# VNASParameterMeasurementData(name='open_port_2', network=2-Port Network: 'open_port_2', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j]),
# VNASParameterMeasurementData(name='load_port_1', network=2-Port Network: 'load_port_1', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j]),
# VNASParameterMeasurementData(name='load_port_2', network=2-Port Network: 'load_port_2', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j]),
# VNASParameterMeasurementData(name='short_port_1', network=2-Port Network: 'short_port_1', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j]),
# VNASParameterMeasurementData(name='short_port_2', network=2-Port Network: 'short_port_2', 45000000.0-20000000000.0 Hz, 6401 pts, z0=[50.+0.j 50.+0.j])]
# ```

# Now, we can begin plotting this data in multiple ways:

# ### A HW Calibrated Open-Measurement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2300,3 +2300,246 @@
- **frequency_range_Hz**: None
- **sweep_points**: None
- **test_port_power_dBm**: None


## Schema
- **name**: through_port_12
- **components**:
-
- **name**: through_82052D
- **ports**:
-
- **name**: IN
- **parent_component_name**: None
- **domain**: None
- **connector**: SMA_3.5mm
- **manifold**: 82052D
-
- **name**: OUT
- **parent_component_name**: None
- **domain**: None
- **connector**: SMA_3.5mm
- **manifold**: 82052D
- **connections**: None
- **components**:
- **environment**: None
- **manufacturer**: Agilent
- **model**: 85052D
-
- **name**: E8364A
- **ports**:
-
- **name**: PORT1
- **parent_component_name**: None
- **domain**: RF
- **connector**: None
- **manifold**: None
-
- **name**: PORT2
- **parent_component_name**: None
- **domain**: RF
- **connector**: None
- **manifold**: None
- **connections**: None
- **components**:
- **environment**: None
- **manufacturer**: Agilent
- **model**: E8364A
- **configuration**:
- **calibration_setting_name**: bpl_vna_ports
- **measurement_configuration**: None
- **connections**:
-
- **name**: None
- **ports**:
-
- **name**: PORT1
- **parent_component_name**: None
-
- **name**: IN
- **parent_component_name**: None
-
- **name**: None
- **ports**:
-
- **name**: PORT2
- **parent_component_name**: None
-
- **name**: OUT
- **parent_component_name**: None
- **goal**:
- **parameters**:
- **index**: None
- **date_configured**:
- **date_measured**:
- **measurement_configuration_list**:
-
- **name**: None
- **parent_directory**: None
- **measurement_type**: None
- **measurement_configuration_type**: VNASParameterMeasurementConfiguration
- **frequency_range_Hz**: None
- **sweep_points**: None
- **test_port_power_dBm**: None


## Schema
- **name**: through_port_12
- **components**:
-
- **name**: through_82052D
- **ports**:
-
- **name**: IN
- **parent_component_name**: None
- **domain**: None
- **connector**: SMA_3.5mm
- **manifold**: 82052D
-
- **name**: OUT
- **parent_component_name**: None
- **domain**: None
- **connector**: SMA_3.5mm
- **manifold**: 82052D
- **connections**: None
- **components**:
- **environment**: None
- **manufacturer**: Agilent
- **model**: 85052D
-
- **name**: E8364A
- **ports**:
-
- **name**: PORT1
- **parent_component_name**: None
- **domain**: RF
- **connector**: None
- **manifold**: None
-
- **name**: PORT2
- **parent_component_name**: None
- **domain**: RF
- **connector**: None
- **manifold**: None
- **connections**: None
- **components**:
- **environment**: None
- **manufacturer**: Agilent
- **model**: E8364A
- **configuration**:
- **calibration_setting_name**: bpl_vna_ports
- **measurement_configuration**: None
- **connections**:
-
- **name**: None
- **ports**:
-
- **name**: PORT1
- **parent_component_name**: None
-
- **name**: IN
- **parent_component_name**: None
-
- **name**: None
- **ports**:
-
- **name**: PORT2
- **parent_component_name**: None
-
- **name**: OUT
- **parent_component_name**: None
- **goal**:
- **parameters**:
- **index**: None
- **date_configured**:
- **date_measured**:
- **measurement_configuration_list**:
-
- **name**: None
- **parent_directory**: None
- **measurement_type**: None
- **measurement_configuration_type**: VNASParameterMeasurementConfiguration
- **frequency_range_Hz**: None
- **sweep_points**: None
- **test_port_power_dBm**: None


## Schema
- **name**: through_port_12
- **components**:
-
- **name**: through_82052D
- **ports**:
-
- **name**: IN
- **parent_component_name**: None
- **domain**: None
- **connector**: SMA_3.5mm
- **manifold**: 82052D
-
- **name**: OUT
- **parent_component_name**: None
- **domain**: None
- **connector**: SMA_3.5mm
- **manifold**: 82052D
- **connections**: None
- **components**:
- **environment**: None
- **manufacturer**: Agilent
- **model**: 85052D
-
- **name**: E8364A
- **ports**:
-
- **name**: PORT1
- **parent_component_name**: None
- **domain**: RF
- **connector**: None
- **manifold**: None
-
- **name**: PORT2
- **parent_component_name**: None
- **domain**: RF
- **connector**: None
- **manifold**: None
- **connections**: None
- **components**:
- **environment**: None
- **manufacturer**: Agilent
- **model**: E8364A
- **configuration**:
- **calibration_setting_name**: bpl_vna_ports
- **measurement_configuration**: None
- **connections**:
-
- **name**: None
- **ports**:
-
- **name**: PORT1
- **parent_component_name**: None
-
- **name**: IN
- **parent_component_name**: None
-
- **name**: None
- **ports**:
-
- **name**: PORT2
- **parent_component_name**: None
-
- **name**: OUT
- **parent_component_name**: None
- **goal**:
- **parameters**:
- **index**: None
- **date_configured**:
- **date_measured**:
- **measurement_configuration_list**:
-
- **name**: None
- **parent_directory**: None
- **measurement_type**: None
- **measurement_configuration_type**: VNASParameterMeasurementConfiguration
- **frequency_range_Hz**: None
- **sweep_points**: None
- **test_port_power_dBm**: None
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,17 @@
]
}
],
"goal": null,
"parameters": null,
"goal": "",
"parameters": {},
"index": null,
"date_configured": null,
"date_measured": null,
"date_configured": "",
"date_measured": "",
"measurement_configuration_list": [
{
"name": null,
"parent_directory": null,
"measurement_type": null,
"measurement_configuration_type": "VNASParameterMeasurementConfiguration",
"frequency_range_Hz": null,
"sweep_points": null,
"test_port_power_dBm": null
Expand Down
Loading

0 comments on commit f571cbc

Please sign in to comment.