To translate the detector interface, in the web portal of experiments, under configuration (for either the standard or monitoring translator) note that by default the configuration file is like

data/Translator/automatic_translation.cfg

change this to

data/Translator/detector_xface_translation.cfg

This loads a different module to produce calibrations. Users may want to do some configuration, in which case they should copy the file

/reg/g/psdm/sw/releases/ana-current/data/Translator/detector_xface_translation.cfg

to their own file that they modify. This file provides the most current documentation for how to configure the module. It defaults to finding all area detectors and calling the 'det.image() function on them. These output images are translated. There is an option to use the det.calib function as well. The module also defaults to translating the original raw data periodically for comparison, and an option to control the array data type. Here is relevant content of the detector_xface_translation.cfg file at this point:

# set raw_freq to n to include standard translation of detectors n shots.
# set to 1 to include all standard, but set to 0 or something negative
# to never include standard. Use something prime in case it helps with
# time bias
raw_freq = 109
# choices for detmethod are image, calib or raw. raw will be significantly faster,
# but not include any calibrations
detmethod = image
# convert calibrated detector results to int16. Results are clipped, to if gain
# caused the dectector to go outside [-32768, 32767], those values will be clipped 
# to those boundary values. Good for filesize, but lose some precision from calibration
convert_to_int16 = False

Schema Changes

Note - the location of the calibrated output is in a different location in the hdf5 schema - below we describe this. 

Suppose we translated a run with Epix 100a and cspad2x2. If we use the hdf5 groups h5ls tool to get a listing of the h5 file, we find the following:

 

First the usual configuration data for the types (most users do not need to look at this):

/Configure:0000/Epix::Config100aV2 Group
/Configure:0000/Epix::Config100aV2/XcsEndstation.0:Epix100a.0 Group
/Configure:0000/Epix::Config100aV2/XcsEndstation.0:Epix100a.0/asicPixelConfigArray Dataset {704, 768}
/Configure:0000/Epix::Config100aV2/XcsEndstation.0:Epix100a.0/asics Dataset {4}
/Configure:0000/Epix::Config100aV2/XcsEndstation.0:Epix100a.0/calibPixelConfigArray Dataset {2, 768}
/Configure:0000/Epix::Config100aV2/XcsEndstation.0:Epix100a.0/config Dataset {SCALAR}

/Configure:0000/CsPad2x2::ConfigV2 Group
/Configure:0000/CsPad2x2::ConfigV2/XcsEndstation.0:Cspad2x2.4 Group
/Configure:0000/CsPad2x2::ConfigV2/XcsEndstation.0:Cspad2x2.4/config Dataset {SCALAR}

For the event data, one looks in these locations:

/Configure:0000/Run:0000/CalibCycle:0000/ndarray_float32_2/XcsEndstation.0:Epix100a.0__epix100a_ladm:image Group
/Configure:0000/Run:0000/CalibCycle:0000/ndarray_float32_2/XcsEndstation.0:Epix100a.0__epix100a_ladm:image/_damage Dataset {10/Inf}
/Configure:0000/Run:0000/CalibCycle:0000/ndarray_float32_2/XcsEndstation.0:Epix100a.0__epix100a_ladm:image/_mask Dataset {10/Inf}
/Configure:0000/Run:0000/CalibCycle:0000/ndarray_float32_2/XcsEndstation.0:Epix100a.0__epix100a_ladm:image/data Dataset {10/Inf}
/Configure:0000/Run:0000/CalibCycle:0000/ndarray_float32_2/XcsEndstation.0:Epix100a.0__epix100a_ladm:image/time Dataset {10/Inf}

/Configure:0000/Run:0000/CalibCycle:0000/ndarray_float32_2/XcsEndstation.0:Cspad2x2.4__cspad2x2_ladm:image Group
/Configure:0000/Run:0000/CalibCycle:0000/ndarray_float32_2/XcsEndstation.0:Cspad2x2.4__cspad2x2_ladm:image/_damage Dataset {10/Inf}
/Configure:0000/Run:0000/CalibCycle:0000/ndarray_float32_2/XcsEndstation.0:Cspad2x2.4__cspad2x2_ladm:image/_mask Dataset {10/Inf}
/Configure:0000/Run:0000/CalibCycle:0000/ndarray_float32_2/XcsEndstation.0:Cspad2x2.4__cspad2x2_ladm:image/data Dataset {10/Inf}
/Configure:0000/Run:0000/CalibCycle:0000/ndarray_float32_2/XcsEndstation.0:Cspad2x2.4__cspad2x2_ladm:image/time Dataset {10/Inf}

We brake down names in the path:

ndarray_float32_2 - this means the final data will be a 2D array of float32. In the future we may write int16, or assembled 3D arrays, but presently, just 2D image output.

XcsEndstation.0:Epix100a.0__epix100a_ladm:image - this is the original DAQ source, separated by double underscore __ with a more meaningful name. The more meaningful name is the DAQ alias, :image. Note, if the detector was not given a DAQ alias name, no calibrated data for it will be produced.

The datasets in that group - data, time, _mask and _damage are as usual with the Translator.

Calibration data will be found here:

/Configure:0000/Run:0000/ndarray_float32_2/XcsEndstation.0:Epix100a.0__epix100a_ladm:gain Group
/Configure:0000/Run:0000/ndarray_float32_2/XcsEndstation.0:Epix100a.0__epix100a_ladm:gain/data Dataset {704, 768}
/Configure:0000/Run:0000/ndarray_float32_2/XcsEndstation.0:Epix100a.0__epix100a_ladm:pedestals Group
/Configure:0000/Run:0000/ndarray_float32_2/XcsEndstation.0:Epix100a.0__epix100a_ladm:pedestals/data Dataset {704, 768}

/Configure:0000/Run:0000/ndarray_float32_3/XcsEndstation.0:Cspad2x2.4__cspad2x2_ladm:gain Group
/Configure:0000/Run:0000/ndarray_float32_3/XcsEndstation.0:Cspad2x2.4__cspad2x2_ladm:gain/data Dataset {2, 185, 388}
/Configure:0000/Run:0000/ndarray_float32_3/XcsEndstation.0:Cspad2x2.4__cspad2x2_ladm:pedestals Group
/Configure:0000/Run:0000/ndarray_float32_3/XcsEndstation.0:Cspad2x2.4__cspad2x2_ladm:pedestals/data Dataset {2, 185, 388}

Notice the similar schema, but calibration data is in the Run:0000 group. Whatever calibrated data is available through the Detector interface (i.e, pedastals, gain, etc) will be translated and placed as above.

For comparison, this mode of running the Translator will translate every 109th instance of the original detectors, placed in the usual Translator location - this is different then before, users looking for calibrated cspad2x2 in the standard location will in fact find raw cspad2x2. For reference, these locations are places like

/Configure:0000/Run:0000/CalibCycle:0000/CsPad2x2::ElementV1/XcsEndstation.0:Cspad2x2.4 Group
/Configure:0000/Run:0000/CalibCycle:0000/Epix::ElementV3/XcsEndstation.0:Epix100a.0 Group

 

 

 

 

 

 

  • No labels