Package uk.ac.gda.devices.odin.control
Class OdinDetectorDecorator
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
uk.ac.gda.devices.odin.control.OdinDetectorDecorator
- All Implemented Interfaces:
Device,Configurable,Findable,gda.observable.IObservable,OdinDetectorController
- Direct Known Subclasses:
OdinDetectorEiger,OdinDetectorEigerThresholdScan,OdinDetectorExcalibur
Odin detectors share many common components but each individual detector behaves slightly differently.
This decorator can be used to define specific detector behaviour
-
Field Summary
Fields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidStop the data writerdoubledoubleGet the full path to the most recent file writtenintintintGet status, this will returnDetector.BUSYif either the datawriter or the detector acquisition is busyvoidprepareCamera(int frames, double requestedLiveTime, double requestedDeadTime, String imageMode, String triggerMode) Get camera ready for acquisition e.g set the exposure time and wait time (in ms).voidprepareDataWriter(int frames) Prepare the Odin Data writer this may include setting the number of expected frames or ensuring that the compression settings are as requiredvoidsetAcquirePeriod(double acquirePeriod) voidsetAcquireTime(double acquireTime) voidsetCompressionMode(String mode) voidsetDataOutput(String directory, String filePrefix) Set the directory and the file prefix for the Odin datawritervoidsetNumImages(int numImages) voidsetOffsetAndUid(int offset, int uid) Set the offet and uid for the filewriter.voidStart the camera acquiringvoidStart the data writervoidStop the camera acquiringvoidwaitForWrittenFrames(int noFrames) voidWait until the detector acquisition (exposure) is 'Done'voidWait until the datawriter is 'Done'Methods 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, toString, wait, wait, waitMethods inherited from interface gda.factory.Configurable
configure, isConfigured, reconfigure
-
Constructor Details
-
OdinDetectorDecorator
-
-
Method Details
-
setDataOutput
Description copied from interface:OdinDetectorControllerSet the directory and the file prefix for the Odin datawriter- Specified by:
setDataOutputin interfaceOdinDetectorController- Throws:
DeviceException
-
startCollection
Description copied from interface:OdinDetectorControllerStart the camera acquiring- Specified by:
startCollectionin interfaceOdinDetectorController- Throws:
DeviceException
-
stopCollection
Description copied from interface:OdinDetectorControllerStop the camera acquiring- Specified by:
stopCollectionin interfaceOdinDetectorController- Throws:
DeviceException
-
startRecording
Description copied from interface:OdinDetectorControllerStart the data writer- Specified by:
startRecordingin interfaceOdinDetectorController- Throws:
DeviceException
-
endRecording
public void endRecording()Description copied from interface:OdinDetectorControllerStop the data writer- Specified by:
endRecordingin interfaceOdinDetectorController
-
prepareCamera
public void prepareCamera(int frames, double requestedLiveTime, double requestedDeadTime, String imageMode, String triggerMode) throws DeviceException Description copied from interface:OdinDetectorControllerGet camera ready for acquisition e.g set the exposure time and wait time (in ms). Things that only need to be set at the beginning of the scan- Specified by:
prepareCamerain interfaceOdinDetectorController- Throws:
DeviceException
-
getLatestFilename
Description copied from interface:OdinDetectorControllerGet the full path to the most recent file written- Specified by:
getLatestFilenamein interfaceOdinDetectorController
-
getStatus
public int getStatus()Description copied from interface:OdinDetectorControllerGet status, this will returnDetector.BUSYif either the datawriter or the detector acquisition is busy- Specified by:
getStatusin interfaceOdinDetectorController- Returns:
- integer as defined on the
Detectorinterface
-
waitWhileAcquiring
public void waitWhileAcquiring()Description copied from interface:OdinDetectorControllerWait until the detector acquisition (exposure) is 'Done'- Specified by:
waitWhileAcquiringin interfaceOdinDetectorController
-
waitWhileWriting
public void waitWhileWriting()Description copied from interface:OdinDetectorControllerWait until the datawriter is 'Done'- Specified by:
waitWhileWritingin interfaceOdinDetectorController
-
prepareDataWriter
Description copied from interface:OdinDetectorControllerPrepare the Odin Data writer this may include setting the number of expected frames or ensuring that the compression settings are as required- Specified by:
prepareDataWriterin interfaceOdinDetectorController- Parameters:
frames- number of frames Odin Data will be expecting- Throws:
DeviceException
-
getAcquireTime
- Specified by:
getAcquireTimein interfaceOdinDetectorController- Throws:
DeviceException
-
setOffsetAndUid
Description copied from interface:OdinDetectorControllerSet the offet and uid for the filewriter. This may be required between frames depending on collection strategy.- Specified by:
setOffsetAndUidin interfaceOdinDetectorController- Parameters:
offset-uid-- Throws:
DeviceException
-
getNumFramesCaptured
public int getNumFramesCaptured()- Specified by:
getNumFramesCapturedin interfaceOdinDetectorController
-
waitForWrittenFrames
public void waitForWrittenFrames(int noFrames) - Specified by:
waitForWrittenFramesin interfaceOdinDetectorController
-
setNumImages
- Specified by:
setNumImagesin interfaceOdinDetectorController- Throws:
DeviceException
-
getNumImages
- Specified by:
getNumImagesin interfaceOdinDetectorController- Throws:
DeviceException
-
setCompressionMode
- Specified by:
setCompressionModein interfaceOdinDetectorController- Throws:
DeviceException
-
setAcquireTime
- Specified by:
setAcquireTimein interfaceOdinDetectorController- Throws:
DeviceException
-
setAcquirePeriod
- Specified by:
setAcquirePeriodin interfaceOdinDetectorController- Throws:
DeviceException
-
getAcquirePeriod
- Specified by:
getAcquirePeriodin interfaceOdinDetectorController- Throws:
DeviceException
-