Package gda.scan
Class TurboXasScan
java.lang.Object
gda.scan.ScanBase
gda.scan.ConcurrentScanChild
gda.scan.ContinuousScan
gda.scan.TurboXasScan
- All Implemented Interfaces:
IConcurrentScanChild,NestableScan,Scan,ScanChild,Serializable
A TurboXasScan is a type of Continuous scan which can perform multiple sweeps of a fast slit and collect the spectra for each sweep.
It is designed to used with a A timing group comprises one or more spectra with the same time per spectrum (i.e. motor speed used for scan)
Each timing group can have a different time per spectrum.
The pulse streams for multiple spectra used for hardware triggered data collection are produced from the Zebra.
The Zebra is configured by the Data is added to the NeXus file one spectrum at a time after the motor move for each has been completed.
by using multiple gates (i.e. one gate per spectrum).
Spectra are sent to Ede scan plot view in the client as they are collected.
TurboXasScannable object which contains a full definition of the experiment
in a TurboXasParameters object, including timing group information in a List of TurboSlitTimingGroups.
It can also be used with a ContinuouslyScannable, in which case the behaviour is like a regular ContinuousScan.
(i.e. a single spectrum is collected).
TurboXasScannable being used, or assumed to be already configured before the scan start.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class gda.scan.ConcurrentScanChild
ConcurrentScanChild.PointPositionInLineNested classes/interfaces inherited from class gda.scan.ScanBase
ScanBase.ParentScanComponentNested classes/interfaces inherited from interface gda.scan.Scan
Scan.ScanStatus -
Field Summary
Fields inherited from class gda.scan.ConcurrentScanChild
allChildScans, allScanObjects, detectorReadoutTask, scannableLevelsFields inherited from class gda.scan.ScanBase
allDetectors, allScannables, callCollectDataOnDetectors, child, command, currentPointCount, GDA_SCANBASE_FIRST_SCAN_NUMBER_FOR_TEST, GDA_SCANBASE_PRINT_TIMESTAMP_TO_TERMINAL, instrument, isChild, name, numberOfChildScans, parent, parentComponent, permissionLevel, scanDataPointPipeline, stepId, totalNumberOfPoints -
Constructor Summary
ConstructorsConstructorDescriptionTurboXasScan(ContinuouslyScannable energyScannable, TurboXasMotorParameters motorParams, BufferedDetector[] detectors) TurboXasScan(ContinuouslyScannable energyScannable, Double start, Double stop, Integer numberPoints, Double time, BufferedDetector[] detectors) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddScannableToMonitor(Scannable scannable) voidaddSpectrumEvent(int spectrumNumber, Scannable scannable, Object position) voidaddSpectrumEvent(int spectrumNumber, String scannableName, Object position) voidcollectOneSpectrum(boolean collectData) Perform motor move and collect data for a single spectrumvoidThe method in which the work of the scan is performed.protected voidendScan()This should be called by all scans when they have finished, including when an exception has been raised.intintdefault implementation.booleanintGet Maximum number of scaler frames of data that can be stored by TfgintNumber of times the spectrum collection will be repeated.intintbooleanbooleanbooleanprotected Object[][]readDetector(BufferedDetector detector, int lowFrame, int highFrame) voidsetDataNameToSelectInPlot(String dataNameToSelectInPlot) voidsetDatasetNamesToAverage(List<String> datasetNamesToAverage) voidsetDataWriter(AsciiWriter asciiWriter) voidsetDoTrajectoryScan(boolean doTrajectoryScan) voidsetMaxNumScalerFramesPerCycle(int maxNumScalerFramesPerCycle) Set maximum number of scaler frames of data that can be stored by Tfg in single cycle (should be less than total than can be stored by tfg, typically invalid input: '<'1millionvoidsetPollIntervalMillis(int pollIntervalMillis) Poll time interval to use when waiting for new data to become available on detector(s)voidsetPositionsForScan(List<Object> positionsForScan) voidsetScannablesToMonitor(List<Scannable> scannablesToMonitor) voidsetScannableToMove(Scannable scannableToMove) voidsetShutter(Scannable shutter) Set the shutter scannable to be opened and closed at start and end of the scan.voidsetSpectrumEventTimeoutSecs(int spectrumEventTimeoutSecs) voidsetStatus(Scan.ScanStatus status) To allow nests of scans to share a common status with each other.voidsetTwoWayScan(boolean twoWayScan) voidsetUseXspress3SwmrReadout(boolean useXspress3SwmrReadout) voidsetWriteAsciiDataAfterScan(boolean writeAsciiDataAfterScan) Methods inherited from class gda.scan.ContinuousScan
createContinuousParameters, getCommand, getScanAxis, getScanDetectors, getTotalNumberOfPoints, isBiDirectional, isReadoutConcurrent, isScannableToBeMoved, setBiDirectionalMethods inherited from class gda.scan.ConcurrentScanChild
acquirePoint, cancelReadoutAndPublishCompletion, checkAllMovesComplete, generateDevicesToMoveByLevel, getAllChildScans, getAllDetectors, getAllScannables, getAllScanObjects, getChild, getPointPositionInLine, getScannableLevels, isMustBeFinal, isScannableActuallyToBeMoved, readoutDetectorsAndPublish, reorderAllScanObjects, setAllChildScans, setAllDetectors, setAllScannables, setAllScanObjects, setChild, setCommand, setMustBeFinal, setPointPositionInLine, setScannableLevels, setTotalNumberOfPoints, setUp, waitForDetectorReadoutAndPublishCompletionMethods inherited from class gda.scan.ScanBase
callAtCommandFailureHooks, callDetectorsEndCollection, callScannablesAtScanEnd, callScannablesAtScanLineEnd, callScannablesAtScanLineStart, callScannablesAtScanStart, checkStartStopStep, checkThreadInterrupted, collectData, createScanDataPoint, createScanDataPointPipeline, createScanDataPointPipeline, generateRandomName, getDataWriter, getDetectors, getDimensions, getName, getNumberOfChildScans, getParent, getPositionCallableThreadPoolSize, getScanDataPointPipeline, getScanDataPointQueueLength, getScanInformation, getScannables, getScanNumber, getScanPlotSettings, getStatus, getStepId, getStepIds, isChild, isFinishEarlyRequested, isLineScanNeedsDoing, notifyServer, notifyServer, numberOfScannablesThatCanProvidePositionCallables, pause, prepareDevicesForCollection, prepareForCollection, prepareScanForCollection, prepareScanNumber, prepareStaticVariables, readDevicesAndPublishScanDataPoint, reorderScannables, representThrowable, requestFinishEarly, resume, run, runScan, scanRunning, sendScanEvent, setChild, setDataWriter, setDetectors, setIsChild, setLineScanNeedsDoing, setNumberOfChildScans, setParent, setPositionCallableThreadPoolSize, setScanDataPointPipeline, setScanDataPointQueueLength, setScanIdentifierInScanDataPoint, setScannables, setScanNumber, setScanPlotSettings, setStatus, setStepId, shutdownScandataPipeline, signalScanComplete, signalScanStarted, sortArguments, waitIfPaused, wasScanExplicitlyHalted, wrappedExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.scan.Scan
getDataWriter, getDetectors, getName, getScanDataPointPipeline, getScanInformation, getScannables, getScanNumber, getScanPlotSettings, getStatus, getStepId, isChild, isFinishEarlyRequested, pause, prepareForCollection, requestFinishEarly, resume, run, runScan, setChild, setDataWriter, setDetectors, setIsChild, setScanDataPointPipeline, setScannables, setScanPlotSettings, setStepId
-
Constructor Details
-
TurboXasScan
public TurboXasScan(ContinuouslyScannable energyScannable, Double start, Double stop, Integer numberPoints, Double time, BufferedDetector[] detectors) -
TurboXasScan
public TurboXasScan(ContinuouslyScannable energyScannable, TurboXasMotorParameters motorParams, BufferedDetector[] detectors)
-
-
Method Details
-
doCollection
Description copied from interface:ScanThe method in which the work of the scan is performed. This method assumes that the data handler has already been created and the baton claimed.- Specified by:
doCollectionin interfaceScan- Overrides:
doCollectionin classContinuousScan- Throws:
Exception
-
getNumRepetitions
public int getNumRepetitions()Number of times the spectrum collection will be repeated. There will be one repetition per value inpositionsForScanlist.- Returns:
- number of repetitions
-
endScan
Description copied from class:ScanBaseThis should be called by all scans when they have finished, including when an exception has been raised.- Overrides:
endScanin classContinuousScan- Throws:
DeviceExceptionInterruptedException
-
collectOneSpectrum
Perform motor move and collect data for a single spectrum- Parameters:
collectData- run data collection after motor move has finished. If set to false, this generally means data collection should be happening in a separate thread.- Throws:
Exception
-
getDimension
public int getDimension()Description copied from class:ScanBasedefault implementation. Classes that derive from ScanBase which want to support the reporting of scan dimensions -@see getDimensions need to override this method- Specified by:
getDimensionin interfaceScan- Overrides:
getDimensionin classContinuousScan- Returns:
- the number of points of this scan object - the whole scan execution can be a hierarchy of parent scan objects and layers of child scan objects
- See Also:
-
readDetector
protected Object[][] readDetector(BufferedDetector detector, int lowFrame, int highFrame) throws Exception, DeviceException - Throws:
ExceptionDeviceException
-
getTurboXasMotorParams
-
getDoTrajectoryScan
public boolean getDoTrajectoryScan() -
setDoTrajectoryScan
public void setDoTrajectoryScan(boolean doTrajectoryScan) -
getUseXspress3SwmrReadout
public boolean getUseXspress3SwmrReadout() -
setUseXspress3SwmrReadout
public void setUseXspress3SwmrReadout(boolean useXspress3SwmrReadout) -
getMaxNumScalerFramesPerCycle
public int getMaxNumScalerFramesPerCycle()Get Maximum number of scaler frames of data that can be stored by Tfg -
setMaxNumScalerFramesPerCycle
public void setMaxNumScalerFramesPerCycle(int maxNumScalerFramesPerCycle) Set maximum number of scaler frames of data that can be stored by Tfg in single cycle (should be less than total than can be stored by tfg, typically invalid input: '<'1million -
getCurrentPointCount
public int getCurrentPointCount() -
getScannablesToMonitor
-
setScannablesToMonitor
-
addScannableToMonitor
-
getWriteAsciiDataAfterScan
public boolean getWriteAsciiDataAfterScan() -
setWriteAsciiDataAfterScan
public void setWriteAsciiDataAfterScan(boolean writeAsciiDataAfterScan) -
getAsciiDataWriter
-
setDataWriter
-
getDataNameToSelectInPlot
-
setDataNameToSelectInPlot
-
getPollIntervalMillis
public int getPollIntervalMillis() -
setPollIntervalMillis
public void setPollIntervalMillis(int pollIntervalMillis) Poll time interval to use when waiting for new data to become available on detector(s)- Parameters:
pollIntervalMillis-
-
isTwoWayScan
public boolean isTwoWayScan() -
setTwoWayScan
public void setTwoWayScan(boolean twoWayScan) -
getShutter
- Returns:
- Shutter scannable opened and closed at start and end of scan.
-
setShutter
Set the shutter scannable to be opened and closed at start and end of the scan.- Parameters:
shutter-
-
getDatasetNamesToAverage
-
setDatasetNamesToAverage
-
getScannableToMove
-
setScannableToMove
-
getPositionsForScan
-
setPositionsForScan
-
getSpectrumEvents
-
addSpectrumEvent
-
addSpectrumEvent
-
getSpectrumEventTimeoutSecs
public int getSpectrumEventTimeoutSecs() -
setSpectrumEventTimeoutSecs
public void setSpectrumEventTimeoutSecs(int spectrumEventTimeoutSecs) -
setStatus
To allow nests of scans to share a common status with each other.- Parameters:
status-
-