Package gda.device.detector.xmap
Class NexusXmap
- All Implemented Interfaces:
Detector,NexusDetector,Device,Scannable,XmapDetector,Configurable,Findable,gda.observable.IObservable,gda.observable.IObserver,Serializable,DetectorWithConfigurationFile
- Direct Known Subclasses:
CallableXmap
Version of Xmap which returns its data in a format which works with the NexusFileWriter better than raw data
- See Also:
-
Field Summary
Fields inherited from class gda.device.detector.xmap.Xmap
channelLabels, controller, elapsedRealTimeValue, eventProcessingTimes, saveRawSpectrum, tfg, vortexParametersFields 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 TypeMethodDescriptionvoidHook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred.voidCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)voidTells the detector to begin to collect a set of data, then returns immediately.int[]Default which should be overridden by subclasses.String[]Additional names for extra values that returned by getPosition().intString[]Returns an array of strings which are the format strings to use when pretty printing parts of the outputReturns the current position of the Scannable.intbooleanbooleanbooleanbooleanvoidCall this method to ask the detector to load the current template XML file.readout()Returns the latest data collected.voidsetAlwaysRecordRawMCAs(boolean alwaysRecordRawMCAs) voidsetCalculateUnifiedRois(boolean calculateUnifiedRois) voidsetCollectionMode(EDXDController.COLLECTION_MODES collectionMode) voidsetHardwareTriggeredMode(boolean hardwareTriggeredMode) voidsetSleepTimeBeforeReadoutMs(int sleepTimeBeforeReadoutMs) Set time to wait after detector has finished collecting before reading out the datavoidsetSumAllElementData(boolean sumAllElementData) voidsetupForHardwareTriggeredCollection(int numPixelsPerRun) Setup for 'Hardware triggered' mode : detector stays armed continuously and each frame is captured in response to TTL trigger (e.g.voidSetup for software triggered mode : detector captures single frame at a time, each frame manually started from Epics.Methods inherited from class gda.device.detector.xmap.XmapwithSlaveMode
isSlave, setSlaveMethods inherited from class gda.device.detector.xmap.Xmap
atScanEnd, clear, clearAndStart, configure, configureChannelLabels, configureRegionsOfInterest, createsOwnFiles, getAcquisitionTime, getAttribute, getChannelLabels, getCollectionTime, getConfigFileName, getController, getCountRates, getData, getData, getDeadTimeCorrectedROICounts, getDeadtimeCorrectionFactors, getDescription, getDetectorID, getDetectorType, getEventProcessingTimes, getK, getName, getNumberOfBins, getNumberOfMca, getNumberOfROIs, getReadRate, getRealTime, getROICounts, getROIsSum, getStatus, getStatusRate, getTfg, getXmapControllerName, isSaveRawSpectrum, readoutScalerData, readoutScalers, reconfigure, setAcquisitionTime, setCollectionTime, setConfigFileName, setController, setEventProcessingTimes, setName, setNthROI, setNumberOfBins, setNumberOfMca, setNumberOfROIs, setParameters, setParameters, setReadRate, setReadRate, setROI, setROIs, setSaveRawSpectrum, setStatusRate, setStatusRate, setTfg, setXmapControllerName, start, stop, update, waitWhileControllerBusyMethods inherited from class gda.device.detector.DetectorBase
asynchronousMoveTo, checkPositionValid, endCollection, isBusy, prepareForCollection, toFormattedStringMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanLineEnd, atScanLineStart, externalToInternal, getInputNames, getLevel, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, 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.Detector
createsOwnFiles, endCollection, getCollectionTime, getDescription, getDetectorID, getDetectorType, getFileStructure, prepareForCollection, setCollectionTime, waitWhileBusyMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
asynchronousMoveTo, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, checkPositionValid, getInputNames, getLevel, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, isBusy, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, toFormattedString
-
Constructor Details
-
NexusXmap
public NexusXmap()
-
-
Method Details
-
readout
Description copied from interface:DetectorReturns the latest data collected. The size of the Object returned must be consistent with the values returned by getDataDimensions and getExtraNames.If
LocalProperties.GDA_SCAN_CONCURRENTSCAN_READOUT_CONCURRENTLYis true then motors may be moved while the detector readouts. The value returned must not be effected by any concurrent motor or shutter movements. SeeDetector.waitWhileBusy()andConcurrentScan. Readout must block until the detector is ready to respond quickly toDetector.collectData()again.- Specified by:
readoutin interfaceDetector- Specified by:
readoutin interfaceNexusDetector- Overrides:
readoutin classXmap- Returns:
- the data collected
- Throws:
DeviceException
-
getPosition
Description copied from class:DetectorBaseReturns 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. Also, if createsOwnFiles attempts to register the file with all FileRegistrars (primarily for data archiving). Note that this method will be called if the detector is triggered from a 'pos' command but not if the detector is triggered by the scan command (which ignores the detector's scannable interface).- Specified by:
getPositionin interfaceScannable- Overrides:
getPositionin classDetectorBase- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException- See Also:
-
loadConfigurationFromFile
Description copied from class:XmapCall this method to ask the detector to load the current template XML file. If the detector was configured without a configFileName set, then nothing will happen.- Overrides:
loadConfigurationFromFilein classXmap- Throws:
Exception
-
getExtraNames
Description copied from interface:ScannableAdditional names for extra values that returned by getPosition().- Specified by:
getExtraNamesin interfaceScannable- Overrides:
getExtraNamesin classScannableBase- Returns:
- array of names of the extra elements if the array returned by getPosition is larger than the array required by moveTo
-
getOutputFormat
Description copied from interface:ScannableReturns an array of strings which are the format strings to use when pretty printing parts of the output- Specified by:
getOutputFormatin interfaceScannable- Overrides:
getOutputFormatin classScannableBase- Returns:
- string array
-
getDataDimensions
Description copied from class:DetectorBaseDefault which should be overridden by subclasses.- Specified by:
getDataDimensionsin interfaceDetector- Overrides:
getDataDimensionsin classXmap- Returns:
- the dimensions of the data object returned by the
Detector.readout()method - Throws:
DeviceException- See Also:
-
setSumAllElementData
public void setSumAllElementData(boolean sumAllElementData) -
isSumAllElementData
public boolean isSumAllElementData() -
isCaclulateUnifiedRois
public boolean isCaclulateUnifiedRois() -
setCalculateUnifiedRois
public void setCalculateUnifiedRois(boolean calculateUnifiedRois) -
isAlwaysRecordRawMCAs
public boolean isAlwaysRecordRawMCAs() -
setAlwaysRecordRawMCAs
public void setAlwaysRecordRawMCAs(boolean alwaysRecordRawMCAs) -
getNumberOfIncludedDetectors
public int getNumberOfIncludedDetectors() -
getVortexParameters
-
getSleepTimeBeforeReadoutMs
public int getSleepTimeBeforeReadoutMs() -
setSleepTimeBeforeReadoutMs
public void setSleepTimeBeforeReadoutMs(int sleepTimeBeforeReadoutMs) Set time to wait after detector has finished collecting before reading out the data- Parameters:
sleepTimeBeforeReadoutMs-
-
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 classXmap- Throws:
DeviceException- See Also:
-
setupForHardwareTriggeredCollection
Setup for 'Hardware triggered' mode : detector stays armed continuously and each frame is captured in response to TTL trigger (e.g. from TFG). NumPixelsPer run is the number of frames to collect.- Parameters:
numPixelsPerRun-- Throws:
DeviceException
-
setupForSoftwareTriggeredCollection
Setup for software triggered mode : detector captures single frame at a time, each frame manually started from Epics.- Throws:
DeviceException
-
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- Overrides:
collectDatain classXmapwithSlaveMode- Throws:
DeviceException
-
atCommandFailure
Description copied from class:ScannableBaseHook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred. However not called when the command is aborted using an InterruptionException. If a Scan is aborted then onlyScannable.stop()will be called by the Scan or pos command.Useful for telling Scannables which hold state during a scan for example, to reset themselves. Used for example by CoordinatedMotionScannables. This hook should be used not in the same way as the stop hook. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
- Specified by:
atCommandFailurein interfaceScannable- Overrides:
atCommandFailurein classXmap- Throws:
DeviceException- See Also:
-
isHardwareTriggeredMode
public boolean isHardwareTriggeredMode() -
setHardwareTriggeredMode
public void setHardwareTriggeredMode(boolean hardwareTriggeredMode) -
getCollectionMode
-
setCollectionMode
-