1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<p>
<!-- pnuts --> <a href="headfile.html">[Previous]</a> <a href="imageval.html">[Next]</a> <a href="fitsy.html">[Up]</a> <a href="../mmtilib.html">[Top]</a>
<META NAME="generator" CONTENT="txt2html v1.3">
</HEAD>
<BODY>
<A NAME="section-1.1.1"><H3>Basic FITS Values</H3></A>
<P>
When a FITS header is scanned in memory or read from a file several
basic values are retrieved from the header and stored in the <B>FITSHead</B>
or <B>FITSBasic</B> structures. This structure may be accesed with the following
macros:
<PRE>
#define <B>ft_ncards</B>(fits) ( fits->ncard )
#define <B>ft_cardnth</B>(fits, nth) ( ( nth <= fits->ncard ) \
? &fits->cards[nth-1] \
: NULL )
#define <B>ft_last</B>(fits) ft_cardnth(fits, fits->ncard)
#define <B>ft_swapped</B>() (*(short *)"001000" & 0x0001)
#define <B>ft_seek</B>(fits) ( fits->seek )
typedef struct <B>FITSHead</B> {
FITSCard cards;
FITSCard *index;
FITSCard last;
int acard;
int ncard;
int mem;
int seek;
int data;
FITSBasic basic;
FITSImage image;
FITSTable table;
} <B>*FITSHead</B>;
#define <B>ft_simple</B>(fits) ( fits->basic->simple )
#define <B>ft_name</B>(fits) ( fits->basic->name )
#define <B>ft_bitpix</B>(fits) ( fits->basic->bitpix )
#define <B>ft_naxes</B>(fits) ( fits->basic->naxes )
#define <B>ft_naxis</B>(fits, i) ( fits->basic->naxis[i-1])
#define <B>ft_pcount</B>(fits) ( fits->basic->pcount )
#define <B>ft_gcount</B>(fits) ( fits->basic->gcount )
#define <B>ft_databytes</B>(fits) ( fits->basic->databytes)
#define <B>ft_databloks</B>(fits) ( fits->basic->databloks)
typedef struct <B>FITSBasic</B> {
int simple;
char *name;
int bitpix;
int naxes;
int *naxis;
int gcount;
int pcount;
int databytes;
int databloks;
} <B>*FITSBasic</B>;
<P>
</PRE>
<p>
<!-- pnuts --> <a href="headfile.html">[Previous]</a> <a href="imageval.html">[Next]</a> <a href="fitsy.html">[Up]</a> <a href="../mmtilib.html">[Top]</a>
</BODY>
</HTML>
|