Package gda.scan

Class ScanPositionProviderFactory

java.lang.Object
gda.scan.ScanPositionProviderFactory

public class ScanPositionProviderFactory extends Object
  • Method Details

    • getNumberSteps

      public static int getNumberSteps(Object start, Object stop, Object step, int parameterSize) throws Exception
      Assuming the objects can be converted into doubles, this calculates the number of steps for the given InputLength
      Returns:
      int
      Throws:
      Exception
    • create

      public static <T> ScanPositionProvider create(List<T> pointsList)
      Parameters:
      pointsList -
      Returns:
      ScanPositionProvider
    • create

      public static <T> ScanPositionProvider create(T[] points)
      Type Parameters:
      T - type of positions
      Parameters:
      points -
      Returns:
      ScanPositionProvider e.g. ScanPositionProviderFactory.create(new Double[]{0., 1., 2., 3.,4.,5.});
    • createFromRegion

      public static ScanPositionProvider createFromRegion(List<List<Object>> regionsList)
      Creates a ScanPositionProvider from a list of lists. This method is called from python code (where the lists are PyTuples, so it should not be removed.
      Parameters:
      regionsList - list of regions - each inner list is start, stop, step
      Returns:
      ScanPositionProvider