Class ContinuousScan
- All Implemented Interfaces:
IConcurrentScanChild,NestableScan,Scan,ScanChild,Serializable
- Direct Known Subclasses:
TurboXasScan
This extends ConcurrentScan so it can be a child scan of a ConcurrentScan and effectively be another dimension in a multi-dimensional scan.
This will not operate any child scans, so must be the lowest dimension in a n-dimensional scan.
- 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
ConstructorsConstructorDescriptionContinuousScan(ContinuouslyScannable energyScannable, Double start, Double stop, Integer numberPoints, Double time, BufferedDetector[] detectors) -
Method Summary
Modifier and TypeMethodDescriptionprotected ContinuousParametersvoidThe 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.intdefault implementation.intThe total number of points in the multi-dimesional scan i.e.booleanbooleanprotected IScanObjectisScannableToBeMoved(Scannable scannable) This method is used by the scan base class when preparing for the start of the scan.voidsetBiDirectional(boolean biDirectional) When true, when this scan is used as the innermost dimension of a multidimensional scan (nest of scans), then each repetition will be in the opposite direction.voidsetStatus(Scan.ScanStatus status) To allow nests of scans to share a common status with each other.Methods 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
-
ContinuousScan
public ContinuousScan() -
ContinuousScan
public ContinuousScan(ContinuouslyScannable energyScannable, Double start, Double stop, Integer numberPoints, Double time, BufferedDetector[] detectors)
-
-
Method Details
-
isReadoutConcurrent
public boolean isReadoutConcurrent()- Overrides:
isReadoutConcurrentin classConcurrentScanChild
-
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 classScanBase- 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:
-
isScannableToBeMoved
This method is used by the scan base class when preparing for the start of the scan.This needs to be overriden by this class to prevent operation of the continuous scannable, but still enable other Scannables in the scan to be setup for the scan. This is especially useful for when a continuous scan is part of a multi-dimensional scan.
- Overrides:
isScannableToBeMovedin classConcurrentScanChild- Parameters:
scannable-- Returns:
- the ScanObject
-
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- Specified by:
doCollectionin classScanBase- Throws:
Exception
-
createContinuousParameters
-
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 classScanBase- Throws:
DeviceExceptionInterruptedException
-
getCommand
- Specified by:
getCommandin interfaceIConcurrentScanChild- Overrides:
getCommandin classConcurrentScanChild- Returns:
- Returns the command.
-
getTotalNumberOfPoints
public int getTotalNumberOfPoints()Description copied from interface:IConcurrentScanChildThe total number of points in the multi-dimesional scan i.e. the number of ScanDataPoints which would need displaying/recording- Specified by:
getTotalNumberOfPointsin interfaceIConcurrentScanChild- Specified by:
getTotalNumberOfPointsin interfaceScan- Overrides:
getTotalNumberOfPointsin classScanBase- Returns:
- the total number of nodes at which data will be collected in this scan. This includes all the dimensions in a multi-dimensional scan.
-
isBiDirectional
public boolean isBiDirectional() -
setBiDirectional
public void setBiDirectional(boolean biDirectional) When true, when this scan is used as the innermost dimension of a multidimensional scan (nest of scans), then each repetition will be in the opposite direction.NB: as the data will be coming out in the reversed direction for every other scan then a custom DataWriter will need to be used to perform the corrections to the data. TODO move the functionality in XasAsciiNexusDatapointCompletingDataWriter in the exafs.datawriter plugin to core.
- Parameters:
biDirectional-
-
getScanAxis
-
getScanDetectors
-
setStatus
To allow nests of scans to share a common status with each other.- Parameters:
status-
-