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/daoedit/dpeomark.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'noao/digiphot/daophot/daoedit/dpeomark.x')
-rw-r--r-- | noao/digiphot/daophot/daoedit/dpeomark.x | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/noao/digiphot/daophot/daoedit/dpeomark.x b/noao/digiphot/daophot/daoedit/dpeomark.x new file mode 100644 index 00000000..d635c31a --- /dev/null +++ b/noao/digiphot/daophot/daoedit/dpeomark.x @@ -0,0 +1,68 @@ +include <gset.h> + +# DP_EOMARK -- Procedure to mark center, fitsky and phot parameters on the +# display. + +procedure dp_eomark (id, xcenter, ycenter, srin, srout, apr, mkcenter, mksky, + mkapert) + +pointer id # pointer to image display stream +real xcenter # the center x coordinate +real ycenter # the center y coordinate +real srin # the inner radius of the sky annulus +real srout # the outer radius of the sky annulus +real apr # the maximum photometry aperture radius +int mkcenter # mark the computed center +int mksky # mark the sky annulus +int mkapert # mark the aperture(s) + +real rad +int marktype +int gstati() + +errchk greactivate, gdeactivate + +begin + if (id == NULL) + return + if (mkcenter == NO && mksky == NO && mkapert == NO) + return + iferr { + call greactivate (id, 0) + } then { + return + } + + # Save old mark type. + marktype = gstati (id, G_PMLTYPE) + + # Mark the center and shift on the display. + if (mkcenter == YES) { + call gseti (id, G_PMLTYPE, GL_SOLID) + call gmark (id, xcenter, xcenter, GM_PLUS, -2.0, -2.0) + } + + # Draw the sky annuli on the display. + if (mksky == YES) { + call gseti (id, G_PMLTYPE, GL_DASHED) + rad = 2.0 * srin + call gmark (id, xcenter, ycenter, GM_CIRCLE, -rad, -rad) + rad = 2.0 * srout + call gmark (id, xcenter, ycenter, GM_CIRCLE, -rad, -rad) + } + + # Draw the apertures on the display. + if (mkapert == YES) { + call gseti (id, G_PMLTYPE, GL_DASHED) + rad = 2.0 * apr + call gmark (id, xcenter, ycenter, GM_CIRCLE, -rad, -rad) + } + + # Restore the mark type. + call gseti (id, G_PMLTYPE, marktype) + + iferr { + call gdeactivate (id, 0) + } then + return +end |