Skip to content

Commit

Permalink
status
Browse files Browse the repository at this point in the history
  • Loading branch information
daquintero committed Sep 10, 2024
1 parent be557bc commit bea2975
Show file tree
Hide file tree
Showing 33 changed files with 41 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def create_switch_fabric():

# +
# # Current work in progress move this out of here.
# simple_ideal_o4_mzi_2x2_plots = piel.visual.plot_simple_multi_row(
# simple_ideal_o4_mzi_2x2_plots = piel.experimental.plot_simple_multi_row(
# files=mzi2x2_simple_simulation_data_lines,
# x_axis_column_name="t",
# row_list=[
Expand Down Expand Up @@ -487,13 +487,13 @@ def create_switch_fabric():
# mzi2x2_simple_simulation_data["output_amplitude_array_1"] = output_amplitude_array_1
# mzi2x2_simple_simulation_data

# mzi2x2_simple_simulation_data_lines = piel.visual.points_to_lines_fixed_transient(
# mzi2x2_simple_simulation_data_lines = piel.experimental.points_to_lines_fixed_transient(
# files=mzi2x2_simple_simulation_data,
# time_index_name="t",
# fixed_transient_time=1,
# )

# simple_ideal_o3_mzi_2x2_plots = piel.visual.plot_simple_multi_row(
# simple_ideal_o3_mzi_2x2_plots = piel.experimental.plot_simple_multi_row(
# files=mzi2x2_simple_simulation_data_lines,
# x_axis_column_name="t",
# row_list=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ def two_port_measurement_configuration(
#
# We can, for example, also use the data directly without having to use any `piel` data structures. This can be useful if you want to use this functionality to create the metadata and directories but not interact with other functionality in the package.
#
# You might, for example, already have a stylesheet for your project and don't want to deviate from this when using `scikit-rf`. This unfortunately requires some tweaking as many of the `scikit-rf` plotting functionality may simply not look nice enough accordingly. You can also activate your styles, in our case `piel.visual.styles.activate_piel_styles` would activate `piel` styling functionality.
# You might, for example, already have a stylesheet for your project and don't want to deviate from this when using `scikit-rf`. This unfortunately requires some tweaking as many of the `scikit-rf` plotting functionality may simply not look nice enough accordingly. You can also activate your styles, in our case `piel.experimental.styles.activate_piel_styles` would activate `piel` styling functionality.

