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 interface
SkyCoverage.TupleDecoder
Defines mapping a tuple to sky positional information.
-
Constructor Summary
Constructors Modifier Constructor Description protected
SkyCoverage()
Constructor using an empty default healpix mask implementation.protected
SkyCoverage(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.String
coverageText()
Provides 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.HealpixMask
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
union(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: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
public void intersection(Coverage other)
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
public void union(Coverage other)
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
public java.lang.String 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
-
-