Page History
The list of detector names in a run can be found from the command line like this:
Code Block |
---|
detnames exp=xpptut15:run=59 (print out names of standard detectors)
detnames -e exp=xpptut15:run=59 (print out names of EPICS variables) |
The same information can be obtained in a python script like This script lives in /reg/g/psdm/tutorials/examplePython/evtNames.py and demonstrates how to print out the names of the high-rate detectors and lower-rate "EPICS variables" (like temperatures/voltages). The high-rate detectors include both hutch-specific detectors and detectors that live outside the hutch ("Beam Line Data", or "BLD"). The printing of all epics names has been commented out because there are many of them.detNames.py:
Code Block |
---|
from psana import * ds = DataSource('exp=xpptut15:run=59:smd') epicsdetNames = ds.envDetNames().epicsStore() for nevent,evt in enumerate(ds.events()): for key in evt.keys epicsNames = DetNames('epics') print '*** Detector Names (Full-Name, DAQ-Alias, User-Alias) ***' for detname in DetNames(): print key # print epics.names() print 'There are',len(evt.keys()),'detectors in this event and',len(epics.names()),'slower EPICS variables' print 'The first detector is named',evt.keys()[0],'and the first epics variable is named',epics.names()[0] break |
These outputs include both the "full" names and simpler "aliases", for both the high-rate detectors and the EPICS variables. We recommend using the simpler aliases when they are available. For example this line of output shows the full-name "XppGon.0:Cspad.0", and the simpler alias "cspad":
Code Block |
---|
EventKey(type=psana.CsPad.DataV2, src='DetInfo(XppGon.0:Cspad.0)', alias='cspad') |
detname
print '*** Some Epics Names (Full-Name, DAQ-Alias, User-Alias) ***'
for ename in epicsNames[:4]: print ename # only print a few |
In general, each detector can have 3 names. Only the first is guaranteed to exist for all detectors:
- a "full-name" defined by the DAQ which can be complex
- a "daq-alias" defined by the DAQ at the time when data is taken
- a "user-alias" defined by the user on a per-experiment basis (to be implemented)
...