Version 9.1 by sendels on 2019/06/25 15:06

Hide last authors
sendels 1.1 1 \\
2
3 \\
4
5 = Control and DAQ at FLASH (web version) =
6
7 Before starting a beamtime at FLASH the users have to consider several options regarding the control and data acquisition system where the users are supported by [[the controls group~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:http://photon-science.desy.de/facilities/flash/beamlines/daq_and_controls/index_eng.html||shape="rect"]].
8
9 == Contents ==
10
11 \\
12
sendels 2.1 13 * Control and DAQ at FLASH (web version)
14 ** Overview
15 ** Things to consider before the beamtime
16 ** Beamline control and photon diagnostics
17 ** IT infrastructure
18 ** Data access
19 ** Online
20 ** Data acquisition
21 ** nearOnline
sendels 1.1 22 ***
sendels 2.1 23 **** .raw files
24 **** HDF5 files
25 ** Offline
sendels 1.1 26
27 \\
28
29 \\
30
31 ----
32
33 == Overview ==
34
sendels 8.1 35 [[image:attach:overview_flash_control_and_daq.png]]
sendels 1.1 36
37 The FLASH accelerator, beamlines and experiments are using the Distributed Object Oriented Control System ( [[DOOCS~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:http://tesla.desy.de/doocs/doocs.html||shape="rect"]]). Beamline and experiment devices are mainly operated via graphical user interfaces created with the Java DOOCS Data Display ( [[jddd~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://doocs-web.desy.de/access.html||shape="rect"]]) by the FLASH team or the users themself. Further it is provided a [[DOOCS client API~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://ttfinfo.desy.de/DOOCSWiki/Wiki.jsp?page=DOOCS%20Wiki||shape="rect"]] in Java, Python, Matlab, C or C++ to the users to write own software for data access, online data or device control. User-provided devices can be run in parallel or can be implemented in DOOCS. For each beamline and accelerator is a dedicated [[electronic logbook~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:http://tesla.desy.de/ttf_apps/showElogs.jsp||shape="rect"]] available in which jddd and other software can print directly.
38
39 The data acquisition system (DAQ) collects beamline and experimental data and writes them to hard disk. All data are stored along with a time stamp and, in case of train specific data, along with a (pulse) train ID. There are several ways to access beamline and experimental data stored in the DAQ during or after the beamtime be it programmatically via DAQ access libraries or after data conversion to HDF5 format. While the data transport to the user's home institution is possible, DESY hosts high power computing resources which can be used for analysis.
40
41 == Things to consider before the beamtime ==
42
sendels 8.1 43 In consultation with the user's local contact the user should check our [[beamtime preparation checklist>>doc:FLASHUSER.Data Acquisition and controls.DAQ and controls overview.Before beamtime Checklist.WebHome]] and fill in the [[beamtime preparation questionnaire>>attach:Before_beamtime_questionnaire.pdf]].
sendels 1.1 44
45 == Beamline control and photon diagnostics ==
46
47 Use existing jddd panel provided by FLASH or use the jddd editor to create a new panel according to the user's own needs.
48
sendels 2.1 49 [[~[~[image:url:http://hasfweb.desy.de/pub/Setup/Index/jddd_logo.png~|~|alt="jddd Photon Beamline Controls" width="125" height="80"~]~]~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:http://ttfinfo2.desy.de/common/applications/jddd_xml/run_jnlp.jsp?run=true&file=/svn/FLASH/Hasylab/Photons_beamline_control_main.xml||shape="rect"]][[~[~[image:url:http://hasfweb.desy.de/pub/Setup/Index/jdddEditor.png~|~|alt="jdddEditor.png" width="125"~]~]>>url:http://ttfinfo2.desy.de/common/applications/jddd.jnlp?run=true||title="jddd editor" shape="rect"]](% class="twikiNewLink" %)[[url:http://hasfweb.desy.de/bin/edit/Ttfinfo2/desy/de/common/applications/jddd/Jnlp?topicparent=Setup.Index;nowysiwyg=0||rel="nofollow" shape="rect"]]
sendels 1.1 50
51 \\
52
sendels 2.1 53 (% class="wrapped" %)
sendels 1.1 54 |=(((
55 [[DOOCS>>url:http://tesla.desy.de/doocs/index.html||title="DOOCS home" shape="rect"]]
56 )))|=(((
57 [[jddd>>url:http://ttfinfo2.desy.de/doocs/jddd/index.html||title="jddd home" shape="rect"]]
58 )))
59
60 == IT infrastructure ==
61
sendels 9.1 62 During a beamtime at FLASH we have two IT infrastructures each with different purpose. In the FLASH halls you have [[local machines>>doc:FLASHUSER.Data Acquisition and controls.DAQ and controls overview.ComputingResourcesUserGuide.WebHome]] which are used with functional accounts and they have access to the [[beamline files-system~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://confluence.desy.de/display/ASAP3/Directory+Structure||shape="rect"]] for your current experiment. For more demanding task we could also provide workstations which can be dedicated to a single user experiment. For offline and nearOnline analysis the [[Maxwell cluster~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://confluence.desy.de/display/IS/Maxwell||shape="rect"]] for high performance computing is available. On the Maxwell cluster you have to work with personal accounts as this regulates data access to the [[core file-system~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://confluence.desy.de/display/ASAP3/Directory+Structure||shape="rect"]].
sendels 1.1 63
sendels 9.1 64 [[image:attach:it-infrastructure2.png||height="400"]]
sendels 1.1 65
sendels 9.1 66 \\
67
68
69
70 {{view-file att--filename="run_jnlp.jsp" height="250"/}}
71
72 \\
73
74 \\
75
sendels 4.1 76 The FLASH control & DAQ system supports [[several devices>>doc:FLASHUSER.Data Acquisition and controls.Controls (DOOCS, jDDD,\.\.\.).DOOCS Device Support.WebHome]] and at each beamline are [[doc:FLASHUSER.Data Acquisition and controls.Controls (DOOCS, jDDD,\.\.\.).MTCA ADCs.WebHome]] available. With the MTCA technology it is possible to [[synchronize own devices in respect to the FEL>>doc:FLASHUSER.Data Acquisition and controls.Controls (DOOCS, jDDD,\.\.\.).Trigger Howto.WebHome]].
77 If the user is using his or her own DAQ system it is further possible to [[receive the trainId via network>>doc:FLASHUSER.TrainID]] for the purpose of synchronization.
sendels 1.1 78
79 \\
80
sendels 2.1 81 (% class="wrapped" %)
sendels 1.1 82 |=(((
sendels 9.1 83 [[local>>attach:jddd.jnlp]][[ machines>>attach:jddd.jnlp]]
sendels 1.1 84 )))|=(((
sendels 2.1 85 (% class="content-wrapper" %)
86 (((
sendels 1.1 87 [[Maxwell cluster~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://confluence.desy.de/display/IS/Maxwell||shape="rect"]]
sendels 2.1 88 )))
sendels 1.1 89 )))|=(((
sendels 9.1 90 [[doc:FLASHUSER.Data Acquisition and controls.Controls (DOOCS, jDDD,\.\.\.).MTCA ADCs.WebHome]]
sendels 1.1 91 )))|=(((
sendels 9.1 92 [[supported devices>>doc:FLASHUSER.Data Acquisition and controls.Controls (DOOCS, jDDD,\.\.\.).DOOCS Device Support.WebHome]]
sendels 1.1 93 )))|=(((
sendels 2.1 94 (% class="content-wrapper" %)
95 (((
sendels 1.1 96 [[supported cameras~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://ttfinfo.desy.de/FLASHWiki/Wiki.jsp?page=Camera%20server||shape="rect"]]
sendels 2.1 97 )))
sendels 1.1 98 )))|=(((
sendels 9.1 99 [[trigger via MTCA>>doc:FLASHUSER.Data Acquisition and controls.Controls (DOOCS, jDDD,\.\.\.).Trigger Howto.WebHome]]
sendels 1.1 100 )))|=(((
sendels 9.1 101 [[trainId via network>>doc:FLASHUSER.TrainID]]
sendels 1.1 102 )))
103
104 \\
105
106 == Data access ==
107
sendels 9.1 108 \\
sendels 1.1 109
sendels 9.1 110 [[image:attach:timescale_dataAccess.png||height="400"]]
111
112 At the Free-electron Laser Hamburg ( [[FLASH~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://flash.desy.de/||shape="rect"]]) we use the Distributed Object Oriented Control System ( [[DOOCS~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:http://tesla.desy.de/doocs/doocs.html||shape="rect"]]). Devices are implemented via DOOCS server and via an API ( [[ONLINE>>doc:FLASHUSER.Online access to DOOCS properties]]) it is possible to request data directly from the DOOCS server by knowing the DOOCS address.
sendels 5.1 113 As correlations of different physical properties are often required all data at FLASH are indexed by the [[trainID>>doc:FLASHUSER.TrainID]], which identify each of FLASH's pulse trains. The during a beamtime recorded data are stored via a Data Acquisition System ( [[DAQ>>doc:FLASHUSER.Information about the FLASH DAQ system]]) which sort all events from the individual DOOCS server by trainID. When requested [[HDF files>>doc:FLASHUSER.Information about the FLASH HDF5 structure]] are created after the beamtime which includes the important data from [[the accelerator and its diagnostic>>doc:FLASHUSER.PBD DAQ]] as well as the data created by the [[users>>doc:FLASHUSER.Description of the Properties in the FLASH1_USER1, 2 and 3 for FLASH1 Users]]. This time scale we define as {{code language="none"}}offline{{/code}} as the HDF files are converted after the beamtime is over. For synchronous data during an experiment it is possible to create shorter HDF slices via a {{code language="none"}}nearOnline{{/code}} converter within a few minutes. For working with this partially incomplete HDF slices we provide an API called [[BeamtimeDaqAccess>>doc:FLASHUSER.Beamtime DAQ Access]]. Reading synchronous data via an {{code language="none"}}online{{/code}} API is possible via a configurable DAQ middle layer server, the [[DAQmonitor>>doc:AIDA2020ESST.DAQ Monitor]], which feeds the correlated data back in the control system while it provides a ring buffer with 32 events in size.
sendels 1.1 114
115 \\
116
sendels 2.1 117 (% class="wrapped" %)
sendels 1.1 118 |(((
119 online
120 )))|(((
121 live at 10 Hz
122 )))
123 |(((
124 online via DAQmonitor
125 )))|(((
126 live up to 3s into the past
127 )))
128 |(((
129 nearOnline
130 )))|(((
131 a few minutes
132 )))
133 |(((
134 offline
135 )))|(((
136 after the beamtime
137 )))
138
139 == Online ==
140
sendels 5.1 141 To monitor individual parameters online, e.g. ADCs or cameras, the use of jddd is recommended. For more complex tasks the users can use the DOOCS client API for [[Matlab>>doc:FLASHUSER.Data Acquisition and controls.Data Access at FLASH (DAQ, gpfs,\.\.\.).Online data analysis.MatlabDOOCS.WebHome]], [[Python>>doc:FLASHUSER.Data Acquisition and controls.Data Access at FLASH (DAQ, gpfs,\.\.\.).Online data analysis.PythonDOOCS.WebHome]] and [[Labview>>doc:FLASHUSER.How to read and write DOOCS properties with LABVIEW]]. For accessing the control system [[DOOCS addresses>>doc:FLASHUSER.Information about the FLASH HDF5 structure]] are required.
sendels 1.1 142
sendels 5.1 143 A collection (Matlab [ [[scan tool>>doc:FLASHUSER.Matlab Scantools]] , [[TOF & camera GUIs~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://stash.desy.de/projects/FSFL/repos/matlab-guis/browse||shape="rect"]], [[others>>doc:FLASHUSER.Collection of user codes]]] / [[Juypter notebooks~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://stash.desy.de/projects/FSFL/repos/jupyter-notebook/browse||shape="rect"]]) for common use cases is available.
sendels 1.1 144
145 == Data acquisition ==
146
sendels 5.1 147 Relevant machine data, e.g. pulse energy or arrival time, are are saved in the FLASH Photon diagnostics DAQ (PBD) while experiment related parameter are saved on demand in the FLASH [[User DAQs>>doc:FLASHUSER.Data Acquisition and controls.Data Access at FLASH (DAQ, gpfs,\.\.\.).Offline data analysis (DAQ).How to save data in the User DAQ.WebHome]]. In addition it is disk space availabe for devices and paramter outside the FLASH DAQ, which can be [[ synchronized via Ethernet connection>>doc:FLASHUSER.TrainID]]. The for the beamtime provided storage space, the [[spectrum scale~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://confluence.desy.de/display/ASAP3/Architecture||shape="rect"]] formerly known as ASAP3/GPFS, is access regulated via [[DOOR~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://door.desy.de/door/index.php||shape="rect"]] and only registered participants have access.
sendels 1.1 148
149 The FLASH DAQ system records the data in binary .raw files. On request the data will also be available in the HDF5 format after a conversion during or after the beamtime. Incoming data is collected, sorted and saved into .raw files in chunks of 60 MB to 1 GB which corresponds to tens of seconds up to several minutes. The HDF5 files can be created nearOnline or Offline. In the nearOnline conversion every individual .raw files will be converted to a single HDF5 file to provide the fastest access possible. After the beamtime it is possible to get a HDF5 file per DAQ run which is very convenient as it contains the merged data of the User DAQ and the PBD DAQ.
150
sendels 5.1 151 While the DOOCS addresses are rather cryptic the [[HDF5 file>>doc:FLASHUSER.Information about the FLASH HDF5 structure]] is structured based on the actual location and function of the devices. A complete list is available in [[DESY's Repository~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://stash.desy.de/projects/CS/repos/pah/browse/src/camp/data/channel2HdfName.dat||shape="rect"]].
sendels 1.1 152
153 \\
154
sendels 9.1 155 (% class="wrapped relative-table" %)
sendels 1.1 156 |=(((
sendels 9.1 157 [[DAQ introductions>>attach:Operator_training_DAQ_May_2016.pdf]]
sendels 1.1 158 )))|=(((
sendels 5.1 159 [[FLASH1 PBD>>doc:FLASHUSER.PBD DAQ]]
sendels 1.1 160 )))|=(((
sendels 7.1 161 [[FLASH2 PBD>>doc:FLASHUSER.FL2PhotDiag stream (status Feb 2017)]]
sendels 1.1 162 )))|=(((
sendels 6.1 163 [[User DAQs>>doc:FLASHUSER.Data Acquisition and controls.Data Access at FLASH (DAQ, gpfs,\.\.\.).Offline data analysis (DAQ).How to save data in the User DAQ.WebHome]]
sendels 1.1 164 )))|=(((
sendels 6.1 165 [[User DAQs subsytems>>doc:FLASHUSER.Description of the Properties in the FLASH1_USER1, 2 and 3 for FLASH1 Users]]
sendels 1.1 166 )))|=(((
sendels 6.1 167 [[HDF5 files>>doc:FLASHUSER.Information about the FLASH HDF5 structure]]
sendels 1.1 168 )))
169
170 == nearOnline ==
171
172 ==== .raw files ====
173
sendels 6.1 174 The .raw files are only accessible from certain computers within the DESY network and in generell it is not recommended to use them directly. For checking the file content and doing simple analysis, e.g. histogram, line outs, we provide the [[DAQdataGUI>>doc:FLASHUSER.How to get the data out of the DAQ]]. If the user already have very precise knowledge of the desired parameters and it's types it is possible [[to read with Matlab from the files directly>>doc:FLASHUSER.Data Acquisition and controls.Data Access at FLASH (DAQ, gpfs,\.\.\.).Offline data analysis (DAQ).For experts\: many ways to get Data from the DAQ.How to Access the DAQ Using Matlab.WebHome]].
sendels 1.1 175
176 FLASH's DAQ .raw files are saved locally and with a time delay of a few minutes backupped via tape ( [[dCache~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://confluence.desy.de/display/ASAP3/Managing+data+taken+before+April+2015||shape="rect"]]) by the DESY central IT.
177
178 ==== HDF5 files ====
179
sendels 6.1 180 As the .raw files are highly optimized for writing speed there are some issues which have to be taken care of which are also present in the nearOnline HDF5 files (e.g. missing/doubled events). For this we provide with [[BeamtimeDaqAccess>>doc:FLASHUSER.Beamtime DAQ Access]] an API which handles a lot of the occurring difficulties as knowing the file or DAQ instances. The [[BeamtimeDaqAccess>>doc:FLASHUSER.Beamtime DAQ Access]] library is written in Python, but a Matlab wrapper is available.
sendels 1.1 181
182 == Offline ==
183
sendels 6.1 184 The offline HDF5 files containing complete DAQ runs will be put after the beamtime on the spectrum scale file system. Access is granted from the within the DESY network for beamtime participants or from the outside via [[Gamma portal~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://confluence.desy.de/display/ASAP3/The+Gamma+Portal||shape="rect"]]. HDF-by-run files can processed with common tools, e.g. with [[Matlab>>doc:FLASHUSER.Information about the FLASH HDF5 structure]] or [[Python>>doc:FLASHUSER.FLASHH5 for easier access of FLASH's HDF5 files]], as during the conversion a lot of discrepancies have been resolved. As .raw files are rarely used for analysis they are saved on the FLASH DAQ servers and will only be put on the spectrum scale file system on special request.
sendels 1.1 185
186 The spectrum scale file system contains the [[substructure~[~[image:url:http://hasfweb.desy.de/pub/TWiki/TWikiDocGraphics/external-link.gif~|~|width="13" height="12"~]~]>>url:https://confluence.desy.de/display/ASAP3/Directory+Structure||shape="rect"]]: {{code language="none"}}raw{{/code}}, {{code language="none"}}processed{{/code}}, {{code language="none"}}shared{{/code}} and {{code language="none"}}scratch{{/code}}. The (% class="WYSIWYG_TT" %)raw (%%)folder contains the data recorded by the experiment (user data and HDF5) and will be set read only shortly after the beamtime is over. {{code language="none"}}Processed{{/code}} is typically used to store processed data and analysis software. Both folder are backupped by the spectrum scale file system.
187
188 \\
189
190 ----
191
192 **//NOTE~://** Content below the STOPPUBLISH variable is not published. Use this space as a scrap area.
sendels 9.1 193
194 \\
195
196 \\
197
198 \\