diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /noao/digiphot/apphot/aplib/apairmass.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'noao/digiphot/apphot/aplib/apairmass.x')
-rw-r--r-- | noao/digiphot/apphot/aplib/apairmass.x | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/noao/digiphot/apphot/aplib/apairmass.x b/noao/digiphot/apphot/aplib/apairmass.x new file mode 100644 index 00000000..3dcb9cdf --- /dev/null +++ b/noao/digiphot/apphot/aplib/apairmass.x @@ -0,0 +1,36 @@ +include <imhdr.h> +include "../lib/apphot.h" + +# AP_AIRMASS - Procedure to determine the image airmass. + +procedure ap_airmass (im, ap) + +pointer im # pointer to IRAF image +pointer ap # pointer to apphot structure + +pointer sp, key +real xair +real imgetr(), apstatr() + +begin + call smark (sp) + call salloc (key, SZ_FNAME, TY_CHAR) + call apstats (ap, AIRMASS, Memc[key], SZ_FNAME) + if (Memc[key] == EOS) + xair = apstatr (ap, XAIRMASS) + else { + iferr { + xair = imgetr (im, Memc[key]) + } then { + xair = apstatr (ap, XAIRMASS) + call eprintf ("Warning: Image %s Keyword: %s not found\n") + call pargstr (IM_HDRFILE(im)) + call pargstr (Memc[key]) + } + } + if (IS_INDEFR(xair) || xair <= 0.0) + call apsetr (ap, XAIRMASS, INDEFR) + else + call apsetr (ap, XAIRMASS, xair) + call sfree (sp) +end |