Package gda.scan
Class GridScan
java.lang.Object
gda.scan.ScanBase
gda.scan.GridScan
- All Implemented Interfaces:
NestableScan,Scan,ScanChild,Serializable
- Direct Known Subclasses:
GridScanMoveToOnly
Class to control the stepped movement of a Scannable object.
At each step, after movement, the readout() method of all object in the DetectorBase.activeDetectors arraylist is called.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class gda.scan.ScanBase
ScanBase.ParentScanComponentNested classes/interfaces inherited from interface gda.scan.Scan
Scan.ScanStatus -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ScanBaseprotected Objectprotected ScriptAdapterprotected Objectprotected Objectprotected Objectprotected Scannableprotected Objectprotected ObjectFields 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
ConstructorsConstructorDescriptionGridScan()Creates a scan objectA static method to create a scan which has a nested scan inside it.Creates a scan object.Creates a scan object.GridScan(Scannable ve, Object start, Object stop, Object step, Object time, Object units, DataWriter datahandler) Creates a scan object.GridScan(Scannable ve, Object start, Object stop, Object step, Object time, Object units, ScriptAdapter scriptAdapter, Object period) A static method to create a scan which has a nested scan inside it. -
Method Summary
Modifier and TypeMethodDescriptionvoidThe method in which the work of the scan is performed.booleanhasChild()Returns whether a child scan has been requested.voidmoveStepIncrement(int stepNos) voidMove the object of this scan to its initial position.protected voidRun the nested scanprotected voidExtra setup commands for grid scans.Methods inherited from class gda.scan.ScanBase
callAtCommandFailureHooks, callDetectorsEndCollection, callScannablesAtScanEnd, callScannablesAtScanLineEnd, callScannablesAtScanLineStart, callScannablesAtScanStart, cancelReadoutAndPublishCompletion, checkStartStopStep, checkThreadInterrupted, collectData, createScanDataPoint, createScanDataPointPipeline, createScanDataPointPipeline, endScan, generateRandomName, getChild, getDataWriter, getDetectors, getDimension, getDimensions, getName, getNumberOfChildScans, getParent, getPositionCallableThreadPoolSize, getScanDataPointPipeline, getScanDataPointQueueLength, getScanInformation, getScannables, getScanNumber, getScanPlotSettings, getStatus, getStepId, getStepIds, getTotalNumberOfPoints, isChild, isFinishEarlyRequested, isLineScanNeedsDoing, notifyServer, notifyServer, numberOfScannablesThatCanProvidePositionCallables, pause, prepareDevicesForCollection, prepareForCollection, prepareScanForCollection, prepareScanNumber, prepareStaticVariables, readDevicesAndPublishScanDataPoint, readoutDetectorsAndPublish, reorderScannables, representThrowable, requestFinishEarly, resume, run, runScan, scanRunning, sendScanEvent, setChild, setDataWriter, setDetectors, setIsChild, setLineScanNeedsDoing, setNumberOfChildScans, setParent, setPositionCallableThreadPoolSize, setScanDataPointPipeline, setScanDataPointQueueLength, setScanIdentifierInScanDataPoint, setScannables, setScanNumber, setScanPlotSettings, setStatus, setStepId, setUp, shutdownScandataPipeline, signalScanComplete, signalScanStarted, sortArguments, waitForDetectorReadoutAndPublishCompletion, waitIfPaused, wasScanExplicitlyHalted, wrappedException
-
Field Details
-
start
-
stop
-
step
-
time
-
units
-
period
-
childScan
-
scriptAdapter
-
theScannable
-
-
Constructor Details
-
GridScan
public GridScan() -
GridScan
Creates a scan object- Parameters:
ve- the scannablestart- doublestop- doublestep- double
-
GridScan
Creates a scan object. This constructor added to allow detector counting time to be set. Probably this should be done in ScanBase somehow.- Parameters:
ve- the scannablestart- doublestop- doublestep- doubletime- Object
-
GridScan
Creates a scan object. This constructor added to allow detector counting time to be set. Probably this should be done in ScanBase somehow.- Parameters:
ve- the scannablestart- doublestop- doublestep- doubletime- doubleunits- String
-
GridScan
public GridScan(Scannable ve, Object start, Object stop, Object step, Object time, Object units, DataWriter datahandler) Creates a scan object. This constructor added to allow detector counting time to be set. Probably this should be done in ScanBase somehow.- Parameters:
ve- the scannablestart- doublestop- doublestep- doubletime- doubleunits- Stringdatahandler- DataWriter
-
GridScan
A static method to create a scan which has a nested scan inside it. To run the scan, call the doScan() method. For example, in Jython: from gda.scan import Scan; myScan = Scan.create(tth,10,12,0.1,Scan.create(phi,20,30,1)); myScan.doScan()- Parameters:
ve- the scannablestart- The position of the first data pointstop- The position of the final data pointstep- The increment between data pointschildScan- ScanBase
-
GridScan
public GridScan(Scannable ve, Object start, Object stop, Object step, Object time, Object units, ScriptAdapter scriptAdapter, Object period) A static method to create a scan which has a nested scan inside it. To run the scan, call the doScan() method.- Parameters:
ve- Scannablestart- Objectstop- Objectstep- Objecttime- Objectunits- ObjectscriptAdapter- ScriptAdapterperiod- Object
-
-
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- Specified by:
doCollectionin classScanBase- Throws:
Exception
-
moveStepIncrement
- Parameters:
stepNos- int- Throws:
Exception
-
moveToStart
Move the object of this scan to its initial position.- Throws:
Exception
-
runChildScan
Run the nested scan- Throws:
Exception
-
setupGridScan
protected void setupGridScan()Extra setup commands for grid scans. These are needed as the hierachy of parent\child scans in a multi-dimensional gridscan need to share the same datahandler - and this datahandler would want to see the same list of scannables and detectors.This should be run after the base class setup() method.
-
hasChild
public boolean hasChild()Returns whether a child scan has been requested.- Returns:
- a boolean indicating whether the gridscan has an associated childscan
-