You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Content

Intro

This page describes mechanism of calibration constants dynamic generation and access for multi-panel jungfrau detector. This is relevant to rarely changed constants of types gain and offset, e.g. for single-panel detector

  • gain:  shape:(3, 1, 512, 1024)  size:1572864  dtype:float32
  • offset:  shape:(3, 1, 512, 1024)  size:1572864  dtype:float32

which are combined from 3 per-panel files with shape (512, 1024).

Naming conventions

Since psana.Jungfrau.ConfigV3 Jungfrau provides per-segment access to class ModuleConfigV1 object with three methods

  • moduleVersion()
  • firmwareVersion()
  • serialNumber()

returning 64-bit integer numbers. For better human readability the segment Id name can be formatted as '%020d-%020d-%020d', e.g. "00000000000001508613-00000000000003997943-00000022630721062933".

Then, total Jungfrau Id is a variable-length dash separated combination of sequential segment Id names, i.g. for two segments of exp=xcsls3716:run=631, XcsEndstation.0:Jungfrau.0 Id is 000000000001508613-000022630721062933-000000000003997872-000000000001508613-000022630721062933-000000000003997943.

Method returning Jungfrau and its segments' Ids is implemented in  Detector/src/UtilsJungfrau.py, and can be used as shown in example:

import psana
from Detector.UtilsJungfrau import id_jungfrau

ds  = psana.DataSource('exp=xcsls3716:run=631')
src = psana.Source('XcsEndstation.0:Jungfrau.0')
co  = ds.env().configStore().get(psana.Jungfrau.ConfigV3, src)

print('id_jungfrau(co,0)', id_jungfrau(co,0))
print('id_jungfrau(co,1)', id_jungfrau(co,1))
print('id_jungfrau(co)  ', id_jungfrau(co))

prints something like

id_jungfrau(co,0): 00000000000001508613-00000022630721062933-00000000000003997872
id_jungfrau(co,1): 00000000000001508613-00000022630721062933-00000000000003997943
id_jungfrau(co)  : 00000000000001508613-00000022630721062933-00000000000003997872-00000000000001508613-00000022630721062933-00000000000003997943

Calibration production

For now firmware calibration is produced per segment (named as M044, M068, M088, etc.) for gain and offsets in /reg/g/psdm/detector/gains/jungfrau, e.g.:

/reg/g/psdm/detector/gains/jungfrau/M088/g0_gain.npy
/reg/g/psdm/detector/gains/jungfrau/M088/g0_offset.npy
/reg/g/psdm/detector/gains/jungfrau/M088/g1_gain.npy
/reg/g/psdm/detector/gains/jungfrau/M088/g1_offset.npy
/reg/g/psdm/detector/gains/jungfrau/M088/g2_gain.npy
/reg/g/psdm/detector/gains/jungfrau/M088/g2_offset.npy

For auto-generation of calibration files it is suggested to

  • keep segment calibration files under /reg/g/psdm/detector/gains/jungfrau/
  • use segment Id names in stead of M088 etc
  • keep the same naming conventions for gain range and type (g1_gain.npy, g1_offset.npy, g2_gain.npy, etc.)
  • versions?

Calibration file for particular detector can be generated dynamically using names of its segments from configuration data. Thus generated file can be deployed in the calib or "generic" repository.

Questions

  • prefix zeroes in the name
  • calibration versions

References

 

 

 

 

  • No labels