Class PlaneCorrelationCoordSet

java.lang.Object
uk.ac.starlink.ttools.plot2.layer.PlaneCorrelationCoordSet
All Implemented Interfaces:
CartesianMultiPointCoordSet, MultiPointCoordSet

public class PlaneCorrelationCoordSet extends Object implements CartesianMultiPointCoordSet
MultiPointCoordSet for 2-d ellipses defined by coordinate errors and a correlation. This is how Gaia errors are quoted.
Since:
5 Apr 2017
Author:
Mark Taylor
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    calculateErrorVectors(double xerr, double yerr, double xycorr, double[] ra, double[] rb)
    Calculates the vectors defining an error ellipse from the errors on each axis and a correlation value.
    Creates a MultiPointForm that can plot ellipses on the plane, corresponding to this coordset.
    Returns the coordinate definitions.
    int
    Returns the number of (non-central) data positions defined by this coord set.
    boolean
    readPoints(Tuple tuple, int icol, double[] xy0, double[][] xyExtras)
    Reads the non-central points from a appropriate span of columns in a supplied tuple.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlaneCorrelationCoordSet

      public PlaneCorrelationCoordSet()
      Constructor.
  • Method Details

    • getCoords

      public Coord[] getCoords()
      Description copied from interface: MultiPointCoordSet
      Returns the coordinate definitions.
      Specified by:
      getCoords in interface MultiPointCoordSet
      Returns:
      coords
    • getPointCount

      public int getPointCount()
      Description copied from interface: MultiPointCoordSet
      Returns the number of (non-central) data positions defined by this coord set.
      Specified by:
      getPointCount in interface MultiPointCoordSet
      Returns:
      data position count
    • readPoints

      public boolean readPoints(Tuple tuple, int icol, double[] xy0, double[][] xyExtras)
      Description copied from interface: CartesianMultiPointCoordSet
      Reads the non-central points from a appropriate span of columns in a supplied tuple. The central data position must be supplied as input. The icExtra value gives the column corresponding to the first coord of this coordinate set in the sequence; the following few columns are assumed to correspond 1:1 to the coords in this coord set.
      Specified by:
      readPoints in interface CartesianMultiPointCoordSet
      Parameters:
      tuple - tuple
      icol - index of tuple field corresponding to the first of the coordinates in this set
      xy0 - nDataDim-element array giving central data position
      xyExtras - [nPointCount][nDataDim]-shaped array into which the non-central data positions will be written
      Returns:
      true iff the conversion was successful
    • calculateErrorVectors

      public static void calculateErrorVectors(double xerr, double yerr, double xycorr, double[] ra, double[] rb)
      Calculates the vectors defining an error ellipse from the errors on each axis and a correlation value.
      Parameters:
      xerr - error in X coordinate
      yerr - error in Y coordinate
      xycorr - dimensionless X-Y correlation in range -1..+1
      ra - 2-element vector to receive primary radius vector
      rb - 2-element vector to receive secondary radius vector
    • createForm

      public static MultiPointForm createForm()
      Creates a MultiPointForm that can plot ellipses on the plane, corresponding to this coordset.
      Returns:
      new form