Page History
...
Most generic way to subtract the CSPad pedestals is to use Translator, as described in CsPad calibration in translator. In this case the If calibration is requested in the Translator the output HDF5 file has the CSPad image data with already subtracted pedestals. Otherwise, Translator saves raw CSPad data in HDF5 file. If the job execution time is not an issue, the pedestals can be subtracted from raw data directly in code, as explained in this section.
...
CSPad pedestals are usually calibrated using the "dark" runs. If they were calibrated, the files for appropriate run range, <run-range>.dat
, can be found in the directory
/reg/d/psdm/<INSTRUMENT>/<experiment>/calib/<calib-version>/<source>/pedestals/
or directly in HDF5 If the pedestal file was available at translation time, the dataset
/Configure:0000/CsPad::CalibV1/XppGon.0:Cspad.0/pedestals
is saved in the HDF5 file and can be accessed directly.
One may prefer to calibrate and keep pedestal files in the local directory, as explained below.
How to calibrate CSPad pedestals
If the CSPad pedestals were not calibrated, they can be easily calibrated, as explained in
the description of the CsPadPedestals psana module. Essentially, one need to run the psana
for cspad_mod.CsPadPedestals
module, using the command
psana -m cspad_mod.CsPadPedestals input-files.xtc
which by default produce two files:
cspad-pedestals.dat
– for average values, andcspad-noise.dat
– for standard deviation values.
These files can be accessible loaded in code as explained below.
...
Assuming that the CSPad event array ds1ev
and the pedestal array ped_arr
are available,
the pedestals can be subtracted by the single operation for numpy arrays:
...