[an error occurred while processing this directive] next up previous FTOOLS Home
Next: Binding C and FORTRAN Up: Dos and Don'ts of Previous: General Guidelines

A Few Specifics

FORTRAN is the primary development language for the FTOOLS, although C is used in a considerable number of cases. When developing FTOOLS software in FORTRAN, make sure your code is consistent with the following.

When developing FTOOLS software utilizing the C language, make sure that your code is consistent with the following. (Note that with the recent development of a native C version of FITSIO, these instructions are somewhat obsolete. A revised version of these will be produced soon, when we've worked out procedures to match the new setup.)

Since FTOOLS are ``FITS tools'' for manipulating FITS files, use the FITSIO library of routines to make all I/O calls to the data within the FITS file. This is necessary to maximize portability. Practically all computers have some differences in how they format numbers internally. FITS files have standardized the representation of data and the FITSIO library provides a machine independent means of accessing that data. Do not write code that reads in the data as bytes and does the conversion to the data type for one particular computer platform. This has already been taken care of with the FITSIO library routines. It is very important that any developer of FTOOLS style software understand the FITSIO library and use it. Documentation on using FITSIO is available from the anonymous FTP account on heasarc.gsfc.nasa.gov in the directory software/fitsio. In addition, adhere to these guidelines for using FITSIO.

The user interface for FTOOLS software is the parameter file. These parameter are read and written using routines having identical function and name found in both the XPI and IRAF libraries. The following coding practices for reading the parameter files are now an FTOOLS standard.

Finally, be sure that you make these general practices a part of your program,

By far the best place to start down the road to developing FTOOLS style software is the FTOOLS distribution itself. The FTOOLS distribution comes complete with lots of examples from which to learn. I would recommend starting with one of the more simple tasks like flcol, fstatistic or ftabcopy. With a little practice you too will be churning out lots of nifty, unique FTOOLS for others to share.


next up previous FTOOLS Home
Next: Binding C and FORTRAN Up: Dos and Don'ts of Previous: General Guidelines

Web Page Maintained by: Dr. Lawrence E. Brown elwin@redshift.gsfc.nasa.gov
[an error occurred while processing this directive]