FITS FilesAlmost all files input to, or output from, GLAST science tools are FITS (i.e., Flexible Image Transport System) files. Originally, the FITS format was developed to provide a standard image file format, but has since been expanded to provide standards for many different types of files used in astronomy. The GLAST science tools are being developed to insulate the average user from the details of the file formats but, as always, additional knowledge can greatly augment your control over the analysis. The FITS documentation online is extensive, but this overview will hopefully guide you in using this documentation. FITS files consist of a series of one or more 'Header and Data Units' (HDUs), each of which contains an ASCII header followed by a binary table. The ASCII header describes the contents of the binary table (e.g., the column names and units), and thus FITS files are largely self-defining. Headers have rows of text consisting of 8 character keywords followed first by the value of the keyword, and then by a comment describing the keyword. The first (or primary) HDU is reserved for images, and often has no binary table and only a simple header (called the primary header) identifying the file (e.g., name, date of creation, mission). Subsequent HDUs are called 'extensions.' The defacto standard is that the header for an extension contains copious information pertaining to that extension, and software often extracts little or no information from the primary header. There are standard FITS file formats; for example, 'PHA' for a binned spectrum. These standard file formats have required extensions, and required keywords in the headers of these extensions. Similarly, there are standard extensions (with standard keywords)—such as EBOUNDS for storing an energy grid—that can be used in mission specific formats. A number of tools exist to examine and manipulate FITS files. While we are attempting to create a system that does not require users to master a large number of additional tools, these FITS utilities will give you additional control over your analysis environment. The basic use of these tools is simple to learn. The FTOOLS have a series of tools—fcopy, fdump, fmodhead, fplot, and fverify—that allow you to examine, copy and manipulate FITS files. The tool 'fv' is a powerful GUI-based utility that should satisfy most needs. 'fv' will display images, but 'ds9' was specifically designed to display and manipulate images. Finally, you might want to write software that reads or writes FITS files, and FITSIO libraries exist for many languages (e.g., C, C++, Fortran). Similar IDL FITSIO procedures also exist.
|