uk.ac.starlink.table.join
Class HTMMatchEngine

java.lang.Object
  extended by uk.ac.starlink.table.join.SkyMatchEngine
      extended by uk.ac.starlink.table.join.HTMMatchEngine
All Implemented Interfaces:
MatchEngine

public class HTMMatchEngine
extends SkyMatchEngine

Implements the object matching interface for sky coordinates using the HTM (Hierarchical Triangular Mesh) pixel-indexing scheme.

Note that the HEALPixMatchEngine implementation normally gives much faster matching than this and should generally be used in preference.

See Also:
http://www.sdss.jhu.edu/htm/doc

Field Summary
static double MESH_SCALE
          Scaling factor which determines the size of the mesh cells used as a multiple of the size of the separation.
 
Fields inherited from interface uk.ac.starlink.table.join.MatchEngine
NO_BINS
 
Constructor Summary
HTMMatchEngine(double separation, boolean useErrors)
          Constructs a new match engine which considers two points (RA,Dec tuples) to match if they are within a given angular distance on the celestial sphere.
 
Method Summary
 int calculateDefaultLevel(double sep)
          Determines a default value to use for the level paramer based on a given separation.
 java.lang.Object[] getBins(double ra, double dec, double err)
          Returns all the HTM cells which fall wholly or partially within err radians of a given position.
 int getLevel()
          Returns the HTM level, which determines sky pixel size.
 DescribedValue[] getTuningParameters()
          Returns a set of DescribedValue objects whose values can be modified to tune the performance of the match.
 void setLevel(int level)
          Sets the HTM level value, which determines sky pixel size.
 void setSeparation(double separation)
          Configures this match engine to consider two points (RA,Dec tuples) to match if they are within a given angular distance on the celestial sphere.
 
Methods inherited from class uk.ac.starlink.table.join.SkyMatchEngine
calculateSeparation, canBoundMatch, getBins, getMatchBounds, getMatchParameters, getMatchScoreInfo, getSeparation, getTupleInfos, getUseErrors, matchScore, setUseErrors, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MESH_SCALE

public static final double MESH_SCALE
Scaling factor which determines the size of the mesh cells used as a multiple of the size of the separation. It can be used as a tuning parameter. It must be >1.

See Also:
Constant Field Values
Constructor Detail

HTMMatchEngine

public HTMMatchEngine(double separation,
                      boolean useErrors)
Constructs a new match engine which considers two points (RA,Dec tuples) to match if they are within a given angular distance on the celestial sphere.

Parameters:
separation - match radius in radians
useErrors - if true, per-row errors can be specified as a third element of the tuples; otherwise only the fixed separation value counts
Method Detail

setSeparation

public void setSeparation(double separation)
Description copied from class: SkyMatchEngine
Configures this match engine to consider two points (RA,Dec tuples) to match if they are within a given angular distance on the celestial sphere.

Overrides:
setSeparation in class SkyMatchEngine
Parameters:
separation - match radius in radians

getBins

public java.lang.Object[] getBins(double ra,
                                  double dec,
                                  double err)
Returns all the HTM cells which fall wholly or partially within err radians of a given position.

Specified by:
getBins in class SkyMatchEngine
Parameters:
ra - right ascension
dec - declination
err - error
Returns:
bin list
See Also:
SkyMatchEngine.getBins(java.lang.Object[])

getTuningParameters

public 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 MatchEngine.matchScore(java.lang.Object[], java.lang.Object[]), but may change the output of MatchEngine.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.

Returns:
array of described values which may influence match performance

setLevel

public void setLevel(int level)
Sets the HTM level value, which determines sky pixel size. May be in the range 0 (90deg) to 24 (0.01"). If set to -1, a suitable value will be used based on the separation.

Parameters:
level - new level value

getLevel

public int getLevel()
Returns the HTM level, which determines sky pixel size. The returned value may be the result of a default determination based on separation if no explicit level has been set hitherto, and a non-zero separation is available.

Returns:
level level value used by this engine

calculateDefaultLevel

public int calculateDefaultLevel(double sep)
Determines a default value to use for the level paramer based on a given separation.

Parameters:
sep - max sky separation angle for a match, in radians

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.