uk.ac.starlink.table

## Class HealpixTableInfo

- java.lang.Object
- - uk.ac.starlink.table.HealpixTableInfo

-     public class HealpixTableInfo
      extends java.lang.Object

  Defines how to store metadata in a table so that STIL knows it contains a HEALPix map.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `HealpixTableInfo.HpxCoordSys` Characterises the coordinate systems defined by the HEALpix-FITS serialization convention.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ValueInfo` | `HPX_COLNAME_INFO` Metadata element for name of column storing pixel index.
    `static ValueInfo` | `HPX_CSYS_INFO` Metadata element for character indicating sky system: C, G or E.
    `static ValueInfo` | `HPX_ISNEST_INFO` Metadata element * for HEALPix ordering (true=NESTED, false=RING).
    `static ValueInfo` | `HPX_LEVEL_INFO` Metadata element for HEALPix level (=log2(nside)).

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HealpixTableInfo(int level, boolean isNest, java.lang.String ipixColName, HealpixTableInfo.HpxCoordSys csys)` Constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object o)`
    `static HealpixTableInfo` | `fromParams(java.util.List<DescribedValue> params)` Imports HEALPix information from a list of table parameters, and turns it into an instance of this class.
    `HealpixTableInfo.HpxCoordSys` | `getCoordSys()` Returns the HEALPix coordinate system variant used by this table.
    `int` | `getLevel()` Returns the HEALPix level.
    `java.lang.String` | `getPixelColumnName()` Returns the name of the table column containing the HEALPix pixel index.
    `int` | `hashCode()`
    `static boolean` | `isHealpix(java.util.List<DescribedValue> params)` Indicates whether a list of table parameters appears to be from a table with HEALPix annotations as expected by this class.
    `boolean` | `isNest()` Indicates pixel ordering scheme.
    `DescribedValue[]` | `toParams()` Exports the contents of this object to a list of DescribedValue objects that can be attached to a table's parameter list, to declare the organisation of HEALPix information in that table.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### HPX_LEVEL_INFO

          public static final ValueInfo HPX_LEVEL_INFO

      Metadata element for HEALPix level (=log2(nside)). Name "`STIL_HPX_LEVEL`", class Integer.

    - #### HPX_ISNEST_INFO

          public static final ValueInfo HPX_ISNEST_INFO

      Metadata element * for HEALPix ordering (true=NESTED, false=RING). Name "`STIL_HPX_ISNEST`", class Boolean.

    - #### HPX_COLNAME_INFO

          public static final ValueInfo HPX_COLNAME_INFO

      Metadata element for name of column storing pixel index. If blank, indexing is implicit (determined by row index). Name "`STIL_HPX_COLNAME`", class String.

    - #### HPX_CSYS_INFO

          public static final ValueInfo HPX_CSYS_INFO

      Metadata element for character indicating sky system: C, G or E. Name "`STIL_HPX_CSYS`", class String.

  - ### Constructor Detail

    - #### HealpixTableInfo

          public HealpixTableInfo(int level,
                                  boolean isNest,
                                  java.lang.String ipixColName,
                                  HealpixTableInfo.HpxCoordSys csys)

      Constructor.
      Parameters:
        `level` - healpix level; negative means not defined
        `isNest` - true for nested, false for ring
        `ipixColName` - name of column containing pixel index, or null for implicit pixel indices
        `csys` - healpix coordinate system variant

  - ### Method Detail

    - #### getLevel

          public int getLevel()

      Returns the HEALPix level.
      Returns:
        log2(nside), or negative value if not defined

    - #### isNest

          public boolean isNest()

      Indicates pixel ordering scheme.
      Returns:
        true for NESTED, false for RING

    - #### getPixelColumnName

          public java.lang.String getPixelColumnName()

      Returns the name of the table column containing the HEALPix pixel index. If blank, pixel index is assumed equal to row index.
      Returns:
        pixel column name, or null

    - #### getCoordSys

          public HealpixTableInfo.HpxCoordSys getCoordSys()

      Returns the HEALPix coordinate system variant used by this table. May be null if none specified.
      Returns:
        coordinate system object, or null

    - #### toParams

          public DescribedValue[] toParams()

      Exports the contents of this object to a list of DescribedValue objects that can be attached to a table's parameter list, to declare the organisation of HEALPix information in that table.
      Returns:
        list of table parameters

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### isHealpix

          public static boolean isHealpix(java.util.List<DescribedValue> params)

      Indicates whether a list of table parameters appears to be from a table with HEALPix annotations as expected by this class. This method currently just looks to see whether any of the `HPX_*` ValueInfos appears in the list, and returns true if so.

      This method may be useful to determine whether it's worth while to call `fromParams(java.util.List<uk.ac.starlink.table.DescribedValue>)`.

      Parameters:
        `params` - list of DescribedValue objects, as obtained from Table.getParameters
      Returns:
        true if the table appears to be a healpix table

    - #### fromParams

          public static HealpixTableInfo fromParams(java.util.List<DescribedValue> params)

      Imports HEALPix information from a list of table parameters, and turns it into an instance of this class. This should always succeed, but the returned instance is not guaranteed to have very complete information. If parameters that this class knows about seem to have wrong or surprising values, messages may be reported through the logging system.
      Parameters:
        `params` - list of DescribedValue objects, as obtained from Table.getParameters
      Returns:
        an instance of this class