Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: `/reg/g/psdm/etc/psconda.sh` will check if there is a -py2 flag. Yes will load Python2 environment, and otherwise it will load Python3 environment.

...

Code Block
languagetext
Citation for psocake (and other psana-based programs):
@Article{Thayer2017,
author="Thayer, J. and Damiani, D. and Ford, C. and Dubrovin, M. and Gaponenko, I. and O'Grady, C. P. and Kroeger, W. and Pines, J. and Lane, T. J. and Salnikov, A. and Schneider, D. and Tookey, T. and Weaver, M. and Yoon, C. H. and Perazzo, A.",
title="Data systems for the Linac coherent light source",
journal="Advanced Structural and Chemical Imaging",
year="2017", month="Jan", day="14", volume="3", number="1", pages="3", issn="2198-0926",
doi="10.1186/s40679-016-0037-7", url="https://doi.org/10.1186/s40679-016-0037-7"}
 
@article{Damiani:zw5004, 
author = "Damiani, D. and Dubrovin, M. and Gaponenko, I. and Kroeger, W. and Lane, T. J. and Mitra, A. 
and O'Grady, C. P. and Salnikov, A. and Sanchez-Gonzalez, A. and Schneider, D. and Yoon, C. H.", 
title = "{Linac Coherent Light Source data analysis using {it psana}}", 
journal = "Journal of Applied Crystallography", 
year = "2016", volume = "49", number = "2", pages = "672--679", month = "Apr", 
doi = {10.1107/S1600576716004349}, url = {http://dx.doi.org/10.1107/S1600576716004349}, }

Please connect to psana machines via NoMachine for less lag in graphics. Instructions here: Remote Visualization

Starting psocake in SFX mode

...

Code Block
languagebash
# PSOCAKE2 (Run 17 or older)
function psocake2 ()
{
    echo "Activating psocake py2"
    source /reg/g/psdm/etc/psconda.sh -py2
    source /reg/g/cfel/crystfel/crystfel-0.8.0/setup-sh # CrystFEL compatible version for psocake2
}

# PSOCAKE3 (Run 18 or newer)
function psocake3 ()
{
    echo "Activating psocake py3"
    source /reg/g/psdm/etc/psconda.sh -py3    
    source /reg/g/cfel/crystfel/crystfel-0.9.1/setup-sh # Crystfel compatible version for psocake3 
}

# CCP4 (version may change)
source /reg/common/package/ccp4-7.1/bin/ccp4.setup-sh
# XDS
export PATH=/reg/common/package/XDS-INTEL64_Linux_x86_64:$PATH

...

Mask making

In this section, let's you will learn how to mask out pixels that should not be used for analysis (such as dead pixels and shadows), mask out the jet streak at the centre of the detector, and mask out the water ring (just for fun!). Masked out regions are ignored during peak finding and during Bragg spot integration.

Note: the Image Panel must be in the default "greyscale" colormap for the mask colors to display properly.

...

First things first, crystal indexing requires an accurate detector geometry. Get in touch with the beamline point of contact POC if the geometry is inaccurate.

...

Once you are happy with the detector geometry and indexing parameters, 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/cxic00318/scratch/<username>/psocake/r0124/cxic00318_0124.stream

You can check the status of your indexing job here: /reg/d/psdm/cxi/cxic00318/scratch/<username>/psocake/r0124/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

Save publication images

You can save publication quality images by clicking "Save evt" button near the lower bottom right of the GUI.

Image: psocake_cxic00318_124_jungfrau4M_30_1597321015_275824216_83040_img.png

Peaks found: psocake_cxic00318_124_jungfrau4M_30_1597321015_275824216_83040_pks.png

Indexed peaks: psocake_cxic00318_124_jungfrau4M_30_1597321015_275824216_83040_idx.png

Image AddedCrystFEL 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 crystals where the optical pump laser was on. This information is recorded in the EVR 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 optimal indexing rates.

Load the powder rings generated by clicking the "Load image" button in the Image Control panel. Open "cxic00318_0124_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 run124, the newly deployed geometry file is named 124-end.data. If there already exists a geometry file with the same name, it will be backed up as 124-end.data-<timeModified>

...