Difference between revisions of "Metrology refinement"

From cctbx_xfel
Jump to: navigation, search
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Indexing requires highly precise knowledge of pixel positions in laboratory space.  Due to the physics of the CS-PAD detector and the brevity of the incident XFEL pulses, a parallelized integrating detector was necessary to build to be able to operate at the framing rates available at the LCLS.  64 asics are arranged in a tetragonal pattern, 2 asics per sensor, 8 sensors per quadrant and 4 quadrants per detector. The placement of these tiles in physical space is measured by the beamline operators optically using electron microscopy.  The four quadrants are movable at CXI, necessitating pixel-level adjustments to individual quadrants.  ''cctbx.xfel'' then refines tile positions to whole pixel, and then sub-pixel precision by calculating spot positions on a highly diffracting dataset and refining tile locations versus actual spot positions for each tile.  This creates four levels of metrology information and corrections.  These levels and the method of measuring and refining them are detailed below.
+
Accurate data integration requires highly precise knowledge of pixel positions in laboratory space (metrology)Gaining this knowledge is especially difficult due to the [[CSPAD Pattern | segmented nature of the CSPAD detector]], which is tiled into 64 application-specific integrated circuits (ASICs)The 64 ASICs are arranged in quadrants that are approximately 4-fold rotationally symmetric, with 8 sensors per quadrant and 2 ASICs per sensor.   The sensors are field-serviceable, and may therefore change from Run to Run.    
  
Of the operations of ''cctbx.xfel'', calculating and refining metrology is the operation most suited to beam line staff and the authors of the software.  Please don't hesitate to ask for assistance regarding any aspect of this procedure.
+
We thus need to determine positions and rotations for all 64 tiles, ideally down to an accuracy on order of 10 microns. As a general overview, cctbx takes the following steps:
  
=== Optical Metrology ===
+
* Tile placement in physical space is measured by the beamline operators optically using electron microscopy.  This is done at the per-sensor level (2 ASICs per sensor). 
  
LCLS provides initial tile placements.  Periodically the detector is disassembled and re-built, necessitating new calibration information.  The optical measurements are included in the ''cctbx.xfel'' in the source code and are reference by your ''pyana'' config file.  See [preparatory steps] for more information.
+
* Relative positions of the quadrants are determined coarsely by considering powder rings.
  
=== Quadrant positioning ===
+
* Sensor positions are refined based on Bragg spot diffraction, allowing for whole-pixel translations in x and y.
  
The CXI CS-PAD detectors have quadrants on rails to allow re-sizing of the central hole.  The second-level of metrology corrections consists of unit pixel corrections to entire quadrants using the cxi.view quadrant calibration tool.  First, create a virtual powder pattern using averaging (see [preparatory steps]).  Usually the standard deviation or maximum projection will show virtual powder ring.  An image with strong rings to moderate resolution is desired.  Once obtained, start the calibration tool with this command:
+
* ASIC positions are refined to subpixel accuracy based on Bragg diffraction, allow for sub-pixel translations and rotations.
  
  cxi.view <virtual powder pattern image path> viewer.calibrate_silver=true distl.detector_format_version="CXI 7.1"
+
Most of these steps may be performed by general users, but some require editing the source code.  Therefore, it may be suitable to consult the software authors.  Please don't hesitate to ask for assistance regarding any aspect of this procedure.
 +
 
 +
This page is superseded by the Aug. 2014 tutorial documented here: [[L498_Thermolysin]]
 +
 
 +
== Optical Metrology ==
 +
 
 +
LCLS provides initial tile placements.  Periodically the detector is disassembled and re-built, necessitating new calibration information.  The optical measurements are included in the ''cctbx.xfel'' in the source code and are reference by your ''pyana'' config file.  See [[Preparatory_steps]] for more information.
 +
 
 +
== Quadrant positioning ==
 +
 
 +
===Problem statement===
 +
 
 +
The optical metrology step above determines only the sensor positions relative to the frames of reference of each quadrant; but not the absolute position of each quadrant in space.  At the XPP instrument, the LCLS-provided initial tile placements may additionally place the quadrants, but this should be confirmed.  At the CXI instrument, the forward detector DS1 has rail-mounted quadrants to allow re-sizing of the central hole.  At CXI, quadrant placement should be assessed for both the forward and back (DS2) detectors. 
 +
 
 +
===Method===
 +
cctbx includes a special GUI to adjust quadrant positions visually, based on connectivity of concentric rings on a powder pattern.  True powders can be used (silver behenate), or a powder pattern can be synthesized by averaging protein crystal Bragg patterns from an entire run (see [[Preparatory_steps]]).  If protein patterns are averaged, it is most useful to view powder rings on a standard deviation or composite maximum image; rings on the average image itself tend to be faint.
 +
 
 +
Once a suitable image is obtained, start the calibration tool with this command:
 +
 
 +
# For silver behenate:
 +
  cxi.view <powder pattern image path> viewer.calibrate_silver=true distl.detector_format_version="CXI 7.1"
  
 
Note, the flag distl.detector_format_version is a legacy requirement that will be phased out.
 
Note, the flag distl.detector_format_version is a legacy requirement that will be phased out.
 +
 +
