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/daophot/daolib/dpairmass.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'noao/digiphot/daophot/daolib/dpairmass.x')
-rw-r--r-- | noao/digiphot/daophot/daolib/dpairmass.x | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/noao/digiphot/daophot/daolib/dpairmass.x b/noao/digiphot/daophot/daolib/dpairmass.x new file mode 100644 index 00000000..bad13607 --- /dev/null +++ b/noao/digiphot/daophot/daolib/dpairmass.x @@ -0,0 +1,42 @@ +include <imhdr.h> +include "../lib/daophotdef.h" + +# DP_AIRMASS -- Set the image airmass. + +procedure dp_airmass (im, dao) + +pointer im # pointer to IRAF image +pointer dao # pointer to the daophot structure + +pointer sp, key +real xair +real imgetr(), dp_statr() + +begin + # Get the airmass keyword. + call smark (sp) + call salloc (key, SZ_FNAME, TY_CHAR) + call dp_stats (dao, AIRMASS, Memc[key], SZ_FNAME) + + # Get the value. + if (Memc[key] == EOS) + xair = dp_statr (dao, XAIRMASS) + else { + iferr { + xair = imgetr (im, Memc[key]) + } then { + xair = dp_statr (dao, XAIRMASS) + call eprintf ("Warning: Image %s Keyword: %s not found\n") + call pargstr (IM_HDRFILE(im)) + call pargstr (Memc[key]) + } + } + + # Store the value. + if (IS_INDEFR(xair) || xair <= 0.0) + call dp_setr (dao, XAIRMASS, INDEFR) + else + call dp_setr (dao, XAIRMASS, xair) + + call sfree (sp) +end |