public class CdsHealpixUtil extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DFLT_INTERPOLATE_DEPTH
Default minimum interpolation for HEALPix tile edges.
|
Modifier and Type | Method and Description |
---|---|
static Set<Long> |
bmocSet(cds.healpix.HealpixNestedBMOC bmoc)
Represents the tiles in a BMOC as a Set of Longs.
|
static double[] |
lonlatToVector(double[] lonlatRad)
Converts a longitude, latitude 2-vector to a unit vector
suitable for use as a sky surface data position,
returning the result as a new array.
|
static void |
lonlatToVector(double[] lonlatRad,
double[] xyz)
Converts a longitude, latitude 2-vector to a unit vector
suitable for use as a sky surface data position,
writing the result to a supplied array.
|
static void |
lonlatToVector(double lonRad,
double latRad,
double[] xyz)
Converts a longitude, latitude pair to a unit vector
suitable for use as a sky surface data position,
writing the result to a supplied array.
|
static double[][] |
lonlatVertices(cds.healpix.VerticesAndPathComputer vpc,
long hash,
int minDepth)
Calculates vertices round the edge of a HEALPix tile,
returning the result in a new array.
|
static int |
lonlatVertices(cds.healpix.VerticesAndPathComputer vpc,
long hash,
int minDepth,
double[][] lonlats)
Calculates vertices round the edge of a HEALPix tile,
writing the result in a supplied array.
|
static long |
vectorToHash(cds.healpix.HashComputer hasher,
double[] xyz)
Calculates the tile index given a sky surface position unit vector.
|
static double[] |
vectorToLonlat(double[] xyz)
Converts a sky surface data position unit vector
to a longitude, latitude 2-vector,
returning the restult as a new array.
|
static void |
vectorToLonlat(double[] xyz,
double[] lonlatRad)
Converts a sky surface data position unit vector
to a longitude, latitude 2-vector,
writing the result to a supplied array.
|
public static final int DFLT_INTERPOLATE_DEPTH
public static void lonlatToVector(double lonRad, double latRad, double[] xyz)
lonRad
- longitude in radianslatRad
- latitude in radiansxyz
- 3-element vector into which (x,y,z) is writtenpublic static void lonlatToVector(double[] lonlatRad, double[] xyz)
lonlatRad
- 2-element vector giving (longitude,latitude)
in radiansxyz
- 3-element vector into which (x,y,z) is writtenpublic static double[] lonlatToVector(double[] lonlatRad)
lonlatRad
- 2-element vector giving (longitude,latitude)
in radianspublic static long vectorToHash(cds.healpix.HashComputer hasher, double[] xyz)
xyz
- 3-element unit vector containing (x,y,z)public static void vectorToLonlat(double[] xyz, double[] lonlatRad)
xyz
- 3-element array containing (x,y,z)lonlatRad
- 2-element array into which (longitude, latitude)
in radians is writtenpublic static double[] vectorToLonlat(double[] xyz)
xyz
- 3-element unit vector containing (x,y,z)public static Set<Long> bmocSet(cds.healpix.HealpixNestedBMOC bmoc)
bmoc
- result of healpix querypublic static int lonlatVertices(cds.healpix.VerticesAndPathComputer vpc, long hash, int minDepth, double[][] lonlats)
vpc
- healpix object that does the workhash
- tile indexminDepth
- the minimal depth at which vertices are calculated;
if the tile depth is greater or equal to this value
then 4 vertices will be calculated,
otherwise interpolated points will be includedlonlats
- [N][2]-element array into which pairs of
(longitude,latitude) in radians will be writtenpublic static double[][] lonlatVertices(cds.healpix.VerticesAndPathComputer vpc, long hash, int minDepth)
vpc
- healpix object that does the workhash
- tile indexminDepth
- the minimal depth at which vertices are calculated;
if the tile depth is greater or equal to this value
then 4 vertices will be calculated,
otherwise interpolated points will be includedCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.