Package gda.device.detector.addetector
Class ADCameraDetector
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.detector.DetectorBase
gda.device.detector.addetector.ADCameraDetector
- All Implemented Interfaces:
Detector,NexusDetector,Device,Scannable,Configurable,Findable,gda.observable.IObservable,Serializable,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
ADCameraDetector
public class ADCameraDetector
extends DetectorBase
implements org.springframework.beans.factory.InitializingBean, NexusDetector
we assume the camera is in constant acquire mode, so we can just grab an image from the array plugin
this class only usefully writes to NeXus
- See Also:
-
Field Summary
FieldsFields inherited from class gda.device.detector.DetectorBase
collectionTimeFields 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, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidacquire()protected voidaddMetadata(NXDetectorData nxdata) voidint[]voidTells the detector to begin to collect a set of data, then returns immediately.voidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.booleanReturns a value which indicates whether the detector creates its own files.intdoublegetArray()intgetAttribute(String attributeName) Get the value of the specified attributeintfloat[]int[]Default which should be overridden by subclasses.shortgetDraw()intintintintReturns the current collecting state of the device.intorg.eclipse.january.dataset.IntegerDatasetreadout()Returns the latest data collected as well as general detector informationvoidresetAll()voidvoidsetAcquirePeriod(double acquirePeriod) voidsetAcquireTime(double time) voidsetAreaDetector(ADBase areaDetector) voidvoidsetAttribute(String attributeName, Object value) Set any attribute the implementing classes may providevoidsetBasePVName(String basePVName) voidvoidsetExposures(int numberOfExposures) voidsetImageMode(int imageMode) voidsetNumImages(int numberOfExposures) voidsetPvProvider(IPVProvider pvProvider) voidsetTriggerMode(int mode) voidMethods inherited from class gda.device.detector.DetectorBase
asynchronousMoveTo, checkPositionValid, endCollection, getCollectionTime, getPosition, isBusy, prepareForCollection, setCollectionTime, toFormattedStringMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, externalToInternal, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
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
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Detector
endCollection, getCollectionTime, getFileStructure, prepareForCollection, setCollectionTime, waitWhileBusyMethods inherited from interface gda.device.Device
close, getProtectionLevel, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, isBusy, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, toFormattedString
-
Field Details
-
attributeMap
-
-
Constructor Details
-
ADCameraDetector
public ADCameraDetector()
-
-
Method Details
-
configure
Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
getAreaDetector
-
setAreaDetector
-
getDraw
-
setDraw
-
getBasePVName
-
setBasePVName
-
resetAll
- Throws:
Exception
-
getTriggerMode
- Throws:
Exception
-
setTriggerMode
- Throws:
Exception
-
setExposures
- Throws:
Exception
-
getExposures
- Throws:
Exception
-
setNumImages
- Throws:
Exception
-
getNumImages
- Throws:
Exception
-
setAcquireTime
- Throws:
Exception
-
getAcquireTime
- Throws:
Exception
-
getPvProvider
-
setPvProvider
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
acquire
- Throws:
Exception
-
getDetectorState
- Throws:
Exception
-
getAcquireState
- Throws:
Exception
-
getArrayCounter
- Throws:
Exception
-
setAcquirePeriod
- Throws:
Exception
-
stopAcquiring
- Throws:
Exception
-
setImageMode
- Throws:
Exception
-
getAreaDetectorROI
- Throws:
Exception
-
getImageMode
- Throws:
Exception
-
getCaptureState
- Throws:
Exception
-
getCurrentArray
- Throws:
Exception
-
setArray
-
getArray
-
resetCounters
- Throws:
Exception
-
collectData
Description copied from interface:DetectorTells the detector to begin to collect a set of data, then returns immediately. Should cause the hardware to start collecting immediately: if there is any delay then detectors used in the same scan would collect over different times when beam conditions may differ.- Specified by:
collectDatain interfaceDetector- Throws:
DeviceException
-
createsOwnFiles
Description copied from interface:DetectorReturns a value which indicates whether the detector creates its own files. If it does (return true) the readout() method returns the name of the latest file created as a string. If it does not (return false) the readout() method will return the data directly.- Specified by:
createsOwnFilesin interfaceDetector- Returns:
- true if readout() returns filenames
- Throws:
DeviceException
-
getDescription
- Specified by:
getDescriptionin interfaceDetector- Overrides:
getDescriptionin classDetectorBase- Returns:
- A description of the detector.
- Throws:
DeviceException
-
getDetectorID
- Specified by:
getDetectorIDin interfaceDetector- Overrides:
getDetectorIDin classDetectorBase- Returns:
- A identifier for this detector.
- Throws:
DeviceException
-
getDetectorType
- Specified by:
getDetectorTypein interfaceDetector- Overrides:
getDetectorTypein classDetectorBase- Returns:
- The type of detector.
- Throws:
DeviceException
-
getStatus
Description copied from interface:DetectorReturns the current collecting state of the device.- Specified by:
getStatusin interfaceDetector- Returns:
- BUSY if the detector has not finished the requested operation(s), IDLE if in an completely idle state and STANDBY if temporarily suspended.
- Throws:
DeviceException
-
readout
Description copied from interface:NexusDetectorReturns the latest data collected as well as general detector information- Specified by:
readoutin interfaceDetector- Specified by:
readoutin interfaceNexusDetector- Returns:
- the data collected
- Throws:
DeviceException
-
addMetadata
-
readLastImage
- Throws:
DeviceException
-
getDataDimensions
Description copied from class:DetectorBaseDefault which should be overridden by subclasses.- Specified by:
getDataDimensionsin interfaceDetector- Overrides:
getDataDimensionsin classDetectorBase- Returns:
- the dimensions of the data object returned by the
Detector.readout()method - Throws:
DeviceException- See Also:
-
cagetArrayUnsigned
- Throws:
Exception
-
setAttribute
Description copied from interface:DeviceSet any attribute the implementing classes may provide- Specified by:
setAttributein interfaceDevice- Overrides:
setAttributein classDeviceBase- Parameters:
attributeName- is the name of the attributevalue- is the value of the attribute- Throws:
DeviceException- if an attribute cannot be set
-
getAttribute
Description copied from interface:DeviceGet the value of the specified attribute- Specified by:
getAttributein interfaceDevice- Overrides:
getAttributein classDeviceBase- Parameters:
attributeName- is the name of the attribute- Returns:
- the value of the attribute as an Object type
- Throws:
DeviceException- if an attribute cannot be retrieved
-