BETTER ASTRONOMICAL IMAGES

 

by selecting

"moments of good seeing" in captured video

 

James Chauvin

 


INTRODUCTION

   A major problem with ground-based astronomy is that atmospheric turbulence generates aberrations that distort the images. The Hubble Space Telescope (HST) was constructed in part to eliminate this problem. Though the performance of the HST is impressive, astronomers would benefit greatly from systems that reduce effects of atmospheric turbulence for ground-based telescopes.

The problem of imaging through atmospheric turbulence has been addressed in several ways. Unfortunately these solutions have been either limited to large telescopes (aperture diameter exceeding 1 meter) or are very costly. This research aims to develop a low-cost solution that will be effective for the rest of the astronomy community.

   The turbulent atmosphere may be modeled as several layers of air that exhibit different temperatures and thus different refractive indices. Light propagating through the atmosphere is refracted by these different layers, so the cumulative effect is a scattering of the beam. The effect may be characterized as a diffusion of the point spread function of the imaging system. The hypothesis behind this research is that the index of refraction will be uniform over the aperture of for short periods of time. If images can be captured during this period of uniformity, then the image will have a narrower point spread function and the image will look better.

   This system will initially be designed to correct for the turbulent effect on point sources. Expanding the capability of the system to include more complex astronomical objects will require a more robust algorithm than the current system. .
 

Research Objectives

   This research is intended to start development of the proposed system. Through this research, I intend to find generic problems that are bound to arise during the development of such a system. This research hopes to lay the foundation of a usable system by answering these questions:

 


 

BACKGROUND

   The resolution of large land-based telescopes is not constrained by the diffraction limit of the telescope, but rather by the action of the earth's turbulent atmosphere.

"A variety of mechanisms occurring in clear air account for the disturbances which affect optical waves propagating horizontally and vertically. Temperature is not uniform in the atmosphere, and its fluctuations produce optical phase fluctuations on propagating waves, in response to the local variations of the temperature-sensitive refractive index. This temperature effect is predominant at optical wavelengths." Labeyrie (1976).1

    The refractive indices of the atmosphere tend to be uniform over an area that is approximately 10-12 cm in diameter at the aperture, though this size varies with site conditions. These isoplanatic patches are referred to as "cells". Using this estimate, there should be approximately four cells across the diameter of the RIT 16" telescope. Since each isoplanatic patch acts as an independent aperture, each produces an "image" of the object at the detector; these images are called "speckles". Therefore each point source (star) in the image field should generate approximately 16 speckles when viewed through the RIT telescope. Since the physical parameters of the iosplanatic patches are stationary only over very short times (<0.1 second), typical exposures will average many groups of speckles to create a "blurred" long-exposure image. The speckles are visible only if viewed with sufficiently short exposures.

    Several techniques based on speckle observations have been used to improve the resolution of land-based telescopes. The original paper by Labeyrie (1971)2 set the groundwork by developing a technique to obtain diffraction-limited information from short-exposure images:

