Class HealpixMapDouble

All Implemented Interfaces:
Serializable

public class HealpixMapDouble extends HealpixBase
Class representing a full HEALPix map containing double values. This class is conceptually very similar the the Healpix_Map<double> class of Healpix_cxx.
Author:
Martin Reinecke
See Also:
Copyright:
2011,2012 Max-Planck-Society
  • Field Details

  • Constructor Details

  • Method Details

    • setNside

      public void setNside(long nside_in) throws Exception
      Adjusts the object to nside_in.
      Overrides:
      setNside in class HealpixBase
      Parameters:
      nside_in - the new Nside parameter
      Throws:
      Exception
    • setNsideAndScheme

      public void setNsideAndScheme(long nside_in, Scheme scheme_in) throws Exception
      Adjusts the object to nside_in and scheme_in.
      Overrides:
      setNsideAndScheme in class HealpixBase
      Parameters:
      nside_in - the new Nside parameter
      scheme_in - the new ordering scheme
      Throws:
      Exception
    • setDataAndScheme

      public void setDataAndScheme(double[] data_in, Scheme scheme_in) throws 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:
      Exception
    • fill

      public void fill(double val)
      Sets all map pixel to a specific value.
      Parameters:
      val - pixel value to use
    • swapScheme

      public void swapScheme() throws 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:
      Exception
    • getPixel

      public double 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 double 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, double val)
      Sets the value of a specific pixel.
      Parameters:
      ipix - index of the pixel
      val - new value for the pixel
    • setPixel

      public void setPixel(long ipix, double val)
      Sets the value of a specific pixel.
      Parameters:
      ipix - index of the pixel
      val - new value for the pixel
    • getData

      public double[] getData()
      Returns the array containing all map pixels.
      Returns:
      the map array
    • importNograde

      public void importNograde(HealpixMapDouble orig) throws Exception
      Imports the map "orig" to this object, adjusting pixel ordering.
      Parameters:
      orig - map to import
      Throws:
      Exception
    • importUpgrade

      public void importUpgrade(HealpixMapDouble orig) throws Exception
      Imports the map "orig" to this object, adjusting pixel ordering and increasing resolution.
      Parameters:
      orig - map to import
      Throws:
      Exception
    • importDegrade

      public void importDegrade(HealpixMapDouble orig, boolean pessimistic) throws Exception
      Imports the map "orig" to this object, adjusting pixel ordering and reducing resolution.
      Parameters:
      orig - map to import
      pessimistic - 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:
      Exception
    • importGeneral

      public void importGeneral(HealpixMapDouble orig, boolean pessimistic) throws Exception
      Imports the map "orig" to this object, adjusting pixel ordering and resolution if necessary.
      Parameters:
      orig - map to import
      pessimistic - 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:
      Exception