Class AbstractSkyMatchEngine

java.lang.Object
uk.ac.starlink.table.join.AbstractSkyMatchEngine
All Implemented Interfaces:
MatchEngine
Direct Known Subclasses:
EllipseSkyMatchEngine, ErrorSkyMatchEngine, FixedSkyMatchEngine

public abstract class AbstractSkyMatchEngine extends Object implements MatchEngine
Abstract superclass for MatchEngines which work on the celestial sphere.
Since:
5 Sep 2011
Author:
Mark Taylor
  • Constructor Details

    • AbstractSkyMatchEngine

      protected AbstractSkyMatchEngine(SkyPixellator pixellator, double scale)
      Constructor.
      Parameters:
      pixellator - handles sky pixellisation
      scale - initial length scale for pixels, in radians
  • Method Details

    • setScale

      protected void setScale(double scale)
      Sets the length scale used for sky pixellisation.
      Parameters:
      scale - pixel length scale in radians
    • getScale

      protected double getScale()
      Returns the length scale used for sky pixellisation.
      Returns:
      pixel length scale in radians
    • getTuningParameters

      public uk.ac.starlink.table.DescribedValue[] getTuningParameters()
      Description copied from interface: MatchEngine
      Returns a set of DescribedValue objects whose values can be modified to tune the performance of the match. This match engine's performance can be influenced by calling DescribedValue.setValue(java.lang.Object) on the returned objects.

      Changing these values will make no difference to the output of MatchKit.matchScore(java.lang.Object[], java.lang.Object[]), but may change the output of MatchKit.getBins(java.lang.Object[]). This may change the CPU and memory requirements of the match, but will not change the result. The default value should be something sensible, so that setting the value of these parameters is not in general required.

      Specified by:
      getTuningParameters in interface MatchEngine
      Returns:
      array of described values which may influence match performance
    • getPixellator

      public SkyPixellator getPixellator()
      Returns this object's pixellator.
      Returns:
      pixellator
    • toString

      public abstract String toString()
      Overrides:
      toString in class Object
    • calculateSeparation

      public static double calculateSeparation(double alpha1, double delta1, double alpha2, double delta2)
      Returns the distance along a great circle between two points.
      Parameters:
      alpha1 - right ascension of point 1 in radians
      delta1 - declination of point 1 in radians
      alpha2 - right ascension of point 2 in radians
      delta2 - declination of point 2 in radians
      Returns:
      angular separation of point 1 and point 2 in radians
    • isSkyPosition

      public static boolean isSkyPosition(double alpha, double delta)
      Indicates whether a (longitude, latitude) pair can be interpreted as a legal position on the sky.
      Parameters:
      alpha - longitude in radians
      delta - latitude in radians
      Returns:
      true iff alpha is a finite real number and delta is in the range -PI/2<=delta<=PI/2