The purpose of this technical report is to examine the dual impact of undersampling and background noise on the estimate of the x-y centroid of a Shack-Hartmann spot.
The Shack-Hartmann spot is modeled by an Airy disk (Fig 1) centered in a 256x256 array. Undersampling is accomplished by partitioning the disk into cells of equal size (Fig 2), hereafter called "pixels." Each pixel is assigned the mean value of its constituent subpixels (Fig 3). The MATLAB function airy is used to generate the original spot.
Five levels of undersampling are used, with progressively higher degrees of quantization (29x29, 17x17, 12x12, 9x9, and 7x7 pixels). Additionally, five levels of Gaussian additive noise are specified (0.0, 0.00125, 0.00250, 0.00375, 0.00500) as input to the MATLAB function imnoise, which creates the noisy spot images using an undersampled version of the original data. Each variant of undersampling is repeated at all five additive noise levels, for a total of twenty five simulations.
Conceptually, the procedure can be represented by the following pseudocode:
for noise = minNoise : stepNoise : maxNoise
__for quantization = minQuant :
stepQuant : maxQuant
____run_simulation
__end
end
![]() Figure 1 |
![]() Figure 2 |
![]() Figure 3 |