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 mask | cxi.make_dials_mask --maxproj-min=Light_ADU -o mask.pickle Dark_avg.cbf Dark_std.cbf Light_max.cbf |
Calibration using composite powder image | cspad.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 |
Output some events as CBF files for inspection | cctbx.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 images | dials.estimate_gain shot*.cbf |
Creating a Phil parameter file for indexing | cctbx.xfel.xtc_process -c -a 2 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 MPI | Indexing without integration using MPI with dispatch.integrate=True |
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 convergence | cspad.detector_shifts tag_name_1.json tag_name_1.pickle … tag_name_n.json tag_name_n.pickle |
View detector refinement statistics | cspad.detector_statistics |
Post-refine, merge, and output MTZ file | Requirement: prime.phil is needed prime.run prime.phil |
Get detector names from an experiment and run no. | detnames exp=expname:run=run_no |
Combine indexing results | dials.combine_experiments |