aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/daophot/daolib/dpwparam.x
blob: 6e122dee12aef395ffd06e9e5e31bf663269a120 (plain) (blame)
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
# DP_RPARAM -- Encode a daophot real parameter.

procedure dp_rparam (out, keyword, value, units, comments)

int	out		# output file descriptor
char	keyword[ARB]	# keyword string
real	value		# parameter value
char	units[ARB]	# units string
char	comments[ARB]	# comment string

begin
	if (out == NULL)
	    return

	call strupr (keyword)
        call fprintf (out,
	    "#K%4t%-10.10s%14t = %17t%-23.7g%41t%-10.10s%52t%-10s\n")
	    call pargstr (keyword)
	    call pargr (value)
	    call pargstr (units)
	    call pargstr ("%-23.7g")
	    call pargstr (comments)
end


# DP_IPARAM -- Encode a daophot integer parameter.

procedure dp_iparam (out, keyword, value, units, comments)

int	out		# output file descriptor
char	keyword[ARB]	# keyword string
int	value		# parameter value
char	units[ARB]	# units string
char	comments[ARB]	# comment string

begin
	if (out == NULL)
	    return

	call strupr (keyword)
        call fprintf (out,
	    "#K%4t%-10.10s%14t = %17t%-23d%41t%-10.10s%52t%-10s\n")
	    call pargstr (keyword)
	    call pargi (value)
	    call pargstr (units)
	    call pargstr ("%-23d")
	    call pargstr (comments)
end


# DP_BPARAM -- Encode a daophot boolean parameter.

procedure dp_bparam (out, keyword, value, units, comments)

int	out		# output file descriptor
char	keyword[ARB]	# keyword string
bool	value		# parameter value
char	units[ARB]	# units string
char	comments[ARB]	# comment string

begin
	if (out == NULL)
	    return

	call strupr (keyword)
        call fprintf (out,
	    "#K%4t%-10.10s%14t = %17t%-23b%41t%-10.10s%52t%-10s\n")
	    call pargstr (keyword)
	    call pargb (value)
	    call pargstr (units)
	    call pargstr ("%-23b")
	    call pargstr (comments)
end


# DP_SPARAM -- Encode a daophot string parameter.

procedure dp_sparam (out, keyword, value, units, comments)

int	out		# output file descriptor
char	keyword[ARB]	# keyword string
char	value[ARB]	# parameter value
char	units[ARB]	# units string
char	comments[ARB]	# comment string

begin
	if (out == NULL)
	    return

	call strupr (keyword)
        call fprintf (out,
	    "#K%4t%-10.10s%14t = %17t%-23.23s%41t%-10.10s%52t%-10s\n")
	    call pargstr (keyword)
	    call pargstr (value)
	    call pargstr (units)
	    call pargstr ("%-23s")
	    call pargstr (comments)
end