J. Rosenberg, UMASS
T. Jarrett, IPAC
Introduction
This memo describes the performance results of the GALWORKS ellipse fitting routines with a set of artificial galaxy images. The objective is to estimate the uncertainty of ellipse fitting using the GALWORKS algorithms. Although our artificial galaxy images are smooth and symmetric (unlike real galaxies), they do provide a large degree of control and should provide for us the necessary information required to estimate how GALWORKS will perform with real galaxy data.
In the last section we compare SA57 ellip parameters with those determined from the optical DSS survey using the STSDAS reduction software.
Simulation galaxies were created to test the GALWORKS ellipse fitting. The objective is to create galaxies whose parameters we know for test the accuracy with which we can determine a galaxy's axis ratio and position angle as a function of galaxy magnitude. The ability to determine these parameters accurately and to know what the errors in the values are will become very important in the using 2MASS for Tully-Fisher work as well as for other projects. The simulated case does not fully describe the errors involved because these are ideal galaxies with purely exponential profiles and no defects or asymmetries, but it at least gives us some handle on the errors involved.
In order to perform these tests, images of simulation galaxies were created as arrays of 14x10 galaxies each. The large arrays of galaxies were used to facilitate running 14 trials for each set of parameters. The arrays were arranged such that the galaxy parameters remain constant across the columnns while the axis ratio of the galaxies range from 0.1 to 1.0 in steps of 0.1 down the rows. For each image that is created, a single value for the galaxies central surface brightness and position angle is selected. Images were created at several different central surface brightnesses and position angles.
Each of the galaxy images in the array is created seperately. The images are each 75x75 arrays of pixels. The flux value in each pixel is determined by considering the galaxy a perfectly symmetric exponential whose central brightness is defined for all galaxies in the image. The distances between any pixel and the central pixel weere computed from pixel center to pixel center. For all galaxies in this study, the scale length of the galaxy was 5 pixels. For the case of galaxies with axis ratios < 1.0 or position angles which are not 0, the face on, position angle 0 galaxy is then projected and/or rotated as required.
After the ideal case of the galaxy is in place, noise is added to the image. For this study, we used gaussian noise which had a sigma of 1 DN (1 count). This value for the noise is the value generally found for the protocamera in the K-band. The addition of noise to the images increases the realism of the test, but still does not make up for the pure, symmetric exponentials that define the galaxies and make this only an approximate test.
We took the images that were made and determined the mean difference between the 3-sigma contour values of axis ratio and position angle determined by GALWORKS and the real values. These results and their standard deviations are discussed more fully below as a function of galaxy magnitude.
GALWORKS determines the 2-D elliptical shape of galaxies using the 3-sigma isophote. The isophote is isolated by constructing vectors whose vertex is anchored to the center of the galaxy. The radius (length of vector) is determined by linearly interpolating between pixels to estimate the 3-sigma isophote.
A "mask" image is generated from this operation. This image divides the image into three components and assigns a pixel value to each component. One value is assigned to the pixels on the 3-sigma isophote, a different value corresponds to the inside of the isophote and finally zeros are assigned to the outside of the isophote.
After the mask image is created, the image is then fed to the routine "twod_ellip" which determines the best fit ellipse to the mask (i.e., to the 3-sigma isophote). The best fit is determined from the ellipse parameter space: independent parameters, b/a (axis ratio) and p.a. (position angle), and dependent parameter, semi-major axis radius, rsemi. The distribution in rsemi with input isophote x-y locations is minimized (that is, the standard deviation in the distribution is minimized) to locate the best fit axis ratio and position angle.
Algorithm Summary:
2. For each vector, determine radius at which the 3-sigma level occurs. Use linear interpolation for inter-pixel values.
3. Construct isophote mask image. Pixels have three possible values:
The additional information (b and c, above) is necessary to 'clean up' the isophote itself -- in some cases the isophote has a width larger than 1 pixel due to the method (using angular vectors). With three pieces of information in the mask, the isophote can be stripped to a width of one-pixel. This is crucial to accurate determination of the axis ratio (preliminary tests suggest our accuracy is about 0.025 or less with this method).
4. Determine best fit ellipse to the 3-sigma isophote represented by the mask image.
Algor:
For each combination of b/a and phi,
input location of 3-sigma isophote --
get the population of semi-major axis
values for each 3-sigma location.
Minimize the output semi-major axis distribution:
This algor has the advantage of being both robust and fast (it is a 'one-pass' algorithm). The results presented in this memo come from this algorithm.
Example Test Cases
The following images are only a small sample of the population of artificial galaxy images processed by GALWORKS. The individual images show the galaxy, the "perimeter" outline defining the 3-sigma contour and the final ellipse fit solution. The background noise ("sigma") is about 1 dn, typical of most of the sky at K band.
Results
The following plots summarize the GALWORKS ellipse fitting performance for parameters: axis ratio (b/a), position angle (p.a.) and semi-major axis radius (rsemi), all measured at the 3-sigma contour level. For each axis ratio (0.1 to 1.0), GALWORKS computes the mean and standard deviation of the population of 14 galaxies duplicated on different parts of the image (thus subject to a different random background noise pattern). Each point in the plots below represent the mean, with the error bars corresponding to the standard deviation of the population. This calculation was performed for a sequentially fainter set of galaxies (K mag ranged from 9 to 14 for b/a = 0.1, and slightly brighter for larger axis ratios).
The mean ellipse fit parameter tells us how accurately GALWORKS measures the particular parameter (e.g., p.a.) compared to the control value (i.e., "truth"), while the standard deviation tells us how consistently we compute the parameter (note: not how accurately we compute the parameter, but rather how consistent a value we derive).
Two general cases were considered. The position angle for each galaxy was fixed at 0.0 degrees and then at 60.0 degrees. In principle there should be no difference between the two cases (except for a slight random pattern noise difference due to the differing spatial orientations -- a very small effect); thus, any measurable difference would indicate a more serious systematic problem with the method.
Position Angle = 0.0 degrees
Position Angle = 60.0 degrees
Note: Since we generated our artificial galaxies with a constant scale length (5 pixels) and varied only the central surface brightness, the end result is that more face on galaxies galaxies have a low surface brightness while the highly elliptical galaxies have a high surface brightness. Consequently, we derive the ellipse parameters for highly elliptical galaxies down to K = 14 mag, but only about K = 12.5 or 13.0 for circular galaxies.
Axis Ratio
The axis ratio is consistently measured to better than a few percent in all cases except when the semi-major axis is very small, < 7 pixels (see figures 3 and 6). Figures 1 and 4 show the axis ratio results, with dotted vertical lines denoting the point at which the semi-major axis radius falls below 5 pixels -- at this point there are not enough pixels to resolve the shape of the galaxy accurately due to the inherent undersampling of the data (1" pixels, with 2" resolution) unique to the 2MASS survey.
There appear to be no systematic trends or "biases" in the axis ratio measurements except a slight systematic at b.a = 0.1 and b/a = 1.0. At b.a. = 0.1, there appears to be a bias of about 1 to 2% for the case of 60 degree position angle and only a hint of a bias for the 0 degree position angle case. The image below shows a case in which the derived axis ratio is 3% larger than it should be. The image shows the 3-sigma perimeter pixels and the ellipse solution to this perimeter. There does not appear to be anything extraordinary about the image or the solution.
For b.a. = 1.0 (i.e., circular profiles) there is a 2 to 3% bias present for the 0 and 60 degree position angle cases. The systematic effect is due to the fact that b.a = 1.0 is a ceiling value and the only measurements deviating from the ceiling value must be biased low toward more elliptical shapes.
Position angle
The position angle is consistently measured to better than 5 degrees for most cases, including b/a < 0.8 (see figures 2 and 5). For b/a > 0.8, the position angle has diminishing meaning as the galaxy orientation becomes circular.
As with the axis ratio measurement, the ellipse parameters are well determined when the surface brightness is high (either the galaxy is bright, or the axis ratio is low) so that the 3-sigma semi-major axis radius is well beyond the affect of the large pixels (rsemi > 5 arcsec or so).
Finally, there is no systematic or otherwise appreciable difference between the 0.0 degree position angle results and the 60.0 degree position angle results.
Summary of Simulation Experiment
GALWORKS appears to be deriving the axis ratio and position angle elliptical parameters to better than 1 or 2% accuracy and consistency. There is a slight (<2%) systematic bias in the axis ratio measurement for the case in which b/a = 0.1 and the position angle is 60 degrees. This effect is due to the undersampling of the data inherent to 2MASS and to the fact that addition of noise will make the galaxy appear more face on.
There is a 3 to 4% systematic bias in the axis ratio measurement for the case in which b/a = 1.0. This effect is to the ceiling value of 1.0, any noise addition can impart a slight perturbation from a circular orientation.
There is no evidence of a bias in the position angle measurement. There is no appreciable difference in the position angle results for the case of 0 degree position angle and 60 degree position angle.
The derived ellipical parameters are not well measured when the size of the galaxy is small, as measured with semi-major axis. The break appears to occur at which rsemi < 5 to 7 pixels. This effect is due to the undersampling of the data.