| | 3 | While testing the input FWHM cut, I discovered that an image that appeared valid by eye was being flagged during the PSF matching stage as having a overly deviant chi^2 value. A study of the code revealed that the chi^2 value used is calculated in the following way: |
| | 4 | |
| | 5 | 1. For all valid stamps in the PSF match, the flux and squared residual are fit with a quadratic function (x0 + x1 * flux + x2 * flux^2). |
| | 6 | 2. This quadratic function is subtracted from the squared residual, providing a flux-neutral measurement of the squared residuals. |
| | 7 | 3. The RMS scatter of these remaining residuals is saved as the chi^2 value for the PSF match (there's a sum over all used kernels, but the example case has only a single kernel). |
| | 8 | |
| | 9 | The following table shows the set of PSF match values, along with the parameters of the quadratic function: |
| | 10 | |
| | 11 | || Nstamp || mean || rms || x0 || x1 || x2 || Image || Rejected? || |
| | 12 | || 27 || -1e-06 || 60.7719 || 19.8792 || 0.000116288 || -9.31452e-13 || 0 || || |
| | 13 | || 119 || 1e-06 || 64.4908 || 57.5848 || -8.45089e-05 || 3.59486e-11 || 1 || || |
| | 14 | || 26 || -1e-06 || 43.3212 || 27.068 || 5.53666e-05 || 1.7642e-13 || 2 || || |
| | 15 | || 107 || -2e-05 || 2756.68 || 1273.49 || -0.00181565 || 1.34383e-10 || 3 || At Input Stage || |
| | 16 | || 106 || -9e-06 || 1105.5 || 614.941 || -0.000711782 || 1.01758e-10 || 4 || Yes || |
| | 17 | || 102 || -1e-06 || 105.827 || 18.7579 || 0.000123878 || -3.35511e-12 || 5 || At Input Stage || |
| | 18 | || 101 || -0 || 51.924 || 27.2631 || 7.72215e-05 || 1.07841e-12 || 6 || || |
| | 19 | || 100 || -6e-06 || 738.86 || 222.832 || -0.000305871 || 2.12201e-10 || |
| | 20 | || 99 || 8e-06 || 273.861 || 95.194 || -0.000156691 || 2.03263e-10 || 7 || Yes || |
| | 21 | || 124 || 4e-06 || 226.235 || 18.6949 || 0.000113144 || 4.15584e-12 || |
| | 22 | || 122 || 2e-06 || 92.0136 || 18.5325 || 0.000110472 || 3.66559e-13 || 8 || || |
| | 23 | || 123 || 1e-06 || 135.964 || -1.48911|| 0.000144198 || -2.92106e-12 || |
| | 24 | || 121 || 1e-06 || 77.5818 || 7.60706 || 0.000104179 || 7.44259e-14 || 9 || || |
| | 25 | || 103 || 3e-06 || 330.224 || -70.9388|| 0.000411208 || -5.42577e-12 || |
| | 26 | || 101 || -3e-06 || 53.8796 || -7.55995|| 0.000204406 || 5.83814e-12 || 10 || || |
| | 27 | || 116 || 0 || 55.2009 || 15.2849 || 4.40914e-05 || 6.08214e-12 || |
| | 28 | || 116 || -0 || 23.573 || 32.1768 || 1.87319e-06 || 8.4501e-12 || 11 || || |