Package uk.ac.starlink.table.join
Class SkyCoverage
java.lang.Object
uk.ac.starlink.table.join.SkyCoverage
- All Implemented Interfaces:
Coverage
Partial coverage implementation for use on the celestial sphere.
It makes use of the HEALPix tesselation.
Storage of HEALPix coverage information is handled by a supplied
mask object.
Factory methods are provided for concrete instances of this class.
- Since:
- 8 Jun 2022
- Author:
- Mark Taylor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Defines mapping a tuple to sky positional information. -
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructor using an empty default healpix mask implementation.protected
SkyCoverage
(HealpixMask mask) Constructor using a custom healpix mask implementation. -
Method Summary
Modifier and TypeMethodDescriptionProvides a short, human-readable indication of the coverage.static SkyCoverage
createFixedErrorCoverage
(double errRad, SkyCoverage.TupleDecoder posDecoder) Creates a sky coverage suitable for a fixed match radius.static SkyCoverage
createVariableErrorCoverage
(double scaleRad, SkyCoverage.TupleDecoder coneDecoder) Creates a sky coverage suitable for a variable match radius.getMask()
Returns the HEALPix mask implementation used by this object.void
intersection
(Coverage other) Narrows this coverage object to contain only the intersection of its current state and the supplied coverage.boolean
isEmpty()
Returns true if the coverage represents the empty set.void
Modifies the state of this coverage object as if all the tuples fed to the other had been fed to this one as well as its current contents.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface uk.ac.starlink.table.join.Coverage
createTestFactory, extend
-
Constructor Details
-
SkyCoverage
Constructor using a custom healpix mask implementation.- Parameters:
mask
- mask implementation
-
SkyCoverage
protected SkyCoverage()Constructor using an empty default healpix mask implementation.
-
-
Method Details
-
getMask
Returns the HEALPix mask implementation used by this object.- Returns:
- mask
-
isEmpty
public boolean isEmpty()Description copied from interface:Coverage
Returns true if the coverage represents the empty set.- Specified by:
isEmpty
in interfaceCoverage
- Returns:
- true iff the
Coverage.createTestFactory()
test is guaranteed to return false
-
intersection
Description copied from interface:Coverage
Narrows this coverage object to contain only the intersection of its current state and the supplied coverage.- Specified by:
intersection
in interfaceCoverage
- Parameters:
other
- different coverage object of a type assumed compatible with this object
-
union
Description copied from interface:Coverage
Modifies the state of this coverage object as if all the tuples fed to the other had been fed to this one as well as its current contents. -
coverageText
Description copied from interface:Coverage
Provides a short, human-readable indication of the coverage.- Specified by:
coverageText
in interfaceCoverage
- Returns:
- string representation
-
createFixedErrorCoverage
public static SkyCoverage createFixedErrorCoverage(double errRad, SkyCoverage.TupleDecoder posDecoder) Creates a sky coverage suitable for a fixed match radius.- Parameters:
errRad
- match error in radiansposDecoder
- thread-safe converter from tuples to sky position; output is to (longitude, latitude) in radians- Returns:
- new empty coverage
-
createVariableErrorCoverage
public static SkyCoverage createVariableErrorCoverage(double scaleRad, SkyCoverage.TupleDecoder coneDecoder) Creates a sky coverage suitable for a variable match radius.- Parameters:
scaleRad
- characteristic scale of errors in radians (tuning parameter)coneDecoder
- thread-safe converter from tuples to sky region; output is to (longitude, latitude, radius) in radians- Returns:
- new empty coverage
-