Package uk.ac.starlink.table
Class HealpixTableInfo
java.lang.Object
uk.ac.starlink.table.HealpixTableInfo
Defines how to store metadata in a table so that STIL knows it
contains a HEALPix map.
- Author:
- Mark Taylor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Characterises the coordinate systems defined by the HEALpix-FITS serialization convention. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ValueInfo
Metadata element for name of column storing pixel index.static final ValueInfo
Metadata element for character indicating sky system: C, G or E.static final ValueInfo
Metadata element * for HEALPix ordering (true=NESTED, false=RING).static final ValueInfo
Metadata element for HEALPix level (=log2(nside)). -
Constructor Summary
ConstructorsConstructorDescriptionHealpixTableInfo
(int level, boolean isNest, String ipixColName, HealpixTableInfo.HpxCoordSys csys) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
static HealpixTableInfo
fromParams
(List<DescribedValue> params) Imports HEALPix information from a list of table parameters, and turns it into an instance of this class.Returns the HEALPix coordinate system variant used by this table.int
getLevel()
Returns the HEALPix level.Returns the name of the table column containing the HEALPix pixel index.int
hashCode()
static boolean
isHealpix
(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.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.toString()
-
Field Details
-
HPX_LEVEL_INFO
Metadata element for HEALPix level (=log2(nside)). Name "STIL_HPX_LEVEL
", class Integer. -
HPX_ISNEST_INFO
Metadata element * for HEALPix ordering (true=NESTED, false=RING). Name "STIL_HPX_ISNEST
", class Boolean. -
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
Metadata element for character indicating sky system: C, G or E. Name "STIL_HPX_CSYS
", class String.
-
-
Constructor Details
-
HealpixTableInfo
public HealpixTableInfo(int level, boolean isNest, String ipixColName, HealpixTableInfo.HpxCoordSys csys) Constructor.- Parameters:
level
- healpix level; negative means not definedisNest
- true for nested, false for ringipixColName
- name of column containing pixel index, or null for implicit pixel indicescsys
- healpix coordinate system variant
-
-
Method Details
-
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
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
Returns the HEALPix coordinate system variant used by this table. May be null if none specified.- Returns:
- coordinate system object, or null
-
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() -
equals
-
toString
-
isHealpix
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 theHPX_*
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
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
-