Skip to content

Data reduction

Ti-Yen Lan edited this page May 17, 2018 · 22 revisions

The data reduction step can be divided into the following processes:

Here we generate the necessary files for the EMC reconstruction. For the test dataset, this step can be skipped by directly using the reduced data provided by us, which will be described in skip data reduction.

make-detector

We start by updating the experimental parameters in the [make-detector] section of config.ini:

[make-detector]
# pixel
num_row = 2527
num_col = 2463
cx = 1285.5
cy = 1262.0
Rstop = 115.0

# meter
detd = 0.45
px = 172e-6

# angstrom
wl = 1.03324
res_max = 1.95

# beam incidence direction
sx = 0.005
sy = -0.01
sz = -1

The parameters, num_row and num_col, specify the detector size in pixels. The pixels are labeled by coordinates (x,y), with x = 0, 1,..., num_row−1 and y = 0, 1,..., num_col−1. With this choice of coordinates, the upper-left detector pixel has coordinates (0,0), and the X-ray beam is incident in the -z direction. We assume the X-ray polarization is in the y direction, because the main application of our program is on the analysis of SMX data taken at storage ring synchrotron sources. The parameters, (cx, cy), label the beam incidence point on the detector, and Rstop is the beamstop radius in pixels. The other parameters include detd, the sample-to-detector distance, px, the squared detector pixel size, wl, the incident X-ray wavelength, and res_max, the maximum resolution of the pixels that will be considered in the reconstruction. The vector, (sx,sy,sz), indicates the beam incidence direction (does not have to be normalized), and is typically set as (0, 0, −1).

After updating the parameters, we move to the directory, make-detector, and execute the command

python make-mask.py [path to frame] > run.log

to generate the file, mask.dat, in aux to exclude the detector gaps and the pixels shadowed by the beamstop holder. Here [path to frame] is the path to one of the data frames in the cbf format. You should expect to see a masked data frame that looks like:



The beamstop region will be masked out when generating the files that record the mapping of the detector pixels to reciprocal space, which are obtained by executing the commands:

gcc make-detector.c -O3 -lm -o det
./det ../config.ini >> run.log

skip data reduction