summaryrefslogtreecommitdiffstats
path: root/funtools/fitsy/doc/cardfind.wu
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-10-25 20:57:49 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-10-25 20:57:49 (GMT)
commitd1c4bf158203c4e8ec29fdeb83fd311e36320885 (patch)
tree15874534e282f67505ce4af5ba805a1ff70ec43e /funtools/fitsy/doc/cardfind.wu
parente19a18e035dc4d0e8e215f9b452bb9ef6f58b9d7 (diff)
parent339420dd5dd874c41f6bab5808291fb4036dd022 (diff)
downloadblt-d1c4bf158203c4e8ec29fdeb83fd311e36320885.zip
blt-d1c4bf158203c4e8ec29fdeb83fd311e36320885.tar.gz
blt-d1c4bf158203c4e8ec29fdeb83fd311e36320885.tar.bz2
Merge commit '339420dd5dd874c41f6bab5808291fb4036dd022' as 'funtools'
Diffstat (limited to 'funtools/fitsy/doc/cardfind.wu')
-rw-r--r--funtools/fitsy/doc/cardfind.wu85
1 files changed, 85 insertions, 0 deletions
diff --git a/funtools/fitsy/doc/cardfind.wu b/funtools/fitsy/doc/cardfind.wu
new file mode 100644
index 0000000..b854c3d
--- /dev/null
+++ b/funtools/fitsy/doc/cardfind.wu
@@ -0,0 +1,85 @@
+Title: cardfind
+
+
+NAME
+====
+ ft_cardfind,ft_cardfindidx,ft_cardfindseq -Fitsy FITS card find routines.
+
+SYNOPSIS
+========
+
+
+-
+FITSCard ft_cardfind(FITSHead fits, FITSCard key, int add);
+FITSCard ft_cardfindidx(FITSHead fits, FITSCard key, int *match);
+FITSCard ft_cardfindseq(FITSHead fits, FITSCard key, int *match);
+
+
+-
+PARAMETERS
+==========
+ * #"FITSHead fits" - The FITS header to look in.
+ * #"FITSCard key" - The card keyword to lookup.
+ * #"int add" - If add is true the card will
+ be added to the header if it is
+ not found.
+ * #"int *match" - Returns true if the card found is
+ an exact match for the keyword requested.
+
+DESCRIPTION
+===========
+ Routines to find FITS cards in a FITS headers data structure.
+
+ ft_cardfind
+ -----------
+ Find a FITS card in the header.
+
+ #cardfind will use the index if is has been created otherwise
+ it searches sequentially through the header to find the card.
+
+ ft_cardfindidx
+ --------------
+ Find a FITS card in the header using an index.
+
+ If the header is not indexed an index is created for it.
+
+ ft_cardfindseq
+ --------------
+ Find a card in the FITS header using sequential search.
+
+ If the requested card is a FITS indexed keyword and an exact match
+ is not found, the last card of that type is returned and
+ match is set to 0.
+
+EXAMPLES
+========
+
++
+
+ /* Declair some fitsy types.
+ *-/
+ #FITSHead fits;
+ #FITSCard foo;
+ #FITSCard goo;
+ #FITSBuff key;
+
+ /* Look up a card using sequential search.
+ *-/
+ #ft_cardkey(key, "FOO");
+ foo = #ft_cardfind(fits, key, 0);
+
+ /* This is the same thing. But the card is added to the header
+ if it isn't found. This will also invalidate the index if
+ there is one.
+ *-/
+ #ft_cardkey(key, "FOO");
+ foo = #ft_cardfind(fits, key, 1);
+
+ /* Now index the header so that searches are faster. #ft_cardfind
+ will automatically use the index if its valid.
+ *-/
+ #ft_index(fits);
+ #ft_cardkey(key, "GOO", 0);
+ goo = #ft_cardfind(fits, key, 0);
+
++