Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It is assumed that hardware configuration of modern detectors will be associated with configuration index coming from DAQ. This index will be used to extract hardly retrievable calibration data such as geometry, gain factors etc. in case of transition of the detector from one experiment to another.

Architecture

Requirements

  • instrument Instrument independent - detector can be moved between instruments and hatches.
  • experiment Experiment independent - detector can be moved between experiments.
  • portability Portability - calibration data for particular detector should be portable as a self consistent file or (part of) calibration directory.
  • Combination 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  Management can ONLY be done through the API/GUI in order to prevent adding/removing unknown files without history.
  • time Time stamp (sec) is THE ONLY value for validity range check.
  • The <detname> is equivalent to <dettype>-<detid> and is THE ONLY choice for the official file name. This name is mapped from other to the custom names in the files with aliases.

Architecture

...

Calibration directory and files

Default calibration directory in LCLS  FS

instrument and experiment-independent path

...

  • /reg/d/psdm/<INS>/<experiment>/calib

In local space

define calib path

  • <path>/calib/
    assuming further structure of the calibration directory <dettype>/<dettype>-<detid>.h5

...

Code Block
<path>/calib/
             <dettype>/
             cspad2x2/
             pnccd/
             epix100a/
             cspad/
                       <aliases1>.ali                # file with a map of aliases to detector names
     cspad/
                  ...
     aliases                # file with<aliasesN>.ali a map of aliases to detector names
         # one of these files can be used to map "sources" to  detector <calib-files>names
                       <dettype>-<detid>.h5
                       <dettype>-<detid>.h5

...

  • Detector name consists of a common part <dettype> and unique part <detid>.
  • Alias to the detector name should be kept in separate dictionary outside the scheme.
  • Each detector may have optional predecessor, successor, and other tags in the dictionary.
  • Calibration type folders contain info about calibrations of particular type, ex: pedestals, rms, status, mask, background, etc.
  • Each calibration type contains a set of time stamp ranges defining calibration validity range. If the second time stamp of the range is missing it is considered as infinity (by the end).
  • The time stamp range folder contains tstamp_begin, tstamp_end (int) values, dictionary of tags associated with this folder, reference to the default calibration, and folders with calibration versions, distinguished by there production time stamp.
  • The number of calibration versions for each time stamp range is not limited. Default calibration is defined by the reference default_version.

*

Base class

 Access methods


Code Block
DCBase - base class for this project
====================================
tags        = obj.tags()                 # (dict) dictionary of tags associated with each object
tag         = obj.tag(k)                 # returns tag value for key k


 




 



 

Access methods

Code Block


DCStore methods
===============
tscfile     = cs.tscfile()               # (int) time stamp of the file creation
dettype     = cs.dettype()               # (str) detector type
detid       = cs.detid()                 # (str) detector id
detname     = cs.detname()               # (str) detector name of self object
predecessor = cs.predecessor()           # (str) detname of predecessor or None
successor   = cs.successor()             # (str) detname of successor or None
ctypes      = cs.ctypes()                # (list) calibration types in the file
cto         = cs.ctypeobj(ctype)         # (DCType ~ h5py.Group) calibration type object


DCType methods
==============
ctype       = cto.ctype()                # (str) of ctype name
tsranges    = cto.ranges()               # (list) of time ranges for ctype
tsro        = cto.rangeobj(tsrange)      # (DCRange ~ h5py.Group) time stamp validity range object


DCRange methods
===============
tsbegin     = tsro.begin()               # (int) time stamp beginning validity range
tsend       = tsro.end()                 # (int) time stamp ending validity range
versions    = tsro.versions()            # (list of uint) versions of calibrations
versdefversodef     = tsro.versdef()             # (DCVersion ~ h5py.Group) reference to the default version in the time-range object
verso       = tsro.versgrpversobj(vers)         # (DCVersion ~ h5py.Group) specified version in the time-range object


DCVersion methods
=================
tsversprodtsvers      = verso.tsprod()             # (int) time stamp of the version production
calibdata   = verso.calib()              # (np.array) calibration array

...