diff options
Diffstat (limited to 'noao/digiphot/apphot/phot/apperrors.x')
-rw-r--r-- | noao/digiphot/apphot/phot/apperrors.x | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/noao/digiphot/apphot/phot/apperrors.x b/noao/digiphot/apphot/phot/apperrors.x new file mode 100644 index 00000000..ff67e3ee --- /dev/null +++ b/noao/digiphot/apphot/phot/apperrors.x @@ -0,0 +1,48 @@ +include "../lib/phot.h" + +# AP_PERRORS -- Print the photometry task errors. + +procedure ap_perrors (ap, cier, sier, pier) + +pointer ap # apphot structure +int cier # centering error code +int sier # sky fitting error code +int pier # photometry error code + +begin + # Print the centering error message. + call ap_cerrors (ap, cier) + + # Print the sky fitting error message. + call ap_serrors (ap, sier) + + # Print the photometry error message. + call ap_merrors (ap, pier) + +end + + +# AP_MERRORS -- Print the photometry errors. + +procedure ap_merrors (ap, pier) + +pointer ap # pointer to the apphot structure (unused) +int pier # photometry error + +begin + # Print the photometry error message. + switch (pier) { + case AP_APERT_NOAPERT: + call printf ("Photometry apertures are outside of the image.\n") + case AP_APERT_OUTOFBOUNDS: + call printf ("Photometry apertures are partially outside the image.\n") + case AP_APERT_NOSKYMODE: + call printf ("The sky value is undefined.\n") + case AP_APERT_NEGMAG: + call printf ("The total flux inside the aperture is negative.\n") + case AP_APERT_BADDATA: + call printf ("Bad data in the aperture(s).\n") + default: + call printf ("") + } +end |