-
Loïc Le Guyader authoredLoïc Le Guyader authored
BOZ: Beam-Splitting Off-axis Zone plate analysis
The BOZ analysis consists of 4 notebooks and a script. The first notebook :doc:`BOZ analysis part I.a Correction determination <BOZ analysis part I.a Correction determination>` is used to determine all the necessary correction, that is the flat field correction from the zone plate optics and the non-linearity correction from the DSSC gain. The inputs are a dark run and a run with X-rays on three broken or empty membranes. For the latter, an alternative is to use pre-edge data on an actual sample. The result is a JSON file that contains the flat field and non-linearity correction as well as the parameters used for their determination such that this can be reproduced and investigated in case of issues. The determination of the flat field correction is rather quick, few minutes and is the most important correction for the change in XAS computed from the -1st and +1st order. For quick correction of the online preview one can bypass the non-linearity calculation by taking the JSON file as soon as it appears. The determination of the non-linearity correction is a lot longer and can take some 2 to 8 hours depending on the number of pulses in the train. For this reason, the computation can also be done on GPUs in 30min instead. A GPU notebook adapted for CHEM experiment with liquid jet and normalization implement for S K-edge is available at :doc:`OnlineGPU BOZ analysis part I.a Correction determination S K-egde <OnlineGPU BOZ analysis part I.a Correction determination S K-egde>`.
The other option is to use a script that can be downloaded from :download:`scripts/boz_parameters_job.sh` and reads as:
It uses the first notebook and is launched via slurm:
sbatch ./boz_parameters_job.sh -p 2937 -d 615 -r 614 -g 3
where 2937 is the proposal run number, where 615 is the dark run number, 614 is the run on 3 broken membranes and 3 is the DSSC gain in photon per bin. The proposal run number is defined inside the script file.
The second notebook :doc:`BOZ analysis part I.b Correction validation <BOZ analysis part I.b Correction validation>` can be used to check how well the calculated correction still work on a characterization run recorded later, i.e. on 3 broken membrane or empty membranes.
The third notebook :doc:`BOZ analysis part II.1 Small data <BOZ analysis part II.1 Small data>` then use the JSON correction file to load all needed corrections and process an run, saving the rois extracted DSSC as well as aligning them to photon energy and delay stage in a small data h5 file.
That small data h5 file can then be loaded and the data binned to compute a spectrum or a time resolved XAS scan using the fourth and final notebook :doc:`BOZ analysis part II.2 Binning <BOZ analysis part II.2 Binning>`