areaDetector Dexela driver

December 4, 2018

Mark Rivers

University of Chicago

Table of Contents

Introduction

This is an EPICS areaDetector driver for the flat-panel CMOS detectors from Perkin Elmer.

The driver is based upon the Dexela library provided by Perkin Elmer. It only runs on Microsoft Windows computers. It supports both 32-bit and 64-bit versions of Windows.

This driver has been tested with the following detectors

This driver inherits from ADDriver. It implements many of the parameters in asynNDArrayDriver.h and in ADArrayDriver.h. It also implements a number of parameters that are specific to the Dexela detectors. The Dexela class documentation describes this class in detail.

Implementation of standard driver parameters

The following table describes how the Dexela driver implements some of the standard driver parameters.

Implementation of Parameters in asynNDArrayDriver.h and ADDriver.h, and EPICS Record Definitions in ADBase.template and NDFile.template
Parameter index variable EPICS record name Description
ADNumImages $(P)$(R)NumImages Controls the number of images to acquire when ADImageMode is Multiple
ADAcquireTime $(P)$(R)AcquireTime
$(P)$(R)AcquireTime_RBV
When using Internal Triggers, this parameter controls the period between trigger pulses which will also be equal to the exposure time.
ADTriggerMode $(P)$(R)TriggerMode
$(P)$(R)TriggerMode_RBV
Sets the trigger mode for the detector. Options are:
  • Int. Free Run (internal trigger, frame rate limited by ADAcquireTime and readout time; ADAcquirePeriod is ignorred)
  • Int. Fixed Rate (internal trigger, frame rate controlled by ADAcquirePeriod, which must be greater than both the ADAcquireTime and the readout time)
  • Int. Software (software trigger per frame)
  • Ext. Edge Multi (one external negative edge trigger starts a sequence of multiple frames; the frame rate is determined by ADAcquirePeriod, which must be greater than ACAcquireTime plus the readout time)
  • Ext. Edge Single (one external negative edge trigger for a each single frame)
  • Ext. Bulb (external bulb trigger; high to expose, low to read out)

Dexela specific parameters

The Dexela driver implements the following parameters in addition to those in asynNDArrayDriver.h and ADDriver.h.

