Class ScannableGaussian

All Implemented Interfaces:
Device, Scannable, Configurable, Findable, gda.observable.IObservable

public class ScannableGaussian extends ScannableBase
Simple Scannable that returns a value from a Gaussian function when getPosition() is called. This is currently used for testing MonoOptimisation.
  • Field Details

    • scannableForPosition

      protected Scannable scannableForPosition
    • gaussian

      protected Gaussian gaussian
    • currentPos

      protected double currentPos
    • noiseLevel

      protected double noiseLevel
  • Constructor Details

    • ScannableGaussian

      public ScannableGaussian(String name, double centrePos, double fwhm, double area)
  • Method Details

    • setParams

      public void setParams(double centrePos, double fwhm, double area)
    • setScannableToMonitorForPosition

      public void setScannableToMonitorForPosition(Scannable mon)
    • rawAsynchronousMoveTo

      public void rawAsynchronousMoveTo(Object position) throws DeviceException
      Description copied from class: ScannableBase
      [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.
      Overrides:
      rawAsynchronousMoveTo in class ScannableBase
      Parameters:
      position - Position in its internal/hardware representation. e.g. with units and offsets removed
      Throws:
      DeviceException
      See Also:
    • 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
    • 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
    • getNoiseLevel

      public double getNoiseLevel()
    • setNoiseLevel

      public void setNoiseLevel(double noiseLevel)