|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eso.fits.FitsColumn
public class FitsColumn
FitsColumn class represents a FITS table column in either ASCII or BINARY table format. Note: only binary data formats A,L,I,J,E,D are fully supported.
Constructor Summary | |
---|---|
FitsColumn(int type,
java.lang.String tform,
java.lang.String label,
int rows)
Constructor for FitsColumn class from a file |
Method Summary | |
---|---|
char |
getDataType()
Get the data type character for column as given in the TFORM FITS keyword. |
java.lang.String |
getDisplay()
Retrieve the display format for the column (ref. |
int |
getInt(int row)
Read single column element as integer value. |
int[] |
getInts(int row)
Read single column element as integer array. |
java.lang.String |
getLabel()
Retrieve column label. |
double |
getReal(int row)
Read single column element as double value. |
double[] |
getReals(int row)
Read single column element as double array. |
int |
getRepeat()
Retrieve repeat factor that is number of values per column element |
double |
getScale()
Get scaling factor for table column. |
java.lang.String |
getString(int row)
Read single column element as string. |
java.lang.String |
getUnit()
Retrieve unit string for the column. |
protected int |
getWidth()
Calculate the number of bytes associated to a column entry. |
double |
getZero()
Get scaling zero point for table column. |
void |
setData(byte[] array,
int position,
int recordSize)
Sets data matrix with the table data as a byte array |
void |
setData(java.io.RandomAccessFile file,
long dataOffset,
int position,
int recordSize)
Sets data matrix with the table data as a RandomAcessFile. |
void |
setDim(java.lang.String dim)
Define dimension of binary table column. |
void |
setDisplay(java.lang.String display)
Set the display format of the column. |
void |
setLabel(java.lang.String label)
Set label of the column. |
void |
setNull(int nullValue)
Define NULL value for interger format Binary table columns |
void |
setNull(java.lang.String nullValue)
Define NULL string for ASCII table column. |
void |
setScale(double scale)
Define scaling factor for table column. |
void |
setUnit(java.lang.String unit)
Set unit string for column. |
void |
setZero(double zero)
Define scaling zero point for table column. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FitsColumn(int type, java.lang.String tform, java.lang.String label, int rows) throws FitsException
type
- storage type of column i.e. Fits.ATABLE or
Fits.BTABLE, by default Fits.BTABLE is assumedtform
- storage format of data in columnlabel
- name of columnrows
- no. of rows in the column
FitsException
Method Detail |
---|
public void setData(java.io.RandomAccessFile file, long dataOffset, int position, int recordSize)
file
- associated RandomAccessFile with FITS datadataOffset
- byte offset of the table data unit in the FITS fileposition
- relative byte start position of of column data
within record (first byte is 0)recordSize
- byte size of table recordpublic void setData(byte[] array, int position, int recordSize)
array
- byte array with table data matrixposition
- relative byte start position of of column data
within record (first byte is 0)recordSize
- byte size of table recordpublic int getInt(int row)
row
- no. of element in column (starting with 0)public int[] getInts(int row)
row
- no. of element in column (starting with 0)public double getReal(int row)
row
- no. of element in column (starting with 0)public double[] getReals(int row)
row
- no. of element in column (starting with 0)public java.lang.String getString(int row)
row
- number of element in column (starting with 0)public void setNull(java.lang.String nullValue)
nullValue
- string with null valuepublic void setNull(int nullValue)
nullValue
- value of NULL integerpublic void setDim(java.lang.String dim)
dim
- string with dimension soecification for columnpublic int getRepeat()
public char getDataType()
protected int getWidth()
public java.lang.String getDisplay()
public void setDisplay(java.lang.String display)
display
- string with the display format for the columnpublic java.lang.String getUnit()
public void setUnit(java.lang.String unit)
unit
- string with the unit of the columnpublic java.lang.String getLabel()
public void setLabel(java.lang.String label)
label
- string with the column labelpublic double getZero()
public void setZero(double zero)
zero
- scaling zero point applied on raw data valuespublic double getScale()
public void setScale(double scale)
scale
- scaling factor applied on raw data values
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |