Content
Pre-processing
Dark run scan scan
Submit command
psana -c /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-xcsi0112-r0020-peds.cfg /reg/d/ana12/xcs/xcsi0112/xtc/e167-r0020-*.xtc
PSANA configuration script *peds.cfg
[psana] #files = /reg/d/ana12/xcs/xcsi0112/xtc/e167-r0020-*.xtc skip-events = 0 events = 75 modules = ImgAlgos.Tahometer ImgAlgos.PrincetonImageProducer ImgAlgos.ImgAverage [ImgAlgos.Tahometer] print_bits = 7 [ ImgAlgos.PrincetonImageProducer ] source = DetInfo(:Princeton) key_in = key_out = img print_bits = 1 [ImgAlgos.ImgAverage] source = DetInfo(:Princeton) key = img avefile = /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-xcsi0112-r0020-peds-ave.txt rmsfile = /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-xcsi0112-r0020-peds-rms.txt hotpix_mask = /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-xcsi0112-r0020-hotpix-mask-thr-10.0ADU.txt hotpix_thr_adu = 10.0 print_bits = 21
PSANA module ImgAlgos.PrincetonImageProducer
PSANA module ImgAlgos.ImgAverage
Data types:
- Input image may be : double, float, int, uint16_t, uint8_t
- Calculation: intensity in double, statistics in unsigned
- Save arrays in txt for
save2DArrayInFile<double> ( m_aveFile, m_ave, m_rows, m_cols, m_print_bits & 16 ); save2DArrayInFile<double> ( m_rmsFile, m_rms, m_rows, m_cols, m_print_bits & 16 ); if (m_do_mask) save2DArrayInFile<int> ( m_hotFile, m_hot, m_rows, m_cols, m_print_bits & 16 );
Averaging in ImgAlgos::ImgAverage::
template <typename T> void accumulateCorrelators(const T* data) { double amp(0); for (unsigned i=0; i<m_size; ++i) { amp = (double)data[i]; if ( m_gate_width > 0 && std::abs(amp-m_ave[i]) > m_gate_width ) continue; m_stat[i] ++; m_sum [i] += amp; m_sum2[i] += amp*amp; } }
Averaging in ImgAlgos::ImgAverage::procStatArrays()
for (unsigned i=0; i!=m_size; ++i) { double stat = m_stat[i]; if (stat > 0) { double ave = m_sum[i] / stat; m_ave[i] = ave; m_rms[i] = std::sqrt(m_sum2[i] / stat - ave*ave); } else { m_ave[i] = 0; m_rms[i] = 0; } }
Hot pixel mask in ImgAlgos::ImgAverage::procStatArrays()
if (m_do_mask) { for (unsigned i=0; i!=m_size; ++i) m_hot[i] = (m_rms[i] > m_hot_thr) ? 0 : 1; }
Data scan
Submit command
psana -c /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-xcsi0112-r0015-data-aver.cfg /reg/d/ana12/xcs/xcsi0112/xtc/e167-r0015-*.xtc
Saturated pixel mask
Time records
Intensity monitor records
Data processing
Split
Submit command
psana -c /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-cora-xcsi0112-r0015-split.cfg /reg/d/ana12/xcs/xcsi0112/xtc/e167-r0015-*.xtc
PSANA configuration script *split.cfg
[psana] # Command to run this script from release directory: # psana -c ImgAlgos/data/psana-split.cfg <path-to-xtc-file-name-pattern-for-one-run> #files = /reg/d/ana12/xcs/xcsi0112/xtc/e167-r0015-*.xtc skip-events = 0 events = 500 modules = ImgAlgos.Tahometer ImgAlgos.PrincetonImageProducer ImgAlgos.ImgCalib ImgAlgos.ImgIntMonCorr ImgAlgos.ImgIntForBins ImgAlgos.ImgVsTimeSplitInFiles [ImgAlgos.Tahometer] print_bits = 7 [ ImgAlgos.PrincetonImageProducer ] source = DetInfo(:Princeton) key_in = key_out = img print_bits = 1 [ImgAlgos.ImgCalib] source = DetInfo(:Princeton) key_in = img key_out = calibrated fname_peds = /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-xcsi0112-r0020-peds-ave.txt fname_bkgd = fname_gain = fname_mask = fname_rms = threshold_nrms = 0 do_threshold = true threshold = 20.0 below_thre_value = 0 print_bits = 5 [ImgAlgos.ImgIntMonCorr] source = DetInfo(:Princeton) key_in = calibrated key_out = imon_corrected fname_imon_cfg = /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-cora-xcsi0112-r0015-imon-cfg.txt print_bits = 1 [ImgAlgos.ImgIntForBins] source = DetInfo(:Princeton) key_in = imon_corrected fname_map_bins = /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-cora-r0015-map-static-q.txt fname_int_bins = /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-cora-r0015-int-static-q.txt number_of_bins = 1 print_bits = 33 [ImgAlgos.ImgVsTimeSplitInFiles] source = DetInfo(:Princeton) key = imon_corrected fname_prefix = /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-cora file_type = bin add_tstamp = false ampl_thr = 0 ampl_min = 0 nfiles_out = 8 print_bits = 29 #======EOF======
PSANA module ImgAlgos.ImgCalib
PSANA module ImgAlgos.ImgIntMonCorr
PSANA module ImgAlgos.ImgIntForBins
PSANA module ImgAlgos.ImgVsTimeSplitInFiles
Processing
Submit command
corana -f /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-cora-r0015-b0000.bin -t ./tau-list.txt
Module ImgAlgos.corana
Module ImgAlgos.CorAnaData.cpp
Module ImgAlgos.CorAna.cpp
Module ImgAlgos.CorAnaInputParameters
Merging
Submit command
corana_merge -f /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-cora-r0015-b0000-result.bin -t /reg/neh/home1/dubrovin/LCLS/PSANA-V01/work/t1-cora-r0015-tau.txt
Module ImgAlgos.corana_merge
PSANA module ImgAlgos.CorAnaMergeFiles
Presentation of results
<!--
Module ImgAlgos.
Summary
Overview
Content Tools