Versions Compared

Key

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

...

https://github.com/slac-lcls/smalldata_tools/blob/master/examples/SmallDataProducer_userData.py
Each of the supported feature extraction/data reduction mechanism is described in their own subpages.
The common structure of adding user data is the addition of a "DetObject" for each detector you would like to extract information from to the producer python file. The relevant lines look like this:

 

 

Code Block
have_cs140_0 = checkDet(env, 'cs140_0')
if have_cs140_0:
    cs140_0 = DetObject('cs140_0' ,ds.env(), int(run), common_mode=1, name='vonHamos')
    cs140_0.<feature extraction function>                                  
    dets.append(cs140_0)
This structure allows detectors to be only processed when they appear. We loop over the list of DetObjects in the main event loop and for each detector, we get the data and attach it to the detector objects. This is followed by a loop through the list of data extraction methods that have been added in the code block above. 
Only the first three parameters in the DetObject definition are necessary. The name will default to the alias of the detector. The common_mode will default to the typically best one. The currently recommended methods are listed below:
  • CsPad, cs140k: of all tiles of detector will exhibit a zero-photon peak, use common_mode=1, otherwise we recommend no correction (common_mode=0). It is also possible to request the use of the unbounded pixels by using common_mode=5
  • Opal, Zyla: no common-mode correction. Should a pedestal of the correct shape have been produced, then it will be subtracted. common_mode=-1 will return the raw data.
  • Jungfrau: no common_mode correction is the default.
  • Epix: we are using a method called "common_mode=46" which removed pixels with a lot of signal (10x noise) and the neighbors. Then, the common_mode is calculated for reach row & column and then subtracted. This is similar to method 7 and different will be tested hopefully soon.

The common mode corrections are described <here> and DetObject simply wraps this.