part01-use.tex 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. %!TEX root = ../Kapture2 Docu.tex
  2. %% ==============================
  3. \chapter{Using Kapture 2}
  4. \label{ch:use}
  5. %% ==============================
  6. \section{Measurement in a nutshell}
  7. \begin{itemize}
  8. \item start-up procedure: Boot PC, switch HighFlex off and on, reboot PC
  9. \item Prepare Board can always be used to reset the board
  10. \item check that PLL lock LEDs are on
  11. \item use internal pilot bunch
  12. \item activate HEADER
  13. \item T/H FMC2 25ps to 4 is no offset
  14. \item Using 500\,MHz reference
  15. \begin{enumerate}
  16. \item connect the 125\,MHz
  17. \item do normal init with 125\,MHz reference
  18. \item connect the 500\,MHz
  19. \item run \textit{PLL swap 125 to 500}, \textit{PLL Synch}, \textit{ADC Synch}
  20. \item now it should be working. If log is missing redo step 4.
  21. \item do not run \textit{Board Reset} or other \textit{PLL Init}! Then you would need to redo from beginning.
  22. \item If a DMA error etc happens try \textit{soft reset}
  23. \end{enumerate}
  24. \item shutdown: Just turn off the PC and the two switches for the T/H.
  25. \end{itemize}
  26. \section{start}
  27. \Grafik[H]{1}{Kapture.png}
  28. The left Ethernet connector is configured for the KARA office network. The right one can be used for other networks.
  29. Currently the Start-up of the system needs some manual workaround. Before turning on the PC put switches 1 and 2 in off state. The unlabeled switch is always on!
  30. Then Boot the PC when the Lock-in screen is visible turn the HighFlex of and on with the big switch on the Highflex. Then reboot the PC.
  31. \Grafik[H]{0.5}{switch.jpg}
  32. The two switches are to power down the input stage 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 thermal stress.)
  33. Now you are good to go ;)
  34. 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 Control 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.
  35. It can be also done manually. For example if the 500\,MHz is used as input clock. Than first \textit{Board Reset}, now the correct \textit{PLL init} then \textit{PLL Sync}, then \textit{ADC Calib} and \textit{ADC Autosync}.
  36. On the MultiView Page one can find all the controls.
  37. \subsection{Basic Settings}
  38. \subsubsection{Configfile}
  39. In 'home/user/.kcg2' are two config files. One for the general and one specific for epics.
  40. The Configfile is more or less self explaining. The newest option is the "Working Channels" config. It can be used to define which channels are used. It does not affect the RAW-file but it ins used for displaying in some cases.
  41. If the file does not exist a window opens where the config can also be edited.
  42. The epics config is best to edit only via the epicsWidget.
  43. After a change, the GUI needs to be restarted.
  44. \subsubsection{file/settings}
  45. This is a small Settings window to set at runtime the Save Location and the Sub-directory.
  46. \newpage
  47. \section{Timing Widget}
  48. \includegraphics[width=1.5em]{Plots/Icons/clock.png} (Ctrl+T) contains the delay settings. KAPTURE-2 has 3 different delays. \\
  49. \Grafik[H]{0.8}{Widgets/TimingWidget.PNG}
  50. 330ps global Delay with 20 possible steps\\
  51. 25ps global Delay with 24 possible steps\\
  52. 3ps channel independent Delay with 32 steps\\
  53. 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 will sample 25\,ps earlier.
  54. The advanced settings for ADC Delay and FPGA Delay are usually not to use. They are mainly for development. In normal user-operation the GUI handles them automatically.
  55. \TextGrafik[h]{Timing distribution of a KAPTURE-2 Module. The Cascade Clock output of the first Module is used as input for the second modul. One Important information: The PLL is running with internal loopback to achieve a global Delay. This means that one output of the PLL is looped back to the input and by changeing the delay of this output, the complete System is shifted. But it is shifted in the oposite direction: increasing the delay means sampling earlyer. BUT the GUI takes care of this so that for the user it feels like it is shown in the graphic.}{pl:T:bahn}{0.7}{timeplan4.png}
  56. \newpage
  57. \section{Time Scan Widget}
  58. \includegraphics[width=1.5em]{Plots/Icons/timescan.png} (Ctrl+Shift+T)
  59. \Grafik[H]{1}{Widgets/TimeScan.PNG}
  60. The Time Scan was moved to a new Widget (mostly for code simplification). A TimeScan can be used to find the delays.
  61. Via a drop down menu one can select how the measured data is processed.
  62. \begin{itemize}
  63. \item Mean over Everything:
  64. It just calculates the mean of the complete data. This is usually not to helpful.
  65. \item Threshold:
  66. Calculates the mean only for data points with not in $2048 +$ threshold. If you have a negative peak, enter a negative sign.
  67. \item Bucket:
  68. Calculates the mean of only on bucket - usually the best way.
  69. \item All Buckets:
  70. New Feature: It calculates the mean for all buckets individually. Therefore the resulting file is bigger but it allows to compare the buckets.
  71. \end{itemize}
  72. It offers different Scan Modes. In the standard way (as it is in the Screenshot) it scans step by step through all delays. In this mode usually one uses the 25\,ps Step4 Option. If it is set to Step 1 one does over sample the Signal and increases the needed Time.
  73. The \textbf{Fast Mode} is primary designed 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 usually best to use with a threshold of 20.
  74. 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)
  75. The Scan Results are stored in the sub folder \texttt{TimeScan}. In the logfile \texttt{scan.info} will the Scan Parameters be stored. The user has the possibility to use the identifier entry to add any text to the Logfile.
  76. 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.
  77. For simpler positioning of the ADC Timings one can plot them inside the Timescan via \textbf{show ADC} in the timecorrected view.
  78. \newpage
  79. \section{Calibration}
  80. \includegraphics[width=1.5em]{Plots/Icons/calib.png} (Ctrl+U)
  81. \Grafik[H]{0.3}{Widgets/CalibrationWidget0.PNG}
  82. 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 File selection is skipped.
  83. \Grafik[H]{0.8}{Widgets/CalibrationWidget.PNG}
  84. The main Widget. The Left plot shows the original data with no calibration applied. The Right Plot than with all calibration used. The lower input lines can be used to manually adjust the calibration.
  85. The Calibration is split into two Parts
  86. \begin{itemize}
  87. \item 500\,MHz:\\
  88. This needs only to be done once. Maybe it is useful 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.
  89. \item Peak:\\
  90. 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 Time offset 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 screen-shot) 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).
  91. \end{itemize}
  92. 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.
  93. \section{Correlation Test}
  94. \includegraphics[width=1.5em]{Plots/Icons/correlation.png} (Ctrl+Shift+C)
  95. \Grafik[H]{1}{Widgets/Correlation.PNG}
  96. 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. Every time 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.
  97. \newpage
  98. \section{Acquisition}
  99. \includegraphics[width=1.5em]{Plots/Icons/wrench.png} (Ctrl+A)
  100. \Grafik[H]{0.4}{Widgets/AcquireSetting.PNG}
  101. 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 data points).
  102. The option \textit{shift FMC2} can be used if there is a shift between ADC1-4 and ADC5-8 witch is with the current firmware usually the case. It does not change anything in the raw file!
  103. The shift can change when the 330\,ps is changed.
  104. Currently also KAPTURE-2 is most stable without external revolution clock. Therefore \textit{Simulate Pilot Bunch} needs to be checked.
  105. \section{Ploting}
  106. \section{EPICS}
  107. \includegraphics[width=1.5em]{Plots/Icons/EPICS_Logo.png} (Ctrl+E)
  108. 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 display name 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.
  109. Changes will only be done in the config file by \textit{apply + save}. With \textit{apply} the changes will be only temporally.
  110. \Grafik[H]{0.3}{Widgets/Epics1.PNG}
  111. \Grafik[H]{0.8}{Widgets/Epics2.PNG}
  112. %\section{CUDA}
  113. %\section{ADC}
  114. %(Ctrl+G)
  115. %This Widget contains two features. Primary it is to set the Gain and the offset correction for every adc.
  116. %The value range is:\\
  117. %Gain 0 -- 0x7FFF\\
  118. %Offset 0 -- 0x1FFF (the leading 1 is used as sign. So 0x0FFF is the maximum positive offset and 0x1FFF the maximum negative offset)
  119. %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.
  120. %\begin{itemize}
  121. % \item Baseline: it just calculates the mean and std for the complete data for every ADC
  122. % \item Peak: It splits the Signal in two region (upper and lower) and calculates the mean and std for both.
  123. %\end{itemize}