aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/apphot/polyphot/appyerrors.x
blob: 96a7bc93a4d4005f40828b6dc2a7083363691630 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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