summaryrefslogtreecommitdiffstats
path: root/fitsy/doc/cardfmt.html
diff options
context:
space:
mode:
Diffstat (limited to 'fitsy/doc/cardfmt.html')
-rw-r--r--fitsy/doc/cardfmt.html181
1 files changed, 181 insertions, 0 deletions
diff --git a/fitsy/doc/cardfmt.html b/fitsy/doc/cardfmt.html
new file mode 100644
index 0000000..0ab1cd6
--- /dev/null
+++ b/fitsy/doc/cardfmt.html
@@ -0,0 +1,181 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+<TITLE> cardfmt
+</TITLE>
+<p>
+<!-- pnuts --> <a href="cardpar.html">[Previous]</a> <a href="cardfind.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_cardfmt,ft_cardkey,ft_cardset,ft_cardsetl,ft_cardseti,ft_cardsetr,ft_cardsets,ft_cardclr,ft_cardcpy
+- Fitsy FITS card set routines.
+
+<A NAME="section-1.1.2"><H3>SYNOPSIS</H3></A>
+
+
+
+<PRE>
+FITSCard ft_cardfmt(FITSCard card, char *name, int n, FITSType type, void *value, int prec, char *comm);
+FITSCard ft_cardkey(FITSCard card, char *name, int n);
+FITSCard ft_cardset(FITSCard card, FITSType type, void *value, int prec, char *comm);
+FITSCard ft_cardsetl(FITSCard card, int lvalue, char *comm);
+FITSCard ft_cardseti(FITSCard card, int ivalue, char *comm);
+FITSCard ft_cardsetr(FITSCard card, double rvalue, int prec, char *comm);
+FITSCard ft_cardsets(FITSCard card, char *svalue, char *comm);
+FITSCard ft_cardclr(FITSCard card, int ncards);
+FITSCard ft_cardcpy(FITSCard card1, FITSCard card2);
+
+
+<P>
+</PRE>
+<A NAME="section-1.1.3"><H3>PARAMETERS</H3></A>
+
+<UL>
+<P>
+ <LI> <B>FITSCard card</B> - FITS card to format.
+ <LI> <B>char *name</B> - keyword name.
+ <LI> <B>int n</B> - keyword index number, if is zero no
+ index number is appended to the
+ keyword.
+ <LI> <B>FITSType type</B> - type of the card.
+
+<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>void *value</B> - pointer to the value to format. The
+ pointer must be of the apropriate type.
+ <LI> <B>int prec</B> - If type is FT_REAL the value is formatted
+ at this precision. Otherwise this parameter
+ is ignored.
+ <LI> <B>char *comm</B> - Comment for the card.
+ <LI> <B>int lvalue</B> - Logical to format as a FITS value.
+ <LI> <B>int ivalue</B> - Integer to format as a FITS value.
+ <LI> <B>double rvalue</B> - Double to format as a FITS value.
+ <LI> <B>char *svalue</B> - String to format as a FITS value.
+ <LI> <B>int ncards</B> - Number of 80 character FITS cards to clear
+ <LI> <B>FITSCard card1</B> - Destination card
+ <LI> <B>FITSCard card2</B> - Source card
+
+</UL>
+<A NAME="section-1.1.4"><H3>DESCRIPTION</H3></A>
+
+
+<A NAME="section-1.1.4.1"><H4>ft_cardfmt</H4></A>
+
+<P>
+ Format a FITS card with the supplied values.
+
+<A NAME="section-1.1.4.2"><H4>ft_cardkey</H4></A>
+
+<P>
+ Format a keyword into a FITS card.
+
+<A NAME="section-1.1.4.3"><H4>ft_cardset</H4></A>
+
+<P>
+ Format a value into a FITS card.
+
+<A NAME="section-1.1.4.4"><H4>ft_cardsetl</H4></A>
+
+<P>
+ Format a logical value into a FITS card.
+
+<A NAME="section-1.1.4.5"><H4>ft_cardseti</H4></A>
+
+<P>
+ Format an integer value into a FITS card.
+
+<A NAME="section-1.1.4.6"><H4>ft_cardsetr</H4></A>
+
+<P>
+ Format a real value into a FITS card.
+
+<A NAME="section-1.1.4.7"><H4>ft_cardsets</H4></A>
+
+<P>
+ Format a string value into a FITS card.
+
+<A NAME="section-1.1.4.8"><H4>ft_cardclr</H4></A>
+
+<P>
+ Clear FITS cards by writing space into them.
+
+<A NAME="section-1.1.4.9"><H4>ft_cardcpy</H4></A>
+
+<P>
+ Copy a FITS card.
+
+<A NAME="section-1.1.5"><H3>EXAMPLES</H3></A>
+
+<P>
+ Format the keyword part of a card:
+
+<PRE>
+
+ FITSHead fits;
+ FITSBuff card;
+ FITSCard here;
+
+ <B>ft_cardclr</B>(&amp;card, 1); /* Clear out the card first */
+
+ <B>ft_cardkey</B>(&amp;card, "RA"); /* Set the keyword */
+ <B>ft_cardsetr</B>(&amp;card, 14.789, 3, "OBS RA"); /* Set the value of RA. */
+
+ here = <B>ft_cardapp</B>(fits, &amp;card); /* Put the new card into a header*/
+
+ <B>ft_cardsetr</B>(here, 15.567, 3, FT_Comment); /* Set a new value after it's in
+ the header and reuse the existing
+ comment */
+
+<P>
+</PRE>
+
+<P>
+ Format the value part of a card:
+
+<PRE>
+ int l = 1;
+ int i = 15;
+ double d = 34.7;
+ char *c = "Shutter";
+
+ FITSHead fits;
+ FITSCard card;
+
+ /* Get a card pointer from the header
+ */
+ card = <B>ft_cardfind</B>(fits, "Keyword", 0);
+
+ <B>ft_cardsetl</B>(card, l, "A true value");
+ <B>ft_cardseti</B>(card, i, "15 is the number");
+ <B>ft_cardsetr</B>(card, d, 4, "Four digits of precision here");
+
+ /* In this example the special pointer <B>FT_Comment</B> is used to
+ use the existing comment in the card.
+ */
+ <B>ft_cardsets</B>(card, c, FT_Comment);
+
+<P>
+</PRE>
+
+<p>
+<!-- pnuts --> <a href="cardpar.html">[Previous]</a> <a href="cardfind.html">[Next]</a> <a href="fitsy.html">[Up]</a> <a href="../mmtilib.html">[Top]</a>
+</BODY>
+</HTML>