Versions Compared

Key

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

...

  • gets the pixel coordinates from PixCoords2x1, PixCoordsQuad, and PixCoordsCSPad classes,
  • gets data from the event (from Psana::CsPad::DataV#, Psana::CsPad::ElementV# (where # stands for 1 or 2) data objects or  from ndarray<T,3> of shape [N][185][388])
  • produces the ndarray<double,2> or Image2D<double> object with CSPad image for each event,
  • adds the image object in the event for processing in other modules.
    Time consumed to fill the CSPad image array (currently 1750x1750) is measured to be about 40 msec/event on psana0105.
  • produces image size pixel map array where real/fake pixels are marked as 1/0, respectively. This array is saved in the env.calibStore() as ndarray<int16_t ,2> for source. If the file name fname_pixmap is not empty the map will be saved in this file in text format.
  • produces image size map of pixel indexes in the flatten [4][8][185][388] array where fake pixels are marked as -1. This array is saved in the env.calibStore() as ndarray<int32_t ,2> for source. If the file name fname_pixnum is not empty the map will be saved in this file in text format.

parameter

default value

description

calibDir

 

directory with calibration files, by default it is set to .../<experiment>/calib

typeGroupName

"CsPad::CalibV1"

calibration type and group names

source

"CxiDs1.0:Cspad.0"

source of data

key 

""

key for data processing stage

imgkey

"image"

output key for image saved in event

fname_pixmap""

file name with pixel map of the image; real/fake pixels are marked as 1/0, respectively

fname_pixnum""file name with pixel indexes in the flatten [4][8][185][388] array; fake pixels are marked as -1

tiltIsApplied

true

on/off for tilt angle of 2x1-sections and quads.

print_bits

0

verbosity:

  • =0 - print nothing,
  • +1 - input parameters,
  • +2 - calibration parameters,
  • +4 - consumed time per event,
  • +8 - information about image saved in event,
  • +16 - type sizes and id names,
  • +32 - information about pixel maps saved in files.

Remarks:

  • By default the empty key corresponds to raw data.If the imgkey is defined as "Image2D", the image is saved in the event as a CSPadPixCoords::Image2D<double> object, otherwise (by default) as a ndarray<double,2> object.

Module CSPadPixCoords::CSPadInterpolImageProducer

...

Module ImgAlgos::CSPadArrPeakFinder is a psana-based implementation of the "median algorithm" for peak finding in CSPad data array shaped as [5920=4*8*185][388]. This algorithm was first implemented in myana/Cheetah by Anton Barty and Co. The "median algorithm" assumes that the amplitude level of background and noise for each pixel can be estimated as a mean and RMS of the surrounding pixels, located in the ring with parameters rmin and dr around the pixel in question. The threshold SoNThr_noise on signal over noise (S/N) ratio allow to asset the pixel amplitude as a large noise fluctuation. Statistics of pixels above the S/N threshold accumulated over many images can be used to form the noisy-pixel mask. For example, if the fraction of images where pixel exceeds the S/N threshold grater than certain value (frac_noisy_imgs=0.9), the pixel is considered as noisy. The permanent bad pixel mask (see module ImgAlgos::CSPadMaskApply) and dynamically evaluated noisy pixel mask are used to get rid of bad pixels and improve the image quality. Healthy pixels with S/N above threshold (SoNThr_signal about 3-5) are treated as potential signals. Using recursive flood-filling algorithm the groups of connected signal pixels can be found and considered as a candidate for a diffraction peaks. Peak finding algorithm uses the amplitude, S/N thresholds, and limits on number of pixels in the connected region (parameters peak_amp_tot_thr, peak_SoN_thr, peak_npix_min, and peak_npix_max) in order to define the peak. Finally, the event is selected or discarded depending on number of found peaks and total amplitude threshold, defined by the parameters event_npeak_min, event_npeak_max, and event_amp_tot_thr, respectively.

...

See also Examples for package pyimgalgos.

References

...