NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


healpix.core.dm
Interface HealpixMap

All Superinterfaces:
AbstractHealpixMap, Serializable
All Known Implementing Classes:
HealpixMapImp

public interface HealpixMap
extends AbstractHealpixMap

Healpix map data model interface.

Version:
$Id: HealpixMap.java,v 1.1.2.4 2010/02/22 14:55:50 healpix Exp $
Author:
ejoliet

Nested Class Summary
 
Nested classes/interfaces inherited from interface healpix.core.dm.AbstractHealpixMap
AbstractHealpixMap.Scheme
 
Method Summary
 void add(AngularPosition pos, double val)
          Add a value to a HEALPix cell in the default map.
 void add(int i, AngularPosition pos, double val)
          Add a value to a HEALPix cell in a map
 void add(int index, double val)
          Add a value to a HEALPix cell in the default map.
 int ang2pix(double theta, double phi)
          Returns the index healpix pixel from an angular position
 void average(int n)
          Replace each cell value by the average of all values added to the cell.
 void convert_nest2ring()
          Makes the conversion map NEST to RING
 void convert_ring2nest()
          makes the conversion map RING to NEST
 double get(AngularPosition pos)
          Return the value of an HEALPix cell in the default map.
 double get(int pixId)
          Return the value of an HEALPix cell in the default map.
 double get(int imap, int pixId)
          Return the value of an HEALPix cell in the map.
 double[][] getMapItemData()
          Gets the column(s) data values
 double getMax()
          Returns maximum value from default map.
 double getMax(int i)
          Returns maximum value from a map.
 double getMin()
          Returns minimum value from default map
 double getMin(int i)
          Returns minimum value from a map.
 double mean(int nmap, int firstPix, int lastPix)
          Average value over data from firstPix to lastPix index
 double[] mollpro(int xsize, double lon0)
          Method to get the projected map dependent of the scheme : will obtain xsize as x-dimension of the output-array and lon0 as the longitude (in degrees)
 void normalize(int n)
          Scale a map by total number of values added, i.e. the sum of all cell values amounts to one after the operation
 AngularPosition pix2ang(long ipix)
          Returns the angular position AngularPosition pointing at that pixel index in the healpix sphere tesslated
 HealpixMap regrade(int nside)
          Down/Upgrade the map resolution
 void scale(int n, double f)
          Scale each cell value by the given value.
 void setValueCell(int ipix, double val)
          Sets the value val into the cell numbered ipix in default map
 void setValueCell(int nmap, int ipix, double val)
          Sets the value val into the cell numbered ipix in nmap map
 void toDataSet(String name)
          Write generated maps to a FITS data set.
 
Methods inherited from interface healpix.core.dm.AbstractHealpixMap
getImap, getName, getScheme, nPixel, nside, setImap, setName, setScheme
 

Method Detail

ang2pix

int ang2pix(double theta,
            double phi)
            throws Exception
Returns the index healpix pixel from an angular position

Parameters:
theta - angle (along meridian), in [0,Pi], theta=0 : north pole
phi - angle (along parallel), in [0,2*Pi]
Returns:
integer index pixel
Throws:
Exception

pix2ang

AngularPosition pix2ang(long ipix)
                        throws Exception
Returns the angular position AngularPosition pointing at that pixel index in the healpix sphere tesslated

Parameters:
ipix - the index pixel to get the angular position
Returns:
the angular position theta,phi
Throws:
Exception

add

void add(AngularPosition pos,
         double val)
Add a value to a HEALPix cell in the default map.

Parameters:
pos - Position of HEALPix cell whose value is to be incremented - spherical coordinates (0<=theta<=pi; 0<=phi<=2pi).
val - Value to add to the HEALPix cell.

get

double get(AngularPosition pos)
Return the value of an HEALPix cell in the default map.

Parameters:
pos - Position of HEALPix cell whose value is to be incremented - spherical coordinates (0<=theta<=pi; 0<=phi<=2pi).
Returns:
the value of the cell.

get

double get(int imap,
           int pixId)
Return the value of an HEALPix cell in the map.

Parameters:
imap - Map index in the range 0 to number of maps-1
pixId - Pixel id.
Returns:
the value of the cell.

get

double get(int pixId)
Return the value of an HEALPix cell in the default map.

Parameters:
pixId - Pixel id.
Returns:
the value of the cell.

add

void add(int index,
         double val)
Add a value to a HEALPix cell in the default map.

Parameters:
index - Pixel Id.
val - Value to add to the HEALPix cell.

add

void add(int i,
         AngularPosition pos,
         double val)
Add a value to a HEALPix cell in a map

Parameters:
i - Map index in the range 0 to number of maps-1
pos - Position of HEALPix cell whose value is to be incremented - spherical coordinates (0<=theta<=pi; 0<=phi<=2pi).
val - Value to add to the HEALPix cell.

normalize

void normalize(int n)
Scale a map by total number of values added, i.e. the sum of all cell values amounts to one after the operation

Parameters:
n - Index of map to normalise.

average

void average(int n)
Replace each cell value by the average of all values added to the cell.

Parameters:
n - Index of map.

scale

void scale(int n,
           double f)
Scale each cell value by the given value.

Parameters:
n - Index of map
f - Value to multiply by.

toDataSet

void toDataSet(String name)
               throws Exception
Write generated maps to a FITS data set.

Parameters:
name - Name of the data set.
Throws:
Exception

getMin

double getMin()
Returns minimum value from default map

Returns:
the minimum value from ith map

getMax

double getMax()
Returns maximum value from default map.

Returns:
the maximum value from default map

getMax

double getMax(int i)
Returns maximum value from a map.

Parameters:
i - a map index from 0 to nMap-1
Returns:
the maximum value from ith map

getMin

double getMin(int i)
Returns minimum value from a map.

Parameters:
i - a map index from 0 to nMap-1
Returns:
the minimum value from ith map

setValueCell

void setValueCell(int nmap,
                  int ipix,
                  double val)
Sets the value val into the cell numbered ipix in nmap map

Parameters:
nmap - the nth map
ipix - the ith pixel
val - the double value to set

setValueCell

void setValueCell(int ipix,
                  double val)
Sets the value val into the cell numbered ipix in default map

Parameters:
ipix - the ith pixel
val - the double value to set

mollpro

double[] mollpro(int xsize,
                 double lon0)
Method to get the projected map dependent of the scheme : will obtain xsize as x-dimension of the output-array and lon0 as the longitude (in degrees)


regrade

HealpixMap regrade(int nside)
Down/Upgrade the map resolution

Parameters:
nside - resolution number
Returns:
HealpixMap

convert_ring2nest

void convert_ring2nest()
                       throws Exception
makes the conversion map RING to NEST

Throws:
Exception

convert_nest2ring

void convert_nest2ring()
                       throws Exception
Makes the conversion map NEST to RING

Throws:
Exception

mean

double mean(int nmap,
            int firstPix,
            int lastPix)
Average value over data from firstPix to lastPix index

Parameters:
nmap - the ith map
firstPix - first pixel index to count
lastPix - last pixel index to count
Returns:
the arithmetic mean

getMapItemData

double[][] getMapItemData()
Gets the column(s) data values

Returns:
the map(s) double values

"Built from revision exported"

Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650