Devices

(ophyd) Devices that might be useful at the APS using BlueSky

APS GENERAL SUPPORT

ApsMachineParametersDevice(*args, **kwargs)

common operational parameters of the APS of general interest

ApsPssShutter(*args, **kwargs)

APS PSS shutter

ApsPssShutterWithStatus(*args, **kwargs)

APS PSS shutter with separate status PV

SimulatedApsPssShutterWithStatus(*args, **kwargs)

Simulated APS PSS shutter

AREA DETECTOR SUPPORT

AD_setup_FrameType(prefix[, scheme])

configure so frames are identified & handled by type (dark, white, or image)

AD_warmed_up(detector)

Has area detector pushed an NDarray to the HDF5 plugin? True or False

AD_EpicsHdf5FileName(*args, **kwargs)

custom class to define image file name from EPICS

DETECTOR / SCALER SUPPORT

Struck3820(*args, **kwargs)

Struck/SIS 3820 Multi-Channel Scaler (as used by USAXS)

use_EPICS_scaler_channels(scaler)

configure scaler for only the channels with names assigned in EPICS

MOTORS, POSITIONERS, AXES, …

AxisTunerException

Exception during execution of AxisTunerBase subclass

AxisTunerMixin(*args, **kwargs)

Mixin class to provide tuning capabilities for an axis

EpicsDescriptionMixin(*args, **kwargs)

add a record’s description field to a Device, such as EpicsMotor

EpicsMotorDialMixin(*args, **kwargs)

add motor record’s dial coordinate fields to Device

EpicsMotorLimitsMixin(*args, **kwargs)

add motor record HLM & LLM fields & compatibility get_lim() and set_lim()

EpicsMotorRawMixin(*args, **kwargs)

add motor record’s raw coordinate fields to Device

EpicsMotorServoMixin(*args, **kwargs)

add motor record’s servo loop controls to Device

EpicsMotorShutter(*args, **kwargs)

a shutter, implemented with an EPICS motor moved between two positions

EpicsOnOffShutter(*args, **kwargs)

a shutter using a single EPICS PV moved between two positions

SHUTTERS

ApsPssShutter(*args, **kwargs)

APS PSS shutter

ApsPssShutterWithStatus(*args, **kwargs)

APS PSS shutter with separate status PV

EpicsMotorShutter(*args, **kwargs)

a shutter, implemented with an EPICS motor moved between two positions

EpicsOnOffShutter(*args, **kwargs)

a shutter using a single EPICS PV moved between two positions

OneSignalShutter(*args, **kwargs)

shutter Device using one Signal for open and close

ShutterBase(*args, **kwargs)

base class for all shutter Devices

SimulatedApsPssShutterWithStatus(*args, **kwargs)

Simulated APS PSS shutter

synApps records

busyRecord(*args, **kwargs)

sscanRecord(*args, **kwargs)

EPICS synApps sscan record: used as $(P):scan(N)

sscanDevice(*args, **kwargs)

synApps XXX IOC setup of sscan records: $(P):scan$(N)

swaitRecord(*args, **kwargs)

synApps swait record: used as $(P):userCalc$(N)

swait_setup_random_number(swait, **kw)

setup swait record to generate random numbers

swait_setup_gaussian(swait, motor[, center, …])

setup swait for noisy Gaussian

swait_setup_lorentzian(swait, motor[, …])

setup swait record for noisy Lorentzian

swait_setup_incrementer(swait[, scan, limit])

setup swait record as an incrementer

userCalcsDevice(*args, **kwargs)

synApps XXX IOC setup of userCalcs: $(P):userCalc$(N)

OTHER SUPPORT

DualPf4FilterBox(*args, **kwargs)

Dual Xia PF4 filter boxes using support from synApps (using Al, Ti foils)

EpicsDescriptionMixin(*args, **kwargs)

add a record’s description field to a Device, such as EpicsMotor

KohzuSeqCtl_Monochromator(*args, **kwargs)

synApps Kohzu double-crystal monochromator sequence control program

Struck3820(*args, **kwargs)

Struck/SIS 3820 Multi-Channel Scaler (as used by USAXS)

Internal routines

ApsOperatorMessagesDevice(*args, **kwargs)

general messages from the APS main control room

DeviceMixinBase(*args, **kwargs)

Base class for apstools Device mixin classes

apstools.devices.AD_setup_FrameType(prefix, scheme='NeXus')[source]

configure so frames are identified & handled by type (dark, white, or image)

PARAMETERS

prefix (str) : EPICS PV prefix of area detector, such as “13SIM1:” scheme (str) : any key in the AD_FrameType_schemes dictionary

This routine prepares the EPICS Area Detector to identify frames by image type for handling by clients, such as the HDF5 file writing plugin. With the HDF5 plugin, the FrameType PV is added to the NDattributes and then used in the layout file to direct the acquired frame to the chosen dataset. The FrameType PV value provides the HDF5 address to be used.

To use a different scheme than the defaults, add a new key to the AD_FrameType_schemes dictionary, defining storage values for the fields of the EPICS mbbo record that you will be using.

see: https://github.com/BCDA-APS/use_bluesky/blob/master/notebooks/images_darks_flats.ipynb

EXAMPLE:

AD_setup_FrameType("2bmbPG3:", scheme="DataExchange")
  • Call this function before creating the ophyd area detector object

  • use lower-level PyEpics interface

apstools.devices.AD_warmed_up(detector)[source]

Has area detector pushed an NDarray to the HDF5 plugin? True or False

Works around an observed issue: #598 https://github.com/NSLS-II/ophyd/issues/598#issuecomment-414311372

If detector IOC has just been started and has not yet taken an image with the HDF5 plugin, then a TimeoutError will occur as the HDF5 plugin “Capture” is set to 1 (Start). In such case, first acquire at least one image with the HDF5 plugin enabled.

exception apstools.devices.AxisTunerException[source]

Exception during execution of AxisTunerBase subclass

apstools.devices.logger = <Logger apstools.devices (INFO)>

for convenience

apstools.devices.use_EPICS_scaler_channels(scaler)[source]

configure scaler for only the channels with names assigned in EPICS

Note: For ScalerCH, use scaler.select_channels(None) instead of this code. (Applies only to ophyd.scaler.ScalerCH in releases after 2019-02-27.)