Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stecf.org/conferences/adass/adassVII/fitzpatrickm.html
Дата изменения: Mon Jun 12 18:51:51 2006
Дата индексирования: Tue Oct 2 00:55:57 2012
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п п п
The IRAF Client Display Library (CDL)

Next: Recent Developments in Experimental AIPS
Up: Data Analysis Applications
Previous: The Future of Data Reduction at UKIRT
Table of Contents -- Index -- PS reprint -- PDF reprint


Astronomical Data Analysis Software and Systems VII
ASP Conference Series, Vol. 145, 1998
Editors: R. Albrecht, R. N. Hook and H. A. Bushouse

The IRAF Client Display Library (CDL)

Michael Fitzpatrick
IRAF Group[*], NOAO[*], PO Box 26732, Tucson, AZ 85726

 

Abstract:

The Client Display Library is a new interface that allows host (non-IRAF) C or FORTRAN programs to display images or draw into the graphics overlay using the XImtool image server and image viewers which emulate the XImtool client protocol such as SAOtng, SAOimage, and IPAC Skyview. The CDL provides most of the algorithms and functionality found in standard IRAF tasks such as DISPLAY and TVMARK, but provides these in library form for use in host level user programs, much as the IMFORT library provides access to IRAF images on disk. High-level procedures allow simple display of IRAF and FITS images, automatic image scaling, and a wide variety of graphics markers and scalable text. The IIS protocol used is easily replaced allowing the library to be ported for use with other display servers.

           

1. Introduction

For more than a decade IRAF has relied on the use of a display server as the primary means for image display. IRAF client tasks connect to the server and send or read data using a modified IIS[*] Model 70 protocol, originally via named fifo pipes but more recently using Unix domain or inet sockets. The advantage to this approach was that IRAF client tasks can make use of an image display without duplicating the code needed for actually displaying the image in each task. The longtime disadvantage however was that the IIS protocol used was arcane and undocumented, making the display server largely unavailable to applications or programmers outside of the IRAF project. Earlier attempts to solve this problem, such as the SAO-IIS library (Wright and Conrad, 1994), have shown there was a need in the community for such an interface but never managed to provide all the features and generality necessary to be widely used.

The CDL is meant to provide an easy-to-use, fully featured application interface which can be easily evolved for future display servers, communications schemes, or display functionality. It is independent of IRAF itself (as are the display servers) so client tasks can be written for any discipline or application. CDL client programs can connect to the server using named pipes (fifos), Unix domain sockets or inet (Internet TCP/IP) sockets. The default connection scheme is the same as with IRAF (domain sockets then fifos) but client programs can specify any connection desired. With the C interface it is possible to open multiple connections to one or more servers, allowing clients to display both locally and to a remote server which can be anywhere on the Internet.

2. Features

2.1. Image Display

2.2. Overlay Graphics

The CDL runs on all Unix platforms and is compatible with the XImtool, SAOimage, SAOtng and the IPAC Skyview display servers. The distribution includes all sources, full documentation and example tasks in both C and FORTRAN. An experimental SPP interface is available which lets IRAF developers (or occasional programmers) quickly prototype new applications without worrying about the details of image display. A ``Virtual XImtool" dummy display server is also available which can be used as a ``proxy server", taking input from one client and re-broadcasting it to a number of other servers, effectively creating a `tee' for display programs.


 
Figure 1: Example image demonstrating some available marker types and capabilities. Text in the lower corner was drawn using a filled box marker to erase the image pixels overlayed with text showing the use of in-line font changes and sub/superscript capability.
\begin{figure}
\epsscale{.7}
\plotone{fitzpatrickm1.eps}\end{figure}

3. Communications Interface

The CDL currently uses a modified IIS Model 70 protocol to communicate with IRAF display servers such as XImtool. This protocol is isolated from the rest of the library by a generic communications interface (providing I/O functions for the cursor, image rasters, WCS, frame configuration and erasure, etc) which can be rewritten to use a different protocol without affecting the rest of the library. Servers which provide much more functionality through the client interface can still be used with only small modifications needed to extend the CDL.


 
Figure 2: A demonstration of what can be done with image subraster I/O. The zoomed feature was created entirely by the client program which reads back the image pixels after display and writes out a zoomed subraster to another part of the frame buffer. Line and box markers are used to connect the endpoints of each region.
\begin{figure}
\epsscale{.6}
\plotone{fitzpatrickm2.eps}\end{figure}

4. Future Work

Image sizes are growing to the point of straining the modern machines used to do the reductions and have long since past the point where they can be displayed at full resolution on a typical monitor. The CDL, like most software, could benefit from some memory optimization to better handle these large images. New display servers are currently in development meaning the communications protocol will likely need to be extended if not changed entirely; we expect that the CDL will be made compatible with the new IRAF message bus architecture and the next generation display servers.

The graphics markers available provide all the primitives needed to to do graphics of any complexity however it is up to the client program to still create the overlay. For simply marking a few positions this is a straightforward task, but more powerful applications could be developed more easily by providing high-level routines for axis labeling or improving the speed required to draw many markers by doing the overlays in memory prior to display. Users with suggestions or questions are encouraged to contact the author at iraf@noao.edu.

5. Acknowledgments

CDL development was supported in part by the Open IRAF initiative, which is funded by a NASA ADP grant.

6. References

Wright, J. R. and Conrad, A. R., 1994, in Astronomical Data Analysis Software and Systems III, ASP Conf. Ser., Vol. 61, eds. D. R. Crabtree, R. J. Hanisch, & J. Barnes (San Francisco, ASP), 495



Footnotes

IRAF...
Image Reduction and Analysis Facility, distributed by the National Optical Astronomy Observatories
NOAO...
National Optical Astronomy Observatories, operated by the Association of Universities for Research in Astronomy, Inc. (AURA) under cooperative agreement with the National Science Foundation
IIS...
International Imaging Systems


© Copyright 1998 Astronomical Society of the Pacific, 390 Ashton Avenue, San Francisco, California 94112, USA


Next: Recent Developments in Experimental AIPS
Up: Data Analysis Applications
Previous: The Future of Data Reduction at UKIRT
Table of Contents -- Index -- PS reprint -- PDF reprint

payne@stsci.edu