(click here for source code)
This program allows you to acquire a series of 256 by 256 pixel CCD images, display them and optionally save them to the hard disk. It is a PV-WAVE program, but the C-shell script /users/bin/take_images starts PV-WAVE and calls it, so you can just type take_images <return> at a UNIX prompt to start it. (To start from within PV-WAVE, you also type take_images <return> at the WAVE> prompt). The program starts by displaying:
TAKE_IMAGES
This program will allow you to acquire a series of 256x256 CCD images,
display them on the screen, and save them to disk. Images will be saved
as filename.1, filename.2, where you should supply filename and the
files are numbered sequentially as the images are taken. You have the
option of changing the exposure timefor each image. If the gpib
interface is setup, the beam will be turned on/off automatically and you
have the option of changing masses between images. You may also optionally
save some information to a log file (filenames, exposure times, masses).
Is the gpib interface between the SGI and the HP working?
If the interface is setup correctly (see here), type y. Next you will be prompted for a directory in which to place images, a filename, and a starting number (call it n, here). As the program takes images, it will save them as filename.n, filename.n+1, etc. You are next asked:
Want a log file (y/n)?
If you say y, you are prompted for a filename. For every image you acquire and save, a line is added to this file with the date, filename, exposure time, and mass imaged (if gpib is hooked up).This may be useful if you are trying to remember later what pictures you took and for how long. Once you enter the above information, you are prompted for an exposure time for the first image. As soon as you type the time and < Return >, the camera will acquire an image and a dark image. If the interface is working, the ion probe beam will be turned on and off automatically; otherwise you must do it manually (a message is sent to the screen when the image has been acquired so you know when to turn the beam off). The image is then displayed in a window. The position of the window on the screen depends on the number of the image, i.e. image 3 is put in window 3. Windows are arranged as in this diagram:
-----------------
| 9 | 10| 11| 12|
-----------------
| 5 | 6 | 7 | 8 |
-----------------
| 1 | 2 | 3 | 4 |
-----------------
Once displayed, some information (maximum/minimum intensities, etc.) about the image is printed to the shell window, and you are asked whether to save the image:
Do you want to save the image?
If you say y, the image is saved as filename.n and n is set to n+1 (so that the next image will be in a different window and saved to a different filename). You are next prompted:
Do you want to take another image?
If you say n the program ends end you get the PV-WAVE prompt back. If you say y, you are prompted whether to change the mass (if the interface is working) and for a new exposure time and the whole thing repeats.
Note: To emphasize the high-level nature of this program, to take an image take_images calls the PV-WAVE procedure take_bin, which in turn calls the C-shell script take_256 and the PV-WAVE procdure load_bin to read the images from the hard disk into the computer's memory. For most of its interactive questions, it calls the function ENTER (from the idlusr library, see PV-WAVE basics) and it calls the procedure image_info to display information about an image.
Back to Imaging System Contents