aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/apphot/polyphot/apyinit.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /noao/digiphot/apphot/polyphot/apyinit.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'noao/digiphot/apphot/polyphot/apyinit.x')
-rw-r--r--noao/digiphot/apphot/polyphot/apyinit.x64
1 files changed, 64 insertions, 0 deletions
diff --git a/noao/digiphot/apphot/polyphot/apyinit.x b/noao/digiphot/apphot/polyphot/apyinit.x
new file mode 100644
index 00000000..6d9c2fe7
--- /dev/null
+++ b/noao/digiphot/apphot/polyphot/apyinit.x
@@ -0,0 +1,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