iplt_diff
This executable handles all steps of the diffraction processing, indicated by different modes or commands, as described in more detail below. It is run from the top-level directory that contains the diffraction patterns in individual subdirectories, as explained in ex/diff/ProjectSetup.
NOTE: Prior to the extraction, a manual lattice verification step is necessary (with giplt_diff).
Syntax
iplt_diff [OPTIONS] MODE [MODE_OPTIONS]
Iterate over all image sub-directories and run the particular processing step indicated by MODE if one of the following is true:
- that step hasn't been run yet (the resulting data files are not present)
- its input files are newer than its result files, or the input parameters in info.xml are newer than the output parameters.
- the processing step is forced with -f (see below)
If a required input files is missing, or an empty file named ignore is present in the image directory, that particular directory will always be skipped, irrespective if one or more of the above conditions holds.
Info Files
All modes will retrieve their options from either the top-level project.xml or the image specific info.xml files (in the image directory), under the top-level tag DiffProcessing. If an option appears twice, the one in info.xml takes precedence. Most modes also record their main results within info.xml, under the top-level tag DiffProcessingResults.
The item required by all modes is DiffProcessing/ImageMask in project.xml, which defines the regular expression mask to identify the image directories. Only those directories that match this mask will be traversed during processing.
General options
- -v N or --verbosity=N
- set verbosity level to N (usually 0-5)
- -i MASK or --image-mask=MASK
- use only image(s) that fit(s) MASK
- -f or --force
- force re-processing of the particular step, even if the data files already exist (combine with -i to restrict this to some directories, otherwise all image directories will be re-processed)
Diffraction Processing Steps
A single diffraction pattern is processed in various sequential steps. These are applied with the various commands, listed here in order of logical usage:
- init: setup directory
- mask : beamstop mask handling
- origin: determine origin
- search: determine lattice
- manual lattice verification step with giplt_diff
- extract: extract reflections
- integrate: integrate reflections
- tilt: determine tilt geometry
- sym: apply symmetry
All general options apply, but some steps have additional options given below.
init
Syntax: iplt_diff [GENERAL OPTIONS] init
Creates info.xml file in all image directories and fills it with default options. If info.xml already exists, this step will be skipped, unless -f is used; in this case, the default options will be written into the existing file, leaving the rest of the content untouched.
mask
Syntax: iplt_diff [GENERAL OPTIONS] mask
Searches beamstop mask in diffraction pattern, based on the polygon definition in project.xml.
Output: diff_mask.log and mask shift in info.xml
origin
Syntax: iplt_diff [GENERAL OPTIONS] [--fast_origin] origin
Determines the origin, i.e. the location of the (0,0) reflection. The --fast_origin option uses a reduced set of background values to speed up the algorithm, but may deliver less reliable results. NOTE: This algorithm is currently borked, please expect wrong identification of the origin, you can fix this during the manual lattice verification step.
Output: diff_ori.log and origin in info.xml
search (lattice)
Syntax: iplt_diff [GENERAL OPTIONS] search
Searches for a lattice, using the previously determined origin, and saves it as the initial lattice.
Input: diffraction pattern as IMGID.tif file in IMGID directory and origin from previous step.
Output: diff_search.log and an InitialLattice in info.xml
Details: Search lattice
manual lattice verification step
Use giplt_diff verify_lattice to convert initial lattices into verified ones.
extract
Syntax: iplt_diff [GENERAL OPTIONS] [--assume-verified-lattice] [--ignore-refined-lattice] extract
Runs the main reflection extraction routine, based on a manually verified lattice or previously refined lattice. If neither a verified or refined lattice is present, or the initial lattice is newer than these two, the extraction will not be run. This can be overruled with the --assume-verified-lattice option, which will accept the initial lattice as the verified one (not recommended). As the name suggests, --ignore-refined-lattice will cause the extract routine to ignore a refined lattice and always use the verified one instead.
Input: diffraction pattern as IMGID.tif file in IMGID directory and VerifiedLattice or RefinedLattice in info.xml
Output: IMGID_ext.mtz diff_extract.log, and refined lattice in info.xml
Details: Extract and integrate reflections
integrate
Syntax: iplt_diff [GENERAL OPTIONS] integrate
Converts the information collected during the extract run into iobs and sigiobs, i.e. integrates the peak intensities.
Output: IMGID_int.mtz and diff_integrate.log
Details: Extract and integrate reflections
tilt
Syntax: iplt_diff [GENERAL OPTIONS] [--ignore-verified-tilt] tilt
Determines the reciprocal z values for each reflection, either based on a tilt geometry calculated from the unit cell and the refined lattice, or taken from a verified tilt geometry in info.xml. The option --ignore-verified-tilt will deactive the latter behaviour, and cause the tilt geometry to be always re-calculated from the verified lattice and unit cell.
Input: IMGID_int.mtz
Output: IMGID_tilt.mtz diff_tilt.log and InitialTiltGeometry in info.xml
sym
Syntax: iplt_diff [GENERAL OPTIONS] sym
Input: IMGID_tilt.mtz
Output: IMGID_sym.mtz sym.log
Details: Apply symmetry
Other commands
summary
Syntax: iplt_diff summary
Dumps out a summary of all diffraction images and their processing state
Output: summary.log
(Back to Overview)
