| BZs >gnuplot.ps Acta Polytechnica Vol. 51 No. 2/2011 Advanced Processing of Images Obtained from Wide-field Astronomical Optical Systems M. Řeřábek, P. Páta Abstract The principal aim of this paper is to present a general view of the special optical systems used for acquiring astronomical image data, commonly referred to as WFC or UWFC (Ultra Wide Field Camera), and of their transfer characteristics. UWFC image data analysis is very difficult in general, not only because the systems have so-called space variant (SV) properties. Images obtained from UWFC systems are usually incorrectly presented due to a wide range of optical aberrations and distortions. The influence of the optical aberrations increases towards the margins of the field of view. These aberrations distort the point spread function of the optical system and rapidly cut the accuracy of the measurements. This paper deals with simulation and modelling of the UWFC optical systems used in astronomy and their transfer characteristics. Keywords: PSF, UWFC, Zernike polynomial, aberration, space variant, deconvolution algorithm. 1 Introduction The properties of UWFC astronomical systems along with specific visual data in astronomical images con- tribute to complicated evaluation of acquired im- age data. These systems contain many different kinds of optical aberrations, which have a negative impact on the image quality and imaging system transfer characteristics. Therefore, for precise as- tronomical measurements (astrometry, photometry) over the entire field of view (FOV), it is very im- portant to comprehend how the optical aberrations affect the transfer characteristics of the optical sys- tem. Another question that arises is how the as- tronomical measurements depend on optical aber- rations. A definition of the accurate point spread function (PSF) at any point in the FOV of the op- tical system could help us to restore the original image. Optical aberrations models for linear space invariant and variant (LSI/LSV) systems are there- fore outlined in this paper. These models based on Zernike polynomials serve us as suitable tools for understanding how to estimate and fit the wave- front aberration of a real optical system, and give us an idea of intrinsic PSF. When the model of the PSF of a real acquisition system is known, we can use it for restoring the original image or for a precise evaluation of the astronomical measure- ments. Two experiments are presented in this pa- per. The first describes PSF model retrieval when we have original image data. The second focuses on using the PSF model in known deconvolution algo- rithms with which we can restore the original im- age. 2 Astronomical image data processing and acquisition Most astronomical image data is provided by auto- matic robotic astronomical systems. The main idea of these automatic astronomical optical systems is based on long-term image data collection. The data is acquired with specific characteristics. These in- clude especially focal length, spectral bands and sen- sor parameters. According to the focal length that is used, we can distinguish image data acquired in the primary focus of a big telescope (deep sky), a wide-field lens or a “fish-eye” lens for all sky data imaging. Astronomical image data contains specific visual data. An astronomical image usually consists of the dark background of the starry sky, together with bright points and clumps, which represent stars and galaxies. Image data can be divided into four groups [7]: Flat Field, Dark Frame, Light Image and Deep Sky Light Image. Before processing and eval- uating astronomical images, it is necessary to make corrections of these images. Dark frame compensa- tion and flat field compensation are two of the most frequently used pre-processing methods. Real data from double-station video observation of meteors [10, 11] is used for our simulations and modelling. UWFC image data analysis is very dif- ficult in general. There are many different kinds of optical aberrations and distortions in these systems. Moreover, the objects in ultra wide-field images are very small (a few pixels per object dimension). The influence of the optical aberrations increases most to- 90 Acta Polytechnica Vol. 51 No. 2/2011 Fig. 1: Block diagram of image processing in a video observation system wards the margins of the FOV (high angular distance from the optical axis of the system). These aber- rations distort the PSF of the optical system and rapidly cut the accuracy of the measurements. The optical aberrations are dependent on spatial data, which affects the transfer characteristics of optical systems and makes them spatially variant. 3 Stellar object profile There are two common functions for fitting the pro- files of stars — Gaussian and Moffat [7, 11]. The aim is to match a star’s profile as well as possible with the Gaussian or Moffat profile, and then to store the parameters of the fit. If the star is ideal, it will be represented by a small “dot” — PSF (Point Spread Function). Unfortunately, because of many differ- ent distortions (see below), the dot is ”blurred” all around, and the star’s profile is close to the Gaus- sian function. The more it is blurred the worse is the PSF of the whole imaging system. If the system is linear and space-invariant, the PSF of all stars will be the same. The centre of a star usually has a profile closer to the Gaussian function, while the more dis- tant parts of a star are closer to the Moffat profile. Hence the ideal fitting function combines Gaussian and Moffat profiles. It is obvious that the centre of the star is fitted very well, whereas the more distant parts are fitted only poorly. Figure 1 presents a sim- plified block diagram of various factors affecting the final image and stellar profile. We assume the first two blocks for our purposes; however, we consider that these blocks are placed in a black box. In our experiments, we do not take into account a model of atmospheric turbulence. Other blocks implicate disruptive effects, which bring unwanted artefacts in PSF. One of the most difficult effects is brought on by recording and compression. In order to improve the subjective image quality, the video tape recording and even JPEG compression use a sharpening mech- anism which results in rapid transients at the edge of PSF. These parts of the electro-optics transfer system are not considered in our simulations and modelling. 4 Optical aberration modelling Optical aberration can be described using a so-called wave aberration function. The wave aberration [1, 5] function is defined as the distance (in optical path length) from the reference sphere to the wavefront in the exit pupil measured along the ray. Zernike polynomials are used for describing high order wave- front aberrations with high precision. Zernike poly- nomials are normally expressed in polar coordinates (ρ, θ) in the exit pupil, where 0 ≤ ρ ≤ 1, 0 ≤ θ ≤ 2π. A Zernike polynomial consists of two fac- tors, the normalization factor N mn and the radial polynomial R|m|n (ρ). Zernike polynomials are defined as [1, 4]: Zmn (ρ, θ) = ⎧⎪⎪⎪⎪⎪⎪⎨ ⎪⎪⎪⎪⎪⎪⎩ N mn R |m| n (ρ) cos(mθ) for m ≥ 0, 0 ≤ ρ ≤ 1, 0 ≤ θ ≤ 2π −N mn R |m| n (ρ) sin(mθ) for , m < 0, 0 ≤ ρ ≤ 1, 0 ≤ θ ≤ 2π, (1) for a given n, the number m can take values of −n, −n + 2, −n + 4, . . . , n. The normalization fac- tor N mn and the radial polynomial R |m| n (ρ) can be expressed as N mn = √ 2(n + 1) 1 + δm0 , R|m|n (ρ) = (2) n−|m| 2∑ s=0 (−1)S (n − s)! s![0,5(n + |m|) − s]![0,5(n − |m|) − s]! ρn−2s. where δm0 = 1 for m = 0, δm0 = 0 for m �= 0. The wavefront aberration function may be expressed by Zernike polynomials [1, 5, 7] as W (ρ, θ) = k∑ n n∑ m=−n W mn Z m n (ρ, θ) = k∑ n { −1∑ m=−n W mn ( −N mn R |m| n (ρ) sin(mθ) ) + n∑ m=0 W mn ( N mn R |m| n (ρ) cos(mθ) )} , (3) where k is the polynomial order of the expansion, and W mn is the coefficient of the Z m n mode in the expan- sion, i.e. it is equal to the RMS wavefront error for that mode. 91 Acta Polytechnica Vol. 51 No. 2/2011 a) b) c) Fig. 2: Visualization of coma and astigmatism. a) The testing image. b) SV image distorted by coma. c) SV image distorted by astigmatism 5 Effect of wavefront aberration on the PSF Optical systems with all aberrations compensated are called diffraction limited. The influences of aberra- tions on image quality can be expressed as the wave- front error at the exit pupil, and their effects on the transfer characteristics can be expressed as the change in the PSF size and shape. Changes in the size and shape of PSF blur the image. When an imaging system is diffraction limited, the PSF con- sists of the Fraunhofer diffraction pattern of the exit pupil [2]. The relation between the object and the image of a space invariant optical system can be ex- pressed by the convolution in the spatial domain (the object irradiance distribution is convolved with the impulse response) [2]. The PSF of the LSI optical imaging system can be expressed as P SF (u, v, δ, ϕ) =∣∣∣∣F T { p(x, y) exp ( −i 2π λ W (ρ, θ, δ, ϕ) )}∣∣∣∣ 2 , (4) where p(x, y) defines the shape, size and transmission of the exit pupil, exp[(−i2π/λ)W (ρ, θ, δ, φ)] accounts for the phase deviation of the wavefront from a ref- erence sphere, and (δ, ϕ) are the polar coordinates at the object plane — these coordinates equal (0, 0) all the time if we consider an LSI optical system. If we assume the spatial variant system with anisotropic PSF, then the aberration wavefront is dif- ferent for each source point, see Figure 2. The real image is always obtained from the spatially variant optical system. An example of an image acquired from a real SV optical system is shown in Figure 3a, where can we also see the influences of aberrations in the middle of the image and at the edge. The PSF of this optical system is different in the middle of the image and at the edge, due to optical aberrations. The differences of the PSFs in the two positions are compared in Figure 3b and Figure 3c. a) b) c) Fig. 3: a) Input imagedata fromthesystemat theOndře- jov base. b) The object profile near the optical axes. c) Object profile on the edge of FOV 92 Acta Polytechnica Vol. 51 No. 2/2011 Fig. 4: Ellipticity (an ideal PSF deformation) of the profiles of stars as a function of the angle distance from the middle of an all-sky image a) b) Fig. 5: a) Dependence of the astrometric error (in pixels) on wavefront aberration error (in fraction of λ), b) RMS error (in levels) versus wavefront aberration error (in fraction of λ) 6 Effect of Wavefront Aberration on Astrometric Measurements Unlike aperture photometry, precise astrometry de- mands high quality images. Even slight distortion may cause inaccurate determination of the position or movement of a stellar object. The error depends on the magnitude of the measured star — the greater the magnitude, the greater the error can be. Even a quite small compression rate may cause a wrong de- tection, especially when considering faint stars. If the system is space-variant, the PSF of the stars in an image differs. The profiles of stars are not cir- cular but rather elliptical, especially in the case of inferior lenses and greater distance from the middle of the image. The ellipticity is qualified by σx and σy (while considering the Gaussian function), where σx and σy are the distance from the centre of the Gaus- sian at which the Gaussian is equal to exp(−0,5) of its central value. σx and σy are the major and minor half-axis of the ellipse, perpendicular to each other. The ellipticity in the radial direction can grow signifi- cantly with the angle distance from the middle of the image, especially for wide-angle images, see Figure 4. All of the measurements in this section were done in IRAF (Image Reduction and Analysis Facility) software [13]. This software system enables the user to measure, reduce and analyse astronomical data and write her/his own scripts. The program is “open source”. The reader can find further information at http://iraf.noao.edu. SkyCat can be used for visual- ization of images and for access to catalogues, for example http://archive.eso.org/skycat. The effect of coma wavefront aberration on the precision of astrometric measurements (e.g. posi- tion of objects) is demonstrated in Figure 5a. We can see that the coma aberration has no influence on the precision of astrometric measurements for values of wavefront aberration error less than λ/50. The measurement error grows with the wavefront aberra- tion error, and for wavefront aberrations error values greater than λ/10 it is no longer acceptable. The second graph represents the effect of coma wavefront aberration on the RMSE of a distorted image in sig- nal levels, see Figure 5b. This effect is insignificant for wavefront aberration error values less than λ/100. RMSE further increases with wavefront aberration error. For wavefront aberration error greater than λ/10, the increase in RMSE values is over 30 %, and is also no longer acceptable. We assume only the 93 Acta Polytechnica Vol. 51 No. 2/2011 a) b) Fig. 6: a) Dependence of the brightness stars on distance from centre of FOV, b) Dependence of the magnitude error of stars on the distance from centre of FOV coma aberration included in the optical shift invari- ant system. 7 Experiments and Results 7.1 Estimation of aberration If we want to use the deconvolution algorithm for pre- cise restoration of the SV UWFC system, we need to know what the PSF looks like. One approach is to find the PSF of the optical system from empirical image data. Here we describe the procedure for ob- taining the model of PSF from real image data. Our experiments involve analysing real image data and comparing it with the modelled image data. Real data from the double-station video observation project is used for our experiments. The stars vary not only their own position, but also their brightness and shape. The space variant properties are repre- sented in Figures 6a) and 6b), which show how the magnitude and the magnitude error vary in depen- dence on distance from the centre of FOV. In princi- ple, the brightness of stars has a decreasing character. Within the double-station video observation project we obtain a sequence in non-compressed AVI format from the observation system. A star which changes its position from the edge to the middle of the image, or vice versa, is taken as a suitable for our purposes. At first, several frames from each se- quence form the uncorrected testing image, which is determined as the median of the used frames. In the next step, we pre-process the image using flat field and dark frame correction. We can also use noise and background removal. The next step is to iso- late the star at discrete times when it changes its own position from the middle of FOV to the edge of FOV. We therefore cut the stars as sub-images with 15 by 15 pixel proportions. Then the compar- ison of the real stellar profile and the model profile is implemented [12]. A generalized block diagram of the algorithm that estimates the optical aberra- tions of the real system is shown in Figure 7. The input parameters are the wavefront aberration (i.e., the Zernike coefficients) and PSF computed accord- ing equation (4). Then the real object profile is com- pared with the suggested model — both of them have the same FWHM [7]. The suitability of the result- ing PSF for the model is evaluated on the basis of the RMS error between the modelled PSF and the real object profile. The result for the chosen star is presented in Figure 8. As can be seen, this model as- sumes only two varying aberrations (coma and astig- matism) with a constant defocus value. Fig. 7: Generalized block diagram of an estimation algo- rithm a) b) c) d) Fig. 8: Results of estimation. a) Model of the star profile, b) Original of the chosen star, c) Differential image for the estimated and real star profile, d) Dependence of the RMS error profile on coma and astigmatism wavefront aberration error 94 Acta Polytechnica Vol. 51 No. 2/2011 a) b) c) Fig. 9: a) Model of the PSI optical system, b) Source testing image, c) Image passed through the SV optical system with coma aberration only a) b) c) Fig. 10: Image restored using the Wiener deconvolution algorithm, b) Deconvolution using the Lucy — Richardson algorithm, c) Deconvolution using the maximum likelihood algorithm 7.2 Model of spatially variant deconvolution The principal difficulty in spatially variant (SV) sys- tems is that the Fourier approach can no longer be used for restoring [6] the original image. If we want to use the Fourier method for the deconvolution pro- cess, we need to split the original image. The transfer characteristics of each part are described by unique PSF. This system is referred to as a partially space invariant system [8] and we use it in our experiments. Such a system has parametric PSF — for each value of a parameter (in our case it is the coordinate of the object at the object plane) PSF takes a different size and shape according to the aberrations that are con- tained. Thus we obtain a number of PSFs, one for each region referred to as an isoplanatic patch [8], within which the system is approximately invariant. To describe the imaging system fully, the impulse re- sponse appropriate for each isoplanatic patch should be specified. The wavefront aberration function for the LSV optical system can be described as W (ρ, θ, δ, ϕ) = k∑ n n∑ m=−n W mn (δ, ϕ)Z m n (ρ, ϕ−θ), (5) where W mn (δ, ϕ) is the RMS wavefront error for aber- ration mode m, n and for object polar coordinate (δ, ϕ). Using the partially space invariant system al- lows us to describe the transfer characteristics in in- dividual patches by Fourier approaches, according to equation (4). Thus we obtain a number of space in- variant PSFs, one for each isoplanatic patch. Now we can also use the Fourier approach for image deconvo- lution. The optical system is divided into 40 isopla- natic patches in our experiments, see Figure 9. Three deconvolution algorithms [3, 4] — the Wiener, Lucy- Richardson and maximum likelihood algorithm — are used for restoring the original image, see Fig- ure 10. 8 Conclusions This paper has discussed ways of improving astro- nomical measurements. The first approach is to use the novel star profile model for restoring the original image, which is undistorted and is suitable for precise astrometry using ordinary fitting models (Gaussian, Moffat). The second approach for improving astro- nomical measurements is to use a different evalua- tion and detection algorithm. This involves creating a new PSF fitting model based, e.g., on the Zernike polynomial and using it for detection and astrometric measurements. The situation is complicated by fact that all wide field astronomical observational systems 95 Acta Polytechnica Vol. 51 No. 2/2011 are SV. Therefore, the shape of a stellar object varies across the entire FOV, and Gaussian or Moffat fitting procedures are useless for precise astrometric mea- surements, especially towards the margins of FOV. An experiment for estimating the optical aber- rations of real optical systems was implemented. A comparison of the model PSF and the real object profile was performed using the RMS error. Obvi- ously the model should have more input parameters, especially more varying optical aberrations. SV de- convolution was addressed, and a model of the par- tially space variant optical system was implemented. Only the “brute force” method was used for restoring the test images. The results of various deconvolution algorithms were demonstrated. Acknowledgement This work has been supported by grants no. GA205/09/1302 “Study of sporadic meteors and weak meteor showers using automatic video inten- sifiers cameras”, and GA P102/10/1320 “Research and modelling of advanced methods of image quality evaluation” of the Grant Agency of the Czech Re- public. References [1] Born, M., Wolf, E.: Principles of Optics. 2nd ed. London, Pergamon Press, 1993. [2] Goodman, J. W.: Introduction to Fourier Op- tics. Boston, McGraw-Hill, 1996. [3] Campisi, P., Egiazarian, K.: Blind Image De- convolution: Theory and Applications. CRC, 2007. [4] Janson, P. A.: Deconvolution of Images and Spectra. 2nd edition. Academic Press, London, 1997. [5] Welford, W. T.: Aberration of the Symmetrical Optical System. Academic Press, London, 1974. [6] Shannon, R. R., Wyant, J. C.: Applied Op- tics and Optical Engineering. Academic Press, Lodon, 1992. [7] Starck, J., Murtagh, F.: Astronomical Image and Data Analysis. Springer Verlag, Berlin, 2002. [8] Trussel, H. J., Hunt, B. R.: IEEE Trans. Acous- tic Speech Sig. Proc., 608, 157, 1978. [9] Maeda, P. Y.: Zernike Polynomials and their Use in Describing the Wavefront Aberrations of the Human Eye. 2003. [10] Hudec, R., Spurny, M., Krizek, P., Páta, P., Řeřábek, M.: Low-Cost Optical All-Sky Mon- itor for Detection of Bright OTs of GRBs In: Gamma-Ray Burst: Sixth Huntsville Sympo- sium. Austin: American Institute of Physics, 2009, p. 215–217. ISBN 978-0-7354-0670-4. [11] Řeřábek, M., Páta, P., Koten, P.: Process- ing of the Astronomical Image Data obtained from UWFC Optical Systems. In Proceedings of SPIE – 7076 – Image Reconstruction from Incomplete Data V. Washington: SPIE, 2008. ISBN 978-0-8194-7296-0. [12] Řeřábek, M., Páta, P.: Advanced processing of astronomical images obtained from optical systems with ultra wide field of view In: Ap- plications of Digital Image Processing XXXII. Bellingham (Washington State): SPIE, 2009, p. 1–4. ISBN 978-0-8194-7733-0. [13] IRAF – Image Reduction and Analysis Facility, http://iraf.noao.edu/, 2007. M. Řeřábek P. Páta E-mail: rerabem@.fel.cvut.cz Czech Technical University in Prague Faculty of Electrical Engineering Department of Radio Engineering Technická 2, 166 27 Prague 6, Czech Republic 96