Area Detector Implementation Module

Module AD: Area-Detector access

These routines provide a general framework for control of Area Detectors (AD). Also included is a specific implementation for the commonly-used area detectors in 1-ID, which are summarized in Defined Commands, below.

Kludged: is added to all string caput calls (in AD_set())

Detector Access Routines

These routines are used to change or read parameters for detectors, or to show information about how these commands have been configured.

Access routines Description
AD_get() Read an area detector parameter
AD_set() Set an area detector parameter
AD_acquire() Set the filename, count time and frames and collect
AD_done() Test if the detector(s) have completed data collection
AD_show() Shows commands options for AD_get() and AD_set()
AD_cmds() Returns but does not print commands options for AD_get() and AD_set()

Detector Setup Routines

These routines are used inside the module and are likely only changed by beamline staff.

Setup routines Description
DefineAreaDetector() Define an area detector for later use
defADcmd() Define parameters to set up an area detector command

Defined Commands

Below are lists of the commands that can be used in AD_get() and AD_set(), for each detector (GE, Retiga, ScintX):

Defined commands for GE detectors

command Explanation data type validator
acquire Trigger Data collection int (1,)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
state Data collection state int None
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
state Data collection state int None
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
state Data collection state int None
trigger_mode Triggering: Angio=0, Rad=1, UserSingle=2, MultiDet=3 int (0, 1, 2, 3)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
state Data collection state int None
trigger_mode Triggering: Angio=0, Rad=1, UserSingle=2, MultiDet=3 int (0, 1, 2, 3)

Defined commands for Retiga detectors

command Explanation data type validator
acquire Trigger Data collection int (1,)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
transfer Transfer EPICS values to FPGA int (1,)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
transfer Transfer EPICS values to FPGA int (1,)
trigger_mode Triggering: free=0, edge: Hi=1, low=2, Pulse: Hi=3, low=5, soft=5, Strobe: Hi=6, low=7, last=8 int 0 <= val <= 8
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
transfer Transfer EPICS values to FPGA int (1,)
trigger_mode Triggering: free=0, edge: Hi=1, low=2, Pulse: Hi=3, low=5, soft=5, Strobe: Hi=6, low=7, last=8 int 0 <= val <= 8

Defined commands for ScintX detectors

command Explanation data type validator
acquire Trigger Data collection int (1,)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
state Data collection state int None
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
state Data collection state int None
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
state Data collection state int None
trigger_mode Triggering mode: Internal=0, External=1 int (0, 1)
command Explanation data type validator
acquire Trigger Data collection int (1,)
acquire_time Data collection time/frame (sec) float val > 0
autoincrement Overwrite current file or increment filenumber int (0, 1)
autosave Save images to file: No=0, Yes=1 int (0, 1)
autostore Save images to file: No=0, Yes=1 int (0, 1)
filename Set image filename str None
filenumber Next file number int val > 0
filepath Full path for data file str None
frames number of frames int 0 < val < 300
state Data collection state int None
trigger_mode Triggering mode: Internal=0, External=1 int (0, 1)
video_mode Format: 0=4024x2680, 2=2012x1340 int (0, 2)

Complete Function Descriptions

The functions available in this module are listed below.

APSpy.AD.AD_acquire(detsyms, filename, counttime, frames=1, wait=False)[source]

Set parameters for an area detector and collect image(s)

Parameters:
  • detsyms (object) – An area detector variable (or name as a string), as defined in DefineAreaDetector(). Alternately, a list of area detectors variable or names (as strings) can be supplied.
  • filename (str) – The name of the data file to be used
  • counttime (float) – The data collection pre frame time to be used (sec)
  • frames (int) – The number of images to be recorded
  • wait (bool) – If False (default) return immediately; if True, return after waiting the appropriate amount of time and when the state command (if defined) indicates the data collection is done.
APSpy.AD.AD_cmds(detsym=None)[source]

Returns all the commands defined for a particular detector, or with any detector. Does not print.

Parameters:detsym (object) – An area detector variable (or name as a string), as defined in DefineAreaDetector(). Default is to only list commands that can be used with all detectors.
Returns:a list of allowed commands
APSpy.AD.AD_done(detsyms, wait=True)[source]

Test and optionally wait for the detector(s) have completed data collection

Parameters:
  • detsyms (object) – An area detector variable (or name as a string), as defined in DefineAreaDetector(). Alternately, a list of area detectors variable or names (as strings) can be supplied.
  • wait (bool) – If False test and return immediately; if True (default), return after the state command (if defined) indicates the data collection is done for each detector.