pv.style.activate_piel_styles()
fig, axs = plt.subplots(2, 1, figsize=(10, 6))
Expand Down Expand Up @@ -507,7 +507,7 @@ def two_port_measurement_configuration(

# You can implement a very similar functionality directly with `piel`. Note that you need to import the corresponding function from the type of data input you want to provide, in order for the function to compile the corresponding inputs and `metadata` from the current location. In this case, it is from a `MeasurementDataCollection`

pe.visual.frequency.measurement_data_collection.plot_s_parameter_per_component(
piel.visual.experimental.frequency.measurement_data_collection.plot_s_parameter_per_component(
data_collection=reinstantiated_vna_self_calibration_experiment_data.data,
parameters_list=reinstantiated_vna_self_calibration_experiment_data.experiment.parameters_list,
s_parameter_plot="plot_s_db",
Expand All @@ -526,7 +526,7 @@ def two_port_measurement_configuration(
#
# For example, you can simply plot directly from a provided `ExperimentData` accordingly too.

pe.visual.frequency.experiment_data.plot_s_parameter_real_and_imaginary(
piel.visual.experimental.frequency.experiment_data.plot_s_parameter_real_and_imaginary(
rf_vna_self_calibration_data,
path="../../_static/img/examples/08_basic_interconnection_modelling/s_parameter_re_im_vna_calibration_experiment_data_collection.jpg",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def create_calibration_vna_experiments(measurements: dict, **kwargs):

# Now this is not particularly useful on its own. It'd be nicer if we can do some more programmatic analysis our our sweep data.

pe.visual.frequency.measurement_data_collection.plot_s_parameter_measurements_to_step_responses(
piel.visual.experimental.frequency.measurement_data_collection.plot_s_parameter_measurements_to_step_responses(
data_collection=s_parameter_measurement_data_sweep,
parameters_list=vna_pcb_experiment.parameters_list,
network_port_index=0,
Expand Down Expand Up @@ -564,38 +564,46 @@ def calibration_propagation_delay_experiment(
# First, we will split the signal generator signal through two paths and see them in the oscillscope. They should overlap each other perfectly. Both signals are terminated at the oscilloscope inputs in order to get an exact rising edge.


fig, ax = pe.visual.propagation.experiment_data.plot_propagation_signals_time(
calibration_propagation_delay_experiment_data,
path="../../_static/img/examples/08a_pcb_interposer_characterisation/calibration_propagation_delay_signals.jpg",
debug=True,
fig, ax = (
piel.visual.experimental.propagation.experiment_data.plot_propagation_signals_time(
calibration_propagation_delay_experiment_data,
path="../../_static/img/examples/08a_pcb_interposer_characterisation/calibration_propagation_delay_signals.jpg",
debug=True,
)
)

# ![calibration_propagation_delay_signals](../../_static/img/examples/08a_pcb_interposer_characterisation/calibration_propagation_delay_signals.jpg)

fig, ax = pe.visual.propagation.experiment_data.plot_propagation_signals_time(
pcb_propagation_delay_experiment_data,
path="../../_static/img/examples/08a_pcb_interposer_characterisation/pcb_propagation_delay_signals.jpg",
fig, ax = (
piel.visual.experimental.propagation.experiment_data.plot_propagation_signals_time(
pcb_propagation_delay_experiment_data,
path="../../_static/img/examples/08a_pcb_interposer_characterisation/pcb_propagation_delay_signals.jpg",
)
)


# ![pcb_propagation_delay_signals](../../_static/img/examples/08a_pcb_interposer_characterisation/pcb_propagation_delay_signals.jpg)

# We can also plot the data related to the metrics extracted from the measurements.

fig, ax = pe.visual.propagation.experiment_data.plot_signal_propagation_measurements(
calibration_propagation_delay_experiment_data,
x_parameter="square_wave_frequency_Hz",
measurement_name="delay_ch1_ch2__s_2",
path="../../_static/img/examples/08a_pcb_interposer_characterisation/calibration_propagation_delay_measurements.jpg",
fig, ax = (
piel.visual.experimental.propagation.experiment_data.plot_signal_propagation_measurements(
calibration_propagation_delay_experiment_data,
x_parameter="square_wave_frequency_Hz",
measurement_name="delay_ch1_ch2__s_2",
path="../../_static/img/examples/08a_pcb_interposer_characterisation/calibration_propagation_delay_measurements.jpg",
)
)

# ![calibration_propagation_delay_measurements](../../_static/img/examples/08a_pcb_interposer_characterisation/calibration_propagation_delay_measurements.jpg)

fig, ax = pe.visual.propagation.experiment_data.plot_signal_propagation_measurements(
pcb_propagation_delay_experiment_data,
x_parameter="square_wave_frequency_Hz",
measurement_name="delay_ch1_ch2__s_1",
path="../../_static/img/examples/08a_pcb_interposer_characterisation/pcb_propagation_delay_measurements.jpg",
fig, ax = (
piel.visual.experimental.propagation.experiment_data.plot_signal_propagation_measurements(
pcb_propagation_delay_experiment_data,
x_parameter="square_wave_frequency_Hz",
measurement_name="delay_ch1_ch2__s_1",
path="../../_static/img/examples/08a_pcb_interposer_characterisation/pcb_propagation_delay_measurements.jpg",
)
)

# ![pcb_propagation_delay_measurements](../../_static/img/examples/08a_pcb_interposer_characterisation/pcb_propagation_delay_measurements.jpg)
Expand Down
1 change: 0 additions & 1 deletion piel/experimental/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import piel.experimental.visual as visual
import piel.experimental.types as types

from piel.experimental.devices import DPO73304
Expand Down
2 changes: 1 addition & 1 deletion piel/experimental/report/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from ...file_system import return_path
from piel.types.experimental import ExperimentData
from ..measurements.data.extract import load_experiment_data_from_directory
from ..visual import auto_plot_from_experiment_data
from piel.visual.experimental import auto_plot_from_experiment_data


def create_plots_from_experiment_data(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
)

# TODO depreciate this
# from piel.measurement.visual.dc.dc import plot_dc_sweep, plot_dc_sweeps
# from piel.measurement.visual.propagation.propagation import (
# from piel.measurement.experimental.dc.dc import plot_dc_sweep, plot_dc_sweeps
# from piel.measurement.experimental.propagation.propagation import (
# plot_signal_propagation_measurements,
# plot_propagation_signals_time,
# )
# from piel.measurement.visual.frequency.frequency import (
# from piel.measurement.experimental.frequency.frequency import (
# plot_s_parameter_measurements_to_step_responses,
# plot_s_parameter_real_and_imaginary,
# plot_s_parameter_per_component,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ...types import PathTypes
from piel.types import PathTypes
from piel.types.experimental import (
MeasurementDataTypes,
MeasurementDataCollectionTypes,
Expand All @@ -9,10 +9,10 @@
measurement_data_to_plot_map,
measurement_data_collection_to_plot_suffix_map,
)
from ..analysis.operating_point import (
from piel.experimental.analysis.operating_point import (
create_experiment_data_collection_from_unique_parameters,
)
from ...file_system import return_path
from piel.file_system import return_path


def auto_plot_from_measurement_data(
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from piel.visual.experimental import frequency, propagation
import inspect
from piel.experimental.visual import propagation, frequency


def auto_function_list_from_module(module) -> list[callable]:
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_create_axes_parameters_table_overlay():
# axs[2].legend()
#
# # Insert tables and adjust subplot positions
# piel.visual.create_axes_parameters_tables_separate(
# piel.experimental.create_axes_parameters_tables_separate(
# fig, axs, tables_list, table_height=0.15, spacing=0.005
# )
#
Expand Down

0 comments on commit bea2975

Please sign in to comment.