Class SpecsPhoibosAnalyserSeparateIterations
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.detector.DetectorBase
gda.device.detector.NXDetector
uk.ac.diamond.daq.devices.specs.phoibos.SpecsPhoibosAnalyserSeparateIterations
- All Implemented Interfaces:
Detector,NexusDetector,NXPluginDetector,Device,Scannable,PositionCallableProvider<NexusTreeProvider>,Configurable,Findable,gda.observable.IObservable,Serializable,IAnalyserSequence,org.springframework.beans.factory.InitializingBean,ISpecsPhoibosAnalyser
@ServiceInterface(ISpecsPhoibosAnalyser.class)
public class SpecsPhoibosAnalyserSeparateIterations
extends NXDetector
implements ISpecsPhoibosAnalyser
This class is the actual detector used in GDA. It is composed of a SpecsPhoibosController handling the EPICS
communication, and a SpecsPhoibosCollectionStrategy handling the collection logic.
It is exported via RMI using the ISpecsPhoibosAnalyser interface, to the client GUI to request information
available here, like the available getLensModes(). It also provides the logic for BE invalid input: '<'-> KE conversion using
the photon energy.
IObserver of this class to receive live updates of the scan as it is received from EPICS,
see SpecsPhoibosLiveDataUpdate- See Also:
-
Field Summary
Fields inherited from class gda.device.detector.NXDetector
lastReadoutValue, UNSUPPORTED_PART_OF_SCANNABLE_INTERFACE, UNSUPPORTED_SET_FUNCTIONFields inherited from class gda.device.detector.DetectorBase
collectionTimeFields 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_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDefault 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.voidvoidvoidvoiddoubledoubleReturns the time, in seconds, the detector collects for during the next call to collectData()intdoubleGets the photon energy that will currently be used when converting KE invalid input: '<'-> BEintdoubledoubledouble[]Gets the energy axis from the analyser this is always in kinetic energydoubledoubledoubledouble[][]getImage()org.eclipse.january.dataset.IDatasetintdoubledoubleintGet the current analyser settings and builds a region from them.booleanbooleanintintdouble[]double[]getSpectrum(int index) org.eclipse.january.dataset.IDatasetdouble[]intintdoubledouble[]getYAxis()booleanReturns true if no scan running or analyser is in aborted statevoidsetAcquisitionMode(String value) voidsetAlignmentTimeout(double alignmentTimeout) voidsetCentreEnergy(double value) voidsetCollectionStrategy(NXCollectionStrategyPlugin collectionStrategy) voidsetCollectionTime(double collectionTime) Sets the collection time, in seconds, to be used during the next call of collectData.voidsetController(SpecsPhoibosController controller) voidsetDefaultRegionUi(SpecsPhoibosRegion region) voidsetDetectorEnergyWidth(double detectorEnergyWidth) voidsetDwellTime(double dwellTime) voidsetEnergyStep(double value) voidsetExperimentalShutter(EnumPositioner experimentalShutter) voidsetHighEnergy(double value) voidsetIterations(int value) voidsetLensMode(String value) voidsetLowEnergy(double value) voidsetPassEnergy(double value) voidsetPhotonEnergyProvider(Scannable photonEnergyProvider) voidsetPrelensValve(EnumPositioner prelensValve) voidsetPsuMode(String psuMode) voidsetRegion(SpecsPhoibosRegion region) Configures the analyser to acquire the region specified.voidsetSafeState(boolean safe) voidsetSequence(SpecsPhoibosSequence sequence, String filepath) Sets up the analyser to run the provided sequence.voidsetSequenceFile(String filePath) Set the analyser sequence from a sequence file.voidsetShouldCheckExperimentalShutter(boolean shouldCheckExperimentalShutter) voidsetShouldCheckPrelensValve(boolean shouldCheckPrelensValve) voidsetSlices(int slices) voidsetSnapshotImageSizeX(int snapshotImageSizeX) voidsetWorkFunction(double workFunction) voidvoidvoidstartAlignment(double passEnergy, double centreEnergy, double exposureTime, String lensMode) Starts the analyser acquiring in single image mode, this is intended for use in alignment.voidvoidvoiddoubletoBindingEnergy(double kineticEnergy) Converts kinetic energy to binding energy according to:
BE = hν - KE - Φ
where hν = photon energy and Φ = analyser work functiondouble[]toBindingEnergy(double[] kineticEnergy) Converts kinetic energy to binding energy according to:
BE = hν - KE - Φ
where hν = photon energy and Φ = analyser work functiondoubletoKineticEnergy(double bindingEnergy) Converts binding energy to kinetic energy according to:
KE = hν - BE - Φ
where hν = photon energy and Φ = analyser work functiondouble[]toKineticEnergy(double[] bindingEnergy) Converts binding energy to kinetic energy according to:
KE = hν - BE - Φ
where hν = photon energy and Φ = analyser work functionvalidateSequence(SpecsPhoibosSequence sequence) Performs EPICS validation and scannable position validation for all regions in a sequenceMethods inherited from class gda.device.detector.NXDetector
__getattr__, __str__, afterPropertiesSet, asynchronousMoveTo, atCommandFailure, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, collectData, createsOwnFiles, endCollection, getAdditionalPluginList, getCollectionStrategy, getExtraNames, getFileStructure, getInputNames, getOutputFormat, getPlugin, getPluginList, getPluginMap, getPosition, getPositionCallable, getStatus, isAddCollectTimeMs, isBusy, prepareCollectionStrategyAtScanStart, prepareForCollection, readout, setAddCollectTimeMs, setAdditionalPluginList, setExtraNames, setInputNames, setOutputFormat, stop, waitWhileBusyMethods inherited from class gda.device.detector.DetectorBase
checkPositionValid, getDataDimensions, getDescription, getDetectorID, getDetectorType, toFormattedStringMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, externalToInternal, getLevel, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setLevel, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, 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
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.Detector
getDataDimensions, getDescription, getDetectorID, getDetectorTypeMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface uk.ac.diamond.daq.devices.specs.phoibos.api.ISpecsPhoibosAnalyser
stopAlignmentMethods inherited from interface gda.device.Scannable
atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, checkPositionValid, getLevel, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setLevel, setScanMetadataAttribute, setScanMetadataAttributes, toFormattedString
-
Constructor Details
-
SpecsPhoibosAnalyserSeparateIterations
public SpecsPhoibosAnalyserSeparateIterations()
-
-
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
-
setSnapshotImageSizeX
public void setSnapshotImageSizeX(int snapshotImageSizeX) -
getSnapshotImageSizeX
public int getSnapshotImageSizeX()- Specified by:
getSnapshotImageSizeXin interfaceISpecsPhoibosAnalyser
-
getCollectionTime
public double getCollectionTime()Description copied from interface:DetectorReturns the time, in seconds, the detector collects for during the next call to collectData()- Specified by:
getCollectionTimein interfaceDetector- Overrides:
getCollectionTimein classDetectorBase- Returns:
- double
-
getExposureTime
public double getExposureTime() -
setCollectionTime
public void setCollectionTime(double collectionTime) Description copied from interface:DetectorSets the collection time, in seconds, to be used during the next call of collectData.- Specified by:
setCollectionTimein interfaceDetector- Overrides:
setCollectionTimein classDetectorBase- Parameters:
collectionTime- the collection time in seconds
-
setDwellTime
public void setDwellTime(double dwellTime) - Specified by:
setDwellTimein interfaceISpecsPhoibosAnalyser
-
setIterations
public void setIterations(int value) -
getIterations
public int getIterations()- Specified by:
getIterationsin interfaceISpecsPhoibosAnalyser
-
getCurrentIteration
public int getCurrentIteration()- Specified by:
getCurrentIterationin interfaceISpecsPhoibosAnalyser
-
setLensMode
- Specified by:
setLensModein interfaceISpecsPhoibosAnalyser
-
getLensMode
- Specified by:
getLensModein interfaceISpecsPhoibosAnalyser
-
setAcquisitionMode
- Specified by:
setAcquisitionModein interfaceISpecsPhoibosAnalyser
-
getAcquisitionMode
-
getAcquisitionModes
- Specified by:
getAcquisitionModesin interfaceISpecsPhoibosAnalyser
-
setPassEnergy
public void setPassEnergy(double value) - Specified by:
setPassEnergyin interfaceISpecsPhoibosAnalyser
-
getPassEnergy
public double getPassEnergy()- Specified by:
getPassEnergyin interfaceISpecsPhoibosAnalyser
-
setLowEnergy
public void setLowEnergy(double value) -
getLowEnergy
public double getLowEnergy() -
setHighEnergy
public void setHighEnergy(double value) -
getHighEnergy
public double getHighEnergy() -
setEnergyStep
public void setEnergyStep(double value) -
getEnergyStep
public double getEnergyStep() -
getSpectrum
public double[] getSpectrum()- Specified by:
getSpectrumin interfaceISpecsPhoibosAnalyser
-
getSummedSpectrum
public double[] getSummedSpectrum() -
getSpectrum
public double[] getSpectrum(int index) - Specified by:
getSpectrumin interfaceISpecsPhoibosAnalyser
-
setCentreEnergy
public void setCentreEnergy(double value) -
getSpectrumAsDataset
public org.eclipse.january.dataset.IDataset getSpectrumAsDataset() -
getImage
public double[][] getImage()- Specified by:
getImagein interfaceISpecsPhoibosAnalyser
-
getImageAsDataset
- Throws:
Exception
-
getLensModes
- Specified by:
getLensModesin interfaceISpecsPhoibosAnalyser
-
getController
-
setController
-
getEnergyAxis
public double[] getEnergyAxis()Gets the energy axis from the analyser this is always in kinetic energy- Specified by:
getEnergyAxisin interfaceISpecsPhoibosAnalyser
-
getYAxis
public double[] getYAxis()- Specified by:
getYAxisin interfaceISpecsPhoibosAnalyser
-
getYUnits
- Specified by:
getYUnitsin interfaceISpecsPhoibosAnalyser
-
getPsuModes
- Specified by:
getPsuModesin interfaceISpecsPhoibosAnalyser
-
setPsuMode
- Specified by:
setPsuModein interfaceISpecsPhoibosAnalyser
-
getDetectorEnergyWidth
public double getDetectorEnergyWidth()- Specified by:
getDetectorEnergyWidthin interfaceISpecsPhoibosAnalyser
-
setDetectorEnergyWidth
public void setDetectorEnergyWidth(double detectorEnergyWidth) -
setRegion
Description copied from interface:ISpecsPhoibosAnalyserConfigures the analyser to acquire the region specified.- Specified by:
setRegionin interfaceISpecsPhoibosAnalyser- Parameters:
region- The region to set /** This is the interface used to expose the SPECS Phoibos analyser over RMI.It is intended to only contain the methods needed to make a rich GUI to interact with the analyser
-
getRegion
Description copied from interface:ISpecsPhoibosAnalyserGet the current analyser settings and builds a region from them.- Specified by:
getRegionin interfaceISpecsPhoibosAnalyser- Returns:
- The region the analyser is currently configured for
-
getValues
public int getValues() -
getPsuMode
- Specified by:
getPsuModein interfaceISpecsPhoibosAnalyser
-
getDwellTime
public double getDwellTime()- Specified by:
getDwellTimein interfaceISpecsPhoibosAnalyser
-
setSlices
public void setSlices(int slices) -
getSlices
public int getSlices()- Specified by:
getSlicesin interfaceISpecsPhoibosAnalyser
-
startAlignment
public void startAlignment(double passEnergy, double centreEnergy, double exposureTime, String lensMode) Description copied from interface:ISpecsPhoibosAnalyserStarts the analyser acquiring in single image mode, this is intended for use in alignment. This is non blocking- Specified by:
startAlignmentin interfaceISpecsPhoibosAnalyser
-
startAcquiring
public void startAcquiring() -
startAcquiringWait
- Throws:
DeviceException
-
stopAcquiring
public void stopAcquiring()- Specified by:
stopAcquiringin interfaceISpecsPhoibosAnalyser
-
getCenterEnergy
public double getCenterEnergy()- Specified by:
getCenterEnergyin interfaceISpecsPhoibosAnalyser
-
setCollectionStrategy
- Specified by:
setCollectionStrategyin interfaceNXPluginDetector- Overrides:
setCollectionStrategyin classNXDetector
-
setSequenceFile
Set the analyser sequence from a sequence file. If the path is absolute it will be used as is else the absolute path will be constructed from the visit xml directory and the provided file name.- Specified by:
setSequenceFilein interfaceIAnalyserSequence- Parameters:
filePath- Path to a sequence file either absolute or a file inside the visit xml directory
-
setSequence
Description copied from interface:ISpecsPhoibosAnalyserSets up the analyser to run the provided sequence.- Specified by:
setSequencein interfaceISpecsPhoibosAnalyser- Parameters:
sequence- The sequence to setfilepath- The path of the sequence file
-
getDetectorStatus
-
getStatusMessage
-
toBindingEnergy
public double toBindingEnergy(double kineticEnergy) Description copied from interface:ISpecsPhoibosAnalyserConverts kinetic energy to binding energy according to:
BE = hν - KE - Φ
where hν = photon energy and Φ = analyser work function- Specified by:
toBindingEnergyin interfaceISpecsPhoibosAnalyser- Parameters:
kineticEnergy- to convert- Returns:
- The equivalent binding energy
-
toKineticEnergy
public double toKineticEnergy(double bindingEnergy) Description copied from interface:ISpecsPhoibosAnalyserConverts binding energy to kinetic energy according to:
KE = hν - BE - Φ
where hν = photon energy and Φ = analyser work function- Specified by:
toKineticEnergyin interfaceISpecsPhoibosAnalyser- Parameters:
bindingEnergy- to convert- Returns:
- The equivalent binding energy
-
toBindingEnergy
public double[] toBindingEnergy(double[] kineticEnergy) Description copied from interface:ISpecsPhoibosAnalyserConverts kinetic energy to binding energy according to:
BE = hν - KE - Φ
where hν = photon energy and Φ = analyser work function- Specified by:
toBindingEnergyin interfaceISpecsPhoibosAnalyser- Parameters:
kineticEnergy- to convert- Returns:
- The equivalent binding energy
-
toKineticEnergy
public double[] toKineticEnergy(double[] bindingEnergy) Description copied from interface:ISpecsPhoibosAnalyserConverts binding energy to kinetic energy according to:
KE = hν - BE - Φ
where hν = photon energy and Φ = analyser work function- Specified by:
toKineticEnergyin interfaceISpecsPhoibosAnalyser- Parameters:
bindingEnergy- to convert- Returns:
- The equivalent binding energy
-
getPhotonEnergyProvider
-
setPhotonEnergyProvider
-
getPrelensValve
-
setPrelensValve
-
getWorkFunction
public double getWorkFunction() -
setWorkFunction
public void setWorkFunction(double workFunction) -
getTotalPoints
public int getTotalPoints() -
getCurrentPoint
public int getCurrentPoint() -
getPointInIteration
public int getPointInIteration() -
validateSequence
public SpecsPhoibosSequenceValidation validateSequence(SpecsPhoibosSequence sequence) throws DeviceException Description copied from interface:ISpecsPhoibosAnalyserPerforms EPICS validation and scannable position validation for all regions in a sequence- Specified by:
validateSequencein interfaceISpecsPhoibosAnalyser- Parameters:
sequence-- Returns:
- SpecsPhoibosSequenceValidation
- Throws:
DeviceException
-
isNotBusy
public boolean isNotBusy()Returns true if no scan running or analyser is in aborted state- Specified by:
isNotBusyin interfaceISpecsPhoibosAnalyser
-
getCurrentPositionString
- Specified by:
getCurrentPositionStringin interfaceISpecsPhoibosAnalyser
-
getCurrentRegionName
- Specified by:
getCurrentRegionNamein interfaceISpecsPhoibosAnalyser
-
getCurrentPhotonEnergy
public double getCurrentPhotonEnergy()Gets the photon energy that will currently be used when converting KE invalid input: '<'-> BE- Returns:
- The cached photon energy
-
setSafeState
public void setSafeState(boolean safe) -
getExperimentalShutter
-
setExperimentalShutter
-
getCurrentOrLastRegion
-
stopAfterCurrentIteration
public void stopAfterCurrentIteration()- Specified by:
stopAfterCurrentIterationin interfaceISpecsPhoibosAnalyser
-
getShouldCheckExperimentalShutter
public boolean getShouldCheckExperimentalShutter()- Specified by:
getShouldCheckExperimentalShutterin interfaceISpecsPhoibosAnalyser
-
setShouldCheckExperimentalShutter
public void setShouldCheckExperimentalShutter(boolean shouldCheckExperimentalShutter) - Specified by:
setShouldCheckExperimentalShutterin interfaceISpecsPhoibosAnalyser
-
getShouldCheckPrelensValve
public boolean getShouldCheckPrelensValve()- Specified by:
getShouldCheckPrelensValvein interfaceISpecsPhoibosAnalyser
-
setShouldCheckPrelensValve
public void setShouldCheckPrelensValve(boolean shouldCheckPrelensValve) - Specified by:
setShouldCheckPrelensValvein interfaceISpecsPhoibosAnalyser
-
enableExperimentalShutterCheck
public void enableExperimentalShutterCheck()- Specified by:
enableExperimentalShutterCheckin interfaceISpecsPhoibosAnalyser
-
disableExperimentalShutterCheck
public void disableExperimentalShutterCheck()- Specified by:
disableExperimentalShutterCheckin interfaceISpecsPhoibosAnalyser
-
enablePrelensValveCheck
public void enablePrelensValveCheck()- Specified by:
enablePrelensValveCheckin interfaceISpecsPhoibosAnalyser
-
disablePrelensValveCheck
public void disablePrelensValveCheck()- Specified by:
disablePrelensValveCheckin interfaceISpecsPhoibosAnalyser
-
setAlignmentTimeout
public void setAlignmentTimeout(double alignmentTimeout) -
setDefaultRegionUi
- Specified by:
setDefaultRegionUiin interfaceISpecsPhoibosAnalyser
-
getDefaultRegionUi
- Specified by:
getDefaultRegionUiin interfaceISpecsPhoibosAnalyser
-
getSequenceFile
- Specified by:
getSequenceFilein interfaceIAnalyserSequence
-
stopAfterCurrentRegion
public void stopAfterCurrentRegion()- Specified by:
stopAfterCurrentRegionin interfaceISpecsPhoibosAnalyser
-