Skip to content

Conversation

@apeck12
Copy link
Owner

@apeck12 apeck12 commented Apr 18, 2022

A PeakFinder class has been added that leverages psana's adaptive peak-finding algorithm and writes the results to CrystFEL-compatible CXI files that can then be indexed using indexamajig. In addition, the class writes a summary file (peakfinding.summary) and a .lst file as input for indexamajig. As an example, peak finding can be performed as follows:

mpirun -n 4 python /cds/home/a/apeck/sfx_utils/sfx_utils/processing/peak_finder.py --exp cxip21119 --run 46 --det_type jungfrau4M --outdir /cds/data/psdm/cxi/cxip21119/scratch/apeck/r0046 --mask /cds/data/psdm/cxi/cxip21119/scratch/apeck/r0046/staticMask.npy --amax_thr 180.0 --atot_thr 300.0

To enable MPI parallelization during peak finding, the PsanaInterface class has been revised so that the event IDs are retrieved at the beginning and can be distributed across ranks using the distribute_events class function. Note that despite these changes PsanaInterface has no knowledge of MPI so that it can be used without mpirun; mpi4py should be imported by the upstream class. It may be useful to look into whether MPIDataSource would be an efficient alternative at a later date.

To-do's:

  1. Make a peak finding task.
  2. Figure out what the amax_thr, atot_thr, and son_min variables correspond to, and look into whether the new psana interface for peak finding is avalable.
  3. Alter generate_mask function in the PeakFinder class to detect type of mask (e.g. cctbx, crystfel, psana unassembled) and load accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant