From 6824353de17c019b26b1569cf7fbd535038d6a5b Mon Sep 17 00:00:00 2001 From: Sai Lakhan Ekal <sai.lakhan.ekal@desy.de> Date: Wed, 17 Aug 2022 12:36:08 +0200 Subject: [PATCH] Added target accuracy in init function of VNA --- Python_script/VNA.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Python_script/VNA.py b/Python_script/VNA.py index 6507239..6707673 100755 --- a/Python_script/VNA.py +++ b/Python_script/VNA.py @@ -1,18 +1,18 @@ #!/usr/bin/python3 import pyvisa -from VNA_dummy import VnaDummy +import VNA_dummy -def create_vna(hostname): +def create_vna(hostname, target_accuracy): if hostname == 'localhost': - return VnaDummy(hostname) + return VNA_dummy.get_vna_dummy(target_accuracy) else: - return Vna(hostname) + return Vna(hostname, target_accuracy) class Vna: - def __init__(self, ip_address): + def __init__(self, ip_address, target_accuracy): """ Implements the basic operation of the VNA @@ -21,6 +21,7 @@ class Vna: # store the credentials so that methods can access them self.__ip_address = ip_address + self.target_accuracy = target_accuracy # we try to connect to the VNA just to see if there is an error self.rm = pyvisa.ResourceManager() -- GitLab