Commit 3489d78d authored by Romain Baptiste Dominique Albert's avatar Romain Baptiste Dominique Albert
Browse files

Bugfix for the phase shifter

parent c9313696
......@@ -113,10 +113,11 @@ class PS(object):
Frequency in Hz. Use '?' to query current value.
"""
resp = self.instr.frequency(frequency)
# Update database values
if str(frequency) != "?":
if str(frequency) != "?" and str(frequency) != "min?" and str(frequency) != "max?":
update_db(self)
# Return value
......@@ -131,10 +132,11 @@ class PS(object):
Phase in degree. Use '?' to query current value.
"""
resp = self.instr.phase(phase)
# Update database values
if str(phase) != "?":
if str(phase) != "?" and str(phase) != "min?" and str(phase) != "max?" and str(phase) != "step?":
update_db(self)
# Return value
......@@ -142,12 +144,7 @@ class PS(object):
# Database functions #######################################################
def get_parameters(self):
d = {'Phase': '{} degree'.format(self.phase()),
'Frequency': '{} Hz'.format(self.frequency()),
'Minimum frequency': '{} Hz'.format(self.frequency('min?')),
'Maximum frequency': '{} Hz'.format(self.frequency('max?')),
'Minimum phase': '{} degree'.format(self.phase('min?')),
'Maximum phase': '{} degree'.format(self.phase('max?')),
'Step phase': '{} degree'.format(self.phase('step?')),
}
'Frequency': '{} Hz'.format(self.frequency())}
return d
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