next up previous
Next: 2. Description of librdsmafits.a Up: Librdsmafits.a : a C Previous: Librdsmafits.a : a C

1. Introduction

Raw visibility data output from the SMA correlator and other data associated to a particular observing run are stored in the FITS Interferometry Data Interchange (FITS-IDI) format (Diamond etal 1997; Flatters 1998). FITS-IDI format uses binary tables and considered as more flexible for transporting radio interferometry data than the random group FITS format more commonly used in radio astronomy community in the past. More detailed discussion on the data structure were found in SMA Technical Memo #126 (Zhao 1998).

A single observing run produces a multi-source FITS file which contains the observed data scans of both target sources and calibrators. Once the data are stored in the FITS format, there are two main paths can be considered in the off-line SMA data flow (Figure 1). First, the information on data are extracted from the FITS file to store in the database manage system (SMADB) in Sybase. This task is done with a forked process (FITStoDB) right after each observing run. Second, the FITS data are loaded into the astrophysical data reduction packages, such as AIPS, MIRIAD, AIPS++ and etc.. FITS-IDI format file can be read directly with FITLD in AIPS and then the data can be reduced in the AIPS environment. But for other packages, additional codes are required in order to convert the SMA FITS file into a specific data format that can be handled in a particular package. Since each of the data reduction packages has its own data structure, for a specified package it is essential to develop a sole converting code (e.g. SMALD) based on the software environment that will be used.

A basic part of the coding for all these processes mentioned is to read the SMA FITS-IDI files. It is very useful to have a common library for writing codes to do these tasks. Therefore we have developed a C library called librdsmafits.a. This software library contains the utility codes that can read and extract all the information and the data from each of the SMA FITS tables. With librdsmafits.a programmers can write own codes to access the SMA FITS data without knowledge of details of the FITS format.

In this SMA technical memo, the concept of librdsmafits.a is introduced. In Section 2, we describe the individual routines in librdsmafits.a. The usages and examples which show how to use this library are also discussed in Section 3. In Appendix, a sample code is attached.


next up previous
Next: 2. Description of librdsmafits.a Up: Librdsmafits.a : a C Previous: Librdsmafits.a : a C
Takahiro (Tak) Tsutsumi
9/30/1999