Skip to content

Commit

Permalink
🧪 Working automatic measurement construction
Browse files Browse the repository at this point in the history
  • Loading branch information
daquintero committed Aug 2, 2024
1 parent c9ca610 commit fa39c24
Show file tree
Hide file tree
Showing 32 changed files with 19,017 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def create_calibration_vna_experiments(measurements: dict, **kwargs):
connections=experiment_connections,
index=i,
date_configured=str(datetime.now()),
measurement_configuration_list=[sparameter_measurement_configuration],
)

experiment_instances.append(experiment_measurement)
Expand All @@ -176,7 +177,7 @@ def create_calibration_vna_experiments(measurements: dict, **kwargs):
measurements=measurement_connections,
goal="Perform S-Parameter characterization of a PCB trace.",
)
vna_pcb_experiment
# vna_pcb_experiment

# Now, let's create an experiment `data` directory in which to save the data accordingly:

Expand All @@ -203,9 +204,29 @@ def create_calibration_vna_experiments(measurements: dict, **kwargs):
# !pwd $vna_pcb_experiment_directory
# !ls $vna_pcb_experiment_directory

# Now, let's save the experimental data in there accordingly.
# Now, let's save the experimental data in there accordingly. Once we save the data, we can recompose the data into measurement containers based on the `MeasurementConfigurationTypes` we defined for each `ExperimantInstance`.


example_measurement = pe.compose_measurement_from_experiment_instance(
vna_pcb_experiment.experiment_instances[1],
instance_directory=vna_pcb_experiment_directory / "1",
)
example_measurement

# However, we might want to compose our measurements into a `MeasurementCollection`:

vna_pcb_experiment_collection = pe.compose_measurement_collection_from_experiment(
vna_pcb_experiment,
experiment_directory=vna_pcb_experiment_directory,
)
vna_pcb_experiment_collection

pe.extract_data_from_measurement_collection(
measurement_collection=vna_pcb_experiment_collection,
# measurement_to_data_map: dict = measurement_to_data_map,
# measurement_to_data_method_map: dict = measurement_to_data_method_map,
)

# ## Time-Domain Analysis
#
# Let's consider we want to measure the propagation velocity of a pulse through one of our coaxial cables. If you are doing a similar experiment, make sure to use ground ESD straps to avoid damage to the equipment. As there is frequency dispersion in the RF transmission lines, we also know the time-domain response is different according to the type of signal applied to the device. We can compare an analysis between the different pulse frequencies.
Expand Down Expand Up @@ -402,10 +423,12 @@ def propagation_delay_experiment(square_wave_frequency_Hz_list: list[float] = No

# Now we need to write some functionality to extract the files stored in these files in a meaningful way. Fortunately, there's already some functionality using `piel` in this context:

calibration_propagation_delay_sweep_data = pe.types.PropagationDelayMeasurementSweep(
measurements=calibration_propagation_data,
calibration_propagation_delay_sweep_data = (
pe.types.PropagationDelayMeasurementCollection(
measurements=calibration_propagation_data,
)
)
pcb_propagation_delay_sweep_data = pe.types.PropagationDelayMeasurementSweep(
pcb_propagation_delay_sweep_data = pe.types.PropagationDelayMeasurementCollection(
measurements=pcb_propagation_data, name="frequency_sweep"
)

Expand Down
Loading

0 comments on commit fa39c24

Please sign in to comment.