Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1556 |
|
In any software package there are concepts and language that you must learn to be able to use the package effectively. This is especially true for AIPS++ because there are some new concepts compared to other packages that many of you might already be familiar with (e.g. AIPS, Miriad, GIPSY etc).
It is essential that you understand these concepts and terminology so that you can read the documentation and use AIPS++ effectively. In this section we will talk generally about these concepts. In the following section, we will show some examples of how to actually do things in AIPS++ with these concepts from the Glish command line.
We use the word tool in AIPS++, and it has a meaning which is analogous to the "tools" we are all familiar with in our usual computing environment. A browser is a tool; you can start several instances of it, it has an interface (often GUI-based) and that gives you control over what the tool can do (e.g. format an HTML page, pull down a menu and select something). I.e. it is software 'program' which has some 'functions' to do things.
In AIPS++, a tool is something very similar; it is a collection of related functions (tool functions) that generally operate on some common data source. The range of things that can be done with each tool is always focussed. By analogy, a browser provides ways of formatting mark-up languages (e.g. HTML) but you don't use it to do image manipulation.
tools are ``constructed'' (or created) when you need one. In our browser analogy, your browser tool is constructed/created when you type in the program name at the Unix command line.
% mozilla.
This creates (constructs) the browser process or tool (and you can create as many as you like) and gives you access to its functions through its GUI.
As well as tools and tool functions, in AIPS++ we also have a number of global functions (or just functions). These functions stand on their own and are not tied to a specific tool (see examples in followin section).
For those of you who are familiar with Objected Oriented programming, a tool is just an object and it has tool functions (methods) that you can execute. This Object Oriented interface is exposed to users at the command line.
Let us give a few examples of AIPS++ tools.
An Image tool is a tool which has functions which process image data. Now note an important thing. There is not just one Image tool which is used to process all the images you ever make in AIPS++; if you wish to access an AIPS++ image disk file, then you create (or ``construct'', as we generally say) an Image tool that is associated with that image file. Then all the functions of that Image tool operate on that data file (e.g. display it, compute statistics, regrid it etc). An Image tool cannot exist without a data source.
You will generally make quite a lot of Image tools in the course of processing images in AIPS++.
An Imager tool is a tool which is used to make images from visibility data. Its data source is then a visibility disk file (a thing we call a Measurement Set) with which you construct an Imager tool. It has lots of functions which then process the visibilities from those data to make images. An Imager tool cannot exist without a data source. Like Image tools, you may construct more than one Imager tool, but generally you will only have a small number of them.
A Quanta tool has functions which manipulate values and units. For example, convert 5km/s to pc/h, or add 20km to 3cm and give me the answer in furlongs. A Quanta tool can exist without a data source. For this reason, the AIPS++ system provides one pre-made Quanta tool for you, and it's the only one you ever need to use. If you really want, you can make your own, but there is generally no point to doing so.
So some tools are associated with a data source, and some aren't. Finally, when you construct a tool, there may be more than one way to do it. For example, you can construct an Image tool in many ways. Here are three ways (of many).
When you construct a tool, it takes up some computer resources (e.g. memory). Because your tool may be associated with a data file, it may also have ``locked'' that data file so that other tools can't access it (e.g. if your tool is modifying it.
So it is very important that when you are finished with your tool that you destroy it. If you don't do this, its resources will not be freed up and you may leave files locked.
A thing you should never do is overwrite a tool without first destroying it. You will get in big trouble if you do this.
Every tool has a function called done which will destroy the tool, free up its resources and remove all locks. Note that this does not delete any underlying disk data files. There are examples in the following section.
Astronomy packages such as Miriad and AIPS are not object oriented; they are process oriented. This means that there is a process, usually called a ``Task'' that has some particular functionality. For example, in Miriad there is a Task called ``histo'' which computes statistics from an image. The user supplies it with inputs such as the input image file name and executes (runs) the task. With AIPS++, the same functionality is achieved by constructing (creating) an Image tool from the image data file and then executing the statistics function.
In the above description there are just a few pieces of terminology that you will see over and over. Let us summarise them