Large area pnCCD DAQ and Elictronics, Lothar Struder & Robert Hartmann
On 2014-01-27 Sebastian Carron kindly provide us with data files for pnCCD experiment amoa1214:
Psana::PNCCD::FramesV1
, ndarray<
const
T,3>, where shape=[4][512][512], T=uint16_t, int, float, double, int16_t
Performance: ~13 ms/event
Psana::PNCCD::FullFrameV1
or ndarray<const T,3>
or ndarray<
const
T,3>
source
and key
parameters ndarray<
const
T,2>, where shape=[1024+gap][1024], T= input type
Performance: ~30 ms/event (copy involves inverse iteration for 180 degree rotation of two bottom frames)
ImgAlgos.PnccdImageProducer - get Psana::PNCCD::FullFrameV1, put ndarray<const
uint16_t, 2>
ImgAlgos.NDArrAverage - averages ndarray<const
T, 2>, save in file
ImgAlgos.PnccdNDArrProducer - get Psana::PNCCD::FramesV1
, put ndarray<const
T, 3>
ImgAlgos.NDArrCalib - getinput (raw) ndarray<const
T, Ndim>, put calibrated ndarray<const
T, Ndim>
ImgAlgos.PnccdImageProducer - get ndarray<const
T,3>, put ndarray<const
T, 2>
ImgAlgos.NDArrAverage - averages ndarray<const
T, 2> or ndarray<const
T,3>, save in file
pnCCD image has intensity "strips" in both dimensions;
[4][512][512] array for single event and averaged over 1000 events:
At large number of events common mode should be averaged out. For 1000 events horizontal intensity "stripes" have gone.
This proves that common mode should be evaluated for horizontal stripes.
Midule description: Module ImgAlgos::NDArrCalib
[ImgAlgos.NDArrCalib] source = DetInfo(Camp.0:pnCCD.0) key_in = pnccd-ndarr key_out = calibrated do_peds = yes do_cmod = no do_stat = no do_mask = no do_bkgd = no do_gain = no do_nrms = no do_thre = yes fname_bkgd = fname_mask = masked_value = 0 threshold_nrms = 0 threshold = 100.0 below_thre_value = 50 bkgd_ind_min = 0 bkgd_ind_max = 1000 bkgd_ind_inc = 2 print_bits = 11 |
Dark run: exp=amoa1214:run=7, all plots are shown for Camp.0:pnCCD.0
event 5
pedestals
and pixel_rms
are generated by the calibman for arrays of shape=[4,512,512] using the same run.
All do_* = no
- that means no correction is applied
do_peds = yes
file with pedestals is loaded automatically from
/reg/d/psdm/AMO/amoa1214/calib/PNCCD::CalibV1/Camp.0:pnCCD.0/pedestals/1-end.data
do_peds = yes do_cmod = yes
files with pedestals and common_mode are loaded automatically from
/reg/d/psdm/AMO/amoa1214/calib/PNCCD::CalibV1/Camp.0:pnCCD.0/
pedestals
/1-end.data
/reg/d/psdm/AMO/amoa1214/calib/PNCCD::CalibV1/Camp.0:pnCCD.0/common_mode/1-end.data
where common mode parameters were set preliminary as:
echo "1 300 50 256 0.2" > /reg/d/psdm/AMO/amoa1214/calib/PNCCD::CalibV1/Camp.0:pnCCD.0/common_mode/1-end.data
Average over each consecutive group of 256 pixels
Common mode subtraction improves the width of intensity distribution.
do_stat = yes
masked_value=0
Calibration type: pixel_status (0-good, 1,2,4,...-bad)
File with pixel status mask was produced in Calibration Manager ROI Mask application
/reg/d/psdm/AMO/amoa1214/calib/PNCCD::CalibV1/Camp.0:pnCCD.0/
pixel_status
/7-7.data
Set bad pixels (1) in the half of frame[1]:
do_mask = yes
fname_mask = pnccd-test-mask.txt
masked_value=0
do_bkgd = yes
fname_bkgd = pnccd-test-mask.txt
For this test the file with pedestals is used:
do_gain = yes
file with gain factors is loaded automatically from
/reg/d/psdm/AMO/amoa1214/calib/PNCCD::CalibV1/Camp.0:pnCCD.0/pixel_gain/7-7.data
Fot this test all gains for [4,512,512] pixels were set to 0.5
do_nrms = yes
below_thre_value = 0
threshold_nrms = 0.5
file with rms values is loaded automatically from
/reg/d/psdm/AMO/amoa1214/calib/PNCCD::CalibV1/Camp.0:pnCCD.0/pixel_rms/1-end.data
do_thre = yes
below_thre_value = 0
threshold = 100
for types
Camp.0.pnCCD.0
Camp.0.pnCCD.1
echo "1 50 10 128 0.2" > /reg/d/psdm/AMO/amob3313/calib/PNCCD::CalibV1/Camp.0:pnCCD.0/common_mode/167-167.data
In dark run processing in Calibration Manager produces pedestals
and pixel_rms
. Then, if thresholds on rms and averaged intensity are set correctly, the pixel_status
can be also produced and deployed under the calib
directory. Calibration manager works with arrays of shape=[4,512,512]. Embedded ROI Mask Editor can be used to generate the ROI mask for pnCCD.
Run Calibration Manager from current release (for release version ≥ ana-0.10.12):
ssh -Y psana cd <your-favorite-NON-RELEASE-directory> sit_setup calibman |
If CalibManager or other packages were recently updated and these updates are wanted to be used:
ssh -Y psana cd <your-favorite-directory> newrel ana-current <release-directory> cd <release-directory> sit_setup addpkg CalibManager HEAD; addpkg <package-name-2> HEAD; addpkg <package-name-3> HEAD; ... scons; calibman |