aboutsummaryrefslogtreecommitdiff
path: root/noao/digiphot/daophot/psf/dpplotpsf.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /noao/digiphot/daophot/psf/dpplotpsf.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/digiphot/daophot/psf/dpplotpsf.x')
-rw-r--r--noao/digiphot/daophot/psf/dpplotpsf.x49
1 files changed, 49 insertions, 0 deletions
diff --git a/noao/digiphot/daophot/psf/dpplotpsf.x b/noao/digiphot/daophot/psf/dpplotpsf.x
new file mode 100644
index 00000000..4b80c50f
--- /dev/null
+++ b/noao/digiphot/daophot/psf/dpplotpsf.x
@@ -0,0 +1,49 @@
+include "../lib/daophotdef.h"
+include "../lib/psfdef.h"
+
+# DP_PLOTPSF -- Plot the psf using the default plot type.
+
+procedure dp_plotpsf (dao, im, subrast, ncols, nlines, x1, y1, gd)
+
+pointer dao # pointer to the daophot structure
+pointer im # the input image descriptor
+real subrast[ncols,nlines] # image subraster
+int ncols, nlines # dimensions of the subraster
+int x1, y1 # coordinates of the lower left corner
+pointer gd # pointer to the graphics stream
+
+real tx, ty
+pointer sp, title
+real dp_pstatr()
+int dp_pstati()
+
+begin
+ # Return if the graphics stream is undefined.
+ if (gd == NULL)
+ return
+
+ # Comvert the coordinates if necessary.
+ call dp_wout (dao, im, dp_pstatr(dao, CUR_PSFX), dp_pstatr(dao,
+ CUR_PSFY), tx, ty, 1)
+
+ # Construct the title.
+ call smark (sp)
+ call salloc (title, SZ_LINE, TY_CHAR)
+ call sprintf (Memc[title], SZ_LINE, "Star: %d X: %g Y: %g Mag: %g")
+ call pargi (dp_pstati (dao, CUR_PSFID))
+ call pargr (tx)
+ call pargr (ty)
+ call pargr (dp_pstatr (dao, CUR_PSFMAG))
+
+ # Initialize plot.
+ if (dp_pstati (dao, PLOTTYPE) == PSF_MESHPLOT)
+ call dp_surfpsf (dao, subrast, ncols, nlines, Memc[title], gd)
+ else if (dp_pstati (dao, PLOTTYPE) == PSF_CONTOURPLOT)
+ call dp_contpsf (dao, subrast, ncols, nlines, Memc[title], gd)
+ else if (dp_pstati (dao, PLOTTYPE) == PSF_RADIALPLOT)
+ call dp_radpsf (dao, subrast, ncols, nlines, x1, y1,
+ Memc[title], gd)
+
+ call gdeactivate (gd, 0)
+ call sfree (sp)
+end