aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/apphot/fitpsf/apppfpars.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/fitpsf/apppfpars.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/digiphot/apphot/fitpsf/apppfpars.x')
-rw-r--r--noao/digiphot/apphot/fitpsf/apppfpars.x34
1 files changed, 34 insertions, 0 deletions
diff --git a/noao/digiphot/apphot/fitpsf/apppfpars.x b/noao/digiphot/apphot/fitpsf/apppfpars.x
new file mode 100644
index 00000000..58f40bcf
--- /dev/null
+++ b/noao/digiphot/apphot/fitpsf/apppfpars.x
@@ -0,0 +1,34 @@
+include "../lib/fitpsf.h"
+include "../lib/display.h"
+
+# AP_PPFPARS -- Procedure to write the fitpsf parameters to a parameter file.
+
+procedure ap_ppfpars (ap)
+
+pointer ap # pointer to apphot structure
+
+pointer sp, str
+bool itob()
+int apstati()
+real apstatr()
+
+begin
+ # Initialize and open psets.
+ call smark (sp)
+ call salloc (str, SZ_LINE, TY_CHAR)
+
+ # Store the psf fitting parameters.
+ call clputr ("box", 2.0 * apstatr (ap, PSFAPERT))
+ call apstats (ap, PSFSTRING, Memc[str], SZ_FNAME)
+ call clpstr ("function", Memc[str])
+ call clputi ("maxiter", apstati (ap, PMAXITER))
+ call clputr ("kreject", apstatr (ap, PK2))
+ call clputi ("nreject", apstati (ap, PNREJECT))
+ call clputb ("mkbox", itob (apstati (ap, MKPSFBOX)))
+
+ # Store the data dependent parameters.
+ call ap_dapars (ap)
+
+ # Closeup.
+ call sfree (sp)
+end