[daip] A bug in IMSTAT?

Enno Middelberg middelberg at astro.rub.de
Wed Oct 14 06:40:13 EDT 2009


Hello,


I discovered an inconsistency which looks like a bug in IMSTAT. When 
trying to measure the rms of large (8192^2 pix) images, the rms reported 
by IMSTAT is ~10% higher than that reported by IMEAN. The IMEAN rms is 
consistent with the rms calculated in a Python script which reads in the 
FITS file (produced by FITTP).

Curiously, the discrepancy appears to be dependent on the number of 
pixels in the image. To test this I have looked at the rms of a 4^2 pix 
image, of a 2048^2 pix image and of the aforementioned 8192^2 pix image. 
Here are the results (Python script values are multiplied by 10^3):


n_pix   IMSTAT          IMEAN           Python script
4^2     1.6371E-05      1.6371E-05      0.016370692318377355
2048^2  5.7626E-05      5.7502E-05      0.057502067356446578
8192^2  6.3025E-05      5.7077E-05      0.057077074909518973


At 4^2 pixels, there is no discernible difference (due to the limited 
number of digits reported by IMSTAT and IMEAN), at 2048^2 pixels, the 
difference is 0.2%, and at 8192^2 pixels, the difference is 10.4%.

The values for maximum and minimum pixels, and for the total number of 
pixels considered in the calculation are consistent. Is this a bug in 
IMSTAT or is there something IMSTAT does (half-) secretly?


Regards,

Enno Middelberg
Bochum




More information about the Daip mailing list