Commit 58a211f9 authored by Nick Sauerwein's avatar Nick Sauerwein
Browse files

organisation tools of data added

parent 56423c8e
......@@ -3,6 +3,8 @@ import matplotlib.pyplot as plt
import numpy as np
def make_statistic(xs ,ys, error_x):
xs = np.array(xs)
ys = np.array(ys)
from uncertainties import unumpy
arg = np.argsort(xs)
......@@ -46,17 +48,10 @@ def make_statistic(xs ,ys, error_x):
i = i+1
return unumpy.uarray(x_mean, x_error), unumpy.uarray(y_mean, y_error), n
def errorplot(ux, uy):
plt.errorbar(unumpy.nominal_values(ux), unumpy.nominal_values(uy), xerr = unumpy.std_devs(ux),yerr = unumpy.std_devs(uy), fmt= '--o', elinewidth = 10, ecolor = 'y')
def extract(measurements, list_of_ids):
m = measurements
for i in list_of_ids:
try:
m = np.array([measure[i] for measure in m])
except:
print ("possible ids are: ",[item[0] for item in m[0].items()])
assert (False)
return m
def errorplot(ux, uy, ecolor = 'y', **args):
plt.errorbar(unumpy.nominal_values(ux), unumpy.nominal_values(uy), xerr = unumpy.std_devs(ux),yerr = unumpy.std_devs(uy), fmt= '--o', elinewidth = 10, ecolor = ecolor,alpha = 0.8, **args)
\ No newline at end of file
......@@ -37,6 +37,137 @@ def print_dict(dictionary, ident = '', braces=1, plot = True):
else:
print (ident+'%s = %s' %(key, value))
def get_subfolders(base_folder):
from glob import glob
subfolders = []
while True:
folders = glob(base_folder+"*/")
if folders == []:
break
subfolders += folders
base_folder += '*/'
return subfolders
def find_configs(base_folder, output = True):
subfolders = get_subfolders(base_folder)
configs = []
for folder in subfolders:
new_configs = IO(folder).search(output = False)
for config in new_configs:
config['folder'] = folder
configs += new_configs
return configs
def get_differences(dics, headids = []):
if len(dics) < 2:
return []
ids = []
ref_dic = dics[0]
for dic in dics[1:]:
for name, item in dic.items():
if headids + [name] in ids:
continue
if not name in ref_dic:
ids += [headids + [name]]
continue
if ref_dic[name] == item:
continue
if isinstance(item, dict):
subdiff = get_differences(extract(dics,name),headids = headids + [name])
for diff in subdiff:
if diff in ids:
continue
ids += [diff]
continue
ids += [headids + [name]]
ref_dic = dics[-1]
for dic in dics[:-1]:
for name, item in dic.items():
if headids + [name] in ids:
continue
if not name in ref_dic:
ids += [headids + [name]]
continue
if ref_dic[name] == item:
continue
if isinstance(item, dict):
subdiff = get_differences(extract(dics,name),headids = headids + [name])
for diff in subdiff:
if diff in ids:
continue
ids += [diff]
continue
ids += [headids + [name]]
return ids
def extract(measurements, list_of_ids):
try:
measurements = list(measurements)
except:
pass
if type(list_of_ids) == str:
list_of_ids = [list_of_ids]
if type(measurements) is not list:
measurements = [measurements]
ms = measurements
for i in list_of_ids:
ms_new = []
one_contains = False
for m in ms:
if isinstance(m,dict) and i in m:
ms_new += [m[i]]
one_contains = True
else:
ms_new += [None]
if not one_contains:
print (ms)
ms_wo_none = filter(None.__ne__, ms)
import itertools
print ("id ",i," doesn't exsist. Choose from: ",set(itertools.chain(*[m.keys() for m in ms_wo_none])))
assert (False)
ms = ms_new
return ms
def print_data(data, plot = True):
print_dict(data, plot = plot)
......
......@@ -35,7 +35,9 @@ class FaradayCup:
return config
def measure(self):
import time as ttime
ttime.sleep(0.2)
sig_time, sig_uvolt = self.drs.readChannel(self.channel)
import datetime
time = datetime.datetime.now()
......
......@@ -21,6 +21,7 @@ class Laser:
self.drs = DRS4
self.set_config(config)
self.plot_server = None
self.old_comp_lin = 0
def set_config(self, config):
self.max_angle = config['max_angle']
......@@ -48,8 +49,11 @@ class Laser:
return 100 * np.cos((phi - self.max_angle)/90*np.pi)
def set_lin_comp(self, pos):
print (self.old_comp_lin, pos)
if self.old_comp_lin == pos:
return
caput('F10HU-LMOT705:MOT.VAL', pos)
self.old_comp_lin = pos
import time
time.sleep(2)
......@@ -57,9 +61,8 @@ class Laser:
return caget('F10HU-LMOT705:MOT.VAL')
def measure(self):
import time
time.sleep(0.05)
import time as tttime
tttime.sleep(0.24)
import datetime
time = datetime.datetime.now()
sig_time, sig_uvolt = self.drs.readChannel(self.channel)
......
No preview for this file type
No preview for this file type
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import matplotlib
from math import sqrt
SPINE_COLOR = 'black'
def latexify(fig_width=None, fig_height=None, columns=1):
"""Set up matplotlib's RC params for LaTeX plotting.
Call this before plotting a figure.
Parameters
----------
fig_width : float, optional, inches
fig_height : float, optional, inches
columns : {1, 2}
"""
# code adapted from http://www.scipy.org/Cookbook/Matplotlib/LaTeX_Examples
# Width and max height in inches for IEEE journals taken from
# computer.org/cms/Computer.org/Journal%20templates/transactions_art_guide.pdf
assert(columns in [1,2])
if fig_width is None:
fig_width = 3 if columns==1 else 5 # width in inches
if fig_height is None:
golden_mean = (sqrt(5)-1.0)/2.0 # Aesthetic ratio
fig_height = fig_width*golden_mean # height in inches
MAX_HEIGHT_INCHES = 8.0
if fig_height > MAX_HEIGHT_INCHES:
print("WARNING: fig_height too large:" + fig_height +
"so will reduce to" + MAX_HEIGHT_INCHES + "inches.")
fig_height = MAX_HEIGHT_INCHES
params = {'backend': 'ps',
'text.latex.preamble': [r'\usepackage{gensymb}', r'\usepackage{siunitx}'],
'axes.labelsize': 12, # fontsize for x and y labels (was 10)
'axes.titlesize': 12,
'font.size': 12, # was 10
'legend.fontsize': 12, # was 10
'xtick.labelsize': 12,
'ytick.labelsize': 12,
'lines.linewidth': 1,
'text.usetex': True,
'figure.figsize': [fig_width,fig_height],
'font.family': 'serif',
'mathtext.default': 'regular'
}
matplotlib.rcParams.update(params)
def format_axes(ax):
plt.tight_layout()
ax.locator_params(nbins=6)
for spine in ['top', 'right']:
ax.spines[spine].set_visible(False)
for spine in ['left', 'bottom']:
ax.spines[spine].set_color(SPINE_COLOR)
ax.spines[spine].set_linewidth(0.5)
ax.xaxis.set_ticks_position('bottom')
ax.yaxis.set_ticks_position('left')
for axis in [ax.xaxis, ax.yaxis]:
axis.set_tick_params(direction='out', color=SPINE_COLOR)
return ax
\ No newline at end of file
......@@ -2,21 +2,12 @@
"cells": [
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 1,
"metadata": {
"hideCode": false,
"hidePrompt": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
......@@ -42,20 +33,20 @@
},
{
"cell_type": "code",
"execution_count": 220,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"configuration in morning loaded\n"
"druck 10 bar loaded\n"
]
}
],
"source": [
"import DataManager as dm\n",
"io = dm.IO('Data/EXP170823/')\n",
"io = dm.IO('Data/EXP170906/')\n",
"\n",
"\n",
"config = io.load(-1)\n",
......@@ -71,15 +62,12 @@
},
"outputs": [
{
"ename": "IndexError",
"evalue": "list index out of range",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-3-5e36e5d4c126>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mi\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mrange\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m3\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mconfigs\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mio\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mi\u001b[0m \u001b[0;34m,\u001b[0m\u001b[0mconfigs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'comment'\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/lwfaserver/DataManager.py\u001b[0m in \u001b[0;36mload\u001b[0;34m(self, name_id, kind, gui, elog)\u001b[0m\n\u001b[1;32m 226\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilename\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitem\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 227\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname_id\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mint\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 228\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mfilen\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mfilen\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mglob\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0miglob\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0mkind\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;34m'*.npy'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mname_id\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitem\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 229\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mload\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname_id\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m+\u001b[0m\u001b[0;34m'.npy'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitem\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 230\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mIndexError\u001b[0m: list index out of range"
"name": "stdout",
"output_type": "stream",
"text": [
"-3 before play with compressor\n",
"-2 druck 5 bar\n",
"-1 druck 10 bar\n"
]
}
],
......@@ -91,50 +79,69 @@
},
{
"cell_type": "code",
"execution_count": 221,
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[Interferometer]\n",
" y_calib = 1.0\n",
" BitsOfImage = 12\n",
" num_av = 10\n",
" zmin = -7.0\n",
" zmax = 7.0\n",
" x_tomo = 0.2\n",
"[Laser]\n",
" comp_lin = 38.02\n",
" attenuation = 100.0\n",
" channel = 1\n",
" max_angle = -22.9\n",
"[Periscope]\n",
" pos_l_x = 0.0\n",
" pos_l_z = -0.4000116604477615\n",
" deltaz_Mz = -1.0045767257462686\n",
" pos_g_origin_z = 12.5\n",
" pos_g_origin_x = -12.0\n",
" pos_l_y = -5.8302238805652e-06\n",
" sync_camera = False\n",
" pos_g_origin_y = 5.05\n",
" deltaz_Cz = -12.900011660447761\n",
"[ScreenCamera]\n",
" binning = 10\n",
" z0 = 8.45\n",
" calibrated = True\n",
" TriggerMode = True\n",
" ExposureTimeAbs = 35.0\n",
" live_preview = True\n",
" ExposureTimeAbs = 3000.0\n",
" y0 = 6.8\n",
"time = 2017-09-06_15-32-43.353404\n",
"comment = druck 10 bar\n",
"[DelayGenerator]\n",
" jet_triggered = True\n",
" rate = 11.904761904761903\n",
" t_sleep = 0.05\n",
" mode = single shot\n",
"[Interferometer]\n",
" binning = 10\n",
" z0 = 9.65\n",
" Ly = 13.0\n",
" x0 = 4.1\n",
" Tomography = False\n",
" Ly = 13.0\n",
" BitsOfImage = 12\n",
" zmax = 7.0\n",
" zmin = -7.0\n",
" y_calib = 1.0\n",
" num_av = 10\n",
" x0 = 7.699999999999999\n",
" live_preview = True\n",
" num_dir = 7\n",
" xmax = 4.0\n",
" take_data = True\n",
" TriggerMode = True\n",
" shift = 219\n",
" xmax = 4.0\n",
" ExposureTimeAbs = 35.0\n",
" xmin = 0.0\n",
" num_dir = 7\n",
"[BladePositioning]\n",
" pos_R = 342.65001\n",
" pos_L = -2.799999\n",
"time = 2017-08-23_10-20-57.606862\n",
" x_tomo = 0.2\n",
"[PlasmaCamHorizontal]\n",
" z0 = 7.0\n",
" y0 = 6.3999999999999995\n",
" binning = 2\n",
" z0 = 7.0\n",
" calibrated = False\n",
" TriggerMode = True\n",
" ExposureTimeAbs = 19999.999494757503\n",
"[DelayGenerator]\n",
" rate = 10.1010101010101\n",
" jet_triggered = True\n",
" t_sleep = 0.05\n",
" mode = single shot\n",
"comment = configuration in morning\n"
" ExposureTimeAbs = 80999.99795376789\n",
" y0 = 6.3999999999999995\n"
]
}
],
......@@ -151,7 +158,7 @@
},
{
"cell_type": "code",
"execution_count": 194,
"execution_count": 3,
"metadata": {
"collapsed": true,
"scrolled": true
......@@ -173,16 +180,16 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'time': '2017-09-04_11-06-00.979017'}"
"{'time': '2017-09-08_15-11-03.270338'}"
]
},
"execution_count": 17,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
......@@ -283,7 +290,9 @@
{
"cell_type": "code",
"execution_count": 230,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"focus.cam.close()\n",
......@@ -302,7 +311,7 @@
},
{
"cell_type": "code",
"execution_count": 196,
"execution_count": 5,
"metadata": {
"hideCode": false,
"hidePrompt": false,
......@@ -324,8 +333,8 @@
"try:\n",
" para_config = config['ParabolicMirror']\n",
"except:\n",
" para_config = {'pos_Pay': 3,\n",
" 'pos_Paz': 3}\n",
" para_config = {'pos_Pay': 3.99396444, \n",
" 'pos_Paz': 5.16051188}\n",
" \n",
"para = ParabolicMirror(para_config, home = False)"
]
......@@ -342,7 +351,7 @@
},
{
"cell_type": "code",
"execution_count": 197,
"execution_count": 6,
"metadata": {
"hideCode": false,
"hidePrompt": false,
......@@ -871,7 +880,7 @@
},
{
"cell_type": "code",
"execution_count": 120,
"execution_count": 7,
"metadata": {},
"outputs": [
{
......@@ -880,26 +889,12 @@
"text": [
"connecting camera\n",
"available cameras:\n",
"<DeviceInfo Basler avA2300-25gmDSY (21547524)>\n",
"<DeviceInfo Basler scA1400-17gm (21145133)>\n",
"<DeviceInfo Basler acA1920-40gm (22360583)>\n",
"<DeviceInfo Basler avA2300-25gmDSY (21547524)>\n",
"<DeviceInfo Basler acA3800-10gm (22005848)>\n",
"camera found =) Be happy\n",
"done\n"
]
},
{
"ename": "OSError",
"evalue": "Key is not writable",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mOSError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-120-9f2a4be74856>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 11\u001b[0m \u001b[0;34m'ExposureTimeAbs'\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;36m300\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 12\u001b[0m 'TriggerMode':False}\n\u001b[0;32m---> 13\u001b[0;31m \u001b[0mplasmacam\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mPlasmaCamHorizontal\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mplasmacam_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/PlasmaCamHorizontal.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, config)\u001b[0m\n\u001b[1;32m 41\u001b[0m \u001b[0mprint\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m'done'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 42\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 43\u001b[0;31m \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[0m\u001b[1;32m 44\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 45\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mplot_server_im\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32m/home/data/lwfaserver/Devices/PlasmaCamHorizontal.py\u001b[0m in \u001b[0;36mset_config\u001b[0;34m(self, config)\u001b[0m\n\u001b[1;32m 46\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 47\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mset_config\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---> 48\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcam\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mproperties\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'ExposureTimeAbs'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mconfig\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'ExposureTimeAbs'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 49\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcam\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mproperties\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'TriggerMode'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mmode\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mconfig\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'TriggerMode'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 50\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0my0\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mconfig\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'y0'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;32mPyPylon/cython/factory.pyx\u001b[0m in \u001b[0;36mpypylon.cython.factory._PropertyMap.__setitem__ (cython/factory.cpp:3450)\u001b[0;34m()\u001b[0m\n",
"\u001b[0;31mOSError\u001b[0m: Key is not writable"
]
}
],
"source": [
......@@ -1074,7 +1069,7 @@
},
{
"cell_type": "code",
"execution_count": 209,
"execution_count": 8,
"metadata": {
"collapsed": true,
"hideCode": false,
......@@ -1105,7 +1100,7 @@
},
{
"cell_type": "code",
"execution_count": 210,
"execution_count": 9,
"metadata": {
"collapsed": true,
"hideCode": false,
......@@ -1138,7 +1133,7 @@
},
{
"cell_type": "code",
"execution_count": 211,
"execution_count": 10,
"metadata": {
"collapsed": true,
"hideCode": false,
......@@ -1154,7 +1149,7 @@
"except:\n",
" fara_config = {'channel':2,\n",
" 'R': 50.,\n",
" 'amplification': 1e3}\n",
" 'amplification': 316}\n",
" fara = FaradayCup(fara_config, drs)"
]
},
......@@ -1196,7 +1191,7 @@
},
{
"cell_type": "code",
"execution_count": 251,
"execution_count": 11,
"metadata": {
"collapsed": true,
"hideCode": false,
......@@ -1209,7 +1204,7 @@
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"\n",
"io = dm.IO('Data/EXP170906/')\n",
"io = dm.IO('Data/EXP170908/')\n",
"\n",
"\n",
"import GUI"
......@@ -1217,7 +1212,7 @@
},
{
"cell_type": "code",
"execution_count": 264,
"execution_count": 13,
"metadata": {
"hideCode": false,
"hidePrompt": false,
......@@ -1227,7 +1222,7 @@
},
"outputs": [],
"source": [
"devices = [delay, inter, plasmacam, per, laser, fara]#, focus]#, per]#, blade] #use this to run the LWFA\n",
"devices = [delay, plasmacam, per,para, laser, fara]#, focus]#, per]#, blade] #use this to run the LWFA\n",
"#devices = [delay, inter,plasmacam, per, para, laser, fara]\n",
"#devices = [delay]#,screen,inter,plasmacam] #use this to do focus optimization\n",
"\n",
......@@ -1245,54 +1240,30 @@
},
{
"cell_type": "code",
"execution_count": 265,
"execution_count": 20,
"metadata": {
"hideCode": false,
"hidePrompt": false,
"scrolled": false
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [