Skip to content

Commit

Permalink
more components
Browse files Browse the repository at this point in the history
  • Loading branch information
daquintero committed Jul 29, 2024
1 parent cf09060 commit 5e227be
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 19 deletions.
12 changes: 2 additions & 10 deletions piel/experimental/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import piel.experimental.types as types
import piel.experimental.visual as visual
import piel.experimental.models as models

from . import DPO73304

Expand All @@ -8,13 +9,4 @@
construct_experiment_structure,
)

from .models.cables import rg164
from .models.oscilloscope import create_two_port_oscilloscope
from .models.waveform_generator import create_one_port_square_wave_waveform_generator
from .models.rf_passives import create_power_splitter_1to2
from .models.rf_calibration import (
open_82052D,
short_82052D,
load_85052D,
through_85052D,
)

5 changes: 3 additions & 2 deletions piel/experimental/file_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,14 @@ def construct_experiment_directories(
parent_directory = return_path(parent_directory)
# Create the experiment directory
experiment_directory = parent_directory / experiment.name
directory_exists = create_new_directory(experiment_directory)

if directory_exists:
if experiment_directory.exists():
input(
"The directory already exists. Press enter to continue and overwrite all the json and configuration "
"files."
)
else:
create_new_directory(experiment_directory)

# Create the experiment.json file
experiment_json_path = experiment_directory / "experiment.json"
Expand Down
11 changes: 11 additions & 0 deletions piel/experimental/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# use experimental/__init__.py to import all the necessary modules and functions.
from .cables import rg164
from .oscilloscope import create_two_port_oscilloscope, DPO73304
from .waveform_generator import create_one_port_square_wave_waveform_generator, AWG70001A
from .rf_passives import create_power_splitter_1to2
from .rf_calibration import (
open_82052D,
short_82052D,
load_85052D,
through_85052D,
)
from .vna import E8364A
2 changes: 1 addition & 1 deletion piel/experimental/models/oscilloscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ def create_two_port_oscilloscope() -> Oscilloscope:
)


def create_DPO73304():
def DPO73304():
pass
2 changes: 1 addition & 1 deletion piel/experimental/models/vna.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import piel.experimental as pe


def create_E8364A() -> pe.types.VNA:
def E8364A() -> pe.types.VNA:
pass
2 changes: 1 addition & 1 deletion piel/experimental/models/waveform_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ def create_one_port_square_wave_waveform_generator(
)


def create_AWG70001A() -> WaveformGenerator:
def AWG70001A() -> WaveformGenerator:
pass
8 changes: 4 additions & 4 deletions piel/types/electrical/rf_calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@


class Short(PhysicalComponent):
ports = [PhysicalPort(name="SHORT", connector="SMA_3.5mm", manifold="82052D")]
ports: list[PhysicalPort] = [PhysicalPort(name="SHORT", connector="SMA_3.5mm", manifold="82052D")]


class Open(PhysicalComponent):
ports = [PhysicalPort(name="OPEN", connector="SMA_3.5mm", manifold="82052D")]
ports: list[PhysicalPort] = [PhysicalPort(name="OPEN", connector="SMA_3.5mm", manifold="82052D")]


class Load(PhysicalComponent):
ports = [PhysicalPort(name="LOAD", connector="SMA_3.5mm", manifold="82052D")]
ports: list[PhysicalPort] = [PhysicalPort(name="LOAD", connector="SMA_3.5mm", manifold="82052D")]


class Through(PhysicalComponent):
ports = [
ports: list[PhysicalPort] = [
PhysicalPort(name="IN", connector="SMA_3.5mm", manifold="82052D"),
PhysicalPort(name="OUT", connector="SMA_3.5mm", manifold="82052D"),
]

0 comments on commit 5e227be

Please sign in to comment.