AIPS++ FITS Classes There has been some interest on the part of various groups in obtaining the C++ FITS classes which have been developed for the AIPS++ project by Allen Farris of the Space Telescope Science Institute. These classes deal with all the usual FITS types - Primary Array, Image Extension, Binary Tables, ASCII tables, and Random Groups. It needs to be emphasized that the classes are presently very poorly documented. However, since they are useful we are releasing them on an informal basis. They will be released with improved documentation at a later time. 0. Contacting us Send any bug reports, comments, requests for features, porting notes, etc. to aips2-bugs@nrao.edu. 1. Location The master distribution location is in the directory: ftp://aips2.nrao.edu/pub/aips++/RELEASED/fits/ We anticipate that it will be cached at other FITS repositories. In particular, it is also found at: ftp://fits.cv.nrao.edu/fits/src/ FITS information in general may be found at http://fits.cv.nrao.edu/ 2. Installation The make system used internally to the AIPS++ project is quite involved. A very simple set of makefiles are supplied here. o Retrieve and unpack the distribution o Choose the makefiles that are closest to your compiler. Versions are available for CFront, g++ and Sun native compilers. Link or copy the template Makefile.something to Makefile in each directory and edit as necessary. o cd aips; make # makes lib/libaips.a - mostly a Complex class o cd FITS; make # adds FITS classes to libaips.a o cd test; make # makes bin/tfits[1-5]; some small test and # sample programs Making the sample programs will also cause template instantiations to be placed in a library for faster linking. It will work "right out of the box" for CFront 3.0.1+ based compilers under Solaris 2. The code also compiles under AIX with IBM's xlC compiler, and under IRIX with the SGI native compiler. It has been compiled on PC's with Borland and Visual C++, but not very thoroughly. It compiles with Sun's native compiler, version 4.1 (available in early 1996), but not with earlier versions of that compiler. We are very interested in any experience you might have porting these classes, and will endeavor to get such changes into the mainline code. The code now works with g++ version 2.7.2 (or later presumably). The *_*.cc files are used to manually instantiate the required templates. The g++ repository patch is not required. Little endian machines (such as PC's and DEC alphas) the preprocessor symbol LITTLE_ENDIAN needs to be defined (this will auto-configure for DEC alpha machines). Use FitsLong instead of long, e.g. PrimaryArray. "make distclean" from the top (aips) directory should clean out all generated files, **including the linked or copied makefiles**. 3. Use A more formal release will have better tutorial and reference documentation. Until then, there is some documentation in the headers, particularly hdu.h, and the test programs show by example how to use them. tfits1 - Parse a FITS file tfits2 - Create a primary array and image extension tfits3 - Create a random groups file tfits4 - Create a binary table tfits5 - Convert an ASCII table to a binary table The "doc" directory has a paper by the author in which he outlines the general structure of the classes. 4. Known bugs and deficiencies o Random access is not available o The classes presently do not work from tape drives. o Null values in ASCII tables are not handled. 5. Copyright The code is under the GNU library license. See the file aips/COPYING for details. 6. Version The software in these classes corresponds to AIPS++ internal distribution 9.076 (30Sep97). 7. The future. A new version of these classes should be released eventually with better documentation and new features. In particular, random access will be supported. 8. Thanks Markus Schoeller (mschoell@eso.org), Kris Huber (kris@helios.ece.usu.edu), Ossuma Othman (Ossama1@msn.com), and Peter Harbo (pnh@crusher.harvard.edu) have provided useful bug reports and fixes. Kris Huber contributed some of the support required for little endian machines. Brian Glendenning - National Radio Astronomy Observatory bglenden@nrao.edu Socorro NM (505) 835-7347