Skip to content

Commit

Permalink
LCRmeter, SMU, SA -> fix GUI parameter loading errors
Browse files Browse the repository at this point in the history
  • Loading branch information
franz-sweepMe committed Jan 29, 2025
1 parent e629305 commit 5eb3f3e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
12 changes: 10 additions & 2 deletions src/LCRmeter-Simulation_Driver/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ def __init__(self) -> None:

self.use_list_sweep = False

# Measurement parameters
self.sweepmode = "Frequency in Hz"
self.stepmode = "None"
self.frequency = 1000
self.bias_mode = "Voltage bias"
self.bias = 1

# Device under test parameters
self.inductance = 4e-9 # H
self.capacitance = 4e-9 # F
Expand All @@ -58,9 +65,12 @@ def set_GUIparameter(self) -> dict: # noqa: N802
"""Return a dictionary with GUI parameters."""
return {
"SweepMode": ["Frequency in Hz"],
"SweepValue": ["List"],
"StepMode": ["None"],
"Frequency": 1000,
"OperatingMode": ["R-X"],
"ValueTypeBias": ["Voltage bias", "Current bias"],
"ValueBias": 1,

# List Sweep Parameters
"ListSweepCheck": True,
Expand Down Expand Up @@ -117,8 +127,6 @@ def handle_set_value(self, mode: str, value: float) -> None:

def call(self) -> list:
"""Simulate data and return as a list."""
self.bias = 1337

if self.use_list_sweep:
self.F = np.arange(100, 1000, 100)
self.R = self.F / np.amax(self.F) * 35 + 30
Expand Down
4 changes: 0 additions & 4 deletions src/SMU-Simulation_Diode/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ def set_GUIparameter(self) -> dict: # noqa: N802

def get_GUIparameter(self, parameter: dict) -> None: # noqa: N802
"""Receive the values of the GUI parameters that were set by the user in the SweepMe! GUI."""
self.sweepvalue = parameter["SweepValue"]

# self.four_wire = parameter['4wire']
# self.route_out = parameter['RouteOut']
self.source = parameter["SweepMode"]
self.protection = float(parameter["Compliance"])
self.speed = parameter["Speed"]
Expand Down
2 changes: 1 addition & 1 deletion src/SpectrumAnalyzer-Simulation_Driver/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def get_GUIparameter(self, parameter: dict) -> None: # noqa: N802
"""Handle GUI inputs."""
self.handle_frequency_input(parameter)

self.reference_level = float(parameter["Reference level in dBm:"])
self.reference_level = float(parameter["Reference level in dBm"])
self.resolution_bandwidth = self.bandwidth_resolution_values[parameter["Resolution bandwidth"]]
self.video_bandwidth = self.bandwidth_resolution_values[parameter["Video bandwidth"]]
self.return_max_hold = parameter["Max hold"]
Expand Down

0 comments on commit 5eb3f3e

Please # to comment.