blob: 6bac460762b78125afdc7b034282ce63d8d1cc7a (
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
|
include "../lib/apphotdef.h"
include "../lib/fitpsfdef.h"
# APSFFREE -- Procedure to free the point spread fitting structure.
procedure apsffree (ap)
pointer ap # pointer to the apphot structure
begin
if (ap == NULL)
return
if (AP_NOISE(ap) != NULL)
call ap_noisecls (ap)
if (AP_PDISPLAY(ap) != NULL)
call ap_dispcls (ap)
if (AP_PPSF(ap) != NULL)
call ap_psfcls (ap)
if (AP_IMBUF(ap) != NULL)
call mfree (AP_IMBUF(ap), TY_REAL)
if (AP_MW(ap) != NULL)
call mw_close (AP_MW(ap))
call mfree (ap, TY_STRUCT)
end
# AP_PSFCLS -- Procedure to close up the point spread fitting function
# and arrays
procedure ap_psfcls (ap)
pointer ap # pointer to apphot structure
pointer psf
begin
if (AP_PPSF(ap) == NULL)
return
psf = AP_PPSF(ap)
#if (AP_PSFPIX(psf) != NULL)
#call mfree (AP_PSFPIX(psf), TY_REAL)
if (AP_PSFXPIX(psf) != NULL)
call mfree (AP_PSFXPIX(psf), TY_REAL)
if (AP_PSFYPIX(psf) != NULL)
call mfree (AP_PSFYPIX(psf), TY_REAL)
if (AP_PPARS(psf) != NULL)
call mfree (AP_PPARS(psf), TY_REAL)
if (AP_PPERRS(psf) != NULL)
call mfree (AP_PPERRS(psf), TY_REAL)
if (AP_PPSF(ap) != NULL)
call mfree (AP_PPSF(ap), TY_STRUCT)
end
|