Interactive Visualization of Gravitational Lenses Marcelo Magallón 1,2, Jorge Páez 1 1 Astrophysics Research Laboratory, University of Costa Rica, San José, Costa Rica; 2 Visualization and Interactive Systems Group, Institut für Informatik, Breitwiesenstr. 20-22, D-70565 Stuttgart, Germany Email: magallon@informatik.uni-stuttgart.de, jpaezp@ucr.ac.cr Abstract A tool for the interactive study of gravitational lensing is presented. Gravitational lensing is a known astrophysical phenomenon explained by means of the General Relativity Theory and it is nowadays the only scale independent method for measuring the mean matter density in the Universe. The gravitational lensing problem along with the associated physics is briefly described. The algorithm used to generate the images is presented alongside with images obtained from the application of different models to a circular source. Some possible future developments are outlined. 1 Introduction Gravitational lensing is a relativistic phenomenon predicted by Einstein[1] in 1936 and first observed in 1979 by Walsh et al[2]. It occurs when a mass, like that of a galaxy, lies in the path of light rays between a far away source, e.g. a quasar or a galaxy, and an observer. Like its classical optical counterpart, it distorts and magnifies images. This is an active field of research, as a simple query on the e- Print archive 1 reveals; for the last year more than 40 papers have been submitted for publication. The study of this phenomenon and its more specific instance known as gravitational microlenses, where the lensing mass is a star, has proven to be one of the most promising fields in the determination of the amount and distribution of dark matter in the Universe[3]. Gravitational lensing provides information on a large distance range, and thanks to advances in instrumentation and theoretical research, it plays a key role in modern Cosmology[4], mainly 1 http://www.arxiv.org/ because it allows to compare the total amount of matter is a region of space with the amount of luminous matter in the same region, which in turn aids astrophysicists and cosmologists place new limits on the mean matter density on the Universe. A prerequisite for this is the correct modeling of the observed lenses. By modeling we understand the determination of the lens characteristics (type, surface mass density, spatial configuration), the type of the source and the involved distances (sourcelens, lens-observer, source-observer) starting from the observed data. Thanks to the availability of increasingly faster computers with also increasing amounts of storage space, it is now possible to perform dynamical simulations of microlensing events. The main obstacle here is that usually there are not enough constraints available in order to determine a solution with a sufficient degree of certainness since the theoretical models contain many free parameters. The problem is multidimensional in more than one sense: it involves computations in two and three dimensions; models have one, two or more free parameters; and background model properties (convergence, shear) introduce its own set of free parameters. In order to develop an understanding of the influence of the different parameters in the gravitational lensing problem, visualization techniques can be employed to gain insight of the effect of these variables on the final images. It is manifest that this makes sense only if the results can be compared with the physical reality of the phenomenon. 2 Background The physics of the gravitational lensing phenomenon has been extensively and thoughtfully discussed in [5]. From a purely mathematical point of VMV 2002 Erlangen, Germany, November 20 22, 2002
view, in general gravitational lensing is a mapping f : R 4 R 2 from space-time into a planar image. After introducing physical considerations, the problem can be reduced to a f : R 2 R 2 mapping. The relevant equations can be formally derived in the context of General Relativity, but a simple geometrical approach yields the same results. Consider an observer O, a source S at a distance D s from O, and a deflector D at a distance D d from O and D ds from S as shown in Figure 1. The relation between the angular positions β and θ is readily derived 2 as D sθ = Dsβ + Dds ˆ α, where ˆ α is in general a function of the impact parameter ξ. constant, the lens equation becomes: y = x α( x), (1) α( x) = 1 x x π x x 2 κ( x )d x, (2) where y is the position in the source plane and x is the corresponding position in the image plane, as shown on Figure 2. This equation is non-linear for y ˆα S ξ Source plane Deflector plane D ds D β Figure 2: Path followed by a single light ray. The lightθis emitted at position y in the source plane (e.g. by a quasar), deflected an angle ˆ α (e.g. by a galaxy) and arrives at position x in the observer plane. Considering a different path (dotted O line) starting at the Dsame d source position, the light ray can arrive at a different position in the observer plane. D s Figure 1: Gravitational lensing problem geometry. Here the geometry is described in two dimensions, but in general it is three dimensional, i.e., the angles are vectors. β is the angular position of the source, θ is the angular position of the corresponding image after the light rays have been deflected by ˆ α, the deflection angle of the light ray wrt the unperturbed trajectory. Introducing dimensionless two-dimensional vectors x ξ 0 ξ, y Ds β ξ 0, where ξ 0 is an arbitrary 2 It is assumed that D s, D d and D ds are large and ˆα, β and θ are small. Furthermore, it is assumed that the lens is thin, i.e., the deflection occurs in a small region around D. all cases of physical interest, there is usually more than one image position for any given source position! The integral in (2) takes into account extended deflectors and κ is related to the surface mass density (the 3D mass density projected onto a 2D plane), and is defined by the actual model being used for them. There are currently two approaches in use: parametric and non-parametric lens models. In non-parametric models the mass distribution of the lens is directly specified and their application to lensing by galaxy clusters is straightforward. With parametric models, a number of free parameters are introduced into the model in order to specify the overall mass distribution. Several such models have been published; Frutos[6] has collected and developed a comprehensive list of them.
Figure 3: Image produced by a double point mass model. The source is circular and is located almost directly behind the lens. The point masses are located roughly in the middle of the black spots. Gravitational lensing can produce complex images (Figure 3) and it is not always evident how one parameter interacts with others. A first tool that allows interactive investigation of these relationships was developed by Frutos[6]. However, it has a number of problems, namely, has very low performance on common hardware platforms, is not easily extensible and it is not easily portable, mainly due to its use of the old IRIX GL API instead of OpenGL. That program has been rewritten[7] to use OpenGL, but interactivity and portability problems remain an issue. 3 Interactive Visualization Starting with the idea presented by Frutos[7], a new tool was developed which solves most of these problems. In order to have better portability, it was implemented using OpenGL and the FLTK[8] toolkit. It can also take advantage of features available on current consumer-class graphics hardware to improve interactivity even further. The algorithm used to compute images from a given source is as follows: for each pixel in the image plane x, apply the mapping x y defined by (1); this produces the corresponding location y on the source place. Draw x using the color at y. In order to achieve interactive refresh rates, a cache strategy was implemented. From (1), it can be seen that all the model specific calculations can be carried out in a source-independent fashion. This allows the program to compute the actual value of the right hand side of (1) on the entire observer plane for a fixed set of model parameters and store it for later use in the generation of images. These values can be used to compute a time delay function directly and also the Jacobian matrix for the x y mapping, which in turn makes it possible to obtain a magnification matrix. Since the expression for the mapping x y has in general a non-polynomial from, evaluating it for any useful amount of points (65 thousand to a million or more) is costly in terms of computation time. To keep refresh rates at an interactive level a progressive refinement method has been implemented. While the user is adjusting model parameters, the mapping function is computed at a coarse resolution. If the OpenGL implementation is fast enough, the missing entries are bi-linearly interpolated, otherwise nearest neighbor filtering is used. Since the value of a particular entry in the map does not depend on the neighboring entries, once the user is done with the interaction, the rest of the elements in the map are computed with a user selectable resolution and previous results can be reused. To make the program more extensible, the models are implemented as dynamically shared objects (DSOs) loaded at runtime using dlopen(3) or a equivalent library call. To keep the implementation portable, the libltdl library from GNU Libtool[9] is used for this purpose. The API for the models has been kept simple in order to allow researchers wishing to investigate properties of their own models to focus their efforts on the implementation of the actual models instead of the integration of the models with the rest of the system. Design is such that each module has to specify the number of parameters, their characteristics (v.g., allowed range for values), and a function that implements the model. In practice this means equation (2) is not directly computed by this tool, but this task is delegated to the model module instead. Most
of the currently implemented modules have circular symmetry and (2) can be computed analytically. Other models, most notably elliptical ones, can be implemented using numerical methods. It s up to the module to ensure that repetitive evaluation of the function won t degrade the overall performance. If the OpenGL implementation supports it, the NV texture shader extension[10], it is used to implement the mapping from the source to the image plane. This is achieved by using dependent textures and loading the map entries to a texture. 4 Results Initially the program was developed on a x86 GNU/Linux platform and has been since ported to SGI IRIX with very few modifications. It has been optimized to the point where it achieves acceptable refresh rates on low-end hardware (ca. 2-5 Hz @ 256 256, calculations performed at one fourth of full resolution) and very high refresh rates on modern (but nevertheless consumer-class) hardware: between 20 Hz @ 512 512 at half resolution (when model parameters are modified) and 50 Hz @ 512 512 at half resolution (when source position is modified). Currently 13 models are implemented along with background shear and convergence. Figure 4 shows several images produced by using different models of gravitational lenses: a Chang- Refsdal model describes a point mass, and it is directly applicable to lensing by stars and can be used as a good initial approximation in other situations. So far, a complete Einstein ring has not been observed in nature, but nearly full rings have been observed in radio bands (see for example [11]). Elliptical models span a whole family of models with different properties and have been successfully used to model gravitational lensing of quasars by galaxies[12]. A common feature is the generation of an Einstein cross, which was first observed in 1989[13]. This program also supports the generation of image sequences by variation of any of the available input parameters. This can be used to study the dynamical characteristics of the models, especially in the context of gravitational microlensing. Figure 4: Images produced after applying several models to a circular source, its position and size are indicated by the concentric rings. The lens center is located at the center of each picture. On the left column the same Chang-Refsdal model was used, top to bottom: a) The source is located at the far left of the lens center; b) The source is closer to the lens center, two large arcs are produced; c) The source is aligned with the lens, producing a so-called Einstein ring. Right column, top to bottom: d) An elliptical model with external shear. The source is aligned with the lens, producing an Einstein cross. e) Singular Isothermal Sphere. Two non-symmetrical highly-elongated arcs are produced. f) A rotational model producing a highly deformated image.
5 Conclusions and future work Both researchers and students (particularly in astronomy, physics and astrophysics) can benefit from using interactive visualization techniques applied to the study of gravitational lensing. For researchers, this constitutes a fast and simple method for analyzing and understanding features of new models. For students, this makes it easier to grasp the rather surprising characteristics of the gravitational lensing phenomenon like multiple imaging, large image magnification and time of arrival differences for each of the images (time delay). Having developed an interactive tool that allows the user to investigate different features of gravitational lens models, it can now be extended to the point where it can aid in the analysis of real data sets. Once the images, from instruments like the Hubble space telescope (HST) or radio observatories, have been reduced, a model has to be proposed and a best fit (χ 2 ) is sought. This task is often cumbersome and involves some guesswork. Some insight can be gained by using the presented tool, which can give some guidance on that guesswork. A full integrated statistical package would speed up modeling significantly. Also of interest would be the integration of non-parametric models. Working with non-parametric models is much slower because of the higher amount of computations involved, but interactive modeling in this case is of interest because they are commonly used to describe gravitational lensing by, e.g., clusters of galaxies. References [1] A. Einstein. Lens-like action of a star by the deviation of light in the gravitational field. Science, 84:506, 1936. [2] D. Walsh, R. F. Carswell, and R. J. Weymann. 0957 + 561 a, b - twin quasistellar objects or gravitational lens. Nature, 279:381 384, May 1979. [3] R. Narayan and M. Bartelmann. Lectures on gravitational lensing. In Formation of Structure in the Universe. Cambridge Univ. Press, 1998. http://cfa-www.harvard.edu/ narayan/papers/jerulect.ps. [4] Y. Mellier, B. Fort, G. Soucail, G. Mathez, and M. Cailloux. Spectroscopy of the gravitational arcs in CL2244-02, A370 (arclet A5), and CL 0024 + 1654. ApJ, 380:334 343, 1991. [5] P. Schneider, J. Ehlers, and E. E. Falco. Gravitational Lenses, volume XIV of Astronomy and Astrophysics Library. Springer-Verlag, Berlin Heidelberg New York, 1992. [6] F. Frutos. Die interaktive Visualisierung von Gravitationslinsen. Dissertation zur Erlangung des Grades eines Doktors der Naturwissenschaften, Eberhard-Karls-Universität zu Tübingen, Germany, 1998. [7] F. Frutos. A computer program to visualize gravitational lenses. Am. J. Phys., 69:218 222, February 2001. [8] M. Sweet, C. P. Earls, and B. Spitzak. FLTK 1.0.4 Programming Manual. http://www.fltk.org/, 1999. Revision 11. [9] G. Matzigkeit. GNU Libtool 1.3.3 Documentation. http://www.gnu.org/software/libtool/libtool.html, 1999. [10] NVIDIA Corporation. NV texture shader. http://oss.sgi.com/projects/oglsample/registry/nv/texture shader.txt, 1999. [11] J. N. Hewitt, E. L. Turner, D. P. Schneider, B. F. Burke, and G. I. Langston. Unusual radio source MG1131+0456 - a possible Einstein ring. Nature, 333:537 540, June 1988. [12] S. A. Grossman and R. Narayan. The versatille elliptical gravitational lens. In Gravitational lenses, volume 330 of Lecture Notes in Physics. Springer-Verlag, 1989. [13] G. Adam, R. Bacon, G. Courtes, Y. Georgelin, G. Monnet, and E. Pecontal. Observations of the Einstein cross 2237+030 with the TIGER Integral Field Spectrograph. Astronomy and Astrophysics, 208:L15 L18, January 1989.