Class Point

All Implemented Interfaces:
Serializable, IPosition

public final class Point extends AbstractPosition
This class represents an x,y position for a mapping scan. By default Points are 2D values used in things like GridScans. If used in a LineScan or a Spiral scan where one dimension has two motors, the constructor with is2D=false should be used. The Point location is immutable: you may not change the values of x and y after it is created.
See Also:
  • Constructor Details

    • Point

      public Point(int xIndex, double xPosition, int yIndex, double yPosition)
    • Point

      public Point(int xIndex, double xPosition, int yIndex, double yPosition, int stepIndex)
    • Point

      public Point(int xIndex, double xPosition, int yIndex, double yPosition, int stepIndex, boolean is2D)
    • Point

      public Point(String xName, int xIndex, double xPosition, String yName, int yIndex, double yPosition)
    • Point

      public Point(String xName, int xIndex, double xPosition, String yName, int yIndex, double yPosition, boolean is2D)
    • Point

      public Point(String xName, int xIndex, double xPosition, String yName, int yIndex, double yPosition, int stepIndex, boolean is2D)
  • Method Details

    • getX

      public double getX()
    • getY

      public double getY()
    • size

      public int size()
      Description copied from interface: IPosition
      The number of named scalars in this position
      Returns:
      number of scalars
    • getNames

      public List<String> getNames()
      Description copied from interface: IPosition
      The names of all the scalars set for this position. For instance 'x' and 'y' for a map or 'Temperature' Note to implementers: should never return null
      Returns:
      name of scalars
    • get

      public Double get(String name)
      Description copied from interface: IPosition
      The value of a named position. For instance get("X") to return the value of the X IScannable double.
      Parameters:
      name -
      Returns:
      value for the given axis name
    • getIndex

      public int getIndex(String name)
      Description copied from interface: IPosition
      Get the index of the data for instance in a scan of temperature from 290 to 300 step 1, the indices will be 0-10. If one dimension has more than one motor with it, for instance x and y in a line scan, both getIndex("x") and getIndex("y") return the same value.
      Returns:
      data index for given axis name
    • getValues

      public Map<String,Object> getValues()
      Description copied from interface: IPosition
      It is not required of an IPosition to provide getValues() but it may do so to avoid a new map being built up. Implement this method to ensure that your position runs faster. The default implementation works.
      Returns:
      values as a String to Object Map
      See Also:
    • getIndices

      public Map<String,Integer> getIndices()
      Description copied from interface: IPosition
      It is not required of an IPosition to provide getIndices() but it may do so to avoid a new map being built up. Implement this method to ensure that your position runs faster. The default implementation works.
      Returns:
      map of indices for axis name
      See Also: