Page History
...
Code Block |
---|
# Import from PSCalib.DCStore import DCStore # inport DCStore (Detector Calibration Store) object # Initialization CPATH_DEFREPO = '/reg/g/psdm/detector/calib' # default calib directory cpath = '<path>/calib' # localdefault calib directory cpath = '<path>/<dettype>-<detid>.h5' # direct to file cpathrepository cdir = env.calibDir() # '/reg/d/psdm/<INS>/<experiment>/calib' - accept current directory path = cdir + <dettype> detnamefname = '[path/]pnccd-12345678' # standard name includes detector type, dash, and n-digit id number detnamefname = '[path/]Camera1' # alias cs = DCStore(cpath, detname) # creates a DCStore object. """ 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. cs = DCStore(fname) If cpath is specified# ascreates a path to directory (or default) then detname can be an alias. detname DCStore object. """ get calibration store object Input parameters: fname [str] - file name/alias of the detector """ |
- If path is missing - use repository.
- If calibration file is not found - throw raise IOError('File %s is not available' % fname)
UI acess methods
Code Block |
---|
ctype = pedestals # status, rms, mask, gain, bkgd, common_mode, geometry, etc
tsp = tstamp parameter to identify constants, which can be retrieved from evt.run() - run number, evt
vers = None # for default or versind or version time stamp.
# generic access method:
obj = cs.get(ctype, tsp, vers=None)
|
Base class DCBase
Is reserved to support common methods of all project classes. For now it stands for manipulations with tags but not limited to.
...
Overview
Content Tools