Package gda.scan

Class GridScan

All Implemented Interfaces:
NestableScan, Scan, ScanChild, Serializable
Direct Known Subclasses:
GridScanMoveToOnly

public class GridScan extends ScanBase
Class to control the stepped movement of a Scannable object.

At each step, after movement, the readout() method of all object in the DetectorBase.activeDetectors arraylist is called.

See Also:
  • Field Details

  • Constructor Details

    • GridScan

      public GridScan()
    • GridScan

      public GridScan(Scannable ve, Object start, Object stop, Object step)
      Creates a scan object
      Parameters:
      ve - the scannable
      start - double
      stop - double
      step - double
    • GridScan

      public GridScan(Scannable ve, Object start, Object stop, Object step, Object time)
      Creates a scan object. This constructor added to allow detector counting time to be set. Probably this should be done in ScanBase somehow.
      Parameters:
      ve - the scannable
      start - double
      stop - double
      step - double
      time - Object
    • GridScan

      public GridScan(Scannable ve, Object start, Object stop, Object step, Object time, Object units)
      Creates a scan object. This constructor added to allow detector counting time to be set. Probably this should be done in ScanBase somehow.
      Parameters:
      ve - the scannable
      start - double
      stop - double
      step - double
      time - double
      units - String
    • GridScan

      public GridScan(Scannable ve, Object start, Object stop, Object step, Object time, Object units, DataWriter datahandler)
      Creates a scan object. This constructor added to allow detector counting time to be set. Probably this should be done in ScanBase somehow.
      Parameters:
      ve - the scannable
      start - double
      stop - double
      step - double
      time - double
      units - String
      datahandler - DataWriter
    • GridScan

      public GridScan(Scannable ve, Object start, Object stop, Object step, Scan childScan)
      A static method to create a scan which has a nested scan inside it. To run the scan, call the doScan() method. For example, in Jython: from gda.scan import Scan; myScan = Scan.create(tth,10,12,0.1,Scan.create(phi,20,30,1)); myScan.doScan()
      Parameters:
      ve - the scannable
      start - The position of the first data point
      stop - The position of the final data point
      step - The increment between data points
      childScan - ScanBase
    • GridScan

      public GridScan(Scannable ve, Object start, Object stop, Object step, Object time, Object units, ScriptAdapter scriptAdapter, Object period)
      A static method to create a scan which has a nested scan inside it. To run the scan, call the doScan() method.
      Parameters:
      ve - Scannable
      start - Object
      stop - Object
      step - Object
      time - Object
      units - Object
      scriptAdapter - ScriptAdapter
      period - Object
  • Method Details

    • doCollection

      public void doCollection() throws Exception
      Description copied from interface: Scan
      The method in which the work of the scan is performed. This method assumes that the data handler has already been created and the baton claimed.
      Specified by:
      doCollection in interface Scan
      Specified by:
      doCollection in class ScanBase
      Throws:
      Exception
    • moveStepIncrement

      public void moveStepIncrement(int stepNos) throws Exception
      Parameters:
      stepNos - int
      Throws:
      Exception
    • moveToStart

      public void moveToStart() throws Exception
      Move the object of this scan to its initial position.
      Throws:
      Exception
    • runChildScan

      protected void runChildScan() throws Exception
      Run the nested scan
      Throws:
      Exception
    • setupGridScan

      protected void setupGridScan()
      Extra setup commands for grid scans. These are needed as the hierachy of parent\child scans in a multi-dimensional gridscan need to share the same datahandler - and this datahandler would want to see the same list of scannables and detectors.

      This should be run after the base class setup() method.

    • hasChild

      public boolean hasChild()
      Returns whether a child scan has been requested.
      Returns:
      a boolean indicating whether the gridscan has an associated childscan