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/dpimkeys.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'noao/digiphot/daophot/daolib/dpimkeys.x')
-rw-r--r-- | noao/digiphot/daophot/daolib/dpimkeys.x | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/noao/digiphot/daophot/daolib/dpimkeys.x b/noao/digiphot/daophot/daolib/dpimkeys.x new file mode 100644 index 00000000..9cfd1943 --- /dev/null +++ b/noao/digiphot/daophot/daolib/dpimkeys.x @@ -0,0 +1,71 @@ +include "../lib/daophotdef.h" + +# DP_IMKEYS - Set the image name and keyword parameters after an image +# is mapped. + +procedure dp_imkeys (dp, im) + +pointer dp # pointer to the daophot structure +pointer im # the image descriptor + +pointer mw, ct +int dp_stati() +pointer mw_openim(), mw_sctran() +errchk mw_openim(), mw_sctran() + +begin + # Set the wcs descriptors. + mw = dp_stati (dp, MW) + if (mw != NULL) + call mw_close (mw) + iferr { + mw = mw_openim (im) + } then { + call dp_seti (dp, MW, NULL) + call dp_seti (dp, CTIN, NULL) + call dp_seti (dp, CTOUT, NULL) + call dp_seti (dp, CTPSF, NULL) + } else { + call dp_seti (dp, MW, mw) + switch (dp_stati (dp, WCSIN)) { + case WCS_WORLD: + iferr (ct = mw_sctran (mw, "world", "logical", 03B)) + ct = NULL + case WCS_PHYSICAL: + iferr (ct = mw_sctran (mw, "physical", "logical", 03B)) + ct = NULL + case WCS_TV, WCS_LOGICAL: + ct = NULL + default: + ct = NULL + } + call dp_seti (dp, CTIN, ct) + switch (dp_stati (dp, WCSOUT)) { + case WCS_PHYSICAL: + iferr (ct = mw_sctran (mw, "logical", "physical", 03B)) + ct = NULL + case WCS_TV, WCS_LOGICAL: + ct = NULL + default: + ct = NULL + } + call dp_seti (dp, CTOUT, ct) + switch (dp_stati (dp, WCSPSF)) { + case WCS_PHYSICAL: + iferr (ct = mw_sctran (mw, "logical", "physical", 03B)) + ct = NULL + case WCS_TV, WCS_LOGICAL: + ct = NULL + default: + ct = NULL + } + call dp_seti (dp, CTPSF, ct) + } + + # Get the proper values from the image header if an image is defined. + call dp_padu (im, dp) + call dp_rdnoise (im, dp) + call dp_filter (im, dp) + call dp_airmass (im, dp) + call dp_otime (im, dp) +end |