"Within each exposure or "frame," the atmosphere, while still inhomogeneous, is effectively frozen. By studying the autocorrelation function or frames, it is possible to extract diffraction-limited information about the object." Horch(1995).3

    The effect of speckle varies with wavelength, so it is necessary to restrict the range of wavelengths that reach the sensor. Using a narrow-bandpass filter will significantly reduce the irradiance of the speckle pattern, thereby requiring that the brightness of the objects exceed some limit.

    Another technique for dealing with the turbulent atmosphere uses a high-speed camera system, such as the one used on the Canada-France-Hawaii telescope on Mauna Kei on the island of Hawaii. Such a system utilizes two cameras; one is used to collect images that are analyzed to judge the quality of the seeing. When the seeing is deemed to be sufficiently good, then a signal is sent to the other camera to begin capturing data. In this way the system is only capturing images during periods of good seeing. For more information on such a design refer to the paper by McClure(1989)4. The current research project is directed at a similar technique implemented after the short-exposure images have been gathered.

    What are the potential advantages of the new technique? For example, the older techniques may not be applicable to the RIT telescope. The problem with the first technique is that it is useful for large telescope that encompasses several tens to hundreds of speckle spots. This provides many speckles that can be processed using the autocorrelation function. The RIT telescope should generate only about 16 speckles corresponding to the cells that cover the aperture. It seems that the autocorrelation technique would suffer from this limit. The second technique, which utilizes the high-speed camera, should be useful and perhaps has better quality than Labeyrie's technique. However, it does suffer from the drawback of cost. A camera such as that used by McClure(1989)4 would be too expensive for the average amateur astronomer. Such a camera system is more appropriate for use on a larger telescope.

    The proposed technique is aimed at filling this gap between the post-capture, computationally intensive technique of Labeyrie(1971)2 and the expensive triggered capture technique of McClure(1989)4. The new technique is geared toward the smaller telescopes used by advanced amateur astronomers and would give a low-cost and near-real-time improvement. The proposed technique will utilize readily available materials, with the exception of the video frame grabber, which can easily be ordered from several suppliers. A frame-capture rate (of the order of 100 frames per second) would be useful because it would better "freeze" the atmosphere. This might aid the selection process because fewer random photons will be integrated on the CCD, thereby reducing the width of the atmospheric point spread function. My concept is not new, in fact the concept of frame selection has been suggested by others such as Labeyrie(1971)2 as an area of research that should be investigated. Ron Dantowitz of the Boston Museum of Science has been using manual selection of video frame selection to capture images of the space shuttle and MIR while in earth orbit.

    If the proposed system were made available to the amateur astronomer, it would significantly enhance the quality of the observations. This system could also aid in new discoveries made by smaller telescopes. In addition, this system may enable a broader range of experiments to be conducted on the RIT observatory.

 

FIGURE 1.  THE 16 inch RIT telescope


 

 

 


 

THEORY

 

The Premise

    The fundamental premise behind the proposed research, is that the effect of speckle is a random process. At some times, several isoplanatic cells may have the same refractive index and therefore the image quality of images captured during these uniform times should be better than when each cell has a different refractive index. By using images obtained only during these "moments of good seeing", the resulting image should be much improved.

    Regardless of the post-processing techniques used, this selective frame method should yield a better output due to the improved input of the selected frames. Although I have used a co-adding routine to combine the output images, other techniques such as registering, shifting and then co-adding may yield further improvement. However the goal of this research was to avoid registering and shifting because of the increased processing time required.
 

Hardware and Processing

    The software developed for this research was written in the Microsoft Visual C/C++ environment. The programs were written in C/C++ to take advantage of its ease of use and processing speed. It was determined that a third-party C language image-processing library would be needed to transfer images to and from the computer. Additionally, the use of prewritten software would save the time that would be required to develop several functions, such as accessing individual pixels for reading and writing. The third-party extended C library utilized was purchased from EPIX for compatibility with the EPIX SV-4 frame grabber. For this research we used a Dell Pentium III 500Mhz PC computer with 128MB of Random Access Memory (RAM). The large amount of RAM was necessary to allow capture of as many images as possible: up to 100 frames at a time. The video camera used was the ASTROVID-2000 manufactured by ADIRONDAK VIDEO ASTRONOMY. The camera features variable shutter speed and manual gain control, which were very useful in this project.


 

METHODS

 

The Algorithm

    The algorithm was developed to distinguish "moments of good seeing" by using a simple sequence of steps:

 

    The C program prompts the user to enter the pertinent parameters, which are the number of frames to be selected before co-adding, the tolerance on selecting frames, the area of interest on which to operate, and the estimated center of the star or object of interest.

   After the necessary parameters are read into the C program, the program then sums all the pixel values within the area of interest and places them into a two-dimensional array that also contains frame numbers.

   The next operation in the algorithm is to sort the two-dimensional array using a straight insertion operation on the summed pixel value. It should be noted that the corresponding frame numbers are moved (sorted) as the summed pixel values are being sorted.

   Perhaps one of the most challenging tasks was to develop a metric by which to evaluate the quality of the images. I chose to use the following criterion. The minimum summed value at a pixel was added to the product of a user-defined tolerance and the difference between the mean and the minimum gray values in the summed array, i.e.,

