Problem Set 1:
Cxitut13 (Detector: CxiDs1.0:Cspad.0, dez_offset=578, detector_distance=158, Run 10: data, Run 11: Dark)

Updates (2017-07-27)
Input parameters changed:
format.cbf.gain_mask_value ==> format.cbf.cspad.gain_mask_value
format.cbf.common_mode.algorithm ==> format.cbf.cspad.common_mode.algorithm
format.cbf.common_mode.custom_parameterization ==> format.cbf.cspad.common_mode.custom_parameterization
Tutorial Slides:

Preparation
To run a precompiled version of cctbx:
source ~monarin/cida

 

To install psana-conda and cctbx,
To submit a job on psana queues:
source ./miniconda/etc/profile.d/conda.sh
conda activate myEnv
bsub < submit.cmd
A sample of job submission command can be found here: /reg/d/psdm/xpp/xpptut15/res/exafel_demo/

 

Old instructions (no need if above works):
For psana-conda, see User Documentation 

 

Calibration

 

Averaging dark images
cxi.mpi_average -x expname -r runno -a detector_address -d dez_offset -v -g gain_scale_factor -R
* -R tell CDL to get the raw images.
Option: Using bsub
for i in `seq min max`; do bsub -n 12 -q psana_queue -o avg_r$i.log mpirun cxi.mpi_average -x expname -r $i -a detector_address -d dez_offset -v -g gain_scale_factor; done
Create maskcxi.make_dials_mask --maxproj-min=Light_ADU -o mask.pickle Dark_avg.cbf Dark_std.cbf Light_max.cbf
Calibration using composite powder imagecspad.quadrants_cbf Light_max.cbf -p

Option: to combine all light-max images
cxi.cspad_average *_max*.cbf -m all_max.cbf
Deploy new calibration
cxi.cbfheader2slaccalib cbf_header=experiment_calibration_cc.cbf
Option: organize calibration file
mv /exp/calib/0-end.data/address/geometry0-end.data 0-end.data.v0
cp /new/geometry/0-end.data 0-end.data.v1
ln -s 0-end.data.v1 0-end.data

 

Indexing and Integration

 

Output some events as CBF files for inspectioncctbx.xfel.xtc_dump dispatch.max_events=n_max_events input.experiment=expname input.address=detector_address input.run_num=run_no format.file_format=cbf format.cbf.detz_offset=detz_offset
View a single image
dials.image_viewer image.cbf
Peak finding on single image

Requirement: target.phil is needed (for spot finding parameters)

dials.stills_process target.phil image.cbf

Find gain on multiple imagesdials.estimate_gain shot*.cbf
Creating a Phil parameter file for indexing

cctbx.xfel.xtc_process -c -a 2 e 10 | less

This will show all the parameters available for Spot Finding, Indexing, and Integration step. To get start, use cxitut13 target.phil file and fill in more parameters as needed.

Index multiple images without integration using MPI
Requirement: target.phil is generated
cxi.mpi_submit input.experiment=expname output.output_dir=/path/to/output mp.nproc=n_processors mp.queue=queue_name output.split_logs=True input.dispatcher=cctbx.xfel.xtc_process input.target=target.phil input.trial=0 input.run_num=10 dispatch.integrate=False
Index multiple images with integration using MPIIndexing without integration using MPI with dispatch.integrate=True

 

Re-calibration

 

Use indexing result(s) to refine metrology
Requirement: refine.phil is needed
cspad.cbf_metrology tag=tag_name /path/to/indexing/results n_subset=n_test_images split_dataset=True refine.phil
Check detector refinement convergencecspad.detector_shifts tag_name_1.json tag_name_1.pickle … tag_name_n.json tag_name_n.pickle
View detector refinement statisticscspad.detector_statistics

 

Post-refinement and Merging

 

Post-refine, merge, and output MTZ fileRequirement: prime.phil is needed
prime.run prime.phil

 

Misc

 

Get detector names from an experiment and run no.detnames exp=expname:run=run_no
Combine indexing resultsdials.combine_experiments
  
  • No labels