<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 98.1p1 release (March 2nd, 1998) originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>FITS data-types and extensions</TITLE> <META NAME="description" CONTENT="FITS data-types and extensions"> <META NAME="keywords" CONTENT="vol1"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <LINK REL="STYLESHEET" HREF="vol1.css"> <LINK REL="next" HREF="node113.html"> <LINK REL="previous" HREF="node111.html"> <LINK REL="up" HREF="node110.html"> <LINK REL="next" HREF="node113.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html1952" HREF="node113.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html1948" HREF="node110.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html1942" HREF="node111.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html1950" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="icons.gif/contents_motif.gif"></A> <A NAME="tex2html1951" HREF="node216.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="icons.gif/index_motif.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html1953" HREF="node113.html">FITS keywords</A> <B> Up:</B> <A NAME="tex2html1949" HREF="node110.html">FITS Format</A> <B> Previous:</B> <A NAME="tex2html1943" HREF="node111.html">Structure of FITS files</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION001112000000000000000"> </A> <A NAME="ch07:fits-datatypes-extensions"> </A> <BR> FITS data-types and extensions </H2> The FITS header specifies both the format and size of the data records following. The data representation is defined by the value of the <TT>BITPIX</TT> keyword and can have the values given in Table <A HREF="node112.html#ch07:tab1">7.1.2</A>. The MIDAS data format closest matching it is chosen by default. Single precision real values are used when the explicit scaling is given in the FITS file (<I>i.e.</I> by the keywords <TT>BSCALE</TT> and <TT>BZERO</TT>). <P> <BR> <DIV ALIGN="CENTER"><A NAME="10250"> </A> <TABLE> <CAPTION><STRONG>Table 7.1:</STRONG> Relation between FITS and MIDAS data types</CAPTION> <TR><TD> <DIV ALIGN="CENTER"> <TABLE CELLPADDING=3 BORDER="1" ALIGN="CENTER"> <TR><TD ALIGN="CENTER">BITPIX value</TD> <TD ALIGN="LEFT">Data representation</TD> <TD ALIGN="CENTER">Scaling</TD> <TD ALIGN="LEFT">MIDAS data type</TD> </TR> <TR><TD ALIGN="CENTER">8</TD> <TD ALIGN="LEFT">8-bit unsigned integer (ASCII)</TD> <TD ALIGN="CENTER">No</TD> <TD ALIGN="LEFT"><TT> D_I1_FORMAT</TT></TD> </TR> <TR><TD ALIGN="CENTER"> </TD> <TD ALIGN="LEFT"> </TD> <TD ALIGN="CENTER">Yes</TD> <TD ALIGN="LEFT"><TT> D_R4_FORMAT</TT></TD> </TR> <TR><TD ALIGN="CENTER">16</TD> <TD ALIGN="LEFT">16-bit twos-complement integer</TD> <TD ALIGN="CENTER">No</TD> <TD ALIGN="LEFT"><TT> D_I2_FORMAT</TT></TD> </TR> <TR><TD ALIGN="CENTER"> </TD> <TD ALIGN="LEFT"> </TD> <TD ALIGN="CENTER">Yes</TD> <TD ALIGN="LEFT"><TT> D_R4_FORMAT</TT></TD> </TR> <TR><TD ALIGN="CENTER">32</TD> <TD ALIGN="LEFT">32-bit twos-complement integer</TD> <TD ALIGN="CENTER">No</TD> <TD ALIGN="LEFT"><TT> D_I4_FORMAT</TT></TD> </TR> <TR><TD ALIGN="CENTER"> </TD> <TD ALIGN="LEFT"> </TD> <TD ALIGN="CENTER">Yes</TD> <TD ALIGN="LEFT"><TT> D_R4_FORMAT</TT></TD> </TR> <TR><TD ALIGN="CENTER">-32</TD> <TD ALIGN="LEFT">32-bit IEEE floating point</TD> <TD ALIGN="CENTER">-</TD> <TD ALIGN="LEFT"><TT> D_R4_FORMAT</TT></TD> </TR> <TR><TD ALIGN="CENTER">-64</TD> <TD ALIGN="LEFT">64-bit IEEE floating point</TD> <TD ALIGN="CENTER">-</TD> <TD ALIGN="LEFT"><TT> D_R8_FORMAT</TT></TD> </TR> </TABLE> <A NAME="ch07:tab1"> </A> </DIV></TD></TR> </TABLE> </DIV> <BR> When writing FITS files, their data type will also be the one closest to the internal representation except if <I>basic</I> FITS formats are explicitly requested by an option. In that case, <TT>BITPIX</TT> will be one of the originally allowed values (<I>i.e.</I> 8, 16 or 32) or for tables the <TT>ASCII</TT> format. <P> Each HDU in a FITS file will normally correspond to a single MIDAS file. HDU's with no associated data are not stored. Besides the prime HDU which either is a simple data matrix or a random group structure a number of extension are defined. Currently, the extensions listed in Table <A HREF="node112.html#ch07:tab2">7.1.2</A> are translated by MIDAS whereas other 'unknown' extensions are skipped. Text and MIDAS-<TT>fit</TT> files can also be stored in FITS. The content of these file types is stored as FITS headers using a special MIDAS conversion. Thus, other FITS readers may not be able to retrieve the full information. <BR> <DIV ALIGN="CENTER"><A NAME="10276"> </A> <TABLE> <CAPTION><STRONG>Table 7.2:</STRONG> Relation between FITS Extensions and MIDAS frame types</CAPTION> <TR><TD> <DIV ALIGN="CENTER"> <TABLE CELLPADDING=3 BORDER="1" ALIGN="CENTER"> <TR><TD ALIGN="LEFT">FITS Extension type</TD> <TD ALIGN="CENTER"> <!-- MATH: $\rightarrow$ --> <IMG WIDTH="27" HEIGHT="21" ALIGN="BOTTOM" BORDER="0" SRC="img257.gif" ALT="$\rightarrow$"></TD> <TD ALIGN="LEFT">MIDAS frame</TD> </TR> <TR><TD ALIGN="LEFT"><TT> prime</TT></TD> <TD ALIGN="CENTER"> </TD> <TD ALIGN="LEFT">image (<TT> .bdf</TT>)</TD> </TR> <TR><TD ALIGN="LEFT"><TT> random groups</TT></TD> <TD ALIGN="CENTER"> </TD> <TD ALIGN="LEFT">image (<TT> .bdf</TT>) + table (<TT> .tbl</TT>)</TD> </TR> <TR><TD ALIGN="LEFT"><TT> TABLE</TT></TD> <TD ALIGN="CENTER"> </TD> <TD ALIGN="LEFT">table (<TT> .tbl</TT>)</TD> </TR> <TR><TD ALIGN="LEFT"><TT> BINTABLE</TT></TD> <TD ALIGN="CENTER"> </TD> <TD ALIGN="LEFT">table (<TT> .tbl</TT>)</TD> </TR> <TR><TD ALIGN="LEFT"><TT> IMAGE</TT></TD> <TD ALIGN="CENTER"> </TD> <TD ALIGN="LEFT">image (<TT> .bdf</TT>)</TD> </TR> </TABLE> <A NAME="ch07:tab2"> </A> </DIV></TD></TR> </TABLE> </DIV> <BR> <P> <HR> <!--Navigation Panel--> <A NAME="tex2html1952" HREF="node113.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="icons.gif/next_motif.gif"></A> <A NAME="tex2html1948" HREF="node110.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="icons.gif/up_motif.gif"></A> <A NAME="tex2html1942" HREF="node111.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="icons.gif/previous_motif.gif"></A> <A NAME="tex2html1950" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="icons.gif/contents_motif.gif"></A> <A NAME="tex2html1951" HREF="node216.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="icons.gif/index_motif.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html1953" HREF="node113.html">FITS keywords</A> <B> Up:</B> <A NAME="tex2html1949" HREF="node110.html">FITS Format</A> <B> Previous:</B> <A NAME="tex2html1943" HREF="node111.html">Structure of FITS files</A> <!--End of Navigation Panel--> <ADDRESS> <I>Petra Nass</I> <BR><I>1999-06-09</I> </ADDRESS> </BODY> </HTML>