aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/apphot/aplib/apwparam2.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /noao/digiphot/apphot/aplib/apwparam2.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/digiphot/apphot/aplib/apwparam2.x')
-rw-r--r--noao/digiphot/apphot/aplib/apwparam2.x104
1 files changed, 104 insertions, 0 deletions
diff --git a/noao/digiphot/apphot/aplib/apwparam2.x b/noao/digiphot/apphot/aplib/apwparam2.x
new file mode 100644
index 00000000..1c15f26c
--- /dev/null
+++ b/noao/digiphot/apphot/aplib/apwparam2.x
@@ -0,0 +1,104 @@
+include "../lib/apphotdef.h"
+include "../lib/polyphot.h"
+include "../lib/fitpsf.h"
+include "../lib/radprof.h"
+
+
+# AP_WPROFS -- Procedure to print out the profile fitting parameters.
+
+procedure ap_wprofs (ap, out)
+
+pointer ap # apphot structure pointer
+int out # output file descriptor
+
+pointer sp, str
+int apstati()
+real apstatr()
+
+begin
+ if (out == NULL)
+ return
+
+ call smark (sp)
+ call salloc (str, SZ_FNAME, TY_CHAR)
+
+ if (AP_RPROF(ap) != NULL) {
+ call ap_rparam (out, KY_RPRADIUS, apstatr (ap, RPRADIUS),
+ UN_RSCALEUNIT, "fitting radius")
+ call ap_rparam (out, KY_RPSTEP, apstatr (ap, RPSTEP),
+ UN_RSCALEUNIT, "step size in radius")
+ call ap_iparam (out, KY_RPORDER, apstati (ap, RPORDER), UN_RNUMBER,
+ "number of splines pieces")
+ call ap_rparam (out, KY_RPKSIGMA, apstatr (ap, RPKSIGMA),
+ UN_RSIGMA, "k-sigma rejection criterion")
+ call ap_iparam (out, KY_RPNREJECT, apstati (ap, RPNREJECT),
+ UN_RNUMBER, "maximum number of rejection cycles")
+ call fprintf (out, "#\n")
+ }
+
+ call sfree (sp)
+end
+
+
+# AP_WPOLY -- Procedure to write out the polyphot parameters.
+
+procedure ap_wpoly (ap, out)
+
+pointer ap # apphot structure pointer
+int out # output file descriptor
+
+pointer sp, str
+real apstatr()
+
+begin
+ if (out == NULL)
+ return
+
+ call smark (sp)
+ call salloc (str, SZ_FNAME, TY_CHAR)
+
+ if (AP_POLY(ap) != NULL) {
+ call ap_sparam (out, "WEIGHTING", "constant", "model", "")
+ call ap_rparam (out, KY_PYZMAG, apstatr (ap, PYZMAG), UN_PYZMAG,
+ "zero point of magnitdue scale")
+ call fprintf (out, "#\n")
+ }
+
+ call sfree (sp)
+end
+
+
+# AP_WPSF -- Procedure to write the psf fitting parameters .
+
+procedure ap_wpsf (ap, out)
+
+pointer ap # apphot strucuture pointer
+int out # output file descriptor
+
+pointer sp, str
+int apstati()
+real apstatr()
+
+begin
+ if (out == NULL)
+ return
+ call smark (sp)
+ call salloc (str, SZ_FNAME, TY_CHAR)
+
+ if (AP_PPSF(ap) != NULL) {
+ call apstats (ap, PSFSTRING, Memc[str], SZ_FNAME)
+ call ap_sparam (out, KY_PSFUNCTION, Memc[str], UN_PSFMODEL,
+ "fitting function")
+ call ap_rparam (out, KY_PSFAPERT, 2.0 * apstatr (ap, PSFAPERT),
+ UN_PSFSCALEUNIT, "width of the fitting box")
+ call ap_iparam (out, KY_PMAXITER, apstati (ap, PMAXITER),
+ UN_PSFSCALEUNIT, "maximum number of iterations")
+ call ap_rparam (out, KY_PK2, apstatr (ap, PK2), UN_PSFSIGMA,
+ "k-sigma rejection limit for the fit")
+ call ap_iparam (out, KY_PNREJECT, apstati (ap, PNREJECT),
+ UN_PSFNUMBER, "maximum number of rejection cycles")
+ call fprintf (out, "#\n")
+ }
+
+ call sfree (sp)
+end