[fitsbits] XTENSION = 'FITS' proposal

Perry Greenfield perry at stsci.edu
Thu Apr 11 16:22:50 EDT 2002


----- Original Message -----
From: "Preben Grosbol" <pgrosbol at eso.org>

> I have some sympathy for a proposal of this kind but it is too limited
> in scope.  You may recall that there already is a reserved extension
> type XTENSION = 'DUMP' which was intended for binary dumps
> (ref. NOST 100-2.0).  One may find a better name for such byte
> stream extensions (e.g. 'BSTREAM') but one would sometimes like
> to store additional information together with binary data in a FITS
> file.  Typical examples would be:
>    1) Observing logs in e.g. XML format
>    2) Reduction logs in e.g. ASCII text
>    3) Binary dumps from an instrument
>    4) Graphs in e.g. PostScript format
>    5) A paper in e.g. LaTeX format
>    6) or as you mention another FITS file.
>
> This would call for an extension like:
>
>   XTENSION = 'BSTREAM '  or 'DUMP    '
>   BITPIX = 8
>   NAXIS = 1
>   NAXIS1 = <size of byte stream in bytes>
>   BSTYPE = 'data type'
>
> where 'data type' should be controlled and possibly have values
> like 'NONE', 'FITS', 'XML', 'POSTSCRIPT', 'LATEX', 'PDF', 'TEXT'
> etc.  For 'TEXT' type, one could add a keyword to give the character
> encoding.
>
>  This type of extension would be much more general but still serve
> the purpose of providing a hierarchical structure for your FITS files.
>
But there is one important difference between all these other formats
and FITS in that one presumes that a FITS reader will (or could) know
how to interpret the contents. One could give the FITS reader a mechanism
to access a specifc component directly--say a keyword or image--regardless
of how far down in the structure it was. For example if f.fits were a fits
file
with nested components, it would not be unreasonble to reference them as
follows:

f.fits['EXP1']['DQ'].naxis1 # i.e., get the value of NAXIS1 from the
                                         # FITS extension with EXTNAME='DQ'
                                         # contained in the FITS extension
with
                                         # EXTNAME = 'EXP1'


I don't think one would presume one could access XML tags or LATEX
elements in the same way or from the same program. You would not need
to decompose the FITS file into separate FITS files (recursively) to obtain
the desired element.

I think the capability that you describe above is certainly useful, but
there
is a difference. I agree that one could use the scheme that you
describe to nest FITS entities, but since there is a distinction in what can
be
done I think it deserves its own extension type.

Perry




More information about the fitsbits mailing list