FixedGaussian Galaxy

This model uses a standard elliptical Gaussian form for the galaxy where the ratio of the major to the minor axis is constant (before shear bias). The function centered around (xo,yo) is (note that it is not normalized):

f(x,y) = c*exp((-1.0)*((x-xo)^2+(y-yo)^2)/sigma2) where c=mag*magnitude/(pi*sigma2)

"mag" is a random parameter that varies with each galaxy. "magnitude" is a user-provided constant overall intensity scaling factor. "sigma2" is a normalizing factor given by sigma2=2.0*a*a. The ellipticity is accomplished by image transformation, as described below.

The function is rasterized by sampling once per pixel. By default the image is drawn, and then transformed in image space. If the useCoordXForm is set to 1, instead the coordinates will be transformed and the function will be rasterized using the alternate coordinates -- this is a much faster method and yields the same results.

A set of random transformations and non-random transformations are applied to the function. These are:
mag = .2+getRand()*2.0
theta = pi*getRand()
g1 = 1.0-e
First the model is non-uniformally scaled on the y axis by the value of g1, where e is the axis ratio provided by the user. Then it is rotated in the plane by theta, and finally every value is multiplied by mag. The random values are reselected every time drawGal() is called unless "SelectGal 0" has been specified as a parameter, in which case the calling function must call select() when it wants to choose new random values. Either of these random values can be made non-random by specifying the proper parameter as specified below.

Parameters
NameDescription
MajorAxis The sigma length of the major axis in pixels -- the value of "a" in the equation.
AxisRatio The fixed ratio of the major to the minor axis. The value of "e" in the equation.
Magnitude An overall intensity scaling factor in units of counts.
VaryRotation If set to 0, never vary rotation of galaxy (it will be set to 0.0).
VaryMagnitude If set to 0, never vary the mag parameter (it will be set to 1.0).
SelectGal If set to 0, do not automatically change random parameters before drawing.
UseCoordXForm If set to 1, transform the coordinates before rasterizing instead of transforming the image after rasterizing. Setting UseCoordXForm to 1 is almost always a big performance boost.