Package gda.scan
Class DetectorFunctions
java.lang.Object
gda.scan.DetectorFunctions
Detector related functions refactored from Get the highest available frame across all detectors ( Prepare detectors for collection at the start of a scan ( Wait for Xspress3 detector to finish writing it's Hdf file ( Get the total number of pulses captured by the zebra(s) (
TurboXasScan. Contains methods to :
getNumAvailableFrames()).
prepareDetectors(ContinuousParameters, int, int, int)).
waitForXspress3(double)).
getNumCapturedZebraPulses());
The detectors being used for the scan should first be set with setDetectors(BufferedDetector[]) before using the above functions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintbooleanbooleanbooleanvoidprepareDetectors(ContinuousParameters params, int numSpectra, int numCycles, int numReadoutsPerSpectra) Prepare detectors for a turboXAS scan (i.e.voidsetDetectors(BufferedDetector[] detectors) voidsetUseTwoZebras(boolean useTwoZebras) voidsetUseXspress3SwmrReadout(boolean useXspress3SwmrReadout) voidvoidvoidwaitForCapturedZebraPulses(int numSpectra, int numPointsPerSpectrum, int timeOutSeconds) Wait for zebra(s) to capture number of points each corresponding to a number of spectradoublewaitForXspress3(double maxWaitTimeSecs) Wait for Xspress detector to finish writing hdf file to disk.
-
Constructor Details
-
DetectorFunctions
public DetectorFunctions()
-
-
Method Details
-
getNumAvailableFrames
- Returns:
- Maximum available frame that can be read from all detectors (BufferedScaler and Xspress3Detector)
- Throws:
DeviceExceptionScanFileHolderExceptionNexusExceptionException
-
getNumCapturedZebraPulses
- Returns:
- Total number of captured pulses by zebra(s) used from scan
- Throws:
DeviceException
-
waitForCapturedZebraPulses
public void waitForCapturedZebraPulses(int numSpectra, int numPointsPerSpectrum, int timeOutSeconds) throws TimeoutException, IOException, InterruptedException Wait for zebra(s) to capture number of points each corresponding to a number of spectra- Parameters:
numSpectra-numPointsPerSpectrum-timeOutSeconds-- Throws:
IllegalStateExceptionTimeoutExceptionIOExceptionInterruptedException
-
waitForXspress3
Wait for Xspress detector to finish writing hdf file to disk.- Parameters:
maxWaitTimeSecs-- Returns:
- Throws:
InterruptedExceptionDeviceException
-
prepareDetectors
public void prepareDetectors(ContinuousParameters params, int numSpectra, int numCycles, int numReadoutsPerSpectra) throws Exception Prepare detectors for a turboXAS scan (i.e. clear the memory, set the number of frames to collect, and arm)- Parameters:
params-numSpectra-numCycles-numReadoutsPerSpectra-- Throws:
Exception
-
isTfgArmed
- Throws:
DeviceException
-
getXspress3Detector
-
setZebra1
-
setZebra2
-
isUseTwoZebras
public boolean isUseTwoZebras() -
setUseTwoZebras
public void setUseTwoZebras(boolean useTwoZebras) -
getXspress3FileReader
-
setDetectors
-
isUseXspress3SwmrReadout
public boolean isUseXspress3SwmrReadout() -
setUseXspress3SwmrReadout
public void setUseXspress3SwmrReadout(boolean useXspress3SwmrReadout)
-