NotebookGUI-checkpoint.ipynb 33.5 KB
Newer Older
Nick Sauerwein's avatar
Nick Sauerwein committed
1 2 3 4
{
 "cells": [
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
5
   "execution_count": 1,
Nick Sauerwein's avatar
Nick Sauerwein committed
6
   "metadata": {
7 8
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
9
   },
10 11
   "outputs": [
    {
Nick Sauerwein's avatar
Nick Sauerwein committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
     "ename": "ModuleNotFoundError",
     "evalue": "No module named 'PyQt4'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mModuleNotFoundError\u001b[0m                       Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-1-b7a40c77b78a>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m      9\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     10\u001b[0m \u001b[0mget_ipython\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmagic\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'autoreload 2'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 11\u001b[0;31m \u001b[0mget_ipython\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmagic\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'matplotlib qt'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py\u001b[0m in \u001b[0;36mmagic\u001b[0;34m(self, arg_s)\u001b[0m\n\u001b[1;32m   2156\u001b[0m         \u001b[0mmagic_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0m_\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmagic_arg_s\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0marg_s\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpartition\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m' '\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   2157\u001b[0m         \u001b[0mmagic_name\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmagic_name\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlstrip\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mprefilter\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mESC_MAGIC\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2158\u001b[0;31m         \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun_line_magic\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmagic_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmagic_arg_s\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   2159\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   2160\u001b[0m     \u001b[0;31m#-------------------------------------------------------------------------\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py\u001b[0m in \u001b[0;36mrun_line_magic\u001b[0;34m(self, magic_name, line)\u001b[0m\n\u001b[1;32m   2077\u001b[0m                 \u001b[0mkwargs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'local_ns'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msys\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_getframe\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstack_depth\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mf_locals\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   2078\u001b[0m             \u001b[0;32mwith\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbuiltin_trap\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2079\u001b[0;31m                 \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   2080\u001b[0m             \u001b[0;32mreturn\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   2081\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m<decorator-gen-104>\u001b[0m in \u001b[0;36mmatplotlib\u001b[0;34m(self, line)\u001b[0m\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/IPython/core/magic.py\u001b[0m in \u001b[0;36m<lambda>\u001b[0;34m(f, *a, **k)\u001b[0m\n\u001b[1;32m    186\u001b[0m     \u001b[0;31m# but it's overkill for just that one bit of state.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    187\u001b[0m     \u001b[0;32mdef\u001b[0m \u001b[0mmagic_deco\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 188\u001b[0;31m         \u001b[0mcall\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0ma\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mk\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    189\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    190\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mcallable\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0marg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/IPython/core/magics/pylab.py\u001b[0m in \u001b[0;36mmatplotlib\u001b[0;34m(self, line)\u001b[0m\n\u001b[1;32m     98\u001b[0m             \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Available matplotlib backends: %s\"\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0mbackends_list\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     99\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 100\u001b[0;31m             \u001b[0mgui\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbackend\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mshell\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0menable_matplotlib\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgui\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    101\u001b[0m             \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_show_matplotlib_backend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgui\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbackend\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    102\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py\u001b[0m in \u001b[0;36menable_matplotlib\u001b[0;34m(self, gui)\u001b[0m\n\u001b[1;32m   2945\u001b[0m                 \u001b[0mgui\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbackend\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfind_gui_and_backend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpylab_gui_select\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   2946\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 2947\u001b[0;31m         \u001b[0mpt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mactivate_matplotlib\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbackend\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   2948\u001b[0m         \u001b[0mpt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconfigure_inline_support\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbackend\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   2949\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/IPython/core/pylabtools.py\u001b[0m in \u001b[0;36mactivate_matplotlib\u001b[0;34m(backend)\u001b[0m\n\u001b[1;32m    293\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    294\u001b[0m     \u001b[0;32mimport\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpyplot\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 295\u001b[0;31m     \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpyplot\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mswitch_backend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbackend\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    296\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    297\u001b[0m     \u001b[0;31m# This must be imported last in the matplotlib series, after\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/matplotlib/pyplot.py\u001b[0m in \u001b[0;36mswitch_backend\u001b[0;34m(newbackend)\u001b[0m\n\u001b[1;32m    231\u001b[0m     \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0muse\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnewbackend\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mwarn\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mforce\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    232\u001b[0m     \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackends\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mpylab_setup\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 233\u001b[0;31m     \u001b[0m_backend_mod\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnew_figure_manager\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdraw_if_interactive\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0m_show\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mpylab_setup\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    234\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    235\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/matplotlib/backends/__init__.py\u001b[0m in \u001b[0;36mpylab_setup\u001b[0;34m()\u001b[0m\n\u001b[1;32m     30\u001b[0m     \u001b[0;31m# imports. 0 means only perform absolute imports.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     31\u001b[0m     backend_mod = __import__(backend_name,\n\u001b[0;32m---> 32\u001b[0;31m                              globals(),locals(),[backend_name],0)\n\u001b[0m\u001b[1;32m     33\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     34\u001b[0m     \u001b[0;31m# Things we pull in from all backends\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_qt4agg.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     16\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     17\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 18\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mbackend_qt5agg\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mFigureCanvasQTAggBase\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0m_FigureCanvasQTAggBase\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     19\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     20\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mbackend_agg\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mFigureCanvasAgg\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     14\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     15\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mbackend_agg\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mFigureCanvasAgg\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 16\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mbackend_qt5\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mQtCore\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     17\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mbackend_qt5\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mQtGui\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     18\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0;34m.\u001b[0m\u001b[0mbackend_qt5\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mFigureManagerQT\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     24\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     25\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mwidgets\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mSubplotTool\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 26\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackends\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mqt_editor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfigureoptions\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mfigureoptions\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     27\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     28\u001b[0m from .qt_compat import (QtCore, QtGui, QtWidgets, _getSaveFileName,\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/matplotlib/backends/qt_editor/figureoptions.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     18\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     19\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mcm\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmarkers\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcolors\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mmcolors\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 20\u001b[0;31m \u001b[0;32mimport\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackends\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mqt_editor\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformlayout\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mformlayout\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     21\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackends\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mqt_compat\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mQtGui\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     22\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/matplotlib/backends/qt_editor/formlayout.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m     54\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     55\u001b[0m \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mcolors\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mmcolors\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 56\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbackends\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mqt_compat\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mQtGui\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mQtWidgets\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mQtCore\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m     57\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m     58\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/matplotlib/backends/qt_compat.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m    135\u001b[0m     \u001b[0;31m# have been changed in the above if block\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    136\u001b[0m     \u001b[0;32mif\u001b[0m \u001b[0mQT_API\u001b[0m \u001b[0;32min\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0mQT_API_PYQT\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mQT_API_PYQTv2\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m:\u001b[0m  \u001b[0;31m# PyQt4 API\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 137\u001b[0;31m         \u001b[0;32mfrom\u001b[0m \u001b[0mPyQt4\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mQtCore\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mQtGui\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    138\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    139\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'PyQt4'"
35 36 37
     ]
    }
   ],
Nick Sauerwein's avatar
Nick Sauerwein committed
38 39 40
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
41
    "\n",
Nick Sauerwein's avatar
Nick Sauerwein committed
42
    "\n",
43
    "%load_ext autoreload\n",
Nick Sauerwein's avatar
Nick Sauerwein committed
44 45
    "\n",
    "from ipywidgets import interact, interactive, fixed, interact_manual\n",
Nick Sauerwein's avatar
Nick Sauerwein committed
46 47
    "import ipywidgets as widgets\n",
    "\n",
48
    "%autoreload 2\n",
49
    "%matplotlib"
50 51
   ]
  },
