| Home | Trees | Indices | Help |
|
|---|
|
|
irafdisplay.py: Interact with IRAF-compatible image display
Modeled after the NOAO Client Display Library (CDL)
Public functions:
readCursor(sample=0)
Read image cursor position
open(imtdev=None)
Open a connection to the display server. This is called
automatically by readCursor if the display has not already been
opened, so it is not generally necessary for users to call it.
See the open doc string for info on the imtdev argument, which
allows various forms of socket and network connections.
close()
Close the active display server. Called automatically on exit.
Various classes are defined for the different connections (ImageDisplay,
ImageDisplayProxy, UnixImageDisplay, InetImageDisplay, FifoImageDisplay).
They should generally be created using the _open factory function.
This could be used to maintain references to multiple display servers.
Ultimately more functionality may be added to make this a complete
replacement for CDL.
$Id: irafdisplay.py 1463 2011-06-24 22:58:30Z stsci_embray $
|
|||
|
ImageDisplay Interface to IRAF-compatible image display |
|||
|
FifoImageDisplay FIFO version of image display |
|||
|
UnixImageDisplay Unix socket version of image display |
|||
|
InetImageDisplay INET socket version of image display |
|||
|
ImageDisplayProxy Interface to IRAF-compatible image display |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_default_imtdev =
|
|||
_display = ImageDisplayProxy()
|
|||
__package__ =
|
|||
Imports: os, numpy, socket, sys, irafutils, fcntl, FCNTL
|
|||
Open connection to the image display server
This is a factory function that returns an instance of the ImageDisplay
class for the specified imtdev. The default connection if no imtdev is
specified is given in the environment variable IMTDEV (if defined) or
is "unix:/tmp/.IMT%d". Failing that, a connection is attempted on the
/dev/imt1[io] named fifo pipes.
The syntax for the imtdev argument is <domain>:<address> where <domain>
is one of "inet" (internet tcp/ip socket), "unix" (unix domain socket)
or "fifo" (named pipe). The form of the address depends upon the
domain, as illustrated in the examples below.
inet:5137 Server connection to port 5137 on the local
host. For a client, a connection to the
given port on the local host.
inet:5137:foo.bar.edu Client connection to port 5137 on internet
host foo.bar.edu. The dotted form of address
may also be used.
unix:/tmp/.IMT212 Unix domain socket with the given pathname
IPC method, local host only.
fifo:/dev/imt1i:/dev/imt1o FIFO or named pipe with the given pathname.
IPC method, local host only. Two pathnames
are required, one for input and one for
output, since FIFOs are not bidirectional.
For a client the first fifo listed will be
the client's input fifo; for a server the
first fifo will be the server's output fifo.
This allows the same address to be used for
both the client and the server, as for the
other domains.
The address field may contain one or more "%d" fields. If present, the
user's UID will be substituted (e.g. "unix:/tmp/.IMT%d").
|
Read image cursor value for the active image display Return immediately if sample is true, or wait for keystroke if sample is false (default). Returns a string with x, y, frame, and key. Opens image display if necessary. |
|
|||
_default_imtdev
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Aug 22 14:37:08 2011 | http://epydoc.sourceforge.net |