aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/apphot/fitsky/apsshow.x
blob: da54bfbfdda970844bc835187dcf2de0415f8ec1 (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
99
include "../lib/display.h"
include "../lib/fitsky.h"


# AP_SSHOW -- Procedure to print sky fitting parameters on the terminal.

procedure ap_sshow (ap)

pointer	ap	# pointer to the apphot strucuture

bool	itob()
int	apstati()

begin
	call ap_nshow (ap)
	call printf ("\n")
	call ap_spshow (ap)
	call printf ("    %s = %b\n")
	    call pargstr (KY_RADPLOTS)
	    call pargb (itob (apstati (ap, RADPLOTS)))
end


# AP_SPSHOW -- Procedure to print sky fitting parameters on the terminal.

procedure ap_spshow (ap)

pointer	ap	# pointer to the apphot strucuture

pointer	sp, str
bool	itob()
int	apstati()
real	apstatr()

begin
	# Print the image characteristics
	call smark (sp)
	call salloc (str, SZ_LINE, TY_CHAR)

	# Print the sky fitting parameters.
	call printf ("Sky Fitting Parameters\n")
	call apstats (ap, SSTRING, Memc[str], SZ_FNAME)
	call printf ("    %s = %s %s    %s = %g %s\n")
	    call pargstr (KY_SSTRING)
	    call pargstr (Memc[str])
	    call pargstr (UN_SALGORITHM)
	    call pargstr (KY_SKY_BACKGROUND)
	    call pargr (apstatr (ap, SKY_BACKGROUND))
	    call pargstr (UN_SCOUNTS)

	call printf ("    %s = %g %s    %s = %g %s\n")
	    call pargstr (KY_ANNULUS)
	    call pargr (apstatr (ap, ANNULUS))
	    call pargstr (UN_SSCALEUNIT)
	    call pargstr (KY_DANNULUS)
	    call pargr (apstatr (ap, DANNULUS))
	    call pargstr (UN_SSCALEUNIT)

	call printf ("    %s = %g %s    %s = %g %s    %s = %b\n")
	    call pargstr (KY_K1)
	    call pargr (apstatr (ap, K1))
	    call pargstr (UN_SSIGMA)
	    call pargstr (KY_BINSIZE)
	    call pargr (apstatr (ap, BINSIZE))
	    call pargstr (UN_SSIGMA)
	    call pargstr (KY_SMOOTH)
	    call pargb (itob (apstati (ap, SMOOTH)))

	call printf ("    %s = %g %s    %s = %g %s\n")
	    call pargstr (KY_SLOCLIP)
	    call pargr (apstatr (ap, SLOCLIP))
	    call pargstr (UN_SPERCENT)
	    call pargstr (KY_SHICLIP)
	    call pargr (apstatr (ap, SHICLIP))
	    call pargstr (UN_SPERCENT)

	call printf ("    %s = %g %s    %s = %g %s    %s = %d\n")
	    call pargstr (KY_SLOREJECT)
	    call pargr (apstatr (ap, SLOREJECT))
	    call pargstr (UN_SSIGMA)
	    call pargstr (KY_SHIREJECT)
	    call pargr (apstatr (ap, SHIREJECT))
	    call pargstr (UN_SSIGMA)
	    call pargstr (KY_SMAXITER)
	    call pargi (apstati (ap, SMAXITER))

	call printf ("    %s = %d    %s = %g %s\n")
	    call pargstr (KY_SNREJECT)
	    call pargi (apstati (ap, SNREJECT))
	    call pargstr (KY_RGROW)
	    call pargr (apstatr (ap, RGROW))
	    call pargstr (UN_SSCALEUNIT)

	call printf ("    %s = %b\n")
	    call pargstr (KY_MKSKY)
	    call pargb (itob (apstati (ap, MKSKY)))

	call sfree (sp)
end