52 53
  {
   "cell_type": "markdown",
54
   "metadata": {
55 56
    "hideCode": false,
    "hidePrompt": false
57
   },
58
   "source": [
59
    "## Load old configurations"
Nick Sauerwein's avatar
Nick Sauerwein committed
60 61 62 63
   ]
  },
  {
   "cell_type": "code",
64
   "execution_count": null,
Nick Sauerwein's avatar
Nick Sauerwein committed
65
   "metadata": {
66
    "collapsed": true,
Nick Sauerwein's avatar
Nick Sauerwein committed
67
    "hideCode": false,
68
    "hidePrompt": false
69 70 71 72 73 74 75 76 77 78
   },
   "outputs": [],
   "source": [
    "for i in range(-1,0):\n",
    "    config = io.load(i)\n",
    "    print (i ,config['comment'])"
   ]
  },
  {
   "cell_type": "code",
79
   "execution_count": null,
80
   "metadata": {
81
    "collapsed": true,
Nick Sauerwein's avatar
Nick Sauerwein committed
82
    "hideCode": false,
83
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
84
   },
85
   "outputs": [],
Nick Sauerwein's avatar
Nick Sauerwein committed
86
   "source": [
87
    "import DataManager as dm\n",
88
    "io = dm.IO('Data/')\n",
89
    "config = io.load(-1)\n",
90
    "print (config['comment'],' loaded')"
Nick Sauerwein's avatar
Nick Sauerwein committed
91 92
   ]
  },
