From e845de2ff27e0ea9a8c49ce7d5bd502f6303ec4e Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 22 May 2017 19:17:23 +0800 Subject: [PATCH] remove aqcli_pdq2 --- artiq/frontend/aqcli_pdq2.py | 73 ----------------------------------- doc/manual/ndsp_reference.rst | 6 --- setup.py | 2 - 3 files changed, 81 deletions(-) delete mode 100755 artiq/frontend/aqcli_pdq2.py diff --git a/artiq/frontend/aqcli_pdq2.py b/artiq/frontend/aqcli_pdq2.py deleted file mode 100755 index bb0336cd9..000000000 --- a/artiq/frontend/aqcli_pdq2.py +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2012-2015 Robert Jordens - -import argparse - -from scipy import interpolate -import numpy as np - -from artiq.protocols.pc_rpc import Client -from artiq.tools import verbosity_args, init_logger - - -def get_argparser(): - parser = argparse.ArgumentParser(description="""PDQ2 client. - Evaluates times and voltages, interpolates and uploads - them to the controller.""") - parser.add_argument("-s", "--server", default="::1", - help="hostname or IP of the controller to connect to") - parser.add_argument("--port", default=3252, type=int, - help="TCP port to use to connect to the controller") - parser.add_argument("-c", "--channel", default=0, type=int, - help="channel: 3*board_num+dac_num [%(default)s]") - parser.add_argument("-f", "--frame", default=0, type=int, - help="frame [%(default)s]") - parser.add_argument("-t", "--times", default="np.arange(5)*1e-6", - help="sample times (s) [%(default)s]") - parser.add_argument("-u", "--voltages", - default="(1-np.cos(t/t[-1]*2*np.pi))/2", - help="sample voltages (V) [%(default)s]") - parser.add_argument("-o", "--order", default=3, type=int, - help="interpolation (0: const, 1: lin, 2: quad," - " 3: cubic) [%(default)s]") - parser.add_argument("-e", "--free", default=False, action="store_true", - help="software trigger [%(default)s]") - verbosity_args(parser) - return parser - - -def main(): - args = get_argparser().parse_args() - init_logger(args) - dev = Client(args.server, args.port, "pdq2") - - freq = dev.get_freq() - times = np.around(eval(args.times, globals(), {})*freq) - voltages = eval(args.voltages, globals(), dict(t=times/freq)) - - dt = np.diff(times.astype(np.int)) - if args.order: - tck = interpolate.splrep(times, voltages, k=args.order, s=0) - u = interpolate.spalde(times, tck) - else: - u = voltages[:, None] - segment = [] - for dti, ui in zip(dt, u): - segment.append({ - "duration": int(dti), - "channel_data": [{ - "bias": { - "amplitude": [float(uij) for uij in ui] - } - }] - }) - program = [[] for i in range(args.frame)] - program.append(segment) - dev.park() - dev.program(program, [args.channel]) - dev.unpark() - dev.cmd("TRIGGER", args.free) - - -if __name__ == "__main__": - main() diff --git a/doc/manual/ndsp_reference.rst b/doc/manual/ndsp_reference.rst index 1df1af2d6..de35007da 100644 --- a/doc/manual/ndsp_reference.rst +++ b/doc/manual/ndsp_reference.rst @@ -30,12 +30,6 @@ Controller :ref: artiq.frontend.aqctl_pdq2.get_argparser :prog: aqctl_pdq2 -Client -++++++ - -.. argparse:: - :ref: artiq.frontend.aqcli_pdq2.get_argparser - :prog: aqcli_pdq2 Lab Brick Digital Attenuator (LDA) ---------------------------------- diff --git a/setup.py b/setup.py index f644b863e..4b8d9665f 100755 --- a/setup.py +++ b/setup.py @@ -41,8 +41,6 @@ console_scripts = [ "aqctl_korad_ka3005p=artiq.frontend.aqctl_korad_ka3005p:main", "aqctl_pdq2=artiq.frontend.aqctl_pdq2:main", "aqctl_thorlabs_tcube=artiq.frontend.aqctl_thorlabs_tcube:main", - - "aqcli_pdq2=artiq.frontend.aqcli_pdq2:main", ] gui_scripts = [