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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> cardpar
</TITLE>
<p>
<!-- pnuts --> <a href="dataimage.html">[Previous]</a> <a href="cardfmt.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>NAME</H3></A>
<P>
ft_cardpar,ft_cardget,ft_cardgetl,ft_cardgeti,ft_cardgetr,ft_cardgets -Fitsy
FITS card parsing routines.
<A NAME="section-1.1.2"><H3>SYNOPSIS</H3></A>
<PRE>
char *ft_cardpar(FITSCard card, FITSType *type, char *value, int *index, char *comm);
char *ft_cardget(FITSCard card);
int ft_cardgetl(FITSCard card);
int ft_cardgeti(FITSCard card);
double ft_cardgetr(FITSCard card);
char *ft_cardgets(FITSCard card);
<P>
</PRE>
<A NAME="section-1.1.3"><H3>PARAMETERS</H3></A>
<UL>
<P>
<LI> <B>FITSCard card</B> - FITS card to parse.
<LI> <B>FITSType *type</B> - Returned card type.
<P>
Possible values for a <B>FITSType</B> are as follows:
<UL>
<P>
<LI> <B>FT_COMMENT</B>
<LI> <B>FT_LOGICAL</B>
<LI> <B>FT_INTEGER</B>
<LI> <B>FT_STRING</B>
<LI> <B>FT_VALUE</B>
<LI> <B>FT_REAL</B>
<LI> <B>FT_COMPLEX</B>
</UL>
<P>
<LI> <B>char *value</B> - Returned card value string.
<LI> <B>int *index</B> - Returned index of the card keyword.
<LI> <B>char *comm</B> - Returned card comment.
</UL>
<A NAME="section-1.1.4"><H3>DESCRIPTION</H3></A>
<P>
These routines parse FITS cards. Usually the header value routines will
be used instead of these.
<A NAME="section-1.1.4.1"><H4>ft_cardpar</H4></A>
<P>
Parse a FITS card in to its type, value index and comment parts
<P>
The ft_cardpar will parse an 80 character fits card in memory
into its parts according to the standard. Some non-standard
card formats are recognized.
<A NAME="section-1.1.4.2"><H4>ft_cardget</H4></A>
<P>
Return the value of a FITS card in a static buffer.
<A NAME="section-1.1.4.3"><H4>ft_cardgetl</H4></A>
<P>
Return the value of a FITS card as a logical.
<A NAME="section-1.1.4.4"><H4>ft_cardgeti</H4></A>
<P>
Return the value of a FITS card as a integer.
<A NAME="section-1.1.4.5"><H4>ft_cardgetr</H4></A>
<P>
Return the value of a FITS card as a double.
<A NAME="section-1.1.4.6"><H4>ft_cardgets</H4></A>
<P>
Return the value of a FITS card as a allocated string.
<P>
The returned string is allocated with strdup().
<A NAME="section-1.1.5"><H3>RETURNS</H3></A>
<A NAME="section-1.1.5.1"><H4>ft_cardpar</H4></A>
<P>
The value parameter.
<A NAME="section-1.1.6"><H3>EXAMPLES</H3></A>
<PRE>
FITSHead fits;
FITSCard card;
FITSType type;
char value[FT_CARDLEN];
int index;
char comment[FT_CARDLEN];
int im; /* Is this a primary image? */
<B>ft_cardpar</B>(card, &type, value, &index, comm);
card = <B>ft_headfind</B>(fits, "SIMPLE", 0, 0);
im = <B>ft_cardgetl</B>(card);
</PRE>
<p>
<!-- pnuts --> <a href="dataimage.html">[Previous]</a> <a href="cardfmt.html">[Next]</a> <a href="fitsy.html">[Up]</a> <a href="../mmtilib.html">[Top]</a>
</BODY>
</HTML>
|