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
|
include "../lib/apphot.h"
include "../lib/center.h"
# AP_PCENTER -- Procedure to write the output of centering task to a file.
procedure ap_pcenter (ap, fd, id, lid, ier)
pointer ap # pointer to apphot structure
int fd # output file descriptor
int id # id of the star
int lid # list number
int ier # comment string
real xpos, ypos
real apstatr()
begin
if (fd == NULL)
return
# Print description of object.
xpos = apstatr (ap, OXINIT)
ypos = apstatr (ap, OYINIT)
call ap_wid (ap, fd, xpos, ypos, id, lid, '\\')
# Print the computed centers.
call ap_wcres (ap, fd, ier, ' ')
end
# AP_QCENTER -- Procedure to print a quick summary of the center task output
# on the standard output.
procedure ap_qcenter (ap, ier)
pointer ap # pointer to apphot structure
int ier # comment string
real owx, owy, wx, wy
pointer sp, imname
real apstatr()
begin
call smark (sp)
call salloc (imname, SZ_FNAME, TY_CHAR)
owx = apstatr (ap, OXINIT)
owy = apstatr (ap, OYINIT)
wx = apstatr (ap, OXCENTER)
wy = apstatr (ap, OYCENTER)
call apstats (ap, IMROOT, Memc[imname], SZ_FNAME)
call printf ( "%s %7.2f %7.2f %7.2f %7.2f ")
call pargstr (Memc[imname])
call pargr (owx)
call pargr (owy)
call pargr (wx)
call pargr (wy)
call printf ("%6.2f %6.2f %s\n")
call pargr (apstatr (ap, XERR))
call pargr (apstatr (ap, YERR))
if (ier != AP_OK)
call pargstr ("err")
else
call pargstr ("ok")
call sfree (sp)
end
# AP_CPHDR -- Procedure to write the banner for the center task to the
# output file.
procedure ap_cphdr (ap, fd)
pointer ap # apphot descriptor
int fd # output file descriptor
begin
if (fd == NULL)
return
call ap_idhdr (ap, fd)
call ap_chdr (ap, fd)
end
|