diff options
Diffstat (limited to 'funtools/fitsy/doc/cardfind.html')
-rw-r--r-- | funtools/fitsy/doc/cardfind.html | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/funtools/fitsy/doc/cardfind.html b/funtools/fitsy/doc/cardfind.html new file mode 100644 index 0000000..4562c29 --- /dev/null +++ b/funtools/fitsy/doc/cardfind.html @@ -0,0 +1,112 @@ +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN"> +<HTML> +<HEAD> +<TITLE> cardfind +</TITLE> +<p> +<!-- pnuts --> <a href="cardfmt.html">[Previous]</a> <a href="cardins.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_cardfind,ft_cardfindidx,ft_cardfindseq -Fitsy FITS card find routines. + +<A NAME="section-1.1.2"><H3>SYNOPSIS</H3></A> + + + +<PRE> +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); + + +<P> +</PRE> +<A NAME="section-1.1.3"><H3>PARAMETERS</H3></A> + +<UL> +<P> + <LI> <B>FITSHead fits</B> - The FITS header to look in. + <LI> <B>FITSCard key</B> - The card keyword to lookup. + <LI> <B>int add</B> - If add is true the card will + be added to the header if it is + not found. + <LI> <B>int *match</B> - Returns true if the card found is + an exact match for the keyword requested. + +</UL> +<A NAME="section-1.1.4"><H3>DESCRIPTION</H3></A> + +<P> + Routines to find FITS cards in a FITS headers data structure. + +<A NAME="section-1.1.4.1"><H4>ft_cardfind</H4></A> + +<P> + Find a FITS card in the header. + +<P> + <B>cardfind</B> will use the index if is has been created otherwise + it searches sequentially through the header to find the card. + +<A NAME="section-1.1.4.2"><H4>ft_cardfindidx</H4></A> + +<P> + Find a FITS card in the header using an index. + +<P> + If the header is not indexed an index is created for it. + +<A NAME="section-1.1.4.3"><H4>ft_cardfindseq</H4></A> + +<P> + Find a card in the FITS header using sequential search. + +<P> + 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. + +<A NAME="section-1.1.5"><H3>EXAMPLES</H3></A> + + +<PRE> + + /* Declair some fitsy types. + */ + <B>FITSHead</B> fits; + <B>FITSCard</B> foo; + <B>FITSCard</B> goo; + <B>FITSBuff</B> key; + + /* Look up a card using sequential search. + */ + <B>ft_cardkey</B>(key, "FOO"); + foo = <B>ft_cardfind</B>(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. + */ + <B>ft_cardkey</B>(key, "FOO"); + foo = <B>ft_cardfind</B>(fits, key, 1); + + /* Now index the header so that searches are faster. <B>ft_cardfind</B> + will automatically use the index if its valid. + */ + <B>ft_index</B>(fits); + <B>ft_cardkey</B>(key, "GOO", 0); + goo = <B>ft_cardfind</B>(fits, key, 0); + +<P> +</PRE> + +<p> +<!-- pnuts --> <a href="cardfmt.html">[Previous]</a> <a href="cardins.html">[Next]</a> <a href="fitsy.html">[Up]</a> <a href="../mmtilib.html">[Top]</a> +</BODY> +</HTML> |