Exemple #1
0
def startup():
    global f
    global ADC

    # Setup Logging
    logging.basicConfig(level=logging.INFO, stream=sys.stdout)

    setup_BB.setup_BB_slots()

    AWG.start(**config.hardware['AWG'])  # start AWG

    args = config.test_params.copy()
    args.update(config.hardware['AWG'])

    if os.path.isfile("current.calib"):
        f = open("current.calib", "r")
        content = f.read()
        f.close()
        args.update(eval(content))
        metadata = args.pop("metadata")
        if not config.hardware["ADC"]["raw_file"] == "":
            f = open("%s.metadata" % (config.hardware["ADC"]["raw_file"]), "w")
            f.write(str(metadata))
            f.close()

    logging.info("[LOGGER] Starting the AWG")
    AWG.configure2SineWave(**args)  # configure for 2 sinewaves

    logging.info("[LOGGER] Setting up analogue amplification")
    analogue_IO.enable(**config.hardware['IO'])  # enable TX on analogue board

    logging.info("[LOGGER] Loading ADC PRU code")
    ADC = follower.follower()
    logging.info("[LOGGER] TX Power on and start sampling")
    ADC.power_on()
Exemple #2
0
def startup():
  global f
  global ADC

  # Setup Logging
  logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)

  setup_BB.setup_BB_slots()

  AWG.start(**config.hardware['AWG']) # start AWG

  args=config.test_params.copy()
  args.update(config.hardware['AWG'])
  logging.info("[CALIBRATION] Starting the AWG")
  AWG.configure2SineWave(**args) # configure for 2 sinewaves
Exemple #3
0
def startup():
  global f
  global ADC

  # Setup Logging
  logging.basicConfig(level=logging.INFO, stream=sys.stdout)

  setup_BB.setup_BB_slots()

  AWG.start(**config.hardware['AWG']) # start AWG

  args=config.test_params.copy()
  args.update(config.hardware['AWG'])

  if os.path.isfile("current.calib"):
    f = open("current.calib", "r")
    content = f.read()
    f.close()
    args.update(eval(content))
    metadata = args.pop("metadata")
    if not config.hardware["ADC"]["raw_file"] == "":
      f = open("%s.metadata" % (config.hardware["ADC"]["raw_file"]), "w")
      f.write(str(metadata))
      f.close()


  logging.info("[LOGGER] Starting the AWG")
  AWG.configure2SineWave(**args) # configure for 2 sinewaves

  logging.info("[LOGGER] Setting up analogue amplification")
  analogue_IO.enable(**config.hardware['IO']) # enable TX on analogue board

  logging.info("[LOGGER] Loading ADC PRU code")
  ADC = follower.follower()
  logging.info("[LOGGER] TX Power on and start sampling")
  ADC.power_on()