Package gda.device.detector.analyser
Class EpicsMCA2
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.detector.DetectorBase
gda.device.detector.analyser.EpicsMCA2
- All Implemented Interfaces:
Detector,Device,Scannable,Configurable,Findable,gda.observable.IObservable,gda.observable.IObserver,Serializable
Class to communicate with an epics MCA record. The MCA record controls and acquires data from a multi-channel
analyser (MCA).
- 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 TypeMethodDescriptionvoidaddRegionOfInterest(int regionIndex, int regionLow, int regionHigh, int regionBackground, int regionPreset, String regionName) adds a region of interest.voidclear()Clears the mca, but does not return until the clear has been done.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.voiddeleteRegionOfInterest(int regionIndex) deletes a region of interestgetAttribute(String attributeName) Get the value of the specified attributereturns calibration parameters - unit name, offset, slope, quadratic, and two theta angle of the detectorgets elapsed parametersgets MCA record name - the actual EPICS Record name after remove field namegets regions of interestdouble[][]gets the total and net counts for each region of interestintReturns the current collecting state of the device.readout()Returns the latest data collected.voidsetCalibration(Object calibrate) sets calibration fields for MCAvoidsetMcaRecordName(String mcaRecordName) sets MCA record name - the actual EPICS Record name after remove field namevoidsetPresets(Object data) sets the preset parameters for MCAvoidsetRegionsOfInterest(Object highLow) sets region of interestvoidMethods inherited from class gda.device.detector.DetectorBase
asynchronousMoveTo, checkPositionValid, endCollection, getCollectionTime, getDataDimensions, 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, setAttribute, 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
getFileStructure, waitWhileBusyMethods inherited from interface gda.device.Device
close, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop
-
Field Details
-
channelToEnergyPrefix
- See Also:
-
numberOfChannelsAttr
- See Also:
-
energyToChannelPrefix
- See Also:
-
-
Constructor Details
-
EpicsMCA2
public EpicsMCA2()Constructor
-
-
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
-
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
-
addRegionOfInterest
public void addRegionOfInterest(int regionIndex, int regionLow, int regionHigh, int regionBackground, int regionPreset, String regionName) throws DeviceException adds a region of interest.- Parameters:
regionIndex-regionLow-regionHigh-regionBackground-regionPreset-regionName-- Throws:
DeviceException
-
deleteRegionOfInterest
deletes a region of interest- Parameters:
regionIndex-- Throws:
DeviceException
-
getCalibrationParameters
returns calibration parameters - unit name, offset, slope, quadratic, and two theta angle of the detector- Returns:
- calibration parameters
- Throws:
DeviceException
-
getPresets
- Returns:
- EpicsMCAPresets
- Throws:
DeviceException
-
clear
Clears the mca, but does not return until the clear has been done.- Throws:
DeviceException
-
getElapsedParameters
gets elapsed parameters- Returns:
- elapsed parameters
- Throws:
DeviceException
-
getRegionsOfInterest
gets regions of interest- Returns:
- region of interest
- Throws:
DeviceException
-
getRegionsOfInterestCount
gets the total and net counts for each region of interest- Returns:
- total and net counts for regions of interest
- Throws:
DeviceException
-
setCalibration
sets calibration fields for MCA- Parameters:
calibrate-- Throws:
DeviceException
-
setPresets
sets the preset parameters for MCA- Parameters:
data-- Throws:
DeviceException
-
setRegionsOfInterest
sets region of interest- Parameters:
highLow-- 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: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- Returns:
- the data collected
- Throws:
DeviceException
-
getMcaRecordName
gets MCA record name - the actual EPICS Record name after remove field name- Returns:
- MCA record name
-
setMcaRecordName
sets MCA record name - the actual EPICS Record name after remove field name- Parameters:
mcaRecordName-
-
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
-
update
- Specified by:
updatein interfacegda.observable.IObserver
-
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
-