fmin + (fmean-fmin) · tolerance

   After the program uses the above equation to determine the criterion program evaluates the summed pixel values from each frame sequentially. If the summed pixel value is less than the predetermined criterion the current frame buffer is written from RAM to the hard drive. This process is continued until the number of good frames is reached that was selected by the user.

   The frames that were written to the hard drive are then read into RAM in sequential addresses for co-adding. The program loops through each pixel location in all of the selected frames and places them into an array where they are again sorted and the median value written out into the final composite image.
 

Testing

    Initially, the merits of the algorithm were tested on simulated data. The simulated images were generated by using a HeNe laser that was modulated with a piece of thin plastic. The plastic was crumpled to give sufficient scattering to the laser beam, when place in the beam path. During the capture stage of the program the plastic was moved by hand to give the speckle effect. This technique worked well. Figure 2 below illustrates a single frame from the captured simulated data.

 

FIGURE 2. Example of Simulated Data

 
    Once the algorithm could successfully distinguish wanted "good" frames from the simulated data, collection of real astronomical point sources could begin. Figure 3 below gives an example of one of the "good" frames the program selected from the simulated data.

 

FIGURE 3. Program selected frame from simulated data


 
    Images of both single and double stars were collected at the RIT observatory. The main testing was done on the star Algieba located in the constellation Leo. An unanticipated problem appeared as the images were being captured. The tracking of the right ascension motor of the 16-inch telescope is insufficiently stable. This problem was expected to cause excessive shifting of the star within each frame. However it turned out to be a trivial issue because the drift in the guider was slow when compared with the capture rate of the camera.

   While collecting data on the point sources, the control parameters on the camera were varied in an attempt to collect the narrowest point spread distribution while still resulting in sufficient brightness. The camera parameters that were varied were the exposure time and the gain. The best images were obtained with the maximum gain and an exposure time of 1/2000 of a second. Figures 4 and 5 below illustrate a typical frame of Algieba and a surface plot of the image

 

FIGURE 4. Algieba with max. gain and 1/2000 exposure time (resize=300%)

FIGURE 5. Surface plot of Algieba frame

 


 

Results

 

Evaluating the software

    The capability of the software to select good frames depended on the image sequence. The reasons for the varying success is not yet fully understood, although preliminary thoughts will be discussed in a later section. To evaluate the success of the software the diffraction limit of the telescope was calculated and was compared to the distribution within the selected frames. The diffraction limit of the 16" telescope is 0.31 arc seconds which corresponds to just under 2 pixels on the CCD array of the ASTROVID 2000 video camera. The selected images were co-added and imported into CISlab to calculate the full width at half maximum (here after FWHM) of the stars. The narrowest distribution (i.e., the smallest FWHM of the psf ) obtained from the selected frames was six pixels. This same FWHM was obtained by simply co-adding the entire sequence of captured images. This leads us to believe that the software does not improve image resolution any better than by straight co-adding of the sequence, however the processing time was drastically different. The software run time was around 30 seconds compared to a run time of over 5 minutes for co-adding all images captured. Figure 6 below shows the image obtained from co-adding all images captured in a sequence. Figure 7 shows the image produced by co-adding the software selected images. Figures 8 and 9 are the corresponding surface plots.

 

FIGURE 6. Image produced by co-adding all frames from sequence (resize=300%)

FIGURE 7. Image produced by co-adding software selected images (resize=300%)

 

FIGURE 8. Surface plot of all images co-added

FIGURE 9. Surface plot of selected images co-added

    The other method used to judge the effectiveness of the software's ability to select "good" images, was visual comparison. The images that were obtained by co-add or averaging of the entire sequence were clearly more uniform and contained less noise as may be expected. Although the images produced by averaging were more appealing the FWHM distribution is wider than the software selected images.


 

