{"action":"created","issue":{"url":"https://api.github.com/repos/martinisgroup/servers/issues/209","labels_url":"https://api.github.com/repos/martinisgroup/servers/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/martinisgroup/servers/issues/209/comments","events_url":"https://api.github.com/repos/martinisgroup/servers/issues/209/events","html_url":"https://github.com/martinisgroup/servers/issues/209","id":99498261,"number":209,"title":"TimeTrace testing","user":{"login":"Brian-Ballard","id":13558597,"avatar_url":"https://avatars.githubusercontent.com/u/13558597?v=3","gravatar_id":"","url":"https://api.github.com/users/Brian-Ballard","html_url":"https://github.com/Brian-Ballard","followers_url":"https://api.github.com/users/Brian-Ballard/followers","following_url":"https://api.github.com/users/Brian-Ballard/following{/other_user}","gists_url":"https://api.github.com/users/Brian-Ballard/gists{/gist_id}","starred_url":"https://api.github.com/users/Brian-Ballard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brian-Ballard/subscriptions","organizations_url":"https://api.github.com/users/Brian-Ballard/orgs","repos_url":"https://api.github.com/users/Brian-Ballard/repos","events_url":"https://api.github.com/users/Brian-Ballard/events{/privacy}","received_events_url":"https://api.github.com/users/Brian-Ballard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-06T18:34:55Z","updated_at":"2015-08-06T18:42:09Z","closed_at":null,"body":"When trying to run timetrace.py\r\n```python\r\ndef get_time_trace(board_name):\r\n    \"\"\"Get a time trace from an ADC board\r\n\r\n    Args:\r\n        board_name (str): Name of the ADC from which you want to geta time\r\n            trace. Check available boards by calling list_devices() on the fpga\r\n            server.\r\n\r\n    Returns:\r\n        Tuple (I (ndarray(int)), Q (ndarray(int))).\r\n    \"\"\"\r\n\t\r\n\t\r\n    with labrad.connect() as cxn:\r\n        fpga = cxn.ghz_fpgas\r\n        fpga.select_device(board_name)\r\n        data = fpga.adc_run_average()\r\n        return dataget\r\n```\r\n\r\nI can import labrad in my python console, but when i run timetrace.py i get the following dump:\r\n\r\n```\r\nIn [89]: timetrace.get_time_trace('abg ADC 1')\r\n---------------------------------------------------------------------------\r\nNameError                                 Traceback (most recent call last)\r\n<ipython-input-89-4df77d1f3411> in <module>()\r\n----> 1 timetrace.get_time_trace('abg ADC 1')\r\n\r\nC:\\users\\brian\\desktop\\ADC_Bringup\\timetrace.py in get_time_trace(board_name)\r\n    10         Tuple (I (ndarray(int)), Q (ndarray(int))).\r\n    11     \"\"\"\r\n---> 12         import labrad\r\n    13\r\n    14     with labrad.connect() as cxn:\r\n\r\nNameError: global name 'labrad' is not defined\r\n```\r\n\r\nWhen I run all of the included functions from the console including import labrad there is a problem with the arguments for the average function as below\r\n\r\n```\r\nIn [1]: import labrad\r\n\r\nIn [2]: cxn = labrad.connect()\r\n\r\nIn [3]: fpga = cxn.ghz_fpgas\r\n\r\nIn [4]: fpga.select_device('abg ADC 1')\r\nOut[4]: 'abg ADC 1'\r\n\r\nIn [5]: data = fpga.adc\r\nfpga.adc_bringup           fpga.adc_register_readback\r\nfpga.adc_demod_phase       fpga.adc_run_average\r\nfpga.adc_demod_range       fpga.adc_run_calibrate\r\nfpga.adc_filter_func       fpga.adc_run_demod\r\nfpga.adc_mixer_table       fpga.adc_run_mode\r\nfpga.adc_monitor_outputs   fpga.adc_trig_magnitude\r\nfpga.adc_recalibrate       fpga.adc_trigger_table\r\n\r\nIn [5]: data = fpga.adc_run_average()\r\n---------------------------------------------------------------------------\r\nError                                     Traceback (most recent call last)\r\n<ipython-input-5-5013ba07d162> in <module>()\r\n----> 1 data = fpga.adc_run_average()\r\n\r\nC:\\Users\\Brian\\Documents\\GitHub\\pylabrad\\labrad\\client.pyc in __call__(self, *ar\r\ngs, **kw)\r\n     63         if wrap:\r\n     64             future.addCallback(lambda resp: resp[0][1])\r\n---> 65         return future.wait() if wait else future\r\n     66\r\n     67     # data to be loaded on demand\r\n\r\nC:\\Users\\Brian\\Documents\\GitHub\\pylabrad\\labrad\\backend.pyc in wait(self)\r\n    396                 # If any Future in the queue fails,\r\n    397                 # we immediately bail.\r\n--> 398                 result.raiseException()\r\n    399             else:\r\n    400                 for func, args, kw in f.callbacks:\r\n\r\nC:\\Users\\Brian\\Anaconda\\lib\\site-packages\\twisted\\python\\failure.pyc in raiseExc\r\neption(self)\r\n\r\nError: (0) [GHz FPGAs] Remote Traceback (most recent call last):\r\n  File \"C:\\Users\\Brian\\Anaconda\\lib\\site-packages\\twisted\\internet\\defer.py\", li\r\nne 1128, in _inlineCallbacks\r\n    result = g.send(result)\r\n  File \"ghz_fpga_server.py\", line 2130, in adc_run_average\r\n    ans = yield dev.runAverage()\r\nexceptions.TypeError: runAverage() takes exactly 5 arguments (1 given)\r\n [payload=None]\r\n```"},"comment":{"url":"https://api.github.com/repos/martinisgroup/servers/issues/comments/128470659","html_url":"https://github.com/martinisgroup/servers/issues/209#issuecomment-128470659","issue_url":"https://api.github.com/repos/martinisgroup/servers/issues/209","id":128470659,"user":{"login":"DanielSank","id":4584456,"avatar_url":"https://avatars.githubusercontent.com/u/4584456?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielSank","html_url":"https://github.com/DanielSank","followers_url":"https://api.github.com/users/DanielSank/followers","following_url":"https://api.github.com/users/DanielSank/following{/other_user}","gists_url":"https://api.github.com/users/DanielSank/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielSank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielSank/subscriptions","organizations_url":"https://api.github.com/users/DanielSank/orgs","repos_url":"https://api.github.com/users/DanielSank/repos","events_url":"https://api.github.com/users/DanielSank/events{/privacy}","received_events_url":"https://api.github.com/users/DanielSank/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T18:42:09Z","updated_at":"2015-08-06T18:42:09Z","body":"@maffoo LOL I should have asked that. You'd think I'd have learned after yesterday's adventure with the registry editor :-)"}}