|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.starlink.table.join.HTMMatchEngine
Implements the object matching interface for sky coordinates (RA, Dec)
using the HTM (Hierarchical Triangular Mesh) scheme.
The tuples it uses are two-element arrays of Number
objects, the first giving Right Ascension in radians, and
the second giving Declination in radians.
The separation attribute indicates how many radians may
separate two points on the celestial sphere for them to be considered
matching.
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)
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 | |
boolean |
canBoundMatch()
Indicates that the getMatchBounds(java.lang.Comparable[], java.lang.Comparable[]) method can be invoked
to provide some sort of useful result. |
Object[] |
getBins(Object[] radec)
Returns all the HTM cells which fall wholly or partially within separation radians of a given position. |
Comparable[][] |
getMatchBounds(Comparable[] radecMinIn,
Comparable[] radecMaxIn)
Given a range of tuple values, returns a range outside which no match to anything within that range can result. |
DescribedValue[] |
getMatchParameters()
Returns a set of DescribedValue objects whose values can be modified to modify the matching criteria. |
double |
getSeparation()
Returns the separation between points within which they will be considered to match. |
ValueInfo[] |
getTupleInfos()
Returns a set of ValueInfo objects indicating what is required for the elements of each tuple. |
double |
matchScore(Object[] radec1,
Object[] radec2)
Matches two tuples representing RA,Dec coordinates if they are within separation radians of each other on the sky. |
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. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final double MESH_SCALE
Constructor Detail |
public HTMMatchEngine(double separation)
separation
- match radius in radiansMethod Detail |
public void setSeparation(double separation)
separation
- match radius in radianspublic double getSeparation()
public double matchScore(Object[] radec1, Object[] radec2)
matchScore
in interface MatchEngine
radec1
- 2-element array of Number objects giving RA & dec
of first pointradec2
- 2-element array of Number objects giving RA & dec
of second point
public Object[] getBins(Object[] radec)
getBins
in interface MatchEngine
radec
- 2-element array of Number objects giving RA & Dec
of the position to test
public ValueInfo[] getTupleInfos()
MatchEngine
getTupleInfos
in interface MatchEngine
public DescribedValue[] getMatchParameters()
MatchEngine
DescribedValue.setValue(java.lang.Object)
on the
returned objects.
getMatchParameters
in interface MatchEngine
public String toString()
toString
in class Object
public boolean canBoundMatch()
MatchEngine
MatchEngine.getMatchBounds(java.lang.Comparable[], java.lang.Comparable[])
method can be invoked
to provide some sort of useful result.
canBoundMatch
in interface MatchEngine
public Comparable[][] getMatchBounds(Comparable[] radecMinIn, Comparable[] radecMaxIn)
MatchEngine
Both the input and output rectangles are specified by tuples representing its opposite corners; equivalently, they are the minimum and maximum values of each tuple element. In either the input or output min/max tuples, any element may be null to indicate that no information is available on the bounds of that tuple element (coordinate).
This method can be used by match algorithms which know in advance the range of coordinates they will match against and wish to reduce workload by not attempting matches which are bound to fail.
For example, a 1-d Cartesian match engine with an isotropic match error 0.5 would turn input values of ((0,200),(10,210)) into output values ((-0.5,199.5),(10.5,210.5)).
This method will only be called if MatchEngine.canBoundMatch()
returns true. Thus engines that cannot provide any useful
information along these lines (for instance because none of its
tuple elements is Comparable
do not need to
implement it in a meaningful way.
getMatchBounds
in interface MatchEngine
radecMinIn
- tuple consisting of the minimum values of each
tuple element in a possible match
(to put it another way - coordinates of one corner of a
tuple-space rectangle containing such a match)radecMaxIn
- tuple consisting of the maximum values of each
tuple element in a possible match
(to put it another way - coordinates of the other corner of a
tuple-space rectangle containing such a match)
MatchEngine.canBoundMatch()
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |