healpix.core
Class NestedMap

java.lang.Object
  extended byhealpix.core.NestedMap

public class NestedMap
extends java.lang.Object

A class representing the geometry of the Helapix nestedMap just a smart container for faces so we do not keep constructing them.


Field Summary
protected  NestedFace[] faces
           
protected  int nopix
           
protected  int nopixface
           
protected  int nside
           
 
Constructor Summary
NestedMap(int nside)
           
 
Method Summary
 int[][] box(int pix, int nspix, int wepix)
          Return the numbers of the pixels in an area around the given pixel.
 int countBlancks(int[][] theBox)
          Count blancks(-1) in theBox.
 NestedFace getFace(int face)
           
 int nopix()
           
 int nopixface()
           
 int nside()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nside

protected int nside

nopix

protected int nopix

nopixface

protected int nopixface

faces

protected NestedFace[] faces
Constructor Detail

NestedMap

public NestedMap(int nside)
Method Detail

getFace

public NestedFace getFace(int face)
                   throws java.lang.Exception
Throws:
java.lang.Exception

nopix

public int nopix()

nopixface

public int nopixface()

nside

public int nside()

box

public int[][] box(int pix,
                   int nspix,
                   int wepix)
            throws java.lang.Exception
Return the numbers of the pixels in an area around the given pixel. The parameter nspix is the number of pixels to gather north and south of pixnum (e.g. like a raduis) likewise wepix is for west and east of pixnum. Hence we could get a rectangle. The returned 2-d array will have pixnum at the center and will have dimensions nspix*2 +1 and wepix*2+1. The box must be smaller than 2*nside for now - this seems fair as a box bigger than 2*nside would be covering a very large area and then one should be using a map. Thge resulting box is in healpix oprientation e.g. rotated 45 degrees - it does not seem sensible to do anything else. Note that holes will appear in returned array because Healpix does not map on to a flat 2d structure. Such holes will be assigned -1 values. These occur in all places where a pixel has 7 neighbours e.g. North and south of the Equatorial Faces. Here the faces are treated as if the sphere were cut along the face borders and laid out flat. North south wraping is taken into acount. The orientation of the North and South Polar faces change depending on whether the search is about a pixel in a Polar or Equitorial face - the faces are oriented to give most neighbours. this gives the best Gausian results. Hence searchin for 2 pixels around pixel 21 of an NSIDE=4 Map (North Pole) would give a 5,5 array of pixel numbers with some -1 values where the east corner neighbours are cut away because of flattening the sphere e.g. face 3 and 7 are ripped apart there. . Also you would need to rotate it 45degrees for Healpix orientation to visiualise it. SO it looks like: 025 028 029 046 044 019 022 023 043 041 017 020 021 042 040 107 110 111 -1 -1 105 108 109 -1 -1 However due to the orirntation change searching aroun 111 in the Equatorial will produce 019 022 023 -1 -1 017 020 021 -1 -1 107 110 111 042 043 105 108 109 040 041 099 102 103 034 035 Here (since we are in an eqitorial face) the rip is made between faces 1 and 2. wil Jan 6 2000

Throws:
java.lang.Exception

countBlancks

public int countBlancks(int[][] theBox)
                 throws java.lang.Exception
Count blancks(-1) in theBox.

Throws:
java.lang.Exception