Package gda.scan
Class TimeScan
java.lang.Object
gda.scan.ScanBase
gda.scan.TimeScan
- All Implemented Interfaces:
NestableScan,Scan,ScanChild,Serializable
Performs a TimeScan experiments. In this scan, no beamline settings are changed - data is collected from a detector
for periods of CollectTime, with periods of PauseTime in between up to a total time of TotalTime.
Time units are seconds.
- 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 TypeFieldDescriptionfor observers to identify the relative time of the last data point from the start of the scan.Fields 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
ConstructorsConstructorDescriptionTimeScan(int numberOfPoints, double pause, double collect) Create a TimeScan object to scan all active detectorsTimeScan(int numberOfPoints, double pause, double collect, DataWriter datahandler) Create a TimeScan object to scan the detector specifiedCreate a TimeScan object to scan the detector specifiedTimeScan(List<Detector> ct, int numberOfPoints, double pause, double collect, DataWriter dw) Create a TimeScan object to scan the detector specified -
Method Summary
Modifier and TypeMethodDescriptionvoidCollect the datastatic voidrunScan(int numberOfPoints, double pauseTime, double collectTime) Creates and runs a scanstatic voidrunScan(DetectorBase detector, int numberOfPoints, double pauseTime, double collectTime) Creates and runs a scanprotected voidwaitUntil(long targetTime) Given a Java time in miliseconds, waits until that point and then returns.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
-
relativeTime
for observers to identify the relative time of the last data point from the start of the scan. This is a DummyScannable object so that data handlers will work properly.
-
-
Constructor Details
-
TimeScan
Create a TimeScan object to scan the detector specified- Parameters:
ct- the detector (counterTimer) to scannumberOfPoints- the number of data points to collectpause- the time between successive points of data collectioncollect- the time of data collection
-
TimeScan
Create a TimeScan object to scan the detector specified- Parameters:
ct- the detector (counterTimer) to scannumberOfPoints- the number of data points to collectpause- the time between successive points of data collectioncollect- the time of data collection
-
TimeScan
Create a TimeScan object to scan the detector specified- Parameters:
ct- the detector (counterTimer) to scannumberOfPoints- the number of data points to collectpause- the time between successive points of data collectioncollect- the time of data collectiondw-
-
TimeScan
public TimeScan(int numberOfPoints, double pause, double collect) Create a TimeScan object to scan all active detectors- Parameters:
numberOfPoints- the number of data points to collectpause- the time between successive points of data collectioncollect- the time of data collection
-
TimeScan
- Parameters:
numberOfPoints-pause-collect-datahandler-
-
-
Method Details
-
doCollection
Collect the data- Specified by:
doCollectionin interfaceScan- Specified by:
doCollectionin classScanBase- Throws:
Exception- See Also:
-
waitUntil
Given a Java time in miliseconds, waits until that point and then returns. If that time has passed, then returns immediately;- Parameters:
targetTime- time in seconds- Throws:
InterruptedException
-
runScan
public static void runScan(DetectorBase detector, int numberOfPoints, double pauseTime, double collectTime) throws InterruptedException, Exception Creates and runs a scan- Parameters:
detector- the device for data collectionnumberOfPoints- the number of data points to collectpauseTime- the time between successive points of data collectioncollectTime- the time of data collection- Throws:
InterruptedExceptionException
-
runScan
public static void runScan(int numberOfPoints, double pauseTime, double collectTime) throws InterruptedException, Exception Creates and runs a scan- Parameters:
numberOfPoints- the number of data points to collectpauseTime- the time between successive points of data collectioncollectTime- the time of data collection- Throws:
InterruptedExceptionException
-