if args.stepsleep and args.stepsleep >= 0: sleep_time_frequency_step = args.stepsleep logger.info("nfreq = " + str(frequencies_number)) logger.info("beginPower = " + str(frequencies_beginPower)) logger.info("endPower = " + str(frequencies_endPower)) """ Initialize oscilloscope for battery measurement """ while True: try: print "\n", "initializing USB instrument..." sOsci = USBTMCObject(USBInstruments['HALLE']['vendorID'], USBInstruments['HALLE']['productID'], USBInstruments['HALLE']['serialNo']) print "\tInstrument: " + str(sOsci.cmd_and_return("*IDN?")) OsciUSB.setup_measurement_mean(sOsci, channels=[1, 2], statistics=False, statistics_samples=-1) print "" break except LIB.Exceptions.USBException as e: print e time.sleep(5.0) pass """ Initialize FuncGen to feed lock in """ while args.external: try: print "\n", "initializing FUNC-GEN via socket..." sFuncGen = SocketObject(SocketInstruments['DS345_Fred']['IP'], SocketInstruments['DS345_Fred']['PORT'])