diff --git a/docs/examples/07_full_flow_demo_electronic_photonic/07_full_flow_demo_electronic_photonic.py b/docs/examples/07_full_flow_demo_electronic_photonic/07_full_flow_demo_electronic_photonic.py index d20f2719..0e76b84f 100644 --- a/docs/examples/07_full_flow_demo_electronic_photonic/07_full_flow_demo_electronic_photonic.py +++ b/docs/examples/07_full_flow_demo_electronic_photonic/07_full_flow_demo_electronic_photonic.py @@ -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=[ @@ -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=[ diff --git a/docs/examples/08_basic_interconnection_modelling/08_basic_interconnection_modelling.py b/docs/examples/08_basic_interconnection_modelling/08_basic_interconnection_modelling.py index 603c2498..96de1749 100644 --- a/docs/examples/08_basic_interconnection_modelling/08_basic_interconnection_modelling.py +++ b/docs/examples/08_basic_interconnection_modelling/08_basic_interconnection_modelling.py @@ -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)) @@ -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", @@ -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", ) diff --git a/docs/examples/08a_pcb_interposer_characterisation/08a_pcb_interposer_characterisation.py b/docs/examples/08a_pcb_interposer_characterisation/08a_pcb_interposer_characterisation.py index 8f021ec6..7d391eb2 100644 --- a/docs/examples/08a_pcb_interposer_characterisation/08a_pcb_interposer_characterisation.py +++ b/docs/examples/08a_pcb_interposer_characterisation/08a_pcb_interposer_characterisation.py @@ -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, @@ -564,17 +564,21 @@ 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", + ) ) @@ -582,20 +586,24 @@ def calibration_propagation_delay_experiment( # 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) diff --git a/piel/experimental/__init__.py b/piel/experimental/__init__.py index e1d72a77..7a5283e8 100644 --- a/piel/experimental/__init__.py +++ b/piel/experimental/__init__.py @@ -1,4 +1,3 @@ -import piel.experimental.visual as visual import piel.experimental.types as types from piel.experimental.devices import DPO73304 diff --git a/piel/experimental/report/plots.py b/piel/experimental/report/plots.py index 395099cc..7c01095c 100644 --- a/piel/experimental/report/plots.py +++ b/piel/experimental/report/plots.py @@ -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( diff --git a/piel/experimental/visual/__init__.py b/piel/visual/experimental/__init__.py similarity index 91% rename from piel/experimental/visual/__init__.py rename to piel/visual/experimental/__init__.py index 3ee20816..bdf7e2f2 100644 --- a/piel/experimental/visual/__init__.py +++ b/piel/visual/experimental/__init__.py @@ -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, diff --git a/piel/experimental/visual/auto.py b/piel/visual/experimental/auto.py similarity index 97% rename from piel/experimental/visual/auto.py rename to piel/visual/experimental/auto.py index 3b2ddbe5..34d3cb9a 100644 --- a/piel/experimental/visual/auto.py +++ b/piel/visual/experimental/auto.py @@ -1,4 +1,4 @@ -from ...types import PathTypes +from piel.types import PathTypes from piel.types.experimental import ( MeasurementDataTypes, MeasurementDataCollectionTypes, @@ -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( diff --git a/piel/experimental/visual/dc/__init__.py b/piel/visual/experimental/dc/__init__.py similarity index 100% rename from piel/experimental/visual/dc/__init__.py rename to piel/visual/experimental/dc/__init__.py diff --git a/piel/experimental/visual/dc/experiment_data.py b/piel/visual/experimental/dc/experiment_data.py similarity index 100% rename from piel/experimental/visual/dc/experiment_data.py rename to piel/visual/experimental/dc/experiment_data.py diff --git a/piel/experimental/visual/dc/experiment_data_collection.py b/piel/visual/experimental/dc/experiment_data_collection.py similarity index 100% rename from piel/experimental/visual/dc/experiment_data_collection.py rename to piel/visual/experimental/dc/experiment_data_collection.py diff --git a/piel/experimental/visual/dc/measurement_data.py b/piel/visual/experimental/dc/measurement_data.py similarity index 100% rename from piel/experimental/visual/dc/measurement_data.py rename to piel/visual/experimental/dc/measurement_data.py diff --git a/piel/experimental/visual/dc/measurement_data_collection.py b/piel/visual/experimental/dc/measurement_data_collection.py similarity index 100% rename from piel/experimental/visual/dc/measurement_data_collection.py rename to piel/visual/experimental/dc/measurement_data_collection.py diff --git a/piel/experimental/visual/dc/parametric_experiment_data.py b/piel/visual/experimental/dc/parametric_experiment_data.py similarity index 100% rename from piel/experimental/visual/dc/parametric_experiment_data.py rename to piel/visual/experimental/dc/parametric_experiment_data.py diff --git a/piel/experimental/visual/frequency/__init__.py b/piel/visual/experimental/frequency/__init__.py similarity index 100% rename from piel/experimental/visual/frequency/__init__.py rename to piel/visual/experimental/frequency/__init__.py diff --git a/piel/experimental/visual/frequency/experiment_data.py b/piel/visual/experimental/frequency/experiment_data.py similarity index 100% rename from piel/experimental/visual/frequency/experiment_data.py rename to piel/visual/experimental/frequency/experiment_data.py diff --git a/piel/experimental/visual/frequency/experiment_data_collection.py b/piel/visual/experimental/frequency/experiment_data_collection.py similarity index 100% rename from piel/experimental/visual/frequency/experiment_data_collection.py rename to piel/visual/experimental/frequency/experiment_data_collection.py diff --git a/piel/experimental/visual/frequency/measurement_data.py b/piel/visual/experimental/frequency/measurement_data.py similarity index 100% rename from piel/experimental/visual/frequency/measurement_data.py rename to piel/visual/experimental/frequency/measurement_data.py diff --git a/piel/experimental/visual/frequency/measurement_data_collection.py b/piel/visual/experimental/frequency/measurement_data_collection.py similarity index 100% rename from piel/experimental/visual/frequency/measurement_data_collection.py rename to piel/visual/experimental/frequency/measurement_data_collection.py diff --git a/piel/experimental/visual/frequency/parametric_experiment_data.py b/piel/visual/experimental/frequency/parametric_experiment_data.py similarity index 100% rename from piel/experimental/visual/frequency/parametric_experiment_data.py rename to piel/visual/experimental/frequency/parametric_experiment_data.py diff --git a/piel/experimental/visual/map.py b/piel/visual/experimental/map.py similarity index 97% rename from piel/experimental/visual/map.py rename to piel/visual/experimental/map.py index 88bff3ab..cf90c99b 100644 --- a/piel/experimental/visual/map.py +++ b/piel/visual/experimental/map.py @@ -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]: diff --git a/piel/experimental/visual/oscilloscope/__init__.py b/piel/visual/experimental/oscilloscope/__init__.py similarity index 100% rename from piel/experimental/visual/oscilloscope/__init__.py rename to piel/visual/experimental/oscilloscope/__init__.py diff --git a/piel/experimental/visual/oscilloscope/experiment_data.py b/piel/visual/experimental/oscilloscope/experiment_data.py similarity index 100% rename from piel/experimental/visual/oscilloscope/experiment_data.py rename to piel/visual/experimental/oscilloscope/experiment_data.py diff --git a/piel/experimental/visual/oscilloscope/experiment_data_collection.py b/piel/visual/experimental/oscilloscope/experiment_data_collection.py similarity index 100% rename from piel/experimental/visual/oscilloscope/experiment_data_collection.py rename to piel/visual/experimental/oscilloscope/experiment_data_collection.py diff --git a/piel/experimental/visual/oscilloscope/measurement_data.py b/piel/visual/experimental/oscilloscope/measurement_data.py similarity index 100% rename from piel/experimental/visual/oscilloscope/measurement_data.py rename to piel/visual/experimental/oscilloscope/measurement_data.py diff --git a/piel/experimental/visual/oscilloscope/measurement_data_collection.py b/piel/visual/experimental/oscilloscope/measurement_data_collection.py similarity index 100% rename from piel/experimental/visual/oscilloscope/measurement_data_collection.py rename to piel/visual/experimental/oscilloscope/measurement_data_collection.py diff --git a/piel/experimental/visual/oscilloscope/parametric_experiment_data.py b/piel/visual/experimental/oscilloscope/parametric_experiment_data.py similarity index 100% rename from piel/experimental/visual/oscilloscope/parametric_experiment_data.py rename to piel/visual/experimental/oscilloscope/parametric_experiment_data.py diff --git a/piel/experimental/visual/propagation/__init__.py b/piel/visual/experimental/propagation/__init__.py similarity index 100% rename from piel/experimental/visual/propagation/__init__.py rename to piel/visual/experimental/propagation/__init__.py diff --git a/piel/experimental/visual/propagation/experiment_data.py b/piel/visual/experimental/propagation/experiment_data.py similarity index 100% rename from piel/experimental/visual/propagation/experiment_data.py rename to piel/visual/experimental/propagation/experiment_data.py diff --git a/piel/experimental/visual/propagation/experiment_data_collection.py b/piel/visual/experimental/propagation/experiment_data_collection.py similarity index 100% rename from piel/experimental/visual/propagation/experiment_data_collection.py rename to piel/visual/experimental/propagation/experiment_data_collection.py diff --git a/piel/experimental/visual/propagation/measurement_data.py b/piel/visual/experimental/propagation/measurement_data.py similarity index 100% rename from piel/experimental/visual/propagation/measurement_data.py rename to piel/visual/experimental/propagation/measurement_data.py diff --git a/piel/experimental/visual/propagation/measurement_data_collection.py b/piel/visual/experimental/propagation/measurement_data_collection.py similarity index 100% rename from piel/experimental/visual/propagation/measurement_data_collection.py rename to piel/visual/experimental/propagation/measurement_data_collection.py diff --git a/piel/experimental/visual/propagation/parametric_experiment_data.py b/piel/visual/experimental/propagation/parametric_experiment_data.py similarity index 100% rename from piel/experimental/visual/propagation/parametric_experiment_data.py rename to piel/visual/experimental/propagation/parametric_experiment_data.py diff --git a/tests/visual/test_table.py b/tests/visual/test_table.py index 37fce7d9..ac1cc9b5 100644 --- a/tests/visual/test_table.py +++ b/tests/visual/test_table.py @@ -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 # ) #