ca.uol.aig.fts.io
Class NDFIO

java.lang.Object
  extended by ca.uol.aig.fts.io.NDFIO

public class NDFIO
extends java.lang.Object

Read an interferogram file and create a spectrum file.


Constructor Summary
NDFIO(java.lang.String interferogramFile, java.lang.String spectrumFile)
          Constructor
 
Method Summary
 void closeSpectrum()
          close the handle of the spectrum file
 int get_arrayLength()
          the size of the array in y-axis
 int get_arrayWidth()
          get the size of the array in x-axis
 long[] get_ifgmCubeShape()
          get the dimension of the interferogram cube.
 long get_ifgmCubeSize()
          get the total number of the data in the interferogram cube.
 java.lang.String get_ifgmType()
          get the data type of the interferogram cube.
 int get_npoints_ifgm()
          get the number of the data of one interferogram
 java.lang.Object getInterferogram()
          get the whole interferogram cube as 1-D data array stored in Fortran format
 double[] getInterferogram(int indexOfWidth, int indexOfLength)
          get the specified inteferogram
 double[] getMirrorPos()
          get the mirror position from the interferogram file
 uk.ac.starlink.hds.HDSObject getSpectrumHandle()
          return the HDSObject handle of the spectrum file for further processing
 void newDataToSpectrum(java.lang.String compositeName, java.lang.Object obj)
          create a primitive data in the spectrum file
 void saveSpectrum(double[] spectrum, long[] dims)
          save the spectrum cube to the spectrum file
 void saveSpectrum(float[] spectrum, long[] dims)
          save the spectrum cube to the spectrum file
 void saveSpectrum(int[] spectrum, long[] dims)
          save the spectrum cube to the spectrum file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NDFIO

public NDFIO(java.lang.String interferogramFile,
             java.lang.String spectrumFile)
Constructor

Parameters:
interferogramFile - the absolute path of an interferogram file for data reduction
spectrumFile - the absolute path of the spectrum file from data reduction
Method Detail

getMirrorPos

public double[] getMirrorPos()
get the mirror position from the interferogram file


getInterferogram

public java.lang.Object getInterferogram()
get the whole interferogram cube as 1-D data array stored in Fortran format


get_ifgmType

public java.lang.String get_ifgmType()
get the data type of the interferogram cube. Possible values: _UWORD, _WORD, _INTEGER, _REAL, _DOUBLE.


get_ifgmCubeShape

public long[] get_ifgmCubeShape()
get the dimension of the interferogram cube.


get_ifgmCubeSize

public long get_ifgmCubeSize()
get the total number of the data in the interferogram cube.


get_arrayWidth

public int get_arrayWidth()
get the size of the array in x-axis


get_arrayLength

public int get_arrayLength()
the size of the array in y-axis


get_npoints_ifgm

public int get_npoints_ifgm()
get the number of the data of one interferogram


getInterferogram

public double[] getInterferogram(int indexOfWidth,
                                 int indexOfLength)
get the specified inteferogram

Parameters:
indexOfWidth - the index of the array pixel in x-axis starting from 0.
indexOfLength - the index of the array pixel in y-axis starting from 0.

saveSpectrum

public void saveSpectrum(int[] spectrum,
                         long[] dims)
save the spectrum cube to the spectrum file

Parameters:
spectrum - the spectrum cube in 1-D Fortran data order
dims - the dimension information of the spectrum

saveSpectrum

public void saveSpectrum(float[] spectrum,
                         long[] dims)
save the spectrum cube to the spectrum file

Parameters:
spectrum - the spectrum cube in 1-D Fortran data order
dims - the dimension information of the spectrum

getSpectrumHandle

public uk.ac.starlink.hds.HDSObject getSpectrumHandle()
return the HDSObject handle of the spectrum file for further processing


saveSpectrum

public void saveSpectrum(double[] spectrum,
                         long[] dims)
save the spectrum cube to the spectrum file

Parameters:
spectrum - the spectrum cube in 1-D Fortran format
dims - the dimension information of the spectrum

closeSpectrum

public void closeSpectrum()
close the handle of the spectrum file


newDataToSpectrum

public void newDataToSpectrum(java.lang.String compositeName,
                              java.lang.Object obj)
create a primitive data in the spectrum file

Parameters:
compositeName - the composite name of the new data separated by #, e.g., XYZ#ABC#XNAME
obj - the value of this new data. Possible data types: String, int, double.