[fitsmime] Thoughts on FITS MIME types.

Don Wells dwells at nrao.edu
Mon Dec 9 18:38:12 EST 2002


Steve Allen writes:
 > Are FITS Random Groups files in sufficiently widespread use that
 > their users can justify the creation of the one "special" category
 > of application/fits-group?

Bill Cotton tells me that they are still used for interchange between
various synthesis imaging software packages, although usage of the
equivalent BINTABLE constructs (e.g., the FITS-IDI conventions) has
grown steadily during the past decade. 

I recently chose a sample random group file for use in testing
whatever MIME coding scheme we decide to use for such files.  The
sample I chose, after a suggestion by Bill, was the UV data file for
the 'medium-size' problem of the DDT [Dirty Dozen Test] benchmark and
verification package of Classic-AIPS.  The file has a length of about
900_KB.  The random group structure in its PHDU is followed by a
single BINTABLE extension.

 > If so, would including this type into the RFC pose as a valid means
 > of pointing the way toward future creation of other specialized
 > MIME types for FITS?  Or would its inclusion be a bad precedent?

I think that 'application/fits-groups' (or '-group'?) is justified by
the distinctive basic data structure which random groups use.  It is
only fair to warn client-side applications about such files. I am not
talking about the astronomical content of the files, I am talking
about their FITS syntax. The required keywords of the sample file are:

SIMPLE  =                    T /
BITPIX  =                  -32 /
NAXIS   =                    6 /
NAXIS1  =                    0 /No standard image just group
NAXIS2  =                    3 /
NAXIS3  =                    4 /
NAXIS4  =                    1 /
NAXIS5  =                    1 /
NAXIS6  =                    1 /

There is no primary image array, because the product of the dimensions
is zero!  However, this primary header is followed by data records,
rather than by an XTENSION header. In the sample file these binary
data records have a length of 950400 bytes (330r0 FITS records).  They
are followed by a BINTABLE extension.  FITS applications which have
not been programmed to expect random group data records after seeing a
primary header of this type are going to be surprised by this file!
FITS applications which do not check the product of the dimensions
will also be surprised.  So, 'application/fits-groups' is probably
very nearly required in order to properly protect clients, and it
probably will not set a precedent.

				 -=-

Note that CFITSIO supports random groups. My memory is that Bill said
that his CFITSIO implementation transforms the header from random
group syntax to the equivalent BINTABLE syntax, and then uses the
table mechanisms to access the data.  This may mean that all
application programs which use CFITSIO may support random groups in
the same manner that they support BINTABLE extensions. 

-Don
-- 
  Donald C. Wells      Scientist - GBT Project        dwells at nrao.edu
                    http://www.cv.nrao.edu/~dwells
  National Radio Astronomy Observatory                +1-434-296-0277
  520 Edgemont Road,   Charlottesville, Virginia       22903-2475 USA
       (DCW is often in Green Bank, West Virginia, at +1-304-456-2146)



More information about the fitsmime mailing list