Package uk.ac.starlink.table.join
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 ClassesModifier and TypeInterfaceDescriptionstatic interface
Defines a way to test inclusion of HEALPix pixels in an area. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPixel
(int order, long ipix) Adds the area corresponding to a HEALPix pixel to this mask.Returns an object that can test inclusion in the sky area defined by the current state of this mask.double
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 Details
-
isEmpty
boolean isEmpty()Returns true if this mask's area is empty.- Returns:
- true iff the
createPixelTester()
test is guaranteed to return false
-
intersection
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
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 orderipix
- HEALPix pixel index at orderorder
-
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
-