Page History
...
By default psana assumes that all calibration files are located in the pre-defined directory
/reg/d/psdm/<INSTRUMENT>/<experiment>/calib/
as explained in Locating calibration files. However, for analysis it may be convenient to re-define the calibration directory through the psana parameters. In order to fulfill the naming conventions we have to create a tree of the calibration sub-directories somewhere in local user's space, for example:
...
Get latest version of packages and run psana
A few minor corrections of the psana modules' code were applied in order to save 16-bit TIFF files with images. Until the new release with number >anaOn 6 p.m. 2013-11-13 all recent code changes are included in release ana-0.10.3 is build 5 (seen in directory $SIT_RELDIR), one have to use current release ana-0.10.3 with updates for two packages.
To run psana use commands:
Code Block |
---|
ssh -Y psana; cd <your-favorite-directory>; newrel ana-current <test-ana-current-directory>; cd <test-ana-current-directory>; sit_setup; addpkg ImgAlgos HEAD; addpkg CSPadPixCoords HEAD; addpkg pyimgalgos HEAD; addpkg XtcExplorer HEAD; scons; cp <path> sit_setup cp <path-to-where-it-is-located>/psana-meca1113-r0376-cspad-cspad2x2-tiff.cfg . psana -c psana-meca1113-r0376-cspad-cspad2x2-tiff.cfg |
Create images in tiff format
Configuration file for psana psana-meca1113-r0376-cspad-cspad2x2-tiff.cfg:
or run xtcexplorer:
Code Block |
---|
xtcexplorer /reg/d/psdm/mec/meca1113/xtc/e356-r0376-s03-c00.xtc |
Pedestals and bad pixels
The configuration file for psana psana-meca1113-r0045-cspad-cspad2x2-dark-hotpix.cfg can be used to produce calibration files with pedestals (dark rate) and mask of bad pixels:
Code Block |
---|
Code Block |
# Run this script: # psana -c psana-meca1113-r0376r0045-cspad-cspad2x2-dark-tiffhotpix.cfg #[psana] # Useful commands: # psana -m EventKeys -n 5 exp=meca1113:run=376 # or # psana -m EventKeys -n 5 /reg/d/psdm/mec/meca1113/xtc/e356-r0376-s03-c00.xtc [psana] # Default calibration Default calibration directory: # calib-dir = /reg/d/psdm/mec/meca1113/calib files = exp=meca1113:run=37645 events = 5400 #skip-events = 0 modules = cspad_modCSPadPixCoords.CsPadCalibCSPadNDArrProducer \ CSPadPixCoords.CSPadImageProducerCSPad2x2NDArrProducer:01 \ CSPadPixCoords.CSPad2x2ImageProducer:1 \ CSPadPixCoords.CSPad2x2ImageProducerCSPad2x2NDArrProducer:2 \ CSPadPixCoords.CSPad2x2ImageProducerCSPad2x2NDArrProducer:3 \ CSPadPixCoords.CSPad2x2ImageProducerCSPad2x2NDArrProducer:4 \ pyimgalgos.image_crop:0 \ ImgAlgos.ImgSaveInFile:0NDArrAverage \ ImgAlgos.ImgSaveInFileNDArrAverage:1 \ ImgAlgos.ImgSaveInFileNDArrAverage:2 \ ImgAlgos.ImgSaveInFileNDArrAverage:3 \ ImgAlgos.ImgSaveInFileNDArrAverage:4 \ ImgAlgos.Tahometer # Calibrate all CSPAD and CSPAD2x2 [cspad_modCSPadPixCoords.CsPadCalibCSPadNDArrProducer] inputKeysource = outputKeyMecTargetChamber.0:Cspad.0 inkey = calibrated_arr doPedestals = yes doPixelStatusoutkey = no doCommonMode = yes [CSPadPixCoords.CSPadImageProducer:0] #calibDircspad_ndarr outtype = /reg/d/psdm/mec/meca1113/calib #typeGroupNameint16 is_fullsize = CsPad::CalibV1 sourceyes print_bits = 3 [CSPadPixCoords.CSPad2x2NDArrProducer:1] source = DetInfo(MecTargetChamber.0:CspadCspad2x2.0)1 keyinkey = outkey = cspad2x2.1_ndarr outtype = int16 print_bits = calibrated_arr imgkey 3 [CSPadPixCoords.CSPad2x2NDArrProducer:2] source = MecTargetChamber.0:Cspad2x2.2 inkey = outkey = image0 tiltIsAppliedcspad2x2.2_ndarr outtype = trueint16 print_bits = 3 [CSPadPixCoords.CSPad2x2ImageProducerCSPad2x2NDArrProducer:13] #calibDirsource = MecTargetChamber.0:Cspad2x2.3 inkey = /reg/d/psdm/mec/meca1113/calib #typeGroupName outkey = cspad2x2.3_ndarr outtype = CsPad2x2::CalibV1 sourceint16 print_bits = 3 [CSPadPixCoords.CSPad2x2NDArrProducer:4] source = DetInfo(MecTargetChamber.0:Cspad2x2.1)4 inkey = outkey = cspad2x2.4_ndarr outtype = int16 print_bits = calibrated_arr outimgkey3 [ImgAlgos.NDArrAverage] source = image1 tiltIsAppliedMecTargetChamber.0:Cspad.0 key = true useWidePixCenter = false print_bitscspad_ndarr avefile = 3 [CSPadPixCoords.CSPad2x2ImageProducer:2] #calibDircspad.0-ave rmsfile = /reg/d/psdm/mec/meca1113/calib #typeGroupName= cspad.0-rms maskfile = CsPad2x2::CalibV1 sourcecspad.0-msk hotpixfile = cspad.0-hot thr_rms_ADU = 10 thr_min_ADU = DetInfo(= 2 thr_max_ADU = 65000 print_bits = 93 [ImgAlgos.NDArrAverage:1] source = MecTargetChamber.0:Cspad2x2.2)1 inkey key = calibratedcspad2x2.1_arrndarr outimgkey avefile = image2 tiltIsAppliedcspad2x2.1-ave rmsfile = true useWidePixCenter = false print_bitscspad2x2.1-rms maskfile = 3 [CSPadPixCoords.CSPad2x2ImageProducer:3] #calibDir = /reg/d/psdm/mec/meca1113/calib #typeGroupName = CsPad2x2::CalibV1cspad2x2.1-msk hotpixfile = cspad2x2.1-hot #evts_stage1 = 100 #gate_width1 = 100. thr_rms_ADU = 10 thr_min_ADU = 2 thr_max_ADU = 65000 print_bits = 93 [ImgAlgos.NDArrAverage:2] source = DetInfo(MecTargetChamber.0:Cspad2x2.3)2 inkey key = calibratedcspad2x2.2_arrndarr outimgkey avefile = image3 tiltIsAppliedcspad2x2.2-ave rmsfile = true useWidePixCenter = false print_bits cspad2x2.2-rms maskfile = 3 [CSPadPixCoords.CSPad2x2ImageProducer:4] #calibDircspad2x2.2-msk hotpixfile = cspad2x2.2-hot #evts_stage1 = 100 #gate_width1 = /reg/d/psdm/mec/meca1113/calib #typeGroupName 100. thr_rms_ADU = 10 thr_min_ADU = 2 thr_max_ADU = CsPad2x2::CalibV1 source65000 print_bits = 93 [ImgAlgos.NDArrAverage:3] source = DetInfo(MecTargetChamber.0:Cspad2x2.4)3 inkeykey = calibratedcspad2x2.3_arrndarr outimgkeyavefile = image4 tiltIsAppliedcspad2x2.3-ave rmsfile = true useWidePixCenter = false print_bitscspad2x2.3-rms maskfile = cspad2x2.3 [pyimgalgos.image_crop:0] source-msk hotpixfile = DetInfo(MecTargetChamber.0:Cspad.0) key_in cspad2x2.3-hot #evts_stage1 = 100 #gate_width1 = image0 key_out100. thr_rms_ADU = image0_cropped rowmin10 thr_min_ADU = 2 thr_max_ADU = 7065000 rowmaxprint_bits = 900 colmin = 0 colmax = 825 print_bits = 255= 93 [ImgAlgos.ImgSaveInFileNDArrAverage:04] source = DetInfo(MecTargetChamber.0:CspadCspad2x2.0)4 key = image0cspad2x2.4_cropped fname ndarr avefile = cspadcspad2x2.0 #ftype 4-ave rmsfile = txt ftypecspad2x2.4-rms maskfile = cspad2x2.4-msk hotpixfile = tiff saveAllcspad2x2.4-hot #evts_stage1 = 100 #gate_width1 = 100. thr_rms_ADU = true10 printthr_min_bitsADU = 2 thr_max_ADU = 365000 #eventSaveprint_bits = 593 [ImgAlgos.ImgSaveInFile:1Tahometer] sourcedn = DetInfo(MecTargetChamber.0:Cspad2x2.1) key = image1 fname = cspad2x2.1 #ftype = txt ftype = tiff saveAll = true print_bits = 3 #eventSave = 5 [ImgAlgos.ImgSaveInFile:2] source = DetInfo(MecTargetChamber.0:Cspad2x2.2) key = image2 fname = cspad2x2.2 #ftype = txt ftype = tiff saveAll = true print_bits = 3 #eventSave = 5 [ImgAlgos.ImgSaveInFile:3] source = DetInfo(MecTargetChamber.0:Cspad2x2.3) key = image3 fname = cspad2x2.3 #ftype = txt ftype = tiff saveAll = true print_bits = 3 #eventSave = 5 [ImgAlgos.ImgSaveInFile:4] source = DetInfo(MecTargetChamber.0:Cspad2x2.4) key = image4 fname = cspad2x2.4 #ftype = txt ftype = tiff saveAll = true print_bits = 3 #eventSave = 5 [ImgAlgos.Tahometer] dn = 100 print_bits = 7 |
Command:
% psana -c psana-meca1113-r0376-cspad-cspad2x2-tiff.cfg
or for other runs:
% psana -c psana-meca1113-r0376-cspad-cspad2x2-tiff.cfg exp=meca1113:run=378
will run over 5 events from xtc files, applys intensity correction for all CSPAD detectors (if calibration files are provided), produces images and save images for one CSPAD and four CSPAD2x2 detectors in 16-bit tiff files, with names like
cspad.0-r0376-e0000000#-20131110-101607.736131763.tiff
cspad2x2.#-r0376-e0000000#-20131110-101546.244253562.tiff
...
Other option to save image in 16-bit tiff files
Psana can use python modules. A few modules in package pyimgalgos were recently developed to process CSPAD data.
Psana Module Catalog - Package pyimgalgos
Psana Module Examples - Examples for Package pyimgalgos
In particular, module pyimgalgos.image_save_in_file
may save image in 16-bit tiff files.
Display tiff image
To display image from tiff file use command:
Code Block | ||
---|---|---|
| ||
display <file-name>.tiff
|
then
- left mouse click on image
- click on "Enhance" button
- click on "Equalize" button
Check tiff file
To check tiff file format one may use command:
% identify -verbose <file-name>.tiff
which prints information about tiff file structure. For example,
Code Block |
---|
% identify -verbose cspad.0-r0376-e00000001-20131110-101546.244253562.tiff
Image: cspad.0-r0376-e00000001-20131110-101546.244253562.tiff
Format: TIFF (Tagged Image File Format)
Class: PseudoClass
Geometry: 1750x1750
Type: Grayscale
Endianess: MSB
Colorspace: Gray
Channel depth:
Gray: 16-bits
Channel statistics:
Gray:
Min: 0 (0)
Max: 16383 (0.249989)
Mean: 1023.37 (0.0156156)
Standard deviation: 2132.77 (0.0325439)
Colors: 65536
...
|
References
100
print_bits = 7 |
This script
- runs through 400 events of the xtc file
exp=meca1113:run=45
, uses CSPadNDArrProducer and CSPad2x2NDArrProducer modules to get cspad and four cspad2x2 data and put them as universal
ndarray<T,3>
objects in psana event store,uses NDArrAverage module to evaluate and save in file average, rms, mask, and hot pixel map for all array elements:
No Format cspad.0-ave-meca1113-r0045.dat cspad.0-hot-meca1113-r0045.dat cspad.0-msk-meca1113-r0045.dat cspad.0-rms-meca1113-r0045.dat cspad2x2.1-ave-meca1113-r0045.dat cspad2x2.1-hot-meca1113-r0045.dat cspad2x2.1-msk-meca1113-r0045.dat cspad2x2.1-rms-meca1113-r0045.dat cspad2x2.2-ave-meca1113-r0045.dat cspad2x2.2-hot-meca1113-r0045.dat cspad2x2.2-msk-meca1113-r0045.dat cspad2x2.2-rms-meca1113-r0045.dat cspad2x2.3-ave-meca1113-r0045.dat cspad2x2.3-hot-meca1113-r0045.dat cspad2x2.3-msk-meca1113-r0045.dat cspad2x2.3-rms-meca1113-r0045.dat cspad2x2.4-ave-meca1113-r0045.dat cspad2x2.4-hot-meca1113-r0045.dat cspad2x2.4-msk-meca1113-r0045.dat cspad2x2.4-rms-meca1113-r0045.dat
NDArrAverage module has a bunch of parameters which depend on particular detector/experiments and need to be adjusted looking at spectra of average and rms values from these files. For example averaged image and spectrum and rms spectrum of pixel intensities for
cspad2x2.1-ave-meca1113-r0045.dat and cspad2x2.1-rms-meca1113-r0045.dat
are shown in plots:
These spectra allow to use confidently parameters like
thr_rms_ADU = 10
thr_min_ADU = 2
thr_max_ADU = 65000
Files with mask and hot pixel map contain opposite meaning of 0/1 for bad/good pixels:
Calibration
Default calibration in psana will be done if files are located in right place. So, they were deployed as:
No Format |
---|
cp cspad.0-ave-meca1113-r0045.dat /reg/d/psdm/mec/meca1113/calib/CsPad::CalibV1/MecTargetChamber.0:Cspad.0/pedestals/45-end.data
cp cspad2x2.1-ave-meca1113-r0045.dat /reg/d/psdm/mec/meca1113/calib/CsPad2x2::CalibV1/MecTargetChamber.0:Cspad2x2.1/pedestals/45-end.data
cp cspad2x2.2-ave-meca1113-r0045.dat /reg/d/psdm/mec/meca1113/calib/CsPad2x2::CalibV1/MecTargetChamber.0:Cspad2x2.2/pedestals/45-end.data
...
cp cspad.0-hot-meca1113-r0045.dat /reg/d/psdm/mec/meca1113/calib/CsPad::CalibV1/MecTargetChamber.0:Cspad.0/pixel_status/45-end.data
cp cspad2x2.1-hot-meca1113-r0045.dat /reg/d/psdm/mec/meca1113/calib/CsPad2x2::CalibV1/MecTargetChamber.0:Cspad2x2.1/pixel_status/45-end.data
... |
Create images in tiff format
Configuration file for psana psana-meca1113-r0376-cspad-cspad2x2-conv-tiff.cfg
Code Block |
---|
# Run this script:
# psana -c psana-meca1113-r0376-cspad-cspad2x2-conv-tiff.cfg
#
# Useful commands:
# psana -m EventKeys -n 5 exp=meca1113:run=376
# or
# psana -m EventKeys -n 5 /reg/d/psdm/mec/meca1113/xtc/e356-r0376-s03-c00.xtc
[psana]
# Default calibration directory:
# calib-dir = /reg/d/psdm/mec/meca1113/calib
files = exp=meca1113:run=376
events = 5
#skip-events = 0
modules = cspad_mod.CsPadCalib \
CSPadPixCoords.CSPadImageProducer:0 \
CSPadPixCoords.CSPad2x2ImageProducer:1 \
CSPadPixCoords.CSPad2x2ImageProducer:2 \
CSPadPixCoords.CSPad2x2ImageProducer:3 \
CSPadPixCoords.CSPad2x2ImageProducer:4 \
pyimgalgos.image_crop:0 \
pyimgalgos.image_save_in_file:0 \
pyimgalgos.image_save_in_file:1 \
pyimgalgos.image_save_in_file:2 \
pyimgalgos.image_save_in_file:3 \
pyimgalgos.image_save_in_file:4 \
ImgAlgos.Tahometer
# Calibrate all CSPAD and CSPAD2x2
[cspad_mod.CsPadCalib]
inputKey =
outputKey = calibrated_arr
doPedestals = yes
doPixelStatus = yes
doCommonMode = yes
[CSPadPixCoords.CSPadImageProducer:0]
#calibDir = /reg/d/psdm/mec/meca1113/calib
#typeGroupName = CsPad::CalibV1
source = DetInfo(MecTargetChamber.0:Cspad.0)
key = calibrated_arr
imgkey = image0
tiltIsApplied = false
print_bits = 3
[CSPadPixCoords.CSPad2x2ImageProducer:1]
#calibDir = /reg/d/psdm/mec/meca1113/calib
#typeGroupName = CsPad2x2::CalibV1
source = DetInfo(MecTargetChamber.0:Cspad2x2.1)
inkey = calibrated_arr
outimgkey = image1
tiltIsApplied = true
useWidePixCenter = false
print_bits = 3
[CSPadPixCoords.CSPad2x2ImageProducer:2]
#calibDir = /reg/d/psdm/mec/meca1113/calib
#typeGroupName = CsPad2x2::CalibV1
source = DetInfo(MecTargetChamber.0:Cspad2x2.2)
inkey = calibrated_arr
outimgkey = image2
tiltIsApplied = true
useWidePixCenter = false
print_bits = 3
[CSPadPixCoords.CSPad2x2ImageProducer:3]
#calibDir = /reg/d/psdm/mec/meca1113/calib
#typeGroupName = CsPad2x2::CalibV1
source = DetInfo(MecTargetChamber.0:Cspad2x2.3)
inkey = calibrated_arr
outimgkey = image3
tiltIsApplied = false
useWidePixCenter = false
print_bits = 3
[CSPadPixCoords.CSPad2x2ImageProducer:4]
#calibDir = /reg/d/psdm/mec/meca1113/calib
#typeGroupName = CsPad2x2::CalibV1
source = DetInfo(MecTargetChamber.0:Cspad2x2.4)
inkey = calibrated_arr
outimgkey = image4
tiltIsApplied = true
useWidePixCenter = false
print_bits = 3
[pyimgalgos.image_crop:0]
source = DetInfo(MecTargetChamber.0:Cspad.0)
key_in = image0
key_out = image0_cropped
rowmin = 70
rowmax = 900
colmin = 0
colmax = 825
print_bits = 255
[pyimgalgos.image_save_in_file:0]
source = DetInfo(MecTargetChamber.0:Cspad.0)
key_in = image0_cropped
ofname = cspad.0.tiff
print_bits = 5
[pyimgalgos.image_save_in_file:1]
source = DetInfo(MecTargetChamber.0:Cspad2x2.1)
key_in = image1
ofname = cspad2x2.1.tiff
print_bits = 5
[pyimgalgos.image_save_in_file:2]
source = DetInfo(MecTargetChamber.0:Cspad2x2.2)
key_in = image2
ofname = cspad2x2.2.tiff
print_bits = 5
[pyimgalgos.image_save_in_file:3]
source = DetInfo(MecTargetChamber.0:Cspad2x2.3)
key_in = image3
ofname = cspad2x2.3.tiff
print_bits = 5
[pyimgalgos.image_save_in_file:4]
source = DetInfo(MecTargetChamber.0:Cspad2x2.4)
key_in = image4
ofname = cspad2x2.4.tiff
print_bits = 5
[ImgAlgos.Tahometer]
dn = 100
print_bits = 7
|
Command:
% psana -c psana-meca1113-r0376-cspad-cspad2x2-tiff.cfg
or for other runs:
% psana -c psana-meca1113-r0376-cspad-cspad2x2-tiff.cfg exp=meca1113:run=378
will run over 5 events from xtc files, applys intensity correction for all CSPAD detectors (if calibration files are provided), produces images and save images for one CSPAD and four CSPAD2x2 detectors in 16-bit tiff files, with names like
cspad.0-r0376-e0000000#-20131110-101607.736131763.tiff
cspad2x2.#-r0376-e0000000#-20131110-101546.244253562.tiff
...
Examples for mecb3114
Experiment mecb3114 use different detectors in different runs. Not all of them collected data in each run. Then it make sense to produce tiff files for separate detectors.
Configuration file for MecTargetChamber.0:Cspad2x2: psana-mecb3114-r0008-cspad2x2-tiff.cfg
Configuration file for MecTargetChamber.0:Cspad.0: psana-mecb3114-r0323-cspad-tiff.cfg
Command to run:
% psana -m <file-name>.cfg exp=mecb3114:run=376
Examples for meci0114
Andreas Schropp needs to access cspad image in his custom psana module.
On 2014-03-21 Module ImgAlgos::ExampleDumpImg is add as an example.
Get and run this example in current release
For releases ≤ ana-0.10.14 the updated version of code can be compiled and run from local release directory;
Code Block |
---|
ssh -Y psana
cd <your-favorite-directory>
kinit
<next 6 lines can be copied and pasted>
newrel ana-0.10.14 my-release-dir;
cd my-release-dir;
sit_setup;
addpkg ImgAlgos HEAD;
addpkg CSPadPixCoords HEAD;
scons -j 8;
<wait a few minutes until it is compiled>
<pick-up *.cfg files and run them>
psana -c psana-meci0114-r0050-exampleimgdump-cspadcalib.cfg
psana -c psana-meci0114-r0050-exampleimgdump-ndarrcalib.cfg
|
These example print too much, but this is an intentional example. Level of verbosity can be controlled by the print_bits
parameter for each module.
Configuration files
- psana-meci0114-r0050-exampleimgdump-cspadcalib.cfg - use sequence of CsPadCalib, CSPadImageProducer, and ExampleDumpImg modules
works with int16_t data on all stages until ExampleDumpImg
- psana-meci0114-r0050-exampleimgdump-ndarrcalib.cfg - use sequence of CSPadNDArrProducer, NDArrCalib, CSPadImageProducer, and ExampleDumpImg modules
CSPadNDArrProducer - creates ndarray<const T,3> for a few generic data types,
NDArrCalib - may apply more corrections than CsPadCalib.
ExampleDumpImg - also may process a few data types such as int16_t, int, float, and double.
Other option to save image in 16-bit tiff files
Psana can use python modules. A few modules in package pyimgalgos were recently developed to process CSPAD data.
Psana Module Catalog - Package pyimgalgos
Psana Module Examples - Examples for Package pyimgalgos
In particular, module pyimgalgos.image_save_in_file
may save image in 16-bit tiff files.
Display tiff image
To display image from tiff file use display
command:
display <file-name>.tiff
then
- left mouse click on image
- click on "Enhance" button
- click on "Equalize" button
Other option - use ImageJ
command:
/reg/common/package/imagej/ImageJ <file-name>.tiff
Check tiff file
To check tiff file format one may use command:
% identify -verbose <file-name>.tiff
which prints information about tiff file structure. For example,
Code Block |
---|
% identify -verbose cspad.0-r0376-e00000001-20131110-101546.244253562.tiff
Image: cspad.0-r0376-e00000001-20131110-101546.244253562.tiff
Format: TIFF (Tagged Image File Format)
Class: PseudoClass
Geometry: 1750x1750
Type: Grayscale
Endianess: MSB
Colorspace: Gray
Channel depth:
Gray: 16-bits
Channel statistics:
Gray:
Min: 0 (0)
Max: 16383 (0.249989)
Mean: 1023.37 (0.0156156)
Standard deviation: 2132.77 (0.0325439)
Colors: 65536
...
|
Convert uint16 tiff to int16 tiff
Eric Galtier found the way to change file format record for tiff file using convert command:
convert input_file.tiff -define quantum:format=signed output_file.tiff
Other option for floating point conversion: -define quantum:format=floating-point
Examples for cxi86415
This test is done by request
Note |
---|
Loh, Ne-Te writes: |
Standard configuration file
Use psana configuration file psana-cxidg3-cspad2x2-NDArrAverage.cfg (download), which can be executed by command:
Code Block |
---|
sit_setup
psana -c psana-cxidg3-cspad2x2-NDArrAverage.cfg exp=cxi86415:run=7 |
This job produces 3 files with cspad2x2 shaped arrays for averaged, rms, and maximal intensities.
These arrays can be plotted by the command
Code Block |
---|
plims cspad2x2-ndarr-ave-cxi86415-r0007.dat |
Results for runs 7, 62, and 83 are shown on plots:
These plots show that the dark level is consistent with zero and does not indicate on any offset.
Loh's configuration file
Use configuration file from Loh's e-mail orig.cfg (download)
with minor modifications
- add psana parameters in the header, add list of modules
- remove
typeGroupname = CsPad:CalibV1 from
[CSPadPixCoords.CSPad2x2ImageProducer:2]
- add module
ImgAlgos.ImgSaveInFile:2
just in order to save image:
Code Block |
---|
[psana]
files = exp=cxi86415:run=64
events = 10
modules = CSPadPixCoords.CSPad2x2NDArrProducer:2 \
ImgAlgos.NDArrCalib:2 \
CSPadPixCoords.CSPad2x2ImageProducer:2 \
ImgAlgos.ImgSaveInFile:2
<code from e-mail is here>
[ImgAlgos.ImgSaveInFile:2]
source = DetInfo(CxiDg3.0:Cspad2x2.0)
key = reconstructed
fname = img-cspad2x2-dg3
ftype = txt
#saveAll = true
print_bits = 3
eventSave = 9 |
Run it with command:
Code Block |
---|
psana -c orig.cfg |
which produces file with image for event #9, which can be viewed as
Code Block |
---|
plims img-cspad2x2-dg3-cxi86415-r0064-e00000009-20150308-162942.145136207.txt |
ang brings us an image: - the same image, but spectrum is shown in the range (-100, 100) ADU. This event looks good.
Event #36: looks like left-side sensor is not corrected for common mode fluctuation...
In stead of default common_mode parameters (1,25,25,100) let us try (1,50,10,100) in the file
Code Block |
---|
/reg/d/psdm/CXI/cxi86415/calib/CsPad2x2::CalibV1/CxiDg3.0:Cspad2x2.0/common_mode/9-end.data |
The same image looks better now:
Recommendation: try to play with common mode parameters.
References
NDArrAverage module