Package uk.ac.starlink.table.join
Class AbstractSkyMatchEngine
java.lang.Object
uk.ac.starlink.table.join.AbstractSkyMatchEngine
- All Implemented Interfaces:
MatchEngine
- Direct Known Subclasses:
EllipseSkyMatchEngine
,ErrorSkyMatchEngine
,FixedSkyMatchEngine
Abstract superclass for MatchEngines which work on the celestial sphere.
- Since:
- 5 Sep 2011
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractSkyMatchEngine
(SkyPixellator pixellator, double scale) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic double
calculateSeparation
(double alpha1, double delta1, double alpha2, double delta2) Returns the distance along a great circle between two points.Returns this object's pixellator.protected double
getScale()
Returns the length scale used for sky pixellisation.uk.ac.starlink.table.DescribedValue[]
Returns a set of DescribedValue objects whose values can be modified to tune the performance of the match.static boolean
isSkyPosition
(double alpha, double delta) Indicates whether a (longitude, latitude) pair can be interpreted as a legal position on the sky.protected void
setScale
(double scale) Sets the length scale used for sky pixellisation.abstract String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface uk.ac.starlink.table.join.MatchEngine
createCoverageFactory, createMatchKitFactory, getMatchParameters, getMatchScoreInfo, getScoreScale, getTupleInfos
-
Constructor Details
-
AbstractSkyMatchEngine
Constructor.- Parameters:
pixellator
- handles sky pixellisationscale
- 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 callingDescribedValue.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 ofMatchKit.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 interfaceMatchEngine
- Returns:
- array of described values which may influence match performance
-
getPixellator
Returns this object's pixellator.- Returns:
- pixellator
-
toString
-
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 radiansdelta1
- declination of point 1 in radiansalpha2
- right ascension of point 2 in radiansdelta2
- 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 radiansdelta
- latitude in radians- Returns:
- true iff alpha is a finite real number and delta is in the range -PI/2<=delta<=PI/2
-