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
|
include "../lib/apphotdef.h"
include "../lib/polyphotdef.h"
# AP_YINIT - Initialize the polyphot structure.
procedure ap_yinit (ap, cfunction, cbox, sfunction, annulus, dannulus, fwhmpsf,
noise)
pointer ap # pointer to the apphot structure
int cfunction # centering algorithm
real cbox # centering box half-width
int sfunction # sky fitting algorithm
real annulus # inner radius of sky annulus
real dannulus # width of sky annulus
real fwhmpsf # fwhmpsf
int noise # Noise function
begin
call malloc (ap, LEN_APSTRUCT, TY_STRUCT)
# Set the global apphot package parameters.
call ap_defsetup (ap, fwhmpsf)
# Setup noise parameters.
call ap_noisesetup (ap, noise)
# Set display options.
call ap_dispsetup (ap)
# Setup the centering parameters.
call ap_ctrsetup (ap, cfunction, cbox)
# Set up the sky fitting parameters.
call ap_skysetup (ap, sfunction, annulus, dannulus)
# Setup the polyphot parameters.
call ap_ysetup (ap)
# Set unused structure pointers to null.
AP_PPSF(ap) = NULL
AP_PPHOT(ap) = NULL
AP_RPROF(ap) = NULL
end
# AP_YSETUP -- Procedure to set parameters for polygonal aperture photometry.
procedure ap_ysetup (ap)
pointer ap # pointer to apphot strucuture
pointer ply
begin
call malloc (AP_POLY(ap), LEN_PYSTRUCT, TY_STRUCT)
ply = AP_POLY(ap)
AP_PYCX(ply) = INDEFR
AP_PYCY(ply) = INDEFR
AP_PYX(ply) = INDEFR
AP_PYY(ply) = INDEFR
AP_PYZMAG(ply) = DEF_PYZMAG
AP_PYNAME(ply) = EOS
AP_PYROOT(ply) = EOS
end
|