Page History
...
- ImgIntForBins uses the
source
andkey_in
parameters to get the input image (asndarray<T,2>
object), where T stands for uint16_t, int, float, uint8_t, or double, - gets the pixel-bin indexes from files
fname_map_bins
, which has a size of image, - calculates average per pixel intensity for each of
number_of_bins
bin (from 0 tonumber_of_bins-1
), - saves the 2-D array of <I>(event, bin) in file
fname_int_bins
.
...
parameter | default value | description |
---|---|---|
|
...
"DetInfo(:Camera)" |
...
source of data |
...
|
...
| key for input image |
...
|
...
| input file name for map of bin indexes |
...
|
...
| output file name for intensity(bin,event) |
...
|
...
10 | number of bins for output intensities, if map has bins \>= |
...
|
...
0 | verbosity:
|
...
|
...
|
...
|
...
|
Module ImgAlgos::ImgRadialCorrection
This module averages the image pixel amplitude in r-phi bins, normalizes it per single pixel and subtracts the average amplitude from each pixel. Image is obtained from event by its source
and inkey
values. The output corrected image is saved in the event with outkey
keyword. Carthesian to polar coordinate transformation is done with respect to center coordinates xcenter
, ycenter
. The central region (r<rmin) and edges of the image (r>rmax) pixels can be removed from further consideration by setting rmin
and rmax
. The number of radial bins is defined as an int(rmax-rmin)
. The number of angular bins is set by n_phi_bins
.
Module configuration parameters:
...
parameter | default value | description |
---|---|---|
| "DetInfo()" |
...
input source of data |
...
|
...
| key for input data, by default use raw data |
...
|
...
"rad_corrected" |
...
output key for further image processing |
...
|
...
850 | x coordinate of the image center |
...
|
...
850 | y coordinate of the image center |
...
|
...
10 | radius minimal image is not processed for r<rmin |
...
|
...
1000 | radius maximal image is not processed for r>rmax |
...
|
...
12 | number of angular sectors for the background averaging |
...
|
...
0 | test event for print/save |
...
|
...
0 | module verbosity:
|
...
See also Example for Module ImgAlgos::ImgRadialCorrection.
...
The algorithm performance was tested for CSPad images. This algorithm consumes up to 15 ms/event on psana0205 for full CSPad (1650x1650) window size. For smaller window consumed time is negligible, comparing to the image reconstruction time, which is ~70 ms/event (for cspad_mod.CsPadCalib
and CSPadPixCoords::CSPadImageProducer
) on psana0205.Module configuration parameters:
parameter | default value | description |
---|---|---|
|
...
"DetInfo(:Cspad)" |
...
source of data |
...
|
...
"Image2D" |
...
key for input image data |
...
|
...
10 | minimal threshold on pixel amplitude |
...
|
...
100 | minimal number of pixels with amplitude above the threshold |
...
|
...
true | On/Off the filter |
...
|
...
0 | minimal column number |
...
|
...
100000 | maximal column number |
...
|
...
0 | minimal row number |
...
|
...
100000 | maximal row number |
...
|
...
0 | verbosity:
|
...
Remarks:
- The default
key
("Image2D") stands for theCSPadPixCoords::Image2D<double>
image object. Otherkey
names work for thendarray<double,2>
image object. - The
xmin
,xmax
,ymin
,ymax
(in pixels) defines the window in the image for pixel counting. Default values means the entire image range. - The
threshold
,numPixMin
, and the window extents have to be adjusted for particular experiment.
...
Code Block | ||
---|---|---|
| ||
struct Peak{ double x; double y; double ampmax; // amplitude in the peak maximum double amptot; // total amplitude in the range of {{peak_radius}} unsigned npix; // number of pixels in the range of {{peak_radius}} } ; |
Module configuration parameters:
...
parameter | default value | description |
---|---|---|
| "DetInfo()" |
...
source of data | |
|
...
| key for input image data | |
|
...
"peaks" |
...
key for output list of peaks | |
|
...
10 | low threshold on pixel amplitude | |
|
...
100 | high threshold on pixel amplitude | |
|
...
1.5 |
...
width of the Gaussian for smearing; =0-no smearing | |
|
...
3 | radius in pixel for smearing - radial size of matrix of weights | |
|
...
3 | radius in pixel for peak finding - radial size of the region to search for local maximum | |
|
...
0 | minimal column number | |
|
...
100000 | maximal column number | |
|
...
0 | minimal row number | |
|
...
100000 | maximal row number | |
|
...
0 | event number to save images and print info for test purpose | |
|
...
true | On/Off algorithm | |
|
...
0 | module verbosity:
|
...
Remarks:
- This algorithm consumes ~15 ms/event on psana0101 for full Opal1000 (1024x1024) camera image.
- Smearing algorithm use a "safety margin" which is currently set to 10 pixels (offset from each boarder of the full image size).
...