Class SpecsPhoibosSolsticeAnalyser
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.detector.DetectorBase
gda.device.detector.NXDetector
org.opengda.detector.electronanalyser.nxdetector.AbstractWriteRegionsImmediatelyNXDetector
uk.ac.diamond.daq.devices.specs.phoibos.SpecsPhoibosSolsticeAnalyser
- All Implemented Interfaces:
Detector,NexusDetector,NXPluginDetector,Device,Scannable,PositionCallableProvider<NexusTreeProvider>,Configurable,Findable,gda.observable.IObservable,Serializable,INexusDevice<NXdetector>,IWritableNexusDevice<NXdetector>,IAnalyserSequence,org.springframework.beans.factory.InitializingBean,ISpecsPhoibosAnalyser
@ServiceInterface(ISpecsPhoibosAnalyser.class)
public class SpecsPhoibosSolsticeAnalyser
extends AbstractWriteRegionsImmediatelyNXDetector
implements ISpecsPhoibosAnalyser
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields 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 org.eclipse.dawnsci.nexus.IWritableNexusDevice
SCALAR_DATASET_SHAPEFields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidDefault 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: '<'-> BEintdoubledoubledoubledouble[]Gets the energy axis from the analyser this is always in kinetic energydoubledoubledoubledouble[][]getImage()double[]getImage(int i) org.eclipse.january.dataset.IDatasetintdoubledoubleintGet the current analyser settings and builds a region from them.booleanbooleanintintdouble[]double[]getSpectrum(int index) org.eclipse.january.dataset.IDatasetdoubleintintdoubledouble[]getYAxis()protected NexusObjectWrapper<NXdetector> initialiseAdditionalNXdetectorData(NXdetector detector, NexusScanInfo info) booleanReturns true if no scan running or analyser is in aborted statevoidsetAcquisitionMode(String value) voidsetAlignmentTimeout(double alignmentTimeout) voidsetCentreEnergy(double value) voidsetCollectionStrategy(NXCollectionStrategyPlugin collectionStrategy) 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) protected voidsetupAdditionalDataAxisFields(NexusObjectWrapper<?> nexusWrapper, int scanRank) Setup the axis fields for the datasets that will be added to NXData groups.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.voidvoidvoidvoiddoubletoBindingEnergy(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 sequencevoidwritePosition(Object data, org.eclipse.january.dataset.SliceND scanSlice) Write the given data object at the given scan slice.Methods inherited from class org.opengda.detector.electronanalyser.nxdetector.AbstractWriteRegionsImmediatelyNXDetector
atScanStart, collectData, getDataStorage, getDescription, getDetectorID, getDetectorType, getNexusProviders, scanEnd, setClientFileAnnouncer, setCollectionTime, setDataStorage, setDescription, setDetectorIDMethods inherited from class gda.device.detector.NXDetector
__getattr__, __str__, afterPropertiesSet, asynchronousMoveTo, atCommandFailure, atScanEnd, atScanLineEnd, atScanLineStart, 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, 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
getDataDimensionsMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface org.eclipse.dawnsci.nexus.INexusDevice
getCustomNexusModification, getName, getNexusProvider, registerMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, checkPositionValid, getLevel, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setLevel, setScanMetadataAttribute, setScanMetadataAttributes, toFormattedString
-
Field Details
-
FIXED_ENERGY
- See Also:
-
FIXED_TRANSMISSION
- See Also:
-
SNAPSHOT
- See Also:
-
KINETIC_ENERGY
- See Also:
-
BINDING_ENERGY
- See Also:
-
VALUES
- See Also:
-
OPEN_VALVE
- See Also:
-
-
Constructor Details
-
SpecsPhoibosSolsticeAnalyser
public SpecsPhoibosSolsticeAnalyser()
-
-
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
-
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- Specified by:
getCollectionTimein classAbstractWriteRegionsImmediatelyNXDetector- Returns:
- double
-
getExposureTime
public double getExposureTime() -
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
-
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
- Throws:
Exception
-
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
-
stopAlignment
public void stopAlignment()- Specified by:
stopAlignmentin interfaceISpecsPhoibosAnalyser
-
stopAcquiring
public void stopAcquiring()- Specified by:
stopAcquiringin interfaceISpecsPhoibosAnalyser
-
getCenterEnergy
public double getCenterEnergy()- Specified by:
getCenterEnergyin interfaceISpecsPhoibosAnalyser
-
setCollectionStrategy
- Specified by:
setCollectionStrategyin interfaceNXPluginDetector- Overrides:
setCollectionStrategyin classAbstractWriteRegionsImmediatelyNXDetector
-
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- Specified by:
setSequenceFilein classAbstractWriteRegionsImmediatelyNXDetector- 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
-
stopAfterCurrentRegion
public void stopAfterCurrentRegion()- Specified by:
stopAfterCurrentRegionin 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
-
writePosition
public void writePosition(Object data, org.eclipse.january.dataset.SliceND scanSlice) throws NexusException Description copied from interface:IWritableNexusDeviceWrite the given data object at the given scan slice.- Specified by:
writePositionin interfaceIWritableNexusDevice<NXdetector>- Parameters:
data- data object to writescanSlice- scan slice specifying where in the dataset to write to.- Throws:
NexusException- if the position could not be written for any reason
-
getStepTime
- Throws:
Exception
-
getTotalSteps
- Throws:
Exception
-
setSnapshotImageSizeX
public void setSnapshotImageSizeX(int snapshotImageSizeX) -
getSnapshotImageSizeX
public int getSnapshotImageSizeX()- Specified by:
getSnapshotImageSizeXin interfaceISpecsPhoibosAnalyser
-
initialiseAdditionalNXdetectorData
protected NexusObjectWrapper<NXdetector> initialiseAdditionalNXdetectorData(NXdetector detector, NexusScanInfo info) - Specified by:
initialiseAdditionalNXdetectorDatain classAbstractWriteRegionsImmediatelyNXDetector
-
setupAdditionalDataAxisFields
Description copied from class:AbstractWriteRegionsImmediatelyNXDetectorSetup the axis fields for the datasets that will be added to NXData groups. Come under_indicies. Important so that datasets correctly plot and won't crop an axis. - Specified by:
setupAdditionalDataAxisFieldsin classAbstractWriteRegionsImmediatelyNXDetector- Parameters:
nexusWrapper- to add the axis fields tooscanRank- information about the scan dimensions
-
beforeCollectData
- Specified by:
beforeCollectDatain classAbstractWriteRegionsImmediatelyNXDetector- Throws:
DeviceException
-
getSequenceFile
- Specified by:
getSequenceFilein interfaceIAnalyserSequence
-
getDetectorVoltage
public double getDetectorVoltage()
-