# Analysis Strategies for MHz XPCS at the European XFEL
## 3 Results
### Corrections to Single Patterns  
To clarify the nomenclature: we distinguish between _raw_ and _processed_ data. Raw data are the ADU values as they are measured by AGIPD and written to disk. The first calibration step is a straightforward pedestal subtraction. This correction step is also called dark subtraction, since the per pixel and per storage cell pedestal is obtained by recording a certain number of trains without X-rays on the detector. This first step is already able to produce reliable results in conditions of fairly good illumination, i.e., close to the centre of the detector, but it quickly fails as soon as the intensity decreases. Therefore, the information obtained from the TTC is tainted by several spurious features as can be seen in Figure 4a. The dynamics in that \(q\)-region is expected to be described by a fast exponential relaxation with a very mild speeding up along the main diagonal [17], but the measured signal is completely covered by additional contributions and the \(g_{2}(t)-1\) that can be extracted from such TTC (blue circles in Figure 4d) is completely different from the expected behaviour (black line in Figure 4d). European XFEL provides a calibration pipeline for calibrating the raw data including many steps in addition to the dark subtraction. A dataset that the XFEL calibration was applied to will be referred to as _processed_ data in the following. Processing of AGIPD data has also been tackled by several previous works [10; 17; 18; 32; 33; 34]. We will describe here the most important steps included for the data calibration for XPCS data and start with the correction of shifting and fluctuating baseline values. A full detector module's pedestal was found to shift as a function of overall illumination on this module. For that purpose, two Tantalum stripes cover some pixels of each module to measure and subtract this baseline shift. Additionally, the dark pedestal of a single pixel and storage cell may vary over time (see Figure 2), and therefore the recorded signal of a pixel that has not seen any photons can differ from zero even after dark subtraction. It is possible to correct these drifts by subtracting the mean value of empty pixels (identified as having values between \(-25\) ADU and \(25\) ADU after dark and baseline shift correction). This step is called common mode correction, and it is applied on a per ASIC and per 32 storage cells basis. A last step corrects for different responses of pixels to absorbed photons and multiplies a pre-determined flatfield per pixel and per storage cell. Other corrections can be added, such as removing false intensity gradients across the chips [16; 24]. These corrections are implemented in the calibration pipeline provided by European XFEL. In Figure 4b, the XPCS results obtained with data processed by the XFEL pipeline are shown (dark subtraction, baseline shift correction, common mode, and flatfield are applied). Clearly, the processing of the data solved the issues of the features observed in the TTC in (a); however, the result is a superposition of a small fast relaxation and a large slow one, also visible in the \(g_{2}(t)-1\) (red diamonds in Figure 4d). This result is still far from the expected behaviour. To obtain the desired quality of our TTCs, we can implement one drastic but effective measure on top of the data calibration which is \"photonization\". Analyzing the histograms of the measured ADU values, it is possible to observe that the detection of one 9.3 keV photon produces on average 66 ADUs. Normalizing the data by the single photon value and defining the width of the bins, we can identify how many photons were recorded in every pixel and memory cell. The size of the bin will determine how selective our photonization procedure will be. Depending on the photon energy, which defines the separation of the photon events in the histogram, and required precision, one can adjust the bin size.