Class TwoDScanPlotter
- All Implemented Interfaces:
Device,Scannable,Configurable,Findable,IScanDataPointObserver,gda.observable.IObservable,gda.observable.IObserver
To use this scannable, give it the names of the x,y and z columns and the plot view to send the plot to ("Plot 1" by default. Then simply include in the scan command you wish to plot.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.january.dataset.DoubleDatasetprotected org.eclipse.january.dataset.DoubleDatasetprotected org.eclipse.january.dataset.DoubleDatasetFields inherited from class gda.device.scannable.ScannableBase
__doc__, DEFAULT_INPUT_NAME, DEFAULT_OUTPUT_FORMAT, extraNames, inputNames, level, outputFormatFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidHook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred.voidCalled for every Scannable at the end of a group of nested scans (or a single scan if that is the case).voidCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)voidgetRate()booleanisBusy()Check if the Scannable is moving/operating.booleanvoidUse RCPController to try and open the plot viewvoidplot()voidrawAsynchronousMoveTo(Object position) [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.[Consider abstract] Read the position in its internal (user) representation.voidsetOpenPlotViewAtScanStart(boolean openPlotViewAtScanStart) voidsetPlotViewname(String plotViewname) voidvoidsetRcpController(RCPController rcpController) voidCall this before the scan if you want to plot actual motor positions, not just indexesvoidsetXAxisName(String xAxisName) voidCall this before the scan if you want to plot actual motor positions, not just indexesvoidsetYAxisName(String yAxisName) voidsetZ_colName(String zColName) voidstop()Stop the current move/operation.voidMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, asynchronousMoveTo, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanLineEnd, atScanLineStart, checkPositionValid, externalToInternal, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, toFormattedString, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
configure, isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
configure, isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Field Details
-
x
protected org.eclipse.january.dataset.DoubleDataset x -
y
protected org.eclipse.january.dataset.DoubleDataset y -
intensity
protected org.eclipse.january.dataset.DoubleDataset intensity
-
-
Constructor Details
-
TwoDScanPlotter
public TwoDScanPlotter()
-
-
Method Details
-
atScanStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanStartin interfaceScannable- Overrides:
atScanStartin classScannableBase- Throws:
DeviceException- See Also:
-
atScanEnd
Description copied from class:ScannableBaseCalled for every Scannable at the end of a group of nested scans (or a single scan if that is the case).Note that this is only called if the Scan finishes normally, or has been requested to finish early. This will not be called if the scan finishes due to an exception of any kind. See
Scannable.atCommandFailure()Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanEndin interfaceScannable- Overrides:
atScanEndin classScannableBase- Throws:
DeviceException- See Also:
-
atCommandFailure
public void atCommandFailure()Description copied from class:ScannableBaseHook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred. However not called when the command is aborted using an InterruptionException. If a Scan is aborted then onlyScannable.stop()will be called by the Scan or pos command.Useful for telling Scannables which hold state during a scan for example, to reset themselves. Used for example by CoordinatedMotionScannables. This hook should be used not in the same way as the stop hook. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
- Specified by:
atCommandFailurein interfaceScannable- Overrides:
atCommandFailurein classScannableBase- See Also:
-
stop
Description copied from class:ScannableBaseStop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
stopin interfaceScannable- Overrides:
stopin classScannableBase- Throws:
DeviceException- See Also:
-
update
- Specified by:
updatein interfacegda.observable.IObserver
-
plot
- Throws:
Exception
-
openPlotView
public void openPlotView()Use RCPController to try and open the plot view -
setXArgs
Call this before the scan if you want to plot actual motor positions, not just indexes- Parameters:
xStart-xStop-xStep-
-
setYArgs
Call this before the scan if you want to plot actual motor positions, not just indexes- Parameters:
yStart-yStop-yStep-
-
clearArgs
public void clearArgs() -
rawAsynchronousMoveTo
Description copied from class:ScannableBase[Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.- Overrides:
rawAsynchronousMoveToin classScannableBase- Parameters:
position- Position in its internal/hardware representation. e.g. with units and offsets removed- Throws:
DeviceException- See Also:
-
rawGetPosition
Description copied from class:ScannableBase[Consider abstract] Read the position in its internal (user) representation.- Overrides:
rawGetPositionin classScannableBase- Returns:
- the value represented by this Scannable
- Throws:
DeviceException- See Also:
-
isBusy
Description copied from interface:ScannableCheck if the Scannable is moving/operating.- Specified by:
isBusyin interfaceScannable- Returns:
- true - if operation carried out by moveTo has not completed yet
- Throws:
DeviceException
-
getZ_colName
-
setZ_colName
-
setPlotViewname
-
getPlotViewname
-
getRate
-
setRate
-
getXAxisName
-
setXAxisName
-
getYAxisName
-
setYAxisName
-
getRcpController
-
setRcpController
- Parameters:
rcpController-RCPControllerobject used for opening plot view
-
isOpenPlotViewAtScanStart
public boolean isOpenPlotViewAtScanStart() -
setOpenPlotViewAtScanStart
public void setOpenPlotViewAtScanStart(boolean openPlotViewAtScanStart) - Parameters:
openPlotViewAtScanStart- Set to 'true' to make the plot view open at the start of the scan
-