Package uk.ac.gda.beamline.i20.scannable
Class MonoMoveWithOffsetScannable
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.scannable.ScannableMotionBase
uk.ac.gda.beamline.i20.scannable.MonoMoveWithOffsetScannable
- All Implemented Interfaces:
INeXusInfoWriteable,Device,Scannable,ScannableMotion,Configurable,Findable,gda.observable.IObservable
Scannable to move bragg and also adjust bragg offset for each move.
- Since:
- 26/8/2016
-
Field Summary
Fields inherited from class gda.device.scannable.ScannableMotionBase
numberTries, toleranceFields 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, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLEFields inherited from interface gda.device.ScannableMotion
FIRSTINPUTLIMITS -
Constructor Summary
ConstructorsConstructorDescriptionMonoMoveWithOffsetScannable(String name, Scannable bragg, Scannable braggOffset) -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustBraggOffsetMotor(double energy) Apply the offset for specified energy to offset motor.booleangetBragg()doublebooleanintdoublegetOffsetForEnergy(double energy) Calculate bragg offset for given value of bragg energydoubledoubledoubledoubleReturns the current position of the Scannable.intdoublebooleanisBusy()Check if the Scannable is moving/operating.voidrawAsynchronousMoveTo(Object position) [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.voidsetAdjustBraggOffset(boolean adjustBraggOffset) voidsetEnergyOffsetStart(double energyOffsetStart) voidsetIncludeOffsetInPosition(boolean includeOffsetInPosition) voidsetLoopType(String loopType) voidsetMonoOptimiser(MonoOptimisation monoOptimiser) voidsetNumStepsPerInnerLoop(int numStepsPerInnerLoop) voidsetOffsetGradient(double offsetGradient) voidsetOffsetMoveThreshold(double offsetMoveThreshold) voidsetOffsetStartValue(double offsetStartValue) voidsetScanType(int scanType) voidsetTimePerStepInnerLoop(double timePerStepInnerLoop) Methods inherited from class gda.device.scannable.ScannableMotionBase
a, addPositionValidator, ar, asynchronousMoveTo, checkPositionValid, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, completeInstantiation, externalToInternal, generateScannableLimitsReport, getAdditionalPositionValidators, getAttribute, getFirstInputLimits, getInputLimits, getInputLimits, getLimitsComponent, getLowerGdaLimits, getNumberTries, getOffset, getScalingFactor, getTolerances, getUpperGdaLimits, internalToExternal, isAt, moveTo, r, rawIsBusy, removePositionValidator, setAdditionalPositionValidators, setLimitsComponent, setLowerGdaLimits, setLowerGdaLimits, setNumberTries, setOffset, setOffsetAndScalingComponent, setScalingFactor, setTolerance, setTolerances, setUpperGdaLimits, setUpperGdaLimits, toFormattedString, writeNeXusInformation, writeNeXusInformationLimitsMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, 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, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, waitWhileBusy
-
Constructor Details
-
MonoMoveWithOffsetScannable
-
-
Method Details
-
getTimePerStepInnerLoop
public double getTimePerStepInnerLoop() -
setTimePerStepInnerLoop
public void setTimePerStepInnerLoop(double timePerStepInnerLoop) -
getMonoOptimiser
-
setMonoOptimiser
-
isBusy
Description copied from class:ScannableMotionBaseCheck if the Scannable is moving/operating.. Calls onto rawIsBusy for historical reasons, although there is currently no need for this.- Specified by:
isBusyin interfaceScannable- Overrides:
isBusyin classScannableMotionBase- Returns:
- true - if operation carried out by moveTo has not completed yet
- Throws:
DeviceException- See Also:
-
getIncludeOffsetInPosition
public boolean getIncludeOffsetInPosition() -
setIncludeOffsetInPosition
public void setIncludeOffsetInPosition(boolean includeOffsetInPosition) -
getPosition
Description copied from class:ScannableBaseReturns the current position of the Scannable. Called by ConcurentScan at the end of the point. Reads an internal (hardware) position from rawGetPosition, converts this to an external (user) position and returns it.- Specified by:
getPositionin interfaceScannable- Overrides:
getPositionin classScannableBase- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException
-
getOffsetForEnergy
public double getOffsetForEnergy(double energy) Calculate bragg offset for given value of bragg energy -
adjustBraggOffsetMotor
Apply the offset for specified energy to offset motor.- Parameters:
energy-- Throws:
DeviceException
-
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:
-
getLoopType
-
setLoopType
-
getNumStepsPerInnerLoop
public int getNumStepsPerInnerLoop() -
setNumStepsPerInnerLoop
public void setNumStepsPerInnerLoop(int numStepsPerInnerLoop) -
getScanType
public int getScanType() -
setScanType
public void setScanType(int scanType) -
getOffsetLastMove
public double getOffsetLastMove() -
getOffsetGradient
public double getOffsetGradient() -
setOffsetGradient
public void setOffsetGradient(double offsetGradient) -
getEnergyOffsetStart
public double getEnergyOffsetStart() -
setEnergyOffsetStart
public void setEnergyOffsetStart(double energyOffsetStart) -
getOffsetMoveThreshold
public double getOffsetMoveThreshold() -
setOffsetMoveThreshold
public void setOffsetMoveThreshold(double offsetMoveThreshold) -
getAdjustBraggOffset
public boolean getAdjustBraggOffset() -
setAdjustBraggOffset
public void setAdjustBraggOffset(boolean adjustBraggOffset) -
getOffsetStartValue
public double getOffsetStartValue() -
setOffsetStartValue
public void setOffsetStartValue(double offsetStartValue) -
getBragg
-