Class 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.
    • Field Summary

      • Fields inherited from interface uk.ac.starlink.table.join.Coverage

        FULL
    • 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.
    • 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 interface Coverage
        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 interface Coverage
        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.
        Specified by:
        union in interface Coverage
        Parameters:
        other - different coverage object of a type assumed compatible with this object
      • coverageText

        public java.lang.String coverageText()
        Description copied from interface: Coverage
        Provides a short, human-readable indication of the coverage.
        Specified by:
        coverageText in interface Coverage
        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 radians
        posDecoder - 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