uk.ac.starlink.ttools.plot2.layer
Class SkyPixer

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.layer.SkyPixer

public class SkyPixer
extends Object

Maps positions on the unit sphere to pixel indices using a given pixel scheme. The current implementation uses the HEALPix nested scheme for a given HEALPix level.

Instances of this class are not in general thread-safe.

Since:
20 Sep 2015
Author:
Mark Taylor

Constructor Summary
SkyPixer(int level)
          Constructor.
 
Method Summary
 long getIndex(double[] v3)
          Returns the sky pixel index corresponding to a given position on the unit sphere.
 int getLevel()
          Returns the HEALPix level for this pixellisation scheme.
 long getPixelCount()
          Returns the number of pixels used by this pixellisation scheme.
 boolean isNested()
          Indicates whether this object uses the HEALPix NESTED or RING scheme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SkyPixer

public SkyPixer(int level)
Constructor.

Parameters:
level - HEALPix level
Method Detail

getLevel

public int getLevel()
Returns the HEALPix level for this pixellisation scheme.

Returns:
HEALPix level

getPixelCount

public long getPixelCount()
Returns the number of pixels used by this pixellisation scheme.

Returns:
pixel count

getIndex

public long getIndex(double[] v3)
Returns the sky pixel index corresponding to a given position on the unit sphere.

Parameters:
v3 - 3-element vector giving a position on the celestial sphere; if the modulus of the vector is not close to unity, the result is undefined
Returns:
pixel index

isNested

public boolean isNested()
Indicates whether this object uses the HEALPix NESTED or RING scheme.

Returns:
true for nested, false for ring; currently always true


Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.