Returns:

True if all detector(s) are done; False is wait is False and any detectors are not done; or None if after 30 seconds, any detector is not complete

APSpy.AD.AD_get(detsyms, cmd, ignoreOK=False)[source]

Read a parameter from an area detector

Parameters:
  • detsyms (object) – An area detector variable (or name as a string), as defined in DefineAreaDetector() or a list of area detector variables or strings. If a list (or tuple) of detectors is used, the function may return a list of values (but only if they differ.)
  • cmd (str) – a command string that has been defined using defADcmd()
  • ignoreOK (bool) – if ignoreOK is False (default) an exception will be raised if command cmd is not defined for a detector. If True, the command will be ignored
Returns:

the as-read parameter. The type will be determined by the PV associated with the command. If detsyms is a list and the read values differ, then a list of values is returned. Otherwise, only the (common) value is return.

Examples:

>>> AD.DefineAreaDetector('GE1', 'GE', 'GE1:cam1')
>>> val = AD.AD_get(AD.GE1,'acquire_time')

or

>>> val = AD.AD_get('GE1','acquire_time')

also

>>> hydra = (AD.GE1,AD.GE2,AD.GE3,AD.GE4)
>>> val =  AD.AD_get(hydra,'trigger_mode')
>>> try:
>>>     if len(val) == 4 and not isinstance(val,str):
>>>         print 'values disagree'
>>> except TypeError:
>>>     pass
APSpy.AD.AD_set(detsyms, cmd, value, ignoreOK=False)[source]

Set a parameter for an area detector. This routine has been patched to add a to strings, to fix a problem in EPICS.

Parameters:
  • detsyms (object) – An area detector variable (or name as a string), as defined in DefineAreaDetector(). Alternately, a list of area detectors variable or names (as strings) can be supplied. The command (cmd) must be defined for all supplied detectors, or an exception occurs.
  • cmd (str) – a command that has been defined using defADcmd()
  • value (str) – The value to set the parameter. This value will be set to the type defined for the command from defADcmd() if possible and will be checked against the enumeration range, if one is supplied. If the type conversion fails or the check fails, an exception is raised.
  • ignoreOK (bool) – if ignoreOK is False (default) an exception will be raised if command cmd is not defined for a detector. If True, the command will be ignored
Returns:

the as-read parameter. The type will be determined by the PV associated with the command.

Examples:

>>> AD.DefineAreaDetector('GE1', 'GE', 'GE1:cam1')
>>> val = AD.AD_set(AD.GE1,'acquire_time',3)

or

>>> val = AD.AD_set('GE1','acquire_time',3)

also

>>> hydra = (AD.GE1,AD.GE2,AD.GE3,AD.GE4)
>>> val =  AD.AD_set(hydra,'trigger_mode',0)
APSpy.AD.AD_show(detsym=None, allowprint=True)[source]

Shows all the commands defined for a particular detector, or with any detector.

Parameters:
  • detsym (object) – An area detector variable (or name as a string), as defined in DefineAreaDetector(). Default is to only list commands that can be used with all detectors.
  • allowprint (bool) – If True (default) prints a list of the allowed commands
Returns:

a list of allowed commands

APSpy.AD.DefineAreaDetector(detsym, detectortype, controlprefix, imageprefix=None, comment='')[source]

Define an area detector for use in this module

Parameters:
  • detsym (str) – a symbolic name for the detector. A global variable is defined in this module’s name space with this name, This must be unique; exception specException is raised if a name is reused.
  • detectortype (str) – the type of the detector. This must match one of the entries in global variable detectorTypeList (case sensitive).
  • controlprefix (str) – the prefix for the detector PV (dev:camN). Omit the detector record field names (.NumImages, etc.). Inclusion of a final colon (‘:’) is optional.
  • imageprefix (str) – the prefix for the detector PV (dev:fmt). Omit the detector record field names (.FileNumber, etc.). Inclusion of a final colon (‘:’) is optional. If not specified, defaults to the value for controlprefix
  • comment (string) – a optional human-readable text field that describes the detector.
Returns:

detector object created for the detector

Example:

>>> DefineAreaDetector('GE1', 'GE', 'GE1:cam1', comment='bottom')
>>> DefineAreaDetector('GE2', 'GE', 'GE2:cam1', comment='left')
>>> DefineAreaDetector('GE3', 'GE', 'GE3:cam1', comment='top')
>>> DefineAreaDetector('GE4', 'GE', 'GE4:cam1', comment='right')
>>> DefineAreaDetector('ScintX', 'ScintX', 'ScintX:cam1', 'ScintX:TIFF1:')
>>> DefineAreaDetector('Retiga1', 'Retiga', 'QIMAGE1:cam1:', 'QIMAGE1:TIFF1:')
>>> DefineAreaDetector('Retiga2', 'Retiga', 'QIMAGE2:cam1:', 'QIMAGE2:TIFF1:')
APSpy.AD.defADcmd(command, setsuffix, readsuffix, comment='', valtyp=<type 'int'>, det=None, enum=None)[source]

This is called to create a table of actions to be used for writing to detectors. This will normally only be used by beamline staff and only inside this routine. Define detector-specific commands first, if they should take precedence over generic ones.

Parameters:
  • command (str) – A string to be used in AD_get() and AD_set() to be used to read or set an area detector parameter
  • setsuffix (str) – The PV suffix to be used to set the parameter. This is appended to the end of controlprefix (if setsuffix begins with one % sign) or imageprefix (if setsuffix begins with twp % signs). If this is blank, the PV cannot be set.
  • readsuffix (str) – The PV suffix to be used to read the parameter. This is appended to the end of controlprefix (if readsuffix begins with one % sign) or imageprefix (if readsuffix begins with twp % signs). If this is blank, the PV cannot be read.
  • comment (string) – a optional human-readable text field that describes the command.
  • valtyp (type) – a data type for the PV. Should be str, float or int (default)
  • detectortype (str) – The type of the detector, if the command is not generic. The default is to define a command that can be used with all area detectors.
  • enum (str) –

    A list of allowed values for the command, or a statement that must evaluate as True for the value to be accepted, typically a logical test on variable val. The default is allow all values.

    enum examples:

    enum=(0,1,2) – defines three specific allowed values (0, 1 and 2). No others are valid.

    enum='val > 0' – requires that the value must be greater than 0.0

    enum='0 <= val <= 10' – requires the value be 0 or 10 or any value in between

Examples:

>>> # GE detector specific                  
>>> defADcmd('trigger_mode', '%TriggerMode', '%TriggerMode_RBV',
...    'Triggering: Angio=0, Rad=1, UserSingle=2, MultiDet=3',
...    det='GE', enum=(0,1,2,3))
>>> defADcmd('state', '', '%DetectorState_RBV', 'Data collection state', det='GE')
>>> defADcmd('autostore', '%%AutoStore', '%%AutoStore_RBV', 'Save images to file: No=0, Yes=1',
...    det='GE', enum=(0,1)) # overrides generic, below
>>> defADcmd('autosave', '%%AutoStore', '%%AutoStore_RBV', 'Save images to file: No=0, Yes=1',
...    det='GE', enum=(0,1))                
>>> #ScintX detector specific                       
>>> defADcmd('trigger_mode', '%TriggerMode', '%TriggerMode_RBV',
...    'Triggering mode: Internal=0, External=1',
...    det='ScintX', enum=(0,1))
>>> defADcmd('video_mode', '%CCDVideoMode', '%CCDVideoMode_RBV',
...    'Format: 0=4024x2680, 2=2012x1340', det='ScintX',enum=(0,2))
>>> #Retiga detector specific                       
>>> defADcmd('transfer', '%qInitialize', '', 'Transfer EPICS values to FPGA', det='Retiga', enum=(1,))
>>> defADcmd('trigger_mode', '%TriggerMode', '%TriggerMode_RBV',
...     'Triggering: free=0, edge: Hi=1, low=2, Pulse: Hi=3, low=5, soft=5, Strobe: Hi=6, low=7, last=8',
...     det='Retiga', enum='0 <= val <= 8')
>>> # Generic
>>> defADcmd('acquire', '%Acquire', '', 'Trigger Data coll.',enum=(1,))
>>> defADcmd('acquire_time', '%AcquireTime', '%AcquireTime_RBV', 'Data coll. time (sec)', float, enum='val > 0')
>>> defADcmd('frames', '%NumImages', '%NumImages_RBV', 'number of frames (int)', enum='0 < val < 300')
>>> defADcmd('filename', '%%FileName', '%%FileName_RBV', 'Set data filename', str)
>>> defADcmd('filenumber', '%%FileNumber', '%%FileNumber_RBV', 'Next file number', int)
>>> defADcmd('autoincrement', '%%AutoIncrement', '%%AutoIncrement_RBV',
...   'Overwrite current file or increment filenumber', int, enum=(0,1))
>>> defADcmd('filepath', '%%FilePath', '%%FilePath_RBV', 'Full path for data file',str)