Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion ghzdac/calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import time
import numpy as np
import pyvisa
import labrad
from labrad.types import Value
import keys
Expand Down Expand Up @@ -672,7 +673,15 @@ def sidebandScanCarrier(cxn, scanparams, boardname, corrector, use_switch=True):
datapoint = [freq]
for sidebandfreq in sidebandfreqs:
print ' sideband frequency: %g GHz' % sidebandfreq
comp = sideband(uwaveSource, spec, fpga, corrector, freq, sidebandfreq)
success = False
while not success:
try:
comp = sideband(uwaveSource, spec, fpga, corrector, freq, sidebandfreq)
success = True
except pyvisa.errors.VisaIOError as e:
print e
print 'PyVISA Error Handled. Trying again.'
pass
datapoint += [np.real(comp), np.imag(comp)]
ds.add(datapoint)
freq += scanparams['sidebandCarrierStep']
Expand Down