Difference between revisions of "Cxi02416 calibration"

From cctbx_xfel
Jump to: navigation, search
(Refine metrology (v1))
(Refine metrology (v1))
Line 27: Line 27:
 
== Refine metrology (v1) ==
 
== Refine metrology (v1) ==
  
The following command will do an iterative joint hierarchical refinement of the components of the CSPAD detector.  It first aggregates the requested number of images into a single dataset.  Then, it refines the detector as a whole (including Z position and tilt).  Using the new detector position, it refines the quadrants independently from each other, and then the 2x1 sensors, and then the individual panels. Finally, it converts the DIALS format metrology into the SLAC file format (0-end.data).
+
Let's call the metrology deployed by the beamline operator version 0 (v0).  The following command will do an iterative joint hierarchical refinement of the components of the CSPAD detector.  The new tile positions we call version 1 (v1).
  
 
   bsub -q psanaq -o t002_1k.out cspad.cbf_metrology tag=t002_1k cxi02416-refine.phil reflections=indexed ../r0*/002/out n_subset=1000 split_dataset=True
 
   bsub -q psanaq -o t002_1k.out cspad.cbf_metrology tag=t002_1k cxi02416-refine.phil reflections=indexed ../r0*/002/out n_subset=1000 split_dataset=True
 +
 +
The program first aggregates the requested number of images into a single dataset.  Then, it refines the detector as a whole (including Z position and tilt).  Using the new detector position, it refines the quadrants independently from each other, and then the 2x1 sensors, and then the individual panels. Finally, it converts the DIALS format metrology into the SLAC file format (0-end.data).
  
 
Here, I've asked it to pick 1000 images at random to refine using [[cxi02416-refine.phil | this phil file]].  split_dataset=True means the refinement is done twice independently, using odd numbered or even numbered images, each time using 1000 images.  This will be useful later for evaluating the accuracy of the metrology.  The output files will be named t002_1k*, set by the tag parameter.  Finally, indexing produces two sets of reflection files, bright indexed reflections, and final integrated reflections (can include weak intensities).  Here, I've chosen to refine only against the bright reflections by using reflections=indexed.
 
Here, I've asked it to pick 1000 images at random to refine using [[cxi02416-refine.phil | this phil file]].  split_dataset=True means the refinement is done twice independently, using odd numbered or even numbered images, each time using 1000 images.  This will be useful later for evaluating the accuracy of the metrology.  The output files will be named t002_1k*, set by the tag parameter.  Finally, indexing produces two sets of reflection files, bright indexed reflections, and final integrated reflections (can include weak intensities).  Here, I've chosen to refine only against the bright reflections by using reflections=indexed.

Revision as of 17:53, 21 March 2016

Calibration of cspad using cxi02416, cctbx.xfel and DIALS

This page is not intended as a manual for processing XFEL data using cctbx.xfel and DIALS. Rather, this is a documentation of steps taken to calibrate the CSPAD using data collected at CXI in February 2016, on detector Ds2.

Initial indexing

The initial metrology deployed by the beamline operator is sufficient to get initial indexing results. Important parameters given by the beamline operators:

  • Data is contained in runs 2-16
  • Detector address: CxiDs2.0:Cspad.0
  • detz_offset (IE the distance from the sample position to the back of the detector rail): 568 mm

Indexing in cctbx.xfel typically is done in a series of trials. By this point, I had done two trials of indexing (trials 0 and 1), working out some spotfinding parameters and accounting for a beam center shift in the metrology. We join this walkthrough at trial 2.

With this information, and this phil file, we can index the data:

 for i in `seq 2 16`; do cxi.mpi_submit input.experiment=cxi02416 output.output_dir=/reg/d/psdm/cxi/cxi02416/ftc/brewster/dials \
   mp.nproc=36 mp.queue=psanaq output.split_logs=True input.dispatcher=cctbx.xfel.xtc_process \
   input.target=cxi02416-lyso-t002.phil input.trial=2 input.run_num=$i; done

This command submits jobs for runs 2 through 16, using the DIALS backend of cctbx.xfel. After indexing is completed, we got 4920 indexed images, as can be shown by this command:

 cd /reg/d/psdm/cxi/cxi02416/ftc/brewster/dials
 ls r0*/002/out/*.json | wc -l

Refine metrology (v1)

Let's call the metrology deployed by the beamline operator version 0 (v0). The following command will do an iterative joint hierarchical refinement of the components of the CSPAD detector. The new tile positions we call version 1 (v1).

 bsub -q psanaq -o t002_1k.out cspad.cbf_metrology tag=t002_1k cxi02416-refine.phil reflections=indexed ../r0*/002/out n_subset=1000 split_dataset=True

The program first aggregates the requested number of images into a single dataset. Then, it refines the detector as a whole (including Z position and tilt). Using the new detector position, it refines the quadrants independently from each other, and then the 2x1 sensors, and then the individual panels. Finally, it converts the DIALS format metrology into the SLAC file format (0-end.data).

Here, I've asked it to pick 1000 images at random to refine using this phil file. split_dataset=True means the refinement is done twice independently, using odd numbered or even numbered images, each time using 1000 images. This will be useful later for evaluating the accuracy of the metrology. The output files will be named t002_1k*, set by the tag parameter. Finally, indexing produces two sets of reflection files, bright indexed reflections, and final integrated reflections (can include weak intensities). Here, I've chosen to refine only against the bright reflections by using reflections=indexed.

In order to get a sense of the magnitude of the shifts in panel position after refinement, use the program cxi.display_metrology. For example, the original detector geometry can be displayed thusly:

 cxi.display_metrology /reg/d/psdm/cxi/cxi02416/calib/CsPad::CalibV1/CxiDs2.0:Cspad.0/geometry/0-end.data

Compare it to the refined geometry:

 cxi.display_metrology 0-end.data.t002_1k_1

You will see a small change in the origin (center arrow) and obvious changes in the quadrant positions. The relative positions of the sensors to each other will not change a large amount, though if you inspect the files themselves you will see changes.

Index using v1 metrology

Refine metrology (v2)

Evaluate metrology

Deploy metrology