aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/apphot/polyphot/appyerrors.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/polyphot/appyerrors.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/digiphot/apphot/polyphot/appyerrors.x')
-rw-r--r--noao/digiphot/apphot/polyphot/appyerrors.x35
1 files changed, 35 insertions, 0 deletions
diff --git a/noao/digiphot/apphot/polyphot/appyerrors.x b/noao/digiphot/apphot/polyphot/appyerrors.x
new file mode 100644
index 00000000..96a7bc93
--- /dev/null
+++ b/noao/digiphot/apphot/polyphot/appyerrors.x
@@ -0,0 +1,35 @@
+include "../lib/polyphot.h"
+
+# AP_PYERRORS -- Procedure to print out polyphot error messages when the
+# task is run in interactive mode.
+
+procedure ap_pyerrors (ap, cier, sier, pier)
+
+pointer ap # apphot structure
+int cier # centering error code
+int sier # sky fitting error code
+int pier # polyphot error code
+
+begin
+ # Print centering errors.
+ call ap_cerrors (ap, cier)
+
+ # Print sky fitting errors.
+ call ap_serrors (ap, sier)
+
+ # Print the polyphot errors.
+ switch (pier) {
+ case PY_NOPOLYGON:
+ call printf ("The polygon is undefined or too few vertices.\n")
+ case PY_OUTOFBOUNDS:
+ call printf ("The polygon is partially outside the image.\n")
+ case PY_NOPIX:
+ call printf ("The effective polygon area is 0.0.\n")
+ case PY_NOSKYMODE:
+ call printf ("The sky value is undefined.\n")
+ case PY_BADDATA:
+ call printf ("Bad pixels inside the polygon.\n")
+ default:
+ call printf ("")
+ }
+end