Interface HealpixMask

  • All Known Implementing Classes:
    BitsetMask

    public interface HealpixMask
    Represents an area on the sky using HEALPix tesselation. On construction, the area is empty.

    This interface defines what is required for use by the SkyCoverage class. The defined behaviour is somewhat like a MOC, and can be implemented using a MOC, but standard MOC implementations may not have suitable performance characteristics; in particular the addPixel(int, long) method ought to be fast.

    Since:
    8 Jun 2022
    Author:
    Mark Taylor
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  HealpixMask.PixelTester
      Defines a way to test inclusion of HEALPix pixels in an area.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addPixel​(int order, long ipix)
      Adds the area corresponding to a HEALPix pixel to this mask.
      HealpixMask.PixelTester createPixelTester()
      Returns an object that can test inclusion in the sky area defined by the current state of this mask.
      double getSkyFraction()
      Returns the fraction of the sky currently covered by this mask.
      void intersection​(HealpixMask other)
      Narrows this area to represent the intersection of this mask and another compatible mask.
      boolean isEmpty()
      Returns true if this mask's area is empty.
      void union​(HealpixMask other)
      Extends this area to represent the union of this mask and another compatible mask.
    • Method Detail

      • isEmpty

        boolean isEmpty()
        Returns true if this mask's area is empty.
        Returns:
        true iff the createPixelTester() test is guaranteed to return false
      • intersection

        void intersection​(HealpixMask other)
        Narrows this area to represent the intersection of this mask and another compatible mask.
        Parameters:
        other - different mask of a type assumed compatible with this one
      • union

        void union​(HealpixMask other)
        Extends this area to represent the union of this mask and another compatible mask.
        Parameters:
        other - different mask of a type assumed compatible with this one
      • getSkyFraction

        double getSkyFraction()
        Returns the fraction of the sky currently covered by this mask.
        Returns:
        sky fraction between 0 and 1
      • addPixel

        void addPixel​(int order,
                      long ipix)
        Adds the area corresponding to a HEALPix pixel to this mask.
        Parameters:
        order - HEALPix order
        ipix - HEALPix pixel index at order order
      • createPixelTester

        HealpixMask.PixelTester createPixelTester()
        Returns an object that can test inclusion in the sky area defined by the current state of this mask.
        Returns:
        thread-safe test for sky area inclusion