Matze 4 years ago
parent
commit
80fa63df43
42 changed files with 1065 additions and 0 deletions
  1. BIN
      Docu/Kapture2 Docu.pdf
  2. 42 0
      Docu/Kapture2 Docu.tex
  3. BIN
      Docu/Plots/BankRegister.PNG
  4. BIN
      Docu/Plots/Icons/EPICS_Logo.png
  5. BIN
      Docu/Plots/Icons/adc_icon.png
  6. 27 0
      Docu/Plots/Icons/adc_icon.svg
  7. BIN
      Docu/Plots/Icons/calib.png
  8. 34 0
      Docu/Plots/Icons/calib.svg
  9. BIN
      Docu/Plots/Icons/clock.png
  10. 3 0
      Docu/Plots/Icons/clock.svg
  11. BIN
      Docu/Plots/Icons/correlation.png
  12. 27 0
      Docu/Plots/Icons/correlation.svg
  13. BIN
      Docu/Plots/Icons/cuda_icon.png
  14. 4 0
      Docu/Plots/Icons/einstellungen.svg
  15. BIN
      Docu/Plots/Icons/folder.png
  16. 3 0
      Docu/Plots/Icons/folder.svg
  17. BIN
      Docu/Plots/Icons/timescan.png
  18. BIN
      Docu/Plots/Icons/wrench.png
  19. BIN
      Docu/Plots/Kapture.png
  20. BIN
      Docu/Plots/Widgets/AcquireSetting.PNG
  21. BIN
      Docu/Plots/Widgets/CalibrationWidget.PNG
  22. BIN
      Docu/Plots/Widgets/CalibrationWidget0.PNG
  23. BIN
      Docu/Plots/Widgets/Correlation.PNG
  24. BIN
      Docu/Plots/Widgets/Epics1.PNG
  25. BIN
      Docu/Plots/Widgets/Epics2.PNG
  26. BIN
      Docu/Plots/Widgets/Leftbar.PNG
  27. BIN
      Docu/Plots/Widgets/Plot1.PNG
  28. BIN
      Docu/Plots/Widgets/Plot2.PNG
  29. BIN
      Docu/Plots/Widgets/Plot3.PNG
  30. BIN
      Docu/Plots/Widgets/Plot4.PNG
  31. BIN
      Docu/Plots/Widgets/Plot5.PNG
  32. BIN
      Docu/Plots/Widgets/SingleRead.PNG
  33. BIN
      Docu/Plots/Widgets/TimeScan.PNG
  34. BIN
      Docu/Plots/Widgets/TimingWidget.PNG
  35. BIN
      Docu/Plots/timeplan4.png
  36. 174 0
      Docu/bib.bib
  37. 162 0
      Docu/chapters/part01-use.tex
  38. 128 0
      Docu/chapters/part02-develope.tex
  39. 69 0
      Docu/chapters/titlepage.tex
  40. BIN
      Docu/default/KITLogo_RGB.pdf
  41. 34 0
      Docu/default/header.aux
  42. 358 0
      Docu/default/header.tex

BIN
Docu/Kapture2 Docu.pdf


+ 42 - 0
Docu/Kapture2 Docu.tex

@@ -0,0 +1,42 @@
+\documentclass[11pt,a4paper,titlepage,twoside]{scrreprt}
+
+\include{default/header}
+
+
+
+\usepackage[numbers]{natbib}
+
+\begin{document}
+
+\pagenumbering{Roman}
+
+\include{chapters/titlepage}
+%\blankpage
+
+\tableofcontents
+
+%\listoffigures
+
+%\listoftables
+
+\newpage
+
+\pagenumbering{arabic}
+\include{chapters/part01-use}
+\include{chapters/part02-develope}
+
+\newpage
+%\bibliographystyle{acm}
+%\bibliographystyle{unsrt}
+%\bibliography{References}
+%\bibliographystyle{babalpha-fl}
+
+%\bibliographystyle{unsrtdin}
+%\bibliography{bib}
+%{\small\bibliography{References}}
+
+\appendix
+
+\include{chapters/appendix}
+
+\end{document}

BIN
Docu/Plots/BankRegister.PNG


BIN
Docu/Plots/Icons/EPICS_Logo.png


BIN
Docu/Plots/Icons/adc_icon.png


