Class XasScannable

All Implemented Interfaces:
Device, Scannable, Configurable, Findable, gda.observable.IObservable
Direct Known Subclasses:
XasScannableDetectorWithHarmonics, XasScannableWithDetectorFramesSetup

public class XasScannable extends ScannableBase
Used for controlling the operations for each scan point in an XAS step scan where a motor is to be moved and afterwards a series of detectors are to be operated for the same period of time.

As the step size and collection time varies during XAS scans this Scannable is used so it can operate over a 2D PyTuple of the data points (an explicit scan object in ConcurrentScan).

  • Field Details

    • energyScannable

      protected Scannable energyScannable
    • theDetectors

      protected Scannable[] theDetectors
    • lastCollectionTimeUsed

      protected double lastCollectionTimeUsed
  • Constructor Details

    • XasScannable

      public XasScannable()
  • Method Details

    • asynchronousMoveTo

      public void asynchronousMoveTo(Object position) throws DeviceException
      Description copied from class: ScannableBase
      Trigger a move/operation and return immediately. Implementations of this method should be non-blocking to allow concurrent motion; the isBusy method will be used to determine when the move has completed. Converts the external (user) position to an internal position and passes this to rawAsynchronousMoveTo.
      Specified by:
      asynchronousMoveTo in interface Scannable
      Overrides:
      asynchronousMoveTo in class ScannableBase
      Parameters:
      position - Position to move to should have an element for each input field.
      Throws:
      DeviceException
    • getPosition

      public Object getPosition() throws DeviceException
      Description copied from class: ScannableBase
      Returns the current position of the Scannable. Called by ConcurentScan at the end of the point. Reads an internal (hardware) position from rawGetPosition, converts this to an external (user) position and returns it.
      Specified by:
      getPosition in interface Scannable
      Overrides:
      getPosition in class ScannableBase
      Returns:
      Current position with an element for each input and extra field. null if their are no fields.
      Throws:
      DeviceException
    • atPointStart

      public void atPointStart() throws DeviceException
      Description copied from class: ScannableBase
      Called on every Scannable at every data point, for scans which are broken down into individual points (i.e. non-continuous scans) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
      Specified by:
      atPointStart in interface Scannable
      Overrides:
      atPointStart in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • atScanLineStart

      public void atScanLineStart() throws DeviceException
      Description copied from class: ScannableBase
      Called for every Scannable at the start of every scan Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
      Specified by:
      atScanLineStart in interface Scannable
      Overrides:
      atScanLineStart in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • isBusy

      public boolean isBusy() throws DeviceException
      Description copied from interface: Scannable
      Check if the Scannable is moving/operating.
      Returns:
      true - if operation carried out by moveTo has not completed yet
      Throws:
      DeviceException
    • checkPositionValid

      public String checkPositionValid(Object position)
      Description copied from class: ScannableBase
      This default behaviour should be extended by most subclasses! Tests if the given object is meaningful to this Scannable and so could be used by one of the move commands. May check limits and other things too. This is the method called by scans on all points before the scan is run.
      Specified by:
      checkPositionValid in interface Scannable
      Overrides:
      checkPositionValid in class ScannableBase
      Parameters:
      position -
      Returns:
      null if position is valid, or returns a description if not.
      See Also:
    • getEnergyScannable

      public Scannable getEnergyScannable()
      Returns:
      Returns the energyScannable.
    • setEnergyScannable

      public void setEnergyScannable(Scannable energyScannable)
      Parameters:
      energyScannable - The energyScannable to set.
    • getInputNames

      public String[] getInputNames()
      Description copied from interface: Scannable
      gets a array of InputNames used by moveTo of this scannable.
      Specified by:
      getInputNames in interface Scannable
      Overrides:
      getInputNames in class ScannableBase
      Returns:
      array of the names of the elements of the object returned by getPosition
    • getDetectors

      public Scannable[] getDetectors()
      Returns:
      Returns the theDetectors.
    • setDetectors

      public void setDetectors(Scannable[] theDetectors)
      Parameters:
      theDetectors - The theDetectors to set.
    • atScanStart

      public void atScanStart() throws DeviceException
      Description copied from class: ScannableBase
      Called for every Scannable at the start of a group of nested scans (or a single scan if that is the case) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
      Specified by:
      atScanStart in interface Scannable
      Overrides:
      atScanStart in class ScannableBase
      Throws:
      DeviceException
      See Also: