Title: headinit


NAME
====
 ft_headinit,ft_headcopy,ft_headfree,ft_setcards,ft_primary,ft_headmerge -Fitsy
 FITS header creation routines.

SYNOPSIS
========
 

-
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);


-
PARAMETERS
==========
  * #"void *data" - Pointer to FITS cards.
  * #"int bytes" - Number of bytes in buffer.
  * #"FITSHead fits" - Not Documented.
  * #"int freecards" - Free the FITS cards?
  * #"void *cards" - Not Documented.
  * #"FITSHead fits1" - Not Documented.
  * #"FITSHead fits2" - Not Documented.

DESCRIPTION
===========

 ft_headinit
 -----------
 Create or import a FITS header to Fitsy.
 
 This is the primary way in which FITSHead structures are created.
 
 If #cards is not NULL then then #acard cards are scanned from the memory
 in search of the END card. When a memory block is passed in to #ft_headinit
 then it is considered ~unmanaged~ and will not be freed by #ft_headfree.
 
 If #cards is NULL, then #acards cards will be allocated for use as a FITSHead.
 If #acards is 0 the #FT_CARDS will be allocated (36).

 ft_headcopy
 -----------
 Make a copy of a #FITSHead data structure.

 ft_headfree
 -----------
 Free a Fitsy FITS header data structure.

 ft_setcards
 -----------
 Set the card buffer

 ft_primary
 ----------
 Make a copy of the header and force it to be a simple primary header.

 ft_headmerge
 ------------
 Merge cards from fits1 to fits2

EXAMPLES
========

+
		FITSHead	fits;

	fits = #ft_headinit(NULL, 0);	/* Create an empty header	*-/

	/* Build a FITS file header by hand.
	 *-/
	#ft_headappl(fits, "SIMPLE", 0,   1, "Primary FITS image array");
	#ft_headappi(fits, "BITPIX", 0, -32, "Single floats");
	#ft_headappi(fits, "NAXIS" , 0,   2, "2d image");
	#ft_headappi(fits, "NAXIS" , 1, 256, "X axis is 256");
	#ft_headappi(fits, "NAXIS" , 2, 256, "Y axis is 256");


+ 
