7. pnCCD Data Acquisition¶
7.1. Run Control¶
The SQS DAQ Karabo subproject is called SQS_DAQ_RUN_MGMT
, which is found under the AMAIN
main project. Click on the little triangle beside the SQS_DAQ_RUN_MGMT
subproject to expand it. Open the SQS_RUN_CONTROL_GLOBAL_STATE
scene (Fig. 7.1).
To set up the DAQ in order to take a data run with pnCCD:
Make sure that detector is in acquiring mode. If so, the
ADC 1
andADC 2
states are both inAcquiring
mode on thepnCCD_Main
scene (see Fig. 6.2).If a run is not currently in progress, click on the
Ignore data
button (see Fig. 7.1). This step is only necessary if you want to change the proposal number and/or the data sources. With this step, the DAQ will go into theIgnore
state.From the
Data Source Groups
field (see Fig. 7.1), select, by clicking on the little square on their left hand side, the pnCCD data aggregators, which are:SQS_NQS_PNCCD1M-CAL
SQS_NQS_PNCCD1M-META
SQS_DIGITIZER-UTC1
: This is required only if you need to use Karabo bridge.- The three abovementioned data sources are sufficient for pnCCD. If the experiment requires some other data sources from SQS devices other than pnCCD, make sure their corresponding data sources are also selected. The SQS beamline scientists should be able to assist you in identifying these latter data sources if you are unsure which ones to select.
Click on the green check mark (Apply All Changes) on the top left corner of the
SQS_RUN_CONTROL_GLOBAL_STATE
scene to apply the changes. At this point, theData source
boolean state indicator (resembels a small LED on the bottom middle of Fig. 7.1) should be green.Write the desired proposal number in the corresponding field in the
SQS_RUN_CONTROL_GLOBAL_STATE
scene (see Fig. 7.1) and hitEnter
(keyboard return). Click onRetrieve Proposal
button. TheProposal
boolean state indicator (resembels a small LED on the bottom middle of Fig. 7.1) should now also be green.Click on the
Push to DAQ
button on theSQS_RUN_CONTROL_GLOBAL_STATE
scene. Wait a few seconds. TheAssign
boolean state indicator should now be green.Click on
Apply configuration
button and wait until the status message bar (on the middle bottom of Fig. 7.1) confirms that the application was successful. TheConfigure
boolean state indicator should now be green.Click on
Monitor data
button on theSQS_RUN_CONTROL_GLOBAL_STATE
scene and ensure theMonitor
boolean state indicator also turns green.At this point, the
Progress
bar should be green and should show 100 percent. if everything has worked like it should, the big boolean state LED indicator calledGloabal State
should be green.If you want to take a dark run, choose “Dark Run for Gain xxx” (specify which gain setting it is for) as the
Run Type
and choose “No Sample” for theSample
field (see Fig. 7.1). If these are not available, please ask an SQS beamline scientist to make them using the Meta Data Catalog so that the dark runs can be labeled correctly. Everytime you make a change, click on the keyboard return key to ensure that your change is saved in Karabo. If the run is not a dark one, choose appropriate names forRun Type
andSample
fields.Follow the instructions given in
DarkRuns
to start a dark run.After enough data are saved (for example, 500 trains are enough for a dark run), click on
Stop run
button (see Fig. 7.1) to stop the run.
7.2. Offline Data¶
Following the instructions given in the previous section, raw data are saved on disk.
7.2.1. Accessing the Raw Data¶
To access the raw data, follow these steps:
Make sure you have permission to access the proposal under study. If not, ask the SQS beamline scientists to add your username to the desired proposal if possible.
Connect to the Maxwell cluster (you may need to first connect to
bastion.desy.de
):ssh -XY username@max-exfl
Go to the directory where the current raw data are being stored:
cd /gpfs/exfel/exp/SQS/201921/p002430/raw/r0010
Here, the syntax is as follows:
SQS
is the instrument.201921
is the cycle number.p002430
is the proposal number.r0010
means the desired run number is 10.
If the DAQ is setup correctly and the connection between the DAQ device and the data aggregators is established correctly, for run number
XXX
, there should be a few files in ther0XXX
directory. Depending on the selected data sources, these files are of three types:- Files like
RAW-R0XXX-DA##-S000##.h5
- Files like
RAW-R0XXX-PNCCD01-S000##.h5
- Files like
RAW-R0XXX-PNCCD02-S000##.h5
- Files like
where DA##
or PNCCD##
refers to the data aggregators, and S000##
refers to the file sequence. Roughly, every 500 trains consists of one sequence. Therefore, if the duration of the run corresponds to 1500 trains, you will end up with 3 raw data files per each selected data aggregator. Note that there will be one image frame saved per train. Also, the slow data are saved in the PNCCD02
data files, while the fast data are saved in the PNCCD01
data files. The slow data refer to the pnCCD gain, bias voltages (HV values for top and bottom pnCCD modules) and the sensors’ temperatures. The fast data are the pnCCD image arrays.
Note
- Only those files whose names contain
PNCCD01
orPNCCD02
will have the data collected by the pnCCD detector because only these files are generated by the correct pnCCD data aggregators.
To open a raw data file, which contains the pnCCD fast data, on Maxwell cluster, do the following:
1 2
module load xray hdfview3 RAW-R0XXX-PNCCD01-S000##.h5
Go to
Open
menu (looks like an open book with a red arrow pointing downwards) and click on the menu button found on the top looking like a box with a black square and a ring inside. Browse togpfs
folder and then browse to your desired raw data file.A window opens, which should have the complete path of your desired raw data file in
Recent Files
box. Browse to the following path to have access to the raw image data:/INSTRUMENT/SQS_NQS_PNCCD1MP/CAL/PNCCD_FMT-0:output/data/image/
To ensure data is being properly written on the disk, make sure that the
image
is non empty and non zero. To do this, one has to display the data and ensure the size of the data array is \(x \times 1024 \times 1024\), where \(x\) is the number of frames and \(0 < x \leq 500\). To display the raw data:- Double click on the
image
to open the raw data image as an array in a spreadsheet. - To visualize the data as 2D images (see Fig. 7.2 and Fig. 7.3), right click on the
image
in the above mentioned path and click onOpen As
. A window pops up. SelectImage
as display type. Select the desired color scale from theSelect palette
drop-down menu. If desired, choose a valid range by setting the desired minimum and maximum ADU values. SetHeight
as dimension 1 (1024 pixels) andWidth
as dimension 2 (1024 pixels).Depth
would be dimension 0 which is the number of available frames. Click onReset
to set theDepth-End
to the maximum available number of frames. Now, you can also change the frame to be displayed (default is frame 0). Finally, pressOK
to display the image. Once the image is shown, one can choose to display various frames by using the forward and backward arrows.
- Double click on the