Class ZebraQexafsScannable

All Implemented Interfaces:
INeXusInfoWriteable, ControllerRecord, Device, IScannableMotor, Scannable, ContinuouslyScannable, ScannableMotion, ScannableMotionUnits, InitializationListener, Configurable, Findable, gda.observable.IObservable

public class ZebraQexafsScannable extends QexafsScannable
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.

  • Constructor Details

    • ZebraQexafsScannable

      public ZebraQexafsScannable()
  • Method Details

    • configure

      public void configure() throws FactoryException
      Description copied from class: ConfigurableBase
      Default 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:
      configure in interface Configurable
      Overrides:
      configure in class QexafsScannable
      Throws:
      FactoryException - if there is an error in configuration e.g. required variable not set or cannot connect to device
    • prepareForContinuousMove

      public void prepareForContinuousMove() throws DeviceException
      Description copied from interface: ContinuouslyScannable
      Prepare hardware for the continuous move. This assumes that continuous parameters have been supplied.
      Specified by:
      prepareForContinuousMove in interface ContinuouslyScannable
      Overrides:
      prepareForContinuousMove in class QexafsScannable
      Throws:
      DeviceException
    • setEnergySwitchOn

      protected void setEnergySwitchOn() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException
      Switch the energy control switch to 'on'
      Throws:
      InterruptedException
      gov.aps.jca.CAException
      gov.aps.jca.TimeoutException
    • getNumberOfDataPoints

      public int getNumberOfDataPoints()
      Description copied from interface: ContinuouslyScannable
      The 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

      public void performContinuousMove() throws DeviceException
      Description copied from interface: ContinuouslyScannable
      Perform the move based on the supplied continuous parameters.
      Throws:
      DeviceException
    • continuousMoveComplete

      public void continuousMoveComplete() throws DeviceException
      Description copied from interface: ContinuouslyScannable
      Once move and data collection complete, reverts any hardware settings etc. set for the move.
      Throws:
      DeviceException
    • calculateEnergy

      public double calculateEnergy(int frameIndex) throws DeviceException
      Description copied from interface: ContinuouslyScannable
      As 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

      public Zebra getZebraDevice()
    • setZebraDevice

      public void setZebraDevice(Zebra zebraDevice)
    • setPvFactory

      public void setPvFactory(CachedLazyPVFactory pvFactory)
    • getPvFactory

      public CachedLazyPVFactory getPvFactory()
    • getPcEncType

      public int getPcEncType()
    • setPcEncType

      public void setPcEncType(int pcEncType)