Package gda.device.scannable.zebra
Class ZebraQexafsScannable
- All Implemented Interfaces:
INeXusInfoWriteable,ControllerRecord,Device,IScannableMotor,Scannable,ContinuouslyScannable,ScannableMotion,ScannableMotionUnits,InitializationListener,Configurable,Findable,gda.observable.IObservable
The Zebra-specific parts of the Qexafs movement for B18.
I had hoped that this would be a generic solution for any motor movement involving Zebra, but it seems that there have had to be many solution-specific parts added.
So while this could not be used 'as is' on other beamlines, but it can be a template for other beamlines looking for a similar solution with Zebra.
-
Field Summary
Fields inherited from class gda.device.scannable.zebra.QexafsScannable
accelChnl, accelPV, braggCurrentSpeedPV, braggMaxSpeedPV, channelManager, channelsConfigured, continuousParameters, controller, currentSpeedChnl, desiredSpeed, endAngle, energySwitchChnl, energySwitchPV, extraRunUp, maxSpeed, maxSpeedChnl, runDownOn, runDownPosition, runUpOn, runupPosition, startAngle, stepIncDemDeg, stepSize, xtalSwitchChnl, xtalSwitchPVFields inherited from class gda.device.scannable.ScannableMotor
COPY_MOTOR_LIMITS_INTO_SCANNABLE_LIMITSFields inherited from class gda.device.scannable.ScannableMotionUnitsBase
unitsComponentFields 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.IScannableMotor
WAS_ALREADY_BUSY_SO_COULD_NOT_BE_MOVEDFields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLEFields inherited from interface gda.device.ScannableMotion
FIRSTINPUTLIMITSFields inherited from interface gda.device.ScannableMotionUnits
HARDWAREUNITS, USERUNITS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculateEnergy(int frameIndex) As this scannable controls the motion, it is responsible for knowing the energy at each framevoidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.voidOnce move and data collection complete, reverts any hardware settings etc.intThe actual hardware might not be able to return exactly the numbner of points requested.intvoidPerform the move based on the supplied continuous parameters.voidPrepare hardware for the continuous move.protected voidSwitch the energy control switch to 'on'voidsetPcEncType(int pcEncType) voidsetPvFactory(CachedLazyPVFactory pvFactory) voidsetZebraDevice(Zebra zebraDevice) Methods inherited from class gda.device.scannable.zebra.QexafsScannable
atCommandFailure, calculateMotionInDegrees, checkDeadbandAndMove, convertAngleToEnergy, convertEnergyToAngle, getAcceleration, getAccelPV, getBraggCurrentSpeedPV, getBraggMaxSpeedPV, getContinuousParameters, getD, getEnergySwitchPV, getExtraRunUp, getMaxSpeed, getRunUpScaleFactor, getXtalSwitchPV, initializationCompleted, isExafs, isRunDownOn, isRunUpOn, isToggleEnergyControl, resetDCMSpeed, setAccelPV, setBraggCurrentSpeedPV, setBraggMaxSpeedPV, setContinuousParameters, setEnergySwitchPV, setExtraRunUp, setRunDownOn, setRunUpOn, setRunUpScaleFactor, setToggleEnergyControl, setXtalSwitchPV, stop, stopStartEnergyControl, toggleEnergyControlMethods inherited from class gda.device.scannable.ScannableMotor
attachMotorObserver, getActualPosition, getAttribute, getControllerRecordName, getDemandPosition, getDemandPositionTolerance, getFirstInputLimits, getLowerInnerLimit, getLowerMotorLimit, getMotor, getMotorLimitsComponent, getMotorName, getMotorResolution, getPosition, getSpeed, getTimeToVelocity, getUpperInnerLimit, getUpperMotorLimit, getUserOffset, isBusy, isReturningDemandPosition, rawAsynchronousMoveTo, rawGetDemandPosition, rawGetPosition, setDemandPositionTolerance, setLogMoveRequestsWithInfo, setMotor, setMotorLimitsComponent, setMotorName, setNotifyObserverPositionChangeEvents, setPosition, setReturnDemandPosition, setSpeed, setTimeToVelocity, toFormattedString, waitWhileBusyMethods inherited from class gda.device.scannable.ScannableMotionUnitsBase
addAcceptableUnit, externalToInternal, getAcceptableUnits, getHardwareUnitString, getInitialUserUnits, getOffset, getUserUnits, internalToExternal, isAt, setHardwareUnitString, setInitialUserUnits, setOffset, setOffset, setUserUnitsMethods inherited from class gda.device.scannable.ScannableMotionBase
a, addPositionValidator, ar, asynchronousMoveTo, checkPositionValid, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, completeInstantiation, generateScannableLimitsReport, getAdditionalPositionValidators, getInputLimits, getInputLimits, getLimitsComponent, getLowerGdaLimits, getNumberTries, getScalingFactor, getTolerances, getUpperGdaLimits, moveTo, r, rawIsBusy, removePositionValidator, setAdditionalPositionValidators, setLimitsComponent, setLowerGdaLimits, setLowerGdaLimits, setNumberTries, setOffsetAndScalingComponent, setScalingFactor, setTolerance, setTolerances, setUpperGdaLimits, setUpperGdaLimits, writeNeXusInformation, writeNeXusInformationLimitsMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, 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
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
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
asynchronousMoveTo, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, isBusy, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, toFormattedString, waitWhileBusyMethods inherited from interface gda.device.ScannableMotion
a, ar, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, getLowerGdaLimits, getNumberTries, getOffset, getScalingFactor, getTolerances, getUpperGdaLimits, r, setLowerGdaLimits, setLowerGdaLimits, setNumberTries, setOffset, setScalingFactor, setTolerance, setTolerances, setUpperGdaLimits, setUpperGdaLimitsMethods inherited from interface gda.device.ScannableMotionUnits
addAcceptableUnit, getAcceptableUnits, getHardwareUnitString, getUserUnits, setHardwareUnitString, setOffset, setUserUnits
-
Constructor Details
-
ZebraQexafsScannable
public ZebraQexafsScannable()
-
-
Method Details
-
configure
Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classQexafsScannable- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
prepareForContinuousMove
Description copied from interface:ContinuouslyScannablePrepare hardware for the continuous move. This assumes that continuous parameters have been supplied.- Specified by:
prepareForContinuousMovein interfaceContinuouslyScannable- Overrides:
prepareForContinuousMovein classQexafsScannable- Throws:
DeviceException
-
setEnergySwitchOn
protected void setEnergySwitchOn() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedExceptionSwitch the energy control switch to 'on'- Throws:
InterruptedExceptiongov.aps.jca.CAExceptiongov.aps.jca.TimeoutException
-
getNumberOfDataPoints
public int getNumberOfDataPoints()Description copied from interface:ContinuouslyScannableThe actual hardware might not be able to return exactly the numbner of points requested. This method returns the actaul number the scan should expect.- Returns:
- int - the number of data points which would be actually returned based on the given ContinuousParameters
-
performContinuousMove
Description copied from interface:ContinuouslyScannablePerform the move based on the supplied continuous parameters.- Throws:
DeviceException
-
continuousMoveComplete
Description copied from interface:ContinuouslyScannableOnce move and data collection complete, reverts any hardware settings etc. set for the move.- Throws:
DeviceException
-
calculateEnergy
Description copied from interface:ContinuouslyScannableAs this scannable controls the motion, it is responsible for knowing the energy at each frame- Parameters:
frameIndex-- Returns:
- double energy in eV of the given frame
- Throws:
DeviceException
-
getZebraDevice
-
setZebraDevice
-
setPvFactory
-
getPvFactory
-
getPcEncType
public int getPcEncType() -
setPcEncType
public void setPcEncType(int pcEncType)
-