|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eap.fits.FitsColumn
Holds the information about a column in an ASCII or binary table.
Field Summary | |
protected int |
bytes
|
protected int |
count
the repeat count parsed from the TFORM keyword |
protected String |
form
the TFORM keyword value for this column |
protected Class |
representation
|
protected char |
type
the one character type code parsed from the TFORM keyword |
Constructor Summary | |
FitsColumn(FitsHeader header,
int col)
Create a column object from the information in an HDU header, for a given column. |
Method Summary | |
int |
getCount()
Returns the repeat count for this column. |
int |
getElementSize()
returns the size in bytes of a single data element. |
String |
getName()
returns a String representing the raw undecorated column name. |
String |
getUnits()
returns a String representing the physical units for this column or null if none are specified in the FITS file |
int |
getWidth()
returns the width of this column in bytes, in the main table. |
boolean |
isScaled()
returns true if the column has a number value and there is an adjustment specified by the TSCALEn or TZEROn keywords. |
Class |
rawRepresentation()
returns the Java class used to represent raw unscaled values in this column |
Object |
represent(Boolean value)
convert an object into one of the official representation for this column. |
Object |
represent(byte value)
convert a primitive type into the official representation for this column |
Object |
represent(double value)
convert a primitive type into the official representation for this column |
Object |
represent(float value)
convert a primitive type into the official representation for this column |
Object |
represent(int value)
convert a primitive type into the official representation for this column |
Object |
represent(long value)
convert a primitive type into the official representation for this column |
Object |
represent(Number value)
convert an object into one of the official representation for this column. |
Object |
represent(Object value)
convert an object into one of the official representation for this column. |
Object |
represent(String value)
convert an object into one of the official representation for this column. |
Object |
scale(Object raw)
Apply the column scaling to a value. |
Class |
scaledRepresentation()
returns the Java class used to represent values in this column after scaling has been applied. |
Object |
unscale(Object scaled)
reverse the scaling process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String form
protected char type
protected int count
protected Class representation
protected int bytes
Constructor Detail |
public FitsColumn(FitsHeader header, int col) throws FitsException
header
- the FITS header from which to extract column informationcol
- the column to read from the FITS file. Note: this value counts
from "1" unlike most other column indices in this package.
FitsException
- if there is a problem with the FITS format.Method Detail |
public Class rawRepresentation()
public Class scaledRepresentation()
public String getUnits()
public String getName()
public int getCount()
public int getWidth()
public int getElementSize()
public Object represent(Number value)
public Object represent(String value)
NumberFormatException
- if the string value is unsucessfully
parsed into a number.public Object represent(Boolean value)
public Object represent(Object value)
public Object represent(byte value)
public Object represent(int value)
public Object represent(long value)
public Object represent(float value)
public Object represent(double value)
public boolean isScaled()
public Object scale(Object raw)
raw
- the unscaled value
public Object unscale(Object scaled)
scaled
- ascaled value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |