summaryrefslogtreecommitdiffstats
path: root/funtools/fitsy/doc/headinit.wu
blob: 1828a8faceb33f4e4b665dc2432b9a09596a0121 (plain)
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
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");


+