+ 27 - 0
Docu/Plots/Icons/adc_icon.svg

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1"
+	 id="svg11300" inkscape:export-filename="/home/jimmac/Desktop/wi-fi.png" inkscape:export-xdpi="90.000000" inkscape:export-ydpi="90.000000" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:version="0.46" sodipodi:docbase="C:\Documents and Settings\JJB\My Documents\My Pictures\Electronics\Illustrations\Icons" sodipodi:docname="ADC Icon.svg" sodipodi:version="0.32" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 41.5 41.5"
+	 style="enable-background:new 0 0 41.5 41.5;" xml:space="preserve">
+<style type="text/css">
+	.st0{display:none;fill:url(#rect11518_1_);stroke:#3465A4;stroke-linejoin:bevel;stroke-miterlimit:10;}
+	.st1{fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;}
+	.st2{fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;}
+	.st3{fill:none;stroke:#000000;stroke-width:4;stroke-linejoin:bevel;stroke-miterlimit:10;}
+</style>
+<g id="layer1" inkscape:groupmode="layer" inkscape:label="Layer 1">
+	
+		<radialGradient id="rect11518_1_" cx="-1649.2344" cy="225.8391" r="20.531" gradientTransform="matrix(2.1282 0 0 2.1283 3531.4219 -447.5757)" gradientUnits="userSpaceOnUse">
+		<stop  offset="0" style="stop-color:#9CBCDE"/>
+		<stop  offset="1" style="stop-color:#204A87"/>
+	</radialGradient>
+	<path id="rect11518" class="st0" d="M6.2,0.8h29.2c3,0,5.5,2.4,5.5,5.5v29.2c0,3-2.4,5.5-5.5,5.5H6.2c-3,0-5.5-2.4-5.5-5.5V6.3
+		C0.8,3.2,3.2,0.8,6.2,0.8z"/>
+	<path id="path3484" sodipodi:nodetypes="cccccccccccccc" class="st1" d="M2.8,30.2h5v3.6h7v-3.6h5v-6.4h6v-3h6v3h6v7h1"/>
+	<path id="path3434" sodipodi:nodetypes="csssssss" class="st2" d="M3.1,14.4C5,16.7,6.9,19,8.7,20.2s3.8,1.2,5.6,0s3.8-3.4,5.6-5.8
+		c1.9-2.3,3.8-4.6,5.6-5.8c1.9-1.2,3.8-1.2,5.6,0c1.9,1.2,3.8,3.4,5.6,5.8c0.7,0.9,1.5,1.8,2.2,2.7"/>
+	<path id="rect11528" class="st3" d="M6.1,2.3h29.3c2.2,0,3.9,1.7,3.9,3.9v29.3c0,2.2-1.7,3.9-3.9,3.9H6.1c-2.2,0-3.9-1.7-3.9-3.9
+		V6.2C2.2,4.1,4,2.3,6.1,2.3z"/>
+</g>
+</svg>

BIN
Docu/Plots/Icons/calib.png


+ 34 - 0
Docu/Plots/Icons/calib.svg

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 8 8" style="enable-background:new 0 0 8 8;" xml:space="preserve">
+<style type="text/css">
+	.st0{fill:none;stroke:#FF0000;stroke-width:0.5;stroke-miterlimit:10;}
+	.st1{fill:#FF0000;}
+	.st2{fill:none;stroke:#FF0000;stroke-width:0.3;stroke-miterlimit:10;}
+</style>
+<path d="M4.8,1.5C3,1.5,1.5,3,1.5,4.8S3,8,4.8,8S8,6.5,8,4.8S6.5,1.5,4.8,1.5z M4.8,1.9c1.6,0,2.9,1.3,2.9,2.9S6.3,7.6,4.8,7.6
+	S1.9,6.3,1.9,4.8S3.2,1.9,4.8,1.9z"/>
+<path d="M4.8,2.6c-1.2,0-2.2,1-2.2,2.2S3.5,7,4.8,7S7,6,7,4.8S6,2.6,4.8,2.6z M4.8,2.9c1,0,1.8,0.8,1.8,1.8S5.8,6.6,4.8,6.6
+	S2.9,5.8,2.9,4.8S3.7,2.9,4.8,2.9z"/>
+<path d="M4.8,3.6c-0.6,0-1.2,0.5-1.2,1.2s0.5,1.2,1.2,1.2s1.2-0.5,1.2-1.2S5.4,3.6,4.8,3.6z M4.8,3.9c0.4,0,0.8,0.4,0.8,0.8
+	c0,0.4-0.4,0.8-0.8,0.8c-0.4,0-0.8-0.4-0.8-0.8C3.9,4.3,4.3,3.9,4.8,3.9z"/>
+<g>
+	<g>
+		<g>
+			<line class="st0" x1="3.9" y1="3.9" x2="1.2" y2="1.1"/>
+			<g>
+				<polygon class="st1" points="4,2.9 3.7,3.7 3,4 4.8,4.8 				"/>
+			</g>
+		</g>
+	</g>
+	<g>
+		<line class="st2" x1="2" y1="0.8" x2="1.9" y2="1.7"/>
+		<polyline class="st2" points="2.4,2.3 2.5,1.4 1.4,0.3 1.3,1.2 		"/>
+	</g>
+	<g>
+		<line class="st2" x1="0.9" y1="1.9" x2="1.8" y2="1.8"/>
+		<polyline class="st2" points="2.3,2.3 1.4,2.4 0.4,1.3 1.3,1.2 		"/>
+	</g>
+</g>
+</svg>

BIN
Docu/Plots/Icons/clock.png


+ 3 - 0
Docu/Plots/Icons/clock.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
+  <path d="M4 0c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 1c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm-.5 1v2.22l.16.13.5.5.34.38.72-.72-.38-.34-.34-.34v-1.81h-1z" />
+</svg>

BIN
Docu/Plots/Icons/correlation.png


+ 27 - 0
Docu/Plots/Icons/correlation.svg

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 8 8" style="enable-background:new 0 0 8 8;" xml:space="preserve">
+<style type="text/css">
+	.st0{fill:none;stroke:#000000;stroke-width:0.4;stroke-miterlimit:10;}
+	.st1{fill:#1D1DFF;}
+	.st2{fill:none;stroke:#E90000;stroke-width:0.5;stroke-miterlimit:10;}
+</style>
+<polyline class="st0" points="7.4,7.5 0.6,7.5 0.6,0.4 "/>
+<circle class="st1" cx="3.4" cy="3.2" r="0.3"/>
+<line class="st2" x1="1.8" y1="6" x2="6.7" y2="1.7"/>
+<circle class="st1" cx="2.1" cy="6.2" r="0.3"/>
+<circle class="st1" cx="5.8" cy="3.3" r="0.3"/>
+<circle class="st1" cx="5.5" cy="1.9" r="0.3"/>
+<circle class="st1" cx="4" cy="4.6" r="0.3"/>
+<circle class="st1" cx="1.8" cy="4.9" r="0.3"/>
+<circle class="st1" cx="4.8" cy="2.8" r="0.3"/>
+<circle class="st1" cx="5" cy="4" r="0.3"/>
+<circle class="st1" cx="3.4" cy="5.9" r="0.3"/>
+<circle class="st1" cx="6.4" cy="1.1" r="0.3"/>
+<circle class="st1" cx="6.4" cy="2.5" r="0.3"/>
+<circle class="st1" cx="2.6" cy="4.5" r="0.3"/>
+<circle class="st1" cx="7.2" cy="1.2" r="0.3"/>
+<circle class="st1" cx="4.9" cy="5.2" r="0.3"/>
+<circle class="st1" cx="3.6" cy="4" r="0.3"/>
+</svg>

BIN
Docu/Plots/Icons/cuda_icon.png


+ 4 - 0
Docu/Plots/Icons/einstellungen.svg

@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="50px" height="50px">
+    <path d="M47.16,21.221l-5.91-0.966c-0.346-1.186-0.819-2.326-1.411-3.405l3.45-4.917c0.279-0.397,0.231-0.938-0.112-1.282 l-3.889-3.887c-0.347-0.346-0.893-0.391-1.291-0.104l-4.843,3.481c-1.089-0.602-2.239-1.08-3.432-1.427l-1.031-5.886 C28.607,2.35,28.192,2,27.706,2h-5.5c-0.49,0-0.908,0.355-0.987,0.839l-0.956,5.854c-1.2,0.345-2.352,0.818-3.437,1.412l-4.83-3.45 c-0.399-0.285-0.942-0.239-1.289,0.106L6.82,10.648c-0.343,0.343-0.391,0.883-0.112,1.28l3.399,4.863 c-0.605,1.095-1.087,2.254-1.438,3.46l-5.831,0.971c-0.482,0.08-0.836,0.498-0.836,0.986v5.5c0,0.485,0.348,0.9,0.825,0.985 l5.831,1.034c0.349,1.203,0.831,2.362,1.438,3.46l-3.441,4.813c-0.284,0.397-0.239,0.942,0.106,1.289l3.888,3.891 c0.343,0.343,0.884,0.391,1.281,0.112l4.87-3.411c1.093,0.601,2.248,1.078,3.445,1.424l0.976,5.861C21.3,47.647,21.717,48,22.206,48 h5.5c0.485,0,0.9-0.348,0.984-0.825l1.045-5.89c1.199-0.353,2.348-0.833,3.43-1.435l4.905,3.441 c0.398,0.281,0.938,0.232,1.282-0.111l3.888-3.891c0.346-0.347,0.391-0.894,0.104-1.292l-3.498-4.857 c0.593-1.08,1.064-2.222,1.407-3.408l5.918-1.039c0.479-0.084,0.827-0.5,0.827-0.985v-5.5C47.999,21.718,47.644,21.3,47.16,21.221z M25,32c-3.866,0-7-3.134-7-7c0-3.866,3.134-7,7-7s7,3.134,7,7C32,28.866,28.866,32,25,32z"/>
+</svg>

BIN
Docu/Plots/Icons/folder.png


+ 3 - 0
Docu/Plots/Icons/folder.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
+  <path d="M0 0v2h8v-1h-5v-1h-3zm0 3v4.5c0 .28.22.5.5.5h7c.28 0 .5-.22.5-.5v-4.5h-8z" />
+</svg>

BIN
Docu/Plots/Icons/timescan.png


BIN
Docu/Plots/Icons/wrench.png


BIN
Docu/Plots/Kapture.png


BIN
Docu/Plots/Widgets/AcquireSetting.PNG


BIN
Docu/Plots/Widgets/CalibrationWidget.PNG


BIN
Docu/Plots/Widgets/CalibrationWidget0.PNG


BIN
Docu/Plots/Widgets/Correlation.PNG


BIN
Docu/Plots/Widgets/Epics1.PNG


BIN
Docu/Plots/Widgets/Epics2.PNG


BIN
Docu/Plots/Widgets/Leftbar.PNG


BIN
Docu/Plots/Widgets/Plot1.PNG


BIN
Docu/Plots/Widgets/Plot2.PNG


BIN
Docu/Plots/Widgets/Plot3.PNG


BIN
Docu/Plots/Widgets/Plot4.PNG


BIN
Docu/Plots/Widgets/Plot5.PNG


BIN
Docu/Plots/Widgets/SingleRead.PNG


BIN
Docu/Plots/Widgets/TimeScan.PNG


BIN
Docu/Plots/Widgets/TimingWidget.PNG


BIN
Docu/Plots/timeplan4.png


+ 174 - 0
Docu/bib.bib

@@ -0,0 +1,174 @@
+@mastersthesis{Schwarzkopf,
+  author = {Joachim Schwarzkopf},
+  title = {Mikrowellendiagnostik und Elektronenstrahlstudien an ANKA},
+  school = {LAS, KIT},
+  year = {2014},
+  type = {Diplomarbeit}
+}
+
+@mastersthesis{Patrik,
+  author = {Patik Schönfeldt},
+  title = {Systemstische Untersuchung der Bestimmung von Burstingschwellen},
+  school = {LAS, KIT},
+  year = {2013},
+  type = {Diplomarbeit}
+}
+
+@book{Wiedemann,
+  author = {Helmut Wiedemann},
+  title = {Particle Accelerator Physics},
+  year = {2009},
+  edition = {3},
+  publisher = {Springer-Verlag}
+}
+
+@book{Wille,
+title = {Physik der Teilchenbeschleuniger und Synchrotronstrahlungsquellen : eine Einführung},
+series = {Teubner-Studienbücher : Physik},
+author = {Wille, Klaus},
+address = {Stuttgart},
+publisher = {Teubner},
+year = {1996},
+edition = {2., überarb. und erw. Aufl.},
+isbn = {3-519-13087-4},
+size = {XI, 365 S. : graph. Darst.},
+keywords = { ; Particle accelerators / Synchrotron radiation sources ; Teilchenbeschleuniger ; Synchrotronstrahlung},
+}
+
+@article{Blewett,
+  author = {John P. Blewett},
+  title = {Synchrotron Radiation -- Early History},
+  journal = {Journal of Synchrotron Radiation},
+  number = {5},
+  c_volume = {3},
+  pages = {135-139},
+  year = {1998}
+}
+
+@article{PhysRev.96.180,
+  title = {Suppression of Coherent Radiation by Electrons in a Synchrotron},
+  author = {Nodvick, John S. and Saxon, David S.},
+  journal = {Phys. Rev.},
+  volume = {96},
+  issue = {1},
+  pages = {180--184},
+  numpages = {0},
+  year = {1954},
+  month = {Oct},
+  publisher = {American Physical Society},
+  doi = {10.1103/PhysRev.96.180},
+  url = {http://link.aps.org/doi/10.1103/PhysRev.96.180}
+}
+
+@manual{BiasT,
+	address = {http://www.minicircuits.com/pdfs/ZABT-2R15G+.pdf},
+	title = {BIAS-T ZABT-2R15G+},
+	year = {},
+	note = {Zugriff: 16.01.2015 13:53}
+}
+
+@manual{IgorPro,
+	address = {http://www.wavemetrics.com/},
+	title = {WaveMetrics},
+	year = {},
+	note = {Zugriff: 12.2014}
+}
+
+
+@article{Anke,
+author = {Müller, Anke-Susanne},
+title = {Accelerator-Based Sources of Infrared and Terahertz Radiation},
+journal = {Reviews of Accelerator Science and Technology},
+volume = {03},
+number = {01},
+pages = {165-183},
+year = {2010},
+doi = {10.1142/S1793626810000427},
+
+URL = {http://www.worldscientific.com/doi/abs/10.1142/S1793626810000427},
+eprint = {http://www.worldscientific.com/doi/pdf/10.1142/S1793626810000427}
+}
+
+
+@article{AnkeLow,
+author = {Müller, Anke-Susanne},
+title = {Modeling the Shape of Coherent THz Pulses Emitted by Short Bunches in an Electron Storage Ring},
+journal = {EPAC '08}
+}
+
+@mastersthesis{DissJudin,
+  author = {Vitali Judin},
+  title = {Untersuchung von Bunch-Bunch-Wechselwirkungen und des Einflusses der geometrischen Impedanz bei der Erzeugung kohärenter THz-Strahlung},
+  school = {KIT},
+  year = {2013},
+  type = {Dissertation}
+}
+
+@article{Warnock,
+	author = {Warnock, B. L.},
+	title = {Shielded Coherent SynchrotronRadiation and Its Effect on Very
+Short Bunches.},
+	note ={ Stanford Linear Accelerator Center, Stanford University, Stanford,
+CA 94309 USA},
+}
+
+@MISC{AnkeP,
+author = {Müller, Anke-Susanne},
+title = {pers. Mitteilung}
+}
+
+@MISC{HillerP,
+author = {Hiller, Nicole},
+title = {pers. Mitteilung}
+}
+
+@MISC{SteinmanP,
+author = {Steinmann, Johannes},
+title = {pers. Mitteilung}
+}
+
+@MISC{PatrikP,
+author = {Schönfeldt, Patrik},
+title = {pers. Mitteilung}
+}
+
+@mastersthesis{DissHiller,
+  author = {Nicole Hiller},
+  title = {Electro-Optical Bunch Length Measurements at the ANKA Storage Ring},
+  school = {KIT},
+  year = {2013},
+  type = {Dissertation}
+}
+
+@MISC{ANKA,
+author = {ANKA},
+title = {{ANKA} instrumentation book},
+address= {Kaiserstraße 12, 67131 Karlsruhe: Karlsruher Institut für Technologie, 2012}
+}
+
+@MISC{Vorlesung,
+author = {Müller, Anke-Susanne},
+title = {Physik der Teilchenbeschleuniger},
+address= {Vorlesungsfolien “Physik der Teilchenbeschleuniger”.},
+year = {2014}
+}
+
+@book{LNB1,
+title = {Digitale Fernseh- und Hörfunktechnik in Theorie und Praxis : MPEG-Basisbandcodierung, DVB-, DAB-, ATSC-, ISDB-T-Übertragungstechnik, Messtechnik},
+author = {Fischer, Walter},
+address = {Berlin, Heidelberg},
+publisher = {Springer Berlin Heidelberg},
+year = {2010},
+isbn = {978-3-642-15047-0}
+}
+ 
+@misc{LNB2,
+title = {Grundlagen der Hochfrequenztechnik},
+series = {Technik 10-2012},
+author = {Detlefsen, Jürgen and Siart, Uwe},
+address = {München},
+publisher = {Oldenbourg},
+year = {2012},
+edition = {4., aktualisierte Aufl.},
+isbn = {978-3-486-70891-2}
+}

+ 162 - 0
Docu/chapters/part01-use.tex

@@ -0,0 +1,162 @@
+%!TEX root = ../Kapture2 Docu.tex
+%% ==============================
+\chapter{Using Kapture 2}
+\label{ch:use}
+%% ==============================
+
+
+\section{start}
+\Grafik[H]{1}{Kapture.png}
+Currently the Startup of the system needs some manual workaround. Before turning on the PC put the 3 switches in the state shown in the Picture.
+Then Boot the PC when the Lockin screen is visible turn the HighFlex of and on with the big switch on the Highflex. Then reboot the PC. 
+
+The two switches are to powerdown the inputstage of the KAPTURE Modules. To power them up first turn on the switch 1 and than the switch 2! (if there is a longer period without measurement one can turn them back of to reduce termal stress.)
+
+Now you are good to go ;)
+
+After starting the PC, start the gui and hit 'Prepare Board' and you are ready to Measure at 500\,MHz with 125\,MHz as reference. To reset the Board one can just use Prepare Board. (Soft Reset and Board Off are not necessary for KAPTURE-2). After that DataFlow, Master Controll and Data Check should be green. Also take a look on the LEDs of the HighFlex. The 3 inside the red circle indicate that the PCI is working (if one of them is not on - turn the HighFlex off and on and reboot). The 2 inside the blue circle indicate that both PLL are locked. If one is of, redo the prepare Board.
+
+It can be also done maualy. For example if the 500\,MHz is used as imputclock. Than first \textit{Board Reset}, now the correct \textit{PLL init} then \textit{PLL Sync}, then \textit{ADC Calib} and \textit{ADC Autosync}.
+
+On the MultiView Page one can find all the controls. 
+
+\subsection{Basic Settings}
+\subsubsection{Configfile}
+In 'home/user/.kcg2' are two config files. One for the general and one specific for epics.
+The Configfile is more or less self explaining. 
+If the file does not exist a window opens where the config can also be edited. 
+
+The epics config is best to edit only via the epicsWidget.
+
+After a change, the GUI needs to be restarted.
+
+\subsubsection{file/settings}
+This is a small Settings window to set at runtime the Save Location and the Subdirectory.
+
+
+
+
+\newpage
+\section{Timing Widget}
+\includegraphics[width=1.5em]{Plots/Icons/clock.png} (Ctrl+T) contains the delay settings. KAPTURE-2 has 3 different delays. \\
+\Grafik[H]{0.8}{Widgets/TimingWidget.PNG}
+330ps global Delay with 20 possible steps\\
+25ps global Delay with 24 possible steps\\
+3ps channel independent Delay with 32 steps\\
+
+In addition the second KAPTURE Module can be delayed with the 25ps in the \textit{T/H FMC2} column. The Default is 4! So for example value of 3 means that the second board wir sample 25\,ps earlier.
+
+The advanced settings for ADC Delay and FPGA Delay are usualy not to use. They are mainly for developement. In normal user-operation the GUI handles them automaticaly.
+\TextGrafik[h]{Timing distribution of a KAPTURE-2 Modul. The Cascade Clock output of the first Modul is used as input for the second modul}{pl:T:bahn}{0.7}{timeplan4.png}
+
+
+
+
+
+\newpage
+\section{Time Scan Widget}
+\includegraphics[width=1.5em]{Plots/Icons/timescan.png} (Ctrl+Shift+T)
+\Grafik[H]{1}{Widgets/TimeScan.PNG}
+The Time Scan was moved to a new Widget (mostly for code simplification). A TimeScan can be used to find the delays. 
+
+Via a dropdown menu one can select how the measured data is processed.
+\begin{itemize}
+	\item Mean over Everything:
+	It just calculates the mean of the complete data. This is usualy not to helpfull.
+	\item Threshold:
+	Calculates the mean only for datapoints with not in $2048 +$ threshold. If you have a negativ peak, enter a negativ sign. 
+	\item Bucket:
+	Calculates the mean of only on bucket - usualy the best way.
+	\item All Buckets:
+	New Feature: It calculates the mean for all buckets individually. Therefore the resulting file is bigger but it allowes to compare the buckets.
+\end{itemize}
+
+It offers different Scan Modes. In the standard way (as it is in the Screenshot) it scanns step by step throught all delays. In this mode usualy one uses the 25\,ps Step4 Option. If it is set to Step 1 one does oversample the Signal and increases the needed Time. 
+The \textbf{Fast Mode} is primary desinged to find the region of the Signal inside the 2\,ns Bucket. In this case it sets spreads the 8 ADCs over the 100\,ps area of the 3\,ps. and then  goes over the complete 2\,ns domain with 25\,ps Step 1. It is usualy best to use with a threshold of 20.
+The \textbf{Calibration Scan} is only needed to generate the Calibration data with the analog 500\,MHz signal and will take a long time. (Details in the Calibration Section)
+
+The Scan Results are stored in the subfolder \texttt{TimeScan}. In the logfile \texttt{scan.info} will the Scan Parameters be stored. The user has the posibility to use the Identifyer entry to add any text to the Logfile. 
+
+The Plotwindow offers multiple view. In \textbf{default} the data is plotted for each Channel separately over the delay setting. The other option is the \textbf{timecorrected} where the selected ADCs are plotted in one plot over Time. In this view also the Calibration can be activated and the Error can be plotted. In Addition a Fit can be performed.
+
+
+\newpage
+\section{Calibration}
+\includegraphics[width=1.5em]{Plots/Icons/calib.png} (Ctrl+U)
+\Grafik[H]{0.3}{Widgets/CalibrationWidget0.PNG}
+This offers a Calibration Routine. First a small widget opens where the TimeScan that will be used is to be selected. It is also Possible to open the Calibration directly from the Scan Results Widget. In this case this Fileselection is skipped.
+
+\Grafik[H]{0.8}{Widgets/CalibrationWidget.PNG}
+The main Widget. The Left plot shows the original data with no calibration applied. The Right Plot than with all calibration used. The lower Inputlines can be  used to manualy adjust the calibration. 
+
+The Calibration is split into two Parts
+\begin{itemize}
+	\item 500\,MHz:\\
+		This needs only to be done once. Maybe it is usefull to repeat it after one year or so. To do this one uses the 500\,MHz RF clock as Input for the Channels and does a Calibration Scan. And then in this Widget select the type to be \textit{500\,MHz}. (the other Options have no effect in this case). It will take a view minutes! It calibrates the width of the Delays.
+	\item Peak:\\
+		This is the more often needed One. It should be done at least every time the Measurement setup is changed. This calibrates the Baseline, Gain and Timeoffset for the 8 Channels. To do that take a Timescan (usualy with step 4) of the Measurement Signal (as seen in the Screenshot). Now select if it is a Negative Peak or a Positive Peak. If there is a region with the Baseline in front of the Puls (like in the screenshot) one can force the system to use that for Baseline determination via \textit{use first data as Baseline}. If not or not wanted, set it to 0 (which is also the default).
+\end{itemize}
+To run the Calibration hit \texttt{Run}. This does not override the old one. If the result is good use \texttt{Save} to write it into the file. The old calibration file will than be renamed.
+
+
+\section{Correlation Test}
+\includegraphics[width=1.5em]{Plots/Icons/correlation.png} (Ctrl+Shift+C)
+\Grafik[H]{1}{Widgets/Correlation.PNG}
+This is only needed if a PeakReconstruction is later to be done. It can also be opened from the Scan Results Widget. With this, one can test if the used distribution of the Channels will give good results. Everytime a SingeRead or a ContinuousRead is done the widget updates the distribution. To Perform the test hit \texttt{Run} and wait. On the current KAPTURE-2 System without a CUDA-GPU this is done remotely on ibpt-kapture1. If the result is pleasing one can save the Correlation Correction Parameters via \texttt{Save} so that they can be used later for the ReconstructionAlgorithm.
+
+
+
+\newpage
+\section{Acquisition}
+\includegraphics[width=1.5em]{Plots/Icons/wrench.png} (Ctrl+A)
+\Grafik[H]{0.4}{Widgets/AcquireSetting.PNG}
+
+The first to parameters define each acquisition, with the number of turns to observe and the number to skip. Be aware, that the turns to observe the skipped turns include. (e.g. If observe is 1000 and skip is 1, the file contains 500 datapoints). 
+
+The option \textit{shift FMC2} can be used if there is a shift between ADC1-4 and ADC5-8 witch is with the currend firmware usualy the case. It does not change anything in the raw file!
+Currently also KAPTURE-2 is most stable without external revolution clock. Therefore \textit{Simulate Pilot Bunch} needs to be checked.
+
+
+
+\section{Ploting}
+
+
+
+\section{EPICS}
+\includegraphics[width=1.5em]{Plots/Icons/EPICS_Logo.png} (Ctrl+E)
+The epics widget allows to read out parameters of KARA to store them in the Logfile for every acquisition. To change the known PVs open the PV List. Here you can edit the displayname and the PV name as well as make them available for the Log and show them in the Monitor. To remove one entry use the garbage can icon. A new PV can be added in the last line of the table. 
+Changes will only be done in the config file by \textit{apply + save}. With \textit{apply} the changes will be only temporarly.
+\Grafik[H]{0.3}{Widgets/Epics1.PNG}
+\Grafik[H]{0.8}{Widgets/Epics2.PNG}
+
+
+\chapter{Important notes for measurements}
+\begin{itemize}
+	\item startup procedure: Boot PC, switch HighFlex off and on, reboot PC
+	\item Prepare Board can always be used to reset the board
+	\item check that PLL lock LEDs are on
+	\item use internal pilot bunch
+	\item activate HEADER
+	\item T/H FMC2 25ps to 4 is no offset
+	
+	
+
+
+\end{itemize}
+
+
+%\section{CUDA}
+
+%\section{ADC}
+%(Ctrl+G)
+%This Widget contains two features. Primary it is to set the Gain and the offset correction for every adc.
+
+%The value range is:\\
+%Gain 0 -- 0x7FFF\\
+%Offset 0 -- 0x1FFF (the leading 1 is used as sign. So 0x0FFF is the maximum positive offset and 0x1FFF the maximum negative offset)
+
+%The widget has addidionaly a Calibration Helper. This can be used to determine the right Gain and Offset value so that all ADCs are equal.
+%\begin{itemize}
+%	\item Baseline: it just calculates the mean and std for the complete data for every ADC
+%	\item Peak: It splits the Signal in two region (upper and lower) and calculates the mean and std for both. 
+%\end{itemize}

+ 128 - 0
Docu/chapters/part02-develope.tex

@@ -0,0 +1,128 @@
+%!TEX root = ../Kapture2 Docu.tex
+\chapter{GUI Developement}
+\label{ch:dev}
+\section{Pagackelist}
+\begin{itemize}
+	\item PyQT4
+	\item sip
+	\item pyqtgraph
+	\item numpy
+	\item psutil
+	\item pyepics
+	\item setuptools
+\end{itemize}
+
+
+\section{misc}
+\label{ch:dev:misc}
+The Code is written to be working on both Python2 and Python3. At the moment this guide mostly only provides infos for the modules I devloped or changed.
+
+Before the Idea of KAPTURE2 came to live there was the idea to put multiple Kapture1 boards in on PC. So to the GUI a multi Kapture support was added. Unfortunately not in a perfect OOP fashion and therefore the code is now a little bit inconsistent. The new changes for KAPTURE2 mostly ingnore things from the multi kapture implementation and therefore the current GUI version does not realy support multi KAPTURE anymore - sry. 
+
+Also it should work also on the old KAPTURE-1 System but it has not been tested.
+
+\section{Design}
+\label{ch:dev:misc}
+From bottom to top.
+
+\subsection{Modules}
+\subsubsection*{base/backend/board/communication}
+This contains the \code{class PCI}, witch wrapps the systemcalls for the pci communication to the FPGA.
+It also creates one instance of the class with the name \code{pci}. By using 
+\begin{lstlisting}
+	from .communication import pci
+\end{lstlisting}
+one can then read and write to the FPGA.
+
+There is also a dummy class wich is selected when the gui ist started with --testing parameter. It does not read or write to the hardware and can be therefore used while developing on a system without a KAPTURE board - even on a windows system.
+
+
+\subsubsection*{base/backend/board/board\_config}
+This contains the \code{class BoardConfiguration}. It is the central control Class for all the KAPTURE settings. (Like Delay, Turns to observe ...) It uses a dictonary to stores all the settings. 
+
+It is mainly base on observers. The function \code{update(key, value)} is used to change a setting. It then calls the observers. There are 3 Types of observers
+\begin{enumerate}
+	\item observers\_write:\\ those are controlled by the class it self. They write the settings to the board.
+	\item observers\_for\_all:\\ they are called everytime one setting is changed - indipendent of the key
+	\item observers:\\ they are called when the coresponding key changes. Those are mainly used to update the GUI.
+\end{enumerate}
+
+The \code{update} function has an additional parameter \code{write=True} it controls weather the observers\_write will be called or not. By default it is set to true. This is only needed for the function \code{read\_from\_board}, wich reads the settings from the FPGA, to prevent it from unnessesary rewrite it.
+
+
+In widgets one can register a observer via the function \code{observe(who, callback, key)}\\
+who is used as an identifyer when one wants to remove the observer. It can be nearly everything - Object, variable - usualy in the GUI it is the Object that will be changed (Like the lable that is updated). \\
+callback is the function that will be called and needs to have one parameter by wich the new value will be passed.\\
+key is the setting that will be observed.
+
+When the widget will be deleted all coresponding observers need to be removed by \code{unobserve(who, key)}!
+
+One example from acquiresettings widget
+\begin{lstlisting}
+	def __init__(...):
+		self.board_config = board.get_board_config(board_id)
+		self.fileSizeOutLabel = self.createLabel("??")
+		self.board_config.observe(self.fileSizeOutLabel, self.set_filesize, 'turns_observe')
+		.
+		.
+
+	def set_filesize(self, state):
+		.
+		.
+
+	def closeEvent(self, event):
+		self.board_config.unobserve(self.fileSizeOutLabel, 'turns_observe')
+		.
+		.
+
+\end{lstlisting}
+
+
+\subsubsection*{base/backend/board/sequences} 
+The sequences are used to initialize the board. They are series of commands send to the FPGA. It is controlled by the \code{board_config} and from the backendinterface.
+The module contains to function:\\
+\code{def read_sequence(board_version)}\\
+\code{def run_sequnce(board_id, sequence, progressbar=None)}
+
+The sequences are stored in json files in \textit{base/backend/board/sequences/sequence\_x.json} with x to be the board\_version. The board\_version is read by \code{board_config} from the FPGA. 
+
+
+\subsubsection*{base/backend/DataSet} 
+Contains measured data. It has all the needed functions to open files, decode them and prepare them for plotting etc.
+
+\subsubsection*{base/backend/TimeScan} 
+Class to read and generate timescans files.
+
+\subsubsection*{base/backendinterface}
+The most messy module. It contains a vast amount of functions.
+Including:\\
+wrapperfunctions for the \code{board_control} \\
+functions to run the sequences\\
+everything for data acquisition
+
+
+
+\subsubsection*{widgets/} The most of the controling is in the widgets. They can be understood as some kind of modules. To add new functionality to the gui - like advanced analytics - one can just add a new Widget.
+
+there are by now:
+\begin{itemize}
+	\item AcquireSettingsWidget
+	\item PlotWidget
+	\item SingleReadWidget
+	\item TimeingWidget
+	\item TimescanWidget
+	\item EpicsWidget
+	\item AdcWidget
+	\item UpdateCalibrationWidget
+	\item CorrelationWidget
+\end{itemize}
+To activate a widget put the modulename in widgets/\_\_init\_\_.py
+
+
+
+
+\newpage
+\section{FPGA stuff}
+
+\TextGrafik[H]{Bank Register}{pl:bank}{1}{BankRegister.PNG}
+

+ 69 - 0
Docu/chapters/titlepage.tex

@@ -0,0 +1,69 @@
+%!TEX root = ../Kapture2 Docu.tex
+
+%% titlepage.tex
+%%
+
+% coordinates for the bg shape on the titlepage
+\newcommand{\diameter}{20}
+\newcommand{\xone}{0}
+\newcommand{\xtwo}{175}
+\newcommand{\yone}{15}
+\newcommand{\ytwo}{-253}
+
+\begin{titlepage}
+% bg shape
+\begin{tikzpicture}[overlay]
+\draw[color=gray]  
+ 		 (\xone mm, \yone mm)
+  -- (\xtwo mm, \yone mm)
+ arc (90:0:\diameter pt) 
+  -- (\xtwo mm + \diameter pt , \ytwo mm) 
+	-- (\xone mm + \diameter pt , \ytwo mm)
+ arc (270:180:\diameter pt)
+	-- (\xone mm, \yone mm);
+\end{tikzpicture}
+	\begin{textblock}{10}[0,0](4,2.5)
+		\includegraphics[width=.3\textwidth]{default/KITLogo_RGB.pdf}
+	\end{textblock}
+	\changefont{phv}{m}{n}	% helvetica	
+	\vspace*{3.5cm}
+	\begin{center}
+		\huge{\textbf{KAPTURE-2 Guide}}\\
+		\vspace*{1cm}
+		\Large{\textsc{\textbf{KArlsruhe PulsTakeing Ultra-fast Readout Electronics}}}\\
+		\vspace*{2cm}
+		\Large{\textbf{Documentation by}
+		}\\
+		\vspace*{1cm}
+		\Large{\textbf{Matthias Martin}}\\
+		\small{matthias@martin-tue.de}\\
+		\vspace*{1cm}
+		\large{
+			IBPT
+		}
+	\end{center}
+	\vspace*{1cm}
+
+
+
+
+\vspace{1.5cm}
+\begin{center}
+\large{July 2019}
+\end{center}
+
+
+\begin{textblock}{10}[0,0](4,16.8)
+\tiny{ 
+	%KIT -- University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association
+	KIT -- The Research University in the Helmholtz Association
+}
+\end{textblock}
+
+\begin{textblock}{10}[0,0](14,16.75)
+\large{
+	\textbf{www.kit.edu} 
+}
+\end{textblock}
+
+\end{titlepage}

BIN
Docu/default/KITLogo_RGB.pdf


+ 34 - 0
Docu/default/header.aux

@@ -0,0 +1,34 @@
+\relax 
+\@setckpt{default/header}{
+\setcounter{page}{1}
+\setcounter{equation}{0}
+\setcounter{enumi}{0}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{chapter}{0}
+\setcounter{section}{0}
+\setcounter{subsection}{0}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{subfigure}{0}
+\setcounter{lofdepth}{1}
+\setcounter{subtable}{0}
+\setcounter{lotdepth}{1}
+\setcounter{float@type}{4}
+\setcounter{lstnumber}{1}
+\setcounter{btxromaniannumeral}{0}
+\setcounter{Item}{0}
+\setcounter{Hfootnote}{0}
+\setcounter{Hy@AnnotLevel}{0}
+\setcounter{bookmark@seq@number}{0}
+\setcounter{ContinuedFloat}{0}
+\setcounter{r@tfl@t}{0}
+\setcounter{parentequation}{0}
+}

+ 358 - 0
Docu/default/header.tex

@@ -0,0 +1,358 @@
+%HEADER FILE
+%AUTHOR
+\author{Matthias Martin}
+
+%ESSENTIALS:
+\usepackage[T1]{fontenc}
+%\usepackage[latin1]{inputenc} % Input in ISO 8859-1 (Latin1)
+
+\usepackage{ae}               % Almost european, virtual T1-Font
+\usepackage{vmargin}          % Adjust margins in a simple way
+\usepackage{subfigure}
+\usepackage{url}
+\usepackage[absolute,overlay]{textpos}
+\usepackage{tikz}
+\RequirePackage{ngerman}
+\usepackage[ngerman]{babel}
+\usepackage{float}
+\usepackage{nicefrac}
+%\usepackage{svg}
+\usepackage{listings}
+
+\DeclareFixedFont{\ttb}{T1}{txtt}{bx}{n}{10} % for bold
+\DeclareFixedFont{\ttm}{T1}{txtt}{m}{n}{10}  % for normal
+
+% Custom colors
+\usepackage{color}
+\definecolor{deepblue}{rgb}{0,0,0.5}
+\definecolor{deepred}{rgb}{0.6,0,0}
+\definecolor{deepgreen}{rgb}{0,0.5,0}
+\lstset{
+    language=Python,
+    tabsize=2,  
+    basicstyle=\ttm,
+    otherkeywords={self},             % Add keywords here
+    keywordstyle=\ttb\color{deepblue},
+    emph={MyClass,__init__},          % Custom highlighting
+    emphstyle=\ttb\color{deepred},    % Custom highlighting style
+    stringstyle=\color{deepgreen}
+    }
+\newcommand{\code}[1]{\lstinline!#1!} %\texttt{#1}}
+%BASIC-LAYOUT:
+%\usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=2cm]{geometry}
+
+\setcounter{secnumdepth}{3} % Numbering also for \subsubsections
+\setcounter{tocdepth}{3}    % Register \subsubsections in content directory
+
+\setpapersize{A4}
+\setmarginsrb{1.5cm}{1cm}{1.5cm}{1cm}{6mm}{7mm}{5mm}{15mm}
+
+\setkomafont{disposition}{\normalcolor\bfseries}
+
+\usepackage[fixlanguage]{babelbib}	% sets german style for literature entries
+\selectbiblanguage{ngerman}			% for \bibliographystyle{babalpha}
+
+
+%\usepackage{titlesec, blindtext}
+%\titleformat{\chapter}[hang]{\huge\bfseries}{\thechapter\hspace{20pt}}{0pt}{\huge\bfseries}
+
+\parindent 0cm                     % Do not indent beginning of paragraph
+\parskip1.5ex plus0.5ex minus0.5ex % Margin between paragraphs
+
+\usepackage{cite}
+			% required for \cite{a,b,c} --> [1-3] instead of [1,2,3]
+%\usepackage[numbers]{natbib}
+\usepackage{url}
+			% Für Quellen mit URL
+\usepackage[nottoc]{tocbibind}
+			%	Literaturverzeichnis erscheint im Inhaltsverzeichnis
+
+
+%LAYOUT
+\usepackage{fancybox}
+\usepackage[T1]{fontenc}
+	\newcommand{\changefont}[3]{\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}
+\usepackage{hyperref}
+\usepackage{tikz}
+
+%TABLES AND FIGURES
+\addto\captionsenglish{\renewcommand{\figurename}{Fig.}}
+
+\usepackage{booktabs}
+			%	\midrule		Fuegt zwischen Zeilen eine groessere Zwischenlinie ein
+\usepackage{caption}
+\usepackage{dcolumn}
+			%	D{,}{,}{Anzahl Nachkommastellen}		Einfach statt der ueblichen Ausrichtung (l,c,r) im Header einer Tabelle einfuegen
+\usepackage{dsfont}
+			%	\mathds{1} - Einheitsmatrxix			
+\usepackage{multirow}
+			%	\multirow{Zeilen}{Breite}{Inhalt}	Automatische Breite "*"
+
+\usepackage{paralist}
+			%	Erlaubt Aufzählungen in eckigen Klammern
+			%	\begin{enumerate}[{[}1{]}] 
+\usepackage{rotating}
+\usepackage{subfigure}
+\usepackage{tabularx}
+
+
+%MATHS:
+\usepackage{amsmath}
+%	\allowdisplaybreaks
+\usepackage{amsfonts}
+\usepackage{amssymb}
+\usepackage{cancel}
+			%	\cancel{}		Streicht diagonal durch: /
+			%	\bcancel{} 	Streicht diagonal durch: \
+			%	\xcanel{}		Streicht als X durch
+			%	\cancelto{value}{expression}		Zeichnet einen Pfeil durch den Ausdruck, hin zum Wert
+\usepackage{mathrsfs}
+			%	\mathscr{}		Fuer (geschwungenes) Fourier F
+\usepackage{mathtools}
+%	\mathtoolsset{showonlyrefs}
+\usepackage{nccmath}
+			% formeln linksbündig mit \begin{flegn}
+\usepackage{pxfonts}
+\usepackage{siunitx}
+			%	\si{einheit}
+\usepackage{upgreek}
+			%	Gerade griechische Buchstaben mit \upgamma, \Upgamma
+\usepackage{dsfont}
+            %   \mathds{1} - Einheitsmatrix
+
+\usepackage{pgf}
+\usepackage{physics}
+
+%VARIOUS:
+\usepackage{color}
+
+%EIGENS DEFINIERTE COMMANDOS/ENVIRONMENTS/COLORS:
+
+
+%dint - definite integral
+\newcommand{\dint}[2]{\int\limits_{#1}^{#2}}
+
+%eps - epsilon_0
+\newcommand{\eps}{\varepsilon_0}
+\newcommand{\eo}{\varepsilon_0}
+
+%im - Imaginary Number
+\newcommand{\im}{\text{i}}
+
+%indt - INDexText
+\newcommand{\indt}[2]{\ensuremath{#1_{\text{#2}}}}
+
+%intd - Integral d / bzw. Text D
+\newcommand{\intd}{\text{d}}
+\newcommand{\td}{\text{d}}
+
+%neswarrows
+\newcommand{\neswarrows}{%
+        \begin{turn}{45}
+                \raisebox{-1ex}{$\leftrightarrows$}
+        \end{turn}}
+
+%nicebox
+\newenvironment{nicebox}[1]{
+	\begin{center}
+		\shadowbox{
+			\parbox{0.90\linewidth}{
+			\addvspace{4pt}
+			#1
+			}}}
+	{\end{center}}
+
+
+%stdcap
+\newcommand{\stdcap}[2]{\captionsetup{width=0.85\linewidth} \caption{\textbf{#1}#2}}
+
+%SumInt - Operator Sum over Int
+\DeclareMathOperator*{\SumInt}{%
+\mathchoice%
+  {\ooalign{$\displaystyle\sum$\cr\hidewidth$\displaystyle\int$\hidewidth\cr}}
+  {\ooalign{\raisebox{.14\height}{\scalebox{.7}{$\textstyle\sum$}}\cr\hidewidth$\textstyle\int$\hidewidth\cr}}
+  {\ooalign{\raisebox{.2\height}{\scalebox{.6}{$\scriptstyle\sum$}}\cr$\scriptstyle\int$\cr}}
+  {\ooalign{\raisebox{.2\height}{\scalebox{.6}{$\scriptstyle\sum$}}\cr$\scriptstyle\int$\cr}}
+}
+
+%uber
+\newcommand{\uber}[2]{\ensuremath{\stackrel{\mbox{\scriptsize{#1}}}{#2}}}
+
+
+\newcommand{\unit}[1]{\ensuremath{\,\mathrm{#1}}}
+\newcommand{\intu}{\int_{-\infty}^{\infty}}
+\newcommand{\hi}{\frac{\hbar}{i}}
+\newcommand{\id}{\text{d}}
+\newcommand{\dt}{\text{d}t}
+\newcommand{\dx}{\text{d}x}
+\newcommand{\ds}{\text{d}s}
+\newcommand{\p}{\partial}
+%\newcommand{\dd}[2]{\frac{\id #1}{\id #2}}
+\newcommand{\ddt}[1]{\frac{\id #1}{\id t}}
+\newcommand{\ddx}[1]{\frac{\id #1}{\id x}}
+\newcommand{\ddd}[2]{\frac{\id^2 #1}{\id #2^2}}
+\newcommand{\ddp}[2]{\frac{\partial #1}{\partial #2}}
+\newcommand{\dddp}[2]{\frac{\partial^2 #1}{\partial #2^2}}
+\newcommand{\intinf}{\int_{-\infty}^{\infty}}
+
+\newcommand{\e}[1]{\cdot 10^{#1}}
+\newcommand{\vr}{\vec r}
+
+%   \TextGrafik[Position]{Caption}{label}{rel. scale}{filepath}
+\newcommand{\Grafik}[3][H]{%
+    \begin{figure}[#1]
+        \centering
+        \includegraphics[width=#2\linewidth]{Plots/#3}
+    \end{figure}
+}
+\newcommand{\TextGrafik}[5][H]{%
+    \begin{figure}[#1]
+        \centering
+        \includegraphics[width=#4\linewidth]{Plots/#5}
+        \caption{#2}
+        \label{#3}
+    \end{figure}
+}
+
+\newcommand{\TextGrafikB}[6][H]{%
+    \begin{figure}[#1]
+        \centering
+        \includegraphics[width=#5\linewidth]{Plots/#6}
+        \caption[#2]{#3}
+        \label{#4}
+    \end{figure}
+}
+
+\newcommand{\TextGrafikNebeneinander}[7][H]{%
+    \begin{figure}[#1]
+        \label{#3}
+        \centering
+        \includegraphics[width=#4\linewidth]{Plots/#5}
+        \includegraphics[width=#6\linewidth]{Plots/#7}
+        \caption{#2}
+    \end{figure}
+}
+\newcommand{\GrafikNebeneinander}[7][H]{%
+    \begin{figure}[#1]
+      %  \caption{#2}
+        \label{#3}
+        \centering
+        \includegraphics[width=#4\linewidth]{Plots/#5}
+        \includegraphics[width=#6\linewidth]{Plots/#7}
+    \end{figure}
+}
+
+
+\newcommand{\TextGrafikpgf}[5][H]{%
+    \begin{figure}[#1]   
+    	     
+        \centering 
+        \resizebox{#4\linewidth}{!}{  
+        %	\tikzsetnextfilename{#5}      
+    	    \input{Plots/pgf/#5}
+			}
+	        \caption{#2}
+        	\label{#3}
+        
+    \end{figure}
+}
+
+% für links/rechts:
+\newcommand{\Links}{$\vartriangleleft$~}
+\newcommand{\Rechts}{$\vartriangleright$~}
+
+
+% \command {Label} {Text}
+\newcommand{\sref}[2]{\hyperref[#1]{#2\ref*{#1}}}
+\newcommand{\tabref}[1]{\sref{#1}{Tabelle~}}
+\newcommand{\aufgref}[1]{\sref{#1}{Aufgabe~}}
+\newcommand{\figref}[1]{\sref{#1}{Abb.~}}
+\newcommand{\gleichung}[1]{\sref{eq:#1}{Gleichung~}}
+
+
+
+%% -------------------------------
+%% |          Headings           |
+%% -------------------------------
+\usepackage{fancyhdr} 
+\pagestyle{fancy}
+\renewcommand{\chaptermark}[1]{\markboth{\thechapter.\ #1}{}}
+\fancyhf{}
+\fancyhead[LE,RO]{{\headfont\thepage}}						% Left/right header for even/odd pages
+\fancyhead[LO]{\headfont\nouppercase{\rightmark}}	% Header for left page (odd)
+\fancyhead[RE]{\headfont\nouppercase{\leftmark}}	% Header for right page (even)
+\fancyfoot[C]{\thepage}
+\renewcommand{\headrulewidth}{0.5pt}
+\renewcommand{\footrulewidth}{0pt}
+\fancypagestyle{plain}{%
+\fancyhf{}													% No Header and Footer fields
+\renewcommand{\headrulewidth}{0pt}
+\renewcommand{\footrulewidth}{0pt}
+\fancyfoot[C]{\thepage}
+}
+
+%\usepackage[nouppercase]{scrpage2}
+%	\pagestyle{scrheadings}
+%	\clearscrheadfoot
+%	\renewcommand*{\headfont}{\normalfont}
+
+%	\renewcommand*{\chaptermarkformat}{}% Keine Kapitelnummer im Kopf 
+%	\automark{chapter}
+%	\setheadsepline{0.2pt}
+
+%	\renewcommand\sectionmark[1]{\markright{\MakeMarkcase {\thesection\hskip .5em\relax#1}}}
+%	\lehead{\pagemark \qquad \leftmark{}}
+%	\rohead{\rightmark{} \qquad \pagemark}
+%	\refoot[\pagemark{ }]{} 
+%	\lofoot[\pagemark{ }]{} 
+
+%--------------
+%		alternatively
+%--------------
+%		\renewcommand\sectionmark[1]{\markright{#1}}
+%		\lohead{\leftmark{}}
+%		\cohead{\rightmark}
+%		\rohead{\pagemark}
+%		\cfoot[\pagemark{ }]{}
+
+%	\renewcommand{\chapterpagestyle}{empty}
+%% --- End of Headings ---
+
+\newcommand{\blankpage}{
+ \clearpage{\pagestyle{empty}\cleardoublepage}
+}
+
+% Der Inhalt des Environments \emph{muss} mit dem \\ Makro enden!!¡!
+% Opt 0: placement
+% Arg 1: caption
+% Arg 2: label
+% Arg 3: cols
+\newenvironment{Tabelle}[4][p]
+    {   \begin{table*}[#1]
+            \begin{center}
+                \caption{#2}
+                \label{#3}
+                \begin{tabular}{#4}
+                    \toprule
+    }               % here there be dragons
+                    % (or at least a table body)
+    {               \bottomrule
+                \end{tabular}
+            \end{center}
+        \end{table*}
+    }
+    
+    \newenvironment{TabelleB}[5][h]
+    {   \begin{table*}[#1]
+            \begin{center}
+                \caption[#2]{#3}
+                \label{#4}
+                \begin{tabular}{#5}
+                    \toprule
+    }               % here there be dragons
+                    % (or at least a table body)
+    {               \bottomrule
+                \end{tabular}
+            \end{center}
+        \end{table*}
+    }