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
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> headinit
</TITLE>
<p>
<!-- pnuts --> <a href="fitsimage.html">[Previous]</a> <a href="headfile.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_headinit,ft_headcopy,ft_headfree,ft_setcards,ft_primary,ft_headmerge -Fitsy
FITS header creation routines.
<A NAME="section-1.1.2"><H3>SYNOPSIS</H3></A>
<PRE>
FITSHead ft_headinit(void *data, int bytes);
FITSHead ft_headcopy(FITSHead fits);
void ft_headfree(FITSHead fits, int freecards);
void ft_setcards(FITSHead fits, void *cards);
FITSHead ft_primary(FITSHead fits);
FITSHead ft_headmerge(FITSHead fits1, FITSHead fits2);
<P>
</PRE>
<A NAME="section-1.1.3"><H3>PARAMETERS</H3></A>
<UL>
<P>
<LI> <B>void *data</B> - Pointer to FITS cards.
<LI> <B>int bytes</B> - Number of bytes in buffer.
<LI> <B>FITSHead fits</B> - Not Documented.
<LI> <B>int freecards</B> - Free the FITS cards?
<LI> <B>void *cards</B> - Not Documented.
<LI> <B>FITSHead fits1</B> - Not Documented.
<LI> <B>FITSHead fits2</B> - Not Documented.
</UL>
<A NAME="section-1.1.4"><H3>DESCRIPTION</H3></A>
<A NAME="section-1.1.4.1"><H4>ft_headinit</H4></A>
<P>
Create or import a FITS header to Fitsy.
<P>
This is the primary way in which FITSHead structures are created.
<P>
If <B>cards</B> is not NULL then then <B>acard</B> cards are scanned from the memory
in search of the END card. When a memory block is passed in to <B>ft_headinit</B>
then it is considered <I>unmanaged</I> and will not be freed by <B>ft_headfree.</B>
<P>
If <B>cards</B> is NULL, then <B>acards</B> cards will be allocated for use as a FITSHead.
If <B>acards</B> is 0 the <B>FT_CARDS</B> will be allocated (36).
<A NAME="section-1.1.4.2"><H4>ft_headcopy</H4></A>
<P>
Make a copy of a <B>FITSHead</B> data structure.
<A NAME="section-1.1.4.3"><H4>ft_headfree</H4></A>
<P>
Free a Fitsy FITS header data structure.
<A NAME="section-1.1.4.4"><H4>ft_setcards</H4></A>
<P>
Set the card buffer
<A NAME="section-1.1.4.5"><H4>ft_primary</H4></A>
<P>
Make a copy of the header and force it to be a simple primary header.
<A NAME="section-1.1.4.6"><H4>ft_headmerge</H4></A>
<P>
Merge cards from fits1 to fits2
<A NAME="section-1.1.5"><H3>EXAMPLES</H3></A>
<PRE>
FITSHead fits;
fits = <B>ft_headinit</B>(NULL, 0); /* Create an empty header */
/* Build a FITS file header by hand.
*/
<B>ft_headappl</B>(fits, "SIMPLE", 0, 1, "Primary FITS image array");
<B>ft_headappi</B>(fits, "BITPIX", 0, -32, "Single floats");
<B>ft_headappi</B>(fits, "NAXIS" , 0, 2, "2d image");
<B>ft_headappi</B>(fits, "NAXIS" , 1, 256, "X axis is 256");
<B>ft_headappi</B>(fits, "NAXIS" , 2, 256, "Y axis is 256");
<P>
</PRE>
<p>
<!-- pnuts --> <a href="fitsimage.html">[Previous]</a> <a href="headfile.html">[Next]</a> <a href="fitsy.html">[Up]</a> <a href="../mmtilib.html">[Top]</a>
</BODY>
</HTML>
|