astro.fits
Class TableTools

java.lang.Object
  extended by astro.fits.TableTools

public class TableTools
extends Object

A class to simplify fits binary table handling.


Nested Class Summary
static class TableTools.Ascii
          Read the binary table and prints the columns to standard out.
static class TableTools.CorotChrom
          Corot reader for chromatic channel.
static class TableTools.CorotImg
          Corot reader for imagette channel.
static class TableTools.Print
          Read the provided fits file to first table and print out table info.
 
Field Summary
static Map<String,Class<?>> TYPES
          A llokup-table for binary data types to java data classes.
 
Constructor Summary
TableTools()
           
 
Method Summary
static Class<?> deduceClass(String type)
          From the value of a TFORM header entry, we deduce the java class type of the column.
static Map<String,Class<?>> parseHeader(nom.tam.fits.TableHDU tab)
          We read a table header and return the meta information on the data format as a mapping of column names to java class types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPES

public static final Map<String,Class<?>> TYPES
A llokup-table for binary data types to java data classes.

Constructor Detail

TableTools

public TableTools()
Method Detail

deduceClass

public static Class<?> deduceClass(String type)
From the value of a TFORM header entry, we deduce the java class type of the column. Arrays are described by their parental class (e.g TFORM='25E' would return Float rather than Float[]). Complex numbers are always represented as a double pair, while array pointers are returned as Long. Bits are returned as Booleans.

Returns:
null if an unknown type is encountered.

parseHeader

public static Map<String,Class<?>> parseHeader(nom.tam.fits.TableHDU tab)
                                        throws nom.tam.fits.FitsException
We read a table header and return the meta information on the data format as a mapping of column names to java class types. Arrays are described by their parental class (e.g TFORM='25E' would return Float rather than Float[]). Complex numbers are always represented as a double pair, while array pointers are returned as Long. Bits are returned as Booleans.

Throws:
nom.tam.fits.FitsException