Appendix B
Details on the simulation program

B.1 IDL

A major part of this work was the computer implementation of the simulation. The resulting program units shall now be described here. The program was completely written in IDL (Interactive Data Language), version 5.4. This language provides easy methods and functions to manipulate, query and evaluate large data arrays, which avoid the necessity to program loops. Several useful mathematic functions are implemented, including numerical integration and random number generation. The algorithms used for those features are mostly taken from the famous ”Numerical Recipes“ (Press et al. (1988)). A large number of useful libraries are available on the Internet. NASA provides the astrolib (NASA (2001)), containing lots of procedures covering astrophysical problems. This library also includes routines to read and write the fits-format, being an interface to a lot of data reduction programs. Finally IDL is able to write plots directly to Postscript format. The major flaw of IDL is, that it is a commercial program and thus not easily available to anyone. It is sold by Research Systems.

For programming convenience the program was divided into three parts. cosmology.pro provides for functions related to cosmology, mainly distance calculations. It uses the equations derived in appendix A. The involved integrations are done numerically, using the Romberg method from Press et al. (1988). utility.pro includes the SED model described in section 2.1 and some modified routines for reading table files and plotting data with asymmetrical errors. Finally, sim.pro contains the Monte Carlo simulation itself, which is described in section B.2. It must be said that this part is affected most by the development during the work, undergoing several major changes. So, the procedures found there are laden with historical ballast and would benefit from a general cleanup and rearrangement. This may already have happened while you read this lines.

In the following sections the routines of the program units are described. The syntax and usage is listed, and also known issues are discussed. The routines are available on request for interested users. Routines written as Name (Argument) are functions, those written as Name, Parameter are procedures. Not all functions and procedures contained in the units are described, as some routines are only for the internal computation or may be unfinished or have unfixed errors putting them beyond usefulness.

B.2 Monte Carlo

The final modeling is done through Monte Carlo simulations. This method builds a realization of a distribution using random numbers. The distribution is described by a function p(x). The function is then normalized to be 1 at its maximum:

           p(x)
P (x) = -----------
        max(p(x))
(B.1)

To x a random value chosen from all allowed values for x is assigned. A second random value is generated from an uniform distribution of all numbers between 0 and 1. If this value is less or equal than P(x), the distribution is regarded as ’hit’ and the value of x is made part of the realization of p(x). This procedure is repeated until the desired number of values is generated. One possible realization of p(x) is found.

The random numbers are generated by the IDL built-in random number generator. It is initialized with the system time of the computer, measured in seconds. To generate uniformly distributed random numbers, IDL uses a method from ”Random Number Generators: Good Ones are Hard to Find“, Park and Miller, Communications of the ACM, Oct 1988, Vol 31, No. 10, p. 1192, which is modified by a Bays-Durham shuffle, resulting in a random generator similar to ran1() in Press et al. (1988), section 7.1. The formula used is:

     (i -  1)i   + i
yu = --1--2--max----2
         imax + 1
(B.2)

where i1 and i2 are integer random deviates in the range [1...imax] and imax = 231 - 2 is the largest possible integer random deviate. yu is in the range 0 < yu < 1. For normally distributed (Gaussian) random numbers the Box-Muller method is used. For details see Press et al. (1988), section 7.2. The generated numbers have a mean of zero and a standard deviation of one. Such a random number in the following is designated by yn.

For a given solid angle of sky a range in redshift to be populated with starburst galaxies is defined, since the simulation out to z =  oo (or out to z  ~~ 1000, where the CMB radiation indicates a hot dense state of the universe without galaxies) would take to much computing time. The assigned range is divided into equal sized redshift intervals (redshift bins). For each interval the number of galaxies in it is calculated. This is done by integrating the luminosity function to a luminosity cutoff Lmin and multiplying the result by the comoving volume corresponding to the redshift bin and solid angle.

To assign luminosities to the galaxies of each redshift bin, a Monte Carlo realization of the luminosity distribution is conducted until the required number of galaxies is found. To minimize the number of drawn blanks, the drawing is done in logarithmic space. Further, an upper luminosity limit Lmax is set to reduce the number of drawn blanks. To each galaxy a SED is assigned. This is done by Monte Carlo realizations of the parameter distributions given in sections 2.1.3 and 2.2.2.

The position assignment for the generation of artificial maps is done by a Monte Carlo realization of the spatial galaxy distribution, derived from a biased dark matter distribution. The latter is computed from the numerical simulations of the Hubble Volume project.

B.3 cosmology.pro

B.4 utility.pro

B.5 sim.pro