Processing EIGER images by DIALS - biochem-fan/cheetah GitHub Wiki
Processing EIGER images by DIALS
This has nothing to do with SACLA but may be useful for serial crystallography at synchrotrons.
We use dials.stills_process to process still images. However, before starting batch processing, we first do it manually to find parameters.
Importing images
As with rotation dataset, we use dials.import. You can override wrong information in the master h5 as follows.
dials.import stills_master.h5 geometry.beam.wavelength=1.00 \
panel.origin=-33.73,-39.96,-78 panel.fast_axis=1,0,0 panel.slow_axis=0,1,0
If you have a CrystFEL geometry file, you can calculate the panel origin by multiplying corner_x and corner_y by the pixel size (the inverse of res). For example, in the case above, the relevant sections in the geometry file are:
res = 13333.3
0/corner_x = -449.692089
0/corner_y = -532.831936
You can also use the circle fitting feature in iMOSFLM to find the beam center. Note that you have to swap X and Y from iMOSFLM.
Generating the pixel mask
DIALS respects the pixel mask in the master h5. If you want to add more masks (i.e. beam stop, rings, etc), you can use dials.generate_mask. untrusted.rectangle specifies coordinates in the x0,x1,y1,y2 order.
dials.generate_mask datablock.json resolution_range=2.85,2.91 resolution_range=2.45,2.5 \
untrusted.rectangle=448,462,255,516
This creates mask.pickle. Repeat dials.import with mask=mask.pickle.
dials.import stills_master.h5 geometry.beam.wavelength=1.00 \
panel.origin=-33.73,-39.96,-78 panel.fast_axis=1,0,0 panel.slow_axis=0,1,0 \
mask=mask.pickle
This mask does not inherit the pixel mask in the master H5, but does apply the trusted range mask by default (use_trusted_range=True). The mask in the master h5 is merged during the processing (see https://github.com/dials/dials/issues/236).
Spot finding
dials.find_spots datablock.json
Check spot finding results:
dials.image_viewer datablock.json strong.pickle
When the result is not satisfactory, we typically tweak gain, min_spot_size and global_threshold.
Indexing
dials.index datablock.json strong.pickle space_group=P43212 unit_cell=79.4,79.4,37.8 \
d_min_start=2.0 indexing.method=real_space_grid_search ewald_proximal_volume_max=0.05 \
scan_range=1,2
We put scan_range=1,2 to index only the first image in the container. I don't know why we sometime need to increase ewald_proximal_volume_max.
If real_space_grid_search rejects too many spots (far fewer spots in refinement than observed), try setting both index_assignment.method=local and optimise_initial_basis_vectors=True. It is also worth trying indexing.method=fft1d.
When you index rotation datasets, the refinement is repeated with higher and higher resolution limits, starting from d_min_start. In contrast, the still indexer does not repeat the refinement. Thus, you should specify reasonably high resolution in the parameter. It also limits the spots real_space_grid_search examines.
If you see RMSD_Z in the output, your images are not treated as stills, but as rotation images. Add stills.indexer = stills to the arguments.
Batch processing
When you are happy with parameters, create index.phil for dials.stills_process.
# set to the number of cores in your computer
mp.nproc = 14
# get more info
verbosity = 3
geometry {
detector {
panel {
origin=-33.73,-39.96,-78
fast_axis=1,0,0
slow_axis=0,1,0
}
}
beam.wavelength=1.00
}
# we can specify `datablock.json` created above to avoid repetition.
# HOWEVER, you still have to specify wavelength and masks as these are not read from the file.
# input.reference_geometry = datablock.json
indexing {
# force stills mode
stills.indexer = stills
known_symmetry {
space_group = P43212
unit_cell = 78.9 78.9 38.1 90 90 90
}
method = fft1d
# sometimes real_space_grid_search works better
# method = real_space_grid_search
# needs to be sufficiently high
refinement_protocol.d_min_start = 2.0
# dramatically increases accepted spots in real_space_grid_search
# index_assignment.method = local
# optimise_initial_basis_vectors = True
# don't know why this is necessary in some cases
stills.ewald_proximal_volume_max = 0.05
}
spotfinder {
filter.min_spot_size = 2
# don't forget to specify it in the "integration" section as well!
lookup.mask = mask.pickle
}
refinement {
parameterisation {
# not sure which is better. The default is False
# spherical_relp_model = True
beam.fix = all
detector.fix = all
auto_reduction {
action = fix
min_nref_per_parameter = 1
}
crystal {
unit_cell {
restraints {
tie_to_target {
values = 78.9,78.9,38.1,90,90,90
sigmas = 1,1,1,0,0,0
}
}
}
}
}
}
integration {
lookup.mask = mask.pickle
integrator = stills
profile.fitting = False
background {
algorithm = simple
simple {
model.algorithm = linear2d
outlier.algorithm = simple
}
}
}
profile {
gaussian_rs {
min_spots.overall = 0
}
}
Then execute:
dials.stills_process index.phil stills_master.h5