Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note: You can launch peak finding jobs on multiple runs when you are ready to analyze the entire experiment, e.g. . For example, Run(s) 1,10:13 will launch peak finding on runs 1, 10, 11, and 13.
The CXIDB file is generated in the output directory in the following format: <experiment name>_<4-digit run number>.cxi (i.e., /reg/d/psdm/cxi/cxitut13cxic00318/scratch/<username>/psocake/r0010r0124/cxitut13cxic00318_00100124.cxi) 

Two virtual powder patterns will also be generated in the run directory:

...

  • In the diffraction geometry panel, set "Detector distance" to 145mm. 
  • In the indexing panel, tick "Indexing on". If indexing succeeds, the integrated (predicted) peaks will be marked with magenta circles. These triple rings represent the integration radii. A magenta triangle means wait. If indexing fails, you will see a magenta X.
  • If you see magenta circles and magenta unitcell appear, congratulations! You have indexed your first pattern using psocake.
  • Try incrementing this distance in 1mm step till the unit cell parameters are as close as possible to lys.cell. The optimum detector distance is around 158mmaround 145mm.
    Everytime Every time the "Detector distance" value is changed by the user, psocake converts the psana geometry (in /reg/d/psdm/cxi/cxic00318/calib/Jungfrau\:\:CalibV1/CxiDs1.0\:Jungfrau.0/geometry/123-end.data) to a CrystFEL geom file (in /reg/d/psdm/cxi/cxic00318/scratch/<username>/psocake/<runNumber>/.temp.geom).

...

Once you are happy with the detector geometry and indexing parameters, you can let's index the hits found in Run 124.
Make sure the peak finding has completely finished, then click "Launch indexing”.
  • Run(s): 124
  • Queue: psanaq
  • CPUs: 24
  • Keep CXI images: On

Indexing will take some time to complete. If successful, you should see a stream file in: /reg/d/psdm/cxi/cxitut13cxic00318/scratch/<username>/psocake/r0010r0124/cxitut13cxic00318_00100124.stream

You can check the status of your indexing job here: /reg/d/psdm/cxi/cxitut13cxic00318/scratch/<username>/psocake/r0010r0124/status_index.txt

Psocake saves the detector images of only the hits in the .cxi file. It is likely that you may want to reindex these files to optimize the indexing rate. If you anticipate that you have finalized the indexing parameters, set 'Keep CXI images' to Off. It will delete the detector images in your .cxi file which will free up your precious disk space for doing other things.

As with peak finding, you can launch indexing jobs on multiple runs by specifying runs in the Run(s) field.

Indexing multiple lattices

CrystFEL can index multiple lattices per image. Set "Extra CrystFEL parameters" to --multi,--no-check-peaks. This will enable "subtract and retry" method.

Indexing pump-probe experiments

In a pump probe experiment, it is sometimes desirable to index only certain events, e.g index only the pumped crystals where the optical pump laser was on. This information is recorded in the the EVR which which psocake saves in the .cxi file .(dataset name: "/LCLS/detector_1/evr1").

So if you want to index only the hits with laser on (say EVR1: 182), then type the following in the "Index condition" field:

182 in #evr1#

Psocake will also accept combinations using AND/OR:

182 in #evr1# and 173 in #evr1# 

You can attach a tag to the stream filename by using the "Tag" field in the Indexing panel, e.g. evr182 would produce a new stream file cxitut13_0010_evr182.stream.

Detector centering

Let's check whether your detector is well centered with respect to your beam. You want the centre to be as accurate as possible (at least to a pixel accuracy) for high optimal indexing rates (>40%).

Load the powder rings generated by clicking the "Load image" button in the Image Control panel. Open "cxitut13cxic00318_00100124_maxHits.npy". Adjust the intensity as necessary.

Draw resolution rings by ticking "Resolution rings" in the Diffraction Geometry panel. You can change the ring resolution by typing number in "Resolution (pixels)". Type 165 and see whether your powder rings overlap with the resolution rings. If they do, then the detector is centered. If not, then you can click on the "Deploy automatically centred geometry" to recenter your detector. If you are unhappy with the results, you can use "Deploy manually centred geometry" which will shift the detector centre to the centre of the green ROI circle.

Since we are at run10run124, the newly deployed geometry file is named 10124-end.data. If there already exists a geometry file with the same name, it will be renamed to 10backed up as 124-end.data-<timeModified>

Jumping to indexed images


Once you have completed indexing a run, you may want to look at the indexed events.

In the small data panel, type the CXIDB filename:

  • filename: /reg/d/psdm/cxi/cxitut13/scratch/<username>/psocake/r0010/cxitut13_0010.cxi
  • dataset: /entry_1/result_1/index
You can click on the red marker in the plot to jump to the corresponding events.
Once you are satisfied with indexing all your runs, please remember to backup your .cxi files in the /are satisfied with indexing all your runs, please remember to backup your .cxi files in the /res directory of your experiment. The scratch folder will get wiped after few months (Data Retention Policy).
The stream file is small enough to transfer back to your institute for post-processing (CrystFEL tutorial) and phase retrieval (PHENIX).
For phase retrieval, you can use Phenix and CCP4 by sourcing the following lines:


Code Block
languagebash
# Phenix (version number may change)
source /reg/common/package/phenix/phenix-1.10.1-2155/phenix_env.sh
# CCP4 (version number may change) 
source /reg/common/package/ccp4/ccp4-7.0/bin/ccp4.setup-sh
# XDS is available here
/reg/common/package/XDS-INTEL64_Linux_x86_64/

For viewing the electron density, use coot contained inside phenix.


Beam Parameters for Publications

You can use psana to retrieve EPICS variables that are used in SFX publications, such as the pulse energy and the number of photons per pulse.
Code Block
languagepy
titleCommon EPICS variables for SFX
ebeam = ebeamDet.get(evt)
pulseEnergy = ebeam.ebeamL3Energy()  # MeV

es = psana.DataSource.env().epicsStore()
calculatedNumberOfPhotons = get_es_value(es, 'SIOC:SYS0:ML00:AO580', NoneCheck=False, exceptReturn=0) * 1e12  # photons


Bug/Comments:

Please send bug reports/comments:

yoon82@slac.stanford.edu

Tiny url for this tutorial: http://tinyurl.com/zj4m23n