[fitsbits] Inheritence diagram for FITS HDUs

Paul Barrett Barrett at STScI.Edu
Wed Feb 27 13:03:18 EST 2002


William Pence wrote:

> While a bit unconventional, it may be simpler from the programmer point of
> view to think of every FITS HDU as a table of one sort or another.  The
> primary distinction is whether the table contains ASCII data (TABLE
> extension) or binary data (everything else).  Random Grouped data can be
> interpreted as a special case of binary tables containing 2-columns, where
> the first column contains the group parameters, if any, and the 2nd column
> contains the N-dimensional data array.  Each row of the table contains a
> group.  A primary array can be considered a special case of Grouped data
> containing no group parameters and a single group (one row).  An image
> extension is a variant of the Primary array. Primary arrays and image
> extensions also only support a subset of the data types supported by binary
> tables.  Thus the inheritance diagram would look something like this:
> 
>                  FITS_HDU
>                      |
>                ------------------
>               |                  |
>          TableExtHDU        BinTableExtHDU
>                                  |
>                              GroupsHDU
>                                  |
>                              PrimaryHDU
>                                  |
>                              ImageExtHDU



This is a novel way of looking at FITS files, but what about the HDUs that don't 
fit into these common classes, e.g. Conforming Extensions which are valid HDUs, 
but are considered non-standard, or NonConforming HDUs which for illustration 
has the SIMPLE keyword set to FALSE, but the header still provides enough 
information to determine the size of the header and data areas.  These 
situations don't appear to be covered in your example and the FITS standard 
seems to gloss over them.  How would might they fit in?

Curiously-ly yours,
Paul




More information about the fitsbits mailing list