Multiple Ximtools from one IRAF session
Mike Fitzpatrick wrote on Dec 15, 1998
> I have a professor that wishes to be able to display independent images on
> multiple instances of ximtool. At the moment, everyone on the machine he
> is using uses the following ximtool command:
>
> ximtool -unix_only -nframes 4
>
> I have read the FAQ on the matter and discussed it with the professor. He
> is convinced that he really does want to have multiple ximtools controlled
> from one iraf. Could you enlighten me as to how one would do this?
The only way to control multiple ximtools from the same IRAF
session is to create a private graphcap file that specifies different
stdimage devices that use different connections, and then constantly
switch between the stdimage names while displaying. For example, suppose
we start two ximtools listening on inet ports 5137 and 5138 using
% ximtool -inet_only -port 5137 &
% ximtool -inet_only -port 5138 &
Next make a local copy of the iraf dev$graphcap file and create an entries
something like
imt1a|imt512a|imtool|Imtool display server:\
:cn#1:LC:BS@:z0#1:zr#200:DD=node!imtool,inet\:5137,512,512:tc=iism70:
imt1b|imt512b|imtool|Imtool display server:\
:cn#1:LC:BS@:z0#1:zr#200:DD=node!imtool,inet\:5138,512,512:tc=iism70:
These are just copies of the imt512 entry called 'imt1a' and 'imt1b', each
entry specifies a different connection to different inet sockets. Note the
'\' is required because ':' is normally the delimiter for the graphcap, the
syntax 'inet:5137' says to use inet socket 5137, something similar could be
done for unix sockets or fifos.
Once you log into the CL you'd
cl> reset graphcap = home$mygraphcap ; gflush
so that you use the private version. The gflush is required in order to
read in the changes. Next to display to each ximtool separately you'd
cl> reset stdimage = imt1a
cl> display dev$pix 1 # displays to inet 5137
cl> reset stdimage = imt1b
cl> display dev$pix 1 # displays to inet 5138
and similarly reset stdimage each time you want to change the ximtool
being used. Note that if the purpose of this is to display the *same*
image to two different ximtools (e.g. one in your office and one in a lab
somewhere for the engineers to look at), the a better solution would be to
use the VXIMTOOL dummy server distributed with the CDL package which can
act as a 'tee' for image display. Contact site support if you have
questions about using this approach.
-Mike
Last post on Dec 15, 1998