Interface Xspress3Controller
- All Superinterfaces:
Findable
- All Known Subinterfaces:
Xspress3MiniController
- All Known Implementing Classes:
DummyXspress3Controller,EpicsXspress3Controller,EpicsXspress3MiniController
It does not provide timing control and this must be provided externally and a gate signal given to the Xspress3 box. So this class must always be used in conjunction with something which provides that timing e.g. TFG.
Direct readout is provided by an EPICS layer. The EPICS writes HDF5 files which hold scaler, ROI, MCA and deadtime data. A maximum of 4 ROI are available (sofwtare ROI in the EPICS layer), and 2 windows are available in the scalers (Xspress3 defined).
The EPICS layer provides access to the scaler, ROI, and progress information. It also provides the 'latest' MCA data for online visualisation, although access to this data would not be quick enough for full data reduction / analysis purposes.
This class is the GDA interface to the EPICS Xspress3 template.
In GDA, arrays are zero based. In EPICS, arrays are 1 based. So input parameters to this interface, and results from this interface are all zero based.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidconfigureHDFDimensions(int[] scanDimensions) Set HDF writer 'extra dimensions' PVs from the scan dimensions (up to 3-dimensional shape).voiddoErase()voiddoReset()voiddoStart()voiddoStop()voidStop the hdf file writervoidenableChannel(int channel, boolean doEnable) intintintintintintInteger[]getROILimits(int channel, int roiNumber) intintintInteger[]getWindows(int channel, int roiNumber) isBusy()booleanisChannelEnabled(int channel) booleanmonitorReadyForNextRow(ReadyForNextRow readyForNextRow) double[][]readoutDTCorrectedLatestMCA(int startChannel, int finalChannel) The latest available MCA in the record.double[][]readoutDTCorrectedLatestSummedMCA(int startChannel, int finalChannel) Double[][][]readoutDTCorrectedROI(int startFrame, int finalFrame, int startChannel, int finalChannel) The deadtime corrected number of counts in each ROI.Double[][]readoutDTCorrectedSCA1(int startFrame, int finalFrame, int startChannel, int finalChannel) Dead-time corrected in-window scaler counts, for window 1Double[][]readoutDTCorrectedSCA2(int startFrame, int finalFrame, int startChannel, int finalChannel) Dead-time corrected in-window scaler counts, for window 2Integer[][]readoutDTCParameters(int startChannel, int finalChannel) The dead-time parametersInteger[][][]readoutScalerValues(int startFrame, int finalFrame, int startChannel, int finalChannel) Array of scaler stats.voidsetArrayCounter(int n) voidvoidsetFileArrayCounter(int arrayCounter) voidsetFileCaptureMode(CAPTURE_MODE captureMode) voidsetFileEnableCallBacks(UPDATE_CTRL callback) voidsetFilePath(String path) voidsetFilePrefix(String template) voidsetFileTemplate(String fileTemplate) voidsetHDFAttributes(boolean b) voidsetHDFExtraDimensions(int extraDimensions) voidsetHDFFileAutoIncrement(boolean b) voidsetHDFLazyOpen(boolean b) voidsetHDFNDArrayPort(String port) voidsetHDFNDAttributeChunk(int chunk) voidsetHDFNumFramesChunks(int i) voidsetHDFNumFramesToAcquire(int i) voidsetHDFPerformance(boolean b) voidsetHDFPositionMode(boolean positionMode) voidvoidsetNextFileNumber(int nextNumber) voidsetNumberROIToRead(int numRoiToRead) voidsetNumFramesToAcquire(Integer numFrames) voidsetPerformROICalculations(Boolean doCalcs) voidsetPointsPerRow(Integer pointsPerRow) voidsetROILimits(int channel, int roiNumber, int[] lowHighMCAChannels) voidsetSavingFiles(Boolean saveFiles) voidsetStoreAttributesUsingExraDims(boolean useExtraDims) voidsetTriggerMode(TRIGGER_MODE mode) voidsetWindows(int channel, int roiNumber, int[] lowHighScalerWindowChannels) intwaitUntilFrameAvailable(int scanPoint)
-
Method Details
-
doStart
- Throws:
DeviceException
-
doStop
- Throws:
DeviceException
-
doErase
- Throws:
DeviceException
-
doReset
- Throws:
DeviceException
-
setArrayCounter
- Throws:
DeviceException
-
isSavingFiles
- Throws:
DeviceException
-
setSavingFiles
- Throws:
DeviceException
-
doStopSavingFiles
Stop the hdf file writer- Throws:
DeviceException
-
setHDFFileAutoIncrement
- Throws:
DeviceException
-
setHDFNumFramesToAcquire
- Throws:
DeviceException
-
getNumFramesToAcquire
- Throws:
DeviceException
-
setNumFramesToAcquire
- Throws:
DeviceException
-
setPerformROICalculations
- Throws:
DeviceException
-
setTriggerMode
- Throws:
DeviceException
-
getTriggerMode
- Throws:
DeviceException
-
isBusy
- Throws:
DeviceException
-
isConnected
- Throws:
DeviceException
-
getStatusMessage
- Throws:
DeviceException
-
getStatus
- Returns:
- - matches values in the Detector interface getStatus().
}
invalid @link
{@link #Detector.getStatus() - Throws:
DeviceException
-
getTotalFramesAvailable
- Returns:
- - the total number of frames of data available in memory for reading out.
- Throws:
DeviceException
-
getMaxNumberFrames
- Throws:
DeviceException
-
readoutDTCorrectedSCA1
Double[][] readoutDTCorrectedSCA1(int startFrame, int finalFrame, int startChannel, int finalChannel) throws DeviceException Dead-time corrected in-window scaler counts, for window 1Use the value from
getTotalFramesAvailable()to know what frames will have valid data in- Parameters:
startFrame-finalFrame-startChannel-finalChannel-- Returns:
- Double[frame][channel]
- Throws:
DeviceException
-
readoutDTCorrectedSCA2
Double[][] readoutDTCorrectedSCA2(int startFrame, int finalFrame, int startChannel, int finalChannel) throws DeviceException Dead-time corrected in-window scaler counts, for window 2Use the value from
getTotalFramesAvailable()to know what frames will have valid data in- Parameters:
startFrame-finalFrame-startChannel-finalChannel-- Returns:
- Double[frame][channel]
- Throws:
DeviceException
-
readoutScalerValues
Integer[][][] readoutScalerValues(int startFrame, int finalFrame, int startChannel, int finalChannel) throws DeviceException Array of scaler stats.Use the value from
getTotalFramesAvailable()to know what frames will have valid data in- Parameters:
startFrame-finalFrame-startChannel-finalChannel-- Returns:
- int[frame][channel][time,reset ticks, reset counts,all events, all goodEvents, pileup counts]
- Throws:
DeviceException
-
readoutDTCParameters
The dead-time parametersUse the value from
getTotalFramesAvailable()to know what frames will have valid data in- Parameters:
startChannel-finalChannel-- Returns:
- int[channel][allGoodGradient,allGoodOffset,inWindowGradient, inWindowOffset]
- Throws:
DeviceException
-
readoutDTCorrectedROI
Double[][][] readoutDTCorrectedROI(int startFrame, int finalFrame, int startChannel, int finalChannel) throws DeviceException The deadtime corrected number of counts in each ROI.Use the value from
getTotalFramesAvailable()to know what frames will have valid data in- Parameters:
startFrame-finalFrame-startChannel-finalChannel-- Returns:
- Double[frame][detector channel][ROIs]
- Throws:
DeviceException
-
getNumberROIToRead
int getNumberROIToRead()- Returns:
- the number of roi which will be read out by the readoutDTCorrectedROI method.
-
setNumberROIToRead
- Throws:
IllegalArgumentException- - if the value given is too high for the implementation
-
readoutDTCorrectedLatestMCA
The latest available MCA in the record. When running a series of time frames, there is no guarentee how up to date this is.This is only for indicating the quality of the MCA rather than returning a specific MCA spectrum.
The MCA will be written to file by the underlying EPICS.
- Parameters:
startChannel-finalChannel-- Returns:
- Double[detector channel][mca channel]
- Throws:
DeviceException
-
readoutDTCorrectedLatestSummedMCA
double[][] readoutDTCorrectedLatestSummedMCA(int startChannel, int finalChannel) throws DeviceException - Parameters:
startChannel-finalChannel-- Returns:
- Double[detector channel][mca channel]
- Throws:
DeviceException
-
setROILimits
- Parameters:
channel-roiNumber-lowHighMCAChannels- [lowChannel,highChannel]- Throws:
DeviceException
-
getROILimits
- Parameters:
channel-roiNumber-- Returns:
- int[] [lowChannel,highChannel]
- Throws:
DeviceException
-
setWindows
void setWindows(int channel, int roiNumber, int[] lowHighScalerWindowChannels) throws DeviceException - Parameters:
channel-roiNumber-lowHighScalerWindowChannels- [lowChannel,highChannel]- Throws:
DeviceException
-
getWindows
- Parameters:
channel-roiNumber-- Returns:
- int[] [lowChannel,highChannel]
- Throws:
DeviceException
-
setFilePath
- Throws:
DeviceException
-
setFilePrefix
- Throws:
DeviceException
-
setNextFileNumber
- Throws:
DeviceException
-
getFilePath
- Throws:
DeviceException
-
getFilePrefix
- Throws:
DeviceException
-
getNextFileNumber
- Throws:
DeviceException
-
getFullFileName
- Returns:
- String - the full file path of the HDF file being written, or the last one written
- Throws:
DeviceException
-
configure
- Throws:
FactoryException
-
getNumFramesPerReadout
- Throws:
DeviceException
-
getNumberOfChannels
int getNumberOfChannels() -
isChannelEnabled
- Throws:
DeviceException
-
enableChannel
- Throws:
DeviceException
-
getNumberOfRois
int getNumberOfRois() -
getMcaSize
int getMcaSize() -
getTotalHDFFramesAvailable
- Throws:
DeviceException
-
setHDFAttributes
- Throws:
DeviceException
-
setHDFPerformance
- Throws:
DeviceException
-
setHDFNumFramesChunks
- Throws:
DeviceException
-
setHDFLazyOpen
- Throws:
DeviceException
-
setPointsPerRow
- Throws:
DeviceException
-
waitUntilFrameAvailable
- Throws:
DeviceException
-
monitorReadyForNextRow
- Throws:
DeviceException
-
setFileEnableCallBacks
- Throws:
DeviceException
-
setFileCaptureMode
- Throws:
DeviceException
-
setFileArrayCounter
- Throws:
DeviceException
-
configureHDFDimensions
Set HDF writer 'extra dimensions' PVs from the scan dimensions (up to 3-dimensional shape). The number of extra dimensions is set to 0 for a 1-dimensional scan.- Parameters:
scanDimensions- - number of points in each dimension of the scan- Throws:
DeviceException
-
setHDFExtraDimensions
- Throws:
DeviceException
-
setStoreAttributesUsingExraDims
- Throws:
DeviceException
-
setHDFNDArrayPort
- Throws:
DeviceException
-
setFileTemplate
- Throws:
DeviceException
-
setHDFXML
- Throws:
DeviceException
-
setHDFNDAttributeChunk
- Throws:
DeviceException
-
setHDFPositionMode
- Throws:
DeviceException
-
setDeadTimeCorrectionInputArrayPort
- Throws:
DeviceException
-