Package uk.ac.starlink.table.join
Class HealpixSkyPixellator
java.lang.Object
uk.ac.starlink.table.join.HealpixSkyPixellator
- All Implemented Interfaces:
SkyPixellator
- Direct Known Subclasses:
CdsHealpixSkyPixellator
Implements sky pixellisation using the HEALPix scheme.
This works better than the HTM-based one for two reasons:
- It tends to be much faster to calculate a list of small pixels in a region, since the calculations are not hierarchical
- The pixels are square which means they generally have fewer neighbours than triangular HTM ones of a similar size
- Author:
- Mark Taylor (Starlink)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract int
calculateDefaultK
(double scale) Determines a default value to use for the HEALPix k parameter based on a given scale.protected abstract void
configureK
(int k) Updates internal state for the current value of the k parameter.int
Returns the HEALPix k value, which determines sky pixel size, equivalent to log2(nside).int
getMaxK()
Returns the maximum permissible K value.double
getScale()
Returns the most recently set angular scale.uk.ac.starlink.table.DescribedValue
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
Methods inherited from interface uk.ac.starlink.table.join.SkyPixellator
createFixedRadiusPixerFactory, createVariableRadiusPixerFactory
-
Constructor Details
-
HealpixSkyPixellator
protected HealpixSkyPixellator(int maxK) Constructor.- Parameters:
maxK
- the maximum K value permitted by this implementation
-
-
Method Details
-
getMaxK
public int getMaxK()Returns the maximum permissible K value.- Returns:
- maximum Healpix K parameter supported by this implementation
-
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 interfaceSkyPixellator
- 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 interfaceSkyPixellator
- Returns:
- pixel length scale in radians
-
getTuningParameter
public uk.ac.starlink.table.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 interfaceSkyPixellator
- Returns:
- tuning parameter
-
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) togetMaxK()
. 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
-
configureK
protected abstract void configureK(int k) Updates internal state for the current value of the k parameter.- Parameters:
k
- HEALPix order
-
calculateDefaultK
public abstract 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
-