diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /noao/digiphot/apphot/center/apcfree.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'noao/digiphot/apphot/center/apcfree.x')
-rw-r--r-- | noao/digiphot/apphot/center/apcfree.x | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/noao/digiphot/apphot/center/apcfree.x b/noao/digiphot/apphot/center/apcfree.x new file mode 100644 index 00000000..7fb219c7 --- /dev/null +++ b/noao/digiphot/apphot/center/apcfree.x @@ -0,0 +1,46 @@ +include "../lib/apphotdef.h" +include "../lib/centerdef.h" + +# APCFREE -- Procedure to free the centering data structure. + +procedure apcfree (ap) + +pointer ap # pointer to the apphot structure + +begin + if (ap == NULL) + return + if (AP_NOISE(ap) != NULL) + call ap_noisecls (ap) + if (AP_PCENTER(ap) != NULL) + call ap_ctrcls (ap) + if (AP_PDISPLAY(ap) != NULL) + call ap_dispcls (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_CTRCLS -- Procedure to close up the centering structure arrays. + +procedure ap_ctrcls (ap) + +pointer ap # pointer to apphot structure + +pointer ctr + +begin + ctr = AP_PCENTER(ap) + if (ctr == NULL) + return + if (AP_CTRPIX(ctr) != NULL) + call mfree (AP_CTRPIX(ctr), TY_REAL) + if (AP_XCTRPIX(ctr) != NULL) + call mfree (AP_XCTRPIX(ctr), TY_REAL) + if (AP_YCTRPIX(ctr) != NULL) + call mfree (AP_YCTRPIX(ctr), TY_REAL) + call mfree (AP_PCENTER(ap), TY_STRUCT) +end |