Package uk.ac.starlink.table.join
Class SkyCoverage
- java.lang.Object
-
- uk.ac.starlink.table.join.SkyCoverage
-
- All Implemented Interfaces:
Coverage
public abstract class SkyCoverage extends java.lang.Object implements 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 Classes Modifier and Type Class Description static interfaceSkyCoverage.TupleDecoderDefines mapping a tuple to sky positional information.
-
Constructor Summary
Constructors Modifier Constructor Description protectedSkyCoverage()Constructor using an empty default healpix mask implementation.protectedSkyCoverage(HealpixMask mask)Constructor using a custom healpix mask implementation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcoverageText()Provides a short, human-readable indication of the coverage.static SkyCoveragecreateFixedErrorCoverage(double errRad, SkyCoverage.TupleDecoder posDecoder)Creates a sky coverage suitable for a fixed match radius.static SkyCoveragecreateVariableErrorCoverage(double scaleRad, SkyCoverage.TupleDecoder coneDecoder)Creates a sky coverage suitable for a variable match radius.HealpixMaskgetMask()Returns the HEALPix mask implementation used by this object.voidintersection(Coverage other)Narrows this coverage object to contain only the intersection of its current state and the supplied coverage.booleanisEmpty()Returns true if the coverage represents the empty set.voidunion(Coverage other)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 Detail
-
SkyCoverage
protected SkyCoverage(HealpixMask mask)
Constructor using a custom healpix mask implementation.- Parameters:
mask- mask implementation
-
SkyCoverage
protected SkyCoverage()
Constructor using an empty default healpix mask implementation.
-
-
Method Detail
-
getMask
public HealpixMask getMask()
Returns the HEALPix mask implementation used by this object.- Returns:
- mask
-
isEmpty
public boolean isEmpty()
Description copied from interface:CoverageReturns true if the coverage represents the empty set.- Specified by:
isEmptyin interfaceCoverage- Returns:
- true iff the
Coverage.createTestFactory()test is guaranteed to return false
-
intersection
public void intersection(Coverage other)
Description copied from interface:CoverageNarrows this coverage object to contain only the intersection of its current state and the supplied coverage.- Specified by:
intersectionin interfaceCoverage- Parameters:
other- different coverage object of a type assumed compatible with this object
-
union
public void union(Coverage other)
Description copied from interface:CoverageModifies 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
public java.lang.String coverageText()
Description copied from interface:CoverageProvides a short, human-readable indication of the coverage.- Specified by:
coverageTextin 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
-
-