Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HEALPixMapper ¶
type HEALPixMapper struct {
// contains filtered or unexported fields
}
A HEALPixMapper is a persistent map with a given order for indexing positions on a sphere.
func NewHEALPixMapper ¶
func NewHEALPixMapper(order int, scheme OrderingScheme) (*HEALPixMapper, error)
NewHEALPixMapper creates a persistent HEALPixMapper. The order parameter controls how finely the sphere is pixelated; higher values of order correspond to finer pixelization. Order must be between 0 and 14.
func (*HEALPixMapper) PixelAt ¶
func (m *HEALPixMapper) PixelAt(ptg Pointing) int
PixelAt returns the number of the pixel which contains the given angular coordinates indicated by ptg.
func (*HEALPixMapper) PointingToCenter ¶
func (m *HEALPixMapper) PointingToCenter(pixel int) Pointing
PointingToCenter returns a pointing towards the center of the pixel with the given number.
func (*HEALPixMapper) QueryDisc ¶
func (m *HEALPixMapper) QueryDisc(pointing Pointing, r float64) []PixelRange
QueryDisc returns the set of all pixels whose centers lie within a disk. The disc is centered at pointing, and has a radius of r radians.
func (*HEALPixMapper) QueryDiscInclusive ¶
func (m *HEALPixMapper) QueryDiscInclusive(pointing Pointing, r float64, resolution int) []PixelRange
QueryDiscInclusive returns the set of all pixels which overlap with the disk defined by pointing and radius r (measured in radians). resolution should be an integer which determines the resolution used for the overlapping test.
For Nested HEALPix, resolution must be a power of 2. For Ring, it can be any positive integer. A typical choice would be 4.
Note that this method may return some pixels which don't overlap wiht the disk at all. The higher resolution is chosen, the fewer false positives are returned, at the cost of increased run time.
This method is more efficient in the Ring scheme.
type OrderingScheme ¶
type OrderingScheme int
An OrderingScheme is a class of pixel orderings for HEALPix.
const ( Ring OrderingScheme = 1 Nest OrderingScheme = 1 )
type PixelRange ¶
type PixelRange struct {
Start, Stop int
}
PixelRange represents a contiguous sequence of pixels. Its Stop field indicates the first pixel in the range, and its Stop field indicates the first pixel which is not in the range (in other words, this represents `[Start, Stop)`).
type Pointing ¶
type Pointing struct { // Theta is the polar angle in radians. Theta float64 // Phi is the azimuthal angle in radians. Phi float64 }
A Pointing is a structure describing an orientation in polar coordinates.