Background
Averaged background for 1000 events is obtained from:
psana -c ana-cxii0212/psana-cxii0212-r0091-bkgd-ave.cfg
where ana-cxii0212/psana-cxii0212-r0091-bkgd-ave.cfg
:
[psana] files = \ /reg/d/psdm/cxi/cxii0212/xtc/e165-r0091-s00-c00.xtc \ /reg/d/psdm/cxi/cxii0212/xtc/e165-r0091-s00-c01.xtc \ /reg/d/psdm/cxi/cxii0212/xtc/e165-r0091-s02-c00.xtc \ /reg/d/psdm/cxi/cxii0212/xtc/e165-r0091-s02-c01.xtc #skip-events = 100 events = 1000 modules = cspad_mod.CsPadCalib ImgAlgos.CSPadArrAverage [cspad_mod.CsPadCalib] inputKey = outputKey = calibrated doPedestals = yes doPixelStatus = no doCommonMode = yes [ImgAlgos.CSPadArrAverage] source = DetInfo(CxiDs1.0:Cspad.0) key = calibrated avefile = ana-cxii0212/cspad-cxii0212-r0091-background-ave.dat rmsfile = ana-cxii0212/cspad-cxii0212-r0091-background-rms.dat print_bits = 15
./PlotCSPadArrayFromFile.py ana-cxii0212/cspad-cxii0212-r0091-background-ave.dat -2 10
Permanent mask
./MakePixelMask.py ana-cxii0212/cspad-cxii0212-r0091-background-ave.dat 2 ana-cxii0212/cspad-cxii0212-r0091-mask-<type>.dat
... with minor edition of the MakePixelMask.py
we get masks:
ana-cxii0212/cspad-cxii0212-r0091-mask-bkgd.dat - for background with threshold 2
ana-cxii0212/cspad-cxii0212-r0091-mask-rects.dat - for rectangular regions
ana-cxii0212/cspad-cxii0212-r0091-mask-badregs.dat - for both, background and rectangular regions
./PlotCSPadArrayFromFile.py ana-cxii0212/cspad-cxii0212-r0091-mask-bkgd.dat -1 2
Running peak finder
psana -c ana-cxii0212/psana-cxii0212-r0091-peak-finder.cfg
where the ana-cxii0212/psana-cxii0212-r0091-peak-finder.cfg
:
[psana] files = \ /reg/d/psdm/cxi/cxii0212/xtc/e165-r0091-s00-c00.xtc \ /reg/d/psdm/cxi/cxii0212/xtc/e165-r0091-s00-c01.xtc \ /reg/d/psdm/cxi/cxii0212/xtc/e165-r0091-s02-c00.xtc \ /reg/d/psdm/cxi/cxii0212/xtc/e165-r0091-s02-c01.xtc modules = cspad_mod.CsPadCalib \ ImgAlgos.CSPadMaskApply \ ImgAlgos.CSPadArrPeakFinder \ PSXtcOutput.XtcOutputModule [cspad_mod.CsPadCalib] inputKey = outputKey = calibrated doPedestals = yes doPixelStatus = no doCommonMode = yes [ImgAlgos.CSPadMaskApply] source = DetInfo(CxiDs1.0:Cspad.0) inkey = calibrated outkey = masked_arr mask_fname = ana-cxii0212/cspad-cxii0212-r0091-mask-badregs.dat masked_amp = -1 print_bits = 5 mask_control_bits = 15 [ImgAlgos.CSPadArrPeakFinder] source = DetInfo(CxiDs1.0:Cspad.0) key = masked_arr key_peaks_out = peaks hot_pix_mask_inp_file = ana-cxii0212/cspad-cxii0212-r0091-noise-mask-ini.dat hot_pix_mask_out_file = ana-cxii0212/cspad-cxii0212-r0091-noise-mask-out.dat frac_noisy_evts_file = ana-cxii0212/cspad-cxii0212-r0091-noise-frac.dat evt_file_out = tmp/cspad-ev- rmin = 4 dr = 1 SoNThr_noise = 3 SoNThr_signal = 4 frac_noisy_imgs = 0.9 peak_npix_min = 4 peak_npix_max = 500 peak_amp_tot_thr = 0. peak_SoN_thr = 5. event_npeak_min = 3 event_npeak_max = 1000 event_amp_tot_thr = 0. nevents_mask_update = 0 nevents_mask_accum = 50 selection_mode = SELECTION_ON out_file_bits = 15 print_bits = 1601
Summary:
[info:ImgAlgos.CSPadArrPeakFinder] NFrames: 20808 NHits: 51 ( 0.25%) Time: 3783.226 sec ( 5.500 fps) [info:TimeInterval::stopTime] Time to process 20808 events is 3783.23 sec, or 0.181816 sec/event
Selected events:
tmp/cspad-ev-000306-r0091-2012-05-15-001110.941625287-peaks.txt tmp/cspad-ev-000553-r0091-2012-05-15-001135.646752814-peaks.txt tmp/cspad-ev-000823-r0091-2012-05-15-001202.650968368-peaks.txt tmp/cspad-ev-000930-r0091-2012-05-15-001213.354293959-peaks.txt tmp/cspad-ev-001047-r0091-2012-05-15-001225.058570990-peaks.txt tmp/cspad-ev-001418-r0091-2012-05-15-001302.172902215-peaks.txt tmp/cspad-ev-001509-r0091-2012-05-15-001311.276967953-peaks.txt tmp/cspad-ev-001575-r0091-2012-05-15-001317.879585151-peaks.txt tmp/cspad-ev-002286-r0091-2012-05-15-001429.008349593-peaks.txt tmp/cspad-ev-003655-r0091-2012-05-15-001645.931535488-peaks.txt tmp/cspad-ev-003960-r0091-2012-05-15-001716.436622269-peaks.txt tmp/cspad-ev-004211-r0091-2012-05-15-001741.541492733-peaks.txt tmp/cspad-ev-004430-r0091-2012-05-15-001803.446489292-peaks.txt tmp/cspad-ev-004553-r0091-2012-05-15-001815.751236420-peaks.txt tmp/cspad-ev-004632-r0091-2012-05-15-001823.655158305-peaks.txt tmp/cspad-ev-004716-r0091-2012-05-15-001832.059028739-peaks.txt tmp/cspad-ev-005157-r0091-2012-05-15-001916.170239065-peaks.txt tmp/cspad-ev-005175-r0091-2012-05-15-001917.970253957-peaks.txt tmp/cspad-ev-005439-r0091-2012-05-15-001944.371234637-peaks.txt tmp/cspad-ev-005993-r0091-2012-05-15-002039.782288895-peaks.txt tmp/cspad-ev-006135-r0091-2012-05-15-002053.983075762-peaks.txt tmp/cspad-ev-006371-r0091-2012-05-15-002117.585955573-peaks.txt tmp/cspad-ev-006500-r0091-2012-05-15-002130.487718090-peaks.txt tmp/cspad-ev-007162-r0091-2012-05-15-002236.691310584-peaks.txt tmp/cspad-ev-007391-r0091-2012-05-15-002259.591911945-peaks.txt tmp/cspad-ev-008005-r0091-2012-05-15-002400.999914990-peaks.txt tmp/cspad-ev-009016-r0091-2012-05-15-002542.118978291-peaks.txt tmp/cspad-ev-009369-r0091-2012-05-15-002617.427152390-peaks.txt tmp/cspad-ev-009609-r0091-2012-05-15-002641.436266699-peaks.txt tmp/cspad-ev-009947-r0091-2012-05-15-002715.245061266-peaks.txt tmp/cspad-ev-010340-r0091-2012-05-15-002754.545533496-peaks.txt tmp/cspad-ev-010864-r0091-2012-05-15-002846.944592637-peaks.txt tmp/cspad-ev-011354-r0091-2012-05-15-002935.944231879-peaks.txt tmp/cspad-ev-011973-r0091-2012-05-15-003037.838419852-peaks.txt tmp/cspad-ev-012442-r0091-2012-05-15-003124.744879854-peaks.txt tmp/cspad-ev-013186-r0091-2012-05-15-003239.162135169-peaks.txt tmp/cspad-ev-013633-r0091-2012-05-15-003323.893364840-peaks.txt tmp/cspad-ev-014558-r0091-2012-05-15-003456.420819224-peaks.txt tmp/cspad-ev-014637-r0091-2012-05-15-003504.320304670-peaks.txt tmp/cspad-ev-016357-r0091-2012-05-15-003756.320371180-peaks.txt tmp/cspad-ev-016787-r0091-2012-05-15-003839.310318768-peaks.txt tmp/cspad-ev-017064-r0091-2012-05-15-003907.007776135-peaks.txt tmp/cspad-ev-018088-r0091-2012-05-15-004049.424145753-peaks.txt tmp/cspad-ev-018322-r0091-2012-05-15-004112.826097523-peaks.txt tmp/cspad-ev-018352-r0091-2012-05-15-004115.826064756-peaks.txt tmp/cspad-ev-018360-r0091-2012-05-15-004116.626048661-peaks.txt tmp/cspad-ev-018434-r0091-2012-05-15-004124.026129375-peaks.txt tmp/cspad-ev-018501-r0091-2012-05-15-004130.726616425-peaks.txt tmp/cspad-ev-018838-r0091-2012-05-15-004204.431468969-peaks.txt tmp/cspad-ev-019839-r0091-2012-05-15-004344.830850260-peaks.txt tmp/cspad-ev-020027-r0091-2012-05-15-004403.635232348-peaks.txt