Skip to content

Dealing with unusual geometry and mask

biochem_fan edited this page Sep 1, 2017 · 2 revisions

Dealing with unusual geometry and mask

Shifting the beam center

If the beam center is shifted by more than a few pixels, CrystFEL cannot index at all and the detector-shift script described in Running CrystFEL is powerless in optimizing the beam center.

In such cases, you can manually tweak the beam center by (1, 2) pixels in (x, y) direction as follows.

awk '/corner_x/ {$3+=1} /corner_y/ {$3+=2} {print}' < original.geom > shifted-x1-y2.geom

Grid search several possibilities and choose the one that achieved (1) a high index rate and (2) symmetrical distribution in cell_explorer. Then you can use detector-shift as usual to fine-tune the beam center.

Adding masks

The femtosecond laser in the experimental hutch 2 is introduced almost parallel to the X-ray beam to reduce complications in timing. Thus, you will observe a big shadow from the laser beam stop.

You can add masks to the CrystFEL geometry files as follows:

; you need an entry for each sensor panel
badshadow/min_fs = 400
badshadow/max_fs = 512
badshadow/min_ss = 6220
badshadow/max_ss = 6420

badshadow2/min_fs = 0
badshadow2/max_fs = 200
badshadow2/min_ss = 5240
badshadow2/max_ss = 5440

The numbers are pixels in the image file coordinate (NOT the physical coordinate). To check the values, use adxv.

Use an updated geometry in the pipeline

Place the updated geometry file in the directory you launch cheetah-dispatcher. Re-start cheetah-dispatcher with the crystfel_args argument.

--crystfel_args="-g ../geometry.geom" 

This tells the pipeline to use geometry.geom instead of the auto-generated geometry file. Note that you need to add ../ to the path (the path is relative to subdirectories for each run).