Next: Results of experiments Up: Field Flattening and Restoration Previous: Star detection in PIXY

# Field flattening and restoration of level corrected images

Here I regard only the level correction as processes for images.

As I mentioned before, images after level correction cannot be flattened by simple division by the background level. However the fact that noises appear only in center after decreasing the threshold at star detection implies the variance of sensitivity also influence noises. The more sensitive, the more noise becomes. The noise does not influenced by level correction. For example, let's see the case that the sensitivity in center is twice than in circumference and the background level is in center and in circumference. After subtracting 40 from each pixel, the background level becomes , respectively. The noise ratio is still 2:1 and keeps the ratio of sensitivity. It means we can obtain a flatfield function for division from the noise variance.

The current way in the PIXY system is as follows. First of all, the images are divided into some small blocks and the standard deviation of pixel values is calculated for each block. The size of each block is 10x10 definitely. Then it calculates the flatfield function which expresses the standard deviation at . The function is resembled by a quadratic function of .

However, a wrong flatfield is obtained sometimes with this method because of the influence of bright stars' uneven distribution or dark noises. For example, this image is originally rather flat but has bright stars in upper part and left part unevenly.

Comet 116P/Wild 4
Photo: Akimasa Nakamura
May 31, 1997

So the flatfield function obtained in the method above becomes extreme. The top image shows the standard deviations of each 10x10 block. The brighter, the larger the standard deviation is. The bottom image shows the obtained flatfield function resembled by a quadratic function.

Flattening the image with this function causes an adverse effect. Therefore the PIXY system calculates the mean value of all pixels and the standard deviation at first. When calculating standard deviations of each 10x10 block, it regards those pixels whose value is out of as stars or dark noises, and ignores them. In this way, it obtains a proper flatfield from the image of comet Wild 4 as follows.

After obtaining the flatfield function, the system divides all pixels by the flatfield function. Sometimes the value of the flatfield function becomes nearly 0 or negative in some positions, then some constant value is added to the function in order to the minimum value becomes 1. Then it calculates the sky field (the background level). It does not become a constant generally and is resembled by a quadratic function. But the sky field must be a constant after applying these steps above to raw images, not level corrected. On the contrary, here the system can know how the image is level corrected and restore the original pixel values before level correction. Then division by the flatfield function yields a flat image. Finally the sky field is obtained as a constant value and those pixels whose value is more than the threshold from it are detected as part of a star.

The formula of the algorithm is as follows. The pixel value before level correction is p. The value after correction is expressed as:

Here a,b are constant. The PIXY system only knows and p,a,b are unknown. The flatfield function calculated using the noise variance is F. The value after division by the flatfield function is . Then the sky field is:

Here is a sky field obtained after flattening of original image (multiplied by a constant a), which is constant. b is also constant. In addition, and F are already obtained as functions. Then it calculates two constant values and b in the method of least squares by substituting and F for each . As a result, the original image (multiplied by a constant a) is obtained as:

and the flat image of the original is obtained as:

Finally, when the difference between and the sky field is greater than the threshold, it is regarded as part of a star.

 Next: Results of experiments Up: Field Flattening and Restoration Previous: Star detection in PIXY