Page History
...
Other event with better subtracted background:
Example for Module ImgAlgos::CSPadMaskApply
See Module ImgAlgos::CSPadMaskApply
The array for mask contains zeros and ones for masked and passed pixels, respectively, and has a shape of full-size CSPad array 4*8*185388.
For example, it can be generated by the command
Code Block |
---|
./MakePixelMask.py <input-background-cspad-arr-file-name> <threshold> <output-file-name>
|
for the averaged background amplitude array <input-background-cspad-arr-file-name>
abtained as a result of ImgAlgos::CSPadArrAverage
module.
Plots show the averaged background, and the mask arrays generated from this background for three thresholds 10, 20, and 30 EDU:
The best results in filtering can be achieved in combination of modiles:
Code Block |
---|
modules = cspad_mod.CsPadCalib \
ImgAlgos.CSPadBkgdSubtract \
ImgAlgos.CSPadMaskApply \
CSPadPixCoords.CSPadImageProducer \
ImgAlgos.ImgPixAmpFilter
[cspad_mod.CsPadCalib]
inputKey =
outputKey = calibrated_arr
doPedestals = yes
doPixelStatus = no
doCommonMode = no
[ImgAlgos.CSPadBkgdSubtract]
source = DetInfo(CxiDs1.0:Cspad.0)
inputKey = calibrated_arr
outputKey = bkgd_subtracted_arr
bkgd_fname = ana-cxi49012/cspad-cxi49012-r0025-background-ave.dat
norm_sector = 0
print_bits = 0
[ImgAlgos.CSPadMaskApply]
source = DetInfo(CxiDs1.0:Cspad.0)
inkey = bkgd_subtracted_arr
outkey = masked_arr
mask_fname = ana-cxi49012/cspad-cxi49012-r0025-mask-20.dat
masked_amp = -5
print_bits = 0
[CSPadPixCoords.CSPadImageProducer]
calibDir = /reg/d/psdm/CXI/cxi49012/calib
typeGroupName = CsPad::CalibV1
source = DetInfo(:Cspad.0)
#key = calibrated_arr
key = masked_arr
imgkey = masked_img
runNumber = 25
#filter = true
#tiltIsApplied = true
[ImgAlgos.ImgPixAmpFilter]
source = DetInfo(:Cspad.0)
key = masked_img
threshold = 200
numPixMin = 200
xmin = 630
xmax = 1070
ymin = 630
ymax = 1070
filterIsOn = true
print_bits = 11
|
where
cspad_mod.CsPadCalib
- subtracts the pedestals from raw CSPad data,ImgAlgos.CSPadBkgdSubtract
- subtracts the background,ImgAlgos.CSPadMaskApply
- apply the mask,CSPadPixCoords.CSPadImageProducer
- produces the CSPad image,ImgAlgos.ImgPixAmpFilter
- apply the image-based amplitude threshold filter.
In the test with images for background represented by the water and solvent rings this filter provides the background suppression factor about 100.
The background images that still pass this filter have significantly larger intensity with respect to averaged background:
Example for Module ImgAlgos::ImgRadialCorrection
See Module ImgAlgos::ImgRadialCorrection
...