Parameter Definitions in Dexela.h and EPICS Record Definitions in Dexela.template
Parameter index variable asyn interface Access Description drvInfo string EPICS record name EPICS record type
DEX_SerialNumber asynInt32 r/o The detector serial number DEX_SERIAL_NUMBER $(P)$(R)DEXSerialNumber longin
DEX_BinningMode asynInt32 r/w The detector binning mode. The standard BinX and BinY records are not used because the Dexela detectors only support (at most) binning values of 1, 2 and 4 independently for X and Y. Specific detectors may restrict the choices further. For example the Dexela 1512 only supports 1x1, 2x2, and 4x4 binning. i.e. not 1x2, 2x4, etc. The menu choices for this record are constructed by the driver at initialization based on the actual capabilities of the detector in use. DEX_BINNING_MODE $(P)$(R)DEXBinningMode
$(P)$(R)DEXBinningMode_RBV
mbbo
mbbi
DEX_FullWellMode asynInt32 r/w The detector full-well mode. The choices are "Low noise" and "High range". DEX_FULL_WELL_MODE $(P)$(R)DEXFullWellMode
$(P)$(R)DEXFullWellMode_RBV
mbbo
mbbi
DEX_ReadoutMode asynInt32 r/w The detector readout mode. The choices are "Continuous" and "Idle". "Idle" disablea continuous detector scrubbing, which allows prompt response to software or hardware triggers, at the expense of potentially larger dark current in the first few frames DEX_READOUT_MODE $(P)$(R)DEXReadoutMode
$(P)$(R)DEXReadoutMode_RBV
mbbo
mbbi
DEX_SoftwareTrigger asynInt32 w Trigger record for soft trigger mode DEX_SOFTWARE_TRIGGER $(P)$(R)DEXSoftwareTrigger bo
Corrections directory
DEX_CorrectionsDirectory asynOctetWrite r/w Directory where offset, gain and defect map corrections files are stored DEX_CORRECTIONS_DIRECTORY $(P)$(R)DEXCorrectionsDir waveform
Offset corrections (also called dark current corrections)
DEX_NumOffsetFrames asynInt32 r/w Number of frames to collect and average when collecting offset frames DEX_NUM_OFFSET_FRAMES $(P)$(R)DEXNumOffsetFrames longout
DEX_CurrentOffsetFrame asynInt32 r Current offset frame being collected when collecting offset frames DEX_CURRENT_OFFSET_FRAME $(P)$(R)DEXCurrentOffsetFrame longin
DEX_AcquireOffset asynInt32 r/w Acquire offset frames DEX_ACQUIRE_OFFSET $(P)$(R)DEXAcquireOffset busy
DEX_UseOffset asynInt32 r/w Set whether offset image is to be used. Choices are "Disable" (0) and "Enable" (1). DEX_USE_OFFSET $(P)$(R)DEXUseOffset mbbo
DEX_OffsetAvailable asynInt32 r Report whether offset image has been collected and is available for use. Choices are "Not available" (0) and "Available" (1). DEX_OFFSET_AVAILABLE $(P)$(R)DEXOffsetAvailable mbbi
DEX_OffsetFile asynOctet r/w The name of the offset file to save or load. The CorrectionsDirectory will be used for the path. DEX_OFFSET_FILE $(P)$(R)DEXOffsetFile waveform
DEX_LoadOffsetFile asynInt32 w Load offset corrections from a file for use DEX_LOAD_OFFSET_FILE $(P)$(R)DEXLoadOffsetFile longout
DEX_SaveOffsetFile asynInt32 w Save offset corrections to a file DEX_SAVE_OFFSET_FILE $(P)$(R)DEXSaveOffsetFile longout
DEX_OffsetConstant asynInt32 r/w An offset that is added to the image when the offset correction is performed. CorrectedImage = RawImage - OffsetImage + OffsetConstant. This constant should be used to prevent the CorrectedImage from having any negative pixel values, which would otherwise be clipped to 0. DEX_OFFSET_CONSTANT $(P)$(R)DEXOffsetContant
$(P)$(R)DEXOffsetContant_RBV
longout
longin
Gain corrections (also called flat field corrections)
DEX_NumGainFrames asynInt32 r/w Number of frames to collect and average when collecting gain frames DEX_NUM_GAIN_FRAMES $(P)$(R)DEXNumGainFrames longout
DEX_CurrentGainFrame asynInt32 r Current gain frame being collected when collecting gain frames DEX_CURRENT_GAIN_FRAMEs $(P)$(R)DEXCurrentGainFrame longin
DEX_AcquireGain asynInt32 w Acquire gain frames DEX_ACQUIRE_GAIN $(P)$(R)DEXAcquireGain busy
DEX_UseGain asynInt32 w Set whether gain image is to be used. Choices are "Disable" (0) and "Enable" (1). DEX_USE_GAIN $(P)$(R)DEXUseGain mbbo
DEX_GainAvailable asynInt32 r Report whether offset image has been collected and is available for use. Choices are "Not available" (0) and "Available" (1). DEX_GAIN_AVAILABLE $(P)$(R)DEXGainAvailable mbbi
DEX_LoadGainFile asynInt32 w Load gain corrections from a file for use DEX_LOAD_GAIN_FILE $(P)$(R)DEXLoadGainFile longout
DEX_SaveGainFile asynInt32 w Save gain corrections to a file DEX_SAVE_GAIN_FILE $(P)$(R)DEXSaveGainFile longout
Defect map corrections (also called bad pixel corrections)
DEX_UseDefectMap asynInt32 w Set whether defect map correction is to be used DEX_USE_DEFECT_MAP $(P)$(R)DEXUseDefectMap mbbo
DEX_DefectMapAvailable asynInt32 r Report whether defect map is available for use DEX_DEFECT_MAP_AVAILABLE $(P)$(R)DEXdefect mapAvailable mbbi
DEX_DefectMapFile asynOctetWrite w File name for defect map file DEX_DEFECT_MAP_FILE $(P)$(R)DEXDefectMapFile waveform
DEX_LoadDefectMapFile asynInt32 w Load defect map from a file for use DEX_LOAD_DEFECT_MAP_FILE $(P)$(R)DEXLoadDefectMapFile longout

Unsupported standard driver parameters

The Dexela driver does not support the following standard driver parameters because they are not supported in the Dexels library:

Configuration

The Dexel driver is created with the DexelaConfig command, either from C/C++ or from the EPICS IOC shell.

int DexelaConfig(const char *portName, int detIndex,
                      int maxBuffers, size_t maxMemory,
                      int priority, int stackSize )
  

For details on the meaning of the parameters to this function refer to the detailed documentation on the DexelaConfig function in the Dexela.cpp documentation and in the documentation for the constructor for the Dexela class.

There an example IOC boot directory and startup script (iocBoot/iocDexela/st.cmd) provided with areaDetector.

MEDM screens

The following show the MEDM screens that are used to control the Dexela detector. Note that the general purpose screen ADBase.adl can be used, but it exposes many controls that are not applicable to the Dexela, and lacks some fields that are important for the Dexela driver.

Dexela.adl is the main screen used to control the Dexela driver.

Dexela.adl

Dexela.png

Performance measurements

The following measurements were done to demonstrate the performance that can be obtained with the areaDetector Dexela driver.

Restrictions

The following are some current restrictions of the Dexela driver: