Table-level OIFITS I/O

This module is derived from the "OIFITS example software in C". More...


Data Structures

struct  element
 Array element. More...
struct  oi_array
 Data for OI_ARRAY FITS table. More...
struct  target
 Info on an observing target. More...
struct  oi_target
 Data for OI_TARGET FITS table. More...
struct  oi_wavelength
 Data for OI_WAVELENGTH FITS table. More...
struct  oi_vis_record
 Complex visibility record. More...
struct  oi_vis
 Data for OI_VIS FITS table. More...
struct  oi_vis2_record
 Visibility squared record. More...
struct  oi_vis2
 Data for OI_VIS2 FITS table. More...
struct  oi_t3_record
 Triple product record. More...
struct  oi_t3
 Data for OI_T3 FITS table. More...

Files

file  exchange.h
 Data structure definitions and function prototypes for table-level operations on OIFITS data.
file  write_fits.c
 Implementation of functions to write FITS tables from data structures in memory.
file  read_fits.c
 Implementation of functions to read individual FITS tables and write to data structures in memory.
file  free_fits.c
 Implementation of functions to free storage allocated by routines in read_fits.c.

Typedefs

typedef char BOOL
typedef double DATA
typedef int STATUS

Functions

STATUS write_oi_array (fitsfile *fptr, oi_array array, int extver, STATUS *pStatus)
 Write OI_ARRAY fits binary table.
STATUS write_oi_target (fitsfile *fptr, oi_target targets, STATUS *pStatus)
 Write OI_TARGET fits binary table.
STATUS write_oi_wavelength (fitsfile *fptr, oi_wavelength wave, int extver, STATUS *pStatus)
 Write OI_WAVELENGTH fits binary table.
STATUS write_oi_vis (fitsfile *fptr, oi_vis vis, int extver, STATUS *pStatus)
 Write OI_VIS fits binary table.
STATUS write_oi_vis2 (fitsfile *fptr, oi_vis2 vis2, int extver, STATUS *pStatus)
 Write OI_VIS2 fits binary table.
STATUS write_oi_t3 (fitsfile *fptr, oi_t3 t3, int extver, STATUS *pStatus)
 Write OI_T3 fits binary table.
STATUS read_oi_target (fitsfile *fptr, oi_target *pTargets, STATUS *pStatus)
 Read OI_TARGET fits binary table.
STATUS read_oi_array (fitsfile *fptr, char *arrname, oi_array *pArray, STATUS *pStatus)
 Read OI_ARRAY fits binary table with specified ARRNAME.
STATUS read_next_oi_array (fitsfile *fptr, oi_array *pArray, STATUS *pStatus)
 Read next OI_ARRAY fits binary table.
STATUS read_oi_wavelength (fitsfile *fptr, char *insname, oi_wavelength *pWave, STATUS *pStatus)
 Read OI_WAVELENGTH fits binary table with specified INSNAME.
STATUS read_next_oi_wavelength (fitsfile *fptr, oi_wavelength *pWave, STATUS *pStatus)
 Read next OI_WAVELENGTH fits binary table.
STATUS read_next_oi_vis (fitsfile *fptr, oi_vis *pVis, STATUS *pStatus)
 Read next OI_VIS fits binary table.
STATUS read_next_oi_vis2 (fitsfile *fptr, oi_vis2 *pVis2, STATUS *pStatus)
 Read next OI_VIS2 fits binary table.
STATUS read_next_oi_t3 (fitsfile *fptr, oi_t3 *pT3, STATUS *pStatus)
 Read next OI_T3 fits binary table.
void free_oi_array (oi_array *pArray)
 Free dynamically-allocated storage within oi_array struct.
void free_oi_target (oi_target *pTargets)
 Free dynamically-allocated storage within oi_target struct.
void free_oi_wavelength (oi_wavelength *pWave)
 Free dynamically-allocated storage within oi_wavelength struct.
void free_oi_vis (oi_vis *pVis)
 Free dynamically-allocated storage within oi_vis struct.
void free_oi_vis2 (oi_vis2 *pVis2)
 Free dynamically-allocated storage within oi_vis struct.
void free_oi_t3 (oi_t3 *pT3)
 Free dynamically-allocated storage within oi_vis struct.

Variables

int oi_hush_errors
 If TRUE, don't report I/O errors to stderr.


Detailed Description

This module is derived from the "OIFITS example software in C".

It provides the same Application Programming Interface (API) as the example software, with the addition of a set of free_oi_*() functions.

A higher-level API, containing functions to read and write an entire OIFITS file, is provided by the File-level OIFITS I/O module.


Typedef Documentation

typedef char BOOL

typedef double DATA

typedef int STATUS


Function Documentation

STATUS write_oi_array ( fitsfile *  fptr,
oi_array  array,
int  extver,
STATUS pStatus 
)

Write OI_ARRAY fits binary table.

Parameters:
fptr see cfitsio documentation
array array data struct, see exchange.h
extver value for EXTVER keyword
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code, and sets *pStatus

References oi_array::arrayx, oi_array::arrayy, oi_array::arrayz, oi_array::arrname, element::diameter, oi_array::elem, oi_array::frame, oi_array::nelement, oi_hush_errors, oi_array::revision, element::sta_index, element::sta_name, element::staxyz, and element::tel_name.

Referenced by write_oi_fits().

STATUS write_oi_target ( fitsfile *  fptr,
oi_target  targets,
STATUS pStatus 
)

Write OI_TARGET fits binary table.

Parameters:
fptr see cfitsio documentation
targets targets data struct, see exchange.h
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code, and sets *pStatus

References target::dec_err, target::decep0, target::equinox, oi_target::ntarget, oi_hush_errors, target::para_err, target::parallax, target::pmdec, target::pmdec_err, target::pmra, target::pmra_err, target::ra_err, target::raep0, oi_target::revision, target::spectyp, target::sysvel, oi_target::targ, target::target, target::target_id, target::veldef, and target::veltyp.

Referenced by write_oi_fits().

STATUS write_oi_wavelength ( fitsfile *  fptr,
oi_wavelength  wave,
int  extver,
STATUS pStatus 
)

Write OI_WAVELENGTH fits binary table.

Parameters:
fptr see cfitsio documentation
wave wavelength data struct, see exchange.h
extver value for EXTVER keyword
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code, and sets *pStatus

References oi_wavelength::eff_band, oi_wavelength::eff_wave, oi_wavelength::insname, oi_wavelength::nwave, oi_hush_errors, and oi_wavelength::revision.

Referenced by write_oi_fits().

STATUS write_oi_vis ( fitsfile *  fptr,
oi_vis  vis,
int  extver,
STATUS pStatus 
)

Write OI_VIS fits binary table.

Parameters:
fptr see cfitsio documentation
vis data struct, see exchange.h
extver value for EXTVER keyword
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code, and sets *pStatus

References oi_vis::arrname, oi_vis::date_obs, oi_vis_record::flag, free_tform(), oi_vis::insname, oi_vis_record::int_time, make_tform(), oi_vis_record::mjd, oi_vis::numrec, oi_vis::nwave, oi_hush_errors, oi_vis::record, oi_vis::revision, oi_vis_record::sta_index, oi_vis_record::target_id, oi_vis_record::time, oi_vis_record::ucoord, oi_vis_record::vcoord, oi_vis_record::visamp, oi_vis_record::visamperr, oi_vis_record::visphi, and oi_vis_record::visphierr.

Referenced by write_oi_fits().

STATUS write_oi_vis2 ( fitsfile *  fptr,
oi_vis2  vis2,
int  extver,
STATUS pStatus 
)

Write OI_VIS2 fits binary table.

Parameters:
fptr see cfitsio documentation
vis2 data struct, see exchange.h
extver value for EXTVER keyword
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code, and sets *pStatus

References oi_vis2::arrname, oi_vis2::date_obs, oi_vis2_record::flag, free_tform(), oi_vis2::insname, oi_vis2_record::int_time, make_tform(), oi_vis2_record::mjd, oi_vis2::numrec, oi_vis2::nwave, oi_hush_errors, oi_vis2::record, oi_vis2::revision, oi_vis2_record::sta_index, oi_vis2_record::target_id, oi_vis2_record::time, oi_vis2_record::ucoord, oi_vis2_record::vcoord, oi_vis2_record::vis2data, and oi_vis2_record::vis2err.

Referenced by write_oi_fits().

STATUS write_oi_t3 ( fitsfile *  fptr,
oi_t3  t3,
int  extver,
STATUS pStatus 
)

Write OI_T3 fits binary table.

Parameters:
fptr see cfitsio documentation
t3 data struct, see exchange.h
extver value for EXTVER keyword
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code, and sets *pStatus

References oi_t3::arrname, oi_t3::date_obs, oi_t3_record::flag, free_tform(), oi_t3::insname, oi_t3_record::int_time, make_tform(), oi_t3_record::mjd, oi_t3::numrec, oi_t3::nwave, oi_hush_errors, oi_t3::record, oi_t3::revision, oi_t3_record::sta_index, oi_t3_record::t3amp, oi_t3_record::t3amperr, oi_t3_record::t3phi, oi_t3_record::t3phierr, oi_t3_record::target_id, oi_t3_record::time, oi_t3_record::u1coord, oi_t3_record::u2coord, oi_t3_record::v1coord, and oi_t3_record::v2coord.

Referenced by write_oi_fits().

STATUS read_oi_target ( fitsfile *  fptr,
oi_target pTargets,
STATUS pStatus 
)

Read OI_TARGET fits binary table.

Moves to first matching HDU

Parameters:
fptr see cfitsio documentation
pTargets ptr to targets data struct, see exchange.h
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code (also assigned to *pStatus). Contents of targets data struct are undefined

References target::dec_err, target::decep0, target::equinox, oi_target::ntarget, oi_hush_errors, target::para_err, target::parallax, target::pmdec, target::pmdec_err, target::pmra, target::pmra_err, target::ra_err, target::raep0, oi_target::revision, target::spectyp, target::sysvel, oi_target::targ, target::target, target::target_id, target::veldef, and target::veltyp.

Referenced by read_oi_fits().

STATUS read_oi_array ( fitsfile *  fptr,
char *  arrname,
oi_array pArray,
STATUS pStatus 
)

Read OI_ARRAY fits binary table with specified ARRNAME.

Parameters:
fptr see cfitsio documentation
arrname read table with this value for ARRNAME
pArray ptr to array data struct, see exchange.h
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code (also assigned to *pStatus). Contents of array data struct are undefined

References oi_hush_errors.

STATUS read_next_oi_array ( fitsfile *  fptr,
oi_array pArray,
STATUS pStatus 
)

Read next OI_ARRAY fits binary table.

Parameters:
fptr see cfitsio documentation
pArray ptr to array data struct, see exchange.h
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code (also assigned to *pStatus). Contents of data struct are undefined

References oi_hush_errors.

Referenced by read_oi_fits().

STATUS read_oi_wavelength ( fitsfile *  fptr,
char *  insname,
oi_wavelength pWave,
STATUS pStatus 
)

Read OI_WAVELENGTH fits binary table with specified INSNAME.

Parameters:
fptr see cfitsio documentation
insname read table with this value for INSNAME
pWave ptr to wavelength data struct, see exchange.h
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code (also assigned to *pStatus). Contents of wavelength data struct are undefined

References oi_hush_errors.

STATUS read_next_oi_wavelength ( fitsfile *  fptr,
oi_wavelength pWave,
STATUS pStatus 
)

Read next OI_WAVELENGTH fits binary table.

Parameters:
fptr see cfitsio documentation
pWave ptr to wavelength data struct, see exchange.h
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code (also assigned to *pStatus). Contents of data struct are undefined

References oi_hush_errors.

Referenced by read_oi_fits().

STATUS read_next_oi_vis ( fitsfile *  fptr,
oi_vis pVis,
STATUS pStatus 
)

Read next OI_VIS fits binary table.

Parameters:
fptr see cfitsio documentation
pVis ptr to data struct, see exchange.h
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code (also assigned to *pStatus). Contents of data struct are undefined

References oi_vis::arrname, oi_vis::date_obs, oi_vis_record::flag, oi_vis::insname, oi_vis_record::int_time, oi_vis_record::mjd, oi_vis::numrec, oi_vis::nwave, oi_hush_errors, oi_vis::record, oi_vis::revision, oi_vis_record::sta_index, oi_vis_record::target_id, oi_vis_record::time, oi_vis_record::ucoord, oi_vis_record::vcoord, oi_vis_record::visamp, oi_vis_record::visamperr, oi_vis_record::visphi, and oi_vis_record::visphierr.

Referenced by read_oi_fits().

STATUS read_next_oi_vis2 ( fitsfile *  fptr,
oi_vis2 pVis2,
STATUS pStatus 
)

Read next OI_VIS2 fits binary table.

Parameters:
fptr see cfitsio documentation
pVis2 ptr to data struct, see exchange.h
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code (also assigned to *pStatus). Contents of data struct are undefined

References oi_vis2::arrname, oi_vis2::date_obs, oi_vis2_record::flag, oi_vis2::insname, oi_vis2_record::int_time, oi_vis2_record::mjd, oi_vis2::numrec, oi_vis2::nwave, oi_hush_errors, oi_vis2::record, oi_vis2::revision, oi_vis2_record::sta_index, oi_vis2_record::target_id, oi_vis2_record::time, oi_vis2_record::ucoord, oi_vis2_record::vcoord, oi_vis2_record::vis2data, and oi_vis2_record::vis2err.

Referenced by read_oi_fits().

STATUS read_next_oi_t3 ( fitsfile *  fptr,
oi_t3 pT3,
STATUS pStatus 
)

Read next OI_T3 fits binary table.

Parameters:
fptr see cfitsio documentation
pT3 ptr to data struct, see exchange.h
pStatus pointer to status variable
Returns:
On error, returns non-zero cfitsio error code (also assigned to *pStatus). Contents of data struct are undefined

References oi_t3::arrname, oi_t3::date_obs, oi_t3_record::flag, oi_t3::insname, oi_t3_record::int_time, oi_t3_record::mjd, oi_t3::numrec, oi_t3::nwave, oi_hush_errors, oi_t3::record, oi_t3::revision, oi_t3_record::sta_index, oi_t3_record::t3amp, oi_t3_record::t3amperr, oi_t3_record::t3phi, oi_t3_record::t3phierr, oi_t3_record::target_id, oi_t3_record::time, oi_t3_record::u1coord, oi_t3_record::u2coord, oi_t3_record::v1coord, and oi_t3_record::v2coord.

Referenced by read_oi_fits().

void free_oi_array ( oi_array pArray  ) 

Free dynamically-allocated storage within oi_array struct.

Parameters:
pArray pointer to array data struct, see exchange.h

References oi_array::elem.

Referenced by free_oi_fits().

void free_oi_target ( oi_target pTargets  ) 

Free dynamically-allocated storage within oi_target struct.

Parameters:
pTargets pointer to targets data struct, see exchange.h

References oi_target::targ.

Referenced by free_oi_fits().

void free_oi_wavelength ( oi_wavelength pWave  ) 

Free dynamically-allocated storage within oi_wavelength struct.

Parameters:
pWave pointer to wavelength data struct, see exchange.h

References oi_wavelength::eff_band, and oi_wavelength::eff_wave.

Referenced by free_oi_fits().

void free_oi_vis ( oi_vis pVis  ) 

Free dynamically-allocated storage within oi_vis struct.

Parameters:
pVis pointer to data struct, see exchange.h

References oi_vis_record::flag, oi_vis::numrec, oi_vis::record, oi_vis_record::visamp, oi_vis_record::visamperr, oi_vis_record::visphi, and oi_vis_record::visphierr.

Referenced by free_oi_fits().

void free_oi_vis2 ( oi_vis2 pVis2  ) 

Free dynamically-allocated storage within oi_vis struct.

Parameters:
pVis2 pointer to data struct, see exchange.h

References oi_vis2_record::flag, oi_vis2::numrec, oi_vis2::record, oi_vis2_record::vis2data, and oi_vis2_record::vis2err.

Referenced by free_oi_fits().

void free_oi_t3 ( oi_t3 pT3  ) 

Free dynamically-allocated storage within oi_vis struct.

Parameters:
pT3 pointer to data struct, see exchange.h

References oi_t3_record::flag, oi_t3::numrec, oi_t3::record, oi_t3_record::t3amp, oi_t3_record::t3amperr, oi_t3_record::t3phi, and oi_t3_record::t3phierr.

Referenced by free_oi_fits().


Variable Documentation


Generated on Mon Jun 8 12:45:08 2009 for OIFITSlib by  doxygen 1.5.7.1