The Groningen Image Processing SYstem GIPSY

An updated version of the original paper by J.M. van der Hulst et al.

(update by M. Vogelaar)
Kapteyn Astronomical Institute,
Postbus 800, 9700 AV Groningen, The Netherlands


This paper describes the Groningen Image Processing System which was built during the late seventies based on earlier systems developed in Groningen since 1971 and which has been redesigned to run on a variety of Unix architectures. The general design philosophy, data structure and user interfaces are described in detail and a brief overview of the wide range of applications is provided.


With the advent of synthesis radio telescopes in the early seventies a need for interactive image processing arose. At the Kapteyn Institute this led to the development of such an interactive software package: GIPSY, the Groningen Image Processing SYstem (Allen et al. 1985). Over the years GIPSY has been built up further and a wide variety of new applications has been added by many staff members and Ph.D. students at the Institute who designed software in GIPSY to suit their own needs.
At present GIPSY is particularly suited for the processing and analysis of spectral line synthesis data and Infrared data from the IRAS satellite. Especially the spectral line analysis has received great attention, motivated by the extragalactic HI line work at the Kapteyn Institute. As a result GIPSY has spectral line analysis capabilities which are quite unique and have not yet been implemented in other image processing packages. The importance of visualization of truly three dimensional data sets was recognized early on and has been implemented in several ways.
The developments in computer hardware, in particular the quick spreading of Unix workstations combining a graphical environment with fast (and affordable) CPU capabilities have led to a major port and code overhaul of GIPSY since begin '90. Although all of the principal functionality has been kept, many new features were implemented and this paper will describe the system as it runs now under Unix and the X-Windows environment. An additional advantage of the new implementation is its portability as the system does no longer depend on particular hardware for its display functions.
In this paper we will describe the general design philosophy, the data structure, the user interface and display software, and give a short summary of application software present in GIPSY.

General Design Considerations

The main objectives for the design of the second generation GIPSY were to maintain the original ease of adding application programs, to have a flexible, self descriptive, multidimensional data structure, to make use of the de facto standard X11 environment for graphics and image display and to code the system in ANSI C and the applications in either ANSI C, standard FORTRAN 77 or COLA (COntrol LAnguage for use with Hermes)
The growth of GIPSY through the years into a versatile image processing package with a variety of applications, in particular in the area of spectral line analysis has been possible because of its friendly and simple environment for programming. Therefore many astronomers have contributed to the system, adding applications which fulfilled both their own and general needs. A very crucial ingredient for the ease of programming has been the modular structure of the system and the use of interfaces which shield the application programs from other parts of the system such as the data, and which provide simple tools for communication with the user and communication with other tasks. This very important aspect of the system has been kept in the new design, because the possibility for astronomers and students to contribute to the system with ease is considered crucial.
The main design requirement for the data structure is the capability to handle multi-dimensional data. In addition the data-structure must be self descriptive and support a large variety of coordinate systems. The latter becomes increasingly important as astronomers use and combine data from different telescopes in different spectral domains. Few software systems existing at present support the large variety of coordinate systems used in astronomy.
The increasing use of workstations dictates the requirement that the user should be able to make use of the workstation hardware to view his data. This requirement then implies the use of X11 for image and graphics display, as X11 has become the standard graphics environment on workstations of all vendors.

Data Structure

