Package gda.device.detector.xmap.edxd
Class EDXDMappingController
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.detector.DetectorBase
gda.device.detector.xmap.edxd.EDXDController
gda.device.detector.xmap.edxd.EDXDMappingController
- All Implemented Interfaces:
Detector,IEDXDMappingController,Device,Scannable,Configurable,Findable,gda.observable.IObservable,Serializable
- Direct Known Subclasses:
DummyXmapEDXDMappingController
This class describes the EDXD detector on I12, it is made up of 24 subdetectors:
EDXDMappingElement instances, each wrapping an EpicsMCASimple instance.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class gda.device.detector.xmap.edxd.EDXDController
EDXDController.COLLECTION_MODES, EDXDController.NEXUS_FILE_MODE, EDXDController.PIXEL_ADVANCE_MODE, EDXDController.PRESET_TYPES -
Field Summary
FieldsFields inherited from class gda.device.detector.xmap.edxd.EDXDController
ACQUIRE, ACQUIRING, collectDataException, GETDYNRANGE, GETDYNRANGE0, GETNBINS, GETPRESETTYPE, GETPRESETVALUE, numberOfElements, SCAACTIVATE, SCAELEMENTS, SETBINWIDTH, SETDYNRANGE, SETNBINS, SETPRESETTYPE, SETPRESETVALUE, SETRESUME, subDetectors, xmapFields 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 TypeMethodDescriptionvoidActivate the ROI mode in the controllerprotected voidvoidclear()voidvoidDisable the ROI mode in the ControllervoidbooleanbooleanintintintgetHdf5()intget the maximum number of ROI allowed per mca elementintbooleanbooleanbooleanvoidvoidsetAquisitionTime(double collectionTime) set the acquisition/collection/preset time in the controllervoidsetAquisitionTimeOn(boolean aquisitionTimeOn) voidsetAutoPixelsPerBuffer(boolean auto) voidsetCallback(boolean yes) voidsetCaputSleepTime(int sleepTimeMillis) Sleep time to use after doing CAput operation in setXmapValue function (milliseconds)voidvoidsetDirectory(String dataDir) doublesetDynamicRange(double dynamicRange) Sets the dynamic range of the detectorvoidsetElementOffset(int elementOffset) voidsetFilenamePostfix(String name) voidsetFilenamePrefix(String beamline) voidsetFileNumber(Number scanNumber) voidvoidsetHdf5(NDFileHDF5 hdf5) voidsetHdfNumCapture(int number) voidsetIgnoreGate(boolean yes) voidsetNexusCapture(int number) voidsetNexusFileFormat(String format) voidsetNexusFileName(String filename) voidsetNexusFilePath(String filepath) voidvoidsetPixelsPerBuffer(int number) voidsetPixelsPerRun(int number) voidsetResume(boolean resume) Controller has two modes of operation.voidsetStopUpdatesMcaPvRecord(boolean stopUpdatesMcaPvRecord) If set to true, MCA PV record will be updated whenstop()function is called.voidsetTemplateFileName(String templateFileName) voidsetTemplateFilePath(String tempFilePath) voidsetWaitAfterCaput(boolean usePutWait) If set to true, thenstart(),stop(),setResume(boolean),clear()andclearAndStart()will wait for a short time after doing their CAput operations.voidstart()Start data acquisition in the controller.voidvoidstop()Stop the current move/operation.voidupdateMcaPvRecord(int mcaNumber) Update the MCA PV record for detector element, by doing caput READ = 1 and waiting for the RDNG status to be 'Done'.voidMethods inherited from class gda.device.detector.xmap.edxd.EDXDController
collectData, configure, createsOwnFiles, getAcquisitionTime, getBins, getData, getDescription, getDetectorID, getDetectorType, getEvents, getICR, getNumberOfElements, getOCR, getPresetType, getStatus, getSubDetector, getXmap, listSettings, loadSettings, readout, reconfigure, saveCurrentSettings, saveCurrentSettings, setBaseLength, setBaseThreshold, setBins, setBinWidth, setEnergyThreshold, setGapTime, setMaxWidth, setNumberOfElements, setPeakTime, setPreampGain, setPresetType, setResetDelay, setTriggerGapTime, setTriggerPeakTime, setTriggerThreshold, setup, setXmap, verifyDataMethods 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, throwExceptionIfInvalidTarget, 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
isConfigured, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfiguredMethods inherited from interface gda.device.Detector
getFileStructure, waitWhileBusyMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.device.detector.xmap.edxd.IEDXDMappingController
setPresetTypeMethods 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
-
Field Details
-
hdf5
-
-
Constructor Details
-
EDXDMappingController
public EDXDMappingController()
-
-
Method Details
-
addElements
protected void addElements()- Overrides:
addElementsin classEDXDController
-
setDynamicRange
Sets the dynamic range of the detector- Overrides:
setDynamicRangein classEDXDController- Parameters:
dynamicRange- the dynamic range in KeV- Returns:
- the actual value which has been set
- Throws:
DeviceException
-
getMaxAllowedROIs
get the maximum number of ROI allowed per mca element- Overrides:
getMaxAllowedROIsin classEDXDController- Returns:
- number of rois
- Throws:
DeviceException
-
activateROI
Activate the ROI mode in the controller- Overrides:
activateROIin classEDXDController- Throws:
DeviceException
-
deactivateROI
Disable the ROI mode in the Controller- Overrides:
deactivateROIin classEDXDController- Throws:
DeviceException
-
start
Start data acquisition in the controller. Uses the exisiting resume mode- Overrides:
startin classEDXDController- Throws:
DeviceException
-
stop
Description copied from class:ScannableBaseStop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
stopin interfaceScannable- Overrides:
stopin classEDXDController- Throws:
DeviceException- See Also:
-
setResume
Controller has two modes of operation. clear on start or resume acquiring into the same spectrum- Overrides:
setResumein classEDXDController- Parameters:
resume-- Throws:
DeviceException
-
clear
- Throws:
DeviceException
-
clearAndStart
- Throws:
DeviceException
-
setCollectionMode
- Specified by:
setCollectionModein interfaceIEDXDMappingController- Throws:
DeviceException
-
setAquisitionTime
Description copied from class:EDXDControllerset the acquisition/collection/preset time in the controller- Overrides:
setAquisitionTimein classEDXDController- Parameters:
collectionTime-- Throws:
DeviceException
-
setPixelAdvanceMode
- Throws:
DeviceException
-
setIgnoreGate
- Specified by:
setIgnoreGatein interfaceIEDXDMappingController- Throws:
DeviceException
-
setAutoPixelsPerBuffer
- Throws:
DeviceException
-
setPixelsPerBuffer
- Throws:
DeviceException
-
setPixelsPerRun
- Throws:
DeviceException
-
getPixelsPerRun
- Throws:
DeviceException
-
resetCounters
- Throws:
Exception
-
startRecording
- Throws:
Exception
-
endRecording
- Throws:
Exception
-
getHDFFileName
- Throws:
Exception
-
setDirectory
- Throws:
Exception
-
setFileNumber
- Throws:
Exception
-
setFilenamePrefix
- Throws:
Exception
-
setFilenamePostfix
- Throws:
Exception
-
setNexusCapture
- Throws:
DeviceException
-
setHdfNumCapture
- Throws:
DeviceException
-
setNexusFileFormat
- Throws:
DeviceException
-
setFileWriteMode
- Throws:
DeviceException
-
setCallback
- Throws:
DeviceException
-
setNexusFileName
- Throws:
DeviceException
-
getNexusFileName
- Throws:
DeviceException
-
getNexusFilePath
- Throws:
DeviceException
-
setNexusFilePath
- Throws:
DeviceException
-
getFileNumber
- Throws:
DeviceException
-
setTemplateFileName
- Throws:
DeviceException
-
setTemplateFilePath
- Throws:
DeviceException
-
getCaptureStatus
public boolean getCaptureStatus() -
isBufferedArrayPort
- Throws:
Exception
-
getHdf5
-
setHdf5
-
getElementOffset
public int getElementOffset() -
setElementOffset
public void setElementOffset(int elementOffset) -
getAquisitionTimeOn
public boolean getAquisitionTimeOn() -
setAquisitionTimeOn
public void setAquisitionTimeOn(boolean aquisitionTimeOn) -
setCaputSleepTime
public void setCaputSleepTime(int sleepTimeMillis) Sleep time to use after doing CAput operation in setXmapValue function (milliseconds)- Parameters:
sleepTimeMillis-- See Also:
-
getCaputSleepTime
public int getCaputSleepTime() -
isWaitAfterCaput
public boolean isWaitAfterCaput() -
setWaitAfterCaput
public void setWaitAfterCaput(boolean usePutWait) If set to true, thenstart(),stop(),setResume(boolean),clear()andclearAndStart()will wait for a short time after doing their CAput operations. Wait time is set bysetCaputSleepTime(int).- Parameters:
usePutWait-
-
updateMcaPvRecords
public void updateMcaPvRecords() -
updateMcaPvRecord
public void updateMcaPvRecord(int mcaNumber) throws DeviceException, InterruptedException, IOException Update the MCA PV record for detector element, by doing caput READ = 1 and waiting for the RDNG status to be 'Done'. Waiting is done in a loop with 100ms pause at end of each one; if RDNG != 0 after 30 attempts loops, error is put into log.- Parameters:
mcaNumber-- Throws:
InterruptedExceptionIOExceptionDeviceException
-
isStopUpdatesMcaPvRecord
public boolean isStopUpdatesMcaPvRecord() -
setStopUpdatesMcaPvRecord
public void setStopUpdatesMcaPvRecord(boolean stopUpdatesMcaPvRecord) If set to true, MCA PV record will be updated whenstop()function is called.- Parameters:
stopUpdatesMcaPvRecord-
-