Page History
Include Page | ||||
---|---|---|---|---|
|
Table of Contents |
---|
Include Page | ||||
---|---|---|---|---|
|
About
This page provides examples for selected modules from psana - Module Catalog.
...
See Module CSPadPixCoords::CSPad2x2NDArrProducer
Example for module CSPadPixCoords::
...
CSPad2x2NDArrReshape
Example of the configuration script for psana (cspad2x2-test.cfg):configuration file
Code Block |
---|
Code Block | bgColor | #F7F7ED
[psana] files#files = exp=meca1113:run=376 #events = 10 ##skip-events = /reg/d/psdm/<instrument>/<experiment>/xtc/<file-name-1>.xtc events= 0 modules = cspad_mod.CsPadCalib \ = 5 modulesCSPadPixCoords.CSPad2x2NDArrProducer:clb \ = CSPadPixCoords.CSPad2x2ImageProducer ImgAlgos.ImgSaveInFile [CSPadPixCoords.CSPad2x2ImageProducer] sourceCSPad2x2NDArrProducer:raw \ = DetInfo(:Cspad2x2) inkeyCSPadPixCoords.CSPad2x2NDArrReshape \ =ImgAlgos.NDArrAverage:clb \ outimgkey = Image tiltIsAppliedImgAlgos.NDArrAverage:raw # = true print_bits = 15EventKeys [ImgAlgoscspad_mod.ImgSaveInFileCsPadCalib] sourceinputKey = DetInfo(:Cspad2x2) keyoutputKey = clb_data doPedestals = yes doPixelStatus = Imageyes fnamedoCommonMode = yes [CSPadPixCoords.CSPad2x2NDArrProducer:clb] source = cspad2x2 saveAllMecTargetChamber.0:Cspad2x2.1 inkey = trueclb_data #eventSaveoutkey = 5 |
...
cspad2x2 |
...
. |
...
Configuration file for cspad2x2 with pedestal subtraction
Note |
---|
Access to the CSPad2x2 aligned geometry is added on 2013-02-13 |
Example of <psana-config-file.cfg>:
Code Block | ||
---|---|---|
| ||
[psana] files = /reg/d/psdm/mec/mec73313/xtc/e268-r0180-s02-c00.xtc #calib-dir = ./calib modules = cspad_mod.CsPadCalib CSPadPixCoords.CSPad2x2ImageProducer ImgAlgos.ImgSaveInFile events 1_clb:as_data outtype = int16 print_bits = 5 [cspad_mod.CsPadCalibCSPadPixCoords.CSPad2x2NDArrProducer:raw] source = DetInfo(MecTargetChamber.0:Cspad2x2.3)1 inputKeyinkey = outputKeyoutkey = calibrated_arr doPedestalscspad2x2.1_raw:as_data outtype = yes doPixelStatus = noint16 doCommonModeprint_bits = no 5 [CSPadPixCoords.CSPad2x2ImageProducerCSPad2x2NDArrReshape] calibDirsource = = /reg/d/psdm/mec/mec73313/calib typeGroupNameMecTargetChamber.0:Cspad2x2.1 keys_in = CsPad2x2::CalibV1 #source cspad2x2.1_raw:as_data cspad2x2.1_clb:as_data print_bits = 255 [ImgAlgos.NDArrAverage:clb] source = DetInfo(MecTargetChamber.0:Cspad2x2.3)1 sourcekey = :Cspad2x2.3 inkey cspad2x2.1_clb avefile = calibrated_arr-ave-clb outimgkeyrmsfile = Image tiltIsApplied = truearr-rms-clb print_bits = 15255 [ImgAlgos.ImgSaveInFileNDArrAverage:raw] source = DetInfo(MecTargetChamber.0:Cspad2x2.3)1 key = Image fnamecspad2x2.1_raw avefile = cspad2x2.3 saveAllarr-ave-raw rmsfile = truearr-rms-raw print_bits = 3 #eventSave= 255 |
This script produces raw and calibrated ndarrays shaped as data (185,388,2), then pass these arrays as
keys_in
...
= cspad2x2.1_raw:as_data cspad2x2.1_clb:as_data
to the CSPadPixCoords.CSPad2x2NDArrReshape module, which produces two reshaped (2,185,388) arrays and saves them in the event store with default keys
cspad2x2.1_raw, cspad2x2.1_clb
(suffixes are dropped)
then both re-shaped arrays are averaged and saved in files on disk.
Example of associated python script:
Code Block |
---|
#!/usr/bin/env python
import sys
import numpy as np
import matplotlib.pyplot as plt
import psana
psana.setConfigFile('psana-meca1113-r0376-cspad2x2-CSPad2x2NDArrReshape.cfg')
dsname = 'exp=meca1113:run=376'
print "Data source: %s" % dsname
ds = psana.DataSource(dsname)
#------------------------------
print "Initializing Matplotlib Plotter"
fig = plt.figure(figsize=(10,5), dpi=80, facecolor='w', edgecolor='w', frameon=True)
plt.ion()
plt.show()
evnum = 0
evnum_max = 50
for evt in ds.events() :
evtid = evt.get(psana.EventId)
evnum += 1
if evnum > evnum_max : break
img_as_data = evt.get(psana.ndarray_int16_3, psana.Source('DetInfo(MecTargetChamber.0:Cspad2x2.1)'), 'cspad2x2.1_clb:as_data')
img_reshpd = evt.get(psana.ndarray_int16_3, psana.Source('DetInfo(MecTargetChamber.0:Cspad2x2.1)'), 'cspad2x2.1_clb')
print 'img_as_data.shape = ', img_as_data.shape
print 'img_reshpd.shape = ', img_reshpd.shape
img_as_data.shape = (2*185,388)
img_reshpd.shape = (2*185,388)
ax1 = fig.add_axes([0.05, 0.06, 0.44, 0.87])
ax2 = fig.add_axes([0.55, 0.06, 0.44, 0.87])
fig.canvas.set_window_title('Image from arrays "as-data" and "reshaped"')
imsh1 = ax1.imshow(img_as_data, interpolation='nearest', aspect='auto', origin='upper') # , extent=img_range)
imsh2 = ax2.imshow(img_reshpd, interpolation='nearest', aspect='auto', origin='upper') # , extent=img_range)
plt.title("Event: %d.%d" % evtid.time())
plt.draw()
plt.clf() |
This script retrieves from the event store calibrated ndarrays shaped as data (185,388,2) and re-shaped (2,185,388), then re-shape both to 2-d arrays (2*185,388) and plot them. Re-shaped array looks as recognizable (without spaces between ASICs) cspad2x2 image. Array shapes "as data" looks as an overlap of two images.
See Module CSPadPixCoords::CSPad2x2NDArrReshape
JIRA issue:
Jira | ||||
---|---|---|---|---|
|
Example for module CSPadPixCoords::CSPad2x2ImageProducer
See Module CSPadPixCoords::CSPad2x2ImageProducer
Example of the configuration script for psana (cspad2x2-test.cfg):
Code Block | ||
---|---|---|
| ||
[psana]
files = /reg/d/psdm/<instrument>/<experiment>/xtc/<file-name-1>.xtc
events = 5
modules = CSPadPixCoords.CSPad2x2ImageProducer ImgAlgos.ImgSaveInFile
[CSPadPixCoords.CSPad2x2ImageProducer |
Example of psana configuration file to get cspad2x2 images for two detectors and save them in files, one in txt, another in tiff formats:
Code Block | ||
---|---|---|
| ||
[psana] files = /reg/d/psdm/xpp/xpptut13/xtc/e308-r0008-s02-c00.xtc \ /reg/d/psdm/xpp/xpptut13/xtc/e308-r0008-s03-c00.xtc #modules = cspad_mod.CsPad2x2Pedestals #calib-dir = ./calib calib-dir = /reg/d/psdm/xpp/xpptut13/xtc/calib modules = cspad_mod.CsPadCalib:0 \ cspad_mod.CsPadCalib:1 \ CSPadPixCoords.CSPad2x2ImageProducer:0 \ CSPadPixCoords.CSPad2x2ImageProducer:1 \ ImgAlgos.ImgSaveInFile:0 \ ImgAlgos.ImgSaveInFile:1 events = 5 [cspad_mod.CsPadCalib:0] source = DetInfo(XppGon.0:Cspad2x2.0) inputKey = outputKey = calibrated_arr0 doPedestals = yes doPixelStatus = no doCommonMode = yes [cspad_mod.CsPadCalib:1] source = DetInfo(XppGon.0:Cspad2x2.1) inputKey = outputKey = calibrated_arr1 doPedestals = yes doPixelStatus = no doCommonMode = yes [CSPadPixCoords.CSPad2x2ImageProducer:0] calibDir = /reg/d/psdm/xpp/xpptut13/xtc/calib typeGroupName = CsPad2x2::CalibV1 source = DetInfo(XppGon.0:Cspad2x2.0) inkey = calibrated_arr0 outimgkey = Image tiltIsApplied = false useWidePixCenter = false print_bits = 15 [CSPadPixCoords.CSPad2x2ImageProducer:1] calibDir = /reg/d/psdm/xpp/xpptut13/xtc/calib typeGroupName = CsPad2x2::CalibV1 source = DetInfo(XppGon.0:Cspad2x2.1) inkey = calibrated_arr1 outimgkey = Image tiltIsApplied = false useWidePixCenter = false print_bits = 15 [ImgAlgos.ImgSaveInFile:0] source = DetInfo(:Cspad2x2.0) keyinkey = Image fname outimgkey = cspad2x2.0 ftype = txt #ftype = tiff saveAll = Image tiltIsApplied = true print_bits = 3 #eventSave = 5 15 [ImgAlgos.ImgSaveInFile:1] source = DetInfo(:Cspad2x2.1) key = Image fname = cspad2x2.1 #ftypesaveAll = true #eventSave = txt ftype = 5 |
Command to run:
psana -c cspad2x2-test.cfg
One of the saved files cspad2x2-<run>-<timestamp>.txt
is plotted as an image by the command
./PlotCameraImageFromFile.py cspad2x2-<run>-<timestamp>.txt 0 1200
Configuration file for cspad2x2 with pedestal subtraction
Note |
---|
Access to the CSPad2x2 aligned geometry is added on 2013-02-13 |
Example of <psana-config-file.cfg>:
Code Block | ||
---|---|---|
| ||
[psana] files = = tiff saveAll /reg/d/psdm/mec/mec73313/xtc/e268-r0180-s02-c00.xtc #calib-dir = ./calib modules = cspad_mod.CsPadCalib CSPadPixCoords.CSPad2x2ImageProducer ImgAlgos.ImgSaveInFile events = true5 print_bits [cspad_mod.CsPadCalib] source = DetInfo(MecTargetChamber.0:Cspad2x2.3) #eventSaveinputKey = 5 |
Example for package ImgPixSpectra
Modules:
- ImgPixSpectra::CSPadPixSpectra
- ImgPixSpectra::CSPad2x2PixSpectra
- ImgPixSpectra::CameraPixSpectra
Example for module ImgPixSpectra::CSPadPixSpectra
See module description in Module ImgPixSpectra::CSPadPixSpectra
Configuration file psana-cxib2313-r0114-cspad-pix-spectra.cfg
:
Code Block | ||
---|---|---|
| ||
# Command to run this script: # psana -c psana-cxib2313-r0114-cspad-pix-spectra.cfg # # Other useful commands: # psana -n 5 -m PrintSeparator,PrintEventId,psana_examples.DumpCsPad outputKey = calibrated_arr doPedestals = yes doPixelStatus = no doCommonMode = no [CSPadPixCoords.CSPad2x2ImageProducer] calibDir = /reg/d/psdm/cximec/cxib2313/xtc/e336-r0114* # psana -n 5 -m EventKeys exp=cxib2313:run=114:xtc [psana] filesmec73313/calib typeGroupName = CsPad2x2::CalibV1 #source = exp=cxib2313:run=114:xtc #calib-dir = ./calib skip-events = 0 eventsDetInfo(MecTargetChamber.0:Cspad2x2.3) source = 100 modules = cspad_mod.CsPadCalib ImgPixSpectra.CSPadPixSpectra [cspad_mod.CsPadCalib] source:Cspad2x2.3 inkey = DetInfo(CxiDs1.0:Cspad.0) inputKeycalibrated_arr outimgkey = Image outputKey tiltIsApplied = calibratedtrue doPedestalsprint_bits = yes doPixelStatus = no doCommonMode = yes15 [ImgPixSpectraImgAlgos.CSPadPixSpectraImgSaveInFile] source = CxiDs1DetInfo(MecTargetChamber.0:CspadCspad2x2.0 inputKey3) key = calibratedImage aminfname = -20cspad2x2.3 amaxsaveAll = 20. nbins true print_bits = 10 arr_fname3 #eventSave = cspad_spectral_array.txt |
where module cspad_mod.CsPadCalib
subtracts pedestals, apply common mode correction, and save CSPAD array in the event store with key "calibrated", which is used in the next module ImgPixSpectra.CSPadPixSpectra
.
To run this script use command
psana -c psana-cxib2313-r0114-cspad-pix-spectra.cfg
which produces two files:
...
5
|
Example of psana configuration file to get cspad2x2 images for two detectors and save them in files, one in txt, another in tiff formats
...
:
Code Block | |
---|---|
|
...
| |
[psana] files |
...
Plot for content of the file cspad_spectral_array.txt
:
Example for module ImgPixSpectra::CSPad2x2PixSpectra
See module description in Module ImgPixSpectra::CSPad2x2PixSpectra
Configuration file example for CSPad2x2PixSpectra
:
Code Block | ||
---|---|---|
| ||
[psana] files = /reg/d/psdm/xpp/xpptut13/xtc/e308-r0008-s02-c00.xtc \ = /reg/d/psdm/<instrument>xpp/xpptut13/<experiment>/<file-name>xtc/e308-r0008-s03-c00.xtc modules = ImgPixSpectra.CSPad2x2PixSpectra [ImgPixSpectra.CSPad2x2PixSpectra] source = CxiSc1.0:Cspad2x2.0 amin #modules = cspad_mod.CsPad2x2Pedestals #calib-dir = ./calib calib-dir = /reg/d/psdm/xpp/xpptut13/xtc/calib modules = cspad_mod.CsPadCalib:0 \ = 500. amax cspad_mod.CsPadCalib:1 \ = 1000CSPadPixCoords.CSPad2x2ImageProducer:0 \ nbins = CSPadPixCoords.CSPad2x2ImageProducer:1 \ 100 arr_fname = cspad2x2-pix-spectra.txt |
To get images from saved file one may execute the auxiliary script:
Code Block | ||
---|---|---|
| ||
ImgPixSpectra/data/PlotSpectralArrayFromFile.py cspad2x2-pix-spectra.txt
|
generates image for limited range of pixels for CSPad, CSPad2x2, or Camera, respectively:
Examples for package ImgAlgos
See Package ImgAlgos
Example for module ImgAlgos::Tahometer
See Module ImgAlgos::Tahometer
Example of the psana configuration file:
Code Block | ||
---|---|---|
| ||
[psana]ImgAlgos.ImgSaveInFile:0 \ filesImgAlgos.ImgSaveInFile:1 events = 5 [cspad_mod.CsPadCalib:0] source = /reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-1>.xtc\ = DetInfo(XppGon.0:Cspad2x2.0) inputKey = outputKey = calibrated_arr0 doPedestals /reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-2>.xtc modules = ImgAlgos.Tahometer [ImgAlgos.Tahometer] dn= yes doPixelStatus = no doCommonMode = yes [cspad_mod.CsPadCalib:1] source = 10 print_bits = 7 |
Example for module ImgAlgos::EpixNDArrProducer
See Module ImgAlgos::EpixNDArrProducer
Example of the psana configuration file:
Code Block |
---|
[psana] files DetInfo(XppGon.0:Cspad2x2.1) inputKey = outputKey = exp=xppi0414:run=94 eventscalibrated_arr1 doPedestals = yes doPixelStatus = no doCommonMode = 100 modulesyes [CSPadPixCoords.CSPad2x2ImageProducer:0] calibDir = ImgAlgos.EpixNDArrProducer \ /reg/d/psdm/xpp/xpptut13/xtc/calib typeGroupName = CsPad2x2::CalibV1 source ImgAlgos.NDArrAverage [ImgAlgos.EpixNDArrProducer] source = DetInfo(:Epix10k) key_in = key_out = epix-nda outtype = floatXppGon.0:Cspad2x2.0) inkey = calibrated_arr0 outimgkey = Image tiltIsApplied = false useWidePixCenter = false print_bits = 25515 [ImgAlgosCSPadPixCoords.NDArrAverage] sourceCSPad2x2ImageProducer:1] calibDir = /reg/d/psdm/xpp/xpptut13/xtc/calib typeGroupName = CsPad2x2::CalibV1 source = DetInfo(:Epix10kXppGon.0:Cspad2x2.1) keyinkey = epix-nda avefilecalibrated_arr1 outimgkey = epix-ave printImage tiltIsApplied = false useWidePixCenter = false print_bits = 29 |
EpixNDArrProducer
gets Epix10k ndarray from data and saves it in the events store with possible type conversion. Then NDArrAverage
averages this ndarray over requested number of events (100) and saves it in file.
Example for module ImgAlgos::PnccdImageProducer
See Module ImgAlgos::PnccdImageProducer
Example of the psana configuration file:
Code Block | ||
---|---|---|
| ||
[psana] = 15 [ImgAlgos.ImgSaveInFile:0] source = DetInfo(:Cspad2x2.0) key = Image fname = cspad2x2.0 ftype = txt #ftype = tiff saveAll files = true print_bits = /reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-1>.xtc\ 3 #eventSave = 5 [ImgAlgos.ImgSaveInFile:1] source /reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-2>.xtc #skip-events = 100 events = 5 modules = ImgAlgos.PnccdImageProducer ImgAlgos.ImgSaveInFile [ImgAlgos.PnccdImageProducer] source = DetInfo(:pnCCD) inkey = DetInfo(:Cspad2x2.1) key = outimgkey = imgpnccdImage print_bitsfname = 1 [ImgAlgos.ImgSaveInFile] source = DetInfo(:pnCCD) key cspad2x2.1 #ftype = imgpnccdtxt fnameftype = pnccd-img-evtiff saveAll = true #eventSaveprint_bits = 82 print_bits3 #eventSave = 1 |
This script saves text files with images like pnccd-img-ev-<run-date-time.nsec>.txt
, which can be presented as:
Advanced example for PnccdImageProducer;
- get pnccd ndarray from data,
- calibrate ndarray (subtract pedestals, common mode, remove pixels with bad status),
- produce image with two gaps from calibrated ndarray,
- average image for 10 events:
5
|
Example for package ImgPixSpectra
Modules:
- ImgPixSpectra::CSPadPixSpectra
- ImgPixSpectra::CSPad2x2PixSpectra
- ImgPixSpectra::CameraPixSpectra
Example for module ImgPixSpectra::CSPadPixSpectra
See module description in Module ImgPixSpectra::CSPadPixSpectra
Configuration file psana-cxib2313-r0114-cspad-pix-spectra.cfg
:
Code Block | ||
---|---|---|
| ||
# Command to run this script:
# psana -c psana-cxib2313-r0114-cspad-pix-spectra.cfg
#
# Other useful commands:
# psana -n 5 -m PrintSeparator,PrintEventId,psana_examples.DumpCsPad /reg/d/psdm/cxi/cxib2313/xtc/e336-r0114*
# psana -n 5 -m EventKeys exp=cxib2313:run=114:xtc
[psana]
files = exp=cxib2313:run=114:xtc
#calib-dir = ./calib
skip-events = 0
events | ||
Code Block | ||
[psana] = 100 modules = cspad_mod.CsPadCalib ImgPixSpectra.CSPadPixSpectra [cspad_mod.CsPadCalib] source = DetInfo(CxiDs1.0:Cspad.0) inputKey = #calib-diroutputKey = /reg/d/psdm/SXR/sxrb5914/calib filescalibrated doPedestals = exp=sxrb5914:run=245 eventsyes doPixelStatus = 10no modulesdoCommonMode = ImgAlgos.Tahometer \ yes [ImgPixSpectra.CSPadPixSpectra] source ImgAlgos.PnccdNDArrProducer \ = CxiDs1.0:Cspad.0 inputKey = calibrated amin ImgAlgos.NDArrCalib \ = -20. amax ImgAlgos.PnccdImageProducer \ = ImgAlgos20.NDArrAverage [ImgAlgos.Tahometer] dn nbins = 100 print_bits = 7 [ImgAlgos.PnccdNDArrProducer] source = DetInfo(Camp.0:pnCCD.1) key_in = key_out = pnccd-ndarr outtype = asdata print_bits = 0 [ImgAlgos.NDArrCalib] source = DetInfo(Camp.0:pnCCD.1) key_in = pnccd-ndarr key_out = calibrated do_peds = yes do_cmod = yes do_stat = yes do_mask = no do_bkgd = no do_gain = no do_nrms = no do_thre = no #fname_mask = pnccd-test-mask.txt #fname_bkgd = pnccd-test-bkgd.txt masked_value = 0 threshold_nrms = 4.0 threshold 10 arr_fname = cspad_spectral_array.txt |
where module cspad_mod.CsPadCalib
subtracts pedestals, apply common mode correction, and save CSPAD array in the event store with key "calibrated", which is used in the next module ImgPixSpectra.CSPadPixSpectra
.
To run this script use command
psana -c psana-cxib2313-r0114-cspad-pix-spectra.cfg
which produces two files:
cspad_spectral_array.txt
– array of 10-bin amplitude spectra for all pixelscspad_spectral_array.txt.sha
– file with metadata for array shape:Code Block bgColor #AAFFFF NPIXELS 2296960 NBINS 10 AMIN -20 AMAX 20 NEVENTS 100 ARRFNAME cspad_spectral_array.txt
Plot for content of the file cspad_spectral_array.txt
:
Example for module ImgPixSpectra::CSPad2x2PixSpectra
See module description in Module ImgPixSpectra::CSPad2x2PixSpectra
Configuration file example for CSPad2x2PixSpectra
:
Code Block | ||
---|---|---|
| ||
[psana] files = /reg/d/psdm/<instrument>/<experiment>/<file-name>.xtc modules = 100 below_thre_value = 0 bkgd_ind_min = 10000 bkgd_ind_max = 10200 bkgd_ind_inc = 1 print_bits = 1 [ImgAlgos.PnccdImageProducer= ImgPixSpectra.CSPad2x2PixSpectra [ImgPixSpectra.CSPad2x2PixSpectra] source = DetInfo(CampCxiSc1.0:pnCCDCspad2x2.1)0 inkeyamin = calibrated outimgkey 500. amax = pnccd-img gap_rows = 0 gap_cols 1000. nbins = 16 gap_value = = 0100 printarr_bitsfname = 1 [ImgAlgos.NDArrAverage] sourcecspad2x2-pix-spectra.txt |
To get images from saved file one may execute the auxiliary script:
Code Block | ||
---|---|---|
| ||
ImgPixSpectra/data/PlotSpectralArrayFromFile.py cspad2x2-pix-spectra.txt
|
generates image for limited range of pixels for CSPad, CSPad2x2, or Camera, respectively:
Examples for package ImgAlgos
See Package ImgAlgos
Example for module ImgAlgos::Tahometer
See Module ImgAlgos::Tahometer
Example of the psana configuration file:
Code Block | ||
---|---|---|
| ||
[psana] = DetInfo(Camp.0:pnCCD.1) key files = pnccd-img avefile/reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-1>.xtc\ = pnccd-ave rmsfile = pnccd-rms #maskfile /reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-2>.xtc modules = pnccd-msk #hotpixfile = pnccd-hot thr_rms_ADU = 160 thr_min_ADU = 2 thr_max_ADUImgAlgos.Tahometer [ImgAlgos.Tahometer] dn = 1000010 print_bits = 29 |
...
7
|
Example for module ImgAlgos::
...
EpixNDArrProducer
See Module ImgAlgos::CameraImageProducerEpixNDArrProducer
Example of the psana configuration file:
Code Block | ||
---|---|---|
| ||
[psana] files = exp=xppi0414:run=94 events = 100 modules = ImgAlgos.EpixNDArrProducer \ ImgAlgos.NDArrAverage [ImgAlgos.EpixNDArrProducer] source = DetInfo(:Epix10k) key_in = key_out = epix-nda outtype = float print_bits = 255 [ImgAlgos.NDArrAverage] source files = DetInfo(:Epix10k) key = /reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-1>.xtc modules epix-nda avefile = ImgAlgos.CameraImageProducer ImgAlgos.ImgSaveInFile events epix-ave print_bits = 29 |
EpixNDArrProducer
gets Epix10k ndarray from data and saves it in the events store with possible type conversion. Then NDArrAverage
averages this ndarray over requested number of events (100) and saves it in file.
Example for module ImgAlgos::PnccdImageProducer
See Module ImgAlgos::PnccdImageProducer
Example of the psana configuration file:
Code Block | ||
---|---|---|
| ||
[psana] = 5 [ImgAlgos.CameraImageProducer] source = DetInfo(:Opal1000) key_in = key_out = img subtract_offset = true print_bits = 15 [ImgAlgos.ImgSaveInFile] source = DetInfo(:Opal1000) key = img fnamefiles = img-from-my-experiment saveAll/reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-1>.xtc\ = true #eventSave = 1 |
This script saves text files with images like img-from-my-experiment-<run-date-time.nsec>.txt
, which can be drawn by the python script
./ImgAlgos/data/PlotCameraImageFromFile.py <filename>.txt <Amin> <Amax>
Example for module ImgAlgos::PrincetonImageProducer
See Module ImgAlgos::PrincetonImageProducer
Example of the psana configuration file:
Code Block | ||
---|---|---|
| ||
[psana] /reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-2>.xtc #skip-events = 100 events = 5 modules = ImgAlgos.PnccdImageProducer ImgAlgos.ImgSaveInFile [ImgAlgos.PnccdImageProducer] source = DetInfo(:pnCCD) inkey = outimgkey = imgpnccd print_bits = 1 [ImgAlgos.ImgSaveInFile] source = DetInfo(:pnCCD) key = imgpnccd filesfname = /reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-1>.xtc\ pnccd-img-ev saveAll = true #eventSave = 82 print_bits /reg= 1 |
This script saves text files with images like pnccd-img-ev-<run-date-time.nsec>.txt
, which can be presented as:
Advanced example for PnccdImageProducer;
- get pnccd ndarray from data,
- calibrate ndarray (subtract pedestals, common mode, remove pixels with bad status),
- produce image with two gaps from calibrated ndarray,
- average image for 10 events:
Code Block |
---|
[psana]/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-2>.xtc modules = ImgAlgos.PrincetonImageProducer \ ImgAlgos.ImgSaveInFile events = 3 [ImgAlgos.PrincetonImageProducer] source = DetInfo(:Princeton) key_in = key_out #calib-dir = /reg/d/psdm/SXR/sxrb5914/calib files = exp=sxrb5914:run=245 events = img subtract_offset10 modules = true print_bitsImgAlgos.Tahometer \ = 31 [ImgAlgos.ImgSaveInFile] sourcePnccdNDArrProducer \ = DetInfo(:Princeton) keyImgAlgos.NDArrCalib \ = img fnameImgAlgos.PnccdImageProducer \ = img-xcs saveAll ImgAlgos.NDArrAverage [ImgAlgos.Tahometer] dn = true100 print_bits = 31 |
...
Example for module ImgAlgos::AcqirisArrProducer
See description of parameters in Module ImgAlgos::AcqirisArrProducer
Example of the psana configuration file psana-amo01509-r0125-acqiris.cfg
:
Code Block | ||
---|---|---|
| ||
# Command to run this script: # psana -c psana-amo01509-r0125-acqiris.cfg; # # Useful commands: # psana -n 5 -m EventKeys exp=amo01509:run=125:xtc > test-acqiris-file.txt; # psana -n 5 -m psana_examples.DumpAcqiris exp=amo01509:run=125:xtc > test-acqiris-file.txt; (C++ version) # psana -n 1 -m psana_examples.dump_acqiris exp=amo01509:run=125:xtc > test-acqiris-file.txt; (python version) [psana] #files = /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s00-c00.xtc /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s01-c00.xtc files = exp=amo01509:run=125:xtc modules = ImgAlgos.AcqirisArrProducer ImgAlgos.ImgSaveInFile:wf ImgAlgos.ImgSaveInFile:wt skip-events = 0 events = 100 [ImgAlgos.AcqirisArrProducer] source7 [ImgAlgos.PnccdNDArrProducer] source = DetInfo(Camp.0:pnCCD.1) key_in = key_out = pnccd-ndarr outtype = asdata print_bits = 0 [ImgAlgos.NDArrCalib] source = DetInfo(Camp.0:pnCCD.1) key_in = pnccd-ndarr key_out = calibrated do_peds = yes do_cmod = yes do_stat = yes do_mask = no do_bkgd = no do_gain = no do_nrms = no do_thre = no #fname_mask = pnccd-test-mask.txt #fname_bkgd = pnccd-test-bkgd.txt masked_value = 0 threshold_nrms = 4.0 threshold = AmoETOF.0:Acqiris.0 key_in 100 below_thre_value = 0 bkgd_ind_min = 10000 keybkgd_ind_wformmax = acqiris_wform key_wtime10200 bkgd_ind_inc = acqiris_wtime fname_prefix = acq1 print_bits = 111 [ImgAlgos.ImgSaveInFile:wfPnccdImageProducer] source = AmoETOFDetInfo(Camp.0:AcqirispnCCD.0 key 1) inkey = acqiris_wform fname calibrated outimgkey = acqpnccd-AmoETOF-wform ftype img gap_rows = txt #ftype 0 gap_cols = tiff #saveAll 16 gap_value = true0 print_bits = 3 eventSave = 51 [ImgAlgos.ImgSaveInFile:wtNDArrAverage] source = AmoETOFDetInfo(Camp.0:AcqirispnCCD.01) key = acqiris_wtime fname pnccd-img avefile = acqpnccd-AmoETOF-wtime ftypeave rmsfile = pnccd-rms #maskfile = txtpnccd-msk #ftype#hotpixfile = pnccd-hot thr_rms_ADU = 160 thr_min_ADU = tiff #saveAll 2 thr_max_ADU = true10000 print_bits = 3 eventSave = 5 |
This script with psana does a few things:
- module AcqirisArrProducer gets Acqiris data objects from event store, adjusts trigger time corrections, and saves them back in the event store as uniform ndarrays<double,2> objects for waveforms and times
- two instances of the module ImgSaveInFile save arrays of waveforms and wave-times for locally counted event 5.
This script saves 3 text files:
acq-amo01509-r0125.txt
-- with configuration parameters:Code Block Acqiris::ConfigV1: nbrBanks=1 channelMask=69905 nbrChannels=5 nbrConvertersPerChannel=4 horiz: sampInterval=2.5e-10 delayTime=0 nbrSegments=1 nbrSamples=10000 vert(0): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(1): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(2): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(3): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(4): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0
- acq-AmoETOF-wform-r0125-20091018-182512.194787218.txt – with waveforms for 5th event
- acq-AmoETOF-wtime-r0125-20091018-182512.194787218.txt – with wave-times for 5th event
Arrays from these files can be plotted for all channels, shown by different colors:
...
29 |
Example for module ImgAlgos::CameraImageProducer
See Module ImgAlgos::CameraImageProducer
Example of the psana configuration file:
Code Block | ||
---|---|---|
| ||
[psana]
files = /reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-1>.xtc
modules = ImgAlgos.CameraImageProducer ImgAlgos.ImgSaveInFile
events = 5
[ImgAlgos.CameraImageProducer]
source = DetInfo(:Opal1000)
key_in =
key_out = img
subtract_offset = true
print_bits = 15
[ImgAlgos.ImgSaveInFile]
source = DetInfo(:Opal1000)
key |
...
Example for module ImgAlgos::AcqirisAverage
See description of parameters in Module ImgAlgos::AcqirisAverage
Configuration file psana-amo01509-r0125-acqiris-average.cfg:
Code Block | ||
---|---|---|
| ||
# Command to run this script: # psana -c psana-amo01509-r0125-acqiris-average.cfg; # # Useful commands: # psana -n 5 -m EventKeys exp=amo01509:run=125:xtc > test-acqiris-file.txt; # psana -n 5 -m psana_examples.DumpAcqiris exp=amo01509:run=125:xtc > test-acqiris-file.txt; (C++ version) # psana -n 1 -m psana_examples.dump_acqiris exp=amo01509:run=125:xtc > test-acqiris-file.txt; (python version) [psana] #files = /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s00-c00.xtc /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s01-c00.xtc files = exp=amo01509:run=125:xtc modules = ImgAlgos.AcqirisArrProducer ImgAlgos.AcqirisAverage skip-events = 0 events = 1000 [ImgAlgos.AcqirisArrProducer] sourceimg fname = AmoETOF.0:Acqiris.0 key_in = key_wform = acqiris_wform key_wtime= img-from-my-experiment saveAll = acqiris_wtime fname_prefix = acq print_bitstrue #eventSave = 3 [ImgAlgos.AcqirisAverage] source1 |
This script saves text files with images like img-from-my-experiment-<run-date-time.nsec>.txt
, which can be drawn by the python script
./ImgAlgos/data/PlotCameraImageFromFile.py <filename>.txt <Amin> <Amax>
Example for module ImgAlgos::PrincetonImageProducer
See Module ImgAlgos::PrincetonImageProducer
Example of the psana configuration file:
Code Block | ||
---|---|---|
| ||
[psana] = AmoETOF.0:Acqiris.0 key_in = acqiris_wform key_ave = acqiris_average fname_ave_prefix = acq thresholds files = -0.005 -0.005 -0.005 -0.005 -0.005 is_positive_signal = no do_inverse_selection = yes #skip_events/reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-1>.xtc\ = 0 #proc_events = 100 print_bits /reg/d/psdm/<INSTRUMENT>/<experiment>/xtc/<file-name-2>.xtc modules = ImgAlgos.PrincetonImageProducer \ = 255 |
Psana with this script runs over 1000 events apply threshold-based selection algorithm and produces files:
acq-amo01509-r0125-config.txt -- with Acqiris configuration parameters:
...
|
...
|
...
ImgAlgos.ImgSaveInFile
events = 3
[ImgAlgos.PrincetonImageProducer]
source = DetInfo(:Princeton)
key_in =
key_out = img
subtract_offset = true
print_bits = 31
[ImgAlgos.ImgSaveInFile]
source = DetInfo(:Princeton)
key = img
fname = img-xcs
saveAll = true
print_bits = 31
|
Anchor | ||||
---|---|---|---|---|
|
...
Anchor | ||
---|---|---|
|
Example for module ImgAlgos::
...
AcqirisArrProducer
See description of parameters in Module ImgAlgos::AcqirisCalibAcqirisArrProducer
Example of the psana configuration Configuration file psana-amo01509-r0125-acqiris-calib.cfg
:
Code Block | ||
---|---|---|
| ||
# Command to run this script: # psana -c psana-amo01509-r0125-acqiris-calib.cfg; # # Useful commands: # psana -n 5 -m EventKeys exp=amo01509:run=125:xtc > test-acqiris-file.txt; # psana -n 5 -m psana_examples.DumpAcqiris exp=amo01509:run=125:xtc > test-acqiris-file.txt; (C++ version) # psana -n 1 -m psana_examples.dump_acqiris exp=amo01509:run=125:xtc > test-acqiris-file.txt; (python version) [psana] #files = /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s00-c00.xtc /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s01-c00.xtc files = exp=amo01509:run=125:xtc modules = ImgAlgos.AcqirisArrProducer ImgAlgos.AcqirisCalib ImgAlgos.ImgSaveInFile:wf_raw ImgAlgos.ImgSaveInFile:wf_calibwt skip-events = 0 events = 10100 [ImgAlgos.AcqirisArrProducer] source = AmoETOF.0:Acqiris.0 key_in = key_wform = acqiris_wform key_wtime = acqiris_wtime fname_prefix = acq print_bits = 111 [ImgAlgos.AcqirisCalibImgSaveInFile:wf] source = AmoETOF.0:Acqiris.0 key_in = acqiris_wform key_outfname = acq-AmoETOF-wform ftype = wf-calibrated fname_base_line = acq-amo01509-r0125-ave-wfs.txt #skip_events#ftype = 0 #proc_events tiff #saveAll = 100true print_bits = 3 eventSave = 2555 [ImgAlgos.ImgSaveInFile:wf_rawwt] source = AmoETOF.0:Acqiris.0 key = acqiris_wformwtime fname = acq-AmoETOF-wform-rawwtime ftype = txt #ftype = tiff #saveAll = true print_bits = 3 eventSave = 5 [ImgAlgos.ImgSaveInFile:wf_calib] source = AmoETOF.0:Acqiris.0 key = wf-calibrated fname = acq-AmoETOF-wform-calibrated ftype = txt #ftype = tiff #saveAll = true print_bits = 3 eventSave = 5 |
In this script the base-line level for all waveforms is loaded from file and is subtracted in module ImgAlgos.AcqirisCalib.
For example, the raw and calibrated waveforms for event 5 were saved in the files:
...
This script with psana does a few things:
- module AcqirisArrProducer gets Acqiris data objects from event store, adjusts trigger time corrections, and saves them back in the event store as uniform ndarrays<double,2> objects for waveforms and times
- two instances of the module ImgSaveInFile save arrays of waveforms and wave-times for locally counted event 5.
This script saves 3 text files:
acq-amo01509-r0125.txt
-- with configuration parameters:Code Block Acqiris::ConfigV1: nbrBanks=1 channelMask=69905 nbrChannels=5 nbrConvertersPerChannel=4 horiz: sampInterval=2.5e-10 delayTime=0 nbrSegments=1 nbrSamples=10000 vert(0): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(1): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(2): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(3): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(4): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0
- acq-AmoETOF-wform-r0125-20091018-182512.194787218.txt – with waveforms for 5th event
- acq-AmoETOF-
...
- wtime-
...
- r0125
...
- -20091018-182512.194787218.txt
...
- – with wave-times for 5th event
Arrays from these files can be plotted for all channels, shown by different colors:
Anchor | ||||
---|---|---|---|---|
|
which content is presented on plots:
Anchor | ||
---|---|---|
|
Example for module ImgAlgos::
...
AcqirisAverage
See description of parameters in in Module ImgAlgos::AcqirisCFDAcqirisAverage
Configuration file psana_cfdfile psana-amo01509-r0125-acqiris-average.cfg:
Code Block | ||
---|---|---|
| ||
# Command to run this script: # psana -c psana_cfd-amo01509-r0125-acqiris-average.cfg; # [psana] modules = ImgAlgos.AcqirisArrProducer ImgAlgos.AcqirisCalib ImgAlgos.AcqirisCFD files = /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s00-c00.xtc [ImgAlgos.AcqirisArrProducer] source = AmoETOF.0:Acqiris.0 key_in = key_wform = acqiris_wform key_wtime = acqiris_wtime fname_prefix = acq print_bits = 0 [ImgAlgos.AcqirisCalib] source = AmoETOF.0:Acqiris.0 key_in = acqiris_wform key_out = wf-calibrated fname_base_line = acq--r0000-ave-wfs.txt #skip_events = 0 #proc_events = 100 print_bits = 0 [ImgAlgos.AcqirisCFD] source = AmoETOF.0:Acqiris.0 key_wform = wf-calibrated baselines = 0.0 0.0 0.0 0.0 0.0 thresholds = -0.005 -0.005 -0.005 -0.005 -0.005 fractions = 0.5 0.5 0.5 0.5 0.5 deadtimes = 20.0e-9 20.0e-9 20.0e-9 20.0e-9 20.0e-9 leading_edges = 1 1 1 1 1 |
This script analyzes an AMO run where 5 acqiris channels were in use. It uses an AcqirisArrProducer to producer the list of waveforms/times for all channels. It then uses an AcqirisCalib module to do a baseline subtraction using a previously generated file of baselines act--r0000-ave-wfs.txt. Finally, a constant fraction discriminator algorithm is run on all the waveforms with user specified parameters. The edges calculated by AcqirisCFD are saved to the event as one ndarray<double,1> per channel, each with a (default) key "acqiris_edges_N" where N is the channel number. Channels where no edges were found are not saved to the event.
...
Example for combination of Acqiris modules
See description of parameters in Modules ImgAlgos::AcqirisArrProducer, AcqirisAverage, and AcqirisCalib
Configuration file psana-amo01509-r0125-acqiris-comb.cfg:
Code Block |
---|
# Command to run this script: # psana -c psana-amo01509-r0125-acqiris-comb.cfg; [psana] files = exp=amo01509:run=125:xtc modules = ImgAlgos.AcqirisArrProducer ImgAlgos.AcqirisAverage:bl ImgAlgos.AcqirisCalib ImgAlgos.AcqirisAverage:signal ImgAlgos.Tahometer #skip-events = 0 events = 2010 [ImgAlgos.AcqirisArrProducer] source = AmoETOF.0:Acqiris.0 key_in = key_wform = acqiris_wform key_wtime = acqiris_wtime fname_prefix = acq print_bits = 7 [ImgAlgos.AcqirisAverage:bl] source # Useful commands: # psana -n 5 -m EventKeys exp=amo01509:run=125:xtc > test-acqiris-file.txt; # psana -n 5 -m psana_examples.DumpAcqiris exp=amo01509:run=125:xtc > test-acqiris-file.txt; (C++ version) # psana -n 1 -m psana_examples.dump_acqiris exp=amo01509:run=125:xtc > test-acqiris-file.txt; (python version) [psana] #files = /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s00-c00.xtc /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s01-c00.xtc files = exp=amo01509:run=125:xtc modules = ImgAlgos.AcqirisArrProducer ImgAlgos.AcqirisAverage skip-events = 0 events = 1000 [ImgAlgos.AcqirisArrProducer] source = AmoETOF.0:Acqiris.0 key_in = key_wform = acqiris_wform key_wtime = acqiris_wtime fname_prefix = acq print_bits = 3 [ImgAlgos.AcqirisAverage] source = AmoETOF.0:Acqiris.0 key_in = acqiris_wform key_ave = acqiris_average fname_ave_prefix = acq thresholds = -0.005 -0.005 -0.005 -0.005 -0.005 is_positive_signal = no do_inverse_selection = yes #skip_events = 0 #proc_events = 100 print_bits = AmoETOF.0:Acqiris.0 key_in = acqiris_wform #key_ave = fname_ave_prefix = acq-bline thresholds = -0.005 -0.005 -0.005 -0.005 -0.005 is_positive_signal = no do_inverse_selection = yes skip_events = 0 proc_events = 1000 print_bits = 31 [ImgAlgos.AcqirisCalib] source = AmoETOF.0:Acqiris.0 key_in = acqiris_wform key_out = wf-calibrated fname_base_line255 |
Psana with this script runs over 1000 events apply threshold-based selection algorithm and produces files:
acq-amo01509-r0125-config.txt -- with Acqiris configuration parameters:
Code Block Acqiris::ConfigV1: nbrBanks=1 channelMask=69905 nbrChannels=5 nbrConvertersPerChannel=4 horiz: sampInterval=2.5e-10 delayTime=0 nbrSegments=1 nbrSamples=10000 vert(0): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(1): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(2): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(3): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(4): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0
- acq-amo01509-r0125-ave-wfs.txt with averaged array of waveforms, which were below threshold (averaging for baseline level):
Anchor | ||||
---|---|---|---|---|
|
Example for module ImgAlgos::AcqirisCalib
See description of parameters in Module ImgAlgos::AcqirisCalib
Configuration file psana-amo01509-r0125-acqiris-calib.cfg:
Code Block | ||
---|---|---|
| ||
# Command to run this script: # psana -c psana-amo01509-r0125-acqiris-calib.cfg; # # Useful commands: # psana -n 5 -m EventKeys exp=amo01509:run=125:xtc > test-acqiris-file.txt; # psana -n 5 -m psana_examples.DumpAcqiris exp=amo01509:run=125:xtc > test-acqiris-file.txt; (C++ version) # psana -n 1 -m psana_examples.dump_acqiris exp=amo01509:run=125:xtc > test-acqiris-file.txt; (python version) [psana] #files = /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s00-c00.xtc /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s01-c00.xtc files = exp=amo01509:run=125:xtc modules = ImgAlgos.AcqirisArrProducer ImgAlgos.AcqirisCalib ImgAlgos.ImgSaveInFile:wf_raw ImgAlgos.ImgSaveInFile:wf_calib skip-events = 0 events = 10 [ImgAlgos.AcqirisArrProducer] source = AmoETOF.0:Acqiris.0 key_in = acq-bline skip_events key_wform = 1001acqiris_wform prockey_eventswtime = acqiris_wtime fname_prefix = 1000acq print_bits = 471 [ImgAlgos.AcqirisAverage:signalAcqirisCalib] source = AmoETOF.0:Acqiris.0 key_in = wf-calibrated #key_aveacqiris_wform key_out = wf-calibrated fname_avebase_prefixline = acq-signal thresholds = -0.01 -0.01 -0.01 -0.01 -0.01 is_positive_signal = no do_inverse_selection = no skip_amo01509-r0125-ave-wfs.txt #skip_events = 10010 proc#proc_events = 1000100 print_bits = 31255 [ImgAlgos.Tahometer] print_bits = 7 |
This script works with psana as follows:
- for the 1st 1000 events averages waveforms below threshold and saves results in the file acq-bline-amo01509-r0125-ave-wfs.txt;
- for the next 1000 events subtracts baseline level and averages waveforms above thresholds and saves results in the file acq-signal-amo01509-r0125-ave-wfs.txt.
This script produces three files:
acq-amo01509-r0125-config.txt - with Acqris configuration parameters:
Code Block Acqiris::ConfigV1: nbrBanks=1 channelMask=69905 nbrChannels=5 nbrConvertersPerChannel=4 horiz: sampInterval=2.5e-10 delayTime=0 nbrSegments=1 nbrSamples=10000 vert(0): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(1): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(2): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(3): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(4): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0
- acq-bline-amo01509-r0125-ave-wfs.txt - contains baseline averaged arrays, which can be presented by full scale and zoomed plots:
- acq-signal-amo01509-r0125-ave-wfs.txt- contains signal averaged arrays, which can be presented by full scale and zoomed plots:
Example for module ImgAlgos::NDArrAverage
...
ImgSaveInFile:wf_raw]
source = AmoETOF.0:Acqiris.0
key = acqiris_wform
fname = acq-AmoETOF-wform-raw
ftype = txt
#ftype = tiff
#saveAll = true
print_bits = 3
eventSave = 5
[ImgAlgos.ImgSaveInFile:wf_calib]
source = AmoETOF.0:Acqiris.0
key = wf-calibrated
fname = acq-AmoETOF-wform-calibrated
ftype = txt
#ftype = tiff
#saveAll = true
print_bits = 3
eventSave = 5
|
In this script the base-line level for all waveforms is loaded from file and is subtracted in module ImgAlgos.AcqirisCalib.
For example, the raw and calibrated waveforms for event 5 were saved in the files:
acq-AmoETOF-wform-raw-r0125-e00000005-20091018-182512.194787218.txt
acq-AmoETOF-wform-calibrated-r0125-e00000005-20091018-182512.194787218.txt
which content is presented on plots:
Anchor | ||||
---|---|---|---|---|
|
Example for module ImgAlgos::AcqirisCFD
See description of parameters in Module ImgAlgos::AcqirisCFD
Configuration file psana_cfd.cfg:
Code Block | ||
---|---|---|
| ||
# Command to run this script: |
The NDArrAverage
module in combination with CSPadNDArrProducer (or any other device NDArrProducer) can be used for evaluation of averaged pedestals or background using dedicated runs.
Typical configuration file may looks like this:
...
# psana -c psana |
...
_cfd.cfg; # [psana] |
...
modules = |
...
ImgAlgos.AcqirisArrProducer ImgAlgos.AcqirisCalib ImgAlgos.AcqirisCFD files = /reg/d/psdm/AMO/amo01509/xtc/e8-r0125-s00-c00.xtc [ImgAlgos.AcqirisArrProducer] source = AmoETOF.0:Acqiris.0 key_in = key_wform = acqiris_wform key_wtime = acqiris_wtime fname_prefix = acq print_bits = 0 [ImgAlgos.AcqirisCalib] source = AmoETOF.0:Acqiris.0 key_in = acqiris_wform key_out = wf-calibrated fname_base_line = acq--r0000-ave-wfs.txt #skip_events = 0 #proc_events = 100 print_bits |
...
= |
...
0 |
...
[ImgAlgos. |
...
AcqirisCFD] source |
...
|
...
= |
...
AmoETOF.0: |
...
Acqiris.0 key_wform = wf-calibrated baselines = |
...
0.0 0.0 0.0 0.0 0.0
thresholds = -0.005 -0.005 -0.005 -0.005 -0.005
fractions = 0.5 0.5 0.5 0.5 0.5
deadtimes = 20.0e-9 20.0e-9 20.0e-9 20.0e-9 20.0e-9
leading_edges = 1 1 1 1 1 |
This script analyzes an AMO run where 5 acqiris channels were in use. It uses an AcqirisArrProducer to producer the list of waveforms/times for all channels. It then uses an AcqirisCalib module to do a baseline subtraction using a previously generated file of baselines act--r0000-ave-wfs.txt. Finally, a constant fraction discriminator algorithm is run on all the waveforms with user specified parameters. The edges calculated by AcqirisCFD are saved to the event as one ndarray<double,1> per channel, each with a (default) key "acqiris_edges_N" where N is the channel number. Channels where no edges were found are not saved to the event.
Anchor | ||||
---|---|---|---|---|
|
Example for combination of Acqiris modules
See description of parameters in Modules ImgAlgos::AcqirisArrProducer, AcqirisAverage, and AcqirisCalib
Configuration file psana-amo01509-r0125-acqiris-comb.cfg:
Code Block |
---|
# Command to run this script:
# psana -c psana-amo01509-r0125-acqiris-comb.cfg;
[psana]
files = exp=amo01509:run=125:xtc
modules = ImgAlgos.AcqirisArrProducer ImgAlgos.AcqirisAverage:bl ImgAlgos.AcqirisCalib ImgAlgos.AcqirisAverage:signal ImgAlgos.Tahometer
#skip-events = 0
events = 2010
[ImgAlgos.AcqirisArrProducer]
source = AmoETOF.0:Acqiris.0
key_in =
key_wform = acqiris_wform
key_wtime = acqiris_wtime
fname_prefix = acq
print_bits = 7
[ImgAlgos.AcqirisAverage:bl]
source = AmoETOF.0:Acqiris.0
key_in = acqiris_wform
#key_ave =
fname_ave_prefix = acq-bline
thresholds = -0.005 -0.005 -0.005 -0.005 -0.005
is_positive_signal = no
do_inverse_selection = yes
skip_events = 0
proc_events = 1000
print_bits = 31
[ImgAlgos.AcqirisCalib]
source = AmoETOF.0:Acqiris.0
key_in = acqiris_wform
key_out = wf-calibrated
fname_base_line = acq-bline
skip_events = 1001
proc_events = 1000
print_bits = 47
[ImgAlgos.AcqirisAverage:signal]
source = AmoETOF.0:Acqiris.0
key_in = wf-calibrated
#key_ave =
fname_ave_prefix = acq-signal
thresholds = -0.01 -0.01 -0.01 -0.01 -0.01
is_positive_signal = no
do_inverse_selection = no
skip_events = 1001
proc_events = 1000
print_bits = 31
[ImgAlgos.Tahometer]
print_bits = 7
|
This script works with psana as follows:
- for the 1st 1000 events averages waveforms below threshold and saves results in the file acq-bline-amo01509-r0125-ave-wfs.txt;
- for the next 1000 events subtracts baseline level and averages waveforms above thresholds and saves results in the file acq-signal-amo01509-r0125-ave-wfs.txt.
This script produces three files:
acq-amo01509-r0125-config.txt - with Acqris configuration parameters:
Code Block Acqiris::ConfigV1: nbrBanks=1 channelMask=69905 nbrChannels=5 nbrConvertersPerChannel=4 horiz: sampInterval=2.5e-10 delayTime=0 nbrSegments=1 nbrSamples=10000 vert(0): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(1): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(2): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(3): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0 vert(4): fullScale=0.1 slope=1.52588e-06 offset=0 coupling=3 bandwidth=0
- acq-bline-amo01509-r0125-ave-wfs.txt - contains baseline averaged arrays, which can be presented by full scale and zoomed plots:
- acq-signal-amo01509-r0125-ave-wfs.txt- contains signal averaged arrays, which can be presented by full scale and zoomed plots:
Example for module ImgAlgos::NDArrImageProducer
See Module ImgAlgos::NDArrImageProducer
Module ImgAlgos.NDArrImageProducer produces image from any detector-associated ndarray
Possible chain of modules:
- <Package>.<Detector>NDArrProducer
- ImgAlgos.NDArrCalib
- ImgAlgos.NDArrImageProducer
- ImgAlgos.NDArrAverage
Example of the configuration file for cspad
Code Block |
---|
[psana]
files = exp=cxii0114:run=227
events = 100
modules = ImgAlgos.Tahometer \
CSPadPixCoords.CSPadNDArrProducer \
ImgAlgos.NDArrCalib \
ImgAlgos.NDArrImageProducer \
ImgAlgos.NDArrAverage
[CSPadPixCoords.CSPadNDArrProducer]
source = DetInfo(CxiDs1.0:Cspad.0)
inkey =
outkey = cspad_ndarr
outtype = float
is_fullsize = yes
print_bits = 3
[ImgAlgos.NDArrCalib]
source = DetInfo(CxiDs1.0:Cspad.0)
key_in = cspad_ndarr
key_out = calibrated
do_peds = yes
do_cmod = yes
do_stat = yes
do_mask = no
do_bkgd = no
do_gain = no
do_nrms = no
do_thre = no
fname_mask =
fname_bkgd =
masked_value = -10
threshold_nrms = 4
threshold = 7
below_thre_value = 0
print_bits = 3
[ImgAlgos.NDArrImageProducer]
source = CxiDs1.0:Cspad.0
key_in = calibrated
key_out = cspad_img
#type_out = asinp
#type_out = float
#x0_off_pix = 50
#y0_off_pix = 50
print_bits = 255
#calibdir = /reg/neh/home/dubrovin/LCLS/CSPadAlignment-v01/calib-cxi-ds1-2014-03-19/calib
[ImgAlgos.NDArrAverage]
source = DetInfo(CxiDs1.0:Cspad.0)
key = cspad_img
avefile = cspad-img-ave
rmsfile = cspad-img-rms
#maskfile = cspad-img-msk
#hotpixfile = cspad-img-hot
thr_rms_ADU = 0
thr_min_ADU = 4
thr_max_ADU = 65000
print_bits = 29 |
Example of the configuration file for cspad2x2
Code Block |
---|
[psana]
# calib-dir = /reg/d/psdm/mec/meca1113/calib
#calib-dir = /reg/neh/home/dubrovin/LCLS/CSPad2x2Alignment/calib-cspad2x2-01-2013-02-13/calib
files = exp=meca1113:run=376
events = 10
#skip-events = 0
modules = CSPadPixCoords.CSPad2x2NDArrProducer \
ImgAlgos.NDArrImageProducer \
ImgAlgos.NDArrAverage
[CSPadPixCoords.CSPad2x2NDArrProducer]
source = MecTargetChamber.0:Cspad2x2.1
inkey =
outkey = cspad2x2_ndarr
outtype = int16
print_bits = 5
[ImgAlgos.NDArrImageProducer]
source = MecTargetChamber.0:Cspad2x2.1
key_in = cspad2x2_ndarr
key_out = cspad2x2_img
#type_out = asinp
#type_out = float
#x0_off_pix = 50
#y0_off_pix = 50
print_bits = 255
#oname = CSPAD2X2:V1
#oindex = 0
#pix_scale_size_um = 218.
#calibdir = /reg/neh/home/dubrovin/LCLS/CSPad2x2Alignment/calib-cspad2x2-01-2013-02-13/calib
#calibgroup = CsPad2x2::CalibV1
[ImgAlgos.NDArrAverage]
source = MecTargetChamber.0:Cspad2x2.1
#key = cspad2x2_ndarr
key = cspad2x2_img
avefile = arr-ave
rmsfile = arr-rms
maskfile = arr-msk
hotpixfile = arr-hot
thr_rms_ADU = 10
#thr_min_ADU = 2
#thr_max_ADU = 20000
print_bits = 255 |
Example for module ImgAlgos::NDArrAverage
- See Module ImgAlgos::NDArrAverage andModule CSPadPixCoords::CSPadNDArrProducer
The
NDArrAverage
module in combination with CSPadNDArrProducer (or any other device NDArrProducer) can be used for evaluation of averaged pedestals or background using dedicated runs.
Typical configuration file may looks like this:No Format # Run this script: # psana -c psana-meca1113-r0045-cspad-cspad-dark-hotpix.cfg [psana] files = exp=meca1113:run=45 events = 400 #skip-events = 0 modules = CSPadPixCoords.CSPadNDArrProducer \ ImgAlgos.NDArrAverage \ ImgAlgos.Tahometer [CSPadPixCoords.CSPadNDArrProducer] source = MecTargetChamber.0:Cspad.0 inkey = outkey = cspad_ndarr outtype = int16 is_fullsize = yes print_bits = 3 [ImgAlgos.NDArrAverage] source = MecTargetChamber.0:Cspad.0 key = cspad_ndarr avefile = cspad.0-ave rmsfile = cspad.0-rms maskfile = cspad.0-msk hotpixfile = cspad.0-hot thr_rms_ADU = 10 thr_min_ADU = 4 thr_max_ADU = 10000 print_bits = 29 #evts_stage1 = 100 #gate_width1 = 500. #evts_stage2 = 200 #gate_width2 = 100. [ImgAlgos.Tahometer] dn = 100 print_bits = 7
- Module
ImgAlgos.Tahometer
is not required in this configuration file and is added for convenience to print timing statistics for this job. - Evaluation of average intensity in 2 or 3 stages using gate-based algorithms excludes out-layers in intensity spectra and makes average more stable and reliable. However, the gate width is not an universal parameter. In order to set this parameter one has to look at spectrum of averaged intensities for particular device. The same is valid for evaluation of hot/bad pixel masks. One has to plot spectra of averaged intensity and rms values. Averaged intensity and rms spectra for exp=meca1113:run=45 are shown on plots, respectively:
Then, one has to decide how to set parameters for NDArrAverage algorithms, for example, it is quite safe to use
- thr_rms_ADU = 10 – to discard very noisy pixels,
- thr_min_ADU = 4 – to discard presumably dead pixels with 0-intensity,
- thr_max_ADU = 10000 – to discard pixels with intensity significantly exceeding average value. To be on safe side for int16 data this parameter can be set to 216-4, where 4 in both cases is just a small arbitrary number for spare safety gap.
Example for module ImgAlgos::NDArrCalib
See Module ImgAlgos::NDArrCalib, Module ImgAlgos::NDArrAverageThe
NDArrCalib
module in combination with any device NDArrProducer (for example PnccdNDArrProducer) can be used to apply intensity corrections to ndarray.
Typical configuration files are shown below.
Example of ImgAlgos::NDArrCalib for pnCCD
Code Block |
---|
[psana]
files = exp=amoa1214:run=7
#skip-events = 100
events = 5
modules = ImgAlgos.Tahometer \
ImgAlgos.PnccdNDArrProducer \
ImgAlgos.NDArrCalib \
ImgAlgos.PnccdImageProducer \
ImgAlgos.ImgSaveInFile
# ImgAlgos.NDArrAverage \
[ImgAlgos.PnccdNDArrProducer]
source = DetInfo(Camp.0:pnCCD.0)
key_in =
key_out = pnccd-ndarr
outtype = asdata
print_bits = 13
[ImgAlgos.NDArrCalib]
source = DetInfo(Camp.0:pnCCD.0)
key_in = pnccd-ndarr
key_out = calibrated
outtype = float
do_peds = yes
do_cmod = yes
do_stat = no
do_mask = no
do_bkgd = no
do_gain = no
do_nrms = no
do_thre = no
fname_mask =
fname_bkgd =
masked_value = 0
threshold_nrms = 3
threshold = 100
below_thre_value = 0
bkgd_ind_min = 0
bkgd_ind_max = 1000
bkgd_ind_inc = 10
print_bits = 255
[ImgAlgos.PnccdImageProducer]
source = DetInfo(Camp.0:pnCCD.0)
#inkey = pnccd-ndarr
inkey = calibrated
outimgkey = pnccd-img
gap_size = 20
gap_value = 0
print_bits = 1
[ImgAlgos.ImgSaveInFile]
source = DetInfo(Camp.0:pnCCD.0)
key |
Then, one has to decide how to set parameters for NDArrAverage algorithms, for example, it is quite safe to use
- thr_rms_ADU = 10 – to discard very noisy pixels,
- thr_min_ADU = 4 – to discard presumably dead pixels with 0-intensity,
- thr_max_ADU = 10000 – to discard pixels with intensity significantly exceeding average value. To be on safe side for int16 data this parameter can be set to 216-4, where 4 in both cases is just a small arbitrary number for spare safety gap.
Example for module ImgAlgos::NDArrCalib
See Module ImgAlgos::NDArrCalib, Module ImgAlgos::NDArrAverageThe
NDArrCalib
module in combination with any device NDArrProducer (for example PnccdNDArrProducer) can be used to apply intensity corrections to ndarray.
Typical configuration files are shown below.
Example of ImgAlgos::NDArrCalib for pnCCD
Code Block |
---|
[psana] = pnccd-img fname = pnccd-img-from-arr ftype = txt saveAll = true print_bits = 31 [ImgAlgos.Tahometer] dn = 100 print_bits = 7 |
Example of ImgAlgos::NDArrCalib for CSPAD
Code Block |
---|
[psana] files = exp=amoa1214cxi83714:run=7136 #skip-events = 100 events = 5 modules = ImgAlgos.Tahometer \ ImgAlgosCSPadPixCoords.PnccdNDArrProducerCSPadNDArrProducer \ ImgAlgos.NDArrCalib \ ImgAlgos.PnccdImageProducer \ NDArrAverage [CSPadPixCoords.CSPadNDArrProducer] source ImgAlgos.ImgSaveInFile #= DetInfo(CxiDs1.0:Cspad.0) inkey ImgAlgos.NDArrAverage= \ [ImgAlgos.PnccdNDArrProducer] source outkey = DetInfo(Camp.0:pnCCD.0) key_incspad_ndarr outtype = float keyis_out = pnccd-ndarr outtypefullsize = asdatayes print_bits = 133 [ImgAlgos.NDArrCalib] source = DetInfo(CampCxiDs1.0:pnCCDCspad.0) key_in = pnccd-cspad_ndarr key_out = calibrated outtype = double do_peds = yes do_cmod = yes do_stat = noyes do_mask = no do_bkgd = no do_gain = no do_nrms = no do_thre = no fname_mask = fname_bkgd = masked_value = 0-10 threshold_nrms = 34 threshold = 100 7 below_thre_value = 0 bkgd_ind_min = 0 bkgd_ind_max = 1000 bkgd_ind_inc = 10 print_bits = 2553 [ImgAlgos.PnccdImageProducerNDArrAverage] source = DetInfo(CampCxiDs1.0:pnCCDCspad.0) #inkey = pnccd-ndarr inkey key = calibrated outimgkeyavefile = pnccd-img gap_size = 20 gap_value = 0 print_bits = 1 [ImgAlgos.ImgSaveInFile] source = DetInfo(Camp.0:pnCCD.0) key = pnccd-img fname = cspad-ave rmsfile = pnccd-img-from-arr ftypecspad-rms #maskfile = cspad-msk #hotpixfile = txt saveAll cspad-hot thr_rms_ADU = 10 thr_min_ADU = 4 thr_max_ADU = true10000 print_bits = 3129 [ImgAlgos.Tahometer] dn = 10010 print_bits = 7 |
Example of ImgAlgos::NDArrCalib for CSPAD
For test purpose we use exp=cxi83714:run=136 and loop over 100 exents.
Case 1: raw, non-calibrated images
do_peds = no; 50-60 ms/event
plots for average and rms value distribution for all pixels
Case 2: images with subtracted pedestals and applied status mask
do_peds = yes; 60-70 ms/event
do_stat = yes
Case 3: The same as 2 with common mode subtracted
do_cmod = yes; 107-117 ms/event
Andy's algorithm for CSPAD common mode correction with minor adaptive modifications is applied with parameters:
/reg/d/psdm/cxi/cxi83714/calib/CsPad::CalibV1/CxiDs1.0:Cspad.0/common_mode/135-136.data
1 10 10 100 - algorithm mode, allowed peak mean, allowed peak rms, threshold on number of pixels in ADU bin.
Comparison with Andy's module cspad_mod.CsPadCalib
for common mode correction of int16_t data
Code Block |
---|
[psana]
# Default calibration directory:
# calib-dir = /reg/d/psdm/mec/cxi83714/calib
# calib-dir = /reg/neh/home1/dubrovin/LCLS/CSPadAlignment-v01/calib-mec-2013-12-10/
files = exp=cxi83714:run=136
events = 100
#skip-events = 4000
modules = cspad_mod.CsPadCalib \
CSPadPixCoords.CSPadNDArrProducer \
ImgAlgos.NDArrAverage \
ImgAlgos.Tahometer
[cspad_mod.CsPadCalib]
inputKey =
outputKey = calibrated_data
doPedestals = yes
doPixelStatus = yes
doCommonMode = yes
[CSPadPixCoords.CSPadNDArrProducer]
source = DetInfo(CxiDs1.0:Cspad.0)
inkey = calibrated_data
outkey = cspad_ndarr
outtype = float
is_fullsize = yes
print_bits = 3 |
Code Block |
[psana] files = exp=cxi83714:run=136 events = 100 modules = ImgAlgos.Tahometer \ CSPadPixCoords.CSPadNDArrProducer \ ImgAlgos.NDArrCalib \ ImgAlgos.NDArrAverage [CSPadPixCoords.CSPadNDArrProducer] source = DetInfo(CxiDs1.0:Cspad.0) inkey = outkey = cspad_ndarr outtype = float is_fullsize = yes print_bits = 3 [ImgAlgos.NDArrCalib] source = DetInfo(CxiDs1.0:Cspad.0) key_in = cspad_ndarr key_out = calibrated do_peds = yes do_cmod = yes do_stat = yes do_mask = no do_bkgd = no do_gain = no do_nrms = no do_thre = no fname_mask = fname_bkgd = masked_value = -10 threshold_nrms = 4 threshold = 7 below_thre_value = 0 bkgd_ind_min = 0 bkgd_ind_max = 1000 bkgd_ind_inc = 10 print_bits = 3 [ImgAlgos.NDArrAverage] source = DetInfo(CxiDs1.0:Cspad.0) key = calibrated cspad_ndarr avefile = cspad-calib-ave rmsfile = cspad-calib-rms #maskfile = cspad-msk #hotpixfile = cspad-hot thr_rms_ADU = 10 thr_min_ADU = 4 thr_max_ADU = 10000 print_bits = 29 [ImgAlgos.Tahometer] dn = 10 print_bits = 7 |
For test purpose we use exp=cxi83714:run=136 and loop over 100 exents.
Case 1: raw, non-calibrated images
doPedestals = yes
doCommonMode do_peds = no; 50-60 ms/event
plots for average and rms value distribution for all pixels
Case 2: images with subtracted pedestals and applied status mask
do_peds = yes; 60-70 ms/event
do_stat = yes
Case 3: The same as 2 with common mode subtracted
...
100-110ms
doPedestals = yes
doPixelStatus = yes
doCommonMode = yes; 150-160ms
Conclusion:
Results of
ImgAlgos.NDArrCalib
well reproducecspad_mod.CsPadCalib
- Common mode correction shrinks the width of averaged intensities from 0.60 to 0.54, and rms from 3.78 to 3.27.
- Algorithm is quite time expensive, it takes 30-40ms/event.
Example of ImgAlgos::NDArrCalib for Fccd960
- Calibration
To calibrate fccd960 for dark runs use command
calibman
For test purpose a couple of dark runs were processed and constants were deployed:
Code Block |
---|
Content of: /reg/d/psdm/XCS/xcsd7814/calib for detector: Fccd960
Camera::CalibV1
XcsEndstation.0:Fccd960.0 |
Andy's algorithm for CSPAD common mode correction with minor adaptive modifications is applied with parameters:
/reg/d/psdm/cxi/cxi83714/calib/CsPad::CalibV1/CxiDs1.0:Cspad.0/common_mode/135-136.data
1 10 10 100 - algorithm mode, allowed peak mean, allowed peak rms, threshold on number of pixels in ADU bin.
Comparison with Andy's module cspad_mod.CsPadCalib
for common mode correction of int16_t data
Code Block |
---|
[psana] # Default calibration directory: # calib-dir = /reg/d/psdm/mec/cxi83714/calib # calib-dir = /reg/neh/home1/dubrovin/LCLS/CSPadAlignment-v01/calib-mec-2013-12-10/ files = exp=cxi83714:run=136 events = 100 #skip-events = 4000 modules = cspad_mod.CsPadCalib \ pixel_rms CSPadPixCoords.CSPadNDArrProducer \ ImgAlgos.NDArrAverage \ 12-13.data file is not used ImgAlgos.Tahometer [cspad_mod.CsPadCalib] inputKey78-81.data run range 0078 =- 0081 outputKey = calibrated_data doPedestals = yes doPixelStatus =pedestals yes doCommonMode = yes [CSPadPixCoords.CSPadNDArrProducer] source = DetInfo(CxiDs1.0:Cspad.0) inkey 12-13.data = calibrated_data outkey file is not used = cspad_ndarr outtype = float is_fullsize = yes print_bits = 3 [ImgAlgos.NDArrAverage] source 78-81.data run range = DetInfo(CxiDs1.0:Cspad.0) key0078 - 0081 = cspadpixel_ndarr avefilestatus = cspad-calib-ave rmsfile = cspad-calib-rms #maskfile = cspad-msk #hotpixfile = cspad-hot thr_rms_ADU12-13.data = 10 thr_min_ADU = 4 thr_max_ADU = 10000 print_bits file is not used = 29 [ImgAlgos.Tahometer] dn = 10 print_bits = 7 |
...
Conclusion:
...
Results of ImgAlgos.NDArrCalib
well reproduce cspad_mod.CsPadCalib
...
78-81.data run range 0078 - 0081 |
- Access data in psana
Example of the configuration file for psana psana-xcsd7814-r0079-fccd960-aver.cfg can be processed by the command
psana -c psana-xcsd7814-r0079-fccd960-aver.cfg
Two averaged images are saved in the text files for exp=xcsd7814:run=79 for raw and calibrated (subtracted dark level) data.
Gain bit coded gain factor 8 is applied automatically.
Example for module ImgAlgos::NDArrDropletFinder
See description in psana - Module Catalog and examples in Peak Finding Module
Example for module ImgAlgos::PixCoordsProducer
...