Content
Introduction
This note explains organization and content of the calibration store, tools for maintenance and use of calibration parameters, and useful references to othe confluence documents.
Calibration store use regular file system to accumulate calibration files with a few simple rules about organization of the calibration store.
All calibration parameters are saved in text files. Full path to calibration file accounts for software version, detector location and name, calibration parameter type, parameters' validity run range.
Advantage or this approach: clean, simple structure of the calibration store structure and files' content with sufficient flexibility for analysis of data. Although, it is not recommended, regular OS tools can be used to browse, modify, re-locate files.
Location
Directory containing calibration files is located at the same level as directories with data xtc
or hdf5
files:
/reg/d/psdm/<INSTRUMENT>/<experiment>/xtc /reg/d/psdm/<INSTRUMENT>/<experiment>/hdf5 /reg/d/psdm/<INSTRUMENT>/<experiment>/calib
Full path to the calibration file consists of a few sub-directories under the calib
directory, representing functional logical layers:
/reg/d/psdm/<INSTRUMENT>/<experiment>/calib/<calib-version>/<data-source>/<type>/<file>
where
<calib-version>
- is a directory reserved for different versions of calibration software. For each detector type it is defined through the dictionary.<data-source>
- actual source of data. Each detector has an unique name in DAQ, which also includes its position. For example:CxiDs1.0:Cspad.0
,CxiDg1.0:Tm6740.0
,CxiEndstation.0:Opal2000.1
, etc.<type>
- type of calibration files:pedestals,
pixel_rms,
pixel_status,
pixel_mask,
pixel_gain,
pixel_bkgd,
common_mode,
filter,
geometry
, etc.- (
center, tilt, marg_gap_shift
, etc. are deprecated types).
<file>
- calibration file name consisting of the validity run range and extension .data. For example:3-15.data
,1-end.data
,7-end.data
, etc.
Example:
/reg/d/psdm/CXI/cxi12315/calib/CsPad::CalibV1/CxiDs1.0:Cspad.0/pedestals/1-end.data
Tools
Calibration management tool
Calibration Management Tool - is a central tool for maintenance of calibration store. It allows to create,deploy, modify, and re-locate calibration files.
Apply calibration in psana
Intensity correction
Image intensity correction can be done with psana module ImgAlgos::NDArrCalib.
Geometry
Image reconstructed with geometry file can be obtained with module ImgAlgos::NDArrImageProducer.
Information about pixel coordinates, indexes in the image, areas, mask, etc. can be produced with ImgAlgos::PixCoordsProducer.
Ditrect access to calibration parameters in code
- class PSCalib::CalibParsStore - C++ interface to correction intensity parameters.
- class PSCalib::GeometryAccess - C++ interface to geometry parameters.
- class PSCalib.GeometryAccess - Python interface to geometry parameters.
References