Discussion

 

The Flaw

    The results suggest that the current quality metric is not sufficiently robust to distinguish the good frames from the unwanted frames. The preliminary analysis of the flaw of the quality metric suggests that the lowest total pixel sum value from the user-defined area of interest is being selected, even when the images are very poor image. The results suggests that there are two basic situations during which the software selects images. In the first situation, the area contains a few saturated pixels and relatively few midtone gray values, which is an appropriate images we want to select. This first situation is the type of image we want to have selected. The saturated values correspond to the star center and will appear as a sharp point with a narrow FWHM value. The second class of situation is at the other extreme; no pixels are saturated and the area of interest contains mostly low midtone gray values. The image appears as a large blob, i.e., the FWHM is large, which caused errors during the co-adding process. The quality metric currently used interprets these two different situations in the same way. For example, consider a group of four pixels. An example of the first case would result when one pixel has a gray value of 232 and its three neighbors are identically 5. An example of the second case when the gray values of all four pixels were identically 63. This situation has occurred in every sequence of images that the software has processed. I propose that rather than abandon the current quality metric, a simple fix can be implemented. I hypothesize that a drastic improvement can be realized if the simple fix is implemented.
 

The Fix

    It has been estimated that the flaw is that the quality metric can not discern a narrow (and therefore good) FWHM from a wide FWHM (blob). A quality metric must be designed that can distinguish between narrow and wide psfs. The quality of the composite image after co-adding would be improved if the software were able to distinguish between these cases. Although there are several ways to enable the software to discern these occurrences, we want a solution that fits into the goal of a fast algorithm. Some proposed methods are to measure the difference between the brightest pixel and its neighbors, if a large difference is found that suggests that there is a narrow FWHM and that the frame should be selected. Another possible method would employ a Laplacian filter that will yield the derivative of the star. As is true for the differencing method, a large value of the derivative suggests that the FWHM is narrow and that the frame should be selected. There are several problems with the first method. The first that the center of the star must be found using a centroiding routine, which will take quite some time. Secondly if the neighboring pixels have the same pixel value no difference between them will be detected. In this case the software will interpret the image as having a large FWHM value, a "blob". Therefore the frame will not be selected. The Laplacian is a better metric because the user need only look for an output value greater than some predetermined magnitude. However the Laplacian will likely take a bit longer to calculate than the differencing method (probably only a trivial time difference). I suggest a third method that is simpler yet. It assumes that the gray levels of the darkest pixels in each frame are the same. Typically in a CCD array the darkest pixel value is not zero, but rather some relatively low gray value that is a function of the photon noise, which is also called "shot" noise. By predetermining this minimum gray value or arbitrarily picking a low gray value, the software can compare the difference between the brightest pixel in the user -defined area of interest and this low value. If the difference meets the criterion, as determined by testing, and in addition meets the original criterion of the quality metric, then the frame is selected. The advantage of this method is that the software does not care where the brightest pixel is located, nor whether it's neighboring pixels are bright. This method would be very fast because all the pixel values in the user-defined area of interest are already being read during the summing phase of the algorithm. Lastly the implementation would be nearly effortless, a variable would need to be added that would store the greatest pixel value. This new variable would be compared with the current pixel value and if the current pixel value is greater the variable would take on the current pixel value. This new variable will be used to compare the difference between the maximum and minimum pixel values.

   
 


 

Conclusions

    The results suggest that the software in its current state had little improvement over the traditional method of co-adding the entire captured sequence, and in some case no improvement. The reasoning for this problem has been previously addressed and future endeavors to improve the system are expected to be fruitful in regard to improved image selection.
 
   Of greater importance than the quality of the images selected and the overall performance of the system is that the foundation for this system has been laid. All the research objective and questions concerning the initial foundation of development have been answered. The software needed for all future work on this system are in place and in perfect working order. The current system has the ability to capture, transfer, access, and storage images.

   
 
     
   

 

Table of Contents