As an example, we may use implot dev$pix, get help on
task's and global cursor commands, do a few operations, than quit.
Typing =gcur we are back in the graphic window.
Sometimes it is useful to redirect the output on the display window.
For instance, you overlay the isophotes of a galaxy from a broad-band image on
the narrow-band image; or you overlay a coordinate grid.
Example 1: Overplot coordinate grid (also task wcslab can be used)
cl> disconlab dev$wpix disp+ cont- label+ left=0.1
right=0.9 bot=0.1 top=0.9
Example 2: Overplot HST apertures (also task siaper could
be used)
cl> disconlab dev$wpix disp+ cont- label- doaper+ ra=13:27:45
dec=47:27:00 \
roll=0 left=0.1 right=0.9 bot=0.1 top=0.9
Example 3: Mark on the image display stars listed in a file (ex. output
from DAOFIND):
cl> tvmark 1 devpix.coo mark=circle radii=5 numb+
Note that sometimes the overplot may be bad, for instance the contours may apear offset with respect to the displayed image. There could be many reasons for this, for instance some parameters in disconlab as well as in the tasks called by it (wcslab, newcont, display) may not be set correctly, or the header of the image is not standard and IRAF gets confused and misinterprets the coordinate system.
Redirection of graphic output to image window can be done by setting
device=imdX,
with X=w/r/g/b/y:
w=white, r=red,
g=green, b=blue, y=yellow.
Ex. device=imdg overplot on image display in green.
It is not recommended to use this redirection with general graphics tasks, as
it is not fully supported (and probably there is no point to do that). It's
better to use only the specialized tasks for this purpose.
It is possible to force tasks that normally interact with the image display
to use the graphics window instead. This is done by setting:
cl> set stdimcur = stdgraph
which means: the interactive image cursor now operates on the graphics window.
Example: a user has done a contour plot of a image
cl> newcont dev$pix floor=40 ceiling=1000 ncont=10
per+ pres+
After setting stdimcur as said above, he can then
use imexamine to do some statistics on the image.
cl> imexam (use keystroke "m")
Though, if he uses an imexamine's keystroke which produces a graphic output,
he loses the contour plot (I do not know if there are workarounds).
I have no particular examples where this trick might be useful (I never used it).
The sgraph task provides a general purpose plotting capability, as it can be used to plot from lists, images and tables. We can control the characteristics of the graphic output via three psets: devpar, pltpar, axispar; parameters from these sets can also be placed on the command line.
Be careful with the dvpar.append parameter. It can be set to "yes" if you want to overplot new data over existing ones, but then do not forget to set it to "no" when you want to make a fresh new plot.
As an example, I mention a couple of situations where I found it useful:
1) Fit non-interactively gaussian profiles to spectral lines (ex. task fitprofs).
The overplot of the fitted profile on the
datapoints can be saved in a metacode file and examined later.
2) imexamine is used to plot the radial profile
of a list of objects. The profiles can be saved in a metacode file using the >G redirection
option.