Download An Introductory User's Guide to IRAF Scripts

Transcript
- 44 -
cl> head @inlist nlines=1 >& inlist.err > inlist.head
This will, in general, create two files: inlist.err, containing warning messages for those
files, listed in inlist, that do not exist, and inlist.head, containing a labeled listing of the
first lines of each of the files that do exist. Note that this scheme will also work with the
append type of redirection (>>& and >>), but will not work if either or both of the
redirections is replaced by a pipe. It is possible to pipe the STDERR together with the
STDOUT (|&), but it is not possible to pipe the STDERR by itself.
Networking
This is a big topic that affects everything that you do with IRAF. We will only mention
in passing that a task statement can point to a file on a different machine. The following
command can be issued from any machine that has access to the node orion; IRAF networking will be used to read the script when the task is executed:
task center = orion!/u2/seaman/test/center.cl
Declaring your script tasks (compiled tasks will also work, but the machine architecture
and the network bandwidth place constraints on this) in this way allows you to maintain
just a single copy of your scripts on the network. Note that the node name is unnecessary
if the scripts are kept on a disk that is accessible with host level networking from the various nodes.
The example script in Appendix III addresses the problem of network access of pixel files
that were created on other nodes that share the same fileserver. Some other facilities that
are also useful for this and for more general networking concerns:
d
Nodes that share an identical set of mounted disks (typically a file-server and its
diskless workstations) can be aliased in the file, dev$hosts. This must be done by
your IRAF system manager.
d
The special node name, 0 (zero), refers to the local node, no matter what machine
you are using. By specifying your imdir with ‘0!’ prepended, all pixel file access
will be treated locally by IRAF.
d
Just as your scripts can reside on a remote node, so may your pixel files. This
"remote" node can be the fileserver, forcing IRAF networking to be used.
d
Node names can be aliased in a user’s environment. If pyxis and phoenix share the
same fileserver, typing:
set pyxis = phoenix
set phoenix = pyxis
d
-
on phoenix, or
on pyxis
will allow transparent access to images that were created on the other node. Do not
redefine the current node!
Lastly, the HDR$ syntax can be used to cause your pixel files to be placed within
the current directory or a subdirectory of the current directory:
set imdir = HDR$pixels/
This will cause the pixel files that are created to be placed in the subdirectory pixels
of the directory that contains the image headers. The directory, pixels, will be
created if needed. The trailing slash (/) must be included in the declaration!
All of these capabilities should be used with caution: the more complicated the scheme
you use, the more likely you are to misplace your files.
September 22, 1989