The GIPSY data structure (GDS) is a multi-dimensional crystalline structure with the possibility of describing the data at all levels. For the description of data structures GDS makes use of FITS type keywords. Examples of three dimensional data cubes are: images at a range of frequencies (wavelengths) resulting from a spectral line synthesis observation or a processed Fabry-Perot interferometer observation. In this case the three axes are Right Ascension, Declination and frequency (wavelength) or velocity. Such a data-cube can be described at four levels: (i) the top level (here we store information about e.g. the pointing direction and central velocity, the three dimensional gridsize, book keeping information describing the observation); (ii) the intermediate two dimensional levels (here we could store e.g. the velocity of each individual image in the data cube, information about whether a plane has been processed (image reconstruction, continuum subtraction, flat fielding etc.); (iii) the column and/or row level and (iv) the pixel level. It will be clear that describing the data at the top level is most advantageous and gives the least overhead.
The aspects described above appear to be quite unique to GDS and make it suitable for storing many different kinds of data. It will be clear that storing image data in a multi-dimensional data structure such as GDS is relatively straightforward. GDS is, however, flexible enough to store more complicated data such as sections of scans from the IRAS satellite covering a certain area of sky, including the time stamps and calibration information.
The interface layer between GDS and the application programs has the necessary intelligence built in to address the data cube at all levels using simple subroutine calls. The interface can be requested to deliver a pixel, a one dimensional slice in any direction parallel to the primary axes, a two dimensional slice in any direction parallel to the primary axes, or a subcube, without having to worry which is the order in which the data is stored on disk as simple byte streams.

User Interface

As in the original design of GIPSY, all communication with the user is handled by a master control program Hermes , described in detail in Allen and Terlouw (1981). Its main functions are to shield the user from the operating system and to provide a standard environment for communication with the tasks in GIPSY. The main fuctionality of the original Hermes has been kept in the second generation GIPSY. This includes logging of the session in a file which can be inspected interactively, the use of a control language and the ability to construct macros, bookkeeping of inputs for tasks used in the processing including the possibility to rerun processes with the same parameters except for those specified explicitly, and program control using special escape sequences.
The present implementation of Hermes can run on any display terminal, including X11 terminal windows. The screen is divided onto three areas. The top area displays the log, which can be inspected page by page, including a character string search mode. A five line area below displays the status of the running tasks (at present this can be up to four simultaneous applications) and the current page of the log file. A two line area at the bottom is used for user input.
Hermes provides in addition a keyword sensitive help facility which can be activated at any time and uses an overlay screen. Once called one obtains information about the keyword for which input is asked. At this point one can also page through the whole document describing the task one is running. Exit from the help page brings the terminal back to the original log/status/input Hermes display.
A new Hermes exploiting the many nice features of the X11 environment is under development. A feature which will be developed in addition is remote tasking, e.g. the possibility to start up a GIPSY task on another processor. This capability for distributed procressing will be extremely useful in an environment where processors of different performance are networked together. One can do the simple operations on a small workstation and start heavy duty tasks on more powerful machines in the network without having to leave the GIPSY environment.

Display and Graphics

A special application has been developed for the display of images: GIDS, the GIPSY Image Display System. Up to 64 images can be loaded into GIDS, depending on the memory size of the workstation or X-terminal one is using. All display functions are contained within GIDS and are activated using pushbuttons activated by using a mouse as pointing device. GIDS makes use of standard X11 calls and is approaches from the application program level through a library of simple subroutine calls. The data transfer to (image loading) and from (cursor read out) GIDS is done via Unix or Internet sockets.
An important aspect of GIDS is that all display functions are integrated into the window, so that once an image or images are loaded one can control the display from within the GIDS window using the mouse. It is not necessary to type in display commands from the user input area of Hermes, other than the command for loading images.
The GIDS window appears default as a 512 x 512 display but can be resized. Seven fields at the top left give status information about which image plane is displayed, what the cursor position and pixel value at this position are and what the corresponding image name on disk is. The remaining fields at the left side of the image are push buttons to control the display.
The built in functions are: (i) display control including a large variety of color schemes and the additional possibility to provide user defined color tables (contrast enhancement in this mode is performed by moving the mouse pointer over the screen where vertical motion controls the slope and horizontal motion controls the zero point of the transfer function); (ii) zoom and pan with the useful feature that one can zoom in x and y independently; (iii) a blinking and movie-loop mode where the rate is controlled by the x position of the mouse pointer; (iv) a blotting mode for defining polygons (which could be input to application programs e.g. for calculating integrated fluxes) using the mouse; and (v) a split screen mode. The speed of the movie and blink mode depends on the CPU performance of the workstation. A 512 x 512 movie on a Sparc station approaches the standard 24 frames per second movie speed, provided there are no other users on the machine. On a HP 720 workstation the same speed is obtained with a 800 x 800 image size.

For graphics output such as contour plots GIPSY uses the extensive PGPLOT library of routines. The plot files can be displayed in a Tektronix 4010/X11/GIDS window. Graphics capabilities within GIDS are under development and will in addition allow graphics overlays on displayed images. Hard copies are made using a PostScript laser printer.


The application programs in GIPSY now constitute over 155000 lines of code, partly written in ANSI C, partly in FORTRAN 77. The main part of the system is radio synthesis image processing and includes many standard algorithms. Examples are conditional or unconditional arithmetic operations on single images or series of images, convolution, reprojection (including rotation) onto another coordinate system, pixel statistics in images, surface photometry routines, and CLEAN (Högbom 1974, Schwarz 1978, Clark 1980). An implementation of the Multi Resolution Clean (Wakker and Schwarz 1988) is also planned.
A strong emphasis in GIPSY has been on the processing and analysis of radio spectral line synthesis data and this has led to the coding of a unique variety of applications for handling three dimensional data (such as routines to construct maps of velocity versus an arbitrary direction through the image plane, an average of such maps etc.), for the analysis of velocity profiles using Gauss components, for the analysis of velocity fields and for modelling the gas motions in galaxies assuming realistic mass distributions.
In addition to general and spectral line synthesis applications, routines to extract Infra Red images from the IRAS raw data base have been developed in GIPSY, including destriping routines.


GIPSY now runs on the following platforms:

MachineArchitecture SynonymRemarks
Alliant FX80alliant(Support stopped 01/10/93)
HP 300 serieshp9000s300(Support stopped 30/08/95)
HP 700 serieshp9000s700.
Silicon Graphics/IRIXsgi.
Sun 4 systems (<5.0)sun4.
Sun 4 systems (>=5.0)sol4.
Convex C2 and C3convex.

GIPSY can be obtained via anonymous ftp. More information can be requested via e-mail from