Commit 3d58f75e authored by Nick Sauerwein's avatar Nick Sauerwein
Browse files

running on linux (KDC not compatible yet)

parent b794e0bf
......@@ -2,13 +2,22 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 22,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n",
"hu\n"
]
}
],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
......@@ -22,11 +31,10 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 13,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"outputs": [
{
......@@ -38,15 +46,15 @@
}
],
"source": [
"%autoreload\n",
"%autoreload 2\n",
"%matplotlib"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"source": [
"## Load old configurations"
......@@ -56,9 +64,9 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": true,
"hidePrompt": false
},
"outputs": [],
"source": [
......@@ -69,33 +77,25 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": true,
"hidePrompt": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"pulled vacuum\n"
]
}
],
"outputs": [],
"source": [
"import DataManager as dm\n",
"io = dm.IO('Data/Experiments310317/')\n",
"io = dm.IO('Data/')\n",
"config = io.load(-1)\n",
"print (config['comment'])"
"print (config['comment'],' loaded')"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"source": [
"## FocusCamera"
......@@ -103,13 +103,23 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"available cameras:\n",
"<DeviceInfo Basler acA3800-10gm (22005848)>\n",
"<DeviceInfo Basler avA2300-25gmDSY (21547524)>\n",
"camera found =) Be happy\n"
]
}
],
"source": [
"from Devices.FocusCamera import FocusCamera\n",
"\n",
......@@ -127,9 +137,9 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"source": [
......@@ -140,9 +150,9 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"source": [
......@@ -153,8 +163,8 @@
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"source": [
"## ParabolicMirror"
......@@ -164,9 +174,9 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"source": [
......@@ -185,8 +195,8 @@
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"source": [
"## Periscope"
......@@ -194,27 +204,13 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": true,
"hidePrompt": false
},
"outputs": [
{
"ename": "ImportError",
"evalue": "cannot import name 'windll'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mImportError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-3-aaa9e510c129>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mDevices\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPeriscope\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mPeriscope\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 2\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mper_config\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Periscope'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/home/data/lwfaserver/Devices/Periscope.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mnumpy\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mmatplotlib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpyplot\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mDevices\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPeriscopeTools\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mPyAPT\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mAPTMotor\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/home/data/lwfaserver/Devices/PeriscopeTools/PyAPT.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 16\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[0mctypes\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mc_long\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mc_buffer\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mc_float\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mwindll\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpointer\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;32mimport\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mImportError\u001b[0m: cannot import name 'windll'"
]
}
],
"outputs": [],
"source": [
"from Devices.Periscope import Periscope\n",
"\n",
......@@ -238,8 +234,8 @@
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"source": [
"## BladePositioning"
......@@ -249,9 +245,9 @@
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"source": [
......@@ -268,9 +264,9 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"source": [
......@@ -283,8 +279,8 @@
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"source": [
"## Interferometer"
......@@ -292,11 +288,10 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 6,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"outputs": [
{
......@@ -304,6 +299,7 @@
"output_type": "stream",
"text": [
"available cameras:\n",
"<DeviceInfo Basler acA3800-10gm (22005848)>\n",
"<DeviceInfo Basler avA2300-25gmDSY (21547524)>\n",
"camera found =) Be happy\n"
]
......@@ -319,41 +315,51 @@
" 'xmin':2.6,\n",
" 'ymin':3, \n",
" 'ymax':12,\n",
" 'ExposureTimeAbs':35}\n",
" 'ExposureTimeAbs':35,\n",
" 'TriggerMode':'Off'}\n",
"inter = Interferometer(inter_config)"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"source": [
"#measurement = inter.measure()"
"measurement = inter.measure()"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"hideCode": false,
"hideOutput": true,
"hidePrompt": false
},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/data/lwfaserver/Devices/InterferometerTools/routines.py:207: RuntimeWarning: divide by zero encountered in true_divide\n",
" return np.exp(-1./x**2*(6.*(x[1]-x[0]))**2)\n"
]
}
],
"source": [
"#inter.plot_measure(measurement)"
"inter.plot_measure(measurement)"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"source": [
"## DelayGenerator"
......@@ -361,11 +367,11 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 9,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"source": [
......@@ -384,20 +390,19 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 10,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"outputs": [
{
"data": {
"text/plain": [
"{'time': '2017-04-20_11-17-15.051678'}"
"{'time': '2017-04-25_22-07-13.504719'}"
]
},
"execution_count": 5,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
......@@ -409,8 +414,8 @@
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"source": [
"## DRS4"
......@@ -418,31 +423,13 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 11,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": false,
"hidePrompt": false
},
"outputs": [
{
"ename": "ChannelAccessException",
"evalue": "cannot find Epics CA DLL",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mChannelAccessException\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-8-0e7103de3b8b>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0;34m'trigger_mode'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 8\u001b[0m 'delay': 0.0}\n\u001b[0;32m----> 9\u001b[0;31m \u001b[0mdrs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mDRS4\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdrs_config\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
"\u001b[0;32m/home/data/lwfaserver/Devices/DRS4.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, config)\u001b[0m\n\u001b[1;32m 21\u001b[0m \u001b[0;32mclass\u001b[0m \u001b[0mDRS4\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 22\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__init__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 23\u001b[0;31m \u001b[0mcaput\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'FIN-LSCP-DRS1:FLAG_GAIN'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 24\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msocket\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0msocket\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msocket\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msocket\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mAF_INET\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msocket\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSOCK_DGRAM\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 25\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_config\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mconfig\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/epics/__init__.py\u001b[0m in \u001b[0;36mcaput\u001b[0;34m(pvname, value, wait, timeout)\u001b[0m\n\u001b[1;32m 61\u001b[0m \u001b[0;34m>>\u001b[0m\u001b[0;34m>\u001b[0m \u001b[0mcaput\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'xx.VAL'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m3.0\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mwait\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 62\u001b[0m \"\"\"\n\u001b[0;32m---> 63\u001b[0;31m \u001b[0mthispv\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_pv\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpvname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconnect\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[0m\u001b[1;32m 64\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mthispv\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconnected\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 65\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mthispv\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mput\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mvalue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mwait\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mwait\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mtimeout\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/epics/pv.py\u001b[0m in \u001b[0;36mget_pv\u001b[0;34m(pvname, form, connect, context, timeout, **kws)\u001b[0m\n\u001b[1;32m 37\u001b[0m \u001b[0mcontext\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mca\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minitial_context\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 38\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mcontext\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 39\u001b[0;31m \u001b[0mcontext\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mca\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcurrent_context\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 40\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mpvname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mform\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcontext\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32min\u001b[0m \u001b[0m_PVcache_\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 41\u001b[0m \u001b[0mthispv\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_PVcache_\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpvname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mform\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcontext\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/epics/ca.py\u001b[0m in \u001b[0;36mwrapper\u001b[0;34m(*args, **kwds)\u001b[0m\n\u001b[1;32m 360\u001b[0m \u001b[0;32mglobal\u001b[0m \u001b[0mlibca\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 361\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlibca\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 362\u001b[0;31m \u001b[0minitialize_libca\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 363\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mfcn\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[0mkwds\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 364\u001b[0m \u001b[0mwrapper\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__doc__\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfcn\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__doc__\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/epics/ca.py\u001b[0m in \u001b[0;36minitialize_libca\u001b[0;34m()\u001b[0m\n\u001b[1;32m 207\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0menviron\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'EPICS_CA_MAX_ARRAY_BYTES'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m\"%i\"\u001b[0m \u001b[0;34m%\u001b[0m \u001b[0;36m2\u001b[0m\u001b[0;34m**\u001b[0m\u001b[0;36m24\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 208\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 209\u001b[0;31m \u001b[0mdllname\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfind_libca\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 210\u001b[0m \u001b[0mload_dll\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mctypes\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcdll\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mLoadLibrary\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 211\u001b[0m \u001b[0;32mglobal\u001b[0m \u001b[0mlibca\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minitial_context\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0m_cache\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/home/data/anaconda3/lib/python3.6/site-packages/epics/ca.py\u001b[0m in \u001b[0;36mfind_libca\u001b[0;34m()\u001b[0m\n\u001b[1;32m 177\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0madir\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlibname\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 178\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 179\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mChannelAccessException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'cannot find Epics CA DLL'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 180\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 181\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0minitialize_libca\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[0;31mChannelAccessException\u001b[0m: cannot find Epics CA DLL"
]
}
],
"outputs": [],
"source": [
"from Devices.DRS4 import DRS4\n",
"\n",
......@@ -458,8 +445,8 @@
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"source": [
"## Laser"
......@@ -467,11 +454,10 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 12,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"outputs": [
{
......@@ -499,8 +485,8 @@
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"source": [
"## FaradayCup"
......@@ -508,11 +494,11 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 13,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"source": [
......@@ -532,8 +518,8 @@
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"source": [
"## test_devices"
......@@ -541,11 +527,11 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"source": [
......@@ -558,8 +544,8 @@
{
"cell_type": "markdown",
"metadata": {
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"source": [
"# IO und GUI"
......@@ -567,11 +553,10 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 14,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"hideCode": false,
"hidePrompt": false
},
"outputs": [
{
......@@ -596,27 +581,26 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 17,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
"collapsed": true,
"hideCode": false,
"hidePrompt": false
},
"outputs": [],
"source": [
"#devices = [delay,inter,laser, drs, fara, per]#, blade] #use this to run the LWFA\n",
"devices = [delay,inter,laser, drs, fara, blade, focus]#, per]#, blade] #use this to run the LWFA\n",
"#devices = [inter, per]\n",
"#devices = [per, para, laser, focus] #use this to do focus optimization\n",
"devices = [td1, td2, delay, inter] #Use this do debug the gui and data menager"
"#devices = [td1, td2, delay]#, inter] #Use this do debug the gui and data menager"
]
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 18,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true,
"hideCode": false,
"hidePrompt": false,
"scrolled": false
},
"outputs": [
......@@ -624,27 +608,15 @@
"name": "stdout",
"output_type": "stream",
"text": [
"test_device1 config time: 8.58306884765625e-06\n",
"test_device2 config time: 8.106231689453125e-06\n",
"DelayGenerator config time: 0.002586841583251953\n",
"Interferometer config time: 0.0005772113800048828\n",
"DelayGenerator measured\n",
"DelayGenerator measure time: 0.00033020973205566406\n"
]
},
{
"ename": "RuntimeError",
"evalue": "The buffer was incompletely grabbed. This can be caused by performance problems of the network hardware used, i.e. network adapter, switch, or ethernet cable. To fix this, try increasing the camera's Inter-Packet Delay in the Transport Layer category to reduce the required bandwidth, and adjust the camera's Packet Size setting to the highest supported frame size.",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m/home/data/lwfaserver/GUI.py\u001b[0m in \u001b[0;36mmeasure\u001b[0;34m(bt, comment, name)\u001b[0m\n\u001b[1;32m 384\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdraw_all\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 385\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 386\u001b[0;31m \u001b[0mloop_measure\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 387\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 388\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/home/data/lwfaserver/GUI.py\u001b[0m in \u001b[0;36mloop_measure\u001b[0;34m(parallel, connec)\u001b[0m\n\u001b[1;32m 335\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 336\u001b[0m \u001b[0;31m#getting data from devices\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 337\u001b[0;31m \u001b[0mmeasurement\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdm\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmeasure\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdevices\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdevices2measure\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdevices2measure\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 338\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 339\u001b[0m \u001b[0;31m#save data\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/home/data/lwfaserver/DataManager.py\u001b[0m in \u001b[0;36mmeasure\u001b[0;34m(devices, devices2measure)\u001b[0m\n\u001b[1;32m 130\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 131\u001b[0m \u001b[0mt\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 132\u001b[0;31m \u001b[0mdata\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'measure'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mdevice_name\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdevice\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmeasure\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 133\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mdevice_name\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m' measured'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 134\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mdevice_name\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m' measure time: '\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/home/data/lwfaserver/Devices/Interferometer.py\u001b[0m in \u001b[0;36mmeasure\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 73\u001b[0m \u001b[0mD\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 74\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 75\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mimg\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcam\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgrab_images\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\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 76\u001b[0m \u001b[0mD\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mimg\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 77\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32mPyPylon/cython/factory.pyx\u001b[0m in \u001b[0;36mgrab_images (cython/factory.cpp:5318)\u001b[0;34m()\u001b[0m\n",
"\u001b[0;31mRuntimeError\u001b[0m: The buffer was incompletely grabbed. This can be caused by performance problems of the network hardware used, i.e. network adapter, switch, or ethernet cable. To fix this, try increasing the camera's Inter-Packet Delay in the Transport Layer category to reduce the required bandwidth, and adjust the camera's Packet Size setting to the highest supported frame size."
"DelayGenerator config time: 0.0032024383544921875\n",
"Interferometer config time: 0.000659942626953125\n",
"Laser config time: 0.0021560192108154297\n",
"DRS4 config time: 0.0015981197357177734\n",
"FaradayCup config time: 8.58306884765625e-06\n",
"BladePositioning config time: 0.603661060333252\n",
"FocusCamera config time: 0.0006775856018066406\n",
"maximal possible rate: 1.6\n",
"set rate cannot be reached.\n"
]
}
],
......@@ -658,19 +630,8 @@
"execution_count": null,
"metadata": {
"collapsed": true,