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
|
include "../lib/apphot.h"
include "../lib/fitsky.h"
# AP_PSSKY -- Procedure to write the results of the fitsky task to
# the output file.
procedure ap_pssky (ap, fd, id, ld, ier)
pointer ap # pointer to apphot structure
int fd # output file descriptor
int id # sequence number of star
int ld # list number of star
int ier # error code
real apstatr()
begin
# Return if NULL file descriptor.
if (fd == NULL)
return
# Print the object id and computed sky values.
call ap_wid (ap, fd, apstatr (ap, OSXCUR), apstatr (ap, OSYCUR), id,
ld, '\\')
call ap_wsres (ap, fd, ier, ' ')
end
# AP_QSPSKY -- Procedure to print a quick summary of the fitsky task on the
# standard output.
procedure ap_qspsky (ap, ier)
pointer ap # pointer to apphot structure
int ier # error code
pointer sp, imname
int apstati()
real apstatr()
begin
# Print out the results on the standard output.
call smark (sp)
call salloc (imname, SZ_FNAME, TY_CHAR)
call apstats (ap, IMROOT, Memc[imname], SZ_FNAME)
call printf ( "%s %8.2f %8.2f %8g %8g ")
call pargstr (Memc[imname])
call pargr (apstatr (ap, OSXCUR))
call pargr (apstatr (ap, OSYCUR))
call pargr (apstatr (ap, SKY_MODE))
call pargr (apstatr (ap, SKY_SIGMA))
call printf ("%8g %5d %5d %s\n")
call pargr (apstatr (ap, SKY_SKEW))
call pargi (apstati (ap, NSKY))
call pargi (apstati (ap, NSKY_REJECT))
if (ier != AP_OK)
call pargstr ("err")
else
call pargstr ("ok")
call sfree (sp)
end
# AP_QASPSKY -- Procedure to print a quick summary of the fitsky task on the
# standard output.
procedure ap_qaspsky (ap, ier)
pointer ap # pointer to apphot structure
int ier # error code
int apstati()
real apstatr()
begin
# Print out the results on the standard output.
call printf ( " Averages %8g %8g ")
call pargr (apstatr (ap, SKY_MODE))
call pargr (apstatr (ap, SKY_SIGMA))
call printf ("%8g %5d %5d %s\n\n")
call pargr (apstatr (ap, SKY_SKEW))
call pargi (apstati (ap, NSKY))
call pargi (apstati (ap, NSKY_REJECT))
if (ier != AP_OK)
call pargstr ("err")
else
call pargstr ("ok")
end
# AP_SPHDR -- Procedure to write the banner for the fitsky task to the
# output file.
procedure ap_sphdr (ap, fd)
pointer ap # pointer to apphot structure
int fd # output file descriptor
begin
if (fd == NULL)
return
call ap_idhdr (ap, fd)
call ap_shdr (ap, fd)
end
|