uk.ac.starlink.table.join
Class HealpixSkyPixellator

java.lang.Object
  extended by uk.ac.starlink.table.join.HealpixSkyPixellator
All Implemented Interfaces:
SkyPixellator

public class HealpixSkyPixellator
extends Object
implements SkyPixellator

Implements sky pixellisation using the HEALPix scheme. This works better than the HTM-based one for two reasons:

  1. It tends to be much faster to calculate a list of small pixels in a region, since the calculations are not hierarchical
  2. The pixels are square which means they generally have fewer neighbours than triangular HTM ones of a similar size

This implementation is based on the PixTools Java HEALPix classes written by Nickolai Kouropatkine at Fermilab.

See Also:
http://home.fnal.gov/~kuropat/HEALPIX/PixTools.html

Constructor Summary
HealpixSkyPixellator()
          Constructs a pixellator using the default scheme (RING).
HealpixSkyPixellator(boolean nested)
          Constructs a pixellator using either the RING or NESTED HEALPix scheme.
 
Method Summary
 int calculateDefaultK(double scale)
          Determines a default value to use for the HEALPix k parameter based on a given scale.
 int getHealpixK()
          Returns the HEALPix k value, which determines sky pixel size, equivalent to log2(nside).
 Object[] getPixels(double alpha, double delta, double radius)
          Returns an array of objects representing pixels in a given region.
 double getScale()
          Returns the most recently set angular scale.
 DescribedValue getTuningParameter()
          Returns a parameter whose value may be adjusted to alter the pixellisation scale.
 void setHealpixK(int healpixK)
          Sets the HEALPix k value, which determines sky pixel size, equivalent to log2(nside).
 void setScale(double scale)
          Sets the characteristic angular scale for this pixellator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HealpixSkyPixellator

public HealpixSkyPixellator(boolean nested)
Constructs a pixellator using either the RING or NESTED HEALPix scheme.

Parameters:
nested - false for RING scheme, true for NESTED

HealpixSkyPixellator

public HealpixSkyPixellator()
Constructs a pixellator using the default scheme (RING).

Method Detail

setScale

public void setScale(double scale)
Description copied from interface: SkyPixellator
Sets the characteristic angular scale for this pixellator. Pixels should be approximately the size given, so that a larger scale corresponds to larger pixel sizes. The details of pixel size are determined by the details of the pixellation scheme however.

Specified by:
setScale in interface SkyPixellator
Parameters:
scale - pixel length scale in radians

getScale

public double getScale()
Description copied from interface: SkyPixellator
Returns the most recently set angular scale.

Specified by:
getScale in interface SkyPixellator
Returns:
pixel length scale in radians

getTuningParameter

public DescribedValue getTuningParameter()
Description copied from interface: SkyPixellator
Returns a parameter whose value may be adjusted to alter the pixellisation scale. This is not necessarily the same as the scale attribute (its value need not be an angle).

Specified by:
getTuningParameter in interface SkyPixellator
Returns:
tuning parameter

getPixels

public Object[] getPixels(double alpha,
                          double delta,
                          double radius)
Description copied from interface: SkyPixellator
Returns an array of objects representing pixels in a given region. The parameters specify a small circle on the sphere; any pixels which overlap this circle must be returned (additional pixels may also be returned). The output objects are of some opaque type, but must implement the equals and hashCode methods appropriately, so that objects returned from one call can be compared for identity with objects returned from a subsequent call. This comparability is only guaranteed to work if the pixel scale is not changed in between calls.

Specified by:
getPixels in interface SkyPixellator
Parameters:
alpha - right ascension of circle centre in radians
delta - declination of circle centre in radians
radius - radius of circle in radians
Returns:
array of opaque but comparable pixel objects

setHealpixK

public void setHealpixK(int healpixK)
Sets the HEALPix k value, which determines sky pixel size, equivalent to log2(nside). May be in the range 0 (60deg) to 20 (0.2"). If set to -1, a suitable value will be used based on the scale.

Parameters:
healpixK - new k value

getHealpixK

public int getHealpixK()
Returns the HEALPix k value, which determines sky pixel size, equivalent to log2(nside). The returned may be the result of a default determination based on scale if no explicit K value has been set hitherto, and a non-zero scale is available.

Returns:
k value used by this engine

calculateDefaultK

public int calculateDefaultK(double scale)
Determines a default value to use for the HEALPix k parameter based on a given scale.

Parameters:
scale - distance scale, in radians

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.