Next: The NCSA Horizon Image Data Browser: a Java Package Supporting Scientific Images
Up: Applications
Previous: RVSAO 2.0 - A Radial Velocity Package for IRAF
Table of Contents -- Index -- PS reprint -- PDF reprint


Astronomical Data Analysis Software and Systems VII
ASP Conference Series, Vol. 145, 1998
Editors: R. Albrecht, R. N. Hook and H. A. Bushouse

New Developments in the FITSIO and Fv Software Packages

W. Pence
NASA/GSFC, Code 662, Greenbelt, MD 20771, Email: pence@tetra.gsfc.nasa.gov

 

Abstract:

This paper describes recent improvements to the FITSIO subroutine library and the fv FITS file viewer and editor, both of which were initially described at previous ADASS conferences.

               

1. Introduction

The FITSIO subroutine library for reading and writing FITS format files was last described in the ADASS IV conference proceedings. Since then there have been many significant improvements that are outlined in this paper. Similarly, recent improvements to the fv FITS file viewer and editor are described to update the previous paper in the ADASS VI proceedings. Both packages are available from the HEASARC Web page at http://heasarc.gsfc.nasa.gov/docs/HHP_sw.html.

2. FITSIO/CFITSIO

Since the time of the last FITSIO update (Pence 1995) a new CFITSIO library has been developed, written entirely in C. CFITSIO is easier for C programmers to build and call than the previously available C wrapper routines built on top of the FORTRAN FITSIO library. Both the FITSIO and CFITSIO libraries have now been optimized for maximum data I/O performance and can achieve throughputs of order 5 - 10 MB/s or more when reading or writing FITS files on current generation workstations or PCs.

As originally developed, the FITSIO and CFITSIO libraries provided exactly the same functionality to FORTRAN and C applications programmers, respectively. Recently, however, several new features have been added to CFITSIO which are not available in the FITSIO library. It is quite time consuming to maintain the independent FITSIO and CFITSIO libraries with exactly the same functionality, so in the future it is likely that the FITSIO library will be frozen in its current state and that new features will only be added to the CFITSIO library. To make these new CFITSIO features easily available to FORTRAN programmers, a new set of FORTRAN wrapper routines for the CFITSIO library is currently being tested. These wrappers will provide the exact same subroutine calling sequence and functionality as currently provided by FITSIO, but will actually call the corresponding routine in the CFITSIO library.

One of the important new features that is only available in the CFITSIO library is the ability to read or write FITS files directly in computer memory as well as on disk. As a result of this, programs can now read FITS files piped in via the `stdin' stream, or write them out to the `stdout' stream. This enables a sequence of tasks to pipe the output FITS file from one task on to the input of the next task entirely in memory. This eliminates the need to write then read back temporary FITS files on magnetic disk and can greatly reduce the amount of time spent doing data I/O in pipeline processing.

Another important new feature in CFITSIO is the ability to directly read compressed FITS files that have been compressed with the gzip, PKZIP, or Unix `compress' algorithms. This enables programs to directly read the compressed FITS files that often exist in on-line data archives or are distributed on CDROMs, without first having to uncompress the FITS file.

3. Fv FITS File Editor

The fv program for viewing and editing the contents of any FITS file has undergone many improvements since the original announcement (Pence, Xu & Brown 1997). Fv is written in Tcl/Tk and provides a graphical display of the header keywords, tables, and images in the FITS file. The current release, V2.1, has many spread-sheet type functions for sorting tables, inserting or deleting rows or columns in a table, and recalculating the values in any column. Fv can display FITS images and make line plots of the values in table column(s) using an integrated Tcl/Tk tool called POW. It supports interactive image analysis including panning and zooming, and brightness and contrast manipulation. POW also supports readout of image coordinates using the standard FITS World Coordinate System keywords.

Fv currently runs on most Unix workstations, but by the time this article is published, version 3.0 of fv should be available which will also run on IBM and Macintosh personal computers. This will make fv more accessible to the educational community and to the general public as a tool for easily viewing and analyzing the growing database of recent astronomical discoveries that are stored in FITS format.

Acknowledgments:

The fv program has been principally developed by Jianjun Xu, based on preliminary work by Dr. Jim Ingham. The POW image display and plotting package has been developed by Dr. Laurence Brown. The continuing development of fv and POW is supported by the High Energy Astrophysics Science Archive Research Center (HEASARC) at the NASA Goddard Space Flight Center and has been partially funded by a grant from the NASA Astrophysics Data Program.

References:

Pence, W. 1995, in Astronomical Data Analysis Software and Systems IV, ASP Conf. Ser., Vol. 77, eds. R. A. Shaw, H. E. Payne & J. J. E. Hayes (San Francisco, ASP), 245

Pence, W., Xu, J. & Brown, L. 1997, in Astronomical Data Analysis Software and Systems VI, ASP Conf. Ser., Vol. 125, eds. Gareth Hunt and H. E. Payne (San Francisco, ASP), 261


© Copyright 1998 Astronomical Society of the Pacific, 390 Ashton Avenue, San Francisco, California 94112, USA


Next: The NCSA Horizon Image Data Browser: a Java Package Supporting Scientific Images
Up: Applications
Previous: RVSAO 2.0 - A Radial Velocity Package for IRAF
Table of Contents -- Index -- PS reprint -- PDF reprint

payne@stsci.edu