Class Tilings
The k parameter for the HEALPix functions is the
HEALPix order, which can be in the range 0<=k<=29.
This is the logarithm to base 2 of the HEALPix NSIDE parameter.
At order k, there are 12*4^k pixels on the sphere.
- Since:
- 6 Dec 2007
- Author:
- Mark Taylor
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleSolid angle in steradians corresponding to 1 square degree. -
Method Summary
Modifier and TypeMethodDescriptionstatic inthealpixK(double pixelsize) Gives the HEALPix resolution parameter suitable for a given pixel size.static longhealpixNestIndex(int k, double lon, double lat) Gives the pixel index for a given sky position in the HEALPix NEST scheme.static doublehealpixNestLat(int k, long index) Returns the latitude of the approximate center of the tile with a given index in the HEALPix NEST scheme.static doublehealpixNestLon(int k, long index) Returns the longitude of the approximate center of the tile with a given index in the HEALPix NEST scheme.static longhealpixNestToRing(int k, long nestIndex) Converts a healpix tile index from the NEST to the RING scheme at a given order.static doublehealpixResolution(int k) Gives the approximate resolution in degrees for a given HEALPix resolution parameterkThiskvalue is the logarithm to base 2 of the Nside parameter.static longhealpixRingIndex(int k, double lon, double lat) Gives the pixel index for a given sky position in the HEALPix RING scheme.static doublehealpixRingLat(int k, long index) Returns the latitude of the approximate center of the tile with a given index in the HEALPix RING scheme.static doublehealpixRingLon(int k, long index) Returns the longitude of the approximate center of the tile with a given index in the HEALPix RING scheme.static longhealpixRingToNest(int k, long ringIndex) Converts a healpix tile index from the RING to the NEST scheme at a given order.static doublehealpixSqdeg(int k) Returns the solid angle in square degrees of each HEALPix pixel at a given order.static doublehealpixSteradians(int k) Returns the solid angle in steradians of each HEALPix pixel at a given order.static inthtmLevel(double pixelsize) Gives the HTMlevelparameter suitable for a given pixel size.static doublehtmResolution(int level) Gives the approximate resolution in degrees for a given HTM depth level.static doublesqdegToSteradians(double sqdeg) Converts a solid angle from square degrees to steradians.static doublesteradiansToSqdeg(double sr) Converts a solid angle from steradians to square degrees.
-
Field Details
-
SQDEG
public static final double SQDEGSolid angle in steradians corresponding to 1 square degree.- See Also:
-
-
Method Details
-
healpixNestIndex
public static long healpixNestIndex(int k, double lon, double lat) Gives the pixel index for a given sky position in the HEALPix NEST scheme.- Parameters:
k- HEALPix order (0..29)lon- longitude in degreeslat- latitude in degrees- Returns:
- pixel index
- See Also:
-
healpixRingIndex
public static long healpixRingIndex(int k, double lon, double lat) Gives the pixel index for a given sky position in the HEALPix RING scheme.- Parameters:
k- HEALPix order (0..29)lon- longitude in degreeslat- latitude in degrees- Returns:
- pixel index
- See Also:
-
healpixNestLon
public static double healpixNestLon(int k, long index) Returns the longitude of the approximate center of the tile with a given index in the HEALPix NEST scheme.Note: the
indexparameter is 0-based, unlike the table row index special token$index(a.k.a.$0), which is 1-based. So if the HEALpix index is implicitly determined by the table row, the value$index-1should be used.- Parameters:
k- HEALPix order (0..29)index- healpix index- Returns:
- longitude in degrees
- See Also:
-
healpixNestLat
public static double healpixNestLat(int k, long index) Returns the latitude of the approximate center of the tile with a given index in the HEALPix NEST scheme.Note: the
indexparameter is 0-based, unlike the table row index special token$index(a.k.a.$0), which is 1-based. So if the HEALpix index is implicitly determined by the table row, the value$index-1should be used.- Parameters:
k- HEALPix order (0..29)index- healpix index- Returns:
- latitude in degrees
- See Also:
-
healpixRingLon
public static double healpixRingLon(int k, long index) Returns the longitude of the approximate center of the tile with a given index in the HEALPix RING scheme.Note: the
indexparameter is 0-based, unlike the table row index special token$index(a.k.a.$0), which is 1-based. So if the HEALpix index is implicitly determined by the table row, the value$index-1should be used.- Parameters:
k- HEALPix order (0..29)index- healpix index- Returns:
- longitude in degrees
- See Also:
-
healpixRingLat
public static double healpixRingLat(int k, long index) Returns the latitude of the approximate center of the tile with a given index in the HEALPix RING scheme.Note: the
indexparameter is 0-based, unlike the table row index special token$index(a.k.a.$0), which is 1-based. So if the HEALpix index is implicitly determined by the table row, the value$index-1should be used.- Parameters:
k- HEALPix order (0..29)index- healpix index- Returns:
- latitude in degrees
- See Also:
-
healpixNestToRing
public static long healpixNestToRing(int k, long nestIndex) Converts a healpix tile index from the NEST to the RING scheme at a given order.Note: the
nestIndexparameter is 0-based, unlike the table row index special token$index(a.k.a.$0), which is 1-based. So if the HEALpix index is implicitly determined by the table row, the value$index-1should be used.- Parameters:
k- HEALPix order (0..29)nestIndex- pixel index in NEST scheme- Returns:
- pixel index in RING scheme
- See Also:
-
healpixRingToNest
public static long healpixRingToNest(int k, long ringIndex) Converts a healpix tile index from the RING to the NEST scheme at a given order.Note: the
ringIndexparameter is 0-based, unlike the table row index special token$index(a.k.a.$0), which is 1-based. So if the HEALpix index is implicitly determined by the table row, the value$index-1should be used.- Parameters:
k- HEALPix order (0..29)ringIndex- pixel index in RING scheme- Returns:
- pixel index in NEST scheme
- See Also:
-
healpixK
public static int healpixK(double pixelsize) Gives the HEALPix resolution parameter suitable for a given pixel size. Thiskvalue (also variously known as order, level, depth) is the logarithm to base 2 of the Nside parameter.- Parameters:
pixelsize- pixel size in degrees- Returns:
- HEALPix order
k - See Also:
-
healpixResolution
public static double healpixResolution(int k) Gives the approximate resolution in degrees for a given HEALPix resolution parameterkThiskvalue is the logarithm to base 2 of the Nside parameter.- Parameters:
k- HEALPix order (0..29)- Returns:
- approximate angular resolution in degrees
-
healpixSteradians
public static double healpixSteradians(int k) Returns the solid angle in steradians of each HEALPix pixel at a given order.- Parameters:
k- HEALPix order (0..29)- Returns:
- pixel size in steradians
- Examples:
healpixSteradians(5) = 0.0010226538585904274,4*PI/healpixSteradians(0) = 12.0
-
healpixSqdeg
public static double healpixSqdeg(int k) Returns the solid angle in square degrees of each HEALPix pixel at a given order.- Parameters:
k- HEALPix order (0..29)- Returns:
- pixel size in steradians
- Examples:
healpixSqdeg(5) = 3.357174580844667,round(12 * healpixSqdeg(0)) = 41253
-
steradiansToSqdeg
public static double steradiansToSqdeg(double sr) Converts a solid angle from steradians to square degrees.The unit sphere is 4*PI steradians = 360*360/PI square degrees.
- Parameters:
sr- quantity in steradians- Returns:
- quantity in sqare degrees
- Examples:
round(steradiansToSqdeg(4*PI)) = 41253
-
sqdegToSteradians
public static double sqdegToSteradians(double sqdeg) Converts a solid angle from square degrees to steradians.The unit sphere is 4*PI steradians = 360*360/PI square degrees.
- Parameters:
sqdeg- quantity in square degrees- Returns:
- quantity in steradians
- Examples:
round(sqdegToSteradians(41253)/PI) = 4
-
htmLevel
public static int htmLevel(double pixelsize) Gives the HTMlevelparameter suitable for a given pixel size.- Parameters:
pixelsize- required resolution in degrees- Returns:
- HTM level parameter
-
htmResolution
public static double htmResolution(int level) Gives the approximate resolution in degrees for a given HTM depth level.- Parameters:
level- HTM depth- Returns:
- approximate angular resolution in degrees
-