Package gda.device.scannable
Class XesOffsets
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.scannable.XesOffsets
- All Implemented Interfaces:
IXesOffsets,Configurable,Findable
@ServiceInterface(IXesOffsets.class)
public class XesOffsets
extends FindableConfigurableBase
implements IXesOffsets
This class is a replacement for the jython XESOffset, XESCalculate classes in xes_offset.py, xes_calculate.py.
-
Field Summary
Fields inherited from interface gda.exafs.xes.IXesOffsets
OFFSET_UPDATE_EVENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidApply offset settings saved in file to motors ('Load' button in xes calibration view)voidapplyFromLive(double fluoEnergy) Calibrate the spectrometer : Assume that the spectrometer is currently aligned to specified energy, Calculate the extra offsets such that actual current position + offset = position needed for energy.voidApply motor offsets using values in temporary filevoidDefault 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.Used for 'Loaded offset file' textbox in xes calibration view.Get name of temporary filevoidreApply()Re-apply offset parameters previously set usingIXesOffsets.apply(String)voidSet offsets on all motors to zero ('Remove offsets' button in xes calibration view)voidSave current motor offset values to file.voidSave current motor offsets to temporary filevoidsetSpectrometerGroup(ScannableGroup spectrometerGroup) voidsetStoreDirectory(String storeDirectory) voidsetTempSaveName(String filename) Set name of temporary filevoidsetXesEnergyScannable(XESEnergyScannable xesEnergyScannable) Methods inherited from class gda.factory.FindableConfigurableBase
getName, setNameMethods inherited from class gda.factory.ConfigurableBase
isConfigureAtStartup, isConfigured, reconfigure, setConfigured
-
Constructor Details
-
XesOffsets
public XesOffsets()
-
-
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 classConfigurableBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
applyFromLive
Calibrate the spectrometer :- Assume that the spectrometer is currently aligned to specified energy,
- Calculate the extra offsets such that actual current position + offset = position needed for energy.
- Save the offsets to temporary file. (Run by 'Calibrate' button in xes calibration view).
- Specified by:
applyFromLivein interfaceIXesOffsets- Throws:
DeviceExceptionIOException
-
apply
Apply offset settings saved in file to motors ('Load' button in xes calibration view)- Specified by:
applyin interfaceIXesOffsets- Throws:
IOException
-
reApply
Description copied from interface:IXesOffsetsRe-apply offset parameters previously set usingIXesOffsets.apply(String)- Specified by:
reApplyin interfaceIXesOffsets- Throws:
IOException
-
applyFromTemp
Description copied from interface:IXesOffsetsApply motor offsets using values in temporary file- Specified by:
applyFromTempin interfaceIXesOffsets- Throws:
IOException
-
removeAll
public void removeAll()Set offsets on all motors to zero ('Remove offsets' button in xes calibration view)- Specified by:
removeAllin interfaceIXesOffsets
-
saveAs
Save current motor offset values to file. ('Save' button from xes calibration view)- Specified by:
saveAsin interfaceIXesOffsets- Throws:
IOException
-
saveToTemp
Description copied from interface:IXesOffsetsSave current motor offsets to temporary file- Specified by:
saveToTempin interfaceIXesOffsets- Throws:
IOException
-
getCurrentFile
Used for 'Loaded offset file' textbox in xes calibration view.- Specified by:
getCurrentFilein interfaceIXesOffsets- Returns:
- Name of current offset file
-
setTempSaveName
Description copied from interface:IXesOffsetsSet name of temporary file- Specified by:
setTempSaveNamein interfaceIXesOffsets
-
getTempSaveName
Description copied from interface:IXesOffsetsGet name of temporary file- Specified by:
getTempSaveNamein interfaceIXesOffsets
-
getSpectrometerGroupName
- Specified by:
getSpectrometerGroupNamein interfaceIXesOffsets
-
getXesEnergyScannableName
- Specified by:
getXesEnergyScannableNamein interfaceIXesOffsets
-
getStoreDirectory
-
setStoreDirectory
-
getSpectrometerGroup
-
setSpectrometerGroup
-
getXesEnergyScannable
-
setXesEnergyScannable
-