public class Hpx extends Projecter
3
40
851
962
A7
B
Thus the 12 data squares can be enclosed in a 6x4 array including another
12 unused squares.
An alternative arrangement might be.
40
851
962
A73
B
where the data squares can be enclosed in a 5x5 array.
The actual transformations to and from the coordinate plane are carried out using the static methods proj and deproj which are called by the relevant method of Hpx an HpxDeproj. Note that HpxDeproj is included as a static class.
The transformation does not depend upon the input dimension. This is used in ancillary functions (notably cvtPixel) which are used when individual pixels are to be considered rather than the geometric transformation between sphere and plane.
Modifier and Type | Class and Description |
---|---|
static class |
Hpx.HpxDeproj |
Constructor and Description |
---|
Hpx()
Default to the 512x512 squares
|
Hpx(int dim) |
Modifier and Type | Method and Description |
---|---|
int |
cvtPixel(int pixel)
This method converts a pixel number based on the assumption
that we have a simple two-d image map, into the nested HEALPix
pixel number.
|
static void |
deproj(double[] in,
double[] unit)
Given an X-Y in the nominal HEALPix projection, return
the unit vector on the sphere.
|
double[][] |
getCorners(int pix)
Get the corners of the pixel in the nominal orientation
|
String |
getDescription()
Get the description of this component.
|
String |
getName()
Get the name of this component.
|
double[] |
getOblCorner(int pix)
Get the lower left corner in the oblique projection
|
int |
getObliquePixel(double u,
double v) |
int |
getPixel(double[] pos)
Find the pixel that includes the given position.
|
int |
getPixel(double x,
double y)
Find the pixel that includes the given position.
|
Deprojecter |
inverse()
Get the inverse
|
boolean |
isInverse(Transformer t)
Are these two transformations, inverses of each other? This
method is used to optimize a series of transformations where
transformations.
|
static void |
main(String[] args) |
static void |
proj(double[] unit,
double[] proj) |
void |
setDimension(int dim) |
void |
transform(double[] sphere,
double[] plane)
Convert a single point where the output vector is supplied.
|
boolean |
validPosition(double[] plane)
Is this a valid position in the projection plane for this image.
|
allValid, getInputDimension, getOutputDimension, getXTiling, getYTiling, shadowPoint, straddle, straddleable, straddleComponents, tissot
transform, transform
public Hpx()
public Hpx(int dim)
dim
- The power of two giving the number of pixels
along an edge of a square. The total number
of pixels in the projection is 12 * Math.pow(2, 2*dim)public void setDimension(int dim)
public String getName()
Component
public String getDescription()
Component
public Deprojecter inverse()
Projecter
public boolean isInverse(Transformer t)
Transformer
isInverse
in class Transformer
public boolean validPosition(double[] plane)
Projecter
validPosition
in class Projecter
public double[] getOblCorner(int pix)
public double[][] getCorners(int pix)
public static void deproj(double[] in, double[] unit)
public static void proj(double[] unit, double[] proj)
public void transform(double[] sphere, double[] plane)
Transformer
transform
in class Transformer
sphere
- The input vector.plane
- The output vector, it may be the same as the input
vector if the dimensionalities are the same. All
transformers are expected to work with aliased inputs and output.public int getPixel(double[] pos)
pos
- The position in the nominal HEALPix projection planepublic int getPixel(double x, double y)
x,y
- The coordinates of point for which the pixel number is desired.public int getObliquePixel(double u, double v)
public int cvtPixel(int pixel)
public static void main(String[] args)