File: basicval.html

package info (click to toggle)
funtools 1.4.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,004 kB
  • sloc: ansic: 89,502; sh: 10,714; lex: 4,613; asm: 3,281; ada: 1,681; makefile: 1,468; pascal: 1,089; cpp: 1,001; cs: 879; perl: 161; python: 119; yacc: 64; sed: 38; csh: 10; tcl: 9
file content (77 lines) | stat: -rw-r--r-- 2,705 bytes parent folder | download | duplicates (10)
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-&gt;ncard )
    #define <B>ft_cardnth</B>(fits, nth)     ( ( nth &lt;= fits-&gt;ncard )        \
                                            ? &amp;fits-&gt;cards[nth-1]       \
                                            : NULL )

    #define <B>ft_last</B>(fits)             ft_cardnth(fits, fits-&gt;ncard)

    #define <B>ft_swapped</B>()              (*(short *)"001000" &amp; 0x0001)
    #define <B>ft_seek</B>(fits)             ( fits-&gt;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-&gt;basic-&gt;simple   )
    #define <B>ft_name</B>(fits)             ( fits-&gt;basic-&gt;name     )
    #define <B>ft_bitpix</B>(fits)           ( fits-&gt;basic-&gt;bitpix   )
    #define <B>ft_naxes</B>(fits)            ( fits-&gt;basic-&gt;naxes    )
    #define <B>ft_naxis</B>(fits, i)         ( fits-&gt;basic-&gt;naxis[i-1])
    #define <B>ft_pcount</B>(fits)           ( fits-&gt;basic-&gt;pcount   )
    #define <B>ft_gcount</B>(fits)           ( fits-&gt;basic-&gt;gcount   )
    #define <B>ft_databytes</B>(fits)        ( fits-&gt;basic-&gt;databytes)
    #define <B>ft_databloks</B>(fits)        ( fits-&gt;basic-&gt;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>