Usually the standard deviation or maximum projection will show virtual powder ring.  An image with strong rings to moderate resolution is desired.
  
 
Once loaded, you will see your image and many red rings, incidentally corresponding to the diffraction pattern of silver behenate.  Additionally, a separate settings panel will be present with 8 input boxes corresponding to the x and y offsets of each of the four quadrants, UL, UR, LL, and LR (upper and lower, left and right).  Manually adjust the offsets until the powder rings are circular through the whole image, using the red rings as guides.  These corrections will but put into your phil parameters file in the distl quad_translations entry in this form:
 
Once loaded, you will see your image and many red rings, incidentally corresponding to the diffraction pattern of silver behenate.  Additionally, a separate settings panel will be present with 8 input boxes corresponding to the x and y offsets of each of the four quadrants, UL, UR, LL, and LR (upper and lower, left and right).  Manually adjust the offsets until the powder rings are circular through the whole image, using the red rings as guides.  These corrections will but put into your phil parameters file in the distl quad_translations entry in this form:
Line 23: Line 45:
 
Where the numbers are listed in this order: ULX ULY, URX URY, LLX LLY, LRX, LRY
 
Where the numbers are listed in this order: ULX ULY, URX URY, LLX LLY, LRX, LRY
  
=== Unit pixel metrology corrections ===
+
== Unit pixel metrology corrections ==
 +
 
 +
''cctbx.xfel'' then refines tile positions to whole pixel, and then sub-pixel precision by calculating spot positions on a highly diffracting dataset and refining tile locations versus actual spot positions for each tile.
 +
 
 +
 
 +
== Sub-pixel metrology corrections ==
  
=== Sub-pixel metrology corrections ===
+
distl.tile_flags

Latest revision as of 14:59, 17 August 2015

Accurate data integration requires highly precise knowledge of pixel positions in laboratory space (metrology). Gaining this knowledge is especially difficult due to the segmented nature of the CSPAD detector, which is tiled into 64 application-specific integrated circuits (ASICs). The 64 ASICs are arranged in quadrants that are approximately 4-fold rotationally symmetric, with 8 sensors per quadrant and 2 ASICs per sensor. The sensors are field-serviceable, and may therefore change from Run to Run.

We thus need to determine positions and rotations for all 64 tiles, ideally down to an accuracy on order of 10 microns. As a general overview, cctbx takes the following steps:

  • Tile placement in physical space is measured by the beamline operators optically using electron microscopy. This is done at the per-sensor level (2 ASICs per sensor).
  • Relative positions of the quadrants are determined coarsely by considering powder rings.
  • Sensor positions are refined based on Bragg spot diffraction, allowing for whole-pixel translations in x and y.
  • ASIC positions are refined to subpixel accuracy based on Bragg diffraction, allow for sub-pixel translations and rotations.

Most of these steps may be performed by general users, but some require editing the source code. Therefore, it may be suitable to consult the software authors. Please don't hesitate to ask for assistance regarding any aspect of this procedure.

This page is superseded by the Aug. 2014 tutorial documented here: L498_Thermolysin

Optical Metrology

LCLS provides initial tile placements. Periodically the detector is disassembled and re-built, necessitating new calibration information. The optical measurements are included in the cctbx.xfel in the source code and are reference by your pyana config file. See Preparatory_steps for more information.

Quadrant positioning

Problem statement

The optical metrology step above determines only the sensor positions relative to the frames of reference of each quadrant; but not the absolute position of each quadrant in space. At the XPP instrument, the LCLS-provided initial tile placements may additionally place the quadrants, but this should be confirmed. At the CXI instrument, the forward detector DS1 has rail-mounted quadrants to allow re-sizing of the central hole. At CXI, quadrant placement should be assessed for both the forward and back (DS2) detectors.

Method

cctbx includes a special GUI to adjust quadrant positions visually, based on connectivity of concentric rings on a powder pattern. True powders can be used (silver behenate), or a powder pattern can be synthesized by averaging protein crystal Bragg patterns from an entire run (see Preparatory_steps). If protein patterns are averaged, it is most useful to view powder rings on a standard deviation or composite maximum image; rings on the average image itself tend to be faint.

Once a suitable image is obtained, start the calibration tool with this command:

# For silver behenate:
cxi.view <powder pattern image path> viewer.calibrate_silver=true distl.detector_format_version="CXI 7.1"

Note, the flag distl.detector_format_version is a legacy requirement that will be phased out.

Usually the standard deviation or maximum projection will show virtual powder ring. An image with strong rings to moderate resolution is desired.

Once loaded, you will see your image and many red rings, incidentally corresponding to the diffraction pattern of silver behenate. Additionally, a separate settings panel will be present with 8 input boxes corresponding to the x and y offsets of each of the four quadrants, UL, UR, LL, and LR (upper and lower, left and right). Manually adjust the offsets until the powder rings are circular through the whole image, using the red rings as guides. These corrections will but put into your phil parameters file in the distl quad_translations entry in this form:

distl {
  quad_translations =  2 -6  3 -6 -7  0 -1 -4
}

Where the numbers are listed in this order: ULX ULY, URX URY, LLX LLY, LRX, LRY

Unit pixel metrology corrections

cctbx.xfel then refines tile positions to whole pixel, and then sub-pixel precision by calculating spot positions on a highly diffracting dataset and refining tile locations versus actual spot positions for each tile. 


Sub-pixel metrology corrections

distl.tile_flags