Skip to content
Snippets Groups Projects
Commit 6824353d authored by Sai Lakhan Ekal's avatar Sai Lakhan Ekal
Browse files

Added target accuracy in init function of VNA

parent c6e0a0fe
No related branches found
No related tags found
No related merge requests found
#!/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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment