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
|
include "../lib/display.h"
include "../lib/noise.h"
include "../lib/fitpsf.h"
# AP_GPFPARS -- Procedure to fetch the fitpsf parameters.
procedure ap_gpfpars (ap)
pointer ap # pointer to the apphot structure
int function
pointer sp, str
bool clgetb()
int clgeti(), btoi(), clgwrd()
real clgetr()
begin
call smark (sp)
call salloc (str, SZ_LINE, TY_CHAR)
# Open the apphot structure.
call apsfinit (ap, AP_RADGAUSS, 3.5, 2.0, AP_NPOISSON)
call apsetr (ap, PSFAPERT, clgetr ("box") / 2.0)
# Get the data dependent parameters.
call ap_gdapars (ap)
# Get the rest of the FITPSF fitting parameters.
function = clgwrd ("function", Memc[str], SZ_LINE, PSFFUNCS)
call apsets (ap, PSFSTRING, Memc[str])
call apseti (ap, PSFUNCTION, function)
call apseti (ap, PMAXITER, clgeti ("maxiter"))
call apseti (ap, PNREJECT, clgeti ("nreject"))
call apsetr (ap, PK2, clgetr ("kreject"))
# Get the plotting parameters.
call apseti (ap, MKPSFBOX, btoi (clgetb ("mkbox")))
call sfree (sp)
end
|