[fitsbits] Inheritence diagram for FITS HDUs

William Pence pence at tetra.gsfc.nasa.gov
Mon Feb 25 12:33:31 EST 2002


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
-Bill Pence


Paul Barrett wrote:
> 
> Does anyone know of or have an inheritence diagram for FITS HDUs?  For example,
> the following is a first cut at such a diagram, but neglects the fact that a
> conforming extension can contain either image and record (binary table) data.
> 
> BaseHDU                    ExtensionHDU          CorruptedHDU
>     |                            |
>     |                  --------------------
> PrimaryHDU           |                    |
>     |          ConformingExtHDU     NonConformingHDU
>     |                 |
> GroupsHDU            |
>                 StandardExtHDU
>                       |
>           --------------------------
>          |            |             |
>     ImageExtHDU  TableExtHDU  BinTableExtHDU
>



More information about the fitsbits mailing list