Package gda.device.scannable
Class XasScannable
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.scannable.XasScannable
- All Implemented Interfaces:
Device,Scannable,Configurable,Findable,gda.observable.IObservable
- Direct Known Subclasses:
XasScannableDetectorWithHarmonics,XasScannableWithDetectorFramesSetup
Used for controlling the operations for each scan point in an XAS step scan where a motor is to be moved and
afterwards a series of detectors are to be operated for the same period of time.
As the step size and collection time varies during XAS scans this Scannable is used so it can operate over a 2D PyTuple of the data points (an explicit scan object in ConcurrentScan).
-
Field Summary
FieldsFields inherited from class gda.device.scannable.ScannableBase
__doc__, DEFAULT_INPUT_NAME, DEFAULT_OUTPUT_FORMAT, extraNames, inputNames, level, outputFormatFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidasynchronousMoveTo(Object position) Trigger a move/operation and return immediately.voidCalled on every Scannable at every data point, for scans which are broken down into individual points (i.e.voidCalled for every Scannable at the start of every scanvoidCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)checkPositionValid(Object position) This default behaviour should be extended by most subclasses! This default behaviour should be extended by most subclasses! Tests if the given object is meaningful to this Scannable and so could be used by one of the move commands.String[]gets a array of InputNames used by moveTo of this scannable.Returns the current position of the Scannable.booleanisBusy()Check if the Scannable is moving/operating.voidsetDetectors(Scannable[] theDetectors) voidsetEnergyScannable(Scannable energyScannable) Methods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atScanEnd, atScanLineEnd, externalToInternal, getExtraNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, throwExceptionIfInvalidTarget, toFormattedString, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
configure, isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
configure, isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Field Details
-
energyScannable
-
theDetectors
-
lastCollectionTimeUsed
protected double lastCollectionTimeUsed
-
-
Constructor Details
-
XasScannable
public XasScannable()
-
-
Method Details
-
asynchronousMoveTo
Description copied from class:ScannableBaseTrigger a move/operation and return immediately. Implementations of this method should be non-blocking to allow concurrent motion; the isBusy method will be used to determine when the move has completed. Converts the external (user) position to an internal position and passes this to rawAsynchronousMoveTo.- Specified by:
asynchronousMoveToin interfaceScannable- Overrides:
asynchronousMoveToin classScannableBase- Parameters:
position- Position to move to should have an element for each input field.- Throws:
DeviceException
-
getPosition
Description copied from class:ScannableBaseReturns the current position of the Scannable. Called by ConcurentScan at the end of the point. Reads an internal (hardware) position from rawGetPosition, converts this to an external (user) position and returns it.- Specified by:
getPositionin interfaceScannable- Overrides:
getPositionin classScannableBase- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException
-
atPointStart
Description copied from class:ScannableBaseCalled on every Scannable at every data point, for scans which are broken down into individual points (i.e. non-continuous scans) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atPointStartin interfaceScannable- Overrides:
atPointStartin classScannableBase- Throws:
DeviceException- See Also:
-
atScanLineStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of every scan Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanLineStartin interfaceScannable- Overrides:
atScanLineStartin classScannableBase- Throws:
DeviceException- See Also:
-
isBusy
Description copied from interface:ScannableCheck if the Scannable is moving/operating.- Returns:
- true - if operation carried out by moveTo has not completed yet
- Throws:
DeviceException
-
checkPositionValid
Description copied from class:ScannableBaseThis default behaviour should be extended by most subclasses! Tests if the given object is meaningful to this Scannable and so could be used by one of the move commands. May check limits and other things too. This is the method called by scans on all points before the scan is run.- Specified by:
checkPositionValidin interfaceScannable- Overrides:
checkPositionValidin classScannableBase- Parameters:
position-- Returns:
- null if position is valid, or returns a description if not.
- See Also:
-
getEnergyScannable
- Returns:
- Returns the energyScannable.
-
setEnergyScannable
- Parameters:
energyScannable- The energyScannable to set.
-
getInputNames
Description copied from interface:Scannablegets a array of InputNames used by moveTo of this scannable.- Specified by:
getInputNamesin interfaceScannable- Overrides:
getInputNamesin classScannableBase- Returns:
- array of the names of the elements of the object returned by getPosition
-
getDetectors
- Returns:
- Returns the theDetectors.
-
setDetectors
- Parameters:
theDetectors- The theDetectors to set.
-
atScanStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanStartin interfaceScannable- Overrides:
atScanStartin classScannableBase- Throws:
DeviceException- See Also:
-