Page History
...
instrument and experiment-independent path to calibration directory and file
- /reg/g/psdm/<PATH>/detector/calib/
<dettype>/<dettype>-<detid>.h5
...
experiment-dependent path to calibration directory and file
- /reg/d/psdm<PATH>/<INS>/<experiment>/calib/
<dettype>/<dettype>-<detid>.h5
...
local calib path to calibration directory and file
- <path><path-to-calib>/calib/
<dettype>/<dettype>-<detid>.h5
...
direct path to calibration file
- <path><path-to-calib>/<dettype>-<detid>.h5
Structure of calibration directory
Everything in lower case:
Code Block |
---|
<path><path-to-calib>/calib/ # top calib directory <dettype>/ # detector type folders cspad2x2/ pnccd/ epix100a/ cspad/ <files> # level of files <aliases1>.als # file with a map of aliases to detector names ... <aliasesN>.als # one of these files can be used to map "sources" to detector names <dettype>-<detid>.h5 # files with detector-dependent calibration data <dettype>-<detid>.h5 |
- The
calib
directory is a top level DCS directory. - Detector type
<dettype>
folders are used to organize files under thecalib
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 hardware configuration version. If the detector hardware configuration is changing a 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'
) could be presented in the dictionary of aliases.
...
Below are the lists of metadata fields which potentially can be used to define detector configuration, calibration parameters etc.
Detector metadata
Field name | Description | More details, example |
---|---|---|
dettype | detector type | CSPAD, CSPAD2X2, EPIX100A, etc. |
detname | detector unique name | (if any) ex.: Camera1 |
detalias | alias name | if it is hard to memorize the entire name, ex.: 'cspad1' |
detidx | detector index | integer number which codes the hardware version |
detidxalias | symbolic alias of the index | can be used if it is hard to memorize the index integer number |
detcompidx:001 | list of component indexes | just in case if we are going to retrieve calibration parameters for separate components |
detidxprev | detector index for previous version | detector index for previous version (if available) for the purpose of old calibration search |
detidxnext | detector index for next version | detector index for next version (if available) for the purpose of new calibration search |
dettsec | time-stamp | time stamp associated with beginning of the validity range for new configuration |
detcom:001 | comments for this hardware version | as it says {key:comment} |
detpar:001 | other parameters | just in case if something is forgotten in this table |
Calibration parameters' metadata
Field name | Description | More details, example |
---|---|---|
calibtype | calibration type | ex.: geometry, pixel_status, pixel_gain, pedestals, common_mode, etc. |
tsec | time stamp | beginning of the validity range |
exp | original experiment | (if available) where calibration constants were obtained |
runnum | original run number | (if available) where calibration constants were obtained |
runbegin | begin run number | (if available) for validity range |
runend | end run number | (if available) for validity range |
source | original DAQ data source | data source from DAQ, ex.: 'CxiDs2.0:Cspad.0' |
srcalias | data source alias | ex.: 'cspad' |
calibvers | version par | in order to access using symbolic name or some alias |
calibversalias | version alias | if it is hard to memorize version par |
com:001 | comments for this version | as it says {key:comment} |
par:001 | other parameters | just in case if something is forgotten in this table |
In case of numpy array their metadata are stored with an object.
Text file needs in n-d array metadata
n-d array metadata
Field name | Description | More details, example |
---|---|---|
DTYPE | (str) data type | int, float, double, etc. |
NDIMS | (int) number of dimensions (N) | ex.: 3 |
DIM:1 | (int) size of dim.1 | ex.: 185 |
DIM:2 | (int) size of dim.2 | ex.: 388 |
... | ... | ... |
DIM:N | (int) size of dim.N | ex.: 2 |
API
Parameters
dettype
(str) - detector type: cspad, cspad2x2, pnccd, fccd, opal, epix100a
, etc.
...
versind
(int) - consecutive version index assigned/mapped to the version production time stamp.
Initialization
Code Block |
---|
# Import from PSCalib.DCStore import DCStore # inport DCStore (Detector Calibration Store) object # Initialization REPO = '/reg/g/psdm/<PATH>/detector/calib' # default calib repository cdir = env.calibDir() # '/reg/d/psdm/<PATH>/<INS>/<experiment>/calib' - accept current directory path = cdir + <dettype> fname = '[path/]pnccd-12345678' # standard name includes detector type, dash, and n-digit id number fname = '[path/]Camera1' # alias cs = DCStore(fname) # creates a DCStore object. """ get calibration store object Input parameters: fname [str] - file name/alias of the detector """ |
...
- logic for default version
- always last added constants
- set specified version
- what to do with default if new version is added?
- when constants are updated (file open to write) they are not available... Lock to resolve.
...
- table of aliases with records: <alias> <source> <begin> <end>
- repository
- <PATH>
//reg/g/psdm/detector/calib
"g" or "d" - epix100a full name - 6 numbers of hardware versions, firmware version is a 7th number
- time double to two integers or int64 (32bit-sec, 32-bit-nsec)
- geometry needs to be saved as a text
- repository file has
geometry
andpixel_gain
- like constants - do not search in
<experiment>/calib
- access through network for AMI (cpo: TCP with hardwired IP addresses, m:web service/reddis)
References
- Calibration Store
- Path to data and calibration constants for psana in LCLS1
- Unix time
- ISO 8601 time format
...
Overview
Content Tools