Page History
Content
Table of Contents |
---|
Purpose
- short-term goal - support in a single place detectors moving across LCLS experiments.
- perspective goal - calibration store for LCLS-II
...
- 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 can ONLY be done through the API/GUI.
- time stamp (sec) is THE ONLY value for validity range check.
- <detname> === is equivalent to <dettype>-<detid> and is THE ONLY choice for the official file name. This name is mapped from other aliases.
...
Code Block |
---|
<path>/calib/ <dettype>/ cspad2x2/ pnccd/ epix100a/ cspad/ aliases # file with a map of aliases to detector names <calib<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. Current sources (ex: 'Camp.0:pnCCD.1' ) should be presented in the dictionary of aliases.
...
The scheme of the calibration data, which presumably will be implemented in <dettype>-<detid>.h5
Code Block |
---|
/ / # top-root-level contains info for the unique detector version dettype (str) # detector type name, ex: cspad, pnccd, etc detid (str) # unique detector id, ex: 01234 tscfile (uint) tstamp_created (uint) # time stamp of creation of this structure predecessor (str) # name of the previous detector if available or None successor (str) # name of the next detector if available or None tags (dict) tags (dict) # dictionary of tags associated with this version of detector <ctype>/ # dictionary of tags associated with this version of detector <ctype>/ # folder for calibration type <tstamp-range>/ # folder for calibration type # folder for time stamp validity range <tstamp-range>/ <tstamp>[-<tstamp-end>]/ # folder for time stamp validity range . If <tstamp-end> is not specified - then valid to the end <tstamp>[-<tstamp-end>]/ tsbegin (uint) # folder for validity range. If <tstamp-end># istime notstamp specifiedfor -the thenbeginning validof tothe thevalidity endrange tsend (uint) tstamp_begin (uint) # time stamp for the beginningend of the validity range defaultv tstamp_end (uint) # reference to the default calibration, ex: <vers-tstamp2> # time stamp for the end of the validity range tags (dict) # default_versiondictionary of tags associated with validity range # reference to the default calibration, ex: <vers-tstamp2> <vers-tstamp1>/ # folder for version created on tstamp1 tags (dict) # dictionary of tags associated with validity range tsprod (uint) # tstamp1 of this version production <vers-tstamp1>/ calib #(ndarray) folder for version created# oncalibration tstamp1data tags (dict) # dictionary of tags, tstamp_prod (uint) # tstamp1 of this version production # ex: array size, number of calib (ndarray) # calibration datadimensions, shape, data type, experiment, run, comments, author <vers-tstamp2>/ # folder for version created on tstamp2 tags (dict) # dictionary of tags, tstamp_prod (uint) calib (ndarray) # ex: array size, number of dimensions, shape, data type, experiment, run, comments, author tags (dict) <tstamp2>[-<tstamp2-end>]/ <vers-tstamp2>/ # folder for versionthe creatednext onvalidity tstamp2range. pedestals/ # folder for the next calibration tstamp_prod (uint)type, pedestals rms/ # calib (ndarray) tags (dict) <tstamp2>[-<tstamp2-end>]/folder for the next calibration type, rms |
Scheme features
- 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.
*
Management methods
Code Block |
---|
tscfile = cs.tscfile() # (int) time stamp of the file creation dettype = cs.dettype() # (str) detector type detid = cs.detid() # (str) detector #id detname folder for the next validity= rangecs. detname() # (str) detector name of self object predecessor pedestals/= cs.predecessor() # (str) detname of predecessor or None successor = cs.successor() # (str) detname of successor or None tags = cs.tags() # (dict) dictionary of tags associated with #this folderdetector ctypes for the next calibration type, pedestals = cs.ctypes() # (list) calibration types in the file tsranges rms/ = cs.tsranges(ctype) # (list) of time ranges for ctype ctypegrp = cs.ctypegrp(ctype) # (str) tath to the calibration tyoe group. tsrgrp = cs.tsrgrp(ctype, tsrange) # (str) time stamp validity range group tsbegin = cs.tsbegin(tsrgrp) # folder for the next calibration type, rms |
Scheme features
- 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.
# (int) time stamp beginning validity range
tsend = cs.tsend(tsrgrp) # (int) time stamp beginning validity range
versdef = cs.versdef(tsrgrp) # (???) reference to the default version in the time-range group
______________________
tsr = tsrange(tsbegin, tsend) # string <tsbegin-tsend>
cs.addcalib(ctype, nda, tsr)
cs.delete(ctype, tsr)
cdic = cs.getdict(ctype) |
*
Data and metadata in tags
...
Code Block |
---|
p = tstamp parameter to identify constants, which can be retrieved from evt.run() - run number, evt
nda = cs.get(ctype, p) # where ctype stands for pedestals, status, rms, geometry, etc.
# or specific access methods:
nda = cs.pedestals(p)
nda = cs.pixel_status(p)
nda = cs.pixel_rms(p)
nda = cs.pixel_mask(p)
nda = cs.pixel_gain(p)
nda = cs.pixel_bkgd(p)
nda = cs.common_mode(p)
geo = cs.geometry(p) |
Management methods
Code Block |
---|
cs.addcalib(ctype, nda, p) cs.delete(ctype, p) cdic = cs.getdict(ctype) |
TBD
Open questions
- What is included in the detector Id version? FEE version, controller version, etc?
- when constants are updated (file open to write) they are not available... Lock to resolve.
...
Overview
Content Tools