summaryrefslogtreecommitdiffstats
path: root/funtools/fitsy/doc/cardfmt.wu
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-10-27 17:38:41 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-10-27 17:38:41 (GMT)
commit5b44fb0d6530c4ff66a446afb69933aa8ffd014f (patch)
treee059f66d1f612e21fe9d83f9620c8715530353ec /funtools/fitsy/doc/cardfmt.wu
parentda2e3d212171bbe64c1af39114fd067308656990 (diff)
parent23c7930d27fe11c4655e1291a07a821dbbaba78d (diff)
downloadblt-5b44fb0d6530c4ff66a446afb69933aa8ffd014f.zip
blt-5b44fb0d6530c4ff66a446afb69933aa8ffd014f.tar.gz
blt-5b44fb0d6530c4ff66a446afb69933aa8ffd014f.tar.bz2
Merge commit '23c7930d27fe11c4655e1291a07a821dbbaba78d' as 'funtools'
Diffstat (limited to 'funtools/fitsy/doc/cardfmt.wu')
-rw-r--r--funtools/fitsy/doc/cardfmt.wu144
1 files changed, 144 insertions, 0 deletions
diff --git a/funtools/fitsy/doc/cardfmt.wu b/funtools/fitsy/doc/cardfmt.wu
new file mode 100644
index 0000000..ce072e8
--- /dev/null
+++ b/funtools/fitsy/doc/cardfmt.wu
@@ -0,0 +1,144 @@
+Title: cardfmt
+
+
+NAME
+====
+ ft_cardfmt,ft_cardkey,ft_cardset,ft_cardsetl,ft_cardseti,ft_cardsetr,ft_cardsets,ft_cardclr,ft_cardcpy
+- Fitsy FITS card set routines.
+
+SYNOPSIS
+========
+
+
+-
+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);
+
+
+-
+PARAMETERS
+==========
+ * #"FITSCard card" - FITS card to format.
+ * #"char *name" - keyword name.
+ * #"int n" - keyword index number, if is zero no
+ index number is appended to the
+ keyword.
+ * #"FITSType type" - type of the card.
+
+ Possible values for a #FITSType are as follows:
+ * #"FT_COMMENT"
+ * #"FT_LOGICAL"
+ * #"FT_INTEGER"
+ * #"FT_STRING"
+ * #"FT_VALUE"
+ * #"FT_REAL"
+ * #"FT_COMPLEX"
+
+ * #"void *value" - pointer to the value to format. The
+ pointer must be of the apropriate type.
+ * #"int prec" - If type is FT_REAL the value is formatted
+ at this precision. Otherwise this parameter
+ is ignored.
+ * #"char *comm" - Comment for the card.
+ * #"int lvalue" - Logical to format as a FITS value.
+ * #"int ivalue" - Integer to format as a FITS value.
+ * #"double rvalue" - Double to format as a FITS value.
+ * #"char *svalue" - String to format as a FITS value.
+ * #"int ncards" - Number of 80 character FITS cards to clear
+ * #"FITSCard card1" - Destination card
+ * #"FITSCard card2" - Source card
+
+DESCRIPTION
+===========
+
+ ft_cardfmt
+ ----------
+ Format a FITS card with the supplied values.
+
+ ft_cardkey
+ ----------
+ Format a keyword into a FITS card.
+
+ ft_cardset
+ ----------
+ Format a value into a FITS card.
+
+ ft_cardsetl
+ -----------
+ Format a logical value into a FITS card.
+
+ ft_cardseti
+ -----------
+ Format an integer value into a FITS card.
+
+ ft_cardsetr
+ -----------
+ Format a real value into a FITS card.
+
+ ft_cardsets
+ -----------
+ Format a string value into a FITS card.
+
+ ft_cardclr
+ ----------
+ Clear FITS cards by writing space into them.
+
+ ft_cardcpy
+ ----------
+ Copy a FITS card.
+
+EXAMPLES
+========
+ Format the keyword part of a card:
+
++
+
+ FITSHead fits;
+ FITSBuff card;
+ FITSCard here;
+
+ #ft_cardclr(&card, 1); /* Clear out the card first *-/
+
+ #ft_cardkey(&card, "RA"); /* Set the keyword *-/
+ #ft_cardsetr(&card, 14.789, 3, "OBS RA"); /* Set the value of RA. *-/
+
+ here = #ft_cardapp(fits, &card); /* Put the new card into a header*-/
+
+ #ft_cardsetr(here, 15.567, 3, FT_Comment); /* Set a new value after it's in
+ the header and reuse the existing
+ comment *-/
+
++
+
+ Format the value part of a card:
+
++
+ 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 = #ft_cardfind(fits, "Keyword", 0);
+
+ #ft_cardsetl(card, l, "A true value");
+ #ft_cardseti(card, i, "15 is the number");
+ #ft_cardsetr(card, d, 4, "Four digits of precision here");
+
+ /* In this example the special pointer #FT_Comment is used to
+ use the existing comment in the card.
+ *-/
+ #ft_cardsets(card, c, FT_Comment);
+
++