Commit 9a1484eb authored by Christian Schneider's avatar Christian Schneider
Browse files

Fixed bugs and tested

parent 06702a41
......@@ -148,8 +148,8 @@ class DA(object):
# Database functions #######################################################
def get_parameters(self):
d = {'Attenuation': '{:.0f} dB'.format(self.attenuation()),
'Deviation': '{:.2f} dB'.format(self.deviation()),
d = {'Attenuation': '{:.1f} dB'.format(self.attenuation()),
'Deviation': '{} dB'.format(self.deviation()),
'Maximum Attenuation': ('{:.0f} dB'
.format(self.instr.max_attenuation)),
'Maximum Frequency': ('{:.0f} GHz'
......
......@@ -36,7 +36,8 @@ class RCDAT(object):
self._inst = rm.open_resource('TCPIP0::{}::SOCKET'.format(ip))
# Correct for bug in minicircuits communication implementation
self._inst.read_termination = '\n\r'
self._inst.read_termination = '\r'
self._inst.read()
def com(self, command, arg="?"):
"""Function to communicate with the device. Gives the current status
......@@ -44,7 +45,7 @@ class RCDAT(object):
if arg == "?":
resp = self._inst.query("{}?".format(command))
try:
return float(resp)
return float(resp.strip('\n'))
except:
return resp.strip('\n')
......@@ -106,7 +107,7 @@ class RCDAT(object):
# Query current value
else:
return self.com('ATT')
return self.com(':ATT')
def set_offset(self, offset='?'):
pass
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment