Package healpix.essentials
Class HealpixMapFloat
- java.lang.Object
-
- healpix.essentials.HealpixTables
-
- healpix.essentials.HealpixBase
-
- healpix.essentials.HealpixMapFloat
-
- All Implemented Interfaces:
java.io.Serializable
public class HealpixMapFloat extends HealpixBase
Class representing a full HEALPix map containing float values. This class is conceptually very similar the the Healpix_Map<float> class of Healpix_cxx.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class healpix.essentials.HealpixBase
HealpixBase.Xyf
-
-
Field Summary
Fields Modifier and Type Field Description static float
undef
-
Fields inherited from class healpix.essentials.HealpixBase
fact1, fact2, ncap, nl2, nl3, nl4, npface, npix, ns_max, nside, order, order_max, scheme
-
Fields inherited from class healpix.essentials.HealpixTables
ctab, facearray, jpll, jrll, swap_cycle, swaparray, utab, xoffset, yoffset
-
-
Constructor Summary
Constructors Constructor Description HealpixMapFloat()
HealpixMapFloat(float[] data_in, Scheme scheme_in)
HealpixMapFloat(long nside_in, Scheme scheme_in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fill(float val)
Sets all map pixel to a specific value.float[]
getData()
Returns the array containing all map pixels.float
getPixel(int ipix)
Returns the value of the pixel with a given index.float
getPixel(long ipix)
Returns the value of the pixel with a given index.void
importDegrade(HealpixMapFloat orig, boolean pessimistic)
Imports the map "orig" to this object, adjusting pixel ordering and reducing resolution.void
importGeneral(HealpixMapFloat orig, boolean pessimistic)
Imports the map "orig" to this object, adjusting pixel ordering and resolution if necessary.void
importNograde(HealpixMapFloat orig)
Imports the map "orig" to this object, adjusting pixel ordering.void
importUpgrade(HealpixMapFloat orig)
Imports the map "orig" to this object, adjusting pixel ordering and increasing resolution.void
setDataAndScheme(float[] data_in, Scheme scheme_in)
Adjusts the object to scheme_in, and sets pixel data to data_in.void
setNside(long nside_in)
Adjusts the object to nside_in.void
setNsideAndScheme(long nside_in, Scheme scheme_in)
Adjusts the object to nside_in and scheme_in.void
setPixel(int ipix, float val)
Sets the value of a specific pixel.void
setPixel(long ipix, float val)
Sets the value of a specific pixel.void
swapScheme()
Converts the map from NESTED to RING scheme or vice versa.-
Methods inherited from class healpix.essentials.HealpixBase
ang2pix, boundaries, getNpix, getNside, getOrder, getScheme, loc2pix, maxPixrad, neighbours, nest2ring, npix2Nside, nside2Npix, nside2order, order2Npix, pix2ang, pix2loc, pix2ring, pix2vec, pix2xyf, pix2zphi, queryDisc, queryDiscInclusive, queryPolygon, queryPolygonInclusive, queryStrip, ring2nest, ring2theta, ring2xyf, ring2z, setScheme, vec2pix, xyf2pix, xyf2pix, zphi2pix
-
-
-
-
Field Detail
-
undef
public static final float undef
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HealpixMapFloat
public HealpixMapFloat() throws java.lang.Exception
- Throws:
java.lang.Exception
-
HealpixMapFloat
public HealpixMapFloat(long nside_in, Scheme scheme_in) throws java.lang.Exception
- Throws:
java.lang.Exception
-
HealpixMapFloat
public HealpixMapFloat(float[] data_in, Scheme scheme_in) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
setNside
public void setNside(long nside_in) throws java.lang.Exception
Adjusts the object to nside_in.- Overrides:
setNside
in classHealpixBase
- Parameters:
nside_in
- the new Nside parameter- Throws:
java.lang.Exception
-
setNsideAndScheme
public void setNsideAndScheme(long nside_in, Scheme scheme_in) throws java.lang.Exception
Adjusts the object to nside_in and scheme_in.- Overrides:
setNsideAndScheme
in classHealpixBase
- Parameters:
nside_in
- the new Nside parameterscheme_in
- the new ordering scheme- Throws:
java.lang.Exception
-
setDataAndScheme
public void setDataAndScheme(float[] data_in, Scheme scheme_in) throws java.lang.Exception
Adjusts the object to scheme_in, and sets pixel data to data_in.- Parameters:
data_in
- pixel data; must have a valid length (12*nside^2)scheme_in
- the new ordering scheme- Throws:
java.lang.Exception
-
fill
public void fill(float val)
Sets all map pixel to a specific value.- Parameters:
val
- pixel value to use
-
swapScheme
public void swapScheme() throws java.lang.Exception
Converts the map from NESTED to RING scheme or vice versa. This operation is done in-place, i.e. it does not require additional memory.- Throws:
java.lang.Exception
-
getPixel
public float getPixel(int ipix)
Returns the value of the pixel with a given index.- Parameters:
ipix
- index of the requested pixel- Returns:
- pixel value
-
getPixel
public float getPixel(long ipix)
Returns the value of the pixel with a given index.- Parameters:
ipix
- index of the requested pixel- Returns:
- pixel value
-
setPixel
public void setPixel(int ipix, float val)
Sets the value of a specific pixel.- Parameters:
ipix
- index of the pixelval
- new value for the pixel
-
setPixel
public void setPixel(long ipix, float val)
Sets the value of a specific pixel.- Parameters:
ipix
- index of the pixelval
- new value for the pixel
-
getData
public float[] getData()
Returns the array containing all map pixels.- Returns:
- the map array
-
importNograde
public void importNograde(HealpixMapFloat orig) throws java.lang.Exception
Imports the map "orig" to this object, adjusting pixel ordering.- Parameters:
orig
- map to import- Throws:
java.lang.Exception
-
importUpgrade
public void importUpgrade(HealpixMapFloat orig) throws java.lang.Exception
Imports the map "orig" to this object, adjusting pixel ordering and increasing resolution.- Parameters:
orig
- map to import- Throws:
java.lang.Exception
-
importDegrade
public void importDegrade(HealpixMapFloat orig, boolean pessimistic) throws java.lang.Exception
Imports the map "orig" to this object, adjusting pixel ordering and reducing resolution.- Parameters:
orig
- map to importpessimistic
- if true, set a pixel to undefined if at least one the original subpixels was undefined; otherwise only set it to undefined if all original subpixels were undefined.- Throws:
java.lang.Exception
-
importGeneral
public void importGeneral(HealpixMapFloat orig, boolean pessimistic) throws java.lang.Exception
Imports the map "orig" to this object, adjusting pixel ordering and resolution if necessary.- Parameters:
orig
- map to importpessimistic
- only used when resolution must be reduced: if true, set a pixel to undefined if at least one the original subpixels was undefined; otherwise only set it to undefined if all original subpixels were undefined.- Throws:
java.lang.Exception
-
-