Page History
...
- instrument independent - detector can be moved between instruments and hatches
- experiment independent - detector can be moved between experiments
- portability - calibration data for particular detector should be portable as a self consistent file
- combination of FS & DB files (hdf5 for uniformity)
- management model - calibration data should be managed through API only in order to prevent adding/removing unknown files without history
- API + GUI for central management
- deployment -
- time stamp (sec) is THE ONLY value for validity range check.
- <detname> === <dettype>-<detid> is THE ONLY choice for the official file name. This name is mapped from other aliases.
Location of calibration directory and files
...
Code Block |
---|
<path>/calib/ <dettype>/ cspad2x2/ pnccd/ epix100a/ cspad/ <calib-files> aliases # file with a map of aliases to detector <dettype>-<detid>.h5names <dettype>- <calib-files> <dettype>-<detid>.h5 <dettype>-<detid>.h5 |
Detector type <dettype> is used as a folder to organize files under the calib directory. In case of direct access to the hdf5 file the detector type is duplicated in the name of the file. Unique part of the detector name <detid> is used to assign calibration file to the particular detector version. If the detector is changing the new calibration file is created with new <detid>. Information about predecessor and successor (if available) can be saved under the root level of the calibration file.
Calibration data hierarchical scheme
Current sources (ex: 'Camp.0:pnCCD.1' ) should be presented in the dictionary of aliases.
Calibration data hierarchical scheme
Access Access to calibration data is based on time stamp. Time stamp internally is presented in Unix time sec which can be easily converted forth and back to human readable format YYYY-MM-DDTHH:MM:SS+HH:MM
...
Code Block |
---|
# Import from PSCalib.CalibStore import CalibStore # Initialization CPATH_DEF = '/reg/g/psdm/detector/calib' # default calib directory cpath = '<path>/calib' # local calib directory cpath = '<path>/<detname>-<detid>.h5' # direct to file cpath = env.calibDir() # '/reg/d/psdm/<INS>/<experiment>/calib' - accept current directory detname = 'pnccd-12345678' # standard name includes detector type, dash, and n-digit id number detname = 'Camera1' # alias detname = 'Camp.0:pnCCD.1' # accept source runnum = 10 = 'Camera1' # or evt.run()alias cs = CalibStore(cpath, detname) """ get calibration store object Input parameters: cpath [str] - path to the hdf5 file or calibration directory. If cpath is a path to hdf5 file - next parameter is ignored. If cpath=None - default path is used. If cpath is specified as a path to directory (or default) then detname can be an alias. detname [str] - name/alias of the detector """ |
...