93 94
  {
   "cell_type": "markdown",
95
   "metadata": {
96 97
    "hideCode": false,
    "hidePrompt": false
98
   },
99
   "source": [
100
    "## FocusCamera"
101 102
   ]
  },
Nick Sauerwein's avatar
Nick Sauerwein committed
103 104
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
105
   "execution_count": null,
Nick Sauerwein's avatar
Nick Sauerwein committed
106
   "metadata": {
Nick Sauerwein's avatar
Nick Sauerwein committed
107
    "collapsed": true,
108 109
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
110
   },
Nick Sauerwein's avatar
Nick Sauerwein committed
111
   "outputs": [],
Nick Sauerwein's avatar
Nick Sauerwein committed
112
   "source": [
113
    "from Devices.FocusCamera import FocusCamera\n",
114
    "\n",
115 116 117 118 119 120 121 122
    "try:\n",
    "    para_config = config['FocusCamera']\n",
    "except:\n",
    "    para_config = {'ExposureTimeAbs': 10000,\n",
    "                 'min_intensity': 2000,\n",
    "                  'measure_full' : True}\n",
    "    \n",
    "focus = FocusCamera(para_config)"
Nick Sauerwein's avatar
Nick Sauerwein committed
123 124 125 126
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
127
   "execution_count": null,
Nick Sauerwein's avatar
Nick Sauerwein committed
128
   "metadata": {
129 130 131
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
132
   },
Nick Sauerwein's avatar
Nick Sauerwein committed
133
   "outputs": [],
Nick Sauerwein's avatar
Nick Sauerwein committed
134
   "source": [
135
    "meas = focus.measure()"
Nick Sauerwein's avatar
Nick Sauerwein committed
136 137 138 139
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
140
   "execution_count": null,
Nick Sauerwein's avatar
Nick Sauerwein committed
141
   "metadata": {
142 143 144
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
145
   },
Nick Sauerwein's avatar
Nick Sauerwein committed
146
   "outputs": [],
Nick Sauerwein's avatar
Nick Sauerwein committed
147
   "source": [
148 149
    "focus.plot_measure(meas)\n",
    "plt.show()"
Nick Sauerwein's avatar
Nick Sauerwein committed
150 151 152
   ]
  },
  {
153
   "cell_type": "markdown",
154
   "metadata": {
155 156
    "hideCode": false,
    "hidePrompt": false
157
   },
Nick Sauerwein's avatar
Nick Sauerwein committed
158
   "source": [
159
    "## ParabolicMirror"
Nick Sauerwein's avatar
Nick Sauerwein committed
160 161 162 163
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
164
   "execution_count": null,
Nick Sauerwein's avatar
Nick Sauerwein committed
165
   "metadata": {
166 167 168
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
169
   },
Nick Sauerwein's avatar
Nick Sauerwein committed
170
   "outputs": [],
Nick Sauerwein's avatar
Nick Sauerwein committed
171
   "source": [
172
    "from Devices.ParabolicMirror import ParabolicMirror\n",
Nick Sauerwein's avatar
Nick Sauerwein committed
173
    "\n",
174
    "\n",
175 176 177 178 179 180 181 182 183 184 185 186
    "try:\n",
    "    para_config = config['ParabolicMirror']\n",
    "except:\n",
    "    para_config = {'pos_Pay': 3,\n",
    "                 'pos_Paz': 3}\n",
    "    \n",
    "para = ParabolicMirror(para_config, home = True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
187 188
    "hideCode": false,
    "hidePrompt": false
189 190 191
   },
   "source": [
    "## Periscope"
Nick Sauerwein's avatar
Nick Sauerwein committed
192 193 194 195
   ]
  },
  {
   "cell_type": "code",
196
   "execution_count": null,
Nick Sauerwein's avatar
Nick Sauerwein committed
197
   "metadata": {
198
    "collapsed": true,
Nick Sauerwein's avatar
Nick Sauerwein committed
199
    "hideCode": false,
200
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
201
   },
202
   "outputs": [],
Nick Sauerwein's avatar
Nick Sauerwein committed
203
   "source": [
204 205 206 207 208 209 210 211 212 213 214 215 216 217
    "from Devices.Periscope import Periscope\n",
    "\n",
    "\n",
    "try:\n",
    "    per_config = config['Periscope']\n",
    "except:\n",
    "    per_config = {'pos_l_x': 0.1,\n",
    "              'pos_l_y': 0.1,\n",
    "              'pos_l_z': 0.1, \n",
    "              'pos_g_origin_x': -25./2,\n",
    "              'pos_g_origin_y': 25./2,\n",
    "              'pos_g_origin_z': 25./2,\n",
    "              'deltaz_Mz': 0,\n",
    "              'deltaz_Cz': 0,\n",
Nick Sauerwein's avatar
Nick Sauerwein committed
218
    "              'sync_camera': False}\n",
219
    "    \n",
Nick Sauerwein's avatar
Nick Sauerwein committed
220
    "per = Periscope(per_config, home = True)"
Nick Sauerwein's avatar
Nick Sauerwein committed
221 222 223
   ]
  },
  {
224
   "cell_type": "markdown",
225
   "metadata": {
226 227
    "hideCode": false,
    "hidePrompt": false
228
   },
Nick Sauerwein's avatar
Nick Sauerwein committed
229
   "source": [
230
    "## BladePositioning"
Nick Sauerwein's avatar
Nick Sauerwein committed
231 232 233 234
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
235
   "execution_count": null,
Nick Sauerwein's avatar
Nick Sauerwein committed
236
   "metadata": {
237 238 239
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
240
   },
241
   "outputs": [],
Nick Sauerwein's avatar
Nick Sauerwein committed
242
   "source": [
243
    "from Devices.BladePositioning import BladePositioning\n",
244
    "\n",
245 246 247 248 249 250 251 252 253 254 255
    "try:\n",
    "    blade_config = config['BladePositioning']\n",
    "except:\n",
    "    blade_config = {'pos_R':344.25, 'pos_L':-2.8}\n",
    "blade = BladePositioning(blade_config, init = 0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
256 257 258
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false
259 260 261
   },
   "outputs": [],
   "source": [
Nick Sauerwein's avatar
Nick Sauerwein committed
262 263 264 265
    "#import time\n",
    "#t = time.time()\n",
    "#blade.get_config()\n",
    "#time.time() -t"
266 267 268 269
   ]
  },
  {
   "cell_type": "markdown",
270
   "metadata": {
271 272
    "hideCode": false,
    "hidePrompt": false
273
   },
274
   "source": [
275
    "## Interferometer"
Nick Sauerwein's avatar
Nick Sauerwein committed
276 277 278 279
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
280
   "execution_count": null,
Nick Sauerwein's avatar
Nick Sauerwein committed
281
   "metadata": {
Nick Sauerwein's avatar
Nick Sauerwein committed
282
    "collapsed": true,
283 284
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
285
   },
Nick Sauerwein's avatar
Nick Sauerwein committed
286
   "outputs": [],
Nick Sauerwein's avatar
Nick Sauerwein committed
287
   "source": [
288
    "from Devices.Interferometer import Interferometer\n",
289
    "\n",
290 291 292 293 294 295 296
    "try:\n",
    "    inter_config = config['Interferometer']\n",
    "except:\n",
    "    inter_config = {'xmax':6.0,\n",
    "                    'xmin':2.6,\n",
    "                    'ymin':3, \n",
    "                    'ymax':12,\n",
297 298
    "                    'ExposureTimeAbs':35,\n",
    "                    'TriggerMode':'Off'}\n",
299
    "inter = Interferometer(inter_config)"
300 301 302
   ]
  },
  {
303
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
304
   "execution_count": null,
305
   "metadata": {
306 307 308
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false
309 310
   },
   "outputs": [],
311
   "source": [
312
    "measurement = inter.measure()"
313 314 315 316
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
317
   "execution_count": null,
318
   "metadata": {
Nick Sauerwein's avatar
Nick Sauerwein committed
319
    "collapsed": true,
320 321 322
    "hideCode": false,
    "hideOutput": true,
    "hidePrompt": false
323
   },
Nick Sauerwein's avatar
Nick Sauerwein committed
324
   "outputs": [],
325
   "source": [
326
    "inter.plot_measure(measurement)"
327 328 329 330
   ]
  },
  {
   "cell_type": "markdown",
331
   "metadata": {
332 333
    "hideCode": false,
    "hidePrompt": false
334
   },
335
   "source": [
336
    "## DelayGenerator"
Nick Sauerwein's avatar
Nick Sauerwein committed
337 338 339 340
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
341
   "execution_count": 1,
Nick Sauerwein's avatar
Nick Sauerwein committed
342
   "metadata": {
343 344 345
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
346 347 348
   },
   "outputs": [],
   "source": [
349
    "from Devices.DelayGenerator import DelayGenerator\n",
350
    "\n",
351 352 353 354 355
    "try:\n",
    "    delay_config = config['DelayGenerator']\n",
    "except:\n",
    "    delay_config = {'jet_triggered': True,\n",
    "                    'mode': 'single shot',\n",
Nick Sauerwein's avatar
Nick Sauerwein committed
356 357
    "                    'rate': 10.,\n",
    "                    't_sleep': 0.05}\n",
358 359 360 361 362 363
    "\n",
    "delay = DelayGenerator(delay_config)"
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
364
   "execution_count": 2,
365
   "metadata": {
366 367
    "hideCode": false,
    "hidePrompt": false
368
   },
Nick Sauerwein's avatar
Nick Sauerwein committed
369 370 371 372
   "outputs": [
    {
     "data": {
      "text/plain": [
Nick Sauerwein's avatar
Nick Sauerwein committed
373
       "{'time': '2017-04-28_09-15-17.496478'}"
Nick Sauerwein's avatar
Nick Sauerwein committed
374 375
      ]
     },
Nick Sauerwein's avatar
Nick Sauerwein committed
376
     "execution_count": 2,
Nick Sauerwein's avatar
Nick Sauerwein committed
377 378 379 380
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
381
   "source": [
Nick Sauerwein's avatar
Nick Sauerwein committed
382
    "delay.measure()"
383 384 385 386
   ]
  },
  {
   "cell_type": "markdown",
387
   "metadata": {
388 389
    "hideCode": false,
    "hidePrompt": false
390
   },
391
   "source": [
392
    "## DRS4"
Nick Sauerwein's avatar
Nick Sauerwein committed
393 394 395 396
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
397
   "execution_count": 3,
Nick Sauerwein's avatar
Nick Sauerwein committed
398
   "metadata": {
399 400 401
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
402
   },
403
   "outputs": [],
Nick Sauerwein's avatar
Nick Sauerwein committed
404
   "source": [
405
    "from Devices.DRS4 import DRS4\n",
406
    "\n",
407 408 409 410 411 412 413
    "try:\n",
    "    drs_config = config['DRS4']\n",
    "except:\n",
    "    drs_config = {'trigger_level_CH0': 100,\n",
    "                  'trigger_mode':2,\n",
    "                  'delay': 0.0}\n",
    "drs = DRS4(drs_config)"
Nick Sauerwein's avatar
Nick Sauerwein committed
414 415 416
   ]
  },
  {
417
   "cell_type": "markdown",
Nick Sauerwein's avatar
Nick Sauerwein committed
418
   "metadata": {
419 420
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
421 422
   },
   "source": [
423
    "## Laser"
Nick Sauerwein's avatar
Nick Sauerwein committed
424 425 426 427
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
428
   "execution_count": 4,
Nick Sauerwein's avatar
Nick Sauerwein committed
429
   "metadata": {
430 431
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
432 433 434
   },
   "outputs": [
    {
435
     "name": "stdout",
Nick Sauerwein's avatar
Nick Sauerwein committed
436 437
     "output_type": "stream",
     "text": [
Nick Sauerwein's avatar
Nick Sauerwein committed
438
      "-22.9\n"
Nick Sauerwein's avatar
Nick Sauerwein committed
439 440 441
     ]
    }
   ],
442
   "source": [
443 444 445 446 447 448 449 450 451 452 453
    "from Devices.Laser import Laser\n",
    "\n",
    "try:\n",
    "    laser_config = config['Laser']\n",
    "except:\n",
    "    laser_config = {'max_angle': -22.9,\n",
    "                    'attenuation': 100,\n",
    "                    'comp_lin': 37.796,\n",
    "                    'channel': 1}\n",
    "\n",
    "laser = Laser(laser_config, drs)"
454 455 456
   ]
  },
  {
457
   "cell_type": "markdown",
458
   "metadata": {
459 460
    "hideCode": false,
    "hidePrompt": false
461
   },
Nick Sauerwein's avatar
Nick Sauerwein committed
462
   "source": [
463
    "## FaradayCup"
Nick Sauerwein's avatar
Nick Sauerwein committed
464 465 466 467
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
468
   "execution_count": 5,
Nick Sauerwein's avatar
Nick Sauerwein committed
469
   "metadata": {
470 471 472
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
473
   },
474
   "outputs": [],
Nick Sauerwein's avatar
Nick Sauerwein committed
475
   "source": [
476 477 478 479
    "from Devices.FaradayCup import FaradayCup\n",
    "\n",
    "try:\n",
    "    fara_config = config['FaradayCup']\n",
Nick Sauerwein's avatar
Nick Sauerwein committed
480
    "    fara = FaradayCup(fara_config, drs)\n",
481
    "except:\n",
Nick Sauerwein's avatar
Nick Sauerwein committed
482 483 484 485 486
    "    fara_config = {'channel':2,\n",
    "                  'R': 50,\n",
    "                  'amplification': 1e4}\n",
    "    fara = FaradayCup(fara_config, drs)\n",
    "\n"
487 488 489 490 491
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
492 493
    "hideCode": false,
    "hidePrompt": false
494 495 496
   },
   "source": [
    "## test_devices"
Nick Sauerwein's avatar
Nick Sauerwein committed
497 498 499 500
   ]
  },
  {
   "cell_type": "code",
501
   "execution_count": null,
Nick Sauerwein's avatar
Nick Sauerwein committed
502
   "metadata": {
503 504 505
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
506 507
   },
   "outputs": [],
508
   "source": [
509 510 511 512
    "from Devices.test_devices import test_device1, test_device2\n",
    "\n",
    "td1 = test_device1(2)\n",
    "td2 = test_device2(4.)"
513
   ]
Nick Sauerwein's avatar
Nick Sauerwein committed
514
  },
515 516 517
  {
   "cell_type": "markdown",
   "metadata": {
518 519
    "hideCode": false,
    "hidePrompt": false
Nick Sauerwein's avatar
Nick Sauerwein committed
520
   },
521 522 523
   "source": [
    "# IO und GUI"
   ]
Nick Sauerwein's avatar
Nick Sauerwein committed
524
  },
525 526
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
527
   "execution_count": null,
528
   "metadata": {
529 530
    "hideCode": false,
    "hidePrompt": false
531
   },
Nick Sauerwein's avatar
Nick Sauerwein committed
532
   "outputs": [],
533 534 535 536 537 538 539 540 541
   "source": [
    "import DataManager as dm\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "io = dm.IO('Data/')\n",
    "\n",
    "%matplotlib\n",
    "\n",
Nick Sauerwein's avatar
Nick Sauerwein committed
542
    "import GUI"
543 544 545 546
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
547
   "execution_count": 7,
548
   "metadata": {
549 550
    "collapsed": true,
    "hideCode": false,
Nick Sauerwein's avatar
Nick Sauerwein committed
551 552 553 554
    "hidePrompt": false,
    "slideshow": {
     "slide_type": "skip"
    }
555 556 557
   },
   "outputs": [],
   "source": [
Nick Sauerwein's avatar
Nick Sauerwein committed
558 559
    "#devices = [delay,inter,laser, drs, fara, blade, focus]#, per]#, blade]  #use this to run the LWFA\n",
    "devices = [fara]\n",
Nick Sauerwein's avatar
Nick Sauerwein committed
560
    "#devices = [per, para, laser, focus]              #use this to do focus optimization\n",
561
    "#devices = [td1, td2, delay]#, inter]                             #Use this do debug the gui and data menager"
562 563 564 565
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
566
   "execution_count": 8,
567
   "metadata": {
568 569
    "hideCode": false,
    "hidePrompt": false,
570 571 572 573 574 575 576
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
Nick Sauerwein's avatar
Nick Sauerwein committed
577 578 579 580 581 582 583 584 585 586 587 588
      "FaradayCup  config time:  3.814697265625e-06\n",
      "FaradayCup  measured\n",
      "FaradayCup  measure time:  0.001710653305053711\n",
      "maximal possible rate:  7.2\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/data/anaconda3/lib/python3.6/site-packages/matplotlib/backend_bases.py:2445: MatplotlibDeprecationWarning: Using default event loop until function specific to this GUI is implemented\n",
      "  warnings.warn(str, mplDeprecation)\n"
589
     ]
590 591 592 593
    }
   ],
   "source": [
    "plt.ion()\n",
Nick Sauerwein's avatar
Nick Sauerwein committed
594
    "GUI.main(devices, io)"
595 596 597 598 599 600
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
Nick Sauerwein's avatar
Nick Sauerwein committed
601
    "collapsed": true,
602 603
    "hideCode": false,
    "hidePrompt": false
604 605 606
   },
   "outputs": [],
   "source": [
Nick Sauerwein's avatar
Nick Sauerwein committed
607
    "dm.set_config(devices,io.load(29, elog = True))"
608 609 610 611 612 613
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
614 615 616
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false
617 618 619
   },
   "outputs": [],
   "source": [
Nick Sauerwein's avatar
Nick Sauerwein committed
620
    "list_of_measurements = io.search(kind = 'measure')"
621 622 623 624
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
625
   "execution_count": null,
626
   "metadata": {
627 628 629
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false
630
   },
Nick Sauerwein's avatar
Nick Sauerwein committed
631
   "outputs": [],
632
   "source": [
Nick Sauerwein's avatar
Nick Sauerwein committed
633
    "io.search(output = False)"
634 635 636 637
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
638
   "execution_count": null,
639
   "metadata": {
640 641 642
    "collapsed": true,
    "hideCode": false,
    "hidePrompt": false,
Nick Sauerwein's avatar
Nick Sauerwein committed
643
    "scrolled": false
644 645 646
   },
   "outputs": [],
   "source": [
Nick Sauerwein's avatar
Nick Sauerwein committed
647 648
    "%autoreload\n",
    "para.optimize(focus, laser, per, 0.006, output = True)"
649 650 651 652
   ]
  },
  {
   "cell_type": "code",
Nick Sauerwein's avatar
Nick Sauerwein committed
653
   "execution_count": null,
654 655
   "metadata": {
    "collapsed": true,
656 657
    "hideCode": false,
    "hidePrompt": false
658 659 660 661 662 663 664
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
665 666
  "celltoolbar": "Hide code",
  "hide_code_all_hidden": false,
667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.0"
  },
  "widgets": {
   "state": {
Nick Sauerwein's avatar
Nick Sauerwein committed
686
    "08c2776eb79a4f36bf5568c206b0dcb1": {
687 688
     "views": [
      {
689
       "cell_index": 34
690 691 692
      }
     ]
    },
693
    "0fab028e40f545c9aac05021b91eab08": {
694 695
     "views": [
      {
696
       "cell_index": 34
697 698 699
      }
     ]
    },
700
    "10417ceda5db4803ac0e573038720a15": {
701 702
     "views": [
      {
703
       "cell_index": 34
704 705 706
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
707
    "105b42a653e74a9691a6eb9c6f19d646": {
708 709
     "views": [
      {
710
       "cell_index": 34
711 712 713
      }
     ]
    },
714
    "1972db76e6b3499ba04e1f7b9dbe1c01": {
715 716
     "views": [
      {
717
       "cell_index": 34
718 719 720
      }
     ]
    },
721
    "1c4084f00cb44f3ea97dafbebafa8cf1": {
722 723
     "views": [
      {
724
       "cell_index": 34
725 726 727
      }
     ]
    },
728
    "1c9dea0ac3cf4f2abd3e411818244156": {
729 730
     "views": [
      {
731
       "cell_index": 34
732 733 734
      }
     ]
    },
735
    "1d645ddaedc447f8b62f9845f70ac848": {
736 737
     "views": [
      {
738
       "cell_index": 34
739 740 741
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
742
    "2ac15d57388c46ddb633dbf31c02ed6d": {
743 744
     "views": [
      {
745
       "cell_index": 34
746 747 748
      }
     ]
    },
749
    "2c687988ae6444ac85fbb4bcc03f33d4": {
750 751
     "views": [
      {
752
       "cell_index": 34
753 754 755
      }
     ]
    },
756
    "32c4c0c7f4c242ec872e101e382b368d": {
757 758
     "views": [
      {
759
       "cell_index": 34
760 761 762
      }
     ]
    },
763
    "3d07b01c85d5498098d3164d6504f60f": {
764 765
     "views": [
      {
766
       "cell_index": 34
767 768 769
      }
     ]
    },
770
    "4356c9aa8fc54e3ca13b2aa575551f9c": {
771 772
     "views": [
      {
773
       "cell_index": 34
774 775 776
      }
     ]
    },
777
    "49977c801a0a4a278b9071caa0538efa": {
778 779
     "views": [
      {
780
       "cell_index": 34
781 782 783
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
784
    "5ee512e30d7c4cb3a0cb10168f3ad255": {
785 786
     "views": [
      {
787
       "cell_index": 34
788 789 790
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
791
    "6843f1bec14f4419a68b8260a453d25d": {
792 793
     "views": [
      {
794
       "cell_index": 34
795 796 797
      }
     ]
    },
798 799 800 801 802 803 804
    "69c5fc13167b48b4a7db6f2a52f4155c": {
     "views": [
      {
       "cell_index": 34
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
805
    "6d1c701084da49da9c50c619b27a63df": {
806 807
     "views": [
      {
808
       "cell_index": 34
809 810 811
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
812
    "7669507786de430383cdc5bc274047d4": {
813 814
     "views": [
      {
815
       "cell_index": 34
816 817 818
      }
     ]
    },
819 820 821 822 823 824 825
    "7b73061b426d47b6a1cf615c0f689cd7": {
     "views": [
      {
       "cell_index": 34
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
826
    "7d7dce36cc724cdb81e85eb7d08ba57a": {
827 828
     "views": [
      {
829
       "cell_index": 34
830 831 832
      }
     ]
    },
833
    "7e600a72133249a3a3455b026dc2277b": {
834 835
     "views": [
      {
836
       "cell_index": 34
837 838 839
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
840
    "7fa43d10f81f4d2cb78805ca0fb716a7": {
841 842
     "views": [
      {
843
       "cell_index": 34
844 845 846
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
847
    "938fafa579054e6d8ea7fb02f21316ca": {
848 849
     "views": [
      {
850
       "cell_index": 34
851 852 853
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
854
    "97bb03233dec417486c7a0732e90ac5f": {
855 856
     "views": [
      {
857
       "cell_index": 34
858 859 860
      }
     ]
    },
861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881
    "a15286e58d824d83ba3580cfe5e27b0a": {
     "views": [
      {
       "cell_index": 34
      }
     ]
    },
    "ab590b2f10034d10a26ed89bcf072215": {
     "views": [
      {
       "cell_index": 34
      }
     ]
    },
    "b4f09a0253064fbc8e25b9aac7f8d42c": {
     "views": [
      {
       "cell_index": 34
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
882
    "b552410f6d254e52b549a2985b345a93": {
883 884
     "views": [
      {
885
       "cell_index": 34
886 887 888
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
889
    "bfd8f450b5b14acc8cdbfe6d179b9eec": {
890 891
     "views": [
      {
892
       "cell_index": 34
893 894 895
      }
     ]
    },
Nick Sauerwein's avatar
Nick Sauerwein committed
896
    "c4c5b0e7b8e341d3bd598b0bff4093b7": {