src::det_interface Namespace Reference


Functions

def Detector
def DetNames


Function Documentation

def src::det_interface::Detector (   name,
  local_env = None,
  accept_missing = False 
)

Create a python Detector from a string identifier.

Parameters
----------
source_string : str
    A string identifying a piece of data to access, examples include:
      - 'cspad'                  # a DAQ detector alias
      - 'XppGon.0:Cspad.0'       # a DAQ detector full-name
      - 'DIAG:FEE1:202:241:Data' # an EPICS variable name (or alias)
      - 'EBeam'                  # a BldInfo identifier\n
    The idea is that you should be able to pass something that makes
    sense to you as a human here, and you automatically get the right
    detector object in return.

local_env : psana.Env
    The psana environment object associated with the psana.DataSource
    you are interested in (from method DataSource.env()).

accept_missing : bool
    If False, KeyError exception will be raised if "name" is not
    present in the current DataSource.  If True, an object will
    be returned that returns None for all method calls.  This allows
    software to not crash if a detector is missing from a run.

Returns
-------
A psana-python detector object. Try detector(psana.Event) to
access your data.

HOW TO GET MORE HELP
--------------------
The Detector method returns an object that has methods that
change depending on the detector type. To see help for a particular
detector type execute commands similar to the following

env = DataSource('exp=xpptut15:run=54').env()
det = Detector('cspad',env)

and then use the standard ipython "det?" command (and tab completion) to
see the documentation for that particular detector type.

Definition at line 13 of file det_interface.py.

Referenced by BOOST_AUTO_TEST_CASE(), initName2Det(), and parseDetInfo().

def src::det_interface::DetNames (   nametype = 'detectors',
  local_env = None 
)

Return tuples of detector names.  Nametype should be one of
'detectors','epics','all'.  'detectors' returns the names of all standard
detectors included in the data.  'epics' returns the names of all epics
variables (epics variables are typically updated at 1Hz with information
about slow quantities like temperatures, voltages, motor positions).
'all' returns both of the above.

Each detector can have 3 names: a "full name", a simpler "daq alias", or a
"user alias".  The last two are optional.

This routine takes an optional "DataSource.Env" argument.  If not provided
the Env from the most recently created DataSource will be used.  It typically
only needs to be specified when using multiple DataSource instances simultaneously.

Definition at line 80 of file det_interface.py.


Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7